@eventcatalog/core 2.15.0 → 2.16.1
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/default-files-for-collections/ubiquitousLanguages.md +7 -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/catalog-to-astro-content-directory.cjs +12 -3
- package/dist/catalog-to-astro-content-directory.js +2 -2
- package/dist/{chunk-O6BGVVOW.js → chunk-55YPRY5U.js} +3 -2
- package/dist/{chunk-PK2EQVPD.js → chunk-5RNDOKYT.js} +10 -2
- package/dist/{chunk-KI4KAUWW.js → chunk-A3QFF66M.js} +1 -1
- package/dist/{chunk-TGOUSS6C.js → chunk-GEPV3ACK.js} +1 -1
- package/dist/{chunk-65VQIGAP.js → chunk-J5H7ICLD.js} +1 -1
- package/dist/{chunk-7HYM3M5I.js → chunk-NTCYOR4N.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +13 -4
- package/dist/eventcatalog.js +6 -6
- package/dist/map-catalog-to-astro.cjs +10 -2
- package/dist/map-catalog-to-astro.js +1 -1
- package/dist/watcher.cjs +10 -2
- package/dist/watcher.js +2 -2
- package/eventcatalog/src/components/MDX/NodeGraph/Edges/AnimatedMessageEdge.tsx +1 -1
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.tsx +1 -0
- package/eventcatalog/src/components/MDX/SchemaViewer/SchemaViewer.astro +6 -1
- package/eventcatalog/src/components/SideBars/CatalogResourcesSideBar/index.tsx +29 -2
- package/eventcatalog/src/components/SideBars/DomainSideBar.astro +23 -0
- package/eventcatalog/src/components/Tables/Table.tsx +11 -1
- package/eventcatalog/src/components/Tables/columns/DomainTableColumns.tsx +4 -10
- package/eventcatalog/src/components/Tables/columns/FlowTableColumns.tsx +3 -3
- package/eventcatalog/src/components/Tables/columns/MessageTableColumns.tsx +5 -2
- package/eventcatalog/src/components/Tables/columns/ServiceTableColumns.tsx +89 -63
- package/eventcatalog/src/components/Tables/columns/SharedColumns.tsx +44 -0
- package/eventcatalog/src/components/Tables/filters/custom-filters.ts +5 -0
- package/eventcatalog/src/content/config.ts +18 -0
- package/eventcatalog/src/layouts/DiscoverLayout.astro +1 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/language.astro +301 -0
- package/eventcatalog/src/utils/collections/domains.ts +14 -2
- package/eventcatalog/src/utils/collections/icons.ts +3 -0
- package/package.json +3 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: ubiquitous-language
|
|
3
|
+
name: Ubiquitous Language
|
|
4
|
+
summary: A shared language used by all team members to communicate about the system.
|
|
5
|
+
description: A shared language used by all team members to communicate about the system.
|
|
6
|
+
---
|
|
7
|
+
<!-- Do not delete this file, required for EC, you an ignore this file -->
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-A3QFF66M.js";
|
|
4
|
+
import "../chunk-J5H7ICLD.js";
|
|
5
|
+
import "../chunk-GEPV3ACK.js";
|
|
6
6
|
import "../chunk-E7TXTI7G.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
|
@@ -129,7 +129,8 @@ var COLLECTION_KEYS = [
|
|
|
129
129
|
"pages",
|
|
130
130
|
"changelogs",
|
|
131
131
|
"queries",
|
|
132
|
-
"channels"
|
|
132
|
+
"channels",
|
|
133
|
+
"ubiquitousLanguages"
|
|
133
134
|
];
|
|
134
135
|
function mapCatalogToAstro({ filePath, astroDir, projectDir }) {
|
|
135
136
|
const relativeFilePath = removeBasePath(filePath, projectDir);
|
|
@@ -139,7 +140,11 @@ function mapCatalogToAstro({ filePath, astroDir, projectDir }) {
|
|
|
139
140
|
const baseTargetPaths = getBaseTargetPaths(relativeFilePath);
|
|
140
141
|
const relativeTargetPath = getRelativeTargetPath(relativeFilePath);
|
|
141
142
|
return baseTargetPaths.map(
|
|
142
|
-
(base) => import_node_path2.default.join(
|
|
143
|
+
(base) => import_node_path2.default.join(
|
|
144
|
+
astroDir,
|
|
145
|
+
base,
|
|
146
|
+
relativeTargetPath.replace("index.md", "index.mdx").replace("changelog.md", "changelog.mdx").replace("ubiquitous-language.md", "ubiquitous-language.mdx")
|
|
147
|
+
)
|
|
143
148
|
);
|
|
144
149
|
}
|
|
145
150
|
function removeBasePath(fullPath, basePath) {
|
|
@@ -172,6 +177,9 @@ function getBaseTargetPaths(filePath) {
|
|
|
172
177
|
if (filePathArr[filePathArr.length - 1] == "changelog.md") {
|
|
173
178
|
return [import_node_path2.default.join("src", "content", "changelogs")];
|
|
174
179
|
}
|
|
180
|
+
if (filePathArr[filePathArr.length - 1] == "ubiquitous-language.md") {
|
|
181
|
+
return [import_node_path2.default.join("src", "content", "ubiquitousLanguages")];
|
|
182
|
+
}
|
|
175
183
|
if (filePathArr[filePathArr.length - 1].match(/\.md$/)) {
|
|
176
184
|
return [import_node_path2.default.join("src", "content")];
|
|
177
185
|
}
|
|
@@ -241,7 +249,8 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
|
|
|
241
249
|
"pages",
|
|
242
250
|
"changelogs",
|
|
243
251
|
"queries",
|
|
244
|
-
"channels"
|
|
252
|
+
"channels",
|
|
253
|
+
"ubiquitousLanguages"
|
|
245
254
|
];
|
|
246
255
|
const emptyCollections = [];
|
|
247
256
|
for (const collection of COLLECTIONS) {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-E7TXTI7G.js";
|
|
5
5
|
import {
|
|
6
6
|
mapCatalogToAstro
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5RNDOKYT.js";
|
|
8
8
|
|
|
9
9
|
// src/catalog-to-astro-content-directory.js
|
|
10
10
|
import { glob } from "glob";
|
|
@@ -50,7 +50,8 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
|
|
|
50
50
|
"pages",
|
|
51
51
|
"changelogs",
|
|
52
52
|
"queries",
|
|
53
|
-
"channels"
|
|
53
|
+
"channels",
|
|
54
|
+
"ubiquitousLanguages"
|
|
54
55
|
];
|
|
55
56
|
const emptyCollections = [];
|
|
56
57
|
for (const collection of COLLECTIONS) {
|
|
@@ -11,7 +11,8 @@ var COLLECTION_KEYS = [
|
|
|
11
11
|
"pages",
|
|
12
12
|
"changelogs",
|
|
13
13
|
"queries",
|
|
14
|
-
"channels"
|
|
14
|
+
"channels",
|
|
15
|
+
"ubiquitousLanguages"
|
|
15
16
|
];
|
|
16
17
|
function mapCatalogToAstro({ filePath, astroDir, projectDir }) {
|
|
17
18
|
const relativeFilePath = removeBasePath(filePath, projectDir);
|
|
@@ -21,7 +22,11 @@ function mapCatalogToAstro({ filePath, astroDir, projectDir }) {
|
|
|
21
22
|
const baseTargetPaths = getBaseTargetPaths(relativeFilePath);
|
|
22
23
|
const relativeTargetPath = getRelativeTargetPath(relativeFilePath);
|
|
23
24
|
return baseTargetPaths.map(
|
|
24
|
-
(base) => path.join(
|
|
25
|
+
(base) => path.join(
|
|
26
|
+
astroDir,
|
|
27
|
+
base,
|
|
28
|
+
relativeTargetPath.replace("index.md", "index.mdx").replace("changelog.md", "changelog.mdx").replace("ubiquitous-language.md", "ubiquitous-language.mdx")
|
|
29
|
+
)
|
|
25
30
|
);
|
|
26
31
|
}
|
|
27
32
|
function removeBasePath(fullPath, basePath) {
|
|
@@ -54,6 +59,9 @@ function getBaseTargetPaths(filePath) {
|
|
|
54
59
|
if (filePathArr[filePathArr.length - 1] == "changelog.md") {
|
|
55
60
|
return [path.join("src", "content", "changelogs")];
|
|
56
61
|
}
|
|
62
|
+
if (filePathArr[filePathArr.length - 1] == "ubiquitous-language.md") {
|
|
63
|
+
return [path.join("src", "content", "ubiquitousLanguages")];
|
|
64
|
+
}
|
|
57
65
|
if (filePathArr[filePathArr.length - 1].match(/\.md$/)) {
|
|
58
66
|
return [path.join("src", "content")];
|
|
59
67
|
}
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -161,7 +161,7 @@ var import_axios = __toESM(require("axios"), 1);
|
|
|
161
161
|
var import_os = __toESM(require("os"), 1);
|
|
162
162
|
|
|
163
163
|
// package.json
|
|
164
|
-
var version = "2.
|
|
164
|
+
var version = "2.16.1";
|
|
165
165
|
|
|
166
166
|
// src/constants.ts
|
|
167
167
|
var VERSION = version;
|
|
@@ -226,7 +226,8 @@ var COLLECTION_KEYS = [
|
|
|
226
226
|
"pages",
|
|
227
227
|
"changelogs",
|
|
228
228
|
"queries",
|
|
229
|
-
"channels"
|
|
229
|
+
"channels",
|
|
230
|
+
"ubiquitousLanguages"
|
|
230
231
|
];
|
|
231
232
|
function mapCatalogToAstro({ filePath, astroDir, projectDir }) {
|
|
232
233
|
const relativeFilePath = removeBasePath(filePath, projectDir);
|
|
@@ -236,7 +237,11 @@ function mapCatalogToAstro({ filePath, astroDir, projectDir }) {
|
|
|
236
237
|
const baseTargetPaths = getBaseTargetPaths(relativeFilePath);
|
|
237
238
|
const relativeTargetPath = getRelativeTargetPath(relativeFilePath);
|
|
238
239
|
return baseTargetPaths.map(
|
|
239
|
-
(base) => import_node_path3.default.join(
|
|
240
|
+
(base) => import_node_path3.default.join(
|
|
241
|
+
astroDir,
|
|
242
|
+
base,
|
|
243
|
+
relativeTargetPath.replace("index.md", "index.mdx").replace("changelog.md", "changelog.mdx").replace("ubiquitous-language.md", "ubiquitous-language.mdx")
|
|
244
|
+
)
|
|
240
245
|
);
|
|
241
246
|
}
|
|
242
247
|
function removeBasePath(fullPath, basePath) {
|
|
@@ -269,6 +274,9 @@ function getBaseTargetPaths(filePath) {
|
|
|
269
274
|
if (filePathArr[filePathArr.length - 1] == "changelog.md") {
|
|
270
275
|
return [import_node_path3.default.join("src", "content", "changelogs")];
|
|
271
276
|
}
|
|
277
|
+
if (filePathArr[filePathArr.length - 1] == "ubiquitous-language.md") {
|
|
278
|
+
return [import_node_path3.default.join("src", "content", "ubiquitousLanguages")];
|
|
279
|
+
}
|
|
272
280
|
if (filePathArr[filePathArr.length - 1].match(/\.md$/)) {
|
|
273
281
|
return [import_node_path3.default.join("src", "content")];
|
|
274
282
|
}
|
|
@@ -425,7 +433,8 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
|
|
|
425
433
|
"pages",
|
|
426
434
|
"changelogs",
|
|
427
435
|
"queries",
|
|
428
|
-
"channels"
|
|
436
|
+
"channels",
|
|
437
|
+
"ubiquitousLanguages"
|
|
429
438
|
];
|
|
430
439
|
const emptyCollections = [];
|
|
431
440
|
for (const collection of COLLECTIONS) {
|
package/dist/eventcatalog.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-A3QFF66M.js";
|
|
4
|
+
import "./chunk-J5H7ICLD.js";
|
|
5
5
|
import {
|
|
6
6
|
catalogToAstro
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-55YPRY5U.js";
|
|
8
8
|
import {
|
|
9
9
|
VERSION
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GEPV3ACK.js";
|
|
11
11
|
import {
|
|
12
12
|
generate
|
|
13
13
|
} from "./chunk-YEQVKHST.js";
|
|
14
14
|
import {
|
|
15
15
|
watch
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-NTCYOR4N.js";
|
|
17
17
|
import "./chunk-E7TXTI7G.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-5RNDOKYT.js";
|
|
19
19
|
|
|
20
20
|
// src/eventcatalog.ts
|
|
21
21
|
import { Command } from "commander";
|
|
@@ -45,7 +45,8 @@ var COLLECTION_KEYS = [
|
|
|
45
45
|
"pages",
|
|
46
46
|
"changelogs",
|
|
47
47
|
"queries",
|
|
48
|
-
"channels"
|
|
48
|
+
"channels",
|
|
49
|
+
"ubiquitousLanguages"
|
|
49
50
|
];
|
|
50
51
|
function mapCatalogToAstro({ filePath, astroDir, projectDir }) {
|
|
51
52
|
const relativeFilePath = removeBasePath(filePath, projectDir);
|
|
@@ -55,7 +56,11 @@ function mapCatalogToAstro({ filePath, astroDir, projectDir }) {
|
|
|
55
56
|
const baseTargetPaths = getBaseTargetPaths(relativeFilePath);
|
|
56
57
|
const relativeTargetPath = getRelativeTargetPath(relativeFilePath);
|
|
57
58
|
return baseTargetPaths.map(
|
|
58
|
-
(base) => import_node_path.default.join(
|
|
59
|
+
(base) => import_node_path.default.join(
|
|
60
|
+
astroDir,
|
|
61
|
+
base,
|
|
62
|
+
relativeTargetPath.replace("index.md", "index.mdx").replace("changelog.md", "changelog.mdx").replace("ubiquitous-language.md", "ubiquitous-language.mdx")
|
|
63
|
+
)
|
|
59
64
|
);
|
|
60
65
|
}
|
|
61
66
|
function removeBasePath(fullPath, basePath) {
|
|
@@ -88,6 +93,9 @@ function getBaseTargetPaths(filePath) {
|
|
|
88
93
|
if (filePathArr[filePathArr.length - 1] == "changelog.md") {
|
|
89
94
|
return [import_node_path.default.join("src", "content", "changelogs")];
|
|
90
95
|
}
|
|
96
|
+
if (filePathArr[filePathArr.length - 1] == "ubiquitous-language.md") {
|
|
97
|
+
return [import_node_path.default.join("src", "content", "ubiquitousLanguages")];
|
|
98
|
+
}
|
|
91
99
|
if (filePathArr[filePathArr.length - 1].match(/\.md$/)) {
|
|
92
100
|
return [import_node_path.default.join("src", "content")];
|
|
93
101
|
}
|
package/dist/watcher.cjs
CHANGED
|
@@ -49,7 +49,8 @@ var COLLECTION_KEYS = [
|
|
|
49
49
|
"pages",
|
|
50
50
|
"changelogs",
|
|
51
51
|
"queries",
|
|
52
|
-
"channels"
|
|
52
|
+
"channels",
|
|
53
|
+
"ubiquitousLanguages"
|
|
53
54
|
];
|
|
54
55
|
function mapCatalogToAstro({ filePath, astroDir, projectDir }) {
|
|
55
56
|
const relativeFilePath = removeBasePath(filePath, projectDir);
|
|
@@ -59,7 +60,11 @@ function mapCatalogToAstro({ filePath, astroDir, projectDir }) {
|
|
|
59
60
|
const baseTargetPaths = getBaseTargetPaths(relativeFilePath);
|
|
60
61
|
const relativeTargetPath = getRelativeTargetPath(relativeFilePath);
|
|
61
62
|
return baseTargetPaths.map(
|
|
62
|
-
(base) => import_node_path.default.join(
|
|
63
|
+
(base) => import_node_path.default.join(
|
|
64
|
+
astroDir,
|
|
65
|
+
base,
|
|
66
|
+
relativeTargetPath.replace("index.md", "index.mdx").replace("changelog.md", "changelog.mdx").replace("ubiquitous-language.md", "ubiquitous-language.mdx")
|
|
67
|
+
)
|
|
63
68
|
);
|
|
64
69
|
}
|
|
65
70
|
function removeBasePath(fullPath, basePath) {
|
|
@@ -92,6 +97,9 @@ function getBaseTargetPaths(filePath) {
|
|
|
92
97
|
if (filePathArr[filePathArr.length - 1] == "changelog.md") {
|
|
93
98
|
return [import_node_path.default.join("src", "content", "changelogs")];
|
|
94
99
|
}
|
|
100
|
+
if (filePathArr[filePathArr.length - 1] == "ubiquitous-language.md") {
|
|
101
|
+
return [import_node_path.default.join("src", "content", "ubiquitousLanguages")];
|
|
102
|
+
}
|
|
95
103
|
if (filePathArr[filePathArr.length - 1].match(/\.md$/)) {
|
|
96
104
|
return [import_node_path.default.join("src", "content")];
|
|
97
105
|
}
|
package/dist/watcher.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const { catalog, id } = Astro.props;
|
|
3
3
|
import fs from 'node:fs/promises';
|
|
4
4
|
import { existsSync } from 'fs';
|
|
5
|
+
import yaml from 'js-yaml';
|
|
5
6
|
import path from 'path';
|
|
6
7
|
import SchemaViewerClient from './SchemaViewer';
|
|
7
8
|
import Admonition from '../Admonition';
|
|
@@ -48,7 +49,11 @@ try {
|
|
|
48
49
|
if (exists) {
|
|
49
50
|
// Load the schema for the component
|
|
50
51
|
schema = await fs.readFile(schemaPath, 'utf-8');
|
|
51
|
-
|
|
52
|
+
if (schemaPath.endsWith('.yml') || schemaPath.endsWith('.yaml')) {
|
|
53
|
+
schema = yaml.load(schema);
|
|
54
|
+
} else {
|
|
55
|
+
schema = JSON.parse(schema);
|
|
56
|
+
}
|
|
52
57
|
}
|
|
53
58
|
|
|
54
59
|
return {
|
|
@@ -4,12 +4,37 @@ import { ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/24/outline';
|
|
|
4
4
|
import './styles.css';
|
|
5
5
|
import { getIconForCollection as getIconForCollectionOriginal } from '@utils/collections/icons';
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const STORAGE_KEY = 'EventCatalog:catalogSidebarCollapsedGroups';
|
|
8
|
+
|
|
9
|
+
interface CatalogResourcesSideBarProps {
|
|
10
|
+
resources: any;
|
|
11
|
+
currentPath: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const CatalogResourcesSideBar: React.FC<CatalogResourcesSideBarProps> = ({ resources, currentPath }) => {
|
|
15
|
+
if (typeof window === 'undefined') {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
|
|
8
19
|
const [data, setData] = useState(resources);
|
|
9
20
|
const [searchQuery, setSearchQuery] = useState('');
|
|
10
|
-
const [
|
|
21
|
+
const [isInitialized, setIsInitialized] = useState(false);
|
|
22
|
+
const [collapsedGroups, setCollapsedGroups] = useState<{ [key: string]: boolean }>(() => {
|
|
23
|
+
if (typeof window !== 'undefined') {
|
|
24
|
+
const saved = window.localStorage.getItem(STORAGE_KEY);
|
|
25
|
+
setIsInitialized(true);
|
|
26
|
+
return saved ? JSON.parse(saved) : {};
|
|
27
|
+
}
|
|
28
|
+
return {};
|
|
29
|
+
});
|
|
11
30
|
const decodedCurrentPath = decodeURIComponent(currentPath);
|
|
12
31
|
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (typeof window !== 'undefined') {
|
|
34
|
+
window.localStorage.setItem(STORAGE_KEY, JSON.stringify(collapsedGroups));
|
|
35
|
+
}
|
|
36
|
+
}, [collapsedGroups]);
|
|
37
|
+
|
|
13
38
|
const handleSearch = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
14
39
|
setSearchQuery(e.target.value);
|
|
15
40
|
};
|
|
@@ -47,6 +72,8 @@ const CatalogResourcesSideBar = ({ resources, currentPath }: any) => {
|
|
|
47
72
|
|
|
48
73
|
const getIconForCollection = useMemo(() => getIconForCollectionOriginal, []);
|
|
49
74
|
|
|
75
|
+
if (!isInitialized) return null;
|
|
76
|
+
|
|
50
77
|
return (
|
|
51
78
|
<nav className="space-y-6 text-black ">
|
|
52
79
|
<div className="space-y-2">
|
|
@@ -3,6 +3,7 @@ import OwnersList from '@components/Lists/OwnersList';
|
|
|
3
3
|
import PillListFlat from '@components/Lists/PillListFlat';
|
|
4
4
|
import RepositoryList from '@components/Lists/RepositoryList.astro';
|
|
5
5
|
import VersionList from '@components/Lists/VersionList.astro';
|
|
6
|
+
import { getUbiquitousLanguage } from '@utils/collections/domains';
|
|
6
7
|
import { buildUrl } from '@utils/url-builder';
|
|
7
8
|
import { getEntry, type CollectionEntry } from 'astro:content';
|
|
8
9
|
import { ScrollText, Workflow } from 'lucide-react';
|
|
@@ -14,6 +15,9 @@ const { domain } = Astro.props;
|
|
|
14
15
|
|
|
15
16
|
// @ts-ignore
|
|
16
17
|
const services = (domain.data.services as CollectionEntry<'services'>[]) || [];
|
|
18
|
+
const ubiquitousLanguage = await getUbiquitousLanguage(domain);
|
|
19
|
+
const hasUbiquitousLanguage = ubiquitousLanguage.length > 0;
|
|
20
|
+
const ubiquitousLanguageDictionary = hasUbiquitousLanguage ? ubiquitousLanguage[0].data.dictionary : [];
|
|
17
21
|
|
|
18
22
|
const ownersRaw = domain.data?.owners || [];
|
|
19
23
|
const owners = await Promise.all(ownersRaw.map((o) => getEntry(o)));
|
|
@@ -26,6 +30,13 @@ const serviceList = services.map((p) => ({
|
|
|
26
30
|
href: buildUrl(`/docs/${p.collection}/${p.data.id}/${p.data.version}`),
|
|
27
31
|
}));
|
|
28
32
|
|
|
33
|
+
const ubiquitousLanguageList = ubiquitousLanguageDictionary?.map((l) => ({
|
|
34
|
+
label: l.name,
|
|
35
|
+
badge: 'Ubiquitous Language',
|
|
36
|
+
collection: 'ubiquitousLanguages',
|
|
37
|
+
href: buildUrl(`/docs/${domain.collection}/${domain.data.id}/language?id=${l.id}`),
|
|
38
|
+
}));
|
|
39
|
+
|
|
29
40
|
const ownersList = owners.map((o) => ({
|
|
30
41
|
label: o.data.name,
|
|
31
42
|
type: o.collection,
|
|
@@ -45,6 +56,17 @@ const ownersList = owners.map((o) => ({
|
|
|
45
56
|
icon="ServerIcon"
|
|
46
57
|
client:load
|
|
47
58
|
/>
|
|
59
|
+
{
|
|
60
|
+
ubiquitousLanguageList && hasUbiquitousLanguage && (
|
|
61
|
+
<PillListFlat
|
|
62
|
+
title={`Ubiquitous Language Dictionary (${ubiquitousLanguageDictionary?.length})`}
|
|
63
|
+
pills={ubiquitousLanguageList}
|
|
64
|
+
color="pink"
|
|
65
|
+
emptyMessage={`This domain does not have any documented ubiquitous language.`}
|
|
66
|
+
client:load
|
|
67
|
+
/>
|
|
68
|
+
)
|
|
69
|
+
}
|
|
48
70
|
{domain.data.versions && <VersionList versions={domain.data.versions} collectionItem={domain} />}
|
|
49
71
|
{
|
|
50
72
|
domain.data.repository && (
|
|
@@ -57,6 +79,7 @@ const ownersList = owners.map((o) => ({
|
|
|
57
79
|
emptyMessage={`This domain does not have any documented owners.`}
|
|
58
80
|
client:load
|
|
59
81
|
/>
|
|
82
|
+
|
|
60
83
|
<div class="space-y-2">
|
|
61
84
|
<a
|
|
62
85
|
href={buildUrl(`/visualiser/${domain.collection}/${domain.data.id}/${domain.data.version}`)}
|
|
@@ -21,7 +21,7 @@ import type { CollectionTypes } from '@types';
|
|
|
21
21
|
declare module '@tanstack/react-table' {
|
|
22
22
|
// @ts-ignore
|
|
23
23
|
interface ColumnMeta<TData extends RowData, TValue> {
|
|
24
|
-
filterVariant?: 'collection' | 'name';
|
|
24
|
+
filterVariant?: 'collection' | 'name' | 'badges';
|
|
25
25
|
collectionFilterKey?: string;
|
|
26
26
|
showFilter?: boolean;
|
|
27
27
|
className?: string;
|
|
@@ -211,6 +211,16 @@ function Filter({ column }: { column: Column<any, unknown> }) {
|
|
|
211
211
|
|
|
212
212
|
return uniqueItemsInList.sort().slice(0, 2000);
|
|
213
213
|
}
|
|
214
|
+
if (filterVariant === 'badges') {
|
|
215
|
+
const allBadges = column.getFacetedUniqueValues().keys();
|
|
216
|
+
// join all badges into a single array
|
|
217
|
+
const allBadgesArray = Array.from(allBadges)
|
|
218
|
+
.flat()
|
|
219
|
+
.filter((b) => !!b);
|
|
220
|
+
const allBadgesString = allBadgesArray.map((badge) => badge.content);
|
|
221
|
+
const uniqueBadges = Array.from(new Set(allBadgesString));
|
|
222
|
+
return uniqueBadges.sort().slice(0, 2000);
|
|
223
|
+
}
|
|
214
224
|
return Array.from(column.getFacetedUniqueValues().keys()).sort().slice(0, 2000);
|
|
215
225
|
}, [column.getFacetedUniqueValues(), filterVariant]);
|
|
216
226
|
|
|
@@ -2,8 +2,10 @@ 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 { filterByName, filterCollectionByName } from '../filters/custom-filters';
|
|
5
|
+
import { filterByBadge, 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';
|
|
7
9
|
|
|
8
10
|
const columnHelper = createColumnHelper<CollectionEntry<'domains'>>();
|
|
9
11
|
|
|
@@ -40,14 +42,6 @@ export const columns = () => [
|
|
|
40
42
|
},
|
|
41
43
|
filterFn: filterByName,
|
|
42
44
|
}),
|
|
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
|
-
// }),
|
|
51
45
|
columnHelper.accessor('data.summary', {
|
|
52
46
|
id: 'summary',
|
|
53
47
|
header: () => 'Summary',
|
|
@@ -96,9 +90,9 @@ export const columns = () => [
|
|
|
96
90
|
</ul>
|
|
97
91
|
);
|
|
98
92
|
},
|
|
99
|
-
// footer: (info) => info.column.id,
|
|
100
93
|
filterFn: filterCollectionByName('services'),
|
|
101
94
|
}),
|
|
95
|
+
createBadgesColumn(columnHelper),
|
|
102
96
|
columnHelper.accessor('data.name', {
|
|
103
97
|
header: () => <span />,
|
|
104
98
|
cell: (info) => {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ServerIcon } from '@heroicons/react/20/solid';
|
|
2
|
-
import { RectangleGroupIcon } from '@heroicons/react/20/solid';
|
|
3
1
|
import { createColumnHelper } from '@tanstack/react-table';
|
|
4
2
|
import type { CollectionEntry } from 'astro:content';
|
|
5
|
-
import { filterByName
|
|
3
|
+
import { filterByName } from '../filters/custom-filters';
|
|
6
4
|
import { buildUrl } from '@utils/url-builder';
|
|
7
5
|
import { QueueListIcon } from '@heroicons/react/24/solid';
|
|
6
|
+
import { createBadgesColumn } from './SharedColumns';
|
|
8
7
|
|
|
9
8
|
const columnHelper = createColumnHelper<CollectionEntry<'flows'>>();
|
|
10
9
|
|
|
@@ -61,6 +60,7 @@ export const columns = () => [
|
|
|
61
60
|
className: 'max-w-md',
|
|
62
61
|
},
|
|
63
62
|
}),
|
|
63
|
+
createBadgesColumn(columnHelper),
|
|
64
64
|
columnHelper.accessor('data.name', {
|
|
65
65
|
header: () => <span />,
|
|
66
66
|
cell: (info) => {
|
|
@@ -3,8 +3,9 @@ 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 } from '../filters/custom-filters';
|
|
6
|
+
import { filterByName, filterCollectionByName, filterByBadge } from '../filters/custom-filters';
|
|
7
7
|
import { buildUrl } from '@utils/url-builder';
|
|
8
|
+
import { createBadgesColumn } from './SharedColumns';
|
|
8
9
|
|
|
9
10
|
const columnHelper = createColumnHelper<CollectionEntry<CollectionMessageTypes>>();
|
|
10
11
|
|
|
@@ -55,6 +56,7 @@ export const columns = () => [
|
|
|
55
56
|
},
|
|
56
57
|
filterFn: filterByName,
|
|
57
58
|
}),
|
|
59
|
+
|
|
58
60
|
columnHelper.accessor('data.summary', {
|
|
59
61
|
id: 'summary',
|
|
60
62
|
header: () => 'Summary',
|
|
@@ -62,7 +64,7 @@ export const columns = () => [
|
|
|
62
64
|
footer: (info) => info.column.id,
|
|
63
65
|
meta: {
|
|
64
66
|
showFilter: false,
|
|
65
|
-
className: 'max-w-
|
|
67
|
+
className: 'max-w-[200px]',
|
|
66
68
|
},
|
|
67
69
|
}),
|
|
68
70
|
|
|
@@ -145,6 +147,7 @@ export const columns = () => [
|
|
|
145
147
|
footer: (info) => info.column.id,
|
|
146
148
|
filterFn: filterCollectionByName('consumers'),
|
|
147
149
|
}),
|
|
150
|
+
createBadgesColumn(columnHelper),
|
|
148
151
|
columnHelper.accessor('data.name', {
|
|
149
152
|
header: () => <span />,
|
|
150
153
|
cell: (info) => {
|