@redocly/theme 0.69.0 → 0.70.0-next.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/lib/components/Button/Button.js +5 -2
- package/lib/components/Button/variables.js +14 -5
- package/lib/components/Buttons/DownloadButton.js +13 -3
- package/lib/components/Catalog/Catalog.d.ts +2 -2
- package/lib/components/Catalog/CatalogActionsRow.d.ts +3 -2
- package/lib/components/Catalog/CatalogCardView/CatalogCard.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntities.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntitiesEmptyState.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.js +1 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.d.ts +3 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.js +45 -23
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js +67 -33
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityRevisionItem.d.ts +3 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityRevisionItem.js +15 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.d.ts +3 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.js +48 -57
- package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +1 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +2 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +3 -4
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.d.ts +3 -4
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +1 -2
- package/lib/components/Catalog/CatalogEntityIcon.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntityTypeTag.d.ts +2 -2
- package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.d.ts +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.js +1 -2
- package/lib/components/Catalog/CatalogHighlight.d.ts +2 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.d.ts +2 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.d.ts +1 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.d.ts +2 -1
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.d.ts +2 -2
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.d.ts +2 -2
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.d.ts +1 -1
- package/lib/components/Catalog/CatalogSelector.d.ts +3 -2
- package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.d.ts +1 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +1 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +2 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.d.ts +2 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.d.ts +1 -1
- package/lib/components/Catalog/CatalogTags.d.ts +2 -2
- package/lib/components/Catalog/CatalogViewModeToggle.d.ts +1 -1
- package/lib/components/Catalog/variables.js +24 -33
- package/lib/components/CatalogClassic/CatalogClassicInfoBlock.d.ts +1 -1
- package/lib/components/CatalogClassic/CatalogClassicInfoBlock.js +1 -2
- package/lib/components/CatalogClassic/CatalogClassicVirtualizedGroups.d.ts +1 -1
- package/lib/components/CodeBlock/CodeBlockControls.d.ts +1 -1
- package/lib/components/Dropdown/Dropdown.js +7 -8
- package/lib/components/Filter/FilterOptionLabel.d.ts +1 -1
- package/lib/components/LoadMore/LoadMore.d.ts +1 -1
- package/lib/components/MCP/McpConnectionTabs.js +2 -2
- package/lib/components/PageActions/PageActions.d.ts +1 -1
- package/lib/components/ReplaySecuritySchemeActions/ReplaySecuritySchemeActions.d.ts +11 -0
- package/lib/components/ReplaySecuritySchemeActions/ReplaySecuritySchemeActions.js +7 -0
- package/lib/components/Search/SearchAiDialog.d.ts +1 -1
- package/lib/components/Search/SearchAiMessage.d.ts +1 -2
- package/lib/components/Search/SearchAiMessage.js +8 -10
- package/lib/components/Search/SearchAiResponse.d.ts +1 -1
- package/lib/components/Search/SearchGroups.d.ts +1 -1
- package/lib/components/SplitButton/SplitButton.d.ts +1 -0
- package/lib/components/SplitButton/SplitButton.js +2 -2
- package/lib/components/Tooltip/AnchorTooltip.js +17 -27
- package/lib/components/Tooltip/JsTooltip.js +34 -46
- package/lib/components/Tooltip/Tooltip.js +1 -2
- package/lib/core/constants/markdown.d.ts +2 -0
- package/lib/core/constants/markdown.js +3 -1
- package/lib/core/hooks/catalog/use-catalog-entity-schema.d.ts +1 -1
- package/lib/core/hooks/catalog/use-catalog-entity-schema.js +2 -2
- package/lib/core/hooks/catalog/use-catalog-table-header-cell-actions.d.ts +1 -1
- package/lib/core/hooks/catalog/use-graph.d.ts +3 -3
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-controls.js +1 -1
- package/lib/core/hooks/index.d.ts +1 -0
- package/lib/core/hooks/index.js +1 -0
- package/lib/core/hooks/menu/use-nested-menu.js +2 -2
- package/lib/core/hooks/use-active-section-id.js +6 -0
- package/lib/core/hooks/use-anchor-positioning.d.ts +3 -0
- package/lib/core/hooks/use-anchor-positioning.js +21 -0
- package/lib/core/hooks/use-element-size.d.ts +1 -1
- package/lib/core/hooks/use-theme-hooks.js +0 -1
- package/lib/core/types/catalog.d.ts +2 -3
- package/lib/core/types/common.d.ts +1 -1
- package/lib/core/types/hooks.d.ts +4 -10
- package/lib/core/utils/load-and-navigate.js +3 -3
- package/lib/core/utils/mcp.d.ts +0 -1
- package/lib/core/utils/mcp.js +0 -13
- package/lib/core/utils/menu.d.ts +2 -2
- package/lib/core/utils/urls.js +1 -3
- package/lib/ext/use-configure-replay.d.ts +1 -1
- package/lib/layouts/OIDCForbidden.js +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodePanelPreview.d.ts +1 -2
- package/lib/markdoc/components/Diagram/Diagram.d.ts +1 -1
- package/lib/markdoc/components/Diagram/Diagram.js +1 -2
- package/lib/markdoc/components/Tabs/Tab.d.ts +1 -1
- package/lib/markdoc/components/Tabs/TabList.d.ts +1 -1
- package/lib/markdoc/tags/code-walkthrough.d.ts +1 -1
- package/lib/markdoc/tags/markdoc-example.js +34 -22
- package/package.json +4 -4
- package/src/components/Button/Button.tsx +5 -2
- package/src/components/Button/variables.ts +14 -5
- package/src/components/Buttons/DownloadButton.tsx +16 -8
- package/src/components/Catalog/Catalog.tsx +4 -4
- package/src/components/Catalog/CatalogActionsRow.tsx +3 -2
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +3 -2
- package/src/components/Catalog/CatalogEntities.tsx +3 -2
- package/src/components/Catalog/CatalogEntitiesEmptyState.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +6 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.tsx +4 -5
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.tsx +56 -35
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx +80 -42
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityRevisionItem.tsx +18 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.tsx +61 -75
- package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityLinks.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +3 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +7 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +7 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.tsx +3 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +1 -2
- package/src/components/Catalog/CatalogEntityIcon.tsx +3 -2
- package/src/components/Catalog/CatalogEntityTypeTag.tsx +3 -2
- package/src/components/Catalog/CatalogFilter/CatalogFilterContent.tsx +2 -4
- package/src/components/Catalog/CatalogHighlight.tsx +2 -1
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.tsx +2 -1
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.tsx +2 -1
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.tsx +2 -1
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.tsx +3 -2
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.tsx +3 -2
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.tsx +2 -1
- package/src/components/Catalog/CatalogSelector.tsx +3 -2
- package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +1 -1
- package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +1 -1
- package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +2 -1
- package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +2 -1
- package/src/components/Catalog/CatalogTableView/CatalogTagsCell.tsx +1 -1
- package/src/components/Catalog/CatalogTags.tsx +4 -2
- package/src/components/Catalog/CatalogViewModeToggle.tsx +1 -1
- package/src/components/Catalog/variables.ts +24 -33
- package/src/components/CatalogClassic/CatalogClassicInfoBlock.tsx +2 -5
- package/src/components/CatalogClassic/CatalogClassicVirtualizedGroups.tsx +1 -1
- package/src/components/CodeBlock/CodeBlockControls.tsx +2 -1
- package/src/components/Dropdown/Dropdown.tsx +5 -8
- package/src/components/Filter/FilterOptionLabel.tsx +1 -1
- package/src/components/LoadMore/LoadMore.tsx +2 -1
- package/src/components/MCP/McpConnectionTabs.tsx +3 -4
- package/src/components/PageActions/PageActions.tsx +2 -1
- package/src/components/ReplaySecuritySchemeActions/ReplaySecuritySchemeActions.tsx +19 -0
- package/src/components/Search/SearchAiDialog.tsx +1 -1
- package/src/components/Search/SearchAiMessage.tsx +3 -6
- package/src/components/Search/SearchAiResponse.tsx +2 -4
- package/src/components/Search/SearchGroups.tsx +1 -5
- package/src/components/SplitButton/SplitButton.tsx +3 -0
- package/src/components/Tooltip/AnchorTooltip.tsx +17 -27
- package/src/components/Tooltip/JsTooltip.tsx +55 -62
- package/src/components/Tooltip/Tooltip.tsx +1 -2
- package/src/core/constants/markdown.ts +4 -0
- package/src/core/hooks/__mocks__/index.ts +1 -0
- package/src/core/hooks/__mocks__/use-anchor-positioning.ts +3 -0
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +0 -3
- package/src/core/hooks/catalog/use-catalog-entity-schema.ts +3 -3
- package/src/core/hooks/catalog/use-catalog-table-header-cell-actions.ts +1 -1
- package/src/core/hooks/catalog/use-graph.ts +4 -4
- package/src/core/hooks/code-walkthrough/__mocks__/MockIntersectionObserver.ts +1 -1
- package/src/core/hooks/code-walkthrough/__mocks__/mock-intersection-observer.ts +1 -1
- package/src/core/hooks/code-walkthrough/use-code-walkthrough-controls.ts +1 -1
- package/src/core/hooks/index.ts +1 -0
- package/src/core/hooks/menu/__mocks__/use-mobile-menu-items.ts +1 -1
- package/src/core/hooks/menu/use-nested-menu.ts +2 -2
- package/src/core/hooks/use-active-section-id.ts +8 -0
- package/src/core/hooks/use-anchor-positioning.ts +22 -0
- package/src/core/hooks/use-element-size.ts +2 -1
- package/src/core/hooks/use-theme-hooks.ts +0 -1
- package/src/core/types/catalog.ts +7 -3
- package/src/core/types/common.ts +1 -1
- package/src/core/types/hooks.ts +15 -14
- package/src/core/utils/load-and-navigate.ts +3 -3
- package/src/core/utils/mcp.ts +0 -17
- package/src/core/utils/menu.ts +2 -2
- package/src/core/utils/urls.ts +1 -3
- package/src/ext/use-configure-replay.ts +3 -3
- package/src/layouts/OIDCForbidden.tsx +1 -1
- package/src/markdoc/components/CodeWalkthrough/CodePanelPreview.tsx +2 -2
- package/src/markdoc/components/CodeWalkthrough/CodeWalkthrough.tsx +2 -4
- package/src/markdoc/components/Diagram/Diagram.tsx +2 -5
- package/src/markdoc/components/Tabs/Tab.tsx +1 -1
- package/src/markdoc/components/Tabs/TabList.tsx +1 -1
- package/src/markdoc/tags/code-walkthrough.ts +2 -1
- package/src/markdoc/tags/markdoc-example.ts +45 -28
package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.tsx
CHANGED
|
@@ -5,10 +5,9 @@ import type { CatalogEntityVersionHistoryGroup } from '@redocly/theme/core/types
|
|
|
5
5
|
|
|
6
6
|
import { ChevronDownIcon } from '@redocly/theme/icons/ChevronDownIcon/ChevronDownIcon';
|
|
7
7
|
import { ChevronRightIcon } from '@redocly/theme/icons/ChevronRightIcon/ChevronRightIcon';
|
|
8
|
-
import {
|
|
8
|
+
import { RadioCheckButtonIcon } from '@redocly/theme/icons/RadioCheckButtonIcon/RadioCheckButtonIcon';
|
|
9
9
|
import { NavaidMilitaryIcon } from '@redocly/theme/icons/NavaidMilitaryIcon/NavaidMilitaryIcon';
|
|
10
10
|
import { Link } from '@redocly/theme/components/Link/Link';
|
|
11
|
-
import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
12
11
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
13
12
|
import { ShowMoreButton } from '@redocly/theme/components/Catalog/CatalogEntity/ShowMoreButton';
|
|
14
13
|
import { CatalogEntityRevisionItem } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityRevisionItem';
|
|
@@ -23,6 +22,8 @@ export type CatalogEntityVersionItemProps = {
|
|
|
23
22
|
basePath: string;
|
|
24
23
|
isExpanded: boolean;
|
|
25
24
|
onToggle: (version: string) => void;
|
|
25
|
+
/** This version's own page URL (from the host's usePageVersions). */
|
|
26
|
+
versionLink?: string;
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
export function CatalogEntityVersionItem({
|
|
@@ -30,13 +31,16 @@ export function CatalogEntityVersionItem({
|
|
|
30
31
|
basePath,
|
|
31
32
|
isExpanded,
|
|
32
33
|
onToggle,
|
|
34
|
+
versionLink,
|
|
33
35
|
}: CatalogEntityVersionItemProps): React.ReactElement {
|
|
34
36
|
const { useTranslate } = useThemeHooks();
|
|
35
37
|
const { translate } = useTranslate();
|
|
36
38
|
const [showAllRevisions, setShowAllRevisions] = useState(false);
|
|
37
39
|
|
|
38
40
|
const revisions = group.revisions || [];
|
|
39
|
-
|
|
41
|
+
// A version with one revision links straight to its page instead of
|
|
42
|
+
// expanding.
|
|
43
|
+
const hasExpandableRevisions = revisions.length > 1;
|
|
40
44
|
const hasMoreThanMax = revisions.length > MAX_INITIAL_REVISIONS;
|
|
41
45
|
const hasMoreThanLimit = revisions.length > MAX_REVISIONS;
|
|
42
46
|
const displayedRevisions = showAllRevisions
|
|
@@ -51,55 +55,43 @@ export function CatalogEntityVersionItem({
|
|
|
51
55
|
|
|
52
56
|
const isNotSpecifiedVersion = group.version === VERSION_NOT_SPECIFIED;
|
|
53
57
|
|
|
54
|
-
|
|
58
|
+
// Hosts without page-version links (catalog entities) keep the legacy
|
|
59
|
+
// ?revision=&version= contract.
|
|
60
|
+
const versionRowLink = hasExpandableRevisions
|
|
61
|
+
? undefined
|
|
62
|
+
: (versionLink ?? buildRevisionUrl(basePath, group.singleRevisionDate, group.version));
|
|
55
63
|
|
|
56
|
-
const
|
|
57
|
-
?
|
|
58
|
-
:
|
|
64
|
+
const versionName = isNotSpecifiedVersion
|
|
65
|
+
? translate('catalog.history.version.notSpecified', 'not specified')
|
|
66
|
+
: group.version;
|
|
67
|
+
const latestWord = translate('catalog.history.version.latest', 'latest');
|
|
68
|
+
// A version named "latest" already says it: no "(latest)" suffix.
|
|
69
|
+
const latestSuffix =
|
|
70
|
+
group.isDefaultVersion && versionName.toLowerCase() !== latestWord.toLowerCase()
|
|
71
|
+
? ` (${latestWord})`
|
|
72
|
+
: '';
|
|
73
|
+
const versionTitle = `${translate('catalog.history.version.label', 'Version')}:\u00a0${versionName}${latestSuffix}`;
|
|
59
74
|
|
|
60
75
|
const versionButton = (
|
|
61
76
|
<VersionButton
|
|
62
77
|
type="button"
|
|
63
|
-
onClick={() =>
|
|
78
|
+
onClick={() => hasExpandableRevisions && onToggle(group.version)}
|
|
64
79
|
$isCurrent={group.isCurrent}
|
|
65
80
|
>
|
|
66
81
|
<VersionIcon $isCurrent={group.isCurrent}>
|
|
67
82
|
{group.isCurrent ? (
|
|
68
|
-
<
|
|
69
|
-
size="16px"
|
|
70
|
-
color="--catalog-history-sidebar-version-icon-color-current"
|
|
71
|
-
/>
|
|
83
|
+
<CurrentVersionIcon />
|
|
72
84
|
) : (
|
|
73
|
-
<NavaidMilitaryIcon size="
|
|
85
|
+
<NavaidMilitaryIcon size="14px" color="--catalog-history-sidebar-version-icon-color" />
|
|
74
86
|
)}
|
|
75
87
|
</VersionIcon>
|
|
76
|
-
<
|
|
77
|
-
|
|
78
|
-
<VersionTitle>{versionTitle}</VersionTitle>
|
|
79
|
-
{group.isDefaultVersion && (
|
|
80
|
-
<Tag
|
|
81
|
-
color="grey"
|
|
82
|
-
borderless
|
|
83
|
-
textTransform="lowercase"
|
|
84
|
-
style={{
|
|
85
|
-
fontSize: 'var(--font-size-xs)',
|
|
86
|
-
borderRadius: 'var(--catalog-history-sidebar-version-tag-border-radius)',
|
|
87
|
-
flexShrink: 0,
|
|
88
|
-
marginLeft: 'var(--spacing-xxs)',
|
|
89
|
-
}}
|
|
90
|
-
>
|
|
91
|
-
{translate('catalog.history.version.default', 'default')}
|
|
92
|
-
</Tag>
|
|
93
|
-
)}
|
|
94
|
-
</VersionTitleRow>
|
|
95
|
-
{!isNotSpecifiedVersion && <VersionDate>{group.date}</VersionDate>}
|
|
96
|
-
</VersionInfo>
|
|
97
|
-
{hasRevisions && (
|
|
88
|
+
<VersionTitle>{versionTitle}</VersionTitle>
|
|
89
|
+
{hasExpandableRevisions && (
|
|
98
90
|
<ChevronIcon>
|
|
99
91
|
{isExpanded ? (
|
|
100
|
-
<ChevronDownIcon size="
|
|
92
|
+
<ChevronDownIcon size="12px" color="--catalog-history-sidebar-chevron-icon-color" />
|
|
101
93
|
) : (
|
|
102
|
-
<ChevronRightIcon size="
|
|
94
|
+
<ChevronRightIcon size="12px" color="--catalog-history-sidebar-chevron-icon-color" />
|
|
103
95
|
)}
|
|
104
96
|
</ChevronIcon>
|
|
105
97
|
)}
|
|
@@ -108,9 +100,13 @@ export function CatalogEntityVersionItem({
|
|
|
108
100
|
|
|
109
101
|
return (
|
|
110
102
|
<li>
|
|
111
|
-
{
|
|
103
|
+
{versionRowLink ? (
|
|
104
|
+
<VersionLinkWrapper to={versionRowLink}>{versionButton}</VersionLinkWrapper>
|
|
105
|
+
) : (
|
|
106
|
+
versionButton
|
|
107
|
+
)}
|
|
112
108
|
|
|
113
|
-
{
|
|
109
|
+
{hasExpandableRevisions && isExpanded && (
|
|
114
110
|
<RevisionsList>
|
|
115
111
|
{displayedRevisions.map((revisionItem) => (
|
|
116
112
|
<CatalogEntityRevisionItem
|
|
@@ -118,6 +114,7 @@ export function CatalogEntityVersionItem({
|
|
|
118
114
|
revisionItem={revisionItem}
|
|
119
115
|
basePath={basePath}
|
|
120
116
|
version={group.version}
|
|
117
|
+
versionLink={versionLink}
|
|
121
118
|
/>
|
|
122
119
|
))}
|
|
123
120
|
{hasMoreThanLimit && showAllRevisions && (
|
|
@@ -150,32 +147,41 @@ export function CatalogEntityVersionItem({
|
|
|
150
147
|
);
|
|
151
148
|
}
|
|
152
149
|
|
|
150
|
+
const VersionLinkWrapper = styled(Link)`
|
|
151
|
+
display: block;
|
|
152
|
+
color: inherit;
|
|
153
|
+
|
|
154
|
+
&,
|
|
155
|
+
&:hover,
|
|
156
|
+
&:focus,
|
|
157
|
+
&:visited {
|
|
158
|
+
text-decoration: none;
|
|
159
|
+
}
|
|
160
|
+
`;
|
|
161
|
+
|
|
153
162
|
const VersionButton = styled.button<{
|
|
154
163
|
$isCurrent?: boolean;
|
|
155
164
|
}>`
|
|
156
165
|
all: unset;
|
|
166
|
+
box-sizing: border-box;
|
|
157
167
|
display: flex;
|
|
158
168
|
align-items: center;
|
|
159
|
-
width:
|
|
169
|
+
width: 100%;
|
|
160
170
|
padding: var(--catalog-history-sidebar-version-header-padding);
|
|
161
171
|
cursor: pointer;
|
|
162
172
|
border-radius: var(--catalog-history-sidebar-version-header-border-radius);
|
|
163
173
|
transition: 0.2s ease;
|
|
164
174
|
text-decoration: none;
|
|
165
175
|
color: inherit;
|
|
166
|
-
background-color:
|
|
176
|
+
background-color: ${({ $isCurrent }) =>
|
|
177
|
+
$isCurrent ? 'var(--catalog-history-sidebar-version-header-bg-color-current)' : 'transparent'};
|
|
167
178
|
|
|
168
179
|
&:hover {
|
|
169
|
-
background-color:
|
|
180
|
+
background-color: ${({ $isCurrent }) =>
|
|
181
|
+
$isCurrent
|
|
182
|
+
? 'var(--catalog-history-sidebar-version-header-bg-color-current)'
|
|
183
|
+
: 'var(--catalog-history-sidebar-version-header-bg-color-hover)'};
|
|
170
184
|
}
|
|
171
|
-
|
|
172
|
-
${({ $isCurrent }) =>
|
|
173
|
-
!$isCurrent &&
|
|
174
|
-
`
|
|
175
|
-
&:hover ${VersionIcon} {
|
|
176
|
-
background-color: var(--color-static-white);
|
|
177
|
-
}
|
|
178
|
-
`}
|
|
179
185
|
`;
|
|
180
186
|
|
|
181
187
|
const VersionIcon = styled.div<{ $isCurrent?: boolean }>`
|
|
@@ -190,25 +196,13 @@ const VersionIcon = styled.div<{ $isCurrent?: boolean }>`
|
|
|
190
196
|
$isCurrent
|
|
191
197
|
? 'var(--color-primary-base, var(--color-blueberry-6))'
|
|
192
198
|
: 'var(--catalog-avatar-bg-color)'};
|
|
193
|
-
transition: background-color 0.2s ease;
|
|
194
199
|
margin-right: var(--catalog-history-sidebar-version-icon-margin-right);
|
|
195
|
-
|
|
196
|
-
svg path {
|
|
197
|
-
transition: fill 0.2s ease;
|
|
198
|
-
}
|
|
199
|
-
`;
|
|
200
|
-
|
|
201
|
-
const VersionInfo = styled.div`
|
|
202
|
-
display: flex;
|
|
203
|
-
flex-direction: column;
|
|
204
|
-
align-items: flex-start;
|
|
205
|
-
gap: var(--catalog-history-sidebar-version-info-gap);
|
|
206
200
|
`;
|
|
207
201
|
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
202
|
+
const CurrentVersionIcon = styled(RadioCheckButtonIcon)`
|
|
203
|
+
width: 14px;
|
|
204
|
+
height: 14px;
|
|
205
|
+
color: var(--catalog-history-sidebar-version-icon-color-current);
|
|
212
206
|
`;
|
|
213
207
|
|
|
214
208
|
const VersionTitle = styled.span`
|
|
@@ -223,14 +217,6 @@ const VersionTitle = styled.span`
|
|
|
223
217
|
word-break: break-word;
|
|
224
218
|
`;
|
|
225
219
|
|
|
226
|
-
const VersionDate = styled.span`
|
|
227
|
-
font-family: var(--catalog-history-sidebar-version-date-font-family);
|
|
228
|
-
font-size: var(--catalog-history-sidebar-version-date-font-size);
|
|
229
|
-
font-weight: var(--catalog-history-sidebar-version-date-font-weight);
|
|
230
|
-
line-height: var(--catalog-history-sidebar-version-date-line-height);
|
|
231
|
-
color: var(--catalog-history-sidebar-version-date-color);
|
|
232
|
-
`;
|
|
233
|
-
|
|
234
220
|
const ChevronIcon = styled.div`
|
|
235
221
|
display: flex;
|
|
236
222
|
align-items: center;
|
|
@@ -250,7 +236,7 @@ const RevisionsList = styled.ul`
|
|
|
250
236
|
&::before {
|
|
251
237
|
content: '';
|
|
252
238
|
position: absolute;
|
|
253
|
-
left:
|
|
239
|
+
left: var(--catalog-history-sidebar-revision-line-left);
|
|
254
240
|
top: 0;
|
|
255
241
|
bottom: var(--catalog-history-sidebar-revisions-padding-bottom);
|
|
256
242
|
width: 1px;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
|
+
import type { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
5
5
|
import { LaunchIcon } from '@redocly/theme/icons/LaunchIcon/LaunchIcon';
|
|
6
6
|
import { LinkIcon } from '@redocly/theme/icons/LinkIcon/LinkIcon';
|
|
7
7
|
import { CatalogEntityInfoBar } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityInfoBar';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
|
+
import type { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
5
5
|
import { JsonViewer } from '@redocly/theme/components/JsonViewer/JsonViewer';
|
|
6
6
|
import { capitalize, isPlainObject } from '@redocly/theme/core/utils';
|
|
7
7
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
|
+
import type { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
5
5
|
import { CatalogEntityInfoBar } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityInfoBar';
|
|
6
6
|
import { HttpTag } from '@redocly/theme/components/Tags/HttpTag';
|
|
7
7
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
|
|
4
|
-
import { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
5
|
+
import type { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
5
6
|
import { EntityTypeProperty } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty';
|
|
6
7
|
import { GitProperty } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty';
|
|
7
8
|
import { TagsProperty } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
|
|
3
|
-
import { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
|
+
import type { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
5
|
import { SlackIcon } from '@redocly/theme/icons/SlackIcon/SlackIcon';
|
|
5
6
|
import { CatalogEntityPropertyCard } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard';
|
|
6
7
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
|
|
3
|
-
import { BffCatalogEntity, CatalogEntityPageProps } from '@redocly/theme/core/types';
|
|
4
|
+
import type { BffCatalogEntity, CatalogEntityPageProps } from '@redocly/theme/core/types';
|
|
4
5
|
import { GraphIcon } from '@redocly/theme/icons/GraphIcon/GraphIcon';
|
|
5
6
|
import { CatalogEntityPropertyCard } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard';
|
|
6
7
|
import { useCatalogEntityLink, useThemeHooks } from '@redocly/theme/core/hooks';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
|
|
3
|
-
import { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
|
+
import type { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
5
|
import { EntityTypeIcon } from '@redocly/theme/icons/EntityTypeIcon/EntityTypeIcon';
|
|
5
6
|
import { capitalize } from '@redocly/theme/core/utils';
|
|
6
7
|
import { CatalogEntityTypeIcon } from '@redocly/theme/components/Catalog/CatalogEntityTypeIcon';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
|
|
3
|
-
import { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
|
+
import type { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
5
|
import { NotesIcon } from '@redocly/theme/icons/NotesIcon/NotesIcon';
|
|
5
6
|
import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
6
7
|
import { CatalogEntityPropertyCard } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
|
|
3
|
-
import { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
|
+
import type { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
5
|
import { GithubIcon } from '@redocly/theme/icons/GithubIcon/GithubIcon';
|
|
5
6
|
import { removeLeadingSlash } from '@redocly/theme/core/utils';
|
|
6
7
|
import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import React, { JSX } from 'react';
|
|
1
|
+
import React, { type JSX } from 'react';
|
|
2
2
|
|
|
3
|
-
import { BffCatalogEntity, CatalogEntityPageProps } from '@redocly/theme/core/types';
|
|
4
|
-
import { useCatalogEntityLink } from '@redocly/theme/core/hooks';
|
|
3
|
+
import type { BffCatalogEntity, CatalogEntityPageProps } from '@redocly/theme/core/types';
|
|
4
|
+
import { useCatalogEntityLink, useThemeHooks } from '@redocly/theme/core/hooks';
|
|
5
5
|
import { PeopleIcon } from '@redocly/theme/icons/PeopleIcon/PeopleIcon';
|
|
6
6
|
import { CatalogEntityPropertyCard } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard';
|
|
7
|
-
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
8
7
|
import { Button } from '@redocly/theme/components/Button/Button';
|
|
9
8
|
import { CatalogAvatar } from '@redocly/theme/components/Catalog/CatalogAvatar';
|
|
10
9
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
|
|
3
|
-
import { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
|
+
import type { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
5
|
import { TagsIcon } from '@redocly/theme/icons/TagsIcon/TagsIcon';
|
|
5
6
|
import { CatalogTags } from '@redocly/theme/components/Catalog/CatalogTags';
|
|
6
7
|
import { CatalogEntityPropertyCard } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
|
|
3
|
-
import { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
|
+
import type { BffCatalogEntity } from '@redocly/theme/core/types';
|
|
4
5
|
import { EmailIcon } from '@redocly/theme/icons/EmailIcon/EmailIcon';
|
|
5
6
|
import { CatalogEntityPropertyCard } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard';
|
|
6
7
|
import { Email } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogUserEntityCell';
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import React, { JSX } from 'react';
|
|
1
|
+
import React, { type JSX } from 'react';
|
|
2
2
|
|
|
3
3
|
import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
4
|
-
import type {
|
|
5
|
-
|
|
4
|
+
import type {
|
|
5
|
+
ListType,
|
|
6
|
+
BffCatalogEntity,
|
|
7
|
+
BffCatalogRelatedEntity,
|
|
8
|
+
} from '@redocly/theme/core/types';
|
|
6
9
|
|
|
7
|
-
import { CatalogColumn } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableView';
|
|
10
|
+
import type { CatalogColumn } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableView';
|
|
8
11
|
import { CatalogEntityCell } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogEntityCell';
|
|
9
12
|
import { CatalogEntityRelationsTable } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable';
|
|
10
13
|
import { CatalogEntityTypeTag } from '@redocly/theme/components/Catalog/CatalogEntityTypeTag';
|
package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React, { useState, useMemo } from 'react';
|
|
2
3
|
|
|
3
4
|
import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
4
5
|
import type { BffCatalogEntity, BffCatalogRelatedEntityList } from '@redocly/theme/core/types';
|
package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import React, { JSX } from 'react';
|
|
1
|
+
import React, { type JSX } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
5
|
-
import type {
|
|
6
|
-
|
|
5
|
+
import type {
|
|
6
|
+
ListType,
|
|
7
|
+
BffCatalogEntity,
|
|
8
|
+
BffCatalogRelatedEntity,
|
|
9
|
+
} from '@redocly/theme/core/types';
|
|
7
10
|
|
|
8
|
-
import { CatalogColumn } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableView';
|
|
11
|
+
import type { CatalogColumn } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableView';
|
|
9
12
|
import { CatalogActionsRow } from '@redocly/theme/components/Catalog/CatalogActionsRow';
|
|
10
13
|
import { CatalogEntityRelationsTableContent } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent';
|
|
11
14
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import React, { JSX } from 'react';
|
|
1
|
+
import React, { type JSX } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
5
|
-
import type { ListType } from '@redocly/theme/core/types';
|
|
6
|
-
import type { BffCatalogRelatedEntity } from '@redocly/theme/core/types';
|
|
5
|
+
import type { ListType, BffCatalogRelatedEntity } from '@redocly/theme/core/types';
|
|
7
6
|
|
|
8
7
|
import { ArrowDownIcon } from '@redocly/theme/icons/ArrowDownIcon/ArrowDownIcon';
|
|
9
8
|
import { LoadMore } from '@redocly/theme/components/LoadMore/LoadMore';
|
|
10
9
|
import {
|
|
11
|
-
CatalogColumn,
|
|
10
|
+
type CatalogColumn,
|
|
12
11
|
CatalogTableView,
|
|
13
12
|
} from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableView';
|
|
14
13
|
import { HighlightContext } from '@redocly/theme/components/Catalog/CatalogHighlight';
|
package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
|
|
4
5
|
import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
@@ -8,7 +9,7 @@ import { Tabs, TabsSize } from '@redocly/theme/markdoc/components/Tabs/Tabs';
|
|
|
8
9
|
import { TabItemFragment } from '@redocly/theme/markdoc/components/Tabs/TabItemFragment';
|
|
9
10
|
import { PeopleIcon } from '@redocly/theme/icons/PeopleIcon/PeopleIcon';
|
|
10
11
|
import { EntityTypeIcon } from '@redocly/theme/icons/EntityTypeIcon/EntityTypeIcon';
|
|
11
|
-
import { CatalogColumn } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableView';
|
|
12
|
+
import type { CatalogColumn } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableView';
|
|
12
13
|
import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
13
14
|
import { CatalogEntityRelationsTable } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable';
|
|
14
15
|
import { CatalogUserEntityCell } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogUserEntityCell';
|
|
@@ -5,8 +5,7 @@ import * as Sampler from 'openapi-sampler';
|
|
|
5
5
|
import type { CatalogEntityConfig } from '@redocly/config';
|
|
6
6
|
import type { BffCatalogEntity, BffCatalogRelatedEntity } from '@redocly/theme/core/types';
|
|
7
7
|
|
|
8
|
-
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
9
|
-
import { useCatalogEntitySchema } from '@redocly/theme/core/hooks';
|
|
8
|
+
import { useThemeHooks, useCatalogEntitySchema } from '@redocly/theme/core/hooks';
|
|
10
9
|
import { getBaseDataAttributes } from '@redocly/theme/core/utils';
|
|
11
10
|
import { JsonViewer } from '@redocly/theme/components/JsonViewer/JsonViewer';
|
|
12
11
|
import { CopyButton } from '@redocly/theme/components/Buttons/CopyButton';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
|
|
3
4
|
import type { UiAccessibleConfig } from '@redocly/config';
|
|
4
5
|
|
|
5
|
-
import { EntityType } from '@redocly/theme/core/types';
|
|
6
|
+
import type { EntityType } from '@redocly/theme/core/types';
|
|
6
7
|
import { CodeIcon } from '@redocly/theme/icons/CodeIcon/CodeIcon';
|
|
7
8
|
import { GraphIcon } from '@redocly/theme/icons/GraphIcon/GraphIcon';
|
|
8
9
|
import { PeopleIcon } from '@redocly/theme/icons/PeopleIcon/PeopleIcon';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
|
|
4
|
-
import { EntityType } from '@redocly/theme/core/types';
|
|
5
|
+
import type { EntityType } from '@redocly/theme/core/types';
|
|
5
6
|
import { Tag } from '@redocly/theme/components/Tag/Tag';
|
|
6
7
|
import { CatalogHighlight } from '@redocly/theme/components/Catalog/CatalogHighlight';
|
|
7
8
|
import { PREDEFINED_ENTITY_TYPES } from '@redocly/theme/core';
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { type JSX, type ReactNode } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
import type { JSX, ReactNode } from 'react';
|
|
5
4
|
import type { ResolvedFilter } from '@redocly/theme/core/types';
|
|
6
5
|
import type { RedoclyConfig } from '@redocly/theme/config';
|
|
7
6
|
|
|
8
7
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
9
8
|
import { Button } from '@redocly/theme/components/Button/Button';
|
|
10
9
|
import { CatalogFilter } from '@redocly/theme/components/Catalog/CatalogFilter/CatalogFilter';
|
|
11
|
-
import { breakpoints } from '@redocly/theme/core/utils';
|
|
12
|
-
import { isFromToSelectedOptions } from '@redocly/theme/core/utils';
|
|
10
|
+
import { breakpoints, isFromToSelectedOptions } from '@redocly/theme/core/utils';
|
|
13
11
|
|
|
14
12
|
export type CatalogFilterContentProps = {
|
|
15
13
|
onClear: () => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
|
|
4
5
|
import { CatalogMobileFiltersPanelHeader } from '@redocly/theme/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
|
|
4
5
|
import { CatalogMobileTopBarFiltersButton } from '@redocly/theme/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton';
|
|
5
6
|
import { CatalogMobileTopBarControls } from '@redocly/theme/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls';
|
|
6
7
|
import { breakpoints } from '@redocly/theme/core';
|
|
7
|
-
import { CatalogViewMode } from '@redocly/theme/core';
|
|
8
|
+
import type { CatalogViewMode } from '@redocly/theme/core';
|
|
8
9
|
|
|
9
10
|
type CatalogMobileTopBarProps = {
|
|
10
11
|
setMobileFiltersPanelOpen: (open: boolean) => void;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
|
|
4
5
|
import { CatalogSortButton } from '@redocly/theme/components/Catalog/CatalogSortButton';
|
|
5
6
|
import { CatalogViewModeToggle } from '@redocly/theme/components/Catalog/CatalogViewModeToggle';
|
|
6
|
-
import { CatalogViewMode } from '@redocly/theme/core';
|
|
7
|
+
import type { CatalogViewMode } from '@redocly/theme/core';
|
|
7
8
|
|
|
8
9
|
type CatalogMobileTopBarControlsProps = {
|
|
9
10
|
setSortOption: (sortOption: string | null) => void;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React, { useState } from 'react';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
import { useNavigate } from 'react-router';
|
|
4
5
|
|
|
5
6
|
import { Accordion } from '@redocly/theme/components/Accordion/Accordion';
|
|
6
7
|
import { Select } from '@redocly/theme/components/Select/Select';
|
|
7
|
-
import { CatalogSwitcherItem } from '@redocly/theme/core/types';
|
|
8
|
+
import type { CatalogSwitcherItem } from '@redocly/theme/core/types';
|
|
8
9
|
import { getPathPrefix } from '@redocly/theme/core/utils';
|
|
9
10
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
10
11
|
import { ChevronDownIcon } from '@redocly/theme/icons/ChevronDownIcon/ChevronDownIcon';
|