@eventcatalog/core 2.16.1 → 2.16.2
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/bin/dist/eventcatalog.cjs +558 -0
- package/bin/dist/eventcatalog.config.cjs +18 -0
- package/bin/dist/eventcatalog.config.d.cts +35 -0
- package/bin/dist/eventcatalog.config.d.ts +35 -0
- package/bin/dist/eventcatalog.config.js +0 -0
- package/bin/dist/eventcatalog.d.cts +1 -0
- package/bin/dist/eventcatalog.d.ts +1 -0
- package/bin/dist/eventcatalog.js +531 -0
- 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-GEPV3ACK.js → chunk-5K2SMJL6.js} +1 -1
- package/dist/{chunk-J5H7ICLD.js → chunk-7V6DXP63.js} +1 -1
- package/dist/{chunk-A3QFF66M.js → chunk-D5BKFMHD.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 +3 -3
- package/eventcatalog/src/components/SideBars/CatalogResourcesSideBar/index.tsx +1 -10
- package/eventcatalog/src/components/Tables/Table.tsx +1 -11
- package/eventcatalog/src/components/Tables/columns/DomainTableColumns.tsx +10 -4
- package/eventcatalog/src/components/Tables/columns/FlowTableColumns.tsx +3 -3
- package/eventcatalog/src/components/Tables/columns/MessageTableColumns.tsx +2 -5
- package/eventcatalog/src/components/Tables/columns/ServiceTableColumns.tsx +8 -2
- package/eventcatalog/src/components/Tables/filters/custom-filters.ts +0 -5
- package/eventcatalog/src/layouts/DiscoverLayout.astro +1 -1
- package/package.json +1 -1
- package/eventcatalog/src/components/Tables/columns/SharedColumns.tsx +0 -44
|
@@ -2,10 +2,8 @@ import { ServerIcon } from '@heroicons/react/20/solid';
|
|
|
2
2
|
import { RectangleGroupIcon } from '@heroicons/react/20/solid';
|
|
3
3
|
import { createColumnHelper } from '@tanstack/react-table';
|
|
4
4
|
import type { CollectionEntry } from 'astro:content';
|
|
5
|
-
import {
|
|
5
|
+
import { filterByName, filterCollectionByName } from '../filters/custom-filters';
|
|
6
6
|
import { buildUrl } from '@utils/url-builder';
|
|
7
|
-
import { Tag } from 'lucide-react';
|
|
8
|
-
import { createBadgesColumn } from './SharedColumns';
|
|
9
7
|
|
|
10
8
|
const columnHelper = createColumnHelper<CollectionEntry<'domains'>>();
|
|
11
9
|
|
|
@@ -42,6 +40,14 @@ export const columns = () => [
|
|
|
42
40
|
},
|
|
43
41
|
filterFn: filterByName,
|
|
44
42
|
}),
|
|
43
|
+
// columnHelper.accessor('data.version', {
|
|
44
|
+
// header: () => <span>Version</span>,
|
|
45
|
+
// cell: (info) => {
|
|
46
|
+
// const service = info.row.original;
|
|
47
|
+
// return <div className="text-left font-light">{`v${info.getValue()} ${service.data.latestVersion === service.data.version ? '(latest)': ''}`}</div>
|
|
48
|
+
// },
|
|
49
|
+
// footer: (info) => info.column.id,
|
|
50
|
+
// }),
|
|
45
51
|
columnHelper.accessor('data.summary', {
|
|
46
52
|
id: 'summary',
|
|
47
53
|
header: () => 'Summary',
|
|
@@ -90,9 +96,9 @@ export const columns = () => [
|
|
|
90
96
|
</ul>
|
|
91
97
|
);
|
|
92
98
|
},
|
|
99
|
+
// footer: (info) => info.column.id,
|
|
93
100
|
filterFn: filterCollectionByName('services'),
|
|
94
101
|
}),
|
|
95
|
-
createBadgesColumn(columnHelper),
|
|
96
102
|
columnHelper.accessor('data.name', {
|
|
97
103
|
header: () => <span />,
|
|
98
104
|
cell: (info) => {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { ServerIcon } from '@heroicons/react/20/solid';
|
|
2
|
+
import { RectangleGroupIcon } from '@heroicons/react/20/solid';
|
|
1
3
|
import { createColumnHelper } from '@tanstack/react-table';
|
|
2
4
|
import type { CollectionEntry } from 'astro:content';
|
|
3
|
-
import { filterByName } from '../filters/custom-filters';
|
|
5
|
+
import { filterByName, filterCollectionByName } from '../filters/custom-filters';
|
|
4
6
|
import { buildUrl } from '@utils/url-builder';
|
|
5
7
|
import { QueueListIcon } from '@heroicons/react/24/solid';
|
|
6
|
-
import { createBadgesColumn } from './SharedColumns';
|
|
7
8
|
|
|
8
9
|
const columnHelper = createColumnHelper<CollectionEntry<'flows'>>();
|
|
9
10
|
|
|
@@ -60,7 +61,6 @@ export const columns = () => [
|
|
|
60
61
|
className: 'max-w-md',
|
|
61
62
|
},
|
|
62
63
|
}),
|
|
63
|
-
createBadgesColumn(columnHelper),
|
|
64
64
|
columnHelper.accessor('data.name', {
|
|
65
65
|
header: () => <span />,
|
|
66
66
|
cell: (info) => {
|
|
@@ -3,9 +3,8 @@ import { createColumnHelper } from '@tanstack/react-table';
|
|
|
3
3
|
import type { CollectionMessageTypes } from '@types';
|
|
4
4
|
import type { CollectionEntry } from 'astro:content';
|
|
5
5
|
import { useMemo } from 'react';
|
|
6
|
-
import { filterByName, filterCollectionByName
|
|
6
|
+
import { filterByName, filterCollectionByName } from '../filters/custom-filters';
|
|
7
7
|
import { buildUrl } from '@utils/url-builder';
|
|
8
|
-
import { createBadgesColumn } from './SharedColumns';
|
|
9
8
|
|
|
10
9
|
const columnHelper = createColumnHelper<CollectionEntry<CollectionMessageTypes>>();
|
|
11
10
|
|
|
@@ -56,7 +55,6 @@ export const columns = () => [
|
|
|
56
55
|
},
|
|
57
56
|
filterFn: filterByName,
|
|
58
57
|
}),
|
|
59
|
-
|
|
60
58
|
columnHelper.accessor('data.summary', {
|
|
61
59
|
id: 'summary',
|
|
62
60
|
header: () => 'Summary',
|
|
@@ -64,7 +62,7 @@ export const columns = () => [
|
|
|
64
62
|
footer: (info) => info.column.id,
|
|
65
63
|
meta: {
|
|
66
64
|
showFilter: false,
|
|
67
|
-
className: 'max-w-
|
|
65
|
+
className: 'max-w-md',
|
|
68
66
|
},
|
|
69
67
|
}),
|
|
70
68
|
|
|
@@ -147,7 +145,6 @@ export const columns = () => [
|
|
|
147
145
|
footer: (info) => info.column.id,
|
|
148
146
|
filterFn: filterCollectionByName('consumers'),
|
|
149
147
|
}),
|
|
150
|
-
createBadgesColumn(columnHelper),
|
|
151
148
|
columnHelper.accessor('data.name', {
|
|
152
149
|
header: () => <span />,
|
|
153
150
|
cell: (info) => {
|
|
@@ -5,7 +5,6 @@ import { useMemo, useState } from 'react';
|
|
|
5
5
|
import { filterByName, filterCollectionByName } from '../filters/custom-filters';
|
|
6
6
|
import { buildUrl } from '@utils/url-builder';
|
|
7
7
|
import { getColorAndIconForMessageType } from './MessageTableColumns';
|
|
8
|
-
import { createBadgesColumn } from './SharedColumns';
|
|
9
8
|
|
|
10
9
|
const columnHelper = createColumnHelper<CollectionEntry<'services'>>();
|
|
11
10
|
|
|
@@ -41,6 +40,14 @@ export const columns = () => [
|
|
|
41
40
|
},
|
|
42
41
|
filterFn: filterByName,
|
|
43
42
|
}),
|
|
43
|
+
// columnHelper.accessor('data.version', {
|
|
44
|
+
// header: () => <span>Version</span>,
|
|
45
|
+
// cell: (info) => {
|
|
46
|
+
// const service = info.row.original;
|
|
47
|
+
// return <div className="text-left">{`v${info.getValue()} ${service.data.latestVersion === service.data.version ? '(latest)': ''}`}</div>
|
|
48
|
+
// },
|
|
49
|
+
// footer: (info) => info.column.id,
|
|
50
|
+
// }),
|
|
44
51
|
columnHelper.accessor('data.summary', {
|
|
45
52
|
id: 'summary',
|
|
46
53
|
header: () => 'Summary',
|
|
@@ -168,7 +175,6 @@ export const columns = () => [
|
|
|
168
175
|
},
|
|
169
176
|
filterFn: filterCollectionByName('sends'),
|
|
170
177
|
}),
|
|
171
|
-
createBadgesColumn(columnHelper),
|
|
172
178
|
columnHelper.accessor('data.name', {
|
|
173
179
|
header: () => <span />,
|
|
174
180
|
cell: (info) => {
|
|
@@ -12,8 +12,3 @@ export const filterByName = (row: any, key: string, searchValue: string) => {
|
|
|
12
12
|
const label = `${row?.original?.data.name} (v${row?.original?.data.version})` || '';
|
|
13
13
|
return label.toLowerCase().includes(searchValue.toLowerCase());
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
export const filterByBadge = (row: any, key: string, searchValue: string) => {
|
|
17
|
-
const badges = row?.original?.data?.badges || [];
|
|
18
|
-
return badges.some((badge: any) => badge.content.toLowerCase().includes(searchValue.toLowerCase()));
|
|
19
|
-
};
|
package/package.json
CHANGED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { createColumnHelper } from '@tanstack/react-table';
|
|
2
|
-
import { Tag } from 'lucide-react';
|
|
3
|
-
import { filterByBadge } from '../filters/custom-filters';
|
|
4
|
-
export const createBadgesColumn = <T extends { data: { badges?: any[] } }>(
|
|
5
|
-
columnHelper: ReturnType<typeof createColumnHelper<T>>
|
|
6
|
-
) => {
|
|
7
|
-
return columnHelper.accessor((row) => row.data.badges, {
|
|
8
|
-
id: 'badges',
|
|
9
|
-
header: () => <span>Badges</span>,
|
|
10
|
-
cell: (info) => {
|
|
11
|
-
const item = info.row.original;
|
|
12
|
-
const badges = item.data.badges || [];
|
|
13
|
-
|
|
14
|
-
if (badges?.length === 0 || !badges)
|
|
15
|
-
return <div className="font-light text-sm text-gray-400/60 text-left italic">No badges documented</div>;
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<ul>
|
|
19
|
-
{badges.map((badge: any, index: number) => {
|
|
20
|
-
return (
|
|
21
|
-
<li key={`${badge.id}-${index}`} className="py-1 group font-light ">
|
|
22
|
-
<div className="group-hover:text-primary flex space-x-1 items-center ">
|
|
23
|
-
<div className="flex items-center border border-gray-300 shadow-sm rounded-md">
|
|
24
|
-
<span className="flex items-center">
|
|
25
|
-
<span className={`bg-${badge.backgroundColor}-500 h-full rounded-tl rounded-bl p-1`}>
|
|
26
|
-
{badge.icon && <badge.icon className="h-4 w-4 text-white" />}
|
|
27
|
-
{!badge.icon && <Tag className="h-4 w-4 text-white" />}
|
|
28
|
-
</span>
|
|
29
|
-
<span className="leading-none px-2 group-hover:underline ">{badge.content}</span>
|
|
30
|
-
</span>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</li>
|
|
34
|
-
);
|
|
35
|
-
})}
|
|
36
|
-
</ul>
|
|
37
|
-
);
|
|
38
|
-
},
|
|
39
|
-
meta: {
|
|
40
|
-
filterVariant: 'badges',
|
|
41
|
-
},
|
|
42
|
-
filterFn: filterByBadge,
|
|
43
|
-
});
|
|
44
|
-
};
|