@teambit/graph 0.0.743 → 0.0.746

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.
@@ -6,7 +6,7 @@ export declare class GraphSection implements Section {
6
6
  constructor(componentWidgetSlot: ComponentWidgetSlot);
7
7
  route: {
8
8
  path: string;
9
- children: JSX.Element;
9
+ element: JSX.Element;
10
10
  };
11
11
  navigationLink: {
12
12
  href: string;
@@ -42,7 +42,7 @@ class GraphSection {
42
42
  this.componentWidgetSlot = componentWidgetSlot;
43
43
  (0, _defineProperty2().default)(this, "route", {
44
44
  path: '~dependencies',
45
- children: /*#__PURE__*/_react().default.createElement(_graphPage().GraphPage, {
45
+ element: /*#__PURE__*/_react().default.createElement(_graphPage().GraphPage, {
46
46
  componentWidgets: this.componentWidgetSlot
47
47
  })
48
48
  });
@@ -1 +1 @@
1
- {"version":3,"names":["GraphSection","constructor","componentWidgetSlot","path","children","href"],"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: '~dependencies',\n children: <GraphPage componentWidgets={this.componentWidgetSlot} />,\n };\n navigationLink = {\n href: '~dependencies',\n children: 'Dependencies',\n };\n order = 40;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGO,MAAMA,YAAN,CAAsC;EAC3CC,WAAW,CAASC,mBAAT,EAAmD;IAAA,KAA1CA,mBAA0C,GAA1CA,mBAA0C;IAAA,+CAEtD;MACNC,IAAI,EAAE,eADA;MAENC,QAAQ,eAAE,+BAAC,sBAAD;QAAW,gBAAgB,EAAE,KAAKF;MAAlC;IAFJ,CAFsD;IAAA,wDAM7C;MACfG,IAAI,EAAE,eADS;MAEfD,QAAQ,EAAE;IAFK,CAN6C;IAAA,+CAUtD,EAVsD;EAAE;;AADrB"}
1
+ {"version":3,"names":["GraphSection","constructor","componentWidgetSlot","path","element","href","children"],"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: '~dependencies',\n element: <GraphPage componentWidgets={this.componentWidgetSlot} />,\n };\n navigationLink = {\n href: '~dependencies',\n children: 'Dependencies',\n };\n order = 40;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGO,MAAMA,YAAN,CAAsC;EAC3CC,WAAW,CAASC,mBAAT,EAAmD;IAAA,KAA1CA,mBAA0C,GAA1CA,mBAA0C;IAAA,+CAEtD;MACNC,IAAI,EAAE,eADA;MAENC,OAAO,eAAE,+BAAC,sBAAD;QAAW,gBAAgB,EAAE,KAAKF;MAAlC;IAFH,CAFsD;IAAA,wDAM7C;MACfG,IAAI,EAAE,eADS;MAEfC,QAAQ,EAAE;IAFK,CAN6C;IAAA,+CAUtD,EAVsD;EAAE;;AADrB"}
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useGraph = useGraph;
7
7
 
8
- function _reactRouterDom() {
9
- const data = require("react-router-dom");
8
+ function _uiFoundationUiReactRouter() {
9
+ const data = require("@teambit/ui-foundation.ui.react-router.use-query");
10
10
 
11
- _reactRouterDom = function () {
11
+ _uiFoundationUiReactRouter = function () {
12
12
  return data;
13
13
  };
14
14
 
@@ -26,12 +26,7 @@ function _useGraphQuery() {
26
26
  }
27
27
 
28
28
  function useGraph() {
29
- const {
30
- // @ts-ignore
31
- params: {
32
- componentId
33
- }
34
- } = (0, _reactRouterDom().useRouteMatch)();
29
+ const componentId = (0, _uiFoundationUiReactRouter().useQuery)().get('componentId');
35
30
  return (0, _useGraphQuery().useGraphQuery)([componentId]);
36
31
  }
37
32
 
@@ -1 +1 @@
1
- {"version":3,"names":["useGraph","params","componentId","useRouteMatch","useGraphQuery"],"sources":["use-graph.tsx"],"sourcesContent":["import { useRouteMatch } from 'react-router-dom';\n\nimport { useGraphQuery } from './use-graph-query';\n\nexport function useGraph() {\n const {\n // @ts-ignore\n params: { componentId },\n } = useRouteMatch();\n\n return useGraphQuery([componentId]);\n}\n"],"mappings":";;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,SAASA,QAAT,GAAoB;EACzB,MAAM;IACJ;IACAC,MAAM,EAAE;MAAEC;IAAF;EAFJ,IAGF,IAAAC,+BAAA,GAHJ;EAKA,OAAO,IAAAC,8BAAA,EAAc,CAACF,WAAD,CAAd,CAAP;AACD"}
1
+ {"version":3,"names":["useGraph","componentId","useQuery","get","useGraphQuery"],"sources":["use-graph.tsx"],"sourcesContent":["import { useQuery } from '@teambit/ui-foundation.ui.react-router.use-query';\nimport { useGraphQuery } from './use-graph-query';\n\nexport function useGraph() {\n const componentId = useQuery().get('componentId') as string;\n\n return useGraphQuery([componentId]);\n}\n"],"mappings":";;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,SAASA,QAAT,GAAoB;EACzB,MAAMC,WAAW,GAAG,IAAAC,qCAAA,IAAWC,GAAX,CAAe,aAAf,CAApB;EAEA,OAAO,IAAAC,8BAAA,EAAc,CAACH,WAAD,CAAd,CAAP;AACD"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/graph",
3
- "version": "0.0.743",
3
+ "version": "0.0.746",
4
4
  "homepage": "https://bit.dev/teambit/component/graph",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "graph",
9
- "version": "0.0.743"
9
+ "version": "0.0.746"
10
10
  },
11
11
  "dependencies": {
12
12
  "graphql-tag": "2.12.1",
@@ -14,7 +14,6 @@
14
14
  "classnames": "2.2.6",
15
15
  "react-flow-renderer": "8.3.7",
16
16
  "dagre": "0.8.5",
17
- "react-router-dom": "5.2.0",
18
17
  "@babel/runtime": "7.12.18",
19
18
  "core-js": "^3.0.0",
20
19
  "@teambit/graph.cleargraph": "0.0.1",
@@ -23,25 +22,25 @@
23
22
  "@teambit/base-ui.text.muted-text": "1.0.1",
24
23
  "@teambit/evangelist.input.checkbox.label": "1.0.3",
25
24
  "@teambit/documenter.ui.heading": "4.1.1",
26
- "@teambit/component": "0.0.743",
27
- "@teambit/graphql": "0.0.743",
25
+ "@teambit/component": "0.0.746",
26
+ "@teambit/graphql": "0.0.746",
28
27
  "@teambit/cli": "0.0.493",
29
- "@teambit/ui": "0.0.743",
28
+ "@teambit/ui": "0.0.746",
30
29
  "@teambit/legacy-bit-id": "0.0.399",
31
30
  "@teambit/component.ui.deprecation-icon": "0.0.493",
32
31
  "@teambit/design.ui.styles.ellipsis": "0.0.347",
33
32
  "@teambit/envs.ui.env-icon": "0.0.486",
34
- "@teambit/design.ui.pages.not-found": "0.0.354",
35
- "@teambit/design.ui.pages.server-error": "0.0.354",
33
+ "@teambit/design.ui.pages.not-found": "0.0.355",
34
+ "@teambit/design.ui.pages.server-error": "0.0.355",
36
35
  "@teambit/ui-foundation.ui.full-loader": "0.0.486",
37
- "@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.487"
36
+ "@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.487",
37
+ "@teambit/ui-foundation.ui.react-router.use-query": "0.0.487"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/react": "^17.0.8",
41
41
  "@types/lodash": "4.14.165",
42
42
  "@types/classnames": "2.2.11",
43
43
  "@types/dagre": "0.7.44",
44
- "@types/react-router-dom": "5.1.7",
45
44
  "@types/mocha": "9.1.0",
46
45
  "@types/testing-library__jest-dom": "5.9.5",
47
46
  "@types/jest": "^26.0.0",
@@ -1,2 +1,2 @@
1
- export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_graph@0.0.743/dist/graph.composition.js')]
2
- export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_graph@0.0.743/dist/graph.docs.md')]
1
+ export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_graph@0.0.746/dist/graph.composition.js')]
2
+ export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_graph@0.0.746/dist/graph.docs.md')]
@@ -9,7 +9,7 @@ export class GraphSection implements Section {
9
9
 
10
10
  route = {
11
11
  path: '~dependencies',
12
- children: <GraphPage componentWidgets={this.componentWidgetSlot} />,
12
+ element: <GraphPage componentWidgets={this.componentWidgetSlot} />,
13
13
  };
14
14
  navigationLink = {
15
15
  href: '~dependencies',
@@ -1,12 +1,8 @@
1
- import { useRouteMatch } from 'react-router-dom';
2
-
1
+ import { useQuery } from '@teambit/ui-foundation.ui.react-router.use-query';
3
2
  import { useGraphQuery } from './use-graph-query';
4
3
 
5
4
  export function useGraph() {
6
- const {
7
- // @ts-ignore
8
- params: { componentId },
9
- } = useRouteMatch();
5
+ const componentId = useQuery().get('componentId') as string;
10
6
 
11
7
  return useGraphQuery([componentId]);
12
8
  }