@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/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.js
CHANGED
|
@@ -41,10 +41,9 @@ const react_1 = __importStar(require("react"));
|
|
|
41
41
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
42
42
|
const ChevronDownIcon_1 = require("../../../../icons/ChevronDownIcon/ChevronDownIcon");
|
|
43
43
|
const ChevronRightIcon_1 = require("../../../../icons/ChevronRightIcon/ChevronRightIcon");
|
|
44
|
-
const
|
|
44
|
+
const RadioCheckButtonIcon_1 = require("../../../../icons/RadioCheckButtonIcon/RadioCheckButtonIcon");
|
|
45
45
|
const NavaidMilitaryIcon_1 = require("../../../../icons/NavaidMilitaryIcon/NavaidMilitaryIcon");
|
|
46
46
|
const Link_1 = require("../../../../components/Link/Link");
|
|
47
|
-
const Tag_1 = require("../../../../components/Tag/Tag");
|
|
48
47
|
const hooks_1 = require("../../../../core/hooks");
|
|
49
48
|
const ShowMoreButton_1 = require("../../../../components/Catalog/CatalogEntity/ShowMoreButton");
|
|
50
49
|
const CatalogEntityRevisionItem_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityRevisionItem");
|
|
@@ -52,12 +51,14 @@ const utils_1 = require("../../../../core/utils");
|
|
|
52
51
|
const constants_1 = require("../../../../core/constants");
|
|
53
52
|
const MAX_INITIAL_REVISIONS = 5;
|
|
54
53
|
const MAX_REVISIONS = 20;
|
|
55
|
-
function CatalogEntityVersionItem({ group, basePath, isExpanded, onToggle, }) {
|
|
54
|
+
function CatalogEntityVersionItem({ group, basePath, isExpanded, onToggle, versionLink, }) {
|
|
56
55
|
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
57
56
|
const { translate } = useTranslate();
|
|
58
57
|
const [showAllRevisions, setShowAllRevisions] = (0, react_1.useState)(false);
|
|
59
58
|
const revisions = group.revisions || [];
|
|
60
|
-
|
|
59
|
+
// A version with one revision links straight to its page instead of
|
|
60
|
+
// expanding.
|
|
61
|
+
const hasExpandableRevisions = revisions.length > 1;
|
|
61
62
|
const hasMoreThanMax = revisions.length > MAX_INITIAL_REVISIONS;
|
|
62
63
|
const hasMoreThanLimit = revisions.length > MAX_REVISIONS;
|
|
63
64
|
const displayedRevisions = showAllRevisions
|
|
@@ -69,27 +70,28 @@ function CatalogEntityVersionItem({ group, basePath, isExpanded, onToggle, }) {
|
|
|
69
70
|
}
|
|
70
71
|
}, [isExpanded]);
|
|
71
72
|
const isNotSpecifiedVersion = group.version === constants_1.VERSION_NOT_SPECIFIED;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
73
|
+
// Hosts without page-version links (catalog entities) keep the legacy
|
|
74
|
+
// ?revision=&version= contract.
|
|
75
|
+
const versionRowLink = hasExpandableRevisions
|
|
76
|
+
? undefined
|
|
77
|
+
: (versionLink !== null && versionLink !== void 0 ? versionLink : (0, utils_1.buildRevisionUrl)(basePath, group.singleRevisionDate, group.version));
|
|
78
|
+
const versionName = isNotSpecifiedVersion
|
|
79
|
+
? translate('catalog.history.version.notSpecified', 'not specified')
|
|
80
|
+
: group.version;
|
|
81
|
+
const latestWord = translate('catalog.history.version.latest', 'latest');
|
|
82
|
+
// A version named "latest" already says it: no "(latest)" suffix.
|
|
83
|
+
const latestSuffix = group.isDefaultVersion && versionName.toLowerCase() !== latestWord.toLowerCase()
|
|
84
|
+
? ` (${latestWord})`
|
|
85
|
+
: '';
|
|
86
|
+
const versionTitle = `${translate('catalog.history.version.label', 'Version')}:\u00a0${versionName}${latestSuffix}`;
|
|
87
|
+
const versionButton = (react_1.default.createElement(VersionButton, { type: "button", onClick: () => hasExpandableRevisions && onToggle(group.version), $isCurrent: group.isCurrent },
|
|
88
|
+
react_1.default.createElement(VersionIcon, { $isCurrent: group.isCurrent }, group.isCurrent ? (react_1.default.createElement(CurrentVersionIcon, null)) : (react_1.default.createElement(NavaidMilitaryIcon_1.NavaidMilitaryIcon, { size: "14px", color: "--catalog-history-sidebar-version-icon-color" }))),
|
|
89
|
+
react_1.default.createElement(VersionTitle, null, versionTitle),
|
|
90
|
+
hasExpandableRevisions && (react_1.default.createElement(ChevronIcon, null, isExpanded ? (react_1.default.createElement(ChevronDownIcon_1.ChevronDownIcon, { size: "12px", color: "--catalog-history-sidebar-chevron-icon-color" })) : (react_1.default.createElement(ChevronRightIcon_1.ChevronRightIcon, { size: "12px", color: "--catalog-history-sidebar-chevron-icon-color" }))))));
|
|
89
91
|
return (react_1.default.createElement("li", null,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
displayedRevisions.map((revisionItem) => (react_1.default.createElement(CatalogEntityRevisionItem_1.CatalogEntityRevisionItem, { key: revisionItem.name, revisionItem: revisionItem, basePath: basePath, version: group.version }))),
|
|
92
|
+
versionRowLink ? (react_1.default.createElement(VersionLinkWrapper, { to: versionRowLink }, versionButton)) : (versionButton),
|
|
93
|
+
hasExpandableRevisions && isExpanded && (react_1.default.createElement(RevisionsList, null,
|
|
94
|
+
displayedRevisions.map((revisionItem) => (react_1.default.createElement(CatalogEntityRevisionItem_1.CatalogEntityRevisionItem, { key: revisionItem.name, revisionItem: revisionItem, basePath: basePath, version: group.version, versionLink: versionLink }))),
|
|
93
95
|
hasMoreThanLimit && showAllRevisions && (react_1.default.createElement(RevisionsLimitMessage, null, translate('catalog.history.revisions.limitMessage', 'Older revisions are not stored.'))),
|
|
94
96
|
hasMoreThanMax && (react_1.default.createElement(ShowMoreButton_1.ShowMoreButton, { onClick: () => setShowAllRevisions(!showAllRevisions), isExpanded: showAllRevisions }, showAllRevisions
|
|
95
97
|
? translate('catalog.history.revisions.showLess', 'Show less')
|
|
@@ -98,29 +100,36 @@ function CatalogEntityVersionItem({ group, basePath, isExpanded, onToggle, }) {
|
|
|
98
100
|
count: Math.min(revisions.length - MAX_INITIAL_REVISIONS, MAX_REVISIONS - MAX_INITIAL_REVISIONS),
|
|
99
101
|
})))))));
|
|
100
102
|
}
|
|
103
|
+
const VersionLinkWrapper = (0, styled_components_1.default)(Link_1.Link) `
|
|
104
|
+
display: block;
|
|
105
|
+
color: inherit;
|
|
106
|
+
|
|
107
|
+
&,
|
|
108
|
+
&:hover,
|
|
109
|
+
&:focus,
|
|
110
|
+
&:visited {
|
|
111
|
+
text-decoration: none;
|
|
112
|
+
}
|
|
113
|
+
`;
|
|
101
114
|
const VersionButton = styled_components_1.default.button `
|
|
102
115
|
all: unset;
|
|
116
|
+
box-sizing: border-box;
|
|
103
117
|
display: flex;
|
|
104
118
|
align-items: center;
|
|
105
|
-
width:
|
|
119
|
+
width: 100%;
|
|
106
120
|
padding: var(--catalog-history-sidebar-version-header-padding);
|
|
107
121
|
cursor: pointer;
|
|
108
122
|
border-radius: var(--catalog-history-sidebar-version-header-border-radius);
|
|
109
123
|
transition: 0.2s ease;
|
|
110
124
|
text-decoration: none;
|
|
111
125
|
color: inherit;
|
|
112
|
-
background-color: 'transparent';
|
|
126
|
+
background-color: ${({ $isCurrent }) => $isCurrent ? 'var(--catalog-history-sidebar-version-header-bg-color-current)' : 'transparent'};
|
|
113
127
|
|
|
114
128
|
&:hover {
|
|
115
|
-
background-color:
|
|
129
|
+
background-color: ${({ $isCurrent }) => $isCurrent
|
|
130
|
+
? 'var(--catalog-history-sidebar-version-header-bg-color-current)'
|
|
131
|
+
: 'var(--catalog-history-sidebar-version-header-bg-color-hover)'};
|
|
116
132
|
}
|
|
117
|
-
|
|
118
|
-
${({ $isCurrent }) => !$isCurrent &&
|
|
119
|
-
`
|
|
120
|
-
&:hover ${VersionIcon} {
|
|
121
|
-
background-color: var(--color-static-white);
|
|
122
|
-
}
|
|
123
|
-
`}
|
|
124
133
|
`;
|
|
125
134
|
const VersionIcon = styled_components_1.default.div `
|
|
126
135
|
display: flex;
|
|
@@ -133,23 +142,12 @@ const VersionIcon = styled_components_1.default.div `
|
|
|
133
142
|
background-color: ${({ $isCurrent }) => $isCurrent
|
|
134
143
|
? 'var(--color-primary-base, var(--color-blueberry-6))'
|
|
135
144
|
: 'var(--catalog-avatar-bg-color)'};
|
|
136
|
-
transition: background-color 0.2s ease;
|
|
137
145
|
margin-right: var(--catalog-history-sidebar-version-icon-margin-right);
|
|
138
|
-
|
|
139
|
-
svg path {
|
|
140
|
-
transition: fill 0.2s ease;
|
|
141
|
-
}
|
|
142
|
-
`;
|
|
143
|
-
const VersionInfo = styled_components_1.default.div `
|
|
144
|
-
display: flex;
|
|
145
|
-
flex-direction: column;
|
|
146
|
-
align-items: flex-start;
|
|
147
|
-
gap: var(--catalog-history-sidebar-version-info-gap);
|
|
148
146
|
`;
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
147
|
+
const CurrentVersionIcon = (0, styled_components_1.default)(RadioCheckButtonIcon_1.RadioCheckButtonIcon) `
|
|
148
|
+
width: 14px;
|
|
149
|
+
height: 14px;
|
|
150
|
+
color: var(--catalog-history-sidebar-version-icon-color-current);
|
|
153
151
|
`;
|
|
154
152
|
const VersionTitle = styled_components_1.default.span `
|
|
155
153
|
font-family: var(--catalog-history-sidebar-version-title-font-family);
|
|
@@ -162,13 +160,6 @@ const VersionTitle = styled_components_1.default.span `
|
|
|
162
160
|
overflow-wrap: break-word;
|
|
163
161
|
word-break: break-word;
|
|
164
162
|
`;
|
|
165
|
-
const VersionDate = styled_components_1.default.span `
|
|
166
|
-
font-family: var(--catalog-history-sidebar-version-date-font-family);
|
|
167
|
-
font-size: var(--catalog-history-sidebar-version-date-font-size);
|
|
168
|
-
font-weight: var(--catalog-history-sidebar-version-date-font-weight);
|
|
169
|
-
line-height: var(--catalog-history-sidebar-version-date-line-height);
|
|
170
|
-
color: var(--catalog-history-sidebar-version-date-color);
|
|
171
|
-
`;
|
|
172
163
|
const ChevronIcon = styled_components_1.default.div `
|
|
173
164
|
display: flex;
|
|
174
165
|
align-items: center;
|
|
@@ -187,7 +178,7 @@ const RevisionsList = styled_components_1.default.ul `
|
|
|
187
178
|
&::before {
|
|
188
179
|
content: '';
|
|
189
180
|
position: absolute;
|
|
190
|
-
left:
|
|
181
|
+
left: var(--catalog-history-sidebar-revision-line-left);
|
|
191
182
|
top: 0;
|
|
192
183
|
bottom: var(--catalog-history-sidebar-revisions-padding-bottom);
|
|
193
184
|
width: 1px;
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JSX } from 'react';
|
|
2
|
-
import { BffCatalogEntity } from '../../../../core/types';
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import type { BffCatalogEntity } from '../../../../core/types';
|
|
3
3
|
export type CatalogEntityPropertiesProps = {
|
|
4
4
|
entity: BffCatalogEntity;
|
|
5
5
|
};
|
|
@@ -8,11 +8,10 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const hooks_1 = require("../../../../core/hooks");
|
|
9
9
|
const PeopleIcon_1 = require("../../../../icons/PeopleIcon/PeopleIcon");
|
|
10
10
|
const CatalogEntityPropertyCard_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard");
|
|
11
|
-
const hooks_2 = require("../../../../core/hooks");
|
|
12
11
|
const Button_1 = require("../../../../components/Button/Button");
|
|
13
12
|
const CatalogAvatar_1 = require("../../../../components/Catalog/CatalogAvatar");
|
|
14
13
|
function OwnersProperty({ entity }) {
|
|
15
|
-
const { useTranslate, usePageProps } = (0,
|
|
14
|
+
const { useTranslate, usePageProps } = (0, hooks_1.useThemeHooks)();
|
|
16
15
|
const { translate } = useTranslate();
|
|
17
16
|
const { entitiesCatalogConfig } = usePageProps();
|
|
18
17
|
const { getEntityLink } = (0, hooks_1.useCatalogEntityLink)(entitiesCatalogConfig);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JSX } from 'react';
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
2
|
import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
3
3
|
import type { BffCatalogEntity, BffCatalogRelatedEntity } from '../../../../core/types';
|
|
4
4
|
export type CatalogEntityApiDescriptionRelationsProps = {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { JSX } from 'react';
|
|
1
|
+
import { type JSX } from 'react';
|
|
2
2
|
import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
3
|
-
import type { ListType } from '../../../../core/types';
|
|
4
|
-
import type { BffCatalogEntity, BffCatalogRelatedEntity } from '../../../../core/types';
|
|
3
|
+
import type { ListType, BffCatalogEntity, BffCatalogRelatedEntity } from '../../../../core/types';
|
|
5
4
|
export type CatalogEntityDefaultRelationsProps = {
|
|
6
5
|
entity: BffCatalogEntity;
|
|
7
6
|
entitiesCatalogConfig: EntitiesCatalogConfig;
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JSX } from 'react';
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
2
|
import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
3
3
|
import type { BffCatalogEntity, BffCatalogRelatedEntityList } from '../../../../core/types';
|
|
4
4
|
export type CatalogEntityRelationsProps = {
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { JSX } from 'react';
|
|
1
|
+
import { type JSX } from 'react';
|
|
2
2
|
import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
3
|
-
import type { ListType } from '../../../../core/types';
|
|
4
|
-
import type {
|
|
5
|
-
import { CatalogColumn } from '../../../../components/Catalog/CatalogTableView/CatalogTableView';
|
|
3
|
+
import type { ListType, BffCatalogEntity, BffCatalogRelatedEntity } from '../../../../core/types';
|
|
4
|
+
import type { CatalogColumn } from '../../../../components/Catalog/CatalogTableView/CatalogTableView';
|
|
6
5
|
export type CatalogEntityRelationsTableProps = {
|
|
7
6
|
entity: BffCatalogEntity;
|
|
8
7
|
entitiesCatalogConfig: EntitiesCatalogConfig;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { JSX } from 'react';
|
|
1
|
+
import { type JSX } from 'react';
|
|
2
2
|
import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
3
|
-
import type { ListType } from '../../../../core/types';
|
|
4
|
-
import type
|
|
5
|
-
import { CatalogColumn } from '../../../../components/Catalog/CatalogTableView/CatalogTableView';
|
|
3
|
+
import type { ListType, BffCatalogRelatedEntity } from '../../../../core/types';
|
|
4
|
+
import { type CatalogColumn } from '../../../../components/Catalog/CatalogTableView/CatalogTableView';
|
|
6
5
|
export type CatalogEntityRelationsTableContentProps = {
|
|
7
6
|
entitiesCatalogConfig: EntitiesCatalogConfig;
|
|
8
7
|
catalogConfig: CatalogEntityConfig;
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JSX } from 'react';
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
2
|
import type { CatalogEntityConfig, EntitiesCatalogConfig } from '@redocly/config';
|
|
3
3
|
import type { BffCatalogEntity, BffCatalogRelatedEntity } from '../../../../core/types';
|
|
4
4
|
export type CatalogEntityTeamRelationsProps = {
|
|
@@ -41,7 +41,6 @@ const react_1 = __importDefault(require("react"));
|
|
|
41
41
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
42
42
|
const Sampler = __importStar(require("openapi-sampler"));
|
|
43
43
|
const hooks_1 = require("../../../core/hooks");
|
|
44
|
-
const hooks_2 = require("../../../core/hooks");
|
|
45
44
|
const utils_1 = require("../../../core/utils");
|
|
46
45
|
const JsonViewer_1 = require("../../../components/JsonViewer/JsonViewer");
|
|
47
46
|
const CopyButton_1 = require("../../../components/Buttons/CopyButton");
|
|
@@ -50,7 +49,7 @@ function CatalogEntitySchema({ entity, relatedEntity, RedocSchema, StoreProvider
|
|
|
50
49
|
const { useTranslate, useTelemetry } = (0, hooks_1.useThemeHooks)();
|
|
51
50
|
const telemetry = useTelemetry();
|
|
52
51
|
const { translate } = useTranslate();
|
|
53
|
-
const { definition, parsedSchema, rawSchema } = (0,
|
|
52
|
+
const { definition, parsedSchema, rawSchema } = (0, hooks_1.useCatalogEntitySchema)({ entity, relatedEntity });
|
|
54
53
|
const isGraphql = ((_a = entity.metadata) === null || _a === void 0 ? void 0 : _a.specType) === 'graphql';
|
|
55
54
|
const graphqlSDL = (_b = entity === null || entity === void 0 ? void 0 : entity.metadata) === null || _b === void 0 ? void 0 : _b.sdl;
|
|
56
55
|
return (react_1.default.createElement(MetadataWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntitySchema" },
|
|
@@ -10,7 +10,6 @@ const hooks_1 = require("../../../core/hooks");
|
|
|
10
10
|
const Button_1 = require("../../../components/Button/Button");
|
|
11
11
|
const CatalogFilter_1 = require("../../../components/Catalog/CatalogFilter/CatalogFilter");
|
|
12
12
|
const utils_1 = require("../../../core/utils");
|
|
13
|
-
const utils_2 = require("../../../core/utils");
|
|
14
13
|
function CatalogFilterContent({ onClear, filters, filterTerm, filterValuesCasing, showCounter = true, catalogSelector, searchInput, className, }) {
|
|
15
14
|
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
16
15
|
const { translate } = useTranslate();
|
|
@@ -20,7 +19,7 @@ function CatalogFilterContent({ onClear, filters, filterTerm, filterValuesCasing
|
|
|
20
19
|
if (filter.selectedOptions && filter.selectedOptions instanceof Set) {
|
|
21
20
|
return filter.selectedOptions.size;
|
|
22
21
|
}
|
|
23
|
-
else if ((0,
|
|
22
|
+
else if ((0, utils_1.isFromToSelectedOptions)(filter.selectedOptions) &&
|
|
24
23
|
filter.selectedOptions.from &&
|
|
25
24
|
filter.selectedOptions.to) {
|
|
26
25
|
return true;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
export declare const HighlightContext: React.Context<string[]>;
|
|
3
4
|
export type CatalogHighlightProps = React.PropsWithChildren;
|
|
4
5
|
export declare function CatalogHighlight(props: CatalogHighlightProps): JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JSX } from 'react';
|
|
2
|
-
import { CatalogViewMode } from '../../../core';
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import type { CatalogViewMode } from '../../../core';
|
|
3
3
|
type CatalogMobileTopBarProps = {
|
|
4
4
|
setMobileFiltersPanelOpen: (open: boolean) => void;
|
|
5
5
|
activeFiltersCount: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JSX } from 'react';
|
|
2
|
-
import { CatalogViewMode } from '../../../core';
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import type { CatalogViewMode } from '../../../core';
|
|
3
3
|
type CatalogMobileTopBarControlsProps = {
|
|
4
4
|
setSortOption: (sortOption: string | null) => void;
|
|
5
5
|
sortOption: string | null;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import { Select } from '../../components/Select/Select';
|
|
3
|
-
import { CatalogSwitcherItem } from '../../core/types';
|
|
4
|
+
import type { CatalogSwitcherItem } from '../../core/types';
|
|
4
5
|
export type CatalogSelectorProps = {
|
|
5
6
|
catalogSwitcherItems: CatalogSwitcherItem[];
|
|
6
7
|
onChange: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BffCatalogEntity } from '../../../core/types';
|
|
2
|
+
import type { BffCatalogEntity } from '../../../core/types';
|
|
3
3
|
type Entity = Pick<BffCatalogEntity, 'type' | 'title' | 'summary'>;
|
|
4
4
|
export type CatalogEntityCellProps<T extends Entity> = {
|
|
5
5
|
entity: T;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BaseEntity, CatalogColumn } from '../../../components/Catalog/CatalogTableView/CatalogTableView';
|
|
2
|
+
import type { BaseEntity, CatalogColumn } from '../../../components/Catalog/CatalogTableView/CatalogTableView';
|
|
3
3
|
export type CatalogTableHeaderCellProps<T extends BaseEntity> = {
|
|
4
4
|
column: CatalogColumn<T>;
|
|
5
5
|
currentSortOption?: string | null;
|