@liquidcommercedev/rmn-sdk 1.5.0-beta.47 → 1.5.0-beta.48
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 +421 -16
- package/dist/index.esm.js +421 -16
- package/dist/types/enums.d.ts +3 -0
- package/dist/types/modules/spot-template/rb-template.interface.d.ts +35 -0
- package/dist/types/modules/spot-template/reservebar/carousel-horizontal-short-info-card.template.d.ts +9 -0
- package/dist/types/modules/spot-template/reservebar/carousel-vertical-small-image-info-card.template.d.ts +9 -0
- package/dist/types/modules/spot-template/reservebar/index.d.ts +2 -0
- package/package.json +1 -1
- package/umd/liquidcommerce-rmn-sdk.min.js +1 -1
package/dist/index.esm.js
CHANGED
@@ -16,6 +16,8 @@ var RMN_SPOT_TYPE;
|
|
16
16
|
RMN_SPOT_TYPE["RB_VIDEO_PLAYER"] = "rbVideoPlayer";
|
17
17
|
RMN_SPOT_TYPE["RB_IN_TEXT"] = "rbInText";
|
18
18
|
RMN_SPOT_TYPE["RB_CAROUSEL_HORIZONTAL_INFO_CARD"] = "rbCarouselHorizontalInfoCard";
|
19
|
+
RMN_SPOT_TYPE["RB_CAROUSEL_VERTICAL_SMALL_IMAGE_INFO_CARD"] = "rbCarouselVerticalSmallImageInfoCard";
|
20
|
+
RMN_SPOT_TYPE["RB_CAROUSEL_HORIZONTAL_SHORT_INFO_CARD"] = "rbCarouselHorizontalShortInfoCard";
|
19
21
|
// IAB Standard Spot Types
|
20
22
|
RMN_SPOT_TYPE["BILLBOARD"] = "billboard";
|
21
23
|
RMN_SPOT_TYPE["LARGE_RECTANGLE"] = "largeRectangle";
|
@@ -90,6 +92,7 @@ var ENUM_TEXT_BLOCK_POSITION;
|
|
90
92
|
ENUM_TEXT_BLOCK_POSITION["TOP"] = "top";
|
91
93
|
ENUM_TEXT_BLOCK_POSITION["BOTTOM"] = "bottom";
|
92
94
|
ENUM_TEXT_BLOCK_POSITION["MIDDLE"] = "middle";
|
95
|
+
ENUM_TEXT_BLOCK_POSITION["CENTER"] = "center";
|
93
96
|
ENUM_TEXT_BLOCK_POSITION["TOP_LEFT"] = "top-left";
|
94
97
|
ENUM_TEXT_BLOCK_POSITION["TOP_RIGHT"] = "top-right";
|
95
98
|
ENUM_TEXT_BLOCK_POSITION["BOTTOM_LEFT"] = "bottom-left";
|
@@ -16971,6 +16974,8 @@ const SPOT_DIMENSIONS = {
|
|
16971
16974
|
[RMN_SPOT_TYPE.RB_VIDEO_PLAYER]: { width: 1280, height: 720 },
|
16972
16975
|
[RMN_SPOT_TYPE.RB_IN_TEXT]: { width: 1, height: 1 },
|
16973
16976
|
[RMN_SPOT_TYPE.RB_CAROUSEL_HORIZONTAL_INFO_CARD]: { width: 592, height: 386 },
|
16977
|
+
[RMN_SPOT_TYPE.RB_CAROUSEL_VERTICAL_SMALL_IMAGE_INFO_CARD]: { width: 285, height: 386 },
|
16978
|
+
[RMN_SPOT_TYPE.RB_CAROUSEL_HORIZONTAL_SHORT_INFO_CARD]: { width: 285, height: 416 },
|
16974
16979
|
[RMN_SPOT_TYPE.SMALL_RECTANGLE]: { width: 180, height: 150 },
|
16975
16980
|
[RMN_SPOT_TYPE.MEDIUM_RECTANGLE]: { width: 300, height: 250 },
|
16976
16981
|
[RMN_SPOT_TYPE.LARGE_RECTANGLE]: { width: 336, height: 280 },
|
@@ -17988,7 +17993,7 @@ class RbCarouselHorizontalInfoCardSE extends BaseSpotComponent {
|
|
17988
17993
|
`;
|
17989
17994
|
}
|
17990
17995
|
styles() {
|
17991
|
-
const { headerColor = '#212121', textColor = '#616161', backgroundColor = '#
|
17996
|
+
const { headerColor = '#212121', textColor = '#616161', backgroundColor = '#f7f5f3', ctaTextColor = '#b5914a', primaryImage, mobilePrimaryImage = primaryImage, } = this._data;
|
17992
17997
|
const prefix = this._config.prefix;
|
17993
17998
|
return `
|
17994
17999
|
.${prefix} {
|
@@ -18040,8 +18045,7 @@ class RbCarouselHorizontalInfoCardSE extends BaseSpotComponent {
|
|
18040
18045
|
margin: 0;
|
18041
18046
|
color:${headerColor};
|
18042
18047
|
font-family: "Cormorant", system-ui;
|
18043
|
-
font-
|
18044
|
-
font-size: 8px;
|
18048
|
+
font-size: ${this._isMobileDevice ? '8px' : '9px'};
|
18045
18049
|
line-height: normal;
|
18046
18050
|
letter-spacing: 0.8px;
|
18047
18051
|
}
|
@@ -18051,7 +18055,7 @@ class RbCarouselHorizontalInfoCardSE extends BaseSpotComponent {
|
|
18051
18055
|
color: ${headerColor};
|
18052
18056
|
font-family: "Cormorant", system-ui;
|
18053
18057
|
font-weight: bold;
|
18054
|
-
font-size: 16px;
|
18058
|
+
font-size: ${this._isMobileDevice ? '16px' : '18px'};
|
18055
18059
|
line-height: 24px;
|
18056
18060
|
position: relative;
|
18057
18061
|
padding-bottom: 10px;
|
@@ -18078,10 +18082,9 @@ class RbCarouselHorizontalInfoCardSE extends BaseSpotComponent {
|
|
18078
18082
|
|
18079
18083
|
.${prefix}__cta-button {
|
18080
18084
|
color: ${ctaTextColor};
|
18081
|
-
font-size: 10px;
|
18085
|
+
font-size: ${this._isMobileDevice ? '10px' : '12px'};
|
18082
18086
|
font-weight: 700;
|
18083
18087
|
font-family: "Source Sans 3", system-ui;
|
18084
|
-
letter-spacing: 1.4px;
|
18085
18088
|
border: none;
|
18086
18089
|
cursor: pointer;
|
18087
18090
|
padding: 10px 0;
|
@@ -18157,19 +18160,12 @@ class RbCarouselHorizontalInfoCardSE extends BaseSpotComponent {
|
|
18157
18160
|
font-size: 14px;
|
18158
18161
|
}
|
18159
18162
|
|
18160
|
-
.${prefix}__cta-button {
|
18161
|
-
font-size: 13px;
|
18162
|
-
}
|
18163
18163
|
}
|
18164
18164
|
|
18165
18165
|
@container (min-width: 1280px) {
|
18166
18166
|
.${prefix}__header {
|
18167
18167
|
font-size: 24px;
|
18168
18168
|
}
|
18169
|
-
|
18170
|
-
.${prefix}__cta-button {
|
18171
|
-
font-size: 14px;
|
18172
|
-
}
|
18173
18169
|
}
|
18174
18170
|
`;
|
18175
18171
|
}
|
@@ -18179,7 +18175,409 @@ class RbCarouselHorizontalInfoCardSE extends BaseSpotComponent {
|
|
18179
18175
|
enableMobileTexts = true, } = this._data;
|
18180
18176
|
const content = this._isMobileDevice && enableMobileTexts
|
18181
18177
|
? {
|
18182
|
-
|
18178
|
+
preHeader: mobilePreHeader,
|
18179
|
+
header: mobileHeader,
|
18180
|
+
description: mobileDescription,
|
18181
|
+
ctaText: mobileCtaText,
|
18182
|
+
}
|
18183
|
+
: { preHeader, header, description, ctaText };
|
18184
|
+
return Object.values(content).some(Boolean);
|
18185
|
+
}
|
18186
|
+
}
|
18187
|
+
|
18188
|
+
class RbCarouselHorizontalShortInfoCardSE extends BaseSpotComponent {
|
18189
|
+
constructor() {
|
18190
|
+
super();
|
18191
|
+
this.reRenderOnDeviceChange = true;
|
18192
|
+
}
|
18193
|
+
template() {
|
18194
|
+
const prefix = this._config.prefix;
|
18195
|
+
const { preHeader, mobilePreHeader, header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText, textBlockPosition = ENUM_TEXT_BLOCK_POSITION.BOTTOM,
|
18196
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
18197
|
+
enableMobileTexts = true, } = this._data;
|
18198
|
+
const content = this._isMobileDevice && enableMobileTexts
|
18199
|
+
? {
|
18200
|
+
preHeader: mobilePreHeader,
|
18201
|
+
header: mobileHeader,
|
18202
|
+
description: mobileDescription,
|
18203
|
+
ctaText: mobileCtaText,
|
18204
|
+
}
|
18205
|
+
: { preHeader, header, description, ctaText };
|
18206
|
+
const elements = this.hasContent
|
18207
|
+
? [
|
18208
|
+
renderElement('p', `${prefix}__preHeader`, content.preHeader),
|
18209
|
+
renderElement('h2', `${prefix}__header`, content.header),
|
18210
|
+
renderElement('p', `${prefix}__description`, content.description),
|
18211
|
+
renderElement('span', `${prefix}__cta-button`, content.ctaText),
|
18212
|
+
]
|
18213
|
+
: [];
|
18214
|
+
return `
|
18215
|
+
${importFonts()}
|
18216
|
+
<div class="${prefix}">
|
18217
|
+
<div class="${prefix}__content ${prefix}__text-block--${textBlockPosition} ${prefix}__text-block-mobile--${textBlockPosition}">
|
18218
|
+
<div class="${prefix}__image"></div>
|
18219
|
+
<div class="${prefix}__text">
|
18220
|
+
<div class="${prefix}__text-container">
|
18221
|
+
${elements.join('')}
|
18222
|
+
</div>
|
18223
|
+
</div>
|
18224
|
+
</div>
|
18225
|
+
</div>
|
18226
|
+
`;
|
18227
|
+
}
|
18228
|
+
styles() {
|
18229
|
+
const { headerColor = '#212121', textColor = '#616161', backgroundColor = '#f7f5f3', ctaTextColor = '#b5914a', primaryImage, mobilePrimaryImage = primaryImage, } = this._data;
|
18230
|
+
const prefix = this._config.prefix;
|
18231
|
+
return `
|
18232
|
+
.${prefix} {
|
18233
|
+
width: 100%;
|
18234
|
+
height: 100%;
|
18235
|
+
position: relative;
|
18236
|
+
border-radius: 5px;
|
18237
|
+
}
|
18238
|
+
|
18239
|
+
.${prefix}__content {
|
18240
|
+
width: 100%;
|
18241
|
+
height: 100%;
|
18242
|
+
display: flex;
|
18243
|
+
flex-direction: column;
|
18244
|
+
overflow: hidden;
|
18245
|
+
border-radius: 5px;
|
18246
|
+
}
|
18247
|
+
|
18248
|
+
.${prefix}__image {
|
18249
|
+
width: 100%;
|
18250
|
+
height: 62.5%;
|
18251
|
+
background-image: url("${this._isMobileDevice ? mobilePrimaryImage : primaryImage}");
|
18252
|
+
background-position: center;
|
18253
|
+
background-repeat: no-repeat;
|
18254
|
+
background-size: cover;
|
18255
|
+
min-width: 100px;
|
18256
|
+
overflow: hidden;
|
18257
|
+
}
|
18258
|
+
|
18259
|
+
.${prefix}__text {
|
18260
|
+
background-color: ${backgroundColor};
|
18261
|
+
display: flex;
|
18262
|
+
flex-direction: column;
|
18263
|
+
justify-content: center;
|
18264
|
+
width: 100%;
|
18265
|
+
height: 37.5%;
|
18266
|
+
padding: 15px;
|
18267
|
+
box-sizing: border-box;
|
18268
|
+
}
|
18269
|
+
|
18270
|
+
.${prefix}__text-container {
|
18271
|
+
display: flex;
|
18272
|
+
flex-direction: column;
|
18273
|
+
gap: 5px;
|
18274
|
+
}
|
18275
|
+
|
18276
|
+
.${prefix}__preHeader {
|
18277
|
+
margin: 0;
|
18278
|
+
color:${headerColor};
|
18279
|
+
font-family: "Cormorant", system-ui;
|
18280
|
+
font-size: ${this._isMobileDevice ? '8px' : '9px'};
|
18281
|
+
line-height: normal;
|
18282
|
+
letter-spacing: 0.8px;
|
18283
|
+
}
|
18284
|
+
|
18285
|
+
.${prefix}__header {
|
18286
|
+
margin: 0;
|
18287
|
+
color: ${headerColor};
|
18288
|
+
font-family: "Cormorant", system-ui;
|
18289
|
+
font-weight: bold;
|
18290
|
+
font-size: ${this._isMobileDevice ? '16px' : '18px'};
|
18291
|
+
line-height: 24px;
|
18292
|
+
position: relative;
|
18293
|
+
padding-bottom: 10px;
|
18294
|
+
margin-bottom: 5px;
|
18295
|
+
}
|
18296
|
+
|
18297
|
+
.${prefix}__header::after {
|
18298
|
+
content: '';
|
18299
|
+
position: absolute;
|
18300
|
+
bottom: 0;
|
18301
|
+
left: 0;
|
18302
|
+
width: 76px;
|
18303
|
+
height: 1px;
|
18304
|
+
background-color: ${ctaTextColor};
|
18305
|
+
}
|
18306
|
+
|
18307
|
+
.${prefix}__description {
|
18308
|
+
color: ${textColor};
|
18309
|
+
margin: 0;
|
18310
|
+
font-size: 10px;
|
18311
|
+
font-family: "Source Sans 3", system-ui;
|
18312
|
+
font-weight: 400;
|
18313
|
+
}
|
18314
|
+
|
18315
|
+
.${prefix}__cta-button {
|
18316
|
+
color: ${ctaTextColor};
|
18317
|
+
font-size: ${this._isMobileDevice ? '10px' : '12px'};
|
18318
|
+
font-weight: 700;
|
18319
|
+
font-family: "Source Sans 3", system-ui;
|
18320
|
+
border: none;
|
18321
|
+
cursor: pointer;
|
18322
|
+
transition: opacity 0.3s ease;
|
18323
|
+
display: inline-block;
|
18324
|
+
align-self: flex-end;
|
18325
|
+
text-decoration: none;
|
18326
|
+
margin-top: auto;
|
18327
|
+
}
|
18328
|
+
|
18329
|
+
.${prefix}__content:hover .${prefix}__cta-button {
|
18330
|
+
opacity: 0.8;
|
18331
|
+
}
|
18332
|
+
|
18333
|
+
@container (min-width: 768px) {
|
18334
|
+
.${prefix}__preHeader {
|
18335
|
+
font-size: 9px;
|
18336
|
+
}
|
18337
|
+
|
18338
|
+
.${prefix}__cta-button {
|
18339
|
+
font-size: 12px;
|
18340
|
+
}
|
18341
|
+
}
|
18342
|
+
|
18343
|
+
@container (min-width: 1024px) {
|
18344
|
+
.${prefix}__text {
|
18345
|
+
padding: 20px;
|
18346
|
+
}
|
18347
|
+
|
18348
|
+
.${prefix}__text-container {
|
18349
|
+
padding-right: 20px;
|
18350
|
+
}
|
18351
|
+
|
18352
|
+
.${prefix}__preHeader {
|
18353
|
+
font-size: 10px;
|
18354
|
+
}
|
18355
|
+
|
18356
|
+
.${prefix}__header {
|
18357
|
+
font-size: 18px;
|
18358
|
+
}
|
18359
|
+
|
18360
|
+
.${prefix}__description {
|
18361
|
+
font-size: 14px;
|
18362
|
+
}
|
18363
|
+
}
|
18364
|
+
|
18365
|
+
@container (min-width: 1280px) {
|
18366
|
+
.${prefix}__header {
|
18367
|
+
font-size: 24px;
|
18368
|
+
}
|
18369
|
+
}
|
18370
|
+
`;
|
18371
|
+
}
|
18372
|
+
get hasContent() {
|
18373
|
+
const { preHeader, mobilePreHeader, header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText,
|
18374
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
18375
|
+
enableMobileTexts = true, } = this._data;
|
18376
|
+
const content = this._isMobileDevice && enableMobileTexts
|
18377
|
+
? {
|
18378
|
+
preHeader: mobilePreHeader,
|
18379
|
+
header: mobileHeader,
|
18380
|
+
description: mobileDescription,
|
18381
|
+
ctaText: mobileCtaText,
|
18382
|
+
}
|
18383
|
+
: { preHeader, header, description, ctaText };
|
18384
|
+
return Object.values(content).some(Boolean);
|
18385
|
+
}
|
18386
|
+
}
|
18387
|
+
|
18388
|
+
class RbCarouselVerticalSmallImageInfoCardSE extends BaseSpotComponent {
|
18389
|
+
constructor() {
|
18390
|
+
super();
|
18391
|
+
this.reRenderOnDeviceChange = true;
|
18392
|
+
}
|
18393
|
+
template() {
|
18394
|
+
const prefix = this._config.prefix;
|
18395
|
+
const { preHeader, mobilePreHeader, header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText, textBlockPosition = ENUM_TEXT_BLOCK_POSITION.BOTTOM,
|
18396
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
18397
|
+
enableMobileTexts = true, } = this._data;
|
18398
|
+
const content = this._isMobileDevice && enableMobileTexts
|
18399
|
+
? {
|
18400
|
+
preHeader: mobilePreHeader,
|
18401
|
+
header: mobileHeader,
|
18402
|
+
description: mobileDescription,
|
18403
|
+
ctaText: mobileCtaText,
|
18404
|
+
}
|
18405
|
+
: { preHeader, header, description, ctaText };
|
18406
|
+
const elements = this.hasContent
|
18407
|
+
? [
|
18408
|
+
renderElement('p', `${prefix}__preHeader`, content.preHeader),
|
18409
|
+
renderElement('h2', `${prefix}__header`, content.header),
|
18410
|
+
renderElement('p', `${prefix}__description`, content.description),
|
18411
|
+
renderElement('span', `${prefix}__cta-button`, content.ctaText),
|
18412
|
+
]
|
18413
|
+
: [];
|
18414
|
+
return `
|
18415
|
+
${importFonts()}
|
18416
|
+
<div class="${prefix}">
|
18417
|
+
<div class="${prefix}__content ${prefix}__text-block--${textBlockPosition} ${prefix}__text-block-mobile--${textBlockPosition}">
|
18418
|
+
<div class="${prefix}__image"></div>
|
18419
|
+
<div class="${prefix}__text">
|
18420
|
+
<div class="${prefix}__text-container">
|
18421
|
+
${elements.join('')}
|
18422
|
+
</div>
|
18423
|
+
</div>
|
18424
|
+
</div>
|
18425
|
+
</div>
|
18426
|
+
`;
|
18427
|
+
}
|
18428
|
+
styles() {
|
18429
|
+
const { headerColor = '#212121', textColor = '#616161', backgroundColor = '#f7f5f3', ctaTextColor = '#b5914a', primaryImage, mobilePrimaryImage = primaryImage, } = this._data;
|
18430
|
+
const prefix = this._config.prefix;
|
18431
|
+
return `
|
18432
|
+
.${prefix} {
|
18433
|
+
width: 100%;
|
18434
|
+
height: 100%;
|
18435
|
+
position: relative;
|
18436
|
+
border-radius: 5px;
|
18437
|
+
}
|
18438
|
+
|
18439
|
+
.${prefix}__content {
|
18440
|
+
width: 100%;
|
18441
|
+
height: 100%;
|
18442
|
+
display: flex;
|
18443
|
+
flex-direction: column;
|
18444
|
+
overflow: hidden;
|
18445
|
+
border-radius: 5px;
|
18446
|
+
}
|
18447
|
+
|
18448
|
+
.${prefix}__image {
|
18449
|
+
width: 100%;
|
18450
|
+
height: 50%;
|
18451
|
+
background-image: url("${this._isMobileDevice ? mobilePrimaryImage : primaryImage}");
|
18452
|
+
background-position: center;
|
18453
|
+
background-repeat: no-repeat;
|
18454
|
+
background-size: cover;
|
18455
|
+
min-width: 100px;
|
18456
|
+
overflow: hidden;
|
18457
|
+
}
|
18458
|
+
|
18459
|
+
.${prefix}__text {
|
18460
|
+
background-color: ${backgroundColor};
|
18461
|
+
display: flex;
|
18462
|
+
flex-direction: column;
|
18463
|
+
justify-content: center;
|
18464
|
+
width: 100%;
|
18465
|
+
height: 50%;
|
18466
|
+
padding: 16px;
|
18467
|
+
box-sizing: border-box;
|
18468
|
+
}
|
18469
|
+
|
18470
|
+
.${prefix}__text-container {
|
18471
|
+
display: flex;
|
18472
|
+
flex-direction: column;
|
18473
|
+
gap: 5px;
|
18474
|
+
height: 100%;
|
18475
|
+
justify-content: space-between;
|
18476
|
+
}
|
18477
|
+
|
18478
|
+
.${prefix}__preHeader {
|
18479
|
+
margin: 0;
|
18480
|
+
color:${headerColor};
|
18481
|
+
font-family: "Cormorant", system-ui;
|
18482
|
+
font-size: ${this._isMobileDevice ? '8px' : '9px'};
|
18483
|
+
line-height: normal;
|
18484
|
+
letter-spacing: 0.8px;
|
18485
|
+
}
|
18486
|
+
|
18487
|
+
.${prefix}__header {
|
18488
|
+
margin: 0;
|
18489
|
+
color: ${headerColor};
|
18490
|
+
font-family: "Cormorant", system-ui;
|
18491
|
+
font-weight: bold;
|
18492
|
+
font-size: ${this._isMobileDevice ? '16px' : '18px'};
|
18493
|
+
line-height: 24px;
|
18494
|
+
position: relative;
|
18495
|
+
padding-bottom: 10px;
|
18496
|
+
margin-bottom: 5px;
|
18497
|
+
}
|
18498
|
+
|
18499
|
+
.${prefix}__header::after {
|
18500
|
+
content: '';
|
18501
|
+
position: absolute;
|
18502
|
+
bottom: 0;
|
18503
|
+
left: 0;
|
18504
|
+
width: 76px;
|
18505
|
+
height: 1px;
|
18506
|
+
background-color: ${ctaTextColor};
|
18507
|
+
}
|
18508
|
+
|
18509
|
+
.${prefix}__description {
|
18510
|
+
color: ${textColor};
|
18511
|
+
margin: 0;
|
18512
|
+
font-size: 10px;
|
18513
|
+
font-family: "Source Sans 3", system-ui;
|
18514
|
+
font-weight: 400;
|
18515
|
+
}
|
18516
|
+
|
18517
|
+
.${prefix}__cta-button {
|
18518
|
+
color: ${ctaTextColor};
|
18519
|
+
font-size: ${this._isMobileDevice ? '10px' : '12px'};
|
18520
|
+
font-weight: 700;
|
18521
|
+
font-family: "Source Sans 3", system-ui;
|
18522
|
+
border: none;
|
18523
|
+
cursor: pointer;
|
18524
|
+
transition: opacity 0.3s ease;
|
18525
|
+
display: inline-block;
|
18526
|
+
align-self: flex-end;
|
18527
|
+
text-decoration: none;
|
18528
|
+
margin-top: auto;
|
18529
|
+
}
|
18530
|
+
|
18531
|
+
.${prefix}__content:hover .${prefix}__cta-button {
|
18532
|
+
opacity: 0.8;
|
18533
|
+
}
|
18534
|
+
|
18535
|
+
@container (min-width: 768px) {
|
18536
|
+
.${prefix}__preHeader {
|
18537
|
+
font-size: 9px;
|
18538
|
+
}
|
18539
|
+
|
18540
|
+
.${prefix}__cta-button {
|
18541
|
+
font-size: 12px;
|
18542
|
+
}
|
18543
|
+
}
|
18544
|
+
|
18545
|
+
@container (min-width: 1024px) {
|
18546
|
+
.${prefix}__text {
|
18547
|
+
padding: 20px;
|
18548
|
+
}
|
18549
|
+
|
18550
|
+
.${prefix}__text-container {
|
18551
|
+
padding-right: 20px;
|
18552
|
+
}
|
18553
|
+
|
18554
|
+
.${prefix}__preHeader {
|
18555
|
+
font-size: 10px;
|
18556
|
+
}
|
18557
|
+
|
18558
|
+
.${prefix}__header {
|
18559
|
+
font-size: 18px;
|
18560
|
+
}
|
18561
|
+
|
18562
|
+
.${prefix}__description {
|
18563
|
+
font-size: 14px;
|
18564
|
+
}
|
18565
|
+
}
|
18566
|
+
|
18567
|
+
@container (min-width: 1280px) {
|
18568
|
+
.${prefix}__header {
|
18569
|
+
font-size: 24px;
|
18570
|
+
}
|
18571
|
+
}
|
18572
|
+
`;
|
18573
|
+
}
|
18574
|
+
get hasContent() {
|
18575
|
+
const { preHeader, mobilePreHeader, header, mobileHeader, description, mobileDescription, ctaText, mobileCtaText,
|
18576
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
18577
|
+
enableMobileTexts = true, } = this._data;
|
18578
|
+
const content = this._isMobileDevice && enableMobileTexts
|
18579
|
+
? {
|
18580
|
+
preHeader: mobilePreHeader,
|
18183
18581
|
header: mobileHeader,
|
18184
18582
|
description: mobileDescription,
|
18185
18583
|
ctaText: mobileCtaText,
|
@@ -19000,13 +19398,13 @@ class RbInTextSE extends BaseSpotComponent {
|
|
19000
19398
|
`;
|
19001
19399
|
}
|
19002
19400
|
styles() {
|
19003
|
-
const { textColor = '#212121', backgroundColor = 'transparent' } = this._data;
|
19401
|
+
const { textColor = '#212121', backgroundColor = 'transparent', textBlockPosition = ENUM_TEXT_BLOCK_POSITION.LEFT, } = this._data;
|
19004
19402
|
const prefix = this._config.prefix;
|
19005
19403
|
return `
|
19006
19404
|
.${prefix} {
|
19007
19405
|
display: block;
|
19008
19406
|
cursor: pointer;
|
19009
|
-
|
19407
|
+
width: 100%;
|
19010
19408
|
padding: 0;
|
19011
19409
|
background-color: ${backgroundColor};
|
19012
19410
|
}
|
@@ -19017,6 +19415,7 @@ class RbInTextSE extends BaseSpotComponent {
|
|
19017
19415
|
color: ${textColor};
|
19018
19416
|
font-family: "Source Sans 3", system-ui;
|
19019
19417
|
margin: 0;
|
19418
|
+
text-align: ${textBlockPosition};
|
19020
19419
|
}
|
19021
19420
|
.${prefix}__header:hover {
|
19022
19421
|
color: #b5914a;
|
@@ -20512,6 +20911,12 @@ class SpotTemplateService {
|
|
20512
20911
|
[RMN_SPOT_TYPE.RB_CAROUSEL_HORIZONTAL_INFO_CARD]: {
|
20513
20912
|
rbCarouselHorizontalInfoCard: RbCarouselHorizontalInfoCardSE,
|
20514
20913
|
},
|
20914
|
+
[RMN_SPOT_TYPE.RB_CAROUSEL_VERTICAL_SMALL_IMAGE_INFO_CARD]: {
|
20915
|
+
rbCarouselVerticalSmallImageInfoCard: RbCarouselVerticalSmallImageInfoCardSE,
|
20916
|
+
},
|
20917
|
+
[RMN_SPOT_TYPE.RB_CAROUSEL_HORIZONTAL_SHORT_INFO_CARD]: {
|
20918
|
+
rbCarouselHorizontalShortInfoCard: RbCarouselHorizontalShortInfoCardSE,
|
20919
|
+
},
|
20515
20920
|
};
|
20516
20921
|
}
|
20517
20922
|
initializeIabTemplates() {
|
package/dist/types/enums.d.ts
CHANGED
@@ -14,6 +14,8 @@ export declare enum RMN_SPOT_TYPE {
|
|
14
14
|
RB_VIDEO_PLAYER = "rbVideoPlayer",
|
15
15
|
RB_IN_TEXT = "rbInText",
|
16
16
|
RB_CAROUSEL_HORIZONTAL_INFO_CARD = "rbCarouselHorizontalInfoCard",
|
17
|
+
RB_CAROUSEL_VERTICAL_SMALL_IMAGE_INFO_CARD = "rbCarouselVerticalSmallImageInfoCard",
|
18
|
+
RB_CAROUSEL_HORIZONTAL_SHORT_INFO_CARD = "rbCarouselHorizontalShortInfoCard",
|
17
19
|
BILLBOARD = "billboard",
|
18
20
|
LARGE_RECTANGLE = "largeRectangle",
|
19
21
|
VERTICAL_RECTANGLE = "verticalRectangle",
|
@@ -82,6 +84,7 @@ export declare enum ENUM_TEXT_BLOCK_POSITION {
|
|
82
84
|
TOP = "top",
|
83
85
|
BOTTOM = "bottom",
|
84
86
|
MIDDLE = "middle",
|
87
|
+
CENTER = "center",
|
85
88
|
TOP_LEFT = "top-left",
|
86
89
|
TOP_RIGHT = "top-right",
|
87
90
|
BOTTOM_LEFT = "bottom-left",
|
@@ -58,6 +58,7 @@ export interface IInTextRbSpot extends ISpotTemplateBaseData {
|
|
58
58
|
mobileHeader?: string;
|
59
59
|
textColor?: string;
|
60
60
|
backgroundColor?: string;
|
61
|
+
textBlockPosition?: ENUM_TEXT_BLOCK_POSITION.LEFT | ENUM_TEXT_BLOCK_POSITION.CENTER | ENUM_TEXT_BLOCK_POSITION.RIGHT;
|
61
62
|
}
|
62
63
|
export interface ILargeCategoryImageToutRbSpot extends ISpotTemplateBaseData {
|
63
64
|
header?: string;
|
@@ -170,3 +171,37 @@ export interface ICarouselHorizontalInfoCardRbSpot extends ISpotTemplateBaseData
|
|
170
171
|
textBlockPosition?: ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT | ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT;
|
171
172
|
mobileTextBlockPosition?: ENUM_TEXT_BLOCK_POSITION.TOP | ENUM_TEXT_BLOCK_POSITION.BOTTOM;
|
172
173
|
}
|
174
|
+
export interface ICarouselVerticalSmallImageInfoCardRbSpot extends ISpotTemplateBaseData {
|
175
|
+
preHeader?: string;
|
176
|
+
header?: string;
|
177
|
+
description?: string;
|
178
|
+
ctaText?: string;
|
179
|
+
mobilePreHeader?: string;
|
180
|
+
mobileHeader?: string;
|
181
|
+
mobileDescription?: string;
|
182
|
+
mobileCtaText?: string;
|
183
|
+
headerColor?: string;
|
184
|
+
textColor?: string;
|
185
|
+
backgroundColor?: string;
|
186
|
+
ctaTextColor?: string;
|
187
|
+
primaryImage: string;
|
188
|
+
mobilePrimaryImage?: string;
|
189
|
+
textBlockPosition?: ENUM_TEXT_BLOCK_POSITION.TOP | ENUM_TEXT_BLOCK_POSITION.BOTTOM;
|
190
|
+
}
|
191
|
+
export interface ICarouselHorizontalShortInfoCardRbSpot extends ISpotTemplateBaseData {
|
192
|
+
preHeader?: string;
|
193
|
+
header?: string;
|
194
|
+
description?: string;
|
195
|
+
ctaText?: string;
|
196
|
+
mobilePreHeader?: string;
|
197
|
+
mobileHeader?: string;
|
198
|
+
mobileDescription?: string;
|
199
|
+
mobileCtaText?: string;
|
200
|
+
headerColor?: string;
|
201
|
+
textColor?: string;
|
202
|
+
backgroundColor?: string;
|
203
|
+
ctaTextColor?: string;
|
204
|
+
primaryImage: string;
|
205
|
+
mobilePrimaryImage?: string;
|
206
|
+
textBlockPosition?: ENUM_TEXT_BLOCK_POSITION.TOP | ENUM_TEXT_BLOCK_POSITION.BOTTOM;
|
207
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { BaseSpotComponent } from 'modules/element/component/spot';
|
2
|
+
import type { ICarouselHorizontalShortInfoCardRbSpot } from '../rb-template.interface';
|
3
|
+
export declare class RbCarouselHorizontalShortInfoCardSE extends BaseSpotComponent<ICarouselHorizontalShortInfoCardRbSpot> {
|
4
|
+
protected reRenderOnDeviceChange: boolean;
|
5
|
+
constructor();
|
6
|
+
protected template(): string;
|
7
|
+
protected styles(): string;
|
8
|
+
private get hasContent();
|
9
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { BaseSpotComponent } from 'modules/element/component/spot';
|
2
|
+
import type { ICarouselVerticalSmallImageInfoCardRbSpot } from '../rb-template.interface';
|
3
|
+
export declare class RbCarouselVerticalSmallImageInfoCardSE extends BaseSpotComponent<ICarouselVerticalSmallImageInfoCardRbSpot> {
|
4
|
+
protected reRenderOnDeviceChange: boolean;
|
5
|
+
constructor();
|
6
|
+
protected template(): string;
|
7
|
+
protected styles(): string;
|
8
|
+
private get hasContent();
|
9
|
+
}
|
@@ -1,4 +1,6 @@
|
|
1
1
|
export * from './carousel-horizontal-info-card.template';
|
2
|
+
export * from './carousel-horizontal-short-info-card.template';
|
3
|
+
export * from './carousel-vertical-small-image-info-card.template';
|
2
4
|
export * from './collection-banner-without-text-block.template';
|
3
5
|
export * from './homepage-hero-full-image.template';
|
4
6
|
export * from './homepage-hero-three-tile.template';
|
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "@liquidcommercedev/rmn-sdk",
|
3
3
|
"description": "LiquidCommerce RMN SDK",
|
4
4
|
"author": "LiquidCommerce Tech",
|
5
|
-
"version": "1.5.0-beta.
|
5
|
+
"version": "1.5.0-beta.48",
|
6
6
|
"homepage": "https://docs.liquidcommerce.co/rmn-sdk",
|
7
7
|
"main": "./dist/index.cjs",
|
8
8
|
"module": "./dist/index.esm.js",
|