@scrippsproduct/networks-ui-library 1.1.9 → 1.1.10-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/{Form.module-Cd8qH2rj.mjs → Form.module-CarfWK5T.mjs} +1 -1
  2. package/dist/ResultsTable.module-wcNUQEKe.mjs +14 -0
  3. package/dist/_commonjsHelpers-DaMA6jEr.mjs +8 -0
  4. package/dist/assets/ResultsTable.css +1 -1
  5. package/dist/{chevron-left-DRvpaLmK.mjs → chevron-left-D0UjbrKw.mjs} +1 -1
  6. package/dist/{chevron-right-C8yCnmfx.mjs → chevron-right-0ZF3LruR.mjs} +1 -1
  7. package/dist/components/ActionButton/ActionButton.test.js +209 -0
  8. package/dist/components/AdBlock/AdBlock.test.js +286 -0
  9. package/dist/components/AdjustableTwoColumnGrid/AdjustableTwoColumnGrid.test.js +295 -0
  10. package/dist/components/AirDateFormatter/AirDateFormatter.test.js +192 -0
  11. package/dist/components/AnchorTag/AnchorTag.test.js +463 -0
  12. package/dist/components/BCVideoPlayer/BCVideoPlayer.test.js +295 -0
  13. package/dist/components/BasicGridModule/BasicGridModule.js +41 -37
  14. package/dist/components/BasicGridModule/BasicGridModule.test.js +227 -0
  15. package/dist/components/Button/Button.test.js +434 -0
  16. package/dist/components/Carousel/Carousel.js +2 -2
  17. package/dist/components/Carousel/Carousel.test.js +705 -0
  18. package/dist/components/CarouselSlide/CarouselSlide.test.js +378 -0
  19. package/dist/components/CarouselSlide/slide-layouts/TwoColumn/TwoColumnSlide.js +1 -1
  20. package/dist/components/CastInfoLayout/CastInfoLayout.test.js +294 -0
  21. package/dist/components/ChannelSearch/ChannelSearch.test.js +565 -0
  22. package/dist/components/ChoicesItem/ChoicesItem.test.js +428 -0
  23. package/dist/components/Concat/Concat.js +1 -1
  24. package/dist/components/Concat/Concat.test.js +115 -0
  25. package/dist/components/CtaBlock/CtaBlock.js +1 -1
  26. package/dist/components/CtaBlock/CtaBlock.test.js +226 -0
  27. package/dist/components/CustomDataList/CustomDataList.js +4 -4
  28. package/dist/components/CustomSelect/CustomSelect.js +86 -86
  29. package/dist/components/CustomSelect/CustomSelect.test.js +313 -0
  30. package/dist/components/DateNavigation/DateNavigation.js +10 -10
  31. package/dist/components/DateNavigation/DateNavigation.test.js +370 -0
  32. package/dist/components/DatePicker/DatePicker.js +1 -1
  33. package/dist/components/DeviceAndPlatformLists/DeviceAndPlatformLists.test.js +288 -0
  34. package/dist/components/DrawerNavigation/DrawerNavigation.test.js +316 -0
  35. package/dist/components/EqualSizeFlexRow/EqualSizeFlexRow.test.js +337 -0
  36. package/dist/components/EqualSizeGrid/EqualSizeGrid.test.js +358 -0
  37. package/dist/components/ErrorHandler/ErrorHandler.js +2 -2
  38. package/dist/components/ErrorHandler/ErrorHandler.test.js +158 -0
  39. package/dist/components/FeaturedList/FeaturedList.test.js +353 -0
  40. package/dist/components/Figure/Figure.js +1 -1
  41. package/dist/components/Figure/Figure.test.js +198 -0
  42. package/dist/components/FindUs/FindUs.test.js +499 -0
  43. package/dist/components/FooterNavigation/FooterNavigation.test.js +310 -0
  44. package/dist/components/GenericList/GenericList.js +1 -1
  45. package/dist/components/GenericList/GenericList.test.js +288 -0
  46. package/dist/components/GetAirdateWrapper/GetAirdateWrapper.test.js +689 -0
  47. package/dist/components/GradientButton/GradientButton.d.ts +1 -1
  48. package/dist/components/GradientButton/GradientButton.js +33 -31
  49. package/dist/components/GradientButton/GradientButton.test.js +457 -0
  50. package/dist/components/GridList/GridList.test.js +371 -0
  51. package/dist/components/ImageCard/ImageCard.test.js +668 -0
  52. package/dist/components/ImageCard/ImageCardCore.js +28 -28
  53. package/dist/components/ImageCard/ImageCardCore.test.js +577 -0
  54. package/dist/components/ImageReplacementAnchor/ImageReplacementAnchor.test.js +379 -0
  55. package/dist/components/InfoPanel/InfoPanel.js +1 -1
  56. package/dist/components/InlineNavigation/InlineNavigation.test.js +149 -0
  57. package/dist/components/Input/Input.js +1 -1
  58. package/dist/components/Input/Input.test.js +263 -0
  59. package/dist/components/InstructionsList/InstructionsList.js +11 -11
  60. package/dist/components/InstructionsList/InstructionsList.test.js +181 -0
  61. package/dist/components/LogoListItem/LogoListItem.test.js +303 -0
  62. package/dist/components/LogoNavigation/LogoNavigation.test.js +352 -0
  63. package/dist/components/ModalContainer/ModalContainer.js +2 -2
  64. package/dist/components/NavList/NavList.test.js +332 -0
  65. package/dist/components/Overlay/Overlay.js +24 -23
  66. package/dist/components/Overlay/Overlay.test.js +198 -0
  67. package/dist/components/PageHero/PageHero.test.js +241 -0
  68. package/dist/components/PageHero/page-hero-layouts/IONShow/IONShowHero.js +1 -1
  69. package/dist/components/ProgramAirdate/ProgramAirdate.js +1 -1
  70. package/dist/components/ProgramAirdate/ProgramAirdate.test.js +414 -0
  71. package/dist/components/PromotionBlock/PromotionBlock.test.js +208 -0
  72. package/dist/components/PromotionsRowBlock/PromotionsRowBlock.test.js +221 -0
  73. package/dist/components/PromotionsRowModule/PromotionsRowModule.test.js +349 -0
  74. package/dist/components/RescanInstructions/RescanInstructions.test.js +218 -0
  75. package/dist/components/ResponsiveImage/ResponsiveImage.test.js +264 -0
  76. package/dist/components/ResultsTable/ResultsTable.js +9 -2
  77. package/dist/components/ResultsTable/ResultsTable.test.js +402 -0
  78. package/dist/components/ResultsTableBody/ResultsTableBody.js +1 -1
  79. package/dist/components/ResultsTableBody/ResultsTableBody.test.js +445 -0
  80. package/dist/components/ResultsTableHeader/ResultsTableHeader.js +37 -15
  81. package/dist/components/ResultsTableHeader/ResultsTableHeader.test.js +275 -0
  82. package/dist/components/ScheduleLayout/ScheduleContext.js +654 -626
  83. package/dist/components/ScheduleLayout/ScheduleLayout.js +1 -1
  84. package/dist/components/ScheduleLayout/useScheduleContext.js +5 -10
  85. package/dist/components/ScheduleList/ScheduleList.js +1 -1
  86. package/dist/components/SectionedContent/SectionedContent.js +1 -1
  87. package/dist/components/SectionedContent/SectionedContent.test.js +341 -0
  88. package/dist/components/Select/Select.js +24 -24
  89. package/dist/components/Select/Select.test.js +367 -0
  90. package/dist/components/ShowAboutContent/ShowAboutContent.js +1 -1
  91. package/dist/components/ShowAboutContent/ShowAboutContent.test.js +535 -0
  92. package/dist/components/ShowAboutLayout/ShowAboutLayout.test.js +570 -0
  93. package/dist/components/SocialLinks/SocialLinks.js +1 -1
  94. package/dist/components/StringList/StringList.js +1 -1
  95. package/dist/components/StringList/StringList.test.js +311 -0
  96. package/dist/components/TabContent/TabContent.js +1 -1
  97. package/dist/components/TabContent/TabContent.test.js +274 -0
  98. package/dist/components/TabNavigation/TabNavigation.js +21 -21
  99. package/dist/components/TabNavigation/TabNavigation.test.js +535 -0
  100. package/dist/components/TabbedContent/TabbedContent.test.js +654 -0
  101. package/dist/components/TextArea/TextArea.js +1 -1
  102. package/dist/components/UpcomingList/UpcomingList.test.js +471 -0
  103. package/dist/{index-VjANCDXC.mjs → index-06PEPfBQ.mjs} +1 -1
  104. package/dist/index-BUN4jQ3m.mjs +3098 -0
  105. package/dist/index-BVxBrkZB.mjs +3 -0
  106. package/dist/{index-DC2JJV3a.mjs → index-D3kkcgee.mjs} +1 -1
  107. package/dist/{index-C-kn9Zhn.mjs → index-DzfYkULW.mjs} +2 -1
  108. package/dist/magic-string.es-uPKorP4O.mjs +663 -0
  109. package/dist/matchers-35e4d3bd-BBPNTlen.mjs +2404 -0
  110. package/dist/react.esm-DLSrfVwM.mjs +23410 -0
  111. package/dist/test/setupTests.d.ts +1 -0
  112. package/dist/test/setupTests.js +55 -0
  113. package/dist/{triangle-PcCcGXjr.mjs → triangle-C4z906Wf.mjs} +1 -1
  114. package/dist/useScheduleContext-D7FdzNxe.mjs +17 -0
  115. package/dist/utils/analytics.js +1 -1
  116. package/dist/utils/getOnNowProgram.js +10 -10
  117. package/dist/{x-C-QzJ-qD.mjs → x-Ck9Vk5Fo.mjs} +1 -1
  118. package/package.json +4 -1
  119. package/dist/ResultsTable.module-1zxhXaem.mjs +0 -14
  120. 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
+ });
@@ -1,5 +1,5 @@
1
1
  import s, { forwardRef as c } from "react";
2
- import { P as a } from "./index-DC2JJV3a.mjs";
2
+ import { P as a } from "./index-D3kkcgee.mjs";
3
3
  function l() {
4
4
  return l = Object.assign || function(r) {
5
5
  for (var o = 1; o < arguments.length; o++) {
@@ -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
+ };
@@ -1,4 +1,4 @@
1
- import { g as $ } from "../_commonjsHelpers-C6fGbg64.mjs";
1
+ import { g as $ } from "../_commonjsHelpers-DaMA6jEr.mjs";
2
2
  var E = {}, q = {}, T = {}, Q;
3
3
  function ee() {
4
4
  return Q || (Q = 1, (function(g) {
@@ -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 u = 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${u * -1}:00`)).valueOf() > s.valueOf();
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), u = i ? Q(e) : null, Z = i ? W(e) : null;
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 : (T = e.content) == null ? void 0 : T.image,
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((g) => g.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((g) => g.key === "secondaryColor")) == null ? void 0 : R.value) ?? "var(--theme-color-400)",
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: u,
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 : (Y = e.content) == null ? void 0 : Y.image,
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,
@@ -1,5 +1,5 @@
1
1
  import l, { forwardRef as c } from "react";
2
- import { P as a } from "./index-DC2JJV3a.mjs";
2
+ import { P as a } from "./index-D3kkcgee.mjs";
3
3
  function f() {
4
4
  return f = Object.assign || function(e) {
5
5
  for (var o = 1; o < arguments.length; o++) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.9",
2
+ "version": "1.1.10-alpha.0",
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
- };
@@ -1,6 +0,0 @@
1
- function e(t) {
2
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
3
- }
4
- export {
5
- e as g
6
- };