@eventcatalog/core 3.29.1 → 3.30.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/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-H5UC2A5F.js → chunk-6UG4JMUV.js} +1 -1
- package/dist/{chunk-4MSAPCV3.js → chunk-ATRBVTJ6.js} +1 -1
- package/dist/{chunk-PLNJC7NZ.js → chunk-K3ZVEX2Y.js} +13 -2
- package/dist/{chunk-V4OTI3PF.js → chunk-MVZKHUX2.js} +1 -1
- package/dist/{chunk-FVKDNLZK.js → chunk-RRBDF4MM.js} +1 -1
- package/dist/{chunk-24NGK43A.js → chunk-Z26P4PCB.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +14 -3
- package/dist/eventcatalog.js +6 -6
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/dist/watcher.cjs +13 -2
- package/dist/watcher.js +1 -1
- package/eventcatalog/astro.config.mjs +1 -1
- package/eventcatalog/public/logo.png +0 -0
- package/eventcatalog/src/components/CopyAsMarkdown.tsx +2 -2
- package/eventcatalog/src/components/EnvironmentDropdown.tsx +33 -21
- package/eventcatalog/src/components/FieldsExplorer/FieldFilters.tsx +3 -53
- package/eventcatalog/src/components/FieldsExplorer/FieldsExplorer.tsx +144 -91
- package/eventcatalog/src/components/FieldsExplorer/FieldsTable.tsx +112 -109
- package/eventcatalog/src/components/Header.astro +9 -19
- package/eventcatalog/src/components/MDX/Accordion/Accordion.tsx +12 -14
- package/eventcatalog/src/components/MDX/Accordion/AccordionGroup.astro +11 -3
- package/eventcatalog/src/components/MDX/ResourceRef/ResourceRef.astro +15 -5
- package/eventcatalog/src/components/SchemaExplorer/ApiContentViewer.tsx +164 -53
- package/eventcatalog/src/components/SchemaExplorer/DiffViewer.tsx +1 -1
- package/eventcatalog/src/components/SchemaExplorer/ExamplesViewer.tsx +4 -4
- package/eventcatalog/src/components/SchemaExplorer/Pagination.tsx +12 -10
- package/eventcatalog/src/components/SchemaExplorer/SchemaContentViewer.tsx +48 -77
- package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsPanel.tsx +238 -169
- package/eventcatalog/src/components/SchemaExplorer/SchemaExplorer.tsx +189 -230
- package/eventcatalog/src/components/SchemaExplorer/SchemaListItem.tsx +39 -36
- package/eventcatalog/src/components/Search/Search.astro +1 -1
- package/eventcatalog/src/components/Seo.astro +1 -1
- package/eventcatalog/src/components/SideNav/NestedSideBar/SearchBar.tsx +3 -3
- package/eventcatalog/src/components/SideNav/NestedSideBar/index.tsx +229 -256
- package/eventcatalog/src/components/Tables/Discover/DiscoverTable.tsx +78 -59
- package/eventcatalog/src/components/Tables/Discover/columns.tsx +130 -197
- package/eventcatalog/src/components/Tables/Table.tsx +21 -18
- package/eventcatalog/src/components/Tables/columns/TeamsTableColumns.tsx +79 -131
- package/eventcatalog/src/components/Tables/columns/UserTableColumns.tsx +104 -175
- package/eventcatalog/src/enterprise/auth/error.astro +1 -1
- package/eventcatalog/src/enterprise/auth/login.astro +1 -1
- package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/index.tsx +95 -93
- package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/index.astro +174 -136
- package/eventcatalog/src/enterprise/fields/pages/fields.astro +10 -8
- package/eventcatalog/src/enterprise/integrations/eventcatalog-features.ts +0 -8
- package/eventcatalog/src/layouts/DirectoryLayout.astro +17 -88
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +528 -146
- package/eventcatalog/src/layouts/VisualiserLayout.astro +7 -2
- package/eventcatalog/src/pages/_index.astro +5 -3
- package/eventcatalog/src/pages/architecture/[type]/[id]/[version]/index.astro +3 -3
- package/eventcatalog/src/pages/diagrams/[id]/[version]/index.astro +223 -73
- package/eventcatalog/src/pages/discover/[type]/index.astro +22 -141
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro +129 -29
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/index.astro +129 -29
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/asyncapi/[filename].astro +6 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/examples/[...filename].astro +2 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/graphql/[filename].astro +21 -18
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +33 -32
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/spec/[filename].astro +5 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/language/[dictionaryId]/index.astro +2 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/language/index.astro +4 -6
- package/eventcatalog/src/pages/docs/teams/[id]/index.astro +11 -4
- package/eventcatalog/src/pages/docs/users/[id]/index.astro +11 -4
- package/eventcatalog/src/pages/schemas/explorer/index.astro +10 -8
- package/eventcatalog/src/pages/studio.astro +1 -1
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/entity-map/index.astro +2 -7
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/index.astro +2 -2
- package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/entity-map/index.astro +2 -7
- package/eventcatalog/src/styles/theme.css +68 -12
- package/eventcatalog/src/types/react-syntax-highlighter.d.ts +13 -0
- package/package.json +1 -1
- package/eventcatalog/public/logo.svg +0 -14
- package/eventcatalog/src/enterprise/plans/index.astro +0 -319
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
3
3
|
import { render } from 'astro:content';
|
|
4
4
|
import config from '@config';
|
|
5
|
-
import { AlignLeftIcon } from 'lucide-react';
|
|
5
|
+
import { AlignLeftIcon, UserIcon, UsersIcon } from 'lucide-react';
|
|
6
6
|
|
|
7
7
|
import mdxComponents from '@components/MDX/components';
|
|
8
|
-
import OwnersList from '@components/Lists/OwnersList';
|
|
9
8
|
|
|
10
9
|
import { getOwner } from '@utils/collections/owners';
|
|
11
10
|
import { buildUrl } from '@utils/url-builder';
|
|
@@ -87,153 +86,188 @@ const getCustomDocBadgeClasses = (badge: any) => {
|
|
|
87
86
|
---
|
|
88
87
|
|
|
89
88
|
<VerticalSideBarLayout title={doc.title || 'Documentation'} showNestedSideBar={false}>
|
|
90
|
-
<div class="flex w-full" data-pagefind-body data-pagefind-meta={`title:${doc.title}`}>
|
|
89
|
+
<div class="custom-docs-shell flex w-full" data-pagefind-body data-pagefind-meta={`title:${doc.title}`}>
|
|
91
90
|
<!-- Left Sidebar Navigation -->
|
|
92
91
|
<aside
|
|
93
|
-
class="sidebar-transition
|
|
92
|
+
class="sidebar-transition fixed top-0 bottom-0 left-[var(--ec-vertical-nav-width,14rem)] z-10 w-[var(--ec-custom-docs-sidebar-width,20rem)] overflow-hidden border-r border-[rgb(var(--ec-page-border))] bg-[rgb(var(--ec-page-bg))]"
|
|
94
93
|
>
|
|
95
|
-
<
|
|
94
|
+
<div class="h-full">
|
|
95
|
+
<CustomDocsNav />
|
|
96
|
+
</div>
|
|
96
97
|
</aside>
|
|
97
98
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
<div>
|
|
105
|
-
<
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
<
|
|
114
|
-
{badge.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
99
|
+
<div class="sidebar-transition flex w-full min-w-0" style="margin-left: var(--ec-custom-docs-sidebar-width, 20rem);">
|
|
100
|
+
<main class="min-w-0 flex-1">
|
|
101
|
+
<div
|
|
102
|
+
class="w-full lg:mr-2 pr-24 py-8 bg-[rgb(var(--ec-page-bg))]"
|
|
103
|
+
style="padding-left: var(--ec-app-content-padding-left, 5rem);"
|
|
104
|
+
>
|
|
105
|
+
<div class="border-b border-[rgb(var(--ec-page-border))] flex justify-between items-start md:pb-2">
|
|
106
|
+
<div>
|
|
107
|
+
<h2 id="doc-page-header" class="text-2xl md:text-4xl font-bold text-[rgb(var(--ec-page-text))]">{doc.title}</h2>
|
|
108
|
+
<p class="text-base pt-2 text-[rgb(var(--ec-page-text-muted))] font-light">{doc.summary}</p>
|
|
109
|
+
{
|
|
110
|
+
badges && (
|
|
111
|
+
<div class="flex flex-wrap gap-3 py-4">
|
|
112
|
+
{badges.map((badge: any) => {
|
|
113
|
+
return (
|
|
114
|
+
<a href={badge.url || '#'}>
|
|
115
|
+
<span id={badge.id || ''} class={`${getCustomDocBadgeClasses(badge)} mr-2`}>
|
|
116
|
+
{badge.icon && <badge.icon className="w-4 h-4 flex-shrink-0 text-[rgb(var(--ec-icon-color))]" />}
|
|
117
|
+
{badge.iconURL && <img src={badge.iconURL} class="w-4 h-4 flex-shrink-0 opacity-80" alt="" />}
|
|
118
|
+
<span>{badge.content}</span>
|
|
119
|
+
</span>
|
|
120
|
+
</a>
|
|
121
|
+
);
|
|
122
|
+
})}
|
|
123
|
+
</div>
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
<div class="prose prose-md py-4 w-full text-[15px]">
|
|
129
|
+
<Content components={{ ...mdxComponents(props) }} />
|
|
124
130
|
</div>
|
|
125
|
-
</div>
|
|
126
|
-
<div class="flex-auto prose py-8 max-w-none">
|
|
127
|
-
<Content components={{ ...mdxComponents(props) }} />
|
|
128
|
-
</div>
|
|
129
131
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
132
|
+
{
|
|
133
|
+
nodeGraphs.length > 0 &&
|
|
134
|
+
nodeGraphs.map((nodeGraph: any) => {
|
|
135
|
+
const collection = resourceToCollectionMap[nodeGraph.type as keyof typeof resourceToCollectionMap];
|
|
136
|
+
return (
|
|
137
|
+
<NodeGraph
|
|
138
|
+
id={nodeGraph.id}
|
|
139
|
+
version={nodeGraph.version}
|
|
140
|
+
collection={collection}
|
|
141
|
+
title={nodeGraph.title}
|
|
142
|
+
mode="simple"
|
|
143
|
+
linksToVisualiser={true}
|
|
144
|
+
href={
|
|
145
|
+
isVisualiserEnabled()
|
|
146
|
+
? {
|
|
147
|
+
label: 'Open in Visualiser',
|
|
148
|
+
url: buildUrl(`/visualiser/${collection}/${nodeGraph.id}/${nodeGraph.version}`),
|
|
149
|
+
}
|
|
150
|
+
: undefined
|
|
151
|
+
}
|
|
152
|
+
/>
|
|
153
|
+
);
|
|
154
|
+
})
|
|
155
|
+
}
|
|
154
156
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
157
|
+
<!-- Previous / Next Navigation -->
|
|
158
|
+
<div class="py-8 border-t border-[rgb(var(--ec-page-border))] mt-8">
|
|
159
|
+
<div class="flex flex-col sm:flex-row justify-between w-full gap-4">
|
|
160
|
+
{
|
|
161
|
+
prev && (
|
|
162
|
+
<a
|
|
163
|
+
href={buildUrl(`/docs/custom/${prev.slug}`)}
|
|
164
|
+
class="group flex flex-col border border-[rgb(var(--ec-page-border))] rounded-lg p-4 hover:border-[rgb(var(--ec-content-text-muted))] hover:bg-[rgb(var(--ec-content-hover))] transition-colors w-full sm:w-1/2"
|
|
165
|
+
>
|
|
166
|
+
<span class="text-sm text-[rgb(var(--ec-page-text-muted))] mb-1">Previous</span>
|
|
167
|
+
<span class="font-medium text-[rgb(var(--ec-page-text))] group-hover:text-primary-600 transition-colors">
|
|
168
|
+
{prev.label}
|
|
169
|
+
</span>
|
|
170
|
+
</a>
|
|
171
|
+
)
|
|
172
|
+
}
|
|
171
173
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
174
|
+
{!prev && <div class="w-full sm:w-1/2" />}
|
|
175
|
+
|
|
176
|
+
{
|
|
177
|
+
next && (
|
|
178
|
+
<a
|
|
179
|
+
href={buildUrl(`/docs/custom/${next.slug}`)}
|
|
180
|
+
class="group flex flex-col items-end text-right border border-[rgb(var(--ec-page-border))] rounded-lg p-4 hover:border-[rgb(var(--ec-content-text-muted))] hover:bg-[rgb(var(--ec-content-hover))] transition-colors w-full sm:w-1/2"
|
|
181
|
+
>
|
|
182
|
+
<span class="text-sm text-[rgb(var(--ec-page-text-muted))] mb-1">Next</span>
|
|
183
|
+
<span class="font-medium text-[rgb(var(--ec-page-text))] group-hover:text-primary-600 transition-colors">
|
|
184
|
+
{next.label}
|
|
185
|
+
</span>
|
|
186
|
+
</a>
|
|
187
|
+
)
|
|
188
|
+
}
|
|
189
|
+
</div>
|
|
187
190
|
</div>
|
|
188
191
|
</div>
|
|
189
|
-
</
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
<div>
|
|
192
|
+
</main>
|
|
193
|
+
|
|
194
|
+
<!-- Right Sidebar TOC -->
|
|
195
|
+
<aside
|
|
196
|
+
id="eventcatalog-docs-sidebar"
|
|
197
|
+
class="hidden xl:block sticky top-[4rem] self-start w-[280px] max-h-[calc(100vh-4rem)] overflow-y-auto py-2 flex-shrink-0 pr-10 bg-[rgb(var(--ec-page-bg))]"
|
|
198
|
+
>
|
|
199
|
+
<div class="mt-8 space-y-8">
|
|
198
200
|
{
|
|
199
|
-
|
|
200
|
-
<
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
201
|
+
headings.length > 0 && (
|
|
202
|
+
<div>
|
|
203
|
+
<h3 class="text-xs text-[rgb(var(--ec-page-text))] font-semibold capitalize flex items-center gap-2 mb-4">
|
|
204
|
+
<AlignLeftIcon className="w-4 h-4" />
|
|
205
|
+
On this page
|
|
206
|
+
</h3>
|
|
207
|
+
<nav class="text-xs border-l border-[rgb(var(--ec-page-border))]">
|
|
208
|
+
{headings.map((heading) => {
|
|
209
|
+
const level = heading.depth > 2 ? heading.depth : 1;
|
|
210
|
+
if (heading.depth > 3) {
|
|
211
|
+
return null;
|
|
212
|
+
}
|
|
213
|
+
return (
|
|
214
|
+
<a
|
|
215
|
+
href={`#${heading.slug}`}
|
|
216
|
+
class="block py-1.5 pr-2.5 leading-5 text-[rgb(var(--ec-page-text-muted))] hover:border-[rgb(var(--ec-page-border))] hover:text-[rgb(var(--ec-page-text))] border-l-2 border-transparent -ml-px transition-all duration-200"
|
|
217
|
+
style={`padding-left: ${level * 0.75}rem`}
|
|
218
|
+
>
|
|
219
|
+
{heading.text}
|
|
220
|
+
</a>
|
|
221
|
+
);
|
|
222
|
+
})}
|
|
223
|
+
</nav>
|
|
224
|
+
</div>
|
|
206
225
|
)
|
|
207
226
|
}
|
|
208
|
-
</div>
|
|
209
|
-
<h3 class="text-sm text-[rgb(var(--ec-page-text))] font-semibold capitalize flex items-center gap-2">
|
|
210
|
-
<AlignLeftIcon className="w-4 h-4" />
|
|
211
|
-
On this page
|
|
212
|
-
</h3>
|
|
213
|
-
<nav class="space-y-1 text-sm py-4">
|
|
214
227
|
{
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
<
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
228
|
+
ownersList.length > 0 && (
|
|
229
|
+
<div>
|
|
230
|
+
<h3 class="text-xs text-[rgb(var(--ec-page-text))] font-semibold capitalize mb-4">
|
|
231
|
+
{`Document Owners (${ownersList.length})`}
|
|
232
|
+
</h3>
|
|
233
|
+
<div class="space-y-2">
|
|
234
|
+
{ownersList.map((owner) => (
|
|
235
|
+
<a
|
|
236
|
+
href={owner.href}
|
|
237
|
+
class="flex items-center gap-2 text-xs text-[rgb(var(--ec-page-text-muted))] hover:text-[rgb(var(--ec-page-text))] transition-colors"
|
|
238
|
+
>
|
|
239
|
+
{owner.type === 'users' ? (
|
|
240
|
+
<UserIcon className="h-4 w-4 flex-shrink-0 text-[rgb(var(--ec-page-text-muted))]" />
|
|
241
|
+
) : (
|
|
242
|
+
<UsersIcon className="h-4 w-4 flex-shrink-0 text-[rgb(var(--ec-page-text-muted))]" />
|
|
243
|
+
)}
|
|
244
|
+
<span class="truncate">{owner.label}</span>
|
|
245
|
+
</a>
|
|
246
|
+
))}
|
|
247
|
+
</div>
|
|
248
|
+
</div>
|
|
249
|
+
)
|
|
229
250
|
}
|
|
230
|
-
</
|
|
231
|
-
</
|
|
232
|
-
</
|
|
251
|
+
</div>
|
|
252
|
+
</aside>
|
|
253
|
+
</div>
|
|
233
254
|
</div>
|
|
234
255
|
</VerticalSideBarLayout>
|
|
235
256
|
|
|
236
257
|
<style is:global>
|
|
258
|
+
:root {
|
|
259
|
+
--ec-custom-docs-sidebar-width: 20rem;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
#eventcatalog-header {
|
|
263
|
+
left: calc(var(--ec-vertical-nav-width, 14rem) + var(--ec-custom-docs-sidebar-width, 20rem)) !important;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.custom-docs-shell {
|
|
267
|
+
margin-left: calc(var(--ec-app-content-padding-left, 5rem) * -1);
|
|
268
|
+
margin-right: calc(var(--ec-app-content-padding-right, 5rem) * -1);
|
|
269
|
+
}
|
|
270
|
+
|
|
237
271
|
.mermaid svg {
|
|
238
272
|
margin: 1em auto 2em;
|
|
239
273
|
}
|
|
@@ -249,6 +283,10 @@ const getCustomDocBadgeClasses = (badge: any) => {
|
|
|
249
283
|
.toc-active-text {
|
|
250
284
|
color: rgb(var(--ec-accent));
|
|
251
285
|
}
|
|
286
|
+
|
|
287
|
+
.toc-active-border {
|
|
288
|
+
border-color: rgb(var(--ec-accent));
|
|
289
|
+
}
|
|
252
290
|
</style>
|
|
253
291
|
|
|
254
292
|
<script define:vars={{ props, config }}>
|
|
@@ -275,16 +313,16 @@ const getCustomDocBadgeClasses = (badge: any) => {
|
|
|
275
313
|
// Function to highlight a TOC item
|
|
276
314
|
function highlightTocItem(id: string) {
|
|
277
315
|
// Remove active class from all links
|
|
278
|
-
document.querySelectorAll('.active-toc-item').forEach((link) => {
|
|
279
|
-
link.classList.remove('active-toc-item', 'toc-active-text', 'font-
|
|
280
|
-
link.classList.add('
|
|
316
|
+
document.querySelectorAll('#eventcatalog-docs-sidebar .active-toc-item').forEach((link) => {
|
|
317
|
+
link.classList.remove('active-toc-item', 'toc-active-text', 'font-medium', 'toc-active-border');
|
|
318
|
+
link.classList.add('border-transparent');
|
|
281
319
|
});
|
|
282
320
|
|
|
283
321
|
// Add active class to current link
|
|
284
|
-
const tocLink = document.querySelector(
|
|
322
|
+
const tocLink = document.querySelector(`#eventcatalog-docs-sidebar nav a[href="#${id}"]`);
|
|
285
323
|
if (tocLink) {
|
|
286
|
-
tocLink.classList.add('active-toc-item', 'toc-active-text', 'font-
|
|
287
|
-
tocLink.classList.remove('
|
|
324
|
+
tocLink.classList.add('active-toc-item', 'toc-active-text', 'font-medium', 'toc-active-border');
|
|
325
|
+
tocLink.classList.remove('border-transparent');
|
|
288
326
|
|
|
289
327
|
// Scroll the highlighted item into view with a small delay to ensure DOM updates first
|
|
290
328
|
setTimeout(() => {
|
|
@@ -343,7 +381,7 @@ const getCustomDocBadgeClasses = (badge: any) => {
|
|
|
343
381
|
}
|
|
344
382
|
|
|
345
383
|
// Add click event listeners to all TOC links
|
|
346
|
-
const tocLinks = document.querySelectorAll('nav a[href^="#"]');
|
|
384
|
+
const tocLinks = document.querySelectorAll('#eventcatalog-docs-sidebar nav a[href^="#"]');
|
|
347
385
|
tocLinks.forEach((link) => {
|
|
348
386
|
link.addEventListener('click', (e) => {
|
|
349
387
|
// Get the ID from the href attribute
|
|
@@ -7,13 +7,15 @@ export const prerender = false;
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
<VerticalSideBarLayout title="Fields Explorer - EventCatalog" showNestedSideBar={false}>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
<style is:global>
|
|
11
|
+
#eventcatalog-header {
|
|
12
|
+
left: calc(var(--ec-vertical-nav-width, 14rem) + var(--ec-fields-sidebar-width, 320px)) !important;
|
|
13
|
+
}
|
|
14
|
+
</style>
|
|
15
|
+
<main
|
|
16
|
+
class="min-h-0 overflow-hidden bg-[rgb(var(--ec-page-bg))]"
|
|
17
|
+
style="--ec-fields-sidebar-width: 320px; margin-left: calc(var(--ec-app-content-padding-left, 5rem) * -1); margin-right: calc(var(--ec-app-content-padding-right, 5rem) * -1); height: calc(100dvh - 60px);"
|
|
18
|
+
>
|
|
19
|
+
<FieldsExplorer client:load isScaleEnabled={isEventCatalogScaleEnabled()} />
|
|
18
20
|
</main>
|
|
19
21
|
</VerticalSideBarLayout>
|
|
@@ -77,14 +77,6 @@ export default function eventCatalogIntegration(): AstroIntegration {
|
|
|
77
77
|
configureAuthentication(params);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
// If non paying user, add the plans route into the project
|
|
81
|
-
if (!isEventCatalogStarterEnabled() && !isEventCatalogScaleEnabled()) {
|
|
82
|
-
params.injectRoute({
|
|
83
|
-
pattern: '/plans',
|
|
84
|
-
entrypoint: path.join(catalogDirectory, 'src/enterprise/plans/index.astro'),
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
|
|
88
80
|
// Custom documentation routes (Starter/Scale plan)
|
|
89
81
|
if (isCustomDocsEnabled()) {
|
|
90
82
|
params.injectRoute({
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { Table, type TData, type TCollectionTypes } from '@components/Tables/Table';
|
|
3
|
-
import { buildUrl } from '@utils/url-builder';
|
|
4
3
|
import VerticalSideBarLayout from './VerticalSideBarLayout.astro';
|
|
5
|
-
import { User, Users } from 'lucide-react';
|
|
6
|
-
import { getUsers } from '@utils/collections/users';
|
|
7
|
-
import { getTeams } from '@utils/collections/teams';
|
|
8
4
|
import config from '@config';
|
|
9
5
|
|
|
10
|
-
const users = await getUsers();
|
|
11
|
-
const teams = await getTeams();
|
|
12
|
-
|
|
13
6
|
export interface Props<T extends TCollectionTypes> {
|
|
14
7
|
title: string;
|
|
15
8
|
subtitle: string;
|
|
@@ -18,91 +11,33 @@ export interface Props<T extends TCollectionTypes> {
|
|
|
18
11
|
}
|
|
19
12
|
|
|
20
13
|
const { title, subtitle, data, type } = Astro.props;
|
|
21
|
-
const currentPath = Astro.url.pathname;
|
|
22
14
|
|
|
23
15
|
const checkboxLatestId = 'latest-only';
|
|
24
16
|
const checkboxDraftsId = 'drafts-only';
|
|
25
17
|
|
|
26
18
|
// @ts-ignore
|
|
27
19
|
const tableConfiguration = config[type as keyof typeof config]?.tableConfiguration ?? { columns: {} };
|
|
28
|
-
|
|
29
|
-
const tabs = [
|
|
30
|
-
{
|
|
31
|
-
label: `Users (${users.length})`,
|
|
32
|
-
href: buildUrl('/directory/users'),
|
|
33
|
-
isActive: currentPath === '/directory/users',
|
|
34
|
-
icon: User,
|
|
35
|
-
activeColor: 'orange',
|
|
36
|
-
enabled: users.length > 0,
|
|
37
|
-
visible: users.length > 0,
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
label: `Teams (${teams.length})`,
|
|
41
|
-
href: buildUrl('/directory/teams'),
|
|
42
|
-
isActive: currentPath === '/directory/teams',
|
|
43
|
-
icon: Users,
|
|
44
|
-
activeColor: 'blue',
|
|
45
|
-
enabled: teams.length > 0,
|
|
46
|
-
visible: teams.length > 0,
|
|
47
|
-
},
|
|
48
|
-
];
|
|
49
20
|
---
|
|
50
21
|
|
|
51
22
|
<VerticalSideBarLayout title={`Explore | ${title}`} showNestedSideBar={false}>
|
|
52
|
-
<main
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
.map((tab) => (
|
|
61
|
-
<a
|
|
62
|
-
href={tab.href}
|
|
63
|
-
class:list={[
|
|
64
|
-
'group inline-flex items-center py-4 px-1 text-sm font-light text-[rgb(var(--ec-page-text))]',
|
|
65
|
-
tab.isActive && 'border-b-[2px] border-[rgb(var(--ec-accent))] text-[rgb(var(--ec-accent))]',
|
|
66
|
-
!tab.isActive && 'opacity-70 hover:opacity-100',
|
|
67
|
-
!tab.enabled && 'disabled',
|
|
68
|
-
]}
|
|
69
|
-
aria-current="page"
|
|
70
|
-
>
|
|
71
|
-
<tab.icon
|
|
72
|
-
className={`w-6 h-6 -ml-0.5 mr-2 ${tab.isActive ? 'text-[rgb(var(--ec-accent))]' : 'text-[rgb(var(--ec-icon-color))]'}`}
|
|
73
|
-
/>
|
|
74
|
-
<span>{tab.label}</span>
|
|
75
|
-
</a>
|
|
76
|
-
))
|
|
77
|
-
}
|
|
78
|
-
</nav>
|
|
79
|
-
</div>
|
|
23
|
+
<main
|
|
24
|
+
class="ml-0 bg-[rgb(var(--ec-page-bg))]"
|
|
25
|
+
style="margin-left: calc(var(--ec-app-content-padding-left, 5rem) * -1); margin-right: calc(var(--ec-app-content-padding-right, 5rem) * -1);"
|
|
26
|
+
>
|
|
27
|
+
<div class="p-8 pb-20">
|
|
28
|
+
<div class="min-w-0">
|
|
29
|
+
<h1 class="text-2xl font-semibold text-[rgb(var(--ec-page-text))] capitalize md:text-4xl">{title}</h1>
|
|
30
|
+
<p class="max-w-3xl pt-2 text-base font-light text-[rgb(var(--ec-page-text-muted))]">{subtitle}</p>
|
|
80
31
|
</div>
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
<div class="mt-4 flow-root">
|
|
93
|
-
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
|
|
94
|
-
<div class="inline-block min-w-full align-middle sm:px-6 lg:px-8">
|
|
95
|
-
<Table
|
|
96
|
-
checkboxLatestId={checkboxLatestId}
|
|
97
|
-
checkboxDraftsId={checkboxDraftsId}
|
|
98
|
-
data={data}
|
|
99
|
-
collection={type}
|
|
100
|
-
tableConfiguration={tableConfiguration}
|
|
101
|
-
client:load
|
|
102
|
-
/>
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
32
|
+
<div class="mt-2 min-w-0">
|
|
33
|
+
<Table
|
|
34
|
+
checkboxLatestId={checkboxLatestId}
|
|
35
|
+
checkboxDraftsId={checkboxDraftsId}
|
|
36
|
+
data={data}
|
|
37
|
+
collection={type}
|
|
38
|
+
tableConfiguration={tableConfiguration}
|
|
39
|
+
client:load
|
|
40
|
+
/>
|
|
106
41
|
</div>
|
|
107
42
|
</div>
|
|
108
43
|
</main>
|
|
@@ -112,10 +47,4 @@ const tabs = [
|
|
|
112
47
|
.ec-align-top {
|
|
113
48
|
vertical-align: top !important;
|
|
114
49
|
}
|
|
115
|
-
|
|
116
|
-
a.disabled {
|
|
117
|
-
pointer-events: none;
|
|
118
|
-
cursor: default;
|
|
119
|
-
opacity: 0.25;
|
|
120
|
-
}
|
|
121
50
|
</style>
|