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