@eventcatalog/core 3.0.0-beta.24 → 3.0.0-beta.26
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/catalog-to-astro-content-directory.cjs +2 -19
- package/dist/catalog-to-astro-content-directory.d.cts +1 -2
- package/dist/catalog-to-astro-content-directory.d.ts +1 -2
- package/dist/catalog-to-astro-content-directory.js +3 -5
- package/dist/{chunk-4UUGLZEP.js → chunk-3YJD7KVJ.js} +1 -1
- package/dist/{chunk-ZQX7H4YO.js → chunk-5TB5SKXE.js} +1 -1
- package/dist/{chunk-7KD4X5PQ.js → chunk-6VKMP3FH.js} +1 -1
- package/dist/{chunk-R2BJ7MJG.js → chunk-6Z6ARMQS.js} +1 -17
- package/dist/{chunk-HQW2RZD2.js → chunk-MZTNQHMI.js} +1 -1
- package/dist/{chunk-6A3FVZJI.js → chunk-WQFW32XA.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -18
- package/dist/eventcatalog.js +7 -10
- 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/SchemaExplorer/ApiAccessSection.tsx +95 -90
- package/eventcatalog/src/components/SchemaExplorer/ApiContentViewer.tsx +144 -0
- package/eventcatalog/src/components/SchemaExplorer/Pagination.tsx +34 -8
- package/eventcatalog/src/components/SchemaExplorer/SchemaContentViewer.tsx +2 -2
- package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsHeader.tsx +140 -109
- package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsPanel.tsx +5 -14
- package/eventcatalog/src/components/SchemaExplorer/SchemaExplorer.tsx +247 -59
- package/eventcatalog/src/components/SchemaExplorer/SchemaFilters.tsx +64 -126
- package/eventcatalog/src/components/SchemaExplorer/SchemaListItem.tsx +41 -43
- package/eventcatalog/src/components/Search/SearchDataLoader.astro +25 -0
- package/eventcatalog/src/components/SideNav/NestedSideBar/SearchBar.tsx +1 -1
- package/eventcatalog/src/components/SideNav/NestedSideBar/index.tsx +43 -16
- package/eventcatalog/src/components/SideNav/SideNav.astro +0 -15
- package/eventcatalog/src/components/Tables/Table.tsx +96 -77
- package/eventcatalog/src/components/Tables/columns/ContainersTableColumns.tsx +108 -74
- package/eventcatalog/src/components/Tables/columns/DomainTableColumns.tsx +74 -55
- package/eventcatalog/src/components/Tables/columns/FlowTableColumns.tsx +36 -36
- package/eventcatalog/src/components/Tables/columns/MessageTableColumns.tsx +110 -77
- package/eventcatalog/src/components/Tables/columns/ServiceTableColumns.tsx +105 -94
- package/eventcatalog/src/components/Tables/columns/SharedColumns.tsx +31 -26
- package/eventcatalog/src/components/Tables/columns/TeamsTableColumns.tsx +115 -215
- package/eventcatalog/src/components/Tables/columns/UserTableColumns.tsx +145 -243
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +5 -2
- package/eventcatalog/src/pages/_index.astro +239 -554
- package/eventcatalog/src/pages/directory/[type]/index.astro +6 -0
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +1 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/language/index.astro +194 -121
- package/eventcatalog/src/pages/docs/teams/[id]/index.astro +94 -70
- package/eventcatalog/src/pages/docs/users/[id]/index.astro +56 -45
- package/eventcatalog/src/pages/studio.astro +124 -72
- package/eventcatalog/src/stores/{sidebar-store.ts → sidebar-store/index.ts} +1 -1
- package/package.json +1 -1
- /package/eventcatalog/src/{components/SideNav/NestedSideBar → stores/sidebar-store}/builders/container.ts +0 -0
- /package/eventcatalog/src/{components/SideNav/NestedSideBar → stores/sidebar-store}/builders/domain.ts +0 -0
- /package/eventcatalog/src/{components/SideNav/NestedSideBar → stores/sidebar-store}/builders/flow.ts +0 -0
- /package/eventcatalog/src/{components/SideNav/NestedSideBar → stores/sidebar-store}/builders/message.ts +0 -0
- /package/eventcatalog/src/{components/SideNav/NestedSideBar → stores/sidebar-store}/builders/service.ts +0 -0
- /package/eventcatalog/src/{components/SideNav/NestedSideBar → stores/sidebar-store}/builders/shared.ts +0 -0
- /package/eventcatalog/src/{components/SideNav/NestedSideBar/sidebar-builder.ts → stores/sidebar-store/state.ts} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createColumnHelper } from '@tanstack/react-table';
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { filterByName } from '../filters/custom-filters';
|
|
3
4
|
import { buildUrl } from '@utils/url-builder';
|
|
4
5
|
import { ServerIcon } from '@heroicons/react/24/solid';
|
|
@@ -15,25 +16,21 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
15
16
|
header: () => <span>{tableConfiguration.columns?.name?.label || 'Storage'}</span>,
|
|
16
17
|
cell: (info) => {
|
|
17
18
|
const containerRaw = info.row.original;
|
|
18
|
-
const color = 'blue';
|
|
19
19
|
return (
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
>
|
|
25
|
-
<
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
</div>
|
|
35
|
-
</a>
|
|
36
|
-
</div>
|
|
20
|
+
<a
|
|
21
|
+
href={buildUrl(`/docs/${containerRaw.collection}/${containerRaw.data.id}/${containerRaw.data.version}`)}
|
|
22
|
+
className="group inline-flex items-center"
|
|
23
|
+
>
|
|
24
|
+
<span className="inline-flex items-center rounded-md border border-gray-200 bg-white hover:border-blue-300 hover:bg-blue-50 transition-colors">
|
|
25
|
+
<span className="flex items-center justify-center w-6 h-6 bg-blue-500 rounded-l-md">
|
|
26
|
+
<DatabaseIcon className="h-3 w-3 text-white" />
|
|
27
|
+
</span>
|
|
28
|
+
<span className="px-2 py-1 text-xs text-gray-700 group-hover:text-gray-900">
|
|
29
|
+
{containerRaw.data.name}
|
|
30
|
+
<span className="text-gray-400 ml-1">v{containerRaw.data.version}</span>
|
|
31
|
+
</span>
|
|
32
|
+
</span>
|
|
33
|
+
</a>
|
|
37
34
|
);
|
|
38
35
|
},
|
|
39
36
|
footer: (info) => info.column.id,
|
|
@@ -45,7 +42,14 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
45
42
|
columnHelper.accessor('data.summary', {
|
|
46
43
|
id: 'summary',
|
|
47
44
|
header: () => <span>{tableConfiguration.columns?.summary?.label || 'Summary'}</span>,
|
|
48
|
-
cell: (info) =>
|
|
45
|
+
cell: (info) => {
|
|
46
|
+
const summary = info.renderValue() as string;
|
|
47
|
+
return (
|
|
48
|
+
<span className="text-sm text-gray-600 line-clamp-2" title={summary || ''}>
|
|
49
|
+
{summary}
|
|
50
|
+
</span>
|
|
51
|
+
);
|
|
52
|
+
},
|
|
49
53
|
footer: (info) => info.column.id,
|
|
50
54
|
meta: {
|
|
51
55
|
showFilter: false,
|
|
@@ -61,32 +65,43 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
61
65
|
},
|
|
62
66
|
cell: (info) => {
|
|
63
67
|
const services = info.getValue();
|
|
68
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
69
|
+
|
|
64
70
|
if (services?.length === 0 || !services)
|
|
65
|
-
return
|
|
71
|
+
return (
|
|
72
|
+
<span className="inline-flex items-center px-2 py-1 text-xs text-gray-400 bg-gray-50 rounded-md border border-gray-100">
|
|
73
|
+
No services
|
|
74
|
+
</span>
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
const visibleItems = isExpanded ? services : services.slice(0, 4);
|
|
78
|
+
const hiddenCount = services.length - 4;
|
|
79
|
+
|
|
66
80
|
return (
|
|
67
|
-
<
|
|
68
|
-
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
81
|
+
<div className="flex flex-col gap-1.5">
|
|
82
|
+
{visibleItems.map((service, index) => (
|
|
83
|
+
<a
|
|
84
|
+
key={`${service.data.id}-${index}`}
|
|
85
|
+
href={buildUrl(`/docs/${service.collection}/${service.data.id}/${service.data.version}`)}
|
|
86
|
+
className="group inline-flex items-center"
|
|
87
|
+
>
|
|
88
|
+
<span className="inline-flex items-center rounded-md border border-gray-200 bg-white hover:border-pink-300 hover:bg-pink-50 transition-colors">
|
|
89
|
+
<span className="flex items-center justify-center w-6 h-6 bg-pink-500 rounded-l-md">
|
|
90
|
+
<ServerIcon className="h-3 w-3 text-white" />
|
|
91
|
+
</span>
|
|
92
|
+
<span className="px-2 py-1 text-xs text-gray-700 group-hover:text-gray-900">
|
|
93
|
+
{service.data.name}
|
|
94
|
+
<span className="text-gray-400 ml-1">v{service.data.version}</span>
|
|
95
|
+
</span>
|
|
96
|
+
</span>
|
|
97
|
+
</a>
|
|
98
|
+
))}
|
|
99
|
+
{hiddenCount > 0 && (
|
|
100
|
+
<button onClick={() => setIsExpanded(!isExpanded)} className="text-xs text-gray-500 hover:text-gray-700 text-left">
|
|
101
|
+
{isExpanded ? 'Show less' : `+${hiddenCount} more`}
|
|
102
|
+
</button>
|
|
103
|
+
)}
|
|
104
|
+
</div>
|
|
90
105
|
);
|
|
91
106
|
},
|
|
92
107
|
footer: (info) => info.column.id,
|
|
@@ -101,32 +116,43 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
101
116
|
},
|
|
102
117
|
cell: (info) => {
|
|
103
118
|
const services = info.getValue();
|
|
119
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
120
|
+
|
|
104
121
|
if (services?.length === 0 || !services)
|
|
105
|
-
return
|
|
122
|
+
return (
|
|
123
|
+
<span className="inline-flex items-center px-2 py-1 text-xs text-gray-400 bg-gray-50 rounded-md border border-gray-100">
|
|
124
|
+
No services
|
|
125
|
+
</span>
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
const visibleItems = isExpanded ? services : services.slice(0, 4);
|
|
129
|
+
const hiddenCount = services.length - 4;
|
|
130
|
+
|
|
106
131
|
return (
|
|
107
|
-
<
|
|
108
|
-
{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
132
|
+
<div className="flex flex-col gap-1.5">
|
|
133
|
+
{visibleItems.map((service, index) => (
|
|
134
|
+
<a
|
|
135
|
+
key={`${service.data.id}-${index}`}
|
|
136
|
+
href={buildUrl(`/docs/${service.collection}/${service.data.id}/${service.data.version}`)}
|
|
137
|
+
className="group inline-flex items-center"
|
|
138
|
+
>
|
|
139
|
+
<span className="inline-flex items-center rounded-md border border-gray-200 bg-white hover:border-pink-300 hover:bg-pink-50 transition-colors">
|
|
140
|
+
<span className="flex items-center justify-center w-6 h-6 bg-pink-500 rounded-l-md">
|
|
141
|
+
<ServerIcon className="h-3 w-3 text-white" />
|
|
142
|
+
</span>
|
|
143
|
+
<span className="px-2 py-1 text-xs text-gray-700 group-hover:text-gray-900">
|
|
144
|
+
{service.data.name}
|
|
145
|
+
<span className="text-gray-400 ml-1">v{service.data.version}</span>
|
|
146
|
+
</span>
|
|
147
|
+
</span>
|
|
148
|
+
</a>
|
|
149
|
+
))}
|
|
150
|
+
{hiddenCount > 0 && (
|
|
151
|
+
<button onClick={() => setIsExpanded(!isExpanded)} className="text-xs text-gray-500 hover:text-gray-700 text-left">
|
|
152
|
+
{isExpanded ? 'Show less' : `+${hiddenCount} more`}
|
|
153
|
+
</button>
|
|
154
|
+
)}
|
|
155
|
+
</div>
|
|
130
156
|
);
|
|
131
157
|
},
|
|
132
158
|
footer: (info) => info.column.id,
|
|
@@ -136,14 +162,22 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
136
162
|
columnHelper.accessor('data.name', {
|
|
137
163
|
header: () => <span>{tableConfiguration.columns?.actions?.label || 'Actions'}</span>,
|
|
138
164
|
cell: (info) => {
|
|
139
|
-
const
|
|
165
|
+
const item = info.row.original;
|
|
140
166
|
return (
|
|
141
|
-
<
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
167
|
+
<div className="flex items-center gap-2">
|
|
168
|
+
<a
|
|
169
|
+
className="inline-flex items-center px-2.5 py-1 text-xs font-medium text-gray-600 bg-gray-50 border border-gray-200 rounded-md hover:bg-gray-100 hover:text-gray-900 transition-colors whitespace-nowrap"
|
|
170
|
+
href={buildUrl(`/docs/${item.collection}/${item.data.id}/${item.data.version}`)}
|
|
171
|
+
>
|
|
172
|
+
Docs
|
|
173
|
+
</a>
|
|
174
|
+
<a
|
|
175
|
+
className="inline-flex items-center px-2.5 py-1 text-xs font-medium text-gray-600 bg-gray-50 border border-gray-200 rounded-md hover:bg-gray-100 hover:text-gray-900 transition-colors whitespace-nowrap"
|
|
176
|
+
href={buildUrl(`/visualiser/${item.collection}/${item.data.id}/${item.data.version}`)}
|
|
177
|
+
>
|
|
178
|
+
Visualiser
|
|
179
|
+
</a>
|
|
180
|
+
</div>
|
|
147
181
|
);
|
|
148
182
|
},
|
|
149
183
|
id: 'actions',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ServerIcon, RectangleGroupIcon } from '@heroicons/react/20/solid';
|
|
2
2
|
import { createColumnHelper } from '@tanstack/react-table';
|
|
3
|
+
import { useState } from 'react';
|
|
3
4
|
import { filterByName, filterCollectionByName } from '../filters/custom-filters';
|
|
4
5
|
import { buildUrl } from '@utils/url-builder';
|
|
5
6
|
import { createBadgesColumn } from './SharedColumns';
|
|
@@ -14,25 +15,21 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
14
15
|
header: () => <span>{tableConfiguration.columns?.name?.label || 'Domain'}</span>,
|
|
15
16
|
cell: (info) => {
|
|
16
17
|
const messageRaw = info.row.original;
|
|
17
|
-
const color = 'yellow';
|
|
18
18
|
return (
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
>
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</div>
|
|
34
|
-
</a>
|
|
35
|
-
</div>
|
|
19
|
+
<a
|
|
20
|
+
href={buildUrl(`/docs/${messageRaw.collection}/${messageRaw.data.id}/${messageRaw.data.version}`)}
|
|
21
|
+
className="group inline-flex items-center"
|
|
22
|
+
>
|
|
23
|
+
<span className="inline-flex items-center rounded-md border border-gray-200 bg-white hover:border-yellow-300 hover:bg-yellow-50 transition-colors">
|
|
24
|
+
<span className="flex items-center justify-center w-6 h-6 bg-yellow-500 rounded-l-md">
|
|
25
|
+
<RectangleGroupIcon className="h-3 w-3 text-white" />
|
|
26
|
+
</span>
|
|
27
|
+
<span className="px-2 py-1 text-xs text-gray-700 group-hover:text-gray-900">
|
|
28
|
+
{messageRaw.data.name}
|
|
29
|
+
<span className="text-gray-400 ml-1">v{messageRaw.data.version}</span>
|
|
30
|
+
</span>
|
|
31
|
+
</span>
|
|
32
|
+
</a>
|
|
36
33
|
);
|
|
37
34
|
},
|
|
38
35
|
footer: (info) => info.column.id,
|
|
@@ -44,11 +41,16 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
44
41
|
columnHelper.accessor('data.summary', {
|
|
45
42
|
id: 'summary',
|
|
46
43
|
header: () => <span>{tableConfiguration.columns?.summary?.label || 'Summary'}</span>,
|
|
47
|
-
cell: (info) =>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
cell: (info) => {
|
|
45
|
+
const summary = info.renderValue() as string;
|
|
46
|
+
const isDraft = info.row.original.data.draft;
|
|
47
|
+
const displayText = `${summary || ''}${isDraft ? ' (Draft)' : ''}`;
|
|
48
|
+
return (
|
|
49
|
+
<span className="text-sm text-gray-600 line-clamp-2" title={displayText}>
|
|
50
|
+
{displayText}
|
|
51
|
+
</span>
|
|
52
|
+
);
|
|
53
|
+
},
|
|
52
54
|
footer: (info) => info.column.id,
|
|
53
55
|
meta: {
|
|
54
56
|
showFilter: false,
|
|
@@ -64,34 +66,43 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
64
66
|
},
|
|
65
67
|
cell: (info) => {
|
|
66
68
|
const services = info.getValue();
|
|
69
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
70
|
+
|
|
67
71
|
if (services?.length === 0 || !services)
|
|
68
|
-
return
|
|
72
|
+
return (
|
|
73
|
+
<span className="inline-flex items-center px-2 py-1 text-xs text-gray-400 bg-gray-50 rounded-md border border-gray-100">
|
|
74
|
+
No services
|
|
75
|
+
</span>
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
const visibleItems = isExpanded ? services : services.slice(0, 4);
|
|
79
|
+
const hiddenCount = services.length - 4;
|
|
69
80
|
|
|
70
81
|
return (
|
|
71
|
-
<
|
|
72
|
-
{
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
>
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
</
|
|
82
|
+
<div className="flex flex-col gap-1.5">
|
|
83
|
+
{visibleItems.map((service, index) => (
|
|
84
|
+
<a
|
|
85
|
+
key={`${service.data.id}-${index}`}
|
|
86
|
+
href={buildUrl(`/docs/${service.collection}/${service.data.id}/${service.data.version}`)}
|
|
87
|
+
className="group inline-flex items-center"
|
|
88
|
+
>
|
|
89
|
+
<span className="inline-flex items-center rounded-md border border-gray-200 bg-white hover:border-pink-300 hover:bg-pink-50 transition-colors">
|
|
90
|
+
<span className="flex items-center justify-center w-6 h-6 bg-pink-500 rounded-l-md">
|
|
91
|
+
<ServerIcon className="h-3 w-3 text-white" />
|
|
92
|
+
</span>
|
|
93
|
+
<span className="px-2 py-1 text-xs text-gray-700 group-hover:text-gray-900">
|
|
94
|
+
{service.data.name}
|
|
95
|
+
<span className="text-gray-400 ml-1">v{service.data.version}</span>
|
|
96
|
+
</span>
|
|
97
|
+
</span>
|
|
98
|
+
</a>
|
|
99
|
+
))}
|
|
100
|
+
{hiddenCount > 0 && (
|
|
101
|
+
<button onClick={() => setIsExpanded(!isExpanded)} className="text-xs text-gray-500 hover:text-gray-700 text-left">
|
|
102
|
+
{isExpanded ? 'Show less' : `+${hiddenCount} more`}
|
|
103
|
+
</button>
|
|
104
|
+
)}
|
|
105
|
+
</div>
|
|
95
106
|
);
|
|
96
107
|
},
|
|
97
108
|
filterFn: filterCollectionByName('services'),
|
|
@@ -101,14 +112,22 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
101
112
|
id: 'actions',
|
|
102
113
|
header: () => <span>{tableConfiguration.columns?.actions?.label || 'Actions'}</span>,
|
|
103
114
|
cell: (info) => {
|
|
104
|
-
const
|
|
115
|
+
const item = info.row.original;
|
|
105
116
|
return (
|
|
106
|
-
<
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
117
|
+
<div className="flex items-center gap-2">
|
|
118
|
+
<a
|
|
119
|
+
className="inline-flex items-center px-2.5 py-1 text-xs font-medium text-gray-600 bg-gray-50 border border-gray-200 rounded-md hover:bg-gray-100 hover:text-gray-900 transition-colors whitespace-nowrap"
|
|
120
|
+
href={buildUrl(`/docs/${item.collection}/${item.data.id}/${item.data.version}`)}
|
|
121
|
+
>
|
|
122
|
+
Docs
|
|
123
|
+
</a>
|
|
124
|
+
<a
|
|
125
|
+
className="inline-flex items-center px-2.5 py-1 text-xs font-medium text-gray-600 bg-gray-50 border border-gray-200 rounded-md hover:bg-gray-100 hover:text-gray-900 transition-colors whitespace-nowrap"
|
|
126
|
+
href={buildUrl(`/visualiser/${item.collection}/${item.data.id}/${item.data.version}`)}
|
|
127
|
+
>
|
|
128
|
+
Visualiser
|
|
129
|
+
</a>
|
|
130
|
+
</div>
|
|
112
131
|
);
|
|
113
132
|
},
|
|
114
133
|
meta: {
|
|
@@ -14,25 +14,21 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
14
14
|
header: () => <span>{tableConfiguration.columns?.name?.label || 'Flow'}</span>,
|
|
15
15
|
cell: (info) => {
|
|
16
16
|
const flowRaw = info.row.original;
|
|
17
|
-
const color = 'teal';
|
|
18
17
|
return (
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
>
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</div>
|
|
34
|
-
</a>
|
|
35
|
-
</div>
|
|
18
|
+
<a
|
|
19
|
+
href={buildUrl(`/docs/${flowRaw.collection}/${flowRaw.data.id}/${flowRaw.data.version}`)}
|
|
20
|
+
className="group inline-flex items-center"
|
|
21
|
+
>
|
|
22
|
+
<span className="inline-flex items-center rounded-md border border-gray-200 bg-white hover:border-teal-300 hover:bg-teal-50 transition-colors">
|
|
23
|
+
<span className="flex items-center justify-center w-6 h-6 bg-teal-500 rounded-l-md">
|
|
24
|
+
<QueueListIcon className="h-3 w-3 text-white" />
|
|
25
|
+
</span>
|
|
26
|
+
<span className="px-2 py-1 text-xs text-gray-700 group-hover:text-gray-900">
|
|
27
|
+
{flowRaw.data.name}
|
|
28
|
+
<span className="text-gray-400 ml-1">v{flowRaw.data.version}</span>
|
|
29
|
+
</span>
|
|
30
|
+
</span>
|
|
31
|
+
</a>
|
|
36
32
|
);
|
|
37
33
|
},
|
|
38
34
|
footer: (info) => info.column.id,
|
|
@@ -41,22 +37,18 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
41
37
|
},
|
|
42
38
|
filterFn: filterByName,
|
|
43
39
|
}),
|
|
44
|
-
columnHelper.accessor('data.
|
|
45
|
-
id: '
|
|
46
|
-
header: () => <span>{tableConfiguration.columns?.
|
|
40
|
+
columnHelper.accessor('data.summary', {
|
|
41
|
+
id: 'summary',
|
|
42
|
+
header: () => <span>{tableConfiguration.columns?.summary?.label || 'Summary'}</span>,
|
|
47
43
|
cell: (info) => {
|
|
48
|
-
const
|
|
44
|
+
const summary = info.renderValue() as string;
|
|
49
45
|
return (
|
|
50
|
-
<
|
|
46
|
+
<span className="text-sm text-gray-600 line-clamp-2" title={summary || ''}>
|
|
47
|
+
{summary}
|
|
48
|
+
</span>
|
|
51
49
|
);
|
|
52
50
|
},
|
|
53
51
|
footer: (info) => info.column.id,
|
|
54
|
-
}),
|
|
55
|
-
columnHelper.accessor('data.summary', {
|
|
56
|
-
id: 'summary',
|
|
57
|
-
header: () => <span>{tableConfiguration.columns?.summary?.label || 'Summary'}</span>,
|
|
58
|
-
cell: (info) => <span className="font-light ">{info.renderValue()}</span>,
|
|
59
|
-
footer: (info) => info.column.id,
|
|
60
52
|
meta: {
|
|
61
53
|
showFilter: false,
|
|
62
54
|
className: 'max-w-md',
|
|
@@ -67,14 +59,22 @@ export const columns = (tableConfiguration: TableConfiguration) => [
|
|
|
67
59
|
id: 'actions',
|
|
68
60
|
header: () => <span>{tableConfiguration.columns?.actions?.label || 'Actions'}</span>,
|
|
69
61
|
cell: (info) => {
|
|
70
|
-
const
|
|
62
|
+
const item = info.row.original;
|
|
71
63
|
return (
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
64
|
+
<div className="flex items-center gap-2">
|
|
65
|
+
<a
|
|
66
|
+
className="inline-flex items-center px-2.5 py-1 text-xs font-medium text-gray-600 bg-gray-50 border border-gray-200 rounded-md hover:bg-gray-100 hover:text-gray-900 transition-colors whitespace-nowrap"
|
|
67
|
+
href={buildUrl(`/docs/${item.collection}/${item.data.id}/${item.data.version}`)}
|
|
68
|
+
>
|
|
69
|
+
Docs
|
|
70
|
+
</a>
|
|
71
|
+
<a
|
|
72
|
+
className="inline-flex items-center px-2.5 py-1 text-xs font-medium text-gray-600 bg-gray-50 border border-gray-200 rounded-md hover:bg-gray-100 hover:text-gray-900 transition-colors whitespace-nowrap"
|
|
73
|
+
href={buildUrl(`/visualiser/${item.collection}/${item.data.id}/${item.data.version}`)}
|
|
74
|
+
>
|
|
75
|
+
Visualiser
|
|
76
|
+
</a>
|
|
77
|
+
</div>
|
|
78
78
|
);
|
|
79
79
|
},
|
|
80
80
|
meta: {
|