c548a0ff86
* feat(catalog-react): add EntityDataTable and EntityRelationCard components Add EntityDataTable (BUI Table wrapper for entity data) and EntityRelationCard (card shell + data fetching + table) as shared building blocks for entity relation table cards. Includes BUI column factories, column presets for common entity types, and a new translation key for the empty state help link. Signed-off-by: Johan Persson <johanopersson@gmail.com> * refactor(catalog): migrate 8 entity table cards to EntityRelationCard Rewrite HasComponentsCard, HasResourcesCard, HasSubcomponentsCard, HasSubdomainsCard, HasSystemsCard, DependsOnComponentsCard, DependsOnResourcesCard, and DependencyOfComponentsCard as thin wrappers around EntityRelationCard from catalog-react. Remove variant and tableOptions props. Signed-off-by: Johan Persson <johanopersson@gmail.com> * refactor(api-docs): migrate 5 entity table cards to EntityRelationCard Rewrite ConsumedApisCard, ProvidedApisCard, HasApisCard, ConsumingComponentsCard, and ProvidingComponentsCard to use EntityRelationCard from catalog-react. Add BUI column presets for API-specific columns alongside existing MUI presets. Remove variant and tableOptions props. Signed-off-by: Johan Persson <johanopersson@gmail.com> * chore: add API reports and changesets for entity table card migration Signed-off-by: Johan Persson <johanopersson@gmail.com> * fix(catalog-react,api-docs): refine entity card migration Use BUI Alert for error states and BUI Link for empty state help links in EntityRelationCard instead of core-components. Replace MUI ToggleButton with BUI ButtonIcon for the API definition column. Add trailing periods to empty state translation messages. Fix tests asserting on removed external link icon SVG. Signed-off-by: Johan Persson <johanopersson@gmail.com> * feat(catalog-react): add column sorting to EntityDataTable Introduce EntityColumnConfig extending ColumnConfig with an optional sortValue getter. EntityDataTable now uses useTable with a sortFn that reads sortValue from each column, restoring the per-column sorting that the old core-components Table provided by default. All built-in column factories set isSortable and sortValue. Signed-off-by: Johan Persson <johanopersson@gmail.com> * fix(api-docs): use dynamic entity kind in empty state messages Restore entity.kind interpolation in ConsumedApisCard, ProvidedApisCard, and HasApisCard empty state translations instead of hardcoded strings. Signed-off-by: Johan Persson <johanopersson@gmail.com> * fix(catalog-react): use data length for useTable pageSize Replace pageSize: Infinity with tableData.length to avoid potential edge cases in pagination math. Signed-off-by: Johan Persson <johanopersson@gmail.com> * fix(catalog-react): avoid this binding in column factories Use columnFactories.createEntityRelationColumn instead of this.createEntityRelationColumn so the methods work when destructured. Signed-off-by: Johan Persson <johanopersson@gmail.com> * chore: update alpha API reports Signed-off-by: Johan Persson <johanopersson@gmail.com> * fix(create-app): remove variant prop from migrated entity cards in template The create-app template EntityPage still passed variant="gridItem" to cards that no longer accept it. Signed-off-by: Johan Persson <johanopersson@gmail.com> * test(catalog-react): add tests for EntityDataTable and EntityRelationCard Cover rendering with data, empty state, error state, and column sorting for EntityDataTable. Cover title rendering, empty state with help link, related entity display, and error state for EntityRelationCard. Signed-off-by: Johan Persson <johanopersson@gmail.com> * refactor(catalog,api-docs): add backwards compatibility for legacy props Support both old (variant, columns, tableOptions) and new (columnConfig) props via a discriminated union type. When legacy props are detected the old MUI-based implementation is used; otherwise the new BUI-based EntityRelationCard renders. This avoids immediate breaking changes and provides a migration path. Changesets downgraded from major/minor to minor/patch accordingly. Signed-off-by: Johan Persson <johanopersson@gmail.com> * refactor(catalog-react,catalog,api-docs): address review feedback Remove BaseProps types and use inline union in component signatures. Move EntityDataTable, EntityRelationCard, and related types to alpha exports. Group column presets and help links into entityColumnPresets object. Update all consumers and API reports. Signed-off-by: Johan Persson <johanopersson@gmail.com> --------- Signed-off-by: Johan Persson <johanopersson@gmail.com>
106 lines
2.9 KiB
JSON
106 lines
2.9 KiB
JSON
{
|
|
"name": "@backstage/plugin-api-docs",
|
|
"version": "0.13.5-next.2",
|
|
"description": "A Backstage plugin that helps represent API entities in the frontend",
|
|
"backstage": {
|
|
"role": "frontend-plugin",
|
|
"pluginId": "api-docs",
|
|
"pluginPackages": [
|
|
"@backstage/plugin-api-docs"
|
|
]
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"keywords": [
|
|
"backstage"
|
|
],
|
|
"homepage": "https://backstage.io",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/backstage/backstage",
|
|
"directory": "plugins/api-docs"
|
|
},
|
|
"license": "Apache-2.0",
|
|
"sideEffects": false,
|
|
"exports": {
|
|
".": "./src/index.ts",
|
|
"./alpha": "./src/alpha.tsx",
|
|
"./package.json": "./package.json"
|
|
},
|
|
"main": "src/index.ts",
|
|
"types": "src/index.ts",
|
|
"typesVersions": {
|
|
"*": {
|
|
"alpha": [
|
|
"src/alpha.tsx"
|
|
],
|
|
"package.json": [
|
|
"package.json"
|
|
]
|
|
}
|
|
},
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"scripts": {
|
|
"build": "backstage-cli package build",
|
|
"clean": "backstage-cli package clean",
|
|
"lint": "backstage-cli package lint",
|
|
"prepack": "backstage-cli package prepack",
|
|
"postpack": "backstage-cli package postpack",
|
|
"start": "backstage-cli package start",
|
|
"test": "backstage-cli package test"
|
|
},
|
|
"dependencies": {
|
|
"@asyncapi/react-component": "^2.3.3",
|
|
"@backstage/catalog-model": "workspace:^",
|
|
"@backstage/core-components": "workspace:^",
|
|
"@backstage/core-plugin-api": "workspace:^",
|
|
"@backstage/frontend-plugin-api": "workspace:^",
|
|
"@backstage/plugin-catalog": "workspace:^",
|
|
"@backstage/plugin-catalog-common": "workspace:^",
|
|
"@backstage/plugin-catalog-react": "workspace:^",
|
|
"@backstage/plugin-permission-react": "workspace:^",
|
|
"@backstage/ui": "workspace:^",
|
|
"@graphiql/react": "0.29.0",
|
|
"@material-ui/core": "^4.12.2",
|
|
"@material-ui/icons": "^4.9.1",
|
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
"@remixicon/react": "^4.6.0",
|
|
"graphiql": "^3.9.0",
|
|
"graphql": "^16.0.0",
|
|
"graphql-ws": "^5.4.1",
|
|
"swagger-ui-react": "^5.27.1"
|
|
},
|
|
"devDependencies": {
|
|
"@backstage/cli": "workspace:^",
|
|
"@backstage/core-app-api": "workspace:^",
|
|
"@backstage/dev-utils": "workspace:^",
|
|
"@backstage/frontend-test-utils": "workspace:^",
|
|
"@backstage/test-utils": "workspace:^",
|
|
"@testing-library/dom": "^10.0.0",
|
|
"@testing-library/jest-dom": "^6.0.0",
|
|
"@testing-library/react": "^16.0.0",
|
|
"@testing-library/user-event": "^14.0.0",
|
|
"@types/highlightjs": "^10.1.0",
|
|
"@types/react": "^18.0.0",
|
|
"@types/swagger-ui-react": "^5.0.0",
|
|
"graphql-config": "^5.1.6",
|
|
"react": "^18.0.2",
|
|
"react-dom": "^18.0.2",
|
|
"react-router-dom": "^6.30.2"
|
|
},
|
|
"peerDependencies": {
|
|
"@types/react": "^17.0.0 || ^18.0.0",
|
|
"react": "^17.0.0 || ^18.0.0",
|
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
"react-router-dom": "^6.30.2"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"@types/react": {
|
|
"optional": true
|
|
}
|
|
}
|
|
}
|