@eventcatalog/core 3.39.3 → 3.39.5
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-ABTA6BYL.js → chunk-H5BZMNK3.js} +1 -1
- package/dist/{chunk-5G6OFPTY.js → chunk-KVAEAYEP.js} +1 -1
- package/dist/{chunk-TUEC7QBE.js → chunk-M4S7PORQ.js} +1 -1
- package/dist/{chunk-MFYIAZEO.js → chunk-S4HLJWQ7.js} +1 -1
- package/dist/{chunk-L4F5FCQK.js → chunk-TNE5QSJ4.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/docs/api/03-domain-api.md +32 -2
- package/dist/docs/api/04-service-api.md +32 -2
- package/dist/docs/api/05-command-api.md +32 -2
- package/dist/docs/api/06-event-api.md +32 -2
- package/dist/docs/api/06-query-api.md +32 -2
- package/dist/docs/api/08-channel-api.md +32 -2
- package/dist/docs/api/09-flow-api.md +32 -2
- package/dist/docs/api/10-entity-api.md +32 -2
- package/dist/docs/api/12-data-product-api.md +14 -2
- 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/Tables/Discover/columns.tsx +2 -0
- package/eventcatalog/src/components/Tables/columns/SharedColumns.tsx +2 -0
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +250 -205
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro +4 -4
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/index.astro +4 -4
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/changelog/index.astro +16 -10
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/graphql/[filename].astro +6 -5
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +22 -51
- package/eventcatalog/src/styles/theme.css +92 -0
- package/eventcatalog/src/utils/badge-styles.ts +206 -0
- package/eventcatalog/src/utils/sidebar-visibility.ts +41 -0
- package/package.json +3 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createColumnHelper } from '@tanstack/react-table';
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
+
import { getBadgeReactStyle } from '@utils/badge-styles';
|
|
3
4
|
import { filterByBadge } from '../filters/custom-filters';
|
|
4
5
|
import type { TCollectionTypes, TData } from '../Table';
|
|
5
6
|
import type { TableConfiguration } from '@types';
|
|
@@ -27,6 +28,7 @@ export const createBadgesColumn = <T extends { data: Pick<TData<U>['data'], 'bad
|
|
|
27
28
|
<span
|
|
28
29
|
key={`${badge.id}-${index}`}
|
|
29
30
|
className="inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-md border border-[rgb(var(--ec-accent)/0.5)] text-[rgb(var(--ec-page-text))] bg-transparent"
|
|
31
|
+
style={getBadgeReactStyle(badge)}
|
|
30
32
|
title={badge.content}
|
|
31
33
|
>
|
|
32
34
|
{badge.content}
|
|
@@ -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
|
@@ -9,6 +9,7 @@ import { buildUrl } from '@utils/url-builder';
|
|
|
9
9
|
import { AlignLeftIcon, HistoryIcon } from 'lucide-react';
|
|
10
10
|
import { isEventCatalogChatEnabled, isResourceDocsEnabled } from '@utils/feature';
|
|
11
11
|
import { getIcon } from '@utils/badges';
|
|
12
|
+
import { getBadgeStyle } from '@utils/badge-styles';
|
|
12
13
|
import { collectionToResourceMap } from '@utils/collections/util';
|
|
13
14
|
|
|
14
15
|
import { Page } from './_index.data';
|
|
@@ -83,13 +84,12 @@ const pagefindAttributes =
|
|
|
83
84
|
<span
|
|
84
85
|
class={`
|
|
85
86
|
inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium
|
|
86
|
-
bg-[rgb(var(--ec-content-hover))] border border-[rgb(var(--ec-page-border))]
|
|
87
|
+
${badge.backgroundColor ? 'bg-[rgb(var(--ec-content-hover))]' : 'bg-transparent'} border border-[rgb(var(--ec-page-border))]
|
|
87
88
|
text-[rgb(var(--ec-page-text))]
|
|
88
89
|
`}
|
|
90
|
+
style={getBadgeStyle(badge)}
|
|
89
91
|
>
|
|
90
|
-
{badge.iconComponent &&
|
|
91
|
-
<badge.iconComponent className="w-4 h-4 flex-shrink-0 text-[rgb(var(--ec-icon-color))]" />
|
|
92
|
-
)}
|
|
92
|
+
{badge.iconComponent && <badge.iconComponent className="w-4 h-4 flex-shrink-0" />}
|
|
93
93
|
<span>{badge.content}</span>
|
|
94
94
|
</span>
|
|
95
95
|
))}
|
|
@@ -9,6 +9,7 @@ import { buildUrl } from '@utils/url-builder';
|
|
|
9
9
|
import { AlignLeftIcon, HistoryIcon } from 'lucide-react';
|
|
10
10
|
import { isEventCatalogChatEnabled, isResourceDocsEnabled } from '@utils/feature';
|
|
11
11
|
import { getIcon } from '@utils/badges';
|
|
12
|
+
import { getBadgeStyle } from '@utils/badge-styles';
|
|
12
13
|
import { collectionToResourceMap } from '@utils/collections/util';
|
|
13
14
|
|
|
14
15
|
import { Page } from './_index.data';
|
|
@@ -76,13 +77,12 @@ const pagefindAttributes =
|
|
|
76
77
|
<span
|
|
77
78
|
class={`
|
|
78
79
|
inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium
|
|
79
|
-
bg-[rgb(var(--ec-content-hover))] border border-[rgb(var(--ec-page-border))]
|
|
80
|
+
${badge.backgroundColor ? 'bg-[rgb(var(--ec-content-hover))]' : 'bg-transparent'} border border-[rgb(var(--ec-page-border))]
|
|
80
81
|
text-[rgb(var(--ec-page-text))]
|
|
81
82
|
`}
|
|
83
|
+
style={getBadgeStyle(badge)}
|
|
82
84
|
>
|
|
83
|
-
{badge.iconComponent &&
|
|
84
|
-
<badge.iconComponent className="w-4 h-4 flex-shrink-0 text-[rgb(var(--ec-icon-color))]" />
|
|
85
|
-
)}
|
|
85
|
+
{badge.iconComponent && <badge.iconComponent className="w-4 h-4 flex-shrink-0" />}
|
|
86
86
|
<span>{badge.content}</span>
|
|
87
87
|
</span>
|
|
88
88
|
))}
|
|
@@ -15,6 +15,7 @@ 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';
|
|
18
19
|
import { getPreviousVersion } from '@utils/collections/util';
|
|
19
20
|
import { getDiffsForCurrentAndPreviousVersion } from '@utils/file-diffs';
|
|
20
21
|
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
@@ -71,27 +72,29 @@ const logListPromise = logsToRender.map(async (log, index) => {
|
|
|
71
72
|
|
|
72
73
|
const logList = await Promise.all(logListPromise);
|
|
73
74
|
|
|
75
|
+
const createResourceBadge = (content: string, icon: any) => ({ content, icon, textColor: 'gray' });
|
|
76
|
+
|
|
74
77
|
const getBadge = () => {
|
|
75
78
|
if (props.collection === 'services') {
|
|
76
|
-
return
|
|
79
|
+
return createResourceBadge('Service', ServerIcon);
|
|
77
80
|
}
|
|
78
81
|
if (props.collection === 'events') {
|
|
79
|
-
return
|
|
82
|
+
return createResourceBadge('Event', BoltIcon);
|
|
80
83
|
}
|
|
81
84
|
if (props.collection === 'commands') {
|
|
82
|
-
return
|
|
85
|
+
return createResourceBadge('Command', ChatBubbleLeftIcon);
|
|
83
86
|
}
|
|
84
87
|
if (props.collection === 'queries') {
|
|
85
|
-
return
|
|
88
|
+
return createResourceBadge('Query', MagnifyingGlassIcon);
|
|
86
89
|
}
|
|
87
90
|
if (props.collection === 'domains') {
|
|
88
|
-
return
|
|
91
|
+
return createResourceBadge('Domain', RectangleGroupIcon);
|
|
89
92
|
}
|
|
90
93
|
if (props.collection === 'containers') {
|
|
91
|
-
return
|
|
94
|
+
return createResourceBadge('Container', DatabaseIcon);
|
|
92
95
|
}
|
|
93
96
|
if (props.collection === 'flows') {
|
|
94
|
-
return
|
|
97
|
+
return createResourceBadge('Flow', QueueListIcon);
|
|
95
98
|
}
|
|
96
99
|
};
|
|
97
100
|
|
|
@@ -141,8 +144,8 @@ const badges = [getBadge()];
|
|
|
141
144
|
<div class="flex flex-wrap py-2 pt-4">
|
|
142
145
|
{badges.map((badge: any) => (
|
|
143
146
|
<span
|
|
144
|
-
class="text-sm font-medium px-2 py-1 rounded-md mr-2 space-x-1 flex items-center"
|
|
145
|
-
style={
|
|
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)}
|
|
146
149
|
>
|
|
147
150
|
{badge.icon && <badge.icon className="w-4 h-4 inline-block mr-1" />}
|
|
148
151
|
<span>{badge.content}</span>
|
|
@@ -192,7 +195,10 @@ const badges = [getBadge()];
|
|
|
192
195
|
{log.badges && (
|
|
193
196
|
<div class="flex flex-wrap">
|
|
194
197
|
{log.badges.map((badge: any) => (
|
|
195
|
-
<span
|
|
198
|
+
<span
|
|
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
|
+
>
|
|
196
202
|
{badge.icon && <badge.icon className="w-4 h-4 inline-block mr-1" />}
|
|
197
203
|
<span>{badge.content}</span>
|
|
198
204
|
</span>
|