@redocly/theme 0.57.0-next.0 → 0.57.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Catalog/CatalogCardView/CatalogCard.js +1 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +36 -25
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsEdge.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsEdge.js +38 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.js +83 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.d.ts +2 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.js +29 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsLinkedNode.d.ts +8 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsLinkedNode.js +33 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNode.d.ts +16 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNode.js +24 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode.d.ts +7 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode.js +30 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.js +5 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.d.ts +1 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +7 -3
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +3 -8
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.d.ts +22 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.js +18 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +2 -2
- package/lib/components/Catalog/CatalogEntityIcon.d.ts +2 -1
- package/lib/components/Catalog/CatalogEntityIcon.js +4 -6
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.js +1 -1
- package/lib/components/Catalog/variables.js +42 -0
- package/lib/components/CatalogClassic/CatalogClassicVirtualizedGroups.js +13 -8
- package/lib/core/constants/catalog.d.ts +10 -0
- package/lib/core/constants/catalog.js +14 -1
- package/lib/core/hooks/__mocks__/search/use-recent-searches.d.ts +2 -2
- package/lib/core/hooks/__mocks__/search/use-recent-searches.js +2 -1
- package/lib/core/hooks/__mocks__/search/use-search-filter.d.ts +2 -2
- package/lib/core/hooks/__mocks__/search/use-search-filter.js +2 -1
- package/lib/core/hooks/__mocks__/search/use-suggested-pages.d.ts +2 -2
- package/lib/core/hooks/__mocks__/search/use-suggested-pages.js +2 -1
- package/lib/core/hooks/__mocks__/use-controlled-state.d.ts +1 -1
- package/lib/core/hooks/__mocks__/use-controlled-state.js +2 -1
- package/lib/core/hooks/__mocks__/use-input-key-commands.d.ts +3 -3
- package/lib/core/hooks/__mocks__/use-input-key-commands.js +3 -2
- package/lib/core/hooks/__mocks__/use-mobile-menu.d.ts +1 -1
- package/lib/core/hooks/__mocks__/use-mobile-menu.js +2 -1
- package/lib/core/hooks/__mocks__/use-theme-config.d.ts +2 -2
- package/lib/core/hooks/__mocks__/use-theme-config.js +2 -1
- package/lib/core/hooks/__mocks__/use-theme-hooks.d.ts +47 -47
- package/lib/core/hooks/__mocks__/use-theme-hooks.js +38 -37
- package/lib/core/hooks/__mocks__/use-time-ago.d.ts +2 -2
- package/lib/core/hooks/__mocks__/use-time-ago.js +2 -1
- package/lib/core/hooks/catalog/useGraph.d.ts +15 -0
- package/lib/core/hooks/catalog/useGraph.js +165 -0
- package/lib/core/hooks/code-walkthrough/__mocks__/MockIntersectionObserver.js +4 -3
- package/lib/core/hooks/index.d.ts +1 -0
- package/lib/core/hooks/index.js +1 -0
- package/lib/core/hooks/menu/__mocks__/use-mobile-menu-items.d.ts +1 -1
- package/lib/core/hooks/menu/__mocks__/use-mobile-menu-items.js +2 -1
- package/lib/core/hooks/use-page-actions.js +5 -1
- package/lib/core/openapi/index.d.ts +1 -0
- package/lib/core/openapi/index.js +3 -1
- package/lib/core/styles/index.d.ts +1 -0
- package/lib/core/styles/index.js +3 -0
- package/lib/core/styles/xyflow.d.ts +1 -0
- package/lib/core/styles/xyflow.js +623 -0
- package/lib/core/utils/dynamic.d.ts +9 -0
- package/lib/core/utils/dynamic.js +59 -0
- package/lib/core/utils/index.d.ts +1 -0
- package/lib/core/utils/index.js +1 -0
- package/lib/icons/GenericIcon/GenericIcon.d.ts +2 -2
- package/lib/icons/GenericIcon/GenericIcon.js +8 -3
- package/lib/icons/__tests__/IconTestUtils.d.ts +0 -1
- package/lib/icons/__tests__/IconTestUtils.js +8 -7
- package/package.json +11 -14
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +1 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +60 -42
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsEdge.tsx +63 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.tsx +7 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.tsx +91 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsLinkedNode.tsx +48 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNode.tsx +45 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode.tsx +49 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.tsx +6 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +8 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +24 -43
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.tsx +76 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +2 -2
- package/src/components/Catalog/CatalogEntityIcon.tsx +7 -5
- package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +1 -1
- package/src/components/Catalog/variables.ts +42 -0
- package/src/components/CatalogClassic/CatalogClassicVirtualizedGroups.tsx +29 -18
- package/src/core/constants/catalog.ts +13 -0
- package/src/core/hooks/__mocks__/search/use-recent-searches.ts +3 -1
- package/src/core/hooks/__mocks__/search/use-search-filter.ts +3 -1
- package/src/core/hooks/__mocks__/search/use-suggested-pages.ts +3 -1
- package/src/core/hooks/__mocks__/use-controlled-state.ts +3 -1
- package/src/core/hooks/__mocks__/use-input-key-commands.ts +4 -2
- package/src/core/hooks/__mocks__/use-mobile-menu.ts +3 -1
- package/src/core/hooks/__mocks__/use-theme-config.ts +3 -1
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +39 -37
- package/src/core/hooks/__mocks__/use-time-ago.ts +3 -1
- package/src/core/hooks/catalog/useGraph.ts +236 -0
- package/src/core/hooks/code-walkthrough/__mocks__/MockIntersectionObserver.ts +5 -3
- package/src/core/hooks/index.ts +1 -0
- package/src/core/hooks/menu/__mocks__/use-mobile-menu-items.ts +3 -1
- package/src/core/hooks/use-page-actions.ts +5 -1
- package/src/core/openapi/index.ts +1 -0
- package/src/core/styles/index.ts +1 -0
- package/src/core/styles/xyflow.ts +620 -0
- package/src/core/utils/dynamic.tsx +85 -0
- package/src/core/utils/index.ts +1 -0
- package/src/icons/GenericIcon/GenericIcon.tsx +13 -4
- package/src/icons/__tests__/IconTestUtils.tsx +5 -4
|
@@ -384,5 +384,47 @@ exports.catalog = (0, styled_components_1.css) `
|
|
|
384
384
|
|
|
385
385
|
--catalog-avatar-bg-color: #ededf2;
|
|
386
386
|
// @tokens End
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* @tokens Catalog entity relations node
|
|
390
|
+
*/
|
|
391
|
+
--catalog-entity-relations-node-padding-vertical: 10px;
|
|
392
|
+
--catalog-entity-relations-node-padding-horizontal: 14px;
|
|
393
|
+
--catalog-entity-relations-node-padding: var(--catalog-entity-relations-node-padding-vertical) var(--catalog-entity-relations-node-padding-horizontal);
|
|
394
|
+
--catalog-entity-relations-node-gap: 8px;
|
|
395
|
+
--catalog-entity-relations-node-border-radius: 10px;
|
|
396
|
+
|
|
397
|
+
--catalog-entity-relations-node-bg-color: var(--layer-color);
|
|
398
|
+
--catalog-entity-relations-node-text-color: var(--catalog-card-text-color);
|
|
399
|
+
|
|
400
|
+
--catalog-entity-relations-node-border-color: var(--border-color-secondary);
|
|
401
|
+
--catalog-entity-relations-node-border-width: var(--border-width);
|
|
402
|
+
--catalog-entity-relations-node-border-style: var(--border-style);
|
|
403
|
+
|
|
404
|
+
--catalog-entity-relations-node-font-weight: var(--font-weight-regular);
|
|
405
|
+
--catalog-entity-relations-node-font-weight-root: 600;
|
|
406
|
+
|
|
407
|
+
--catalog-entity-relations-node-root-bg-color: var(--color-blue-6);
|
|
408
|
+
--catalog-entity-relations-node-root-text-color: #ffffff;
|
|
409
|
+
--catalog-entity-relations-node-root-icon-color: #ffffff;
|
|
410
|
+
// @tokens End
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* @tokens Catalog entity relations edge
|
|
414
|
+
*/
|
|
415
|
+
--catalog-entity-relations-edge-label-bg-color: var(--layer-color);
|
|
416
|
+
--catalog-entity-relations-edge-label-text-color: var(--catalog-card-text-color);
|
|
417
|
+
--catalog-entity-relations-edge-label-border-color: var(--border-color-secondary);
|
|
418
|
+
--catalog-entity-relations-edge-label-border-width: var(--border-width);
|
|
419
|
+
--catalog-entity-relations-edge-label-border-style: var(--border-style);
|
|
420
|
+
--catalog-entity-relations-edge-label-border-radius: 10px;
|
|
421
|
+
|
|
422
|
+
--catalog-entity-relations-edge-label-padding-vertical: 2px;
|
|
423
|
+
--catalog-entity-relations-edge-label-padding-horizontal: 8px;
|
|
424
|
+
--catalog-entity-relations-edge-label-padding: var(--catalog-entity-relations-edge-label-padding-vertical) var(--catalog-entity-relations-edge-label-padding-horizontal);
|
|
425
|
+
|
|
426
|
+
--catalog-entity-relations-edge-label-font-size: 12px;
|
|
427
|
+
--catalog-entity-relations-edge-label-line-height: 1.2;
|
|
428
|
+
// @tokens End
|
|
387
429
|
`;
|
|
388
430
|
//# sourceMappingURL=variables.js.map
|
|
@@ -103,6 +103,7 @@ function CatalogClassicVirtualizedGroups({ groups, filters, filterTerm, }) {
|
|
|
103
103
|
return ESTIMATED_CARD_HEIGHT;
|
|
104
104
|
},
|
|
105
105
|
overscan: 5,
|
|
106
|
+
enabled: shouldVirtualize,
|
|
106
107
|
});
|
|
107
108
|
(0, react_1.useEffect)(() => {
|
|
108
109
|
if (!size.width || !shouldVirtualize) {
|
|
@@ -111,19 +112,23 @@ function CatalogClassicVirtualizedGroups({ groups, filters, filterTerm, }) {
|
|
|
111
112
|
virtualizer.measure();
|
|
112
113
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
113
114
|
}, [filters, filterTerm, size.width, shouldVirtualize]);
|
|
115
|
+
const renderRow = (rowData) => {
|
|
116
|
+
if (rowData.type === 'header') {
|
|
117
|
+
return (react_1.default.createElement(SSRHeaderRow, { key: rowData.key },
|
|
118
|
+
react_1.default.createElement(CatalogSeparatorLabel, null, rowData.groupTitle),
|
|
119
|
+
react_1.default.createElement(CounterTag_1.CounterTag, { borderless: true }, rowData.groupCount)));
|
|
120
|
+
}
|
|
121
|
+
return (react_1.default.createElement(SSRGridRow, { key: rowData.key }, rowData.items.map((item) => (react_1.default.createElement(CatalogClassicCard_1.CatalogClassicCard, { key: item.link, item: item })))));
|
|
122
|
+
};
|
|
114
123
|
if (!isClient) {
|
|
115
124
|
return (react_1.default.createElement("div", { ref: parentRef, "data-component-name": "CatalogClassic/CatalogClassicVirtualizedGroups" },
|
|
116
|
-
flatRows.slice(0, 15).map((rowData) =>
|
|
117
|
-
if (rowData.type === 'header') {
|
|
118
|
-
return (react_1.default.createElement(SSRHeaderRow, { key: rowData.key },
|
|
119
|
-
react_1.default.createElement(CatalogSeparatorLabel, null, rowData.groupTitle),
|
|
120
|
-
react_1.default.createElement(CounterTag_1.CounterTag, { borderless: true }, rowData.groupCount)));
|
|
121
|
-
}
|
|
122
|
-
return (react_1.default.createElement(SSRGridRow, { key: rowData.key }, rowData.items.map((item) => (react_1.default.createElement(CatalogClassicCard_1.CatalogClassicCard, { key: item.link, item: item })))));
|
|
123
|
-
}),
|
|
125
|
+
flatRows.slice(0, 15).map((rowData) => renderRow(rowData)),
|
|
124
126
|
react_1.default.createElement(LoadingWrapper, null,
|
|
125
127
|
react_1.default.createElement(SpinnerLoader_1.SpinnerLoader, { color: "var(--catalog-classic-description-text-color)", size: "20px" }))));
|
|
126
128
|
}
|
|
129
|
+
if (!shouldVirtualize) {
|
|
130
|
+
return (react_1.default.createElement("div", { ref: parentRef, "data-component-name": "CatalogClassic/CatalogClassicVirtualizedGroups" }, flatRows.map((rowData) => renderRow(rowData))));
|
|
131
|
+
}
|
|
127
132
|
return (react_1.default.createElement("div", { ref: parentRef, "data-component-name": "CatalogClassic/CatalogClassicVirtualizedGroups" },
|
|
128
133
|
react_1.default.createElement("div", { style: {
|
|
129
134
|
position: 'relative',
|
|
@@ -2,3 +2,13 @@ import type { EntityRelationType } from '../types/catalog';
|
|
|
2
2
|
export declare const CATALOG_TAG_MAX_LENGTH = 15;
|
|
3
3
|
export declare const ENTITY_RELATION_TYPES: readonly ["partOf", "hasParts", "creates", "createdBy", "owns", "ownedBy", "implements", "implementedBy", "dependsOn", "dependencyOf", "uses", "usedBy", "produces", "consumes", "linksTo", "supersedes", "supersededBy", "compatibleWith", "extends", "extendedBy", "relatesTo", "hasMember", "memberOf", "triggers", "triggeredBy"];
|
|
4
4
|
export declare const reverseRelationMap: Record<EntityRelationType, EntityRelationType>;
|
|
5
|
+
export declare enum GraphHandleType {
|
|
6
|
+
Target = "target",
|
|
7
|
+
Source = "source"
|
|
8
|
+
}
|
|
9
|
+
export declare enum GraphCustomNodeType {
|
|
10
|
+
CatalogEntity = "catalogEntity"
|
|
11
|
+
}
|
|
12
|
+
export declare enum GraphCustomEdgeType {
|
|
13
|
+
CatalogEdge = "catalogEdge"
|
|
14
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.reverseRelationMap = exports.ENTITY_RELATION_TYPES = exports.CATALOG_TAG_MAX_LENGTH = void 0;
|
|
3
|
+
exports.GraphCustomEdgeType = exports.GraphCustomNodeType = exports.GraphHandleType = exports.reverseRelationMap = exports.ENTITY_RELATION_TYPES = exports.CATALOG_TAG_MAX_LENGTH = void 0;
|
|
4
4
|
exports.CATALOG_TAG_MAX_LENGTH = 15;
|
|
5
5
|
exports.ENTITY_RELATION_TYPES = [
|
|
6
6
|
'partOf',
|
|
@@ -56,4 +56,17 @@ exports.reverseRelationMap = {
|
|
|
56
56
|
triggers: 'triggeredBy',
|
|
57
57
|
triggeredBy: 'triggers',
|
|
58
58
|
};
|
|
59
|
+
var GraphHandleType;
|
|
60
|
+
(function (GraphHandleType) {
|
|
61
|
+
GraphHandleType["Target"] = "target";
|
|
62
|
+
GraphHandleType["Source"] = "source";
|
|
63
|
+
})(GraphHandleType || (exports.GraphHandleType = GraphHandleType = {}));
|
|
64
|
+
var GraphCustomNodeType;
|
|
65
|
+
(function (GraphCustomNodeType) {
|
|
66
|
+
GraphCustomNodeType["CatalogEntity"] = "catalogEntity";
|
|
67
|
+
})(GraphCustomNodeType || (exports.GraphCustomNodeType = GraphCustomNodeType = {}));
|
|
68
|
+
var GraphCustomEdgeType;
|
|
69
|
+
(function (GraphCustomEdgeType) {
|
|
70
|
+
GraphCustomEdgeType["CatalogEdge"] = "catalogEdge";
|
|
71
|
+
})(GraphCustomEdgeType || (exports.GraphCustomEdgeType = GraphCustomEdgeType = {}));
|
|
59
72
|
//# sourceMappingURL=catalog.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const useRecentSearches:
|
|
1
|
+
export declare const useRecentSearches: import("vitest").Mock<() => {
|
|
2
2
|
items: string[];
|
|
3
3
|
addSearchHistoryItem: (value: string) => string;
|
|
4
4
|
removeSearchHistoryItem: (value: string) => string;
|
|
5
|
-
}
|
|
5
|
+
}>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useRecentSearches = void 0;
|
|
4
|
-
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
exports.useRecentSearches = vitest_1.vi.fn(() => {
|
|
5
6
|
const items = ['test'];
|
|
6
7
|
return {
|
|
7
8
|
items,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const useSearchFilter:
|
|
1
|
+
export declare const useSearchFilter: import("vitest").Mock<() => {
|
|
2
2
|
isFilterOpen: boolean;
|
|
3
3
|
onFacetReset: () => void;
|
|
4
4
|
onFilterChange: () => void;
|
|
5
5
|
onFilterToggle: () => void;
|
|
6
6
|
onFilterReset: () => void;
|
|
7
7
|
onQuickFilterReset: () => void;
|
|
8
|
-
}
|
|
8
|
+
}>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useSearchFilter = void 0;
|
|
4
|
-
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
exports.useSearchFilter = vitest_1.vi.fn(() => {
|
|
5
6
|
return {
|
|
6
7
|
isFilterOpen: false,
|
|
7
8
|
onFacetReset: () => { },
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useSuggestedPages = void 0;
|
|
4
|
-
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
exports.useSuggestedPages = vitest_1.vi.fn(() => {
|
|
5
6
|
return [
|
|
6
7
|
{
|
|
7
8
|
link: '/',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useControlledState: () => (boolean |
|
|
1
|
+
export declare const useControlledState: () => (boolean | import("vitest").Mock<(...args: any[]) => any>)[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useControlledState = void 0;
|
|
4
|
-
const
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
const useControlledState = () => [false, vitest_1.vi.fn()];
|
|
5
6
|
exports.useControlledState = useControlledState;
|
|
6
7
|
//# sourceMappingURL=use-controlled-state.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const useInputKeyCommands:
|
|
2
|
-
onKeyDown:
|
|
3
|
-
}
|
|
1
|
+
export declare const useInputKeyCommands: import("vitest").Mock<() => {
|
|
2
|
+
onKeyDown: import("vitest").Mock<(...args: any[]) => any>;
|
|
3
|
+
}>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useInputKeyCommands = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
exports.useInputKeyCommands = vitest_1.vi.fn(() => ({
|
|
6
|
+
onKeyDown: vitest_1.vi.fn(),
|
|
6
7
|
}));
|
|
7
8
|
//# sourceMappingURL=use-input-key-commands.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useMobileMenu: () => (boolean |
|
|
1
|
+
export declare const useMobileMenu: () => (boolean | import("vitest").Mock<(...args: any[]) => any>)[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useMobileMenu = void 0;
|
|
4
|
-
const
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
const useMobileMenu = () => [false, vitest_1.vi.fn()];
|
|
5
6
|
exports.useMobileMenu = useMobileMenu;
|
|
6
7
|
//# sourceMappingURL=use-mobile-menu.js.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useThemeConfig = void 0;
|
|
4
|
-
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
exports.useThemeConfig = vitest_1.vi.fn(() => ({
|
|
5
6
|
userMenu: {
|
|
6
7
|
items: [],
|
|
7
8
|
},
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
export declare const useThemeHooks:
|
|
2
|
-
useTranslate:
|
|
3
|
-
translate:
|
|
4
|
-
}
|
|
5
|
-
useTelemetry:
|
|
6
|
-
send:
|
|
7
|
-
}
|
|
8
|
-
useBreadcrumbs:
|
|
9
|
-
usePageSharedData:
|
|
10
|
-
useCatalogClassic:
|
|
1
|
+
export declare const useThemeHooks: import("vitest").Mock<() => {
|
|
2
|
+
useTranslate: import("vitest").Mock<() => {
|
|
3
|
+
translate: import("vitest").Mock<(key: string, defaultValue: string) => any>;
|
|
4
|
+
}>;
|
|
5
|
+
useTelemetry: import("vitest").Mock<() => {
|
|
6
|
+
send: import("vitest").Mock<(...args: any[]) => any>;
|
|
7
|
+
}>;
|
|
8
|
+
useBreadcrumbs: import("vitest").Mock<(...args: any[]) => any>;
|
|
9
|
+
usePageSharedData: import("vitest").Mock<(...args: any[]) => any>;
|
|
10
|
+
useCatalogClassic: import("vitest").Mock<() => {
|
|
11
11
|
groups: never[];
|
|
12
12
|
filters: never[];
|
|
13
13
|
filterTerm: string;
|
|
14
|
-
setFilterTerm:
|
|
15
|
-
}
|
|
16
|
-
useL10n:
|
|
17
|
-
changeLanguage:
|
|
18
|
-
}
|
|
19
|
-
useL10nConfig:
|
|
14
|
+
setFilterTerm: import("vitest").Mock<(...args: any[]) => any>;
|
|
15
|
+
}>;
|
|
16
|
+
useL10n: import("vitest").Mock<() => {
|
|
17
|
+
changeLanguage: import("vitest").Mock<(...args: any[]) => any>;
|
|
18
|
+
}>;
|
|
19
|
+
useL10nConfig: import("vitest").Mock<() => {
|
|
20
20
|
currentLocale: string;
|
|
21
21
|
defaultLocale: string;
|
|
22
22
|
locales: {
|
|
23
23
|
code: string;
|
|
24
24
|
name: string;
|
|
25
25
|
}[];
|
|
26
|
-
}
|
|
27
|
-
usePreloadHistory:
|
|
28
|
-
push:
|
|
29
|
-
}
|
|
30
|
-
useCurrentProduct:
|
|
31
|
-
useProducts:
|
|
32
|
-
useSearch:
|
|
33
|
-
query:
|
|
34
|
-
setQuery:
|
|
26
|
+
}>;
|
|
27
|
+
usePreloadHistory: import("vitest").Mock<() => {
|
|
28
|
+
push: import("vitest").Mock<(...args: any[]) => any>;
|
|
29
|
+
}>;
|
|
30
|
+
useCurrentProduct: import("vitest").Mock<(...args: any[]) => any>;
|
|
31
|
+
useProducts: import("vitest").Mock<() => never[]>;
|
|
32
|
+
useSearch: import("vitest").Mock<() => {
|
|
33
|
+
query: import("vitest").Mock<(...args: any[]) => any>;
|
|
34
|
+
setQuery: import("vitest").Mock<(...args: any[]) => any>;
|
|
35
35
|
items: never[];
|
|
36
36
|
isLoading: boolean;
|
|
37
|
-
}
|
|
38
|
-
useAiSearch:
|
|
39
|
-
askQuestion:
|
|
37
|
+
}>;
|
|
38
|
+
useAiSearch: import("vitest").Mock<() => {
|
|
39
|
+
askQuestion: import("vitest").Mock<(...args: any[]) => any>;
|
|
40
40
|
references: never[];
|
|
41
|
-
}
|
|
42
|
-
useFacetQuery:
|
|
41
|
+
}>;
|
|
42
|
+
useFacetQuery: import("vitest").Mock<() => {
|
|
43
43
|
searchFacet: null;
|
|
44
|
-
setSearchFacet:
|
|
45
|
-
setSearchFacetQuery:
|
|
46
|
-
}
|
|
47
|
-
useMarkdownText:
|
|
48
|
-
useUserMenu:
|
|
44
|
+
setSearchFacet: import("vitest").Mock<(...args: any[]) => any>;
|
|
45
|
+
setSearchFacetQuery: import("vitest").Mock<(...args: any[]) => any>;
|
|
46
|
+
}>;
|
|
47
|
+
useMarkdownText: import("vitest").Mock<() => null>;
|
|
48
|
+
useUserMenu: import("vitest").Mock<() => {
|
|
49
49
|
userData: {
|
|
50
50
|
isAuthenticated: boolean;
|
|
51
51
|
name: string;
|
|
52
52
|
email: string;
|
|
53
53
|
picture: string;
|
|
54
54
|
};
|
|
55
|
-
handleLogout:
|
|
55
|
+
handleLogout: import("vitest").Mock<(...args: any[]) => any>;
|
|
56
56
|
loginUrl: string;
|
|
57
57
|
hasDeveloperOnboarding: boolean;
|
|
58
|
-
}
|
|
59
|
-
usePageVersions:
|
|
60
|
-
useSidebarItems:
|
|
61
|
-
useSidebarSiblingsData:
|
|
62
|
-
useSubmitFeedback:
|
|
63
|
-
submitFeedback:
|
|
64
|
-
}
|
|
65
|
-
useLoadAndNavigate:
|
|
66
|
-
usePageProps:
|
|
67
|
-
usePageData:
|
|
68
|
-
}
|
|
58
|
+
}>;
|
|
59
|
+
usePageVersions: import("vitest").Mock<(...args: any[]) => any>;
|
|
60
|
+
useSidebarItems: import("vitest").Mock<(...args: any[]) => any>;
|
|
61
|
+
useSidebarSiblingsData: import("vitest").Mock<(...args: any[]) => any>;
|
|
62
|
+
useSubmitFeedback: import("vitest").Mock<() => {
|
|
63
|
+
submitFeedback: import("vitest").Mock<(...args: any[]) => any>;
|
|
64
|
+
}>;
|
|
65
|
+
useLoadAndNavigate: import("vitest").Mock<(...args: any[]) => any>;
|
|
66
|
+
usePageProps: import("vitest").Mock<(...args: any[]) => any>;
|
|
67
|
+
usePageData: import("vitest").Mock<(...args: any[]) => any>;
|
|
68
|
+
}>;
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useThemeHooks = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
exports.useThemeHooks = vitest_1.vi.fn(() => ({
|
|
6
|
+
useTranslate: vitest_1.vi.fn(() => ({
|
|
7
|
+
translate: vitest_1.vi.fn((key, defaultValue) => defaultValue
|
|
7
8
|
? typeof defaultValue !== 'string'
|
|
8
9
|
? defaultValue.defaultValue
|
|
9
10
|
: defaultValue
|
|
10
11
|
: key),
|
|
11
12
|
})),
|
|
12
|
-
useTelemetry:
|
|
13
|
-
send:
|
|
13
|
+
useTelemetry: vitest_1.vi.fn(() => ({
|
|
14
|
+
send: vitest_1.vi.fn(),
|
|
14
15
|
})),
|
|
15
|
-
useBreadcrumbs:
|
|
16
|
-
usePageSharedData:
|
|
17
|
-
useCatalogClassic:
|
|
16
|
+
useBreadcrumbs: vitest_1.vi.fn().mockReturnValue([]),
|
|
17
|
+
usePageSharedData: vitest_1.vi.fn().mockReturnValue({}),
|
|
18
|
+
useCatalogClassic: vitest_1.vi.fn(() => ({
|
|
18
19
|
groups: [],
|
|
19
20
|
filters: [],
|
|
20
21
|
filterTerm: '',
|
|
21
|
-
setFilterTerm:
|
|
22
|
+
setFilterTerm: vitest_1.vi.fn(),
|
|
22
23
|
})),
|
|
23
|
-
useL10n:
|
|
24
|
-
changeLanguage:
|
|
24
|
+
useL10n: vitest_1.vi.fn(() => ({
|
|
25
|
+
changeLanguage: vitest_1.vi.fn(),
|
|
25
26
|
})),
|
|
26
|
-
useL10nConfig:
|
|
27
|
+
useL10nConfig: vitest_1.vi.fn(() => ({
|
|
27
28
|
currentLocale: 'en',
|
|
28
29
|
defaultLocale: 'en',
|
|
29
30
|
locales: [
|
|
@@ -32,42 +33,42 @@ exports.useThemeHooks = jest.fn(() => ({
|
|
|
32
33
|
{ code: 'uk', name: 'Ukraine' },
|
|
33
34
|
],
|
|
34
35
|
})),
|
|
35
|
-
usePreloadHistory:
|
|
36
|
-
push:
|
|
36
|
+
usePreloadHistory: vitest_1.vi.fn(() => ({
|
|
37
|
+
push: vitest_1.vi.fn(),
|
|
37
38
|
})),
|
|
38
|
-
useCurrentProduct:
|
|
39
|
-
useProducts:
|
|
40
|
-
useSearch:
|
|
41
|
-
query:
|
|
42
|
-
setQuery:
|
|
39
|
+
useCurrentProduct: vitest_1.vi.fn(),
|
|
40
|
+
useProducts: vitest_1.vi.fn(() => []),
|
|
41
|
+
useSearch: vitest_1.vi.fn(() => ({
|
|
42
|
+
query: vitest_1.vi.fn().mockReturnValue(''),
|
|
43
|
+
setQuery: vitest_1.vi.fn(),
|
|
43
44
|
items: [],
|
|
44
45
|
isLoading: false,
|
|
45
46
|
})),
|
|
46
|
-
useAiSearch:
|
|
47
|
-
askQuestion:
|
|
47
|
+
useAiSearch: vitest_1.vi.fn(() => ({
|
|
48
|
+
askQuestion: vitest_1.vi.fn(),
|
|
48
49
|
references: [],
|
|
49
50
|
})),
|
|
50
|
-
useFacetQuery:
|
|
51
|
+
useFacetQuery: vitest_1.vi.fn(() => ({
|
|
51
52
|
searchFacet: null,
|
|
52
|
-
setSearchFacet:
|
|
53
|
-
setSearchFacetQuery:
|
|
53
|
+
setSearchFacet: vitest_1.vi.fn(),
|
|
54
|
+
setSearchFacetQuery: vitest_1.vi.fn(),
|
|
54
55
|
})),
|
|
55
|
-
useMarkdownText:
|
|
56
|
+
useMarkdownText: vitest_1.vi.fn(() => {
|
|
56
57
|
return null;
|
|
57
58
|
}),
|
|
58
|
-
useUserMenu:
|
|
59
|
+
useUserMenu: vitest_1.vi.fn(() => ({
|
|
59
60
|
userData: {
|
|
60
61
|
isAuthenticated: true,
|
|
61
62
|
name: 'test-name',
|
|
62
63
|
email: 'test-email@test.xyz',
|
|
63
64
|
picture: 'picture',
|
|
64
65
|
},
|
|
65
|
-
handleLogout:
|
|
66
|
+
handleLogout: vitest_1.vi.fn(),
|
|
66
67
|
loginUrl: 'https://login.redoc.ly',
|
|
67
68
|
hasDeveloperOnboarding: true,
|
|
68
69
|
})),
|
|
69
|
-
usePageVersions:
|
|
70
|
-
useSidebarItems:
|
|
70
|
+
usePageVersions: vitest_1.vi.fn(),
|
|
71
|
+
useSidebarItems: vitest_1.vi.fn().mockReturnValue({
|
|
71
72
|
currentItems: [
|
|
72
73
|
{
|
|
73
74
|
label: 'Item',
|
|
@@ -78,15 +79,15 @@ exports.useThemeHooks = jest.fn(() => ({
|
|
|
78
79
|
label: 'Item',
|
|
79
80
|
},
|
|
80
81
|
],
|
|
81
|
-
popDrilldownState:
|
|
82
|
-
pushDrilldownState:
|
|
82
|
+
popDrilldownState: vitest_1.vi.fn(),
|
|
83
|
+
pushDrilldownState: vitest_1.vi.fn(),
|
|
83
84
|
}),
|
|
84
|
-
useSidebarSiblingsData:
|
|
85
|
-
useSubmitFeedback:
|
|
86
|
-
submitFeedback:
|
|
85
|
+
useSidebarSiblingsData: vitest_1.vi.fn(),
|
|
86
|
+
useSubmitFeedback: vitest_1.vi.fn(() => ({
|
|
87
|
+
submitFeedback: vitest_1.vi.fn(),
|
|
87
88
|
})),
|
|
88
|
-
useLoadAndNavigate:
|
|
89
|
-
usePageProps:
|
|
90
|
-
usePageData:
|
|
89
|
+
useLoadAndNavigate: vitest_1.vi.fn(),
|
|
90
|
+
usePageProps: vitest_1.vi.fn().mockReturnValue({}),
|
|
91
|
+
usePageData: vitest_1.vi.fn().mockReturnValue(null),
|
|
91
92
|
}));
|
|
92
93
|
//# sourceMappingURL=use-theme-hooks.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const useTimeAgo:
|
|
1
|
+
export declare const useTimeAgo: import("vitest").Mock<() => {
|
|
2
2
|
format: () => "5 days ago";
|
|
3
|
-
}
|
|
3
|
+
}>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useTimeAgo = void 0;
|
|
4
|
-
|
|
4
|
+
const vitest_1 = require("vitest");
|
|
5
|
+
exports.useTimeAgo = vitest_1.vi.fn(() => ({
|
|
5
6
|
format: () => '5 days ago',
|
|
6
7
|
}));
|
|
7
8
|
//# sourceMappingURL=use-time-ago.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Node, type Edge, type Connection, OnNodesChange, OnEdgesChange } from '@xyflow/react';
|
|
2
|
+
import { type CatalogEntityNodeData } from '../../../components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNode';
|
|
3
|
+
import { BffCatalogEntity, BffCatalogRelatedEntity } from '../../types';
|
|
4
|
+
export type UseGraphProps = {
|
|
5
|
+
entity: BffCatalogEntity;
|
|
6
|
+
relations: BffCatalogRelatedEntity[];
|
|
7
|
+
};
|
|
8
|
+
export type UseGraphReturn = {
|
|
9
|
+
nodes: Node<CatalogEntityNodeData>[];
|
|
10
|
+
edges: Edge[];
|
|
11
|
+
onNodesChange: OnNodesChange<Node<CatalogEntityNodeData>>;
|
|
12
|
+
onEdgesChange: OnEdgesChange<Edge>;
|
|
13
|
+
onConnect: (params: Connection) => void;
|
|
14
|
+
};
|
|
15
|
+
export declare function useGraph({ entity, relations }: UseGraphProps): UseGraphReturn;
|