@nanoporetech-digital/components 4.1.0 → 4.3.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/CHANGELOG.md +37 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{local-my-account-a3362993.js → local-my-account-d79ed0a2.js} +1 -1
- package/dist/cjs/{local-my-account-a3362993.js.map → local-my-account-d79ed0a2.js.map} +1 -1
- package/dist/cjs/nano-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/nano-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-components.cjs.js +1 -1
- package/dist/cjs/nano-demo.cjs.entry.js +48 -47
- package/dist/cjs/nano-demo.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-details.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-global-nav.cjs.entry.js +20 -7
- package/dist/cjs/nano-global-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-overflow-nav.cjs.entry.js +4 -3
- package/dist/cjs/nano-overflow-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/{nano-table-c5b6630a.js → nano-table-71a8a462.js} +2 -2
- package/dist/cjs/nano-table-71a8a462.js.map +1 -0
- package/dist/cjs/nano-table.cjs.entry.js +1 -1
- package/dist/cjs/{table.worker-0876611d.js → table.worker-2d617318.js} +2 -2
- package/dist/cjs/table.worker-2d617318.js.map +1 -0
- package/dist/collection/components/checkbox/checkbox.css +18 -12
- package/dist/collection/components/demo/demo.js +48 -47
- package/dist/collection/components/demo/demo.js.map +1 -1
- package/dist/collection/components/details/details.js +1 -0
- package/dist/collection/components/details/details.js.map +1 -1
- package/dist/collection/components/global-nav/assets/local-my-account.json +341 -0
- package/dist/collection/components/global-nav/global-nav.js +51 -6
- package/dist/collection/components/global-nav/global-nav.js.map +1 -1
- package/dist/collection/components/global-nav/style/global-nav.css +2 -1
- package/dist/collection/components/overflow-nav/overflow-nav.css +9 -9
- package/dist/collection/components/overflow-nav/overflow-nav.js +4 -3
- package/dist/collection/components/overflow-nav/overflow-nav.js.map +1 -1
- package/dist/collection/components/table/table-interface.js.map +1 -1
- package/dist/collection/components/table/table.js +8 -4
- package/dist/collection/components/table/table.js.map +1 -1
- package/dist/components/nano-checkbox.js +1 -1
- package/dist/components/nano-checkbox.js.map +1 -1
- package/dist/components/nano-demo.js +48 -47
- package/dist/components/nano-demo.js.map +1 -1
- package/dist/components/nano-details.js.map +1 -1
- package/dist/components/nano-global-nav.js +21 -7
- package/dist/components/nano-global-nav.js.map +1 -1
- package/dist/components/nano-overflow-nav.js +4 -3
- package/dist/components/nano-overflow-nav.js.map +1 -1
- package/dist/components/table.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{local-my-account-964c8ad7.js → local-my-account-6662da72.js} +1 -1
- package/dist/esm/{local-my-account-964c8ad7.js.map → local-my-account-6662da72.js.map} +1 -1
- package/dist/esm/nano-checkbox.entry.js +1 -1
- package/dist/esm/nano-checkbox.entry.js.map +1 -1
- package/dist/esm/nano-components.js +1 -1
- package/dist/esm/nano-demo.entry.js +48 -47
- package/dist/esm/nano-demo.entry.js.map +1 -1
- package/dist/esm/nano-details.entry.js.map +1 -1
- package/dist/esm/nano-global-nav.entry.js +20 -7
- package/dist/esm/nano-global-nav.entry.js.map +1 -1
- package/dist/esm/nano-overflow-nav.entry.js +4 -3
- package/dist/esm/nano-overflow-nav.entry.js.map +1 -1
- package/dist/esm/{nano-table-ff985e63.js → nano-table-d4b1d315.js} +2 -2
- package/dist/esm/nano-table-d4b1d315.js.map +1 -0
- package/dist/esm/nano-table.entry.js +1 -1
- package/dist/esm/{table.worker-906bc297.js → table.worker-ebfd9cd4.js} +2 -2
- package/dist/esm/table.worker-ebfd9cd4.js.map +1 -0
- package/dist/nano-assets/hash.txt +1 -1
- package/dist/nano-assets/local-my-account.json +341 -0
- package/dist/nano-components/assets/local-my-account.json +341 -0
- package/dist/nano-components/assets/ont-logo.svg +89 -0
- package/dist/nano-components/assets/ont-wheel-light.svg +31 -0
- package/dist/nano-components/nano-components.esm.js +1 -1
- package/dist/nano-components/nano-components.esm.js.map +1 -1
- package/dist/nano-components/p-0038620d.js +5 -0
- package/dist/nano-components/{p-c53b232e.js → p-2155fc2c.js} +1 -1
- package/dist/nano-components/p-55d71567.entry.js +5 -0
- package/dist/nano-components/{p-d0e15e46.entry.js.map → p-55d71567.entry.js.map} +1 -1
- package/dist/nano-components/p-62052277.entry.js +5 -0
- package/dist/nano-components/p-62052277.entry.js.map +1 -0
- package/dist/nano-components/p-76a650b1.entry.js.map +1 -1
- package/dist/nano-components/{p-f93bd976.entry.js → p-b38cabe2.entry.js} +2 -2
- package/dist/nano-components/p-b38cabe2.entry.js.map +1 -0
- package/dist/nano-components/{p-c38a246f.entry.js → p-c32fbbf0.entry.js} +2 -2
- package/dist/nano-components/p-dc8fd62d.entry.js +5 -0
- package/dist/nano-components/p-dc8fd62d.entry.js.map +1 -0
- package/dist/nano-components/{p-13dd65c9.js → p-f5b6ccdb.js} +2 -2
- package/dist/nano-components/{p-13dd65c9.js.map → p-f5b6ccdb.js.map} +1 -1
- package/dist/types/components/demo/demo.d.ts +1 -0
- package/dist/types/components/details/details.d.ts +1 -0
- package/dist/types/components/global-nav/global-nav.d.ts +12 -0
- package/dist/types/components/table/table-interface.d.ts +5 -2
- package/dist/types/components/table/table.d.ts +1 -1
- package/dist/types/components.d.ts +7 -2
- package/docs-json.json +102 -27
- package/hydrate/index.js +82 -58
- package/package.json +2 -2
- package/dist/cjs/nano-table-c5b6630a.js.map +0 -1
- package/dist/cjs/table.worker-0876611d.js.map +0 -1
- package/dist/esm/nano-table-ff985e63.js.map +0 -1
- package/dist/esm/table.worker-906bc297.js.map +0 -1
- package/dist/nano-components/p-4b136a65.js +0 -5
- package/dist/nano-components/p-583d8d70.entry.js +0 -5
- package/dist/nano-components/p-583d8d70.entry.js.map +0 -1
- package/dist/nano-components/p-d0e15e46.entry.js +0 -5
- package/dist/nano-components/p-f2d89239.entry.js +0 -5
- package/dist/nano-components/p-f2d89239.entry.js.map +0 -1
- package/dist/nano-components/p-f93bd976.entry.js.map +0 -1
- /package/dist/nano-components/{p-4b136a65.js.map → p-0038620d.js.map} +0 -0
- /package/dist/nano-components/{p-c38a246f.entry.js.map → p-2155fc2c.js.map} +0 -0
- /package/dist/nano-components/{p-c53b232e.js.map → p-c32fbbf0.entry.js.map} +0 -0
@@ -0,0 +1,341 @@
|
|
1
|
+
{
|
2
|
+
"user": {
|
3
|
+
"id": "mr.test",
|
4
|
+
"uuid": "2589690E-A907-50BB-9551-55E18ABB1273",
|
5
|
+
"name": "Logged in user",
|
6
|
+
"first_name": "mr",
|
7
|
+
"last_name": "test",
|
8
|
+
"email": "mr.test@nanoporetech.com",
|
9
|
+
"job_title": "CEO",
|
10
|
+
"company": "ONT",
|
11
|
+
"small_avatar_url": "https://picsum.photos/75",
|
12
|
+
"is_nanopore_user": false,
|
13
|
+
"lifecycle_stage": "Lead",
|
14
|
+
"indirect_customer": false,
|
15
|
+
"registration": {
|
16
|
+
"next_url": null
|
17
|
+
}
|
18
|
+
},
|
19
|
+
"domains": [
|
20
|
+
{
|
21
|
+
"origin": "cws",
|
22
|
+
"domain": "nanoporetech.com"
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"origin": "store",
|
26
|
+
"domain": "store.nanoporetech.com"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"origin": "community",
|
30
|
+
"domain": "community.nanoporetech.com"
|
31
|
+
}
|
32
|
+
],
|
33
|
+
"cart": {
|
34
|
+
"count": 0,
|
35
|
+
"url": "https://shop-test.nanoporetech.com/checkout/cart"
|
36
|
+
},
|
37
|
+
"notifications": {
|
38
|
+
"count": 0
|
39
|
+
},
|
40
|
+
"links": [
|
41
|
+
{
|
42
|
+
"id": 1,
|
43
|
+
"area": "main",
|
44
|
+
"address": "#",
|
45
|
+
"title": "Trousers",
|
46
|
+
"order": 1,
|
47
|
+
"target": null
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"id": 2,
|
51
|
+
"area": "logged-out",
|
52
|
+
"address": "#",
|
53
|
+
"title": "Mouse",
|
54
|
+
"order": 1,
|
55
|
+
"target": null
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"id": 20,
|
59
|
+
"area": "profile-panel-block",
|
60
|
+
"address": "https://nanoporetech.com/about-us/news",
|
61
|
+
"title": "News",
|
62
|
+
"order": 3,
|
63
|
+
"target": ""
|
64
|
+
},
|
65
|
+
{
|
66
|
+
"id": 21,
|
67
|
+
"area": "profile-panel-block",
|
68
|
+
"address": "https://nanoporetech.com/about-us",
|
69
|
+
"title": "About",
|
70
|
+
"order": 3,
|
71
|
+
"target": ""
|
72
|
+
},
|
73
|
+
{
|
74
|
+
"id": 22,
|
75
|
+
"area": "profile-panel-block",
|
76
|
+
"address": "https://nanoporetech.com/contact",
|
77
|
+
"title": "Contact",
|
78
|
+
"order": 3,
|
79
|
+
"target": ""
|
80
|
+
},
|
81
|
+
{
|
82
|
+
"id": 28,
|
83
|
+
"area": "right-side-logged-out",
|
84
|
+
"address": "https://nanoporetech.com/contact",
|
85
|
+
"title": "Contact",
|
86
|
+
"order": 3,
|
87
|
+
"target": ""
|
88
|
+
},
|
89
|
+
{
|
90
|
+
"id": 29,
|
91
|
+
"area": "right-side-logged-out",
|
92
|
+
"address": "https://nanoporetech.com/about-us/news",
|
93
|
+
"title": "News",
|
94
|
+
"order": 3,
|
95
|
+
"target": ""
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"id": 30,
|
99
|
+
"area": "right-side-logged-out",
|
100
|
+
"address": "https://nanoporetech.com/about-us",
|
101
|
+
"title": "About",
|
102
|
+
"order": 3,
|
103
|
+
"target": ""
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"id": 9,
|
107
|
+
"area": "right-side-logged-in",
|
108
|
+
"address": "https://nanoporetech.com/contact",
|
109
|
+
"title": "Contact",
|
110
|
+
"order": 4,
|
111
|
+
"target": ""
|
112
|
+
},
|
113
|
+
{
|
114
|
+
"id": 10,
|
115
|
+
"area": "right-side-logged-in",
|
116
|
+
"address": "https://nanoporetech.com/about-us/news",
|
117
|
+
"title": "News",
|
118
|
+
"order": 4,
|
119
|
+
"target": ""
|
120
|
+
},
|
121
|
+
{
|
122
|
+
"id": 11,
|
123
|
+
"area": "right-side-logged-in",
|
124
|
+
"address": "https://nanoporetech.com/about-us",
|
125
|
+
"title": "About",
|
126
|
+
"order": 4,
|
127
|
+
"target": ""
|
128
|
+
},
|
129
|
+
{
|
130
|
+
"id": 12,
|
131
|
+
"area": "right-side-logged-in",
|
132
|
+
"address": "https://nanoporetech.com/events",
|
133
|
+
"title": "Events",
|
134
|
+
"order": 4,
|
135
|
+
"target": ""
|
136
|
+
},
|
137
|
+
{
|
138
|
+
"id": 23,
|
139
|
+
"area": "left-side-logged-out",
|
140
|
+
"address": "https://nanoporetech.com/",
|
141
|
+
"title": "Nanoporetech",
|
142
|
+
"order": 5,
|
143
|
+
"target": ""
|
144
|
+
},
|
145
|
+
{
|
146
|
+
"id": 24,
|
147
|
+
"area": "left-side-logged-out",
|
148
|
+
"address": "https://metrichor.com/",
|
149
|
+
"title": "Metrichor",
|
150
|
+
"order": 5,
|
151
|
+
"target": ""
|
152
|
+
},
|
153
|
+
{
|
154
|
+
"id": 25,
|
155
|
+
"area": "left-side-logged-out",
|
156
|
+
"address": "https://community.nanoporetech.com/",
|
157
|
+
"title": "Community",
|
158
|
+
"order": 5,
|
159
|
+
"target": ""
|
160
|
+
},
|
161
|
+
{
|
162
|
+
"id": 26,
|
163
|
+
"area": "left-side-logged-out",
|
164
|
+
"address": "https://nanoporetech.com/events",
|
165
|
+
"title": "Events",
|
166
|
+
"order": 5,
|
167
|
+
"target": ""
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"id": 27,
|
171
|
+
"area": "left-side-logged-out",
|
172
|
+
"address": "https://store.nanoporetech.com",
|
173
|
+
"title": "Store",
|
174
|
+
"order": 5,
|
175
|
+
"target": ""
|
176
|
+
},
|
177
|
+
{
|
178
|
+
"id": 3,
|
179
|
+
"area": "left-side-logged-in",
|
180
|
+
"address": "https://nanoporetech.com/",
|
181
|
+
"title": "Nanoporetech",
|
182
|
+
"order": 6,
|
183
|
+
"target": ""
|
184
|
+
},
|
185
|
+
{
|
186
|
+
"id": 4,
|
187
|
+
"area": "left-side-logged-in",
|
188
|
+
"address": "https://metrichor.com/",
|
189
|
+
"title": "Metrichor",
|
190
|
+
"order": 6,
|
191
|
+
"target": ""
|
192
|
+
},
|
193
|
+
{
|
194
|
+
"id": 5,
|
195
|
+
"area": "left-side-logged-in",
|
196
|
+
"address": "https://community.nanoporetech.com/",
|
197
|
+
"title": "Community",
|
198
|
+
"order": 6,
|
199
|
+
"target": ""
|
200
|
+
},
|
201
|
+
{
|
202
|
+
"id": 6,
|
203
|
+
"area": "left-side-logged-in",
|
204
|
+
"address": "https://nanoporetech.com/events",
|
205
|
+
"title": "Events",
|
206
|
+
"order": 6,
|
207
|
+
"target": ""
|
208
|
+
},
|
209
|
+
{
|
210
|
+
"id": 7,
|
211
|
+
"area": "left-side-logged-in",
|
212
|
+
"address": "https://store.nanoporetech.com",
|
213
|
+
"title": "Store",
|
214
|
+
"order": 6,
|
215
|
+
"target": ""
|
216
|
+
},
|
217
|
+
{
|
218
|
+
"id": 8,
|
219
|
+
"area": "left-side-logged-in",
|
220
|
+
"address": "https://epi2me.nanoporetech.com",
|
221
|
+
"title": "EPI2ME",
|
222
|
+
"order": 6,
|
223
|
+
"target": "_blank"
|
224
|
+
},
|
225
|
+
{
|
226
|
+
"id": 13,
|
227
|
+
"area": "profile-panel-list",
|
228
|
+
"address": "https://community.nanoporetech.com/",
|
229
|
+
"title": "Community Dashboard",
|
230
|
+
"order": 7,
|
231
|
+
"target": ""
|
232
|
+
},
|
233
|
+
{
|
234
|
+
"id": 14,
|
235
|
+
"area": "profile-panel-list",
|
236
|
+
"address": "https://myaccount.nanoporetech.com/message_centre",
|
237
|
+
"title": "Messages",
|
238
|
+
"order": 7,
|
239
|
+
"target": ""
|
240
|
+
},
|
241
|
+
{
|
242
|
+
"id": 15,
|
243
|
+
"area": "profile-panel-list",
|
244
|
+
"address": "https://community.nanoporetech.com/my-activity",
|
245
|
+
"title": "My Activity",
|
246
|
+
"order": 7,
|
247
|
+
"target": ""
|
248
|
+
},
|
249
|
+
{
|
250
|
+
"id": 16,
|
251
|
+
"area": "profile-panel-list",
|
252
|
+
"address": "https://myaccount.nanoporetech.com/home",
|
253
|
+
"title": "My Account",
|
254
|
+
"order": 7,
|
255
|
+
"target": ""
|
256
|
+
},
|
257
|
+
{
|
258
|
+
"id": 17,
|
259
|
+
"area": "profile-panel-list",
|
260
|
+
"address": "https://myaccount.nanoporetech.com/account/teams",
|
261
|
+
"title": "Team Management ",
|
262
|
+
"order": 7,
|
263
|
+
"target": ""
|
264
|
+
},
|
265
|
+
{
|
266
|
+
"id": 18,
|
267
|
+
"area": "profile-panel-list",
|
268
|
+
"address": "https://nanoporetech.com/resource-centre/publications",
|
269
|
+
"title": "Publications",
|
270
|
+
"order": 7,
|
271
|
+
"target": ""
|
272
|
+
},
|
273
|
+
{
|
274
|
+
"id": 19,
|
275
|
+
"area": "profile-panel-list",
|
276
|
+
"address": "https://myaccount.nanoporetech.com/profile/status",
|
277
|
+
"title": "Preferences",
|
278
|
+
"order": 7,
|
279
|
+
"target": ""
|
280
|
+
}
|
281
|
+
],
|
282
|
+
"urls": {
|
283
|
+
"forgot_password": "https://myaccount-dev.nanoporetech.com/profile/details#password-form?RelayState=",
|
284
|
+
"logout": "https://myaccount-dev.nanoporetech.com/sso/logout?RelayState=",
|
285
|
+
"login": null,
|
286
|
+
"messages": "https://myaccount-dev.nanoporetech.com/message_centre",
|
287
|
+
"cart": "https://shop-test.nanoporetech.com/checkout/cart"
|
288
|
+
},
|
289
|
+
"search": {
|
290
|
+
"app_id": "N8NZI5A47F",
|
291
|
+
"api_key": "b38860b015b02c9cb6993cf0367ed203",
|
292
|
+
"indeces": [
|
293
|
+
{
|
294
|
+
"index": "all_prod_en",
|
295
|
+
"name": "All",
|
296
|
+
"domain": "nanoporetech.com",
|
297
|
+
"all_group": true,
|
298
|
+
"filters": [
|
299
|
+
"tags",
|
300
|
+
"type"
|
301
|
+
]
|
302
|
+
},
|
303
|
+
{
|
304
|
+
"index": "cws_english_en",
|
305
|
+
"name": "www",
|
306
|
+
"domain": "nanoporetech.com",
|
307
|
+
"filters": [
|
308
|
+
"tags",
|
309
|
+
"type"
|
310
|
+
]
|
311
|
+
},
|
312
|
+
{
|
313
|
+
"index": "store_prod",
|
314
|
+
"name": "Store",
|
315
|
+
"domain": "store.nanoporetech.com",
|
316
|
+
"filters": [
|
317
|
+
"type"
|
318
|
+
]
|
319
|
+
},
|
320
|
+
{
|
321
|
+
"index": "cws_english_resources_en",
|
322
|
+
"name": "Resources",
|
323
|
+
"domain": "nanoporetech.com",
|
324
|
+
"filters": [
|
325
|
+
"tags"
|
326
|
+
]
|
327
|
+
},
|
328
|
+
{
|
329
|
+
"index": "community_prod",
|
330
|
+
"name": "Community",
|
331
|
+
"domain": "community.nanoporetech.com",
|
332
|
+
"filters": [
|
333
|
+
"type",
|
334
|
+
"channel",
|
335
|
+
"authors",
|
336
|
+
"tags"
|
337
|
+
]
|
338
|
+
}
|
339
|
+
]
|
340
|
+
}
|
341
|
+
}
|
@@ -30,6 +30,13 @@ const THRESHOLDBREAKS = {
|
|
30
30
|
* @slot promotion - a free area for any promotional content, displayed within the overflow menu panel
|
31
31
|
* @slot logo - when show-logo="false" you can utilise the logo slot
|
32
32
|
* @slot - if using search functionality, place a `<nano-search-results />` element in the default slot
|
33
|
+
*
|
34
|
+
* @part burger - the overflow / burger menu
|
35
|
+
* @part burger-actions-bar - the top bar of the overflow / burger menu
|
36
|
+
* @part burger-content - the main content area of the overflow / burger menu
|
37
|
+
* @part main-bar - the main nav menu bar
|
38
|
+
* @part logo-link - the link wrapping the logo
|
39
|
+
* @part search-bar - the search bar that appears under the main nav menu bar
|
33
40
|
*/
|
34
41
|
export class GlobalNav {
|
35
42
|
constructor() {
|
@@ -436,6 +443,18 @@ export class GlobalNav {
|
|
436
443
|
this.showAutocomplete = false;
|
437
444
|
return;
|
438
445
|
}
|
446
|
+
/**
|
447
|
+
* Manually open or close the overflow (burger) menu
|
448
|
+
* @param openClose - optionally force open (true) or close (false)
|
449
|
+
*/
|
450
|
+
async toggleOverflowMenu(openClose) {
|
451
|
+
if (openClose === true || (openClose === undefined && !this.modalIsOpen)) {
|
452
|
+
this.menuOpen();
|
453
|
+
}
|
454
|
+
else {
|
455
|
+
this.menuClose(null, true);
|
456
|
+
}
|
457
|
+
}
|
439
458
|
async getMyAccData() {
|
440
459
|
if (!!this.myAccData)
|
441
460
|
return;
|
@@ -471,7 +490,7 @@ export class GlobalNav {
|
|
471
490
|
const config = { timeout: 5000 };
|
472
491
|
try {
|
473
492
|
if (this.env === 'local') {
|
474
|
-
this.myAccData = (await import(`./local-my-account.json`));
|
493
|
+
this.myAccData = (await import(`./assets/local-my-account.json`));
|
475
494
|
}
|
476
495
|
else {
|
477
496
|
this.myAccData = await clientFetch(url + 'nav_bar_data.json', config);
|
@@ -883,7 +902,7 @@ export class GlobalNav {
|
|
883
902
|
'has-promotion': this.hasPromotionSlot,
|
884
903
|
'menu-full-screen': this.menuFullScreen,
|
885
904
|
'secondary-open': !!this.secondaryMenuOpen,
|
886
|
-
}, "aria-expanded": this.modalOpen ? 'true' : 'false', ref: (div) => (this.menuDiv = div) }, h("div", { class: "gn-menu_wrap", ref: (div) => (this.menuWrapDiv = div), tabindex: "-1" }, h("div", { class: "gn-menu_actions" }, h("button", { class: "menu-btn icon-btn icon-btn", onMouseDown: this.onMenuBtnClick, onKeyDown: this.onMenuBtnKeyDown }, this.threshold < this.THRESHOLDLIMIT - 3 && (h("nano-icon", { name: "light/times", "aria-label": "close menu" })), this.threshold >= this.THRESHOLDLIMIT - 3 && (h("nano-icon", { name: "light/bars", "aria-label": "close menu" }))), this.threshold <
|
905
|
+
}, "aria-expanded": this.modalOpen ? 'true' : 'false', ref: (div) => (this.menuDiv = div), part: "burger" }, h("div", { class: "gn-menu_wrap", ref: (div) => (this.menuWrapDiv = div), tabindex: "-1" }, h("div", { class: "gn-menu_actions", part: "burger-actions-bar" }, h("button", { class: "menu-btn icon-btn icon-btn", onMouseDown: this.onMenuBtnClick, onKeyDown: this.onMenuBtnKeyDown }, this.threshold < this.THRESHOLDLIMIT - 3 && (h("nano-icon", { name: "light/times", "aria-label": "close menu" })), this.threshold >= this.THRESHOLDLIMIT - 3 && (h("nano-icon", { name: "light/bars", "aria-label": "close menu" }))), this.threshold <
|
887
906
|
this.THRESHOLDLIMIT - THRESHOLDBREAKS.icon && [
|
888
907
|
!!this.iconSlotLen && h("slot", { name: "icon" }),
|
889
908
|
this.myAccData &&
|
@@ -892,7 +911,7 @@ export class GlobalNav {
|
|
892
911
|
this.msgUrl && (h("a", { href: this.msgUrl, class: "icon-btn" }, h("nano-icon", { name: "light/bell" }), this.msgCount > 0 && (h("span", { class: "gn-menu_actions-counter" }, this.msgCount)))),
|
893
912
|
this.cartUrl && (h("a", { href: this.cartUrl, class: "icon-btn" }, h("nano-icon", { name: "light/shopping-cart" }), this.cartCount > 0 && (h("span", { class: "gn-menu_actions-counter" }, this.cartCount)))),
|
894
913
|
],
|
895
|
-
], this.myAccData && this.myAccData.urls.login && (h("a", { href: this.myAccData.urls.login + this.ssoRedirect, class: "login-btn" }, "Login / Register", ' ', h("nano-icon", { name: "solid/chevron-right" })))), h("div", { class: "content-wrap", ref: (div) => (this.menuContentDiv = div) }, h("div", { class: "content" }, h("nav", { class: "nav-links nav-links--main", role: "menu" }, h("slot", { name: "overflow", onSlotchange: this.assessSlottedContent }), this.threshold <
|
914
|
+
], this.myAccData && this.myAccData.urls.login && (h("a", { href: this.myAccData.urls.login + this.ssoRedirect, class: "login-btn" }, "Login / Register", ' ', h("nano-icon", { name: "solid/chevron-right" })))), h("div", { class: "content-wrap", ref: (div) => (this.menuContentDiv = div) }, h("div", { class: "content", part: "burger-content" }, h("nav", { class: "nav-links nav-links--main", role: "menu" }, h("slot", { name: "overflow", onSlotchange: this.assessSlottedContent }), this.threshold <
|
896
915
|
this.THRESHOLDLIMIT - THRESHOLDBREAKS.main &&
|
897
916
|
!!this.mainSlotLen && (h("slot", { name: "main", onSlotchange: this.assessSlottedContent }))), (((!!this.aboutSlotLen || !!this.aboutNavItms.length) &&
|
898
917
|
this.hasSiteSlot) ||
|
@@ -913,7 +932,7 @@ export class GlobalNav {
|
|
913
932
|
(this.loggedInNavItms.length || this.hasLoggedinSlot) && (h("nav", { class: "nav-links", "aria-label": "Your user account links" }, h("nano-nav-item", { class: "nano-global-nav user-nav nano-global-nav-menu" }, this.myAccountUser.name, h("nano-icon", { slot: "icon-end", name: "solid/chevron-right" }), h("div", { slot: "secondary" }, h("div", { class: "content" }, h("button", { class: "back-btn", onClick: this.subMenuClose }, h("nano-icon", { slot: "icon-end", name: "solid/chevron-left", "aria-label": "go back" }), this.myAccountUser.name), !!((_a = this.myAccountUser) === null || _a === void 0 ? void 0 : _a.small_avatar_url) && (h("nano-global-nav-user-profile", { myAccountUser: this.myAccountUser, userProfileUrl: this.userProfileUrl })), h("div", { class: "content--sub" }, h("slot", { name: "loggedin", onSlotchange: this.assessSlottedContent }), this.loggedInNavItms.map((link) => {
|
914
933
|
return (h("nano-nav-item", { class: "nano-global-nav nano-global-nav-menu" }, h("a", { href: link.address, target: link.target }, link.title)));
|
915
934
|
}), h("nano-nav-item", { class: "nano-global-nav nano-global-nav-menu" }, h("a", { href: this.myAccData.urls.forgot_password +
|
916
|
-
this.ssoRedirect }, "Change Password")))))))), h("slot", { name: "promotion", onSlotchange: this.assessSlottedContent }), this.myAccData && this.myAccData.urls.logout && (h("div", { class: "login-btn logout-btn" }, h("a", { href: this.myAccData.urls.logout + this.ssoRedirect }, "Logout")))))), h("div", { class: "sticker-trigger" }), h("nano-sticker", { "auto-resize": "false", "break-point-max": "800", quietMode: { h: 600, w: 800 } }, h("div", { class: "bars" }, h("nav", { class: "main-bar", "aria-label": "Main site navigation", tabindex: "-1", ref: (div) => (this.mainBarDiv = div), role: !!this.mainSlotLen &&
|
935
|
+
this.ssoRedirect }, "Change Password")))))))), h("slot", { name: "promotion", onSlotchange: this.assessSlottedContent }), this.myAccData && this.myAccData.urls.logout && (h("div", { class: "login-btn logout-btn" }, h("a", { href: this.myAccData.urls.logout + this.ssoRedirect }, "Logout")))))), h("div", { class: "sticker-trigger" }), h("nano-sticker", { "auto-resize": "false", "break-point-max": "800", quietMode: { h: 600, w: 800 } }, h("div", { class: "bars" }, h("nav", { part: "main-bar", class: "main-bar", "aria-label": "Main site navigation", tabindex: "-1", ref: (div) => (this.mainBarDiv = div), role: !!this.mainSlotLen &&
|
917
936
|
this.threshold >= this.THRESHOLDLIMIT - THRESHOLDBREAKS.main
|
918
937
|
? 'menu'
|
919
938
|
: undefined }, (this.hasPromotionSlot ||
|
@@ -932,7 +951,7 @@ export class GlobalNav {
|
|
932
951
|
this.threshold <
|
933
952
|
this.THRESHOLDLIMIT - THRESHOLDBREAKS.about) ||
|
934
953
|
this.hasSiteSlot ||
|
935
|
-
!!this.siteNavItms.length) && (h("button", { class: "menu-btn icon-btn", onMouseDown: this.menuOpen, onKeyDown: this.onMenuBtnKeyDown, "aria-expanded": this.modalOpen ? 'true' : 'false', "aria-controls": "global-nav-menu", ref: (btn) => (this.menuBtn = btn) }, h("nano-icon", { name: "light/bars", "aria-label": "open menu" }))), this.showLogo && (h("a", { href: this.logoUrl, class: "logo-link" }, h("img", { src: getAssetPath(`../nano-assets/ont-logo.svg`), alt: "Oxford Nanopore Technologies Logo", class: "logo" }))), !this.showLogo && (h("div", { class: "logo-link" }, h("slot", { name: "logo", onSlotchange: this.assessSlottedContent }))), h("div", { class: "nav-links nav-links--main" }, h("slot", { name: "main", onSlotchange: this.assessSlottedContent })), this.mainSlotLen === 0 &&
|
954
|
+
!!this.siteNavItms.length) && (h("button", { class: "menu-btn icon-btn", onMouseDown: this.menuOpen, onKeyDown: this.onMenuBtnKeyDown, "aria-expanded": this.modalOpen ? 'true' : 'false', "aria-controls": "global-nav-menu", ref: (btn) => (this.menuBtn = btn) }, h("nano-icon", { name: "light/bars", "aria-label": "open menu" }))), this.showLogo && (h("a", { href: this.logoUrl, class: "logo-link", part: "logo-link" }, h("img", { src: getAssetPath(`../nano-assets/ont-logo.svg`), alt: "Oxford Nanopore Technologies Logo", class: "logo" }))), !this.showLogo && (h("div", { class: "logo-link" }, h("slot", { name: "logo", onSlotchange: this.assessSlottedContent }))), h("div", { class: "nav-links nav-links--main" }, h("slot", { name: "main", onSlotchange: this.assessSlottedContent })), this.mainSlotLen === 0 &&
|
936
955
|
this.threshold >=
|
937
956
|
this.THRESHOLDLIMIT - THRESHOLDBREAKS.search && [
|
938
957
|
this.showSearch && !!this.internalSearchIndeces.length && (h("div", { class: "search-widget", role: "combobox", "aria-owns": "autocomplete-results", "aria-expanded": this.showAutocomplete && this.autocompleteResults
|
@@ -978,7 +997,7 @@ export class GlobalNav {
|
|
978
997
|
this.THRESHOLDLIMIT - THRESHOLDBREAKS.search) && (h("div", { id: "global-nav-search-bar", class: {
|
979
998
|
'search-bar': true,
|
980
999
|
show: this.searchBarShown,
|
981
|
-
}, "aria-expanded": this.searchBarShown ? 'true' : 'false', role: "region", tabindex: "-1", ref: (div) => (this.searchBarEl = div) }, h("div", { class: "search-widget" }, this.showSearch && !!this.internalSearchIndeces.length && (h("div", null, searchWidget)), (!this.showSearch || !this.myAccData) &&
|
1000
|
+
}, "aria-expanded": this.searchBarShown ? 'true' : 'false', role: "region", tabindex: "-1", ref: (div) => (this.searchBarEl = div), part: "search-bar" }, h("div", { class: "search-widget" }, this.showSearch && !!this.internalSearchIndeces.length && (h("div", null, searchWidget)), (!this.showSearch || !this.myAccData) &&
|
982
1001
|
!!this.searchSlotLen && (h("slot", { name: "search", onSlotchange: this.assessSlottedContent }))))))), (this.threshold < this.THRESHOLDLIMIT - 3 ||
|
983
1002
|
this.menuFullScreen) && (h("div", { class: {
|
984
1003
|
mask: true,
|
@@ -1078,6 +1097,7 @@ export class GlobalNav {
|
|
1078
1097
|
"$": ["./style/global-nav.css"]
|
1079
1098
|
};
|
1080
1099
|
}
|
1100
|
+
static get assetsDirs() { return ["assets"]; }
|
1081
1101
|
static get properties() {
|
1082
1102
|
return {
|
1083
1103
|
"env": {
|
@@ -1593,6 +1613,31 @@ export class GlobalNav {
|
|
1593
1613
|
"text": "Submit the search form (a search value must be present)",
|
1594
1614
|
"tags": []
|
1595
1615
|
}
|
1616
|
+
},
|
1617
|
+
"toggleOverflowMenu": {
|
1618
|
+
"complexType": {
|
1619
|
+
"signature": "(openClose?: boolean) => Promise<void>",
|
1620
|
+
"parameters": [{
|
1621
|
+
"tags": [{
|
1622
|
+
"name": "param",
|
1623
|
+
"text": "openClose - optionally force open (true) or close (false)"
|
1624
|
+
}],
|
1625
|
+
"text": "- optionally force open (true) or close (false)"
|
1626
|
+
}],
|
1627
|
+
"references": {
|
1628
|
+
"Promise": {
|
1629
|
+
"location": "global"
|
1630
|
+
}
|
1631
|
+
},
|
1632
|
+
"return": "Promise<void>"
|
1633
|
+
},
|
1634
|
+
"docs": {
|
1635
|
+
"text": "Manually open or close the overflow (burger) menu",
|
1636
|
+
"tags": [{
|
1637
|
+
"name": "param",
|
1638
|
+
"text": "openClose - optionally force open (true) or close (false)"
|
1639
|
+
}]
|
1640
|
+
}
|
1596
1641
|
}
|
1597
1642
|
};
|
1598
1643
|
}
|