@eventcatalog/core 3.39.4 → 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-ONQOIF2X.js → chunk-H5BZMNK3.js} +1 -1
- package/dist/{chunk-O2CZERUN.js → chunk-KVAEAYEP.js} +1 -1
- package/dist/{chunk-NSR4DZXS.js → chunk-M4S7PORQ.js} +1 -1
- package/dist/{chunk-PVOVC2UV.js → chunk-S4HLJWQ7.js} +1 -1
- package/dist/{chunk-WLUQZCIH.js → chunk-TNE5QSJ4.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- 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/layouts/VerticalSideBarLayout.astro +250 -205
- package/eventcatalog/src/utils/sidebar-visibility.ts +41 -0
- package/package.json +3 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-KVAEAYEP.js";
|
|
4
|
+
import "../chunk-H5BZMNK3.js";
|
|
5
5
|
import "../chunk-4UVFXLPI.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-TNE5QSJ4.js";
|
|
7
7
|
import "../chunk-5T63CXKU.js";
|
|
8
8
|
export {
|
|
9
9
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -114,7 +114,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
114
114
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
115
115
|
|
|
116
116
|
// package.json
|
|
117
|
-
var version = "3.39.
|
|
117
|
+
var version = "3.39.5";
|
|
118
118
|
|
|
119
119
|
// src/constants.ts
|
|
120
120
|
var VERSION = version;
|
package/dist/eventcatalog.js
CHANGED
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
} from "./chunk-K3ZVEX2Y.js";
|
|
14
14
|
import {
|
|
15
15
|
log_build_default
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-KVAEAYEP.js";
|
|
17
|
+
import "./chunk-H5BZMNK3.js";
|
|
18
18
|
import "./chunk-4UVFXLPI.js";
|
|
19
19
|
import {
|
|
20
20
|
catalogToAstro
|
|
@@ -28,13 +28,13 @@ import {
|
|
|
28
28
|
} from "./chunk-ULZYHF3V.js";
|
|
29
29
|
import {
|
|
30
30
|
generate
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-S4HLJWQ7.js";
|
|
32
32
|
import {
|
|
33
33
|
logger
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-M4S7PORQ.js";
|
|
35
35
|
import {
|
|
36
36
|
VERSION
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-TNE5QSJ4.js";
|
|
38
38
|
import {
|
|
39
39
|
getEventCatalogConfigFile,
|
|
40
40
|
verifyRequiredFieldsAreInCatalogConfigFile
|
package/dist/generate.cjs
CHANGED
package/dist/generate.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generate
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-S4HLJWQ7.js";
|
|
4
|
+
import "./chunk-M4S7PORQ.js";
|
|
5
|
+
import "./chunk-TNE5QSJ4.js";
|
|
6
6
|
import "./chunk-5T63CXKU.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -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>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export type SidebarVisibilityConfig = {
|
|
2
|
+
id: string;
|
|
3
|
+
visible: boolean;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export type SidebarConfigurableItem = {
|
|
7
|
+
id: string;
|
|
8
|
+
aliases?: string[];
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const getVisibilityOption = <T extends SidebarConfigurableItem>(
|
|
13
|
+
item: T,
|
|
14
|
+
configuration: SidebarVisibilityConfig[]
|
|
15
|
+
): SidebarVisibilityConfig | undefined => {
|
|
16
|
+
const exactMatch = configuration.find((option) => option.id === item.id);
|
|
17
|
+
|
|
18
|
+
if (exactMatch) {
|
|
19
|
+
return exactMatch;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return configuration.find((option) => item.aliases?.includes(option.id));
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const isSidebarItemVisible = <T extends SidebarConfigurableItem>(
|
|
26
|
+
item: T,
|
|
27
|
+
configuration: SidebarVisibilityConfig[] = []
|
|
28
|
+
): boolean => {
|
|
29
|
+
const visibilityOption = getVisibilityOption(item, configuration);
|
|
30
|
+
|
|
31
|
+
if (visibilityOption) {
|
|
32
|
+
return visibilityOption.visible;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return item.visible ?? true;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const filterSidebarItems = <T extends SidebarConfigurableItem>(
|
|
39
|
+
items: T[],
|
|
40
|
+
configuration: SidebarVisibilityConfig[] = []
|
|
41
|
+
): T[] => items.filter((item) => isSidebarItemVisible(item, configuration));
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"license": "SEE LICENSE IN LICENSE",
|
|
9
9
|
"type": "module",
|
|
10
|
-
"version": "3.39.
|
|
10
|
+
"version": "3.39.5",
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
@@ -106,9 +106,9 @@
|
|
|
106
106
|
"update-notifier": "^7.3.1",
|
|
107
107
|
"uuid": "^10.0.0",
|
|
108
108
|
"zod": "^4.3.6",
|
|
109
|
-
"@eventcatalog/
|
|
109
|
+
"@eventcatalog/linter": "1.0.23",
|
|
110
110
|
"@eventcatalog/visualiser": "^3.21.0",
|
|
111
|
-
"@eventcatalog/
|
|
111
|
+
"@eventcatalog/sdk": "2.21.1"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@astrojs/check": "^0.9.9",
|