@eventcatalog/core 3.39.4 → 3.39.6
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-NSR4DZXS.js → chunk-4OSFLWLG.js} +1 -1
- package/dist/{chunk-WLUQZCIH.js → chunk-IKZ5ITXP.js} +1 -1
- package/dist/{chunk-PVOVC2UV.js → chunk-LEUIMTEQ.js} +1 -1
- package/dist/{chunk-O2CZERUN.js → chunk-MQAZ4LXP.js} +1 -1
- package/dist/{chunk-ONQOIF2X.js → chunk-ORVOST63.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/docs/api/03-domain-api.md +16 -0
- package/dist/docs/api/04-service-api.md +16 -0
- package/dist/docs/api/05-command-api.md +16 -0
- package/dist/docs/api/06-event-api.md +16 -0
- package/dist/docs/api/06-query-api.md +16 -0
- package/dist/docs/api/08-channel-api.md +16 -0
- package/dist/docs/api/09-flow-api.md +16 -0
- package/dist/docs/api/10-entity-api.md +15 -0
- package/dist/docs/api/12-data-product-api.md +17 -0
- package/dist/docs/development/01-fundamentals.md +7 -0
- package/dist/docs/development/01-getting-started/installation.md +8 -0
- package/dist/docs/development/01-getting-started/project-structure.md +2 -0
- package/dist/docs/development/bring-your-own-documentation/01-introduction.md +3 -1
- package/dist/docs/development/customization/customize-sidebars/00-application-sidebar.md +45 -5
- package/dist/docs/editor/00-overview.md +73 -0
- package/dist/docs/editor/01-first-edit.md +124 -0
- package/dist/docs/editor/_category_.json +12 -0
- package/dist/docs/editor/explanation/_category_.json +11 -0
- package/dist/docs/editor/explanation/beta-status-feedback.md +48 -0
- package/dist/docs/editor/explanation/how-it-works.md +49 -0
- package/dist/docs/editor/explanation/markdown-mdx-git.md +58 -0
- package/dist/docs/editor/how-to/_category_.json +11 -0
- package/dist/docs/editor/how-to/add-schemas-and-specifications.md +66 -0
- package/dist/docs/editor/how-to/edit-resource.md +88 -0
- package/dist/docs/editor/how-to/invite-editors.md +68 -0
- package/dist/docs/editor/how-to/open-catalog.md +44 -0
- package/dist/docs/editor/how-to/preview-changes.md +55 -0
- package/dist/docs/editor/how-to/revert-local-changes.md +43 -0
- package/dist/docs/editor/how-to/review-and-commit-changes.md +57 -0
- package/dist/docs/editor/how-to/run-locally.md +71 -0
- package/dist/docs/editor/how-to/use-flow-editor.md +66 -0
- package/dist/docs/editor/how-to/use-slash-commands.md +67 -0
- package/dist/docs/editor/reference/_category_.json +11 -0
- package/dist/docs/editor/reference/cli.md +61 -0
- package/dist/docs/editor/reference/supported-content.md +81 -0
- package/dist/docs/editor/reference/supported-resources.md +51 -0
- package/dist/docs/editor/reference/troubleshooting.md +76 -0
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.js +5 -5
- 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/eventcatalog/src/components/Badge.astro +50 -0
- package/eventcatalog/src/components/Tables/Discover/DiscoverTable.tsx +1 -0
- package/eventcatalog/src/components/Tables/Discover/columns.tsx +35 -13
- package/eventcatalog/src/components/Tables/Table.tsx +1 -0
- package/eventcatalog/src/components/Tables/columns/SharedColumns.tsx +24 -11
- package/eventcatalog/src/content.config-shared-collections.ts +1 -0
- package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/index.astro +2 -18
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +250 -205
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro +2 -14
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/index.astro +2 -14
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/changelog/index.astro +3 -15
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/graphql/[filename].astro +2 -18
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +2 -18
- package/eventcatalog/src/pages/docs/[type]/[id]/language/[dictionaryId]/index.astro +2 -11
- package/eventcatalog/src/utils/badge-styles.ts +31 -0
- package/eventcatalog/src/utils/sidebar-visibility.ts +41 -0
- package/package.json +4 -4
|
@@ -64,6 +64,7 @@ import { isCollectionVisibleInCatalog } from '@eventcatalog';
|
|
|
64
64
|
import { buildUrl } from '@utils/url-builder';
|
|
65
65
|
import { getQueries } from '@utils/collections/queries';
|
|
66
66
|
import { hasLandingPageForDocs } from '@utils/pages';
|
|
67
|
+
import { filterSidebarItems } from '@utils/sidebar-visibility';
|
|
67
68
|
|
|
68
69
|
import { isEmbedEnabled, isCustomStylesEnabled, isEventCatalogScaleEnabled, isCustomDocsEnabled, isSSR } from '@utils/feature';
|
|
69
70
|
|
|
@@ -128,66 +129,66 @@ const getDefaultUrl = (route: string, defaultValue: string) => {
|
|
|
128
129
|
|
|
129
130
|
const userSideBarConfiguration = config.sidebar || [];
|
|
130
131
|
|
|
131
|
-
const navigationItems =
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
]
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
const studioNavigationItem =
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
132
|
+
const navigationItems = filterSidebarItems(
|
|
133
|
+
[
|
|
134
|
+
{
|
|
135
|
+
id: '/',
|
|
136
|
+
label: 'Catalog',
|
|
137
|
+
icon: BookOpen,
|
|
138
|
+
href: buildUrl(config.landingPage || '/'),
|
|
139
|
+
current:
|
|
140
|
+
currentPath === '/' ||
|
|
141
|
+
(currentPath.includes('/docs') && !currentPath.includes('/docs/custom')) ||
|
|
142
|
+
currentPath.includes('/architecture/') ||
|
|
143
|
+
currentPath.includes('/visualiser') ||
|
|
144
|
+
(currentPath.includes('/schemas') &&
|
|
145
|
+
!currentPath.includes('/schemas/explorer') &&
|
|
146
|
+
!currentPath.includes('/schemas/fields')),
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
id: '/docs/custom',
|
|
150
|
+
aliases: ['/docs'],
|
|
151
|
+
label: 'Documentation',
|
|
152
|
+
icon: FileText,
|
|
153
|
+
href: getDefaultUrl('docs/custom', '/docs/custom'),
|
|
154
|
+
current: currentPath.includes('/docs/custom'),
|
|
155
|
+
isPremium: true,
|
|
156
|
+
visible: isCustomDocsEnabled() && customDocs.length > 0,
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
id: '/schemas/explorer',
|
|
160
|
+
label: 'Schemas',
|
|
161
|
+
icon: FileCode,
|
|
162
|
+
href: buildUrl('/schemas/explorer'),
|
|
163
|
+
current: currentPath.includes('/schemas/explorer') && !currentPath.includes('/schemas/fields'),
|
|
164
|
+
},
|
|
165
|
+
...(isSSR()
|
|
166
|
+
? [
|
|
167
|
+
{
|
|
168
|
+
id: '/schemas/fields',
|
|
169
|
+
label: 'Schema Insights',
|
|
170
|
+
icon: Waypoints,
|
|
171
|
+
href: buildUrl('/schemas/fields'),
|
|
172
|
+
current: currentPath.includes('/schemas/fields'),
|
|
173
|
+
},
|
|
174
|
+
]
|
|
175
|
+
: []),
|
|
176
|
+
],
|
|
177
|
+
userSideBarConfiguration
|
|
178
|
+
);
|
|
179
|
+
|
|
180
|
+
const studioNavigationItem = filterSidebarItems(
|
|
181
|
+
[
|
|
182
|
+
{
|
|
183
|
+
id: '/studio',
|
|
184
|
+
label: 'EventCatalog Studio',
|
|
185
|
+
icon: SquareDashedMousePointerIcon,
|
|
186
|
+
href: buildUrl('/studio'),
|
|
187
|
+
current: currentPath.includes('/studio'),
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
userSideBarConfiguration
|
|
191
|
+
);
|
|
191
192
|
|
|
192
193
|
const premiumFeatures: Array<{
|
|
193
194
|
id: string;
|
|
@@ -198,86 +199,119 @@ const premiumFeatures: Array<{
|
|
|
198
199
|
isPremium?: boolean;
|
|
199
200
|
}> = [];
|
|
200
201
|
|
|
201
|
-
const browseItems =
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
202
|
+
const browseItems = filterSidebarItems(
|
|
203
|
+
[
|
|
204
|
+
{
|
|
205
|
+
id: '/discover/domains',
|
|
206
|
+
aliases: ['/discover'],
|
|
207
|
+
label: 'Domains',
|
|
208
|
+
icon: RectangleGroupIcon,
|
|
209
|
+
href: buildUrl('/discover/domains'),
|
|
210
|
+
current: currentPath === buildUrl('/discover/domains'),
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
id: '/discover/services',
|
|
214
|
+
aliases: ['/discover'],
|
|
215
|
+
label: 'Services',
|
|
216
|
+
icon: ServerIcon,
|
|
217
|
+
href: buildUrl('/discover/services'),
|
|
218
|
+
current: currentPath === buildUrl('/discover/services'),
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
id: '/discover/external-systems',
|
|
222
|
+
aliases: ['/discover'],
|
|
223
|
+
label: 'External Systems',
|
|
224
|
+
icon: GlobeAltIcon,
|
|
225
|
+
href: buildUrl('/discover/external-systems'),
|
|
226
|
+
current: currentPath === buildUrl('/discover/external-systems'),
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
id: '/discover/events',
|
|
230
|
+
aliases: ['/discover'],
|
|
231
|
+
label: 'Events',
|
|
232
|
+
icon: BoltIcon,
|
|
233
|
+
href: buildUrl('/discover/events'),
|
|
234
|
+
current: currentPath === buildUrl('/discover/events'),
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
id: '/discover/commands',
|
|
238
|
+
aliases: ['/discover'],
|
|
239
|
+
label: 'Commands',
|
|
240
|
+
icon: ChatBubbleLeftIcon,
|
|
241
|
+
href: buildUrl('/discover/commands'),
|
|
242
|
+
current: currentPath === buildUrl('/discover/commands'),
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
id: '/discover/queries',
|
|
246
|
+
aliases: ['/discover'],
|
|
247
|
+
label: 'Queries',
|
|
248
|
+
icon: MagnifyingGlassIcon,
|
|
249
|
+
href: buildUrl('/discover/queries'),
|
|
250
|
+
current: currentPath === buildUrl('/discover/queries'),
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
id: '/discover/flows',
|
|
254
|
+
aliases: ['/discover'],
|
|
255
|
+
label: 'Flows',
|
|
256
|
+
icon: QueueListIcon,
|
|
257
|
+
href: buildUrl('/discover/flows'),
|
|
258
|
+
current: currentPath === buildUrl('/discover/flows'),
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
id: '/discover/containers',
|
|
262
|
+
aliases: ['/discover'],
|
|
263
|
+
label: 'Data Stores',
|
|
264
|
+
icon: Database,
|
|
265
|
+
href: buildUrl('/discover/containers'),
|
|
266
|
+
current: currentPath === buildUrl('/discover/containers'),
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
id: '/discover/data-products',
|
|
270
|
+
aliases: ['/discover'],
|
|
271
|
+
label: 'Data Products',
|
|
272
|
+
icon: CubeIcon,
|
|
273
|
+
href: buildUrl('/discover/data-products'),
|
|
274
|
+
current: currentPath === buildUrl('/discover/data-products'),
|
|
275
|
+
},
|
|
276
|
+
],
|
|
277
|
+
userSideBarConfiguration
|
|
278
|
+
);
|
|
279
|
+
|
|
280
|
+
const organizationItems = filterSidebarItems(
|
|
281
|
+
[
|
|
282
|
+
{
|
|
283
|
+
id: '/directory/teams',
|
|
284
|
+
aliases: ['/directory'],
|
|
285
|
+
label: 'Teams',
|
|
286
|
+
icon: UsersRound,
|
|
287
|
+
href: buildUrl('/directory/teams'),
|
|
288
|
+
current: currentPath === buildUrl('/directory/teams'),
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
id: '/directory/users',
|
|
292
|
+
aliases: ['/directory'],
|
|
293
|
+
label: 'Users',
|
|
294
|
+
icon: UserRound,
|
|
295
|
+
href: buildUrl('/directory/users'),
|
|
296
|
+
current: currentPath === buildUrl('/directory/users'),
|
|
297
|
+
},
|
|
298
|
+
],
|
|
299
|
+
userSideBarConfiguration
|
|
300
|
+
);
|
|
301
|
+
|
|
302
|
+
const settingsItems = filterSidebarItems(
|
|
303
|
+
[
|
|
304
|
+
{
|
|
305
|
+
id: '/settings/general',
|
|
306
|
+
aliases: ['/settings'],
|
|
307
|
+
label: 'Settings',
|
|
308
|
+
icon: Settings,
|
|
309
|
+
href: buildUrl('/settings/general'),
|
|
310
|
+
current: currentPath.startsWith(buildUrl('/settings')),
|
|
311
|
+
},
|
|
312
|
+
],
|
|
313
|
+
userSideBarConfiguration
|
|
314
|
+
);
|
|
281
315
|
|
|
282
316
|
const currentNavigationItem = [...navigationItems, ...studioNavigationItem, ...premiumFeatures].find((item) => item.current);
|
|
283
317
|
const { title, description, showNestedSideBar = true, showHeader = true } = Astro.props;
|
|
@@ -521,58 +555,64 @@ const canPageBeEmbedded = isEmbedEnabled();
|
|
|
521
555
|
})
|
|
522
556
|
}
|
|
523
557
|
|
|
524
|
-
<hr class="rail-divider my-3 border-t border-[rgb(var(--ec-sidebar-border)/0.7)]" />
|
|
525
|
-
|
|
526
|
-
<div
|
|
527
|
-
class="rail-section-label px-3 pb-1 text-[0.65rem] font-semibold tracking-[0.18em] uppercase text-[rgb(var(--ec-sidebar-text)/0.5)]"
|
|
528
|
-
>
|
|
529
|
-
Browse
|
|
530
|
-
</div>
|
|
531
|
-
|
|
532
558
|
{
|
|
533
|
-
browseItems.
|
|
534
|
-
<
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
559
|
+
browseItems.length > 0 && (
|
|
560
|
+
<Fragment>
|
|
561
|
+
<hr class="rail-divider my-3 border-t border-[rgb(var(--ec-sidebar-border)/0.7)]" />
|
|
562
|
+
|
|
563
|
+
<div class="rail-section-label px-3 pb-1 text-[0.65rem] font-semibold tracking-[0.18em] uppercase text-[rgb(var(--ec-sidebar-text)/0.5)]">
|
|
564
|
+
Browse
|
|
565
|
+
</div>
|
|
566
|
+
|
|
567
|
+
{browseItems.map((item) => (
|
|
568
|
+
<a
|
|
569
|
+
id={item.id}
|
|
570
|
+
href={item.href}
|
|
571
|
+
data-role="secondary-nav-item"
|
|
572
|
+
aria-label={item.label}
|
|
573
|
+
class={`nav-secondary-item flex items-center gap-3 px-3 py-2.5 rounded-xl border text-[13px] font-medium transition-all duration-150 ${
|
|
574
|
+
item.current
|
|
575
|
+
? 'border-[rgb(var(--ec-accent)/0.2)] bg-[rgb(var(--ec-page-bg)/0.88)] text-[rgb(var(--ec-accent))] shadow-sm'
|
|
576
|
+
: 'border-transparent text-[rgb(var(--ec-sidebar-text))] hover:border-[rgb(var(--ec-sidebar-border)/0.65)] hover:bg-[rgb(var(--ec-page-bg)/0.78)] hover:text-[rgb(var(--ec-page-text))]'
|
|
577
|
+
}`}
|
|
578
|
+
title={item.label}
|
|
579
|
+
>
|
|
580
|
+
<item.icon className="h-3.5 w-3.5 flex-shrink-0" aria-hidden="true" />
|
|
581
|
+
<span class="nav-item-label">{item.label}</span>
|
|
582
|
+
</a>
|
|
583
|
+
))}
|
|
584
|
+
</Fragment>
|
|
585
|
+
)
|
|
549
586
|
}
|
|
550
587
|
|
|
551
|
-
<hr class="rail-divider my-3 border-t border-[rgb(var(--ec-sidebar-border)/0.7)]" />
|
|
552
|
-
|
|
553
|
-
<div
|
|
554
|
-
class="rail-section-label px-3 pb-1 text-[0.65rem] font-semibold tracking-[0.18em] uppercase text-[rgb(var(--ec-sidebar-text)/0.5)]"
|
|
555
|
-
>
|
|
556
|
-
Organization
|
|
557
|
-
</div>
|
|
558
|
-
|
|
559
588
|
{
|
|
560
|
-
organizationItems.
|
|
561
|
-
<
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
589
|
+
organizationItems.length > 0 && (
|
|
590
|
+
<Fragment>
|
|
591
|
+
<hr class="rail-divider my-3 border-t border-[rgb(var(--ec-sidebar-border)/0.7)]" />
|
|
592
|
+
|
|
593
|
+
<div class="rail-section-label px-3 pb-1 text-[0.65rem] font-semibold tracking-[0.18em] uppercase text-[rgb(var(--ec-sidebar-text)/0.5)]">
|
|
594
|
+
Organization
|
|
595
|
+
</div>
|
|
596
|
+
|
|
597
|
+
{organizationItems.map((item) => (
|
|
598
|
+
<a
|
|
599
|
+
id={item.id}
|
|
600
|
+
href={item.href}
|
|
601
|
+
data-role="secondary-nav-item"
|
|
602
|
+
aria-label={item.label}
|
|
603
|
+
class={`nav-secondary-item flex items-center gap-3 px-3 py-2.5 rounded-xl border text-[13px] font-medium transition-all duration-150 ${
|
|
604
|
+
item.current
|
|
605
|
+
? 'border-[rgb(var(--ec-accent)/0.2)] bg-[rgb(var(--ec-page-bg)/0.88)] text-[rgb(var(--ec-accent))] shadow-sm'
|
|
606
|
+
: 'border-transparent text-[rgb(var(--ec-sidebar-text))] hover:border-[rgb(var(--ec-sidebar-border)/0.65)] hover:bg-[rgb(var(--ec-page-bg)/0.78)] hover:text-[rgb(var(--ec-page-text))]'
|
|
607
|
+
}`}
|
|
608
|
+
title={item.label}
|
|
609
|
+
>
|
|
610
|
+
<item.icon className="h-3.5 w-3.5 flex-shrink-0" aria-hidden="true" />
|
|
611
|
+
<span class="nav-item-label">{item.label}</span>
|
|
612
|
+
</a>
|
|
613
|
+
))}
|
|
614
|
+
</Fragment>
|
|
615
|
+
)
|
|
576
616
|
}
|
|
577
617
|
|
|
578
618
|
{premiumFeatures.length > 0 && <hr class="rail-divider my-2 border-t border-[rgb(var(--ec-sidebar-border)/0.7)]" />}
|
|
@@ -598,24 +638,29 @@ const canPageBeEmbedded = isEmbedEnabled();
|
|
|
598
638
|
}
|
|
599
639
|
|
|
600
640
|
<div class="mt-auto pt-3">
|
|
601
|
-
<hr class="rail-divider mb-3 border-t border-[rgb(var(--ec-sidebar-border)/0.7)]" />
|
|
602
641
|
{
|
|
603
|
-
settingsItems.
|
|
604
|
-
<
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
642
|
+
settingsItems.length > 0 && (
|
|
643
|
+
<Fragment>
|
|
644
|
+
<hr class="rail-divider mb-3 border-t border-[rgb(var(--ec-sidebar-border)/0.7)]" />
|
|
645
|
+
{settingsItems.map((item) => (
|
|
646
|
+
<a
|
|
647
|
+
id={item.id}
|
|
648
|
+
href={item.href}
|
|
649
|
+
data-role="secondary-nav-item"
|
|
650
|
+
aria-label={item.label}
|
|
651
|
+
class={`nav-secondary-item flex items-center gap-3 px-3 py-2.5 rounded-xl border text-[13px] font-medium transition-all duration-150 ${
|
|
652
|
+
item.current
|
|
653
|
+
? 'border-[rgb(var(--ec-accent)/0.2)] bg-[rgb(var(--ec-page-bg)/0.88)] text-[rgb(var(--ec-accent))] shadow-sm'
|
|
654
|
+
: 'border-transparent text-[rgb(var(--ec-sidebar-text))] hover:border-[rgb(var(--ec-sidebar-border)/0.65)] hover:bg-[rgb(var(--ec-page-bg)/0.78)] hover:text-[rgb(var(--ec-page-text))]'
|
|
655
|
+
}`}
|
|
656
|
+
title={item.label}
|
|
657
|
+
>
|
|
658
|
+
<item.icon className="h-4 w-4 flex-shrink-0" aria-hidden="true" />
|
|
659
|
+
<span class="nav-item-label">{item.label}</span>
|
|
660
|
+
</a>
|
|
661
|
+
))}
|
|
662
|
+
</Fragment>
|
|
663
|
+
)
|
|
619
664
|
}
|
|
620
665
|
</div>
|
|
621
666
|
</nav>
|
package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro
CHANGED
|
@@ -5,11 +5,11 @@ import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
|
5
5
|
import Admonition from '@components/MDX/Admonition';
|
|
6
6
|
import components from '@components/MDX/components';
|
|
7
7
|
import CopyAsMarkdown from '@components/CopyAsMarkdown';
|
|
8
|
+
import Badge from '@components/Badge.astro';
|
|
8
9
|
import { buildUrl } from '@utils/url-builder';
|
|
9
10
|
import { AlignLeftIcon, HistoryIcon } from 'lucide-react';
|
|
10
11
|
import { isEventCatalogChatEnabled, isResourceDocsEnabled } from '@utils/feature';
|
|
11
12
|
import { getIcon } from '@utils/badges';
|
|
12
|
-
import { getBadgeStyle } from '@utils/badge-styles';
|
|
13
13
|
import { collectionToResourceMap } from '@utils/collections/util';
|
|
14
14
|
|
|
15
15
|
import { Page } from './_index.data';
|
|
@@ -80,19 +80,7 @@ const pagefindAttributes =
|
|
|
80
80
|
{
|
|
81
81
|
badges.length > 0 && (
|
|
82
82
|
<div class="flex flex-wrap gap-3 py-4">
|
|
83
|
-
{badges.map((badge: any) =>
|
|
84
|
-
<span
|
|
85
|
-
class={`
|
|
86
|
-
inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium
|
|
87
|
-
${badge.backgroundColor ? 'bg-[rgb(var(--ec-content-hover))]' : 'bg-transparent'} border border-[rgb(var(--ec-page-border))]
|
|
88
|
-
text-[rgb(var(--ec-page-text))]
|
|
89
|
-
`}
|
|
90
|
-
style={getBadgeStyle(badge)}
|
|
91
|
-
>
|
|
92
|
-
{badge.iconComponent && <badge.iconComponent className="w-4 h-4 flex-shrink-0" />}
|
|
93
|
-
<span>{badge.content}</span>
|
|
94
|
-
</span>
|
|
95
|
-
))}
|
|
83
|
+
{badges.map((badge: any) => <Badge badge={badge} />)}
|
|
96
84
|
</div>
|
|
97
85
|
)
|
|
98
86
|
}
|
|
@@ -5,11 +5,11 @@ import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
|
5
5
|
import Admonition from '@components/MDX/Admonition';
|
|
6
6
|
import components from '@components/MDX/components';
|
|
7
7
|
import CopyAsMarkdown from '@components/CopyAsMarkdown';
|
|
8
|
+
import Badge from '@components/Badge.astro';
|
|
8
9
|
import { buildUrl } from '@utils/url-builder';
|
|
9
10
|
import { AlignLeftIcon, HistoryIcon } from 'lucide-react';
|
|
10
11
|
import { isEventCatalogChatEnabled, isResourceDocsEnabled } from '@utils/feature';
|
|
11
12
|
import { getIcon } from '@utils/badges';
|
|
12
|
-
import { getBadgeStyle } from '@utils/badge-styles';
|
|
13
13
|
import { collectionToResourceMap } from '@utils/collections/util';
|
|
14
14
|
|
|
15
15
|
import { Page } from './_index.data';
|
|
@@ -73,19 +73,7 @@ const pagefindAttributes =
|
|
|
73
73
|
{
|
|
74
74
|
badges.length > 0 && (
|
|
75
75
|
<div class="flex flex-wrap gap-3 py-4">
|
|
76
|
-
{badges.map((badge: any) =>
|
|
77
|
-
<span
|
|
78
|
-
class={`
|
|
79
|
-
inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium
|
|
80
|
-
${badge.backgroundColor ? 'bg-[rgb(var(--ec-content-hover))]' : 'bg-transparent'} border border-[rgb(var(--ec-page-border))]
|
|
81
|
-
text-[rgb(var(--ec-page-text))]
|
|
82
|
-
`}
|
|
83
|
-
style={getBadgeStyle(badge)}
|
|
84
|
-
>
|
|
85
|
-
{badge.iconComponent && <badge.iconComponent className="w-4 h-4 flex-shrink-0" />}
|
|
86
|
-
<span>{badge.content}</span>
|
|
87
|
-
</span>
|
|
88
|
-
))}
|
|
76
|
+
{badges.map((badge: any) => <Badge badge={badge} />)}
|
|
89
77
|
</div>
|
|
90
78
|
)
|
|
91
79
|
}
|
|
@@ -15,10 +15,10 @@ import mdxComponents from '@components/MDX/components';
|
|
|
15
15
|
import 'diff2html/bundles/css/diff2html.min.css';
|
|
16
16
|
|
|
17
17
|
import { buildUrl } from '@utils/url-builder';
|
|
18
|
-
import { getBadgeStyle } from '@utils/badge-styles';
|
|
19
18
|
import { getPreviousVersion } from '@utils/collections/util';
|
|
20
19
|
import { getDiffsForCurrentAndPreviousVersion } from '@utils/file-diffs';
|
|
21
20
|
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
21
|
+
import Badge from '@components/Badge.astro';
|
|
22
22
|
import { ClientRouter } from 'astro:transitions';
|
|
23
23
|
import { isChangelogEnabled } from '@utils/feature';
|
|
24
24
|
|
|
@@ -143,13 +143,7 @@ const badges = [getBadge()];
|
|
|
143
143
|
badges && (
|
|
144
144
|
<div class="flex flex-wrap py-2 pt-4">
|
|
145
145
|
{badges.map((badge: any) => (
|
|
146
|
-
<
|
|
147
|
-
class="text-sm font-medium px-2 py-1 rounded-md mr-2 space-x-1 flex items-center bg-transparent border border-[rgb(var(--ec-page-border))]"
|
|
148
|
-
style={getBadgeStyle(badge)}
|
|
149
|
-
>
|
|
150
|
-
{badge.icon && <badge.icon className="w-4 h-4 inline-block mr-1" />}
|
|
151
|
-
<span>{badge.content}</span>
|
|
152
|
-
</span>
|
|
146
|
+
<Badge badge={badge} className="mr-2 px-2 py-1 rounded-md" />
|
|
153
147
|
))}
|
|
154
148
|
</div>
|
|
155
149
|
)
|
|
@@ -195,13 +189,7 @@ const badges = [getBadge()];
|
|
|
195
189
|
{log.badges && (
|
|
196
190
|
<div class="flex flex-wrap">
|
|
197
191
|
{log.badges.map((badge: any) => (
|
|
198
|
-
<
|
|
199
|
-
class="text-sm font-medium px-2 py-1 rounded-md mr-2 space-x-1 flex items-center bg-[rgb(var(--ec-badge-default-bg))] text-[rgb(var(--ec-badge-default-text))]"
|
|
200
|
-
style={getBadgeStyle(badge)}
|
|
201
|
-
>
|
|
202
|
-
{badge.icon && <badge.icon className="w-4 h-4 inline-block mr-1" />}
|
|
203
|
-
<span>{badge.content}</span>
|
|
204
|
-
</span>
|
|
192
|
+
<Badge badge={badge} className="mr-2 px-2 py-1 rounded-md" />
|
|
205
193
|
))}
|
|
206
194
|
</div>
|
|
207
195
|
)}
|
|
@@ -7,8 +7,8 @@ import Footer from '@layouts/Footer.astro';
|
|
|
7
7
|
import { Page } from './_[filename].data';
|
|
8
8
|
import { getAbsoluteFilePathForAstroFile } from '@utils/files';
|
|
9
9
|
import { buildUrl, buildEditUrlForResource } from '@utils/url-builder';
|
|
10
|
-
import { getBadgeStyle } from '@utils/badge-styles';
|
|
11
10
|
import Admonition from '@components/MDX/Admonition';
|
|
11
|
+
import Badge from '@components/Badge.astro';
|
|
12
12
|
|
|
13
13
|
import { ServerIcon } from '@heroicons/react/24/outline';
|
|
14
14
|
|
|
@@ -83,23 +83,7 @@ const pagefindAttributes =
|
|
|
83
83
|
badges && badges.length > 0 && (
|
|
84
84
|
<div class="flex flex-wrap gap-3 py-4">
|
|
85
85
|
{badges.map((badge: any) => {
|
|
86
|
-
return
|
|
87
|
-
<span
|
|
88
|
-
id={badge.id || ''}
|
|
89
|
-
class={`
|
|
90
|
-
inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium
|
|
91
|
-
${badge.backgroundColor ? 'bg-[rgb(var(--ec-content-hover))]' : 'bg-transparent'} border border-[rgb(var(--ec-page-border))]
|
|
92
|
-
text-[rgb(var(--ec-page-text))]
|
|
93
|
-
shadow-xs
|
|
94
|
-
${badge.class ? badge.class : ''}
|
|
95
|
-
`}
|
|
96
|
-
style={getBadgeStyle(badge)}
|
|
97
|
-
>
|
|
98
|
-
{badge.icon && <badge.icon className="w-4 h-4 flex-shrink-0" />}
|
|
99
|
-
{badge.iconURL && <img src={badge.iconURL} class="w-4 h-4 flex-shrink-0 opacity-80" alt="" />}
|
|
100
|
-
<span>{badge.content}</span>
|
|
101
|
-
</span>
|
|
102
|
-
);
|
|
86
|
+
return <Badge badge={badge} />;
|
|
103
87
|
})}
|
|
104
88
|
</div>
|
|
105
89
|
)
|