@redocly/theme 0.58.0-next.4 → 0.58.0-next.6
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/lib/components/Catalog/Catalog.d.ts +2 -2
- package/lib/components/Catalog/Catalog.js +3 -3
- package/lib/components/Catalog/CatalogCardView/CatalogCard.js +15 -14
- package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.js +0 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.js +0 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.js +0 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +1 -1
- package/lib/components/Catalog/CatalogEntityIcon.d.ts +2 -0
- package/lib/components/Catalog/CatalogEntityIcon.js +31 -14
- package/lib/components/Catalog/CatalogEntityTypeIcon.js +19 -6
- package/lib/components/Catalog/CatalogEntityTypeTag.js +9 -3
- package/lib/components/Catalog/CatalogSelector.d.ts +1 -1
- package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.js +1 -1
- package/lib/components/Catalog/CatalogViewModeToggle.d.ts +1 -1
- package/lib/components/Catalog/variables.js +9 -6
- package/lib/components/Tooltip/Tooltip.js +7 -9
- package/lib/components/Tooltip/TooltipWrapper.js +1 -1
- package/lib/core/constants/catalog.d.ts +1 -1
- package/lib/core/constants/catalog.js +9 -27
- package/lib/core/hooks/use-control.js +17 -2
- package/lib/core/openapi/index.d.ts +1 -1
- package/lib/core/openapi/index.js +3 -3
- package/lib/core/styles/global.js +19 -0
- package/lib/core/types/catalog.d.ts +1 -1
- package/lib/core/types/hooks.d.ts +2 -2
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/icons/HierarchyIcon/HierarchyIcon.d.ts +9 -0
- package/lib/icons/HierarchyIcon/HierarchyIcon.js +23 -0
- package/lib/icons/NoteIcon/NoteIcon.d.ts +9 -0
- package/lib/icons/NoteIcon/NoteIcon.js +24 -0
- package/lib/icons/ShareIcon/ShareIcon.d.ts +9 -0
- package/lib/icons/ShareIcon/ShareIcon.js +22 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/package.json +3 -3
- package/src/components/Catalog/Catalog.tsx +15 -5
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +20 -19
- package/src/components/Catalog/CatalogEntity/CatalogEntityLinks.tsx +0 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +0 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.tsx +0 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +1 -1
- package/src/components/Catalog/CatalogEntityIcon.tsx +53 -18
- package/src/components/Catalog/CatalogEntityTypeIcon.tsx +19 -8
- package/src/components/Catalog/CatalogEntityTypeTag.tsx +11 -3
- package/src/components/Catalog/CatalogSelector.tsx +1 -1
- package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +1 -1
- package/src/components/Catalog/CatalogViewModeToggle.tsx +1 -1
- package/src/components/Catalog/variables.ts +9 -6
- package/src/components/Tooltip/Tooltip.tsx +6 -8
- package/src/components/Tooltip/TooltipWrapper.tsx +1 -1
- package/src/core/constants/catalog.ts +9 -27
- package/src/core/hooks/use-control.ts +21 -3
- package/src/core/openapi/index.ts +1 -1
- package/src/core/styles/global.ts +19 -0
- package/src/core/types/catalog.ts +1 -2
- package/src/core/types/hooks.ts +6 -1
- package/src/core/types/l10n.ts +3 -0
- package/src/icons/HierarchyIcon/HierarchyIcon.tsx +32 -0
- package/src/icons/NoteIcon/NoteIcon.tsx +35 -0
- package/src/icons/ShareIcon/ShareIcon.tsx +23 -0
- package/src/index.ts +2 -0
package/lib/core/types/l10n.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TOptions } from 'i18next';
|
|
2
|
-
export type TranslationKey = 'dev.newApp' | 'dev.newApp.text' | 'dev.sidebar.header' | 'dev.sidebar.footer.text' | 'dev.create.app.dialog.appName.placeholder' | 'dev.create.app.dialog.appName.error' | 'dev.create.app.dialog.selectAPIs' | 'dev.create.app.dialog.description' | 'dev.create.app.dialog.description.placeholder' | 'dev.create.app.dialog.create' | 'dev.create.app.dialog.cancel' | 'dev.main.tab.appKeys' | 'dev.main.tab.logs' | 'dev.app.description.title' | 'dev.edit.description.dialog.title' | 'dev.edit.description.dialog.save' | 'dev.edit.description.dialog.cancel' | 'dev.edit.apis.dialog.selectedAPIs' | 'dev.app.key.create' | 'dev.create.key.dialog.title' | 'dev.create.key.dialog.create' | 'dev.create.key.dialog.cancel' | 'dev.app.edit' | 'dev.app.delete' | 'dev.edit.app.dialog.title' | 'dev.edit.app.dialog.save' | 'dev.edit.app.dialog.cancel' | 'dev.delete.app.dialog.title' | 'dev.delete.app.dialog.confirmation' | 'dev.delete.app.dialog.delete' | 'dev.delete.app.dialog.cancel' | 'dev.app.key.roll' | 'dev.roll.key.dialog.title' | 'dev.roll.key.dialog.apiKey' | 'dev.roll.key.dialog.expires' | 'dev.roll.key.dialog.confirmation' | 'dev.roll.key.dialog.cancel' | 'dev.roll.key.dialog.roll' | 'dev.update.key.dialog.title' | 'dev.update.key.dialog.update' | 'dev.update.key.dialog.cancel' | 'dev.app.key.api.name' | 'dev.app.key.api.status' | 'dev.app.key.api.edit' | 'dev.edit.apis.dialog.title' | 'dev.edit.apis.dialog.apiKey' | 'dev.edit.apis.dialog.save' | 'dev.edit.apis.dialog.cancel' | 'dev.select.placeholder' | 'dev.app.overview.status.pending' | 'dev.app.overview.status.approved' | 'dev.app.overview.status.revoked' | 'dev.app.overview.status' | 'dev.app.overview.non-production' | 'dev.app.overview.production' | 'dev.app.overview.clientId' | 'dev.app.overview.apiKey' | 'dev.app.key.revoke' | 'dev.revoke.key.dialog.title' | 'dev.revoke.key.dialog.apiKey' | 'dev.revoke.key.dialog.expires' | 'dev.revoke.key.dialog.confirmation' | 'dev.revoke.key.dialog.revoke' | 'dev.revoke.key.dialog.cancel' | 'dev.app.overview.expires' | 'dev.app.overview.created' | 'dev.app.overview.visibilityToggle.hide' | 'dev.app.overview.visibilityToggle.show' | 'search.loading' | 'search.noResults.title' | 'search.keys.navigate' | 'search.keys.select' | 'search.keys.exit' | 'search.label' | 'search.cancel' | 'search.recent' | 'search.navbar.label' | 'search.suggested' | 'search.showMore' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.notFound.title' | 'page.notFound.description' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.add' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | 'catalog.catalogs.all.title' | 'catalog.catalogs.all.description' | 'catalog.catalogs.all.switcherLabel' | 'catalog.catalogs.service.title' | 'catalog.catalogs.service.description' | 'catalog.catalogs.service.switcherLabel' | 'catalog.catalogs.user.title' | 'catalog.catalogs.user.description' | 'catalog.catalogs.user.switcherLabel' | 'catalog.catalogs.team.title' | 'catalog.catalogs.team.description' | 'catalog.catalogs.team.switcherLabel' | 'catalog.catalogs.domain.title' | 'catalog.catalogs.domain.description' | 'catalog.catalogs.domain.switcherLabel' | 'catalog.catalogs.apiDescription.title' | 'catalog.catalogs.apiDescription.description' | 'catalog.catalogs.apiDescription.switcherLabel' | 'catalog.catalogs.dataSchema.title' | 'catalog.catalogs.dataSchema.description' | 'catalog.catalogs.dataSchema.switcherLabel' | 'catalog.catalogs.apiOperation.title' | 'catalog.catalogs.apiOperation.description' | 'catalog.catalogs.apiOperation.switcherLabel' | 'catalog.entity.metadata.title' | 'catalog.entity.schema.title' | 'catalog.entity.properties.apiDescription.title' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeToSingleColumn' | 'sidebar.actions.changeToTwoColumns' | 'sidebar.actions.singleColumn' | 'sidebar.actions.twoColumns' | 'versionPicker.label' | 'versionPicker.unversioned' | 'codeSnippet.copy.buttonText' | 'codeSnippet.copy.tooltipText' | 'codeSnippet.copy.toasterText' | 'markdown.editPage.text' | 'feedback.settings.comment.submitText' | 'feedback.settings.comment.label' | 'feedback.settings.comment.send' | 'feedback.settings.comment.cancel' | 'feedback.settings.comment.satisfiedLabel' | 'feedback.settings.comment.neutralLabel' | 'feedback.settings.comment.dissatisfiedLabel' | 'feedback.settings.submitText' | 'feedback.settings.label' | 'feedback.settings.reasons.label' | 'feedback.submit' | 'feedback.cancel' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'codeSnippet.expand.tooltipText' | 'codeSnippet.collapse.tooltipText' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'page.actions.copyButtonText' | 'page.actions.copyTitle' | 'page.actions.copyDescription' | 'page.actions.viewAsMdTitle' | 'page.actions.viewAsMdButtonText' | 'page.actions.viewAsMdDescription' | 'page.actions.chatGptTitle' | 'page.actions.chatGptButtonText' | 'page.actions.chatGptDescription' | 'page.actions.claudeTitle' | 'page.actions.claudeButtonText' | 'page.actions.claudeDescription' | 'openapi.download.description.title' | 'openapi.info.title' | 'openapi.info.contact.url' | 'openapi.info.contact.name' | 'openapi.info.license' | 'openapi.info.termsOfService' | 'openapi.info.metadata.title' | 'openapi.key' | 'openapi.value' | 'openapi.enum' | 'openapi.items' | 'openapi.default' | 'openapi.variable' | 'openapi.variables' | 'openapi.actions.show' | 'openapi.actions.hide' | 'openapi.actions.more' | 'openapi.languages.title' | 'openapi.servers.title' | 'openapi.operations' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | 'openapi.cookie' | 'openapi.header' | 'openapi.body' | 'openapi.responses' | 'openapi.response' | 'openapi.callbacks' | 'openapi.callbackRequest' | 'openapi.callbackResponse' | 'openapi.payload' | 'openapi.discriminator' | 'openapi.contentType' | 'openapi.tryIt' | 'openapi.loading' | 'openapi.example' | 'openapi.examples' | 'openapi.additionalProperties' | 'openapi.patternProperties' | 'openapi.required' | 'openapi.recursive' | 'openapi.complex' | 'openapi.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.collapseAll' | 'openapi.viewSecurityDetails' | 'openapi.noResponseExample' | 'openapi.discriminator.searchPlaceholder' | 'openapi.discriminator.searchNoResults' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.hidePattern' | 'openapi.showPattern' | 'openapi.authorizationUrl' | 'openapi.tokenUrl' | 'openapi.refreshUrl' | 'openapi.showOptionalScopes' | 'openapi.hideOptionalScopes' | 'openapi.security' | 'openapi.httpAuthorizationScheme' | 'openapi.bearerFormat' | 'openapi.parameterName' | 'openapi.flowType' | 'openapi.connectUrl' | 'openapi.requiredScopes' | 'openapi.unsupportedLanguage' | 'openapi.failedToGenerateCodeSample' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | 'graphql.queries' | 'graphql.mutations' | 'graphql.subscriptions' | 'graphql.directives' | 'graphql.objects' | 'graphql.interfaces' | 'graphql.unions' | 'graphql.enums' | 'graphql.inputs' | 'graphql.scalars' | 'graphql.arguments.label' | 'graphql.arguments.show' | 'graphql.arguments.hide' | 'graphql.arguments.here' | 'graphql.returnTypes.label' | 'graphql.returnTypes.show' | 'graphql.returnTypes.hide' | 'graphql.possibleTypes' | 'graphql.defaultValue' | 'graphql.deprecationReason' | 'graphql.requiredScopes' | 'graphql.viewSecurityDetails' | 'graphql.objectScopes' | 'graphql.fieldScopes' | 'graphql.implementedInterfaces' | 'graphql.nonNull' | 'graphql.required' | 'graphql.deprecated' | 'graphql.variables' | 'graphql.querySample' | 'graphql.mutationSample' | 'graphql.subscriptionSample' | 'graphql.responseSample' | 'graphql.locations' | 'graphql.sample' | 'graphql.referenced' | 'graphql.content.fragment' | 'codeWalkthrough.download' | 'codeWalkthrough.preview' | 'time.justNow' | 'time.past.second' | 'time.past.seconds' | 'time.past.minute' | 'time.past.minutes' | 'time.past.hour' | 'time.past.hours' | 'time.past.day' | 'time.past.days' | 'time.past.week' | 'time.past.weeks' | 'time.past.month' | 'time.past.months' | 'time.past.year' | 'time.past.years' | 'page.internalServerError.title' | 'page.internalServerError.description' | 'page.skipToContent.label';
|
|
2
|
+
export type TranslationKey = 'dev.newApp' | 'dev.newApp.text' | 'dev.sidebar.header' | 'dev.sidebar.footer.text' | 'dev.create.app.dialog.appName.placeholder' | 'dev.create.app.dialog.appName.error' | 'dev.create.app.dialog.selectAPIs' | 'dev.create.app.dialog.description' | 'dev.create.app.dialog.description.placeholder' | 'dev.create.app.dialog.create' | 'dev.create.app.dialog.cancel' | 'dev.main.tab.appKeys' | 'dev.main.tab.logs' | 'dev.app.description.title' | 'dev.edit.description.dialog.title' | 'dev.edit.description.dialog.save' | 'dev.edit.description.dialog.cancel' | 'dev.edit.apis.dialog.selectedAPIs' | 'dev.app.key.create' | 'dev.create.key.dialog.title' | 'dev.create.key.dialog.create' | 'dev.create.key.dialog.cancel' | 'dev.app.edit' | 'dev.app.delete' | 'dev.edit.app.dialog.title' | 'dev.edit.app.dialog.save' | 'dev.edit.app.dialog.cancel' | 'dev.delete.app.dialog.title' | 'dev.delete.app.dialog.confirmation' | 'dev.delete.app.dialog.delete' | 'dev.delete.app.dialog.cancel' | 'dev.app.key.roll' | 'dev.roll.key.dialog.title' | 'dev.roll.key.dialog.apiKey' | 'dev.roll.key.dialog.expires' | 'dev.roll.key.dialog.confirmation' | 'dev.roll.key.dialog.cancel' | 'dev.roll.key.dialog.roll' | 'dev.update.key.dialog.title' | 'dev.update.key.dialog.update' | 'dev.update.key.dialog.cancel' | 'dev.app.key.api.name' | 'dev.app.key.api.status' | 'dev.app.key.api.edit' | 'dev.edit.apis.dialog.title' | 'dev.edit.apis.dialog.apiKey' | 'dev.edit.apis.dialog.save' | 'dev.edit.apis.dialog.cancel' | 'dev.select.placeholder' | 'dev.app.overview.status.pending' | 'dev.app.overview.status.approved' | 'dev.app.overview.status.revoked' | 'dev.app.overview.status' | 'dev.app.overview.non-production' | 'dev.app.overview.production' | 'dev.app.overview.clientId' | 'dev.app.overview.apiKey' | 'dev.app.key.revoke' | 'dev.revoke.key.dialog.title' | 'dev.revoke.key.dialog.apiKey' | 'dev.revoke.key.dialog.expires' | 'dev.revoke.key.dialog.confirmation' | 'dev.revoke.key.dialog.revoke' | 'dev.revoke.key.dialog.cancel' | 'dev.app.overview.expires' | 'dev.app.overview.created' | 'dev.app.overview.visibilityToggle.hide' | 'dev.app.overview.visibilityToggle.show' | 'search.loading' | 'search.noResults.title' | 'search.keys.navigate' | 'search.keys.select' | 'search.keys.exit' | 'search.label' | 'search.cancel' | 'search.recent' | 'search.navbar.label' | 'search.suggested' | 'search.showMore' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.notFound.title' | 'page.notFound.description' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.add' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | 'catalog.catalogs.all.title' | 'catalog.catalogs.all.description' | 'catalog.catalogs.all.switcherLabel' | 'catalog.catalogs.service.title' | 'catalog.catalogs.service.description' | 'catalog.catalogs.service.switcherLabel' | 'catalog.catalogs.user.title' | 'catalog.catalogs.user.description' | 'catalog.catalogs.user.switcherLabel' | 'catalog.catalogs.team.title' | 'catalog.catalogs.team.description' | 'catalog.catalogs.team.switcherLabel' | 'catalog.catalogs.domain.title' | 'catalog.catalogs.domain.description' | 'catalog.catalogs.domain.switcherLabel' | 'catalog.catalogs.apiDescription.title' | 'catalog.catalogs.apiDescription.description' | 'catalog.catalogs.apiDescription.switcherLabel' | 'catalog.catalogs.dataSchema.title' | 'catalog.catalogs.dataSchema.description' | 'catalog.catalogs.dataSchema.switcherLabel' | 'catalog.catalogs.apiOperation.title' | 'catalog.catalogs.apiOperation.description' | 'catalog.catalogs.apiOperation.switcherLabel' | 'catalog.entity.metadata.title' | 'catalog.entity.schema.title' | 'catalog.entity.properties.apiDescription.title' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeToSingleColumn' | 'sidebar.actions.changeToTwoColumns' | 'sidebar.actions.singleColumn' | 'sidebar.actions.twoColumns' | 'versionPicker.label' | 'versionPicker.unversioned' | 'codeSnippet.copy.buttonText' | 'codeSnippet.copy.tooltipText' | 'codeSnippet.copy.toasterText' | 'markdown.editPage.text' | 'feedback.settings.comment.submitText' | 'feedback.settings.comment.label' | 'feedback.settings.comment.send' | 'feedback.settings.comment.cancel' | 'feedback.settings.comment.satisfiedLabel' | 'feedback.settings.comment.neutralLabel' | 'feedback.settings.comment.dissatisfiedLabel' | 'feedback.settings.submitText' | 'feedback.settings.label' | 'feedback.settings.reasons.label' | 'feedback.submit' | 'feedback.cancel' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'codeSnippet.expand.tooltipText' | 'codeSnippet.collapse.tooltipText' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'page.actions.copyButtonText' | 'page.actions.copyTitle' | 'page.actions.copyDescription' | 'page.actions.viewAsMdTitle' | 'page.actions.viewAsMdButtonText' | 'page.actions.viewAsMdDescription' | 'page.actions.chatGptTitle' | 'page.actions.chatGptButtonText' | 'page.actions.chatGptDescription' | 'page.actions.claudeTitle' | 'page.actions.claudeButtonText' | 'page.actions.claudeDescription' | 'openapi.download.description.title' | 'openapi.info.title' | 'openapi.info.contact.url' | 'openapi.info.contact.name' | 'openapi.info.license' | 'openapi.info.termsOfService' | 'openapi.info.metadata.title' | 'openapi.key' | 'openapi.value' | 'openapi.enum' | 'openapi.items' | 'openapi.default' | 'openapi.variable' | 'openapi.variables' | 'openapi.actions.show' | 'openapi.actions.hide' | 'openapi.actions.more' | 'openapi.languages.title' | 'openapi.servers.title' | 'openapi.operations' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | 'openapi.cookie' | 'openapi.header' | 'openapi.body' | 'openapi.responses' | 'openapi.response' | 'openapi.callbacks' | 'openapi.callbackRequest' | 'openapi.callbackResponse' | 'openapi.payload' | 'openapi.discriminator' | 'openapi.contentType' | 'openapi.tryIt' | 'openapi.loading' | 'openapi.example' | 'openapi.examples' | 'openapi.additionalProperties' | 'openapi.patternProperties' | 'openapi.required' | 'openapi.recursive' | 'openapi.complex' | 'openapi.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.collapseAll' | 'openapi.viewSecurityDetails' | 'openapi.noResponseExample' | 'openapi.discriminator.searchPlaceholder' | 'openapi.discriminator.searchNoResults' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.hidePattern' | 'openapi.showPattern' | 'openapi.authorizationUrl' | 'openapi.tokenUrl' | 'openapi.refreshUrl' | 'openapi.showOptionalScopes' | 'openapi.hideOptionalScopes' | 'openapi.security' | 'openapi.httpAuthorizationScheme' | 'openapi.bearerFormat' | 'openapi.parameterName' | 'openapi.flowType' | 'openapi.connectUrl' | 'openapi.requiredScopes' | 'openapi.unsupportedLanguage' | 'openapi.failedToGenerateCodeSample' | 'openapi.schemaCatalogLink.title' | 'openapi.schemaCatalogLink.copyButtonTooltip' | 'openapi.schemaCatalogLink.copiedTooltip' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | 'graphql.queries' | 'graphql.mutations' | 'graphql.subscriptions' | 'graphql.directives' | 'graphql.objects' | 'graphql.interfaces' | 'graphql.unions' | 'graphql.enums' | 'graphql.inputs' | 'graphql.scalars' | 'graphql.arguments.label' | 'graphql.arguments.show' | 'graphql.arguments.hide' | 'graphql.arguments.here' | 'graphql.returnTypes.label' | 'graphql.returnTypes.show' | 'graphql.returnTypes.hide' | 'graphql.possibleTypes' | 'graphql.defaultValue' | 'graphql.deprecationReason' | 'graphql.requiredScopes' | 'graphql.viewSecurityDetails' | 'graphql.objectScopes' | 'graphql.fieldScopes' | 'graphql.implementedInterfaces' | 'graphql.nonNull' | 'graphql.required' | 'graphql.deprecated' | 'graphql.variables' | 'graphql.querySample' | 'graphql.mutationSample' | 'graphql.subscriptionSample' | 'graphql.responseSample' | 'graphql.locations' | 'graphql.sample' | 'graphql.referenced' | 'graphql.content.fragment' | 'codeWalkthrough.download' | 'codeWalkthrough.preview' | 'time.justNow' | 'time.past.second' | 'time.past.seconds' | 'time.past.minute' | 'time.past.minutes' | 'time.past.hour' | 'time.past.hours' | 'time.past.day' | 'time.past.days' | 'time.past.week' | 'time.past.weeks' | 'time.past.month' | 'time.past.months' | 'time.past.year' | 'time.past.years' | 'page.internalServerError.title' | 'page.internalServerError.description' | 'page.skipToContent.label';
|
|
3
3
|
export type Locale = {
|
|
4
4
|
code: string;
|
|
5
5
|
name: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from '../../icons/types';
|
|
3
|
+
export declare const HierarchyIcon: import("styled-components").StyledComponent<(props: IconProps) => React.JSX.Element, any, {
|
|
4
|
+
'data-component-name': string;
|
|
5
|
+
} & {
|
|
6
|
+
color?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name">;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.HierarchyIcon = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const utils_1 = require("../../core/utils");
|
|
10
|
+
const Icon = (props) => (react_1.default.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18" }, props),
|
|
11
|
+
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.0625 7.3125H15.1875C15.4858 7.31216 15.7717 7.19352 15.9826 6.98262C16.1935 6.77171 16.3122 6.48576 16.3125 6.1875V2.8125C16.3122 2.51424 16.1935 2.22829 15.9826 2.01738C15.7717 1.80648 15.4858 1.68784 15.1875 1.6875H2.8125C2.51424 1.68784 2.22829 1.80648 2.01738 2.01738C1.80648 2.22829 1.68784 2.51424 1.6875 2.8125V6.1875C1.68784 6.48576 1.80648 6.77171 2.01738 6.98262C2.22829 7.19352 2.51424 7.31216 2.8125 7.3125H3.9375H5.0625ZM15.1875 2.8125H2.8125V6.1875H15.1875V2.8125Z" }),
|
|
12
|
+
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M15.1875 10.6875H9.5625C9.26424 10.6878 8.97829 10.8065 8.76738 11.0174C8.55648 11.2283 8.43784 11.5142 8.4375 11.8125V12.9375H5.0625V10.4546V9.5625V7.3125H3.9375V10.4546V12.9375C3.93784 13.2358 4.05648 13.5217 4.26738 13.7326C4.47829 13.9435 4.76424 14.0622 5.0625 14.0625H8.4375V15.1875C8.43784 15.4858 8.55648 15.7717 8.76738 15.9826C8.97829 16.1935 9.26424 16.3122 9.5625 16.3125H15.1875C15.4858 16.3122 15.7717 16.1935 15.9826 15.9826C16.1935 15.7717 16.3122 15.4858 16.3125 15.1875V11.8125C16.3122 11.5142 16.1935 11.2283 15.9826 11.0174C15.7717 10.8065 15.4858 10.6878 15.1875 10.6875ZM9.5625 11.8125V15.1875H15.1875V11.8125H9.5625Z" })));
|
|
13
|
+
exports.HierarchyIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
|
|
14
|
+
'data-component-name': 'icons/HierarchyIcon/HierarchyIcon',
|
|
15
|
+
})) `
|
|
16
|
+
path {
|
|
17
|
+
fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
height: ${({ size }) => size || '16px'};
|
|
21
|
+
width: ${({ size }) => size || '16px'};
|
|
22
|
+
`;
|
|
23
|
+
//# sourceMappingURL=HierarchyIcon.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from '../../icons/types';
|
|
3
|
+
export declare const NoteIcon: import("styled-components").StyledComponent<(props: IconProps) => React.JSX.Element, any, {
|
|
4
|
+
'data-component-name': string;
|
|
5
|
+
} & {
|
|
6
|
+
color?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name">;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.NoteIcon = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const utils_1 = require("../../core/utils");
|
|
10
|
+
const Icon = (props) => (react_1.default.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "8", height: "12", viewBox: "0 0 8 12", fill: "none" }, props),
|
|
11
|
+
react_1.default.createElement("path", { d: "M7.6375 3.4875L5.0125 0.8625C4.9375 0.7875 4.8625 0.75 4.75 0.75H1C0.5875 0.75 0.25 1.0875 0.25 1.5V10.5C0.25 10.9125 0.5875 11.25 1 11.25H7C7.4125 11.25 7.75 10.9125 7.75 10.5V3.75C7.75 3.6375 7.7125 3.5625 7.6375 3.4875ZM4.75 1.65L6.85 3.75H4.75V1.65ZM7 10.5H1V1.5H4V3.75C4 4.1625 4.3375 4.5 4.75 4.5H7V10.5Z", fill: "currentColor" }),
|
|
12
|
+
react_1.default.createElement("path", { d: "M6.25 8.25H1.75V9H6.25V8.25Z", fill: "currentColor" }),
|
|
13
|
+
react_1.default.createElement("path", { d: "M6.25 6H1.75V6.75H6.25V6Z", fill: "currentColor" })));
|
|
14
|
+
exports.NoteIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
|
|
15
|
+
'data-component-name': 'icons/NoteIcon/NoteIcon',
|
|
16
|
+
})) `
|
|
17
|
+
path {
|
|
18
|
+
fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
height: ${({ size }) => size || '16px'};
|
|
22
|
+
width: ${({ size }) => size || '16px'};
|
|
23
|
+
`;
|
|
24
|
+
//# sourceMappingURL=NoteIcon.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconProps } from '../../icons/types';
|
|
3
|
+
export declare const ShareIcon: import("styled-components").StyledComponent<(props: IconProps) => React.JSX.Element, any, {
|
|
4
|
+
'data-component-name': string;
|
|
5
|
+
} & {
|
|
6
|
+
color?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
} & React.SVGProps<SVGSVGElement>, "data-component-name">;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ShareIcon = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const utils_1 = require("../../core/utils");
|
|
10
|
+
const Icon = (props) => (react_1.default.createElement("svg", Object.assign({ viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
11
|
+
react_1.default.createElement("path", { d: "M11.5 10.0001C11.1257 10.002 10.7566 10.0879 10.42 10.2514C10.0834 10.415 9.78776 10.652 9.55497 10.9451L5.89997 8.6601C6.03318 8.23018 6.03318 7.77002 5.89997 7.3401L9.55497 5.0551C9.92594 5.51446 10.4475 5.82769 11.0273 5.93931C11.6071 6.05092 12.2077 5.95372 12.7227 5.66491C13.2377 5.37611 13.6339 4.91435 13.841 4.36143C14.0482 3.8085 14.0529 3.20011 13.8544 2.64402C13.656 2.08793 13.2671 1.62003 12.7567 1.32322C12.2462 1.0264 11.6472 0.919827 11.0657 1.02237C10.4843 1.12491 9.95785 1.42996 9.57975 1.88346C9.20164 2.33697 8.99626 2.90966 8.99997 3.5001C9.00233 3.72369 9.03599 3.94585 9.09997 4.1601L5.44497 6.4451C5.12229 6.03889 4.68124 5.74313 4.18295 5.5988C3.68465 5.45447 3.1538 5.46873 2.66398 5.63961C2.17415 5.81048 1.74961 6.1295 1.44921 6.55245C1.14881 6.9754 0.987427 7.48133 0.987427 8.0001C0.987427 8.51888 1.14881 9.0248 1.44921 9.44775C1.74961 9.8707 2.17415 10.1897 2.66398 10.3606C3.1538 10.5315 3.68465 10.5457 4.18295 10.4014C4.68124 10.2571 5.12229 9.96131 5.44497 9.5551L9.09997 11.8401C9.03599 12.0544 9.00233 12.2765 8.99997 12.5001C8.99997 12.9946 9.14659 13.4779 9.4213 13.889C9.696 14.3002 10.0864 14.6206 10.5433 14.8098C11.0001 14.999 11.5027 15.0485 11.9877 14.9521C12.4726 14.8556 12.9181 14.6175 13.2677 14.2679C13.6174 13.9182 13.8555 13.4728 13.9519 12.9878C14.0484 12.5029 13.9989 12.0002 13.8097 11.5434C13.6204 11.0866 13.3 10.6961 12.8889 10.4214C12.4778 10.1467 11.9944 10.0001 11.5 10.0001ZM11.5 2.0001C11.7966 2.0001 12.0867 2.08808 12.3333 2.2529C12.58 2.41772 12.7723 2.65199 12.8858 2.92608C12.9993 3.20017 13.029 3.50177 12.9711 3.79274C12.9133 4.08371 12.7704 4.35098 12.5606 4.56076C12.3509 4.77054 12.0836 4.9134 11.7926 4.97128C11.5016 5.02916 11.2 4.99945 10.9259 4.88592C10.6519 4.77239 10.4176 4.58013 10.2528 4.33346C10.0879 4.08678 9.99997 3.79677 9.99997 3.5001C9.99997 3.10228 10.158 2.72075 10.4393 2.43944C10.7206 2.15814 11.1021 2.0001 11.5 2.0001ZM3.49997 9.5001C3.2033 9.5001 2.91329 9.41213 2.66661 9.24731C2.41994 9.08248 2.22768 8.84822 2.11415 8.57413C2.00062 8.30004 1.97091 7.99844 2.02879 7.70747C2.08667 7.4165 2.22953 7.14922 2.43931 6.93944C2.64909 6.72966 2.91636 6.5868 3.20733 6.52892C3.49831 6.47105 3.79991 6.50075 4.074 6.61428C4.34808 6.72781 4.58235 6.92007 4.74717 7.16675C4.912 7.41342 4.99997 7.70343 4.99997 8.0001C4.99997 8.39793 4.84193 8.77946 4.56063 9.06076C4.27933 9.34207 3.89779 9.5001 3.49997 9.5001ZM11.5 14.0001C11.2033 14.0001 10.9133 13.9121 10.6666 13.7473C10.4199 13.5825 10.2277 13.3482 10.1142 13.0741C10.0006 12.8 9.97091 12.4984 10.0288 12.2075C10.0867 11.9165 10.2295 11.6492 10.4393 11.4394C10.6491 11.2297 10.9164 11.0868 11.2073 11.0289C11.4983 10.971 11.7999 11.0008 12.074 11.1143C12.3481 11.2278 12.5824 11.4201 12.7472 11.6667C12.912 11.9134 13 12.2034 13 12.5001C13 12.8979 12.8419 13.2795 12.5606 13.5608C12.2793 13.8421 11.8978 14.0001 11.5 14.0001Z" })));
|
|
12
|
+
exports.ShareIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
|
|
13
|
+
'data-component-name': 'icons/ShareIcon/ShareIcon',
|
|
14
|
+
})) `
|
|
15
|
+
path {
|
|
16
|
+
fill: ${({ color }) => (0, utils_1.getCssColorVariable)(color)};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
height: ${({ size }) => size || '16px'};
|
|
20
|
+
width: ${({ size }) => size || '16px'};
|
|
21
|
+
`;
|
|
22
|
+
//# sourceMappingURL=ShareIcon.js.map
|
package/lib/index.d.ts
CHANGED
|
@@ -219,6 +219,7 @@ export * from './icons/MarkdownFullIcon/MarkdownFullIcon';
|
|
|
219
219
|
export * from './icons/DocumentBlankIcon/DocumentBlankIcon';
|
|
220
220
|
export * from './icons/WarningSquareIcon/WarningSquareIcon';
|
|
221
221
|
export * from './icons/MenuIcon/MenuIcon';
|
|
222
|
+
export * from './icons/NoteIcon/NoteIcon';
|
|
222
223
|
export * from './icons/GlobalOutlinedIcon/GlobalOutlinedIcon';
|
|
223
224
|
export * from './icons/FaceDissatisfiedIcon/FaceDissatisfiedIcon';
|
|
224
225
|
export * from './icons/FaceNeutralIcon/FaceNeutralIcon';
|
|
@@ -257,6 +258,7 @@ export * from './icons/AiStarsIcon/AiStarsIcon';
|
|
|
257
258
|
export * from './icons/AiStarsGradientIcon/AiStarsGradientIcon';
|
|
258
259
|
export * from './icons/WorkflowHierarchyIcon/WorkflowHierarchyIcon';
|
|
259
260
|
export * from './icons/GenericIcon/GenericIcon';
|
|
261
|
+
export * from './icons/ShareIcon/ShareIcon';
|
|
260
262
|
export * from './layouts/RootLayout';
|
|
261
263
|
export * from './layouts/PageLayout';
|
|
262
264
|
export * from './layouts/NotFound';
|
package/lib/index.js
CHANGED
|
@@ -272,6 +272,7 @@ __exportStar(require("./icons/MarkdownFullIcon/MarkdownFullIcon"), exports);
|
|
|
272
272
|
__exportStar(require("./icons/DocumentBlankIcon/DocumentBlankIcon"), exports);
|
|
273
273
|
__exportStar(require("./icons/WarningSquareIcon/WarningSquareIcon"), exports);
|
|
274
274
|
__exportStar(require("./icons/MenuIcon/MenuIcon"), exports);
|
|
275
|
+
__exportStar(require("./icons/NoteIcon/NoteIcon"), exports);
|
|
275
276
|
__exportStar(require("./icons/GlobalOutlinedIcon/GlobalOutlinedIcon"), exports);
|
|
276
277
|
__exportStar(require("./icons/FaceDissatisfiedIcon/FaceDissatisfiedIcon"), exports);
|
|
277
278
|
__exportStar(require("./icons/FaceNeutralIcon/FaceNeutralIcon"), exports);
|
|
@@ -310,6 +311,7 @@ __exportStar(require("./icons/AiStarsIcon/AiStarsIcon"), exports);
|
|
|
310
311
|
__exportStar(require("./icons/AiStarsGradientIcon/AiStarsGradientIcon"), exports);
|
|
311
312
|
__exportStar(require("./icons/WorkflowHierarchyIcon/WorkflowHierarchyIcon"), exports);
|
|
312
313
|
__exportStar(require("./icons/GenericIcon/GenericIcon"), exports);
|
|
314
|
+
__exportStar(require("./icons/ShareIcon/ShareIcon"), exports);
|
|
313
315
|
/* Layouts */
|
|
314
316
|
__exportStar(require("./layouts/RootLayout"), exports);
|
|
315
317
|
__exportStar(require("./layouts/PageLayout"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.58.0-next.
|
|
3
|
+
"version": "0.58.0-next.6",
|
|
4
4
|
"description": "Shared UI components lib",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
"openapi-sampler": "1.6.1",
|
|
88
88
|
"react-calendar": "5.1.0",
|
|
89
89
|
"react-date-picker": "11.0.0",
|
|
90
|
-
"@redocly/
|
|
91
|
-
"@redocly/
|
|
90
|
+
"@redocly/config": "0.34.0",
|
|
91
|
+
"@redocly/realm-asyncapi-sdk": "0.4.0-next.2"
|
|
92
92
|
},
|
|
93
93
|
"scripts": {
|
|
94
94
|
"watch": "tsc -p tsconfig.build.json && (concurrently \"tsc -w -p tsconfig.build.json\" \"tsc-alias -w -p tsconfig.build.json\")",
|
|
@@ -2,13 +2,16 @@ import React, { JSX } from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { CatalogEntityConfig } from '@redocly/config';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
BffCatalogEntityList,
|
|
7
|
+
CatalogSwitcherItem,
|
|
8
|
+
CatalogViewMode,
|
|
9
|
+
} from '@redocly/theme/core/types';
|
|
6
10
|
import { breakpoints } from '@redocly/theme/core/utils';
|
|
7
11
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
8
12
|
import { H3 } from '@redocly/theme/components/Typography/H3';
|
|
9
13
|
import { FilterContent } from '@redocly/theme/components/Filter/FilterContent';
|
|
10
14
|
import { Sidebar, SidebarHeader } from '@redocly/theme/components/Sidebar/Sidebar';
|
|
11
|
-
import { CatalogSwitcherItem } from '@redocly/theme/core/types/catalog';
|
|
12
15
|
import { CatalogSelector } from '@redocly/theme/components/Catalog/CatalogSelector';
|
|
13
16
|
import { SidebarActions } from '@redocly/theme/components/SidebarActions/SidebarActions';
|
|
14
17
|
import { CounterTag } from '@redocly/theme/components/Tags/CounterTag';
|
|
@@ -22,6 +25,7 @@ export type CatalogProps = {
|
|
|
22
25
|
entitiesTypes: string[];
|
|
23
26
|
initialEntitiesList?: BffCatalogEntityList;
|
|
24
27
|
catalogSwitcherItems: CatalogSwitcherItem[];
|
|
28
|
+
initialViewMode?: CatalogViewMode;
|
|
25
29
|
};
|
|
26
30
|
|
|
27
31
|
const customCatalogOptionsCasing = (str: string): string => {
|
|
@@ -33,13 +37,19 @@ const customCatalogOptionsCasing = (str: string): string => {
|
|
|
33
37
|
if (index === 0 && word.toLowerCase() === 'api') {
|
|
34
38
|
return 'API';
|
|
35
39
|
}
|
|
36
|
-
return word[0].toUpperCase() + word.slice(1)
|
|
40
|
+
return word[0].toUpperCase() + word.slice(1);
|
|
37
41
|
})
|
|
38
42
|
.join(' ');
|
|
39
43
|
};
|
|
40
44
|
|
|
41
45
|
export function Catalog(props: CatalogProps): JSX.Element {
|
|
42
|
-
const {
|
|
46
|
+
const {
|
|
47
|
+
catalogConfig,
|
|
48
|
+
entitiesTypes,
|
|
49
|
+
initialEntitiesList,
|
|
50
|
+
catalogSwitcherItems,
|
|
51
|
+
initialViewMode,
|
|
52
|
+
} = props;
|
|
43
53
|
|
|
44
54
|
const { useTranslate, useCatalog } = useThemeHooks();
|
|
45
55
|
|
|
@@ -62,7 +72,7 @@ export function Catalog(props: CatalogProps): JSX.Element {
|
|
|
62
72
|
onChangeCollapseSidebarClick,
|
|
63
73
|
layout,
|
|
64
74
|
collapsedSidebar,
|
|
65
|
-
} = useCatalog(catalogConfig, initialEntitiesList?.page.total || 0);
|
|
75
|
+
} = useCatalog(catalogConfig, initialEntitiesList?.page.total || 0, initialViewMode);
|
|
66
76
|
|
|
67
77
|
return (
|
|
68
78
|
<>
|
|
@@ -11,7 +11,6 @@ import { ArrowUpRightIcon } from '@redocly/theme/icons/ArrowUpRightIcon/ArrowUpR
|
|
|
11
11
|
import { CatalogTagsWithTooltip } from '@redocly/theme/components/Catalog/CatalogTagsWithTooltip';
|
|
12
12
|
import { CatalogEntityIcon } from '@redocly/theme/components/Catalog/CatalogEntityIcon';
|
|
13
13
|
import { getPathPrefix } from '@redocly/theme/core/utils';
|
|
14
|
-
import { TooltipComponent } from '@redocly/theme/components/Tooltip/Tooltip';
|
|
15
14
|
|
|
16
15
|
export type CatalogCardProps = {
|
|
17
16
|
entity: BffCatalogEntity;
|
|
@@ -35,22 +34,21 @@ export function CatalogCard({ entity, catalogConfig }: CatalogCardProps): JSX.El
|
|
|
35
34
|
>
|
|
36
35
|
<CardContent>
|
|
37
36
|
<CardHeader>
|
|
38
|
-
<
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
</TooltipComponent>
|
|
43
|
-
<CardTitle>
|
|
44
|
-
<CatalogHighlight>{entity.title}</CatalogHighlight>
|
|
45
|
-
</CardTitle>
|
|
37
|
+
<HeaderIconWrapper>
|
|
38
|
+
<CatalogEntityIcon entityType={entity.type} />
|
|
39
|
+
</HeaderIconWrapper>
|
|
40
|
+
<HeaderIconText entityType={entity.type}>{entity.type}</HeaderIconText>
|
|
46
41
|
</CardHeader>
|
|
47
42
|
|
|
48
43
|
<CardDescription>
|
|
44
|
+
<CardTitle>
|
|
45
|
+
<CatalogHighlight>{entity.title}</CatalogHighlight>
|
|
46
|
+
</CardTitle>
|
|
49
47
|
<CatalogHighlight>{entity.summary ?? ''}</CatalogHighlight>
|
|
50
48
|
</CardDescription>
|
|
51
49
|
|
|
52
50
|
<CardMetadataSection>
|
|
53
|
-
<
|
|
51
|
+
<MetadataRow>
|
|
54
52
|
<MetadataLabel>Domains:</MetadataLabel>
|
|
55
53
|
<CatalogTagsWithTooltip
|
|
56
54
|
items={entity.domains?.map((domain) => domain.title) || []}
|
|
@@ -63,9 +61,9 @@ export function CatalogCard({ entity, catalogConfig }: CatalogCardProps): JSX.El
|
|
|
63
61
|
textTransform: 'none',
|
|
64
62
|
}}
|
|
65
63
|
/>
|
|
66
|
-
</
|
|
64
|
+
</MetadataRow>
|
|
67
65
|
|
|
68
|
-
<
|
|
66
|
+
<MetadataRow>
|
|
69
67
|
<MetadataLabel>Owners:</MetadataLabel>
|
|
70
68
|
<CatalogTagsWithTooltip
|
|
71
69
|
items={entity.owners?.map((owner) => owner.key) || []}
|
|
@@ -78,7 +76,7 @@ export function CatalogCard({ entity, catalogConfig }: CatalogCardProps): JSX.El
|
|
|
78
76
|
textTransform: 'none',
|
|
79
77
|
}}
|
|
80
78
|
/>
|
|
81
|
-
</
|
|
79
|
+
</MetadataRow>
|
|
82
80
|
</CardMetadataSection>
|
|
83
81
|
</CardContent>
|
|
84
82
|
|
|
@@ -121,6 +119,10 @@ const HeaderIconWrapper = styled.div`
|
|
|
121
119
|
margin-right: var(--catalog-card-icon-margin-right);
|
|
122
120
|
`;
|
|
123
121
|
|
|
122
|
+
const HeaderIconText = styled.div<{ entityType: string }>`
|
|
123
|
+
color: ${({ entityType }) => `var(--catalog-entity-icon-color-${entityType})`};
|
|
124
|
+
`;
|
|
125
|
+
|
|
124
126
|
const CardHeader = styled.div`
|
|
125
127
|
display: flex;
|
|
126
128
|
align-items: center;
|
|
@@ -130,22 +132,22 @@ const MetadataLabel = styled.div`
|
|
|
130
132
|
font-size: var(--catalog-metadata-label-font-size);
|
|
131
133
|
font-weight: var(--catalog-metadata-label-font-weight);
|
|
132
134
|
color: var(--catalog-metadata-label-color);
|
|
133
|
-
margin-bottom: var(--catalog-metadata-label-margin-bottom);
|
|
134
135
|
`;
|
|
135
136
|
|
|
136
137
|
const CardMetadataSection = styled.div`
|
|
137
138
|
display: flex;
|
|
139
|
+
flex-direction: column;
|
|
138
140
|
justify-content: space-between;
|
|
139
141
|
margin-top: var(--catalog-metadata-section-margin-top);
|
|
140
142
|
gap: var(--catalog-metadata-section-gap);
|
|
141
143
|
width: 100%;
|
|
142
144
|
`;
|
|
143
145
|
|
|
144
|
-
const
|
|
146
|
+
const MetadataRow = styled.div`
|
|
145
147
|
display: flex;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
align-items: center;
|
|
149
|
+
justify-content: space-between;
|
|
150
|
+
gap: var(--catalog-metadata-row-gap);
|
|
149
151
|
`;
|
|
150
152
|
|
|
151
153
|
const ArrowCircle = styled.div`
|
|
@@ -184,7 +186,6 @@ const Divider = styled.div`
|
|
|
184
186
|
`;
|
|
185
187
|
|
|
186
188
|
const CatalogCardWrapper = styled.div`
|
|
187
|
-
height: var(--catalog-card-height);
|
|
188
189
|
color: var(--catalog-card-text-color);
|
|
189
190
|
font-size: var(--catalog-card-font-size);
|
|
190
191
|
font-weight: var(--catalog-card-font-weight);
|
|
@@ -41,7 +41,6 @@ export function CatalogEntityLinks({ entity }: CatalogEntityLinksProps) {
|
|
|
41
41
|
const LinksWrapper = styled.div`
|
|
42
42
|
display: flex;
|
|
43
43
|
flex-direction: column;
|
|
44
|
-
gap: var(--spacing-xs);
|
|
45
44
|
border-radius: var(--border-radius);
|
|
46
45
|
background-color: var(--catalog-metadata-bg-color);
|
|
47
46
|
transition: all 0.2s ease-in-out;
|
|
@@ -81,7 +81,6 @@ const JsonViewerWrapper = styled(JsonViewer)`
|
|
|
81
81
|
const MetadataWrapper = styled.div`
|
|
82
82
|
display: flex;
|
|
83
83
|
flex-direction: column;
|
|
84
|
-
gap: var(--spacing-xs);
|
|
85
84
|
border-radius: var(--border-radius);
|
|
86
85
|
background-color: var(--catalog-metadata-bg-color);
|
|
87
86
|
transition: all 0.2s ease-in-out;
|
|
@@ -45,7 +45,6 @@ const PathLabel = styled.label`
|
|
|
45
45
|
const LinksWrapper = styled.div`
|
|
46
46
|
display: flex;
|
|
47
47
|
flex-direction: column;
|
|
48
|
-
gap: var(--spacing-xs);
|
|
49
48
|
border-radius: var(--border-radius);
|
|
50
49
|
background-color: var(--catalog-metadata-bg-color);
|
|
51
50
|
transition: all 0.2s ease-in-out;
|
|
@@ -1,37 +1,65 @@
|
|
|
1
1
|
import React, { JSX } from 'react';
|
|
2
|
+
import { UiAccessibleConfig } from '@redocly/config';
|
|
2
3
|
|
|
3
4
|
import { EntityType } from '@redocly/theme/core/types';
|
|
4
5
|
import { CodeIcon } from '@redocly/theme/icons/CodeIcon/CodeIcon';
|
|
5
6
|
import { GraphIcon } from '@redocly/theme/icons/GraphIcon/GraphIcon';
|
|
6
7
|
import { PeopleIcon } from '@redocly/theme/icons/PeopleIcon/PeopleIcon';
|
|
7
8
|
import { UserIcon } from '@redocly/theme/icons/UserIcon/UserIcon';
|
|
8
|
-
import { NetworkIcon } from '@redocly/theme/icons/NetworkIcon/NetworkIcon';
|
|
9
9
|
import { MoleculesIcon } from '@redocly/theme/icons/MoleculesIcon/MoleculesIcon';
|
|
10
|
+
import { HierarchyIcon } from '@redocly/theme/icons/HierarchyIcon/HierarchyIcon';
|
|
11
|
+
import { Image } from '@redocly/theme/components/Image/Image';
|
|
12
|
+
import { PREDEFINED_ENTITY_TYPES, useThemeConfig } from '@redocly/theme/core';
|
|
13
|
+
import { NoteIcon } from '@redocly/theme/icons/NoteIcon/NoteIcon';
|
|
10
14
|
|
|
11
15
|
export type CatalogEntityIconProps = {
|
|
12
16
|
entityType: string;
|
|
13
17
|
defaultColor?: boolean;
|
|
14
18
|
forceColor?: string;
|
|
19
|
+
entitiesCatalogConfig?: UiAccessibleConfig['entitiesCatalog'];
|
|
15
20
|
};
|
|
16
21
|
|
|
17
22
|
const getIconColor = (entityType: EntityType) => `var(--catalog-entity-icon-color-${entityType})`;
|
|
18
23
|
|
|
19
|
-
const getEntityIcon = ({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
const getEntityIcon = ({
|
|
25
|
+
entityType,
|
|
26
|
+
defaultColor,
|
|
27
|
+
forceColor,
|
|
28
|
+
entitiesCatalogConfig,
|
|
29
|
+
}: CatalogEntityIconProps) => {
|
|
30
|
+
if (PREDEFINED_ENTITY_TYPES.includes(entityType)) {
|
|
31
|
+
const iconColor =
|
|
32
|
+
forceColor ??
|
|
33
|
+
(defaultColor ? `var(--catalog-entity-icon-color)` : getIconColor(entityType as EntityType));
|
|
34
|
+
|
|
35
|
+
const entityIconMap: Record<EntityType, JSX.Element> = {
|
|
36
|
+
service: <CodeIcon color={iconColor} />,
|
|
37
|
+
domain: <GraphIcon color={iconColor} />,
|
|
38
|
+
team: <PeopleIcon color={iconColor} />,
|
|
39
|
+
user: <UserIcon color={iconColor} />,
|
|
40
|
+
'api-description': <NoteIcon color={iconColor} />,
|
|
41
|
+
'data-schema': <HierarchyIcon color={iconColor} />,
|
|
42
|
+
'api-operation': <MoleculesIcon color={iconColor} />,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return entityIconMap[entityType as EntityType];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const iconConfig = entitiesCatalogConfig?.entityTypes?.[entityType]?.icon;
|
|
49
|
+
|
|
50
|
+
if (iconConfig?.src || iconConfig?.srcSet) {
|
|
51
|
+
return (
|
|
52
|
+
<Image
|
|
53
|
+
src={iconConfig?.src}
|
|
54
|
+
srcSet={iconConfig?.srcSet}
|
|
55
|
+
alt={`${entityType} icon`}
|
|
56
|
+
width="16"
|
|
57
|
+
height="16"
|
|
58
|
+
/>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return <CodeIcon color="var(--catalog-entity-icon-color)" />; // @TODO: add default icon
|
|
35
63
|
};
|
|
36
64
|
|
|
37
65
|
export function CatalogEntityIcon({
|
|
@@ -39,7 +67,14 @@ export function CatalogEntityIcon({
|
|
|
39
67
|
defaultColor = false,
|
|
40
68
|
forceColor,
|
|
41
69
|
}: CatalogEntityIconProps): JSX.Element {
|
|
42
|
-
const
|
|
70
|
+
const themeConfig = useThemeConfig();
|
|
71
|
+
|
|
72
|
+
const icon = getEntityIcon({
|
|
73
|
+
entityType,
|
|
74
|
+
defaultColor,
|
|
75
|
+
forceColor,
|
|
76
|
+
entitiesCatalogConfig: themeConfig.entitiesCatalog,
|
|
77
|
+
});
|
|
43
78
|
|
|
44
79
|
if (!icon) {
|
|
45
80
|
throw new Error(`Unhandled entity type: ${entityType}`);
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import { CatalogEntityIcon } from '@redocly/theme/components/Catalog/CatalogEntityIcon';
|
|
5
|
+
import { PREDEFINED_ENTITY_TYPES } from '@redocly/theme/core';
|
|
5
6
|
|
|
6
7
|
export type CatalogEntityTypeIconProps = {
|
|
7
8
|
entityType: string;
|
|
@@ -30,14 +31,24 @@ const IconContainer = styled.div<{ entityType: string; defaultColor: boolean }>`
|
|
|
30
31
|
width: var(--catalog-table-icon-width);
|
|
31
32
|
height: var(--catalog-table-icon-height);
|
|
32
33
|
border-radius: var(--catalog-table-icon-border-radius);
|
|
33
|
-
background-color: ${({ defaultColor, entityType }) =>
|
|
34
|
-
defaultColor
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
background-color: ${({ defaultColor, entityType }) => {
|
|
35
|
+
if (defaultColor) {
|
|
36
|
+
return 'var(--catalog-entity-bg-color)';
|
|
37
|
+
}
|
|
38
|
+
if (PREDEFINED_ENTITY_TYPES.includes(entityType)) {
|
|
39
|
+
return `var(--catalog-entity-bg-color-${entityType})`;
|
|
40
|
+
}
|
|
41
|
+
return 'var(--catalog-entity-bg-color-custom)';
|
|
42
|
+
}};
|
|
37
43
|
flex-shrink: 0;
|
|
38
44
|
border: 1px solid
|
|
39
|
-
${({ defaultColor, entityType }) =>
|
|
40
|
-
defaultColor
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
${({ defaultColor, entityType }) => {
|
|
46
|
+
if (defaultColor) {
|
|
47
|
+
return 'var(--catalog-entity-border-color)';
|
|
48
|
+
}
|
|
49
|
+
if (PREDEFINED_ENTITY_TYPES.includes(entityType)) {
|
|
50
|
+
return `var(--catalog-entity-border-color-${entityType})`;
|
|
51
|
+
}
|
|
52
|
+
return 'var(--catalog-entity-border-color-custom)';
|
|
53
|
+
}};
|
|
43
54
|
`;
|
|
@@ -4,6 +4,7 @@ import styled from 'styled-components';
|
|
|
4
4
|
import { EntityType } from '@redocly/theme/core/types';
|
|
5
5
|
import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
6
6
|
import { CatalogHighlight } from '@redocly/theme/components/Catalog/CatalogHighlight';
|
|
7
|
+
import { PREDEFINED_ENTITY_TYPES } from '@redocly/theme/core';
|
|
7
8
|
|
|
8
9
|
export type CatalogEntityTypeTagProps = {
|
|
9
10
|
entityType: string;
|
|
@@ -43,7 +44,14 @@ export function CatalogEntityTypeTag({ entityType }: CatalogEntityTypeTagProps):
|
|
|
43
44
|
const EntityTypeTagWrapper = styled(Tag)<{ entityType: EntityType }>`
|
|
44
45
|
font-size: var(--font-size-base);
|
|
45
46
|
background-color: transparent;
|
|
46
|
-
text-transform:
|
|
47
|
-
border: 1px solid
|
|
48
|
-
|
|
47
|
+
text-transform: none;
|
|
48
|
+
border: 1px solid
|
|
49
|
+
${({ entityType }) =>
|
|
50
|
+
!PREDEFINED_ENTITY_TYPES.includes(entityType)
|
|
51
|
+
? 'var(--catalog-entity-border-color-custom)'
|
|
52
|
+
: `var(--catalog-entity-border-color-${entityType})`};
|
|
53
|
+
color: ${({ entityType }) =>
|
|
54
|
+
!PREDEFINED_ENTITY_TYPES.includes(entityType)
|
|
55
|
+
? 'var(--catalog-entity-icon-color-custom)'
|
|
56
|
+
: `var(--catalog-entity-icon-color-${entityType})`};
|
|
49
57
|
`;
|
|
@@ -3,7 +3,7 @@ import styled from 'styled-components';
|
|
|
3
3
|
import { useNavigate } from 'react-router-dom';
|
|
4
4
|
|
|
5
5
|
import { Select } from '@redocly/theme/components/Select/Select';
|
|
6
|
-
import { CatalogSwitcherItem, SortOption } from '@redocly/theme/core/types
|
|
6
|
+
import { CatalogSwitcherItem, SortOption } from '@redocly/theme/core/types';
|
|
7
7
|
import { getPathPrefix } from '@redocly/theme/core/utils';
|
|
8
8
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
9
9
|
import { ChevronDownIcon } from '@redocly/theme/icons/ChevronDownIcon/ChevronDownIcon';
|
|
@@ -13,7 +13,7 @@ export type CatalogEntityCellProps<T extends Entity> = {
|
|
|
13
13
|
export function CatalogEntityCell<T extends Entity>({ entity }: CatalogEntityCellProps<T>) {
|
|
14
14
|
return (
|
|
15
15
|
<EntityTitleCellWrapper data-component-name="Catalog/CatalogTableView/CatalogEntityCell">
|
|
16
|
-
<CatalogEntityTypeIcon entityType={entity.type}
|
|
16
|
+
<CatalogEntityTypeIcon entityType={entity.type} />
|
|
17
17
|
<EntityTitleContent>
|
|
18
18
|
<EntityTitle data-component-name="Catalog/CatalogTableView/CatalogEntityTitle">
|
|
19
19
|
<CatalogHighlight>{entity.title}</CatalogHighlight>
|
|
@@ -3,7 +3,7 @@ import styled from 'styled-components';
|
|
|
3
3
|
|
|
4
4
|
import { TableIcon } from '@redocly/theme/icons/TableIcon/TableIcon';
|
|
5
5
|
import { CardsIcon } from '@redocly/theme/icons/CardsIcon/CardsIcon';
|
|
6
|
-
import { CatalogViewMode } from '@redocly/theme/core/types
|
|
6
|
+
import { CatalogViewMode } from '@redocly/theme/core/types';
|
|
7
7
|
|
|
8
8
|
function useViewMode(initialViewMode: CatalogViewMode) {
|
|
9
9
|
const [viewMode, setViewMode] = useState<CatalogViewMode | null>(null);
|