@liquidcommercedev/rmn-sdk 1.5.0-beta.40 → 1.5.0-beta.42
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/dist/index.cjs +905 -474
- package/dist/index.esm.js +905 -474
- package/dist/types/enums.d.ts +3 -0
- package/dist/types/modules/element/component/spot/spot.component.d.ts +4 -0
- package/dist/types/modules/element/element.interface.d.ts +6 -1
- package/dist/types/modules/selection/selection.interface.d.ts +8 -0
- package/dist/types/modules/spot-template/rb-template.interface.d.ts +79 -48
- package/dist/types/modules/spot-template/reservebar/homepage-hero-full-image.template.d.ts +2 -0
- package/dist/types/modules/spot-template/reservebar/homepage-hero-three-tile.template.d.ts +2 -0
- package/dist/types/modules/spot-template/reservebar/homepage-hero-two-tile.template.d.ts +2 -0
- package/dist/types/modules/spot-template/reservebar/large-category-image-tout.template.d.ts +2 -0
- package/dist/types/modules/spot-template/reservebar/long-tout-short.template.d.ts +2 -0
- package/dist/types/modules/spot-template/reservebar/long-tout-tall.template.d.ts +2 -0
- package/dist/types/modules/spot-template/reservebar/navigation-banner.template.d.ts +2 -0
- package/dist/types/modules/spot-template/reservebar/small-category-image-tout.template.d.ts +2 -0
- package/dist/types/modules/spot-template/reservebar/small-discover-tout.template.d.ts +1 -0
- package/dist/types/modules/spot-template/spot-template.constant.d.ts +5 -0
- package/dist/types/modules/spot-template/spot-template.interface.d.ts +1 -0
- package/dist/types/modules/spot-template/utils.d.ts +2 -0
- package/package.json +13 -11
- package/umd/liquidcommerce-rmn-sdk.min.js +1 -1
package/dist/index.esm.js
CHANGED
@@ -86,6 +86,9 @@ var ENUM_TEXT_BLOCK_POSITION;
|
|
86
86
|
(function (ENUM_TEXT_BLOCK_POSITION) {
|
87
87
|
ENUM_TEXT_BLOCK_POSITION["LEFT"] = "left";
|
88
88
|
ENUM_TEXT_BLOCK_POSITION["RIGHT"] = "right";
|
89
|
+
ENUM_TEXT_BLOCK_POSITION["TOP"] = "top";
|
90
|
+
ENUM_TEXT_BLOCK_POSITION["BOTTOM"] = "bottom";
|
91
|
+
ENUM_TEXT_BLOCK_POSITION["MIDDLE"] = "middle";
|
89
92
|
ENUM_TEXT_BLOCK_POSITION["TOP_LEFT"] = "top-left";
|
90
93
|
ENUM_TEXT_BLOCK_POSITION["TOP_RIGHT"] = "top-right";
|
91
94
|
ENUM_TEXT_BLOCK_POSITION["BOTTOM_LEFT"] = "bottom-left";
|
@@ -1946,8 +1949,8 @@ function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
|
|
1946
1949
|
byteOffset = 0;
|
1947
1950
|
} else if (byteOffset > 0x7fffffff) {
|
1948
1951
|
byteOffset = 0x7fffffff;
|
1949
|
-
} else if (byteOffset < -
|
1950
|
-
byteOffset = -
|
1952
|
+
} else if (byteOffset < -2147483648) {
|
1953
|
+
byteOffset = -2147483648;
|
1951
1954
|
}
|
1952
1955
|
byteOffset = +byteOffset; // Coerce to Number.
|
1953
1956
|
if (isNaN(byteOffset)) {
|
@@ -2706,7 +2709,7 @@ Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, no
|
|
2706
2709
|
Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
|
2707
2710
|
value = +value;
|
2708
2711
|
offset = offset | 0;
|
2709
|
-
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -
|
2712
|
+
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -128);
|
2710
2713
|
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
|
2711
2714
|
if (value < 0) value = 0xff + value + 1;
|
2712
2715
|
this[offset] = (value & 0xff);
|
@@ -2716,7 +2719,7 @@ Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
|
|
2716
2719
|
Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
|
2717
2720
|
value = +value;
|
2718
2721
|
offset = offset | 0;
|
2719
|
-
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -
|
2722
|
+
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -32768);
|
2720
2723
|
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
2721
2724
|
this[offset] = (value & 0xff);
|
2722
2725
|
this[offset + 1] = (value >>> 8);
|
@@ -2729,7 +2732,7 @@ Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert)
|
|
2729
2732
|
Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
|
2730
2733
|
value = +value;
|
2731
2734
|
offset = offset | 0;
|
2732
|
-
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -
|
2735
|
+
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -32768);
|
2733
2736
|
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
2734
2737
|
this[offset] = (value >>> 8);
|
2735
2738
|
this[offset + 1] = (value & 0xff);
|
@@ -2742,7 +2745,7 @@ Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert)
|
|
2742
2745
|
Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
|
2743
2746
|
value = +value;
|
2744
2747
|
offset = offset | 0;
|
2745
|
-
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -
|
2748
|
+
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -2147483648);
|
2746
2749
|
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
2747
2750
|
this[offset] = (value & 0xff);
|
2748
2751
|
this[offset + 1] = (value >>> 8);
|
@@ -2757,7 +2760,7 @@ Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert)
|
|
2757
2760
|
Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
|
2758
2761
|
value = +value;
|
2759
2762
|
offset = offset | 0;
|
2760
|
-
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -
|
2763
|
+
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -2147483648);
|
2761
2764
|
if (value < 0) value = 0xffffffff + value + 1;
|
2762
2765
|
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
2763
2766
|
this[offset] = (value >>> 24);
|
@@ -6087,7 +6090,7 @@ function matchesKeywordPattern(words, required, optional) {
|
|
6087
6090
|
return false;
|
6088
6091
|
}
|
6089
6092
|
// If no optional keywords are specified, return true
|
6090
|
-
if (!(optional === null || optional ===
|
6093
|
+
if (!(optional === null || optional === undefined ? undefined : optional.length)) {
|
6091
6094
|
return true;
|
6092
6095
|
}
|
6093
6096
|
// If optional keywords exist, check if at least one matches as a whole word
|
@@ -6100,7 +6103,7 @@ function matchesKeywordPattern(words, required, optional) {
|
|
6100
6103
|
* @returns {RMN_SPOT_EVENT | null} - The corresponding RMN_SPOT_EVENT or null if no match
|
6101
6104
|
*/
|
6102
6105
|
function getEventTypeFromRawEvent(event) {
|
6103
|
-
if (!(event === null || event ===
|
6106
|
+
if (!(event === null || event === undefined ? undefined : event.trim())) {
|
6104
6107
|
return null;
|
6105
6108
|
}
|
6106
6109
|
const words = normalizeEventName(event);
|
@@ -7587,7 +7590,7 @@ class ObjectHelper {
|
|
7587
7590
|
else if (typeof value === 'object') {
|
7588
7591
|
return this.mergeObjectValues(targetValue, value);
|
7589
7592
|
}
|
7590
|
-
return (_a = value !== null && value !==
|
7593
|
+
return (_a = value !== null && value !== undefined ? value : targetValue) !== null && _a !== undefined ? _a : undefined;
|
7591
7594
|
}
|
7592
7595
|
/**
|
7593
7596
|
* Merges the values of an array or object with a given array of objects and returns the merged result as an object.
|
@@ -7668,7 +7671,7 @@ function xhrFallbackEventFire(url) {
|
|
7668
7671
|
}
|
7669
7672
|
function beaconEventFire(url) {
|
7670
7673
|
var _a;
|
7671
|
-
return (_a = navigator === null || navigator ===
|
7674
|
+
return (_a = navigator === null || navigator === undefined ? undefined : navigator.sendBeacon) === null || _a === undefined ? undefined : _a.call(navigator, url);
|
7672
7675
|
}
|
7673
7676
|
/**
|
7674
7677
|
* Helper function to decode base64 string and parse JSON
|
@@ -7789,7 +7792,7 @@ function calculateScaleFactor(elementScale) {
|
|
7789
7792
|
* @returns {string} - The query string.
|
7790
7793
|
*/
|
7791
7794
|
function objectToQueryParams(obj) {
|
7792
|
-
return Object.entries(obj !== null && obj !==
|
7795
|
+
return Object.entries(obj !== null && obj !== undefined ? obj : {})
|
7793
7796
|
.map(([key, value]) => {
|
7794
7797
|
if (value == null) {
|
7795
7798
|
return '';
|
@@ -12041,7 +12044,7 @@ function requireCipherCore () {
|
|
12041
12044
|
C_lib.StreamCipher = Cipher.extend({
|
12042
12045
|
_doFinalize: function () {
|
12043
12046
|
// Process partial blocks
|
12044
|
-
var finalProcessedBlocks = this._process(
|
12047
|
+
var finalProcessedBlocks = this._process(true);
|
12045
12048
|
|
12046
12049
|
return finalProcessedBlocks;
|
12047
12050
|
},
|
@@ -12322,10 +12325,10 @@ function requireCipherCore () {
|
|
12322
12325
|
padding.pad(this._data, this.blockSize);
|
12323
12326
|
|
12324
12327
|
// Process final blocks
|
12325
|
-
finalProcessedBlocks = this._process(
|
12328
|
+
finalProcessedBlocks = this._process(true);
|
12326
12329
|
} else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {
|
12327
12330
|
// Process final blocks
|
12328
|
-
finalProcessedBlocks = this._process(
|
12331
|
+
finalProcessedBlocks = this._process(true);
|
12329
12332
|
|
12330
12333
|
// Unpad data
|
12331
12334
|
padding.unpad(finalProcessedBlocks);
|
@@ -16683,9 +16686,9 @@ class ApiError {
|
|
16683
16686
|
constructor(error) {
|
16684
16687
|
var _a, _b, _c, _d, _e, _f, _g;
|
16685
16688
|
const e = error;
|
16686
|
-
this.cause = (_d = (_b = (_a = e === null || e ===
|
16689
|
+
this.cause = (_d = (_b = (_a = e === null || e === undefined ? undefined : e.response) === null || _a === undefined ? undefined : _a.data.statusCode) !== null && _b !== undefined ? _b : (_c = e === null || e === undefined ? undefined : e.response) === null || _c === undefined ? undefined : _c.status) !== null && _d !== undefined ? _d : 0;
|
16687
16690
|
this.errorMessage =
|
16688
|
-
(_g = (_f = (_e = e === null || e ===
|
16691
|
+
(_g = (_f = (_e = e === null || e === undefined ? undefined : e.response) === null || _e === undefined ? undefined : _e.data.message) !== null && _f !== undefined ? _f : e === null || e === undefined ? undefined : e.message) !== null && _g !== undefined ? _g : `There's been an error related to the API request to LiquidCommerce RMN Services.`;
|
16689
16692
|
}
|
16690
16693
|
}
|
16691
16694
|
|
@@ -16800,12 +16803,12 @@ class BaseApi extends BaseApiAbstract {
|
|
16800
16803
|
this.authInfo = auth;
|
16801
16804
|
this.encryptedApi = EncryptedApi.getInstance(this.authInfo.apiKey);
|
16802
16805
|
this.objectHelper = ObjectHelper.getInstance();
|
16803
|
-
this.baseUrl = (_a = SDK_CONFIG.url[this.authInfo.env]) !== null && _a !==
|
16806
|
+
this.baseUrl = (_a = SDK_CONFIG.url[this.authInfo.env]) !== null && _a !== undefined ? _a : SDK_CONFIG.url.development;
|
16804
16807
|
const configHeaders = {
|
16805
16808
|
[SDK_CONFIG.accessHeader]: `Bearer ${this.authInfo.token}`,
|
16806
16809
|
};
|
16807
16810
|
const partnerSite = this.getPartnerSite();
|
16808
|
-
const isPartnerSiteValid = partnerSite === null || partnerSite ===
|
16811
|
+
const isPartnerSiteValid = partnerSite === null || partnerSite === undefined ? undefined : partnerSite.startsWith('http');
|
16809
16812
|
if (partnerSite && isPartnerSiteValid) {
|
16810
16813
|
configHeaders[REQUEST_CLOUD_PARTNER_SITE] = partnerSite;
|
16811
16814
|
}
|
@@ -16861,7 +16864,7 @@ class BaseApi extends BaseApiAbstract {
|
|
16861
16864
|
configOverrides = {
|
16862
16865
|
...configOverrides,
|
16863
16866
|
headers: {
|
16864
|
-
...configOverrides === null || configOverrides ===
|
16867
|
+
...configOverrides === null || configOverrides === undefined ? undefined : configOverrides.headers,
|
16865
16868
|
[REQUEST_CLOUD_PROTECTED_KEY]: 'true',
|
16866
16869
|
[REQUEST_CLOUD_PROTECTED_TIMESTAMP]: timestamp,
|
16867
16870
|
[SDK_CONFIG.apiHeader]: this.authInfo.apiKey,
|
@@ -16898,7 +16901,7 @@ class BaseApi extends BaseApiAbstract {
|
|
16898
16901
|
* @returns {AxiosRequestConfig} - The merged Axios request configuration.
|
16899
16902
|
*/
|
16900
16903
|
createFullConfig(configOverrides) {
|
16901
|
-
return this.objectHelper.merge(this.getConfig(), configOverrides !== null && configOverrides !==
|
16904
|
+
return this.objectHelper.merge(this.getConfig(), configOverrides !== null && configOverrides !== undefined ? configOverrides : {});
|
16902
16905
|
}
|
16903
16906
|
/**
|
16904
16907
|
* Sends a request to the specified URL with the given configuration.
|
@@ -16922,17 +16925,17 @@ class BaseApi extends BaseApiAbstract {
|
|
16922
16925
|
*/
|
16923
16926
|
async getResponse(response) {
|
16924
16927
|
var _a, _b, _c, _d, _e, _f, _g;
|
16925
|
-
let responseData = (response === null || response ===
|
16928
|
+
let responseData = (response === null || response === undefined ? undefined : response.data) ? response.data : null;
|
16926
16929
|
let isEncrypted = false;
|
16927
16930
|
let timestamp = 0;
|
16928
|
-
if ((response === null || response ===
|
16929
|
-
((_a = response === null || response ===
|
16930
|
-
((_b = response === null || response ===
|
16931
|
-
((_c = response === null || response ===
|
16932
|
-
((_d = response === null || response ===
|
16933
|
-
isEncrypted = ((_e = response === null || response ===
|
16934
|
-
timestamp = ((_f = response === null || response ===
|
16935
|
-
? Number((_g = response === null || response ===
|
16931
|
+
if ((response === null || response === undefined ? undefined : response.headers) &&
|
16932
|
+
((_a = response === null || response === undefined ? undefined : response.headers) === null || _a === undefined ? undefined : _a.has) &&
|
16933
|
+
((_b = response === null || response === undefined ? undefined : response.headers) === null || _b === undefined ? undefined : _b.has(REQUEST_CLOUD_PROTECTED_KEY)) &&
|
16934
|
+
((_c = response === null || response === undefined ? undefined : response.headers) === null || _c === undefined ? undefined : _c.has(REQUEST_CLOUD_PROTECTED_TIMESTAMP)) &&
|
16935
|
+
((_d = response === null || response === undefined ? undefined : response.headers) === null || _d === undefined ? undefined : _d.get)) {
|
16936
|
+
isEncrypted = ((_e = response === null || response === undefined ? undefined : response.headers) === null || _e === undefined ? undefined : _e.get(REQUEST_CLOUD_PROTECTED_KEY)) === 'true';
|
16937
|
+
timestamp = ((_f = response === null || response === undefined ? undefined : response.headers) === null || _f === undefined ? undefined : _f.get(REQUEST_CLOUD_PROTECTED_TIMESTAMP))
|
16938
|
+
? Number((_g = response === null || response === undefined ? undefined : response.headers) === null || _g === undefined ? undefined : _g.get(REQUEST_CLOUD_PROTECTED_TIMESTAMP))
|
16936
16939
|
: 0;
|
16937
16940
|
}
|
16938
16941
|
if (responseData &&
|
@@ -16941,7 +16944,7 @@ class BaseApi extends BaseApiAbstract {
|
|
16941
16944
|
timestamp > 0) {
|
16942
16945
|
const { t: encryptedPayload } = responseData;
|
16943
16946
|
const decryptedData = await this.encryptedApi.handleDecryption(encryptedPayload, timestamp);
|
16944
|
-
if (decryptedData === null || decryptedData ===
|
16947
|
+
if (decryptedData === null || decryptedData === undefined ? undefined : decryptedData.payload) {
|
16945
16948
|
delete decryptedData.payload.exp;
|
16946
16949
|
delete decryptedData.payload.iat;
|
16947
16950
|
responseData = decryptedData.payload;
|
@@ -16995,9 +16998,9 @@ class AuthService extends BaseApi {
|
|
16995
16998
|
},
|
16996
16999
|
});
|
16997
17000
|
if (isErr) {
|
16998
|
-
throw new Error(`There was an error during authentication: (${isErr === null || isErr ===
|
17001
|
+
throw new Error(`There was an error during authentication: (${isErr === null || isErr === undefined ? undefined : isErr.errorMessage})`);
|
16999
17002
|
}
|
17000
|
-
if (isOk && (val === null || val ===
|
17003
|
+
if (isOk && (val === null || val === undefined ? undefined : val.data.token)) {
|
17001
17004
|
this.authInfo.token = val.data.token;
|
17002
17005
|
this.authInfo.authenticated = true;
|
17003
17006
|
}
|
@@ -17076,6 +17079,8 @@ class BaseSpotComponent extends BaseElement {
|
|
17076
17079
|
super();
|
17077
17080
|
this.initialized = false;
|
17078
17081
|
this.dataInitialized = false;
|
17082
|
+
this.reRenderOnDeviceChange = false;
|
17083
|
+
this._isMobileDevice = true;
|
17079
17084
|
}
|
17080
17085
|
initializeData(data, config) {
|
17081
17086
|
if (this.dataInitialized) {
|
@@ -17125,6 +17130,27 @@ class BaseSpotComponent extends BaseElement {
|
|
17125
17130
|
}
|
17126
17131
|
`;
|
17127
17132
|
}
|
17133
|
+
setupDeviceDetection() {
|
17134
|
+
if (!isBrowser)
|
17135
|
+
return;
|
17136
|
+
const mediaQuery = '(max-width: 639.98px)';
|
17137
|
+
const containerQuery = window.matchMedia(mediaQuery);
|
17138
|
+
const updateDeviceState = (e) => {
|
17139
|
+
var _a;
|
17140
|
+
const isMobileNewValue = e.matches;
|
17141
|
+
if (this._isMobileDevice !== isMobileNewValue) {
|
17142
|
+
this._isMobileDevice = isMobileNewValue;
|
17143
|
+
(_a = this.onDeviceChange) === null || _a === undefined ? undefined : _a.call(this, this._isMobileDevice);
|
17144
|
+
if (this.reRenderOnDeviceChange) {
|
17145
|
+
this.render();
|
17146
|
+
}
|
17147
|
+
}
|
17148
|
+
};
|
17149
|
+
// Setup listener
|
17150
|
+
containerQuery.addEventListener('change', updateDeviceState);
|
17151
|
+
// Initial check
|
17152
|
+
updateDeviceState(containerQuery);
|
17153
|
+
}
|
17128
17154
|
// Lifecycle callbacks
|
17129
17155
|
connectedCallback() {
|
17130
17156
|
var _a;
|
@@ -17133,14 +17159,15 @@ class BaseSpotComponent extends BaseElement {
|
|
17133
17159
|
this.initialized = true;
|
17134
17160
|
if (this.dataInitialized) {
|
17135
17161
|
this.render();
|
17162
|
+
this.setupDeviceDetection();
|
17136
17163
|
}
|
17137
|
-
(_a = this.connected) === null || _a ===
|
17164
|
+
(_a = this.connected) === null || _a === undefined ? undefined : _a.call(this);
|
17138
17165
|
}
|
17139
17166
|
disconnectedCallback() {
|
17140
17167
|
var _a;
|
17141
17168
|
if (!isBrowser)
|
17142
17169
|
return;
|
17143
|
-
(_a = this.disconnected) === null || _a ===
|
17170
|
+
(_a = this.disconnected) === null || _a === undefined ? undefined : _a.call(this);
|
17144
17171
|
}
|
17145
17172
|
}
|
17146
17173
|
|
@@ -17183,11 +17210,11 @@ class LocalStorageService {
|
|
17183
17210
|
setSpot(spotId, data) {
|
17184
17211
|
var _a, _b, _c, _d, _e;
|
17185
17212
|
data.createdAt = Date.now();
|
17186
|
-
const isExistentSpot = (_a = this.spots) === null || _a ===
|
17213
|
+
const isExistentSpot = (_a = this.spots) === null || _a === undefined ? undefined : _a.has(spotId);
|
17187
17214
|
if (isExistentSpot) {
|
17188
|
-
data.firedEvents = (_d = (_c = (_b = this.spots) === null || _b ===
|
17215
|
+
data.firedEvents = (_d = (_c = (_b = this.spots) === null || _b === undefined ? undefined : _b.get(spotId)) === null || _c === undefined ? undefined : _c.firedEvents) !== null && _d !== undefined ? _d : [];
|
17189
17216
|
}
|
17190
|
-
(_e = this.spots) === null || _e ===
|
17217
|
+
(_e = this.spots) === null || _e === undefined ? undefined : _e.set(spotId, data);
|
17191
17218
|
this.updateLocalStorage();
|
17192
17219
|
}
|
17193
17220
|
// public removeSpot(spotId: string): void {
|
@@ -17232,12 +17259,12 @@ class LocalStorageService {
|
|
17232
17259
|
setUserId() {
|
17233
17260
|
var _a;
|
17234
17261
|
const prefix = LocalStorageService.localStorageKeyPrefix;
|
17235
|
-
const existingKeys = Object.keys((_a = window.localStorage) !== null && _a !==
|
17262
|
+
const existingKeys = Object.keys((_a = window.localStorage) !== null && _a !== undefined ? _a : {}).filter((key) => key.startsWith(prefix));
|
17236
17263
|
const setNewKey = () => {
|
17237
17264
|
var _a;
|
17238
17265
|
const uniqueId = UniqueIdGenerator.generate();
|
17239
17266
|
const newLocalStorageKey = `${prefix}_${uniqueId}`;
|
17240
|
-
(_a = window.localStorage) === null || _a ===
|
17267
|
+
(_a = window.localStorage) === null || _a === undefined ? undefined : _a.setItem(newLocalStorageKey, '');
|
17241
17268
|
LocalStorageService.localStorageKey = newLocalStorageKey;
|
17242
17269
|
};
|
17243
17270
|
if (existingKeys.length === 0) {
|
@@ -17249,7 +17276,7 @@ class LocalStorageService {
|
|
17249
17276
|
existingKeys.forEach((key) => {
|
17250
17277
|
var _a;
|
17251
17278
|
if (key !== validKey) {
|
17252
|
-
(_a = window.localStorage) === null || _a ===
|
17279
|
+
(_a = window.localStorage) === null || _a === undefined ? undefined : _a.removeItem(key);
|
17253
17280
|
}
|
17254
17281
|
});
|
17255
17282
|
if (validKey) {
|
@@ -17265,7 +17292,7 @@ class LocalStorageService {
|
|
17265
17292
|
// ======================== Utility functions ======================== //
|
17266
17293
|
syncLocalStorage() {
|
17267
17294
|
var _a;
|
17268
|
-
const localStorageData = (_a = window.localStorage) === null || _a ===
|
17295
|
+
const localStorageData = (_a = window.localStorage) === null || _a === undefined ? undefined : _a.getItem(LocalStorageService.localStorageKey);
|
17269
17296
|
if (localStorageData) {
|
17270
17297
|
try {
|
17271
17298
|
const decryptedData = this.decryptData(localStorageData);
|
@@ -17304,15 +17331,15 @@ class LocalStorageService {
|
|
17304
17331
|
}
|
17305
17332
|
clearLocalStorage() {
|
17306
17333
|
var _a;
|
17307
|
-
(_a = window.localStorage) === null || _a ===
|
17334
|
+
(_a = window.localStorage) === null || _a === undefined ? undefined : _a.removeItem(LocalStorageService.localStorageKey);
|
17308
17335
|
}
|
17309
17336
|
removeExpiredSpots() {
|
17310
17337
|
var _a;
|
17311
17338
|
const currentTime = Date.now();
|
17312
|
-
(_a = this.spots) === null || _a ===
|
17339
|
+
(_a = this.spots) === null || _a === undefined ? undefined : _a.forEach((spot, spotId) => {
|
17313
17340
|
var _a, _b;
|
17314
|
-
if (currentTime - ((_a = spot.createdAt) !== null && _a !==
|
17315
|
-
(_b = this.spots) === null || _b ===
|
17341
|
+
if (currentTime - ((_a = spot.createdAt) !== null && _a !== undefined ? _a : 0) > LocalStorageService.spotExpirationTime) {
|
17342
|
+
(_b = this.spots) === null || _b === undefined ? undefined : _b.delete(spotId);
|
17316
17343
|
}
|
17317
17344
|
});
|
17318
17345
|
this.updateLocalStorage();
|
@@ -17348,9 +17375,9 @@ class LocalStorageService {
|
|
17348
17375
|
obj.spotId,
|
17349
17376
|
obj.spotType,
|
17350
17377
|
this.spotEventObjectToArray(obj.events),
|
17351
|
-
(_b = (_a = obj.firedEvents) === null || _a ===
|
17378
|
+
(_b = (_a = obj.firedEvents) === null || _a === undefined ? undefined : _a.map((event) => [event.productId, event.event])) !== null && _b !== undefined ? _b : [],
|
17352
17379
|
obj.productIds,
|
17353
|
-
(_c = obj.createdAt) !== null && _c !==
|
17380
|
+
(_c = obj.createdAt) !== null && _c !== undefined ? _c : 0,
|
17354
17381
|
];
|
17355
17382
|
}
|
17356
17383
|
/**
|
@@ -17420,8 +17447,8 @@ class ProximityObserver {
|
|
17420
17447
|
this.targetIds = new Set(elementIds);
|
17421
17448
|
this.processedIds = new Set();
|
17422
17449
|
this.callback = callback;
|
17423
|
-
this.proximityThreshold = (_a = options.proximityThreshold) !== null && _a !==
|
17424
|
-
this.intersectionMargin = (_b = options.intersectionMargin) !== null && _b !==
|
17450
|
+
this.proximityThreshold = (_a = options.proximityThreshold) !== null && _a !== undefined ? _a : 500;
|
17451
|
+
this.intersectionMargin = (_b = options.intersectionMargin) !== null && _b !== undefined ? _b : '2000px';
|
17425
17452
|
this.initializeObservers();
|
17426
17453
|
this.observeExistingElements();
|
17427
17454
|
}
|
@@ -17462,7 +17489,7 @@ class ProximityObserver {
|
|
17462
17489
|
});
|
17463
17490
|
// Start observing DOM changes
|
17464
17491
|
if (document.body) {
|
17465
|
-
(_a = this.mutationObserver) === null || _a ===
|
17492
|
+
(_a = this.mutationObserver) === null || _a === undefined ? undefined : _a.observe(document.body, {
|
17466
17493
|
childList: true,
|
17467
17494
|
subtree: true,
|
17468
17495
|
});
|
@@ -17472,13 +17499,13 @@ class ProximityObserver {
|
|
17472
17499
|
var _a;
|
17473
17500
|
if (element.id && this.processedIds.has(element.id)) {
|
17474
17501
|
this.processedIds.delete(element.id);
|
17475
|
-
(_a = this.intersectionObserver) === null || _a ===
|
17502
|
+
(_a = this.intersectionObserver) === null || _a === undefined ? undefined : _a.unobserve(element);
|
17476
17503
|
}
|
17477
17504
|
}
|
17478
17505
|
checkElement(element) {
|
17479
17506
|
var _a;
|
17480
17507
|
if (element.id && this.targetIds.has(element.id) && !this.processedIds.has(element.id)) {
|
17481
|
-
(_a = this.intersectionObserver) === null || _a ===
|
17508
|
+
(_a = this.intersectionObserver) === null || _a === undefined ? undefined : _a.observe(element);
|
17482
17509
|
}
|
17483
17510
|
}
|
17484
17511
|
findNearbyTargetIds(element) {
|
@@ -17525,7 +17552,7 @@ class ProximityObserver {
|
|
17525
17552
|
this.processedIds.add(id);
|
17526
17553
|
const el = document.getElementById(id);
|
17527
17554
|
if (el)
|
17528
|
-
(_a = this.intersectionObserver) === null || _a ===
|
17555
|
+
(_a = this.intersectionObserver) === null || _a === undefined ? undefined : _a.unobserve(el);
|
17529
17556
|
});
|
17530
17557
|
// Trigger callback with the group
|
17531
17558
|
this.callback(groupIdsToProcess);
|
@@ -17648,7 +17675,7 @@ class ResizeObserverService {
|
|
17648
17675
|
this.container = element.parentElement;
|
17649
17676
|
this.setDimensions(maxSize, minScale);
|
17650
17677
|
this.resizeObserver = new ResizeObserver(() => this.updateElementSize());
|
17651
|
-
(_a = this.resizeObserver) === null || _a ===
|
17678
|
+
(_a = this.resizeObserver) === null || _a === undefined ? undefined : _a.observe(this.container);
|
17652
17679
|
// Initial size update
|
17653
17680
|
this.updateElementSize();
|
17654
17681
|
}
|
@@ -17704,7 +17731,7 @@ class ResizeObserverService {
|
|
17704
17731
|
}
|
17705
17732
|
disconnect() {
|
17706
17733
|
var _a;
|
17707
|
-
(_a = this.resizeObserver) === null || _a ===
|
17734
|
+
(_a = this.resizeObserver) === null || _a === undefined ? undefined : _a.disconnect();
|
17708
17735
|
}
|
17709
17736
|
}
|
17710
17737
|
|
@@ -17718,6 +17745,11 @@ const GFONT_SOURCE_SANS_3 = `
|
|
17718
17745
|
const GFONT_CORMORANT = `
|
17719
17746
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap">
|
17720
17747
|
`;
|
17748
|
+
const FONTS = {
|
17749
|
+
preconnect: GFONT_PRECONNECT,
|
17750
|
+
sourceSans: GFONT_SOURCE_SANS_3,
|
17751
|
+
cormorant: GFONT_CORMORANT,
|
17752
|
+
};
|
17721
17753
|
|
17722
17754
|
function convertHexToRgba(hex, opacity = 1) {
|
17723
17755
|
// Remove # if present
|
@@ -17751,6 +17783,16 @@ function generateGradientColor(overlay, fallback = '') {
|
|
17751
17783
|
const gradientColor = convertHexToRgba(color, overlayOpacity);
|
17752
17784
|
return `${fullColor} 0%, ${gradientColor} ${goTo}%, ${transparentColor} 100%`;
|
17753
17785
|
}
|
17786
|
+
function importFonts(...fonts) {
|
17787
|
+
const fontsToImport = fonts.length === 0 ? ['sourceSans', 'cormorant'] : fonts;
|
17788
|
+
return [
|
17789
|
+
FONTS.preconnect,
|
17790
|
+
...fontsToImport.map((font) => FONTS[font]),
|
17791
|
+
].join('');
|
17792
|
+
}
|
17793
|
+
function renderElement(tag, className, content) {
|
17794
|
+
return (content === null || content === undefined ? undefined : content.trim()) ? `<${tag} class="${className}">${content}</${tag}>` : '';
|
17795
|
+
}
|
17754
17796
|
|
17755
17797
|
class BillboardV1SE extends BaseSpotComponent {
|
17756
17798
|
constructor() {
|
@@ -17763,7 +17805,7 @@ class BillboardV1SE extends BaseSpotComponent {
|
|
17763
17805
|
disconnected() {
|
17764
17806
|
var _a;
|
17765
17807
|
this.removeEventListener('spotSizeChanged', this.handleSpotSizeChanged);
|
17766
|
-
(_a = this.resizeObserver) === null || _a ===
|
17808
|
+
(_a = this.resizeObserver) === null || _a === undefined ? undefined : _a.disconnect();
|
17767
17809
|
}
|
17768
17810
|
setupResizeObserver() {
|
17769
17811
|
if (!this._config.fluid) {
|
@@ -17786,7 +17828,7 @@ class BillboardV1SE extends BaseSpotComponent {
|
|
17786
17828
|
var _a;
|
17787
17829
|
// Find all text elements within the shadow root
|
17788
17830
|
const selectors = ['h2', 'p', 'span'].join(', ');
|
17789
|
-
const elements = (_a = this.shadowRoot) === null || _a ===
|
17831
|
+
const elements = (_a = this.shadowRoot) === null || _a === undefined ? undefined : _a.querySelectorAll(selectors);
|
17790
17832
|
if (!elements)
|
17791
17833
|
return;
|
17792
17834
|
const scaleFactor = calculateScaleFactor(elementScale);
|
@@ -18000,6 +18042,7 @@ class RbCollectionBannerWithoutTextBlockSE extends BaseSpotComponent {
|
|
18000
18042
|
class RbHomepageHeroFullImageSE extends BaseSpotComponent {
|
18001
18043
|
constructor() {
|
18002
18044
|
super();
|
18045
|
+
this.reRenderOnDeviceChange = true;
|
18003
18046
|
}
|
18004
18047
|
getGradientDirection(position) {
|
18005
18048
|
switch (position) {
|
@@ -18019,24 +18062,42 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
|
|
18019
18062
|
}
|
18020
18063
|
template() {
|
18021
18064
|
const prefix = this._config.prefix;
|
18022
|
-
const { preHeader, header, description, ctaText, textBlockPosition = ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT,
|
18065
|
+
const { preHeader, mobilePreHeader, header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText, textBlockPosition = ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT, mobileTextBlockPosition = textBlockPosition,
|
18066
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
18067
|
+
enableMobileTexts = false, } = this._data;
|
18068
|
+
const content = this._isMobileDevice && enableMobileTexts
|
18069
|
+
? {
|
18070
|
+
preHeader: mobilePreHeader,
|
18071
|
+
header: mobileHeader,
|
18072
|
+
description: mobileDescription,
|
18073
|
+
ctaText: mobileCtaText,
|
18074
|
+
}
|
18075
|
+
: { preHeader, header, description, ctaText };
|
18076
|
+
if (!this.hasContent) {
|
18077
|
+
return `
|
18078
|
+
${importFonts()}
|
18079
|
+
<div class="${prefix}"></div>
|
18080
|
+
`;
|
18081
|
+
}
|
18082
|
+
const elements = [
|
18083
|
+
renderElement('h2', `${prefix}__pre-header`, content.preHeader),
|
18084
|
+
renderElement('h2', `${prefix}__header`, content.header),
|
18085
|
+
renderElement('p', `${prefix}__description`, content.description),
|
18086
|
+
renderElement('span', `${prefix}__cta-button`, content.ctaText),
|
18087
|
+
];
|
18023
18088
|
return `
|
18024
|
-
${
|
18025
|
-
${GFONT_SOURCE_SANS_3}
|
18026
|
-
${GFONT_CORMORANT}
|
18089
|
+
${importFonts()}
|
18027
18090
|
<div class="${prefix}">
|
18028
|
-
<div class="${prefix}__text ${prefix}__text-block--${textBlockPosition}">
|
18029
|
-
${
|
18030
|
-
${header ? `<h2 class="${prefix}__header">${header}</h2>` : ''}
|
18031
|
-
${description ? `<p class="${prefix}__description">${description}</p>` : ''}
|
18032
|
-
${ctaText ? `<span class="${prefix}__cta-button">${ctaText}</span>` : ''}
|
18091
|
+
<div class="${prefix}__text ${prefix}__text-block--${textBlockPosition} ${prefix}__text-block-mobile--${mobileTextBlockPosition}">
|
18092
|
+
${elements.join('')}
|
18033
18093
|
</div>
|
18034
18094
|
</div>
|
18035
18095
|
`;
|
18036
18096
|
}
|
18037
18097
|
styles() {
|
18038
|
-
const { textBlockPosition = ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT } = this._data;
|
18039
|
-
const
|
18098
|
+
const { textBlockPosition = ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT, mobileTextBlockPosition = textBlockPosition, } = this._data;
|
18099
|
+
const desktopGradientDirection = this.getGradientDirection(textBlockPosition);
|
18100
|
+
const mobileGradientDirection = this.getGradientDirection(mobileTextBlockPosition);
|
18040
18101
|
const linearGradient = generateGradientColor(this._config.overlay, 'rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 40%');
|
18041
18102
|
const { textColor = '#ffffff', ctaTextColor = textColor, ctaBorderColor = ctaTextColor, primaryImage, mobilePrimaryImage = primaryImage, } = this._data;
|
18042
18103
|
const prefix = this._config.prefix;
|
@@ -18045,7 +18106,9 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
|
|
18045
18106
|
display: flex;
|
18046
18107
|
width: 100%;
|
18047
18108
|
height: 100%;
|
18048
|
-
|
18109
|
+
${this.hasContent
|
18110
|
+
? `background-image: linear-gradient(${mobileGradientDirection}, ${linearGradient}), url("${mobilePrimaryImage}");`
|
18111
|
+
: `background-image: url("${mobilePrimaryImage}");`}
|
18049
18112
|
background-size: cover;
|
18050
18113
|
background-repeat: no-repeat;
|
18051
18114
|
background-position: center;
|
@@ -18067,42 +18130,50 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
|
|
18067
18130
|
position: absolute;
|
18068
18131
|
}
|
18069
18132
|
|
18070
|
-
|
18071
|
-
|
18072
|
-
|
18073
|
-
|
18133
|
+
@container (max-width: 639px) {
|
18134
|
+
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
|
18135
|
+
top: 3%;
|
18136
|
+
left: 3%;
|
18137
|
+
align-items: flex-start;
|
18138
|
+
text-align: left;
|
18139
|
+
}
|
18074
18140
|
|
18075
|
-
|
18076
|
-
|
18077
|
-
|
18078
|
-
|
18079
|
-
|
18080
|
-
|
18141
|
+
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT} {
|
18142
|
+
top: 3%;
|
18143
|
+
right: 3%;
|
18144
|
+
align-items: flex-end;
|
18145
|
+
text-align: right;
|
18146
|
+
}
|
18081
18147
|
|
18082
|
-
|
18083
|
-
|
18084
|
-
|
18085
|
-
|
18086
|
-
|
18148
|
+
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT} {
|
18149
|
+
top: 50%;
|
18150
|
+
left: 3%;
|
18151
|
+
transform: translateY(-50%);
|
18152
|
+
align-items: flex-start;
|
18153
|
+
text-align: left;
|
18154
|
+
}
|
18087
18155
|
|
18088
|
-
|
18089
|
-
|
18090
|
-
|
18091
|
-
|
18092
|
-
|
18093
|
-
|
18094
|
-
|
18156
|
+
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT} {
|
18157
|
+
top: 50%;
|
18158
|
+
right: 3%;
|
18159
|
+
transform: translateY(-50%);
|
18160
|
+
align-items: flex-end;
|
18161
|
+
text-align: right;
|
18162
|
+
}
|
18095
18163
|
|
18096
|
-
|
18097
|
-
|
18098
|
-
|
18099
|
-
|
18164
|
+
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT} {
|
18165
|
+
bottom: 3%;
|
18166
|
+
left: 3%;
|
18167
|
+
align-items: flex-start;
|
18168
|
+
text-align: left;
|
18169
|
+
}
|
18100
18170
|
|
18101
|
-
|
18102
|
-
|
18103
|
-
|
18104
|
-
|
18105
|
-
|
18171
|
+
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT} {
|
18172
|
+
bottom: 3%;
|
18173
|
+
right: 3%;
|
18174
|
+
align-items: flex-end;
|
18175
|
+
text-align: right;
|
18176
|
+
}
|
18106
18177
|
}
|
18107
18178
|
|
18108
18179
|
.${prefix}__pre-header {
|
@@ -18152,12 +18223,58 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
|
|
18152
18223
|
|
18153
18224
|
@container (min-width: 640px) {
|
18154
18225
|
.${prefix} {
|
18155
|
-
|
18226
|
+
${this.hasContent
|
18227
|
+
? `background-image: linear-gradient(${desktopGradientDirection}, ${linearGradient}), url("${primaryImage}");`
|
18228
|
+
: `background-image: url("${primaryImage}");`}
|
18156
18229
|
}
|
18157
18230
|
|
18158
18231
|
.${prefix}__text {
|
18159
18232
|
width: 70%;
|
18160
18233
|
}
|
18234
|
+
|
18235
|
+
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
|
18236
|
+
top: 3%;
|
18237
|
+
left: 3%;
|
18238
|
+
align-items: flex-start;
|
18239
|
+
text-align: left;
|
18240
|
+
}
|
18241
|
+
|
18242
|
+
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT} {
|
18243
|
+
top: 3%;
|
18244
|
+
right: 3%;
|
18245
|
+
align-items: flex-end;
|
18246
|
+
text-align: right;
|
18247
|
+
}
|
18248
|
+
|
18249
|
+
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT} {
|
18250
|
+
top: 50%;
|
18251
|
+
left: 3%;
|
18252
|
+
transform: translateY(-50%);
|
18253
|
+
align-items: flex-start;
|
18254
|
+
text-align: left;
|
18255
|
+
}
|
18256
|
+
|
18257
|
+
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT} {
|
18258
|
+
top: 50%;
|
18259
|
+
right: 3%;
|
18260
|
+
transform: translateY(-50%);
|
18261
|
+
align-items: flex-end;
|
18262
|
+
text-align: right;
|
18263
|
+
}
|
18264
|
+
|
18265
|
+
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT} {
|
18266
|
+
bottom: 3%;
|
18267
|
+
left: 3%;
|
18268
|
+
align-items: flex-start;
|
18269
|
+
text-align: left;
|
18270
|
+
}
|
18271
|
+
|
18272
|
+
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT} {
|
18273
|
+
bottom: 3%;
|
18274
|
+
right: 3%;
|
18275
|
+
align-items: flex-end;
|
18276
|
+
text-align: right;
|
18277
|
+
}
|
18161
18278
|
}
|
18162
18279
|
|
18163
18280
|
@container (min-width: 768px) {
|
@@ -18199,46 +18316,73 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
|
|
18199
18316
|
}
|
18200
18317
|
`;
|
18201
18318
|
}
|
18319
|
+
get hasContent() {
|
18320
|
+
const { preHeader, mobilePreHeader, header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText,
|
18321
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
18322
|
+
enableMobileTexts = false, } = this._data;
|
18323
|
+
const content = this._isMobileDevice && enableMobileTexts
|
18324
|
+
? {
|
18325
|
+
preHeader: mobilePreHeader,
|
18326
|
+
header: mobileHeader,
|
18327
|
+
description: mobileDescription,
|
18328
|
+
ctaText: mobileCtaText,
|
18329
|
+
}
|
18330
|
+
: { preHeader, header, description, ctaText };
|
18331
|
+
return Object.values(content).some(Boolean);
|
18332
|
+
}
|
18202
18333
|
}
|
18203
18334
|
|
18204
18335
|
class RbHomepageHeroThreeTileSE extends BaseSpotComponent {
|
18205
18336
|
constructor() {
|
18206
18337
|
super();
|
18338
|
+
this.reRenderOnDeviceChange = true;
|
18207
18339
|
}
|
18208
18340
|
template() {
|
18209
18341
|
const prefix = this._config.prefix;
|
18210
|
-
const { header, description, ctaText, textBlockPosition = ENUM_TEXT_BLOCK_POSITION.LEFT,
|
18342
|
+
const { header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText, textBlockPosition = ENUM_TEXT_BLOCK_POSITION.LEFT, mobileTextBlockPosition = textBlockPosition,
|
18343
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
18344
|
+
enableMobileTexts = false, } = this._data;
|
18345
|
+
const content = this._isMobileDevice && enableMobileTexts
|
18346
|
+
? {
|
18347
|
+
header: mobileHeader,
|
18348
|
+
description: mobileDescription,
|
18349
|
+
ctaText: mobileCtaText,
|
18350
|
+
}
|
18351
|
+
: { header, description, ctaText };
|
18352
|
+
const elements = this.hasContent
|
18353
|
+
? [
|
18354
|
+
renderElement('h2', `${prefix}__header`, content.header),
|
18355
|
+
renderElement('p', `${prefix}__description`, content.description),
|
18356
|
+
renderElement('span', `${prefix}__cta-button`, content.ctaText),
|
18357
|
+
]
|
18358
|
+
: [];
|
18211
18359
|
return `
|
18212
|
-
|
18213
|
-
|
18214
|
-
${
|
18215
|
-
|
18216
|
-
<div class="${prefix}
|
18217
|
-
|
18218
|
-
|
18219
|
-
<div class="${prefix}__text">
|
18220
|
-
${header ? `<h2 class="${prefix}__header">${header}</h2>` : ''}
|
18221
|
-
${description ? `<p class="${prefix}__description">${description}</p>` : ''}
|
18222
|
-
${ctaText ? `<span class="${prefix}__cta-button">${ctaText}</span>` : ''}
|
18223
|
-
</div>
|
18224
|
-
</div>
|
18225
|
-
<div class="${prefix}__primary-image"></div>
|
18360
|
+
${importFonts()}
|
18361
|
+
<div class="${prefix}">
|
18362
|
+
<div class="${prefix}__content ${prefix}__text-block--${textBlockPosition} ${prefix}__text-block-mobile--${mobileTextBlockPosition}">
|
18363
|
+
<div class="${prefix}__main">
|
18364
|
+
<div class="${prefix}__secondary-image"></div>
|
18365
|
+
<div class="${prefix}__text">
|
18366
|
+
${elements.join('')}
|
18226
18367
|
</div>
|
18368
|
+
</div>
|
18369
|
+
<div class="${prefix}__primary-image"></div>
|
18227
18370
|
</div>
|
18371
|
+
</div>
|
18228
18372
|
`;
|
18229
18373
|
}
|
18230
18374
|
styles() {
|
18231
18375
|
const { textColor = '#212121', backgroundColor = '#e8e6de', ctaTextColor = textColor, primaryImage, mobilePrimaryImage = primaryImage, secondaryImage, mobileSecondaryImage = secondaryImage, } = this._data;
|
18232
18376
|
const prefix = this._config.prefix;
|
18233
18377
|
return `
|
18234
|
-
|
18378
|
+
.${prefix} {
|
18235
18379
|
width: 100%;
|
18236
18380
|
height: 100%;
|
18237
18381
|
display: block;
|
18238
18382
|
position: relative;
|
18239
|
-
|
18383
|
+
}
|
18240
18384
|
|
18241
|
-
|
18385
|
+
.${prefix}__content {
|
18242
18386
|
width: 100%;
|
18243
18387
|
height: 100%;
|
18244
18388
|
display: flex;
|
@@ -18247,35 +18391,45 @@ class RbHomepageHeroThreeTileSE extends BaseSpotComponent {
|
|
18247
18391
|
gap: 6px;
|
18248
18392
|
color: inherit;
|
18249
18393
|
cursor: pointer;
|
18250
|
-
|
18394
|
+
}
|
18251
18395
|
|
18252
|
-
|
18396
|
+
.${prefix}__primary-image {
|
18253
18397
|
width: 100%;
|
18254
18398
|
height: 60%;
|
18255
18399
|
background-image: url("${mobilePrimaryImage}");
|
18256
18400
|
background-position: center;
|
18257
18401
|
background-repeat: no-repeat;
|
18258
18402
|
background-size: cover;
|
18259
|
-
|
18403
|
+
}
|
18260
18404
|
|
18261
|
-
|
18405
|
+
.${prefix}__main {
|
18262
18406
|
width: 100%;
|
18263
18407
|
height: 40%;
|
18264
18408
|
display: flex;
|
18265
18409
|
flex-direction: row;
|
18266
18410
|
gap: 6px;
|
18267
|
-
|
18411
|
+
}
|
18412
|
+
|
18413
|
+
@container (max-width: 767px) {
|
18414
|
+
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.LEFT} .${prefix}__main {
|
18415
|
+
flex-direction: row;
|
18416
|
+
}
|
18268
18417
|
|
18269
|
-
|
18418
|
+
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.RIGHT} .${prefix}__main {
|
18419
|
+
flex-direction: row-reverse;
|
18420
|
+
}
|
18421
|
+
}
|
18422
|
+
|
18423
|
+
.${prefix}__secondary-image {
|
18270
18424
|
width: 50%;
|
18271
18425
|
height: 100%;
|
18272
18426
|
background-image: url("${mobileSecondaryImage}");
|
18273
18427
|
background-position: center;
|
18274
18428
|
background-repeat: no-repeat;
|
18275
18429
|
background-size: cover;
|
18276
|
-
|
18430
|
+
}
|
18277
18431
|
|
18278
|
-
|
18432
|
+
.${prefix}__text {
|
18279
18433
|
color: ${textColor};
|
18280
18434
|
background-color: ${backgroundColor};
|
18281
18435
|
text-align: center;
|
@@ -18288,9 +18442,9 @@ class RbHomepageHeroThreeTileSE extends BaseSpotComponent {
|
|
18288
18442
|
gap: 10px;
|
18289
18443
|
padding: 0 10px;
|
18290
18444
|
box-sizing: border-box;
|
18291
|
-
|
18445
|
+
}
|
18292
18446
|
|
18293
|
-
|
18447
|
+
.${prefix}__header {
|
18294
18448
|
color: inherit;
|
18295
18449
|
margin: 0;
|
18296
18450
|
font-size: 18px;
|
@@ -18298,18 +18452,18 @@ class RbHomepageHeroThreeTileSE extends BaseSpotComponent {
|
|
18298
18452
|
font-style: normal;
|
18299
18453
|
font-weight: 700;
|
18300
18454
|
line-height: normal;
|
18301
|
-
|
18455
|
+
}
|
18302
18456
|
|
18303
|
-
|
18457
|
+
.${prefix}__description {
|
18304
18458
|
color: inherit;
|
18305
18459
|
margin: 0;
|
18306
18460
|
font-size: 10px;
|
18307
18461
|
font-family: "Source Sans 3", system-ui;
|
18308
18462
|
font-style: normal;
|
18309
18463
|
font-weight: 400;
|
18310
|
-
|
18464
|
+
}
|
18311
18465
|
|
18312
|
-
|
18466
|
+
.${prefix}__cta-button {
|
18313
18467
|
color: ${ctaTextColor};
|
18314
18468
|
background-color: transparent;
|
18315
18469
|
font-size: 8px;
|
@@ -18323,266 +18477,319 @@ class RbHomepageHeroThreeTileSE extends BaseSpotComponent {
|
|
18323
18477
|
cursor: pointer;
|
18324
18478
|
padding: 0;
|
18325
18479
|
transition: opacity 0.3s ease;
|
18326
|
-
|
18480
|
+
}
|
18327
18481
|
|
18328
|
-
|
18482
|
+
.${prefix}__content:hover .${prefix}__cta-button {
|
18329
18483
|
opacity: 0.8;
|
18330
|
-
|
18484
|
+
}
|
18331
18485
|
|
18332
|
-
|
18486
|
+
@container (min-width: 640px) {
|
18333
18487
|
.${prefix}__primary-image {
|
18334
|
-
|
18488
|
+
background-image: url("${primaryImage}");
|
18335
18489
|
}
|
18336
18490
|
|
18337
18491
|
.${prefix}__secondary-image {
|
18338
|
-
|
18492
|
+
background-image: url("${secondaryImage}");
|
18339
18493
|
}
|
18340
|
-
|
18494
|
+
}
|
18341
18495
|
|
18342
|
-
|
18496
|
+
@container (min-width: 768px) {
|
18343
18497
|
.${prefix}__content {
|
18344
|
-
|
18498
|
+
flex-direction: row;
|
18499
|
+
}
|
18500
|
+
|
18501
|
+
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.LEFT} {
|
18502
|
+
flex-direction: row;
|
18345
18503
|
}
|
18346
18504
|
|
18347
18505
|
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.RIGHT} {
|
18348
|
-
|
18506
|
+
flex-direction: row-reverse;
|
18349
18507
|
}
|
18350
18508
|
|
18351
18509
|
.${prefix}__primary-image {
|
18352
|
-
|
18353
|
-
|
18510
|
+
width: 66.66666%;
|
18511
|
+
height: 100%;
|
18354
18512
|
}
|
18355
18513
|
|
18356
18514
|
.${prefix}__main {
|
18357
|
-
|
18358
|
-
|
18359
|
-
|
18360
|
-
}
|
18361
|
-
|
18362
|
-
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.RIGHT} .${prefix}__main {
|
18363
|
-
flex-direction: column;
|
18515
|
+
flex-direction: column;
|
18516
|
+
height: 100%;
|
18517
|
+
width: 33.33333%;
|
18364
18518
|
}
|
18365
18519
|
|
18366
18520
|
.${prefix}__secondary-image {
|
18367
|
-
|
18368
|
-
|
18521
|
+
width: 100%;
|
18522
|
+
height: 50%;
|
18369
18523
|
}
|
18370
18524
|
|
18371
18525
|
.${prefix}__text {
|
18372
|
-
|
18373
|
-
|
18526
|
+
width: 100%;
|
18527
|
+
height: 50%;
|
18374
18528
|
}
|
18375
18529
|
|
18376
18530
|
.${prefix}__header {
|
18377
|
-
|
18531
|
+
font-size: 22px;
|
18378
18532
|
}
|
18379
18533
|
|
18380
18534
|
.${prefix}__description {
|
18381
|
-
|
18535
|
+
font-size: 12px;
|
18382
18536
|
}
|
18383
18537
|
|
18384
18538
|
.${prefix}__cta-button {
|
18385
|
-
|
18539
|
+
font-size: 12px;
|
18386
18540
|
}
|
18387
|
-
|
18541
|
+
}
|
18388
18542
|
|
18389
|
-
|
18543
|
+
@container (min-width: 1024px) {
|
18390
18544
|
.${prefix}__header {
|
18391
|
-
|
18545
|
+
font-size: 24px;
|
18392
18546
|
}
|
18393
18547
|
.${prefix}__description {
|
18394
|
-
|
18548
|
+
font-size: 13px;
|
18395
18549
|
}
|
18396
18550
|
.${prefix}__cta-button {
|
18397
18551
|
font-size: 13px;
|
18398
18552
|
}
|
18399
|
-
|
18553
|
+
}
|
18400
18554
|
|
18401
|
-
|
18555
|
+
@container (min-width: 1280px) {
|
18402
18556
|
.${prefix}__header {
|
18403
|
-
|
18557
|
+
font-size: 28px;
|
18404
18558
|
}
|
18405
18559
|
.${prefix}__description {
|
18406
|
-
|
18560
|
+
font-size: 14px;
|
18407
18561
|
}
|
18408
18562
|
.${prefix}__cta-button {
|
18409
|
-
|
18563
|
+
font-size: 14px;
|
18410
18564
|
}
|
18411
|
-
|
18565
|
+
}
|
18412
18566
|
`;
|
18413
18567
|
}
|
18568
|
+
get hasContent() {
|
18569
|
+
const { header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText,
|
18570
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
18571
|
+
enableMobileTexts = false, } = this._data;
|
18572
|
+
const content = this._isMobileDevice && enableMobileTexts
|
18573
|
+
? {
|
18574
|
+
header: mobileHeader,
|
18575
|
+
description: mobileDescription,
|
18576
|
+
ctaText: mobileCtaText,
|
18577
|
+
}
|
18578
|
+
: { header, description, ctaText };
|
18579
|
+
return Object.values(content).some(Boolean);
|
18580
|
+
}
|
18414
18581
|
}
|
18415
18582
|
|
18416
18583
|
class RbHomepageHeroTwoTileSE extends BaseSpotComponent {
|
18417
18584
|
constructor() {
|
18418
18585
|
super();
|
18586
|
+
this.reRenderOnDeviceChange = true;
|
18419
18587
|
}
|
18420
18588
|
template() {
|
18421
18589
|
const prefix = this._config.prefix;
|
18422
|
-
const { header, description, ctaText, textBlockPosition = ENUM_TEXT_BLOCK_POSITION.LEFT,
|
18590
|
+
const { header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText, textBlockPosition = ENUM_TEXT_BLOCK_POSITION.LEFT, mobileTextBlockPosition = ENUM_TEXT_BLOCK_POSITION.TOP,
|
18591
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
18592
|
+
enableMobileTexts = false, } = this._data;
|
18593
|
+
const content = this._isMobileDevice && enableMobileTexts
|
18594
|
+
? {
|
18595
|
+
header: mobileHeader,
|
18596
|
+
description: mobileDescription,
|
18597
|
+
ctaText: mobileCtaText,
|
18598
|
+
}
|
18599
|
+
: { header, description, ctaText };
|
18600
|
+
const elements = this.hasContent
|
18601
|
+
? [
|
18602
|
+
renderElement('h2', `${prefix}__header`, content.header),
|
18603
|
+
renderElement('p', `${prefix}__description`, content.description),
|
18604
|
+
renderElement('span', `${prefix}__cta-button`, content.ctaText),
|
18605
|
+
]
|
18606
|
+
: [];
|
18423
18607
|
return `
|
18424
|
-
${
|
18425
|
-
${GFONT_SOURCE_SANS_3}
|
18426
|
-
${GFONT_CORMORANT}
|
18608
|
+
${importFonts()}
|
18427
18609
|
<div class="${prefix}">
|
18428
|
-
<div class="${prefix}__content ${prefix}__text-block--${textBlockPosition}">
|
18610
|
+
<div class="${prefix}__content ${prefix}__text-block--${textBlockPosition} ${prefix}__text-block-mobile--${mobileTextBlockPosition}">
|
18429
18611
|
<div class="${prefix}__text">
|
18430
|
-
${
|
18431
|
-
${description ? `<p class="${prefix}__description">${description}</p>` : ''}
|
18432
|
-
${ctaText ? `<span class="${prefix}__cta-button">${ctaText}</span>` : ''}
|
18612
|
+
${elements.join('')}
|
18433
18613
|
</div>
|
18434
18614
|
<div class="${prefix}__image"></div>
|
18435
18615
|
</div>
|
18436
18616
|
</div>
|
18437
|
-
|
18617
|
+
`;
|
18438
18618
|
}
|
18439
18619
|
styles() {
|
18440
18620
|
const { textColor = '#212121', backgroundColor = '#e8e6de', ctaTextColor = textColor, primaryImage, mobilePrimaryImage = primaryImage, } = this._data;
|
18441
18621
|
const prefix = this._config.prefix;
|
18442
18622
|
return `
|
18443
|
-
|
18444
|
-
|
18445
|
-
|
18446
|
-
|
18447
|
-
|
18448
|
-
|
18449
|
-
|
18623
|
+
.${prefix} {
|
18624
|
+
width: 100%;
|
18625
|
+
height: 100%;
|
18626
|
+
background-color: transparent;
|
18627
|
+
cursor: pointer;
|
18628
|
+
position: relative;
|
18629
|
+
}
|
18450
18630
|
|
18451
|
-
|
18452
|
-
|
18453
|
-
|
18454
|
-
|
18455
|
-
|
18456
|
-
|
18457
|
-
|
18458
|
-
|
18631
|
+
.${prefix}__content {
|
18632
|
+
width: 100%;
|
18633
|
+
height: 100%;
|
18634
|
+
display: flex;
|
18635
|
+
flex-direction: column-reverse;
|
18636
|
+
background-color: transparent;
|
18637
|
+
gap: 6px;
|
18638
|
+
}
|
18459
18639
|
|
18460
|
-
|
18461
|
-
|
18462
|
-
|
18463
|
-
|
18464
|
-
|
18465
|
-
|
18466
|
-
|
18467
|
-
|
18640
|
+
.${prefix}__image {
|
18641
|
+
width: 100%;
|
18642
|
+
height: 100%;
|
18643
|
+
background-image: url("${mobilePrimaryImage}");
|
18644
|
+
background-position: center;
|
18645
|
+
background-repeat: no-repeat;
|
18646
|
+
background-size: cover;
|
18647
|
+
}
|
18468
18648
|
|
18469
|
-
|
18470
|
-
|
18471
|
-
|
18472
|
-
|
18473
|
-
|
18474
|
-
|
18475
|
-
|
18476
|
-
|
18477
|
-
|
18478
|
-
|
18479
|
-
|
18480
|
-
|
18481
|
-
|
18482
|
-
|
18649
|
+
.${prefix}__text {
|
18650
|
+
color: ${textColor};
|
18651
|
+
background-color: ${backgroundColor};
|
18652
|
+
text-align: center;
|
18653
|
+
display: flex;
|
18654
|
+
flex-direction: column;
|
18655
|
+
justify-content: center;
|
18656
|
+
align-items: center;
|
18657
|
+
width: 100%;
|
18658
|
+
height: 100%;
|
18659
|
+
gap: 10px;
|
18660
|
+
padding: 0 10px;
|
18661
|
+
box-sizing: border-box;
|
18662
|
+
}
|
18483
18663
|
|
18484
|
-
|
18485
|
-
|
18486
|
-
|
18487
|
-
|
18488
|
-
font-family: "Cormorant", system-ui;
|
18489
|
-
font-style: normal;
|
18490
|
-
font-weight: 700;
|
18491
|
-
line-height: normal;
|
18492
|
-
}
|
18664
|
+
@container (max-width: 767px) {
|
18665
|
+
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.BOTTOM} {
|
18666
|
+
flex-direction: column-reverse;
|
18667
|
+
}
|
18493
18668
|
|
18494
|
-
|
18495
|
-
|
18496
|
-
|
18497
|
-
|
18498
|
-
font-family: "Source Sans 3", system-ui;
|
18499
|
-
font-style: normal;
|
18500
|
-
font-weight: 400;
|
18501
|
-
}
|
18669
|
+
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.TOP} {
|
18670
|
+
flex-direction: column;
|
18671
|
+
}
|
18672
|
+
}
|
18502
18673
|
|
18503
|
-
|
18504
|
-
|
18505
|
-
|
18506
|
-
|
18507
|
-
|
18508
|
-
|
18509
|
-
|
18510
|
-
|
18511
|
-
|
18512
|
-
letter-spacing: 1.4px;
|
18513
|
-
border: none;
|
18514
|
-
cursor: pointer;
|
18515
|
-
padding: 0;
|
18516
|
-
transition: opacity 0.3s ease;
|
18517
|
-
}
|
18674
|
+
.${prefix}__header {
|
18675
|
+
font-size: 18px;
|
18676
|
+
margin: 0;
|
18677
|
+
color: inherit;
|
18678
|
+
font-family: "Cormorant", system-ui;
|
18679
|
+
font-style: normal;
|
18680
|
+
font-weight: 700;
|
18681
|
+
line-height: normal;
|
18682
|
+
}
|
18518
18683
|
|
18519
|
-
|
18520
|
-
|
18521
|
-
|
18684
|
+
.${prefix}__description {
|
18685
|
+
color: inherit;
|
18686
|
+
margin: 0;
|
18687
|
+
font-size: 10px;
|
18688
|
+
font-family: "Source Sans 3", system-ui;
|
18689
|
+
font-style: normal;
|
18690
|
+
font-weight: 400;
|
18691
|
+
}
|
18522
18692
|
|
18523
|
-
|
18524
|
-
|
18525
|
-
|
18526
|
-
|
18527
|
-
|
18693
|
+
.${prefix}__cta-button {
|
18694
|
+
color: ${ctaTextColor};
|
18695
|
+
background-color: transparent;
|
18696
|
+
font-size: 8px;
|
18697
|
+
font-style: normal;
|
18698
|
+
font-weight: 700;
|
18699
|
+
font-family: "Source Sans 3", system-ui;
|
18700
|
+
text-decoration-line: underline;
|
18701
|
+
text-transform: uppercase;
|
18702
|
+
letter-spacing: 1.4px;
|
18703
|
+
border: none;
|
18704
|
+
cursor: pointer;
|
18705
|
+
padding: 0;
|
18706
|
+
transition: opacity 0.3s ease;
|
18707
|
+
}
|
18528
18708
|
|
18529
|
-
|
18530
|
-
|
18531
|
-
|
18532
|
-
}
|
18709
|
+
.${prefix}__content:hover .${prefix}__cta-button {
|
18710
|
+
opacity: 0.8;
|
18711
|
+
}
|
18533
18712
|
|
18534
|
-
|
18535
|
-
|
18536
|
-
|
18713
|
+
@container (min-width: 640px) {
|
18714
|
+
.${prefix}__image {
|
18715
|
+
background-image: url("${primaryImage}");
|
18716
|
+
}
|
18717
|
+
}
|
18537
18718
|
|
18538
|
-
|
18539
|
-
|
18540
|
-
|
18541
|
-
|
18719
|
+
@container (min-width: 768px) {
|
18720
|
+
.${prefix}__content {
|
18721
|
+
flex-direction: row;
|
18722
|
+
}
|
18542
18723
|
|
18543
|
-
|
18544
|
-
|
18545
|
-
|
18546
|
-
}
|
18724
|
+
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.LEFT} {
|
18725
|
+
flex-direction: row;
|
18726
|
+
}
|
18547
18727
|
|
18548
|
-
|
18549
|
-
|
18550
|
-
|
18728
|
+
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.RIGHT} {
|
18729
|
+
flex-direction: row-reverse;
|
18730
|
+
}
|
18551
18731
|
|
18552
|
-
|
18553
|
-
|
18554
|
-
|
18732
|
+
.${prefix}__image {
|
18733
|
+
width: 66.66666%;
|
18734
|
+
height: 100%;
|
18735
|
+
}
|
18555
18736
|
|
18556
|
-
|
18557
|
-
|
18558
|
-
|
18559
|
-
|
18737
|
+
.${prefix}__text {
|
18738
|
+
width: 33.33333%;
|
18739
|
+
height: 100%;
|
18740
|
+
}
|
18560
18741
|
|
18561
|
-
|
18562
|
-
|
18563
|
-
|
18564
|
-
}
|
18565
|
-
.${prefix}__description {
|
18566
|
-
font-size: 13px;
|
18567
|
-
}
|
18568
|
-
.${prefix}__cta-button {
|
18569
|
-
font-size: 13px;
|
18570
|
-
}
|
18571
|
-
}
|
18742
|
+
.${prefix}__header {
|
18743
|
+
font-size: 22px;
|
18744
|
+
}
|
18572
18745
|
|
18573
|
-
|
18574
|
-
|
18575
|
-
|
18576
|
-
|
18577
|
-
|
18578
|
-
|
18579
|
-
|
18580
|
-
|
18581
|
-
|
18582
|
-
|
18583
|
-
|
18746
|
+
.${prefix}__description {
|
18747
|
+
font-size: 12px;
|
18748
|
+
}
|
18749
|
+
|
18750
|
+
.${prefix}__cta-button {
|
18751
|
+
font-size: 12px;
|
18752
|
+
}
|
18753
|
+
}
|
18754
|
+
|
18755
|
+
@container (min-width: 1024px) {
|
18756
|
+
.${prefix}__header {
|
18757
|
+
font-size: 24px;
|
18758
|
+
}
|
18759
|
+
.${prefix}__description {
|
18760
|
+
font-size: 13px;
|
18761
|
+
}
|
18762
|
+
.${prefix}__cta-button {
|
18763
|
+
font-size: 13px;
|
18764
|
+
}
|
18765
|
+
}
|
18766
|
+
|
18767
|
+
@container (min-width: 1280px) {
|
18768
|
+
.${prefix}__header {
|
18769
|
+
font-size: 28px;
|
18770
|
+
}
|
18771
|
+
.${prefix}__description {
|
18772
|
+
font-size: 14px;
|
18773
|
+
}
|
18774
|
+
.${prefix}__cta-button {
|
18775
|
+
font-size: 14px;
|
18776
|
+
}
|
18777
|
+
}
|
18584
18778
|
`;
|
18585
18779
|
}
|
18780
|
+
get hasContent() {
|
18781
|
+
const { header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText,
|
18782
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
18783
|
+
enableMobileTexts = false, } = this._data;
|
18784
|
+
const content = this._isMobileDevice && enableMobileTexts
|
18785
|
+
? {
|
18786
|
+
header: mobileHeader,
|
18787
|
+
description: mobileDescription,
|
18788
|
+
ctaText: mobileCtaText,
|
18789
|
+
}
|
18790
|
+
: { header, description, ctaText };
|
18791
|
+
return Object.values(content).some(Boolean);
|
18792
|
+
}
|
18586
18793
|
}
|
18587
18794
|
|
18588
18795
|
class RbInTextSE extends BaseSpotComponent {
|
@@ -18627,22 +18834,39 @@ class RbInTextSE extends BaseSpotComponent {
|
|
18627
18834
|
class RbLargeCategoryImageToutSE extends BaseSpotComponent {
|
18628
18835
|
constructor() {
|
18629
18836
|
super();
|
18837
|
+
this.reRenderOnDeviceChange = true;
|
18630
18838
|
}
|
18631
18839
|
template() {
|
18632
18840
|
const prefix = this._config.prefix;
|
18633
|
-
const { header, description, ctaText, textBlockPosition = ENUM_TEXT_BLOCK_POSITION.LEFT,
|
18841
|
+
const { header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText, textBlockPosition = ENUM_TEXT_BLOCK_POSITION.LEFT,
|
18842
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
18843
|
+
enableMobileTexts = false, } = this._data;
|
18844
|
+
const content = this._isMobileDevice && enableMobileTexts
|
18845
|
+
? {
|
18846
|
+
header: mobileHeader,
|
18847
|
+
description: mobileDescription,
|
18848
|
+
ctaText: mobileCtaText,
|
18849
|
+
}
|
18850
|
+
: { header, description, ctaText };
|
18851
|
+
if (!this.hasContent) {
|
18852
|
+
return `
|
18853
|
+
${importFonts()}
|
18854
|
+
<div class="${prefix}"></div>
|
18855
|
+
`;
|
18856
|
+
}
|
18857
|
+
const elements = [
|
18858
|
+
renderElement('h2', `${prefix}__header`, content.header),
|
18859
|
+
renderElement('p', `${prefix}__description`, content.description),
|
18860
|
+
renderElement('span', `${prefix}__cta-button`, content.ctaText),
|
18861
|
+
];
|
18634
18862
|
return `
|
18635
|
-
|
18636
|
-
|
18637
|
-
|
18638
|
-
|
18639
|
-
|
18640
|
-
${header ? `<h2 class="${prefix}__header">${header}</h2>` : ''}
|
18641
|
-
${description ? `<p class="${prefix}__description">${description}</p>` : ''}
|
18642
|
-
${ctaText ? `<span class="${prefix}__cta-button">${ctaText}</span>` : ''}
|
18863
|
+
${importFonts()}
|
18864
|
+
<div class="${prefix}">
|
18865
|
+
<div class="${prefix}__text ${prefix}__text-block--${textBlockPosition}">
|
18866
|
+
${elements.join('')}
|
18867
|
+
</div>
|
18643
18868
|
</div>
|
18644
|
-
|
18645
|
-
`;
|
18869
|
+
`;
|
18646
18870
|
}
|
18647
18871
|
styles() {
|
18648
18872
|
const { textColor = '#ffffff', ctaTextColor = textColor, ctaBorderColor = ctaTextColor, primaryImage, mobilePrimaryImage = primaryImage, } = this._data;
|
@@ -18655,7 +18879,9 @@ class RbLargeCategoryImageToutSE extends BaseSpotComponent {
|
|
18655
18879
|
display: flex;
|
18656
18880
|
flex-direction: column;
|
18657
18881
|
justify-content: flex-end;
|
18658
|
-
|
18882
|
+
${this.hasContent
|
18883
|
+
? `background-image: linear-gradient(to top, ${linearGradient}), url("${mobilePrimaryImage}");`
|
18884
|
+
: `background-image: url("${mobilePrimaryImage}");`}
|
18659
18885
|
background-size: cover;
|
18660
18886
|
background-repeat: no-repeat;
|
18661
18887
|
background-position: center;
|
@@ -18731,7 +18957,9 @@ class RbLargeCategoryImageToutSE extends BaseSpotComponent {
|
|
18731
18957
|
|
18732
18958
|
@container (min-width: 640px) {
|
18733
18959
|
.${prefix} {
|
18734
|
-
|
18960
|
+
${this.hasContent
|
18961
|
+
? `background-image: linear-gradient(to top, ${linearGradient}), url("${primaryImage}");`
|
18962
|
+
: `background-image: url("${primaryImage}");`}
|
18735
18963
|
}
|
18736
18964
|
}
|
18737
18965
|
|
@@ -18779,25 +19007,56 @@ class RbLargeCategoryImageToutSE extends BaseSpotComponent {
|
|
18779
19007
|
}
|
18780
19008
|
`;
|
18781
19009
|
}
|
19010
|
+
get hasContent() {
|
19011
|
+
const { header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText,
|
19012
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
19013
|
+
enableMobileTexts = false, } = this._data;
|
19014
|
+
const content = this._isMobileDevice && enableMobileTexts
|
19015
|
+
? {
|
19016
|
+
header: mobileHeader,
|
19017
|
+
description: mobileDescription,
|
19018
|
+
ctaText: mobileCtaText,
|
19019
|
+
}
|
19020
|
+
: { header, description, ctaText };
|
19021
|
+
return Object.values(content).some(Boolean);
|
19022
|
+
}
|
18782
19023
|
}
|
18783
19024
|
|
18784
19025
|
class RbLongToutShortSE extends BaseSpotComponent {
|
18785
19026
|
constructor() {
|
18786
19027
|
super();
|
19028
|
+
this.reRenderOnDeviceChange = true;
|
18787
19029
|
}
|
18788
19030
|
template() {
|
18789
19031
|
const prefix = this._config.prefix;
|
18790
|
-
const { preHeader, header, description, ctaText
|
19032
|
+
const { preHeader, mobilePreHeader, header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText,
|
19033
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
19034
|
+
enableMobileTexts = false, } = this._data;
|
19035
|
+
const content = this._isMobileDevice && enableMobileTexts
|
19036
|
+
? {
|
19037
|
+
preHeader: mobilePreHeader,
|
19038
|
+
header: mobileHeader,
|
19039
|
+
description: mobileDescription,
|
19040
|
+
ctaText: mobileCtaText,
|
19041
|
+
}
|
19042
|
+
: { preHeader, header, description, ctaText };
|
19043
|
+
if (!this.hasContent) {
|
19044
|
+
return `
|
19045
|
+
${importFonts()}
|
19046
|
+
<div class="${prefix}"></div>
|
19047
|
+
`;
|
19048
|
+
}
|
19049
|
+
const elements = [
|
19050
|
+
renderElement('h2', `${prefix}__pre-header`, content.preHeader),
|
19051
|
+
renderElement('h2', `${prefix}__header`, content.header),
|
19052
|
+
renderElement('p', `${prefix}__description`, content.description),
|
19053
|
+
renderElement('span', `${prefix}__cta-button`, content.ctaText),
|
19054
|
+
];
|
18791
19055
|
return `
|
18792
|
-
${
|
18793
|
-
${GFONT_SOURCE_SANS_3}
|
18794
|
-
${GFONT_CORMORANT}
|
19056
|
+
${importFonts()}
|
18795
19057
|
<div class="${prefix}">
|
18796
19058
|
<div class="${prefix}__text">
|
18797
|
-
${
|
18798
|
-
${header ? `<h2 class="${prefix}__header">${header}</h2>` : ''}
|
18799
|
-
${description ? `<p class="${prefix}__description">${description}</p>` : ''}
|
18800
|
-
${ctaText ? `<span class="${prefix}__cta-button">${ctaText}</span>` : ''}
|
19059
|
+
${elements.join('')}
|
18801
19060
|
</div>
|
18802
19061
|
</div>
|
18803
19062
|
`;
|
@@ -18943,11 +19202,26 @@ class RbLongToutShortSE extends BaseSpotComponent {
|
|
18943
19202
|
}
|
18944
19203
|
`;
|
18945
19204
|
}
|
19205
|
+
get hasContent() {
|
19206
|
+
const { preHeader, mobilePreHeader, header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText,
|
19207
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
19208
|
+
enableMobileTexts = false, } = this._data;
|
19209
|
+
const content = this._isMobileDevice && enableMobileTexts
|
19210
|
+
? {
|
19211
|
+
preHeader: mobilePreHeader,
|
19212
|
+
header: mobileHeader,
|
19213
|
+
description: mobileDescription,
|
19214
|
+
ctaText: mobileCtaText,
|
19215
|
+
}
|
19216
|
+
: { preHeader, header, description, ctaText };
|
19217
|
+
return Object.values(content).some(Boolean);
|
19218
|
+
}
|
18946
19219
|
}
|
18947
19220
|
|
18948
19221
|
class RbLongToutTallSE extends BaseSpotComponent {
|
18949
19222
|
constructor() {
|
18950
19223
|
super();
|
19224
|
+
this.reRenderOnDeviceChange = true;
|
18951
19225
|
}
|
18952
19226
|
getGradientDirection(position) {
|
18953
19227
|
switch (position) {
|
@@ -18967,24 +19241,44 @@ class RbLongToutTallSE extends BaseSpotComponent {
|
|
18967
19241
|
}
|
18968
19242
|
template() {
|
18969
19243
|
const prefix = this._config.prefix;
|
18970
|
-
const { preHeader, header, description, ctaText, textBlockPosition = ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT,
|
19244
|
+
const { preHeader, mobilePreHeader, header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText, textBlockPosition = ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT, mobileTextBlockPosition = textBlockPosition,
|
19245
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
19246
|
+
enableMobileTexts = false, } = this._data;
|
19247
|
+
const content = this._isMobileDevice && enableMobileTexts
|
19248
|
+
? {
|
19249
|
+
preHeader: mobilePreHeader,
|
19250
|
+
header: mobileHeader,
|
19251
|
+
description: mobileDescription,
|
19252
|
+
ctaText: mobileCtaText,
|
19253
|
+
}
|
19254
|
+
: { preHeader, header, description, ctaText };
|
19255
|
+
if (!this.hasContent) {
|
19256
|
+
return `
|
19257
|
+
${importFonts()}
|
19258
|
+
<div class="${prefix}"></div>
|
19259
|
+
`;
|
19260
|
+
}
|
19261
|
+
const elements = [
|
19262
|
+
renderElement('h2', `${prefix}__pre-header`, content.preHeader),
|
19263
|
+
renderElement('h2', `${prefix}__header`, content.header),
|
19264
|
+
renderElement('p', `${prefix}__description`, content.description),
|
19265
|
+
renderElement('span', `${prefix}__cta-button`, content.ctaText),
|
19266
|
+
];
|
18971
19267
|
return `
|
18972
|
-
|
18973
|
-
|
18974
|
-
|
18975
|
-
|
18976
|
-
|
18977
|
-
|
18978
|
-
|
18979
|
-
${description ? `<p class="${prefix}__description">${description}</p>` : ''}
|
18980
|
-
${ctaText ? `<span class="${prefix}__cta-button">${ctaText}</span>` : ''}
|
19268
|
+
${GFONT_PRECONNECT}
|
19269
|
+
${GFONT_SOURCE_SANS_3}
|
19270
|
+
${GFONT_CORMORANT}
|
19271
|
+
<div class="${prefix}">
|
19272
|
+
<div class="${prefix}__text ${prefix}__text-block--${textBlockPosition} ${prefix}__text-block-mobile--${mobileTextBlockPosition}">
|
19273
|
+
${elements.join('')}
|
19274
|
+
</div>
|
18981
19275
|
</div>
|
18982
|
-
|
18983
|
-
`;
|
19276
|
+
`;
|
18984
19277
|
}
|
18985
19278
|
styles() {
|
18986
|
-
const { textBlockPosition = ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT } = this._data;
|
18987
|
-
const
|
19279
|
+
const { textBlockPosition = ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT, mobileTextBlockPosition = textBlockPosition, } = this._data;
|
19280
|
+
const desktopGradientDirection = this.getGradientDirection(textBlockPosition);
|
19281
|
+
const mobileGradientDirection = this.getGradientDirection(mobileTextBlockPosition);
|
18988
19282
|
const linearGradient = generateGradientColor(this._config.overlay, 'rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 40%');
|
18989
19283
|
const { textColor = '#ffffff', ctaTextColor = textColor, ctaBorderColor = ctaTextColor, primaryImage, mobilePrimaryImage = primaryImage, } = this._data;
|
18990
19284
|
const prefix = this._config.prefix;
|
@@ -18993,7 +19287,9 @@ class RbLongToutTallSE extends BaseSpotComponent {
|
|
18993
19287
|
display: flex;
|
18994
19288
|
width: 100%;
|
18995
19289
|
height: 100%;
|
18996
|
-
|
19290
|
+
${this.hasContent
|
19291
|
+
? `background-image: linear-gradient(${mobileGradientDirection}, ${linearGradient}), url("${mobilePrimaryImage}");`
|
19292
|
+
: `background-image: url("${mobilePrimaryImage}");`}
|
18997
19293
|
background-size: cover;
|
18998
19294
|
background-repeat: no-repeat;
|
18999
19295
|
background-position: center;
|
@@ -19015,48 +19311,106 @@ class RbLongToutTallSE extends BaseSpotComponent {
|
|
19015
19311
|
position: absolute;
|
19016
19312
|
}
|
19017
19313
|
|
19018
|
-
|
19019
|
-
|
19020
|
-
|
19021
|
-
|
19022
|
-
|
19023
|
-
|
19314
|
+
@container (max-width: 639px) {
|
19315
|
+
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
|
19316
|
+
top: 3%;
|
19317
|
+
left: 3%;
|
19318
|
+
align-items: flex-start;
|
19319
|
+
text-align: left;
|
19320
|
+
}
|
19024
19321
|
|
19025
|
-
|
19026
|
-
|
19027
|
-
|
19028
|
-
|
19029
|
-
|
19030
|
-
|
19322
|
+
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT} {
|
19323
|
+
top: 3%;
|
19324
|
+
right: 3%;
|
19325
|
+
align-items: flex-end;
|
19326
|
+
text-align: right;
|
19327
|
+
}
|
19031
19328
|
|
19032
|
-
|
19033
|
-
|
19034
|
-
|
19035
|
-
|
19036
|
-
|
19037
|
-
|
19038
|
-
|
19329
|
+
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT} {
|
19330
|
+
top: 50%;
|
19331
|
+
left: 3%;
|
19332
|
+
transform: translateY(-50%);
|
19333
|
+
align-items: flex-start;
|
19334
|
+
text-align: left;
|
19335
|
+
}
|
19039
19336
|
|
19040
|
-
|
19041
|
-
|
19042
|
-
|
19043
|
-
|
19044
|
-
|
19045
|
-
|
19046
|
-
|
19337
|
+
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT} {
|
19338
|
+
top: 50%;
|
19339
|
+
right: 3%;
|
19340
|
+
transform: translateY(-50%);
|
19341
|
+
align-items: flex-end;
|
19342
|
+
text-align: right;
|
19343
|
+
}
|
19047
19344
|
|
19048
|
-
|
19049
|
-
|
19050
|
-
|
19051
|
-
|
19052
|
-
|
19345
|
+
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT} {
|
19346
|
+
bottom: 3%;
|
19347
|
+
left: 3%;
|
19348
|
+
align-items: flex-start;
|
19349
|
+
text-align: left;
|
19350
|
+
}
|
19351
|
+
|
19352
|
+
.${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT} {
|
19353
|
+
bottom: 3%;
|
19354
|
+
right: 3%;
|
19355
|
+
align-items: flex-end;
|
19356
|
+
text-align: right;
|
19357
|
+
}
|
19053
19358
|
}
|
19054
19359
|
|
19055
|
-
|
19056
|
-
|
19057
|
-
|
19058
|
-
|
19059
|
-
|
19360
|
+
@container (min-width: 640px) {
|
19361
|
+
.${prefix} {
|
19362
|
+
${this.hasContent
|
19363
|
+
? `background-image: linear-gradient(${desktopGradientDirection}, ${linearGradient}), url("${primaryImage}");`
|
19364
|
+
: `background-image: url("${primaryImage}");`}
|
19365
|
+
}
|
19366
|
+
|
19367
|
+
.${prefix}__text {
|
19368
|
+
width: 70%;
|
19369
|
+
}
|
19370
|
+
|
19371
|
+
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
|
19372
|
+
top: 3%;
|
19373
|
+
left: 3%;
|
19374
|
+
align-items: flex-start;
|
19375
|
+
text-align: left;
|
19376
|
+
}
|
19377
|
+
|
19378
|
+
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT} {
|
19379
|
+
top: 3%;
|
19380
|
+
right: 3%;
|
19381
|
+
align-items: flex-end;
|
19382
|
+
text-align: right;
|
19383
|
+
}
|
19384
|
+
|
19385
|
+
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT} {
|
19386
|
+
top: 50%;
|
19387
|
+
left: 3%;
|
19388
|
+
transform: translateY(-50%);
|
19389
|
+
align-items: flex-start;
|
19390
|
+
text-align: left;
|
19391
|
+
}
|
19392
|
+
|
19393
|
+
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT} {
|
19394
|
+
top: 50%;
|
19395
|
+
right: 3%;
|
19396
|
+
transform: translateY(-50%);
|
19397
|
+
align-items: flex-end;
|
19398
|
+
text-align: right;
|
19399
|
+
}
|
19400
|
+
|
19401
|
+
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT} {
|
19402
|
+
bottom: 3%;
|
19403
|
+
left: 3%;
|
19404
|
+
align-items: flex-start;
|
19405
|
+
text-align: left;
|
19406
|
+
}
|
19407
|
+
|
19408
|
+
.${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT} {
|
19409
|
+
bottom: 3%;
|
19410
|
+
right: 3%;
|
19411
|
+
align-items: flex-end;
|
19412
|
+
text-align: right;
|
19413
|
+
}
|
19060
19414
|
}
|
19061
19415
|
|
19062
19416
|
.${prefix}__pre-header {
|
@@ -19104,16 +19458,6 @@ class RbLongToutTallSE extends BaseSpotComponent {
|
|
19104
19458
|
background-color: ${ctaBorderColor.length === 7 ? `${ctaBorderColor}15` : `${ctaBorderColor}`};
|
19105
19459
|
}
|
19106
19460
|
|
19107
|
-
@container (min-width: 640px) {
|
19108
|
-
.${prefix} {
|
19109
|
-
background-image: linear-gradient(${gradientDirection}, ${linearGradient}), url("${primaryImage}");
|
19110
|
-
}
|
19111
|
-
|
19112
|
-
.${prefix}__text {
|
19113
|
-
width: 70%;
|
19114
|
-
}
|
19115
|
-
}
|
19116
|
-
|
19117
19461
|
@container (min-width: 768px) {
|
19118
19462
|
.${prefix}__description {
|
19119
19463
|
font-size: 12px;
|
@@ -19153,22 +19497,50 @@ class RbLongToutTallSE extends BaseSpotComponent {
|
|
19153
19497
|
}
|
19154
19498
|
`;
|
19155
19499
|
}
|
19500
|
+
get hasContent() {
|
19501
|
+
const { preHeader, mobilePreHeader, header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText,
|
19502
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
19503
|
+
enableMobileTexts = false, } = this._data;
|
19504
|
+
const content = this._isMobileDevice && enableMobileTexts
|
19505
|
+
? {
|
19506
|
+
preHeader: mobilePreHeader,
|
19507
|
+
header: mobileHeader,
|
19508
|
+
description: mobileDescription,
|
19509
|
+
ctaText: mobileCtaText,
|
19510
|
+
}
|
19511
|
+
: { preHeader, header, description, ctaText };
|
19512
|
+
return Object.values(content).some(Boolean);
|
19513
|
+
}
|
19156
19514
|
}
|
19157
19515
|
|
19158
19516
|
class RbNavigationBannerSE extends BaseSpotComponent {
|
19159
19517
|
constructor() {
|
19160
19518
|
super();
|
19519
|
+
this.reRenderOnDeviceChange = true;
|
19161
19520
|
}
|
19162
19521
|
template() {
|
19163
19522
|
const prefix = this._config.prefix;
|
19164
|
-
const { header
|
19523
|
+
const { header, mobileHeader,
|
19524
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
19525
|
+
enableMobileTexts = false, } = this._data;
|
19526
|
+
const content = this._isMobileDevice && enableMobileTexts
|
19527
|
+
? {
|
19528
|
+
header: mobileHeader,
|
19529
|
+
}
|
19530
|
+
: { header };
|
19531
|
+
if (!this.hasContent) {
|
19532
|
+
return `
|
19533
|
+
${importFonts('sourceSans')}
|
19534
|
+
<div class="${prefix}"></div>
|
19535
|
+
`;
|
19536
|
+
}
|
19537
|
+
const elements = [renderElement('h2', `${prefix}__header`, content.header)];
|
19165
19538
|
return `
|
19166
|
-
|
19167
|
-
|
19168
|
-
|
19169
|
-
|
19170
|
-
|
19171
|
-
`;
|
19539
|
+
${importFonts('sourceSans')}
|
19540
|
+
<div class="${prefix}">
|
19541
|
+
${elements.join('')}
|
19542
|
+
</div>
|
19543
|
+
`;
|
19172
19544
|
}
|
19173
19545
|
styles() {
|
19174
19546
|
const { textColor = '#ffffff', primaryImage, mobilePrimaryImage = primaryImage } = this._data;
|
@@ -19184,7 +19556,9 @@ class RbNavigationBannerSE extends BaseSpotComponent {
|
|
19184
19556
|
border-radius: 5px;
|
19185
19557
|
overflow: hidden;
|
19186
19558
|
cursor: pointer;
|
19187
|
-
|
19559
|
+
${this.hasContent
|
19560
|
+
? `background-image: linear-gradient(to top, ${linearGradient}), url("${mobilePrimaryImage}");`
|
19561
|
+
: `background-image: url("${mobilePrimaryImage}");`}
|
19188
19562
|
background-size: cover;
|
19189
19563
|
background-position: center;
|
19190
19564
|
background-repeat: no-repeat;
|
@@ -19204,7 +19578,9 @@ class RbNavigationBannerSE extends BaseSpotComponent {
|
|
19204
19578
|
|
19205
19579
|
@container (min-width: 640px) {
|
19206
19580
|
.${prefix} {
|
19207
|
-
|
19581
|
+
${this.hasContent
|
19582
|
+
? `background-image: linear-gradient(to top, ${linearGradient}), url("${primaryImage}");`
|
19583
|
+
: `background-image: url("${primaryImage}");`}
|
19208
19584
|
}
|
19209
19585
|
}
|
19210
19586
|
|
@@ -19227,22 +19603,47 @@ class RbNavigationBannerSE extends BaseSpotComponent {
|
|
19227
19603
|
}
|
19228
19604
|
`;
|
19229
19605
|
}
|
19606
|
+
get hasContent() {
|
19607
|
+
const { header, mobileHeader,
|
19608
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
19609
|
+
enableMobileTexts = false, } = this._data;
|
19610
|
+
const content = this._isMobileDevice && enableMobileTexts
|
19611
|
+
? {
|
19612
|
+
header: mobileHeader,
|
19613
|
+
}
|
19614
|
+
: { header };
|
19615
|
+
return Object.values(content).some(Boolean);
|
19616
|
+
}
|
19230
19617
|
}
|
19231
19618
|
|
19232
19619
|
class RbSmallCategoryImageToutSE extends BaseSpotComponent {
|
19233
19620
|
constructor() {
|
19234
19621
|
super();
|
19622
|
+
this.reRenderOnDeviceChange = true;
|
19235
19623
|
}
|
19236
19624
|
template() {
|
19237
19625
|
const prefix = this._config.prefix;
|
19238
|
-
const { header
|
19626
|
+
const { header, mobileHeader,
|
19627
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
19628
|
+
enableMobileTexts = false, } = this._data;
|
19629
|
+
const content = this._isMobileDevice && enableMobileTexts
|
19630
|
+
? {
|
19631
|
+
header: mobileHeader,
|
19632
|
+
}
|
19633
|
+
: { header };
|
19634
|
+
if (!this.hasContent) {
|
19635
|
+
return `
|
19636
|
+
${importFonts('cormorant')}
|
19637
|
+
<div class="${prefix}"></div>
|
19638
|
+
`;
|
19639
|
+
}
|
19640
|
+
const elements = [renderElement('h2', `${prefix}__header`, content.header)];
|
19239
19641
|
return `
|
19240
|
-
|
19241
|
-
|
19242
|
-
|
19243
|
-
|
19244
|
-
|
19245
|
-
`;
|
19642
|
+
${importFonts('cormorant')}
|
19643
|
+
<div class="${prefix}">
|
19644
|
+
${elements.join('')}
|
19645
|
+
</div>
|
19646
|
+
`;
|
19246
19647
|
}
|
19247
19648
|
styles() {
|
19248
19649
|
const { textColor = '#ffffff', primaryImage, mobilePrimaryImage = primaryImage } = this._data;
|
@@ -19255,7 +19656,9 @@ class RbSmallCategoryImageToutSE extends BaseSpotComponent {
|
|
19255
19656
|
display: flex;
|
19256
19657
|
flex-direction: column;
|
19257
19658
|
justify-content: flex-end;
|
19258
|
-
|
19659
|
+
${this.hasContent
|
19660
|
+
? `background-image: linear-gradient(to top, ${linearGradient}), url("${mobilePrimaryImage}");`
|
19661
|
+
: `background-image: url("${mobilePrimaryImage}");`}
|
19259
19662
|
background-size: cover;
|
19260
19663
|
background-repeat: no-repeat;
|
19261
19664
|
background-position: center;
|
@@ -19278,30 +19681,51 @@ class RbSmallCategoryImageToutSE extends BaseSpotComponent {
|
|
19278
19681
|
|
19279
19682
|
@container (min-width: 640px) {
|
19280
19683
|
.${prefix} {
|
19281
|
-
|
19684
|
+
${this.hasContent
|
19685
|
+
? `background-image: linear-gradient(to top, ${linearGradient}), url("${primaryImage}");`
|
19686
|
+
: `background-image: url("${primaryImage}");`}
|
19282
19687
|
}
|
19283
19688
|
}
|
19284
19689
|
`;
|
19285
19690
|
}
|
19691
|
+
get hasContent() {
|
19692
|
+
const { header, mobileHeader,
|
19693
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
19694
|
+
enableMobileTexts = false, } = this._data;
|
19695
|
+
const content = this._isMobileDevice && enableMobileTexts
|
19696
|
+
? {
|
19697
|
+
header: mobileHeader,
|
19698
|
+
}
|
19699
|
+
: { header };
|
19700
|
+
return Object.values(content).some(Boolean);
|
19701
|
+
}
|
19286
19702
|
}
|
19287
19703
|
|
19288
19704
|
class RbSmallDiscoverToutSE extends BaseSpotComponent {
|
19289
19705
|
constructor() {
|
19290
19706
|
super();
|
19707
|
+
this.reRenderOnDeviceChange = true;
|
19291
19708
|
}
|
19292
19709
|
template() {
|
19293
19710
|
const prefix = this._config.prefix;
|
19294
|
-
const { header
|
19711
|
+
const { header, mobileHeader,
|
19712
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
19713
|
+
enableMobileTexts = false, } = this._data;
|
19714
|
+
const content = this._isMobileDevice && enableMobileTexts
|
19715
|
+
? {
|
19716
|
+
header: mobileHeader,
|
19717
|
+
}
|
19718
|
+
: { header };
|
19719
|
+
const elements = [renderElement('h2', `${prefix}__header`, content.header)];
|
19295
19720
|
return `
|
19296
|
-
|
19297
|
-
|
19298
|
-
|
19299
|
-
|
19300
|
-
|
19301
|
-
|
19721
|
+
${importFonts('sourceSans')}
|
19722
|
+
<div class="${prefix}">
|
19723
|
+
<div class="${prefix}__image"></div>
|
19724
|
+
<div class="${prefix}__text">
|
19725
|
+
${elements.join('')}
|
19726
|
+
</div>
|
19302
19727
|
</div>
|
19303
|
-
|
19304
|
-
`;
|
19728
|
+
`;
|
19305
19729
|
}
|
19306
19730
|
styles() {
|
19307
19731
|
const { textColor = '#000000', backgroundColor = 'transparent', primaryImage, mobilePrimaryImage = primaryImage, } = this._data;
|
@@ -19418,13 +19842,13 @@ class RbVideoPlayerSE extends BaseSpotComponent {
|
|
19418
19842
|
if (!this.video)
|
19419
19843
|
return;
|
19420
19844
|
const muteButton = this._container.querySelector(this.muteButtonSelector());
|
19421
|
-
muteButton === null || muteButton ===
|
19845
|
+
muteButton === null || muteButton === undefined ? undefined : muteButton.addEventListener('click', this.handleMuteToggle);
|
19422
19846
|
}
|
19423
19847
|
removeEventListeners() {
|
19424
19848
|
if (!this.video)
|
19425
19849
|
return;
|
19426
19850
|
const muteButton = this._container.querySelector(this.muteButtonSelector());
|
19427
|
-
muteButton === null || muteButton ===
|
19851
|
+
muteButton === null || muteButton === undefined ? undefined : muteButton.removeEventListener('click', this.handleMuteToggle);
|
19428
19852
|
}
|
19429
19853
|
template() {
|
19430
19854
|
const prefix = this._config.prefix;
|
@@ -19603,7 +20027,7 @@ class SpotTemplateService {
|
|
19603
20027
|
const variantClasses = this.isRbSpot(spotType) ? this.rbTemplates : this.iabTemplates;
|
19604
20028
|
if (!variantClasses)
|
19605
20029
|
return null;
|
19606
|
-
const spotClass = ((_a = variantClasses[spotType]) === null || _a ===
|
20030
|
+
const spotClass = ((_a = variantClasses[spotType]) === null || _a === undefined ? undefined : _a[spotVariant]) || null;
|
19607
20031
|
if (!spotClass)
|
19608
20032
|
return null;
|
19609
20033
|
return spotClass;
|
@@ -19937,7 +20361,7 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
|
|
19937
20361
|
disconnectedCallback() {
|
19938
20362
|
var _a;
|
19939
20363
|
this.cleanupEventListeners();
|
19940
|
-
(_a = this.resizeObserver) === null || _a ===
|
20364
|
+
(_a = this.resizeObserver) === null || _a === undefined ? undefined : _a.disconnect();
|
19941
20365
|
}
|
19942
20366
|
setupResizeObserver() {
|
19943
20367
|
if (this.data && !this.data.fluid) {
|
@@ -19958,14 +20382,14 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
|
|
19958
20382
|
*/
|
19959
20383
|
initializeState() {
|
19960
20384
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
19961
|
-
this.state.useDots = Boolean((_a = this.data) === null || _a ===
|
19962
|
-
this.state.useButtons = Boolean((_b = this.data) === null || _b ===
|
19963
|
-
this.state.autoplay = (_d = (_c = this.data) === null || _c ===
|
19964
|
-
this.state.interval = (_f = (_e = this.data) === null || _e ===
|
19965
|
-
if (typeof ((_g = this.data) === null || _g ===
|
20385
|
+
this.state.useDots = Boolean((_a = this.data) === null || _a === undefined ? undefined : _a.useDots);
|
20386
|
+
this.state.useButtons = Boolean((_b = this.data) === null || _b === undefined ? undefined : _b.useButtons);
|
20387
|
+
this.state.autoplay = (_d = (_c = this.data) === null || _c === undefined ? undefined : _c.autoplay) !== null && _d !== undefined ? _d : true;
|
20388
|
+
this.state.interval = (_f = (_e = this.data) === null || _e === undefined ? undefined : _e.interval) !== null && _f !== undefined ? _f : CustomCarouselElement.defaultConfigs.interval;
|
20389
|
+
if (typeof ((_g = this.data) === null || _g === undefined ? undefined : _g.useDots) === 'object') {
|
19966
20390
|
this.state.dots = { ...this.state.dots, ...this.data.useDots };
|
19967
20391
|
}
|
19968
|
-
if (typeof ((_h = this.data) === null || _h ===
|
20392
|
+
if (typeof ((_h = this.data) === null || _h === undefined ? undefined : _h.useButtons) === 'object') {
|
19969
20393
|
this.state.buttons = { ...this.state.buttons, ...this.data.useButtons };
|
19970
20394
|
}
|
19971
20395
|
this.validateConfiguration();
|
@@ -20429,7 +20853,7 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
|
|
20429
20853
|
}
|
20430
20854
|
this.state.isVirtualizing = false;
|
20431
20855
|
// Force reflow to ensure the style change takes effect immediately
|
20432
|
-
void ((_a = this.elements.slidesContainer) === null || _a ===
|
20856
|
+
void ((_a = this.elements.slidesContainer) === null || _a === undefined ? undefined : _a.offsetHeight);
|
20433
20857
|
}
|
20434
20858
|
/**
|
20435
20859
|
* Updates dot active states
|
@@ -20538,8 +20962,8 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
|
|
20538
20962
|
});
|
20539
20963
|
}
|
20540
20964
|
if (this.state.useButtons) {
|
20541
|
-
(_a = this.elements.prevButton) === null || _a ===
|
20542
|
-
(_b = this.elements.nextButton) === null || _b ===
|
20965
|
+
(_a = this.elements.prevButton) === null || _a === undefined ? undefined : _a.addEventListener('click', () => this.handleNavigation('prev'));
|
20966
|
+
(_b = this.elements.nextButton) === null || _b === undefined ? undefined : _b.addEventListener('click', () => this.handleNavigation('next'));
|
20543
20967
|
}
|
20544
20968
|
}
|
20545
20969
|
/**
|
@@ -20726,7 +21150,7 @@ class ElementService {
|
|
20726
21150
|
const dimensions = SPOT_DIMENSIONS[params.spotType];
|
20727
21151
|
skeleton.data = {
|
20728
21152
|
spotType: params.spotType,
|
20729
|
-
fluid: (params === null || params ===
|
21153
|
+
fluid: (params === null || params === undefined ? undefined : params.fluid) === undefined ? false : params.fluid,
|
20730
21154
|
...dimensions,
|
20731
21155
|
};
|
20732
21156
|
return skeleton;
|
@@ -20816,16 +21240,16 @@ class DataLayerMonitor {
|
|
20816
21240
|
}
|
20817
21241
|
extractProductData(event) {
|
20818
21242
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
20819
|
-
const items = ((_a = event === null || event ===
|
20820
|
-
((_b = event === null || event ===
|
20821
|
-
((_c = event === null || event ===
|
20822
|
-
((_e = (_d = event === null || event ===
|
20823
|
-
((_g = (_f = event === null || event ===
|
20824
|
-
((_j = (_h = event === null || event ===
|
20825
|
-
((_l = (_k = event === null || event ===
|
20826
|
-
((_o = (_m = event === null || event ===
|
20827
|
-
((_q = (_p = event === null || event ===
|
20828
|
-
(event === null || event ===
|
21243
|
+
const items = ((_a = event === null || event === undefined ? undefined : event.value) === null || _a === undefined ? undefined : _a.items) ||
|
21244
|
+
((_b = event === null || event === undefined ? undefined : event.ecommerce) === null || _b === undefined ? undefined : _b.items) ||
|
21245
|
+
((_c = event === null || event === undefined ? undefined : event.ecommerce) === null || _c === undefined ? undefined : _c.products) ||
|
21246
|
+
((_e = (_d = event === null || event === undefined ? undefined : event.ecommerce) === null || _d === undefined ? undefined : _d.detail) === null || _e === undefined ? undefined : _e.products) ||
|
21247
|
+
((_g = (_f = event === null || event === undefined ? undefined : event.ecommerce) === null || _f === undefined ? undefined : _f.checkout) === null || _g === undefined ? undefined : _g.products) ||
|
21248
|
+
((_j = (_h = event === null || event === undefined ? undefined : event.ecommerce) === null || _h === undefined ? undefined : _h.purchase) === null || _j === undefined ? undefined : _j.products) ||
|
21249
|
+
((_l = (_k = event === null || event === undefined ? undefined : event.ecommerce) === null || _k === undefined ? undefined : _k.add) === null || _l === undefined ? undefined : _l.products) ||
|
21250
|
+
((_o = (_m = event === null || event === undefined ? undefined : event.ecommerce) === null || _m === undefined ? undefined : _m.remove) === null || _o === undefined ? undefined : _o.products) ||
|
21251
|
+
((_q = (_p = event === null || event === undefined ? undefined : event.ecommerce) === null || _p === undefined ? undefined : _p.click) === null || _q === undefined ? undefined : _q.products) ||
|
21252
|
+
(event === null || event === undefined ? undefined : event.products) ||
|
20829
21253
|
[];
|
20830
21254
|
return items.map((item) => {
|
20831
21255
|
const data = {
|
@@ -20881,7 +21305,7 @@ class MonitorService {
|
|
20881
21305
|
return;
|
20882
21306
|
this.implementedMonitor.setListener(async (eventData) => {
|
20883
21307
|
var _a;
|
20884
|
-
await this.matchAndFireEvent(eventData, (_a = this.localStorageService) === null || _a ===
|
21308
|
+
await this.matchAndFireEvent(eventData, (_a = this.localStorageService) === null || _a === undefined ? undefined : _a.getSpots());
|
20885
21309
|
});
|
20886
21310
|
this.implementedMonitor.start();
|
20887
21311
|
}
|
@@ -20897,14 +21321,14 @@ class MonitorService {
|
|
20897
21321
|
continue;
|
20898
21322
|
}
|
20899
21323
|
const firedEvents = spot.firedEvents || [];
|
20900
|
-
const eventProductId = (_a = this.normalizeStringHelper) === null || _a ===
|
21324
|
+
const eventProductId = (_a = this.normalizeStringHelper) === null || _a === undefined ? undefined : _a.normalize(String(data.id));
|
20901
21325
|
const isEventAlreadyFired = firedEvents.some((event) => event.productId === eventProductId && event.event === eventData.event);
|
20902
21326
|
if (isEventAlreadyFired) {
|
20903
21327
|
continue;
|
20904
21328
|
}
|
20905
|
-
const spotRelatedProductIdsSet = new Set(spot.productIds.map((id) => { var _a; return (_a = this.normalizeStringHelper) === null || _a ===
|
20906
|
-
const eventProductBrand = (_b = this.normalizeStringHelper) === null || _b ===
|
20907
|
-
const eventVariantBrand = (_c = this.normalizeStringHelper) === null || _c ===
|
21329
|
+
const spotRelatedProductIdsSet = new Set(spot.productIds.map((id) => { var _a; return (_a = this.normalizeStringHelper) === null || _a === undefined ? undefined : _a.normalize(String(id)); }));
|
21330
|
+
const eventProductBrand = (_b = this.normalizeStringHelper) === null || _b === undefined ? undefined : _b.normalize(String(data.brand));
|
21331
|
+
const eventVariantBrand = (_c = this.normalizeStringHelper) === null || _c === undefined ? undefined : _c.normalize(String(data.variant));
|
20908
21332
|
const isProductMatch = [eventProductId, eventProductBrand, eventVariantBrand].some((id) => spotRelatedProductIdsSet.has(id));
|
20909
21333
|
if (!isProductMatch) {
|
20910
21334
|
continue;
|
@@ -20935,7 +21359,7 @@ class MonitorService {
|
|
20935
21359
|
event: eventData.event,
|
20936
21360
|
});
|
20937
21361
|
// Update the spots in the local storage
|
20938
|
-
(_d = this.localStorageService) === null || _d ===
|
21362
|
+
(_d = this.localStorageService) === null || _d === undefined ? undefined : _d.setSpot(spot.spotId, {
|
20939
21363
|
placementId: spot.placementId,
|
20940
21364
|
spotId: spot.spotId,
|
20941
21365
|
spotType: spot.spotType,
|
@@ -20999,9 +21423,9 @@ class SelectionService extends BaseApi {
|
|
20999
21423
|
}
|
21000
21424
|
const { isOk, val, isErr } = await this.post(SELECTION_API_PATH, data, {});
|
21001
21425
|
if (isErr) {
|
21002
|
-
return { error: `There was an error during spot selection: (${isErr === null || isErr ===
|
21426
|
+
return { error: `There was an error during spot selection: (${isErr === null || isErr === undefined ? undefined : isErr.errorMessage})` };
|
21003
21427
|
}
|
21004
|
-
if (isOk && val && val.data && (val === null || val ===
|
21428
|
+
if (isOk && val && val.data && (val === null || val === undefined ? undefined : val.refresh.token)) {
|
21005
21429
|
this.authInfo.authenticated = true;
|
21006
21430
|
this.authInfo.token = val.refresh.token;
|
21007
21431
|
return val.data.spots;
|
@@ -21116,7 +21540,7 @@ class SpotManagerService {
|
|
21116
21540
|
spotId: spot.id,
|
21117
21541
|
spotType: spot.spot,
|
21118
21542
|
events: spot.events,
|
21119
|
-
productIds: (_a = spot.productIds) !== null && _a !==
|
21543
|
+
productIds: (_a = spot.productIds) !== null && _a !== undefined ? _a : [],
|
21120
21544
|
});
|
21121
21545
|
}
|
21122
21546
|
async handleClickEvent({ placementId, spot }) {
|
@@ -21129,7 +21553,7 @@ class SpotManagerService {
|
|
21129
21553
|
await fireEvent({
|
21130
21554
|
spotType: spot.spot,
|
21131
21555
|
event: RMN_SPOT_EVENT.CLICK,
|
21132
|
-
eventUrl: (_b = (_a = spot.events.find((event) => event.event === RMN_SPOT_EVENT.CLICK)) === null || _a ===
|
21556
|
+
eventUrl: (_b = (_a = spot.events.find((event) => event.event === RMN_SPOT_EVENT.CLICK)) === null || _a === undefined ? undefined : _a.url) !== null && _b !== undefined ? _b : '',
|
21133
21557
|
});
|
21134
21558
|
}
|
21135
21559
|
handleImpressionEvent(placementId, spot) {
|
@@ -21143,7 +21567,7 @@ class SpotManagerService {
|
|
21143
21567
|
await fireEvent({
|
21144
21568
|
spotType: spot.spot,
|
21145
21569
|
event: RMN_SPOT_EVENT.IMPRESSION,
|
21146
|
-
eventUrl: (_b = (_a = spot.events.find((event) => event.event === RMN_SPOT_EVENT.IMPRESSION)) === null || _a ===
|
21570
|
+
eventUrl: (_b = (_a = spot.events.find((event) => event.event === RMN_SPOT_EVENT.IMPRESSION)) === null || _a === undefined ? undefined : _a.url) !== null && _b !== undefined ? _b : '',
|
21147
21571
|
});
|
21148
21572
|
})();
|
21149
21573
|
}
|
@@ -21218,7 +21642,7 @@ function validateInjectData(inject) {
|
|
21218
21642
|
*/
|
21219
21643
|
function clearPlacement(placementId) {
|
21220
21644
|
var _a;
|
21221
|
-
(_a = document.getElementById(placementId)) === null || _a ===
|
21645
|
+
(_a = document.getElementById(placementId)) === null || _a === undefined ? undefined : _a.replaceChildren();
|
21222
21646
|
}
|
21223
21647
|
/**
|
21224
21648
|
* Prepares the spot placement for rendering by taking care of its styling.
|
@@ -21252,10 +21676,10 @@ function overrideSpotColors(spot, colors) {
|
|
21252
21676
|
const { textColor, backgroundColor, ctaTextColor, ctaBorderColor } = colors;
|
21253
21677
|
return {
|
21254
21678
|
...spot,
|
21255
|
-
textColor: textColor !== null && textColor !==
|
21256
|
-
backgroundColor: backgroundColor !== null && backgroundColor !==
|
21257
|
-
ctaTextColor: ctaTextColor !== null && ctaTextColor !==
|
21258
|
-
ctaBorderColor: ctaBorderColor !== null && ctaBorderColor !==
|
21679
|
+
textColor: textColor !== null && textColor !== undefined ? textColor : spot.textColor,
|
21680
|
+
backgroundColor: backgroundColor !== null && backgroundColor !== undefined ? backgroundColor : spot.backgroundColor,
|
21681
|
+
ctaTextColor: ctaTextColor !== null && ctaTextColor !== undefined ? ctaTextColor : spot.ctaTextColor,
|
21682
|
+
ctaBorderColor: ctaBorderColor !== null && ctaBorderColor !== undefined ? ctaBorderColor : spot.ctaBorderColor,
|
21259
21683
|
};
|
21260
21684
|
}
|
21261
21685
|
// Sets the id for the user who is browsing the website
|
@@ -21375,7 +21799,7 @@ class BrowserRmnClient {
|
|
21375
21799
|
}, false);
|
21376
21800
|
prepareSpotPlacement(placement);
|
21377
21801
|
const skeletonElement = this.elementService.createSkeletonElement({
|
21378
|
-
fluid: (_b = (_a = injectData === null || injectData ===
|
21802
|
+
fluid: (_b = (_a = injectData === null || injectData === undefined ? undefined : injectData.config) === null || _a === undefined ? undefined : _a.fluid) !== null && _b !== undefined ? _b : globalConfig === null || globalConfig === undefined ? undefined : globalConfig.fluid,
|
21379
21803
|
spotType: injectData.spotType,
|
21380
21804
|
});
|
21381
21805
|
if (!skeletonElement) {
|
@@ -21387,7 +21811,7 @@ class BrowserRmnClient {
|
|
21387
21811
|
});
|
21388
21812
|
}
|
21389
21813
|
if (skeletonElement) {
|
21390
|
-
placement === null || placement ===
|
21814
|
+
placement === null || placement === undefined ? undefined : placement.replaceChildren(skeletonElement);
|
21391
21815
|
}
|
21392
21816
|
validPlacements.set(placementId, placement);
|
21393
21817
|
this.spotManagerService.updateSpotLifecycleState(injectData.placementId, {
|
@@ -21402,11 +21826,18 @@ class BrowserRmnClient {
|
|
21402
21826
|
const validInjectPlacements = Array.from(validPlacements.keys())
|
21403
21827
|
.map((id) => injectMap.get(id))
|
21404
21828
|
.filter(Boolean);
|
21405
|
-
|
21406
|
-
|
21407
|
-
|
21408
|
-
|
21409
|
-
}
|
21829
|
+
let response;
|
21830
|
+
// Use custom spots if provided
|
21831
|
+
if (params.customSpots) {
|
21832
|
+
response = params.customSpots;
|
21833
|
+
}
|
21834
|
+
else {
|
21835
|
+
// Make the spot selection request
|
21836
|
+
response = await this.injectSpotSelectionRequest({
|
21837
|
+
...params,
|
21838
|
+
inject: validInjectPlacements,
|
21839
|
+
});
|
21840
|
+
}
|
21410
21841
|
// Handle request error state
|
21411
21842
|
if (typeof response === 'object' && 'error' in response) {
|
21412
21843
|
this.spotManagerService.updateSpotLifecycleState('all', {
|
@@ -21423,9 +21854,9 @@ class BrowserRmnClient {
|
|
21423
21854
|
validPlacements.forEach((placement, placementId) => {
|
21424
21855
|
var _a;
|
21425
21856
|
const injectData = injectMap.get(placementId);
|
21426
|
-
const itemConfig = (_a = injectData === null || injectData ===
|
21857
|
+
const itemConfig = (_a = injectData === null || injectData === undefined ? undefined : injectData.config) !== null && _a !== undefined ? _a : globalConfig;
|
21427
21858
|
const spots = response[placementId];
|
21428
|
-
if (!(spots === null || spots ===
|
21859
|
+
if (!(spots === null || spots === undefined ? undefined : spots.length)) {
|
21429
21860
|
this.spotManagerService.updateSpotLifecycleState(injectData.placementId, {
|
21430
21861
|
state: {
|
21431
21862
|
error: `No spots found for type "${injectData.spotType}".`,
|
@@ -21471,12 +21902,12 @@ class BrowserRmnClient {
|
|
21471
21902
|
isCarouselItem: false,
|
21472
21903
|
},
|
21473
21904
|
});
|
21474
|
-
const spotData = overrideSpotColors(spot, config === null || config ===
|
21905
|
+
const spotData = overrideSpotColors(spot, config === null || config === undefined ? undefined : config.colors);
|
21475
21906
|
const spotElement = this.elementService.createSpotElement({
|
21476
21907
|
spot: spotData,
|
21477
21908
|
config: {
|
21478
21909
|
prefix: '',
|
21479
|
-
fluid: spot.spot === RMN_SPOT_TYPE.RB_IN_TEXT ? true : ((_a = config === null || config ===
|
21910
|
+
fluid: spot.spot === RMN_SPOT_TYPE.RB_IN_TEXT ? true : ((_a = config === null || config === undefined ? undefined : config.fluid) !== null && _a !== undefined ? _a : false),
|
21480
21911
|
useShadowDom: true,
|
21481
21912
|
},
|
21482
21913
|
});
|
@@ -21496,8 +21927,8 @@ class BrowserRmnClient {
|
|
21496
21927
|
placementId,
|
21497
21928
|
spotElement,
|
21498
21929
|
});
|
21499
|
-
placement === null || placement ===
|
21500
|
-
if (config === null || config ===
|
21930
|
+
placement === null || placement === undefined ? undefined : placement.replaceChildren(spotElement);
|
21931
|
+
if (config === null || config === undefined ? undefined : config.listenRenderedSpotData) {
|
21501
21932
|
this.spotManagerService.publish(RMN_EVENT.RENDERED_SPOT_DATA, {
|
21502
21933
|
placementId,
|
21503
21934
|
data: [spotData],
|
@@ -21541,7 +21972,7 @@ class BrowserRmnClient {
|
|
21541
21972
|
isCarouselItem: true,
|
21542
21973
|
},
|
21543
21974
|
});
|
21544
|
-
const spot = overrideSpotColors(spotItem, config === null || config ===
|
21975
|
+
const spot = overrideSpotColors(spotItem, config === null || config === undefined ? undefined : config.colors);
|
21545
21976
|
const spotElement = this.elementService.createSpotElement({
|
21546
21977
|
spot,
|
21547
21978
|
config: {
|
@@ -21577,11 +22008,11 @@ class BrowserRmnClient {
|
|
21577
22008
|
const carouselElement = this.elementService.createCarouselElement({
|
21578
22009
|
slides: carouselSlides,
|
21579
22010
|
config: {
|
21580
|
-
fluid: config === null || config ===
|
22011
|
+
fluid: config === null || config === undefined ? undefined : config.fluid,
|
21581
22012
|
width: maxWidth,
|
21582
22013
|
height: maxHeight,
|
21583
|
-
minScale: (_a = config === null || config ===
|
21584
|
-
...config === null || config ===
|
22014
|
+
minScale: (_a = config === null || config === undefined ? undefined : config.minScale) !== null && _a !== undefined ? _a : 0.25, // Scale down to 25% of the original size
|
22015
|
+
...config === null || config === undefined ? undefined : config.carousel,
|
21585
22016
|
},
|
21586
22017
|
});
|
21587
22018
|
if (!carouselElement) {
|
@@ -21595,8 +22026,8 @@ class BrowserRmnClient {
|
|
21595
22026
|
clearPlacement(placementId);
|
21596
22027
|
return;
|
21597
22028
|
}
|
21598
|
-
placement === null || placement ===
|
21599
|
-
if (config === null || config ===
|
22029
|
+
placement === null || placement === undefined ? undefined : placement.replaceChildren(carouselElement);
|
22030
|
+
if (config === null || config === undefined ? undefined : config.listenRenderedSpotData) {
|
21600
22031
|
this.spotManagerService.publish(RMN_EVENT.RENDERED_SPOT_DATA, {
|
21601
22032
|
placementId,
|
21602
22033
|
data: spots,
|
@@ -21626,11 +22057,11 @@ class BrowserRmnClient {
|
|
21626
22057
|
const spots = inject.map((item) => ({
|
21627
22058
|
placementId: item.placementId,
|
21628
22059
|
spot: item.spotType,
|
21629
|
-
count: item === null || item ===
|
21630
|
-
...item === null || item ===
|
22060
|
+
count: item === null || item === undefined ? undefined : item.count,
|
22061
|
+
...item === null || item === undefined ? undefined : item.filter,
|
21631
22062
|
}));
|
21632
22063
|
const request = {
|
21633
|
-
url: config === null || config ===
|
22064
|
+
url: config === null || config === undefined ? undefined : config.url,
|
21634
22065
|
filter,
|
21635
22066
|
spots,
|
21636
22067
|
};
|