@eventcatalog/core 2.19.5 → 2.19.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-OKHQFK4L.js → chunk-DPCHEH2D.js} +1 -1
- package/dist/{chunk-Q6OST5JI.js → chunk-OBSAD2VP.js} +1 -1
- package/dist/{chunk-TWY4P4FZ.js → chunk-VPBQ3QKC.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/Tables/Table.tsx +81 -24
- package/eventcatalog/src/components/Tables/columns/DomainTableColumns.tsx +4 -5
- package/eventcatalog/src/components/Tables/columns/FlowTableColumns.tsx +2 -2
- package/eventcatalog/src/components/Tables/columns/MessageTableColumns.tsx +6 -6
- package/eventcatalog/src/components/Tables/columns/ServiceTableColumns.tsx +5 -5
- package/eventcatalog/src/components/Tables/columns/SharedColumns.tsx +4 -2
- package/eventcatalog/src/layouts/DiscoverLayout.astro +8 -1
- package/eventcatalog/src/pages/discover/[type]/index.astro +37 -5
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-VPBQ3QKC.js";
|
|
4
|
+
import "../chunk-OBSAD2VP.js";
|
|
5
|
+
import "../chunk-DPCHEH2D.js";
|
|
6
6
|
import "../chunk-E7TXTI7G.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
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-SHCMAL37.js";
|
|
4
4
|
import {
|
|
5
5
|
log_build_default
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-VPBQ3QKC.js";
|
|
7
|
+
import "./chunk-OBSAD2VP.js";
|
|
8
8
|
import {
|
|
9
9
|
catalogToAstro
|
|
10
10
|
} from "./chunk-WF34R5UT.js";
|
|
11
11
|
import {
|
|
12
12
|
VERSION
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-DPCHEH2D.js";
|
|
14
14
|
import {
|
|
15
15
|
generate
|
|
16
16
|
} from "./chunk-YEQVKHST.js";
|
|
@@ -9,34 +9,100 @@ import {
|
|
|
9
9
|
useReactTable,
|
|
10
10
|
type Column,
|
|
11
11
|
type ColumnFiltersState,
|
|
12
|
-
type Row,
|
|
13
12
|
} from '@tanstack/react-table';
|
|
14
|
-
import type { CollectionEntry } from 'astro:content';
|
|
15
13
|
import DebouncedInput from './DebouncedInput';
|
|
16
14
|
|
|
17
15
|
import { getColumnsByCollection } from './columns';
|
|
18
|
-
import { useEffect, useMemo, useState
|
|
19
|
-
import type {
|
|
16
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
17
|
+
import type { CollectionMessageTypes } from '@types';
|
|
20
18
|
import { isSameVersion } from '@utils/collections/util';
|
|
21
19
|
|
|
22
20
|
declare module '@tanstack/react-table' {
|
|
23
21
|
// @ts-ignore
|
|
24
22
|
interface ColumnMeta<TData extends RowData, TValue> {
|
|
25
23
|
filterVariant?: 'collection' | 'name' | 'badges';
|
|
26
|
-
collectionFilterKey?:
|
|
24
|
+
collectionFilterKey?: 'producers' | 'consumers' | 'sends' | 'receives' | 'services';
|
|
27
25
|
showFilter?: boolean;
|
|
28
26
|
className?: string;
|
|
29
27
|
}
|
|
30
28
|
}
|
|
31
29
|
|
|
32
|
-
export
|
|
30
|
+
export type TCollectionTypes = 'domains' | 'services' | CollectionMessageTypes | 'flows';
|
|
31
|
+
|
|
32
|
+
export type TData<T extends TCollectionTypes> = {
|
|
33
|
+
collection: T;
|
|
34
|
+
data: {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
summary: string;
|
|
38
|
+
version: string;
|
|
39
|
+
latestVersion?: string; // Defined on getter collection utility
|
|
40
|
+
badges?: Array<{
|
|
41
|
+
id: string; // Where is it defined?
|
|
42
|
+
content: string;
|
|
43
|
+
backgroundColor: string;
|
|
44
|
+
textColor: string;
|
|
45
|
+
icon: any; // Where is it defined?
|
|
46
|
+
}>;
|
|
47
|
+
// ---------------------------------------------------------------------------
|
|
48
|
+
// Domains
|
|
49
|
+
services?: Array<{
|
|
50
|
+
collection: string; // Be more specific;
|
|
51
|
+
data: {
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
version: string;
|
|
55
|
+
};
|
|
56
|
+
}>;
|
|
57
|
+
// ---------------------------------------------------------------------------
|
|
58
|
+
// Services
|
|
59
|
+
receives?: Array<{
|
|
60
|
+
collection: string; // Be more specific;
|
|
61
|
+
data: {
|
|
62
|
+
id: string;
|
|
63
|
+
name: string;
|
|
64
|
+
version: string;
|
|
65
|
+
};
|
|
66
|
+
}>;
|
|
67
|
+
sends?: Array<{
|
|
68
|
+
collection: string; // Be more specific;
|
|
69
|
+
data: {
|
|
70
|
+
id: string;
|
|
71
|
+
name: string;
|
|
72
|
+
version: string;
|
|
73
|
+
};
|
|
74
|
+
}>;
|
|
75
|
+
// ---------------------------------------------------------------------------
|
|
76
|
+
// Messages
|
|
77
|
+
producers?: Array<{
|
|
78
|
+
collection: string; // Specify only 'services'?
|
|
79
|
+
data: {
|
|
80
|
+
id: string;
|
|
81
|
+
name: string;
|
|
82
|
+
version: string;
|
|
83
|
+
};
|
|
84
|
+
}>;
|
|
85
|
+
// Only for messages
|
|
86
|
+
consumers?: Array<{
|
|
87
|
+
collection: string; // Specify only 'services'?
|
|
88
|
+
data: {
|
|
89
|
+
id: string;
|
|
90
|
+
name: string;
|
|
91
|
+
version: string;
|
|
92
|
+
};
|
|
93
|
+
}>;
|
|
94
|
+
// ---------------------------------------------------------------------------
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export const Table = <T extends TCollectionTypes>({
|
|
33
99
|
data: initialData,
|
|
34
100
|
collection,
|
|
35
101
|
mode = 'simple',
|
|
36
102
|
checkboxLatestId,
|
|
37
103
|
}: {
|
|
38
|
-
data:
|
|
39
|
-
collection:
|
|
104
|
+
data: TData<T>[];
|
|
105
|
+
collection: T;
|
|
40
106
|
checkboxLatestId: string;
|
|
41
107
|
mode?: 'simple' | 'full';
|
|
42
108
|
}) => {
|
|
@@ -68,7 +134,6 @@ export const Table = ({
|
|
|
68
134
|
const columns = useMemo(() => getColumnsByCollection(collection), [collection]);
|
|
69
135
|
|
|
70
136
|
const table = useReactTable({
|
|
71
|
-
// @ts-ignore
|
|
72
137
|
data,
|
|
73
138
|
columns,
|
|
74
139
|
onColumnFiltersChange: setColumnFilters,
|
|
@@ -106,7 +171,6 @@ export const Table = ({
|
|
|
106
171
|
<div className="text-md">
|
|
107
172
|
{header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext())}
|
|
108
173
|
</div>
|
|
109
|
-
{/* @ts-ignore */}
|
|
110
174
|
<div className="">
|
|
111
175
|
{header.column.columnDef.meta?.showFilter !== false && <Filter column={header.column} />}
|
|
112
176
|
{header.column.columnDef.meta?.showFilter == false && <div className="h-10" />}
|
|
@@ -201,23 +265,17 @@ export const Table = ({
|
|
|
201
265
|
);
|
|
202
266
|
};
|
|
203
267
|
|
|
204
|
-
function Filter({ column }: { column: Column<
|
|
205
|
-
const { filterVariant, collectionFilterKey
|
|
268
|
+
function Filter<T extends TCollectionTypes>({ column }: { column: Column<TData<T>, unknown> }) {
|
|
269
|
+
const { filterVariant, collectionFilterKey } = column.columnDef.meta ?? {};
|
|
206
270
|
|
|
207
271
|
const columnFilterValue = column.getFilterValue();
|
|
208
272
|
|
|
209
273
|
const sortedUniqueValues = useMemo(() => {
|
|
210
|
-
if (filterVariant === 'collection') {
|
|
274
|
+
if (filterVariant === 'collection' && collectionFilterKey) {
|
|
211
275
|
const rows = column.getFacetedRowModel().rows;
|
|
212
|
-
const data = rows
|
|
213
|
-
.map((row: Row<CollectionEntry<CollectionTypes>>) => {
|
|
214
|
-
// @ts-ignore
|
|
215
|
-
const items = row.original.data[collectionFilterKey];
|
|
216
|
-
return items as CollectionEntry<CollectionTypes>[];
|
|
217
|
-
})
|
|
218
|
-
.flat();
|
|
276
|
+
const data = rows.map((row) => row.original.data?.[collectionFilterKey] ?? []).flat();
|
|
219
277
|
|
|
220
|
-
const allItems = data.map((item) => `${item
|
|
278
|
+
const allItems = data.map((item) => `${item?.data.name} (v${item?.data.version})`);
|
|
221
279
|
const uniqueItemsInList = Array.from(new Set(allItems));
|
|
222
280
|
|
|
223
281
|
return uniqueItemsInList.sort().slice(0, 2000);
|
|
@@ -225,10 +283,9 @@ function Filter({ column }: { column: Column<any, unknown> }) {
|
|
|
225
283
|
if (filterVariant === 'name') {
|
|
226
284
|
const rows = column.getFacetedRowModel().rows;
|
|
227
285
|
const data = rows
|
|
228
|
-
.map((row
|
|
229
|
-
// @ts-ignore
|
|
286
|
+
.map((row) => {
|
|
230
287
|
const data = row.original;
|
|
231
|
-
return data
|
|
288
|
+
return data;
|
|
232
289
|
})
|
|
233
290
|
.flat();
|
|
234
291
|
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
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
|
-
import
|
|
5
|
-
import { filterByBadge, filterByName, filterCollectionByName } from '../filters/custom-filters';
|
|
4
|
+
import { filterByName, filterCollectionByName } from '../filters/custom-filters';
|
|
6
5
|
import { buildUrl } from '@utils/url-builder';
|
|
7
|
-
import { Tag } from 'lucide-react';
|
|
8
6
|
import { createBadgesColumn } from './SharedColumns';
|
|
7
|
+
import type { TData } from '../Table';
|
|
9
8
|
|
|
10
|
-
const columnHelper = createColumnHelper<
|
|
9
|
+
const columnHelper = createColumnHelper<TData<'domains'>>();
|
|
11
10
|
|
|
12
11
|
export const columns = () => [
|
|
13
12
|
columnHelper.accessor('data.name', {
|
|
@@ -65,7 +64,7 @@ export const columns = () => [
|
|
|
65
64
|
|
|
66
65
|
return (
|
|
67
66
|
<ul>
|
|
68
|
-
{services.map((consumer
|
|
67
|
+
{services.map((consumer) => {
|
|
69
68
|
const color = 'pink';
|
|
70
69
|
return (
|
|
71
70
|
<li key={consumer.data.id} className="py-1 group ">
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createColumnHelper } from '@tanstack/react-table';
|
|
2
|
-
import type { CollectionEntry } from 'astro:content';
|
|
3
2
|
import { filterByName } from '../filters/custom-filters';
|
|
4
3
|
import { buildUrl } from '@utils/url-builder';
|
|
5
4
|
import { QueueListIcon } from '@heroicons/react/24/solid';
|
|
6
5
|
import { createBadgesColumn } from './SharedColumns';
|
|
6
|
+
import type { TData } from '../Table';
|
|
7
7
|
|
|
8
|
-
const columnHelper = createColumnHelper<
|
|
8
|
+
const columnHelper = createColumnHelper<TData<'flows'>>();
|
|
9
9
|
|
|
10
10
|
export const columns = () => [
|
|
11
11
|
columnHelper.accessor('data.name', {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ServerIcon, BoltIcon, ChatBubbleLeftIcon, MagnifyingGlassIcon } from '@heroicons/react/24/solid';
|
|
2
2
|
import { createColumnHelper } from '@tanstack/react-table';
|
|
3
|
-
import type { CollectionMessageTypes } from '@types';
|
|
4
|
-
import type { CollectionEntry } from 'astro:content';
|
|
5
3
|
import { useMemo } from 'react';
|
|
6
|
-
import { filterByName, filterCollectionByName
|
|
4
|
+
import { filterByName, filterCollectionByName } from '../filters/custom-filters';
|
|
7
5
|
import { buildUrl } from '@utils/url-builder';
|
|
8
6
|
import { createBadgesColumn } from './SharedColumns';
|
|
7
|
+
import type { TData } from '../Table';
|
|
8
|
+
import type { CollectionMessageTypes } from '@types';
|
|
9
9
|
|
|
10
|
-
const columnHelper = createColumnHelper<
|
|
10
|
+
const columnHelper = createColumnHelper<TData<CollectionMessageTypes>>();
|
|
11
11
|
|
|
12
12
|
export const getColorAndIconForMessageType = (type: string) => {
|
|
13
13
|
switch (type) {
|
|
@@ -80,7 +80,7 @@ export const columns = () => [
|
|
|
80
80
|
return <div className="font-light text-sm text-gray-400/60 text-left italic">No producers documented</div>;
|
|
81
81
|
return (
|
|
82
82
|
<ul className="">
|
|
83
|
-
{producers.map((producer
|
|
83
|
+
{producers.map((producer, index) => {
|
|
84
84
|
return (
|
|
85
85
|
<li className="py-2 group flex items-center space-x-2" key={`${producer.data.id}-${index}`}>
|
|
86
86
|
<a
|
|
@@ -120,7 +120,7 @@ export const columns = () => [
|
|
|
120
120
|
|
|
121
121
|
return (
|
|
122
122
|
<ul>
|
|
123
|
-
{consumers.map((consumer
|
|
123
|
+
{consumers.map((consumer, index) => {
|
|
124
124
|
return (
|
|
125
125
|
<li key={`${consumer.data.id}-${index}`} className="py-1 group font-light ">
|
|
126
126
|
<a
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ServerIcon, BoltIcon, ChatBubbleLeftIcon } from '@heroicons/react/24/solid';
|
|
2
2
|
import { createColumnHelper } from '@tanstack/react-table';
|
|
3
|
-
import type { CollectionEntry } from 'astro:content';
|
|
4
3
|
import { useMemo, useState } from 'react';
|
|
5
4
|
import { filterByName, filterCollectionByName } from '../filters/custom-filters';
|
|
6
5
|
import { buildUrl } from '@utils/url-builder';
|
|
7
6
|
import { getColorAndIconForMessageType } from './MessageTableColumns';
|
|
8
7
|
import { createBadgesColumn } from './SharedColumns';
|
|
8
|
+
import type { TData } from '../Table';
|
|
9
9
|
|
|
10
|
-
const columnHelper = createColumnHelper<
|
|
10
|
+
const columnHelper = createColumnHelper<TData<'services'>>();
|
|
11
11
|
|
|
12
12
|
export const columns = () => [
|
|
13
13
|
columnHelper.accessor('data.name', {
|
|
@@ -65,7 +65,7 @@ export const columns = () => [
|
|
|
65
65
|
|
|
66
66
|
const receiversWithIcons = useMemo(
|
|
67
67
|
() =>
|
|
68
|
-
receives?.map((consumer
|
|
68
|
+
receives?.map((consumer) => {
|
|
69
69
|
const type = consumer.collection.slice(0, -1);
|
|
70
70
|
return {
|
|
71
71
|
...consumer,
|
|
@@ -87,7 +87,7 @@ export const columns = () => [
|
|
|
87
87
|
)}
|
|
88
88
|
{isExpanded && (
|
|
89
89
|
<ul>
|
|
90
|
-
{receiversWithIcons.map((consumer
|
|
90
|
+
{receiversWithIcons.map((consumer, index: number) => (
|
|
91
91
|
<li key={`${consumer.data.id}-${index}`} className="py-1 group font-light ">
|
|
92
92
|
<a
|
|
93
93
|
href={buildUrl(`/docs/${consumer.collection}/${consumer.data.id}/${consumer.data.version}`)}
|
|
@@ -137,7 +137,7 @@ export const columns = () => [
|
|
|
137
137
|
)}
|
|
138
138
|
{isExpanded && (
|
|
139
139
|
<ul>
|
|
140
|
-
{sends.map((consumer
|
|
140
|
+
{sends.map((consumer, index) => {
|
|
141
141
|
const type = consumer.collection.slice(0, -1);
|
|
142
142
|
const color = type === 'event' ? 'orange' : 'blue';
|
|
143
143
|
const Icon = type === 'event' ? BoltIcon : ChatBubbleLeftIcon;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { createColumnHelper } from '@tanstack/react-table';
|
|
2
2
|
import { Tag } from 'lucide-react';
|
|
3
3
|
import { filterByBadge } from '../filters/custom-filters';
|
|
4
|
-
|
|
4
|
+
import type { TCollectionTypes, TData } from '../Table';
|
|
5
|
+
|
|
6
|
+
export const createBadgesColumn = <T extends { data: Pick<TData<U>['data'], 'badges'> }, U extends TCollectionTypes>(
|
|
5
7
|
columnHelper: ReturnType<typeof createColumnHelper<T>>
|
|
6
8
|
) => {
|
|
7
9
|
return columnHelper.accessor((row) => row.data.badges, {
|
|
@@ -16,7 +18,7 @@ export const createBadgesColumn = <T extends { data: { badges?: any[] } }>(
|
|
|
16
18
|
|
|
17
19
|
return (
|
|
18
20
|
<ul>
|
|
19
|
-
{badges.map((badge
|
|
21
|
+
{badges.map((badge, index) => {
|
|
20
22
|
return (
|
|
21
23
|
<li key={`${badge.id}-${index}`} className="py-1 group font-light ">
|
|
22
24
|
<div className="group-hover:text-primary flex space-x-1 items-center ">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { Table } from '@components/Tables/Table';
|
|
2
|
+
import { Table, type TData, type TCollectionTypes } from '@components/Tables/Table';
|
|
3
3
|
import { QueueListIcon, RectangleGroupIcon, BoltIcon, ChatBubbleLeftIcon } from '@heroicons/react/24/outline';
|
|
4
4
|
import ServerIcon from '@heroicons/react/24/outline/ServerIcon';
|
|
5
5
|
import { getCommands } from '@utils/commands';
|
|
@@ -20,6 +20,13 @@ const services = await getServices();
|
|
|
20
20
|
const domains = await getDomains();
|
|
21
21
|
const flows = await getFlows();
|
|
22
22
|
|
|
23
|
+
export interface Props<T extends TCollectionTypes> {
|
|
24
|
+
title: string;
|
|
25
|
+
subtitle: string;
|
|
26
|
+
data: TData<T>[];
|
|
27
|
+
type: T;
|
|
28
|
+
}
|
|
29
|
+
|
|
23
30
|
const { title, subtitle, data, type } = Astro.props;
|
|
24
31
|
const currentPath = Astro.url.pathname;
|
|
25
32
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
import DiscoverLayout from '@layouts/DiscoverLayout.astro';
|
|
3
|
-
import type { PageTypes } from '@types';
|
|
2
|
+
import DiscoverLayout, { type Props as DiscoverLayoutProps } from '@layouts/DiscoverLayout.astro';
|
|
4
3
|
import { getFlows } from '@utils/collections/flows';
|
|
5
4
|
|
|
6
5
|
import { pageDataLoader } from '@utils/page-loaders/page-data-loader';
|
|
7
|
-
type PageTypesWithFlows = PageTypes | 'flows';
|
|
8
6
|
|
|
9
7
|
export async function getStaticPaths() {
|
|
10
8
|
const loaders = {
|
|
@@ -12,7 +10,7 @@ export async function getStaticPaths() {
|
|
|
12
10
|
flows: getFlows,
|
|
13
11
|
};
|
|
14
12
|
|
|
15
|
-
const itemTypes
|
|
13
|
+
const itemTypes = ['events', 'commands', 'queries', 'services', 'domains', 'flows'] as const;
|
|
16
14
|
const allItems = await Promise.all(itemTypes.map((type) => loaders[type]()));
|
|
17
15
|
|
|
18
16
|
return allItems.flatMap((items, index) => ({
|
|
@@ -27,11 +25,45 @@ export async function getStaticPaths() {
|
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
const { type, data } = Astro.props;
|
|
28
|
+
|
|
29
|
+
function mapToItem(i: any) {
|
|
30
|
+
return {
|
|
31
|
+
collection: i.collection,
|
|
32
|
+
data: {
|
|
33
|
+
id: i.data.id,
|
|
34
|
+
name: i.data.name,
|
|
35
|
+
version: i.data.version,
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
30
39
|
---
|
|
31
40
|
|
|
32
41
|
<DiscoverLayout
|
|
33
42
|
title={`${type} (${data.length})`}
|
|
34
43
|
subtitle={`Find, filter and search for any ${type} in your system.`}
|
|
35
|
-
data={data
|
|
44
|
+
data={data.map(
|
|
45
|
+
(d) =>
|
|
46
|
+
({
|
|
47
|
+
collection: d.collection,
|
|
48
|
+
data: {
|
|
49
|
+
id: d.data.id,
|
|
50
|
+
name: d.data.name,
|
|
51
|
+
summary: d.data?.summary,
|
|
52
|
+
version: d.data.version,
|
|
53
|
+
latestVersion: d.data?.latestVersion,
|
|
54
|
+
badges: d.data?.badges,
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
consumers: d.data?.consumers?.map(mapToItem) ?? [],
|
|
57
|
+
// @ts-ignore
|
|
58
|
+
producers: d.data?.producers?.map(mapToItem) ?? [],
|
|
59
|
+
// @ts-ignore
|
|
60
|
+
receives: d.data?.receives?.map(mapToItem) ?? [],
|
|
61
|
+
// @ts-ignore
|
|
62
|
+
sends: d.data?.sends?.map(mapToItem) ?? [],
|
|
63
|
+
// @ts-ignore
|
|
64
|
+
services: d.data?.services?.map(mapToItem) ?? [],
|
|
65
|
+
},
|
|
66
|
+
}) as DiscoverLayoutProps<typeof type>['data'][0]
|
|
67
|
+
)}
|
|
36
68
|
type={type}
|
|
37
69
|
/>
|