@clickview/lite 0.0.24-rc.4 → 0.0.24

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.
Files changed (194) hide show
  1. package/dist/css/11.chunk.css.map +1 -1
  2. package/dist/css/12.chunk.css.map +1 -1
  3. package/dist/css/13.chunk.css.map +1 -1
  4. package/dist/css/14.chunk.css.map +1 -1
  5. package/dist/css/15.chunk.css.map +1 -1
  6. package/dist/css/16.chunk.css.map +1 -1
  7. package/dist/css/17.chunk.css.map +1 -1
  8. package/dist/css/18.chunk.css.map +1 -1
  9. package/dist/css/20.chunk.css.map +1 -1
  10. package/dist/css/29.chunk.css.map +1 -1
  11. package/dist/css/3.chunk.css.map +1 -1
  12. package/dist/css/30.chunk.css.map +1 -1
  13. package/dist/css/31.chunk.css.map +1 -1
  14. package/dist/css/33.chunk.css.map +1 -1
  15. package/dist/css/38.chunk.css +11 -34
  16. package/dist/css/38.chunk.css.map +1 -1
  17. package/dist/css/4.chunk.css +3 -3
  18. package/dist/css/44.chunk.css +11 -3
  19. package/dist/css/44.chunk.css.map +1 -1
  20. package/dist/css/45.chunk.css +38 -0
  21. package/dist/css/45.chunk.css.map +1 -0
  22. package/dist/css/5.chunk.css.map +1 -1
  23. package/dist/css/52.chunk.css +52 -0
  24. package/dist/css/52.chunk.css.map +1 -0
  25. package/dist/css/59.chunk.css +14 -0
  26. package/dist/css/59.chunk.css.map +1 -0
  27. package/dist/css/6.chunk.css.map +1 -1
  28. package/dist/css/60.chunk.css +43 -0
  29. package/dist/css/60.chunk.css.map +1 -0
  30. package/dist/en.json +1 -1
  31. package/dist/libs/shared/src/components/curriculum-links/CurriculumLinks.d.ts +9 -0
  32. package/dist/libs/shared/src/components/widgets/items/resource-widget-item/ResourceWidgetItem.d.ts +12 -0
  33. package/dist/libs/shared/src/enums/CurriculumType.d.ts +6 -0
  34. package/dist/libs/shared/src/flight-requests/ClassificationRequests.d.ts +1 -0
  35. package/dist/libs/shared/src/flight-requests/ResourceRequests.d.ts +11 -0
  36. package/dist/libs/shared/src/interfaces/collections/SubtitleCollection.d.ts +3 -0
  37. package/dist/libs/shared/src/interfaces/models/Curriculum.d.ts +14 -0
  38. package/dist/libs/shared/src/interfaces/models/FileUpload.d.ts +20 -0
  39. package/dist/libs/shared/src/interfaces/models/Language.d.ts +4 -0
  40. package/dist/libs/shared/src/interfaces/models/Pdf.d.ts +4 -0
  41. package/dist/libs/shared/src/interfaces/models/Subtitle.d.ts +7 -0
  42. package/dist/libs/shared/src/interfaces/models/index.d.ts +1 -0
  43. package/dist/libs/shared/src/interfaces/requests/UpdateObjectChannel.d.ts +3 -0
  44. package/dist/libs/shared/src/interfaces/requests/UpdateObjectRating.d.ts +3 -0
  45. package/dist/libs/shared/src/interfaces/requests/UpdateResourceRequest.d.ts +3 -0
  46. package/dist/projects/lite/src/app.d.ts +1 -0
  47. package/dist/projects/lite/src/shared/components/play-page/PlayPage.d.ts +2 -1
  48. package/dist/projects/lite/src/shared/components/synopsis/Synopsis.d.ts +3 -1
  49. package/dist/projects/lite/src/shared/components/video-details/VideoDetails.d.ts +2 -0
  50. package/dist/projects/lite/src/shared/constants/MinimumGlanceHeight.d.ts +1 -0
  51. package/dist/projects/lite/src/shared/views/preview-pdf/PreviewPdfView.d.ts +7 -0
  52. package/dist/scripts/0-b02efe11fb.chunk.js +1 -0
  53. package/dist/scripts/1-4f19a5caea.chunk.js +17 -0
  54. package/dist/scripts/1.chunk.js.map +1 -1
  55. package/dist/scripts/10.chunk.js +484 -1203
  56. package/dist/scripts/10.chunk.js.map +1 -1
  57. package/dist/scripts/11-32e30d10ce.chunk.js +1 -0
  58. package/dist/scripts/11.chunk.js +289 -1388
  59. package/dist/scripts/11.chunk.js.map +1 -1
  60. package/dist/scripts/12-72a5373486.chunk.js +1 -0
  61. package/dist/scripts/12.chunk.js +1371 -283
  62. package/dist/scripts/12.chunk.js.map +1 -1
  63. package/dist/scripts/13-1cd85ad3ee.chunk.js +1 -0
  64. package/dist/scripts/13.chunk.js +361 -394
  65. package/dist/scripts/13.chunk.js.map +1 -1
  66. package/dist/scripts/14-3d60b8ee85.chunk.js +1 -0
  67. package/dist/scripts/14.chunk.js +793 -332
  68. package/dist/scripts/14.chunk.js.map +1 -1
  69. package/dist/scripts/15-90226fb996.chunk.js +1 -0
  70. package/dist/scripts/15.chunk.js +295 -214
  71. package/dist/scripts/15.chunk.js.map +1 -1
  72. package/dist/scripts/16-913b2535ea.chunk.js +1 -0
  73. package/dist/scripts/16.chunk.js +530 -434
  74. package/dist/scripts/16.chunk.js.map +1 -1
  75. package/dist/scripts/17-d6c19ccb60.chunk.js +1 -0
  76. package/dist/scripts/17.chunk.js +296 -170
  77. package/dist/scripts/17.chunk.js.map +1 -1
  78. package/dist/scripts/18-33efcac0c6.chunk.js +1 -0
  79. package/dist/scripts/18.chunk.js +265 -199
  80. package/dist/scripts/18.chunk.js.map +1 -1
  81. package/dist/scripts/19-2380200cfb.chunk.js +1 -0
  82. package/dist/scripts/19.chunk.js +7 -3
  83. package/dist/scripts/19.chunk.js.map +1 -1
  84. package/dist/scripts/2-53e37c2047.chunk.js +1 -0
  85. package/dist/scripts/2.chunk.js +18673 -622
  86. package/dist/scripts/2.chunk.js.map +1 -1
  87. package/dist/scripts/20-ca85f0514e.chunk.js +1 -0
  88. package/dist/scripts/20.chunk.js +1824 -221
  89. package/dist/scripts/20.chunk.js.map +1 -1
  90. package/dist/scripts/21-ef4a226771.chunk.js +1 -0
  91. package/dist/scripts/22-99c04e164f.chunk.js +1 -0
  92. package/dist/scripts/23-028eb81a43.chunk.js +1 -0
  93. package/dist/scripts/23.chunk.js +1 -1
  94. package/dist/scripts/23.chunk.js.map +1 -1
  95. package/dist/scripts/24-68f8df3eca.chunk.js +1 -0
  96. package/dist/scripts/24.chunk.js.map +1 -1
  97. package/dist/scripts/25-7ad07f87d4.chunk.js +1 -0
  98. package/dist/scripts/25.chunk.js.map +1 -1
  99. package/dist/scripts/26-f3dcacfe4f.chunk.js +1 -0
  100. package/dist/scripts/26.chunk.js +1 -1
  101. package/dist/scripts/26.chunk.js.map +1 -1
  102. package/dist/scripts/27-e844268f38.chunk.js +1 -0
  103. package/dist/scripts/28-853bc5de1f.chunk.js +1 -0
  104. package/dist/scripts/29-b164ecafe9.chunk.js +1 -0
  105. package/dist/scripts/29.chunk.js +435 -500
  106. package/dist/scripts/29.chunk.js.map +1 -1
  107. package/dist/scripts/3-a1bd8c9016.chunk.js +7 -0
  108. package/dist/scripts/3.chunk.js +625 -18676
  109. package/dist/scripts/3.chunk.js.map +1 -1
  110. package/dist/scripts/30-2cfcf52ea1.chunk.js +1 -0
  111. package/dist/scripts/30.chunk.js +634 -429
  112. package/dist/scripts/30.chunk.js.map +1 -1
  113. package/dist/scripts/31-e6a8291d2f.chunk.js +1 -0
  114. package/dist/scripts/31.chunk.js +371 -670
  115. package/dist/scripts/31.chunk.js.map +1 -1
  116. package/dist/scripts/32-7030dc98ed.chunk.js +1 -0
  117. package/dist/scripts/32.chunk.js +27 -54
  118. package/dist/scripts/32.chunk.js.map +1 -1
  119. package/dist/scripts/33-47b0ac90bd.chunk.js +1 -0
  120. package/dist/scripts/33.chunk.js +700 -312
  121. package/dist/scripts/33.chunk.js.map +1 -1
  122. package/dist/scripts/34-2de007b628.chunk.js +1 -0
  123. package/dist/scripts/34.chunk.js +3 -3
  124. package/dist/scripts/34.chunk.js.map +1 -1
  125. package/dist/scripts/35-d2fb66920b.chunk.js +1 -0
  126. package/dist/scripts/36-bc85df33de.chunk.js +1 -0
  127. package/dist/scripts/36.chunk.js.map +1 -1
  128. package/dist/scripts/37-e26652840b.chunk.js +1 -0
  129. package/dist/scripts/37.chunk.js +288 -464
  130. package/dist/scripts/37.chunk.js.map +1 -1
  131. package/dist/scripts/38-0b6a6b9619.chunk.js +1 -0
  132. package/dist/scripts/39-6549f483c6.chunk.js +1 -0
  133. package/dist/scripts/39.chunk.js +1 -1
  134. package/dist/scripts/39.chunk.js.map +1 -1
  135. package/dist/scripts/4-9e83a22d7a.chunk.js +1 -0
  136. package/dist/scripts/4.chunk.js +259 -1021
  137. package/dist/scripts/4.chunk.js.map +1 -1
  138. package/dist/scripts/40-8e6e9d285f.chunk.js +1 -0
  139. package/dist/scripts/41-2b44a2e66f.chunk.js +1 -0
  140. package/dist/scripts/42-9e75f420d8.chunk.js +1 -0
  141. package/dist/scripts/42.chunk.js.map +1 -1
  142. package/dist/scripts/43-1141245420.chunk.js +1 -0
  143. package/dist/scripts/44-9bc4201e0f.chunk.js +1 -0
  144. package/dist/scripts/45-5ded8ca3db.chunk.js +1 -0
  145. package/dist/scripts/46-2afd7ee1fb.chunk.js +1 -0
  146. package/dist/scripts/47-ab30686138.chunk.js +1 -0
  147. package/dist/scripts/48-d9cd99d55e.chunk.js +1 -0
  148. package/dist/scripts/49-f43a08f90b.chunk.js +1 -0
  149. package/dist/scripts/5-974660e17b.chunk.js +1 -0
  150. package/dist/scripts/5.chunk.js +1017 -259
  151. package/dist/scripts/5.chunk.js.map +1 -1
  152. package/dist/scripts/50-af699c531e.chunk.js +1 -0
  153. package/dist/scripts/51-aa7b835007.chunk.js +1 -0
  154. package/dist/scripts/52-805f7fe04d.chunk.js +1 -0
  155. package/dist/scripts/53-d75ca53045.chunk.js +1 -0
  156. package/dist/scripts/54-2e75bad46f.chunk.js +1 -0
  157. package/dist/scripts/55-ed637c4847.chunk.js +1 -0
  158. package/dist/scripts/55.chunk.js.map +1 -1
  159. package/dist/scripts/56-2ed3b5764b.chunk.js +1 -0
  160. package/dist/scripts/57-e51101c8a1.chunk.js +1 -0
  161. package/dist/scripts/58-9a32a6fb2d.chunk.js +1 -0
  162. package/dist/scripts/59-da8a8c97a9.chunk.js +1 -0
  163. package/dist/scripts/6-6ac39034e0.chunk.js +1 -0
  164. package/dist/scripts/6.chunk.js +291 -1250
  165. package/dist/scripts/6.chunk.js.map +1 -1
  166. package/dist/scripts/60-5713de53e2.chunk.js +1 -0
  167. package/dist/scripts/61-7d2ad17963.chunk.js +1 -0
  168. package/dist/scripts/62-a0a69501ac.chunk.js +1 -0
  169. package/dist/scripts/63-c921b87f3f.chunk.js +1 -0
  170. package/dist/scripts/64-87c1cf6985.chunk.js +1 -0
  171. package/dist/scripts/65-2322082836.chunk.js +1 -0
  172. package/dist/scripts/66-6d5356f6ce.chunk.js +1 -0
  173. package/dist/scripts/67-2e0d661c52.chunk.js +1 -0
  174. package/dist/scripts/7-5ac5be64dd.chunk.js +1 -0
  175. package/dist/scripts/7.chunk.js +1 -1
  176. package/dist/scripts/76.chunk.js +3 -3
  177. package/dist/scripts/76.chunk.js.map +1 -1
  178. package/dist/scripts/79.chunk.js +931 -347
  179. package/dist/scripts/79.chunk.js.map +1 -1
  180. package/dist/scripts/8-95563e3d36.chunk.js +1 -0
  181. package/dist/scripts/8.chunk.js +14 -920
  182. package/dist/scripts/8.chunk.js.map +1 -1
  183. package/dist/scripts/80.chunk.js +22 -313
  184. package/dist/scripts/80.chunk.js.map +1 -1
  185. package/dist/scripts/9.chunk.js +320 -17
  186. package/dist/scripts/9.chunk.js.map +1 -1
  187. package/dist/scripts/bundle-9ed1e126dd.min.js +15 -0
  188. package/dist/scripts/bundle.js +147 -121
  189. package/dist/scripts/bundle.js.map +1 -1
  190. package/dist/scripts/bundles.json +2 -2
  191. package/dist/scripts/pdf.worker.entry.worker.js +46239 -0
  192. package/dist/scripts/pdf.worker.entry.worker.js.map +1 -0
  193. package/dist/scripts/polyfills-2723daf478.min.js +1 -0
  194. package/package.json +2 -2
@@ -1,331 +1,1021 @@
1
1
  (window["webpackJsonp_clickview_lite"] = window["webpackJsonp_clickview_lite"] || []).push([[5],{
2
2
 
3
- /***/ "../../libs/shared/src/components/forms/form-buttons/FormButtons.tsx":
4
- /*!***************************************************************************************************************!*\
5
- !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/forms/form-buttons/FormButtons.tsx ***!
6
- \***************************************************************************************************************/
7
- /*! exports provided: FormButtons */
3
+ /***/ "../../libs/shared/src/components/widgets/fixed-widget/FixedWidget.tsx":
4
+ /*!*****************************************************************************************************************!*\
5
+ !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/widgets/fixed-widget/FixedWidget.tsx ***!
6
+ \*****************************************************************************************************************/
7
+ /*! exports provided: FixedWidget */
8
8
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
9
9
 
10
10
  "use strict";
11
11
  __webpack_require__.r(__webpack_exports__);
12
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormButtons", function() { return FormButtons; });
12
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FixedWidget", function() { return Memoized; });
13
13
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
14
14
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
15
- /* harmony import */ var formik__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! formik */ "../../../node_modules/formik/dist/formik.esm.js");
16
- /* harmony import */ var _hooks_UseCanSubmitForm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../hooks/UseCanSubmitForm */ "../../libs/shared/src/hooks/UseCanSubmitForm.ts");
17
- /* harmony import */ var _spinner_button_SpinnerButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../spinner-button/SpinnerButton */ "../../libs/shared/src/components/spinner-button/SpinnerButton.tsx");
18
- /* harmony import */ var _text_Text__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../text/Text */ "../../libs/shared/src/components/text/Text.tsx");
15
+ /* harmony import */ var _common_src_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../common/src/backbone/services/LanguageService */ "../../libs/common/src/backbone/services/LanguageService.tsx");
16
+ /* harmony import */ var _enums_CssMeasurement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../enums/CssMeasurement */ "../../libs/shared/src/enums/CssMeasurement.ts");
17
+ /* harmony import */ var _widget_button_WidgetButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../widget-button/WidgetButton */ "../../libs/shared/src/components/widgets/widget-button/WidgetButton.tsx");
18
+ /* harmony import */ var _sliding_list_SlidingListContainer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../sliding-list/SlidingListContainer */ "../../libs/shared/src/components/widgets/sliding-list/SlidingListContainer.tsx");
19
+ /* harmony import */ var _hooks_UseGetMediaQueryString__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../hooks/UseGetMediaQueryString */ "../../libs/shared/src/hooks/UseGetMediaQueryString.ts");
20
+ /* harmony import */ var _hooks_UseHover__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../hooks/UseHover */ "../../libs/shared/src/hooks/UseHover.ts");
21
+ /* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../interfaces */ "../../libs/shared/src/interfaces/index.ts");
22
+ /* harmony import */ var _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../enums/WidgetInteraction */ "../../libs/shared/src/enums/WidgetInteraction.ts");
23
+ /* harmony import */ var _hooks_UseLazyLoad__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../hooks/UseLazyLoad */ "../../libs/shared/src/hooks/UseLazyLoad.ts");
24
+ /* harmony import */ var _app_link_AppLink__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../app-link/AppLink */ "../../libs/shared/src/components/app-link/AppLink.tsx");
25
+ /* harmony import */ var _svg_container_SvgContainer__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../svg-container/SvgContainer */ "../../libs/shared/src/components/svg-container/SvgContainer.tsx");
26
+ /* harmony import */ var _utils_SvgHelper__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../utils/SvgHelper */ "../../libs/shared/src/utils/SvgHelper.ts");
27
+ /* harmony import */ var _enums_ThumbnailSize__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../enums/ThumbnailSize */ "../../libs/shared/src/enums/ThumbnailSize.ts");
28
+ /* harmony import */ var _utils_WidgetHelper__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../utils/WidgetHelper */ "../../libs/shared/src/utils/WidgetHelper.ts");
29
+ /* harmony import */ var _analytics_src_AnalyticsHelper__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../../../analytics/src/AnalyticsHelper */ "../../libs/analytics/src/AnalyticsHelper.ts");
30
+ /* harmony import */ var _PartialFixedWidget__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./PartialFixedWidget */ "../../libs/shared/src/components/widgets/fixed-widget/PartialFixedWidget.tsx");
31
+ /* harmony import */ var _FixedWidgetUtils__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./FixedWidgetUtils */ "../../libs/shared/src/components/widgets/fixed-widget/FixedWidgetUtils.ts");
32
+ /* harmony import */ var _FixedWidgetReducer__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./FixedWidgetReducer */ "../../libs/shared/src/components/widgets/fixed-widget/FixedWidgetReducer.tsx");
33
+ /* harmony import */ var _fixed_widget_scss__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./fixed-widget.scss */ "../../libs/shared/src/components/widgets/fixed-widget/fixed-widget.scss");
34
+ /* harmony import */ var _fixed_widget_scss__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_fixed_widget_scss__WEBPACK_IMPORTED_MODULE_19__);
35
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
36
+
37
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
38
+
39
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
40
+
41
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
42
+
43
+ function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
44
+
45
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
46
+
47
+
48
+
49
+
19
50
 
20
51
 
21
52
 
22
53
 
23
54
 
24
- var namespace = 'shared.formButtons';
25
- var ENTER_KEY_CODE = 13;
26
- function FormButtons(props) {
27
- var formikProps = Object(formik__WEBPACK_IMPORTED_MODULE_1__["useFormikContext"])();
28
- var canSubmit = Object(_hooks_UseCanSubmitForm__WEBPACK_IMPORTED_MODULE_2__["useCanSubmitForm"])(formikProps);
29
- /**
30
- * This hook listens to "Enter" keypress events, and submits the form if there
31
- * are no errors. This prevents any edge cases where submitting doesn't work on
32
- * Enter normally, such as when a custom component is in focus.
33
- */
34
55
 
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+ var namespace = 'shared.fixedWidget';
68
+ FixedWidget.defaultProps = {
69
+ type: _interfaces__WEBPACK_IMPORTED_MODULE_7__["WidgetType"].Row,
70
+ minimumItemCount: 0,
71
+ paddingSize: '3'
72
+ };
73
+
74
+ function FixedWidget(props) {
75
+ var _a, _b, _c, _d, _e;
76
+
77
+ var widgetType = props.type,
78
+ _props$analyticsData = props.analyticsData,
79
+ analyticsData = _props$analyticsData === void 0 ? {} : _props$analyticsData; // Map deprecated resources tile widget type to row type
80
+
81
+ if (widgetType === _interfaces__WEBPACK_IMPORTED_MODULE_7__["WidgetType"].ResourcesTile) widgetType = _interfaces__WEBPACK_IMPORTED_MODULE_7__["WidgetType"].Row;
82
+
83
+ var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__["useState"](null),
84
+ _React$useState2 = _slicedToArray(_React$useState, 2),
85
+ initialTouchX = _React$useState2[0],
86
+ setInitialTouchX = _React$useState2[1];
87
+
88
+ var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_0__["useState"](null),
89
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
90
+ containerWidth = _React$useState4[0],
91
+ setContainerWidth = _React$useState4[1];
92
+
93
+ var _React$useState5 = react__WEBPACK_IMPORTED_MODULE_0__["useState"](0),
94
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
95
+ percentageDragged = _React$useState6[0],
96
+ setPercentageDragged = _React$useState6[1];
97
+
98
+ var _React$useReducer = react__WEBPACK_IMPORTED_MODULE_0__["useReducer"](_FixedWidgetReducer__WEBPACK_IMPORTED_MODULE_18__["FixedWidgetReducer"], _FixedWidgetReducer__WEBPACK_IMPORTED_MODULE_18__["initialWidgetState"], _FixedWidgetReducer__WEBPACK_IMPORTED_MODULE_18__["lazyWidgetInit"]),
99
+ _React$useReducer2 = _slicedToArray(_React$useReducer, 2),
100
+ state = _React$useReducer2[0],
101
+ dispatch = _React$useReducer2[1];
102
+
103
+ var containerRef = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](null);
104
+
105
+ var _useHover = Object(_hooks_UseHover__WEBPACK_IMPORTED_MODULE_6__["useHover"])(),
106
+ _useHover2 = _slicedToArray(_useHover, 2),
107
+ buttonsRef = _useHover2[0],
108
+ isHovering = _useHover2[1];
109
+
110
+ var _React$useState7 = react__WEBPACK_IMPORTED_MODULE_0__["useState"](false),
111
+ _React$useState8 = _slicedToArray(_React$useState7, 2),
112
+ isHoveringOnFarLeft = _React$useState8[0],
113
+ setIsHoveringOnFarLeft = _React$useState8[1];
114
+
115
+ var _React$useState9 = react__WEBPACK_IMPORTED_MODULE_0__["useState"](false),
116
+ _React$useState10 = _slicedToArray(_React$useState9, 2),
117
+ isHoveringOnFarRight = _React$useState10[0],
118
+ setIsHoveringOnFarRight = _React$useState10[1];
119
+
120
+ var _useLazyLoad = Object(_hooks_UseLazyLoad__WEBPACK_IMPORTED_MODULE_9__["useLazyLoad"])(!props.lazyLoad),
121
+ ref = _useLazyLoad.ref,
122
+ shouldFetch = _useLazyLoad.inView;
123
+
124
+ var mediaQuery = Object(_hooks_UseGetMediaQueryString__WEBPACK_IMPORTED_MODULE_5__["useGetMediaQueryString"])();
35
125
  react__WEBPACK_IMPORTED_MODULE_0__["useEffect"](function () {
36
- function onKeyPress(e) {
37
- if (e.keyCode !== ENTER_KEY_CODE || !canSubmit) return;
38
- formikProps.validateForm().then(function (errors) {
39
- if (!Object.keys(errors).length) formikProps.submitForm();
40
- });
126
+ dispatch({
127
+ type: _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_8__["WidgetInteraction"].Resize,
128
+ payload: {
129
+ mediaQuery: mediaQuery,
130
+ type: widgetType,
131
+ contents: props.contents,
132
+ collection: state.collection
133
+ }
134
+ });
135
+ }, [mediaQuery]);
136
+ react__WEBPACK_IMPORTED_MODULE_0__["useEffect"](function () {
137
+ if (!props.prefetched) return; // If the collection changes, re-initialize the widget state.
138
+
139
+ dispatch({
140
+ type: _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_8__["WidgetInteraction"].Init,
141
+ payload: {
142
+ mediaQuery: mediaQuery,
143
+ type: widgetType,
144
+ contents: props.contents,
145
+ collection: props.collection
146
+ }
147
+ });
148
+ }, [props.collection, props.prefetched]);
149
+ var response = Object(_FixedWidgetUtils__WEBPACK_IMPORTED_MODULE_17__["useFetchData"])(props, dispatch, mediaQuery, shouldFetch);
150
+
151
+ function onSetIsHovering(hovering, index) {
152
+ if (state.collection.length === state.viewableItems) {
153
+ setIsHoveringOnFarLeft(hovering);
154
+ setIsHoveringOnFarRight(hovering);
155
+ return;
156
+ } // This callback will hide the far left button if the user is hovering on the far left widget item.
157
+ // Same goes for the far right button & widget item.
158
+
159
+
160
+ if (index + 1 === state.collection.length) {
161
+ setIsHoveringOnFarRight(hovering);
162
+ return;
41
163
  }
42
164
 
43
- window.addEventListener('keypress', onKeyPress);
44
- return function () {
45
- return window.removeEventListener('keypress', onKeyPress);
46
- };
47
- }, [canSubmit]);
48
- var phraseKey = 'save';
49
- if (props.isNew) phraseKey = 'create';
50
- if (props.hasNext) phraseKey = 'next';
51
- return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_spinner_button_SpinnerButton__WEBPACK_IMPORTED_MODULE_3__["SpinnerButton"], {
52
- variant: props.variant || 'primary',
53
- showSpinner: formikProps.isSubmitting,
54
- type: 'submit',
55
- disabled: !canSubmit
56
- }, props.submitText ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, props.submitText) : react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_text_Text__WEBPACK_IMPORTED_MODULE_4__["Text"], {
57
- namespace: namespace,
58
- phrase: phraseKey
59
- }));
165
+ if (index === 0) {
166
+ setIsHoveringOnFarLeft(hovering);
167
+ return;
168
+ }
169
+
170
+ if ((index + 1 - state.offset % state.viewableItems) % state.viewableItems === 0) {
171
+ setIsHoveringOnFarRight(hovering);
172
+ return;
173
+ }
174
+
175
+ if ((index - state.offset % state.viewableItems) % state.viewableItems === 0) {
176
+ setIsHoveringOnFarLeft(hovering);
177
+ return;
178
+ }
179
+ }
180
+
181
+ var widgetContext = {
182
+ type: state.type,
183
+ size: state.currentSize,
184
+ collectionSize: state.collection.length,
185
+ contents: props.contents
186
+ };
187
+ var data = Object(_FixedWidgetUtils__WEBPACK_IMPORTED_MODULE_17__["formatData"])(props, ((_a = response) === null || _a === void 0 ? void 0 : _a.data) || props.collection);
188
+ if ((_b = response) === null || _b === void 0 ? void 0 : _b.hasError) return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null);
189
+
190
+ if (!props.prefetched && !((_c = response) === null || _c === void 0 ? void 0 : _c.statusCode)) {
191
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
192
+ ref: ref
193
+ }, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_PartialFixedWidget__WEBPACK_IMPORTED_MODULE_16__["PartialFixedWidget"], {
194
+ type: widgetType
195
+ }));
196
+ }
197
+
198
+ if (!state.collection.length || state.collection.length < props.minimumItemCount) return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null);
199
+ var WidgetItemComponent = props.childComponent;
200
+
201
+ var getSliderAnalyticsData = function getSliderAnalyticsData(type) {
202
+ var _a, _b;
203
+
204
+ return Object.assign({
205
+ id: (_a = data) === null || _a === void 0 ? void 0 : _a.id,
206
+ name: (_b = data) === null || _b === void 0 ? void 0 : _b.name,
207
+ direction: type === _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_8__["WidgetInteraction"].Next ? 'right' : 'left'
208
+ }, props.analyticsData);
209
+ };
210
+
211
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
212
+ className: "pb-3 px-".concat(props.paddingSize, " mx-n").concat(props.paddingSize, " overflow-hidden-x")
213
+ }, react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
214
+ className: 'mb-1'
215
+ }, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_app_link_AppLink__WEBPACK_IMPORTED_MODULE_10__["AppLink"], {
216
+ appLink: Object(_FixedWidgetUtils__WEBPACK_IMPORTED_MODULE_17__["getCollectionAppLink"])(props.appLink, data),
217
+ analyticsData: Object.assign({
218
+ id: (_d = data) === null || _d === void 0 ? void 0 : _d.id,
219
+ name: (_e = data) === null || _e === void 0 ? void 0 : _e.name
220
+ }, props.analyticsData),
221
+ analyticsOptions: _utils_WidgetHelper__WEBPACK_IMPORTED_MODULE_14__["WidgetHelper"].getSliderHeadingAnalyticsOptions()
222
+ }, react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("h2", {
223
+ className: "".concat(_fixed_widget_scss__WEBPACK_IMPORTED_MODULE_19___default.a.heading, " ").concat(props.appLink ? _fixed_widget_scss__WEBPACK_IMPORTED_MODULE_19___default.a.link : '', " h4 mb-0 d-inline-block align-top pl-1")
224
+ }, data.name, !!props.appLink && react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_svg_container_SvgContainer__WEBPACK_IMPORTED_MODULE_11__["SvgContainer"], {
225
+ svgName: _utils_SvgHelper__WEBPACK_IMPORTED_MODULE_12__["cvSvgLibrary"].ChevronRight,
226
+ size: _svg_container_SvgContainer__WEBPACK_IMPORTED_MODULE_11__["SvgContainerSize"].Small
227
+ })), props.settingsAppLink && react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_app_link_AppLink__WEBPACK_IMPORTED_MODULE_10__["AppLink"], {
228
+ appLink: props.settingsAppLink
229
+ }, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_svg_container_SvgContainer__WEBPACK_IMPORTED_MODULE_11__["SvgContainer"], {
230
+ svgName: _utils_SvgHelper__WEBPACK_IMPORTED_MODULE_12__["cvSvgLibrary"].Cog,
231
+ className: 'd-inline-block svg-container cursor-pointer',
232
+ title: _common_src_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_1__["LanguageService"].getPhrase(namespace, 'preferencesTooltip'),
233
+ tooltipPlacement: 'right'
234
+ }))), data.description && react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("p", {
235
+ className: 'text-truncate pl-1 mb-0 description'
236
+ }, data.description)), react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
237
+ ref: buttonsRef,
238
+ className: 'position-relative'
239
+ }, !isHoveringOnFarLeft && react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
240
+ className: _fixed_widget_scss__WEBPACK_IMPORTED_MODULE_19___default.a.leftOverflowGradient
241
+ }), react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_widget_button_WidgetButton__WEBPACK_IMPORTED_MODULE_3__["WidgetButton"], {
242
+ direction: _widget_button_WidgetButton__WEBPACK_IMPORTED_MODULE_3__["WidgetButtonDirection"].Left,
243
+ onClick: function onClick() {
244
+ dispatch({
245
+ type: _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_8__["WidgetInteraction"].Previous
246
+ });
247
+ _analytics_src_AnalyticsHelper__WEBPACK_IMPORTED_MODULE_15__["AnalyticsHelper"].logUserAction(getSliderAnalyticsData(_enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_8__["WidgetInteraction"].Previous), _utils_WidgetHelper__WEBPACK_IMPORTED_MODULE_14__["WidgetHelper"].getSliderAnalyticsOptions());
248
+ },
249
+ hide: isHoveringOnFarLeft || state.offset <= state.collection.length && !(isHovering && state.offset !== state.viewableItems),
250
+ contents: props.contents
251
+ }), react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_sliding_list_SlidingListContainer__WEBPACK_IMPORTED_MODULE_4__["SlidingListContainer"], {
252
+ position: state.position,
253
+ positionType: _enums_CssMeasurement__WEBPACK_IMPORTED_MODULE_2__["CssMeasurement"].Percentage,
254
+ onTouchMove: Object(_FixedWidgetUtils__WEBPACK_IMPORTED_MODULE_17__["getOnTouchStart"])(state, containerRef, containerWidth, setContainerWidth, initialTouchX, setInitialTouchX, setPercentageDragged),
255
+ onTouchEnd: Object(_FixedWidgetUtils__WEBPACK_IMPORTED_MODULE_17__["getOnTouchEnd"])(containerRef, setInitialTouchX, percentageDragged, setPercentageDragged, dispatch),
256
+ ref: containerRef,
257
+ percentageDragged: percentageDragged
258
+ }, state.collection.map(function (widgetItem, index) {
259
+ var _a;
260
+
261
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](WidgetItemComponent, {
262
+ key: widgetItem.id,
263
+ data: widgetItem,
264
+ appLink: props.childAppLink,
265
+ context: widgetContext,
266
+ preloadImage: Object(_FixedWidgetUtils__WEBPACK_IMPORTED_MODULE_17__["getShouldPreload"])(state)(widgetItem),
267
+ thumbnailSize: props.thumbnailSize || _enums_ThumbnailSize__WEBPACK_IMPORTED_MODULE_13__["ThumbnailSize"].Medium,
268
+ analyticsData: Object.assign({
269
+ widgetId: data.id,
270
+ widgetName: data.name,
271
+ itemIndex: index
272
+ }, analyticsData),
273
+ analyticsOptions: Object.assign(Object.assign({}, (_a = props) === null || _a === void 0 ? void 0 : _a.analyticsOptions), _utils_WidgetHelper__WEBPACK_IMPORTED_MODULE_14__["WidgetHelper"].getSliderItemAnalyticsOptions()),
274
+ onHover: function onHover(hovering) {
275
+ /**
276
+ * For some reason this needs to be called after a set timeout, otherwise
277
+ * the `useHover` listener on the `buttonsRef` element will not detect it's hover
278
+ * event. A delay of 200ms is used for when `hovering` is false so that the effects of
279
+ * setting `isHoveringOnFarX` aren't applied until the CSS transform transition has
280
+ * completed.
281
+ */
282
+ window.setTimeout(function () {
283
+ onSetIsHovering(hovering, index);
284
+ }, hovering ? 0 : 200);
285
+ }
286
+ });
287
+ })), react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_widget_button_WidgetButton__WEBPACK_IMPORTED_MODULE_3__["WidgetButton"], {
288
+ direction: _widget_button_WidgetButton__WEBPACK_IMPORTED_MODULE_3__["WidgetButtonDirection"].Right,
289
+ onClick: function onClick() {
290
+ dispatch({
291
+ type: _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_8__["WidgetInteraction"].Next
292
+ });
293
+ _analytics_src_AnalyticsHelper__WEBPACK_IMPORTED_MODULE_15__["AnalyticsHelper"].logUserAction(getSliderAnalyticsData(_enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_8__["WidgetInteraction"].Next), _utils_WidgetHelper__WEBPACK_IMPORTED_MODULE_14__["WidgetHelper"].getSliderAnalyticsOptions());
294
+ },
295
+ hide: isHoveringOnFarRight || (state.offset > state.viewableItems || state.offset === state.collection.length) && !(isHovering && state.offset < state.collection.length),
296
+ contents: props.contents
297
+ }), !isHoveringOnFarRight && react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
298
+ className: _fixed_widget_scss__WEBPACK_IMPORTED_MODULE_19___default.a.rightOverflowGradient
299
+ })));
60
300
  }
61
301
 
302
+ var Memoized = react__WEBPACK_IMPORTED_MODULE_0__["memo"](FixedWidget);
303
+
304
+
62
305
  /***/ }),
63
306
 
64
- /***/ "../../libs/shared/src/components/forms/form-checkbox/FormCheckbox.tsx":
65
- /*!*****************************************************************************************************************!*\
66
- !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/forms/form-checkbox/FormCheckbox.tsx ***!
67
- \*****************************************************************************************************************/
68
- /*! exports provided: FormCheckbox */
307
+ /***/ "../../libs/shared/src/components/widgets/fixed-widget/FixedWidgetReducer.tsx":
308
+ /*!************************************************************************************************************************!*\
309
+ !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/widgets/fixed-widget/FixedWidgetReducer.tsx ***!
310
+ \************************************************************************************************************************/
311
+ /*! exports provided: initialWidgetState, FixedWidgetReducer, lazyWidgetInit */
69
312
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
70
313
 
71
314
  "use strict";
72
315
  __webpack_require__.r(__webpack_exports__);
73
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormCheckbox", function() { return FormCheckbox; });
316
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialWidgetState", function() { return initialWidgetState; });
317
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FixedWidgetReducer", function() { return FixedWidgetReducer; });
318
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lazyWidgetInit", function() { return lazyWidgetInit; });
319
+ /* harmony import */ var _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../enums/MediaQueries */ "../../libs/shared/src/enums/MediaQueries.ts");
320
+ /* harmony import */ var _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../enums/WidgetInteraction */ "../../libs/shared/src/enums/WidgetInteraction.ts");
321
+ /* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../interfaces */ "../../libs/shared/src/interfaces/index.ts");
322
+ /* harmony import */ var _FixedWidgetUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FixedWidgetUtils */ "../../libs/shared/src/components/widgets/fixed-widget/FixedWidgetUtils.ts");
323
+
324
+
325
+
326
+
327
+ var initialWidgetState = {
328
+ offset: 0,
329
+ viewableItems: 4,
330
+ position: 0,
331
+ collection: [],
332
+ currentSize: _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_0__["MediaQueryStrings"].LG,
333
+ type: _interfaces__WEBPACK_IMPORTED_MODULE_2__["WidgetType"].Row
334
+ };
335
+
336
+ var computeNextPosition = function computeNextPosition(prevState) {
337
+ var collection = prevState.collection,
338
+ viewableItems = prevState.viewableItems,
339
+ offset = prevState.offset,
340
+ position = prevState.position;
341
+ var remainingCount = collection.length - offset;
342
+ /**
343
+ * If the remaining items are evening divisible by the items in view, or,
344
+ * we have more items that can be displayed in the view, move the slider a full 100%.
345
+ */
346
+
347
+ if (remainingCount % viewableItems === 0 || remainingCount > viewableItems) return {
348
+ position: position - 100,
349
+ offset: offset + viewableItems
350
+ };
351
+ /**
352
+ * Where there are less items than we can show in a full slide,
353
+ * calculate the % movement required to only show those items.
354
+ */
355
+
356
+ if (remainingCount < viewableItems) return {
357
+ position: position - remainingCount / viewableItems * 100,
358
+ offset: offset + remainingCount
359
+ };
360
+ /**
361
+ * Default back to the current state as a fallback
362
+ */
363
+
364
+ return {
365
+ position: position,
366
+ offset: offset
367
+ };
368
+ };
369
+
370
+ var computePreviousPosition = function computePreviousPosition(prevState) {
371
+ var viewableItems = prevState.viewableItems,
372
+ offset = prevState.offset,
373
+ position = prevState.position;
374
+ var remainingCount = offset - viewableItems;
375
+ if (remainingCount % viewableItems === 0 || remainingCount > viewableItems) return {
376
+ position: position + 100,
377
+ offset: offset - viewableItems
378
+ };
379
+ if (remainingCount < viewableItems) return {
380
+ position: position + remainingCount / viewableItems * 100,
381
+ offset: offset - remainingCount
382
+ };
383
+ return {
384
+ position: position,
385
+ offset: offset
386
+ };
387
+ };
388
+
389
+ function FixedWidgetReducer(prevState, action) {
390
+ var _a, _b;
391
+
392
+ var type = action.type,
393
+ _action$payload = action.payload,
394
+ payload = _action$payload === void 0 ? {} : _action$payload;
395
+
396
+ switch (type) {
397
+ case _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_1__["WidgetInteraction"].Next:
398
+ {
399
+ return Object.assign(Object.assign({}, prevState), computeNextPosition(prevState));
400
+ }
401
+
402
+ case _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_1__["WidgetInteraction"].Previous:
403
+ {
404
+ return Object.assign(Object.assign({}, prevState), computePreviousPosition(prevState));
405
+ }
406
+
407
+ case _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_1__["WidgetInteraction"].Resize:
408
+ {
409
+ var computeViewableItems = Object(_FixedWidgetUtils__WEBPACK_IMPORTED_MODULE_3__["getComputeFunction"])(payload.contents);
410
+ var initialSeen = computeViewableItems(payload.mediaQuery, payload.type, (_a = payload.collection) === null || _a === void 0 ? void 0 : _a.length);
411
+ return Object.assign(Object.assign({}, prevState), {
412
+ currentSize: payload.mediaQuery,
413
+ position: 0,
414
+ offset: initialSeen,
415
+ viewableItems: initialSeen,
416
+ type: payload.type
417
+ });
418
+ }
419
+
420
+ case _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_1__["WidgetInteraction"].Init:
421
+ {
422
+ var _computeViewableItems = Object(_FixedWidgetUtils__WEBPACK_IMPORTED_MODULE_3__["getComputeFunction"])(payload.contents);
423
+
424
+ var _initialSeen = _computeViewableItems(payload.mediaQuery, payload.type, (_b = payload.collection) === null || _b === void 0 ? void 0 : _b.length);
425
+
426
+ return lazyWidgetInit(Object.assign(Object.assign({}, prevState), {
427
+ collection: payload.collection,
428
+ currentSize: payload.mediaQuery,
429
+ offset: _initialSeen,
430
+ viewableItems: _initialSeen,
431
+ type: payload.type
432
+ }));
433
+ }
434
+
435
+ default:
436
+ return prevState;
437
+ }
438
+ }
439
+ function lazyWidgetInit(newState) {
440
+ return Object.assign(Object.assign({}, initialWidgetState), newState);
441
+ }
442
+
443
+ /***/ }),
444
+
445
+ /***/ "../../libs/shared/src/components/widgets/fixed-widget/FixedWidgetUtils.ts":
446
+ /*!*********************************************************************************************************************!*\
447
+ !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/widgets/fixed-widget/FixedWidgetUtils.ts ***!
448
+ \*********************************************************************************************************************/
449
+ /*! exports provided: useFetchData, getShouldPreload, getCollectionAppLink, formatData, getComputeFunction, getOnTouchStart, getOnTouchEnd */
450
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
451
+
452
+ "use strict";
453
+ __webpack_require__.r(__webpack_exports__);
454
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useFetchData", function() { return useFetchData; });
455
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getShouldPreload", function() { return getShouldPreload; });
456
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCollectionAppLink", function() { return getCollectionAppLink; });
457
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatData", function() { return formatData; });
458
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getComputeFunction", function() { return getComputeFunction; });
459
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOnTouchStart", function() { return getOnTouchStart; });
460
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOnTouchEnd", function() { return getOnTouchEnd; });
74
461
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
75
462
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
76
- /* harmony import */ var react_bootstrap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-bootstrap */ "react-bootstrap");
77
- /* harmony import */ var react_bootstrap__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_bootstrap__WEBPACK_IMPORTED_MODULE_1__);
78
- /* harmony import */ var _form_field_FormField__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../form-field/FormField */ "../../libs/shared/src/components/forms/form-field/FormField.tsx");
79
- var __rest = undefined && undefined.__rest || function (s, e) {
80
- var t = {};
81
-
82
- for (var p in s) {
83
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
463
+ /* harmony import */ var _common_src_react_utils_ObjectHelper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../common/src/react/utils/ObjectHelper */ "../../libs/common/src/react/utils/ObjectHelper.ts");
464
+ /* harmony import */ var _common_src_backbone_utils_FunctionHelper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../common/src/backbone/utils/FunctionHelper */ "../../libs/common/src/backbone/utils/FunctionHelper.ts");
465
+ /* harmony import */ var _common_src_react_utils_TextHelper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../common/src/react/utils/TextHelper */ "../../libs/common/src/react/utils/TextHelper.ts");
466
+ /* harmony import */ var _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../enums/MediaQueries */ "../../libs/shared/src/enums/MediaQueries.ts");
467
+ /* harmony import */ var _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../enums/WidgetInteraction */ "../../libs/shared/src/enums/WidgetInteraction.ts");
468
+ /* harmony import */ var _enums_WidgetContents__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../enums/WidgetContents */ "../../libs/shared/src/enums/WidgetContents.ts");
469
+ /* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../interfaces */ "../../libs/shared/src/interfaces/index.ts");
470
+
471
+
472
+
473
+
474
+
475
+
476
+
477
+
478
+ function useFetchData(props, dispatch, mediaQueryType, shouldFetch) {
479
+ var fetch = props.fetch,
480
+ setData = props.setData,
481
+ type = props.type,
482
+ items = props.collection,
483
+ prefetched = props.prefetched,
484
+ contents = props.contents;
485
+ var data = items;
486
+ var res;
487
+
488
+ if (!data || _common_src_react_utils_ObjectHelper__WEBPACK_IMPORTED_MODULE_1__["ObjectHelper"].isEmpty(data) && !prefetched) {
489
+ res = fetch(shouldFetch);
490
+ data = res.data;
84
491
  }
492
+ /**
493
+ * Once we have the widget data, lazily update our state with the new collection
494
+ */
495
+
496
+
497
+ react__WEBPACK_IMPORTED_MODULE_0__["useEffect"](function () {
498
+ if (!data || _common_src_react_utils_ObjectHelper__WEBPACK_IMPORTED_MODULE_1__["ObjectHelper"].isEmpty(data)) return;
499
+ dispatch({
500
+ type: _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_5__["WidgetInteraction"].Init,
501
+ payload: {
502
+ collection: _common_src_backbone_utils_FunctionHelper__WEBPACK_IMPORTED_MODULE_2__["FunctionHelper"].isFunction(setData) ? setData(data) : data,
503
+ mediaQuery: mediaQueryType,
504
+ type: type,
505
+ contents: contents
506
+ }
507
+ });
508
+ }, [data]);
509
+ return res;
510
+ }
511
+ /**
512
+ * This function wrapper determines which widget item images should be pre-fetched by the LazyImage component.
513
+ * It does this by looking at which images are going to be shown after the users clicks on the "Next"
514
+ * widget button.
515
+ */
85
516
 
86
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
87
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
517
+ function getShouldPreload(state) {
518
+ var offset = state.offset,
519
+ viewableItems = state.viewableItems,
520
+ collection = state.collection; // The index of the latest item that has been fetched
521
+
522
+ var maxLoadedIndex = offset;
523
+ /**
524
+ * The indicesToPreload is an array of indices of widget items that should be prefetched by the
525
+ * LazyImage component
526
+ */
527
+
528
+ var indicesToPreload = [];
529
+
530
+ for (var i = 0; i < maxLoadedIndex + viewableItems; i++) {
531
+ indicesToPreload.push(i);
88
532
  }
89
- return t;
90
- };
533
+ /**
534
+ * A widget item calls this function to determine whether or not its image can be pre-fetched.
535
+ * This is determined by whether or not its index has been deemed valid to be pre-fetched
536
+ * by the scope above
537
+ */
538
+
91
539
 
540
+ return function shouldPreload(widgetItem) {
541
+ var index = collection.indexOf(widgetItem);
542
+ return indicesToPreload.includes(index);
543
+ };
544
+ }
545
+ function getCollectionAppLink(appLink, data) {
546
+ if (!appLink) return;
547
+ return Object.assign(Object.assign({}, appLink), {
548
+ args: appLink.args || [data.id, _common_src_react_utils_TextHelper__WEBPACK_IMPORTED_MODULE_3__["TextHelper"].slugify(data.name)]
549
+ });
550
+ }
551
+ /**
552
+ * Allow explicit name and description props to override the fetched
553
+ * data properties.
554
+ *
555
+ * @param props
556
+ * @param data
557
+ */
92
558
 
559
+ function formatData(props, data) {
560
+ var name = props.name,
561
+ description = props.description;
562
+ var overrideProps = {};
563
+ if (Array.isArray(data)) return {
564
+ name: name,
565
+ description: description
566
+ };
567
+ if (props.name) overrideProps.name = name;
568
+ if (props.description) overrideProps.description = description;
569
+ return Object.assign(Object.assign({}, data), overrideProps);
570
+ }
571
+ function getComputeFunction(contents) {
572
+ switch (contents) {
573
+ case _enums_WidgetContents__WEBPACK_IMPORTED_MODULE_6__["WidgetContents"].Playlists:
574
+ return computeViewablePlaylists;
93
575
 
576
+ case _enums_WidgetContents__WEBPACK_IMPORTED_MODULE_6__["WidgetContents"].Videos:
577
+ return computeViewableVideos;
94
578
 
579
+ case _enums_WidgetContents__WEBPACK_IMPORTED_MODULE_6__["WidgetContents"].Subjects:
580
+ return computeViewableSubjects;
581
+
582
+ case _enums_WidgetContents__WEBPACK_IMPORTED_MODULE_6__["WidgetContents"].UserChannels:
583
+ return computeViewableUserChannels;
584
+
585
+ case _enums_WidgetContents__WEBPACK_IMPORTED_MODULE_6__["WidgetContents"].Interactives:
586
+ return computeViewableInteractives;
587
+
588
+ case _enums_WidgetContents__WEBPACK_IMPORTED_MODULE_6__["WidgetContents"].Clips:
589
+ return computeViewableClips;
590
+
591
+ case _enums_WidgetContents__WEBPACK_IMPORTED_MODULE_6__["WidgetContents"].Series:
592
+ default:
593
+ return computeViewableSeries;
594
+ }
595
+ }
596
+
597
+ function computeViewablePlaylists(mediaQuery, type, itemCount) {
598
+ var maxItems = 5;
599
+ if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].XS) maxItems = 2;else if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].SM) maxItems = 3;else if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].MD) maxItems = 4;
600
+ if (itemCount < maxItems) maxItems = itemCount;
601
+ return maxItems;
602
+ }
603
+
604
+ function computeViewableVideos(mediaQuery, type, itemCount) {
605
+ var maxItems = 4;
606
+ if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].XS) maxItems = 2;else if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].SM) maxItems = 3;else if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].MD) maxItems = 4;else if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].LG || mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].XL || mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].XXL) {
607
+ if (type === _interfaces__WEBPACK_IMPORTED_MODULE_7__["WidgetType"].LargeRow) maxItems = 3;else if (itemCount < 4) maxItems = 3;else maxItems = 4;
608
+ }
609
+ if (itemCount < maxItems) maxItems = itemCount;
610
+ return maxItems;
611
+ }
612
+
613
+ function computeViewableSubjects(mediaQuery, type, itemCount) {
614
+ var maxItems = 6;
615
+ if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].SM || mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].XS) maxItems = 3;else if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].MD) maxItems = 4;else if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].LG) maxItems = 5;else if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].XL || mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].XXL) maxItems = 6;
616
+ if (itemCount < maxItems) maxItems = itemCount;
617
+ return maxItems;
618
+ }
619
+
620
+ function computeViewableUserChannels(mediaQuery, type, itemCount) {
621
+ var maxItems = 6;
622
+ if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].XS) maxItems = 2;else if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].SM) maxItems = 3;else if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].MD) maxItems = 4;else if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].LG) maxItems = 5;else if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].XL || mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].XXL) maxItems = 6;
623
+ if (itemCount < maxItems) maxItems = itemCount;
624
+ return maxItems;
625
+ }
626
+
627
+ function computeViewableInteractives(mediaQuery, type, itemCount) {
628
+ var maxItems = 3;
629
+ if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].MD || mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].SM) maxItems = 2;
630
+ if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].XS) maxItems = 1;
631
+ if (itemCount < Math.ceil(maxItems)) maxItems = itemCount;
632
+ return maxItems;
633
+ }
634
+
635
+ function computeViewableClips(mediaQuery, type, itemCount) {
636
+ var maxItems = 3;
637
+ if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].MD || mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].SM) maxItems = 2;
638
+ if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].XS) maxItems = 1;
639
+ if (itemCount < Math.ceil(maxItems)) maxItems = itemCount;
640
+ return maxItems;
641
+ }
642
+
643
+ function computeViewableSeries(mediaQuery, type, itemCount) {
644
+ var maxItems = 4;
645
+ if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].XS) maxItems = 2;else if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_4__["MediaQueryStrings"].SM) maxItems = 3;
646
+ if (itemCount < maxItems) maxItems = itemCount;
647
+ return maxItems;
648
+ }
95
649
  /**
96
- * Use this checkbox within Formik contexts
650
+ * Touch event handlers
97
651
  */
98
652
 
99
- function FormCheckbox(props) {
100
- var label = props.label,
101
- fieldProps = __rest(props, ["label"]);
102
-
103
- return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react_bootstrap__WEBPACK_IMPORTED_MODULE_1__["Form"].Group, null, react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
104
- className: 'custom-control custom-checkbox'
105
- }, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_form_field_FormField__WEBPACK_IMPORTED_MODULE_2__["FieldWrapper"], Object.assign({
106
- className: 'custom-control-input'
107
- }, fieldProps)), react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react_bootstrap__WEBPACK_IMPORTED_MODULE_1__["Form"].Label, {
108
- className: 'custom-control-label',
109
- htmlFor: fieldProps.id
110
- }, label)));
653
+
654
+ function getOnTouchStart(widgetState, containerRef, containerWidth, setContainerWidth, initialTouchX, setInitialTouchX, setPercentageDragged) {
655
+ return function (event) {
656
+ var firstTouch = event.touches.item(0);
657
+ var touchX = firstTouch.clientX;
658
+ /**
659
+ * Runs only on the very first touch event.
660
+ *
661
+ * Sets the initial x-coordinate as a reference point to calculate how far the user has dragged before
662
+ * they release their finder
663
+ */
664
+
665
+ if (!initialTouchX) {
666
+ containerRef.current.style.transition = '';
667
+ setContainerWidth(containerRef.current.getBoundingClientRect().width);
668
+ setInitialTouchX(touchX);
669
+ }
670
+
671
+ var pixelsDragged = initialTouchX - touchX; // Calculate how far the user has moved their finger as a percentage of the widget's container element
672
+
673
+ var currentPercentageDragged = pixelsDragged / containerWidth * 100;
674
+ /**
675
+ * These 2 if statements prevent the user from dragging the widget beyond its limits.
676
+ * One if statement handles if they have dragged to the left, and the other is for dragging to the right.
677
+ *
678
+ * The same logic is used to hide the widget buttons (see the `hide` prop passed to `<WidgetButton />`)
679
+ */
680
+
681
+ if (currentPercentageDragged < 0 && widgetState.offset === widgetState.viewableItems) currentPercentageDragged = 0;else if (currentPercentageDragged > 0 && widgetState.offset === widgetState.collection.length) currentPercentageDragged = 0;
682
+ setPercentageDragged(currentPercentageDragged);
683
+ };
684
+ }
685
+ var DRAG_TOLERANCE = 7.5; // % of container width using to trigger a transition.
686
+
687
+ function getOnTouchEnd(containerRef, setInitialTouchX, percentageDragged, setPercentageDragged, dispatch) {
688
+ return function () {
689
+ containerRef.current.style.transition = 'transform .4s ease-in-out';
690
+ setInitialTouchX(null);
691
+ /**
692
+ * Only trigger a Next/Previous widget event if the user has dragged beyond DRAG_TOLERANCE% either way of the
693
+ * container's width. This means if the user only drags left/right a tiny little bit, the widget
694
+ * will simply slide back into its original place.
695
+ */
696
+
697
+ if (Math.abs(percentageDragged) >= DRAG_TOLERANCE) {
698
+ var reducerAction = percentageDragged > 0 ? _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_5__["WidgetInteraction"].Next : _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_5__["WidgetInteraction"].Previous;
699
+ dispatch({
700
+ type: reducerAction
701
+ });
702
+ }
703
+
704
+ setPercentageDragged(0);
705
+ };
111
706
  }
112
707
 
113
708
  /***/ }),
114
709
 
115
- /***/ "../../libs/shared/src/components/forms/form-field/CharacterCounter.tsx":
116
- /*!******************************************************************************************************************!*\
117
- !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/forms/form-field/CharacterCounter.tsx ***!
118
- \******************************************************************************************************************/
119
- /*! exports provided: CharacterCounter */
710
+ /***/ "../../libs/shared/src/components/widgets/fixed-widget/PartialFixedWidget.tsx":
711
+ /*!************************************************************************************************************************!*\
712
+ !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/widgets/fixed-widget/PartialFixedWidget.tsx ***!
713
+ \************************************************************************************************************************/
714
+ /*! exports provided: PartialFixedWidget */
120
715
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
121
716
 
122
717
  "use strict";
123
718
  __webpack_require__.r(__webpack_exports__);
124
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CharacterCounter", function() { return CharacterCounter; });
719
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PartialFixedWidget", function() { return PartialFixedWidget; });
125
720
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
126
721
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
127
- /* harmony import */ var formik__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! formik */ "../../../node_modules/formik/dist/formik.esm.js");
722
+ /* harmony import */ var _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../enums/MediaQueries */ "../../libs/shared/src/enums/MediaQueries.ts");
723
+ /* harmony import */ var _hooks_UseGetMediaQueryString__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../hooks/UseGetMediaQueryString */ "../../libs/shared/src/hooks/UseGetMediaQueryString.ts");
724
+ /* harmony import */ var _fixed_widget_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fixed-widget.scss */ "../../libs/shared/src/components/widgets/fixed-widget/fixed-widget.scss");
725
+ /* harmony import */ var _fixed_widget_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_fixed_widget_scss__WEBPACK_IMPORTED_MODULE_3__);
726
+
727
+
728
+
729
+
730
+
731
+ function useMediaQueryListeners() {
732
+ var mediaQuery = Object(_hooks_UseGetMediaQueryString__WEBPACK_IMPORTED_MODULE_2__["useGetMediaQueryString"])();
733
+ if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_1__["MediaQueryStrings"].XS) return {
734
+ itemCount: 1,
735
+ colSize: 12
736
+ };
737
+ if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_1__["MediaQueryStrings"].SM) return {
738
+ itemCount: 2,
739
+ colSize: 6
740
+ };
741
+ if (mediaQuery === _enums_MediaQueries__WEBPACK_IMPORTED_MODULE_1__["MediaQueryStrings"].MD) return {
742
+ itemCount: 3,
743
+ colSize: 4
744
+ };
745
+ return {
746
+ itemCount: 4,
747
+ colSize: 3
748
+ };
749
+ }
750
+
751
+ var PartialLoadingItem = function PartialLoadingItem(_ref) {
752
+ var colSize = _ref.colSize;
753
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
754
+ className: "col-".concat(colSize)
755
+ }, react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
756
+ className: "".concat(_fixed_widget_scss__WEBPACK_IMPORTED_MODULE_3___default.a.partialItem, " mx-1 partial-loading-background")
757
+ }));
758
+ };
128
759
 
760
+ function PartialFixedWidget(props) {
761
+ var _useMediaQueryListene = useMediaQueryListeners(),
762
+ itemCount = _useMediaQueryListene.itemCount,
763
+ colSize = _useMediaQueryListene.colSize;
129
764
 
130
- function CharacterCounter(props) {
131
- var _useFormikContext = Object(formik__WEBPACK_IMPORTED_MODULE_1__["useFormikContext"])(),
132
- values = _useFormikContext.values;
765
+ var items = [];
766
+
767
+ for (var i = 0; i < itemCount; i++) {
768
+ items.push(react__WEBPACK_IMPORTED_MODULE_0__["createElement"](PartialLoadingItem, {
769
+ key: i,
770
+ colSize: colSize
771
+ }));
772
+ }
133
773
 
134
- var field = values[props.fieldName];
135
- if (typeof field !== 'string') return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null);
136
774
  return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
137
- className: 'float-right text-muted'
138
- }, field.length, "/", props.limit);
775
+ className: 'widget pb-3'
776
+ }, react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
777
+ className: "".concat(_fixed_widget_scss__WEBPACK_IMPORTED_MODULE_3___default.a.partialHeading, " mx-1 mb-1 partial-loading-background")
778
+ }), react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
779
+ className: "".concat(_fixed_widget_scss__WEBPACK_IMPORTED_MODULE_3___default.a.partialDescription, " mx-1 my-1 partial-loading-background")
780
+ }), react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
781
+ className: "".concat(_fixed_widget_scss__WEBPACK_IMPORTED_MODULE_3___default.a.slidingContainer, " row")
782
+ }, items));
139
783
  }
140
784
 
141
785
  /***/ }),
142
786
 
143
- /***/ "../../libs/shared/src/components/forms/form-field/FormField.tsx":
144
- /*!***********************************************************************************************************!*\
145
- !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/forms/form-field/FormField.tsx ***!
146
- \***********************************************************************************************************/
147
- /*! exports provided: FieldWrapper, FormField */
787
+ /***/ "../../libs/shared/src/components/widgets/fixed-widget/fixed-widget.scss":
788
+ /*!*******************************************************************************************************************!*\
789
+ !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/widgets/fixed-widget/fixed-widget.scss ***!
790
+ \*******************************************************************************************************************/
791
+ /*! no static exports found */
792
+ /***/ (function(module, exports, __webpack_require__) {
793
+
794
+ // extracted by mini-css-extract-plugin
795
+ module.exports = {"leftOverflowGradient":"cv--leftOverflowGradient--u_MPi","rightOverflowGradient":"cv--rightOverflowGradient--38ooL","partialHeading":"cv--partialHeading--OVsdA","partialDescription":"cv--partialDescription--1HtA2","partialItem":"cv--partialItem--3G2hG","largePartialItem":"cv--largePartialItem--NnK8O","heading":"cv--heading--BQnCC","link":"cv--link--ph0Qy"};
796
+
797
+ /***/ }),
798
+
799
+ /***/ "../../libs/shared/src/components/widgets/sliding-list/SlidingListContainer.tsx":
800
+ /*!**************************************************************************************************************************!*\
801
+ !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/widgets/sliding-list/SlidingListContainer.tsx ***!
802
+ \**************************************************************************************************************************/
803
+ /*! exports provided: SlidingListContainer */
148
804
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
149
805
 
150
806
  "use strict";
151
807
  __webpack_require__.r(__webpack_exports__);
152
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FieldWrapper", function() { return FieldWrapper; });
153
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormField", function() { return FormField; });
808
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SlidingListContainer", function() { return SlidingListContainer; });
154
809
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
155
810
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
156
- /* harmony import */ var formik__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! formik */ "../../../node_modules/formik/dist/formik.esm.js");
157
- /* harmony import */ var react_bootstrap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-bootstrap */ "react-bootstrap");
158
- /* harmony import */ var react_bootstrap__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_bootstrap__WEBPACK_IMPORTED_MODULE_2__);
159
- /* harmony import */ var _common_src_backbone_utils_FunctionHelper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../common/src/backbone/utils/FunctionHelper */ "../../libs/common/src/backbone/utils/FunctionHelper.ts");
160
- /* harmony import */ var _utils_FormHelper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/FormHelper */ "../../libs/shared/src/utils/FormHelper.ts");
161
- /* harmony import */ var _CharacterCounter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CharacterCounter */ "../../libs/shared/src/components/forms/form-field/CharacterCounter.tsx");
162
- /* harmony import */ var _form_checkbox_FormCheckbox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../form-checkbox/FormCheckbox */ "../../libs/shared/src/components/forms/form-checkbox/FormCheckbox.tsx");
163
- var __rest = undefined && undefined.__rest || function (s, e) {
164
- var t = {};
165
-
166
- for (var p in s) {
167
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
168
- }
811
+ /* harmony import */ var _common_src_backbone_utils_UserAgentHelper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../common/src/backbone/utils/UserAgentHelper */ "../../libs/common/src/backbone/utils/UserAgentHelper.ts");
812
+ /* harmony import */ var _enums_CssMeasurement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../enums/CssMeasurement */ "../../libs/shared/src/enums/CssMeasurement.ts");
813
+ /* harmony import */ var _utils_DragHelper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DragHelper */ "../../libs/shared/src/utils/DragHelper.ts");
169
814
 
170
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
171
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
172
- }
173
- return t;
174
- };
175
815
 
176
816
 
177
817
 
818
+ var isTouchScreen = _common_src_backbone_utils_UserAgentHelper__WEBPACK_IMPORTED_MODULE_1__["UserAgentHelper"].isTouchScreen();
178
819
 
820
+ function getPositionStyling(xPosition, measurement, dragPercentage) {
821
+ // Used in situations where a touch screen user is dragging the `<FixedWidget />`
822
+ if (measurement === _enums_CssMeasurement__WEBPACK_IMPORTED_MODULE_2__["CssMeasurement"].Percentage && dragPercentage) xPosition = xPosition - dragPercentage;
823
+ return {
824
+ transform: "translate3d(".concat(xPosition).concat(measurement, ", 0px, 0px)"),
825
+ transition: 'transform .4s ease-in-out'
826
+ };
827
+ }
179
828
 
829
+ var SlidingListContainer = react__WEBPACK_IMPORTED_MODULE_0__["forwardRef"](function (props, ref) {
830
+ var children = props.children,
831
+ positionType = props.positionType,
832
+ onDrag = props.onDrag,
833
+ onDragEnd = props.onDragEnd,
834
+ onTouchMove = props.onTouchMove,
835
+ onTouchEnd = props.onTouchEnd,
836
+ percentageDragged = props.percentageDragged,
837
+ _props$position = props.position,
838
+ position = _props$position === void 0 ? 0 : _props$position;
839
+
840
+ function getEventListeners() {
841
+ var listenerProps = {};
842
+
843
+ if (onDrag && onDragEnd) {
844
+ listenerProps.draggable = true;
845
+ listenerProps.onDragEnd = onDragEnd;
846
+ listenerProps.onDragStart = _utils_DragHelper__WEBPACK_IMPORTED_MODULE_3__["DragHelper"].hideDragImage;
847
+ listenerProps.onDragOver = onDrag;
848
+ }
180
849
 
850
+ if (onTouchMove && onTouchEnd && isTouchScreen) {
851
+ listenerProps.onTouchMoveCapture = onTouchMove;
852
+ listenerProps.onTouchEndCapture = onTouchEnd;
853
+ }
181
854
 
855
+ return listenerProps;
856
+ }
182
857
 
183
- function FieldWrapper(props) {
184
- var children = props.children,
185
- fieldProps = __rest(props, ["children"]);
186
-
187
- return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](formik__WEBPACK_IMPORTED_MODULE_1__["Field"], Object.assign({}, fieldProps), _common_src_backbone_utils_FunctionHelper__WEBPACK_IMPORTED_MODULE_3__["FunctionHelper"].isFunction(children) ? function (f) {
188
- return children(f);
189
- } : react__WEBPACK_IMPORTED_MODULE_0__["Children"].count(children) ? children : null);
190
- }
191
- function FormField(props) {
192
- var label = props.label,
193
- className = props.className,
194
- showCharacterCounter = props.showCharacterCounter,
195
- fieldProps = __rest(props, ["label", "className", "showCharacterCounter"]);
196
-
197
- var _useFormikContext = Object(formik__WEBPACK_IMPORTED_MODULE_1__["useFormikContext"])(),
198
- errors = _useFormikContext.errors,
199
- touched = _useFormikContext.touched;
200
-
201
- if (fieldProps.type === 'checkbox') return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_form_checkbox_FormCheckbox__WEBPACK_IMPORTED_MODULE_6__["FormCheckbox"], Object.assign({}, props));
202
- return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react_bootstrap__WEBPACK_IMPORTED_MODULE_2__["Form"].Group, null, !!label && react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react_bootstrap__WEBPACK_IMPORTED_MODULE_2__["Form"].Label, {
203
- htmlFor: fieldProps.id
204
- }, label), react__WEBPACK_IMPORTED_MODULE_0__["createElement"](FieldWrapper, Object.assign({
205
- className: _utils_FormHelper__WEBPACK_IMPORTED_MODULE_4__["FormHelper"].getCustomFormControlClassName(errors, touched, fieldProps.name, className)
206
- }, fieldProps)), !!showCharacterCounter && !!fieldProps.maxLength && react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_CharacterCounter__WEBPACK_IMPORTED_MODULE_5__["CharacterCounter"], {
207
- fieldName: fieldProps.name,
208
- limit: fieldProps.maxLength
209
- }), react__WEBPACK_IMPORTED_MODULE_0__["createElement"](formik__WEBPACK_IMPORTED_MODULE_1__["ErrorMessage"], {
210
- name: fieldProps.name
211
- }, function (errorMessage) {
212
- return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react_bootstrap__WEBPACK_IMPORTED_MODULE_2__["Form"].Control.Feedback, {
213
- type: 'invalid'
214
- }, errorMessage);
215
- }));
216
- }
858
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", Object.assign({
859
+ className: 'd-flex flex-nowrap position-relative w-100',
860
+ style: getPositionStyling(position, positionType, percentageDragged),
861
+ ref: ref
862
+ }, getEventListeners()), children);
863
+ });
217
864
 
218
865
  /***/ }),
219
866
 
220
- /***/ "../../libs/shared/src/components/forms/form-wrapper/FormWrapper.tsx":
221
- /*!***************************************************************************************************************!*\
222
- !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/forms/form-wrapper/FormWrapper.tsx ***!
223
- \***************************************************************************************************************/
224
- /*! exports provided: FormWrapper, useFormikContextWrapper */
867
+ /***/ "../../libs/shared/src/components/widgets/widget-button/WidgetButton.tsx":
868
+ /*!*******************************************************************************************************************!*\
869
+ !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/widgets/widget-button/WidgetButton.tsx ***!
870
+ \*******************************************************************************************************************/
871
+ /*! exports provided: WidgetButtonDirection, WidgetButton */
225
872
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
226
873
 
227
874
  "use strict";
228
875
  __webpack_require__.r(__webpack_exports__);
229
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormWrapper", function() { return FormWrapper; });
230
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useFormikContextWrapper", function() { return useFormikContextWrapper; });
876
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WidgetButtonDirection", function() { return WidgetButtonDirection; });
877
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WidgetButton", function() { return WidgetButton; });
231
878
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
232
879
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
233
- /* harmony import */ var formik__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! formik */ "../../../node_modules/formik/dist/formik.esm.js");
234
- /* harmony import */ var _common_src_backbone_utils_FunctionHelper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../common/src/backbone/utils/FunctionHelper */ "../../libs/common/src/backbone/utils/FunctionHelper.ts");
235
- /* harmony import */ var _common_src_react_utils_ObjectHelper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../common/src/react/utils/ObjectHelper */ "../../libs/common/src/react/utils/ObjectHelper.ts");
236
- var __rest = undefined && undefined.__rest || function (s, e) {
237
- var t = {};
880
+ /* harmony import */ var _svg_container_SvgContainer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../svg-container/SvgContainer */ "../../libs/shared/src/components/svg-container/SvgContainer.tsx");
881
+ /* harmony import */ var _utils_SvgHelper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/SvgHelper */ "../../libs/shared/src/utils/SvgHelper.ts");
882
+ /* harmony import */ var _widget_button_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./widget-button.scss */ "../../libs/shared/src/components/widgets/widget-button/widget-button.scss");
883
+ /* harmony import */ var _widget_button_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_widget_button_scss__WEBPACK_IMPORTED_MODULE_3__);
238
884
 
239
- for (var p in s) {
240
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
241
- }
242
-
243
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
244
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
245
- }
246
- return t;
247
- };
248
885
 
249
886
 
250
887
 
888
+ var WidgetButtonDirection;
251
889
 
890
+ (function (WidgetButtonDirection) {
891
+ WidgetButtonDirection[WidgetButtonDirection["Left"] = 0] = "Left";
892
+ WidgetButtonDirection[WidgetButtonDirection["Right"] = 1] = "Right";
893
+ })(WidgetButtonDirection || (WidgetButtonDirection = {}));
252
894
 
895
+ function getPositionClass(contents, isLeftDirection) {
896
+ var className = _widget_button_scss__WEBPACK_IMPORTED_MODULE_3___default.a.topPos; // Left / Right
253
897
 
254
- function omitNullInitialValues(initialValues) {
255
- var values = _common_src_react_utils_ObjectHelper__WEBPACK_IMPORTED_MODULE_3__["ObjectHelper"].deepClone(initialValues);
256
- Object.keys(values).forEach(function (key) {
257
- if (!values.hasOwnProperty(key)) return;
258
- if (_common_src_react_utils_ObjectHelper__WEBPACK_IMPORTED_MODULE_3__["ObjectHelper"].isObject(values[key])) values[key] = omitNullInitialValues(values[key]);else if (values[key] === null) delete values[key];
259
- });
260
- return values;
898
+ if (isLeftDirection) className += ' ' + _widget_button_scss__WEBPACK_IMPORTED_MODULE_3___default.a.left;else className += ' ' + _widget_button_scss__WEBPACK_IMPORTED_MODULE_3___default.a.right;
899
+ return className;
261
900
  }
262
901
 
263
- FormWrapper.defaultProps = {
264
- castInitialValues: true,
265
- castValuesOnSubmit: true
266
- };
267
- function FormWrapper(props) {
268
- var castInitialValues = props.castInitialValues,
269
- castValuesOnSubmit = props.castValuesOnSubmit,
270
- initialValues = props.initialValues,
271
- onSubmit = props.onSubmit,
272
- resetOnSubmit = props.resetOnSubmit,
273
- formikProps = __rest(props, ["castInitialValues", "castValuesOnSubmit", "initialValues", "onSubmit", "resetOnSubmit"]);
274
- /**
275
- * If castInitialValues is true, cast initialValues to the validationSchema.
276
- * This will ensure that any data fetched from the api conforms to the expected form data shape.
277
- */
902
+ var WidgetButton = react__WEBPACK_IMPORTED_MODULE_0__["memo"](function (props) {
903
+ var isLeft = props.direction === WidgetButtonDirection.Left;
904
+ var arrowSvg = isLeft ? _utils_SvgHelper__WEBPACK_IMPORTED_MODULE_2__["cvSvgLibrary"].ChevronLeft : _utils_SvgHelper__WEBPACK_IMPORTED_MODULE_2__["cvSvgLibrary"].ChevronRight;
905
+ var positionClass = getPositionClass(props.contents, isLeft);
906
+ if (props.hide) return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null);
907
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
908
+ role: 'button',
909
+ className: "".concat(positionClass, " ").concat(_widget_button_scss__WEBPACK_IMPORTED_MODULE_3___default.a.button),
910
+ onClick: props.onClick
911
+ }, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_svg_container_SvgContainer__WEBPACK_IMPORTED_MODULE_1__["SvgContainer"], {
912
+ svgName: arrowSvg,
913
+ size: _svg_container_SvgContainer__WEBPACK_IMPORTED_MODULE_1__["SvgContainerSize"].Medium,
914
+ className: "svg-container d-inline-block ".concat(_widget_button_scss__WEBPACK_IMPORTED_MODULE_3___default.a.chevron)
915
+ })), props.useGradientBackdrop && react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
916
+ className: isLeft ? _widget_button_scss__WEBPACK_IMPORTED_MODULE_3___default.a.gradientLeft : _widget_button_scss__WEBPACK_IMPORTED_MODULE_3___default.a.gradientRight
917
+ }), react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
918
+ role: 'button',
919
+ onClick: props.onClick,
920
+ className: isLeft ? _widget_button_scss__WEBPACK_IMPORTED_MODULE_3___default.a.extendedClickableAreaLeft : _widget_button_scss__WEBPACK_IMPORTED_MODULE_3___default.a.extendedClickableAreaRight
921
+ }));
922
+ }, function (prevProps, nextProps) {
923
+ return prevProps.hide === nextProps.hide;
924
+ });
278
925
 
926
+ /***/ }),
279
927
 
280
- var formattedInitialValues = castInitialValues && props.validationSchema ? props.validationSchema.cast(omitNullInitialValues(initialValues)) : initialValues;
928
+ /***/ "../../libs/shared/src/components/widgets/widget-button/widget-button.scss":
929
+ /*!*********************************************************************************************************************!*\
930
+ !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/widgets/widget-button/widget-button.scss ***!
931
+ \*********************************************************************************************************************/
932
+ /*! no static exports found */
933
+ /***/ (function(module, exports, __webpack_require__) {
281
934
 
282
- var onSubmitHandler = function onSubmitHandler(values, _ref) {
283
- var setSubmitting = _ref.setSubmitting,
284
- resetForm = _ref.resetForm;
935
+ // extracted by mini-css-extract-plugin
936
+ module.exports = {"left":"cv--left--789pr","right":"cv--right--1P8qt","button":"cv--button--24q_F","chevron":"cv--chevron--3M27X","gradientLeft":"cv--gradientLeft--3fkiw","gradientRight":"cv--gradientRight--2RDDy","extendedClickableAreaRight":"cv--extendedClickableAreaRight--13dgy","extendedClickableAreaLeft":"cv--extendedClickableAreaLeft--37LtK","videoTopPos":"cv--videoTopPos--1XTRO","topPos":"cv--topPos--3_p_J"};
285
937
 
286
- /**
287
- * validationSchema.cast will coerce the values to the types defined in validationSchema.
288
- * This is useful for trimming inputs:
289
- * e.g. if a value field has type Yup.string().trim(), it will be automatically trimmed.
290
- */
291
- var formattedData = castValuesOnSubmit && props.validationSchema ? props.validationSchema.cast(values) : values;
292
- onSubmit(formattedData, function () {
293
- resetOnSubmit && resetForm();
294
- setSubmitting(false);
295
- });
296
- };
938
+ /***/ }),
297
939
 
298
- var initialStatus = {
299
- allowInitialSubmit: props.allowInitialSubmit
300
- };
301
- return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](formik__WEBPACK_IMPORTED_MODULE_1__["Formik"], Object.assign({
302
- enableReinitialize: true
303
- }, formikProps, {
304
- initialValues: formattedInitialValues,
305
- onSubmit: onSubmitHandler,
306
- initialStatus: initialStatus
307
- }), _common_src_backbone_utils_FunctionHelper__WEBPACK_IMPORTED_MODULE_2__["FunctionHelper"].isFunction(props.children) ? function (f) {
308
- return props.children(f);
309
- } : react__WEBPACK_IMPORTED_MODULE_0__["Children"].count(props.children) ? props.children : null);
310
- }
311
- function useFormikContextWrapper() {
312
- return Object(formik__WEBPACK_IMPORTED_MODULE_1__["useFormikContext"])();
313
- }
940
+ /***/ "../../libs/shared/src/enums/CssMeasurement.ts":
941
+ /*!*****************************************************************************************!*\
942
+ !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/enums/CssMeasurement.ts ***!
943
+ \*****************************************************************************************/
944
+ /*! exports provided: CssMeasurement */
945
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
946
+
947
+ "use strict";
948
+ __webpack_require__.r(__webpack_exports__);
949
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CssMeasurement", function() { return CssMeasurement; });
950
+ var CssMeasurement;
951
+
952
+ (function (CssMeasurement) {
953
+ CssMeasurement["Percentage"] = "%";
954
+ CssMeasurement["Pixels"] = "px";
955
+ })(CssMeasurement || (CssMeasurement = {}));
956
+
957
+ /***/ }),
958
+
959
+ /***/ "../../libs/shared/src/enums/WidgetContents.ts":
960
+ /*!*****************************************************************************************!*\
961
+ !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/enums/WidgetContents.ts ***!
962
+ \*****************************************************************************************/
963
+ /*! exports provided: WidgetContents */
964
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
965
+
966
+ "use strict";
967
+ __webpack_require__.r(__webpack_exports__);
968
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WidgetContents", function() { return WidgetContents; });
969
+ var WidgetContents;
970
+
971
+ (function (WidgetContents) {
972
+ WidgetContents["Videos"] = "videos";
973
+ WidgetContents["Series"] = "series";
974
+ WidgetContents["Subjects"] = "subjects";
975
+ WidgetContents["Playlists"] = "playlists";
976
+ WidgetContents["UserChannels"] = "user channels";
977
+ WidgetContents["Interactives"] = "interactives";
978
+ WidgetContents["Clips"] = "clips";
979
+ })(WidgetContents || (WidgetContents = {}));
980
+
981
+ /***/ }),
982
+
983
+ /***/ "../../libs/shared/src/enums/WidgetInteraction.ts":
984
+ /*!********************************************************************************************!*\
985
+ !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/enums/WidgetInteraction.ts ***!
986
+ \********************************************************************************************/
987
+ /*! exports provided: WidgetInteraction */
988
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
989
+
990
+ "use strict";
991
+ __webpack_require__.r(__webpack_exports__);
992
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WidgetInteraction", function() { return WidgetInteraction; });
993
+ var WidgetInteraction;
994
+
995
+ (function (WidgetInteraction) {
996
+ WidgetInteraction["Init"] = "init";
997
+ WidgetInteraction["Next"] = "next";
998
+ WidgetInteraction["Previous"] = "previous";
999
+ WidgetInteraction["Resize"] = "resize";
1000
+ WidgetInteraction["Drag"] = "drag";
1001
+ })(WidgetInteraction || (WidgetInteraction = {}));
314
1002
 
315
1003
  /***/ }),
316
1004
 
317
- /***/ "../../libs/shared/src/hooks/UseCanSubmitForm.ts":
318
- /*!*******************************************************************************************!*\
319
- !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/hooks/UseCanSubmitForm.ts ***!
320
- \*******************************************************************************************/
321
- /*! exports provided: useCanSubmitForm */
1005
+ /***/ "../../libs/shared/src/hooks/UseHover.ts":
1006
+ /*!***********************************************************************************!*\
1007
+ !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/hooks/UseHover.ts ***!
1008
+ \***********************************************************************************/
1009
+ /*! exports provided: useHover, useHoverIntent */
322
1010
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
323
1011
 
324
1012
  "use strict";
325
1013
  __webpack_require__.r(__webpack_exports__);
326
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useCanSubmitForm", function() { return useCanSubmitForm; });
1014
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useHover", function() { return useHover; });
1015
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useHoverIntent", function() { return useHoverIntent; });
327
1016
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
328
1017
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1018
+ /* harmony import */ var _common_src_backbone_utils_FunctionHelper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/src/backbone/utils/FunctionHelper */ "../../libs/common/src/backbone/utils/FunctionHelper.ts");
329
1019
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
330
1020
 
331
1021
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -339,61 +1029,129 @@ function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(
339
1029
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
340
1030
 
341
1031
 
1032
+
1033
+ var defaultOptions = {
1034
+ className: '',
1035
+ delay: 0
1036
+ };
342
1037
  /**
343
- * useCanSubmitForm determines if a form can be submitted.
344
- *
345
- * It will return true if a form is valid and has been changed from it's initial state.
346
- *
347
- * A common use case for this is determining whether or not to enable
348
- * a submit button in a form.
1038
+ * This hook detects hover events on an element.
1039
+ * This should only be used where CSS hover events won't suffice for what you are trying to achieve.
349
1040
  */
350
1041
 
351
- function useCanSubmitForm(formikProps) {
352
- var _a;
1042
+ function useHover() {
1043
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultOptions;
353
1044
 
354
1045
  var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__["useState"](false),
355
1046
  _React$useState2 = _slicedToArray(_React$useState, 2),
356
- canSubmit = _React$useState2[0],
357
- setCanSubmit = _React$useState2[1];
1047
+ isHovering = _React$useState2[0],
1048
+ setHovering = _React$useState2[1];
358
1049
 
359
- react__WEBPACK_IMPORTED_MODULE_0__["useEffect"](function () {
360
- var _a;
1050
+ var ref = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](null);
1051
+ var triggerHover = _common_src_backbone_utils_FunctionHelper__WEBPACK_IMPORTED_MODULE_1__["FunctionHelper"].throttle(function () {
1052
+ var _a, _b;
361
1053
 
362
- if (!formikProps.isValid) {
363
- setCanSubmit(false);
364
- return;
365
- } // If the form values have changed of if allowInitialSubmit is true, set canSubmit to true.
1054
+ if (options.className) (_b = (_a = ref.current) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.add(options.className);
1055
+ setHovering(true);
1056
+ }, options.delay, {
1057
+ leading: false
1058
+ });
366
1059
 
1060
+ var handleMouseOut = function handleMouseOut() {
1061
+ var _a, _b;
367
1062
 
368
- if (formikProps.dirty || ((_a = formikProps.initialStatus) === null || _a === void 0 ? void 0 : _a.allowInitialSubmit)) setCanSubmit(true);else setCanSubmit(false);
369
- }, [formikProps.isValid, (_a = formikProps.initialStatus) === null || _a === void 0 ? void 0 : _a.allowInitialSubmit, formikProps.dirty, formikProps.values]);
370
- react__WEBPACK_IMPORTED_MODULE_0__["useEffect"](function () {
371
- if (formikProps.isSubmitting) setCanSubmit(false);
372
- }, [formikProps.isSubmitting]);
373
- return canSubmit;
1063
+ if (_common_src_backbone_utils_FunctionHelper__WEBPACK_IMPORTED_MODULE_1__["FunctionHelper"].isFunction(triggerHover.cancel)) triggerHover.cancel();
1064
+ if (options.className) (_b = (_a = ref.current) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.remove(options.className);
1065
+ setHovering(false);
1066
+ };
1067
+
1068
+ react__WEBPACK_IMPORTED_MODULE_0__["useLayoutEffect"](function () {
1069
+ var node = ref.current;
1070
+
1071
+ if (node) {
1072
+ node.addEventListener('mouseenter', triggerHover);
1073
+ node.addEventListener('mouseleave', handleMouseOut);
1074
+ return function () {
1075
+ node.removeEventListener('mouseenter', triggerHover);
1076
+ node.removeEventListener('mouseleave', handleMouseOut);
1077
+ };
1078
+ }
1079
+ }, [ref.current, triggerHover, handleMouseOut]);
1080
+ return [ref, isHovering];
1081
+ }
1082
+ function useHoverIntent(className) {
1083
+ return useHover({
1084
+ className: className,
1085
+ delay: 275
1086
+ });
374
1087
  }
375
1088
 
376
1089
  /***/ }),
377
1090
 
378
- /***/ "../../libs/shared/src/utils/FormHelper.ts":
1091
+ /***/ "../../libs/shared/src/utils/DragHelper.ts":
379
1092
  /*!*************************************************************************************!*\
380
- !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/utils/FormHelper.ts ***!
1093
+ !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/utils/DragHelper.ts ***!
381
1094
  \*************************************************************************************/
382
- /*! exports provided: FormHelper */
1095
+ /*! exports provided: DragHelper */
1096
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1097
+
1098
+ "use strict";
1099
+ __webpack_require__.r(__webpack_exports__);
1100
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragHelper", function() { return DragHelper; });
1101
+ /* harmony import */ var _common_src_backbone_utils_FunctionHelper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../common/src/backbone/utils/FunctionHelper */ "../../libs/common/src/backbone/utils/FunctionHelper.ts");
1102
+
1103
+ var blankImage = new Image();
1104
+ blankImage.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=';
1105
+ var DragHelper = {
1106
+ // This removes the image that appears when you drag a draggable HTML element
1107
+ hideDragImage: function hideDragImage(event) {
1108
+ if (!event.dataTransfer.setDragImage || !_common_src_backbone_utils_FunctionHelper__WEBPACK_IMPORTED_MODULE_0__["FunctionHelper"].isFunction(event.dataTransfer.setDragImage)) return;
1109
+ event.dataTransfer.setDragImage(blankImage, 0, 0);
1110
+ }
1111
+ };
1112
+
1113
+ /***/ }),
1114
+
1115
+ /***/ "../../libs/shared/src/utils/WidgetHelper.ts":
1116
+ /*!***************************************************************************************!*\
1117
+ !*** C:/ClickView Projects/@clickview/packages/libs/shared/src/utils/WidgetHelper.ts ***!
1118
+ \***************************************************************************************/
1119
+ /*! exports provided: WidgetHelper */
383
1120
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
384
1121
 
385
1122
  "use strict";
386
1123
  __webpack_require__.r(__webpack_exports__);
387
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormHelper", function() { return FormHelper; });
388
- /* harmony import */ var formik__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! formik */ "../../../node_modules/formik/dist/formik.esm.js");
1124
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WidgetHelper", function() { return WidgetHelper; });
1125
+ /* harmony import */ var _analytics_src_interfaces__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../analytics/src/interfaces */ "../../libs/analytics/src/interfaces/index.ts");
389
1126
 
390
- var FormHelper = {
391
- getCustomFormControlClassName: function getCustomFormControlClassName(errors, touched, attribute, additionalClassName) {
392
- var className = 'form-control'; // Using getIn as it supports dot notation
1127
+ var WidgetHelper = {
1128
+ /**
1129
+ * Used by both the FixedWidget and DynamicWidget
1130
+ */
1131
+ getSliderAnalyticsOptions: function getSliderAnalyticsOptions() {
1132
+ return {
1133
+ actionType: _analytics_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["UserAction"].Click,
1134
+ location: _analytics_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["LocationContext"].SlidingList,
1135
+ entity: _analytics_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["EntityType"].Widget,
1136
+ descriptor: _analytics_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["ClickDescriptor"].Slide
1137
+ };
1138
+ },
393
1139
 
394
- if (Object(formik__WEBPACK_IMPORTED_MODULE_0__["getIn"])(touched, attribute) && Object(formik__WEBPACK_IMPORTED_MODULE_0__["getIn"])(errors, attribute)) className += ' is-invalid';
395
- if (additionalClassName) className += " ".concat(additionalClassName);
396
- return className;
1140
+ /**
1141
+ * Used by both the FixedWidget and DynamicWidget
1142
+ */
1143
+ getSliderItemAnalyticsOptions: function getSliderItemAnalyticsOptions() {
1144
+ return {
1145
+ location: _analytics_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["LocationContext"].SlidingListItem
1146
+ };
1147
+ },
1148
+ getSliderHeadingAnalyticsOptions: function getSliderHeadingAnalyticsOptions() {
1149
+ return {
1150
+ actionType: _analytics_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["UserAction"].Click,
1151
+ location: _analytics_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["LocationContext"].SlidingList,
1152
+ entity: _analytics_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["EntityType"].Widget,
1153
+ descriptor: _analytics_src_interfaces__WEBPACK_IMPORTED_MODULE_0__["ClickDescriptor"].Title
1154
+ };
397
1155
  }
398
1156
  };
399
1157