@eventcatalog/core 5.0.0-beta.2 → 5.0.0-beta.4
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-HGRFXTFC.js → chunk-M7OVJHPV.js} +1 -1
- package/dist/{chunk-KIDISU6X.js → chunk-PL3T5TWF.js} +1 -1
- package/dist/{chunk-62EV4IJA.js → chunk-Q7FBYUCZ.js} +1 -1
- package/dist/{chunk-4J2ZM2HX.js → chunk-TOMV5YJH.js} +1 -1
- package/dist/{chunk-XARPIXWF.js → chunk-VA77ENFQ.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 +5 -5
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/runtime-dependencies/manifest.json +0 -1
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/eventcatalog/src/components/Grids/utils.tsx +0 -23
- package/eventcatalog/src/components/MDX/CodeGroup/CodeGroup.tsx +6 -1
- package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsPanel.tsx +12 -4
- package/eventcatalog/src/components/SideNav/NestedSideBar/index.tsx +16 -7
- package/eventcatalog/src/components/SideNav/NestedSideBar/utils.ts +10 -0
- package/eventcatalog/src/components/Tables/Discover/DiscoverTable.tsx +4 -62
- package/eventcatalog/src/components/Tables/Discover/columns.tsx +17 -150
- package/eventcatalog/src/components/Tables/Resources/ResourcesTable.tsx +425 -0
- package/eventcatalog/src/components/Tables/RowActionsMenu.tsx +157 -0
- package/eventcatalog/src/components/Tables/TablePagination.tsx +82 -0
- package/eventcatalog/src/features/ai/chat-api.ts +3 -3
- package/eventcatalog/src/features/mcp/apps/generated/viewer.html +75 -74
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +0 -2
- package/eventcatalog/src/pages/architecture/[type]/[id]/[version]/_index.data.spec.ts +52 -63
- package/eventcatalog/src/pages/architecture/[type]/[id]/[version]/_index.data.ts +34 -46
- package/eventcatalog/src/pages/architecture/[type]/[id]/[version]/index.astro +11 -29
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/resources/_ResourcesPage.astro +79 -0
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/resources/_index.data.spec.ts +32 -14
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/resources/_index.data.ts +63 -58
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/resources/index.astro +2 -62
- package/eventcatalog/src/pages/docs/services/[id]/[version]/resources/index.astro +13 -0
- package/eventcatalog/src/stores/sidebar-store/builders/domain.ts +24 -42
- package/eventcatalog/src/stores/sidebar-store/builders/flow.ts +2 -0
- package/eventcatalog/src/stores/sidebar-store/builders/message.ts +2 -0
- package/eventcatalog/src/stores/sidebar-store/builders/service.ts +23 -23
- package/eventcatalog/src/stores/sidebar-store/builders/shared.ts +13 -0
- package/eventcatalog/src/stores/sidebar-store/builders/system.ts +18 -27
- package/eventcatalog/src/stores/sidebar-store/state.ts +5 -0
- package/eventcatalog/src/styles/tailwind.css +2 -2
- package/eventcatalog/src/utils/collections/channels.ts +56 -1
- package/eventcatalog/src/utils/collections/flows.ts +50 -1
- package/eventcatalog/src/utils/collections/message-connections.ts +60 -0
- package/eventcatalog/src/utils/collections/message-triggers.ts +2 -1
- package/eventcatalog/src/utils/collections/resource-owners.ts +193 -0
- package/eventcatalog/src/utils/collections/resources.ts +310 -0
- package/eventcatalog/src/utils/collections/util.ts +31 -0
- package/eventcatalog/src/utils/git.ts +11 -5
- package/package.json +8 -10
- package/dist/runtime-dependencies/shelljs.mjs +0 -3
- package/eventcatalog/src/components/Grids/DomainGrid.tsx +0 -838
- package/eventcatalog/src/components/Grids/MessageGrid.tsx +0 -344
- package/eventcatalog/src/components/Grids/SystemGrid.tsx +0 -185
- package/eventcatalog/src/components/Grids/components.tsx +0 -170
- package/eventcatalog/src/components/Grids/message-link.ts +0 -38
- package/eventcatalog/src/components/Tables/SystemResources/SystemResourcesTable.tsx +0 -294
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/resources/_resources.spec.ts +0 -65
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/resources/_resources.ts +0 -46
|
@@ -176,7 +176,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
176
176
|
var import_os = __toESM(require("os"), 1);
|
|
177
177
|
|
|
178
178
|
// package.json
|
|
179
|
-
var version = "5.0.0-beta.
|
|
179
|
+
var version = "5.0.0-beta.4";
|
|
180
180
|
|
|
181
181
|
// src/constants.ts
|
|
182
182
|
var VERSION = version;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-PL3T5TWF.js";
|
|
4
4
|
import "../chunk-TQLRG35T.js";
|
|
5
5
|
import "../chunk-ZAZHAVKB.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-VA77ENFQ.js";
|
|
7
|
+
import "../chunk-Q7FBYUCZ.js";
|
|
8
8
|
import "../chunk-RFIXKATC.js";
|
|
9
9
|
export {
|
|
10
10
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -181,7 +181,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
181
181
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
182
182
|
|
|
183
183
|
// package.json
|
|
184
|
-
var version = "5.0.0-beta.
|
|
184
|
+
var version = "5.0.0-beta.4";
|
|
185
185
|
|
|
186
186
|
// src/constants.ts
|
|
187
187
|
var VERSION = version;
|
package/dist/eventcatalog.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import "./chunk-CA4U2JP7.js";
|
|
5
5
|
import {
|
|
6
6
|
log_build_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PL3T5TWF.js";
|
|
8
8
|
import {
|
|
9
9
|
getLicenseStatus,
|
|
10
10
|
printLicenseStatus
|
|
@@ -33,10 +33,10 @@ import {
|
|
|
33
33
|
} from "./chunk-MDWB5HLO.js";
|
|
34
34
|
import {
|
|
35
35
|
generate
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-M7OVJHPV.js";
|
|
37
37
|
import {
|
|
38
38
|
logger
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-TOMV5YJH.js";
|
|
40
40
|
import {
|
|
41
41
|
resolve_catalog_dependencies_default
|
|
42
42
|
} from "./chunk-36RYTYT5.js";
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
import {
|
|
51
51
|
watch
|
|
52
52
|
} from "./chunk-U63GDPPY.js";
|
|
53
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-VA77ENFQ.js";
|
|
54
54
|
import {
|
|
55
55
|
getAstroConfigPath
|
|
56
56
|
} from "./chunk-VIJJ7JKH.js";
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
} from "./chunk-LFQJXLHG.js";
|
|
67
67
|
import {
|
|
68
68
|
VERSION
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-Q7FBYUCZ.js";
|
|
70
70
|
import {
|
|
71
71
|
getEventCatalogConfigFile,
|
|
72
72
|
verifyRequiredFieldsAreInCatalogConfigFile
|
package/dist/generate.cjs
CHANGED
|
@@ -112,7 +112,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
|
|
|
112
112
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
113
113
|
|
|
114
114
|
// package.json
|
|
115
|
-
var version = "5.0.0-beta.
|
|
115
|
+
var version = "5.0.0-beta.4";
|
|
116
116
|
|
|
117
117
|
// src/constants.ts
|
|
118
118
|
var VERSION = version;
|
package/dist/generate.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generate
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-M7OVJHPV.js";
|
|
4
|
+
import "./chunk-TOMV5YJH.js";
|
|
5
|
+
import "./chunk-Q7FBYUCZ.js";
|
|
6
6
|
import "./chunk-RFIXKATC.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -24,26 +24,3 @@ export const getCollectionStyles = (collection: CollectionMessageTypes | Collect
|
|
|
24
24
|
return { color: 'gray', Icon: EnvelopeIcon };
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
-
|
|
28
|
-
export interface PaginationProps {
|
|
29
|
-
currentPage: number;
|
|
30
|
-
totalPages: number;
|
|
31
|
-
totalItems: number;
|
|
32
|
-
itemsPerPage: number;
|
|
33
|
-
onPageChange: (page: number) => void;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface SearchBarProps {
|
|
37
|
-
searchQuery: string;
|
|
38
|
-
onSearchChange: (query: string) => void;
|
|
39
|
-
placeholder?: string;
|
|
40
|
-
totalResults?: number;
|
|
41
|
-
totalItems?: number;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface TypeFilterProps {
|
|
45
|
-
selectedTypes: CollectionMessageTypes[];
|
|
46
|
-
onTypeChange: (types: CollectionMessageTypes[]) => void;
|
|
47
|
-
filteredCount?: number;
|
|
48
|
-
totalCount?: number;
|
|
49
|
-
}
|
|
@@ -167,7 +167,12 @@ export default function CodeGroup({
|
|
|
167
167
|
hidden={index !== active}
|
|
168
168
|
tabIndex={0}
|
|
169
169
|
>
|
|
170
|
-
{
|
|
170
|
+
{/* Astro's router marks scripts in this HTML with data-astro-exec before hydration, so it never matches exactly. */}
|
|
171
|
+
{item.html !== undefined ? (
|
|
172
|
+
<div suppressHydrationWarning dangerouslySetInnerHTML={{ __html: item.html }} />
|
|
173
|
+
) : (
|
|
174
|
+
item.content
|
|
175
|
+
)}
|
|
171
176
|
</div>
|
|
172
177
|
))}
|
|
173
178
|
</div>
|
|
@@ -384,6 +384,9 @@ export default function SchemaDetailsPanel({
|
|
|
384
384
|
[diffToVersion, uniqueAvailableVersions]
|
|
385
385
|
);
|
|
386
386
|
const comparing = (activeTab === 'versions' && hasMultipleVersions) || isDiffModalOpen;
|
|
387
|
+
const contentReady = !content.loading && !content.error;
|
|
388
|
+
// Server-rendered examples stay mounted and are only shown on the Examples tab (see the tab content below).
|
|
389
|
+
const showRenderedExamples = !!renderedExamples && activeTab === 'examples' && contentReady;
|
|
387
390
|
|
|
388
391
|
const compareWithCurrent = (version: string) => {
|
|
389
392
|
setDiffFromVersion(version);
|
|
@@ -705,11 +708,16 @@ export default function SchemaDetailsPanel({
|
|
|
705
708
|
|
|
706
709
|
{/* Tab content */}
|
|
707
710
|
<div className="flex-1 min-h-0 overflow-hidden p-6">
|
|
708
|
-
{
|
|
711
|
+
{/* Always render the examples slot and hide it on other tabs. Astro moves a slot missing from the
|
|
712
|
+
server HTML into a <template>, where its island scripts never run and no island on the page hydrates. */}
|
|
713
|
+
{renderedExamples && (
|
|
714
|
+
<div className="h-full overflow-auto pr-1" hidden={!showRenderedExamples}>
|
|
715
|
+
{renderedExamples}
|
|
716
|
+
</div>
|
|
717
|
+
)}
|
|
718
|
+
{!contentReady ? (
|
|
709
719
|
<SchemaLoadingState loading={content.loading} error={content.error} retry={content.retry} />
|
|
710
|
-
) : activeTab === 'examples' &&
|
|
711
|
-
<div className="h-full overflow-auto pr-1">{renderedExamples}</div>
|
|
712
|
-
) : activeTab === 'examples' && examples.length > 0 ? (
|
|
720
|
+
) : showRenderedExamples ? null : activeTab === 'examples' && examples.length > 0 ? (
|
|
713
721
|
<ExamplesViewer examples={examples} />
|
|
714
722
|
) : activeTab === 'metadata' ? (
|
|
715
723
|
<SchemaMetadata message={message} owners={showOwners ? owners : []} />
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
findNodeKeyByUrl,
|
|
26
26
|
getBadgeClasses,
|
|
27
27
|
getDefaultCollapsedState,
|
|
28
|
+
hidesDefaultItemIcon,
|
|
28
29
|
isGroupCollapsed,
|
|
29
30
|
toggleGroupCollapsed,
|
|
30
31
|
} from './utils';
|
|
@@ -663,6 +664,11 @@ export default function NestedSideBar() {
|
|
|
663
664
|
|
|
664
665
|
const isTopLevel = navigationStack.length === 1;
|
|
665
666
|
|
|
667
|
+
// The list drilled into (e.g. Channels): its items, even those in groups under it (e.g. ADRs
|
|
668
|
+
// grouped by status), drop a default icon that repeats the list's own
|
|
669
|
+
const levelNode = currentLevel.key ? resolveRef(currentLevel.key) : null;
|
|
670
|
+
const repeatsLevelIcon = (item: NavNode) => !!levelNode && hidesDefaultItemIcon(levelNode, item, false);
|
|
671
|
+
|
|
666
672
|
/**
|
|
667
673
|
* Render a list of child refs (resolving keys as needed)
|
|
668
674
|
*/
|
|
@@ -674,7 +680,7 @@ export default function NestedSideBar() {
|
|
|
674
680
|
if (currentItemGroup.length > 0) {
|
|
675
681
|
result.push(
|
|
676
682
|
<div key={`items-${result.length}`} className="flex flex-col gap-0.5 mb-1.5">
|
|
677
|
-
{currentItemGroup.map((item, idx) => renderItem(item.node, item.key, idx))}
|
|
683
|
+
{currentItemGroup.map((item, idx) => renderItem(item.node, item.key, idx, repeatsLevelIcon(item.node)))}
|
|
678
684
|
</div>
|
|
679
685
|
);
|
|
680
686
|
currentItemGroup = [];
|
|
@@ -795,9 +801,12 @@ export default function NestedSideBar() {
|
|
|
795
801
|
return renderGroup(child, childKey, childIndex, depth + 1);
|
|
796
802
|
}
|
|
797
803
|
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
804
|
+
return renderItem(
|
|
805
|
+
child,
|
|
806
|
+
childKey,
|
|
807
|
+
childIndex,
|
|
808
|
+
hidesDefaultItemIcon(group, child, isNested) || repeatsLevelIcon(child)
|
|
809
|
+
);
|
|
801
810
|
})}
|
|
802
811
|
</div>
|
|
803
812
|
)}
|
|
@@ -814,9 +823,9 @@ export default function NestedSideBar() {
|
|
|
814
823
|
const isFav = isFavorited(itemKey);
|
|
815
824
|
const canFavorite = itemKey !== null; // Only items with keys can be favorited
|
|
816
825
|
|
|
817
|
-
// Get icon component from lucide-react. When suppressDefaultIcon is set (
|
|
818
|
-
//
|
|
819
|
-
// a custom icon (item.leftIcon) is always still shown.
|
|
826
|
+
// Get icon component from lucide-react. When suppressDefaultIcon is set (the group heading
|
|
827
|
+
// already shows the item's type, see hidesDefaultItemIcon) the default per-collection glyph
|
|
828
|
+
// is hidden; a custom icon (item.leftIcon) is always still shown.
|
|
820
829
|
const IconComponent =
|
|
821
830
|
item.icon && !suppressDefaultIcon ? (LucideIcons as unknown as Record<string, LucideIcons.LucideIcon>)[item.icon] : null;
|
|
822
831
|
const handleStarClick = (e: React.MouseEvent) => {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// Shared utilities for NestedSideBar components
|
|
2
2
|
|
|
3
|
+
import type { NavNode } from '@stores/sidebar-store/state';
|
|
4
|
+
|
|
3
5
|
export const SIDEBAR_GROUP_COLLAPSE_THRESHOLD = 5;
|
|
4
6
|
|
|
5
7
|
/**
|
|
@@ -67,6 +69,14 @@ export const toggleGroupCollapsed = (
|
|
|
67
69
|
* Finds the sidebar node represented by a resource URL.
|
|
68
70
|
* The URL must have its configured base path removed before it is passed in.
|
|
69
71
|
*/
|
|
72
|
+
/**
|
|
73
|
+
* Whether an item in a group drops its default per-collection icon because the group heading
|
|
74
|
+
* already conveys its type: every item under a nested group, and items whose icon is the
|
|
75
|
+
* group's own (e.g. events listed under Events). Custom icons (`leftIcon`) always show.
|
|
76
|
+
*/
|
|
77
|
+
export const hidesDefaultItemIcon = (group: NavNode, item: NavNode, isNested: boolean): boolean =>
|
|
78
|
+
isNested || (!!group.icon && group.icon === item.icon);
|
|
79
|
+
|
|
70
80
|
export const findNodeKeyByUrl = (
|
|
71
81
|
url: string,
|
|
72
82
|
nodes: Record<string, unknown>,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
type ColumnFiltersState,
|
|
12
12
|
type SortingState,
|
|
13
13
|
} from '@tanstack/react-table';
|
|
14
|
-
import { ArrowDown, ArrowUp, ArrowUpDown,
|
|
14
|
+
import { ArrowDown, ArrowUp, ArrowUpDown, SearchX, X, Search, Users } from 'lucide-react';
|
|
15
15
|
import { UserIcon } from '@heroicons/react/24/outline';
|
|
16
16
|
import { useEffect, useMemo, useState } from 'react';
|
|
17
17
|
import type { TableConfiguration } from '@types';
|
|
@@ -19,6 +19,7 @@ import { isSameVersion } from '@utils/collections/version-compare';
|
|
|
19
19
|
import { resolveIconUrl } from '@utils/icon';
|
|
20
20
|
import { FilterDropdown, CheckboxItem } from './FilterComponents';
|
|
21
21
|
import { getDiscoverColumns } from './columns';
|
|
22
|
+
import { TablePagination, useStoredPageSize } from '../TablePagination';
|
|
22
23
|
import { formatAdrStatus, type AdrStatus } from '@utils/collections/adr-constants';
|
|
23
24
|
import { buildDiscoverFilterSearch, filterKnownValues, parseDiscoverFilterSearch } from './url-filters';
|
|
24
25
|
|
|
@@ -243,18 +244,7 @@ export function DiscoverTable<T extends DiscoverTableData>({
|
|
|
243
244
|
const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([]);
|
|
244
245
|
const [sorting, setSorting] = useState<SortingState>([]);
|
|
245
246
|
const [tableFilter, setTableFilter] = useState(initialUrlFilters.q);
|
|
246
|
-
const
|
|
247
|
-
const PAGE_SIZE_STORAGE_KEY = 'eventcatalog-discover-page-size';
|
|
248
|
-
const [pageSize, setPageSize] = useState<number>(() => {
|
|
249
|
-
if (typeof window === 'undefined') return 10;
|
|
250
|
-
const stored = Number(window.localStorage.getItem(PAGE_SIZE_STORAGE_KEY));
|
|
251
|
-
return PAGE_SIZE_OPTIONS.includes(stored) ? stored : 10;
|
|
252
|
-
});
|
|
253
|
-
useEffect(() => {
|
|
254
|
-
if (typeof window !== 'undefined') {
|
|
255
|
-
window.localStorage.setItem(PAGE_SIZE_STORAGE_KEY, String(pageSize));
|
|
256
|
-
}
|
|
257
|
-
}, [pageSize]);
|
|
247
|
+
const [pageSize, setPageSize] = useStoredPageSize('eventcatalog-discover-page-size');
|
|
258
248
|
const [showOnlyLatest, setShowOnlyLatest] = useState(initialUrlFilters.showOnlyLatest);
|
|
259
249
|
const [onlyShowDrafts, setOnlyShowDrafts] = useState(initialUrlFilters.onlyShowDrafts);
|
|
260
250
|
const [selectedDomains, setSelectedDomains] = useState<string[]>(() =>
|
|
@@ -1287,55 +1277,7 @@ export function DiscoverTable<T extends DiscoverTableData>({
|
|
|
1287
1277
|
</div>
|
|
1288
1278
|
</div>
|
|
1289
1279
|
|
|
1290
|
-
{
|
|
1291
|
-
<div className="flex-shrink-0 flex items-center justify-between px-6 py-3 border-t border-[rgb(var(--ec-page-border))]">
|
|
1292
|
-
<div className="flex items-center gap-3 text-xs text-[rgb(var(--ec-page-text-muted))]">
|
|
1293
|
-
{totalResults > 0 && (
|
|
1294
|
-
<span>
|
|
1295
|
-
<span className="font-medium text-[rgb(var(--ec-page-text))]">{table.getRowModel().rows.length}</span> of{' '}
|
|
1296
|
-
<span className="font-medium text-[rgb(var(--ec-page-text))]">{totalResults}</span> results
|
|
1297
|
-
</span>
|
|
1298
|
-
)}
|
|
1299
|
-
{totalResults > 0 && <span aria-hidden className="h-3 w-px bg-[rgb(var(--ec-page-border))]" />}
|
|
1300
|
-
<label className="flex items-center gap-1.5">
|
|
1301
|
-
<span>Per page</span>
|
|
1302
|
-
<select
|
|
1303
|
-
value={pageSize}
|
|
1304
|
-
onChange={(e) => setPageSize(Number(e.target.value))}
|
|
1305
|
-
className="cursor-pointer rounded bg-transparent px-1 py-0.5 font-medium text-[rgb(var(--ec-page-text))] hover:bg-[rgb(var(--ec-content-hover))] focus:bg-[rgb(var(--ec-content-hover))] focus:outline-none"
|
|
1306
|
-
>
|
|
1307
|
-
{PAGE_SIZE_OPTIONS.map((size) => (
|
|
1308
|
-
<option key={size} value={size}>
|
|
1309
|
-
{size}
|
|
1310
|
-
</option>
|
|
1311
|
-
))}
|
|
1312
|
-
</select>
|
|
1313
|
-
</label>
|
|
1314
|
-
</div>
|
|
1315
|
-
<div className="flex items-center gap-1.5">
|
|
1316
|
-
<button
|
|
1317
|
-
className="p-1.5 text-[rgb(var(--ec-icon-color))] hover:text-[rgb(var(--ec-page-text))] disabled:opacity-30 disabled:cursor-not-allowed transition-colors"
|
|
1318
|
-
onClick={() => table.previousPage()}
|
|
1319
|
-
disabled={!table.getCanPreviousPage()}
|
|
1320
|
-
title="Previous page"
|
|
1321
|
-
>
|
|
1322
|
-
<ChevronLeft className="w-4 h-4" />
|
|
1323
|
-
</button>
|
|
1324
|
-
<span className="text-xs tabular-nums text-[rgb(var(--ec-page-text-muted))] min-w-[60px] text-center">
|
|
1325
|
-
<span className="font-medium text-[rgb(var(--ec-page-text))]">{table.getState().pagination.pageIndex + 1}</span>
|
|
1326
|
-
{' / '}
|
|
1327
|
-
<span>{table.getPageCount() || 1}</span>
|
|
1328
|
-
</span>
|
|
1329
|
-
<button
|
|
1330
|
-
className="p-1.5 text-[rgb(var(--ec-icon-color))] hover:text-[rgb(var(--ec-page-text))] disabled:opacity-30 disabled:cursor-not-allowed transition-colors"
|
|
1331
|
-
onClick={() => table.nextPage()}
|
|
1332
|
-
disabled={!table.getCanNextPage()}
|
|
1333
|
-
title="Next page"
|
|
1334
|
-
>
|
|
1335
|
-
<ChevronRight className="w-4 h-4" />
|
|
1336
|
-
</button>
|
|
1337
|
-
</div>
|
|
1338
|
-
</div>
|
|
1280
|
+
<TablePagination table={table} pageSize={pageSize} onPageSizeChange={setPageSize} />
|
|
1339
1281
|
</div>
|
|
1340
1282
|
</div>
|
|
1341
1283
|
);
|