@eventcatalog/core 2.65.0-beta.5 → 2.65.1
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/README.md +1 -26
- 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-BFXHKYHM.js → chunk-2TTD2MLE.js} +1 -1
- package/dist/{chunk-2AXFOYLC.js → chunk-BTS6L3KY.js} +1 -1
- package/dist/{chunk-EHCPLOCY.js → chunk-XB4SZX3I.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.config.d.cts +1 -0
- package/dist/eventcatalog.config.d.ts +1 -0
- package/dist/eventcatalog.js +3 -3
- package/eventcatalog/src/components/Grids/MessageGrid.tsx +18 -13
- package/eventcatalog/src/components/Grids/ServiceGrid.tsx +13 -7
- package/eventcatalog/src/components/MDX/Design/Design.astro +4 -1
- package/eventcatalog/src/components/MDX/Flow/Flow.astro +2 -1
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.astro +3 -3
- package/eventcatalog/src/components/SideBars/ContainerSideBar.astro +12 -9
- package/eventcatalog/src/components/SideBars/DomainSideBar.astro +12 -8
- package/eventcatalog/src/components/SideBars/FlowSideBar.astro +12 -8
- package/eventcatalog/src/components/SideBars/MessageSideBar.astro +12 -9
- package/eventcatalog/src/components/SideBars/ServiceSideBar.astro +12 -8
- package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/index.astro +10 -4
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +4 -1
- package/eventcatalog/src/pages/architecture/architecture.astro +10 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +9 -5
- package/eventcatalog/src/pages/index.astro +14 -5
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/_index.data.ts +4 -3
- package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/entity-map/_index.data.ts +4 -3
- package/eventcatalog/src/utils/feature.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -117,31 +117,6 @@ Here is an example of a Retail system using domains, services and messages.
|
|
|
117
117
|
|
|
118
118
|
You can see the markdown files that generated the website in the GitHub repo under [examples](/examples).
|
|
119
119
|
|
|
120
|
-
# Sponsors
|
|
121
|
-
|
|
122
|
-
Thank you to our project sponsors.
|
|
123
|
-
|
|
124
|
-
## Gold sponsors
|
|
125
|
-
|
|
126
|
-
<!-- <div align="center">
|
|
127
|
-
<img alt="hookdeck" src="./images/sponsors/hookdeck.svg" />
|
|
128
|
-
<p style="margin: 0; padding: 0;">Serverless infrastructure for event-driven architecture. </p>
|
|
129
|
-
<a href="https://hookdeck.com/?ref=eventcatalog-sponsor" target="_blank" >Learn more</a>
|
|
130
|
-
</div> -->
|
|
131
|
-
|
|
132
|
-
<div align="center">
|
|
133
|
-
<picture>
|
|
134
|
-
<source srcset="./images/sponsors/gravitee-logo-white.webp" media="(prefers-color-scheme: dark)" />
|
|
135
|
-
<img alt="hookdeck" src="./images/sponsors/gravitee-logo-black.svg" width="50%" />
|
|
136
|
-
</picture>
|
|
137
|
-
<p style="margin: 0; padding: 0;">Manage, secure, and govern every API in your organization</p>
|
|
138
|
-
<a href="https://gravitee.io?utm_source=eventcatalog&utm_medium=web&utm_campaign=sponsorship" target="_blank">Learn more</a>
|
|
139
|
-
</div>
|
|
140
|
-
|
|
141
|
-
<hr />
|
|
142
|
-
|
|
143
|
-
_Sponsors help make EventCatalog sustainable, want to help the project? Get in touch! Or [visit our sponsor page](https://www.eventcatalog.dev/support)._
|
|
144
|
-
|
|
145
120
|
# Enterprise support
|
|
146
121
|
|
|
147
122
|
Interested in collaborating with us? Our offerings include dedicated support, priority assistance, feature development, custom integrations, and more.
|
|
@@ -286,4 +261,4 @@ This project follows the [all-contributors](https://github.com/all-contributors/
|
|
|
286
261
|
|
|
287
262
|
# License
|
|
288
263
|
|
|
289
|
-
MIT
|
|
264
|
+
MIT.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-XB4SZX3I.js";
|
|
4
|
+
import "../chunk-2TTD2MLE.js";
|
|
5
|
+
import "../chunk-BTS6L3KY.js";
|
|
6
6
|
import "../chunk-UPONRQSN.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
package/dist/eventcatalog.js
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
} from "./chunk-PLNJC7NZ.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-XB4SZX3I.js";
|
|
10
|
+
import "./chunk-2TTD2MLE.js";
|
|
11
11
|
import {
|
|
12
12
|
runMigrations
|
|
13
13
|
} from "./chunk-BH3JMNAV.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import "./chunk-55D645EH.js";
|
|
20
20
|
import {
|
|
21
21
|
VERSION
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-BTS6L3KY.js";
|
|
23
23
|
import {
|
|
24
24
|
getProjectOutDir,
|
|
25
25
|
isAuthEnabled,
|
|
@@ -11,6 +11,7 @@ interface MessageGridProps {
|
|
|
11
11
|
messages: CollectionEntry<CollectionMessageTypes>[];
|
|
12
12
|
containers?: CollectionEntry<'containers'>[];
|
|
13
13
|
embeded: boolean;
|
|
14
|
+
isVisualiserEnabled: boolean;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
interface GroupedMessages {
|
|
@@ -19,7 +20,7 @@ interface GroupedMessages {
|
|
|
19
20
|
receives?: CollectionEntry<CollectionMessageTypes>[];
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
export default function MessageGrid({ messages, embeded, containers }: MessageGridProps) {
|
|
23
|
+
export default function MessageGrid({ messages, embeded, containers, isVisualiserEnabled }: MessageGridProps) {
|
|
23
24
|
const [searchQuery, setSearchQuery] = useState('');
|
|
24
25
|
const [urlParams, setUrlParams] = useState<{
|
|
25
26
|
serviceId?: string;
|
|
@@ -344,12 +345,14 @@ export default function MessageGrid({ messages, embeded, containers }: MessageGr
|
|
|
344
345
|
</a>
|
|
345
346
|
</div>
|
|
346
347
|
<div className="flex gap-2">
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
348
|
+
{isVisualiserEnabled && (
|
|
349
|
+
<a
|
|
350
|
+
href={buildUrl(`/visualiser/domains/${urlParams.domainId}`)}
|
|
351
|
+
className="inline-flex items-center px-3 py-2 text-sm font-medium bg-white border border-gray-300 rounded-md transition-colors duration-200"
|
|
352
|
+
>
|
|
353
|
+
View in visualizer
|
|
354
|
+
</a>
|
|
355
|
+
)}
|
|
353
356
|
<a
|
|
354
357
|
href={buildUrl(`/docs/domains/${urlParams.domainId}`)}
|
|
355
358
|
className="inline-flex items-center px-3 py-2 text-sm font-medium text-black border border-gray-300 bg-white rounded-md transition-colors duration-200"
|
|
@@ -372,12 +375,14 @@ export default function MessageGrid({ messages, embeded, containers }: MessageGr
|
|
|
372
375
|
<ServerIcon className="h-6 w-6 text-pink-500" />
|
|
373
376
|
<h2 className="text-2xl font-semibold text-gray-900">{urlParams.serviceName}</h2>
|
|
374
377
|
<div className="flex gap-2 ml-auto">
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
378
|
+
{isVisualiserEnabled && (
|
|
379
|
+
<a
|
|
380
|
+
href={buildUrl(`/visualiser/services/${urlParams.serviceId}`)}
|
|
381
|
+
className="inline-flex items-center px-3 py-2 text-sm font-medium bg-white border border-gray-300 rounded-md transition-colors duration-200 hover:bg-gray-50"
|
|
382
|
+
>
|
|
383
|
+
View in visualizer
|
|
384
|
+
</a>
|
|
385
|
+
)}
|
|
381
386
|
<a
|
|
382
387
|
href={buildUrl(`/docs/services/${urlParams.serviceId}`)}
|
|
383
388
|
className="inline-flex items-center px-3 py-2 text-sm font-medium text-black border border-gray-300 bg-white rounded-md transition-colors duration-200 hover:bg-gray-50"
|
|
@@ -183,12 +183,14 @@ const DomainSection = memo(
|
|
|
183
183
|
urlParams,
|
|
184
184
|
selectedTypes,
|
|
185
185
|
isMultiColumn,
|
|
186
|
+
isVisualiserEnabled,
|
|
186
187
|
}: {
|
|
187
188
|
domain: any;
|
|
188
189
|
services: any[];
|
|
189
190
|
urlParams: any;
|
|
190
191
|
selectedTypes: string[];
|
|
191
192
|
isMultiColumn: boolean;
|
|
193
|
+
isVisualiserEnabled: boolean;
|
|
192
194
|
}) => {
|
|
193
195
|
const subdomains = domain.data.domains || [];
|
|
194
196
|
const allSubDomainServices = subdomains.map((subdomain: any) => subdomain.data.services || []).flat();
|
|
@@ -227,12 +229,14 @@ const DomainSection = memo(
|
|
|
227
229
|
<h3 className="text-xl font-semibold text-gray-900">{subdomain.data.name} (Subdomain)</h3>
|
|
228
230
|
</div>
|
|
229
231
|
<div className="flex gap-2">
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
232
|
+
{isVisualiserEnabled && (
|
|
233
|
+
<a
|
|
234
|
+
href={buildUrl(`/visualiser/domains/${subdomain.data.id}`)}
|
|
235
|
+
className="inline-flex items-center px-3 py-2 text-sm font-medium bg-white border border-gray-300 rounded-md transition-colors duration-200"
|
|
236
|
+
>
|
|
237
|
+
View in visualizer
|
|
238
|
+
</a>
|
|
239
|
+
)}
|
|
236
240
|
<a
|
|
237
241
|
href={buildUrl(`/docs/domains/${subdomain.data.id}`)}
|
|
238
242
|
className="inline-flex items-center px-3 py-2 text-sm font-medium text-black border border-gray-300 bg-white rounded-md transition-colors duration-200"
|
|
@@ -292,10 +296,11 @@ interface ServiceGridProps {
|
|
|
292
296
|
services: CollectionEntry<'services'>[];
|
|
293
297
|
domains: ExtendedDomain[];
|
|
294
298
|
embeded: boolean;
|
|
299
|
+
isVisualiserEnabled: boolean;
|
|
295
300
|
}
|
|
296
301
|
|
|
297
302
|
// Main ServiceGrid component
|
|
298
|
-
export default function ServiceGrid({ services, domains, embeded }: ServiceGridProps) {
|
|
303
|
+
export default function ServiceGrid({ services, domains, embeded, isVisualiserEnabled }: ServiceGridProps) {
|
|
299
304
|
const [searchQuery, setSearchQuery] = useState('');
|
|
300
305
|
const [currentPage, setCurrentPage] = useState(1);
|
|
301
306
|
const [selectedTypes, setSelectedTypes] = useState<CollectionMessageTypes[]>([]);
|
|
@@ -493,6 +498,7 @@ export default function ServiceGrid({ services, domains, embeded }: ServiceGridP
|
|
|
493
498
|
urlParams={urlParams}
|
|
494
499
|
selectedTypes={selectedTypes}
|
|
495
500
|
isMultiColumn={isMultiColumn}
|
|
501
|
+
isVisualiserEnabled={isVisualiserEnabled}
|
|
496
502
|
/>
|
|
497
503
|
))
|
|
498
504
|
) : (
|
|
@@ -5,6 +5,8 @@ import { getAbsoluteFilePathForAstroFile } from '@utils/files';
|
|
|
5
5
|
import Admonition from '@components/MDX/Admonition';
|
|
6
6
|
import NodeGraph from '../NodeGraph/NodeGraph';
|
|
7
7
|
|
|
8
|
+
import { isVisualiserEnabled } from '@utils/feature';
|
|
9
|
+
|
|
8
10
|
let design: any;
|
|
9
11
|
let id = 'design';
|
|
10
12
|
let maxHeight = 30;
|
|
@@ -49,7 +51,8 @@ try {
|
|
|
49
51
|
title={title ?? design.name}
|
|
50
52
|
nodes={design.nodes || []}
|
|
51
53
|
edges={design.edges || []}
|
|
52
|
-
hrefLabel={'View in visualizer'}
|
|
54
|
+
hrefLabel={isVisualiserEnabled() ? 'View in visualizer' : undefined}
|
|
55
|
+
href={isVisualiserEnabled() ? `/visualiser/designs/${design.id}` : undefined}
|
|
53
56
|
linkTo={'visualiser'}
|
|
54
57
|
designId={design.id || id}
|
|
55
58
|
client:only="react"
|
|
@@ -4,6 +4,7 @@ import { getNodesAndEdges } from '@utils/node-graphs/flows-node-graph';
|
|
|
4
4
|
import Admonition from '@components/MDX/Admonition';
|
|
5
5
|
import NodeGraph from '../NodeGraph/NodeGraph';
|
|
6
6
|
import { getVersionFromCollection } from '@utils/collections/versions';
|
|
7
|
+
import { isVisualiserEnabled } from '@utils/feature';
|
|
7
8
|
|
|
8
9
|
const { id, version = 'latest', maxHeight, includeKey = true, mode = 'simple', walkthrough = true, search = true } = Astro.props;
|
|
9
10
|
|
|
@@ -49,7 +50,7 @@ const { nodes, edges } = await getNodesAndEdges({
|
|
|
49
50
|
nodes={nodes}
|
|
50
51
|
edges={edges}
|
|
51
52
|
hrefLabel={'View in visualizer'}
|
|
52
|
-
href={`/visualiser/flows/${id}/${version}`}
|
|
53
|
+
href={isVisualiserEnabled() ? `/visualiser/flows/${id}/${version}` : undefined}
|
|
53
54
|
linkTo={'visualiser'}
|
|
54
55
|
includeKey={includeKey}
|
|
55
56
|
footerLabel=`Flow diagram - ${flow.data.name} - v(${flow.data.version})`
|
|
@@ -26,7 +26,7 @@ interface Props {
|
|
|
26
26
|
version: string;
|
|
27
27
|
mode: 'full' | 'simple';
|
|
28
28
|
linkTo?: 'docs' | 'visualiser';
|
|
29
|
-
href
|
|
29
|
+
href?: {
|
|
30
30
|
label: string;
|
|
31
31
|
url: string;
|
|
32
32
|
};
|
|
@@ -142,8 +142,8 @@ if (collection === 'services-containers') {
|
|
|
142
142
|
nodes={nodes}
|
|
143
143
|
edges={edges}
|
|
144
144
|
title={title}
|
|
145
|
-
hrefLabel={href
|
|
146
|
-
href={href
|
|
145
|
+
hrefLabel={href?.label}
|
|
146
|
+
href={href?.url}
|
|
147
147
|
linkTo={linkTo}
|
|
148
148
|
client:only="react"
|
|
149
149
|
linksToVisualiser={linksToVisualiser}
|
|
@@ -8,7 +8,7 @@ import { ScrollText, Workflow, RssIcon } from 'lucide-react';
|
|
|
8
8
|
import RepositoryList from '@components/Lists/RepositoryList.astro';
|
|
9
9
|
import { getOwner } from '@utils/collections/owners';
|
|
10
10
|
import CustomSideBarSectionList from '@components/Lists/CustomSideBarSectionList.astro';
|
|
11
|
-
import { isChangelogEnabled } from '@utils/feature';
|
|
11
|
+
import { isChangelogEnabled, isVisualiserEnabled } from '@utils/feature';
|
|
12
12
|
import config from '@config';
|
|
13
13
|
|
|
14
14
|
interface Props {
|
|
@@ -156,14 +156,17 @@ const isRSSEnabled = config.rss?.enabled;
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
<div class="space-y-2">
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
159
|
+
{
|
|
160
|
+
isVisualiserEnabled() && (
|
|
161
|
+
<a
|
|
162
|
+
href={buildUrl(`/visualiser/${container.collection}/${container.data.id}/${container.data.version}`)}
|
|
163
|
+
class="flex items-center justify-center space-x-2 text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
|
|
164
|
+
>
|
|
165
|
+
<Workflow strokeWidth={2} size={16} />
|
|
166
|
+
<span class="block">View in visualiser</span>
|
|
167
|
+
</a>
|
|
168
|
+
)
|
|
169
|
+
}
|
|
167
170
|
{
|
|
168
171
|
isChangelogEnabled() && shouldRenderSideBarSection('changelog') && (
|
|
169
172
|
<a
|
|
@@ -9,7 +9,7 @@ import { getOwner } from '@utils/collections/owners';
|
|
|
9
9
|
import { buildUrl } from '@utils/url-builder';
|
|
10
10
|
import type { CollectionEntry } from 'astro:content';
|
|
11
11
|
import { ScrollText, Workflow } from 'lucide-react';
|
|
12
|
-
import { isChangelogEnabled } from '@utils/feature';
|
|
12
|
+
import { isChangelogEnabled, isVisualiserEnabled } from '@utils/feature';
|
|
13
13
|
|
|
14
14
|
interface Props {
|
|
15
15
|
domain: CollectionEntry<'domains'>;
|
|
@@ -250,13 +250,17 @@ const shouldRenderSideBarSection = (section: string) => {
|
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
<div class="space-y-2">
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
253
|
+
{
|
|
254
|
+
isVisualiserEnabled() && (
|
|
255
|
+
<a
|
|
256
|
+
href={buildUrl(`/visualiser/${domain.collection}/${domain.data.id}/${domain.data.version}`)}
|
|
257
|
+
class="flex items-center justify-center space-x-2 text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
|
|
258
|
+
>
|
|
259
|
+
<Workflow strokeWidth={2} size={16} />
|
|
260
|
+
<span class="block">View in visualiser</span>
|
|
261
|
+
</a>
|
|
262
|
+
)
|
|
263
|
+
}
|
|
260
264
|
{
|
|
261
265
|
isChangelogEnabled() && shouldRenderSideBarSection('changelog') && (
|
|
262
266
|
<a
|
|
@@ -7,7 +7,7 @@ import { getOwner } from '@utils/collections/owners';
|
|
|
7
7
|
import type { CollectionEntry } from 'astro:content';
|
|
8
8
|
import { ScrollText, Workflow, RssIcon } from 'lucide-react';
|
|
9
9
|
import config from '@config';
|
|
10
|
-
import { isChangelogEnabled } from '@utils/feature';
|
|
10
|
+
import { isChangelogEnabled, isVisualiserEnabled } from '@utils/feature';
|
|
11
11
|
import CustomSideBarSectionList from '@components/Lists/CustomSideBarSectionList.astro';
|
|
12
12
|
interface Props {
|
|
13
13
|
flow: CollectionEntry<'flows'>;
|
|
@@ -105,13 +105,17 @@ const shouldRenderSideBarSection = (section: string) => {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
<div class="space-y-2">
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
108
|
+
{
|
|
109
|
+
isVisualiserEnabled() && (
|
|
110
|
+
<a
|
|
111
|
+
href={buildUrl(`/visualiser/${flow.collection}/${flow.data.id}/${flow.data.version}`)}
|
|
112
|
+
class="flex items-center justify-center space-x-2 text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
|
|
113
|
+
>
|
|
114
|
+
<Workflow strokeWidth={2} size={16} />
|
|
115
|
+
<span class="block">View in visualiser</span>
|
|
116
|
+
</a>
|
|
117
|
+
)
|
|
118
|
+
}
|
|
115
119
|
{
|
|
116
120
|
isChangelogEnabled() && shouldRenderSideBarSection('changelog') && (
|
|
117
121
|
<a
|
|
@@ -12,7 +12,7 @@ import { getOwner } from '@utils/collections/owners';
|
|
|
12
12
|
import CustomSideBarSectionList from '@components/Lists/CustomSideBarSectionList.astro';
|
|
13
13
|
import config from '@config';
|
|
14
14
|
import { getSchemaFormatFromURL } from '@utils/collections/schemas';
|
|
15
|
-
import { isChangelogEnabled } from '@utils/feature';
|
|
15
|
+
import { isChangelogEnabled, isVisualiserEnabled } from '@utils/feature';
|
|
16
16
|
interface Props {
|
|
17
17
|
message: CollectionEntry<CollectionMessageTypes>;
|
|
18
18
|
}
|
|
@@ -224,14 +224,17 @@ const shouldRenderSideBarSection = (section: string) => {
|
|
|
224
224
|
</a>
|
|
225
225
|
)
|
|
226
226
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
227
|
+
{
|
|
228
|
+
isVisualiserEnabled() && (
|
|
229
|
+
<a
|
|
230
|
+
href={buildUrl(`/visualiser/${message.collection}/${message.data.id}/${message.data.version}`)}
|
|
231
|
+
class="flex items-center justify-center space-x-2 text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
|
|
232
|
+
>
|
|
233
|
+
<Workflow strokeWidth={2} size={16} />
|
|
234
|
+
<span class="block">View in visualiser</span>
|
|
235
|
+
</a>
|
|
236
|
+
)
|
|
237
|
+
}
|
|
235
238
|
{
|
|
236
239
|
isChangelogEnabled() && shouldRenderSideBarSection('changelog') && (
|
|
237
240
|
<a
|
|
@@ -12,7 +12,7 @@ import { ScrollText, Workflow, FileDownIcon, Code, Link, RssIcon } from 'lucide-
|
|
|
12
12
|
import { join } from 'node:path';
|
|
13
13
|
import config from '@config';
|
|
14
14
|
import { getDomainsForService } from '@utils/collections/domains';
|
|
15
|
-
import { isChangelogEnabled } from '@utils/feature';
|
|
15
|
+
import { isChangelogEnabled, isVisualiserEnabled } from '@utils/feature';
|
|
16
16
|
interface Props {
|
|
17
17
|
service: CollectionEntry<'services'>;
|
|
18
18
|
}
|
|
@@ -271,13 +271,17 @@ const shouldRenderSideBarSection = (section: string) => {
|
|
|
271
271
|
</a>
|
|
272
272
|
)
|
|
273
273
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
274
|
+
{
|
|
275
|
+
isVisualiserEnabled() && (
|
|
276
|
+
<a
|
|
277
|
+
href={buildUrl(`/visualiser/${service.collection}/${service.data.id}/${service.data.version}`)}
|
|
278
|
+
class="flex items-center justify-center space-x-2 text-center rounded-md w-full bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-100/60 hover:text-primary"
|
|
279
|
+
>
|
|
280
|
+
<Workflow strokeWidth={2} size={16} />
|
|
281
|
+
<span class="block">View in visualiser</span>
|
|
282
|
+
</a>
|
|
283
|
+
)
|
|
284
|
+
}
|
|
281
285
|
{
|
|
282
286
|
isChangelogEnabled() && shouldRenderSideBarSection('changelog') && (
|
|
283
287
|
<a
|
|
@@ -16,6 +16,8 @@ import { getAdjacentPages } from '@enterprise/custom-documentation/utils/custom-
|
|
|
16
16
|
import CustomDocsNav from '@enterprise/custom-documentation/components/CustomDocsNav/CustomDocsNav.astro';
|
|
17
17
|
import NodeGraph from '@components/MDX/NodeGraph/NodeGraph.astro';
|
|
18
18
|
|
|
19
|
+
import { isVisualiserEnabled } from '@utils/feature';
|
|
20
|
+
|
|
19
21
|
const props = Astro.props;
|
|
20
22
|
const doc = props.data;
|
|
21
23
|
const { Content, headings } = await render(props as any);
|
|
@@ -132,10 +134,14 @@ const badges = doc?.badges || [];
|
|
|
132
134
|
title={nodeGraph.title}
|
|
133
135
|
mode="simple"
|
|
134
136
|
linksToVisualiser={true}
|
|
135
|
-
href={
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
href={
|
|
138
|
+
isVisualiserEnabled()
|
|
139
|
+
? {
|
|
140
|
+
label: 'Open in Visualiser',
|
|
141
|
+
url: buildUrl(`/visualiser/${collection}/${nodeGraph.id}/${nodeGraph.version}`),
|
|
142
|
+
}
|
|
143
|
+
: undefined
|
|
144
|
+
}
|
|
139
145
|
/>
|
|
140
146
|
);
|
|
141
147
|
})
|
|
@@ -47,7 +47,7 @@ const domains = await getDomains({ getAllVersions: false });
|
|
|
47
47
|
const flows = await getFlows({ getAllVersions: false });
|
|
48
48
|
const customDocs = await getCollection('customPages');
|
|
49
49
|
|
|
50
|
-
import { isEventCatalogUpgradeEnabled } from '@utils/feature';
|
|
50
|
+
import { isEventCatalogUpgradeEnabled, isVisualiserEnabled } from '@utils/feature';
|
|
51
51
|
|
|
52
52
|
// Try and load any custom styles if they exist
|
|
53
53
|
try {
|
|
@@ -88,6 +88,7 @@ const getDefaultUrl = (route: string, defaultValue: string) => {
|
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
const userSideBarConfiguration = config.sidebar || [];
|
|
91
|
+
|
|
91
92
|
const navigationItems = [
|
|
92
93
|
{
|
|
93
94
|
id: '/',
|
|
@@ -96,6 +97,7 @@ const navigationItems = [
|
|
|
96
97
|
href: buildUrl('/'),
|
|
97
98
|
current: currentPath === '/',
|
|
98
99
|
sidebar: false,
|
|
100
|
+
hidden: !!config.landingPage,
|
|
99
101
|
},
|
|
100
102
|
{
|
|
101
103
|
id: '/docs',
|
|
@@ -113,6 +115,7 @@ const navigationItems = [
|
|
|
113
115
|
href: getDefaultUrl('visualiser', '/visualiser'),
|
|
114
116
|
current: currentPath.includes('/visualiser'),
|
|
115
117
|
sidebar: true,
|
|
118
|
+
hidden: !isVisualiserEnabled(),
|
|
116
119
|
},
|
|
117
120
|
|
|
118
121
|
{
|
|
@@ -13,6 +13,8 @@ import { removeContentFromCollection } from '@utils/collections/util';
|
|
|
13
13
|
import type { CollectionEntry } from 'astro:content';
|
|
14
14
|
import type { CollectionMessageTypes } from '@types';
|
|
15
15
|
|
|
16
|
+
import { isVisualiserEnabled } from '@utils/feature';
|
|
17
|
+
|
|
16
18
|
import { ClientRouter, fade } from 'astro:transitions';
|
|
17
19
|
// Define valid types and their corresponding data fetchers
|
|
18
20
|
const VALID_TYPES = ['domains', 'services', 'messages'] as const;
|
|
@@ -81,7 +83,13 @@ if (type === 'services') {
|
|
|
81
83
|
{type === 'domains' && <DomainGrid domains={domains} embeded={embeded} client:load />}
|
|
82
84
|
{
|
|
83
85
|
type === 'services' && (
|
|
84
|
-
<ServiceGrid
|
|
86
|
+
<ServiceGrid
|
|
87
|
+
domains={domains}
|
|
88
|
+
services={items as unknown as Service[]}
|
|
89
|
+
embeded={embeded}
|
|
90
|
+
isVisualiserEnabled={isVisualiserEnabled()}
|
|
91
|
+
client:load
|
|
92
|
+
/>
|
|
85
93
|
)
|
|
86
94
|
}
|
|
87
95
|
{
|
|
@@ -90,6 +98,7 @@ if (type === 'services') {
|
|
|
90
98
|
messages={items as CollectionEntry<CollectionMessageTypes>[]}
|
|
91
99
|
embeded={embeded}
|
|
92
100
|
containers={containers}
|
|
101
|
+
isVisualiserEnabled={isVisualiserEnabled()}
|
|
93
102
|
client:load
|
|
94
103
|
/>
|
|
95
104
|
)
|
|
@@ -43,7 +43,7 @@ import { getIcon } from '@utils/badges';
|
|
|
43
43
|
import { getDeprecatedDetails } from '@utils/collections/util';
|
|
44
44
|
import { buildUrl, buildEditUrlForResource } from '@utils/url-builder';
|
|
45
45
|
import { getSchemasFromResource } from '@utils/collections/schemas';
|
|
46
|
-
import { isEventCatalogChatEnabled, isMarkdownDownloadEnabled } from '@utils/feature';
|
|
46
|
+
import { isEventCatalogChatEnabled, isMarkdownDownloadEnabled, isVisualiserEnabled } from '@utils/feature';
|
|
47
47
|
|
|
48
48
|
import { getMDXComponentsByName } from '@utils/markdown';
|
|
49
49
|
|
|
@@ -446,10 +446,14 @@ nodeGraphs.push({
|
|
|
446
446
|
linksToVisualiser={true}
|
|
447
447
|
showSearch={nodeGraph.search ?? true}
|
|
448
448
|
showLegend={nodeGraph.legend ?? true}
|
|
449
|
-
href={
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
449
|
+
href={
|
|
450
|
+
isVisualiserEnabled()
|
|
451
|
+
? {
|
|
452
|
+
label: 'Open in Visualiser',
|
|
453
|
+
url: buildUrl(`/visualiser/${collection}/${nodeGraph.id}/${nodeGraph.version}`),
|
|
454
|
+
}
|
|
455
|
+
: undefined
|
|
456
|
+
}
|
|
453
457
|
/>
|
|
454
458
|
);
|
|
455
459
|
})
|
|
@@ -7,8 +7,9 @@ import NodeGraph from '@components/MDX/NodeGraph/NodeGraph.astro';
|
|
|
7
7
|
import { getMDXComponentsByName } from '@utils/markdown';
|
|
8
8
|
import { resourceToCollectionMap } from '@utils/collections/util';
|
|
9
9
|
import { buildUrl } from '@utils/url-builder';
|
|
10
|
-
import { isCustomLandingPageEnabled } from '@utils/feature';
|
|
10
|
+
import { isCustomLandingPageEnabled, isVisualiserEnabled } from '@utils/feature';
|
|
11
11
|
import DefaultAstroLandingPage from './_index.astro';
|
|
12
|
+
import config from '@config';
|
|
12
13
|
|
|
13
14
|
let nodeGraphs: any[] = [];
|
|
14
15
|
let CustomContent = null;
|
|
@@ -28,6 +29,10 @@ if (existsSync(pathToUserDefinedLandingPage) && isCustomLandingPageEnabled()) {
|
|
|
28
29
|
const rawContent = readFileSync(pathToUserDefinedLandingPage, 'utf-8');
|
|
29
30
|
nodeGraphs = getMDXComponentsByName(rawContent, 'NodeGraph') || [];
|
|
30
31
|
}
|
|
32
|
+
|
|
33
|
+
if (config.landingPage) {
|
|
34
|
+
return Astro.redirect(buildUrl(config.landingPage));
|
|
35
|
+
}
|
|
31
36
|
---
|
|
32
37
|
|
|
33
38
|
{
|
|
@@ -53,10 +58,14 @@ if (existsSync(pathToUserDefinedLandingPage) && isCustomLandingPageEnabled()) {
|
|
|
53
58
|
title={nodeGraph.title}
|
|
54
59
|
mode="simple"
|
|
55
60
|
linksToVisualiser={true}
|
|
56
|
-
href={
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
href={
|
|
62
|
+
isVisualiserEnabled()
|
|
63
|
+
? {
|
|
64
|
+
label: 'Open in Visualiser',
|
|
65
|
+
url: buildUrl(`/visualiser/${collection}/${nodeGraph.id}/${nodeGraph.version}`),
|
|
66
|
+
}
|
|
67
|
+
: undefined
|
|
68
|
+
}
|
|
60
69
|
/>
|
|
61
70
|
);
|
|
62
71
|
})}
|
|
@@ -3,12 +3,13 @@ import { HybridPage } from '@utils/page-loaders/hybrid-page';
|
|
|
3
3
|
import { isAuthEnabled } from '@utils/feature';
|
|
4
4
|
import type { PageTypes } from '@types';
|
|
5
5
|
import { pageDataLoader } from '@utils/page-loaders/page-data-loader';
|
|
6
|
+
import { isVisualiserEnabled } from '@utils/feature';
|
|
6
7
|
|
|
7
8
|
type PageTypesWithFlows = PageTypes | 'flows';
|
|
8
9
|
|
|
9
10
|
export class Page extends HybridPage {
|
|
10
11
|
static async getStaticPaths(): Promise<Array<{ params: any; props: any }>> {
|
|
11
|
-
if (isAuthEnabled()) {
|
|
12
|
+
if (isAuthEnabled() || !isVisualiserEnabled()) {
|
|
12
13
|
return [];
|
|
13
14
|
}
|
|
14
15
|
|
|
@@ -42,7 +43,7 @@ export class Page extends HybridPage {
|
|
|
42
43
|
protected static async fetchData(params: any) {
|
|
43
44
|
const { type, id, version } = params;
|
|
44
45
|
|
|
45
|
-
if (!type || !id || !version) {
|
|
46
|
+
if (!type || !id || !version || !isVisualiserEnabled()) {
|
|
46
47
|
return null;
|
|
47
48
|
}
|
|
48
49
|
|
|
@@ -77,7 +78,7 @@ export class Page extends HybridPage {
|
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
static get clientAuthScript(): string {
|
|
80
|
-
if (!isAuthEnabled()) {
|
|
81
|
+
if (!isAuthEnabled() || !isVisualiserEnabled()) {
|
|
81
82
|
return '';
|
|
82
83
|
}
|
|
83
84
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { HybridPage } from '@utils/page-loaders/hybrid-page';
|
|
2
2
|
import { isAuthEnabled } from '@utils/feature';
|
|
3
3
|
import { domainHasEntities, getDomains, type Domain } from '@utils/collections/domains';
|
|
4
|
+
import { isVisualiserEnabled } from '@utils/feature';
|
|
4
5
|
|
|
5
6
|
export class Page extends HybridPage {
|
|
6
7
|
static async getStaticPaths(): Promise<Array<{ params: any; props: any }>> {
|
|
7
|
-
if (isAuthEnabled()) {
|
|
8
|
+
if (isAuthEnabled() || !isVisualiserEnabled()) {
|
|
8
9
|
return [];
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -29,7 +30,7 @@ export class Page extends HybridPage {
|
|
|
29
30
|
protected static async fetchData(params: any) {
|
|
30
31
|
const { id, version } = params;
|
|
31
32
|
|
|
32
|
-
if (!id || !version) {
|
|
33
|
+
if (!id || !version || !isVisualiserEnabled()) {
|
|
33
34
|
return null;
|
|
34
35
|
}
|
|
35
36
|
|
|
@@ -54,7 +55,7 @@ export class Page extends HybridPage {
|
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
static get clientAuthScript(): string {
|
|
57
|
-
if (!isAuthEnabled()) {
|
|
58
|
+
if (!isAuthEnabled() || !isVisualiserEnabled()) {
|
|
58
59
|
return '';
|
|
59
60
|
}
|
|
60
61
|
|