@eventcatalog/core 2.0.22 → 2.0.23
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
CHANGED
package/global.d.ts
ADDED
package/package.json
CHANGED
|
@@ -180,6 +180,7 @@ const badges = [
|
|
|
180
180
|
// Fix to pass information to componets that are client side only
|
|
181
181
|
// and require catalog information
|
|
182
182
|
window.eventcatalog = {};
|
|
183
|
+
// @ts-ignore
|
|
183
184
|
window.eventcatalog[`${props.collection}-${props.data.id}`] = props.catalog;
|
|
184
185
|
</script>
|
|
185
186
|
|
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
---
|
|
2
|
-
import Layout from '../../layouts/VisualiserLayout.astro'
|
|
2
|
+
import Layout from '../../layouts/VisualiserLayout.astro';
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
<Layout>
|
|
6
|
-
|
|
6
|
+
<div class="hidden no-items py-56 text-center -ml-52 text-gray-400">
|
|
7
|
+
No data loaded into your catalog. Please add some data to your to see visuals.
|
|
8
|
+
</div>
|
|
7
9
|
</Layout>
|
|
8
10
|
|
|
9
11
|
<script is:inline>
|
|
12
|
+
const navigationElem = document.getElementById('visualiser-navigation');
|
|
10
13
|
|
|
14
|
+
if (navigationElem) {
|
|
11
15
|
// Find the total anchor links
|
|
12
|
-
const totalAnchorLinks =
|
|
16
|
+
const totalAnchorLinks = navigationElem.querySelectorAll('a');
|
|
17
|
+
const link = navigationElem.querySelector('a');
|
|
18
|
+
const noItems = document.querySelector('.no-items');
|
|
13
19
|
|
|
14
20
|
// Show no-items if there are none
|
|
15
|
-
if(totalAnchorLinks.length === 0) {
|
|
16
|
-
|
|
21
|
+
if (totalAnchorLinks.length === 0 && noItems) {
|
|
22
|
+
noItems.classList.remove('hidden');
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
// Find the element with the id visualiser-navigation and the first a link in there and click it
|
|
20
|
-
if(
|
|
21
|
-
|
|
26
|
+
if (link) {
|
|
27
|
+
link.click();
|
|
22
28
|
}
|
|
23
|
-
|
|
29
|
+
}
|
|
30
|
+
</script>
|