@clickview/lite 0.0.18-rc.2 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/11.chunk.css +14 -8
- package/dist/css/12.chunk.css +15 -5
- package/dist/css/13.chunk.css +5 -13
- package/dist/css/14.chunk.css +6 -6
- package/dist/css/15.chunk.css +15 -3
- package/dist/css/16.chunk.css +9 -3
- package/dist/css/17.chunk.css +4 -2
- package/dist/css/19.chunk.css +2 -6
- package/dist/css/2.chunk.css +0 -14
- package/dist/css/20.chunk.css +2 -2
- package/dist/css/21.chunk.css +7 -1
- package/dist/css/22.chunk.css +2 -2
- package/dist/css/23.chunk.css +2 -2
- package/dist/css/24.chunk.css +1 -1
- package/dist/css/25.chunk.css +2 -2
- package/dist/css/26.chunk.css +2 -2
- package/dist/css/27.chunk.css +1 -67
- package/dist/css/28.chunk.css +2 -48
- package/dist/css/29.chunk.css +2 -45
- package/dist/css/3.chunk.css +7 -13
- package/dist/css/31.chunk.css +1 -6
- package/dist/css/34.chunk.css +1 -5
- package/dist/css/38.chunk.css +2 -36
- package/dist/css/4.chunk.css +13 -5
- package/dist/css/44.chunk.css +1 -1
- package/dist/css/46.chunk.css +2 -0
- package/dist/css/5.chunk.css +8 -2
- package/dist/css/6.chunk.css +2 -0
- package/dist/libs/common/src/react/utils/ArrayHelper.d.ts +1 -1
- package/dist/libs/shared/src/utils/ImageHelper.d.ts +1 -1
- package/dist/scripts/0-d95e8444c4.chunk.js +1 -0
- package/dist/scripts/{1-f6fa17226d.chunk.js → 1-2b6afccaa5.chunk.js} +3 -3
- package/dist/scripts/11-d419aa0984.chunk.js +1 -0
- package/dist/scripts/12-b38a27f951.chunk.js +1 -0
- package/dist/scripts/13-1ad100c6fa.chunk.js +1 -0
- package/dist/scripts/14-9f08e07fae.chunk.js +1 -0
- package/dist/scripts/15-ee9fb81b9f.chunk.js +1 -0
- package/dist/scripts/{14-11868e2868.chunk.js → 16-8fe78e04c2.chunk.js} +1 -1
- package/dist/scripts/17-ea7fe3ea28.chunk.js +1 -0
- package/dist/scripts/18-1bb07c0b9b.chunk.js +1 -0
- package/dist/scripts/19-c869d34687.chunk.js +1 -0
- package/dist/scripts/2-a816feb2a1.chunk.js +1 -0
- package/dist/scripts/20-43ec005977.chunk.js +1 -0
- package/dist/scripts/21-8513db8251.chunk.js +1 -0
- package/dist/scripts/22-d4adb2384c.chunk.js +1 -0
- package/dist/scripts/23-d8b5b9ad2c.chunk.js +1 -0
- package/dist/scripts/{21-891207049a.chunk.js → 24-f2913e26e2.chunk.js} +1 -1
- package/dist/scripts/25-68705527ea.chunk.js +1 -0
- package/dist/scripts/26-7d25448f1c.chunk.js +1 -0
- package/dist/scripts/27-bab6c9f5c7.chunk.js +1 -0
- package/dist/scripts/28-080baa3fbc.chunk.js +1 -0
- package/dist/scripts/29-5e9889b68a.chunk.js +1 -0
- package/dist/scripts/3-6e2ac46662.chunk.js +7 -0
- package/dist/scripts/{27-f26afdae78.chunk.js → 30-cdbeea4fc5.chunk.js} +1 -1
- package/dist/scripts/31-6fa4413cdb.chunk.js +1 -0
- package/dist/scripts/32-d4725d3b7d.chunk.js +1 -0
- package/dist/scripts/33-bec24aab85.chunk.js +1 -0
- package/dist/scripts/34-c42c6cf42a.chunk.js +1 -0
- package/dist/scripts/{33-4579af9cf9.chunk.js → 35-4512b236f2.chunk.js} +1 -1
- package/dist/scripts/{34-d8b96d9f9f.chunk.js → 36-eede7769b2.chunk.js} +1 -1
- package/dist/scripts/37-80ed339c4f.chunk.js +1 -0
- package/dist/scripts/{37-afd3d321e3.chunk.js → 38-c11d4c88e3.chunk.js} +1 -1
- package/dist/scripts/{38-6ad53aa15b.chunk.js → 39-d0e74fb062.chunk.js} +1 -1
- package/dist/scripts/4-ea79bf1533.chunk.js +1 -0
- package/dist/scripts/{39-46c747b1d9.chunk.js → 40-d764e6157b.chunk.js} +1 -1
- package/dist/scripts/{40-c1b8806b1c.chunk.js → 41-0aa7093354.chunk.js} +1 -1
- package/dist/scripts/42-3d8c5fa14c.chunk.js +1 -0
- package/dist/scripts/43-969806e81e.chunk.js +1 -0
- package/dist/scripts/44-e8e3fef4c3.chunk.js +1 -0
- package/dist/scripts/45-d8f70269d6.chunk.js +1 -0
- package/dist/scripts/{44-7f92272274.chunk.js → 46-946ae22c1f.chunk.js} +1 -1
- package/dist/scripts/47-1579412cd0.chunk.js +1 -0
- package/dist/scripts/48-fdf97c1c73.chunk.js +1 -0
- package/dist/scripts/49-970fc479c8.chunk.js +1 -0
- package/dist/scripts/5-d1bb14adf6.chunk.js +1 -0
- package/dist/scripts/50-1257ab0b95.chunk.js +1 -0
- package/dist/scripts/{50-8cb0d9cd7d.chunk.js → 51-ac615445f0.chunk.js} +1 -1
- package/dist/scripts/52-874629b81c.chunk.js +1 -0
- package/dist/scripts/{52-bfb2683b5d.chunk.js → 53-22e3d0793b.chunk.js} +1 -1
- package/dist/scripts/{53-3cf5cd5f69.chunk.js → 54-da1a07610c.chunk.js} +1 -1
- package/dist/scripts/{54-26807e3e49.chunk.js → 55-02647df65c.chunk.js} +1 -1
- package/dist/scripts/56-1b6e6349fa.chunk.js +1 -0
- package/dist/scripts/57-8fc09ba02c.chunk.js +1 -0
- package/dist/scripts/{56-d4abc25ec3.chunk.js → 58-8e5cc56c3f.chunk.js} +1 -1
- package/dist/scripts/6-0e53df2ece.chunk.js +1 -0
- package/dist/scripts/7-26822045b2.chunk.js +1 -0
- package/dist/scripts/8-7450eff674.chunk.js +1 -0
- package/dist/scripts/9-f24f1577dd.chunk.js +1 -0
- package/dist/scripts/bundle-5ecb0c9441.min.js +1 -0
- package/dist/scripts/bundle-c6241bd7ac.min.js +1 -0
- package/dist/scripts/bundles.json +1 -1
- package/package.json +3 -3
- package/dist/css/0.chunk.css.map +0 -1
- package/dist/css/1.chunk.css +0 -146
- package/dist/css/1.chunk.css.map +0 -1
- package/dist/css/10.chunk.css +0 -20
- package/dist/css/10.chunk.css.map +0 -1
- package/dist/css/11.chunk.css.map +0 -1
- package/dist/css/12.chunk.css.map +0 -1
- package/dist/css/13.chunk.css.map +0 -1
- package/dist/css/14.chunk.css.map +0 -1
- package/dist/css/16.chunk.css.map +0 -1
- package/dist/css/18.chunk.css.map +0 -1
- package/dist/css/19.chunk.css.map +0 -1
- package/dist/css/21.chunk.css.map +0 -1
- package/dist/css/22.chunk.css.map +0 -1
- package/dist/css/23.chunk.css.map +0 -1
- package/dist/css/24.chunk.css.map +0 -1
- package/dist/css/25.chunk.css.map +0 -1
- package/dist/css/26.chunk.css.map +0 -1
- package/dist/css/27.chunk.css.map +0 -1
- package/dist/css/28.chunk.css.map +0 -1
- package/dist/css/29.chunk.css.map +0 -1
- package/dist/css/3.chunk.css.map +0 -1
- package/dist/css/30.chunk.css.map +0 -1
- package/dist/css/31.chunk.css.map +0 -1
- package/dist/css/32.chunk.css +0 -5
- package/dist/css/32.chunk.css.map +0 -1
- package/dist/css/34.chunk.css.map +0 -1
- package/dist/css/35.chunk.css +0 -7
- package/dist/css/35.chunk.css.map +0 -1
- package/dist/css/36.chunk.css +0 -4
- package/dist/css/36.chunk.css.map +0 -1
- package/dist/css/37.chunk.css +0 -4
- package/dist/css/37.chunk.css.map +0 -1
- package/dist/css/38.chunk.css.map +0 -1
- package/dist/css/4.chunk.css.map +0 -1
- package/dist/css/45.chunk.css +0 -9
- package/dist/css/45.chunk.css.map +0 -1
- package/dist/css/5.chunk.css.map +0 -1
- package/dist/css/9.chunk.css +0 -24
- package/dist/css/lite-app.css.map +0 -1
- package/dist/scripts/0-525bd75473.chunk.js +0 -1
- package/dist/scripts/0.chunk.js +0 -478
- package/dist/scripts/0.chunk.js.map +0 -1
- package/dist/scripts/1.chunk.js +0 -621
- package/dist/scripts/1.chunk.js.map +0 -1
- package/dist/scripts/10-f3b34b2d35.chunk.js +0 -1
- package/dist/scripts/10.chunk.js +0 -400
- package/dist/scripts/10.chunk.js.map +0 -1
- package/dist/scripts/11-a698af3f1c.chunk.js +0 -1
- package/dist/scripts/11.chunk.js +0 -1289
- package/dist/scripts/11.chunk.js.map +0 -1
- package/dist/scripts/12-9ace90fcbc.chunk.js +0 -1
- package/dist/scripts/12.chunk.js +0 -1059
- package/dist/scripts/12.chunk.js.map +0 -1
- package/dist/scripts/13-3a4f103546.chunk.js +0 -1
- package/dist/scripts/13.chunk.js +0 -751
- package/dist/scripts/13.chunk.js.map +0 -1
- package/dist/scripts/14.chunk.js +0 -425
- package/dist/scripts/14.chunk.js.map +0 -1
- package/dist/scripts/15-78ff5e8be2.chunk.js +0 -1
- package/dist/scripts/15.chunk.js +0 -609
- package/dist/scripts/15.chunk.js.map +0 -1
- package/dist/scripts/16-22f6224811.chunk.js +0 -1
- package/dist/scripts/16.chunk.js +0 -648
- package/dist/scripts/16.chunk.js.map +0 -1
- package/dist/scripts/17-afe6281dd5.chunk.js +0 -1
- package/dist/scripts/17.chunk.js +0 -541
- package/dist/scripts/17.chunk.js.map +0 -1
- package/dist/scripts/18-47be31c0b6.chunk.js +0 -1
- package/dist/scripts/18.chunk.js +0 -766
- package/dist/scripts/18.chunk.js.map +0 -1
- package/dist/scripts/19-89c0b2c20e.chunk.js +0 -1
- package/dist/scripts/19.chunk.js +0 -647
- package/dist/scripts/19.chunk.js.map +0 -1
- package/dist/scripts/2-3b37480a80.chunk.js +0 -7
- package/dist/scripts/2.chunk.js +0 -8259
- package/dist/scripts/2.chunk.js.map +0 -1
- package/dist/scripts/20-32ac3fe0b9.chunk.js +0 -1
- package/dist/scripts/20.chunk.js +0 -122
- package/dist/scripts/20.chunk.js.map +0 -1
- package/dist/scripts/21.chunk.js +0 -1571
- package/dist/scripts/21.chunk.js.map +0 -1
- package/dist/scripts/22-24236e6723.chunk.js +0 -1
- package/dist/scripts/22.chunk.js +0 -1387
- package/dist/scripts/22.chunk.js.map +0 -1
- package/dist/scripts/23-7b425169bc.chunk.js +0 -1
- package/dist/scripts/23.chunk.js +0 -1121
- package/dist/scripts/23.chunk.js.map +0 -1
- package/dist/scripts/24-40edd30087.chunk.js +0 -1
- package/dist/scripts/24.chunk.js +0 -1348
- package/dist/scripts/24.chunk.js.map +0 -1
- package/dist/scripts/25-887b9ef587.chunk.js +0 -1
- package/dist/scripts/25.chunk.js +0 -1137
- package/dist/scripts/25.chunk.js.map +0 -1
- package/dist/scripts/26-cbe0ff0f77.chunk.js +0 -1
- package/dist/scripts/26.chunk.js +0 -906
- package/dist/scripts/26.chunk.js.map +0 -1
- package/dist/scripts/27.chunk.js +0 -1143
- package/dist/scripts/27.chunk.js.map +0 -1
- package/dist/scripts/28-70414fd373.chunk.js +0 -1
- package/dist/scripts/28.chunk.js +0 -656
- package/dist/scripts/28.chunk.js.map +0 -1
- package/dist/scripts/29-944b5c01a7.chunk.js +0 -1
- package/dist/scripts/29.chunk.js +0 -616
- package/dist/scripts/29.chunk.js.map +0 -1
- package/dist/scripts/3-233f573a92.chunk.js +0 -1
- package/dist/scripts/3.chunk.js +0 -585
- package/dist/scripts/3.chunk.js.map +0 -1
- package/dist/scripts/30-3a229887e9.chunk.js +0 -1
- package/dist/scripts/30.chunk.js +0 -557
- package/dist/scripts/30.chunk.js.map +0 -1
- package/dist/scripts/31-ab038bfc0c.chunk.js +0 -1
- package/dist/scripts/31.chunk.js +0 -731
- package/dist/scripts/31.chunk.js.map +0 -1
- package/dist/scripts/32-8bd6703eef.chunk.js +0 -1
- package/dist/scripts/32.chunk.js +0 -957
- package/dist/scripts/32.chunk.js.map +0 -1
- package/dist/scripts/33.chunk.js +0 -938
- package/dist/scripts/33.chunk.js.map +0 -1
- package/dist/scripts/34.chunk.js +0 -523
- package/dist/scripts/34.chunk.js.map +0 -1
- package/dist/scripts/35-666d815525.chunk.js +0 -1
- package/dist/scripts/35.chunk.js +0 -414
- package/dist/scripts/35.chunk.js.map +0 -1
- package/dist/scripts/36-02ce5f3538.chunk.js +0 -1
- package/dist/scripts/36.chunk.js +0 -404
- package/dist/scripts/36.chunk.js.map +0 -1
- package/dist/scripts/37.chunk.js +0 -245
- package/dist/scripts/37.chunk.js.map +0 -1
- package/dist/scripts/38.chunk.js +0 -343
- package/dist/scripts/38.chunk.js.map +0 -1
- package/dist/scripts/39.chunk.js +0 -318
- package/dist/scripts/39.chunk.js.map +0 -1
- package/dist/scripts/4-6942fee782.chunk.js +0 -1
- package/dist/scripts/4.chunk.js +0 -1030
- package/dist/scripts/4.chunk.js.map +0 -1
- package/dist/scripts/40.chunk.js +0 -236
- package/dist/scripts/40.chunk.js.map +0 -1
- package/dist/scripts/41-f4c23477e3.chunk.js +0 -1
- package/dist/scripts/41.chunk.js +0 -231
- package/dist/scripts/41.chunk.js.map +0 -1
- package/dist/scripts/42-7a5b92d70b.chunk.js +0 -1
- package/dist/scripts/42.chunk.js +0 -350
- package/dist/scripts/42.chunk.js.map +0 -1
- package/dist/scripts/43-97193a87df.chunk.js +0 -1
- package/dist/scripts/43.chunk.js +0 -225
- package/dist/scripts/43.chunk.js.map +0 -1
- package/dist/scripts/44.chunk.js +0 -318
- package/dist/scripts/44.chunk.js.map +0 -1
- package/dist/scripts/45-265f1a7a42.chunk.js +0 -1
- package/dist/scripts/45.chunk.js +0 -64
- package/dist/scripts/45.chunk.js.map +0 -1
- package/dist/scripts/46-a594ad7eba.chunk.js +0 -1
- package/dist/scripts/46.chunk.js +0 -108
- package/dist/scripts/46.chunk.js.map +0 -1
- package/dist/scripts/47-99777c20cf.chunk.js +0 -1
- package/dist/scripts/47.chunk.js +0 -110
- package/dist/scripts/47.chunk.js.map +0 -1
- package/dist/scripts/48-9880523c82.chunk.js +0 -1
- package/dist/scripts/48.chunk.js +0 -148
- package/dist/scripts/48.chunk.js.map +0 -1
- package/dist/scripts/49-5e718594e5.chunk.js +0 -1
- package/dist/scripts/49.chunk.js +0 -142
- package/dist/scripts/49.chunk.js.map +0 -1
- package/dist/scripts/5-2f631dcd74.chunk.js +0 -1
- package/dist/scripts/5.chunk.js +0 -3262
- package/dist/scripts/5.chunk.js.map +0 -1
- package/dist/scripts/50.chunk.js +0 -145
- package/dist/scripts/50.chunk.js.map +0 -1
- package/dist/scripts/51-211b643ca5.chunk.js +0 -1
- package/dist/scripts/51.chunk.js +0 -176
- package/dist/scripts/51.chunk.js.map +0 -1
- package/dist/scripts/52.chunk.js +0 -160
- package/dist/scripts/52.chunk.js.map +0 -1
- package/dist/scripts/53.chunk.js +0 -98
- package/dist/scripts/53.chunk.js.map +0 -1
- package/dist/scripts/54.chunk.js +0 -48
- package/dist/scripts/54.chunk.js.map +0 -1
- package/dist/scripts/55-d38be4860b.chunk.js +0 -1
- package/dist/scripts/55.chunk.js +0 -99
- package/dist/scripts/55.chunk.js.map +0 -1
- package/dist/scripts/56.chunk.js +0 -64
- package/dist/scripts/56.chunk.js.map +0 -1
- package/dist/scripts/57.chunk.js +0 -72
- package/dist/scripts/57.chunk.js.map +0 -1
- package/dist/scripts/58.chunk.js +0 -73
- package/dist/scripts/58.chunk.js.map +0 -1
- package/dist/scripts/59.chunk.js +0 -70
- package/dist/scripts/59.chunk.js.map +0 -1
- package/dist/scripts/6-4d72a3c3fc.chunk.js +0 -1
- package/dist/scripts/6.chunk.js +0 -24
- package/dist/scripts/6.chunk.js.map +0 -1
- package/dist/scripts/60.chunk.js +0 -32
- package/dist/scripts/60.chunk.js.map +0 -1
- package/dist/scripts/61.chunk.js +0 -29
- package/dist/scripts/61.chunk.js.map +0 -1
- package/dist/scripts/62.chunk.js +0 -27
- package/dist/scripts/62.chunk.js.map +0 -1
- package/dist/scripts/63.chunk.js +0 -67
- package/dist/scripts/63.chunk.js.map +0 -1
- package/dist/scripts/64.chunk.js +0 -80
- package/dist/scripts/64.chunk.js.map +0 -1
- package/dist/scripts/65.chunk.js +0 -65
- package/dist/scripts/65.chunk.js.map +0 -1
- package/dist/scripts/66.chunk.js +0 -67
- package/dist/scripts/66.chunk.js.map +0 -1
- package/dist/scripts/67.chunk.js +0 -104
- package/dist/scripts/67.chunk.js.map +0 -1
- package/dist/scripts/68.chunk.js +0 -69
- package/dist/scripts/68.chunk.js.map +0 -1
- package/dist/scripts/69.chunk.js +0 -89
- package/dist/scripts/69.chunk.js.map +0 -1
- package/dist/scripts/7-90ad392b55.chunk.js +0 -1
- package/dist/scripts/7.chunk.js +0 -327
- package/dist/scripts/7.chunk.js.map +0 -1
- package/dist/scripts/70.chunk.js +0 -36
- package/dist/scripts/70.chunk.js.map +0 -1
- package/dist/scripts/8.chunk.js +0 -470
- package/dist/scripts/8.chunk.js.map +0 -1
- package/dist/scripts/9-52877087ef.chunk.js +0 -1
- package/dist/scripts/9.chunk.js +0 -471
- package/dist/scripts/9.chunk.js.map +0 -1
- package/dist/scripts/bundle-87d75d901a.min.js +0 -1
- package/dist/scripts/bundle-99976c17a2.min.js +0 -1
- package/dist/scripts/bundle-9f5ad50596.min.js +0 -1
- package/dist/scripts/bundle-a4952df647.min.js +0 -1
- package/dist/scripts/bundle.js +0 -34769
- package/dist/scripts/bundle.js.map +0 -1
- /package/dist/css/{30.chunk.css → 8.chunk.css} +0 -0
package/dist/scripts/16.chunk.js
DELETED
|
@@ -1,648 +0,0 @@
|
|
|
1
|
-
(window["webpackJsonp_clickview_lite"] = window["webpackJsonp_clickview_lite"] || []).push([[16],{
|
|
2
|
-
|
|
3
|
-
/***/ "../../libs/shared/src/apps/playlists/components/playlist-list/PartialPlaylistList.tsx":
|
|
4
|
-
/*!*********************************************************************************************************************************!*\
|
|
5
|
-
!*** C:/ClickView Projects/@clickview/packages/libs/shared/src/apps/playlists/components/playlist-list/PartialPlaylistList.tsx ***!
|
|
6
|
-
\*********************************************************************************************************************************/
|
|
7
|
-
/*! exports provided: PartialPlaylistList */
|
|
8
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9
|
-
|
|
10
|
-
"use strict";
|
|
11
|
-
__webpack_require__.r(__webpack_exports__);
|
|
12
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PartialPlaylistList", function() { return PartialPlaylistList; });
|
|
13
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
14
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
15
|
-
/* harmony import */ var react_bootstrap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-bootstrap */ "react-bootstrap");
|
|
16
|
-
/* harmony import */ var react_bootstrap__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_bootstrap__WEBPACK_IMPORTED_MODULE_1__);
|
|
17
|
-
/* harmony import */ var _playlist_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./playlist.scss */ "../../libs/shared/src/apps/playlists/components/playlist-list/playlist.scss");
|
|
18
|
-
/* harmony import */ var _playlist_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_playlist_scss__WEBPACK_IMPORTED_MODULE_2__);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
PartialPlaylistList.defaultProps = {
|
|
23
|
-
numItems: 8
|
|
24
|
-
};
|
|
25
|
-
function PartialPlaylistList(props) {
|
|
26
|
-
const PARTIAL_PLAYLISTS = [...Array(props.numItems)];
|
|
27
|
-
const className = props.itemClassName || '';
|
|
28
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, props.showHeading && react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
|
|
29
|
-
className: `${_playlist_scss__WEBPACK_IMPORTED_MODULE_2___default.a.partialHeading} partial-loading-background`
|
|
30
|
-
}), react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react_bootstrap__WEBPACK_IMPORTED_MODULE_1__["Row"], null, PARTIAL_PLAYLISTS.map((p, idx) => react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react_bootstrap__WEBPACK_IMPORTED_MODULE_1__["Col"], {
|
|
31
|
-
key: idx,
|
|
32
|
-
xs: 6,
|
|
33
|
-
sm: 4,
|
|
34
|
-
md: 3,
|
|
35
|
-
lg: 2,
|
|
36
|
-
className: className
|
|
37
|
-
}, react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
|
|
38
|
-
className: 'py-2'
|
|
39
|
-
}, react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
|
|
40
|
-
className: `${_playlist_scss__WEBPACK_IMPORTED_MODULE_2___default.a.basePlaylistItem} partial-loading-background`
|
|
41
|
-
}))))));
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/***/ }),
|
|
45
|
-
|
|
46
|
-
/***/ "../../libs/shared/src/components/widgets/dynamic-widget/DynamicWidget.tsx":
|
|
47
|
-
/*!*********************************************************************************************************************!*\
|
|
48
|
-
!*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/widgets/dynamic-widget/DynamicWidget.tsx ***!
|
|
49
|
-
\*********************************************************************************************************************/
|
|
50
|
-
/*! exports provided: DynamicWidget, PartialDynamicWidget */
|
|
51
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
52
|
-
|
|
53
|
-
"use strict";
|
|
54
|
-
__webpack_require__.r(__webpack_exports__);
|
|
55
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DynamicWidget", function() { return DynamicWidget; });
|
|
56
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PartialDynamicWidget", function() { return PartialDynamicWidget; });
|
|
57
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
58
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
59
|
-
/* 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");
|
|
60
|
-
/* 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");
|
|
61
|
-
/* harmony import */ var _common_src_react_utils_ArrayHelper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../common/src/react/utils/ArrayHelper */ "../../libs/common/src/react/utils/ArrayHelper.ts");
|
|
62
|
-
/* harmony import */ var _hooks_UseResizeListener__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../hooks/UseResizeListener */ "../../libs/shared/src/hooks/UseResizeListener.ts");
|
|
63
|
-
/* harmony import */ var _hooks_UseLazyLoad__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../hooks/UseLazyLoad */ "../../libs/shared/src/hooks/UseLazyLoad.ts");
|
|
64
|
-
/* harmony import */ var _enums_CssMeasurement__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../enums/CssMeasurement */ "../../libs/shared/src/enums/CssMeasurement.ts");
|
|
65
|
-
/* harmony import */ var _widget_button_WidgetButton__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../widget-button/WidgetButton */ "../../libs/shared/src/components/widgets/widget-button/WidgetButton.tsx");
|
|
66
|
-
/* harmony import */ var _items_subject_widget_item_PartialSubjectWidgetItem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../items/subject-widget-item/PartialSubjectWidgetItem */ "../../libs/shared/src/components/widgets/items/subject-widget-item/PartialSubjectWidgetItem.tsx");
|
|
67
|
-
/* harmony import */ var _sliding_list_SlidingListContainer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../sliding-list/SlidingListContainer */ "../../libs/shared/src/components/widgets/sliding-list/SlidingListContainer.tsx");
|
|
68
|
-
/* harmony import */ var _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../enums/WidgetInteraction */ "../../libs/shared/src/enums/WidgetInteraction.ts");
|
|
69
|
-
/* harmony import */ var _text_Text__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../text/Text */ "../../libs/shared/src/components/text/Text.tsx");
|
|
70
|
-
/* harmony import */ var _utils_PartialLoadingHelper__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../utils/PartialLoadingHelper */ "../../libs/shared/src/utils/PartialLoadingHelper.ts");
|
|
71
|
-
/* harmony import */ var _DynamicWidgetEventHandlers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./DynamicWidgetEventHandlers */ "../../libs/shared/src/components/widgets/dynamic-widget/DynamicWidgetEventHandlers.ts");
|
|
72
|
-
/* harmony import */ var _DynamicWidgetReducer__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./DynamicWidgetReducer */ "../../libs/shared/src/components/widgets/dynamic-widget/DynamicWidgetReducer.tsx");
|
|
73
|
-
/* harmony import */ var _dynamic_widget_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./dynamic-widget.scss */ "../../libs/shared/src/components/widgets/dynamic-widget/dynamic-widget.scss");
|
|
74
|
-
/* harmony import */ var _dynamic_widget_scss__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_dynamic_widget_scss__WEBPACK_IMPORTED_MODULE_15__);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
const namespace = 'shared.dynamicWidget';
|
|
92
|
-
function DynamicWidget(props) {
|
|
93
|
-
const {
|
|
94
|
-
childComponent: WidgetItemComponent,
|
|
95
|
-
endComponent: EndComponent
|
|
96
|
-
} = props;
|
|
97
|
-
const [state, dispatch] = react__WEBPACK_IMPORTED_MODULE_0__["useReducer"](_DynamicWidgetReducer__WEBPACK_IMPORTED_MODULE_14__["DynamicWidgetReducer"], _DynamicWidgetReducer__WEBPACK_IMPORTED_MODULE_14__["initialSliderState"]); // A snapshot of the widget state is captured on the very first `Drag` event as a point of reference
|
|
98
|
-
|
|
99
|
-
const [widgetSnapshot, setWidgetSnapshot] = react__WEBPACK_IMPORTED_MODULE_0__["useState"](null);
|
|
100
|
-
const elementRefs = {
|
|
101
|
-
container: react__WEBPACK_IMPORTED_MODULE_0__["useRef"](null),
|
|
102
|
-
firstElement: react__WEBPACK_IMPORTED_MODULE_0__["useRef"](null),
|
|
103
|
-
lastElement: react__WEBPACK_IMPORTED_MODULE_0__["useRef"](null)
|
|
104
|
-
};
|
|
105
|
-
Object(_hooks_UseResizeListener__WEBPACK_IMPORTED_MODULE_4__["useResizeListener"])(Object(_DynamicWidgetEventHandlers__WEBPACK_IMPORTED_MODULE_13__["getResizeHandler"])(elementRefs, dispatch), Object(_DynamicWidgetEventHandlers__WEBPACK_IMPORTED_MODULE_13__["getResizeEndHandler"])(elementRefs.container));
|
|
106
|
-
const {
|
|
107
|
-
ref,
|
|
108
|
-
inView
|
|
109
|
-
} = Object(_hooks_UseLazyLoad__WEBPACK_IMPORTED_MODULE_5__["useLazyLoad"])(props.lazyLoad);
|
|
110
|
-
let widgetData = props.collection;
|
|
111
|
-
if (!props.collection && _common_src_backbone_utils_FunctionHelper__WEBPACK_IMPORTED_MODULE_2__["FunctionHelper"].isFunction(props.fetch)) widgetData = props.fetch(inView);
|
|
112
|
-
/**
|
|
113
|
-
* Once the widget data has been set, we can initialize the reducer. This is because
|
|
114
|
-
* the reducer depends on the refs being set, but they don't get set until the markup has been loaded.
|
|
115
|
-
*/
|
|
116
|
-
|
|
117
|
-
react__WEBPACK_IMPORTED_MODULE_0__["useEffect"](() => {
|
|
118
|
-
if (!widgetData || _common_src_react_utils_ObjectHelper__WEBPACK_IMPORTED_MODULE_1__["ObjectHelper"].isEmpty(widgetData)) return;
|
|
119
|
-
dispatch({
|
|
120
|
-
type: _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_10__["WidgetInteraction"].Init,
|
|
121
|
-
payload: elementRefs
|
|
122
|
-
});
|
|
123
|
-
}, [widgetData]);
|
|
124
|
-
|
|
125
|
-
function getWidgetItems() {
|
|
126
|
-
if (!widgetData) return;
|
|
127
|
-
const items = widgetData.map(widgetItem => {
|
|
128
|
-
let itemRef;
|
|
129
|
-
if (widgetItem === _common_src_react_utils_ArrayHelper__WEBPACK_IMPORTED_MODULE_3__["ArrayHelper"].first(widgetData)) itemRef = elementRefs.firstElement;
|
|
130
|
-
if (widgetItem === _common_src_react_utils_ArrayHelper__WEBPACK_IMPORTED_MODULE_3__["ArrayHelper"].last(widgetData) && !EndComponent) itemRef = elementRefs.lastElement;
|
|
131
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
|
|
132
|
-
key: widgetItem.id,
|
|
133
|
-
ref: itemRef,
|
|
134
|
-
className: _dynamic_widget_scss__WEBPACK_IMPORTED_MODULE_15___default.a.itemSpacing
|
|
135
|
-
}, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](WidgetItemComponent, {
|
|
136
|
-
data: widgetItem,
|
|
137
|
-
appLink: props.childAppLink
|
|
138
|
-
}));
|
|
139
|
-
});
|
|
140
|
-
if (EndComponent) items.push(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
|
|
141
|
-
key: 'end-widget-component',
|
|
142
|
-
ref: elementRefs.lastElement,
|
|
143
|
-
className: _dynamic_widget_scss__WEBPACK_IMPORTED_MODULE_15___default.a.itemSpacing
|
|
144
|
-
}, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](EndComponent, null)));
|
|
145
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, items);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
const widgetItems = react__WEBPACK_IMPORTED_MODULE_0__["useMemo"](getWidgetItems, [widgetData]);
|
|
149
|
-
if (widgetData && !widgetData.length) return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null);
|
|
150
|
-
|
|
151
|
-
if (!widgetData || _common_src_react_utils_ObjectHelper__WEBPACK_IMPORTED_MODULE_1__["ObjectHelper"].isEmpty(widgetData)) {
|
|
152
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
|
|
153
|
-
ref: ref
|
|
154
|
-
}, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](PartialDynamicWidget, null));
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, props.headingPhraseKey && react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("h4", {
|
|
158
|
-
className: 'd-inline-block mr-2 pl-1 mb-2'
|
|
159
|
-
}, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_text_Text__WEBPACK_IMPORTED_MODULE_11__["Text"], {
|
|
160
|
-
namespace: namespace,
|
|
161
|
-
phrase: props.headingPhraseKey
|
|
162
|
-
})), react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
|
|
163
|
-
className: 'position-relative px-1'
|
|
164
|
-
}, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_widget_button_WidgetButton__WEBPACK_IMPORTED_MODULE_7__["WidgetButton"], {
|
|
165
|
-
direction: _widget_button_WidgetButton__WEBPACK_IMPORTED_MODULE_7__["WidgetButtonDirection"].Left,
|
|
166
|
-
onClick: () => dispatch({
|
|
167
|
-
type: _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_10__["WidgetInteraction"].Previous
|
|
168
|
-
}),
|
|
169
|
-
hide: state.hideLeftButton,
|
|
170
|
-
useGradientBackdrop: true
|
|
171
|
-
}), react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
|
|
172
|
-
className: 'overflow-hidden'
|
|
173
|
-
}, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_sliding_list_SlidingListContainer__WEBPACK_IMPORTED_MODULE_9__["SlidingListContainer"], {
|
|
174
|
-
position: state.offset,
|
|
175
|
-
positionType: _enums_CssMeasurement__WEBPACK_IMPORTED_MODULE_6__["CssMeasurement"].Pixels,
|
|
176
|
-
onDrag: Object(_DynamicWidgetEventHandlers__WEBPACK_IMPORTED_MODULE_13__["getDragHandler"])(elementRefs.container, state, dispatch, widgetSnapshot, setWidgetSnapshot),
|
|
177
|
-
onDragEnd: Object(_DynamicWidgetEventHandlers__WEBPACK_IMPORTED_MODULE_13__["getDragEndHandler"])(elementRefs.container, setWidgetSnapshot),
|
|
178
|
-
onTouchMove: Object(_DynamicWidgetEventHandlers__WEBPACK_IMPORTED_MODULE_13__["getTouchMoveHandler"])(elementRefs.container, state, dispatch, widgetSnapshot, setWidgetSnapshot),
|
|
179
|
-
onTouchEnd: Object(_DynamicWidgetEventHandlers__WEBPACK_IMPORTED_MODULE_13__["getTouchEndHandler"])(elementRefs.container, setWidgetSnapshot),
|
|
180
|
-
ref: elementRefs.container
|
|
181
|
-
}, widgetItems)), react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_widget_button_WidgetButton__WEBPACK_IMPORTED_MODULE_7__["WidgetButton"], {
|
|
182
|
-
direction: _widget_button_WidgetButton__WEBPACK_IMPORTED_MODULE_7__["WidgetButtonDirection"].Right,
|
|
183
|
-
onClick: () => dispatch({
|
|
184
|
-
type: _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_10__["WidgetInteraction"].Next
|
|
185
|
-
}),
|
|
186
|
-
hide: state.hideRightButton,
|
|
187
|
-
useGradientBackdrop: true
|
|
188
|
-
})));
|
|
189
|
-
}
|
|
190
|
-
const PARTIAL_WIDGET_ITEMS = _utils_PartialLoadingHelper__WEBPACK_IMPORTED_MODULE_12__["PartialLoadingHelper"].getPartialLoadingItems();
|
|
191
|
-
const PartialDynamicWidget = () => react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
|
|
192
|
-
className: 'pb-3 d-flex flex-nowrap'
|
|
193
|
-
}, PARTIAL_WIDGET_ITEMS.map((item, idx) => react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_items_subject_widget_item_PartialSubjectWidgetItem__WEBPACK_IMPORTED_MODULE_8__["PartialSubjectWidgetItem"], {
|
|
194
|
-
key: idx
|
|
195
|
-
})));
|
|
196
|
-
|
|
197
|
-
/***/ }),
|
|
198
|
-
|
|
199
|
-
/***/ "../../libs/shared/src/components/widgets/dynamic-widget/DynamicWidgetEventHandlers.ts":
|
|
200
|
-
/*!*********************************************************************************************************************************!*\
|
|
201
|
-
!*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/widgets/dynamic-widget/DynamicWidgetEventHandlers.ts ***!
|
|
202
|
-
\*********************************************************************************************************************************/
|
|
203
|
-
/*! exports provided: getResizeHandler, getResizeEndHandler, getDragHandler, getTouchMoveHandler, getDragEndHandler, getTouchEndHandler */
|
|
204
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
205
|
-
|
|
206
|
-
"use strict";
|
|
207
|
-
__webpack_require__.r(__webpack_exports__);
|
|
208
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getResizeHandler", function() { return getResizeHandler; });
|
|
209
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getResizeEndHandler", function() { return getResizeEndHandler; });
|
|
210
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDragHandler", function() { return getDragHandler; });
|
|
211
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTouchMoveHandler", function() { return getTouchMoveHandler; });
|
|
212
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDragEndHandler", function() { return getDragEndHandler; });
|
|
213
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTouchEndHandler", function() { return getTouchEndHandler; });
|
|
214
|
-
/* harmony import */ var _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../enums/WidgetInteraction */ "../../libs/shared/src/enums/WidgetInteraction.ts");
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* Resize events
|
|
218
|
-
*/
|
|
219
|
-
|
|
220
|
-
const getResizeHandler = (elementRefs, dispatch) => () => {
|
|
221
|
-
if (elementRefs.container.current) elementRefs.container.current.style.transition = '';
|
|
222
|
-
dispatch({
|
|
223
|
-
type: _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_0__["WidgetInteraction"].Resize,
|
|
224
|
-
payload: elementRefs
|
|
225
|
-
});
|
|
226
|
-
};
|
|
227
|
-
const getResizeEndHandler = containerRef => () => {
|
|
228
|
-
if (containerRef.current) containerRef.current.style.transition = 'transform 500ms ease-in-out 100ms';
|
|
229
|
-
};
|
|
230
|
-
/**
|
|
231
|
-
* Touch / Drag start events
|
|
232
|
-
*/
|
|
233
|
-
|
|
234
|
-
const getDragHandler = (containerRef, widgetState, dispatch, widgetSnapshot, setWidgetSnapshot) => event => {
|
|
235
|
-
const mouseX = event.clientX;
|
|
236
|
-
handleDragOrTouchMove(mouseX, containerRef, widgetState, dispatch, widgetSnapshot, setWidgetSnapshot);
|
|
237
|
-
};
|
|
238
|
-
const getTouchMoveHandler = (containerRef, widgetState, dispatch, widgetSnapshot, setWidgetSnapshot) => event => {
|
|
239
|
-
const firstTouch = event.touches.item(0);
|
|
240
|
-
const touchX = firstTouch.clientX;
|
|
241
|
-
handleDragOrTouchMove(touchX, containerRef, widgetState, dispatch, widgetSnapshot, setWidgetSnapshot);
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
function handleDragOrTouchMove(xCoord, containerRef, widgetState, dispatch, widgetSnapshot, setWidgetSnapshot) {
|
|
245
|
-
let snapshot = widgetSnapshot;
|
|
246
|
-
|
|
247
|
-
if (!snapshot) {
|
|
248
|
-
snapshot = Object.assign(Object.assign({}, widgetState), {
|
|
249
|
-
initialMouseX: xCoord
|
|
250
|
-
});
|
|
251
|
-
setWidgetSnapshot(snapshot);
|
|
252
|
-
containerRef.current.style.transition = '';
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
dispatch({
|
|
256
|
-
type: _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_0__["WidgetInteraction"].Drag,
|
|
257
|
-
payload: {
|
|
258
|
-
widgetSnapshot: snapshot,
|
|
259
|
-
currentMouseX: xCoord
|
|
260
|
-
}
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Touch / Drag end events
|
|
265
|
-
*/
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
const getDragEndHandler = (containerRef, setWidgetSnapshot) => () => {
|
|
269
|
-
containerRef.current.style.transition = 'transform 500ms ease-in-out 100ms';
|
|
270
|
-
setWidgetSnapshot(null);
|
|
271
|
-
};
|
|
272
|
-
const getTouchEndHandler = getDragEndHandler;
|
|
273
|
-
|
|
274
|
-
/***/ }),
|
|
275
|
-
|
|
276
|
-
/***/ "../../libs/shared/src/components/widgets/dynamic-widget/DynamicWidgetReducer.tsx":
|
|
277
|
-
/*!****************************************************************************************************************************!*\
|
|
278
|
-
!*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/widgets/dynamic-widget/DynamicWidgetReducer.tsx ***!
|
|
279
|
-
\****************************************************************************************************************************/
|
|
280
|
-
/*! exports provided: initialSliderState, DynamicWidgetReducer */
|
|
281
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
282
|
-
|
|
283
|
-
"use strict";
|
|
284
|
-
__webpack_require__.r(__webpack_exports__);
|
|
285
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialSliderState", function() { return initialSliderState; });
|
|
286
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DynamicWidgetReducer", function() { return DynamicWidgetReducer; });
|
|
287
|
-
/* harmony import */ var _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../enums/WidgetInteraction */ "../../libs/shared/src/enums/WidgetInteraction.ts");
|
|
288
|
-
|
|
289
|
-
const MAX_SLIDE_DISTANCE = 500; // px
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* `null` values are initialized in the `Init` action. This is dispatched
|
|
293
|
-
* later, because it uses JQuery elements that aren't immediately available
|
|
294
|
-
* when `useReducer` is called.
|
|
295
|
-
*/
|
|
296
|
-
|
|
297
|
-
const initialSliderState = {
|
|
298
|
-
offset: 0,
|
|
299
|
-
containerLeftPosition: null,
|
|
300
|
-
containerRightPosition: null,
|
|
301
|
-
firstElementPosition: null,
|
|
302
|
-
lastElementPosition: null,
|
|
303
|
-
hideLeftButton: true,
|
|
304
|
-
hideRightButton: true,
|
|
305
|
-
maxSlideDistance: MAX_SLIDE_DISTANCE,
|
|
306
|
-
leftOffsetLimit: null
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
function onInit(payload) {
|
|
310
|
-
const {
|
|
311
|
-
container = {},
|
|
312
|
-
lastElement = {}
|
|
313
|
-
} = payload;
|
|
314
|
-
if (!container.current || !lastElement.current) return initialSliderState;
|
|
315
|
-
const containerLeftPosition = payload.container.current.getBoundingClientRect().left;
|
|
316
|
-
const containerRightPosition = payload.container.current.getBoundingClientRect().right;
|
|
317
|
-
const firstElementPosition = containerLeftPosition;
|
|
318
|
-
const lastElementPosition = payload.lastElement.current.getBoundingClientRect().right;
|
|
319
|
-
const leftOffsetLimit = containerRightPosition - lastElementPosition;
|
|
320
|
-
return Object.assign(Object.assign({}, initialSliderState), {
|
|
321
|
-
containerLeftPosition,
|
|
322
|
-
containerRightPosition,
|
|
323
|
-
firstElementPosition,
|
|
324
|
-
lastElementPosition,
|
|
325
|
-
hideRightButton: lastElementPosition < containerRightPosition,
|
|
326
|
-
leftOffsetLimit
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
function onNext(prevState) {
|
|
331
|
-
const {
|
|
332
|
-
firstElementPosition,
|
|
333
|
-
lastElementPosition,
|
|
334
|
-
maxSlideDistance,
|
|
335
|
-
offset,
|
|
336
|
-
containerRightPosition
|
|
337
|
-
} = prevState;
|
|
338
|
-
/**
|
|
339
|
-
* The distance in pixels that the slider will move along the x-axis.
|
|
340
|
-
* This will be the `maxSlideDistance` constant value, or if that value is too large we calculate
|
|
341
|
-
* the remaining overflowing space and only slide by that amount.
|
|
342
|
-
*/
|
|
343
|
-
|
|
344
|
-
const slideDistance = lastElementPosition - containerRightPosition >= maxSlideDistance ? maxSlideDistance : lastElementPosition - containerRightPosition;
|
|
345
|
-
return {
|
|
346
|
-
firstElementPosition: firstElementPosition - slideDistance,
|
|
347
|
-
lastElementPosition: lastElementPosition - slideDistance,
|
|
348
|
-
offset: offset - slideDistance,
|
|
349
|
-
hideRightButton: lastElementPosition - slideDistance === containerRightPosition,
|
|
350
|
-
hideLeftButton: false
|
|
351
|
-
};
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
function onPrevious(prevState) {
|
|
355
|
-
const {
|
|
356
|
-
containerLeftPosition,
|
|
357
|
-
firstElementPosition,
|
|
358
|
-
lastElementPosition,
|
|
359
|
-
maxSlideDistance,
|
|
360
|
-
offset
|
|
361
|
-
} = prevState;
|
|
362
|
-
const fullSlide = firstElementPosition + maxSlideDistance <= containerLeftPosition;
|
|
363
|
-
const slideDistance = fullSlide ? maxSlideDistance : Math.abs(offset);
|
|
364
|
-
return {
|
|
365
|
-
firstElementPosition: firstElementPosition + slideDistance,
|
|
366
|
-
lastElementPosition: lastElementPosition + slideDistance,
|
|
367
|
-
offset: offset + slideDistance,
|
|
368
|
-
hideLeftButton: !fullSlide || firstElementPosition + slideDistance === containerLeftPosition,
|
|
369
|
-
hideRightButton: false
|
|
370
|
-
};
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
function onDrag(prevState, payload) {
|
|
374
|
-
const {
|
|
375
|
-
widgetSnapshot,
|
|
376
|
-
currentMouseX
|
|
377
|
-
} = payload; // Disable dragging if the slider isn't long enough
|
|
378
|
-
|
|
379
|
-
if (widgetSnapshot.hideLeftButton && widgetSnapshot.hideRightButton) return {}; // The distance from the initial `MouseDown` event x-coordinate, to the present x-coordinate
|
|
380
|
-
|
|
381
|
-
const dragDistance = widgetSnapshot.initialMouseX - currentMouseX;
|
|
382
|
-
let offset = widgetSnapshot.offset - dragDistance;
|
|
383
|
-
let firstElementPosition = widgetSnapshot.firstElementPosition - dragDistance;
|
|
384
|
-
let lastElementPosition = widgetSnapshot.lastElementPosition - dragDistance;
|
|
385
|
-
let hideLeftButton = false;
|
|
386
|
-
let hideRightButton = false;
|
|
387
|
-
|
|
388
|
-
if (firstElementPosition > prevState.containerLeftPosition) {
|
|
389
|
-
offset = 0;
|
|
390
|
-
firstElementPosition = prevState.containerLeftPosition;
|
|
391
|
-
lastElementPosition = prevState.lastElementPosition;
|
|
392
|
-
hideLeftButton = true;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
if (lastElementPosition <= prevState.containerRightPosition) {
|
|
396
|
-
offset = prevState.leftOffsetLimit;
|
|
397
|
-
firstElementPosition = prevState.containerLeftPosition - Math.abs(prevState.leftOffsetLimit);
|
|
398
|
-
lastElementPosition = widgetSnapshot.containerRightPosition;
|
|
399
|
-
hideRightButton = true;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
return {
|
|
403
|
-
offset,
|
|
404
|
-
firstElementPosition,
|
|
405
|
-
lastElementPosition,
|
|
406
|
-
hideLeftButton,
|
|
407
|
-
hideRightButton
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
function DynamicWidgetReducer(prevState, action) {
|
|
412
|
-
switch (action.type) {
|
|
413
|
-
case _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_0__["WidgetInteraction"].Init:
|
|
414
|
-
case _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_0__["WidgetInteraction"].Resize:
|
|
415
|
-
return Object.assign(Object.assign({}, prevState), onInit(action.payload));
|
|
416
|
-
|
|
417
|
-
case _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_0__["WidgetInteraction"].Next:
|
|
418
|
-
return Object.assign(Object.assign({}, prevState), onNext(prevState));
|
|
419
|
-
|
|
420
|
-
case _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_0__["WidgetInteraction"].Previous:
|
|
421
|
-
return Object.assign(Object.assign({}, prevState), onPrevious(prevState));
|
|
422
|
-
|
|
423
|
-
case _enums_WidgetInteraction__WEBPACK_IMPORTED_MODULE_0__["WidgetInteraction"].Drag:
|
|
424
|
-
return Object.assign(Object.assign({}, prevState), onDrag(prevState, action.payload));
|
|
425
|
-
|
|
426
|
-
default:
|
|
427
|
-
return prevState;
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
/***/ }),
|
|
432
|
-
|
|
433
|
-
/***/ "../../libs/shared/src/components/widgets/dynamic-widget/dynamic-widget.scss":
|
|
434
|
-
/*!***********************************************************************************************************************!*\
|
|
435
|
-
!*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/widgets/dynamic-widget/dynamic-widget.scss ***!
|
|
436
|
-
\***********************************************************************************************************************/
|
|
437
|
-
/*! no static exports found */
|
|
438
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
439
|
-
|
|
440
|
-
// extracted by mini-css-extract-plugin
|
|
441
|
-
module.exports = {"itemSpacing":"cv--itemSpacing--10Pgb"};
|
|
442
|
-
|
|
443
|
-
/***/ }),
|
|
444
|
-
|
|
445
|
-
/***/ "../../libs/shared/src/components/widgets/items/subject-widget-item/PartialSubjectWidgetItem.tsx":
|
|
446
|
-
/*!*******************************************************************************************************************************************!*\
|
|
447
|
-
!*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/widgets/items/subject-widget-item/PartialSubjectWidgetItem.tsx ***!
|
|
448
|
-
\*******************************************************************************************************************************************/
|
|
449
|
-
/*! exports provided: PartialSubjectWidgetItem */
|
|
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__, "PartialSubjectWidgetItem", function() { return PartialSubjectWidgetItem; });
|
|
455
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
456
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
457
|
-
/* harmony import */ var _common_src_react_utils_RandomHelper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../common/src/react/utils/RandomHelper */ "../../libs/common/src/react/utils/RandomHelper.ts");
|
|
458
|
-
/* harmony import */ var _thumbnails_base_ThumbnailFallback__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../thumbnails/base/ThumbnailFallback */ "../../libs/shared/src/components/thumbnails/base/ThumbnailFallback.tsx");
|
|
459
|
-
/* harmony import */ var _subject_widget_item_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./subject-widget-item.scss */ "../../libs/shared/src/components/widgets/items/subject-widget-item/subject-widget-item.scss");
|
|
460
|
-
/* harmony import */ var _subject_widget_item_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_subject_widget_item_scss__WEBPACK_IMPORTED_MODULE_3__);
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
const PartialSubjectWidgetItem = () => {
|
|
466
|
-
const [width] = react__WEBPACK_IMPORTED_MODULE_0__["useState"](_common_src_react_utils_RandomHelper__WEBPACK_IMPORTED_MODULE_1__["RandomHelper"].getRandomInt(5) + 3 + 'rem');
|
|
467
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
|
|
468
|
-
className: `border d-flex position-relative mr-2 ${_subject_widget_item_scss__WEBPACK_IMPORTED_MODULE_3___default.a.widgetItem}`
|
|
469
|
-
}, react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
|
|
470
|
-
className: _subject_widget_item_scss__WEBPACK_IMPORTED_MODULE_3___default.a.imagePanel
|
|
471
|
-
}), react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
|
|
472
|
-
className: 'px-2',
|
|
473
|
-
style: {
|
|
474
|
-
width
|
|
475
|
-
}
|
|
476
|
-
}, "\u00A0"), react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_thumbnails_base_ThumbnailFallback__WEBPACK_IMPORTED_MODULE_2__["ThumbnailFallback"], {
|
|
477
|
-
type: _thumbnails_base_ThumbnailFallback__WEBPACK_IMPORTED_MODULE_2__["ThumbnailFallbackType"].Subject
|
|
478
|
-
}));
|
|
479
|
-
};
|
|
480
|
-
|
|
481
|
-
/***/ }),
|
|
482
|
-
|
|
483
|
-
/***/ "../../libs/shared/src/components/widgets/items/subject-widget-item/SubjectWidgetItem.tsx":
|
|
484
|
-
/*!************************************************************************************************************************************!*\
|
|
485
|
-
!*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/widgets/items/subject-widget-item/SubjectWidgetItem.tsx ***!
|
|
486
|
-
\************************************************************************************************************************************/
|
|
487
|
-
/*! exports provided: SubjectWidgetItem */
|
|
488
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
489
|
-
|
|
490
|
-
"use strict";
|
|
491
|
-
__webpack_require__.r(__webpack_exports__);
|
|
492
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectWidgetItem", function() { return Memoized; });
|
|
493
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
494
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
495
|
-
/* harmony import */ var _common_src_react_utils_TextHelper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../common/src/react/utils/TextHelper */ "../../libs/common/src/react/utils/TextHelper.ts");
|
|
496
|
-
/* harmony import */ var _utils_ImageHelper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../utils/ImageHelper */ "../../libs/shared/src/utils/ImageHelper.ts");
|
|
497
|
-
/* harmony import */ var _enums_Images__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../enums/Images */ "../../libs/shared/src/enums/Images.ts");
|
|
498
|
-
/* harmony import */ var _app_link_AppLink__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../app-link/AppLink */ "../../libs/shared/src/components/app-link/AppLink.tsx");
|
|
499
|
-
/* harmony import */ var _thumbnails_base_ThumbnailFallback__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../thumbnails/base/ThumbnailFallback */ "../../libs/shared/src/components/thumbnails/base/ThumbnailFallback.tsx");
|
|
500
|
-
/* harmony import */ var _text_Text__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../text/Text */ "../../libs/shared/src/components/text/Text.tsx");
|
|
501
|
-
/* harmony import */ var _subject_widget_item_scss__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./subject-widget-item.scss */ "../../libs/shared/src/components/widgets/items/subject-widget-item/subject-widget-item.scss");
|
|
502
|
-
/* harmony import */ var _subject_widget_item_scss__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_subject_widget_item_scss__WEBPACK_IMPORTED_MODULE_7__);
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
const namespace = 'shared.subjectWidgetItem';
|
|
512
|
-
|
|
513
|
-
const ComingSoonNamePanel = ({
|
|
514
|
-
name,
|
|
515
|
-
multiline
|
|
516
|
-
}) => {
|
|
517
|
-
let wrapperClassName = `${_subject_widget_item_scss__WEBPACK_IMPORTED_MODULE_7___default.a.comingSoonPanel} px-3 text-center mt-3`;
|
|
518
|
-
let textClassName = `${_subject_widget_item_scss__WEBPACK_IMPORTED_MODULE_7___default.a.name} h6 mb-0 pb-1`;
|
|
519
|
-
|
|
520
|
-
if (!multiline) {
|
|
521
|
-
wrapperClassName += ' text-nowrap';
|
|
522
|
-
textClassName += ' text-truncate';
|
|
523
|
-
} else {
|
|
524
|
-
textClassName += ` ${_subject_widget_item_scss__WEBPACK_IMPORTED_MODULE_7___default.a.clamped} clamp-2`;
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
|
|
528
|
-
className: wrapperClassName
|
|
529
|
-
}, react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("small", {
|
|
530
|
-
className: 'text-muted'
|
|
531
|
-
}, react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_text_Text__WEBPACK_IMPORTED_MODULE_6__["Text"], {
|
|
532
|
-
namespace: namespace,
|
|
533
|
-
phrase: 'comingSoon'
|
|
534
|
-
})), react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("p", {
|
|
535
|
-
className: textClassName
|
|
536
|
-
}, name));
|
|
537
|
-
};
|
|
538
|
-
|
|
539
|
-
const NormalNamePanel = ({
|
|
540
|
-
name,
|
|
541
|
-
multiline
|
|
542
|
-
}) => {
|
|
543
|
-
let wrapperClassName = 'px-3 text-center d-flex align-items-center';
|
|
544
|
-
let textClassName = `${_subject_widget_item_scss__WEBPACK_IMPORTED_MODULE_7___default.a.name} h6 mb-0 pb-1`;
|
|
545
|
-
|
|
546
|
-
if (!multiline) {
|
|
547
|
-
wrapperClassName += ' text-nowrap text-truncate';
|
|
548
|
-
textClassName += ' text-truncate';
|
|
549
|
-
} else {
|
|
550
|
-
textClassName += ` ${_subject_widget_item_scss__WEBPACK_IMPORTED_MODULE_7___default.a.clamped} clamp-2 text-left`;
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
|
|
554
|
-
className: wrapperClassName
|
|
555
|
-
}, react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("p", {
|
|
556
|
-
className: textClassName
|
|
557
|
-
}, name));
|
|
558
|
-
};
|
|
559
|
-
|
|
560
|
-
function SubjectWidgetItem(props) {
|
|
561
|
-
var _a;
|
|
562
|
-
|
|
563
|
-
const appLink = Object.assign(Object.assign({}, props.appLink), {
|
|
564
|
-
args: [props.data.id, _common_src_react_utils_TextHelper__WEBPACK_IMPORTED_MODULE_1__["TextHelper"].slugify(props.data.name)]
|
|
565
|
-
});
|
|
566
|
-
const coverUrl = _utils_ImageHelper__WEBPACK_IMPORTED_MODULE_2__["ImageHelper"].createUrl((_a = props.data.cover) === null || _a === void 0 ? void 0 : _a.url, {
|
|
567
|
-
size: _enums_Images__WEBPACK_IMPORTED_MODULE_3__["ImageSize"].Small
|
|
568
|
-
});
|
|
569
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_app_link_AppLink__WEBPACK_IMPORTED_MODULE_4__["AppLink"], {
|
|
570
|
-
appLink: appLink
|
|
571
|
-
}, react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
|
|
572
|
-
className: `border d-flex position-relative ${_subject_widget_item_scss__WEBPACK_IMPORTED_MODULE_7___default.a.widgetItem}`,
|
|
573
|
-
id: props.data.id
|
|
574
|
-
}, react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", {
|
|
575
|
-
className: `${_subject_widget_item_scss__WEBPACK_IMPORTED_MODULE_7___default.a.imagePanel} ${props.isLarge ? _subject_widget_item_scss__WEBPACK_IMPORTED_MODULE_7___default.a.large : ''}`,
|
|
576
|
-
style: {
|
|
577
|
-
backgroundImage: `url('${coverUrl}')`
|
|
578
|
-
}
|
|
579
|
-
}), props.data.comingSoon ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"](ComingSoonNamePanel, {
|
|
580
|
-
name: props.data.name,
|
|
581
|
-
multiline: props.isLarge
|
|
582
|
-
}) : react__WEBPACK_IMPORTED_MODULE_0__["createElement"](NormalNamePanel, {
|
|
583
|
-
name: props.data.name,
|
|
584
|
-
multiline: props.isLarge
|
|
585
|
-
}), react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_thumbnails_base_ThumbnailFallback__WEBPACK_IMPORTED_MODULE_5__["ThumbnailFallback"], {
|
|
586
|
-
type: _thumbnails_base_ThumbnailFallback__WEBPACK_IMPORTED_MODULE_5__["ThumbnailFallbackType"].Subject,
|
|
587
|
-
extraClasses: props.isLarge ? _subject_widget_item_scss__WEBPACK_IMPORTED_MODULE_7___default.a.large : ''
|
|
588
|
-
})));
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
const Memoized = react__WEBPACK_IMPORTED_MODULE_0__["memo"](SubjectWidgetItem);
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
/***/ }),
|
|
595
|
-
|
|
596
|
-
/***/ "../../libs/shared/src/components/widgets/items/subject-widget-item/subject-widget-item.scss":
|
|
597
|
-
/*!***************************************************************************************************************************************!*\
|
|
598
|
-
!*** C:/ClickView Projects/@clickview/packages/libs/shared/src/components/widgets/items/subject-widget-item/subject-widget-item.scss ***!
|
|
599
|
-
\***************************************************************************************************************************************/
|
|
600
|
-
/*! no static exports found */
|
|
601
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
602
|
-
|
|
603
|
-
// extracted by mini-css-extract-plugin
|
|
604
|
-
module.exports = {"widgetItem":"cv--widgetItem--1oyw1","imagePanel":"cv--imagePanel--1UOVG","large":"cv--large--1EtWs","comingSoonPanel":"cv--comingSoonPanel--3js2e","name":"cv--name--3csgE","clamped":"cv--clamped--1y2oG","editSubjectsItem":"cv--editSubjectsItem--1yBMf"};
|
|
605
|
-
|
|
606
|
-
/***/ }),
|
|
607
|
-
|
|
608
|
-
/***/ "../../libs/shared/src/hooks/UseResizeListener.ts":
|
|
609
|
-
/*!********************************************************************************************!*\
|
|
610
|
-
!*** C:/ClickView Projects/@clickview/packages/libs/shared/src/hooks/UseResizeListener.ts ***!
|
|
611
|
-
\********************************************************************************************/
|
|
612
|
-
/*! exports provided: useResizeListener */
|
|
613
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
614
|
-
|
|
615
|
-
"use strict";
|
|
616
|
-
__webpack_require__.r(__webpack_exports__);
|
|
617
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useResizeListener", function() { return useResizeListener; });
|
|
618
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
619
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
620
|
-
|
|
621
|
-
/**
|
|
622
|
-
* Hook function for listening to scroll events
|
|
623
|
-
* @param onResize - gets called on resize.
|
|
624
|
-
* @param onResizeEnd (optional) - gets called 100ms after the last resize event. Timer restarts everytime the callback
|
|
625
|
-
* runs so that endCallback only fires after a stretch of resize events.
|
|
626
|
-
* @param dependencies - values from the component (e.g. state, props and functions) that are used
|
|
627
|
-
* inside the effect hook.
|
|
628
|
-
*/
|
|
629
|
-
|
|
630
|
-
function useResizeListener(onResize, onResizeEnd, dependencies = []) {
|
|
631
|
-
let resizeTimeout;
|
|
632
|
-
|
|
633
|
-
const onResizeModified = () => {
|
|
634
|
-
onResize();
|
|
635
|
-
window.clearTimeout(resizeTimeout);
|
|
636
|
-
resizeTimeout = window.setTimeout(onResizeEnd, 100);
|
|
637
|
-
};
|
|
638
|
-
|
|
639
|
-
react__WEBPACK_IMPORTED_MODULE_0__["useEffect"](() => {
|
|
640
|
-
window.addEventListener('resize', onResizeEnd ? onResizeModified : onResize);
|
|
641
|
-
return () => window.removeEventListener('resize', onResizeEnd ? onResizeModified : onResize);
|
|
642
|
-
}, [...dependencies]);
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
/***/ })
|
|
646
|
-
|
|
647
|
-
}]);
|
|
648
|
-
//# sourceMappingURL=16.chunk.js.map
|