@scrippsproduct/networks-ui-library 2.0.4 → 2.0.5
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/Carousel.module-Nwf_zL9b.mjs +14 -0
- package/dist/assets/Carousel.css +1 -1
- package/dist/assets/FindUs.css +1 -1
- package/dist/assets/LogoListItem.css +1 -1
- package/dist/components/AnchorTag/AnchorTag.js +12 -12
- package/dist/components/AnchorTag/AnchorTag.test.js +9 -19
- package/dist/components/BCVideoPlayer/BCVideoPlayer.js +58 -46
- package/dist/components/BCVideoPlayer/BCVideoPlayer.test.js +3 -3
- package/dist/components/Carousel/Carousel.js +37 -36
- package/dist/components/Carousel/Carousel.test.js +71 -68
- package/dist/components/Carousel/CarouselUtils.class.js +104 -97
- package/dist/components/Carousel/navigations/Pagination.js +2 -2
- package/dist/components/Carousel/navigations/Pagination.test.js +23 -23
- package/dist/components/CarouselSlide/CarouselSlide.test.js +58 -57
- package/dist/components/FindUs/FindUs.js +119 -90
- package/dist/components/GridList/GridList.js +6 -6
- package/dist/components/ImageCard/ImageCardCore.js +65 -69
- package/dist/components/ImageCard/ImageCardCore.test.js +2 -2
- package/dist/components/LogoListItem/LogoListItem.js +13 -13
- package/dist/components/PromotionsRowModule/PromotionsRowModule.js +42 -38
- package/dist/components/PromotionsRowModule/PromotionsRowModule.test.js +163 -149
- package/dist/hooks/useSourcepointPrivacyTrigger.js +4 -4
- package/dist/src/components/Carousel/CarouselUtils.class.d.ts +8 -3
- package/dist/src/components/Carousel/navigations/Pagination.d.ts +1 -1
- package/dist/src/components/PromotionsRowModule/PromotionsRowModule.d.ts +2 -1
- package/dist/src/hooks/useSourcepointPrivacyTrigger.d.ts +13 -2
- package/package.json +3 -2
- package/dist/Carousel.module-BsPaZX5L.mjs +0 -14
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { v as y, d, b as p, i as r, r as a,
|
|
2
|
+
import { v as y, d, b as p, i as r, r as a, w as u, g as i, s as c } from "../../react.esm-S2Q_NbYC.mjs";
|
|
3
3
|
import "../../index-BZQHStQa.mjs";
|
|
4
4
|
import { CarouselSlide as n } from "./CarouselSlide.js";
|
|
5
5
|
y.mock("@scrippsproduct/console-logger", () => ({
|
|
@@ -36,51 +36,52 @@ d("CarouselSlide", () => {
|
|
|
36
36
|
}), d("Basic Rendering", () => {
|
|
37
37
|
r("should render slide with basic props", async () => {
|
|
38
38
|
const { container: t } = a(
|
|
39
|
-
/* @__PURE__ */ l(n, {
|
|
40
|
-
)
|
|
41
|
-
|
|
39
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: s })
|
|
40
|
+
);
|
|
41
|
+
await u(() => {
|
|
42
|
+
const e = t.querySelector("li");
|
|
42
43
|
i(e).toBeInTheDocument();
|
|
43
44
|
});
|
|
44
45
|
}), r("should render with correct aria-label", () => {
|
|
45
46
|
const { container: t } = a(
|
|
46
|
-
/* @__PURE__ */ l(n, {
|
|
47
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: s })
|
|
47
48
|
), e = t.querySelector("li");
|
|
48
49
|
i(e).toHaveAttribute("aria-label", "1 of 3");
|
|
49
50
|
}), r("should render with aria-roledescription", () => {
|
|
50
51
|
const { container: t } = a(
|
|
51
|
-
/* @__PURE__ */ l(n, {
|
|
52
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: s })
|
|
52
53
|
), e = t.querySelector("li");
|
|
53
54
|
i(e).toHaveAttribute("aria-roledescription", "carousel-item");
|
|
54
55
|
}), r("should render with data-index attribute", () => {
|
|
55
56
|
const { container: t } = a(
|
|
56
|
-
/* @__PURE__ */ l(n, {
|
|
57
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 2, slide: s })
|
|
57
58
|
), e = t.querySelector("li");
|
|
58
59
|
i(e).toHaveAttribute("data-index", "2");
|
|
59
60
|
}), r("should render with correct index for different positions", () => {
|
|
60
61
|
const { container: t } = a(
|
|
61
|
-
/* @__PURE__ */ l(n, {
|
|
62
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 5, slide: s })
|
|
62
63
|
), e = t.querySelector("li");
|
|
63
64
|
i(e).toHaveAttribute("data-index", "5");
|
|
64
65
|
});
|
|
65
66
|
}), d("Inert Attribute", () => {
|
|
66
67
|
r("should not have inert attribute when slide is current", () => {
|
|
67
68
|
const { container: t } = a(
|
|
68
|
-
/* @__PURE__ */ l(n, {
|
|
69
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: s })
|
|
69
70
|
), e = t.querySelector("li");
|
|
70
71
|
i(e).not.toHaveAttribute("inert");
|
|
71
72
|
}), r("should have inert attribute when slide is not current", () => {
|
|
72
73
|
const { container: t } = a(
|
|
73
|
-
/* @__PURE__ */ l(n, {
|
|
74
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 1, slide: s })
|
|
74
75
|
), e = t.querySelector("li");
|
|
75
76
|
i(e).toHaveAttribute("inert");
|
|
76
77
|
}), r("should have inert attribute when currentIndex is greater than index", () => {
|
|
77
78
|
const { container: t } = a(
|
|
78
|
-
/* @__PURE__ */ l(n, {
|
|
79
|
+
/* @__PURE__ */ l(n, { currentIndex: 2, index: 0, slide: s })
|
|
79
80
|
), e = t.querySelector("li");
|
|
80
81
|
i(e).toHaveAttribute("inert");
|
|
81
82
|
}), r("should not have inert when indices match at higher values", () => {
|
|
82
83
|
const { container: t } = a(
|
|
83
|
-
/* @__PURE__ */ l(n, {
|
|
84
|
+
/* @__PURE__ */ l(n, { currentIndex: 5, index: 5, slide: s })
|
|
84
85
|
), e = t.querySelector("li");
|
|
85
86
|
i(e).not.toHaveAttribute("inert");
|
|
86
87
|
});
|
|
@@ -90,10 +91,10 @@ d("CarouselSlide", () => {
|
|
|
90
91
|
/* @__PURE__ */ l(
|
|
91
92
|
n,
|
|
92
93
|
{
|
|
93
|
-
|
|
94
|
-
index: 0,
|
|
94
|
+
variableHeight: !0,
|
|
95
95
|
currentIndex: 0,
|
|
96
|
-
|
|
96
|
+
index: 0,
|
|
97
|
+
slide: s
|
|
97
98
|
}
|
|
98
99
|
)
|
|
99
100
|
), e = t.querySelector("li");
|
|
@@ -103,9 +104,9 @@ d("CarouselSlide", () => {
|
|
|
103
104
|
/* @__PURE__ */ l(
|
|
104
105
|
n,
|
|
105
106
|
{
|
|
106
|
-
slide: s,
|
|
107
|
-
index: 0,
|
|
108
107
|
currentIndex: 0,
|
|
108
|
+
index: 0,
|
|
109
|
+
slide: s,
|
|
109
110
|
variableHeight: !1
|
|
110
111
|
}
|
|
111
112
|
)
|
|
@@ -113,14 +114,14 @@ d("CarouselSlide", () => {
|
|
|
113
114
|
i(e).not.toHaveClass("slide--variable-height");
|
|
114
115
|
}), r("should not apply variable height class by default", () => {
|
|
115
116
|
const { container: t } = a(
|
|
116
|
-
/* @__PURE__ */ l(n, {
|
|
117
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: s })
|
|
117
118
|
), e = t.querySelector("li");
|
|
118
119
|
i(e).not.toHaveClass("slide--variable-height");
|
|
119
120
|
});
|
|
120
121
|
}), d("CSS Classes", () => {
|
|
121
122
|
r("should always have slide class", () => {
|
|
122
123
|
const { container: t } = a(
|
|
123
|
-
/* @__PURE__ */ l(n, {
|
|
124
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: s })
|
|
124
125
|
), e = t.querySelector("li");
|
|
125
126
|
i(e).toHaveClass("slide");
|
|
126
127
|
}), r("should have multiple classes when variableHeight is true", () => {
|
|
@@ -128,10 +129,10 @@ d("CarouselSlide", () => {
|
|
|
128
129
|
/* @__PURE__ */ l(
|
|
129
130
|
n,
|
|
130
131
|
{
|
|
131
|
-
|
|
132
|
-
index: 0,
|
|
132
|
+
variableHeight: !0,
|
|
133
133
|
currentIndex: 0,
|
|
134
|
-
|
|
134
|
+
index: 0,
|
|
135
|
+
slide: s
|
|
135
136
|
}
|
|
136
137
|
)
|
|
137
138
|
), e = t.querySelector("li");
|
|
@@ -139,29 +140,29 @@ d("CarouselSlide", () => {
|
|
|
139
140
|
});
|
|
140
141
|
}), d("Layout Loading", () => {
|
|
141
142
|
r("should render layout component when layout is found", async () => {
|
|
142
|
-
a(/* @__PURE__ */ l(n, { slide: {
|
|
143
|
+
a(/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: {
|
|
143
144
|
ariaLabel: "1 of 3",
|
|
144
145
|
cells: [{ id: 1, props: { title: "Figure Title" }, layout: "Figure" }],
|
|
145
146
|
layout: "Figure"
|
|
146
|
-
}
|
|
147
|
+
} })), await u(() => {
|
|
147
148
|
const e = c.getByTestId("figure-layout");
|
|
148
149
|
i(e).toBeInTheDocument(), i(e).toHaveTextContent("Figure Title");
|
|
149
150
|
});
|
|
150
151
|
}), r("should render text layout when layout is Text", async () => {
|
|
151
|
-
a(/* @__PURE__ */ l(n, { slide: {
|
|
152
|
+
a(/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: {
|
|
152
153
|
ariaLabel: "1 of 3",
|
|
153
154
|
cells: [{ id: 1, props: { content: "Text Content" }, layout: "Text" }],
|
|
154
155
|
layout: "Text"
|
|
155
|
-
}
|
|
156
|
+
} })), await u(() => {
|
|
156
157
|
const e = c.getByTestId("text-layout");
|
|
157
158
|
i(e).toBeInTheDocument(), i(e).toHaveTextContent("Text Content");
|
|
158
159
|
});
|
|
159
160
|
}), r("should render video layout when layout is Video", async () => {
|
|
160
|
-
a(/* @__PURE__ */ l(n, { slide: {
|
|
161
|
+
a(/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: {
|
|
161
162
|
ariaLabel: "1 of 3",
|
|
162
163
|
cells: [{ id: 1, props: { videoId: "video-123" }, layout: "Video" }],
|
|
163
164
|
layout: "Video"
|
|
164
|
-
}
|
|
165
|
+
} })), await u(() => {
|
|
165
166
|
const e = c.getByTestId("video-layout");
|
|
166
167
|
i(e).toBeInTheDocument(), i(e).toHaveTextContent("video-123");
|
|
167
168
|
});
|
|
@@ -171,14 +172,14 @@ d("CarouselSlide", () => {
|
|
|
171
172
|
cells: [{ id: 1, props: { title: "Test" }, layout: "Unknown" }],
|
|
172
173
|
layout: "Unknown"
|
|
173
174
|
}, { container: e } = a(
|
|
174
|
-
/* @__PURE__ */ l(n, {
|
|
175
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: t })
|
|
175
176
|
), o = e.querySelector("li");
|
|
176
177
|
i(o).toBeInTheDocument(), i(o == null ? void 0 : o.children.length).toBe(0);
|
|
177
178
|
});
|
|
178
179
|
}), d("Multiple Cells", () => {
|
|
179
180
|
r("should render multiple cells", async () => {
|
|
180
181
|
a(
|
|
181
|
-
/* @__PURE__ */ l(n, { slide: {
|
|
182
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: {
|
|
182
183
|
ariaLabel: "1 of 3",
|
|
183
184
|
cells: [
|
|
184
185
|
{ id: 1, props: { title: "Cell 1" }, layout: "Figure" },
|
|
@@ -186,35 +187,35 @@ d("CarouselSlide", () => {
|
|
|
186
187
|
{ id: 3, props: { title: "Cell 3" }, layout: "Figure" }
|
|
187
188
|
],
|
|
188
189
|
layout: "Figure"
|
|
189
|
-
}
|
|
190
|
+
} })
|
|
190
191
|
), await u(() => {
|
|
191
192
|
const e = c.getAllByTestId("figure-layout");
|
|
192
193
|
i(e).toHaveLength(3), i(e[0]).toHaveTextContent("Cell 1"), i(e[1]).toHaveTextContent("Cell 2"), i(e[2]).toHaveTextContent("Cell 3");
|
|
193
194
|
});
|
|
194
195
|
}), r("should render cells with unique keys", async () => {
|
|
195
196
|
a(
|
|
196
|
-
/* @__PURE__ */ l(n, { slide: {
|
|
197
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 2, slide: {
|
|
197
198
|
ariaLabel: "1 of 3",
|
|
198
199
|
cells: [
|
|
199
200
|
{ id: 1, props: { title: "Cell A" }, layout: "Figure" },
|
|
200
201
|
{ id: 2, props: { title: "Cell B" }, layout: "Figure" }
|
|
201
202
|
],
|
|
202
203
|
layout: "Figure"
|
|
203
|
-
}
|
|
204
|
+
} })
|
|
204
205
|
), await u(() => {
|
|
205
206
|
const e = c.getAllByTestId("figure-layout");
|
|
206
207
|
i(e).toHaveLength(2);
|
|
207
208
|
});
|
|
208
209
|
}), r("should use slide layout for all cells in the slide", async () => {
|
|
209
210
|
a(
|
|
210
|
-
/* @__PURE__ */ l(n, { slide: {
|
|
211
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: {
|
|
211
212
|
ariaLabel: "1 of 3",
|
|
212
213
|
cells: [
|
|
213
214
|
{ id: 1, props: { title: "Figure Cell 1" }, layout: "Figure" },
|
|
214
215
|
{ id: 2, props: { title: "Figure Cell 2" }, layout: "Figure" }
|
|
215
216
|
],
|
|
216
217
|
layout: "Figure"
|
|
217
|
-
}
|
|
218
|
+
} })
|
|
218
219
|
), await u(() => {
|
|
219
220
|
const e = c.getAllByTestId("figure-layout");
|
|
220
221
|
i(e).toHaveLength(2), i(e[0]).toHaveTextContent("Figure Cell 1"), i(e[1]).toHaveTextContent("Figure Cell 2");
|
|
@@ -227,7 +228,7 @@ d("CarouselSlide", () => {
|
|
|
227
228
|
cells: [],
|
|
228
229
|
layout: "Figure"
|
|
229
230
|
}, { container: e } = a(
|
|
230
|
-
/* @__PURE__ */ l(n, {
|
|
231
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: t })
|
|
231
232
|
), o = e.querySelector("li");
|
|
232
233
|
i(o).toBeInTheDocument(), i(o == null ? void 0 : o.children.length).toBe(0);
|
|
233
234
|
}), r("should handle missing layout in cell", async () => {
|
|
@@ -236,7 +237,7 @@ d("CarouselSlide", () => {
|
|
|
236
237
|
cells: [{ id: 1, props: { title: "Test" } }],
|
|
237
238
|
layout: ""
|
|
238
239
|
}, { container: e } = a(
|
|
239
|
-
/* @__PURE__ */ l(n, {
|
|
240
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: t })
|
|
240
241
|
), o = e.querySelector("li");
|
|
241
242
|
i(o).toBeInTheDocument();
|
|
242
243
|
}), r("should handle empty aria-label", () => {
|
|
@@ -245,24 +246,24 @@ d("CarouselSlide", () => {
|
|
|
245
246
|
cells: [h],
|
|
246
247
|
layout: "Figure"
|
|
247
248
|
}, { container: e } = a(
|
|
248
|
-
/* @__PURE__ */ l(n, {
|
|
249
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: t })
|
|
249
250
|
), o = e.querySelector("li");
|
|
250
251
|
i(o).toHaveAttribute("aria-label", "");
|
|
251
252
|
}), r("should handle negative indices gracefully", () => {
|
|
252
253
|
const { container: t } = a(
|
|
253
|
-
/* @__PURE__ */ l(n, {
|
|
254
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: -1, slide: s })
|
|
254
255
|
), e = t.querySelector("li");
|
|
255
256
|
i(e).toHaveAttribute("data-index", "-1"), i(e).toHaveAttribute("inert");
|
|
256
257
|
}), r("should handle large index values", () => {
|
|
257
258
|
const { container: t } = a(
|
|
258
|
-
/* @__PURE__ */ l(n, {
|
|
259
|
+
/* @__PURE__ */ l(n, { currentIndex: 999, index: 999, slide: s })
|
|
259
260
|
), e = t.querySelector("li");
|
|
260
261
|
i(e).toHaveAttribute("data-index", "999"), i(e).not.toHaveAttribute("inert");
|
|
261
262
|
});
|
|
262
263
|
}), d("Props Passing to Layout", () => {
|
|
263
264
|
r("should pass all cell props to layout component", async () => {
|
|
264
265
|
a(
|
|
265
|
-
/* @__PURE__ */ l(n, { slide: {
|
|
266
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: {
|
|
266
267
|
ariaLabel: "1 of 1",
|
|
267
268
|
cells: [
|
|
268
269
|
{
|
|
@@ -277,17 +278,17 @@ d("CarouselSlide", () => {
|
|
|
277
278
|
}
|
|
278
279
|
],
|
|
279
280
|
layout: "Figure"
|
|
280
|
-
}
|
|
281
|
+
} })
|
|
281
282
|
), await u(() => {
|
|
282
283
|
const e = c.getByTestId("figure-layout");
|
|
283
284
|
i(e).toBeInTheDocument();
|
|
284
285
|
});
|
|
285
286
|
}), r("should handle cells without id", async () => {
|
|
286
|
-
a(/* @__PURE__ */ l(n, { slide: {
|
|
287
|
+
a(/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: {
|
|
287
288
|
ariaLabel: "1 of 1",
|
|
288
289
|
cells: [{ props: { title: "No ID Cell" }, layout: "Figure" }],
|
|
289
290
|
layout: "Figure"
|
|
290
|
-
}
|
|
291
|
+
} })), await u(() => {
|
|
291
292
|
const e = c.getByTestId("figure-layout");
|
|
292
293
|
i(e).toBeInTheDocument();
|
|
293
294
|
});
|
|
@@ -303,30 +304,30 @@ d("CarouselSlide", () => {
|
|
|
303
304
|
cells: [{ id: 2, props: { title: "Updated" }, layout: "Figure" }],
|
|
304
305
|
layout: "Figure"
|
|
305
306
|
}, { rerender: o } = a(
|
|
306
|
-
/* @__PURE__ */ l(n, {
|
|
307
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: t })
|
|
307
308
|
);
|
|
308
309
|
await u(() => {
|
|
309
310
|
i(c.getByText("Initial")).toBeInTheDocument();
|
|
310
|
-
}), o(/* @__PURE__ */ l(n, {
|
|
311
|
+
}), o(/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: e })), await u(() => {
|
|
311
312
|
i(c.getByText("Updated")).toBeInTheDocument();
|
|
312
313
|
});
|
|
313
314
|
}), r("should update inert attribute when currentIndex changes", () => {
|
|
314
315
|
const { container: t, rerender: e } = a(
|
|
315
|
-
/* @__PURE__ */ l(n, {
|
|
316
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 1, slide: s })
|
|
316
317
|
);
|
|
317
318
|
let o = t.querySelector("li");
|
|
318
|
-
i(o).toHaveAttribute("inert"), e(/* @__PURE__ */ l(n, {
|
|
319
|
+
i(o).toHaveAttribute("inert"), e(/* @__PURE__ */ l(n, { currentIndex: 1, index: 1, slide: s })), o = t.querySelector("li"), i(o).not.toHaveAttribute("inert");
|
|
319
320
|
}), r("should update data-index when index changes", () => {
|
|
320
321
|
const { container: t, rerender: e } = a(
|
|
321
|
-
/* @__PURE__ */ l(n, {
|
|
322
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: s })
|
|
322
323
|
);
|
|
323
324
|
let o = t.querySelector("li");
|
|
324
|
-
i(o).toHaveAttribute("data-index", "0"), e(/* @__PURE__ */ l(n, {
|
|
325
|
+
i(o).toHaveAttribute("data-index", "0"), e(/* @__PURE__ */ l(n, { currentIndex: 0, index: 3, slide: s })), o = t.querySelector("li"), i(o).toHaveAttribute("data-index", "3");
|
|
325
326
|
});
|
|
326
327
|
}), d("Accessibility", () => {
|
|
327
328
|
r("should have proper role description for screen readers", () => {
|
|
328
329
|
const { container: t } = a(
|
|
329
|
-
/* @__PURE__ */ l(n, {
|
|
330
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: s })
|
|
330
331
|
), e = t.querySelector('li[aria-roledescription="carousel-item"]');
|
|
331
332
|
i(e).toBeInTheDocument();
|
|
332
333
|
}), r("should provide context with aria-label", () => {
|
|
@@ -335,17 +336,17 @@ d("CarouselSlide", () => {
|
|
|
335
336
|
cells: [h],
|
|
336
337
|
layout: "Figure"
|
|
337
338
|
}, { container: e } = a(
|
|
338
|
-
/* @__PURE__ */ l(n, {
|
|
339
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 2, slide: t })
|
|
339
340
|
), o = e.querySelector("li");
|
|
340
341
|
i(o).toHaveAttribute("aria-label", "Slide 3 of 10");
|
|
341
342
|
}), r("should be inert when not focused to prevent tab navigation", () => {
|
|
342
343
|
const { container: t } = a(
|
|
343
|
-
/* @__PURE__ */ l(n, {
|
|
344
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 2, slide: s })
|
|
344
345
|
), e = t.querySelector("li");
|
|
345
346
|
i(e).toHaveAttribute("inert");
|
|
346
347
|
}), r("should not be inert when focused to allow tab navigation", () => {
|
|
347
348
|
const { container: t } = a(
|
|
348
|
-
/* @__PURE__ */ l(n, {
|
|
349
|
+
/* @__PURE__ */ l(n, { currentIndex: 0, index: 0, slide: s })
|
|
349
350
|
), e = t.querySelector("li");
|
|
350
351
|
i(e).not.toHaveAttribute("inert");
|
|
351
352
|
});
|
|
@@ -362,10 +363,10 @@ d("CarouselSlide", () => {
|
|
|
362
363
|
/* @__PURE__ */ l(
|
|
363
364
|
n,
|
|
364
365
|
{
|
|
365
|
-
|
|
366
|
-
index: 4,
|
|
366
|
+
variableHeight: !0,
|
|
367
367
|
currentIndex: 4,
|
|
368
|
-
|
|
368
|
+
index: 4,
|
|
369
|
+
slide: t
|
|
369
370
|
}
|
|
370
371
|
)
|
|
371
372
|
), o = e.querySelector("li");
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { jsxs as s, jsx as e, Fragment as W } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { getViewingPlatforms as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { useState as d, useEffect as P } from "react";
|
|
3
|
+
import { getViewingPlatforms as q } from "../../utils/getViewingPlatforms.js";
|
|
4
|
+
import { classes as f } from "../../utils/helpers.js";
|
|
5
|
+
import { ChannelSearch as I } from "../ChannelSearch/ChannelSearch.js";
|
|
6
|
+
import { RescanInstructions as O } from "../RescanInstructions/RescanInstructions.js";
|
|
6
7
|
import { DeviceAndPlatformLists as z } from "../DeviceAndPlatformLists/DeviceAndPlatformLists.js";
|
|
7
|
-
import { GeneralErrorBoundary as
|
|
8
|
-
import '../../assets/FindUs.css';const E = "
|
|
9
|
-
"grid-wrapper": "_grid-
|
|
8
|
+
import { GeneralErrorBoundary as h } from "../../error-boundries/GeneralErrorBoundry.js";
|
|
9
|
+
import '../../assets/FindUs.css';const E = "_findus__column_jx1qh_8", p = {
|
|
10
|
+
"grid-wrapper": "_grid-wrapper_jx1qh_1",
|
|
10
11
|
findus__column: E
|
|
11
12
|
};
|
|
12
|
-
function
|
|
13
|
+
function V({
|
|
13
14
|
network: n,
|
|
14
|
-
baseApiUrl:
|
|
15
|
-
platformsApiUrl:
|
|
16
|
-
allowStateSearch:
|
|
17
|
-
allowZipcodeSearch:
|
|
15
|
+
baseApiUrl: _,
|
|
16
|
+
platformsApiUrl: g = "https://api.scrippscloud.com/viewing-platforms/v1",
|
|
17
|
+
allowStateSearch: v = !0,
|
|
18
|
+
allowZipcodeSearch: y = !0,
|
|
18
19
|
allowAutoScroll: o = !0,
|
|
19
20
|
autoScrollOffset: a = 25,
|
|
20
21
|
compactLayout: t = !0,
|
|
21
22
|
showChannelSearchAndRescan: c = !0,
|
|
22
|
-
numberOfColumns:
|
|
23
|
+
numberOfColumns: N,
|
|
23
24
|
ad: l = {
|
|
24
25
|
campaign: "",
|
|
25
26
|
source: "",
|
|
@@ -27,101 +28,129 @@ function G({
|
|
|
27
28
|
content: "learn_more"
|
|
28
29
|
}
|
|
29
30
|
}) {
|
|
30
|
-
const [r,
|
|
31
|
-
return
|
|
31
|
+
const [r, w] = d(null), [b, j] = d(o ? a : 0), [u, x] = d(null);
|
|
32
|
+
return P(() => {
|
|
32
33
|
r === null && (async () => {
|
|
33
|
-
const i = await
|
|
34
|
+
const i = await q({ network: n.platformsSlug, platformsApiUrl: g });
|
|
34
35
|
if (Object.prototype.hasOwnProperty.call(i, "error")) {
|
|
35
|
-
|
|
36
|
+
x("An error occured while fetching the platforms."), console.error("An error occured while fetching the platforms:", i), w(/* @__PURE__ */ new Map());
|
|
36
37
|
return;
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
+
w(i);
|
|
39
40
|
})();
|
|
40
|
-
}, [r, n.platformsSlug,
|
|
41
|
+
}, [r, n.platformsSlug, g]), P(() => {
|
|
41
42
|
if (window.innerWidth <= 960) {
|
|
42
43
|
const i = setInterval(() => {
|
|
43
44
|
if (document.querySelector(".mobile-nav")) {
|
|
44
45
|
clearInterval(i);
|
|
45
|
-
const
|
|
46
|
+
const m = document.querySelector(".mobile-nav"), M = (m == null ? void 0 : m.offsetHeight) ?? 0;
|
|
46
47
|
j(M + a);
|
|
47
48
|
}
|
|
48
49
|
}, 100);
|
|
49
50
|
}
|
|
50
|
-
}, [a]), /* @__PURE__ */ s(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
}, [a]), /* @__PURE__ */ s(
|
|
52
|
+
"section",
|
|
53
|
+
{
|
|
54
|
+
className: f([
|
|
55
|
+
p["find-us"],
|
|
56
|
+
t ? "find-us--compact" : ""
|
|
57
|
+
]),
|
|
58
|
+
children: [
|
|
59
|
+
c && !t && /* @__PURE__ */ e(
|
|
60
|
+
h,
|
|
58
61
|
{
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
62
|
+
errorMessage: "Please try again later. If the problem persists please use the <strong>contact us</strong> link below to report the issue.",
|
|
63
|
+
errorTitle: "We're sorry, there's currently an issue with our channel search.",
|
|
64
|
+
children: /* @__PURE__ */ e("div", { className: "find-us__channel-search-section", children: /* @__PURE__ */ e(
|
|
65
|
+
I,
|
|
66
|
+
{
|
|
67
|
+
ad: {
|
|
68
|
+
campaign: l.campaign ?? "",
|
|
69
|
+
source: l.source ?? "",
|
|
70
|
+
medium: l.medium ?? "referral",
|
|
71
|
+
content: l.content ?? "learn_more"
|
|
72
|
+
},
|
|
73
|
+
allowAutoScroll: o,
|
|
74
|
+
allowStateSearch: v,
|
|
75
|
+
allowZipcodeSearch: y,
|
|
76
|
+
autoScrollOffset: b,
|
|
77
|
+
baseApiUrl: _,
|
|
78
|
+
compactLayout: t,
|
|
79
|
+
network: n
|
|
80
|
+
}
|
|
81
|
+
) })
|
|
72
82
|
}
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ e("div", { className: "find-us__rescan-platform-section", children: /* @__PURE__ */ s(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
className: f([
|
|
88
|
+
p["grid-wrapper"],
|
|
89
|
+
"findus__grid-wrapper",
|
|
90
|
+
c ? "" : "findus__grid-wrapper--full-width"
|
|
91
|
+
]),
|
|
92
|
+
children: [
|
|
93
|
+
c && /* @__PURE__ */ s(
|
|
94
|
+
"div",
|
|
95
|
+
{
|
|
96
|
+
className: f([
|
|
97
|
+
p.findus__column,
|
|
98
|
+
"findus__column"
|
|
99
|
+
]),
|
|
100
|
+
children: [
|
|
101
|
+
t && /* @__PURE__ */ s(W, { children: [
|
|
102
|
+
/* @__PURE__ */ s("h4", { className: "channel-search__header", children: [
|
|
103
|
+
"Digital Antenna ",
|
|
104
|
+
/* @__PURE__ */ e("span", { className: "channel-search__header--lighter", children: "(Over-the-Air Broadcast)" })
|
|
105
|
+
] }),
|
|
106
|
+
/* @__PURE__ */ e(
|
|
107
|
+
h,
|
|
108
|
+
{
|
|
109
|
+
errorMessage: "Please try again later. If the problem persists please use the <strong>contact us</strong> link below to report the issue.",
|
|
110
|
+
errorTitle: "We're sorry, there's currently an issue with our channel search.",
|
|
111
|
+
children: /* @__PURE__ */ e(
|
|
112
|
+
I,
|
|
113
|
+
{
|
|
114
|
+
allowAutoScroll: o,
|
|
115
|
+
allowStateSearch: v,
|
|
116
|
+
allowZipcodeSearch: y,
|
|
117
|
+
autoScrollOffset: b,
|
|
118
|
+
baseApiUrl: _,
|
|
119
|
+
compactLayout: t,
|
|
120
|
+
network: n
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
] }),
|
|
126
|
+
/* @__PURE__ */ e(O, { brandName: n.brand_name })
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
),
|
|
130
|
+
/* @__PURE__ */ s(
|
|
131
|
+
h,
|
|
90
132
|
{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
133
|
+
errorMessage: "Please try again later. If the problem persists please use the <strong>contact us</strong> link below to report the issue.",
|
|
134
|
+
errorTitle: "We're sorry, there's currently an issue with our device and platform lists.",
|
|
135
|
+
children: [
|
|
136
|
+
r !== null && r.size > 0 && u === null && /* @__PURE__ */ e(z, { platformResources: r, ...N && { numberOfColumns: N } }),
|
|
137
|
+
r !== null && r.size > 0 && u !== null && /* @__PURE__ */ e("div", { className: "find-us__error", children: /* @__PURE__ */ e("p", { className: "find-us__error-message", children: u }) }),
|
|
138
|
+
r !== null && r.size === 0 && /* @__PURE__ */ e("div", { className: "find-us__error", children: /* @__PURE__ */ s("p", { className: "find-us__error-message", children: [
|
|
139
|
+
"We couldn't find any viewing platforms for ",
|
|
140
|
+
n.brand_name,
|
|
141
|
+
"."
|
|
142
|
+
] }) })
|
|
143
|
+
]
|
|
98
144
|
}
|
|
99
145
|
)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
f,
|
|
107
|
-
{
|
|
108
|
-
errorMessage: "Please try again later. If the problem persists please use the <strong>contact us</strong> link below to report the issue.",
|
|
109
|
-
errorTitle: "We're sorry, there's currently an issue with our device and platform lists.",
|
|
110
|
-
children: [
|
|
111
|
-
r !== null && r.size > 0 && u === null && /* @__PURE__ */ e(z, { platformResources: r, ...b && { numberOfColumns: b } }),
|
|
112
|
-
r !== null && r.size > 0 && u !== null && /* @__PURE__ */ e("div", { className: "find-us__error", children: /* @__PURE__ */ e("p", { className: "find-us__error-message", children: u }) }),
|
|
113
|
-
r !== null && r.size === 0 && /* @__PURE__ */ e("div", { className: "find-us__error", children: /* @__PURE__ */ s("p", { className: "find-us__error-message", children: [
|
|
114
|
-
"We couldn't find any viewing platforms for ",
|
|
115
|
-
n.brand_name,
|
|
116
|
-
"."
|
|
117
|
-
] }) })
|
|
118
|
-
]
|
|
119
|
-
}
|
|
120
|
-
)
|
|
121
|
-
] }) })
|
|
122
|
-
] });
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
) })
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
);
|
|
123
152
|
}
|
|
124
153
|
export {
|
|
125
|
-
|
|
126
|
-
|
|
154
|
+
V as FindUs,
|
|
155
|
+
V as default
|
|
127
156
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as c, Fragment as g, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { classes as t } from "../../utils/helpers.js";
|
|
3
|
-
import '../../assets/GridList.css';const
|
|
3
|
+
import '../../assets/GridList.css';const i = {
|
|
4
4
|
"grid-list": "_grid-list_17klz_1",
|
|
5
5
|
"grid-list-header": "_grid-list-header_17klz_9",
|
|
6
6
|
"grid-list--1-columns": "_grid-list--1-columns_17klz_13",
|
|
@@ -15,15 +15,15 @@ import '../../assets/GridList.css';const s = {
|
|
|
15
15
|
"grid-list--10-columns": "_grid-list--10-columns_17klz_49"
|
|
16
16
|
};
|
|
17
17
|
function m({
|
|
18
|
-
children:
|
|
18
|
+
children: d,
|
|
19
19
|
numberOfColumns: l = 2,
|
|
20
|
-
headerText:
|
|
20
|
+
headerText: s = ""
|
|
21
21
|
}) {
|
|
22
22
|
l > 10 && (l = 10);
|
|
23
|
-
const
|
|
23
|
+
const _ = `grid-list--${l}-columns`;
|
|
24
24
|
return /* @__PURE__ */ c(g, { children: [
|
|
25
|
-
|
|
26
|
-
/* @__PURE__ */ r("ul", { className: t([
|
|
25
|
+
s !== "" && /* @__PURE__ */ r("h3", { className: t([i["grid-list-header"], "grid-list-header"]), children: s }),
|
|
26
|
+
/* @__PURE__ */ r("ul", { className: t([i["grid-list"], "grid-list", i[_]]), children: d })
|
|
27
27
|
] });
|
|
28
28
|
}
|
|
29
29
|
export {
|