@scrippsproduct/networks-ui-library 2.0.0-dev.0 → 2.0.1-dev.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.
- package/dist/ResultsTable.module-CRGWj4fD.mjs +14 -0
- package/dist/assets/ActionButton.css +1 -1
- package/dist/assets/AdBlock.css +1 -1
- package/dist/assets/BasicGridModule.css +1 -1
- package/dist/assets/DateNavigation.css +1 -1
- package/dist/assets/DrawerNavigation.css +1 -1
- package/dist/assets/GenericList.css +1 -1
- package/dist/assets/InfoPanel.css +1 -1
- package/dist/assets/Loading.css +1 -1
- package/dist/assets/LoadingV2.css +1 -1
- package/dist/assets/ModalContainer.css +1 -1
- package/dist/assets/Overlay.css +1 -1
- package/dist/assets/ResultsTable.css +1 -1
- package/dist/assets/ScheduleList.css +1 -1
- package/dist/assets/ShowAboutLayout.css +1 -1
- package/dist/components/ActionButton/ActionButton.js +69 -68
- package/dist/components/AdBlock/AdBlock.js +140 -137
- package/dist/components/BasicGridModule/BasicGridModule.js +76 -56
- package/dist/components/BasicGridModule/BasicGridModule.test.js +72 -62
- package/dist/components/DateNavigation/DateNavigation.js +45 -45
- package/dist/components/DrawerNavigation/DrawerNavigation.js +30 -30
- package/dist/components/GenericList/GenericList.js +16 -16
- package/dist/components/InfoPanel/InfoPanel.js +30 -35
- package/dist/components/Loading/Loading.js +17 -17
- package/dist/components/LoadingV2/LoadingV2.js +21 -21
- package/dist/components/ModalContainer/ModalContainer.js +25 -25
- package/dist/components/Overlay/Overlay.js +1 -1
- package/dist/components/ResultsTable/ResultsTable.js +1 -1
- package/dist/components/ResultsTableBody/ResultsTableBody.js +1 -1
- package/dist/components/ResultsTableHeader/ResultsTableHeader.js +1 -1
- package/dist/components/ScheduleList/ScheduleList.js +124 -123
- package/dist/components/ShowAboutLayout/ShowAboutLayout.js +9 -9
- package/package.json +1 -1
- package/dist/ResultsTable.module-DrBmF9XB.mjs +0 -14
|
@@ -1,191 +1,194 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import '../../assets/AdBlock.css';const
|
|
4
|
-
"ad-copy__description": "_ad-
|
|
5
|
-
"ad-copy__link": "_ad-
|
|
6
|
-
"ad-anchor": "_ad-
|
|
7
|
-
"ad-image": "_ad-
|
|
8
|
-
"ad-image__text": "_ad-
|
|
9
|
-
"ad-copy": "_ad-
|
|
10
|
-
"ad-image--animate": "_ad-image--
|
|
11
|
-
"promo-slide-in-left": "_promo-slide-in-
|
|
12
|
-
"ad-copy--animate": "_ad-copy--
|
|
13
|
-
"promo-slide-in-right": "_promo-slide-in-
|
|
14
|
-
"ad-copy__header": "_ad-
|
|
15
|
-
fade:
|
|
16
|
-
"fade
|
|
17
|
-
"fade-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"ui-spinner-rotate-
|
|
32
|
-
"
|
|
33
|
-
"clip-path-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"ad-
|
|
37
|
-
"ad-
|
|
38
|
-
"ad-
|
|
39
|
-
"ad-
|
|
40
|
-
"ad-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"ad-
|
|
46
|
-
"ad-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"fade
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
"ad-
|
|
71
|
-
"
|
|
72
|
-
"ad-
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"ad-image
|
|
78
|
-
"ad-
|
|
79
|
-
"
|
|
80
|
-
"ad-
|
|
81
|
-
"promo-slide-in-
|
|
82
|
-
"ad-
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"
|
|
1
|
+
import { jsx as a, jsxs as l, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as d, useCallback as b, useEffect as q } from "react";
|
|
3
|
+
import '../../assets/AdBlock.css';const x = "_fade_44sh7_1", $ = "_slidein_44sh7_1", N = "_slideout_44sh7_1", T = "_scale_44sh7_1", R = "_reveal_44sh7_1", L = "_hide_44sh7_1", g = {
|
|
4
|
+
"ad-copy__description": "_ad-copy__description_44sh7_264",
|
|
5
|
+
"ad-copy__link": "_ad-copy__link_44sh7_265",
|
|
6
|
+
"ad-anchor": "_ad-anchor_44sh7_287",
|
|
7
|
+
"ad-image": "_ad-image_44sh7_302",
|
|
8
|
+
"ad-image__text": "_ad-image__text_44sh7_329",
|
|
9
|
+
"ad-copy": "_ad-copy_44sh7_264",
|
|
10
|
+
"ad-image--animate": "_ad-image--animate_44sh7_340",
|
|
11
|
+
"promo-slide-in-left": "_promo-slide-in-left_44sh7_1",
|
|
12
|
+
"ad-copy--animate": "_ad-copy--animate_44sh7_347",
|
|
13
|
+
"promo-slide-in-right": "_promo-slide-in-right_44sh7_1",
|
|
14
|
+
"ad-copy__header": "_ad-copy__header_44sh7_355",
|
|
15
|
+
fade: x,
|
|
16
|
+
"dim-fade": "_dim-fade_44sh7_1",
|
|
17
|
+
"fade-in": "_fade-in_44sh7_1",
|
|
18
|
+
"fade-out": "_fade-out_44sh7_1",
|
|
19
|
+
"page-fade-in": "_page-fade-in_44sh7_1",
|
|
20
|
+
"backdrop-reveal": "_backdrop-reveal_44sh7_1",
|
|
21
|
+
"slide-up": "_slide-up_44sh7_1",
|
|
22
|
+
slidein: $,
|
|
23
|
+
slideout: N,
|
|
24
|
+
"list-item-slide-in": "_list-item-slide-in_44sh7_1",
|
|
25
|
+
scale: T,
|
|
26
|
+
reveal: R,
|
|
27
|
+
"reveal-overlay": "_reveal-overlay_44sh7_1",
|
|
28
|
+
hide: L,
|
|
29
|
+
"hide-overlay": "_hide-overlay_44sh7_1",
|
|
30
|
+
"rotate-full": "_rotate-full_44sh7_1",
|
|
31
|
+
"ui-spinner-rotate-left": "_ui-spinner-rotate-left_44sh7_1",
|
|
32
|
+
"ui-spinner-rotate-right": "_ui-spinner-rotate-right_44sh7_1",
|
|
33
|
+
"clip-path-open": "_clip-path-open_44sh7_1",
|
|
34
|
+
"clip-path-close": "_clip-path-close_44sh7_1"
|
|
35
|
+
}, w = "_fade_26q8p_1", M = "_slidein_26q8p_1", C = "_slideout_26q8p_1", I = "_scale_26q8p_1", O = "_reveal_26q8p_1", j = "_hide_26q8p_1", A = {
|
|
36
|
+
"ad-copy__link": "_ad-copy__link_26q8p_273",
|
|
37
|
+
"ad-anchor": "_ad-anchor_26q8p_292",
|
|
38
|
+
"ad-image": "_ad-image_26q8p_317",
|
|
39
|
+
"ad-image__text": "_ad-image__text_26q8p_334",
|
|
40
|
+
"ad-copy": "_ad-copy_26q8p_273",
|
|
41
|
+
"ad-image--animate": "_ad-image--animate_26q8p_353",
|
|
42
|
+
"promo-slide-in-left": "_promo-slide-in-left_26q8p_1",
|
|
43
|
+
"ad-copy--animate": "_ad-copy--animate_26q8p_360",
|
|
44
|
+
"promo-slide-in-right": "_promo-slide-in-right_26q8p_1",
|
|
45
|
+
"ad-copy__header": "_ad-copy__header_26q8p_368",
|
|
46
|
+
"ad-copy__description": "_ad-copy__description_26q8p_380",
|
|
47
|
+
"ad-copy__link-text": "_ad-copy__link-text_26q8p_381",
|
|
48
|
+
fade: w,
|
|
49
|
+
"dim-fade": "_dim-fade_26q8p_1",
|
|
50
|
+
"fade-in": "_fade-in_26q8p_1",
|
|
51
|
+
"fade-out": "_fade-out_26q8p_1",
|
|
52
|
+
"page-fade-in": "_page-fade-in_26q8p_1",
|
|
53
|
+
"backdrop-reveal": "_backdrop-reveal_26q8p_1",
|
|
54
|
+
"slide-up": "_slide-up_26q8p_1",
|
|
55
|
+
slidein: M,
|
|
56
|
+
slideout: C,
|
|
57
|
+
"list-item-slide-in": "_list-item-slide-in_26q8p_1",
|
|
58
|
+
scale: I,
|
|
59
|
+
reveal: O,
|
|
60
|
+
"reveal-overlay": "_reveal-overlay_26q8p_1",
|
|
61
|
+
hide: j,
|
|
62
|
+
"hide-overlay": "_hide-overlay_26q8p_1",
|
|
63
|
+
"rotate-full": "_rotate-full_26q8p_1",
|
|
64
|
+
"ui-spinner-rotate-left": "_ui-spinner-rotate-left_26q8p_1",
|
|
65
|
+
"ui-spinner-rotate-right": "_ui-spinner-rotate-right_26q8p_1",
|
|
66
|
+
"clip-path-open": "_clip-path-open_26q8p_1",
|
|
67
|
+
"clip-path-close": "_clip-path-close_26q8p_1"
|
|
68
|
+
}, D = "_fade_zs25c_1", E = "_slidein_zs25c_1", B = "_slideout_zs25c_1", F = "_scale_zs25c_1", P = "_reveal_zs25c_1", G = "_hide_zs25c_1", H = {
|
|
69
|
+
"ad-anchor": "_ad-anchor_zs25c_282",
|
|
70
|
+
"ad-copy__link": "_ad-copy__link_zs25c_293",
|
|
71
|
+
"background-container": "_background-container_zs25c_297",
|
|
72
|
+
"ad-copy": "_ad-copy_zs25c_293",
|
|
73
|
+
"ad-copy__header": "_ad-copy__header_zs25c_313",
|
|
74
|
+
"ad-copy__description": "_ad-copy__description_zs25c_323",
|
|
75
|
+
"cta-container": "_cta-container_zs25c_334",
|
|
76
|
+
"cta-container__link": "_cta-container__link_zs25c_345",
|
|
77
|
+
"ad-image": "_ad-image_zs25c_364",
|
|
78
|
+
"ad-image__text": "_ad-image__text_zs25c_383",
|
|
79
|
+
"ad-image-mobile": "_ad-image-mobile_zs25c_393",
|
|
80
|
+
"ad-image--animate": "_ad-image--animate_zs25c_494",
|
|
81
|
+
"promo-slide-in-right": "_promo-slide-in-right_zs25c_1",
|
|
82
|
+
"ad-copy--animate": "_ad-copy--animate_zs25c_501",
|
|
83
|
+
"promo-slide-in-left": "_promo-slide-in-left_zs25c_1",
|
|
84
|
+
"ad-cta--animate": "_ad-cta--animate_zs25c_508",
|
|
85
|
+
"ad-mobile-disclaimer--animate": "_ad-mobile-disclaimer--animate_zs25c_522",
|
|
86
|
+
fade: D,
|
|
87
|
+
"dim-fade": "_dim-fade_zs25c_1",
|
|
88
|
+
"fade-in": "_fade-in_zs25c_1",
|
|
89
|
+
"fade-out": "_fade-out_zs25c_1",
|
|
90
|
+
"page-fade-in": "_page-fade-in_zs25c_1",
|
|
91
|
+
"backdrop-reveal": "_backdrop-reveal_zs25c_1",
|
|
92
|
+
"slide-up": "_slide-up_zs25c_1",
|
|
93
|
+
slidein: E,
|
|
94
|
+
slideout: B,
|
|
95
|
+
"list-item-slide-in": "_list-item-slide-in_zs25c_1",
|
|
96
|
+
scale: F,
|
|
97
|
+
reveal: P,
|
|
98
|
+
"reveal-overlay": "_reveal-overlay_zs25c_1",
|
|
96
99
|
hide: G,
|
|
97
|
-
"hide-overlay": "_hide-
|
|
98
|
-
"rotate-full": "_rotate-
|
|
99
|
-
"ui-spinner-rotate-left": "_ui-spinner-rotate-
|
|
100
|
-
"ui-spinner-rotate-right": "_ui-spinner-rotate-
|
|
101
|
-
"clip-path-open": "_clip-path-
|
|
102
|
-
"clip-path-close": "_clip-path-
|
|
100
|
+
"hide-overlay": "_hide-overlay_zs25c_1",
|
|
101
|
+
"rotate-full": "_rotate-full_zs25c_1",
|
|
102
|
+
"ui-spinner-rotate-left": "_ui-spinner-rotate-left_zs25c_1",
|
|
103
|
+
"ui-spinner-rotate-right": "_ui-spinner-rotate-right_zs25c_1",
|
|
104
|
+
"clip-path-open": "_clip-path-open_zs25c_1",
|
|
105
|
+
"clip-path-close": "_clip-path-close_zs25c_1"
|
|
103
106
|
}, J = {
|
|
104
107
|
"ad-anchor": "_ad-anchor_1kpgs_1",
|
|
105
108
|
"cta-container__link": "_cta-container__link_1kpgs_11"
|
|
106
109
|
};
|
|
107
|
-
function U({ image: i, ad: _, theme:
|
|
110
|
+
function U({ image: i, ad: _, theme: r = "default" }) {
|
|
108
111
|
const e = (/* @__PURE__ */ new Map([
|
|
109
|
-
["default",
|
|
110
|
-
["round2",
|
|
112
|
+
["default", g],
|
|
113
|
+
["round2", A],
|
|
111
114
|
["tablotv", H],
|
|
112
115
|
["imageonly", J]
|
|
113
|
-
])).get(
|
|
114
|
-
|
|
115
|
-
var
|
|
116
|
-
if (
|
|
117
|
-
if (
|
|
118
|
-
|
|
116
|
+
])).get(r) ?? g, y = _.campaign === "" ? "" : `?utm_campaign=${_.campaign}&utm_source=${_.source}&utm_medium=${_.medium}&utm_content=${_.content}`, o = d(null), n = d(null), c = d(null), p = d(null), m = d(null), h = d(null), s = `${_.href}${y}`, f = b((t, v) => {
|
|
117
|
+
t.forEach((k) => {
|
|
118
|
+
var u;
|
|
119
|
+
if (k.isIntersecting) {
|
|
120
|
+
if (r === "tablotv" && (c.current !== null && ((u = c.current) == null || u.classList.add(`${e["ad-cta--animate"]}`)), h.current !== null && h.current.classList.add(`${e["ad-mobile-disclaimer--animate"]}`)), o.current === null || n.current === null) return;
|
|
121
|
+
o.current.classList.add(`${e["ad-copy--animate"]}`), n.current.classList.add(`${e["ad-image--animate"]}`), v.unobserve(n.current);
|
|
119
122
|
}
|
|
120
123
|
});
|
|
121
|
-
}, [e,
|
|
122
|
-
return
|
|
123
|
-
if (
|
|
124
|
-
const
|
|
124
|
+
}, [e, r]);
|
|
125
|
+
return q(() => {
|
|
126
|
+
if (r !== "imageonly") {
|
|
127
|
+
const t = new IntersectionObserver(f, {
|
|
125
128
|
root: null,
|
|
126
129
|
rootMargin: "0px",
|
|
127
130
|
threshold: 0.1
|
|
128
131
|
});
|
|
129
|
-
return
|
|
130
|
-
|
|
132
|
+
return t.observe(n.current), () => {
|
|
133
|
+
t.disconnect();
|
|
131
134
|
};
|
|
132
135
|
}
|
|
133
|
-
}, [
|
|
136
|
+
}, [r, f]), // onClick - ensure tab isn't opened twice if clicking directly on the cta
|
|
134
137
|
/* @__PURE__ */ a(
|
|
135
138
|
"ad-block",
|
|
136
139
|
{
|
|
137
140
|
class: `${e["ad-anchor"]}`,
|
|
138
|
-
onClick: (
|
|
139
|
-
(
|
|
141
|
+
onClick: (t) => {
|
|
142
|
+
(t.target === c.current || t.target === p.current || t.target === m.current) && t.preventDefault(), window.open(c.current, "_blank");
|
|
140
143
|
},
|
|
141
|
-
children:
|
|
144
|
+
children: r === "imageonly" ? /* @__PURE__ */ a(
|
|
142
145
|
"a",
|
|
143
146
|
{
|
|
144
147
|
className: e["cta-container__link"],
|
|
145
|
-
href:
|
|
146
|
-
ref:
|
|
148
|
+
href: s,
|
|
149
|
+
ref: c,
|
|
147
150
|
rel: "noreferrer",
|
|
148
151
|
target: "_blank",
|
|
149
152
|
children: /* @__PURE__ */ a("span", { className: "sr-only", children: i.text })
|
|
150
153
|
}
|
|
151
|
-
) :
|
|
152
|
-
/* @__PURE__ */
|
|
154
|
+
) : r === "tablotv" ? /* @__PURE__ */ l("div", { className: e["background-container"], children: [
|
|
155
|
+
/* @__PURE__ */ l("div", { className: e["ad-copy"], ref: o, children: [
|
|
153
156
|
/* @__PURE__ */ a("h4", { className: e["ad-copy__header"], children: _.header }),
|
|
154
|
-
/* @__PURE__ */ a("div", { className: e["ad-image-mobile"], ref:
|
|
157
|
+
/* @__PURE__ */ a("div", { className: e["ad-image-mobile"], ref: n, children: /* @__PURE__ */ a("ad-image", { children: /* @__PURE__ */ a("a", { href: s, rel: "noreferrer", target: "_blank", children: /* @__PURE__ */ a("img", { alt: i.altText, ref: m, src: i.mobile }) }) }) }),
|
|
155
158
|
/* @__PURE__ */ a("p", { className: e["ad-copy__description"], children: _.description })
|
|
156
159
|
] }),
|
|
157
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ l("div", { className: e["cta-container"], children: [
|
|
158
161
|
/* @__PURE__ */ a(
|
|
159
162
|
"a",
|
|
160
163
|
{
|
|
161
164
|
className: e["cta-container__link"],
|
|
162
|
-
href:
|
|
163
|
-
ref:
|
|
165
|
+
href: s,
|
|
166
|
+
ref: c,
|
|
164
167
|
rel: "noreferrer",
|
|
165
168
|
target: "_blank",
|
|
166
169
|
children: _.linkText
|
|
167
170
|
}
|
|
168
171
|
),
|
|
169
|
-
/* @__PURE__ */ a("span", { className: e["ad-image__text"], ref:
|
|
172
|
+
/* @__PURE__ */ a("span", { className: e["ad-image__text"], ref: h, children: i.text })
|
|
170
173
|
] }),
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */ a("ad-image", { children: /* @__PURE__ */ a("a", { href:
|
|
174
|
+
/* @__PURE__ */ l("div", { className: e["ad-image"], ref: n, children: [
|
|
175
|
+
/* @__PURE__ */ a("ad-image", { children: /* @__PURE__ */ a("a", { href: s, rel: "noreferrer", target: "_blank", children: /* @__PURE__ */ a("img", { alt: i.altText, ref: p, src: i.url }) }) }),
|
|
173
176
|
/* @__PURE__ */ a("span", { className: e["ad-image__text"], children: i.text })
|
|
174
177
|
] })
|
|
175
|
-
] }) : /* @__PURE__ */
|
|
176
|
-
/* @__PURE__ */
|
|
178
|
+
] }) : /* @__PURE__ */ l(z, { children: [
|
|
179
|
+
/* @__PURE__ */ l("div", { className: e["ad-image"], ref: n, children: [
|
|
177
180
|
/* @__PURE__ */ a("span", { className: e["ad-image__text"], children: i.text }),
|
|
178
|
-
/* @__PURE__ */ a("ad-image", { children: /* @__PURE__ */ a("a", { href:
|
|
181
|
+
/* @__PURE__ */ a("ad-image", { children: /* @__PURE__ */ a("a", { href: s, rel: "noreferrer", target: "_blank", children: /* @__PURE__ */ a("img", { alt: i.altText, ref: p, src: i.url }) }) })
|
|
179
182
|
] }),
|
|
180
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ l("div", { className: e["ad-copy"], ref: o, children: [
|
|
181
184
|
/* @__PURE__ */ a("h4", { className: e["ad-copy__header"], children: _.header }),
|
|
182
185
|
/* @__PURE__ */ a("p", { className: e["ad-copy__description"], children: _.description }),
|
|
183
186
|
/* @__PURE__ */ a(
|
|
184
187
|
"a",
|
|
185
188
|
{
|
|
186
189
|
className: e["ad-copy__link"],
|
|
187
|
-
href:
|
|
188
|
-
ref:
|
|
190
|
+
href: s,
|
|
191
|
+
ref: c,
|
|
189
192
|
rel: "noreferrer",
|
|
190
193
|
target: "_blank",
|
|
191
194
|
children: _.linkText
|
|
@@ -1,68 +1,88 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import { classes as
|
|
4
|
-
import { blockLayoutsMap as
|
|
5
|
-
import { EqualSizeGrid as
|
|
6
|
-
import { InfoPanel as
|
|
7
|
-
import '../../assets/BasicGridModule.css';function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { jsxs as f, Fragment as T, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useReducer as _, useState as I, useRef as M, useEffect as O, createElement as S } from "react";
|
|
3
|
+
import { classes as x } from "../../utils/helpers.js";
|
|
4
|
+
import { blockLayoutsMap as v } from "../../settings.js";
|
|
5
|
+
import { EqualSizeGrid as P } from "../EqualSizeGrid/EqualSizeGrid.js";
|
|
6
|
+
import { InfoPanel as B } from "../InfoPanel/InfoPanel.js";
|
|
7
|
+
import '../../assets/BasicGridModule.css';function w(e, i) {
|
|
8
|
+
switch (i.type) {
|
|
9
|
+
case "OPEN_REQUEST":
|
|
10
|
+
return e.phase !== "idle" ? e : { phase: "exiting", activeContent: i.content };
|
|
11
|
+
case "EXIT_COMPLETE":
|
|
12
|
+
return e.phase !== "exiting" ? e : { ...e, phase: "open" };
|
|
13
|
+
case "CLOSE_PANEL":
|
|
14
|
+
return e.phase !== "open" ? e : { ...e, phase: "entering" };
|
|
15
|
+
case "ENTER_COMPLETE":
|
|
16
|
+
return e.phase !== "entering" ? e : { ...e, phase: "idle" };
|
|
17
|
+
default:
|
|
18
|
+
return e;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function q({
|
|
22
|
+
gap: e = "1.5rem",
|
|
23
|
+
itemsPerRow: i = 4,
|
|
24
|
+
classname: h = "",
|
|
25
|
+
title: u = "",
|
|
26
|
+
itemComponent: c = {
|
|
13
27
|
layout: "ImageCard",
|
|
14
28
|
props: {
|
|
15
29
|
fullCardClickable: !1
|
|
16
30
|
}
|
|
17
31
|
},
|
|
18
|
-
infoPanelComponent:
|
|
32
|
+
infoPanelComponent: a = {
|
|
19
33
|
layout: "",
|
|
20
34
|
backButtonLabel: "Return to List",
|
|
21
35
|
resourceList: [],
|
|
22
36
|
classname: ""
|
|
23
37
|
},
|
|
24
|
-
items:
|
|
25
|
-
customClicksHandler:
|
|
26
|
-
noAnimation:
|
|
38
|
+
items: m = [],
|
|
39
|
+
customClicksHandler: g = null,
|
|
40
|
+
noAnimation: d = !1
|
|
27
41
|
}) {
|
|
28
|
-
const [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const t = e.current;
|
|
40
|
-
return !i && e.current !== null && e.current.children.length && ((l = e.current.children[0]) == null || l.removeEventListener("animationend", r), (h = e.current.children[0]) == null || h.addEventListener("animationend", r, { once: !0 })), () => {
|
|
41
|
-
var g;
|
|
42
|
-
t !== null && t.children.length && ((g = t.children[0]) == null || g.removeEventListener("animationend", r));
|
|
42
|
+
const [{ phase: r, activeContent: y }, l] = _(w, {
|
|
43
|
+
phase: d ? "idle" : "entering",
|
|
44
|
+
activeContent: {}
|
|
45
|
+
}), p = v.get(c.layout), [L, C] = I(d ? null : "true"), E = M(null);
|
|
46
|
+
O(() => {
|
|
47
|
+
const t = E.current;
|
|
48
|
+
if (t === null) return;
|
|
49
|
+
const n = t.lastElementChild;
|
|
50
|
+
if (n === null || r !== "exiting" && r !== "entering") return;
|
|
51
|
+
const s = (R) => {
|
|
52
|
+
R.target === n && l({ type: r === "exiting" ? "EXIT_COMPLETE" : "ENTER_COMPLETE" });
|
|
43
53
|
};
|
|
44
|
-
|
|
45
|
-
|
|
54
|
+
return n.addEventListener("animationend", s), () => n.removeEventListener("animationend", s);
|
|
55
|
+
}, [r]);
|
|
56
|
+
const b = (t) => {
|
|
57
|
+
if (t.type === "info-panel") {
|
|
58
|
+
const n = a.resourceList.find(
|
|
59
|
+
(s) => Number.parseInt(s.id, 10) === Number.parseInt(t.resourceId, 10)
|
|
60
|
+
) ?? {};
|
|
61
|
+
C("false"), l({ type: "OPEN_REQUEST", content: n });
|
|
62
|
+
}
|
|
63
|
+
}, k = r !== "open", N = r === "open";
|
|
64
|
+
return /* @__PURE__ */ f(T, { children: [
|
|
65
|
+
k && /* @__PURE__ */ f(
|
|
46
66
|
"basic-grid-module",
|
|
47
67
|
{
|
|
48
|
-
"data-state":
|
|
49
|
-
"first-entry":
|
|
50
|
-
ref:
|
|
68
|
+
"data-state": r === "open" ? "idle" : r,
|
|
69
|
+
"first-entry": L,
|
|
70
|
+
ref: E,
|
|
51
71
|
children: [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
72
|
+
u !== "" && /* @__PURE__ */ o("h2", { className: x(["basic-grid-module__header", "h4"]), children: u }),
|
|
73
|
+
p !== void 0 && /* @__PURE__ */ o(
|
|
74
|
+
P,
|
|
55
75
|
{
|
|
56
|
-
classname:
|
|
57
|
-
gap:
|
|
58
|
-
itemsPerRow:
|
|
59
|
-
children:
|
|
60
|
-
(t) => /* @__PURE__ */
|
|
61
|
-
|
|
76
|
+
classname: h,
|
|
77
|
+
gap: e,
|
|
78
|
+
itemsPerRow: i,
|
|
79
|
+
children: m.map(
|
|
80
|
+
(t) => /* @__PURE__ */ S(
|
|
81
|
+
p,
|
|
62
82
|
{
|
|
63
83
|
...t,
|
|
64
|
-
...
|
|
65
|
-
handleClicks:
|
|
84
|
+
...c.props,
|
|
85
|
+
handleClicks: g ?? b,
|
|
66
86
|
key: `grid-item-${Math.round(Math.random() * 1e7)}`,
|
|
67
87
|
relatedResourceId: t.id
|
|
68
88
|
}
|
|
@@ -73,26 +93,26 @@ import '../../assets/BasicGridModule.css';function Q({
|
|
|
73
93
|
]
|
|
74
94
|
}
|
|
75
95
|
),
|
|
76
|
-
|
|
77
|
-
|
|
96
|
+
N && a.layout && /* @__PURE__ */ o(
|
|
97
|
+
B,
|
|
78
98
|
{
|
|
79
|
-
backButtonLabel:
|
|
99
|
+
backButtonLabel: a.backButtonLabel,
|
|
80
100
|
className: "grid-info-panel",
|
|
81
|
-
classname:
|
|
101
|
+
classname: a.classname,
|
|
82
102
|
layoutComponent: {
|
|
83
|
-
layout:
|
|
103
|
+
layout: a.layout,
|
|
84
104
|
props: {
|
|
85
|
-
...
|
|
105
|
+
...y
|
|
86
106
|
}
|
|
87
107
|
},
|
|
88
108
|
onBackClicked: () => {
|
|
89
|
-
|
|
109
|
+
l({ type: "CLOSE_PANEL" });
|
|
90
110
|
}
|
|
91
111
|
}
|
|
92
112
|
)
|
|
93
113
|
] });
|
|
94
114
|
}
|
|
95
115
|
export {
|
|
96
|
-
|
|
97
|
-
|
|
116
|
+
q as BasicGridModule,
|
|
117
|
+
q as default
|
|
98
118
|
};
|