@scrippsproduct/networks-ui-library 1.1.0-alpha.4 → 1.1.0-alpha.6

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.
@@ -1,6 +1,6 @@
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";
1
+ import { jsx as a, jsxs as y } from "react/jsx-runtime";
2
+ import { useReducer as R, useState as A, useRef as w, useCallback as L, useEffect as v } from "react";
3
+ import { classes as T, getMinutesFromStr as u } from "../../utils/helpers.js";
4
4
  import { useScheduleContext as b } from "../ScheduleLayout/useScheduleContext.js";
5
5
  import { Loading as x } from "../Loading/Loading.js";
6
6
  import { SportsItem as D } from "./schedule-list-items/SportsItem.js";
@@ -22,7 +22,7 @@ import '../../assets/ScheduleList.css';const f = {
22
22
  "image-card__content": "_image-card__content_wmqq1_122"
23
23
  };
24
24
  function S(r) {
25
- return typeof r == "object" && !Array.isArray(r) && "queryStatus" in r && r.queryStatus === "no-results";
25
+ return typeof r == "object" && !Array.isArray(r) && (r == null ? void 0 : r.queryStatus) && r.queryStatus === "no-results";
26
26
  }
27
27
  function C(r, p) {
28
28
  switch (p.type) {
@@ -38,8 +38,8 @@ function C(r, p) {
38
38
  return r;
39
39
  }
40
40
  }
41
- const v = (r) => {
42
- var p, t, s, n, e, o, y, g, _, l, i;
41
+ const E = (r) => {
42
+ var p, t, s, n, e, o, d, g, _, l, i;
43
43
  return (p = r.video) != null && p.brightcove_id ? {
44
44
  label: "Watch Preview",
45
45
  type: "play-video",
@@ -73,7 +73,7 @@ const v = (r) => {
73
73
  //'inline',
74
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) ? {
75
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",
76
- type: (y = r == null ? void 0 : r.content) != null && y.external_link ? "external-link" : "internal-link",
76
+ type: (d = r == null ? void 0 : r.content) != null && d.external_link ? "external-link" : "internal-link",
77
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}`,
78
78
  position: "inline"
79
79
  } : {
@@ -87,21 +87,21 @@ function H({
87
87
  handleClicks: r = () => !0,
88
88
  fetchError: p = !1
89
89
  }) {
90
- const { schedule: t, isLoading: s } = b(), [n, e] = u(C, "idle"), [o, y] = R(t), g = w(null), _ = w(null), l = A(() => {
90
+ const { schedule: t, isLoading: s } = b(), [n, e] = R(C, "idle"), [o, d] = A(t), g = w(null), _ = w(null), l = L(() => {
91
91
  _.current && (clearTimeout(_.current), _.current = null), n === "exiting" ? e({ type: "EXIT_COMPLETE" }) : n === "entering" && e({ type: "ENTER_COMPLETE" });
92
92
  }, [n]);
93
- return c(() => {
93
+ return v(() => {
94
94
  const i = g.current;
95
95
  if (i)
96
96
  return i.addEventListener("animationend", l), () => {
97
97
  i.removeEventListener("animationend", l);
98
98
  };
99
- }, [l]), c(() => {
99
+ }, [l]), v(() => {
100
100
  s && n === "idle" && e({ type: "START_EXIT" });
101
- }, [s, n]), c(() => {
101
+ }, [s, n]), v(() => {
102
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(() => () => {
103
+ !s && n === "loading" && i && (d(t), e({ type: "SCHEDULE_LOADED" }));
104
+ }, [s, n, t]), v(() => () => {
105
105
  _.current && clearTimeout(_.current);
106
106
  }, []), n === "loading" ? /* @__PURE__ */ a(
107
107
  "div",
@@ -114,14 +114,14 @@ function H({
114
114
  },
115
115
  children: /* @__PURE__ */ a(x, {})
116
116
  }
117
- ) : p ? /* @__PURE__ */ d("div", { className: "schedule-list__no-schedule", children: [
117
+ ) : p ? /* @__PURE__ */ y("div", { className: "schedule-list__no-schedule", children: [
118
118
  /* @__PURE__ */ a("h2", { children: "There was an error loading the schedule for this day." }),
119
- /* @__PURE__ */ d("p", { children: [
119
+ /* @__PURE__ */ y("p", { children: [
120
120
  "Please try again later. If this problem persists report it at ",
121
121
  /* @__PURE__ */ a("a", { href: "https://support.iontelevision.com/support/home", children: "our support page" }),
122
122
  "."
123
123
  ] })
124
- ] }) : S(o) ? /* @__PURE__ */ d(
124
+ ] }) : S(o) ? /* @__PURE__ */ y(
125
125
  "div",
126
126
  {
127
127
  className: T([
@@ -132,14 +132,14 @@ function H({
132
132
  style: { animationDelay: "500ms" },
133
133
  children: [
134
134
  /* @__PURE__ */ a("h2", { children: "There are no shows scheduled for this day." }),
135
- /* @__PURE__ */ d("p", { children: [
135
+ /* @__PURE__ */ y("p", { children: [
136
136
  "Please try again later. If this problem persists report it at ",
137
137
  /* @__PURE__ */ a("a", { href: "https://support.iontelevision.com/support/home", children: "our support page" }),
138
138
  "."
139
139
  ] })
140
140
  ]
141
141
  }
142
- ) : Array.isArray(o) && o.length === 0 ? /* @__PURE__ */ d(
142
+ ) : Array.isArray(o) && o.length === 0 ? /* @__PURE__ */ y(
143
143
  "div",
144
144
  {
145
145
  className: T([
@@ -159,34 +159,34 @@ function H({
159
159
  "data-state": n,
160
160
  ref: g,
161
161
  children: Array.isArray(o) && o.map((i) => {
162
- const q = L(i.element_length), E = v(i).type === "" ? [q, i.rating] : [q, i.rating, " "];
162
+ const c = u(i.element_length), q = E(i).type === "" ? [c, i.rating] : [c, i.rating, " "];
163
163
  return i.program_class === "Episode" ? /* @__PURE__ */ a(
164
164
  M,
165
165
  {
166
- determineCTA: v,
166
+ determineCTA: E,
167
167
  handleClicks: r,
168
168
  scheduleItem: i,
169
- strListArr: E,
169
+ strListArr: q,
170
170
  styles: f
171
171
  },
172
172
  `schedule-list-${i.id}`
173
173
  ) : i.program_class === "Film" || i.program_class === "Movie" || i.program_class === "Special" ? /* @__PURE__ */ a(
174
174
  k,
175
175
  {
176
- determineCTA: v,
176
+ determineCTA: E,
177
177
  handleClicks: r,
178
178
  scheduleItem: i,
179
- strListArr: E,
179
+ strListArr: q,
180
180
  styles: f
181
181
  },
182
182
  `schedule-list-${i.id}`
183
183
  ) : i.program_class === "Sports" ? /* @__PURE__ */ a(
184
184
  D,
185
185
  {
186
- determineCTA: v,
186
+ determineCTA: E,
187
187
  handleClicks: r,
188
188
  scheduleItem: i,
189
- strListArr: E,
189
+ strListArr: q,
190
190
  styles: f
191
191
  },
192
192
  `schedule-list-${i.id}`
package/dist/index.d.ts CHANGED
@@ -67,6 +67,7 @@ export { ErrorHandler } from './components/ErrorHandler';
67
67
  export { ImageReplacementAnchor } from './components/ImageReplacementAnchor';
68
68
  export { GetAirdateWrapper } from './components/GetAirdateWrapper';
69
69
  export { Loading } from './components/Loading';
70
+ export { LoadingV2 } from './components/LoadingV2';
70
71
  export { ResponsiveImage } from './components/ResponsiveImage';
71
72
  export { StringList } from './components/StringList';
72
73
  export { GeneralErrorBoundary } from './error-boundries/GeneralErrorBoundry';
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { PromotionsRowBlock as n } from "./components/PromotionsRowBlock/Promoti
6
6
  import { SocialShareBlock as s } from "./components/SocialShareBlock/SocialShareBlock.js";
7
7
  import { ActionButton as u } from "./components/ActionButton/ActionButton.js";
8
8
  import { Button as g } from "./components/Button/Button.js";
9
- import { GradientButton as L } from "./components/GradientButton/GradientButton.js";
9
+ import { GradientButton as C } from "./components/GradientButton/GradientButton.js";
10
10
  import { Carousel as B } from "./components/Carousel/Carousel.js";
11
11
  import { CarouselSlide as A } from "./components/CarouselSlide/CarouselSlide.js";
12
12
  import { Empty as T } from "./components/CarouselSlide/slide-layouts/Empty/Empty.js";
@@ -17,8 +17,8 @@ import { TextSlide as G } from "./components/CarouselSlide/slide-layouts/Text/Te
17
17
  import { VideoSlide as N } from "./components/CarouselSlide/slide-layouts/Video/VideoSlide.js";
18
18
  import { C as E } from "./ChoicesItem-CT9fXB0I.mjs";
19
19
  import { ChoicesList as H } from "./components/ChoicesList/ChoicesList.js";
20
- import { CreateChoiceList as z } from "./components/CreateChoiceList/CreateChoiceList.js";
21
- import { CustomDataList as V } from "./components/CustomDataList/CustomDataList.js";
20
+ import { CreateChoiceList as q } from "./components/CreateChoiceList/CreateChoiceList.js";
21
+ import { CustomDataList as U } from "./components/CustomDataList/CustomDataList.js";
22
22
  import { CustomSelect as W } from "./components/CustomSelect/CustomSelect.js";
23
23
  import { Input as K } from "./components/Input/Input.js";
24
24
  import { Select as Q } from "./components/Select/Select.js";
@@ -32,7 +32,7 @@ import { ProgramAirdate as ao } from "./components/ProgramAirdate/ProgramAirdate
32
32
  import { PromotionsRowModule as no } from "./components/PromotionsRowModule/PromotionsRowModule.js";
33
33
  import { RescanInstructions as so } from "./components/RescanInstructions/RescanInstructions.js";
34
34
  import { ScheduleLayout as co } from "./components/ScheduleLayout/ScheduleLayout.js";
35
- import { SectionedContent as Co } from "./components/SectionedContent/SectionedContent.js";
35
+ import { SectionedContent as Lo } from "./components/SectionedContent/SectionedContent.js";
36
36
  import { ShowAboutLayout as So } from "./components/ShowAboutLayout/ShowAboutLayout.js";
37
37
  import { TabbedContent as ho } from "./components/TabbedContent/TabbedContent.js";
38
38
  import { AdjustableTwoColumnGrid as Io } from "./components/AdjustableTwoColumnGrid/AdjustableTwoColumnGrid.js";
@@ -43,8 +43,8 @@ import { ModalContainer as Fo } from "./components/ModalContainer/ModalContainer
43
43
  import { PageHero as wo } from "./components/PageHero/PageHero.js";
44
44
  import { TabContent as Do } from "./components/TabContent/TabContent.js";
45
45
  import { FeaturedList as Mo } from "./components/FeaturedList/FeaturedList.js";
46
- import { GenericList as qo } from "./components/GenericList/GenericList.js";
47
- import { GridList as Uo } from "./components/GridList/GridList.js";
46
+ import { GenericList as Vo } from "./components/GenericList/GenericList.js";
47
+ import { GridList as zo } from "./components/GridList/GridList.js";
48
48
  import { LogoListItem as jo } from "./components/LogoListItem/LogoListItem.js";
49
49
  import { NavList as Jo } from "./components/NavList/NavList.js";
50
50
  import { ScheduleList as Oo } from "./components/ScheduleList/ScheduleList.js";
@@ -59,7 +59,7 @@ import { TabNavigation as ir } from "./components/TabNavigation/TabNavigation.js
59
59
  import { ResultsTable as lr } from "./components/ResultsTable/ResultsTable.js";
60
60
  import { ResultsTableBody as dr } from "./components/ResultsTableBody/ResultsTableBody.js";
61
61
  import { ResultsTableHeader as cr } from "./components/ResultsTableHeader/ResultsTableHeader.js";
62
- import { AirDateFormatter as Cr } from "./components/AirDateFormatter/AirDateFormatter.js";
62
+ import { AirDateFormatter as Lr } from "./components/AirDateFormatter/AirDateFormatter.js";
63
63
  import { AnchorTag as Sr } from "./components/AnchorTag/AnchorTag.js";
64
64
  import { ButtonAnchor as hr } from "./components/ButtonAnchor/ButtonAnchor.js";
65
65
  import { Concat as Ir } from "./components/Concat/Concat.js";
@@ -67,24 +67,25 @@ import { ErrorHandler as br } from "./components/ErrorHandler/ErrorHandler.js";
67
67
  import { ImageReplacementAnchor as yr } from "./components/ImageReplacementAnchor/ImageReplacementAnchor.js";
68
68
  import { GetAirdateWrapper as Rr } from "./components/GetAirdateWrapper/GetAirdateWrapper.js";
69
69
  import { Loading as Fr } from "./components/Loading/Loading.js";
70
- import { ResponsiveImage as wr } from "./components/ResponsiveImage/ResponsiveImage.js";
71
- import { StringList as Dr } from "./components/StringList/StringList.js";
72
- import { GeneralErrorBoundary as Mr } from "./error-boundries/GeneralErrorBoundry.js";
73
- import { BlankErrorBoundary as qr } from "./error-boundries/BlankErrorBoundry.js";
74
- import { BCVideoPlayer as Ur } from "./components/BCVideoPlayer/BCVideoPlayer.js";
75
- import { PromotionBlock as jr } from "./components/PromotionBlock/PromotionBlock.js";
76
- import { DeviceAndPlatformLists as Jr } from "./components/DeviceAndPlatformLists/DeviceAndPlatformLists.js";
77
- import { InstructionsList as Or } from "./components/InstructionsList/InstructionsList.js";
78
- import { Figure as Xr } from "./components/Figure/Figure.js";
70
+ import { LoadingV2 as wr } from "./components/LoadingV2/LoadingV2.js";
71
+ import { ResponsiveImage as Dr } from "./components/ResponsiveImage/ResponsiveImage.js";
72
+ import { StringList as Mr } from "./components/StringList/StringList.js";
73
+ import { GeneralErrorBoundary as Vr } from "./error-boundries/GeneralErrorBoundry.js";
74
+ import { BlankErrorBoundary as zr } from "./error-boundries/BlankErrorBoundry.js";
75
+ import { BCVideoPlayer as jr } from "./components/BCVideoPlayer/BCVideoPlayer.js";
76
+ import { PromotionBlock as Jr } from "./components/PromotionBlock/PromotionBlock.js";
77
+ import { DeviceAndPlatformLists as Or } from "./components/DeviceAndPlatformLists/DeviceAndPlatformLists.js";
78
+ import { InstructionsList as Xr } from "./components/InstructionsList/InstructionsList.js";
79
+ import { Figure as Zr } from "./components/Figure/Figure.js";
79
80
  export {
80
81
  u as ActionButton,
81
82
  e as AdBlock,
82
83
  Io as AdjustableTwoColumnGrid,
83
- Cr as AirDateFormatter,
84
+ Lr as AirDateFormatter,
84
85
  Sr as AnchorTag,
85
- Ur as BCVideoPlayer,
86
+ jr as BCVideoPlayer,
86
87
  oo as BasicGridModule,
87
- qr as BlankErrorBoundary,
88
+ zr as BlankErrorBoundary,
88
89
  g as Button,
89
90
  hr as ButtonAnchor,
90
91
  B as Carousel,
@@ -94,36 +95,37 @@ export {
94
95
  E as ChoicesItem,
95
96
  H as ChoicesList,
96
97
  Ir as Concat,
97
- z as CreateChoiceList,
98
+ q as CreateChoiceList,
98
99
  m as CtaBlock,
99
- V as CustomDataList,
100
+ U as CustomDataList,
100
101
  W as CustomSelect,
101
102
  Zo as DateNavigation,
102
103
  _ as DatePicker,
103
- Jr as DeviceAndPlatformLists,
104
+ Or as DeviceAndPlatformLists,
104
105
  $o as DrawerNavigation,
105
106
  T as Empty,
106
107
  bo as EqualSizeFlexRow,
107
108
  yo as EqualSizeGrid,
108
109
  br as ErrorHandler,
109
110
  Mo as FeaturedList,
110
- Xr as Figure,
111
+ Zr as Figure,
111
112
  v as FigureSlide,
112
113
  fo as FindUs,
113
114
  rr as FooterNavigation,
114
- Mr as GeneralErrorBoundary,
115
- qo as GenericList,
115
+ Vr as GeneralErrorBoundary,
116
+ Vo as GenericList,
116
117
  Rr as GetAirdateWrapper,
117
- L as GradientButton,
118
- Uo as GridList,
118
+ C as GradientButton,
119
+ zo as GridList,
119
120
  f as ImageCard,
120
121
  P as ImageCardSlide,
121
122
  yr as ImageReplacementAnchor,
122
123
  Ro as InfoPanel,
123
124
  tr as InlineNavigation,
124
125
  K as Input,
125
- Or as InstructionsList,
126
+ Xr as InstructionsList,
126
127
  Fr as Loading,
128
+ wr as LoadingV2,
127
129
  jo as LogoListItem,
128
130
  pr as LogoNavigation,
129
131
  Fo as ModalContainer,
@@ -131,23 +133,23 @@ export {
131
133
  Jo as NavList,
132
134
  wo as PageHero,
133
135
  ao as ProgramAirdate,
134
- jr as PromotionBlock,
136
+ Jr as PromotionBlock,
135
137
  n as PromotionsRowBlock,
136
138
  no as PromotionsRowModule,
137
139
  so as RescanInstructions,
138
- wr as ResponsiveImage,
140
+ Dr as ResponsiveImage,
139
141
  lr as ResultsTable,
140
142
  dr as ResultsTableBody,
141
143
  cr as ResultsTableHeader,
142
144
  co as ScheduleLayout,
143
145
  Oo as ScheduleList,
144
- Co as SectionedContent,
146
+ Lo as SectionedContent,
145
147
  Q as Select,
146
148
  So as ShowAboutLayout,
147
149
  k as ShowSlide,
148
150
  xr as SocialLinks,
149
151
  s as SocialShareBlock,
150
- Dr as StringList,
152
+ Mr as StringList,
151
153
  Do as TabContent,
152
154
  ir as TabNavigation,
153
155
  ho as TabbedContent,
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.0-alpha.4",
2
+ "version": "1.1.0-alpha.6",
3
3
  "name": "@scrippsproduct/networks-ui-library",
4
4
  "description": "React Component Library for use in Scripps Networks external applications",
5
5
  "author": {