@scrippsproduct/networks-ui-library 1.1.0-alpha.2 → 1.1.0-alpha.4
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/assets/ScheduleList.css +1 -1
- package/dist/components/ImageCard/ImageCardCore.js +1 -0
- package/dist/components/ScheduleLayout/ScheduleLayout.d.ts +2 -1
- package/dist/components/ScheduleLayout/ScheduleLayout.js +55 -33
- package/dist/components/ScheduleList/ScheduleList.d.ts +2 -1
- package/dist/components/ScheduleList/ScheduleList.js +90 -82
- package/dist/components/ScheduleList/schedule-list-items/AirDateSegment.js +9 -9
- package/package.json +7 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
._schedule-
|
|
1
|
+
._schedule-list__item_wmqq1_1{display:grid;grid-template-columns:10% 1fr;column-gap:2.5rem;padding:1rem 0;padding:2rem 0 2.4rem;border-bottom:1px solid}._schedule-list__item_wmqq1_1:last-child{border:none}._schedule-list__airdate_wmqq1_14{align-self:center;font-size:2.25rem;font-weight:500;color:var(--mono-color-400);text-wrap:balance;overflow-wrap:break-word}._schedule-list__airdate_wmqq1_14 ._airdate-formatter__date_wmqq1_22,._schedule-list__airdate_wmqq1_14 ._airdate-formatter__day_wmqq1_23{display:none}._schedule-list__airdate_wmqq1_14 ._airdate-formatter__time-wrap_wmqq1_26 br{display:inline}._schedule-list_wmqq1_1{padding:0;opacity:1}._schedule-list_wmqq1_1[data-state=idle]{opacity:1}._schedule-list_wmqq1_1[data-state=exiting]{animation-name:_fade-out_wmqq1_1;animation-duration:.4s;animation-timing-function:ease-in-out;animation-fill-mode:forwards}._schedule-list_wmqq1_1[data-state=entering]{animation-name:_fade-in_wmqq1_1;animation-duration:.4s;animation-timing-function:ease-in-out;animation-fill-mode:forwards}._schedule-list__no-schedule_wmqq1_50{padding:2rem;text-align:center;opacity:1}._schedule-list__no-schedule_wmqq1_50[data-state=idle]{opacity:1}._schedule-list__no-schedule_wmqq1_50[data-state=exiting]{animation-name:_fade-out_wmqq1_1;animation-duration:.4s;animation-timing-function:ease-in-out;animation-fill-mode:forwards}._schedule-list__no-schedule_wmqq1_50[data-state=entering]{animation-name:_fade-in_wmqq1_1;animation-duration:.4s;animation-timing-function:ease-in-out;animation-fill-mode:forwards}._schedule-list__no-schedule_wmqq1_50 h2{margin-bottom:1rem}._schedule-list__no-schedule_wmqq1_50 p{margin:0}._schedule-list__no-schedule_wmqq1_50 a{color:inherit;text-decoration:underline}@media screen and (max-width:93.75rem){._schedule-list__airdate_wmqq1_14{font-size:2rem}}@media screen and (max-width:80rem){._schedule-list__item_wmqq1_1{display:block}._schedule-list__airdate_wmqq1_14{margin-block-end:.5rem}._schedule-list__airdate_wmqq1_14 ._airdate-formatter__time-wrap_wmqq1_26 br{display:none}._schedule-content-constrainer_wmqq1_102{padding-top:.01rem}}@media screen and (max-width:71.5rem){._schedule-list__item_wmqq1_1{grid-template-columns:15% 1fr}._date-navigation__weekday_wmqq1_110{font-size:1.4rem}._date-navigation__date_wmqq1_113{font-size:1rem}}@media screen and (max-width:50rem){._schedule-list__item_wmqq1_1 image-card{flex-direction:column;gap:1.5rem}._schedule-list__item_wmqq1_1 ._image-card__content_wmqq1_122{align-self:flex-start}}@keyframes _fade-in_wmqq1_1{0%{opacity:0}to{opacity:1}}@keyframes _fade-out_wmqq1_1{0%{opacity:1}to{opacity:0}}.schedule-list__airdate .airdate-formatter__date,.schedule-list__airdate .airdate-formatter__day{display:none}.schedule-list__item .h4{margin-bottom:.5rem;font-size:clamp(1.8rem,1.5vw + 1rem,2.625rem);line-height:1.2;color:var(--mono-color-400);text-transform:uppercase}.schedule-list__item .image-card__content{font-size:1.125rem}.schedule-list__item .image-card__content:first-of-type,.schedule-list__item .image-card__content~div{max-inline-size:80ch;margin-top:1.5rem;line-height:1.5;color:#444}@media screen and (max-width:50rem){.schedule-list__item .image-card__content:first-of-type{margin-block-start:0}}.schedule-list__item .image-card__content>div{margin:.5rem 0 1rem}.schedule-list__item .image-card__content>div:first-of-type:not(:last-of-type){font-size:1.372rem;font-weight:400;color:#444}.schedule-list__item .image-card__content>.string-list{color:var(--mono-color-400)}.schedule-list__item .string-list__pipe{margin:0 .4em;margin-inline:.4em;font-size:1.1em;vertical-align:baseline}.schedule-list__item .image-card__cta{font-weight:500;color:#861d42}.schedule-list__item .image-card__img-wrapper{flex:0 0 clamp(330px,47%,580px);align-self:flex-start;padding-top:.75rem}.schedule-list__on-now{width:max-content;margin-bottom:.75rem;margin-block-end:.75rem;padding:.5rem 1.75rem;font-size:1.125rem;color:var(--mono-color-100);text-transform:uppercase;text-wrap:nowrap;overflow-wrap:normal;white-space:nowrap;background-image:var(--on-now-gradient)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}
|
|
@@ -11,6 +11,7 @@ type ScheduleLayoutProps = {
|
|
|
11
11
|
weeks?: Day[][];
|
|
12
12
|
handleScheduleClicks?: (details: HandleClicksDetails) => boolean | void;
|
|
13
13
|
handleDateChanged?: (date: Date) => boolean | void;
|
|
14
|
+
fetchError?: boolean;
|
|
14
15
|
};
|
|
15
|
-
export declare function ScheduleLayout({ schedule, weeks, handleScheduleClicks, handleDateChanged, }: ScheduleLayoutProps): JSX.Element;
|
|
16
|
+
export declare function ScheduleLayout({ schedule, weeks, handleScheduleClicks, handleDateChanged, fetchError, }: ScheduleLayoutProps): JSX.Element;
|
|
16
17
|
export default ScheduleLayout;
|
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { useRef as d, useCallback as
|
|
3
|
-
import { f as
|
|
1
|
+
import { jsx as t, jsxs as L } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as d, useCallback as w, useEffect as v } from "react";
|
|
3
|
+
import { f as b } from "../../format-YhWt2D8M.mjs";
|
|
4
4
|
import { l as c } from "../../logger-C0N7U0YY.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { classes as E } from "../../utils/helpers.js";
|
|
6
|
+
import { ScheduleProvider as T } from "./ScheduleContext.js";
|
|
7
|
+
import { useScheduleContext as k } from "./useScheduleContext.js";
|
|
8
|
+
import { DateNavigation as q } from "../DateNavigation/DateNavigation.js";
|
|
9
|
+
import { ScheduleList as x } from "../ScheduleList/ScheduleList.js";
|
|
9
10
|
c.setComponent("ScheduleLayout");
|
|
10
|
-
import '../../assets/ScheduleLayout.css';function
|
|
11
|
-
handleScheduleClicks: f = () => !0
|
|
11
|
+
import '../../assets/ScheduleLayout.css';function C({
|
|
12
|
+
handleScheduleClicks: f = () => !0,
|
|
13
|
+
fetchError: p = !1
|
|
12
14
|
}) {
|
|
13
|
-
const { currentDate: n } =
|
|
15
|
+
const { currentDate: n } = k(), r = d(null), m = d(0), i = d(null), s = d(null), l = d(null), a = w((u) => {
|
|
14
16
|
c.log("Determining pointer position for date: ", u);
|
|
15
17
|
const o = () => {
|
|
16
18
|
let e;
|
|
17
|
-
const
|
|
18
|
-
if (
|
|
19
|
-
const
|
|
20
|
-
|
|
19
|
+
const g = document.querySelector(`.date-navigation__day[aria-controls="${b(u, "yyyy-MM-dd")}"]`);
|
|
20
|
+
if (g && (e = g.parentElement), e && r.current) {
|
|
21
|
+
const S = e.offsetLeft + e.offsetWidth / 2;
|
|
22
|
+
m.current = S, r.current.style.setProperty(
|
|
21
23
|
"--pointer-position",
|
|
22
|
-
`${
|
|
24
|
+
`${S}px`
|
|
23
25
|
);
|
|
24
26
|
}
|
|
25
|
-
},
|
|
27
|
+
}, y = () => {
|
|
26
28
|
c.log("Scrolling schedule list to top"), c.log("Schedule list element: ", s.current), c.log("Sticky wrapper element: ", l.current);
|
|
27
29
|
const e = document.querySelector(".mobile-nav");
|
|
28
30
|
s.current && l.current && (c.log("Mobile nav element: ", e), window.scrollTo({
|
|
@@ -33,22 +35,22 @@ import '../../assets/ScheduleLayout.css';function q({
|
|
|
33
35
|
};
|
|
34
36
|
if (!r.current) {
|
|
35
37
|
const e = setInterval(() => {
|
|
36
|
-
r.current = document.querySelector(".date-navigation__list"), r.current && (clearInterval(e), s.current = document.querySelector(".schedule-list"), l.current = document.querySelector("sticky-content-wrapper"), o(),
|
|
38
|
+
r.current = document.querySelector(".date-navigation__list"), r.current && (clearInterval(e), s.current = document.querySelector(".schedule-list"), l.current = document.querySelector("sticky-content-wrapper"), o(), y());
|
|
37
39
|
}, 100);
|
|
38
40
|
setTimeout(() => {
|
|
39
41
|
clearInterval(e);
|
|
40
42
|
}, 3e3);
|
|
41
43
|
return;
|
|
42
44
|
}
|
|
43
|
-
o(),
|
|
44
|
-
}, []),
|
|
45
|
+
o(), y();
|
|
46
|
+
}, []), h = w(() => {
|
|
45
47
|
i.current && clearTimeout(i.current), i.current = window.setTimeout(() => {
|
|
46
48
|
a(n);
|
|
47
49
|
}, 250);
|
|
48
50
|
}, [n, a]);
|
|
49
|
-
return
|
|
50
|
-
window.removeEventListener("resize",
|
|
51
|
-
}), [a,
|
|
51
|
+
return v(() => (window.addEventListener("resize", h), () => {
|
|
52
|
+
window.removeEventListener("resize", h), i.current && clearTimeout(i.current);
|
|
53
|
+
}), [a, h]), v(() => {
|
|
52
54
|
const u = document.querySelector(".header-divider"), o = document.querySelector("sticky-content-wrapper");
|
|
53
55
|
o && u && new IntersectionObserver(
|
|
54
56
|
([e]) => {
|
|
@@ -59,22 +61,42 @@ import '../../assets/ScheduleLayout.css';function q({
|
|
|
59
61
|
rootMargin: "-37px"
|
|
60
62
|
}
|
|
61
63
|
).observe(u);
|
|
62
|
-
}, []),
|
|
64
|
+
}, []), v(() => {
|
|
63
65
|
a(n);
|
|
64
|
-
}, [n, a]), /* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */ t("sticky-content-wrapper", { "data-pinned-state": "unpinned", children: /* @__PURE__ */ t(
|
|
66
|
-
|
|
66
|
+
}, [n, a]), /* @__PURE__ */ L("schedule-layout", { children: [
|
|
67
|
+
/* @__PURE__ */ t("sticky-content-wrapper", { "data-pinned-state": "unpinned", children: /* @__PURE__ */ t(
|
|
68
|
+
"content-constrainer",
|
|
69
|
+
{
|
|
70
|
+
class: E([
|
|
71
|
+
"content-constrainer--no-padding",
|
|
72
|
+
"content-constrainer--no-border",
|
|
73
|
+
"content-constrainer--lead-container",
|
|
74
|
+
"schedule-date-nav-constrainer"
|
|
75
|
+
]),
|
|
76
|
+
children: /* @__PURE__ */ t(q, {})
|
|
77
|
+
}
|
|
78
|
+
) }),
|
|
79
|
+
/* @__PURE__ */ t("section", { className: "page-section", id: "schedule-section", children: /* @__PURE__ */ t("content-constrainer", { class: "content-constrainer--no-border schedule-content-constrainer", children: /* @__PURE__ */ t("div", { id: b(n, "yyyy-MM-dd"), role: "tabpanel", children: /* @__PURE__ */ t(x, { fetchError: p, handleClicks: f }) }) }) })
|
|
67
80
|
] });
|
|
68
81
|
}
|
|
69
|
-
function
|
|
82
|
+
function O({
|
|
70
83
|
schedule: f = [],
|
|
71
|
-
weeks:
|
|
72
|
-
handleScheduleClicks:
|
|
73
|
-
handleDateChanged:
|
|
84
|
+
weeks: p = [],
|
|
85
|
+
handleScheduleClicks: n = () => !0,
|
|
86
|
+
handleDateChanged: r = () => !0,
|
|
87
|
+
fetchError: m = !1
|
|
74
88
|
}) {
|
|
75
|
-
return /* @__PURE__ */ t(
|
|
89
|
+
return /* @__PURE__ */ t(
|
|
90
|
+
T,
|
|
91
|
+
{
|
|
92
|
+
handleDateChanged: r,
|
|
93
|
+
schedule: f,
|
|
94
|
+
weeks: p,
|
|
95
|
+
children: /* @__PURE__ */ t(C, { fetchError: m, handleScheduleClicks: n })
|
|
96
|
+
}
|
|
97
|
+
);
|
|
76
98
|
}
|
|
77
99
|
export {
|
|
78
|
-
|
|
79
|
-
|
|
100
|
+
O as ScheduleLayout,
|
|
101
|
+
O as default
|
|
80
102
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HandleClicksDetails } from '../../types.d.ts';
|
|
2
2
|
type ScheduleListProps = {
|
|
3
3
|
handleClicks?: (details: HandleClicksDetails) => boolean | void;
|
|
4
|
+
fetchError?: boolean;
|
|
4
5
|
};
|
|
5
|
-
export declare function ScheduleList({ handleClicks, }: ScheduleListProps): JSX.Element;
|
|
6
|
+
export declare function ScheduleList({ handleClicks, fetchError, }: ScheduleListProps): JSX.Element;
|
|
6
7
|
export default ScheduleList;
|
|
@@ -1,37 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useReducer as
|
|
3
|
-
import { getMinutesFromStr as
|
|
4
|
-
import { useScheduleContext as
|
|
1
|
+
import { jsx as a, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { useReducer as u, useState as R, useRef as w, useCallback as A, useEffect as c } from "react";
|
|
3
|
+
import { classes as T, getMinutesFromStr as L } from "../../utils/helpers.js";
|
|
4
|
+
import { useScheduleContext as b } from "../ScheduleLayout/useScheduleContext.js";
|
|
5
5
|
import { Loading as x } from "../Loading/Loading.js";
|
|
6
|
-
import { SportsItem as
|
|
7
|
-
import { SeriesItem as
|
|
8
|
-
import { MovieItem as
|
|
9
|
-
import '../../assets/ScheduleList.css';const
|
|
10
|
-
"schedule-list__item": "_schedule-
|
|
11
|
-
"schedule-list__airdate": "_schedule-
|
|
12
|
-
"airdate-formatter__date": "_airdate-
|
|
13
|
-
"airdate-formatter__day": "_airdate-
|
|
14
|
-
"airdate-formatter__time-wrap": "_airdate-formatter__time-
|
|
15
|
-
"schedule-list": "_schedule-
|
|
16
|
-
"fade-out": "_fade-
|
|
17
|
-
"fade-in": "_fade-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"image-
|
|
23
|
-
"image-card__cta": "_image-card__cta_r54qy_98",
|
|
24
|
-
"schedule-list__on-now": "_schedule-list__on-now_r54qy_103",
|
|
25
|
-
"schedule-list__no-schedule": "_schedule-list__no-schedule_r54qy_117",
|
|
26
|
-
"schedule-content-constrainer": "_schedule-content-constrainer_r54qy_137",
|
|
27
|
-
"date-navigation__weekday": "_date-navigation__weekday_r54qy_145",
|
|
28
|
-
"date-navigation__date": "_date-navigation__date_r54qy_148"
|
|
6
|
+
import { SportsItem as D } from "./schedule-list-items/SportsItem.js";
|
|
7
|
+
import { SeriesItem as M } from "./schedule-list-items/SeriesItem.js";
|
|
8
|
+
import { MovieItem as k } from "./schedule-list-items/MovieItem.js";
|
|
9
|
+
import '../../assets/ScheduleList.css';const f = {
|
|
10
|
+
"schedule-list__item": "_schedule-list__item_wmqq1_1",
|
|
11
|
+
"schedule-list__airdate": "_schedule-list__airdate_wmqq1_14",
|
|
12
|
+
"airdate-formatter__date": "_airdate-formatter__date_wmqq1_22",
|
|
13
|
+
"airdate-formatter__day": "_airdate-formatter__day_wmqq1_23",
|
|
14
|
+
"airdate-formatter__time-wrap": "_airdate-formatter__time-wrap_wmqq1_26",
|
|
15
|
+
"schedule-list": "_schedule-list_wmqq1_1",
|
|
16
|
+
"fade-out": "_fade-out_wmqq1_1",
|
|
17
|
+
"fade-in": "_fade-in_wmqq1_1",
|
|
18
|
+
"schedule-list__no-schedule": "_schedule-list__no-schedule_wmqq1_50",
|
|
19
|
+
"schedule-content-constrainer": "_schedule-content-constrainer_wmqq1_102",
|
|
20
|
+
"date-navigation__weekday": "_date-navigation__weekday_wmqq1_110",
|
|
21
|
+
"date-navigation__date": "_date-navigation__date_wmqq1_113",
|
|
22
|
+
"image-card__content": "_image-card__content_wmqq1_122"
|
|
29
23
|
};
|
|
30
|
-
function
|
|
24
|
+
function S(r) {
|
|
31
25
|
return typeof r == "object" && !Array.isArray(r) && "queryStatus" in r && r.queryStatus === "no-results";
|
|
32
26
|
}
|
|
33
|
-
function
|
|
34
|
-
switch (
|
|
27
|
+
function C(r, p) {
|
|
28
|
+
switch (p.type) {
|
|
35
29
|
case "START_EXIT":
|
|
36
30
|
return "exiting";
|
|
37
31
|
case "EXIT_COMPLETE":
|
|
@@ -44,9 +38,9 @@ function u(r, a) {
|
|
|
44
38
|
return r;
|
|
45
39
|
}
|
|
46
40
|
}
|
|
47
|
-
const
|
|
48
|
-
var
|
|
49
|
-
return (
|
|
41
|
+
const v = (r) => {
|
|
42
|
+
var p, t, s, n, e, o, y, g, _, l, i;
|
|
43
|
+
return (p = r.video) != null && p.brightcove_id ? {
|
|
50
44
|
label: "Watch Preview",
|
|
51
45
|
type: "play-video",
|
|
52
46
|
href: "",
|
|
@@ -77,10 +71,10 @@ const E = (r) => {
|
|
|
77
71
|
//'film',
|
|
78
72
|
position: void 0
|
|
79
73
|
//'inline',
|
|
80
|
-
} : (((
|
|
74
|
+
} : (((t = r == null ? void 0 : r.content) == null ? void 0 : t.external_link) !== void 0 && ((s = r == null ? void 0 : r.content) == null ? void 0 : s.external_link) !== "" || ((n = r == null ? void 0 : r.content) == null ? void 0 : n.slug) !== void 0 && ((e = r == null ? void 0 : r.content) == null ? void 0 : e.slug) !== "") && !((o = r == null ? void 0 : r.content) != null && o.prevent_detail_page) ? {
|
|
81
75
|
label: (r == null ? void 0 : r.program_class) === "Episode" ? "View Series Details" : (r == null ? void 0 : r.program_class) === "Film" ? "View Movie Details" : "Learn More",
|
|
82
|
-
type: (
|
|
83
|
-
href: (
|
|
76
|
+
type: (y = r == null ? void 0 : r.content) != null && y.external_link ? "external-link" : "internal-link",
|
|
77
|
+
href: (g = r == null ? void 0 : r.content) != null && g.external_link ? (_ = r == null ? void 0 : r.content) == null ? void 0 : _.external_link : r.program_class === "Episode" ? `/show/${(l = r == null ? void 0 : r.content) == null ? void 0 : l.slug}` : `/movie/${(i = r == null ? void 0 : r.content) == null ? void 0 : i.slug}`,
|
|
84
78
|
position: "inline"
|
|
85
79
|
} : {
|
|
86
80
|
label: "",
|
|
@@ -89,26 +83,27 @@ const E = (r) => {
|
|
|
89
83
|
position: void 0
|
|
90
84
|
};
|
|
91
85
|
};
|
|
92
|
-
function
|
|
93
|
-
handleClicks: r = () => !0
|
|
86
|
+
function H({
|
|
87
|
+
handleClicks: r = () => !0,
|
|
88
|
+
fetchError: p = !1
|
|
94
89
|
}) {
|
|
95
|
-
const { schedule:
|
|
96
|
-
_.current && (clearTimeout(_.current), _.current = null), n === "exiting" ?
|
|
90
|
+
const { schedule: t, isLoading: s } = b(), [n, e] = u(C, "idle"), [o, y] = R(t), g = w(null), _ = w(null), l = A(() => {
|
|
91
|
+
_.current && (clearTimeout(_.current), _.current = null), n === "exiting" ? e({ type: "EXIT_COMPLETE" }) : n === "entering" && e({ type: "ENTER_COMPLETE" });
|
|
97
92
|
}, [n]);
|
|
98
|
-
return
|
|
99
|
-
const i =
|
|
93
|
+
return c(() => {
|
|
94
|
+
const i = g.current;
|
|
100
95
|
if (i)
|
|
101
|
-
return i.addEventListener("animationend",
|
|
102
|
-
i.removeEventListener("animationend",
|
|
96
|
+
return i.addEventListener("animationend", l), () => {
|
|
97
|
+
i.removeEventListener("animationend", l);
|
|
103
98
|
};
|
|
104
|
-
}, [
|
|
105
|
-
s && n === "idle" &&
|
|
106
|
-
}, [s, n]),
|
|
107
|
-
const i =
|
|
108
|
-
!s && n === "loading" && i && (y(
|
|
109
|
-
}, [s, n,
|
|
99
|
+
}, [l]), c(() => {
|
|
100
|
+
s && n === "idle" && e({ type: "START_EXIT" });
|
|
101
|
+
}, [s, n]), c(() => {
|
|
102
|
+
const i = S(t) || Array.isArray(t) && t.length >= 0;
|
|
103
|
+
!s && n === "loading" && i && (y(t), e({ type: "SCHEDULE_LOADED" }));
|
|
104
|
+
}, [s, n, t]), c(() => () => {
|
|
110
105
|
_.current && clearTimeout(_.current);
|
|
111
|
-
}, []), n === "loading" ? /* @__PURE__ */
|
|
106
|
+
}, []), n === "loading" ? /* @__PURE__ */ a(
|
|
112
107
|
"div",
|
|
113
108
|
{
|
|
114
109
|
style: {
|
|
@@ -117,69 +112,82 @@ function j({
|
|
|
117
112
|
minHeight: "100dvh",
|
|
118
113
|
paddingTop: "6rem"
|
|
119
114
|
},
|
|
120
|
-
children: /* @__PURE__ */
|
|
115
|
+
children: /* @__PURE__ */ a(x, {})
|
|
121
116
|
}
|
|
122
|
-
) :
|
|
117
|
+
) : p ? /* @__PURE__ */ d("div", { className: "schedule-list__no-schedule", children: [
|
|
118
|
+
/* @__PURE__ */ a("h2", { children: "There was an error loading the schedule for this day." }),
|
|
119
|
+
/* @__PURE__ */ d("p", { children: [
|
|
120
|
+
"Please try again later. If this problem persists report it at ",
|
|
121
|
+
/* @__PURE__ */ a("a", { href: "https://support.iontelevision.com/support/home", children: "our support page" }),
|
|
122
|
+
"."
|
|
123
|
+
] })
|
|
124
|
+
] }) : S(o) ? /* @__PURE__ */ d(
|
|
123
125
|
"div",
|
|
124
126
|
{
|
|
125
|
-
className:
|
|
127
|
+
className: T([
|
|
128
|
+
f["schedule-list__no-schedule"],
|
|
129
|
+
"schedule-list__no-schedule"
|
|
130
|
+
]),
|
|
126
131
|
"data-state": n,
|
|
127
132
|
style: { animationDelay: "500ms" },
|
|
128
133
|
children: [
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ a("h2", { children: "There are no shows scheduled for this day." }),
|
|
135
|
+
/* @__PURE__ */ d("p", { children: [
|
|
131
136
|
"Please try again later. If this problem persists report it at ",
|
|
132
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ a("a", { href: "https://support.iontelevision.com/support/home", children: "our support page" }),
|
|
133
138
|
"."
|
|
134
139
|
] })
|
|
135
140
|
]
|
|
136
141
|
}
|
|
137
|
-
) : Array.isArray(o) && o.length === 0 ? /* @__PURE__ */
|
|
142
|
+
) : Array.isArray(o) && o.length === 0 ? /* @__PURE__ */ d(
|
|
138
143
|
"div",
|
|
139
144
|
{
|
|
140
|
-
className:
|
|
145
|
+
className: T([
|
|
146
|
+
f["schedule-list__no-schedule"],
|
|
147
|
+
"schedule-list__no-schedule"
|
|
148
|
+
]),
|
|
141
149
|
"data-state": n,
|
|
142
150
|
children: [
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ a("h2", { children: "Our programming schedule for today has completed." }),
|
|
152
|
+
/* @__PURE__ */ a("p", { children: "Our programming will restart at 6am." })
|
|
145
153
|
]
|
|
146
154
|
}
|
|
147
|
-
) : /* @__PURE__ */
|
|
155
|
+
) : /* @__PURE__ */ a(
|
|
148
156
|
"ul",
|
|
149
157
|
{
|
|
150
|
-
className: `${
|
|
158
|
+
className: `${f["schedule-list"]} schedule-list`,
|
|
151
159
|
"data-state": n,
|
|
152
|
-
ref:
|
|
160
|
+
ref: g,
|
|
153
161
|
children: Array.isArray(o) && o.map((i) => {
|
|
154
|
-
const
|
|
155
|
-
return i.program_class === "Episode" ? /* @__PURE__ */
|
|
156
|
-
|
|
162
|
+
const q = L(i.element_length), E = v(i).type === "" ? [q, i.rating] : [q, i.rating, " "];
|
|
163
|
+
return i.program_class === "Episode" ? /* @__PURE__ */ a(
|
|
164
|
+
M,
|
|
157
165
|
{
|
|
158
|
-
determineCTA:
|
|
166
|
+
determineCTA: v,
|
|
159
167
|
handleClicks: r,
|
|
160
168
|
scheduleItem: i,
|
|
161
|
-
strListArr:
|
|
162
|
-
styles:
|
|
169
|
+
strListArr: E,
|
|
170
|
+
styles: f
|
|
163
171
|
},
|
|
164
172
|
`schedule-list-${i.id}`
|
|
165
|
-
) : i.program_class === "Film" || i.program_class === "Movie" || i.program_class === "Special" ? /* @__PURE__ */
|
|
166
|
-
|
|
173
|
+
) : i.program_class === "Film" || i.program_class === "Movie" || i.program_class === "Special" ? /* @__PURE__ */ a(
|
|
174
|
+
k,
|
|
167
175
|
{
|
|
168
|
-
determineCTA:
|
|
176
|
+
determineCTA: v,
|
|
169
177
|
handleClicks: r,
|
|
170
178
|
scheduleItem: i,
|
|
171
|
-
strListArr:
|
|
172
|
-
styles:
|
|
179
|
+
strListArr: E,
|
|
180
|
+
styles: f
|
|
173
181
|
},
|
|
174
182
|
`schedule-list-${i.id}`
|
|
175
|
-
) : i.program_class === "Sports" ? /* @__PURE__ */
|
|
176
|
-
|
|
183
|
+
) : i.program_class === "Sports" ? /* @__PURE__ */ a(
|
|
184
|
+
D,
|
|
177
185
|
{
|
|
178
|
-
determineCTA:
|
|
186
|
+
determineCTA: v,
|
|
179
187
|
handleClicks: r,
|
|
180
188
|
scheduleItem: i,
|
|
181
|
-
strListArr:
|
|
182
|
-
styles:
|
|
189
|
+
strListArr: E,
|
|
190
|
+
styles: f
|
|
183
191
|
},
|
|
184
192
|
`schedule-list-${i.id}`
|
|
185
193
|
) : null;
|
|
@@ -188,6 +196,6 @@ function j({
|
|
|
188
196
|
);
|
|
189
197
|
}
|
|
190
198
|
export {
|
|
191
|
-
|
|
192
|
-
|
|
199
|
+
H as ScheduleList,
|
|
200
|
+
H as default
|
|
193
201
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { determineIfShowIsOnNow as s } from "../../../utils/date-helpers.js";
|
|
3
|
-
import { classes as
|
|
3
|
+
import { classes as a, convert12to24 as i } from "../../../utils/helpers.js";
|
|
4
4
|
import { AirDateFormatter as n } from "../../AirDateFormatter/AirDateFormatter.js";
|
|
5
5
|
function p({
|
|
6
6
|
scheduleItem: t,
|
|
7
|
-
styles:
|
|
7
|
+
styles: r
|
|
8
8
|
}) {
|
|
9
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ o(
|
|
10
10
|
"div",
|
|
11
11
|
{
|
|
12
|
-
className:
|
|
12
|
+
className: a([r["schedule-list__airdate"], "schedule-list__airdate"]),
|
|
13
13
|
children: [
|
|
14
14
|
s(
|
|
15
|
-
`${t.start_date_parse}T${
|
|
15
|
+
`${t.start_date_parse}T${i(t.start_time)}`,
|
|
16
16
|
t.element_length
|
|
17
|
-
) && /* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */
|
|
17
|
+
) && /* @__PURE__ */ e("div", { className: a([r["schedule-list__on-now"], "schedule-list__on-now"]), children: "On Now" }),
|
|
18
|
+
/* @__PURE__ */ e(
|
|
19
19
|
n,
|
|
20
20
|
{
|
|
21
|
-
airdateStr: `${t.start_date} ${
|
|
21
|
+
airdateStr: `${t.start_date} ${i(t.start_time)}`,
|
|
22
22
|
separatorType: "line-break"
|
|
23
23
|
}
|
|
24
24
|
)
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.1.0-alpha.
|
|
2
|
+
"version": "1.1.0-alpha.4",
|
|
3
3
|
"name": "@scrippsproduct/networks-ui-library",
|
|
4
4
|
"description": "React Component Library for use in Scripps Networks external applications",
|
|
5
5
|
"author": {
|
|
@@ -123,15 +123,16 @@
|
|
|
123
123
|
},
|
|
124
124
|
"browserslist": {
|
|
125
125
|
"production": [
|
|
126
|
-
">0.
|
|
126
|
+
">0.4%",
|
|
127
127
|
"not dead",
|
|
128
128
|
"not op_mini all",
|
|
129
|
-
"not
|
|
129
|
+
"not safari < 16",
|
|
130
|
+
"not firefox < 120"
|
|
130
131
|
],
|
|
131
132
|
"development": [
|
|
132
|
-
"last
|
|
133
|
-
"last
|
|
134
|
-
"last
|
|
133
|
+
"last 5 chrome version",
|
|
134
|
+
"last 5 firefox version",
|
|
135
|
+
"last 5 safari version"
|
|
135
136
|
]
|
|
136
137
|
}
|
|
137
138
|
}
|