@teambit/graph 0.0.0-351b8797f220d8d6c242cfc30d4ecebaee07da45
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/component-graph/component-graph.ts +118 -0
- package/component-graph/index.ts +2 -0
- package/dist/component-graph/component-graph.d.ts +22 -0
- package/dist/component-graph/component-graph.js +125 -0
- package/dist/component-graph/component-graph.js.map +1 -0
- package/dist/component-graph/index.d.ts +1 -0
- package/dist/component-graph/index.js +20 -0
- package/dist/component-graph/index.js.map +1 -0
- package/dist/component-id-graph.d.ts +49 -0
- package/dist/component-id-graph.js +252 -0
- package/dist/component-id-graph.js.map +1 -0
- package/dist/duplicate-dependency.d.ts +11 -0
- package/dist/duplicate-dependency.js +22 -0
- package/dist/duplicate-dependency.js.map +1 -0
- package/dist/edge-type.d.ts +5 -0
- package/dist/edge-type.js +14 -0
- package/dist/edge-type.js.map +1 -0
- package/dist/esm.mjs +29 -0
- package/dist/graph-builder.d.ts +16 -0
- package/dist/graph-builder.js +71 -0
- package/dist/graph-builder.js.map +1 -0
- package/dist/graph-cmd.d.ts +28 -0
- package/dist/graph-cmd.js +147 -0
- package/dist/graph-cmd.js.map +1 -0
- package/dist/graph.aspect.d.ts +3 -0
- package/dist/graph.aspect.js +21 -0
- package/dist/graph.aspect.js.map +1 -0
- package/dist/graph.compare.section.d.ts +20 -0
- package/dist/graph.compare.section.js +50 -0
- package/dist/graph.compare.section.js.map +1 -0
- package/dist/graph.composition.d.ts +1 -0
- package/dist/graph.composition.js +29 -0
- package/dist/graph.composition.js.map +1 -0
- package/dist/graph.docs.md +4 -0
- package/dist/graph.graphql.d.ts +4 -0
- package/dist/graph.graphql.js +95 -0
- package/dist/graph.graphql.js.map +1 -0
- package/dist/graph.main.runtime.d.ts +34 -0
- package/dist/graph.main.runtime.js +158 -0
- package/dist/graph.main.runtime.js.map +1 -0
- package/dist/graph.ui.runtime.d.ts +33 -0
- package/dist/graph.ui.runtime.js +104 -0
- package/dist/graph.ui.runtime.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +214 -0
- package/dist/index.js.map +1 -0
- package/dist/model/dependency/dependency.d.ts +6 -0
- package/dist/model/dependency/dependency.js +21 -0
- package/dist/model/dependency/dependency.js.map +1 -0
- package/dist/model/dependency/index.d.ts +1 -0
- package/dist/model/dependency/index.js +26 -0
- package/dist/model/dependency/index.js.map +1 -0
- package/dist/model/graph-filters/graph-filters.d.ts +1 -0
- package/dist/model/graph-filters/graph-filters.js +3 -0
- package/dist/model/graph-filters/graph-filters.js.map +1 -0
- package/dist/model/graph-filters/index.d.ts +1 -0
- package/dist/model/graph-filters/index.js +3 -0
- package/dist/model/graph-filters/index.js.map +1 -0
- package/dist/preview-1752263259534.js +7 -0
- package/dist/ui/component-node/component-node.d.ts +7 -0
- package/dist/ui/component-node/component-node.js +158 -0
- package/dist/ui/component-node/component-node.js.map +1 -0
- package/dist/ui/component-node/component-node.module.scss +73 -0
- package/dist/ui/component-node/index.d.ts +13 -0
- package/dist/ui/component-node/index.js +94 -0
- package/dist/ui/component-node/index.js.map +1 -0
- package/dist/ui/component-node/variants.d.ts +2 -0
- package/dist/ui/component-node/variants.js +30 -0
- package/dist/ui/component-node/variants.js.map +1 -0
- package/dist/ui/component-node/variants.module.scss +45 -0
- package/dist/ui/dependencies-compare/compare-graph-model.d.ts +7 -0
- package/dist/ui/dependencies-compare/compare-graph-model.js +23 -0
- package/dist/ui/dependencies-compare/compare-graph-model.js.map +1 -0
- package/dist/ui/dependencies-compare/compare-node-model.d.ts +9 -0
- package/dist/ui/dependencies-compare/compare-node-model.js +28 -0
- package/dist/ui/dependencies-compare/compare-node-model.js.map +1 -0
- package/dist/ui/dependencies-compare/dependencies-compare.d.ts +1 -0
- package/dist/ui/dependencies-compare/dependencies-compare.js +202 -0
- package/dist/ui/dependencies-compare/dependencies-compare.js.map +1 -0
- package/dist/ui/dependencies-compare/dependencies-compare.module.scss +14 -0
- package/dist/ui/dependencies-compare/dependency-compare-node.d.ts +6 -0
- package/dist/ui/dependencies-compare/dependency-compare-node.js +208 -0
- package/dist/ui/dependencies-compare/dependency-compare-node.js.map +1 -0
- package/dist/ui/dependencies-compare/dependency-compare-node.module.scss +21 -0
- package/dist/ui/dependencies-compare/dependency-compare-variants.module.scss +23 -0
- package/dist/ui/dependencies-compare/diff-graph.d.ts +4 -0
- package/dist/ui/dependencies-compare/diff-graph.js +65 -0
- package/dist/ui/dependencies-compare/diff-graph.js.map +1 -0
- package/dist/ui/dependencies-compare/index.d.ts +1 -0
- package/dist/ui/dependencies-compare/index.js +20 -0
- package/dist/ui/dependencies-compare/index.js.map +1 -0
- package/dist/ui/dependencies-graph/calc-elements.d.ts +14 -0
- package/dist/ui/dependencies-graph/calc-elements.js +83 -0
- package/dist/ui/dependencies-graph/calc-elements.js.map +1 -0
- package/dist/ui/dependencies-graph/calc-layout.d.ts +8 -0
- package/dist/ui/dependencies-graph/calc-layout.js +59 -0
- package/dist/ui/dependencies-graph/calc-layout.js.map +1 -0
- package/dist/ui/dependencies-graph/dep-edge/dep-edge.d.ts +3 -0
- package/dist/ui/dependencies-graph/dep-edge/dep-edge.js +48 -0
- package/dist/ui/dependencies-graph/dep-edge/dep-edge.js.map +1 -0
- package/dist/ui/dependencies-graph/dep-edge/edge.module.scss +10 -0
- package/dist/ui/dependencies-graph/dep-edge/index.d.ts +1 -0
- package/dist/ui/dependencies-graph/dep-edge/index.js +26 -0
- package/dist/ui/dependencies-graph/dep-edge/index.js.map +1 -0
- package/dist/ui/dependencies-graph/dependencies-graph.d.ts +13 -0
- package/dist/ui/dependencies-graph/dependencies-graph.js +183 -0
- package/dist/ui/dependencies-graph/dependencies-graph.js.map +1 -0
- package/dist/ui/dependencies-graph/dependencies-graph.module.scss +93 -0
- package/dist/ui/dependencies-graph/graph-context.d.ts +6 -0
- package/dist/ui/dependencies-graph/graph-context.js +18 -0
- package/dist/ui/dependencies-graph/graph-context.js.map +1 -0
- package/dist/ui/dependencies-graph/index.d.ts +12 -0
- package/dist/ui/dependencies-graph/index.js +116 -0
- package/dist/ui/dependencies-graph/index.js.map +1 -0
- package/dist/ui/dependencies-graph/minimap.d.ts +2 -0
- package/dist/ui/dependencies-graph/minimap.js +26 -0
- package/dist/ui/dependencies-graph/minimap.js.map +1 -0
- package/dist/ui/graph-page/graph-filters.d.ts +9 -0
- package/dist/ui/graph-page/graph-filters.js +46 -0
- package/dist/ui/graph-page/graph-filters.js.map +1 -0
- package/dist/ui/graph-page/graph-page.d.ts +6 -0
- package/dist/ui/graph-page/graph-page.js +111 -0
- package/dist/ui/graph-page/graph-page.js.map +1 -0
- package/dist/ui/graph-page/graph-page.module.scss +37 -0
- package/dist/ui/graph-page/index.d.ts +6 -0
- package/dist/ui/graph-page/index.js +50 -0
- package/dist/ui/graph-page/index.js.map +1 -0
- package/dist/ui/graph.section.d.ts +15 -0
- package/dist/ui/graph.section.js +43 -0
- package/dist/ui/graph.section.js.map +1 -0
- package/dist/ui/query/edge-model.d.ts +8 -0
- package/dist/ui/query/edge-model.js +26 -0
- package/dist/ui/query/edge-model.js.map +1 -0
- package/dist/ui/query/get-graph.query.d.ts +33 -0
- package/dist/ui/query/get-graph.query.js +60 -0
- package/dist/ui/query/get-graph.query.js.map +1 -0
- package/dist/ui/query/graph-model.d.ts +9 -0
- package/dist/ui/query/graph-model.js +34 -0
- package/dist/ui/query/graph-model.js.map +1 -0
- package/dist/ui/query/index.d.ts +6 -0
- package/dist/ui/query/index.js +85 -0
- package/dist/ui/query/index.js.map +1 -0
- package/dist/ui/query/node-model.d.ts +8 -0
- package/dist/ui/query/node-model.js +35 -0
- package/dist/ui/query/node-model.js.map +1 -0
- package/dist/ui/query/use-graph-query.d.ts +9 -0
- package/dist/ui/query/use-graph-query.js +96 -0
- package/dist/ui/query/use-graph-query.js.map +1 -0
- package/dist/ui/query/use-graph.d.ts +7 -0
- package/dist/ui/query/use-graph.js +26 -0
- package/dist/ui/query/use-graph.js.map +1 -0
- package/esm.mjs +29 -0
- package/graph.compare.section.tsx +23 -0
- package/graph.composition.tsx +7 -0
- package/graph.docs.md +4 -0
- package/graph.ui.runtime.tsx +61 -0
- package/model/dependency/dependency.ts +11 -0
- package/model/dependency/index.ts +1 -0
- package/model/graph-filters/graph-filters.ts +1 -0
- package/model/graph-filters/index.ts +1 -0
- package/package.json +94 -0
- package/types/asset.d.ts +41 -0
- package/types/style.d.ts +42 -0
- package/ui/component-node/component-node.module.scss +73 -0
- package/ui/component-node/component-node.tsx +66 -0
- package/ui/component-node/index.ts +8 -0
- package/ui/component-node/variants.module.scss +45 -0
- package/ui/component-node/variants.ts +5 -0
- package/ui/dependencies-compare/compare-graph-model.ts +11 -0
- package/ui/dependencies-compare/compare-node-model.ts +11 -0
- package/ui/dependencies-compare/dependencies-compare.module.scss +14 -0
- package/ui/dependencies-compare/dependencies-compare.tsx +140 -0
- package/ui/dependencies-compare/dependency-compare-node.module.scss +21 -0
- package/ui/dependencies-compare/dependency-compare-node.tsx +100 -0
- package/ui/dependencies-compare/dependency-compare-variants.module.scss +23 -0
- package/ui/dependencies-compare/diff-graph.ts +70 -0
- package/ui/dependencies-compare/index.ts +1 -0
- package/ui/dependencies-graph/calc-elements.tsx +53 -0
- package/ui/dependencies-graph/calc-layout.tsx +43 -0
- package/ui/dependencies-graph/dep-edge/dep-edge.tsx +28 -0
- package/ui/dependencies-graph/dep-edge/edge.module.scss +10 -0
- package/ui/dependencies-graph/dep-edge/index.ts +1 -0
- package/ui/dependencies-graph/dependencies-graph.module.scss +93 -0
- package/ui/dependencies-graph/dependencies-graph.tsx +139 -0
- package/ui/dependencies-graph/graph-context.ts +9 -0
- package/ui/dependencies-graph/index.ts +12 -0
- package/ui/dependencies-graph/minimap.ts +15 -0
- package/ui/graph-page/graph-filters.tsx +28 -0
- package/ui/graph-page/graph-page.module.scss +37 -0
- package/ui/graph-page/graph-page.tsx +56 -0
- package/ui/graph-page/index.ts +7 -0
- package/ui/graph.section.tsx +19 -0
- package/ui/query/edge-model.ts +16 -0
- package/ui/query/get-graph.query.ts +83 -0
- package/ui/query/graph-model.ts +16 -0
- package/ui/query/index.ts +7 -0
- package/ui/query/node-model.ts +18 -0
- package/ui/query/use-graph-query.ts +72 -0
- package/ui/query/use-graph.tsx +8 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GraphFilters = GraphFilters;
|
|
7
|
+
function _react() {
|
|
8
|
+
const data = _interopRequireDefault(require("react"));
|
|
9
|
+
_react = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _baseUiSurfaces() {
|
|
15
|
+
const data = require("@teambit/base-ui.surfaces.card");
|
|
16
|
+
_baseUiSurfaces = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
function _evangelistInputCheckbox() {
|
|
22
|
+
const data = require("@teambit/evangelist.input.checkbox.label");
|
|
23
|
+
_evangelistInputCheckbox = function () {
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
return data;
|
|
27
|
+
}
|
|
28
|
+
const _excluded = ["onChangeFilter", "isFiltered", "disable"];
|
|
29
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
30
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
31
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
32
|
+
function GraphFilters(_ref) {
|
|
33
|
+
let {
|
|
34
|
+
onChangeFilter,
|
|
35
|
+
isFiltered,
|
|
36
|
+
disable
|
|
37
|
+
} = _ref,
|
|
38
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
39
|
+
return /*#__PURE__*/_react().default.createElement(_baseUiSurfaces().Card, rest, /*#__PURE__*/_react().default.createElement("div", null, /*#__PURE__*/_react().default.createElement(_evangelistInputCheckbox().CheckboxLabel, {
|
|
40
|
+
checked: !isFiltered,
|
|
41
|
+
disabled: disable,
|
|
42
|
+
onInputChanged: e => onChangeFilter(!e.target.checked)
|
|
43
|
+
}, ' ', "show non-runtime")));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=graph-filters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","data","_interopRequireDefault","require","_baseUiSurfaces","_evangelistInputCheckbox","_excluded","e","__esModule","default","_objectWithoutProperties","t","o","r","i","_objectWithoutPropertiesLoose","Object","getOwnPropertySymbols","n","length","indexOf","propertyIsEnumerable","call","hasOwnProperty","GraphFilters","_ref","onChangeFilter","isFiltered","disable","rest","createElement","Card","CheckboxLabel","checked","disabled","onInputChanged","target"],"sources":["graph-filters.tsx"],"sourcesContent":["import React from 'react';\nimport { Card, CardProps } from '@teambit/base-ui.surfaces.card';\nimport { CheckboxLabel } from '@teambit/evangelist.input.checkbox.label';\n\ntype GraphFiltersType = {\n isFiltered: boolean;\n showMetadata?: boolean;\n onChangeFilter: (isFiltered: boolean) => void;\n disable?: boolean;\n} & CardProps;\n\nexport function GraphFilters({ onChangeFilter, isFiltered, disable, ...rest }: GraphFiltersType) {\n return (\n <Card {...rest}>\n <div>\n {/* show non-runtime === !isFiltered */}\n <CheckboxLabel\n checked={!isFiltered}\n disabled={disable}\n onInputChanged={(e) => onChangeFilter(!e.target.checked)}\n >\n {' '}\n show non-runtime\n </CheckboxLabel>\n </div>\n </Card>\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A,aAAAP,CAAA,CAAAO,CAAA,IAAAL,CAAA,CAAAK,CAAA,YAAAP,CAAA;AASlE,SAASa,YAAYA,CAAAC,IAAA,EAAqE;EAAA,IAApE;MAAEC,cAAc;MAAEC,UAAU;MAAEC;IAAmC,CAAC,GAAAH,IAAA;IAAxBI,IAAI,GAAAnB,wBAAA,CAAAe,IAAA,EAAAnB,SAAA;EACzE,oBACEN,MAAA,GAAAS,OAAA,CAAAqB,aAAA,CAAC1B,eAAA,GAAA2B,IAAI,EAAKF,IAAI,eACZ7B,MAAA,GAAAS,OAAA,CAAAqB,aAAA,2BAEE9B,MAAA,GAAAS,OAAA,CAAAqB,aAAA,CAACzB,wBAAA,GAAA2B,aAAa;IACZC,OAAO,EAAE,CAACN,UAAW;IACrBO,QAAQ,EAAEN,OAAQ;IAClBO,cAAc,EAAG5B,CAAC,IAAKmB,cAAc,CAAC,CAACnB,CAAC,CAAC6B,MAAM,CAACH,OAAO;EAAE,GAExD,GAAG,EAAC,kBAEQ,CACZ,CACD,CAAC;AAEX","ignoreList":[]}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GraphPage = GraphPage;
|
|
7
|
+
function _react() {
|
|
8
|
+
const data = _interopRequireWildcard(require("react"));
|
|
9
|
+
_react = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _designUiPages() {
|
|
15
|
+
const data = require("@teambit/design.ui.pages.not-found");
|
|
16
|
+
_designUiPages = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
function _designUiPages2() {
|
|
22
|
+
const data = require("@teambit/design.ui.pages.server-error");
|
|
23
|
+
_designUiPages2 = function () {
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
return data;
|
|
27
|
+
}
|
|
28
|
+
function _component() {
|
|
29
|
+
const data = require("@teambit/component");
|
|
30
|
+
_component = function () {
|
|
31
|
+
return data;
|
|
32
|
+
};
|
|
33
|
+
return data;
|
|
34
|
+
}
|
|
35
|
+
function _designSkeletons() {
|
|
36
|
+
const data = require("@teambit/design.skeletons.base-skeleton");
|
|
37
|
+
_designSkeletons = function () {
|
|
38
|
+
return data;
|
|
39
|
+
};
|
|
40
|
+
return data;
|
|
41
|
+
}
|
|
42
|
+
function _classnames() {
|
|
43
|
+
const data = _interopRequireDefault(require("classnames"));
|
|
44
|
+
_classnames = function () {
|
|
45
|
+
return data;
|
|
46
|
+
};
|
|
47
|
+
return data;
|
|
48
|
+
}
|
|
49
|
+
function _query() {
|
|
50
|
+
const data = require("../query");
|
|
51
|
+
_query = function () {
|
|
52
|
+
return data;
|
|
53
|
+
};
|
|
54
|
+
return data;
|
|
55
|
+
}
|
|
56
|
+
function _dependenciesGraph() {
|
|
57
|
+
const data = require("../dependencies-graph");
|
|
58
|
+
_dependenciesGraph = function () {
|
|
59
|
+
return data;
|
|
60
|
+
};
|
|
61
|
+
return data;
|
|
62
|
+
}
|
|
63
|
+
function _graphFilters() {
|
|
64
|
+
const data = require("./graph-filters");
|
|
65
|
+
_graphFilters = function () {
|
|
66
|
+
return data;
|
|
67
|
+
};
|
|
68
|
+
return data;
|
|
69
|
+
}
|
|
70
|
+
function _graphPageModule() {
|
|
71
|
+
const data = _interopRequireDefault(require("./graph-page.module.scss"));
|
|
72
|
+
_graphPageModule = function () {
|
|
73
|
+
return data;
|
|
74
|
+
};
|
|
75
|
+
return data;
|
|
76
|
+
}
|
|
77
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
78
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
79
|
+
function GraphPage({
|
|
80
|
+
componentWidgets
|
|
81
|
+
}) {
|
|
82
|
+
const component = (0, _react().useContext)(_component().ComponentContext);
|
|
83
|
+
const [filter, setFilter] = (0, _react().useState)('runtimeOnly');
|
|
84
|
+
const onCheckFilter = isFiltered => {
|
|
85
|
+
setFilter(isFiltered ? 'runtimeOnly' : undefined);
|
|
86
|
+
};
|
|
87
|
+
const {
|
|
88
|
+
graph,
|
|
89
|
+
error,
|
|
90
|
+
graphLoading,
|
|
91
|
+
loading
|
|
92
|
+
} = (0, _query().useGraphQuery)([component.id.toString()], filter);
|
|
93
|
+
const isFiltered = filter === 'runtimeOnly';
|
|
94
|
+
if (error) return error.code === 404 ? /*#__PURE__*/_react().default.createElement(_designUiPages().NotFoundPage, null) : /*#__PURE__*/_react().default.createElement(_designUiPages2().ServerErrorPage, null);
|
|
95
|
+
return /*#__PURE__*/_react().default.createElement("div", {
|
|
96
|
+
className: (0, _classnames().default)(_graphPageModule().default.page)
|
|
97
|
+
}, /*#__PURE__*/_react().default.createElement(_dependenciesGraph().DependenciesGraph, {
|
|
98
|
+
componentWidgets: componentWidgets,
|
|
99
|
+
graph: graph,
|
|
100
|
+
rootNode: component.id,
|
|
101
|
+
className: (0, _classnames().default)(_graphPageModule().default.graph, !graph && _designSkeletons().skeleton),
|
|
102
|
+
loadingGraphMetadata: graphLoading
|
|
103
|
+
}, graph && /*#__PURE__*/_react().default.createElement(_graphFilters().GraphFilters, {
|
|
104
|
+
className: (0, _classnames().default)(_graphPageModule().default.filters),
|
|
105
|
+
disable: loading,
|
|
106
|
+
isFiltered: isFiltered,
|
|
107
|
+
onChangeFilter: onCheckFilter
|
|
108
|
+
})));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
//# sourceMappingURL=graph-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","data","_interopRequireWildcard","require","_designUiPages","_designUiPages2","_component","_designSkeletons","_classnames","_interopRequireDefault","_query","_dependenciesGraph","_graphFilters","_graphPageModule","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","GraphPage","componentWidgets","component","useContext","ComponentContext","filter","setFilter","useState","onCheckFilter","isFiltered","undefined","graph","error","graphLoading","loading","useGraphQuery","id","toString","code","createElement","NotFoundPage","ServerErrorPage","className","classNames","styles","page","DependenciesGraph","rootNode","skeleton","loadingGraphMetadata","GraphFilters","filters","disable","onChangeFilter"],"sources":["graph-page.tsx"],"sourcesContent":["import React, { useContext, useState } from 'react';\nimport { NotFoundPage } from '@teambit/design.ui.pages.not-found';\nimport { ServerErrorPage } from '@teambit/design.ui.pages.server-error';\nimport { ComponentContext } from '@teambit/component';\nimport { skeleton } from '@teambit/design.skeletons.base-skeleton';\nimport classNames from 'classnames';\n\nimport { useGraphQuery } from '../query';\nimport { DependenciesGraph } from '../dependencies-graph';\nimport { ComponentWidgetSlot } from '../../graph.ui.runtime';\nimport type { GraphFilter } from '../../model/graph-filters';\n\nimport { GraphFilters } from './graph-filters';\n\nimport styles from './graph-page.module.scss';\n\ntype GraphPageProps = {\n componentWidgets: ComponentWidgetSlot;\n};\n\nexport function GraphPage({ componentWidgets }: GraphPageProps) {\n const component = useContext(ComponentContext);\n\n const [filter, setFilter] = useState<GraphFilter>('runtimeOnly');\n\n const onCheckFilter = (isFiltered: boolean) => {\n setFilter(isFiltered ? 'runtimeOnly' : undefined);\n };\n\n const { graph, error, graphLoading, loading } = useGraphQuery([component.id.toString()], filter);\n\n const isFiltered = filter === 'runtimeOnly';\n\n if (error) return error.code === 404 ? <NotFoundPage /> : <ServerErrorPage />;\n\n return (\n <div className={classNames(styles.page)}>\n <DependenciesGraph\n componentWidgets={componentWidgets}\n graph={graph}\n rootNode={component.id}\n className={classNames(styles.graph, !graph && skeleton)}\n loadingGraphMetadata={graphLoading}\n >\n {graph && (\n <GraphFilters\n className={classNames(styles.filters)}\n disable={loading}\n isFiltered={isFiltered}\n onChangeFilter={onCheckFilter}\n />\n )}\n </DependenciesGraph>\n </div>\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,eAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,cAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,gBAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,eAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,iBAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,gBAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,YAAA;EAAA,MAAAP,IAAA,GAAAQ,sBAAA,CAAAN,OAAA;EAAAK,WAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAS,OAAA;EAAA,MAAAT,IAAA,GAAAE,OAAA;EAAAO,MAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,S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EAAEA,KAAM;IACbgB,QAAQ,EAAEzB,SAAS,CAACc,EAAG;IACvBM,SAAS,EAAE,IAAAC,qBAAU,EAACC,0BAAM,CAACb,KAAK,EAAE,CAACA,KAAK,IAAIiB,2BAAQ,CAAE;IACxDC,oBAAoB,EAAEhB;EAAa,GAElCF,KAAK,iBACJ5C,MAAA,GAAAgB,OAAA,CAAAoC,aAAA,CAACxC,aAAA,GAAAmD,YAAY;IACXR,SAAS,EAAE,IAAAC,qBAAU,EAACC,0BAAM,CAACO,OAAO,CAAE;IACtCC,OAAO,EAAElB,OAAQ;IACjBL,UAAU,EAAEA,UAAW;IACvBwB,cAAc,EAAEzB;EAAc,CAC/B,CAEc,CAChB,CAAC;AAEV","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.page {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
height: 100%;
|
|
5
|
+
padding: 24px;
|
|
6
|
+
|
|
7
|
+
h2 {
|
|
8
|
+
margin-bottom: 24px;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.graph {
|
|
13
|
+
flex-grow: 1;
|
|
14
|
+
height: 100%;
|
|
15
|
+
width: unset;
|
|
16
|
+
|
|
17
|
+
border-radius: 5px;
|
|
18
|
+
border: solid 1px var(--bit-border-color-lightest, #ededed);
|
|
19
|
+
background: var(--bit-bg-dent, #f6f6f6);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.summery {
|
|
23
|
+
margin-bottom: 24px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.filters {
|
|
27
|
+
position: absolute;
|
|
28
|
+
top: 8px;
|
|
29
|
+
right: 8px;
|
|
30
|
+
padding: 8px;
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
gap: 8px;
|
|
34
|
+
font-size: 0.75em;
|
|
35
|
+
box-shadow: var(--bit-shadow-faint);
|
|
36
|
+
z-index: 8; // position above the abs positioned graph items
|
|
37
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "GraphFilters", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _graphFilters().GraphFilters;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "GraphPage", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _graphPage().GraphPage;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
exports.styles = void 0;
|
|
19
|
+
function _graphPageModule() {
|
|
20
|
+
const data = _interopRequireDefault(require("./graph-page.module.scss"));
|
|
21
|
+
_graphPageModule = function () {
|
|
22
|
+
return data;
|
|
23
|
+
};
|
|
24
|
+
return data;
|
|
25
|
+
}
|
|
26
|
+
function _graphPage() {
|
|
27
|
+
const data = require("./graph-page");
|
|
28
|
+
_graphPage = function () {
|
|
29
|
+
return data;
|
|
30
|
+
};
|
|
31
|
+
return data;
|
|
32
|
+
}
|
|
33
|
+
function _graphFilters() {
|
|
34
|
+
const data = require("./graph-filters");
|
|
35
|
+
_graphFilters = function () {
|
|
36
|
+
return data;
|
|
37
|
+
};
|
|
38
|
+
return data;
|
|
39
|
+
}
|
|
40
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
41
|
+
const {
|
|
42
|
+
graph,
|
|
43
|
+
filters
|
|
44
|
+
} = _graphPageModule().default;
|
|
45
|
+
const styles = exports.styles = {
|
|
46
|
+
graph,
|
|
47
|
+
filters
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_graphPageModule","data","_interopRequireDefault","require","_graphPage","_graphFilters","e","__esModule","default","graph","filters","pageStyles","styles","exports"],"sources":["index.ts"],"sourcesContent":["import pageStyles from './graph-page.module.scss';\n\nexport { GraphPage } from './graph-page';\nexport { GraphFilters } from './graph-filters';\n\nconst { graph, filters } = pageStyles;\nexport const styles = { graph, filters };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAAAA,iBAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,gBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,cAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,aAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA+C,SAAAC,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE/C,MAAM;EAAEG,KAAK;EAAEC;AAAQ,CAAC,GAAGC,0BAAU;AAC9B,MAAMC,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG;EAAEH,KAAK;EAAEC;AAAQ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Section } from '@teambit/component';
|
|
2
|
+
import { ComponentWidgetSlot } from '../graph.ui.runtime';
|
|
3
|
+
export declare class GraphSection implements Section {
|
|
4
|
+
private componentWidgetSlot;
|
|
5
|
+
constructor(componentWidgetSlot: ComponentWidgetSlot);
|
|
6
|
+
route: {
|
|
7
|
+
path: string;
|
|
8
|
+
element: import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
navigationLink: {
|
|
11
|
+
href: string;
|
|
12
|
+
children: string;
|
|
13
|
+
};
|
|
14
|
+
order: number;
|
|
15
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GraphSection = void 0;
|
|
7
|
+
function _react() {
|
|
8
|
+
const data = _interopRequireDefault(require("react"));
|
|
9
|
+
_react = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _graphPage() {
|
|
15
|
+
const data = require("./graph-page");
|
|
16
|
+
_graphPage = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
23
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
24
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
25
|
+
class GraphSection {
|
|
26
|
+
constructor(componentWidgetSlot) {
|
|
27
|
+
this.componentWidgetSlot = componentWidgetSlot;
|
|
28
|
+
_defineProperty(this, "route", {
|
|
29
|
+
path: '~graph',
|
|
30
|
+
element: /*#__PURE__*/_react().default.createElement(_graphPage().GraphPage, {
|
|
31
|
+
componentWidgets: this.componentWidgetSlot
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
_defineProperty(this, "navigationLink", {
|
|
35
|
+
href: '~graph',
|
|
36
|
+
children: 'Graph'
|
|
37
|
+
});
|
|
38
|
+
_defineProperty(this, "order", 40);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.GraphSection = GraphSection;
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=graph.section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","data","_interopRequireDefault","require","_graphPage","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","GraphSection","constructor","componentWidgetSlot","path","element","createElement","GraphPage","componentWidgets","href","children","exports"],"sources":["graph.section.tsx"],"sourcesContent":["import { Section } from '@teambit/component';\nimport React from 'react';\n\nimport { GraphPage } from './graph-page';\nimport { ComponentWidgetSlot } from '../graph.ui.runtime';\n\nexport class GraphSection implements Section {\n constructor(private componentWidgetSlot: ComponentWidgetSlot) {}\n\n route = {\n path: '~graph',\n element: <GraphPage componentWidgets={this.componentWidgetSlot} />,\n };\n navigationLink = {\n href: '~graph',\n children: 'Graph',\n };\n order = 40;\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAyC,SAAAC,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,CAAAR,CAAA,EAAAI,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAZ,CAAA,CAAAI,CAAA,IAAAC,CAAA,EAAAL,CAAA;AAAA,SAAAM,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAL,CAAA,GAAAK,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAhB,CAAA,QAAAa,CAAA,GAAAb,CAAA,CAAAiB,IAAA,CAAAZ,CAAA,EAAAD,CAAA,uCAAAS,CAAA,SAAAA,CAAA,YAAAK,SAAA,yEAAAd,CAAA,GAAAe,MAAA,GAAAC,MAAA,EAAAf,CAAA;AAGlC,MAAMgB,YAAY,CAAoB;EAC3CC,WAAWA,CAASC,mBAAwC,EAAE;IAAA,KAA1CA,mBAAwC,GAAxCA,mBAAwC;IAAApB,eAAA,gBAEpD;MACNqB,IAAI,EAAE,QAAQ;MACdC,OAAO,eAAE9B,MAAA,GAAAO,OAAA,CAAAwB,aAAA,CAAC3B,UAAA,GAAA4B,SAAS;QAACC,gBAAgB,EAAE,IAAI,CAACL;MAAoB,CAAE;IACnE,CAAC;IAAApB,eAAA,yBACgB;MACf0B,IAAI,EAAE,QAAQ;MACdC,QAAQ,EAAE;IACZ,CAAC;IAAA3B,eAAA,gBACO,EAAE;EAVqD;AAWjE;AAAC4B,OAAA,CAAAV,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EdgeModel = void 0;
|
|
7
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
9
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
|
+
class EdgeModel {
|
|
11
|
+
constructor() {
|
|
12
|
+
_defineProperty(this, "sourceId", void 0);
|
|
13
|
+
_defineProperty(this, "targetId", void 0);
|
|
14
|
+
_defineProperty(this, "dependencyLifecycleType", void 0);
|
|
15
|
+
}
|
|
16
|
+
static from(rawEdge) {
|
|
17
|
+
const edge = new EdgeModel();
|
|
18
|
+
edge.sourceId = rawEdge.sourceId;
|
|
19
|
+
edge.targetId = rawEdge.targetId;
|
|
20
|
+
edge.dependencyLifecycleType = rawEdge.dependencyLifecycleType;
|
|
21
|
+
return edge;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.EdgeModel = EdgeModel;
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=edge-model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["EdgeModel","constructor","_defineProperty","from","rawEdge","edge","sourceId","targetId","dependencyLifecycleType","exports"],"sources":["edge-model.ts"],"sourcesContent":["import { EdgeType } from '../../edge-type';\nimport { RawEdge } from './get-graph.query';\n\nexport class EdgeModel {\n sourceId: string;\n targetId: string;\n dependencyLifecycleType: EdgeType;\n\n static from(rawEdge: RawEdge) {\n const edge = new EdgeModel();\n edge.sourceId = rawEdge.sourceId;\n edge.targetId = rawEdge.targetId;\n edge.dependencyLifecycleType = rawEdge.dependencyLifecycleType;\n return edge;\n }\n}\n"],"mappings":";;;;;;;;;AAGO,MAAMA,SAAS,CAAC;EAAAC,YAAA;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA;EAAA;EAKrB,OAAOC,IAAIA,CAACC,OAAgB,EAAE;IAC5B,MAAMC,IAAI,GAAG,IAAIL,SAAS,CAAC,CAAC;IAC5BK,IAAI,CAACC,QAAQ,GAAGF,OAAO,CAACE,QAAQ;IAChCD,IAAI,CAACE,QAAQ,GAAGH,OAAO,CAACG,QAAQ;IAChCF,IAAI,CAACG,uBAAuB,GAAGJ,OAAO,CAACI,uBAAuB;IAC9D,OAAOH,IAAI;EACb;AACF;AAACI,OAAA,CAAAT,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { EdgeType } from '../../edge-type';
|
|
2
|
+
export declare const GET_GRAPH_IDS: import("@apollo/client").DocumentNode;
|
|
3
|
+
export declare const GET_GRAPH: import("@apollo/client").DocumentNode;
|
|
4
|
+
export type RawGraphQuery = {
|
|
5
|
+
graph: RawGraph;
|
|
6
|
+
};
|
|
7
|
+
export type RawGraph = {
|
|
8
|
+
nodes: RawNode[];
|
|
9
|
+
edges: [];
|
|
10
|
+
};
|
|
11
|
+
export type RawNode = {
|
|
12
|
+
id: string;
|
|
13
|
+
component?: {
|
|
14
|
+
id: {
|
|
15
|
+
name: string;
|
|
16
|
+
scope: string;
|
|
17
|
+
version: string;
|
|
18
|
+
};
|
|
19
|
+
displayName: string;
|
|
20
|
+
deprecation: {
|
|
21
|
+
isDeprecate: boolean;
|
|
22
|
+
};
|
|
23
|
+
env: {
|
|
24
|
+
id: string;
|
|
25
|
+
icon: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export type RawEdge = {
|
|
30
|
+
sourceId: string;
|
|
31
|
+
targetId: string;
|
|
32
|
+
dependencyLifecycleType: EdgeType;
|
|
33
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GET_GRAPH_IDS = exports.GET_GRAPH = void 0;
|
|
7
|
+
function _client() {
|
|
8
|
+
const data = require("@apollo/client");
|
|
9
|
+
_client = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
const GET_GRAPH_IDS = exports.GET_GRAPH_IDS = (0, _client().gql)`
|
|
15
|
+
query graph($ids: [String], $filter: String) {
|
|
16
|
+
graph(ids: $ids, filter: $filter) {
|
|
17
|
+
nodes {
|
|
18
|
+
id
|
|
19
|
+
}
|
|
20
|
+
edges {
|
|
21
|
+
sourceId
|
|
22
|
+
targetId
|
|
23
|
+
dependencyLifecycleType
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
28
|
+
const GET_GRAPH = exports.GET_GRAPH = (0, _client().gql)`
|
|
29
|
+
query graph($ids: [String], $filter: String) {
|
|
30
|
+
graph(ids: $ids, filter: $filter) {
|
|
31
|
+
nodes {
|
|
32
|
+
id
|
|
33
|
+
component {
|
|
34
|
+
id {
|
|
35
|
+
name
|
|
36
|
+
version
|
|
37
|
+
scope
|
|
38
|
+
}
|
|
39
|
+
displayName
|
|
40
|
+
|
|
41
|
+
deprecation {
|
|
42
|
+
isDeprecate
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
env {
|
|
46
|
+
id
|
|
47
|
+
icon
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
edges {
|
|
52
|
+
sourceId
|
|
53
|
+
targetId
|
|
54
|
+
dependencyLifecycleType
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
`;
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=get-graph.query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_client","data","require","GET_GRAPH_IDS","exports","gql","GET_GRAPH"],"sources":["get-graph.query.ts"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { EdgeType } from '../../edge-type';\n\nexport const GET_GRAPH_IDS = gql`\n query graph($ids: [String], $filter: String) {\n graph(ids: $ids, filter: $filter) {\n nodes {\n id\n }\n edges {\n sourceId\n targetId\n dependencyLifecycleType\n }\n }\n }\n`;\n\nexport const GET_GRAPH = gql`\n query graph($ids: [String], $filter: String) {\n graph(ids: $ids, filter: $filter) {\n nodes {\n id\n component {\n id {\n name\n version\n scope\n }\n displayName\n\n deprecation {\n isDeprecate\n }\n\n env {\n id\n icon\n }\n }\n }\n edges {\n sourceId\n targetId\n dependencyLifecycleType\n }\n }\n }\n`;\n\nexport type RawGraphQuery = {\n graph: RawGraph;\n};\n\nexport type RawGraph = {\n nodes: RawNode[];\n edges: [];\n};\n\nexport type RawNode = {\n id: string;\n component?: {\n id: {\n name: string;\n scope: string;\n version: string;\n };\n displayName: string;\n deprecation: {\n isDeprecate: boolean;\n };\n env: {\n id: string;\n icon: string;\n };\n };\n};\n\nexport type RawEdge = {\n sourceId: string;\n targetId: string;\n dependencyLifecycleType: EdgeType;\n};\n"],"mappings":";;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGO,MAAME,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,IAAAE,aAAG;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAEM,MAAMC,SAAS,GAAAF,OAAA,CAAAE,SAAA,GAAG,IAAAD,aAAG;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RawGraph } from './get-graph.query';
|
|
2
|
+
import { NodeModel } from './node-model';
|
|
3
|
+
import { EdgeModel } from './edge-model';
|
|
4
|
+
export declare class GraphModel<N extends NodeModel, E extends EdgeModel> {
|
|
5
|
+
nodes: N[];
|
|
6
|
+
edges: E[];
|
|
7
|
+
constructor(nodes: N[], edges: E[]);
|
|
8
|
+
static from(rawGraph: RawGraph): GraphModel<NodeModel, EdgeModel>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GraphModel = void 0;
|
|
7
|
+
function _nodeModel() {
|
|
8
|
+
const data = require("./node-model");
|
|
9
|
+
_nodeModel = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _edgeModel() {
|
|
15
|
+
const data = require("./edge-model");
|
|
16
|
+
_edgeModel = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
class GraphModel {
|
|
22
|
+
constructor(nodes, edges) {
|
|
23
|
+
this.nodes = nodes;
|
|
24
|
+
this.edges = edges;
|
|
25
|
+
}
|
|
26
|
+
static from(rawGraph) {
|
|
27
|
+
const nodes = rawGraph.nodes.map(_nodeModel().NodeModel.from);
|
|
28
|
+
const edges = rawGraph.edges.map(_edgeModel().EdgeModel.from);
|
|
29
|
+
return new GraphModel(nodes, edges);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.GraphModel = GraphModel;
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=graph-model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_nodeModel","data","require","_edgeModel","GraphModel","constructor","nodes","edges","from","rawGraph","map","NodeModel","EdgeModel","exports"],"sources":["graph-model.ts"],"sourcesContent":["import { RawGraph } from './get-graph.query';\nimport { NodeModel } from './node-model';\nimport { EdgeModel } from './edge-model';\n\nexport class GraphModel<N extends NodeModel, E extends EdgeModel> {\n constructor(\n public nodes: N[],\n public edges: E[]\n ) {}\n\n static from(rawGraph: RawGraph) {\n const nodes = rawGraph.nodes.map(NodeModel.from);\n const edges = rawGraph.edges.map(EdgeModel.from);\n return new GraphModel(nodes, edges);\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAMG,UAAU,CAA2C;EAChEC,WAAWA,CACFC,KAAU,EACVC,KAAU,EACjB;IAAA,KAFOD,KAAU,GAAVA,KAAU;IAAA,KACVC,KAAU,GAAVA,KAAU;EAChB;EAEH,OAAOC,IAAIA,CAACC,QAAkB,EAAE;IAC9B,MAAMH,KAAK,GAAGG,QAAQ,CAACH,KAAK,CAACI,GAAG,CAACC,sBAAS,CAACH,IAAI,CAAC;IAChD,MAAMD,KAAK,GAAGE,QAAQ,CAACF,KAAK,CAACG,GAAG,CAACE,sBAAS,CAACJ,IAAI,CAAC;IAChD,OAAO,IAAIJ,UAAU,CAACE,KAAK,EAAEC,KAAK,CAAC;EACrC;AACF;AAACM,OAAA,CAAAT,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { useGraphQuery } from './use-graph-query';
|
|
2
|
+
export { useGraph } from './use-graph';
|
|
3
|
+
export { GraphModel } from './graph-model';
|
|
4
|
+
export { EdgeModel } from './edge-model';
|
|
5
|
+
export { NodeModel } from './node-model';
|
|
6
|
+
export { RawGraph } from './get-graph.query';
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "EdgeModel", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _edgeModel().EdgeModel;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "GraphModel", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _graphModel().GraphModel;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "NodeModel", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _nodeModel().NodeModel;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "RawGraph", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _getGraph().RawGraph;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "useGraph", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _useGraph().useGraph;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "useGraphQuery", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _useGraphQuery().useGraphQuery;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
function _useGraphQuery() {
|
|
43
|
+
const data = require("./use-graph-query");
|
|
44
|
+
_useGraphQuery = function () {
|
|
45
|
+
return data;
|
|
46
|
+
};
|
|
47
|
+
return data;
|
|
48
|
+
}
|
|
49
|
+
function _useGraph() {
|
|
50
|
+
const data = require("./use-graph");
|
|
51
|
+
_useGraph = function () {
|
|
52
|
+
return data;
|
|
53
|
+
};
|
|
54
|
+
return data;
|
|
55
|
+
}
|
|
56
|
+
function _graphModel() {
|
|
57
|
+
const data = require("./graph-model");
|
|
58
|
+
_graphModel = function () {
|
|
59
|
+
return data;
|
|
60
|
+
};
|
|
61
|
+
return data;
|
|
62
|
+
}
|
|
63
|
+
function _edgeModel() {
|
|
64
|
+
const data = require("./edge-model");
|
|
65
|
+
_edgeModel = function () {
|
|
66
|
+
return data;
|
|
67
|
+
};
|
|
68
|
+
return data;
|
|
69
|
+
}
|
|
70
|
+
function _nodeModel() {
|
|
71
|
+
const data = require("./node-model");
|
|
72
|
+
_nodeModel = function () {
|
|
73
|
+
return data;
|
|
74
|
+
};
|
|
75
|
+
return data;
|
|
76
|
+
}
|
|
77
|
+
function _getGraph() {
|
|
78
|
+
const data = require("./get-graph.query");
|
|
79
|
+
_getGraph = function () {
|
|
80
|
+
return data;
|
|
81
|
+
};
|
|
82
|
+
return data;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_useGraphQuery","data","require","_useGraph","_graphModel","_edgeModel","_nodeModel","_getGraph"],"sources":["index.ts"],"sourcesContent":["export { useGraphQuery } from './use-graph-query';\nexport { useGraph } from './use-graph';\n\nexport { GraphModel } from './graph-model';\nexport { EdgeModel } from './edge-model';\nexport { NodeModel } from './node-model';\nexport { RawGraph } from './get-graph.query';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,UAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,YAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,UAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,SAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentID, ComponentModel } from '@teambit/component';
|
|
2
|
+
import { RawNode } from './get-graph.query';
|
|
3
|
+
export declare class NodeModel {
|
|
4
|
+
id: string;
|
|
5
|
+
component?: ComponentModel;
|
|
6
|
+
componentId: ComponentID;
|
|
7
|
+
static from(rawNode: RawNode): NodeModel;
|
|
8
|
+
}
|