@redocly/theme 0.63.0-next.4 → 0.63.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/Accordion/variables.js +2 -2
- package/lib/components/Buttons/DownloadButton.d.ts +6 -0
- package/lib/components/Buttons/DownloadButton.js +20 -0
- package/lib/components/Buttons/EmailButton.js +6 -1
- package/lib/components/Buttons/NewTabButton.js +6 -1
- package/lib/components/Catalog/Catalog.js +114 -50
- package/lib/components/Catalog/CatalogAvatar.d.ts +5 -0
- package/lib/components/Catalog/CatalogAvatar.js +92 -0
- package/lib/components/Catalog/CatalogCardView/CatalogCard.js +26 -7
- package/lib/components/Catalog/CatalogCardView/CatalogCardView.js +10 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +17 -17
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsLinkedNode.js +4 -20
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.d.ts +7 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.js +53 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode.js +3 -17
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.js +30 -9
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js +16 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.js +8 -4
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +11 -5
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +4 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.js +7 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.js +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.d.ts +4 -2
- package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.js +25 -8
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.d.ts +7 -0
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.js +24 -0
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.d.ts +6 -0
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.js +26 -0
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.d.ts +7 -0
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.js +30 -0
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.d.ts +13 -0
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.js +30 -0
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.d.ts +11 -0
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.js +21 -0
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.d.ts +7 -0
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.js +25 -0
- package/lib/components/Catalog/CatalogPageDescription.js +0 -6
- package/lib/components/Catalog/CatalogSelector.d.ts +0 -1
- package/lib/components/Catalog/CatalogSelector.js +50 -16
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +2 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +20 -5
- package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.js +2 -23
- package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +2 -1
- package/lib/components/Catalog/CatalogTagsWithTooltip.js +14 -6
- package/lib/components/Catalog/variables.js +78 -36
- package/lib/components/Filter/variables.js +1 -1
- package/lib/components/LoadMore/LoadMore.js +1 -0
- package/lib/components/Menu/MenuItem.js +1 -1
- package/lib/components/PageActions/PageActions.js +1 -2
- package/lib/components/Search/SearchDialog.js +1 -1
- package/lib/components/SidebarActions/SidebarActions.js +1 -1
- package/lib/components/Tooltip/AnchorTooltip.js +5 -2
- package/lib/components/Tooltip/JsTooltip.js +5 -2
- package/lib/components/UserMenu/UserMenu.js +1 -3
- package/lib/core/hooks/index.d.ts +1 -0
- package/lib/core/hooks/index.js +1 -0
- package/lib/core/hooks/use-is-truncated.d.ts +1 -0
- package/lib/core/hooks/use-is-truncated.js +19 -0
- package/lib/core/hooks/use-tabs.d.ts +1 -1
- package/lib/core/hooks/use-tabs.js +30 -17
- package/lib/core/types/hooks.d.ts +1 -0
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/tooltip.d.ts +1 -0
- package/lib/core/utils/custom-catalog-options-casing.d.ts +15 -0
- package/lib/core/utils/custom-catalog-options-casing.js +32 -0
- package/lib/core/utils/index.d.ts +1 -0
- package/lib/core/utils/index.js +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/markdoc/components/MarkdocExample/MarkdocExample.js +2 -2
- package/lib/markdoc/components/Tabs/Tabs.d.ts +1 -2
- package/lib/markdoc/components/Tabs/Tabs.js +9 -22
- package/package.json +4 -4
- package/src/components/Accordion/variables.ts +2 -2
- package/src/components/Buttons/DownloadButton.tsx +41 -0
- package/src/components/Buttons/EmailButton.tsx +18 -8
- package/src/components/Buttons/NewTabButton.tsx +19 -8
- package/src/components/Catalog/Catalog.tsx +157 -95
- package/src/components/Catalog/CatalogAvatar.tsx +68 -0
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +29 -5
- package/src/components/Catalog/CatalogCardView/CatalogCardView.tsx +10 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +17 -17
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsLinkedNode.tsx +4 -21
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.tsx +82 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode.tsx +4 -22
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.tsx +39 -10
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx +19 -3
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.tsx +8 -4
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +12 -10
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +5 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +1 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +6 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.tsx +10 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +1 -1
- package/src/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.tsx +1 -1
- package/src/components/Catalog/CatalogFilter/CatalogFilterContent.tsx +30 -6
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.tsx +31 -0
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.tsx +34 -0
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.tsx +40 -0
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.tsx +54 -0
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.tsx +34 -0
- package/src/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.tsx +39 -0
- package/src/components/Catalog/CatalogPageDescription.tsx +0 -6
- package/src/components/Catalog/CatalogSelector.tsx +23 -21
- package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +37 -6
- package/src/components/Catalog/CatalogTableView/CatalogUserEntityCell.tsx +2 -26
- package/src/components/Catalog/CatalogTagsWithTooltip.tsx +24 -9
- package/src/components/Catalog/variables.ts +78 -36
- package/src/components/Filter/variables.ts +1 -1
- package/src/components/LoadMore/LoadMore.tsx +1 -0
- package/src/components/Menu/MenuItem.tsx +1 -0
- package/src/components/PageActions/PageActions.tsx +1 -2
- package/src/components/Search/SearchDialog.tsx +1 -1
- package/src/components/SidebarActions/SidebarActions.tsx +1 -0
- package/src/components/Tooltip/AnchorTooltip.tsx +5 -1
- package/src/components/Tooltip/JsTooltip.tsx +5 -1
- package/src/components/UserMenu/UserMenu.tsx +1 -3
- package/src/core/hooks/code-walkthrough/use-code-walkthrough.ts +1 -1
- package/src/core/hooks/index.ts +1 -0
- package/src/core/hooks/use-is-truncated.ts +20 -0
- package/src/core/hooks/use-tabs.ts +40 -21
- package/src/core/types/hooks.ts +1 -1
- package/src/core/types/l10n.ts +7 -0
- package/src/core/types/tooltip.ts +1 -0
- package/src/core/utils/custom-catalog-options-casing.ts +29 -0
- package/src/core/utils/index.ts +1 -0
- package/src/index.ts +1 -0
- package/src/markdoc/components/MarkdocExample/MarkdocExample.tsx +2 -6
- package/src/markdoc/components/Tabs/Tabs.tsx +4 -37
package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
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.CatalogEntityRelationsNodeContent = CatalogEntityRelationsNodeContent;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const CatalogEntityIcon_1 = require("../../../../components/Catalog/CatalogEntityIcon");
|
|
10
|
+
const utils_1 = require("../../../../core/utils");
|
|
11
|
+
function CatalogEntityRelationsNodeContent({ entityType, label, isRoot, }) {
|
|
12
|
+
const formattedEntityType = (0, utils_1.customCatalogOptionsCasing)(entityType);
|
|
13
|
+
return (react_1.default.createElement(CatalogEntityRelationsNodeContentWrapper, { isRoot: isRoot, "data-component-name": "Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent" },
|
|
14
|
+
react_1.default.createElement(CatalogEntityRelationsNodeTypeRow, { isRoot: isRoot },
|
|
15
|
+
isRoot ? (react_1.default.createElement(CatalogEntityIcon_1.CatalogEntityIcon, { entityType: entityType, forceColor: "var(--catalog-entity-relations-node-root-icon-color)" })) : (react_1.default.createElement(CatalogEntityIcon_1.CatalogEntityIcon, { entityType: entityType, defaultColor: false })),
|
|
16
|
+
react_1.default.createElement("span", null, formattedEntityType)),
|
|
17
|
+
react_1.default.createElement(CatalogEntityRelationsNodeLabelRow, { isRoot: isRoot }, label)));
|
|
18
|
+
}
|
|
19
|
+
const CatalogEntityRelationsNodeTypeRow = styled_components_1.default.div `
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: var(--catalog-entity-relations-node-gap);
|
|
23
|
+
line-height: var(--line-height-sm);
|
|
24
|
+
font-size: var(--font-size-sm);
|
|
25
|
+
color: ${({ isRoot }) => isRoot
|
|
26
|
+
? 'var(--catalog-entity-relations-node-root-text-color)'
|
|
27
|
+
: 'var(--text-color-description)'};
|
|
28
|
+
`;
|
|
29
|
+
const CatalogEntityRelationsNodeLabelRow = styled_components_1.default.div `
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: var(--catalog-entity-relations-node-gap);
|
|
33
|
+
line-height: var(--line-height-lg);
|
|
34
|
+
font-size: var(--font-size-lg);
|
|
35
|
+
color: ${({ isRoot }) => isRoot ? 'var(--catalog-entity-relations-node-root-text-color)' : 'var(--text-color-primary)'};
|
|
36
|
+
`;
|
|
37
|
+
const CatalogEntityRelationsNodeContentWrapper = styled_components_1.default.div `
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
align-items: flex-start;
|
|
41
|
+
gap: var(--catalog-entity-relations-node-gap);
|
|
42
|
+
padding: var(--catalog-entity-relations-node-padding);
|
|
43
|
+
border-radius: var(--catalog-entity-relations-node-border-radius);
|
|
44
|
+
font-style: normal;
|
|
45
|
+
font-weight: var(--catalog-entity-relations-node-font-weight);
|
|
46
|
+
background: ${({ isRoot }) => isRoot
|
|
47
|
+
? 'var(--catalog-entity-relations-node-root-bg-color)'
|
|
48
|
+
: 'var(--catalog-entity-relations-node-bg-color)'};
|
|
49
|
+
border: ${({ isRoot }) => isRoot
|
|
50
|
+
? 'none'
|
|
51
|
+
: `var(--catalog-entity-relations-node-border-width) var(--catalog-entity-relations-node-border-style) var(--catalog-entity-relations-node-border-color)`};
|
|
52
|
+
`;
|
|
53
|
+
//# sourceMappingURL=CatalogEntityRelationsNodeContent.js.map
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode.js
CHANGED
|
@@ -6,25 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.CatalogEntityRelationsRootNode = CatalogEntityRelationsRootNode;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const react_2 = require("@xyflow/react");
|
|
9
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
10
|
-
const CatalogEntityIcon_1 = require("../../../../components/Catalog/CatalogEntityIcon");
|
|
11
9
|
const catalog_1 = require("../../../../core/constants/catalog");
|
|
10
|
+
const CatalogEntityRelationsNodeContent_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent");
|
|
12
11
|
function CatalogEntityRelationsRootNode({ label, entityType, className, }) {
|
|
13
|
-
return (react_1.default.createElement(
|
|
14
|
-
react_1.default.createElement(
|
|
15
|
-
react_1.default.createElement("div", null, label),
|
|
12
|
+
return (react_1.default.createElement("div", { className: className, "data-component-name": "Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode" },
|
|
13
|
+
react_1.default.createElement(CatalogEntityRelationsNodeContent_1.CatalogEntityRelationsNodeContent, { entityType: entityType, label: label, isRoot: true }),
|
|
16
14
|
react_1.default.createElement(react_2.Handle, { type: catalog_1.GraphHandleType.Source, position: react_2.Position.Bottom, id: catalog_1.GraphHandleType.Source })));
|
|
17
15
|
}
|
|
18
|
-
const RelationsRootNodeWrapper = styled_components_1.default.div `
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
gap: var(--catalog-entity-relations-node-gap);
|
|
22
|
-
padding: var(--catalog-entity-relations-node-padding);
|
|
23
|
-
border-radius: var(--catalog-entity-relations-node-border-radius);
|
|
24
|
-
font-style: normal;
|
|
25
|
-
font-weight: var(--catalog-entity-relations-node-font-weight-root);
|
|
26
|
-
background: var(--catalog-entity-relations-node-root-bg-color);
|
|
27
|
-
color: var(--catalog-entity-relations-node-root-text-color);
|
|
28
|
-
border: none;
|
|
29
|
-
`;
|
|
30
16
|
//# sourceMappingURL=CatalogEntityRelationsRootNode.js.map
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.js
CHANGED
|
@@ -43,10 +43,13 @@ const RecentlyViewedIcon_1 = require("../../../../icons/RecentlyViewedIcon/Recen
|
|
|
43
43
|
const CheckmarkOutlineIcon_1 = require("../../../../icons/CheckmarkOutlineIcon/CheckmarkOutlineIcon");
|
|
44
44
|
const hooks_1 = require("../../../../core/hooks");
|
|
45
45
|
const constants_1 = require("../../../../core/constants");
|
|
46
|
+
const Tooltip_1 = require("../../../../components/Tooltip/Tooltip");
|
|
47
|
+
const hooks_2 = require("../../../../core/hooks");
|
|
46
48
|
function CatalogEntityHistoryButton({ version, className, }) {
|
|
47
49
|
const [label, setLabel] = (0, react_1.useState)(version === constants_1.VERSION_NOT_SPECIFIED ? null : version);
|
|
48
50
|
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
49
51
|
const { translate } = useTranslate();
|
|
52
|
+
const [labelRef, isLabelTruncated] = (0, hooks_2.useIsTruncated)(label);
|
|
50
53
|
const handleClose = (0, react_1.useCallback)((e) => {
|
|
51
54
|
setLabel(e.detail.version === constants_1.VERSION_NOT_SPECIFIED
|
|
52
55
|
? e.detail.revision || 'r.1'
|
|
@@ -67,12 +70,14 @@ function CatalogEntityHistoryButton({ version, className, }) {
|
|
|
67
70
|
react_1.default.createElement(HistoryIcon, null),
|
|
68
71
|
react_1.default.createElement(HistoryContent, null,
|
|
69
72
|
react_1.default.createElement(HistoryText, null, translate('catalog.history.button.label', 'Version history')),
|
|
70
|
-
label && (react_1.default.createElement(
|
|
71
|
-
react_1.default.createElement(
|
|
72
|
-
|
|
73
|
+
label && (react_1.default.createElement(Tooltip_1.Tooltip, { tip: label, placement: "bottom", arrowPosition: "left", disabled: !isLabelTruncated },
|
|
74
|
+
react_1.default.createElement(VersionPillWrapper, null,
|
|
75
|
+
react_1.default.createElement(VersionPill, null,
|
|
76
|
+
react_1.default.createElement(CheckmarkIcon, null),
|
|
77
|
+
react_1.default.createElement("span", { ref: labelRef }, label)))))))));
|
|
73
78
|
}
|
|
74
79
|
const CatalogHistoryButtonWrapper = styled_components_1.default.div `
|
|
75
|
-
width:
|
|
80
|
+
width: var(--catalog-history-button-width);
|
|
76
81
|
`;
|
|
77
82
|
const Separator = styled_components_1.default.div `
|
|
78
83
|
width: 100%;
|
|
@@ -89,7 +94,7 @@ const HistoryItem = styled_components_1.default.button `
|
|
|
89
94
|
gap: var(--catalog-history-item-gap);
|
|
90
95
|
padding: var(--catalog-history-item-padding);
|
|
91
96
|
margin-bottom: var(--catalog-history-item-margin-bottom);
|
|
92
|
-
width:
|
|
97
|
+
width: var(--catalog-history-button-item-width);
|
|
93
98
|
border-radius: var(--catalog-history-item-border-radius);
|
|
94
99
|
cursor: pointer;
|
|
95
100
|
transition: background-color 0.2s ease;
|
|
@@ -100,18 +105,27 @@ const HistoryItem = styled_components_1.default.button `
|
|
|
100
105
|
`;
|
|
101
106
|
const HistoryContent = styled_components_1.default.div `
|
|
102
107
|
display: flex;
|
|
108
|
+
flex-wrap: wrap;
|
|
103
109
|
align-items: center;
|
|
104
110
|
justify-content: space-between;
|
|
105
111
|
flex: 1;
|
|
106
112
|
gap: var(--catalog-history-item-gap);
|
|
113
|
+
min-width: 0;
|
|
114
|
+
max-width: var(--catalog-history-content-max-width);
|
|
107
115
|
`;
|
|
108
116
|
const HistoryText = styled_components_1.default.span `
|
|
117
|
+
flex: 0 0 auto;
|
|
109
118
|
font-family: var(--catalog-history-text-font-family);
|
|
110
119
|
font-size: var(--catalog-history-text-font-size);
|
|
111
120
|
font-weight: var(--catalog-history-text-font-weight);
|
|
112
121
|
line-height: var(--catalog-history-text-line-height);
|
|
113
122
|
color: var(--catalog-history-text-color);
|
|
114
|
-
|
|
123
|
+
white-space: nowrap;
|
|
124
|
+
`;
|
|
125
|
+
const VersionPillWrapper = styled_components_1.default.div `
|
|
126
|
+
flex: 0 1 auto;
|
|
127
|
+
min-width: 0;
|
|
128
|
+
max-width: var(--catalog-history-content-max-width);
|
|
115
129
|
`;
|
|
116
130
|
const HistoryIcon = (0, styled_components_1.default)(RecentlyViewedIcon_1.RecentlyViewedIcon) `
|
|
117
131
|
width: var(--catalog-history-icon-size);
|
|
@@ -122,23 +136,30 @@ const VersionPill = styled_components_1.default.div `
|
|
|
122
136
|
display: flex;
|
|
123
137
|
align-items: center;
|
|
124
138
|
gap: var(--catalog-history-pill-gap);
|
|
125
|
-
padding: var(--catalog-history-pill-padding-vertical)
|
|
126
|
-
var(--catalog-history-pill-padding-horizontal);
|
|
139
|
+
padding: var(--catalog-history-pill-padding-vertical) var(--catalog-history-pill-padding-horizontal);
|
|
127
140
|
border: 1px solid var(--catalog-history-pill-border-color);
|
|
128
141
|
border-radius: var(--catalog-history-pill-border-radius);
|
|
129
142
|
background-color: transparent;
|
|
130
|
-
|
|
143
|
+
min-width: 0;
|
|
144
|
+
max-width: 100%;
|
|
131
145
|
|
|
132
146
|
span {
|
|
133
147
|
font-family: var(--catalog-history-pill-font-family);
|
|
134
148
|
font-size: var(--catalog-history-pill-font-size);
|
|
135
149
|
line-height: var(--catalog-history-pill-line-height);
|
|
136
150
|
color: var(--catalog-history-pill-text-color);
|
|
151
|
+
overflow: hidden;
|
|
152
|
+
text-overflow: ellipsis;
|
|
153
|
+
white-space: nowrap;
|
|
154
|
+
min-width: 0;
|
|
137
155
|
}
|
|
138
156
|
`;
|
|
139
157
|
const CheckmarkIcon = (0, styled_components_1.default)(CheckmarkOutlineIcon_1.CheckmarkOutlineIcon) `
|
|
140
158
|
width: var(--catalog-history-pill-icon-size);
|
|
141
159
|
height: var(--catalog-history-pill-icon-size);
|
|
160
|
+
min-width: var(--catalog-history-pill-icon-size);
|
|
161
|
+
min-height: var(--catalog-history-pill-icon-size);
|
|
162
|
+
flex-shrink: 0;
|
|
142
163
|
color: var(--catalog-history-pill-icon-color);
|
|
143
164
|
`;
|
|
144
165
|
//# sourceMappingURL=CatalogEntityHistoryButton.js.map
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js
CHANGED
|
@@ -46,6 +46,7 @@ const MenuContainer_1 = require("../../../../components/Menu/MenuContainer");
|
|
|
46
46
|
const utils_1 = require("../../../../core/utils");
|
|
47
47
|
const constants_1 = require("../../../../core/constants");
|
|
48
48
|
const CatalogEntityVersionItem_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem");
|
|
49
|
+
const RecentlyViewedIcon_1 = require("../../../../icons/RecentlyViewedIcon/RecentlyViewedIcon");
|
|
49
50
|
function CatalogEntityHistorySidebar({ entityKey, revision, version, className, }) {
|
|
50
51
|
const [isOpen, setIsOpen] = (0, react_1.useState)(false);
|
|
51
52
|
const location = (0, react_router_dom_1.useLocation)();
|
|
@@ -103,7 +104,9 @@ function CatalogEntityHistorySidebar({ entityKey, revision, version, className,
|
|
|
103
104
|
}
|
|
104
105
|
return (react_1.default.createElement(SidebarOverlay, { className: className, "data-component-name": "Catalog/CatalogHistorySidebar" },
|
|
105
106
|
react_1.default.createElement(SidebarHeader, null,
|
|
106
|
-
react_1.default.createElement(
|
|
107
|
+
react_1.default.createElement(HeaderWrapper, null,
|
|
108
|
+
react_1.default.createElement(HistoryIcon, null),
|
|
109
|
+
react_1.default.createElement(HeaderTitle, null, translate('catalog.history.sidebar.title', 'Version history'))),
|
|
107
110
|
react_1.default.createElement(CloseButton, { onClick: handleClose, "aria-label": translate('catalog.history.sidebar.close', 'Close version history') },
|
|
108
111
|
react_1.default.createElement(CloseIcon_1.CloseIcon, { size: "20px", color: "--catalog-history-sidebar-close-icon-color" }))),
|
|
109
112
|
react_1.default.createElement(MenuContainer_1.MenuContainer, { growContent: true },
|
|
@@ -111,10 +114,10 @@ function CatalogEntityHistorySidebar({ entityKey, revision, version, className,
|
|
|
111
114
|
}
|
|
112
115
|
const SidebarOverlay = styled_components_1.default.div `
|
|
113
116
|
position: fixed;
|
|
114
|
-
top: calc(var(--navbar-height) + var(--banner-height
|
|
117
|
+
top: calc(var(--navbar-height) + var(--banner-height));
|
|
115
118
|
left: 0;
|
|
116
119
|
width: var(--sidebar-width);
|
|
117
|
-
height: calc(100vh - var(--navbar-height) - var(--banner-height
|
|
120
|
+
height: calc(100vh - var(--navbar-height) - var(--banner-height));
|
|
118
121
|
background-color: var(--catalog-history-sidebar-bg-color);
|
|
119
122
|
border-right: 1px solid var(--catalog-history-sidebar-border-color);
|
|
120
123
|
display: flex;
|
|
@@ -160,4 +163,14 @@ const VersionList = styled_components_1.default.ul `
|
|
|
160
163
|
padding: var(--catalog-history-sidebar-content-padding);
|
|
161
164
|
margin-top: var(--catalog-history-sidebar-content-margin-top);
|
|
162
165
|
`;
|
|
166
|
+
const HistoryIcon = (0, styled_components_1.default)(RecentlyViewedIcon_1.RecentlyViewedIcon) `
|
|
167
|
+
width: var(--catalog-history-icon-size);
|
|
168
|
+
height: var(--catalog-history-icon-size);
|
|
169
|
+
flex-shrink: 0;
|
|
170
|
+
`;
|
|
171
|
+
const HeaderWrapper = styled_components_1.default.div `
|
|
172
|
+
display: flex;
|
|
173
|
+
align-items: center;
|
|
174
|
+
gap: var(--spacing-xs);
|
|
175
|
+
`;
|
|
163
176
|
//# sourceMappingURL=CatalogEntityHistorySidebar.js.map
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.js
CHANGED
|
@@ -71,17 +71,18 @@ function CatalogEntityVersionItem({ group, basePath, isExpanded, onToggle, }) {
|
|
|
71
71
|
const isNotSpecifiedVersion = group.version === constants_1.VERSION_NOT_SPECIFIED;
|
|
72
72
|
const singleRevisionLink = (0, utils_1.buildRevisionUrl)(basePath, group.singleRevisionDate, group.version);
|
|
73
73
|
const versionTitle = isNotSpecifiedVersion
|
|
74
|
-
? `${translate('catalog.history.version.label', 'Version')}
|
|
75
|
-
: `${translate('catalog.history.version.label', 'Version')}
|
|
74
|
+
? `${translate('catalog.history.version.label', 'Version')}:\u00a0${translate('catalog.history.version.notSpecified', 'not specified')}`
|
|
75
|
+
: `${translate('catalog.history.version.label', 'Version')}:\u00a0${group.version}`;
|
|
76
76
|
const versionButton = (react_1.default.createElement(VersionButton, { type: "button", onClick: () => hasRevisions && onToggle(group.version), "$isCurrent": group.isCurrent },
|
|
77
77
|
react_1.default.createElement(VersionIcon, { "$isCurrent": group.isCurrent }, group.isCurrent ? (react_1.default.createElement(CheckmarkOutlineIcon_1.CheckmarkOutlineIcon, { size: "16px", color: "--catalog-history-sidebar-version-icon-color-current" })) : (react_1.default.createElement(NavaidMilitaryIcon_1.NavaidMilitaryIcon, { size: "16px", color: "--catalog-history-sidebar-version-icon-color" }))),
|
|
78
78
|
react_1.default.createElement(VersionInfo, null,
|
|
79
79
|
react_1.default.createElement(VersionTitleRow, null,
|
|
80
80
|
react_1.default.createElement(VersionTitle, null, versionTitle),
|
|
81
|
-
group.isDefaultVersion && (react_1.default.createElement(Tag_1.Tag, { color: "grey", borderless: true, textTransform: "
|
|
81
|
+
group.isDefaultVersion && (react_1.default.createElement(Tag_1.Tag, { color: "grey", borderless: true, textTransform: "lowercase", style: {
|
|
82
82
|
fontSize: 'var(--font-size-xs)',
|
|
83
83
|
borderRadius: 'var(--catalog-history-sidebar-version-tag-border-radius)',
|
|
84
84
|
flexShrink: 0,
|
|
85
|
+
marginLeft: 'var(--spacing-xxs)',
|
|
85
86
|
} }, translate('catalog.history.version.default', 'default')))),
|
|
86
87
|
!isNotSpecifiedVersion && react_1.default.createElement(VersionDate, null, group.date)),
|
|
87
88
|
hasRevisions && (react_1.default.createElement(ChevronIcon, null, isExpanded ? (react_1.default.createElement(ChevronDownIcon_1.ChevronDownIcon, { size: "16px", color: "--catalog-history-sidebar-chevron-icon-color" })) : (react_1.default.createElement(ChevronRightIcon_1.ChevronRightIcon, { size: "16px", color: "--catalog-history-sidebar-chevron-icon-color" }))))));
|
|
@@ -156,6 +157,8 @@ const VersionTitle = styled_components_1.default.span `
|
|
|
156
157
|
color: var(--catalog-history-sidebar-version-title-color);
|
|
157
158
|
flex-shrink: 1;
|
|
158
159
|
min-width: 0;
|
|
160
|
+
overflow-wrap: break-word;
|
|
161
|
+
word-break: break-word;
|
|
159
162
|
`;
|
|
160
163
|
const VersionDate = styled_components_1.default.span `
|
|
161
164
|
font-family: var(--catalog-history-sidebar-version-date-font-family);
|
|
@@ -176,6 +179,7 @@ const RevisionsList = styled_components_1.default.ul `
|
|
|
176
179
|
margin: 0;
|
|
177
180
|
padding: 0;
|
|
178
181
|
padding-left: var(--catalog-history-sidebar-revisions-padding-left);
|
|
182
|
+
padding-bottom: var(--catalog-history-sidebar-revisions-padding-bottom);
|
|
179
183
|
position: relative;
|
|
180
184
|
|
|
181
185
|
&::before {
|
|
@@ -183,7 +187,7 @@ const RevisionsList = styled_components_1.default.ul `
|
|
|
183
187
|
position: absolute;
|
|
184
188
|
left: 22px;
|
|
185
189
|
top: 0;
|
|
186
|
-
bottom:
|
|
190
|
+
bottom: var(--catalog-history-sidebar-revisions-padding-bottom);
|
|
187
191
|
width: 1px;
|
|
188
192
|
background-color: var(
|
|
189
193
|
--catalog-history-sidebar-revision-line-color,
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js
CHANGED
|
@@ -14,6 +14,7 @@ const DomainsProperty_1 = require("../../../../components/Catalog/CatalogEntity/
|
|
|
14
14
|
const OwnersProperty_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty");
|
|
15
15
|
const ContactProperty_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty");
|
|
16
16
|
const FormatProperty_1 = require("../../../../components/Catalog/CatalogEntity/CatalogEntityProperties/FormatProperty");
|
|
17
|
+
const core_1 = require("../../../../core");
|
|
17
18
|
const propertyRenderers = [
|
|
18
19
|
{
|
|
19
20
|
key: 'type',
|
|
@@ -58,14 +59,19 @@ const propertyRenderers = [
|
|
|
58
59
|
];
|
|
59
60
|
function CatalogEntityProperties({ entity }) {
|
|
60
61
|
const renderers = propertyRenderers.filter((renderer) => renderer.condition(entity));
|
|
61
|
-
|
|
62
|
-
? 'repeat(2, 1fr)'
|
|
63
|
-
: 'repeat(3, 1fr)';
|
|
64
|
-
return (react_1.default.createElement(CatalogEntityPropertiesGridWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties", gridTemplateColumns: gridTemplateColumns }, renderers.map((renderer) => (react_1.default.createElement(renderer.component, { key: renderer.key + entity.id, entity: entity })))));
|
|
62
|
+
return (react_1.default.createElement(CatalogEntityPropertiesGridWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties" }, renderers.map((renderer) => (react_1.default.createElement(renderer.component, { key: renderer.key + entity.id, entity: entity })))));
|
|
65
63
|
}
|
|
66
64
|
const CatalogEntityPropertiesGridWrapper = styled_components_1.default.div `
|
|
67
65
|
display: grid;
|
|
68
|
-
grid-template-columns: ${({ gridTemplateColumns }) => gridTemplateColumns};
|
|
69
66
|
gap: var(--spacing-base);
|
|
67
|
+
grid-template-columns: 1fr;
|
|
68
|
+
|
|
69
|
+
@media screen and (min-width: ${core_1.breakpoints.small}) {
|
|
70
|
+
grid-template-columns: repeat(2, 1fr);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@media screen and (min-width: ${core_1.breakpoints.max}) {
|
|
74
|
+
grid-template-columns: repeat(3, 1fr);
|
|
75
|
+
}
|
|
70
76
|
`;
|
|
71
77
|
//# sourceMappingURL=CatalogEntityProperties.js.map
|
|
@@ -16,7 +16,7 @@ function DomainsProperty({ entity }) {
|
|
|
16
16
|
return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty" },
|
|
17
17
|
react_1.default.createElement(CatalogEntityPropertyCard_1.CatalogEntityPropertyCard, { header: react_1.default.createElement(react_1.default.Fragment, null,
|
|
18
18
|
react_1.default.createElement(GraphIcon_1.GraphIcon, null),
|
|
19
|
-
translate('catalog.domains.label', 'Domains')), content: react_1.default.createElement(react_1.default.Fragment, null, domains === null || domains === void 0 ? void 0 : domains.map((domain) => (react_1.default.createElement(Tag_1.Tag, { key: domain === null || domain === void 0 ? void 0 : domain.id, style: { backgroundColor: 'var(--bg-color)' } },
|
|
19
|
+
translate('catalog.domains.label', 'Domains')), content: react_1.default.createElement(react_1.default.Fragment, null, domains === null || domains === void 0 ? void 0 : domains.map((domain) => (react_1.default.createElement(Tag_1.Tag, { key: domain === null || domain === void 0 ? void 0 : domain.id, style: { backgroundColor: 'var(--bg-color)' }, variant: "outline" },
|
|
20
20
|
react_1.default.createElement(GraphIcon_1.GraphIcon, null), domain === null || domain === void 0 ? void 0 :
|
|
21
21
|
domain.title)))) })));
|
|
22
22
|
}
|
|
@@ -19,6 +19,6 @@ function OwnersProperty({ entity }) {
|
|
|
19
19
|
translate('catalog.owners.label', 'Owners')), content: react_1.default.createElement(react_1.default.Fragment, null, owners.map((owner) => (react_1.default.createElement(Tag_1.Tag, { key: owner === null || owner === void 0 ? void 0 : owner.id, style: {
|
|
20
20
|
backgroundColor: 'var(--bg-color)',
|
|
21
21
|
borderRadius: 'var(--border-radius-xl)',
|
|
22
|
-
} }, owner === null || owner === void 0 ? void 0 : owner.title)))) })));
|
|
22
|
+
}, variant: "outline" }, owner === null || owner === void 0 ? void 0 : owner.title)))) })));
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=OwnersProperty.js.map
|
|
@@ -13,7 +13,7 @@ const MoleculesIcon_1 = require("../../../../icons/MoleculesIcon/MoleculesIcon")
|
|
|
13
13
|
const NetworkIcon_1 = require("../../../../icons/NetworkIcon/NetworkIcon");
|
|
14
14
|
function CatalogEntityApiDescriptionRelations({ entity, relations, query, searchQuery, setSearchQuery, setFilter, entitiesCatalogConfig, catalogConfig, sortOption, setSortOption, handleSortClick, isColumnSorted, shouldShowLoadMore, }) {
|
|
15
15
|
return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations" },
|
|
16
|
-
react_1.default.createElement(Tabs_1.Tabs, { key: entity.id,
|
|
16
|
+
react_1.default.createElement(Tabs_1.Tabs, { key: entity.id, size: Tabs_1.TabsSize.MEDIUM },
|
|
17
17
|
react_1.default.createElement(TabItem, { label: "Operations", icon: react_1.default.createElement(MoleculesIcon_1.MoleculesIcon, null), onClick: () => setFilter('type:api-operation') },
|
|
18
18
|
react_1.default.createElement(CatalogEntityDefaultRelations_1.CatalogEntityDefaultRelations, { key: "operations-table", entity: entity, relations: relations, query: query, searchQuery: searchQuery, setSearchQuery: setSearchQuery, entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, sortOption: sortOption, setSortOption: setSortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted, shouldShowLoadMore: shouldShowLoadMore, shouldShowHeading: false, listType: "api-operation" })),
|
|
19
19
|
react_1.default.createElement(TabItem, { label: "Schemas", icon: react_1.default.createElement(NetworkIcon_1.NetworkIcon, null), onClick: () => setFilter('type:data-schema') },
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js
CHANGED
|
@@ -34,11 +34,14 @@ function CatalogEntityRelationsTable({ entity, entitiesCatalogConfig, catalogCon
|
|
|
34
34
|
]);
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
return (react_1.default.createElement(
|
|
37
|
+
return (react_1.default.createElement(CatalogEntityRelationsTableWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable" },
|
|
38
38
|
heading && react_1.default.createElement(Heading, null, heading),
|
|
39
39
|
react_1.default.createElement(CatalogActionsRow_1.CatalogActionsRow, { searchQuery: searchQuery, setSearchQuery: setSearchQuery, sortOption: sortOption, setSortOption: setSortOption, style: { marginBottom: '12px' } }),
|
|
40
40
|
react_1.default.createElement(CatalogEntityRelationsTableContent_1.CatalogEntityRelationsTableContent, { entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, relations: relations, query: query, searchQuery: searchQuery, columns: columns, setSortOption: setSortOption, sortOption: sortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted, shouldShowLoadMore: shouldShowLoadMore, listType: listType, onRowClick: onRowClick })));
|
|
41
41
|
}
|
|
42
|
+
const CatalogEntityRelationsTableWrapper = styled_components_1.default.div `
|
|
43
|
+
min-width: 0;
|
|
44
|
+
`;
|
|
42
45
|
const Heading = styled_components_1.default.h2 `
|
|
43
46
|
margin: var(--spacing-base) 0;
|
|
44
47
|
font-size: var(--font-size-md);
|
|
@@ -5,14 +5,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CatalogEntityRelationsTableContent = CatalogEntityRelationsTableContent;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
9
|
const ArrowDownIcon_1 = require("../../../../icons/ArrowDownIcon/ArrowDownIcon");
|
|
9
10
|
const LoadMore_1 = require("../../../../components/LoadMore/LoadMore");
|
|
10
11
|
const CatalogTableView_1 = require("../../../../components/Catalog/CatalogTableView/CatalogTableView");
|
|
11
12
|
const CatalogHighlight_1 = require("../../../../components/Catalog/CatalogHighlight");
|
|
12
13
|
const CatalogEntitiesEmptyState_1 = require("../../../../components/Catalog/CatalogEntitiesEmptyState");
|
|
13
14
|
function CatalogEntityRelationsTableContent({ entitiesCatalogConfig, catalogConfig, relations, query, searchQuery, columns, setSortOption, sortOption, handleSortClick, isColumnSorted, shouldShowLoadMore, listType, onRowClick, }) {
|
|
14
|
-
return (react_1.default.createElement(
|
|
15
|
-
react_1.default.createElement(CatalogHighlight_1.HighlightContext.Provider, { value: [searchQuery] }, relations.length > 0 ? (react_1.default.createElement(CatalogTableView_1.CatalogTableView, { entities: relations, entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, columns: columns, setSortOption: setSortOption, currentSortOption: sortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted, style: { marginTop: 0 }, onRowClick: onRowClick })) : (react_1.default.createElement(CatalogEntitiesEmptyState_1.CatalogEntitiesEmptyState, { listType: listType }))),
|
|
15
|
+
return (react_1.default.createElement(TableContentWrapper, { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent" },
|
|
16
|
+
react_1.default.createElement(CatalogHighlight_1.HighlightContext.Provider, { value: [searchQuery] }, relations.length > 0 ? (react_1.default.createElement(CatalogTableView_1.CatalogTableView, { entities: relations, entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, columns: columns, setSortOption: setSortOption, currentSortOption: sortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted, style: { marginTop: 0 }, onRowClick: onRowClick, contentMinWidth: TABLE_SCROLL_MIN_WIDTH_PX })) : (react_1.default.createElement(CatalogEntitiesEmptyState_1.CatalogEntitiesEmptyState, { listType: listType }))),
|
|
16
17
|
shouldShowLoadMore && (react_1.default.createElement(LoadMore_1.LoadMore, { icon: react_1.default.createElement(ArrowDownIcon_1.ArrowDownIcon, { size: "var(--catalog-load-more-icon-size)" }), onClick: query.fetchNextPage, disabled: query.isFetchingNextPage, blinking: query.isFetchingNextPage, label: query.isFetchingNextPage ? 'Loading...' : 'Load More' }))));
|
|
17
18
|
}
|
|
19
|
+
const TABLE_SCROLL_MIN_WIDTH_PX = 608;
|
|
20
|
+
const TableContentWrapper = styled_components_1.default.div `
|
|
21
|
+
min-width: 0; /* Constrain width so table overflow-x scroll works inside tabs */
|
|
22
|
+
`;
|
|
18
23
|
//# sourceMappingURL=CatalogEntityRelationsTableContent.js.map
|
package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js
CHANGED
|
@@ -40,7 +40,7 @@ const teamColumns = [
|
|
|
40
40
|
];
|
|
41
41
|
function CatalogEntityTeamRelations({ entity, relations, query, searchQuery, setSearchQuery, setFilter, entitiesCatalogConfig, catalogConfig, sortOption, setSortOption, handleSortClick, isColumnSorted, shouldShowLoadMore, }) {
|
|
42
42
|
return (react_1.default.createElement("div", { "data-component-name": "Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations" },
|
|
43
|
-
react_1.default.createElement(Tabs_1.Tabs, {
|
|
43
|
+
react_1.default.createElement(Tabs_1.Tabs, { size: Tabs_1.TabsSize.MEDIUM },
|
|
44
44
|
react_1.default.createElement(TabItem, { label: "Members", icon: react_1.default.createElement(PeopleIcon_1.PeopleIcon, null), onClick: () => setFilter('type:user') },
|
|
45
45
|
react_1.default.createElement(CatalogEntityRelationsTable_1.CatalogEntityRelationsTable, { key: "members-table", entity: entity, entitiesCatalogConfig: entitiesCatalogConfig, catalogConfig: catalogConfig, relations: relations, query: query, searchQuery: searchQuery, setSearchQuery: setSearchQuery, columns: teamColumns, sortOption: sortOption, setSortOption: setSortOption, handleSortClick: handleSortClick, isColumnSorted: isColumnSorted, shouldShowLoadMore: shouldShowLoadMore, listType: "team" })),
|
|
46
46
|
react_1.default.createElement(TabItem, { label: "Related entities", icon: react_1.default.createElement(EntityTypeIcon_1.EntityTypeIcon, null), onClick: () => setFilter('-type:user') },
|
|
@@ -104,7 +104,7 @@ const SplitViewWrapper = styled_components_1.default.div `
|
|
|
104
104
|
const SchemaSampleWrapper = styled_components_1.default.div `
|
|
105
105
|
flex: 1;
|
|
106
106
|
position: sticky;
|
|
107
|
-
top: calc(var(--navbar-height) + var(--spacing-md));
|
|
107
|
+
top: calc(var(--navbar-height) + var(--banner-height) + var(--spacing-md));
|
|
108
108
|
align-self: flex-start;
|
|
109
109
|
padding-top: var(--spacing-sm);
|
|
110
110
|
`;
|
|
@@ -155,6 +155,6 @@ const FilterCheckboxOption = (0, styled_components_1.default)(FilterOption_1.Fil
|
|
|
155
155
|
padding-left: var(--filter-option-checkbox-padding-left);
|
|
156
156
|
`;
|
|
157
157
|
const FilterSearchWrapper = styled_components_1.default.div `
|
|
158
|
-
padding: var(--
|
|
158
|
+
padding-bottom: var(--spacing-xs);
|
|
159
159
|
`;
|
|
160
160
|
//# sourceMappingURL=CatalogFilterCheckboxes.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JSX } from 'react';
|
|
1
|
+
import type { JSX, ReactNode } from 'react';
|
|
2
2
|
import type { ResolvedFilter } from '../../../core/types';
|
|
3
3
|
import type { RedoclyConfig } from '../../../config';
|
|
4
4
|
export type CatalogFilterContentProps = {
|
|
@@ -7,6 +7,8 @@ export type CatalogFilterContentProps = {
|
|
|
7
7
|
filterTerm: string;
|
|
8
8
|
filterValuesCasing?: NonNullable<RedoclyConfig['catalog']>[string]['filterValuesCasing'] | ((str: string) => string);
|
|
9
9
|
showCounter?: boolean;
|
|
10
|
+
catalogSelector?: ReactNode;
|
|
11
|
+
searchInput?: ReactNode;
|
|
10
12
|
className?: string;
|
|
11
13
|
};
|
|
12
|
-
export declare function CatalogFilterContent({ onClear, filters, filterTerm, filterValuesCasing, showCounter, className, }: CatalogFilterContentProps): JSX.Element | null;
|
|
14
|
+
export declare function CatalogFilterContent({ onClear, filters, filterTerm, filterValuesCasing, showCounter, catalogSelector, searchInput, className, }: CatalogFilterContentProps): JSX.Element | null;
|
|
@@ -10,7 +10,8 @@ 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
|
-
|
|
13
|
+
const utils_2 = require("../../../core/utils");
|
|
14
|
+
function CatalogFilterContent({ onClear, filters, filterTerm, filterValuesCasing, showCounter = true, catalogSelector, searchInput, className, }) {
|
|
14
15
|
const { useTranslate } = (0, hooks_1.useThemeHooks)();
|
|
15
16
|
const { translate } = useTranslate();
|
|
16
17
|
const hasActiveFilters = filters.some((filter) => {
|
|
@@ -19,7 +20,7 @@ function CatalogFilterContent({ onClear, filters, filterTerm, filterValuesCasing
|
|
|
19
20
|
if (filter.selectedOptions && filter.selectedOptions instanceof Set) {
|
|
20
21
|
return filter.selectedOptions.size;
|
|
21
22
|
}
|
|
22
|
-
else if ((0,
|
|
23
|
+
else if ((0, utils_2.isFromToSelectedOptions)(filter.selectedOptions) &&
|
|
23
24
|
filter.selectedOptions.from &&
|
|
24
25
|
filter.selectedOptions.to) {
|
|
25
26
|
return true;
|
|
@@ -29,14 +30,17 @@ function CatalogFilterContent({ onClear, filters, filterTerm, filterValuesCasing
|
|
|
29
30
|
filters.forEach((filter) => filter.selectOption(''));
|
|
30
31
|
onClear();
|
|
31
32
|
};
|
|
32
|
-
if (!filters.length) {
|
|
33
|
+
if (!filters.length && !catalogSelector) {
|
|
33
34
|
return null;
|
|
34
35
|
}
|
|
35
36
|
return (react_1.default.createElement(CatalogFilterContentWrapper, { className: className, "data-component-name": "Catalog/CatalogFilterContent" },
|
|
36
37
|
react_1.default.createElement(FiltersHeader, null,
|
|
37
38
|
react_1.default.createElement(FiltersTitle, { "data-translation-key": "catalog.filters.title" }, translate('catalog.filters.title', 'Filters')),
|
|
38
|
-
hasActiveFilters ? (react_1.default.createElement(Button_1.Button, { size: "medium",
|
|
39
|
-
react_1.default.createElement(
|
|
39
|
+
hasActiveFilters ? (react_1.default.createElement(Button_1.Button, { size: "medium", variant: "ghost", onClick: handleClearAll }, translate('catalog.filters.clearAll', 'Clear filters'))) : null),
|
|
40
|
+
searchInput ? react_1.default.createElement(FiltersSearchWrapper, null, searchInput) : null,
|
|
41
|
+
react_1.default.createElement(FilterItems, null,
|
|
42
|
+
catalogSelector ? (react_1.default.createElement(CatalogSelectorItemWrapper, null, catalogSelector)) : null,
|
|
43
|
+
filters.map((filter, idx) => (react_1.default.createElement(CatalogFilter_1.CatalogFilter, { filter: filter, key: filter.property + '-' + idx, filterValuesCasing: filterValuesCasing, showCounter: showCounter }))))));
|
|
40
44
|
}
|
|
41
45
|
const CatalogFilterContentWrapper = styled_components_1.default.div `
|
|
42
46
|
padding: 0 0 var(--filter-content-padding-vertical) 0;
|
|
@@ -45,8 +49,7 @@ const CatalogFilterContentWrapper = styled_components_1.default.div `
|
|
|
45
49
|
`;
|
|
46
50
|
const FiltersHeader = styled_components_1.default.div `
|
|
47
51
|
display: flex;
|
|
48
|
-
padding: var(--filter-content-header-padding
|
|
49
|
-
var(--filter-content-header-padding-horizontal);
|
|
52
|
+
padding: var(--catalog-filter-content-header-padding);
|
|
50
53
|
`;
|
|
51
54
|
const FiltersTitle = styled_components_1.default.div `
|
|
52
55
|
margin-right: auto;
|
|
@@ -54,10 +57,24 @@ const FiltersTitle = styled_components_1.default.div `
|
|
|
54
57
|
font-weight: var(--filter-content-title-font-weight);
|
|
55
58
|
line-height: var(--filter-content-title-line-height);
|
|
56
59
|
`;
|
|
60
|
+
const CatalogSelectorItemWrapper = styled_components_1.default.div `
|
|
61
|
+
padding: var(--filter-group-padding);
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
gap: var(--filter-group-gap);
|
|
65
|
+
border-bottom: 1px solid var(--catalog-table-border-color);
|
|
66
|
+
`;
|
|
67
|
+
const FiltersSearchWrapper = styled_components_1.default.div `
|
|
68
|
+
padding: 0 var(--spacing-base) var(--spacing-base) var(--spacing-base);
|
|
69
|
+
|
|
70
|
+
@media screen and (min-width: ${utils_1.breakpoints.medium}) {
|
|
71
|
+
display: none;
|
|
72
|
+
}
|
|
73
|
+
`;
|
|
57
74
|
const FilterItems = styled_components_1.default.div `
|
|
58
75
|
height: 100%;
|
|
59
76
|
display: flex;
|
|
60
77
|
flex-direction: column;
|
|
61
|
-
border-top: 1px solid var(--border-color
|
|
78
|
+
border-top: 1px solid var(--catalog-table-border-color);
|
|
62
79
|
`;
|
|
63
80
|
//# sourceMappingURL=CatalogFilterContent.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React, { JSX } from 'react';
|
|
2
|
+
type CatalogMobileFiltersPanelProps = {
|
|
3
|
+
setMobileFiltersPanelOpen: (open: boolean) => void;
|
|
4
|
+
filterContent: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export declare function CatalogMobileFiltersPanel({ setMobileFiltersPanelOpen, filterContent, }: CatalogMobileFiltersPanelProps): JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -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.CatalogMobileFiltersPanel = CatalogMobileFiltersPanel;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const CatalogMobileFiltersPanelHeader_1 = require("../../../components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader");
|
|
10
|
+
function CatalogMobileFiltersPanel({ setMobileFiltersPanelOpen, filterContent, }) {
|
|
11
|
+
return (react_1.default.createElement(CatalogMobileFiltersPanelWrapper, null,
|
|
12
|
+
react_1.default.createElement(CatalogMobileFiltersPanelHeader_1.CatalogMobileFiltersPanelHeader, { setMobileFiltersPanelOpen: setMobileFiltersPanelOpen }),
|
|
13
|
+
filterContent));
|
|
14
|
+
}
|
|
15
|
+
const CatalogMobileFiltersPanelWrapper = styled_components_1.default.div `
|
|
16
|
+
width: 100%;
|
|
17
|
+
max-height: calc(100vh - var(--navbar-height) - var(--banner-height));
|
|
18
|
+
overflow-y: auto;
|
|
19
|
+
background: var(--sidebar-bg-color);
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
height: 100%;
|
|
23
|
+
`;
|
|
24
|
+
//# sourceMappingURL=CatalogMobileFiltersPanel.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
type CatalogMobileFiltersPanelHeaderProps = {
|
|
3
|
+
setMobileFiltersPanelOpen: (open: boolean) => void;
|
|
4
|
+
};
|
|
5
|
+
export declare function CatalogMobileFiltersPanelHeader({ setMobileFiltersPanelOpen, }: CatalogMobileFiltersPanelHeaderProps): JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
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.CatalogMobileFiltersPanelHeader = CatalogMobileFiltersPanelHeader;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
|
+
const Button_1 = require("../../../components/Button/Button");
|
|
10
|
+
const core_1 = require("../../../core");
|
|
11
|
+
function CatalogMobileFiltersPanelHeader({ setMobileFiltersPanelOpen, }) {
|
|
12
|
+
const { useTranslate } = (0, core_1.useThemeHooks)();
|
|
13
|
+
const { translate } = useTranslate();
|
|
14
|
+
return (react_1.default.createElement(CatalogMobileFiltersPanelHeaderWrapper, null,
|
|
15
|
+
react_1.default.createElement("span", null),
|
|
16
|
+
react_1.default.createElement(Button_1.Button, { variant: "ghost", size: "medium", onClick: () => setMobileFiltersPanelOpen(false) }, translate('catalog.filters.close', 'Close'))));
|
|
17
|
+
}
|
|
18
|
+
const CatalogMobileFiltersPanelHeaderWrapper = styled_components_1.default.div `
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
padding: var(--catalog-filter-content-header-padding);
|
|
23
|
+
border-bottom: 1px solid var(--border-color-secondary);
|
|
24
|
+
flex-shrink: 0;
|
|
25
|
+
`;
|
|
26
|
+
//# sourceMappingURL=CatalogMobileFiltersPanelHeader.js.map
|
package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React, { JSX } from 'react';
|
|
2
|
+
type CatalogMobileFiltersPanelOverlayProps = {
|
|
3
|
+
setMobileFiltersPanelOpen: (open: boolean) => void;
|
|
4
|
+
filterContent: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export declare function CatalogMobileFiltersPanelOverlay({ setMobileFiltersPanelOpen, filterContent, }: CatalogMobileFiltersPanelOverlayProps): JSX.Element;
|
|
7
|
+
export {};
|