@scrippsproduct/networks-ui-library 1.1.9 → 1.1.10
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-Cd8qH2rj.mjs → Form.module-CarfWK5T.mjs} +1 -1
- package/dist/ResultsTable.module-wcNUQEKe.mjs +14 -0
- package/dist/_commonjsHelpers-DaMA6jEr.mjs +8 -0
- package/dist/assets/ResultsTable.css +1 -1
- package/dist/{chevron-left-DRvpaLmK.mjs → chevron-left-D0UjbrKw.mjs} +1 -1
- package/dist/{chevron-right-C8yCnmfx.mjs → chevron-right-0ZF3LruR.mjs} +1 -1
- package/dist/components/ActionButton/ActionButton.test.js +209 -0
- package/dist/components/AdBlock/AdBlock.test.js +286 -0
- package/dist/components/AdjustableTwoColumnGrid/AdjustableTwoColumnGrid.test.js +295 -0
- package/dist/components/AirDateFormatter/AirDateFormatter.test.js +192 -0
- package/dist/components/AnchorTag/AnchorTag.test.js +463 -0
- package/dist/components/BCVideoPlayer/BCVideoPlayer.test.js +295 -0
- package/dist/components/BasicGridModule/BasicGridModule.js +41 -37
- package/dist/components/BasicGridModule/BasicGridModule.test.js +227 -0
- package/dist/components/Button/Button.test.js +434 -0
- package/dist/components/Carousel/Carousel.js +2 -2
- package/dist/components/Carousel/Carousel.test.js +705 -0
- package/dist/components/CarouselSlide/CarouselSlide.test.js +378 -0
- package/dist/components/CarouselSlide/slide-layouts/TwoColumn/TwoColumnSlide.js +1 -1
- package/dist/components/CastInfoLayout/CastInfoLayout.test.js +294 -0
- package/dist/components/ChannelSearch/ChannelSearch.test.js +565 -0
- package/dist/components/ChoicesItem/ChoicesItem.test.js +428 -0
- package/dist/components/Concat/Concat.js +1 -1
- package/dist/components/Concat/Concat.test.js +115 -0
- package/dist/components/CtaBlock/CtaBlock.js +1 -1
- package/dist/components/CtaBlock/CtaBlock.test.js +226 -0
- package/dist/components/CustomDataList/CustomDataList.js +4 -4
- package/dist/components/CustomSelect/CustomSelect.js +86 -86
- package/dist/components/CustomSelect/CustomSelect.test.js +313 -0
- package/dist/components/DateNavigation/DateNavigation.js +10 -10
- package/dist/components/DateNavigation/DateNavigation.test.js +370 -0
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/DeviceAndPlatformLists/DeviceAndPlatformLists.test.js +288 -0
- package/dist/components/DrawerNavigation/DrawerNavigation.test.js +316 -0
- package/dist/components/EqualSizeFlexRow/EqualSizeFlexRow.test.js +337 -0
- package/dist/components/EqualSizeGrid/EqualSizeGrid.test.js +358 -0
- package/dist/components/ErrorHandler/ErrorHandler.js +2 -2
- package/dist/components/ErrorHandler/ErrorHandler.test.js +158 -0
- package/dist/components/FeaturedList/FeaturedList.test.js +353 -0
- package/dist/components/Figure/Figure.js +1 -1
- package/dist/components/Figure/Figure.test.js +198 -0
- package/dist/components/FindUs/FindUs.test.js +499 -0
- package/dist/components/FooterNavigation/FooterNavigation.test.js +310 -0
- package/dist/components/GenericList/GenericList.js +1 -1
- package/dist/components/GenericList/GenericList.test.js +288 -0
- package/dist/components/GetAirdateWrapper/GetAirdateWrapper.test.js +689 -0
- package/dist/components/GradientButton/GradientButton.d.ts +1 -1
- package/dist/components/GradientButton/GradientButton.js +33 -31
- package/dist/components/GradientButton/GradientButton.test.js +457 -0
- package/dist/components/GridList/GridList.test.js +371 -0
- package/dist/components/ImageCard/ImageCard.test.js +668 -0
- package/dist/components/ImageCard/ImageCardCore.js +28 -28
- package/dist/components/ImageCard/ImageCardCore.test.js +577 -0
- package/dist/components/ImageReplacementAnchor/ImageReplacementAnchor.test.js +379 -0
- package/dist/components/InfoPanel/InfoPanel.js +1 -1
- package/dist/components/InlineNavigation/InlineNavigation.test.js +149 -0
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/Input.test.js +263 -0
- package/dist/components/InstructionsList/InstructionsList.js +11 -11
- package/dist/components/InstructionsList/InstructionsList.test.js +181 -0
- package/dist/components/LogoListItem/LogoListItem.test.js +303 -0
- package/dist/components/LogoNavigation/LogoNavigation.test.js +352 -0
- package/dist/components/ModalContainer/ModalContainer.js +2 -2
- package/dist/components/NavList/NavList.test.js +332 -0
- package/dist/components/Overlay/Overlay.js +24 -23
- package/dist/components/Overlay/Overlay.test.js +198 -0
- package/dist/components/PageHero/PageHero.test.js +241 -0
- package/dist/components/PageHero/page-hero-layouts/IONShow/IONShowHero.js +1 -1
- package/dist/components/ProgramAirdate/ProgramAirdate.js +1 -1
- package/dist/components/ProgramAirdate/ProgramAirdate.test.js +414 -0
- package/dist/components/PromotionBlock/PromotionBlock.test.js +208 -0
- package/dist/components/PromotionsRowBlock/PromotionsRowBlock.test.js +221 -0
- package/dist/components/PromotionsRowModule/PromotionsRowModule.test.js +349 -0
- package/dist/components/RescanInstructions/RescanInstructions.test.js +218 -0
- package/dist/components/ResponsiveImage/ResponsiveImage.test.js +264 -0
- package/dist/components/ResultsTable/ResultsTable.js +9 -2
- package/dist/components/ResultsTable/ResultsTable.test.js +402 -0
- package/dist/components/ResultsTableBody/ResultsTableBody.js +1 -1
- package/dist/components/ResultsTableBody/ResultsTableBody.test.js +445 -0
- package/dist/components/ResultsTableHeader/ResultsTableHeader.js +37 -15
- package/dist/components/ResultsTableHeader/ResultsTableHeader.test.js +275 -0
- package/dist/components/ScheduleLayout/ScheduleContext.js +654 -626
- package/dist/components/ScheduleLayout/ScheduleLayout.js +1 -1
- package/dist/components/ScheduleLayout/useScheduleContext.js +5 -10
- package/dist/components/ScheduleList/ScheduleList.js +1 -1
- package/dist/components/SectionedContent/SectionedContent.js +1 -1
- package/dist/components/SectionedContent/SectionedContent.test.js +341 -0
- package/dist/components/Select/Select.js +24 -24
- package/dist/components/Select/Select.test.js +367 -0
- package/dist/components/ShowAboutContent/ShowAboutContent.js +1 -1
- package/dist/components/ShowAboutContent/ShowAboutContent.test.js +535 -0
- package/dist/components/ShowAboutLayout/ShowAboutLayout.test.js +570 -0
- package/dist/components/SocialLinks/SocialLinks.js +1 -1
- package/dist/components/StringList/StringList.js +1 -1
- package/dist/components/StringList/StringList.test.js +311 -0
- package/dist/components/TabContent/TabContent.js +1 -1
- package/dist/components/TabContent/TabContent.test.js +274 -0
- package/dist/components/TabNavigation/TabNavigation.js +21 -21
- package/dist/components/TabNavigation/TabNavigation.test.js +535 -0
- package/dist/components/TabbedContent/TabbedContent.test.js +654 -0
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/UpcomingList/UpcomingList.test.js +471 -0
- package/dist/{index-VjANCDXC.mjs → index-06PEPfBQ.mjs} +1 -1
- package/dist/index-BUN4jQ3m.mjs +3098 -0
- package/dist/index-BVxBrkZB.mjs +3 -0
- package/dist/{index-DC2JJV3a.mjs → index-D3kkcgee.mjs} +1 -1
- package/dist/{index-C-kn9Zhn.mjs → index-DzfYkULW.mjs} +2 -1
- package/dist/magic-string.es-uPKorP4O.mjs +663 -0
- package/dist/matchers-35e4d3bd-BBPNTlen.mjs +2404 -0
- package/dist/react.esm-DLSrfVwM.mjs +23410 -0
- package/dist/test/setupTests.d.ts +1 -0
- package/dist/test/setupTests.js +55 -0
- package/dist/{triangle-PcCcGXjr.mjs → triangle-C4z906Wf.mjs} +1 -1
- package/dist/useScheduleContext-D7FdzNxe.mjs +17 -0
- package/dist/utils/analytics.js +1 -1
- package/dist/utils/getOnNowProgram.js +10 -10
- package/dist/{x-C-QzJ-qD.mjs → x-Ck9Vk5Fo.mjs} +1 -1
- package/package.json +4 -1
- package/dist/ResultsTable.module-1zxhXaem.mjs +0 -14
- package/dist/_commonjsHelpers-C6fGbg64.mjs +0 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { g as t, v as e, a as s, e as o } from "../react.esm-DLSrfVwM.mjs";
|
|
2
|
+
import { t as n, a as r, b as i, c as l, d as c, f as v, g as d, h as m, i as p, j as H, k as f, l as B, m as u, n as b, o as E, p as h, q as y, r as g, s as A, u as D, v as C, w as M, x as P, y as L, z as O, A as T, B as V, C as j, D as k, E as w, F as x, G as I, H as S } from "../matchers-35e4d3bd-BBPNTlen.mjs";
|
|
3
|
+
const _ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4
|
+
__proto__: null,
|
|
5
|
+
toAppearAfter: n,
|
|
6
|
+
toAppearBefore: r,
|
|
7
|
+
toBeChecked: i,
|
|
8
|
+
toBeDisabled: l,
|
|
9
|
+
toBeEmpty: c,
|
|
10
|
+
toBeEmptyDOMElement: v,
|
|
11
|
+
toBeEnabled: d,
|
|
12
|
+
toBeInTheDOM: m,
|
|
13
|
+
toBeInTheDocument: p,
|
|
14
|
+
toBeInvalid: H,
|
|
15
|
+
toBePartiallyChecked: f,
|
|
16
|
+
toBePartiallyPressed: B,
|
|
17
|
+
toBePressed: u,
|
|
18
|
+
toBeRequired: b,
|
|
19
|
+
toBeValid: E,
|
|
20
|
+
toBeVisible: h,
|
|
21
|
+
toContainElement: y,
|
|
22
|
+
toContainHTML: g,
|
|
23
|
+
toHaveAccessibleDescription: A,
|
|
24
|
+
toHaveAccessibleErrorMessage: D,
|
|
25
|
+
toHaveAccessibleName: C,
|
|
26
|
+
toHaveAttribute: M,
|
|
27
|
+
toHaveClass: P,
|
|
28
|
+
toHaveDescription: L,
|
|
29
|
+
toHaveDisplayValue: O,
|
|
30
|
+
toHaveErrorMessage: T,
|
|
31
|
+
toHaveFocus: V,
|
|
32
|
+
toHaveFormValues: j,
|
|
33
|
+
toHaveRole: k,
|
|
34
|
+
toHaveSelection: w,
|
|
35
|
+
toHaveStyle: x,
|
|
36
|
+
toHaveTextContent: I,
|
|
37
|
+
toHaveValue: S
|
|
38
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
39
|
+
t.extend(_);
|
|
40
|
+
Object.defineProperty(window, "matchMedia", {
|
|
41
|
+
writable: !0,
|
|
42
|
+
value: e.fn().mockImplementation((a) => ({
|
|
43
|
+
matches: !1,
|
|
44
|
+
media: a,
|
|
45
|
+
onchange: null,
|
|
46
|
+
addListener: e.fn(),
|
|
47
|
+
removeListener: e.fn(),
|
|
48
|
+
addEventListener: e.fn(),
|
|
49
|
+
removeEventListener: e.fn(),
|
|
50
|
+
dispatchEvent: e.fn()
|
|
51
|
+
}))
|
|
52
|
+
});
|
|
53
|
+
s(() => {
|
|
54
|
+
o();
|
|
55
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useContext as o } from "react";
|
|
2
|
+
import { ScheduleContext as r } from "./components/ScheduleLayout/ScheduleContext.js";
|
|
3
|
+
function t() {
|
|
4
|
+
const e = o(r);
|
|
5
|
+
if (e === void 0)
|
|
6
|
+
throw new Error("useScheduleContext must be used within a ScheduleProvider");
|
|
7
|
+
return e;
|
|
8
|
+
}
|
|
9
|
+
const c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
10
|
+
__proto__: null,
|
|
11
|
+
default: t,
|
|
12
|
+
useScheduleContext: t
|
|
13
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
14
|
+
export {
|
|
15
|
+
c as S,
|
|
16
|
+
t as u
|
|
17
|
+
};
|
package/dist/utils/analytics.js
CHANGED
|
@@ -60,14 +60,14 @@ const L = /* @__PURE__ */ new Date(`${D()}T00:00:00`), U = (a) => {
|
|
|
60
60
|
const _ = await ee({ scheduleEndpoint: n, network: l }), s = /* @__PURE__ */ new Date(), f = _.results.filter((r) => r.program_class !== null);
|
|
61
61
|
let e = await f.find((r) => G(`${r.start_date_parse}T${d(r.start_time)}`, r.element_length));
|
|
62
62
|
if (e || (e = f.find((r) => {
|
|
63
|
-
const
|
|
64
|
-
return (/* @__PURE__ */ new Date(`${r.start_date_parse}T${d(r.start_time)}:00-0${
|
|
63
|
+
const g = X("America/New_York", /* @__PURE__ */ new Date(`${r.start_date_parse}T${d(r.start_time)}`)) / 36e5;
|
|
64
|
+
return (/* @__PURE__ */ new Date(`${r.start_date_parse}T${d(r.start_time)}:00-0${g * -1}:00`)).valueOf() > s.valueOf();
|
|
65
65
|
}), c = "upcoming"), e === void 0) {
|
|
66
66
|
console.error("No program found for today");
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
69
|
if (e.program_class === "Episode") {
|
|
70
|
-
const r = J(e.series_prefix),
|
|
70
|
+
const r = J(e.series_prefix), g = i ? Q(e) : null, Z = i ? W(e) : null;
|
|
71
71
|
let t = await V({ seriesPrefix: r, getResource: m });
|
|
72
72
|
return t === void 0 && (t = await V({ seriesPrefix: r, getResource: m, resourceName: "onnowinactive" })), t === void 0 && console.warn(`No series data found for seriesPrefix: ${r}`), {
|
|
73
73
|
program: {
|
|
@@ -83,21 +83,21 @@ const L = /* @__PURE__ */ new Date(`${D()}T00:00:00`), U = (a) => {
|
|
|
83
83
|
aspect_ratio: t ? ((b = (N = t.logoImage) == null ? void 0 : N.image) == null ? void 0 : b.width) / ((O = (S = t.logoImage) == null ? void 0 : S.image) == null ? void 0 : O.height) : 1
|
|
84
84
|
},
|
|
85
85
|
image: {
|
|
86
|
-
url: ((P = e.content) == null ? void 0 : P.image) === "" ? o == null ? void 0 : o.url
|
|
86
|
+
url: ((P = e.content) == null ? void 0 : P.image) === "" || !((T = e.content) != null && T.image) ? (o == null ? void 0 : o.url) ?? "" : e.content.image,
|
|
87
87
|
sizes: t ? (I = (k = (E = (x = t == null ? void 0 : t.items) == null ? void 0 : x[0]) == null ? void 0 : E.nowPlayingImage) == null ? void 0 : k.image) == null ? void 0 : I.sizes : void 0
|
|
88
88
|
},
|
|
89
|
-
primary_color: ((M = (C = (z = t == null ? void 0 : t.colors) == null ? void 0 : z.entries) == null ? void 0 : C.find((
|
|
90
|
-
secondary_color: ((R = (F = (A = t == null ? void 0 : t.colors) == null ? void 0 : A.entries) == null ? void 0 : F.find((
|
|
89
|
+
primary_color: ((M = (C = (z = t == null ? void 0 : t.colors) == null ? void 0 : z.entries) == null ? void 0 : C.find((u) => u.key === "primaryColor")) == null ? void 0 : M.value) ?? "var(--theme-color-400)",
|
|
90
|
+
secondary_color: ((R = (F = (A = t == null ? void 0 : t.colors) == null ? void 0 : A.entries) == null ? void 0 : F.find((u) => u.key === "secondaryColor")) == null ? void 0 : R.value) ?? "var(--theme-color-400)",
|
|
91
91
|
slug: (t == null ? void 0 : t.slug) ?? void 0,
|
|
92
92
|
name: (t == null ? void 0 : t.title) ?? U(e.program)
|
|
93
93
|
},
|
|
94
|
-
season:
|
|
94
|
+
season: g,
|
|
95
95
|
number: Z,
|
|
96
96
|
name: e.title_name
|
|
97
97
|
},
|
|
98
98
|
airdate: `${e.start_date} ${d(e.start_time)}`,
|
|
99
99
|
id: e.id,
|
|
100
|
-
slug: (j = e.content) == null ? void 0 : j.slug,
|
|
100
|
+
slug: ((j = e.content) == null ? void 0 : j.slug) ?? "",
|
|
101
101
|
start_date_parse: e.start_date_parse,
|
|
102
102
|
start_time: e.start_time,
|
|
103
103
|
title_code: e.title_code,
|
|
@@ -118,7 +118,7 @@ const L = /* @__PURE__ */ new Date(`${D()}T00:00:00`), U = (a) => {
|
|
|
118
118
|
title: e.title_name,
|
|
119
119
|
series: {
|
|
120
120
|
image: {
|
|
121
|
-
url: ((q = e.content) == null ? void 0 : q.image) === "" ? o == null ? void 0 : o.url
|
|
121
|
+
url: ((q = e.content) == null ? void 0 : q.image) === "" || !((Y = e.content) != null && Y.image) ? (o == null ? void 0 : o.url) ?? "" : e.content.image,
|
|
122
122
|
sizes: void 0
|
|
123
123
|
},
|
|
124
124
|
slug: void 0,
|
|
@@ -138,7 +138,7 @@ const L = /* @__PURE__ */ new Date(`${D()}T00:00:00`), U = (a) => {
|
|
|
138
138
|
number: null
|
|
139
139
|
},
|
|
140
140
|
id: e.id,
|
|
141
|
-
slug: (H = e.content) == null ? void 0 : H.slug,
|
|
141
|
+
slug: ((H = e.content) == null ? void 0 : H.slug) ?? "",
|
|
142
142
|
start_date_parse: e.start_date_parse,
|
|
143
143
|
start_time: e.start_time,
|
|
144
144
|
title_code: e.title_code,
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.1.
|
|
2
|
+
"version": "1.1.10",
|
|
3
3
|
"name": "@scrippsproduct/networks-ui-library",
|
|
4
4
|
"description": "React Component Library for use in Scripps Networks external applications",
|
|
5
5
|
"author": {
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
"@storybook/addon-docs": "^9.1.17",
|
|
55
55
|
"@storybook/addon-links": "^9.1.17",
|
|
56
56
|
"@storybook/react-vite": "^9.1.17",
|
|
57
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
58
|
+
"@testing-library/react": "^16.3.1",
|
|
59
|
+
"@testing-library/user-event": "^14.6.1",
|
|
57
60
|
"@types/glob": "^8.1.0",
|
|
58
61
|
"@types/react": "^18.3.3",
|
|
59
62
|
"@types/react-dom": "^18.3.0",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import './assets/ResultsTable.css';const _ = {
|
|
2
|
-
"results-table": "_results-table_1lqhp_1",
|
|
3
|
-
"results-table__row": "_results-table__row_1lqhp_4",
|
|
4
|
-
"results-table__item": "_results-table__item_1lqhp_9",
|
|
5
|
-
"results-table__header": "_results-table__header_1lqhp_9",
|
|
6
|
-
"results-table__mobile-label": "_results-table__mobile-label_1lqhp_24",
|
|
7
|
-
"results-table__no-results": "_results-table__no-results_1lqhp_34",
|
|
8
|
-
"results-table--compact": "_results-table--compact_1lqhp_40",
|
|
9
|
-
"results-table__header-row": "_results-table__header-row_1lqhp_50",
|
|
10
|
-
"fade-in__wrapper": "_fade-in__wrapper_1lqhp_113"
|
|
11
|
-
};
|
|
12
|
-
export {
|
|
13
|
-
_ as s
|
|
14
|
-
};
|