pds-dev-kit-web 2.2.86 → 2.2.88

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.
@@ -9,14 +9,22 @@ function buildCascadedColors(lowLevel, highLevel, override) {
9
9
  if (override === void 0) { override = {}; }
10
10
  return Object.keys(highLevel).reduce(function (acc, key) {
11
11
  var keyInLowLevelColors = highLevel[key];
12
+ var hasOpacity = keyInLowLevelColors.indexOf('/') !== -1;
12
13
  var colorValue;
13
- if (keyInLowLevelColors.indexOf('/') !== -1) {
14
- colorValue = override[key]
15
- ? override[key]
16
- : lowLevel[keyInLowLevelColors.split('/')[0]] + lowLevel[keyInLowLevelColors.split('/')[1]];
14
+ if (hasOpacity) {
15
+ var _a = keyInLowLevelColors.split('/'), colorKey = _a[0], opacity = _a[1];
16
+ var isUserBrandPrimaryColor = key.includes('usr_brand_primary');
17
+ if (isUserBrandPrimaryColor) {
18
+ colorValue = override.usr_brand_primary
19
+ ? override.usr_brand_primary + lowLevel[opacity]
20
+ : lowLevel[colorKey] + lowLevel[opacity];
21
+ }
22
+ else {
23
+ colorValue = override[key] || lowLevel[colorKey] + lowLevel[opacity];
24
+ }
17
25
  }
18
26
  else {
19
- colorValue = override[key] ? override[key] : lowLevel[keyInLowLevelColors];
27
+ colorValue = override[key] || lowLevel[keyInLowLevelColors];
20
28
  }
21
29
  acc[key] = colorValue;
22
30
  return acc;
@@ -54,8 +54,9 @@ function YouTubeIframe(_a) {
54
54
  var CUED = 5;
55
55
  var stateCode = event.data;
56
56
  switch (stateCode) {
57
- case UNSTARTED:
58
57
  case BUFFERING:
58
+ break;
59
+ case UNSTARTED:
59
60
  case CUED:
60
61
  setIsYoutubeLoading(true);
61
62
  break;
@@ -74,8 +75,11 @@ function YouTubeIframe(_a) {
74
75
  var restartVideoSection = function () {
75
76
  event.target.seekTo(section.start);
76
77
  };
77
- var id_1 = setTimeout(restartVideoSection, duration * 1000);
78
- setTimeoutId(id_1);
78
+ var timeout = duration * 1000 - 1000;
79
+ if (timeout > 0) {
80
+ var id_1 = setTimeout(restartVideoSection, duration * 1000 - 1000);
81
+ setTimeoutId(id_1);
82
+ }
79
83
  }
80
84
  break;
81
85
  }
@@ -1,4 +1,5 @@
1
1
  import type { ISection } from './types';
2
+ export declare const youtubeBgSection: any;
2
3
  export declare const samplePageIntroSection: ISection;
3
4
  export declare const samplePageContentsCarouselSection: ISection;
4
5
  export declare const samplePageIntroSection2: ISection;