@eventvisor/catalog 0.0.2 → 0.21.0

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +114 -0
  2. package/LICENSE +21 -0
  3. package/components.json +22 -0
  4. package/dist/assets/index-B8NMB5dQ.js +24 -0
  5. package/dist/assets/index-DdncAyM-.css +1 -0
  6. package/dist/catalog.json +297 -0
  7. package/dist/img/logo-text.png +0 -0
  8. package/dist/img/logo.png +0 -0
  9. package/dist/index.html +13 -0
  10. package/index.html +12 -0
  11. package/package.json +37 -16
  12. package/public/catalog.json +297 -0
  13. package/public/img/logo-text.png +0 -0
  14. package/public/img/logo.png +0 -0
  15. package/src/blocks/alert.tsx +30 -0
  16. package/src/blocks/content.tsx +43 -0
  17. package/src/blocks/last-modified.tsx +26 -0
  18. package/src/blocks/links.tsx +42 -0
  19. package/src/blocks/markdown.tsx +10 -0
  20. package/src/blocks/navbar.tsx +46 -0
  21. package/src/blocks/page-attributes-view.tsx +127 -0
  22. package/src/blocks/page-attributes.tsx +80 -0
  23. package/src/blocks/page-destinations-view.tsx +134 -0
  24. package/src/blocks/page-destinations.tsx +80 -0
  25. package/src/blocks/page-effects-view.tsx +139 -0
  26. package/src/blocks/page-effects.tsx +80 -0
  27. package/src/blocks/page-events-view.tsx +147 -0
  28. package/src/blocks/page-events.tsx +80 -0
  29. package/src/blocks/pretty-date.tsx +52 -0
  30. package/src/blocks/properties.tsx +170 -0
  31. package/src/blocks/root.tsx +116 -0
  32. package/src/blocks/search-input.tsx +32 -0
  33. package/src/blocks/tabs.tsx +47 -0
  34. package/src/blocks/tag.tsx +13 -0
  35. package/src/contexts/index.ts +4 -0
  36. package/src/hooks/index.ts +98 -0
  37. package/src/main.tsx +13 -0
  38. package/src/styles.css +126 -0
  39. package/src/utils/index.ts +171 -0
  40. package/tsconfig.json +30 -0
  41. package/tsconfig.node.json +11 -0
  42. package/vite.config.ts +15 -0
@@ -0,0 +1,80 @@
1
+ import React from "react";
2
+
3
+ import { TagIcon } from "@heroicons/react/20/solid";
4
+
5
+ import { Content } from "./content";
6
+ import { useEntitiesAsList } from "../hooks";
7
+ import { LinkAttribute } from "./links";
8
+ import { Alert } from "./alert";
9
+ import { LastModified } from "./last-modified";
10
+ import { Tag } from "./tag";
11
+ import { SearchInput } from "./search-input";
12
+ import { useSearch } from "../hooks";
13
+ import { getAttributesByQuery } from "../utils";
14
+
15
+ export const PageAttributes: React.FC = () => {
16
+ const entities = useEntitiesAsList("attributes");
17
+ const { searchQuery } = useSearch();
18
+
19
+ const filteredEntities = getAttributesByQuery(searchQuery, entities);
20
+
21
+ return (
22
+ <Content title="Attributes">
23
+ <SearchInput />
24
+
25
+ {filteredEntities.length === 0 && <Alert type="warning">No results found</Alert>}
26
+
27
+ {filteredEntities.length > 0 && (
28
+ <div>
29
+ <ul className="diving-gray-200 divide-y">
30
+ {filteredEntities.map((entity: any) => (
31
+ <li key={entity.name}>
32
+ <LinkAttribute name={entity.name} className="block hover:bg-gray-50">
33
+ <div className="px-6 py-4">
34
+ <div className="flex items-center justify-between">
35
+ <p className="text-md relative font-bold text-zinc-600">
36
+ {entity.name}{" "}
37
+ {entity.archived && (
38
+ <span className="ml-1 rounded-full bg-red-100 px-2 py-1 text-xs font-medium text-red-800">
39
+ archived
40
+ </span>
41
+ )}
42
+ </p>
43
+
44
+ <div className="ml-2 flex flex-shrink-0 text-xs text-gray-500">
45
+ <div>
46
+ <TagIcon className="inline-block h-6 w-6 pr-1 text-xs text-gray-400" />
47
+ {entity.tags.map((tag: string) => (
48
+ <Tag tag={tag} key={tag} />
49
+ ))}
50
+ </div>
51
+ </div>
52
+ </div>
53
+
54
+ <div className="mt-2 flex justify-between">
55
+ <div className="flex">
56
+ <p className="line-clamp-3 max-w-md items-center text-sm text-gray-500">
57
+ {entity.description && entity.description.trim().length > 0
58
+ ? entity.description
59
+ : "n/a"}
60
+ </p>
61
+ </div>
62
+
63
+ <div className="items-top mt-2 flex text-xs text-gray-500 sm:mt-0">
64
+ <LastModified lastModified={entity.lastModified} />
65
+ </div>
66
+ </div>
67
+ </div>
68
+ </LinkAttribute>
69
+ </li>
70
+ ))}
71
+ </ul>
72
+ </div>
73
+ )}
74
+
75
+ <p className="mt-6 text-center text-sm text-gray-500">
76
+ A total of <span className="font-bold">{filteredEntities.length}</span> results found.
77
+ </p>
78
+ </Content>
79
+ );
80
+ };
@@ -0,0 +1,134 @@
1
+ import React from "react";
2
+ import { Outlet, useParams, useOutletContext } from "react-router";
3
+
4
+ import { Content } from "./content";
5
+ import { useEntity } from "../hooks";
6
+ import { Alert } from "./alert";
7
+ import { Tabs } from "./tabs";
8
+ import { Markdown } from "./markdown";
9
+ import { Tag } from "./tag";
10
+
11
+ export function DisplayDestinationOverview() {
12
+ const { entity, name } = useOutletContext() as any;
13
+
14
+ return (
15
+ <div className="border-gray-200 py-6">
16
+ <dl className="grid grid-cols-1 gap-x-4 gap-y-8 sm:grid-cols-2">
17
+ <div>
18
+ <dt className="text-sm font-medium text-gray-500">Name</dt>
19
+ <dd className="mt-1 text-sm text-gray-900">{name}</dd>
20
+ </div>
21
+
22
+ <div>
23
+ <dt className="text-sm font-medium text-gray-500">Tags</dt>
24
+ <dd className="mt-1 text-sm text-gray-900">
25
+ {entity.tags.map((tag: string) => (
26
+ <Tag tag={tag} key={tag} />
27
+ ))}
28
+ </dd>
29
+ </div>
30
+
31
+ <div>
32
+ <dt className="text-sm font-medium text-gray-500">Archived</dt>
33
+ <dd className="mt-1 text-sm text-gray-900">
34
+ {entity.archived === true ? <span>Yes</span> : <span>No</span>}
35
+ </dd>
36
+ </div>
37
+
38
+ <div>
39
+ <dt className="text-sm font-medium text-gray-500">Deprecated</dt>
40
+ <dd className="mt-1 text-sm text-gray-900">
41
+ {entity.deprecated === true ? <span>Yes</span> : <span>No</span>}
42
+ </dd>
43
+ </div>
44
+
45
+ <div>
46
+ <dt className="text-sm font-medium text-gray-500">Transport</dt>
47
+ <dd className="mt-1 text-sm text-gray-900">{entity.transport}</dd>
48
+ </div>
49
+
50
+ <div className="col-span-2">
51
+ <dt className="text-sm font-medium text-gray-500">Description</dt>
52
+ <dd className="mt-1 text-sm text-gray-900">
53
+ {entity.description.trim().length > 0 ? (
54
+ <Markdown children={entity.description} />
55
+ ) : (
56
+ "n/a"
57
+ )}
58
+ </dd>
59
+ </div>
60
+
61
+ {entity.conditions && (
62
+ <div className="col-span-2">
63
+ <dt className="text-sm font-medium text-gray-500">Conditions</dt>
64
+ <dd className="mt-1 text-sm text-gray-900">
65
+ <pre>
66
+ <code>{JSON.stringify(entity.conditions, null, 2)}</code>
67
+ </pre>
68
+ </dd>
69
+ </div>
70
+ )}
71
+
72
+ {entity.sample && (
73
+ <div className="col-span-2">
74
+ <dt className="text-sm font-medium text-gray-500">Sample</dt>
75
+ <dd className="mt-1 text-sm text-gray-900">
76
+ <pre>
77
+ <code>{JSON.stringify(entity.sample, null, 2)}</code>
78
+ </pre>
79
+ </dd>
80
+ </div>
81
+ )}
82
+
83
+ {entity.transforms && (
84
+ <div className="col-span-2">
85
+ <dt className="text-sm font-medium text-gray-500">Transforms</dt>
86
+ <dd className="mt-1 text-sm text-gray-900">
87
+ <pre>
88
+ <code>{JSON.stringify(entity.transforms, null, 2)}</code>
89
+ </pre>
90
+ </dd>
91
+ </div>
92
+ )}
93
+ </dl>
94
+ </div>
95
+ );
96
+ }
97
+
98
+ export const PageDestinationsView: React.FC = () => {
99
+ const { name = "" } = useParams();
100
+
101
+ const entity = useEntity("destinations", name);
102
+
103
+ const tabs = [
104
+ {
105
+ title: "Overview",
106
+ to: `/destinations/${encodeURIComponent(name)}`,
107
+ },
108
+ // {
109
+ // title: "History",
110
+ // to: `/destinations/${encodeURIComponent(name)}/history`,
111
+ // },
112
+ ];
113
+
114
+ return (
115
+ <Content
116
+ title={`Destination: ${name}`}
117
+ border={false}
118
+ entityType="destination"
119
+ entityName={name}
120
+ >
121
+ {!entity && <Alert type="warning">Destination not found</Alert>}
122
+
123
+ {entity && (
124
+ <>
125
+ <Tabs tabs={tabs} />
126
+
127
+ <div className="p-8">
128
+ <Outlet context={{ entity: entity, name: name }} />
129
+ </div>
130
+ </>
131
+ )}
132
+ </Content>
133
+ );
134
+ };
@@ -0,0 +1,80 @@
1
+ import React from "react";
2
+
3
+ import { TagIcon } from "@heroicons/react/20/solid";
4
+
5
+ import { Content } from "./content";
6
+ import { useEntitiesAsList } from "../hooks";
7
+ import { LinkDestination } from "./links";
8
+ import { Alert } from "./alert";
9
+ import { LastModified } from "./last-modified";
10
+ import { Tag } from "./tag";
11
+ import { SearchInput } from "./search-input";
12
+ import { useSearch } from "../hooks";
13
+ import { getDestinationsByQuery } from "../utils";
14
+
15
+ export const PageDestinations: React.FC = () => {
16
+ const entities = useEntitiesAsList("destinations");
17
+ const { searchQuery } = useSearch();
18
+
19
+ const filteredEntities = getDestinationsByQuery(searchQuery, entities);
20
+
21
+ return (
22
+ <Content title="Destinations">
23
+ <SearchInput />
24
+
25
+ {filteredEntities.length === 0 && <Alert type="warning">No results found</Alert>}
26
+
27
+ {filteredEntities.length > 0 && (
28
+ <div>
29
+ <ul className="diving-gray-200 divide-y">
30
+ {filteredEntities.map((entity: any) => (
31
+ <li key={entity.name}>
32
+ <LinkDestination name={entity.name} className="block hover:bg-gray-50">
33
+ <div className="px-6 py-4">
34
+ <div className="flex items-center justify-between">
35
+ <p className="text-md relative font-bold text-zinc-600">
36
+ {entity.name}{" "}
37
+ {entity.archived && (
38
+ <span className="ml-1 rounded-full bg-red-100 px-2 py-1 text-xs font-medium text-red-800">
39
+ archived
40
+ </span>
41
+ )}
42
+ </p>
43
+
44
+ <div className="ml-2 flex flex-shrink-0 text-xs text-gray-500">
45
+ <div>
46
+ <TagIcon className="inline-block h-6 w-6 pr-1 text-xs text-gray-400" />
47
+ {entity.tags.map((tag: string) => (
48
+ <Tag tag={tag} key={tag} />
49
+ ))}
50
+ </div>
51
+ </div>
52
+ </div>
53
+
54
+ <div className="mt-2 flex justify-between">
55
+ <div className="flex">
56
+ <p className="line-clamp-3 max-w-md items-center text-sm text-gray-500">
57
+ {entity.description && entity.description.trim().length > 0
58
+ ? entity.description
59
+ : "n/a"}
60
+ </p>
61
+ </div>
62
+
63
+ <div className="items-top mt-2 flex text-xs text-gray-500 sm:mt-0">
64
+ <LastModified lastModified={entity.lastModified} />
65
+ </div>
66
+ </div>
67
+ </div>
68
+ </LinkDestination>
69
+ </li>
70
+ ))}
71
+ </ul>
72
+ </div>
73
+ )}
74
+
75
+ <p className="mt-6 text-center text-sm text-gray-500">
76
+ A total of <span className="font-bold">{filteredEntities.length}</span> results found.
77
+ </p>
78
+ </Content>
79
+ );
80
+ };
@@ -0,0 +1,139 @@
1
+ import React from "react";
2
+ import { Outlet, useParams, useOutletContext } from "react-router";
3
+
4
+ import { Content } from "./content";
5
+ import { useEntity } from "../hooks";
6
+ import { Alert } from "./alert";
7
+ import { Tabs } from "./tabs";
8
+ import { Markdown } from "./markdown";
9
+ import { Tag } from "./tag";
10
+
11
+ export function DisplayEffectOverview() {
12
+ const { entity, name } = useOutletContext() as any;
13
+
14
+ return (
15
+ <div className="border-gray-200 py-6">
16
+ <dl className="grid grid-cols-1 gap-x-4 gap-y-8 sm:grid-cols-2">
17
+ <div>
18
+ <dt className="text-sm font-medium text-gray-500">Name</dt>
19
+ <dd className="mt-1 text-sm text-gray-900">{name}</dd>
20
+ </div>
21
+
22
+ <div>
23
+ <dt className="text-sm font-medium text-gray-500">Tags</dt>
24
+ <dd className="mt-1 text-sm text-gray-900">
25
+ {entity.tags.map((tag: string) => (
26
+ <Tag tag={tag} key={tag} />
27
+ ))}
28
+ </dd>
29
+ </div>
30
+
31
+ <div>
32
+ <dt className="text-sm font-medium text-gray-500">Archived</dt>
33
+ <dd className="mt-1 text-sm text-gray-900">
34
+ {entity.archived === true ? <span>Yes</span> : <span>No</span>}
35
+ </dd>
36
+ </div>
37
+
38
+ <div className="col-span-2">
39
+ <dt className="text-sm font-medium text-gray-500">Description</dt>
40
+ <dd className="mt-1 text-sm text-gray-900">
41
+ {entity.description.trim().length > 0 ? (
42
+ <Markdown children={entity.description} />
43
+ ) : (
44
+ "n/a"
45
+ )}
46
+ </dd>
47
+ </div>
48
+
49
+ {entity.on && (
50
+ <div className="col-span-2">
51
+ <dt className="text-sm font-medium text-gray-500">On</dt>
52
+ <dd className="mt-1 text-sm text-gray-900">
53
+ <pre>
54
+ <code>{JSON.stringify(entity.on, null, 2)}</code>
55
+ </pre>
56
+ </dd>
57
+ </div>
58
+ )}
59
+
60
+ {entity.state && (
61
+ <div className="col-span-2">
62
+ <dt className="text-sm font-medium text-gray-500">State</dt>
63
+ <dd className="mt-1 text-sm text-gray-900">
64
+ <pre>
65
+ <code>{JSON.stringify(entity.state, null, 2)}</code>
66
+ </pre>
67
+ </dd>
68
+ </div>
69
+ )}
70
+
71
+ {entity.conditions && (
72
+ <div className="col-span-2">
73
+ <dt className="text-sm font-medium text-gray-500">Conditions</dt>
74
+ <dd className="mt-1 text-sm text-gray-900">
75
+ <pre>
76
+ <code>{JSON.stringify(entity.conditions, null, 2)}</code>
77
+ </pre>
78
+ </dd>
79
+ </div>
80
+ )}
81
+
82
+ {entity.steps && (
83
+ <div className="col-span-2">
84
+ <dt className="text-sm font-medium text-gray-500">Steps</dt>
85
+ <dd className="mt-1 text-sm text-gray-900">
86
+ <pre>
87
+ <code>{JSON.stringify(entity.steps, null, 2)}</code>
88
+ </pre>
89
+ </dd>
90
+ </div>
91
+ )}
92
+
93
+ {entity.persist && (
94
+ <div className="col-span-2">
95
+ <dt className="text-sm font-medium text-gray-500">Persist</dt>
96
+ <dd className="mt-1 text-sm text-gray-900">
97
+ <pre>
98
+ <code>{JSON.stringify(entity.persist, null, 2)}</code>
99
+ </pre>
100
+ </dd>
101
+ </div>
102
+ )}
103
+ </dl>
104
+ </div>
105
+ );
106
+ }
107
+
108
+ export const PageEffectsView: React.FC = () => {
109
+ const { name = "" } = useParams();
110
+
111
+ const entity = useEntity("effects", name);
112
+
113
+ const tabs = [
114
+ {
115
+ title: "Overview",
116
+ to: `/effects/${encodeURIComponent(name)}`,
117
+ },
118
+ // {
119
+ // title: "History",
120
+ // to: `/effects/${encodeURIComponent(name)}/history`,
121
+ // },
122
+ ];
123
+
124
+ return (
125
+ <Content title={`Effect: ${name}`} border={false} entityType="effect" entityName={name}>
126
+ {!entity && <Alert type="warning">Effect not found</Alert>}
127
+
128
+ {entity && (
129
+ <>
130
+ <Tabs tabs={tabs} />
131
+
132
+ <div className="p-8">
133
+ <Outlet context={{ entity: entity, name: name }} />
134
+ </div>
135
+ </>
136
+ )}
137
+ </Content>
138
+ );
139
+ };
@@ -0,0 +1,80 @@
1
+ import React from "react";
2
+
3
+ import { TagIcon } from "@heroicons/react/20/solid";
4
+
5
+ import { Content } from "./content";
6
+ import { useEntitiesAsList } from "../hooks";
7
+ import { LinkEffect } from "./links";
8
+ import { Alert } from "./alert";
9
+ import { LastModified } from "./last-modified";
10
+ import { Tag } from "./tag";
11
+ import { SearchInput } from "./search-input";
12
+ import { useSearch } from "../hooks";
13
+ import { getEffectsByQuery } from "../utils";
14
+
15
+ export const PageEffects: React.FC = () => {
16
+ const entities = useEntitiesAsList("effects");
17
+ const { searchQuery } = useSearch();
18
+
19
+ const filteredEntities = getEffectsByQuery(searchQuery, entities);
20
+
21
+ return (
22
+ <Content title="Effects">
23
+ <SearchInput />
24
+
25
+ {filteredEntities.length === 0 && <Alert type="warning">No results found</Alert>}
26
+
27
+ {filteredEntities.length > 0 && (
28
+ <div>
29
+ <ul className="diving-gray-200 divide-y">
30
+ {filteredEntities.map((entity: any) => (
31
+ <li key={entity.name}>
32
+ <LinkEffect name={entity.name} className="block hover:bg-gray-50">
33
+ <div className="px-6 py-4">
34
+ <div className="flex items-center justify-between">
35
+ <p className="text-md relative font-bold text-zinc-600">
36
+ {entity.name}{" "}
37
+ {entity.archived && (
38
+ <span className="ml-1 rounded-full bg-red-100 px-2 py-1 text-xs font-medium text-red-800">
39
+ archived
40
+ </span>
41
+ )}
42
+ </p>
43
+
44
+ <div className="ml-2 flex flex-shrink-0 text-xs text-gray-500">
45
+ <div>
46
+ <TagIcon className="inline-block h-6 w-6 pr-1 text-xs text-gray-400" />
47
+ {entity.tags.map((tag: string) => (
48
+ <Tag tag={tag} key={tag} />
49
+ ))}
50
+ </div>
51
+ </div>
52
+ </div>
53
+
54
+ <div className="mt-2 flex justify-between">
55
+ <div className="flex">
56
+ <p className="line-clamp-3 max-w-md items-center text-sm text-gray-500">
57
+ {entity.description && entity.description.trim().length > 0
58
+ ? entity.description
59
+ : "n/a"}
60
+ </p>
61
+ </div>
62
+
63
+ <div className="items-top mt-2 flex text-xs text-gray-500 sm:mt-0">
64
+ <LastModified lastModified={entity.lastModified} />
65
+ </div>
66
+ </div>
67
+ </div>
68
+ </LinkEffect>
69
+ </li>
70
+ ))}
71
+ </ul>
72
+ </div>
73
+ )}
74
+
75
+ <p className="mt-6 text-center text-sm text-gray-500">
76
+ A total of <span className="font-bold">{filteredEntities.length}</span> results found.
77
+ </p>
78
+ </Content>
79
+ );
80
+ };
@@ -0,0 +1,147 @@
1
+ import React from "react";
2
+ import { Outlet, useParams, useOutletContext } from "react-router";
3
+
4
+ import { Content } from "./content";
5
+ import { useEntity } from "../hooks";
6
+ import { Alert } from "./alert";
7
+ import { Tabs } from "./tabs";
8
+ import { Markdown } from "./markdown";
9
+ import { Properties } from "./properties";
10
+ import { Tag } from "./tag";
11
+
12
+ export function DisplayEventOverview() {
13
+ const { entity, name } = useOutletContext() as any;
14
+
15
+ return (
16
+ <div className="border-gray-200 py-6">
17
+ <dl className="grid grid-cols-1 gap-x-4 gap-y-8 sm:grid-cols-2">
18
+ <div>
19
+ <dt className="text-sm font-medium text-gray-500">Name</dt>
20
+ <dd className="mt-1 text-sm text-gray-900">{name}</dd>
21
+ </div>
22
+
23
+ <div>
24
+ <dt className="text-sm font-medium text-gray-500">Tags</dt>
25
+ <dd className="mt-1 text-sm text-gray-900">
26
+ {entity.tags.map((tag: string) => (
27
+ <Tag tag={tag} key={tag} />
28
+ ))}
29
+ </dd>
30
+ </div>
31
+
32
+ <div>
33
+ <dt className="text-sm font-medium text-gray-500">Archived</dt>
34
+ <dd className="mt-1 text-sm text-gray-900">
35
+ {entity.archived === true ? <span>Yes</span> : <span>No</span>}
36
+ </dd>
37
+ </div>
38
+
39
+ <div>
40
+ <dt className="text-sm font-medium text-gray-500">Deprecated</dt>
41
+ <dd className="mt-1 text-sm text-gray-900">
42
+ {entity.deprecated === true ? <span>Yes</span> : <span>No</span>}
43
+ </dd>
44
+ </div>
45
+
46
+ <div className="col-span-2">
47
+ <dt className="text-sm font-medium text-gray-500">Description</dt>
48
+ <dd className="mt-1 text-sm text-gray-900">
49
+ {entity.description.trim().length > 0 ? (
50
+ <Markdown children={entity.description} />
51
+ ) : (
52
+ "n/a"
53
+ )}
54
+ </dd>
55
+ </div>
56
+
57
+ <div>
58
+ <dt className="text-sm font-medium text-gray-500">Type</dt>
59
+ <dd className="mt-1 text-sm text-gray-900">{entity.type}</dd>
60
+ </div>
61
+
62
+ <div className="col-span-2">
63
+ <dd className="mt-1 text-sm text-gray-900">
64
+ <Properties schema={entity} />
65
+ </dd>
66
+ </div>
67
+
68
+ {entity.conditions && (
69
+ <div className="col-span-2">
70
+ <dt className="text-sm font-medium text-gray-500">Conditions</dt>
71
+ <dd className="mt-1 text-sm text-gray-900">
72
+ <pre>
73
+ <code>{JSON.stringify(entity.conditions, null, 2)}</code>
74
+ </pre>
75
+ </dd>
76
+ </div>
77
+ )}
78
+
79
+ {entity.sample && (
80
+ <div className="col-span-2">
81
+ <dt className="text-sm font-medium text-gray-500">Sample</dt>
82
+ <dd className="mt-1 text-sm text-gray-900">
83
+ <pre>
84
+ <code>{JSON.stringify(entity.sample, null, 2)}</code>
85
+ </pre>
86
+ </dd>
87
+ </div>
88
+ )}
89
+
90
+ {entity.transforms && (
91
+ <div className="col-span-2">
92
+ <dt className="text-sm font-medium text-gray-500">Transforms</dt>
93
+ <dd className="mt-1 text-sm text-gray-900">
94
+ <pre>
95
+ <code>{JSON.stringify(entity.transforms, null, 2)}</code>
96
+ </pre>
97
+ </dd>
98
+ </div>
99
+ )}
100
+
101
+ {entity.destinations && (
102
+ <div className="col-span-2">
103
+ <dt className="text-sm font-medium text-gray-500">Destination overrides</dt>
104
+ <dd className="mt-1 text-sm text-gray-900">
105
+ <pre>
106
+ <code>{JSON.stringify(entity.destinations, null, 2)}</code>
107
+ </pre>
108
+ </dd>
109
+ </div>
110
+ )}
111
+ </dl>
112
+ </div>
113
+ );
114
+ }
115
+
116
+ export const PageEventsView: React.FC = () => {
117
+ const { name = "" } = useParams();
118
+
119
+ const entity = useEntity("events", name);
120
+
121
+ const tabs = [
122
+ {
123
+ title: "Overview",
124
+ to: `/events/${encodeURIComponent(name)}`,
125
+ },
126
+ // {
127
+ // title: "History",
128
+ // to: `/events/${encodeURIComponent(name)}/history`,
129
+ // },
130
+ ];
131
+
132
+ return (
133
+ <Content title={`Event: ${name}`} border={false} entityType="event" entityName={name}>
134
+ {!entity && <Alert type="warning">Event not found</Alert>}
135
+
136
+ {entity && (
137
+ <>
138
+ <Tabs tabs={tabs} />
139
+
140
+ <div className="p-8">
141
+ <Outlet context={{ entity: entity, name: name }} />
142
+ </div>
143
+ </>
144
+ )}
145
+ </Content>
146
+ );
147
+ };