@gravitee/graphene-core 3.22.0-fix-found-176-snippets-typecheck.bcd0af3 → 3.22.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.
package/USAGE_GUIDE.md
CHANGED
|
@@ -482,13 +482,13 @@ Follow these steps to apply the layout width system to an existing consumer modu
|
|
|
482
482
|
4. **Remove ad-hoc width constraints** — delete any `max-w-*` classes on page-level wrapper divs. The design system owns content width.
|
|
483
483
|
5. **Verify** — resize the browser to confirm content stays centered without clipping on narrow viewports.
|
|
484
484
|
|
|
485
|
-
See `
|
|
485
|
+
See `packages/core/snippets/data-table-list-page.tsx` and `creation-wizard-page.tsx` for complete examples.
|
|
486
486
|
|
|
487
487
|
### Data table (entity list pages)
|
|
488
488
|
|
|
489
489
|
Use `DataTable` for any entity list — whether the data is fetched page-by-page from an API or loaded in full on the client. The component provides sorting, filtering, pagination, column visibility, row selection, and bulk actions through a composable slot API.
|
|
490
490
|
|
|
491
|
-
**To implement:** copy the snippet from `
|
|
491
|
+
**To implement:** copy the snippet from `snippets/data-table-list-page.tsx` and replace the entity type, column definitions, and fetch function with your data. See Storybook **Patterns/Data Table → ApiList** for the full interactive example.
|
|
492
492
|
|
|
493
493
|
#### When to use DataTable vs raw Table
|
|
494
494
|
|
|
@@ -574,7 +574,7 @@ Target **4-7 visible columns**. More than 7 → enable column visibility and hid
|
|
|
574
574
|
|
|
575
575
|
#### Cell renderers
|
|
576
576
|
|
|
577
|
-
Import from `@gravitee/graphene-core
|
|
577
|
+
Import from `@gravitee/graphene-core/composed/DataTable` (or the main package):
|
|
578
578
|
|
|
579
579
|
| Renderer | Use for | Behavior |
|
|
580
580
|
|---|---|---|
|
|
@@ -656,7 +656,7 @@ Use `ContextSidebar` when a user **drills down from a list into a single resourc
|
|
|
656
656
|
|
|
657
657
|
**Do not use** on list/index pages or pages with fewer than 3 sub-sections (use `Tabs` instead).
|
|
658
658
|
|
|
659
|
-
**To implement:** copy the snippet from `
|
|
659
|
+
**To implement:** copy the snippet from `snippets/context-sidebar-detail-page.tsx` and replace the `{PLACEHOLDER}` markers with your resource data, nav groups, and routes. See Storybook **Composed/ContextSidebar** for interactive examples and **Patterns/Module Federation** for the full federated setup.
|
|
660
660
|
|
|
661
661
|
Compose with **Card**, **Tabs**, and other primitives inside the regions the layout components provide. Keep page-level spacing on the Graphene scale (`p-4`, `gap-2`, …) from the token table above.
|
|
662
662
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravitee/graphene-core",
|
|
3
|
-
"version": "3.22.0
|
|
3
|
+
"version": "3.22.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Gravitee's Graphene design system: accessible React components, design tokens, icons, and shared ESLint/TypeScript configs. Built on shadcn/ui and Tailwind.",
|
|
6
6
|
"keywords": [
|
|
@@ -60,7 +60,6 @@
|
|
|
60
60
|
"files": [
|
|
61
61
|
"dist",
|
|
62
62
|
"snippets",
|
|
63
|
-
"!snippets/tsconfig.json",
|
|
64
63
|
"eslint.config.shared.mjs",
|
|
65
64
|
"eslint.legacy.shared.cjs",
|
|
66
65
|
"tsconfig.shared.json",
|
|
@@ -102,7 +101,6 @@
|
|
|
102
101
|
},
|
|
103
102
|
"peerDependencies": {
|
|
104
103
|
"@fontsource/dm-sans": ">=5.0.0",
|
|
105
|
-
"@gravitee/graphene-core": "3.22.0-fix-found-176-snippets-typecheck.bcd0af3",
|
|
106
104
|
"@monaco-editor/react": "^4.7.0",
|
|
107
105
|
"@tanstack/react-table": "^8.0.0",
|
|
108
106
|
"@testing-library/dom": ">=10.0.0",
|
|
@@ -45,7 +45,6 @@ import {
|
|
|
45
45
|
DataTable,
|
|
46
46
|
DataTableColumnHeader,
|
|
47
47
|
DataTableEmptyState,
|
|
48
|
-
DateCell,
|
|
49
48
|
DropdownMenu,
|
|
50
49
|
DropdownMenuContent,
|
|
51
50
|
DropdownMenuItem,
|
|
@@ -54,6 +53,7 @@ import {
|
|
|
54
53
|
FacetedFilter,
|
|
55
54
|
Input,
|
|
56
55
|
} from '@gravitee/graphene-core';
|
|
56
|
+
import { DateCell } from '@gravitee/graphene-core/composed/DataTable';
|
|
57
57
|
import {
|
|
58
58
|
GlobeIcon,
|
|
59
59
|
MoreVerticalIcon,
|
|
@@ -172,7 +172,7 @@ export function EntityListPage() {
|
|
|
172
172
|
const [statusFilter, setStatusFilter] = useState<string[]>([]);
|
|
173
173
|
const [state, dispatch] = useReducer(fetchReducer, { data: [], totalCount: 0, loading: true });
|
|
174
174
|
|
|
175
|
-
const debounceRef = useRef<ReturnType<typeof setTimeout>>(
|
|
175
|
+
const debounceRef = useRef<ReturnType<typeof setTimeout>>();
|
|
176
176
|
useEffect(() => {
|
|
177
177
|
debounceRef.current = setTimeout(() => {
|
|
178
178
|
setDebouncedSearch(search);
|