@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
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { createColumnHelper } from '@tanstack/react-table';
|
|
2
2
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import { DocumentTextIcon, MapIcon } from '@heroicons/react/24/solid';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
ArrowDownIcon,
|
|
6
|
+
ArrowTopRightOnSquareIcon,
|
|
7
|
+
ArrowUpIcon,
|
|
8
|
+
EllipsisVerticalIcon,
|
|
9
|
+
StarIcon,
|
|
10
|
+
} from '@heroicons/react/24/outline';
|
|
5
11
|
import { buildUrl } from '@utils/url-builder';
|
|
6
12
|
import { getColorAndIconForCollection } from '@utils/collections/icons';
|
|
7
13
|
import { getCollectionTextColorClass } from '@utils/collection-colors';
|
|
8
|
-
import { getBadgeReactStyle } from '@utils/badge-styles';
|
|
14
|
+
import { getBadgeHref, getBadgeReactStyle } from '@utils/badge-styles';
|
|
9
15
|
import { isIconPath, resolveIconUrl } from '@utils/icon';
|
|
10
16
|
import { useStore } from '@nanostores/react';
|
|
11
17
|
import { favoritesStore, toggleFavorite, type FavoriteItem } from '../../../stores/favorites-store';
|
|
@@ -15,7 +21,11 @@ import type { TableConfiguration } from '@types';
|
|
|
15
21
|
const columnHelper = createColumnHelper<DiscoverTableData>();
|
|
16
22
|
|
|
17
23
|
// Badge cell component (proper React component to use hooks)
|
|
18
|
-
const BadgesCell = ({
|
|
24
|
+
const BadgesCell = ({
|
|
25
|
+
badges,
|
|
26
|
+
}: {
|
|
27
|
+
badges: Array<{ content: string; backgroundColor?: string; textColor?: string; url?: string }>;
|
|
28
|
+
}) => {
|
|
19
29
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
20
30
|
|
|
21
31
|
if (!badges || badges.length === 0) return <span className="text-xs text-[rgb(var(--ec-icon-color))]">-</span>;
|
|
@@ -25,16 +35,28 @@ const BadgesCell = ({ badges }: { badges: Array<{ content: string; backgroundCol
|
|
|
25
35
|
|
|
26
36
|
return (
|
|
27
37
|
<div className="flex flex-col gap-1 items-start">
|
|
28
|
-
{visibleItems.map((badge, index) =>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
{visibleItems.map((badge, index) => {
|
|
39
|
+
const href = getBadgeHref(badge);
|
|
40
|
+
const className =
|
|
41
|
+
'inline-flex items-center px-2 py-0.5 text-[11px] font-normal rounded-md max-w-[140px] truncate border border-[rgb(var(--ec-page-border))] text-[rgb(var(--ec-page-text-muted))] bg-transparent';
|
|
42
|
+
|
|
43
|
+
return href ? (
|
|
44
|
+
<a
|
|
45
|
+
key={`${badge.content}-${index}`}
|
|
46
|
+
href={href}
|
|
47
|
+
className={className}
|
|
48
|
+
style={getBadgeReactStyle(badge)}
|
|
49
|
+
title={badge.content}
|
|
50
|
+
>
|
|
51
|
+
<span className="truncate">{badge.content}</span>
|
|
52
|
+
<ArrowTopRightOnSquareIcon className="ml-1 h-3 w-3 shrink-0 opacity-70" aria-hidden="true" />
|
|
53
|
+
</a>
|
|
54
|
+
) : (
|
|
55
|
+
<span key={`${badge.content}-${index}`} className={className} style={getBadgeReactStyle(badge)} title={badge.content}>
|
|
56
|
+
{badge.content}
|
|
57
|
+
</span>
|
|
58
|
+
);
|
|
59
|
+
})}
|
|
38
60
|
{hiddenCount > 0 && (
|
|
39
61
|
<button onClick={() => setIsExpanded(!isExpanded)} className="text-xs text-[rgb(var(--ec-accent))] hover:underline">
|
|
40
62
|
{isExpanded ? 'less' : `+${hiddenCount}`}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createColumnHelper } from '@tanstack/react-table';
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { ArrowTopRightOnSquareIcon } from '@heroicons/react/20/solid';
|
|
4
|
+
import { getBadgeHref, getBadgeReactStyle } from '@utils/badge-styles';
|
|
4
5
|
import { filterByBadge } from '../filters/custom-filters';
|
|
5
6
|
import type { TCollectionTypes, TData } from '../Table';
|
|
6
7
|
import type { TableConfiguration } from '@types';
|
|
@@ -24,16 +25,28 @@ export const createBadgesColumn = <T extends { data: Pick<TData<U>['data'], 'bad
|
|
|
24
25
|
|
|
25
26
|
return (
|
|
26
27
|
<div className="flex flex-wrap gap-1 items-center">
|
|
27
|
-
{visibleItems.map((badge, index) =>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
{visibleItems.map((badge, index) => {
|
|
29
|
+
const href = getBadgeHref(badge);
|
|
30
|
+
const className =
|
|
31
|
+
'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';
|
|
32
|
+
|
|
33
|
+
return href ? (
|
|
34
|
+
<a
|
|
35
|
+
key={`${badge.id}-${index}`}
|
|
36
|
+
href={href}
|
|
37
|
+
className={className}
|
|
38
|
+
style={getBadgeReactStyle(badge)}
|
|
39
|
+
title={badge.content}
|
|
40
|
+
>
|
|
41
|
+
<span>{badge.content}</span>
|
|
42
|
+
<ArrowTopRightOnSquareIcon className="ml-1 h-3 w-3 shrink-0 opacity-70" aria-hidden="true" />
|
|
43
|
+
</a>
|
|
44
|
+
) : (
|
|
45
|
+
<span key={`${badge.id}-${index}`} className={className} style={getBadgeReactStyle(badge)} title={badge.content}>
|
|
46
|
+
{badge.content}
|
|
47
|
+
</span>
|
|
48
|
+
);
|
|
49
|
+
})}
|
|
37
50
|
{hiddenCount > 0 && (
|
|
38
51
|
<button onClick={() => setIsExpanded(!isExpanded)} className="text-xs text-[rgb(var(--ec-accent))] hover:underline">
|
|
39
52
|
{isExpanded ? 'less' : `+${hiddenCount}`}
|
|
@@ -5,6 +5,7 @@ import config from '@config';
|
|
|
5
5
|
import { AlignLeftIcon, UserIcon, UsersIcon } from 'lucide-react';
|
|
6
6
|
|
|
7
7
|
import mdxComponents from '@components/MDX/components';
|
|
8
|
+
import Badge from '@components/Badge.astro';
|
|
8
9
|
|
|
9
10
|
import { getOwner } from '@utils/collections/owners';
|
|
10
11
|
import { buildUrl, buildEditUrlForResource } from '@utils/url-builder';
|
|
@@ -117,24 +118,7 @@ const editUrl =
|
|
|
117
118
|
badges && badges.length > 0 && (
|
|
118
119
|
<div class="flex flex-wrap gap-3 py-2">
|
|
119
120
|
{badges.map((badge: any) => {
|
|
120
|
-
return
|
|
121
|
-
<a href={badge.url || '#'}>
|
|
122
|
-
<span
|
|
123
|
-
id={badge.id || ''}
|
|
124
|
-
class={`
|
|
125
|
-
inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium
|
|
126
|
-
bg-[rgb(var(--ec-content-hover))] border border-[rgb(var(--ec-page-border))]
|
|
127
|
-
text-[rgb(var(--ec-page-text))]
|
|
128
|
-
shadow-xs
|
|
129
|
-
${badge.class ? badge.class : ''}
|
|
130
|
-
`}
|
|
131
|
-
>
|
|
132
|
-
{badge.icon && <badge.icon className="w-4 h-4 flex-shrink-0 text-[rgb(var(--ec-icon-color))]" />}
|
|
133
|
-
{badge.iconURL && <img src={badge.iconURL} class="w-4 h-4 flex-shrink-0 opacity-80" alt="" />}
|
|
134
|
-
<span>{badge.content}</span>
|
|
135
|
-
</span>
|
|
136
|
-
</a>
|
|
137
|
-
);
|
|
121
|
+
return <Badge badge={badge} />;
|
|
138
122
|
})}
|
|
139
123
|
</div>
|
|
140
124
|
)
|