@scrippsproduct/networks-ui-library 1.0.23 → 1.1.0-alpha.1
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/{Form.module-DbpB9u1l.mjs → Form.module-Cd8qH2rj.mjs} +1 -1
- package/dist/{ResultsTable.module-nTlGw9Lh.mjs → ResultsTable.module-B7M9y7hd.mjs} +1 -5
- package/dist/_commonjsHelpers-C6fGbg64.mjs +6 -0
- package/dist/{add-FrnMPwwO.mjs → add-UWUc_nrO.mjs} +2 -2
- package/dist/{addMonths-BDf46gmB.mjs → addMonths-FatsTLmU.mjs} +1 -1
- package/dist/assets/ActionButton.css +1 -1
- package/dist/assets/AdBlock.css +1 -1
- package/dist/assets/CarouselSlide.css +1 -1
- package/dist/assets/ChannelSearch.css +1 -1
- package/dist/assets/DateNavigation.css +1 -1
- package/dist/assets/DatePicker.css +1 -1
- package/dist/assets/DeviceAndPlatformLists.css +1 -1
- package/dist/assets/EqualSizeFlexRow.css +1 -1
- package/dist/assets/EqualSizeGrid.css +1 -1
- package/dist/assets/FeaturedList.css +1 -1
- package/dist/assets/Figure.css +1 -1
- package/dist/assets/FindUs.css +1 -1
- package/dist/assets/Form.css +1 -1
- package/dist/assets/GridList.css +1 -1
- package/dist/assets/IONShowHero.css +1 -1
- package/dist/assets/ImageCard.css +1 -1
- package/dist/assets/LogoListItem.css +1 -1
- package/dist/assets/ModalContainer.css +1 -1
- package/dist/assets/PageHero.css +1 -1
- package/dist/assets/ProgramAirdate.css +1 -1
- package/dist/assets/PromotionBlock.css +1 -1
- package/dist/assets/ResultsTable.css +1 -1
- package/dist/{chevron-left-DmvQntvu.mjs → chevron-left-DRvpaLmK.mjs} +1 -1
- package/dist/{chevron-right-CaAz6ISN.mjs → chevron-right-C8yCnmfx.mjs} +1 -1
- package/dist/components/ActionButton/ActionButton.d.ts +20 -1
- package/dist/components/ActionButton/ActionButton.js +36 -36
- package/dist/components/ActionButton/index.d.ts +2 -1
- package/dist/components/AirDateFormatter/AirDateFormatter.js +3 -3
- package/dist/components/BasicGridModule/BasicGridModule.js +25 -25
- package/dist/components/Carousel/Carousel.d.ts +7 -24
- package/dist/components/Carousel/Carousel.js +109 -109
- package/dist/components/Carousel/CarouselUtils.class.d.ts +16 -28
- package/dist/components/Carousel/CarouselUtils.class.js +85 -55
- package/dist/components/CarouselSlide/CarouselSlide.d.ts +8 -6
- package/dist/components/CarouselSlide/CarouselSlide.js +90 -26
- package/dist/components/CarouselSlide/index.d.ts +2 -1
- package/dist/components/CarouselSlide/slide-layouts/Empty/Empty.d.ts +1 -1
- package/dist/components/CarouselSlide/slide-layouts/Empty/Empty.js +3 -4
- package/dist/components/CarouselSlide/slide-layouts/Empty/index.d.ts +2 -1
- package/dist/components/CarouselSlide/slide-layouts/Figure/Figure.d.ts +2 -2
- package/dist/components/CarouselSlide/slide-layouts/Figure/Figure.js +10 -11
- package/dist/components/CarouselSlide/slide-layouts/Figure/index.d.ts +2 -1
- package/dist/components/CarouselSlide/slide-layouts/Text/TextSlide.d.ts +2 -2
- package/dist/components/CarouselSlide/slide-layouts/Text/TextSlide.js +9 -10
- package/dist/components/CarouselSlide/slide-layouts/Text/index.d.ts +2 -1
- package/dist/components/CarouselSlide/slide-layouts/TwoColumn/TwoColumnSlide.js +1 -1
- package/dist/components/CastInfoLayout/CastInfoLayout.js +1 -1
- package/dist/components/ChannelSearch/ChannelSearch.js +12 -12
- package/dist/components/Concat/Concat.js +1 -1
- package/dist/components/CtaBlock/CtaBlock.js +2 -2
- package/dist/components/CustomDataList/CustomDataList.js +44 -47
- package/dist/components/CustomSelect/CustomSelect.js +5 -5
- package/dist/components/DateNavigation/DateNavigation.js +7 -8
- package/dist/components/DatePicker/DatePicker.js +2527 -2452
- package/dist/components/DeviceAndPlatformLists/DeviceAndPlatformLists.js +1 -1
- package/dist/components/DrawerNavigation/DrawerNavigation.js +27 -29
- package/dist/components/ErrorHandler/ErrorHandler.js +1 -1
- package/dist/components/FeaturedList/FeaturedList.js +7 -7
- package/dist/components/Figure/Figure.js +1 -1
- package/dist/components/FindUs/FindUs.js +6 -6
- package/dist/components/GenericList/GenericList.js +1 -1
- package/dist/components/GetAirdateWrapper/GetAirdateWrapper.js +6 -6
- package/dist/components/ImageCard/ImageCard.js +6 -6
- package/dist/components/ImageCard/ImageCardCore.js +1 -1
- package/dist/components/InfoPanel/InfoPanel.js +15 -16
- package/dist/components/InlineNavigation/InlineNavigation.js +6 -7
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/InstructionsList/InstructionsList.js +1 -1
- package/dist/components/Loading/Loading.js +5 -8
- package/dist/components/ModalContainer/ModalContainer.js +41 -44
- package/dist/components/Overlay/Overlay.js +17 -20
- package/dist/components/PageHero/page-hero-layouts/IONShow/IONShowHero.js +1 -1
- package/dist/components/ProgramAirdate/ProgramAirdate.js +9 -9
- package/dist/components/PromotionBlock/PromotionBlock.js +15 -17
- package/dist/components/PromotionsRowModule/PromotionsRowModule.js +8 -8
- package/dist/components/ResultsTable/ResultsTable.js +7 -7
- package/dist/components/ResultsTableBody/ResultsTableBody.js +1 -1
- package/dist/components/ResultsTableHeader/ResultsTableHeader.js +1 -1
- package/dist/components/ScheduleLayout/ScheduleLayout.js +2 -2
- package/dist/components/ScheduleList/ScheduleList.js +17 -17
- package/dist/components/ScheduleList/schedule-list-items/MovieItem.js +10 -10
- package/dist/components/ScheduleList/schedule-list-items/SeriesItem.js +8 -8
- package/dist/components/ScheduleList/schedule-list-items/SportsItem.js +8 -8
- package/dist/components/SectionedContent/SectionedContent.js +13 -16
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/ShowAboutContent/ShowAboutContent.js +1 -1
- package/dist/components/ShowAboutLayout/ShowAboutLayout.js +24 -25
- package/dist/components/SocialLinks/SocialLinks.js +3 -3
- package/dist/components/SocialShareBlock/SocialShareBlock.js +8 -8
- package/dist/components/StringList/StringList.js +1 -1
- package/dist/components/TabContent/TabContent.js +1 -1
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/UpcomingList/UpcomingList.js +8 -8
- package/dist/containers/NowPlayingContainer.js +10 -10
- package/dist/{facebook-osmzgL7R.mjs → facebook-HCcA1M1m.mjs} +1 -1
- package/dist/{format-plq8pBNY.mjs → format-YhWt2D8M.mjs} +78 -12
- package/dist/hooks/useGetSchedule.js +3 -3
- package/dist/hooks/useGetUpcoming.js +2 -2
- package/dist/{index-C8O1hjfH.mjs → index-0wieGV50.mjs} +0 -1
- package/dist/{index-DC7FmJPK.mjs → index-C-kn9Zhn.mjs} +7134 -7069
- package/dist/{index-CZzwT3Oj.mjs → index-DC2JJV3a.mjs} +246 -241
- package/dist/index-VjANCDXC.mjs +1873 -0
- package/dist/settings.d.ts +4 -3
- package/dist/{sub-CkNH5u-l.mjs → sub-CoUmnfhv.mjs} +2 -2
- package/dist/{subMonths-nbU1oDhB.mjs → subMonths-BtMU5A9u.mjs} +1 -1
- package/dist/{triangle-D0AHL9lB.mjs → triangle-PcCcGXjr.mjs} +1 -1
- package/dist/types.d.js +27 -0
- package/dist/utils/analytics.js +434 -423
- package/dist/utils/date-helpers.js +4 -4
- package/dist/utils/getFeaturedList.js +3 -3
- package/dist/utils/getOnNowProgram.js +3 -3
- package/dist/utils/getUpcomingPrograms.js +2 -2
- package/dist/{x-D8_C2o-U.mjs → x-C-QzJ-qD.mjs} +1 -1
- package/package.json +27 -24
- package/dist/_commonjsHelpers-DaMA6jEr.mjs +0 -8
- package/dist/components/CarouselSlide/slide-layouts/Figure/Figure.stories.d.ts +0 -34
- package/dist/components/CarouselSlide/slide-layouts/Figure/Figure.stories.js +0 -105
- package/dist/components/CarouselSlide/slide-layouts/Text/TextSlide.stories.d.ts +0 -19
- package/dist/components/CarouselSlide/slide-layouts/Text/TextSlide.stories.js +0 -35
- package/dist/index-B0ARwqly.mjs +0 -1818
- /package/dist/{networks-ui.d.ts → secl-ui.d.ts} +0 -0
|
@@ -1,34 +1,24 @@
|
|
|
1
|
+
import { CarouselCell, CarouselOptions, CarouselNavBtnEls, CarouselUtilsConstructorParams } from '../../types';
|
|
1
2
|
export default class CarouselUtils {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
navBtnEls?: {
|
|
8
|
-
next: {};
|
|
9
|
-
previous: {};
|
|
10
|
-
} | undefined;
|
|
11
|
-
options: any;
|
|
12
|
-
});
|
|
13
|
-
carouselEl: any;
|
|
14
|
-
scrollerEl: any;
|
|
15
|
-
paginationEl: any;
|
|
16
|
-
slides: any;
|
|
3
|
+
#private;
|
|
4
|
+
carouselEl: HTMLElement;
|
|
5
|
+
scrollerEl: HTMLElement;
|
|
6
|
+
paginationEl: HTMLElement;
|
|
7
|
+
cells: CarouselCell[];
|
|
17
8
|
currentIndex: number;
|
|
18
|
-
slideEls:
|
|
19
|
-
navBtnEls:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
timerInterval: any;
|
|
27
|
-
slideGutterSize: any;
|
|
28
|
-
showPagination: any;
|
|
9
|
+
slideEls: HTMLElement[];
|
|
10
|
+
navBtnEls: CarouselNavBtnEls;
|
|
11
|
+
currentIntersecting: IntersectionObserverEntry | Record<string, never>;
|
|
12
|
+
options: CarouselOptions;
|
|
13
|
+
timer: NodeJS.Timeout | null | undefined;
|
|
14
|
+
timerInterval: number | undefined;
|
|
15
|
+
slideGutterSize: number;
|
|
16
|
+
showPagination: boolean | undefined;
|
|
29
17
|
isInitialScroll: boolean;
|
|
30
18
|
totalSlideEls: number;
|
|
31
19
|
totalSlides: number;
|
|
20
|
+
carouselObserver: IntersectionObserver | undefined;
|
|
21
|
+
constructor({ carouselEl, scrollerEl, paginationEl, cells, navBtnEls, options, }: CarouselUtilsConstructorParams);
|
|
32
22
|
/**
|
|
33
23
|
* starts the autoplay timer
|
|
34
24
|
*/
|
|
@@ -63,6 +53,4 @@ export default class CarouselUtils {
|
|
|
63
53
|
* @returns void
|
|
64
54
|
*/
|
|
65
55
|
handleScrollEnd(): void;
|
|
66
|
-
carouselObserver: IntersectionObserver | undefined;
|
|
67
|
-
#private;
|
|
68
56
|
}
|
|
@@ -1,53 +1,82 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
1
|
+
var L = Object.defineProperty;
|
|
2
|
+
var b = (i) => {
|
|
3
|
+
throw TypeError(i);
|
|
3
4
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
var z = (i, t, e) => t in i ? L(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
6
|
+
var l = (i, t, e) => z(i, typeof t != "symbol" ? t + "" : t, e), O = (i, t, e) => t.has(i) || b("Cannot " + e);
|
|
7
|
+
var x = (i, t, e) => t.has(i) ? b("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, e);
|
|
8
|
+
var r = (i, t, e) => (O(i, t, "access private method"), e);
|
|
9
|
+
let f = /* @__PURE__ */ new WeakMap();
|
|
10
|
+
const P = new Event("scrollend"), I = /* @__PURE__ */ new Set();
|
|
11
|
+
function h(i, t, e) {
|
|
12
|
+
let n = i[t];
|
|
13
|
+
i[t] = function() {
|
|
14
|
+
let c = Array.prototype.slice.apply(arguments, [0]);
|
|
15
|
+
n.apply(this, c), c.unshift(n), e.apply(this, c);
|
|
14
16
|
};
|
|
15
17
|
}
|
|
16
|
-
function
|
|
18
|
+
function m(i, t) {
|
|
17
19
|
if (t !== "scroll" && t !== "scrollend")
|
|
18
20
|
return;
|
|
19
|
-
let e =
|
|
21
|
+
let e = f.get(this);
|
|
20
22
|
if (e === void 0) {
|
|
21
|
-
let
|
|
23
|
+
let n = 0;
|
|
22
24
|
e = {
|
|
23
25
|
scrollListener: () => {
|
|
24
|
-
clearTimeout(
|
|
25
|
-
|
|
26
|
+
clearTimeout(n), n = setTimeout(() => {
|
|
27
|
+
I.size ? setTimeout(e.scrollListener, 100) : (this.dispatchEvent(P), n = 0);
|
|
26
28
|
}, 100);
|
|
27
29
|
},
|
|
28
30
|
listeners: 0
|
|
29
31
|
// Count of number of listeners.
|
|
30
|
-
},
|
|
32
|
+
}, i.apply(this, ["scroll", e.scrollListener]), f.set(this, e);
|
|
31
33
|
}
|
|
32
34
|
e.listeners++;
|
|
33
35
|
}
|
|
34
|
-
function
|
|
36
|
+
function p(i, t) {
|
|
35
37
|
if (t !== "scroll" && t !== "scrollend") return;
|
|
36
|
-
let e =
|
|
37
|
-
e !== void 0 && (e[t]--, !(--e.listeners > 0) && (
|
|
38
|
+
let e = f.get(this);
|
|
39
|
+
e !== void 0 && (e[t]--, !(--e.listeners > 0) && (i.apply(this, ["scroll", e.scrollListener]), f.delete(this)));
|
|
38
40
|
}
|
|
39
|
-
const
|
|
40
|
-
var s,
|
|
41
|
-
class
|
|
42
|
-
constructor({
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
},
|
|
41
|
+
const G = "onscrollend" in window;
|
|
42
|
+
var s, u, w, A, S, a, d, y, g, T;
|
|
43
|
+
class M {
|
|
44
|
+
constructor({
|
|
45
|
+
carouselEl: t,
|
|
46
|
+
scrollerEl: e,
|
|
47
|
+
paginationEl: n,
|
|
48
|
+
cells: c,
|
|
49
|
+
navBtnEls: B = {
|
|
50
|
+
next: {},
|
|
51
|
+
previous: {}
|
|
52
|
+
},
|
|
53
|
+
options: o
|
|
54
|
+
}) {
|
|
55
|
+
x(this, s);
|
|
56
|
+
l(this, "carouselEl");
|
|
57
|
+
l(this, "scrollerEl");
|
|
58
|
+
l(this, "paginationEl");
|
|
59
|
+
l(this, "cells");
|
|
60
|
+
l(this, "currentIndex");
|
|
61
|
+
l(this, "slideEls");
|
|
62
|
+
l(this, "navBtnEls");
|
|
63
|
+
l(this, "currentIntersecting");
|
|
64
|
+
l(this, "options");
|
|
65
|
+
l(this, "timer");
|
|
66
|
+
l(this, "timerInterval");
|
|
67
|
+
l(this, "slideGutterSize");
|
|
68
|
+
l(this, "showPagination");
|
|
69
|
+
l(this, "isInitialScroll");
|
|
70
|
+
l(this, "totalSlideEls");
|
|
71
|
+
l(this, "totalSlides");
|
|
72
|
+
l(this, "carouselObserver");
|
|
73
|
+
G || (document.addEventListener("touchstart", (v) => {
|
|
74
|
+
for (let E of v.changedTouches)
|
|
75
|
+
I.add(E.identifier);
|
|
76
|
+
}, { passive: !0 }), document.addEventListener("touchend", (v) => {
|
|
77
|
+
for (let E of v.changedTouches)
|
|
78
|
+
I.delete(E.identifier);
|
|
79
|
+
}, { passive: !0 }), h(Element.prototype, "addEventListener", m), h(window, "addEventListener", m), h(document, "addEventListener", m), h(Element.prototype, "removeEventListener", p), h(window, "removeEventListener", p), h(document, "removeEventListener", p)), this.carouselEl = t, this.scrollerEl = e, this.paginationEl = n, this.currentIndex = 0, this.navBtnEls = B, this.currentIntersecting = {}, this.options = o, o.autoplay && (this.timer = null, this.timerInterval = (o == null ? void 0 : o.delay) ?? 3500, this.startTimer()), this.slideGutterSize = (o == null ? void 0 : o.slideGutterSize) ?? 25, this.showPagination = o == null ? void 0 : o.showPagination, this.isInitialScroll = !0, this.cells = c, this.slideEls = [...e.children], this.totalSlideEls = this.slideEls.length, this.totalSlides = Math.ceil(this.cells.length / (this.options.cellsPerSlide ?? 1)), r(this, s, w).call(this), r(this, s, S).call(this), r(this, s, A).call(this);
|
|
51
80
|
}
|
|
52
81
|
/**
|
|
53
82
|
* starts the autoplay timer
|
|
@@ -61,7 +90,7 @@ class P {
|
|
|
61
90
|
* clears the autoplay timer
|
|
62
91
|
*/
|
|
63
92
|
clearTimer() {
|
|
64
|
-
clearInterval(this.timer), this.timer = null;
|
|
93
|
+
this.timer && clearInterval(this.timer), this.timer = null;
|
|
65
94
|
}
|
|
66
95
|
/**
|
|
67
96
|
* checks to see if the scroller is moving to the
|
|
@@ -71,7 +100,7 @@ class P {
|
|
|
71
100
|
* @param {number} dir - a number representing the direction of scroll 1 for forward, -1 for backward
|
|
72
101
|
*/
|
|
73
102
|
determineScrollAction(t) {
|
|
74
|
-
this.options.autoplay && this.timer !== null && this.clearTimer(), t === 1 ? this.currentIndex === this.totalSlides - 1 ? this.options.wrapAround && (this.scrollerEl.style.scrollBehavior = "auto", this.scrollerEl.scrollTo(0, 0),
|
|
103
|
+
this.options.autoplay && this.timer !== null && this.clearTimer(), t === 1 ? this.currentIndex === this.totalSlides - 1 ? this.options.wrapAround && (this.scrollerEl.style.scrollBehavior = "auto", this.scrollerEl.scrollTo(0, 0), r(this, s, a).call(this, t), this.currentIndex = 0) : (r(this, s, a).call(this, t), this.currentIndex += 1) : t === -1 && (this.currentIndex === 0 ? this.options.wrapAround && (this.scrollerEl.style.scrollBehavior = "auto", this.scrollerEl.scrollTo(99999, 0), this.currentIndex = this.totalSlides - 1, r(this, s, a).call(this, t)) : (r(this, s, a).call(this, t), this.currentIndex -= 1)), this.options.autoplay && this.timer === null && this.startTimer();
|
|
75
104
|
}
|
|
76
105
|
/**
|
|
77
106
|
* Navigates the carousel to a specific index
|
|
@@ -82,8 +111,8 @@ class P {
|
|
|
82
111
|
navigateToIndex(t) {
|
|
83
112
|
if (t === this.currentIndex) return;
|
|
84
113
|
this.options.autoplay && this.clearTimer();
|
|
85
|
-
let e = t > this.currentIndex ? t - this.currentIndex : this.currentIndex - t,
|
|
86
|
-
this.currentIndex = t,
|
|
114
|
+
let e = t > this.currentIndex ? t - this.currentIndex : this.currentIndex - t, n = t > this.currentIndex ? 1 : -1;
|
|
115
|
+
this.currentIndex = t, r(this, s, a).call(this, n, e), this.options.autoplay && this.startTimer(), r(this, s, d).call(this);
|
|
87
116
|
}
|
|
88
117
|
/**
|
|
89
118
|
* Returns the current index of the carousel
|
|
@@ -99,28 +128,28 @@ class P {
|
|
|
99
128
|
*/
|
|
100
129
|
handleScrollEnd() {
|
|
101
130
|
if (this.timer === null && this.options.autoplay && this.startTimer(), this.currentIntersecting.target) {
|
|
102
|
-
const t = Number.parseInt(this.currentIntersecting.target.getAttribute("data-index"), 10);
|
|
131
|
+
const t = Number.parseInt(this.currentIntersecting.target.getAttribute("data-index") ?? "0", 10);
|
|
103
132
|
if (!this.options.wrapAround) {
|
|
104
|
-
this.currentIndex = t,
|
|
133
|
+
this.currentIndex = t, r(this, s, d).call(this);
|
|
105
134
|
return;
|
|
106
135
|
}
|
|
107
|
-
t === 0 ? (this.currentIndex = this.
|
|
136
|
+
t === 0 ? (this.currentIndex = this.totalSlides - 1, r(this, s, u).call(this, { scrollport: this.scrollerEl, element: this.slideEls[this.totalSlides] })) : t === this.totalSlideEls - 1 ? (this.currentIndex = 0, r(this, s, u).call(this, { scrollport: this.scrollerEl, element: this.slideEls[1] })) : this.currentIndex = t - 1;
|
|
108
137
|
}
|
|
109
|
-
|
|
138
|
+
r(this, s, d).call(this);
|
|
110
139
|
}
|
|
111
140
|
}
|
|
112
141
|
s = new WeakSet(), /**
|
|
113
142
|
* Scrolls the carousel to a specific child element
|
|
114
143
|
* @param {*} param0 - an object containing the scrollport element and the child element to scroll to
|
|
115
144
|
*/
|
|
116
|
-
|
|
117
|
-
const
|
|
118
|
-
t.style.scrollBehavior = "auto", t.scrollTo(Math.abs(t.offsetLeft - e.offsetLeft + e.clientWidth *
|
|
145
|
+
u = function({ scrollport: t, element: e }) {
|
|
146
|
+
const n = this.slideGutterSize * 2 / 100;
|
|
147
|
+
t.style.scrollBehavior = "auto", t.scrollTo(Math.abs(t.offsetLeft - e.offsetLeft + e.clientWidth * n), 0);
|
|
119
148
|
}, /**
|
|
120
149
|
* adds an observer to the scroller element that we can use to
|
|
121
150
|
* determine which slide is intersecting
|
|
122
151
|
*/
|
|
123
|
-
|
|
152
|
+
w = function() {
|
|
124
153
|
this.carouselObserver = new IntersectionObserver((t) => {
|
|
125
154
|
for (let e of t)
|
|
126
155
|
e.isIntersecting && (this.currentIntersecting = e);
|
|
@@ -133,19 +162,20 @@ x = function() {
|
|
|
133
162
|
*/
|
|
134
163
|
A = function() {
|
|
135
164
|
for (let t of this.slideEls)
|
|
136
|
-
this.carouselObserver.observe(t);
|
|
165
|
+
this.carouselObserver && this.carouselObserver.observe(t);
|
|
137
166
|
}, /**
|
|
138
167
|
* sets some intial settings for the carousel based on some of the options
|
|
139
168
|
*/
|
|
140
|
-
|
|
141
|
-
|
|
169
|
+
S = function() {
|
|
170
|
+
var t, e;
|
|
171
|
+
this.options.wrapAround ? (this.scrollerEl.style.scrollBehavior = "auto", this.scrollerEl.scrollTo(-9999, 0), r(this, s, u).call(this, { scrollport: this.scrollerEl, element: this.scrollerEl.children[1] })) : this.options.showControls ? (this.navBtnEls && ((t = this.navBtnEls) != null && t.previous) && ((e = this.navBtnEls) == null || e.previous.setAttribute("disabled", "disabled")), r(this, s, d).call(this)) : r(this, s, g).call(this), this.totalSlides === 1 && this.slideEls[0].removeAttribute("inert");
|
|
142
172
|
}, /**
|
|
143
173
|
* Scrolls the carousel in a specified direction by a specified distance
|
|
144
174
|
*
|
|
145
175
|
* @param {number} dir - a number representing the direction of scroll 1 for forward, -1 for backward
|
|
146
176
|
* @param {number} distance - a number representing the number of slides to scroll
|
|
147
177
|
*/
|
|
148
|
-
|
|
178
|
+
a = function(t, e = 1) {
|
|
149
179
|
this.scrollerEl.style.scrollBehavior = "smooth", this.scrollerEl.scrollBy({
|
|
150
180
|
left: this.scrollerEl.clientWidth * ((100 - this.slideGutterSize * 2) / 100) * e * t,
|
|
151
181
|
top: 0,
|
|
@@ -157,8 +187,8 @@ h = function(t, e = 1) {
|
|
|
157
187
|
* add methods here to have them sync
|
|
158
188
|
* when scroller is scrolled
|
|
159
189
|
*/
|
|
160
|
-
|
|
161
|
-
|
|
190
|
+
d = function() {
|
|
191
|
+
r(this, s, g).call(this), this.showPagination && r(this, s, T).call(this), this.options.wrapAround || r(this, s, y).call(this);
|
|
162
192
|
}, /**
|
|
163
193
|
* Sets the control arrow buttons to disabled if the carousel is at the start or end
|
|
164
194
|
*/
|
|
@@ -167,10 +197,10 @@ y = function() {
|
|
|
167
197
|
}, /**
|
|
168
198
|
* Sets the inert attribute on all slides that are not the current slide
|
|
169
199
|
*/
|
|
170
|
-
|
|
200
|
+
g = function() {
|
|
171
201
|
const t = this.options.wrapAround ? this.currentIndex + 1 : this.currentIndex;
|
|
172
|
-
this.slideEls.length === 1 ? this.slideEls[0].removeAttribute("inert") : this.slideEls.forEach((e,
|
|
173
|
-
e.toggleAttribute("inert",
|
|
202
|
+
this.slideEls.length === 1 ? this.slideEls[0].removeAttribute("inert") : this.slideEls.forEach((e, n) => {
|
|
203
|
+
e.toggleAttribute("inert", n !== t);
|
|
174
204
|
});
|
|
175
205
|
}, /**
|
|
176
206
|
* Sets the pagination indicator to the current slide
|
|
@@ -181,5 +211,5 @@ T = function() {
|
|
|
181
211
|
});
|
|
182
212
|
};
|
|
183
213
|
export {
|
|
184
|
-
|
|
214
|
+
M as default
|
|
185
215
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { Slide } from '../../types';
|
|
2
|
+
type CarouselSlideProps = {
|
|
3
|
+
slide: Slide;
|
|
4
|
+
index: number;
|
|
5
|
+
currentIndex: number;
|
|
6
|
+
variableHeight?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function CarouselSlide({ slide, index, currentIndex, variableHeight, }: CarouselSlideProps): JSX.Element;
|
|
7
9
|
export default CarouselSlide;
|
|
@@ -1,37 +1,101 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { classes as
|
|
4
|
-
import { slideLayoutsMap as
|
|
5
|
-
import '../../assets/CarouselSlide.css';
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx as i, Fragment as u } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p, useEffect as d, createElement as f } from "react";
|
|
3
|
+
import { classes as C } from "../../utils/helpers.js";
|
|
4
|
+
import { slideLayoutsMap as L } from "../../settings.js";
|
|
5
|
+
import '../../assets/CarouselSlide.css';class k {
|
|
6
|
+
constructor(r = "") {
|
|
7
|
+
this.namespace = "", this.component = "", this.shouldLog = !0, this.backgroundColor = "transparent", this.logLevel = "log", this.LevelColors = {
|
|
8
|
+
log: "#a9a9a9",
|
|
9
|
+
info: "#0061ff",
|
|
10
|
+
warn: "#ff9d00",
|
|
11
|
+
error: "#ff5252"
|
|
12
|
+
}, this.logger = (e, ...o) => {
|
|
13
|
+
if (!this.shouldLog && this.logLevel !== "error" && this.logLevel !== "warn")
|
|
14
|
+
return;
|
|
15
|
+
const l = `color: ${this.LevelColors[this.logLevel]}; background-color: ${this.backgroundColor};`;
|
|
16
|
+
console[this.logLevel](e, "color: #00d68b; font-weight: bold;", l, ...o);
|
|
17
|
+
}, this.log = (e, ...o) => {
|
|
18
|
+
this.logLevel = "log", this.logger(this.formatMessage(e), ...o);
|
|
19
|
+
}, this.info = (e, ...o) => {
|
|
20
|
+
this.logLevel = "info", this.logger(this.formatMessage(e), ...o);
|
|
21
|
+
}, this.error = (e, ...o) => {
|
|
22
|
+
this.logLevel = "error", this.logger(this.formatMessage(e), ...o);
|
|
23
|
+
}, this.warn = (e, ...o) => {
|
|
24
|
+
this.logLevel = "warn", this.logger(this.formatMessage(e), ...o);
|
|
25
|
+
}, this.setNamespace = (e) => {
|
|
26
|
+
this.namespace = e;
|
|
27
|
+
}, this.getNamespace = () => this.namespace, this.clearNamespace = () => {
|
|
28
|
+
this.namespace = "";
|
|
29
|
+
}, this.setComponent = (e) => {
|
|
30
|
+
this.component = e;
|
|
31
|
+
}, this.getComponent = () => this.component, this.clearComponent = () => {
|
|
32
|
+
this.component = "";
|
|
33
|
+
}, this.setShouldLog = (e) => {
|
|
34
|
+
this.shouldLog = e;
|
|
35
|
+
}, this.getShouldLog = () => this.shouldLog, this.setBackgroundColor = (e) => {
|
|
36
|
+
this.backgroundColor = e;
|
|
37
|
+
}, this.getBackgroundColor = () => this.backgroundColor, this.clearBackgroundColor = () => {
|
|
38
|
+
this.backgroundColor = "transparent";
|
|
39
|
+
}, this.formatMessage = (e) => {
|
|
40
|
+
let o = e;
|
|
41
|
+
return this.namespace ? o = `%c[${this.namespace}]${this.component ? ": " + this.component + " : " : " "}%c${e}` : o = `%c${this.component ? ": " + this.component + " : " : ""}%c${e}`, o;
|
|
42
|
+
}, this.namespace = r;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
class a {
|
|
46
|
+
constructor() {
|
|
47
|
+
}
|
|
48
|
+
static getInstance() {
|
|
49
|
+
return a.instance || (a.instance = new k()), a.instance;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const t = a.getInstance(), h = {
|
|
53
|
+
log: t.log,
|
|
54
|
+
info: t.info,
|
|
55
|
+
warn: t.warn,
|
|
56
|
+
error: t.error,
|
|
57
|
+
setBackgroundColor: t.setBackgroundColor,
|
|
58
|
+
getBackgroundColor: t.getBackgroundColor,
|
|
59
|
+
clearBackgroundColor: t.clearBackgroundColor,
|
|
60
|
+
setComponent: t.setComponent,
|
|
61
|
+
getComponent: t.getComponent,
|
|
62
|
+
clearComponent: t.clearComponent,
|
|
63
|
+
setNamespace: t.setNamespace,
|
|
64
|
+
getNamespace: t.getNamespace,
|
|
65
|
+
clearNamespace: t.clearNamespace,
|
|
66
|
+
setShouldLog: t.setShouldLog,
|
|
67
|
+
getShouldLog: t.getShouldLog
|
|
68
|
+
}, v = "_slide_1echy_2", c = {
|
|
69
|
+
slide: v,
|
|
70
|
+
"slide--variable-height": "_slide--variable-height_1echy_18"
|
|
8
71
|
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
72
|
+
h.setComponent("CarouselSlide");
|
|
73
|
+
function $({
|
|
74
|
+
slide: s,
|
|
75
|
+
index: r,
|
|
76
|
+
currentIndex: e,
|
|
77
|
+
variableHeight: o = !1
|
|
14
78
|
}) {
|
|
15
|
-
const [
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
}, [
|
|
79
|
+
const [l, n] = p(null);
|
|
80
|
+
return d(() => {
|
|
81
|
+
n(L.get(s.layout) || null);
|
|
82
|
+
}, [s]), h.log("slide", s, "index", r, "currentIndex", e), /* @__PURE__ */ i(u, { children: /* @__PURE__ */ i(
|
|
19
83
|
"li",
|
|
20
84
|
{
|
|
21
|
-
|
|
22
|
-
|
|
85
|
+
"aria-label": s.ariaLabel,
|
|
86
|
+
"aria-roledescription": "carousel-item",
|
|
87
|
+
className: C([
|
|
88
|
+
c.slide,
|
|
23
89
|
"slide",
|
|
24
|
-
|
|
90
|
+
o ? c["slide--variable-height"] : ""
|
|
25
91
|
]),
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
"data-index": l,
|
|
30
|
-
children: a !== null && e.cells.map((n, u) => /* @__PURE__ */ p(a, { ...n.props, key: `slide${l}-cell${u}` }))
|
|
92
|
+
"data-index": r,
|
|
93
|
+
...e !== r ? { inert: "" } : {},
|
|
94
|
+
children: l !== null && s.cells.map((g, m) => /* @__PURE__ */ f(l, { ...g.props, key: `slide${r}-cell${m}` }))
|
|
31
95
|
}
|
|
32
96
|
) });
|
|
33
97
|
}
|
|
34
98
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
99
|
+
$ as CarouselSlide,
|
|
100
|
+
$ as default
|
|
37
101
|
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { CarouselSlide
|
|
1
|
+
export { CarouselSlide } from './CarouselSlide';
|
|
2
|
+
export { CarouselSlide as default } from './CarouselSlide';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function Empty():
|
|
1
|
+
export declare function Empty(): JSX.Element;
|
|
2
2
|
export default Empty;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { Empty
|
|
1
|
+
export { Empty } from './Empty';
|
|
2
|
+
export { Empty as default } from './Empty';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export function FigureSlide({ images, imagesPerSlide }: {
|
|
1
|
+
export declare function FigureSlide({ images, imagesPerSlide }: {
|
|
2
2
|
images?: {
|
|
3
3
|
url: string;
|
|
4
4
|
altText: string;
|
|
5
5
|
caption: string;
|
|
6
6
|
}[] | undefined;
|
|
7
7
|
imagesPerSlide?: number | undefined;
|
|
8
|
-
}):
|
|
8
|
+
}): JSX.Element;
|
|
9
9
|
export default FigureSlide;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
3
|
-
import { classes as s } from "../../../../utils/helpers.js";
|
|
2
|
+
import { classes as u } from "../../../../utils/helpers.js";
|
|
4
3
|
import '../../../../assets/Figure.css';const r = {
|
|
5
|
-
"figure-
|
|
6
|
-
"figure-
|
|
7
|
-
"figure-slide--captioned-image": "_figure-slide--captioned-
|
|
4
|
+
"figure-slide__figure": "_figure-slide__figure_1140y_2",
|
|
5
|
+
"figure-slide": "_figure-slide_1140y_2",
|
|
6
|
+
"figure-slide--captioned-image": "_figure-slide--captioned-image_1140y_36"
|
|
8
7
|
};
|
|
9
|
-
function
|
|
10
|
-
return /* @__PURE__ */ i("div", { className: r["figure-slide"], children: l.map((e,
|
|
8
|
+
function c({ images: l = [{ url: "", altText: "", caption: "" }], imagesPerSlide: t = 1 }) {
|
|
9
|
+
return /* @__PURE__ */ i("div", { className: r["figure-slide"], children: l.map((e, s) => /* @__PURE__ */ i(
|
|
11
10
|
"figure",
|
|
12
11
|
{
|
|
13
|
-
className:
|
|
12
|
+
className: u([
|
|
14
13
|
r["figure-slide__figure"],
|
|
15
14
|
e != null && e.caption ? r["figure-slide--captioned-image"] : ""
|
|
16
15
|
]),
|
|
@@ -21,10 +20,10 @@ function n({ images: l = [{ url: "", altText: "", caption: "" }], imagesPerSlide
|
|
|
21
20
|
title: e.altText !== "" ? e.altText : "",
|
|
22
21
|
children: (e == null ? void 0 : e.caption) && /* @__PURE__ */ i("figcaption", { children: e.caption })
|
|
23
22
|
},
|
|
24
|
-
`figure-${
|
|
23
|
+
`figure-${s}`
|
|
25
24
|
)) });
|
|
26
25
|
}
|
|
27
26
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
c as FigureSlide,
|
|
28
|
+
c as default
|
|
30
29
|
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { FigureSlide
|
|
1
|
+
export { FigureSlide } from './Figure';
|
|
2
|
+
export { FigureSlide as default } from './Figure';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export function TextSlide({ text, backgroundColor, textColor, fontSize }: {
|
|
1
|
+
export declare function TextSlide({ text, backgroundColor, textColor, fontSize, }: {
|
|
2
2
|
text?: string | undefined;
|
|
3
3
|
backgroundColor?: string | undefined;
|
|
4
4
|
textColor?: string | undefined;
|
|
5
5
|
fontSize?: string | undefined;
|
|
6
|
-
}):
|
|
6
|
+
}): JSX.Element;
|
|
7
7
|
export default TextSlide;
|
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
3
|
-
import { classes as r } from "../../../../utils/helpers.js";
|
|
2
|
+
import { classes as _ } from "../../../../utils/helpers.js";
|
|
4
3
|
import '../../../../assets/TextSlide.css';const e = {
|
|
5
4
|
"text-slide": "_text-slide_1h4rx_1",
|
|
6
5
|
"text-slide__text": "_text-slide__text_1h4rx_9"
|
|
7
6
|
};
|
|
8
|
-
function
|
|
7
|
+
function o({
|
|
9
8
|
text: s = "",
|
|
10
9
|
backgroundColor: l = "#fff",
|
|
11
|
-
textColor:
|
|
12
|
-
fontSize:
|
|
10
|
+
textColor: x = "#444",
|
|
11
|
+
fontSize: i = "2.4rem"
|
|
13
12
|
}) {
|
|
14
13
|
return /* @__PURE__ */ t("div", { className: e["text-slide"], children: /* @__PURE__ */ t(
|
|
15
14
|
"div",
|
|
16
15
|
{
|
|
17
|
-
className:
|
|
16
|
+
className: _([e["text-slide__text"], "text-slide__text"]),
|
|
18
17
|
style: {
|
|
19
18
|
backgroundColor: l,
|
|
20
|
-
color:
|
|
21
|
-
fontSize:
|
|
19
|
+
color: x,
|
|
20
|
+
fontSize: i
|
|
22
21
|
},
|
|
23
22
|
children: s
|
|
24
23
|
}
|
|
25
24
|
) });
|
|
26
25
|
}
|
|
27
26
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
o as TextSlide,
|
|
28
|
+
o as default
|
|
30
29
|
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { TextSlide
|
|
1
|
+
export { TextSlide } from './TextSlide';
|
|
2
|
+
export { TextSlide as default } from './TextSlide';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { p as r } from "../../../../index-
|
|
3
|
+
import { p as r } from "../../../../index-VjANCDXC.mjs";
|
|
4
4
|
import { classes as e } from "../../../../utils/helpers.js";
|
|
5
5
|
import '../../../../assets/TwoColumnSlide.css';const m = {
|
|
6
6
|
"two-column-slide": "_two-column-slide_1p3kg_1"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as l } from "react";
|
|
3
|
+
import { Concat as n } from "../Concat/Concat.js";
|
|
3
4
|
import { ImageCard as s } from "../ImageCard/ImageCard.js";
|
|
4
5
|
import { AdjustableTwoColumnGrid as i } from "../AdjustableTwoColumnGrid/AdjustableTwoColumnGrid.js";
|
|
5
|
-
import { Concat as n } from "../Concat/Concat.js";
|
|
6
6
|
import { SectionedContent as c } from "../SectionedContent/SectionedContent.js";
|
|
7
7
|
function h(a) {
|
|
8
8
|
const t = a != null && a.castMember ? a.castMember : { ...a };
|