@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,21 +1,21 @@
|
|
|
1
1
|
import { jsx as n, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import { v as a, d as c, b as h, i as r, r as i, g as o, s as l } from "../../react.esm-S2Q_NbYC.mjs";
|
|
3
3
|
import "../../index-BZQHStQa.mjs";
|
|
4
|
-
import { BasicGridModule as
|
|
4
|
+
import { BasicGridModule as d } from "./BasicGridModule.js";
|
|
5
5
|
a.mock("../EqualSizeGrid/index.ts", () => ({
|
|
6
|
-
default: ({ children: e, classname: t, gap:
|
|
6
|
+
default: ({ children: e, classname: t, gap: s, itemsPerRow: u }) => /* @__PURE__ */ n(
|
|
7
7
|
"div",
|
|
8
8
|
{
|
|
9
9
|
"data-testid": "equal-size-grid",
|
|
10
10
|
"data-classname": t,
|
|
11
|
-
"data-gap":
|
|
11
|
+
"data-gap": s,
|
|
12
12
|
"data-items-per-row": u,
|
|
13
13
|
children: e
|
|
14
14
|
}
|
|
15
15
|
)
|
|
16
16
|
}));
|
|
17
17
|
a.mock("../InfoPanel/index.ts", () => ({
|
|
18
|
-
default: ({ backButtonLabel: e, className: t, classname:
|
|
18
|
+
default: ({ backButtonLabel: e, className: t, classname: s, onBackClicked: u }) => /* @__PURE__ */ m("div", { "data-testid": "info-panel", "data-classname": s, className: t, children: [
|
|
19
19
|
/* @__PURE__ */ n("button", { "data-testid": "back-button", type: "button", onClick: u, children: e }),
|
|
20
20
|
/* @__PURE__ */ n("div", { children: "Info Panel Content" })
|
|
21
21
|
] })
|
|
@@ -28,148 +28,148 @@ c("BasicGridModule", () => {
|
|
|
28
28
|
a.clearAllMocks();
|
|
29
29
|
}), c("Basic Rendering", () => {
|
|
30
30
|
r("should render with default props", () => {
|
|
31
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
31
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector("basic-grid-module");
|
|
32
32
|
o(t).toBeInTheDocument();
|
|
33
33
|
}), r("should render grid module custom element", () => {
|
|
34
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
34
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector("basic-grid-module");
|
|
35
35
|
o(t).toBeInTheDocument();
|
|
36
36
|
}), r("should render title when provided", () => {
|
|
37
|
-
i(/* @__PURE__ */ n(
|
|
37
|
+
i(/* @__PURE__ */ n(d, { title: "Test Grid Title" })), o(l.getByText("Test Grid Title")).toBeInTheDocument();
|
|
38
38
|
}), r("should not render title when empty", () => {
|
|
39
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
39
|
+
const { container: e } = i(/* @__PURE__ */ n(d, { title: "" })), t = e.querySelector(".basic-grid-module__header");
|
|
40
40
|
o(t).not.toBeInTheDocument();
|
|
41
41
|
}), r("should render with custom element tag", () => {
|
|
42
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
42
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector("basic-grid-module");
|
|
43
43
|
o(t).toBeInTheDocument();
|
|
44
44
|
});
|
|
45
45
|
}), c("Animation States", () => {
|
|
46
46
|
r("should have entering state on initial render", () => {
|
|
47
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
47
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector("basic-grid-module");
|
|
48
48
|
o(t).toHaveAttribute("data-state", "entering");
|
|
49
49
|
}), r("should have first-entry attribute on initial render", () => {
|
|
50
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
51
|
-
o(t).toHaveAttribute("first-entry");
|
|
50
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector("basic-grid-module");
|
|
51
|
+
o(t).toHaveAttribute("first-entry", "true");
|
|
52
52
|
}), r("should not have first-entry when noAnimation is true", () => {
|
|
53
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
53
|
+
const { container: e } = i(/* @__PURE__ */ n(d, { noAnimation: !0 })), t = e.querySelector("basic-grid-module");
|
|
54
54
|
o(t).not.toHaveAttribute("first-entry");
|
|
55
55
|
}), r("should set first-entry to null when noAnimation is true", () => {
|
|
56
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
56
|
+
const { container: e } = i(/* @__PURE__ */ n(d, { noAnimation: !0 })), t = e.querySelector("basic-grid-module");
|
|
57
57
|
o(t == null ? void 0 : t.getAttribute("first-entry")).toBeNull();
|
|
58
58
|
});
|
|
59
59
|
}), c("Info Panel", () => {
|
|
60
60
|
r("should not render info panel by default", () => {
|
|
61
|
-
i(/* @__PURE__ */ n(
|
|
61
|
+
i(/* @__PURE__ */ n(d, {})), o(l.queryByTestId("info-panel")).not.toBeInTheDocument();
|
|
62
62
|
}), r("should render grid when info panel is closed", () => {
|
|
63
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
63
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector("basic-grid-module");
|
|
64
64
|
o(t).toBeInTheDocument(), o(l.queryByTestId("info-panel")).not.toBeInTheDocument();
|
|
65
65
|
}), r("should not show info panel initially", () => {
|
|
66
|
-
i(/* @__PURE__ */ n(
|
|
66
|
+
i(/* @__PURE__ */ n(d, {})), o(l.queryByTestId("info-panel")).not.toBeInTheDocument();
|
|
67
67
|
});
|
|
68
68
|
}), c("Title Rendering", () => {
|
|
69
69
|
r("should render title with h2 tag", () => {
|
|
70
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
70
|
+
const { container: e } = i(/* @__PURE__ */ n(d, { title: "Grid Title" })), t = e.querySelector("h2");
|
|
71
71
|
o(t).toBeInTheDocument(), o(t).toHaveTextContent("Grid Title");
|
|
72
72
|
}), r("should apply correct CSS classes to title", () => {
|
|
73
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
73
|
+
const { container: e } = i(/* @__PURE__ */ n(d, { title: "Grid Title" })), t = e.querySelector("h2");
|
|
74
74
|
o(t).toHaveClass("basic-grid-module__header"), o(t).toHaveClass("h4");
|
|
75
75
|
}), r("should handle long titles", () => {
|
|
76
76
|
const e = "A".repeat(100);
|
|
77
|
-
i(/* @__PURE__ */ n(
|
|
77
|
+
i(/* @__PURE__ */ n(d, { title: e })), o(l.getByText(e)).toBeInTheDocument();
|
|
78
78
|
}), r("should handle titles with special characters", () => {
|
|
79
79
|
const e = "Grid's Title & More <>";
|
|
80
|
-
i(/* @__PURE__ */ n(
|
|
80
|
+
i(/* @__PURE__ */ n(d, { title: e })), o(l.getByText(e)).toBeInTheDocument();
|
|
81
81
|
}), r("should not render header element when title is empty string", () => {
|
|
82
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
82
|
+
const { container: e } = i(/* @__PURE__ */ n(d, { title: "" })), t = e.querySelector(".basic-grid-module__header");
|
|
83
83
|
o(t).not.toBeInTheDocument();
|
|
84
84
|
}), r("should not render header element when title is not provided", () => {
|
|
85
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
85
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector(".basic-grid-module__header");
|
|
86
86
|
o(t).not.toBeInTheDocument();
|
|
87
87
|
});
|
|
88
88
|
}), c("Props Types", () => {
|
|
89
89
|
r("should accept gap prop", () => {
|
|
90
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
90
|
+
const { container: e } = i(/* @__PURE__ */ n(d, { gap: "2rem" })), t = e.querySelector("basic-grid-module");
|
|
91
91
|
o(t).toBeInTheDocument();
|
|
92
92
|
}), r("should accept itemsPerRow prop", () => {
|
|
93
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
93
|
+
const { container: e } = i(/* @__PURE__ */ n(d, { itemsPerRow: 3 })), t = e.querySelector("basic-grid-module");
|
|
94
94
|
o(t).toBeInTheDocument();
|
|
95
95
|
}), r("should accept classname prop", () => {
|
|
96
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
96
|
+
const { container: e } = i(/* @__PURE__ */ n(d, { classname: "custom-grid" })), t = e.querySelector("basic-grid-module");
|
|
97
97
|
o(t).toBeInTheDocument();
|
|
98
98
|
}), r("should accept itemComponent prop", () => {
|
|
99
99
|
const e = {
|
|
100
100
|
layout: "Figure",
|
|
101
101
|
props: {}
|
|
102
|
-
}, { container: t } = i(/* @__PURE__ */ n(
|
|
103
|
-
o(
|
|
102
|
+
}, { container: t } = i(/* @__PURE__ */ n(d, { itemComponent: e })), s = t.querySelector("basic-grid-module");
|
|
103
|
+
o(s).toBeInTheDocument();
|
|
104
104
|
}), r("should accept items prop", () => {
|
|
105
|
-
const e = [{ id: "1" }], { container: t } = i(/* @__PURE__ */ n(
|
|
106
|
-
o(
|
|
105
|
+
const e = [{ id: "1" }], { container: t } = i(/* @__PURE__ */ n(d, { items: e })), s = t.querySelector("basic-grid-module");
|
|
106
|
+
o(s).toBeInTheDocument();
|
|
107
107
|
}), r("should accept customClicksHandler prop", () => {
|
|
108
|
-
const e = a.fn(), { container: t } = i(/* @__PURE__ */ n(
|
|
109
|
-
o(
|
|
108
|
+
const e = a.fn(), { container: t } = i(/* @__PURE__ */ n(d, { customClicksHandler: e })), s = t.querySelector("basic-grid-module");
|
|
109
|
+
o(s).toBeInTheDocument();
|
|
110
110
|
}), r("should accept infoPanelComponent prop", () => {
|
|
111
111
|
const e = {
|
|
112
112
|
layout: "CastInfoLayout",
|
|
113
113
|
backButtonLabel: "Back",
|
|
114
114
|
resourceList: [],
|
|
115
115
|
classname: ""
|
|
116
|
-
}, { container: t } = i(/* @__PURE__ */ n(
|
|
117
|
-
o(
|
|
116
|
+
}, { container: t } = i(/* @__PURE__ */ n(d, { infoPanelComponent: e })), s = t.querySelector("basic-grid-module");
|
|
117
|
+
o(s).toBeInTheDocument();
|
|
118
118
|
});
|
|
119
119
|
}), c("Default Values", () => {
|
|
120
120
|
r("should use default gap when not provided", () => {
|
|
121
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
121
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector("basic-grid-module");
|
|
122
122
|
o(t).toBeInTheDocument();
|
|
123
123
|
}), r("should use default itemsPerRow when not provided", () => {
|
|
124
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
124
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector("basic-grid-module");
|
|
125
125
|
o(t).toBeInTheDocument();
|
|
126
126
|
}), r("should use default classname when not provided", () => {
|
|
127
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
127
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector("basic-grid-module");
|
|
128
128
|
o(t).toBeInTheDocument();
|
|
129
129
|
}), r("should use default title when not provided", () => {
|
|
130
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
130
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector("h2");
|
|
131
131
|
o(t).not.toBeInTheDocument();
|
|
132
132
|
}), r("should use default itemComponent when not provided", () => {
|
|
133
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
133
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector("basic-grid-module");
|
|
134
134
|
o(t).toBeInTheDocument();
|
|
135
135
|
}), r("should use default items array when not provided", () => {
|
|
136
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
136
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector("basic-grid-module");
|
|
137
137
|
o(t).toBeInTheDocument();
|
|
138
138
|
}), r("should use null customClicksHandler by default", () => {
|
|
139
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
139
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector("basic-grid-module");
|
|
140
140
|
o(t).toBeInTheDocument();
|
|
141
141
|
}), r("should use false for noAnimation by default", () => {
|
|
142
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
142
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector("basic-grid-module");
|
|
143
143
|
o(t).toHaveAttribute("first-entry");
|
|
144
144
|
});
|
|
145
145
|
}), c("Edge Cases", () => {
|
|
146
146
|
r("should handle undefined title", () => {
|
|
147
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
147
|
+
const { container: e } = i(/* @__PURE__ */ n(d, { title: void 0 })), t = e.querySelector("h2");
|
|
148
148
|
o(t).not.toBeInTheDocument();
|
|
149
149
|
}), r("should handle empty string title", () => {
|
|
150
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
150
|
+
const { container: e } = i(/* @__PURE__ */ n(d, { title: "" })), t = e.querySelector("h2");
|
|
151
151
|
o(t).not.toBeInTheDocument();
|
|
152
152
|
}), r("should handle null customClicksHandler", () => {
|
|
153
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
153
|
+
const { container: e } = i(/* @__PURE__ */ n(d, { customClicksHandler: null })), t = e.querySelector("basic-grid-module");
|
|
154
154
|
o(t).toBeInTheDocument();
|
|
155
155
|
}), r("should handle empty items array", () => {
|
|
156
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
156
|
+
const { container: e } = i(/* @__PURE__ */ n(d, { items: [] })), t = e.querySelector("basic-grid-module");
|
|
157
157
|
o(t).toBeInTheDocument();
|
|
158
158
|
}), r("should handle gap with different units", () => {
|
|
159
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
159
|
+
const { container: e } = i(/* @__PURE__ */ n(d, { gap: "20px" })), t = e.querySelector("basic-grid-module");
|
|
160
160
|
o(t).toBeInTheDocument();
|
|
161
161
|
}), r("should handle itemsPerRow of 1", () => {
|
|
162
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
162
|
+
const { container: e } = i(/* @__PURE__ */ n(d, { itemsPerRow: 1 })), t = e.querySelector("basic-grid-module");
|
|
163
163
|
o(t).toBeInTheDocument();
|
|
164
164
|
}), r("should handle itemsPerRow of large number", () => {
|
|
165
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
165
|
+
const { container: e } = i(/* @__PURE__ */ n(d, { itemsPerRow: 12 })), t = e.querySelector("basic-grid-module");
|
|
166
166
|
o(t).toBeInTheDocument();
|
|
167
167
|
});
|
|
168
168
|
}), c("Integration Tests", () => {
|
|
169
169
|
r("should render with multiple props combined", () => {
|
|
170
170
|
const { container: e } = i(
|
|
171
171
|
/* @__PURE__ */ n(
|
|
172
|
-
|
|
172
|
+
d,
|
|
173
173
|
{
|
|
174
174
|
classname: "custom-grid",
|
|
175
175
|
gap: "2rem",
|
|
@@ -181,11 +181,11 @@ c("BasicGridModule", () => {
|
|
|
181
181
|
);
|
|
182
182
|
o(l.getByText("My Grid")).toBeInTheDocument();
|
|
183
183
|
const t = e.querySelector("basic-grid-module");
|
|
184
|
-
o(t).toHaveAttribute("data-state", "
|
|
184
|
+
o(t).toHaveAttribute("data-state", "idle"), o(t).not.toHaveAttribute("first-entry");
|
|
185
185
|
}), r("should render without title and with animation", () => {
|
|
186
186
|
const { container: e } = i(
|
|
187
187
|
/* @__PURE__ */ n(
|
|
188
|
-
|
|
188
|
+
d,
|
|
189
189
|
{
|
|
190
190
|
classname: "no-title-grid",
|
|
191
191
|
noAnimation: !1
|
|
@@ -193,35 +193,45 @@ c("BasicGridModule", () => {
|
|
|
193
193
|
)
|
|
194
194
|
), t = e.querySelector("h2");
|
|
195
195
|
o(t).not.toBeInTheDocument();
|
|
196
|
-
const
|
|
197
|
-
o(
|
|
196
|
+
const s = e.querySelector("basic-grid-module");
|
|
197
|
+
o(s).toHaveAttribute("first-entry", "true");
|
|
198
198
|
}), r("should render with noAnimation true", () => {
|
|
199
199
|
const { container: e } = i(
|
|
200
|
-
/* @__PURE__ */ n(
|
|
200
|
+
/* @__PURE__ */ n(d, { noAnimation: !0 })
|
|
201
201
|
), t = e.querySelector("basic-grid-module");
|
|
202
202
|
o(t).not.toHaveAttribute("first-entry");
|
|
203
203
|
});
|
|
204
204
|
}), c("Conditional Rendering", () => {
|
|
205
205
|
r("should render grid when info panel is not open", () => {
|
|
206
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
206
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector("basic-grid-module");
|
|
207
207
|
o(t).toBeInTheDocument(), o(l.queryByTestId("info-panel")).not.toBeInTheDocument();
|
|
208
208
|
}), r("should render basic-grid-module element", () => {
|
|
209
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
209
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector("basic-grid-module");
|
|
210
210
|
o(t).toBeInTheDocument();
|
|
211
211
|
});
|
|
212
212
|
}), c("State Attributes", () => {
|
|
213
213
|
r("should set data-state attribute", () => {
|
|
214
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
214
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector("basic-grid-module");
|
|
215
215
|
o(t).toHaveAttribute("data-state");
|
|
216
216
|
}), r("should set data-state to entering initially", () => {
|
|
217
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
217
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector("basic-grid-module");
|
|
218
218
|
o(t).toHaveAttribute("data-state", "entering");
|
|
219
219
|
}), r("should handle first-entry attribute correctly with noAnimation false", () => {
|
|
220
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
221
|
-
o(t).toHaveAttribute("first-entry");
|
|
220
|
+
const { container: e } = i(/* @__PURE__ */ n(d, { noAnimation: !1 })), t = e.querySelector("basic-grid-module");
|
|
221
|
+
o(t).toHaveAttribute("first-entry", "true");
|
|
222
222
|
}), r("should not set first-entry attribute when noAnimation is true", () => {
|
|
223
|
-
const { container: e } = i(/* @__PURE__ */ n(
|
|
223
|
+
const { container: e } = i(/* @__PURE__ */ n(d, { noAnimation: !0 })), t = e.querySelector("basic-grid-module");
|
|
224
224
|
o(t).not.toHaveAttribute("first-entry");
|
|
225
|
+
}), r("should start in idle state when noAnimation is true", () => {
|
|
226
|
+
const { container: e } = i(/* @__PURE__ */ n(d, { noAnimation: !0 })), t = e.querySelector("basic-grid-module");
|
|
227
|
+
o(t).toHaveAttribute("data-state", "idle");
|
|
228
|
+
});
|
|
229
|
+
}), c("State Machine Guards", () => {
|
|
230
|
+
r("should not render info panel before an OPEN_REQUEST is dispatched", () => {
|
|
231
|
+
i(/* @__PURE__ */ n(d, {})), o(l.queryByTestId("info-panel")).not.toBeInTheDocument();
|
|
232
|
+
}), r("should keep grid visible while in entering phase", () => {
|
|
233
|
+
const { container: e } = i(/* @__PURE__ */ n(d, {})), t = e.querySelector("basic-grid-module");
|
|
234
|
+
o(t).toBeInTheDocument(), o(l.queryByTestId("info-panel")).not.toBeInTheDocument();
|
|
225
235
|
});
|
|
226
236
|
});
|
|
227
237
|
});
|
|
@@ -1,69 +1,69 @@
|
|
|
1
1
|
import { jsxs as _, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as g, useReducer as M, useRef as
|
|
3
|
-
import { f as
|
|
4
|
-
import { classes as
|
|
2
|
+
import { useState as g, useReducer as M, useRef as m, useCallback as S, useEffect as p } from "react";
|
|
3
|
+
import { f as l } from "../../format-YhWt2D8M.mjs";
|
|
4
|
+
import { classes as o } from "../../utils/helpers.js";
|
|
5
5
|
import { u as W } from "../../useScheduleContext-D7FdzNxe.mjs";
|
|
6
6
|
import { C as w } from "../../chevron-left-D0UjbrKw.mjs";
|
|
7
7
|
import { C as A } from "../../chevron-right-0ZF3LruR.mjs";
|
|
8
|
-
import '../../assets/DateNavigation.css';const
|
|
9
|
-
"date-navigation__list": "_date-
|
|
10
|
-
"date-navigation__control": "_date-
|
|
11
|
-
"date-navigation__control--previous": "_date-navigation__control--
|
|
12
|
-
"date-navigation__control--next": "_date-navigation__control--
|
|
13
|
-
"date-navigation__item": "_date-
|
|
14
|
-
"date-navigation__day": "_date-
|
|
15
|
-
"date-navigation__month-day-break": "_date-navigation__month-day-
|
|
16
|
-
"date-navigation__weekday": "_date-
|
|
17
|
-
"date-navigation__date": "_date-
|
|
8
|
+
import '../../assets/DateNavigation.css';const n = {
|
|
9
|
+
"date-navigation__list": "_date-navigation__list_12l5g_257",
|
|
10
|
+
"date-navigation__control": "_date-navigation__control_12l5g_302",
|
|
11
|
+
"date-navigation__control--previous": "_date-navigation__control--previous_12l5g_331",
|
|
12
|
+
"date-navigation__control--next": "_date-navigation__control--next_12l5g_336",
|
|
13
|
+
"date-navigation__item": "_date-navigation__item_12l5g_347",
|
|
14
|
+
"date-navigation__day": "_date-navigation__day_12l5g_362",
|
|
15
|
+
"date-navigation__month-day-break": "_date-navigation__month-day-break_12l5g_368",
|
|
16
|
+
"date-navigation__weekday": "_date-navigation__weekday_12l5g_372",
|
|
17
|
+
"date-navigation__date": "_date-navigation__date_12l5g_373"
|
|
18
18
|
};
|
|
19
|
-
function L(
|
|
19
|
+
function L(a, i) {
|
|
20
20
|
switch (i.type) {
|
|
21
21
|
case "NAVIGATE_TO_WEEK":
|
|
22
|
-
return i.targetWeekIndex > i.currentWeekIndex ? "advancing" : i.targetWeekIndex < i.currentWeekIndex ? "retracting" :
|
|
22
|
+
return i.targetWeekIndex > i.currentWeekIndex ? "advancing" : i.targetWeekIndex < i.currentWeekIndex ? "retracting" : a;
|
|
23
23
|
case "ANIMATION_COMPLETE":
|
|
24
24
|
return "idle";
|
|
25
25
|
default:
|
|
26
|
-
return
|
|
26
|
+
return a;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
function V() {
|
|
30
|
-
const { weeks:
|
|
31
|
-
|
|
30
|
+
const { weeks: a, setCurrentDate: i } = W(), [r, x] = g(0), [b, C] = g(a[0]), [s, y] = g(a[0][0]), [N, h] = M(L, "idle"), d = m(null), D = m(0), f = m(l(new Date(s.fullDateStr), "yyyy-MM-dd")), k = (t) => {
|
|
31
|
+
h({ type: "NAVIGATE_TO_WEEK", currentWeekIndex: r, targetWeekIndex: t }), x(t);
|
|
32
32
|
}, E = (t) => {
|
|
33
|
-
|
|
33
|
+
l(t.date, "yyyy-MM-dd") !== f.current && (f.current = l(t.date, "yyyy-MM-dd"), y(t), i(t.date));
|
|
34
34
|
}, c = S(() => {
|
|
35
35
|
if (d.current === null) return;
|
|
36
36
|
const t = d.current;
|
|
37
37
|
t.addEventListener("animationstart", () => {
|
|
38
38
|
t.addEventListener("animationend", c, { once: !0 });
|
|
39
|
-
}),
|
|
39
|
+
}), h({ type: "ANIMATION_COMPLETE" });
|
|
40
40
|
}, []);
|
|
41
41
|
return p(() => {
|
|
42
42
|
d.current !== null && (d.current.removeEventListener("animationend", c), d.current.addEventListener("animationend", c, { once: !0 }));
|
|
43
43
|
}, [c]), p(() => {
|
|
44
|
-
C(
|
|
45
|
-
const t =
|
|
46
|
-
(v) =>
|
|
44
|
+
C(a[r]);
|
|
45
|
+
const t = r ? 0 : 1, I = l(s.date, "yyyy-MM-dd"), u = a[t].findIndex(
|
|
46
|
+
(v) => l(v.date, "yyyy-MM-dd") === I
|
|
47
47
|
);
|
|
48
|
-
if (u !== -1 &&
|
|
49
|
-
const v =
|
|
50
|
-
D.current = u,
|
|
48
|
+
if (u !== -1 && a[r][u]) {
|
|
49
|
+
const v = a[r][u];
|
|
50
|
+
D.current = u, y(v), i(v.date);
|
|
51
51
|
}
|
|
52
|
-
}, [
|
|
52
|
+
}, [r, a, i, s]), /* @__PURE__ */ _("date-navigation", { "data-state": N, children: [
|
|
53
53
|
/* @__PURE__ */ _("date-navigation-controls", { children: [
|
|
54
54
|
/* @__PURE__ */ _(
|
|
55
55
|
"button",
|
|
56
56
|
{
|
|
57
|
-
className:
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
className: o([
|
|
58
|
+
n["date-navigation__control"],
|
|
59
|
+
n["date-navigation__control--previous"],
|
|
60
60
|
"date-navigation__control",
|
|
61
61
|
"date-navigation__control--previous"
|
|
62
62
|
]),
|
|
63
|
-
disabled:
|
|
63
|
+
disabled: r === 0 ? !0 : void 0,
|
|
64
64
|
type: "button",
|
|
65
65
|
onClick: () => {
|
|
66
|
-
|
|
66
|
+
k(0);
|
|
67
67
|
},
|
|
68
68
|
children: [
|
|
69
69
|
/* @__PURE__ */ e("i", { "aria-hidden": "true", children: /* @__PURE__ */ e(w, { height: 48, width: 48 }) }),
|
|
@@ -74,16 +74,16 @@ function V() {
|
|
|
74
74
|
/* @__PURE__ */ _(
|
|
75
75
|
"button",
|
|
76
76
|
{
|
|
77
|
-
className:
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
className: o([
|
|
78
|
+
n["date-navigation__control"],
|
|
79
|
+
n["date-navigation__control--next"],
|
|
80
80
|
"date-navigation__control",
|
|
81
81
|
"date-navigation__control--next"
|
|
82
82
|
]),
|
|
83
|
-
disabled:
|
|
83
|
+
disabled: r === 1 ? !0 : void 0,
|
|
84
84
|
type: "button",
|
|
85
85
|
onClick: () => {
|
|
86
|
-
|
|
86
|
+
k(1);
|
|
87
87
|
},
|
|
88
88
|
children: [
|
|
89
89
|
/* @__PURE__ */ e("i", { "aria-hidden": "true", children: /* @__PURE__ */ e(A, { height: 48, width: 48 }) }),
|
|
@@ -96,20 +96,20 @@ function V() {
|
|
|
96
96
|
"ul",
|
|
97
97
|
{
|
|
98
98
|
"aria-label": "Date Tabs",
|
|
99
|
-
className:
|
|
99
|
+
className: o([n["date-navigation__list"], "date-navigation__list"]),
|
|
100
100
|
ref: d,
|
|
101
101
|
role: "tablist",
|
|
102
102
|
children: b.map((t) => /* @__PURE__ */ e(
|
|
103
103
|
"li",
|
|
104
104
|
{
|
|
105
|
-
className: [
|
|
105
|
+
className: [n["date-navigation__item"], "date-navigation__item"].join(" "),
|
|
106
106
|
role: "presentation",
|
|
107
107
|
children: /* @__PURE__ */ _(
|
|
108
108
|
"button",
|
|
109
109
|
{
|
|
110
110
|
"aria-controls": `${t.fullDateStr}`,
|
|
111
|
-
"aria-selected":
|
|
112
|
-
className:
|
|
111
|
+
"aria-selected": s.fullDateStr === t.fullDateStr,
|
|
112
|
+
className: o([n["date-navigation__day"], "date-navigation__day"]),
|
|
113
113
|
role: "tab",
|
|
114
114
|
type: "button",
|
|
115
115
|
onClick: () => {
|
|
@@ -119,22 +119,22 @@ function V() {
|
|
|
119
119
|
/* @__PURE__ */ e(
|
|
120
120
|
"div",
|
|
121
121
|
{
|
|
122
|
-
className:
|
|
122
|
+
className: o([n["date-navigation__weekday"], "date-navigation__weekday"]),
|
|
123
123
|
children: t.dayStr
|
|
124
124
|
}
|
|
125
125
|
),
|
|
126
126
|
/* @__PURE__ */ _(
|
|
127
127
|
"div",
|
|
128
128
|
{
|
|
129
|
-
className:
|
|
129
|
+
className: o([n["date-navigation__date"], "date-navigation__date"]),
|
|
130
130
|
children: [
|
|
131
131
|
t.monthStr,
|
|
132
132
|
" ",
|
|
133
133
|
/* @__PURE__ */ e(
|
|
134
134
|
"br",
|
|
135
135
|
{
|
|
136
|
-
className:
|
|
137
|
-
|
|
136
|
+
className: o([
|
|
137
|
+
n["date-navigation__month-day-break"],
|
|
138
138
|
"date-navigation__month-day-break"
|
|
139
139
|
])
|
|
140
140
|
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { jsxs as o, Fragment as v, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { classes as
|
|
2
|
+
import { useState as h, useCallback as x, useEffect as A } from "react";
|
|
3
|
+
import { classes as d } from "../../utils/helpers.js";
|
|
4
4
|
import { NavList as S } from "../NavList/NavList.js";
|
|
5
5
|
import { LogoNavigation as j } from "../LogoNavigation/LogoNavigation.js";
|
|
6
6
|
import { ImageReplacementAnchor as E } from "../ImageReplacementAnchor/ImageReplacementAnchor.js";
|
|
7
7
|
import { Overlay as L } from "../Overlay/Overlay.js";
|
|
8
8
|
import '../../assets/DrawerNavigation.css';const n = {
|
|
9
|
-
"drawer-navigation__nav-bar": "_drawer-navigation__nav-
|
|
10
|
-
"with-logo": "_with-
|
|
11
|
-
"drawer-navigation__menu-toggle": "_drawer-navigation__menu-
|
|
12
|
-
"drawer-navigation__hamburger": "_drawer-
|
|
13
|
-
"drawer-navigation__primary-navigation": "_drawer-navigation__primary-
|
|
14
|
-
"drawer-navigation__separator": "_drawer-
|
|
15
|
-
"visually-hidden": "_visually-
|
|
9
|
+
"drawer-navigation__nav-bar": "_drawer-navigation__nav-bar_am8nh_257",
|
|
10
|
+
"with-logo": "_with-logo_am8nh_267",
|
|
11
|
+
"drawer-navigation__menu-toggle": "_drawer-navigation__menu-toggle_am8nh_271",
|
|
12
|
+
"drawer-navigation__hamburger": "_drawer-navigation__hamburger_am8nh_278",
|
|
13
|
+
"drawer-navigation__primary-navigation": "_drawer-navigation__primary-navigation_am8nh_310",
|
|
14
|
+
"drawer-navigation__separator": "_drawer-navigation__separator_am8nh_342",
|
|
15
|
+
"visually-hidden": "_visually-hidden_am8nh_353"
|
|
16
16
|
};
|
|
17
17
|
function k({
|
|
18
18
|
links: g = [],
|
|
19
|
-
items:
|
|
19
|
+
items: m = [],
|
|
20
20
|
classname: u = "",
|
|
21
21
|
logo: r = {},
|
|
22
|
-
clipPathStart:
|
|
22
|
+
clipPathStart: p = "circle(0% at top right)",
|
|
23
23
|
clipPathEnd: w = "circle(250% at top right)",
|
|
24
|
-
overlayAppendEl:
|
|
24
|
+
overlayAppendEl: y = document.querySelector("#root")
|
|
25
25
|
}) {
|
|
26
|
-
const [a,
|
|
27
|
-
|
|
26
|
+
const [a, f] = h(!1), [s, l] = h(null), _ = document.querySelector("body"), t = x(() => {
|
|
27
|
+
f((N) => {
|
|
28
28
|
const c = !N;
|
|
29
29
|
if (c)
|
|
30
30
|
_.style.overflowY = "hidden";
|
|
@@ -35,9 +35,9 @@ function k({
|
|
|
35
35
|
}, 400);
|
|
36
36
|
}
|
|
37
37
|
return c;
|
|
38
|
-
}),
|
|
39
|
-
}, [_]),
|
|
40
|
-
a ||
|
|
38
|
+
}), l("closing");
|
|
39
|
+
}, [_]), b = () => {
|
|
40
|
+
a || l(null);
|
|
41
41
|
};
|
|
42
42
|
return A(() => (document.addEventListener("scripps:overlay:closed", t), () => {
|
|
43
43
|
document.removeEventListener("scripps:overlay:closed", t);
|
|
@@ -46,11 +46,11 @@ function k({
|
|
|
46
46
|
/* @__PURE__ */ o(
|
|
47
47
|
"div",
|
|
48
48
|
{
|
|
49
|
-
className:
|
|
49
|
+
className: d([
|
|
50
50
|
n["drawer-navigation__nav-bar"],
|
|
51
51
|
"drawer-navigation__nav-bar",
|
|
52
52
|
r.image && n["with-logo"],
|
|
53
|
-
`drawer-navigation__nav-bar--${a ? "expanded" :
|
|
53
|
+
`drawer-navigation__nav-bar--${a ? "expanded" : s ? "closing" : "closed"}`
|
|
54
54
|
]),
|
|
55
55
|
children: [
|
|
56
56
|
r.image && /* @__PURE__ */ e(
|
|
@@ -67,7 +67,7 @@ function k({
|
|
|
67
67
|
{
|
|
68
68
|
"aria-controls": "drawer-navigation__primary-navigation",
|
|
69
69
|
"aria-expanded": a,
|
|
70
|
-
className:
|
|
70
|
+
className: d([
|
|
71
71
|
n["drawer-navigation__menu-toggle"],
|
|
72
72
|
"drawer-navigation__menu-toggle"
|
|
73
73
|
]),
|
|
@@ -78,7 +78,7 @@ function k({
|
|
|
78
78
|
"div",
|
|
79
79
|
{
|
|
80
80
|
"aria-hidden": "true",
|
|
81
|
-
className:
|
|
81
|
+
className: d([
|
|
82
82
|
n["drawer-navigation__hamburger"],
|
|
83
83
|
"drawer-navigation__hamburger"
|
|
84
84
|
])
|
|
@@ -93,17 +93,17 @@ function k({
|
|
|
93
93
|
/* @__PURE__ */ o(
|
|
94
94
|
"div",
|
|
95
95
|
{
|
|
96
|
-
className:
|
|
96
|
+
className: d([
|
|
97
97
|
n["drawer-navigation__primary-navigation"],
|
|
98
98
|
"drawer-navigation__primary-navigation"
|
|
99
99
|
]),
|
|
100
|
-
"data-state": a ? "opened" :
|
|
100
|
+
"data-state": a ? "opened" : s || "closed",
|
|
101
101
|
id: "drawer-navigation__primary-navigation",
|
|
102
102
|
style: {
|
|
103
|
-
"--clip-path-start":
|
|
103
|
+
"--clip-path-start": p,
|
|
104
104
|
"--clip-path-end": w
|
|
105
105
|
},
|
|
106
|
-
onAnimationEnd:
|
|
106
|
+
onAnimationEnd: b,
|
|
107
107
|
children: [
|
|
108
108
|
g.length > 0 && /* @__PURE__ */ e(
|
|
109
109
|
S,
|
|
@@ -113,17 +113,17 @@ function k({
|
|
|
113
113
|
toggleHandler: t
|
|
114
114
|
}
|
|
115
115
|
),
|
|
116
|
-
|
|
116
|
+
m.length > 0 && /* @__PURE__ */ o(v, { children: [
|
|
117
117
|
/* @__PURE__ */ e(
|
|
118
118
|
"hr",
|
|
119
119
|
{
|
|
120
|
-
className:
|
|
120
|
+
className: d([
|
|
121
121
|
n["drawer-navigation__separator"],
|
|
122
122
|
"drawer-navigation__separator"
|
|
123
123
|
])
|
|
124
124
|
}
|
|
125
125
|
),
|
|
126
|
-
/* @__PURE__ */ e(j, { items:
|
|
126
|
+
/* @__PURE__ */ e(j, { items: m })
|
|
127
127
|
] })
|
|
128
128
|
]
|
|
129
129
|
}
|
|
@@ -131,8 +131,8 @@ function k({
|
|
|
131
131
|
a && /* @__PURE__ */ e(
|
|
132
132
|
L,
|
|
133
133
|
{
|
|
134
|
-
appendToElement:
|
|
135
|
-
state:
|
|
134
|
+
appendToElement: y,
|
|
135
|
+
state: s === null && !a ? "exiting" : "entering"
|
|
136
136
|
}
|
|
137
137
|
)
|
|
138
138
|
] });
|