@access-ci/ui 0.19.0-beta1 → 0.19.0-beta3
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/access-ci-ui-react.js +15 -0
- package/dist/access-ci-ui-react.umd.cjs +343 -0
- package/dist/access-ci-ui.bundle.js +77 -176
- package/dist/access-ci-ui.js +1 -1
- package/dist/access-ci-ui.umd.cjs +75 -184
- package/dist/{access-qa-bot-Dssk1h8n.js → access-qa-bot-CHkBf16I.js} +107 -134
- package/dist/access-qa-bot-Q26EvzKe.js +14495 -0
- package/dist/icon-CMHOrCGv.js +7 -0
- package/dist/{icon-Uz-yb98F.js → icon-cJmGylOm.js} +1 -1
- package/dist/index-CrKdAxQz.js +8257 -0
- package/dist/resource-group-detail-Dr7EYmvH.js +12555 -0
- package/dist/{resource-group-detail-CF426-zm.js → resource-group-detail-Dxt8iVRs.js} +476 -497
- package/dist/resource-home-Cf5k64F0.js +275 -0
- package/dist/{resource-home-DA_ihS4S.js → resource-home-ChfTC5Qa.js} +2 -2
- package/dist/shadow-CGn1GiHs.js +2644 -0
- package/package.json +11 -5
- package/dist/index-D1YYhxC0.js +0 -10830
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { jsx as e, jsxs as a, Fragment as f } from "react/jsx-runtime";
|
|
2
|
+
import { useState as g, useRef as b, useEffect as w, useMemo as y } from "react";
|
|
3
|
+
import { f as S, g as k, B as I } from "./shadow-CGn1GiHs.js";
|
|
4
|
+
import { I as h } from "./icon-CMHOrCGv.js";
|
|
5
|
+
const R = {
|
|
6
|
+
"ACCESS Pegasus": "https://pegasus.isi.edu/wordpress/wp-content/uploads/2016/01/favicon.ico",
|
|
7
|
+
"ACCESS OnDemand": "https://openondemand.org/themes/fire/theme/assets/media/favicons/favicon.ico",
|
|
8
|
+
"Advance reservations": "calendar-check",
|
|
9
|
+
"Composable hardware fabric": "boxes",
|
|
10
|
+
"Compute Resources": "cpu-fill",
|
|
11
|
+
"CPU Compute": "cpu-fill",
|
|
12
|
+
"GPU Compute": "cpu",
|
|
13
|
+
"Innovative / Novel Compute": "lightbulb",
|
|
14
|
+
"Large Memory Nodes": "arrows-fullscreen",
|
|
15
|
+
Preemption: "clock-history",
|
|
16
|
+
"Science Gateway support": "globe",
|
|
17
|
+
"Service / Other": "stars",
|
|
18
|
+
"Storage Resources": "hdd-fill",
|
|
19
|
+
"Virtual Machines": "pc-display-horizontal",
|
|
20
|
+
Cloud: "cloud",
|
|
21
|
+
Storage: "hdd-fill"
|
|
22
|
+
};
|
|
23
|
+
function v({ active: t, tagCategory: c, tagId: i, iconUri: o, name: n, toggleTag: s }) {
|
|
24
|
+
const l = o || R[n] || "tag";
|
|
25
|
+
return /* @__PURE__ */ e(
|
|
26
|
+
"li",
|
|
27
|
+
{
|
|
28
|
+
className: `tag tag-category-${c.name.toLowerCase().replace(/[^a-z]+/g, "-")}${t.tagIds.has(i) ? " active" : ""}`,
|
|
29
|
+
children: /* @__PURE__ */ a(
|
|
30
|
+
"button",
|
|
31
|
+
{
|
|
32
|
+
href: "#",
|
|
33
|
+
disabled: t.disabledTagIds.has(i),
|
|
34
|
+
onClick: (r) => {
|
|
35
|
+
r.preventDefault(), s(i);
|
|
36
|
+
},
|
|
37
|
+
children: [
|
|
38
|
+
l.startsWith("http") ? /* @__PURE__ */ e(h, { alt: n, src: l }) : /* @__PURE__ */ e(h, { name: l }),
|
|
39
|
+
n
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
function C({ children: t }) {
|
|
47
|
+
return /* @__PURE__ */ e("ul", { className: "tags", children: t });
|
|
48
|
+
}
|
|
49
|
+
function A({
|
|
50
|
+
active: t,
|
|
51
|
+
baseUri: c,
|
|
52
|
+
description: i,
|
|
53
|
+
imageType: o,
|
|
54
|
+
imageUri: n,
|
|
55
|
+
name: s,
|
|
56
|
+
infoGroupId: l,
|
|
57
|
+
parentInfoGroupId: r,
|
|
58
|
+
tags: d,
|
|
59
|
+
toggleTag: p
|
|
60
|
+
}) {
|
|
61
|
+
const m = `${c}/${r || l}`;
|
|
62
|
+
return /* @__PURE__ */ a("div", { className: "resource-group", children: [
|
|
63
|
+
/* @__PURE__ */ e(
|
|
64
|
+
"a",
|
|
65
|
+
{
|
|
66
|
+
className: `resource-group-image image-type-${o}`,
|
|
67
|
+
href: m,
|
|
68
|
+
children: n ? /* @__PURE__ */ e("img", { src: n }) : /* @__PURE__ */ e(h, { name: "motherboard" })
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
/* @__PURE__ */ a("div", { className: "resource-group-text", children: [
|
|
72
|
+
/* @__PURE__ */ e("h3", { children: /* @__PURE__ */ e("a", { href: m, children: s }) }),
|
|
73
|
+
/* @__PURE__ */ e(C, { children: d.map((u) => /* @__PURE__ */ e(
|
|
74
|
+
v,
|
|
75
|
+
{
|
|
76
|
+
...u,
|
|
77
|
+
active: t,
|
|
78
|
+
toggleTag: p
|
|
79
|
+
},
|
|
80
|
+
u.tagId
|
|
81
|
+
)) }),
|
|
82
|
+
/* @__PURE__ */ a("p", { children: [
|
|
83
|
+
i && i,
|
|
84
|
+
/* @__PURE__ */ e("br", {}),
|
|
85
|
+
/* @__PURE__ */ a("a", { href: m, children: [
|
|
86
|
+
"Learn more about ",
|
|
87
|
+
s,
|
|
88
|
+
" »"
|
|
89
|
+
] })
|
|
90
|
+
] })
|
|
91
|
+
] })
|
|
92
|
+
] });
|
|
93
|
+
}
|
|
94
|
+
function x({
|
|
95
|
+
active: t,
|
|
96
|
+
baseUri: c,
|
|
97
|
+
name: i,
|
|
98
|
+
resourceGroups: o,
|
|
99
|
+
toggleTag: n
|
|
100
|
+
}) {
|
|
101
|
+
return /* @__PURE__ */ a(f, { children: [
|
|
102
|
+
/* @__PURE__ */ e("h2", { children: i }),
|
|
103
|
+
o.filter(({ infoGroupId: s }) => t.infoGroupIds.has(s)).map((s) => /* @__PURE__ */ e(
|
|
104
|
+
A,
|
|
105
|
+
{
|
|
106
|
+
...s,
|
|
107
|
+
baseUri: c,
|
|
108
|
+
active: t,
|
|
109
|
+
toggleTag: n
|
|
110
|
+
},
|
|
111
|
+
s.infoGroupId
|
|
112
|
+
))
|
|
113
|
+
] });
|
|
114
|
+
}
|
|
115
|
+
function E({
|
|
116
|
+
active: t,
|
|
117
|
+
clearTags: c,
|
|
118
|
+
tagCategories: i,
|
|
119
|
+
toggleTag: o
|
|
120
|
+
}) {
|
|
121
|
+
const [n, s] = g(!1), l = b(null);
|
|
122
|
+
return w(() => {
|
|
123
|
+
const r = () => s(!1);
|
|
124
|
+
return document.body.addEventListener("click", r), () => document.body.removeEventListener("click", r);
|
|
125
|
+
}, []), /* @__PURE__ */ a(
|
|
126
|
+
"section",
|
|
127
|
+
{
|
|
128
|
+
className: "filters-outer",
|
|
129
|
+
onClick: (r) => {
|
|
130
|
+
r.stopPropagation();
|
|
131
|
+
},
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ a(
|
|
134
|
+
"button",
|
|
135
|
+
{
|
|
136
|
+
ref: l,
|
|
137
|
+
onClick: () => s(!n),
|
|
138
|
+
className: `btn-filters btn ${n ? "active" : ""}`,
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ e(h, { name: "filter" }),
|
|
141
|
+
" Filters",
|
|
142
|
+
t.tagIds.size > 0 ? /* @__PURE__ */ e("span", { className: "active-tag-count", children: t.tagIds.size }) : null
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
n ? /* @__PURE__ */ a("div", { className: "filters-inner", children: [
|
|
147
|
+
i.map((r) => /* @__PURE__ */ a(f, { children: [
|
|
148
|
+
/* @__PURE__ */ e("h2", { children: r.name }),
|
|
149
|
+
/* @__PURE__ */ e(C, { children: r.tags.map((d) => /* @__PURE__ */ e(v, { ...d, active: t, toggleTag: o })) })
|
|
150
|
+
] })),
|
|
151
|
+
/* @__PURE__ */ a(
|
|
152
|
+
"button",
|
|
153
|
+
{
|
|
154
|
+
onClick: c,
|
|
155
|
+
disabled: t.tagIds.size == 0,
|
|
156
|
+
className: "btn danger",
|
|
157
|
+
children: [
|
|
158
|
+
/* @__PURE__ */ e(h, { name: "trash" }),
|
|
159
|
+
" Clear Filters"
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
] }) : null
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
function G({ setBotOpen: t }) {
|
|
169
|
+
const c = b(null);
|
|
170
|
+
return /* @__PURE__ */ a("section", { id: "resource-pathways", ref: c, children: [
|
|
171
|
+
/* @__PURE__ */ a("p", { className: "intro", children: [
|
|
172
|
+
"ACCESS provides advanced computing resources ",
|
|
173
|
+
/* @__PURE__ */ e("strong", { children: "at no cost" }),
|
|
174
|
+
" ",
|
|
175
|
+
"to researchers and educators."
|
|
176
|
+
] }),
|
|
177
|
+
/* @__PURE__ */ e("ul", { className: "resource-pathways", children: [
|
|
178
|
+
{
|
|
179
|
+
title: "Browse resources",
|
|
180
|
+
icon: "filter-square",
|
|
181
|
+
description: "Filter resources to find the best match for your research.",
|
|
182
|
+
onClick: (o) => {
|
|
183
|
+
o.preventDefault(), c.current && c.current.nextSibling.scrollIntoView({ bahavior: "smooth" });
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
title: "Ask a question",
|
|
188
|
+
icon: "question-circle",
|
|
189
|
+
onClick: (o) => {
|
|
190
|
+
o.preventDefault(), t(!0);
|
|
191
|
+
},
|
|
192
|
+
description: "You have resource questions. Our Q&A bot has answers!",
|
|
193
|
+
login: !0
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
title: "Get suggestions",
|
|
197
|
+
icon: "card-checklist",
|
|
198
|
+
href: "https://ara.access-ci.org/",
|
|
199
|
+
description: "Fill out a form to get resource recommendations."
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
title: "Read news",
|
|
203
|
+
icon: "newspaper",
|
|
204
|
+
href: "https://access-ci.org/tag/resource-providers/",
|
|
205
|
+
description: "See the latest news from resource providers."
|
|
206
|
+
}
|
|
207
|
+
].map(
|
|
208
|
+
({ title: o, icon: n, href: s, description: l, login: r, onClick: d }, p) => /* @__PURE__ */ e("li", { className: `resource-pathway-${p}`, children: /* @__PURE__ */ a("a", { href: s || "#", onClick: d, children: [
|
|
209
|
+
n ? /* @__PURE__ */ e(h, { name: n }) : null,
|
|
210
|
+
" ",
|
|
211
|
+
/* @__PURE__ */ a("span", { className: "detail", children: [
|
|
212
|
+
/* @__PURE__ */ e("span", { className: "title", children: o }),
|
|
213
|
+
/* @__PURE__ */ e("span", { className: "description", children: l }),
|
|
214
|
+
r ? /* @__PURE__ */ a("span", { className: "login", children: [
|
|
215
|
+
/* @__PURE__ */ e(h, { name: "key" }),
|
|
216
|
+
" Requires ACCESS Login"
|
|
217
|
+
] }) : null
|
|
218
|
+
] })
|
|
219
|
+
] }) }, o)
|
|
220
|
+
) })
|
|
221
|
+
] });
|
|
222
|
+
}
|
|
223
|
+
function P({
|
|
224
|
+
baseUri: t,
|
|
225
|
+
title: c,
|
|
226
|
+
setBotOpen: i,
|
|
227
|
+
showBreadcrumbs: o = !0,
|
|
228
|
+
showTitle: n = !0
|
|
229
|
+
}) {
|
|
230
|
+
const [s, l] = g([]), r = S(), d = y(
|
|
231
|
+
() => r ? k(r, s) : null,
|
|
232
|
+
[r, s]
|
|
233
|
+
), p = (u) => l(
|
|
234
|
+
s.includes(u) ? s.filter((N) => N != u) : [...s, u]
|
|
235
|
+
), m = () => l([]);
|
|
236
|
+
return /* @__PURE__ */ a(f, { children: [
|
|
237
|
+
o && /* @__PURE__ */ e(
|
|
238
|
+
I,
|
|
239
|
+
{
|
|
240
|
+
expandWidth: !0,
|
|
241
|
+
items: [{ name: "Resources" }],
|
|
242
|
+
topBorder: !0
|
|
243
|
+
}
|
|
244
|
+
),
|
|
245
|
+
c && /* @__PURE__ */ e("h1", { className: n ? "" : "visually-hidden", children: c }),
|
|
246
|
+
/* @__PURE__ */ e(G, { setBotOpen: i }),
|
|
247
|
+
/* @__PURE__ */ a("div", { id: "browse-resources", children: [
|
|
248
|
+
d ? /* @__PURE__ */ e(
|
|
249
|
+
E,
|
|
250
|
+
{
|
|
251
|
+
tagCategories: r.tagCategories,
|
|
252
|
+
active: d,
|
|
253
|
+
clearTags: m,
|
|
254
|
+
toggleTag: p
|
|
255
|
+
}
|
|
256
|
+
) : null,
|
|
257
|
+
r ? r.resourceCategories.filter(
|
|
258
|
+
({ resourceCategoryId: u }) => d.resourceCategoryIds.has(u)
|
|
259
|
+
).map((u) => /* @__PURE__ */ e(
|
|
260
|
+
x,
|
|
261
|
+
{
|
|
262
|
+
...u,
|
|
263
|
+
active: d,
|
|
264
|
+
baseUri: t,
|
|
265
|
+
clearTags: m,
|
|
266
|
+
toggleTag: p
|
|
267
|
+
},
|
|
268
|
+
u.name
|
|
269
|
+
)) : null
|
|
270
|
+
] })
|
|
271
|
+
] });
|
|
272
|
+
}
|
|
273
|
+
export {
|
|
274
|
+
P as default
|
|
275
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as e, r as m, f as j, g as b, B as v } from "./index-
|
|
2
|
-
import { I as d } from "./icon-
|
|
1
|
+
import { j as e, r as m, f as j, g as b, B as v } from "./index-CrKdAxQz.js";
|
|
2
|
+
import { I as d } from "./icon-cJmGylOm.js";
|
|
3
3
|
const C = {
|
|
4
4
|
"ACCESS Pegasus": "https://pegasus.isi.edu/wordpress/wp-content/uploads/2016/01/favicon.ico",
|
|
5
5
|
"ACCESS OnDemand": "https://openondemand.org/themes/fire/theme/assets/media/favicons/favicon.ico",
|