@teambit/graph 1.0.281 → 1.0.283

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.
Files changed (57) hide show
  1. package/artifacts/__bit_junit.xml +1 -1
  2. package/artifacts/preview/teambit_component_graph-preview.js +1 -1
  3. package/artifacts/schema.json +13 -13
  4. package/dist/component-graph/component-graph.js +1 -1
  5. package/dist/component-graph/component-graph.js.map +1 -1
  6. package/dist/component-id-graph.js +2 -2
  7. package/dist/component-id-graph.js.map +1 -1
  8. package/dist/duplicate-dependency.js +1 -1
  9. package/dist/graph-cmd.js +2 -2
  10. package/dist/graph-cmd.js.map +1 -1
  11. package/dist/graph.compare.section.js +2 -2
  12. package/dist/graph.compare.section.js.map +1 -1
  13. package/dist/graph.composition.js +1 -1
  14. package/dist/graph.composition.js.map +1 -1
  15. package/dist/graph.graphql.js.map +1 -1
  16. package/dist/graph.main.runtime.js +1 -1
  17. package/dist/graph.main.runtime.js.map +1 -1
  18. package/dist/graph.ui.runtime.js +1 -1
  19. package/dist/graph.ui.runtime.js.map +1 -1
  20. package/dist/model/dependency/dependency.js +1 -1
  21. package/dist/{preview-1716434516635.js → preview-1716607230882.js} +2 -2
  22. package/dist/ui/component-node/component-node.js +4 -4
  23. package/dist/ui/component-node/component-node.js.map +1 -1
  24. package/dist/ui/component-node/index.js +1 -1
  25. package/dist/ui/component-node/index.js.map +1 -1
  26. package/dist/ui/component-node/variants.js +1 -1
  27. package/dist/ui/component-node/variants.js.map +1 -1
  28. package/dist/ui/dependencies-compare/compare-node-model.js +1 -1
  29. package/dist/ui/dependencies-compare/compare-node-model.js.map +1 -1
  30. package/dist/ui/dependencies-compare/dependencies-compare.js +1 -1
  31. package/dist/ui/dependencies-compare/dependencies-compare.js.map +1 -1
  32. package/dist/ui/dependencies-compare/dependency-compare-node.js +4 -4
  33. package/dist/ui/dependencies-compare/dependency-compare-node.js.map +1 -1
  34. package/dist/ui/dependencies-compare/diff-graph.js +1 -1
  35. package/dist/ui/dependencies-compare/diff-graph.js.map +1 -1
  36. package/dist/ui/dependencies-graph/calc-elements.js.map +1 -1
  37. package/dist/ui/dependencies-graph/calc-layout.js +1 -1
  38. package/dist/ui/dependencies-graph/calc-layout.js.map +1 -1
  39. package/dist/ui/dependencies-graph/dep-edge/dep-edge.js +1 -1
  40. package/dist/ui/dependencies-graph/dep-edge/dep-edge.js.map +1 -1
  41. package/dist/ui/dependencies-graph/dependencies-graph.js +4 -4
  42. package/dist/ui/dependencies-graph/dependencies-graph.js.map +1 -1
  43. package/dist/ui/dependencies-graph/index.js +1 -1
  44. package/dist/ui/dependencies-graph/index.js.map +1 -1
  45. package/dist/ui/graph-page/graph-filters.js +3 -3
  46. package/dist/ui/graph-page/graph-filters.js.map +1 -1
  47. package/dist/ui/graph-page/graph-page.js +1 -1
  48. package/dist/ui/graph-page/graph-page.js.map +1 -1
  49. package/dist/ui/graph-page/index.js +1 -1
  50. package/dist/ui/graph-page/index.js.map +1 -1
  51. package/dist/ui/graph.section.js +2 -2
  52. package/dist/ui/graph.section.js.map +1 -1
  53. package/dist/ui/query/edge-model.js +1 -1
  54. package/dist/ui/query/get-graph.query.js.map +1 -1
  55. package/dist/ui/query/node-model.js +1 -1
  56. package/dist/ui/query/node-model.js.map +1 -1
  57. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_reactflow","_componentNode","_calcElements","_minimap","_graphContext","_dependenciesGraphModule","_excluded","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","prototype","apply","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","ComponentNodeContainer","props","sourcePosition","Position","Top","targetPosition","Bottom","id","ReactFlowHandle","Handle","createElement","type","position","isConnectable","ComponentNode","node","DependenciesGraph","_ref","graph","rootNode","componentWidgets","className","onLoad","children","rest","nodeTypes","React","useMemo","graphRef","useRef","elements","calcElements","context","handleLoad","useCallback","instance","nodes","fitView","padding","maxZoom","useEffect","current","undefined","setTimeout","ComponentGraphContext","Provider","value","ReactFlowProvider","draggable","nodesDraggable","selectNodesOnDrag","nodesConnectable","zoomOnDoubleClick","elementsSelectable","minZoom","classnames","styles","defaultNodes","defaultEdges","edges","onInit","proOptions","hideAttribution","Background","Controls","controls","MiniMap","nodeColor","calcMinimapColors","minimap"],"sources":["dependencies-graph.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef } from 'react';\nimport classnames from 'classnames';\nimport ReactFlow, {\n Background,\n Controls,\n Handle,\n MiniMap,\n NodeProps,\n NodeTypes,\n ReactFlowInstance,\n Position,\n ReactFlowProps,\n ReactFlowProvider,\n} from 'reactflow';\nimport { ComponentID } from '@teambit/component';\nimport { ComponentWidgetSlot } from '../../graph.ui.runtime';\nimport { ComponentNode } from '../component-node';\nimport { EdgeModel, GraphModel, NodeModel } from '../query';\nimport { calcElements } from './calc-elements';\nimport { calcMinimapColors } from './minimap';\nimport { ComponentGraphContext } from './graph-context';\nimport 'reactflow/dist/style.css';\nimport styles from './dependencies-graph.module.scss';\n\nfunction ComponentNodeContainer(props: NodeProps) {\n const { sourcePosition = Position.Top, targetPosition = Position.Bottom, data, id } = props;\n const ReactFlowHandle = Handle;\n return (\n <div key={id}>\n <ReactFlowHandle type=\"target\" position={targetPosition} isConnectable={false} />\n <ReactFlowHandle type=\"source\" position={sourcePosition} isConnectable={false} />\n <ComponentNode node={data.node} type={data.type} />\n </div>\n );\n}\n\nexport type DependenciesGraphProps = {\n rootNode: ComponentID;\n graph: GraphModel<NodeModel, EdgeModel>;\n componentWidgets: ComponentWidgetSlot;\n onLoad?: (instance: ReactFlowInstance) => void;\n} & Omit<ReactFlowProps, 'elements'>;\n\nexport function DependenciesGraph({\n graph,\n rootNode,\n componentWidgets,\n className,\n onLoad,\n children,\n ...rest\n}: DependenciesGraphProps) {\n const nodeTypes: NodeTypes = React.useMemo(() => ({ ComponentNode: ComponentNodeContainer }), []);\n const graphRef = useRef<ReactFlowInstance>();\n const elements = calcElements(graph, { rootNode });\n\n const context = useMemo(() => ({ componentWidgets }), [componentWidgets]);\n\n const handleLoad = useCallback(\n (instance: ReactFlowInstance) => {\n if ((graph?.nodes.length ?? 0) <= 3) {\n instance.fitView({\n padding: 2,\n maxZoom: 1,\n });\n } else {\n instance.fitView({\n maxZoom: 1,\n });\n }\n onLoad?.(instance);\n },\n [onLoad]\n );\n\n // clear ref on unmount\n useEffect(() => () => (graphRef.current = undefined), []);\n\n useEffect(() => {\n setTimeout(() => {\n if (graph.nodes.length <= 3)\n return graphRef.current?.fitView({\n padding: 2,\n });\n return graphRef.current?.fitView();\n }, 0);\n }, [graph]);\n\n return (\n <ComponentGraphContext.Provider value={context}>\n {/* @ts-ignore - TODO - remove when ReactFlowProvider will be of type `FC<PropsWithChildren<{}>>` instead of `FC` (#5746) */}\n <ReactFlowProvider>\n <ReactFlow\n draggable={false}\n nodesDraggable={true}\n selectNodesOnDrag={false}\n nodesConnectable={false}\n zoomOnDoubleClick={false}\n elementsSelectable={false}\n maxZoom={100}\n minZoom={0}\n {...rest}\n className={classnames(styles.graph, className)}\n defaultNodes={elements.nodes}\n defaultEdges={elements.edges}\n nodeTypes={nodeTypes}\n onInit={handleLoad}\n proOptions={{\n hideAttribution: true,\n }}\n >\n <Background />\n <Controls className={styles.controls} />\n <MiniMap nodeColor={calcMinimapColors} className={styles.minimap} />\n {children}\n </ReactFlow>\n </ReactFlowProvider>\n </ComponentGraphContext.Provider>\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,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oC,YAAY,EAAE3B,QAAQ,CAACM,KAAM;IAC7BsB,YAAY,EAAE5B,QAAQ,CAAC6B,KAAM;IAC7BlC,SAAS,EAAEA,SAAU;IACrBmC,MAAM,EAAE3B,UAAW;IACnB4B,UAAU,EAAE;MACVC,eAAe,EAAE;IACnB;EAAE,iBAEFjH,MAAA,GAAAe,OAAA,CAAA8C,aAAA,CAACvD,UAAA,GAAA4G,UAAU,MAAE,CAAC,eACdlH,MAAA,GAAAe,OAAA,CAAA8C,aAAA,CAACvD,UAAA,GAAA6G,QAAQ;IAAC3C,SAAS,EAAEmC,kCAAM,CAACS;EAAS,CAAE,CAAC,eACxCpH,MAAA,GAAAe,OAAA,CAAA8C,aAAA,CAACvD,UAAA,GAAA+G,OAAO;IAACC,SAAS,EAAEC,4BAAkB;IAAC/C,SAAS,EAAEmC,kCAAM,CAACa;EAAQ,CAAE,CAAC,EACnE9C,QACQ,CACM,CACW,CAAC;AAErC","ignoreList":[]}
1
+ {"version":3,"names":["_react","data","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_reactflow","_componentNode","_calcElements","_minimap","_graphContext","_dependenciesGraphModule","_excluded","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","_objectWithoutProperties","o","_objectWithoutPropertiesLoose","getOwnPropertySymbols","indexOf","propertyIsEnumerable","ComponentNodeContainer","props","sourcePosition","Position","Top","targetPosition","Bottom","id","ReactFlowHandle","Handle","createElement","key","type","position","isConnectable","ComponentNode","node","DependenciesGraph","_ref","graph","rootNode","componentWidgets","className","onLoad","children","rest","nodeTypes","React","useMemo","graphRef","useRef","elements","calcElements","context","handleLoad","useCallback","instance","nodes","fitView","padding","maxZoom","useEffect","current","undefined","setTimeout","ComponentGraphContext","Provider","value","ReactFlowProvider","draggable","nodesDraggable","selectNodesOnDrag","nodesConnectable","zoomOnDoubleClick","elementsSelectable","minZoom","classnames","styles","defaultNodes","defaultEdges","edges","onInit","proOptions","hideAttribution","Background","Controls","controls","MiniMap","nodeColor","calcMinimapColors","minimap"],"sources":["dependencies-graph.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef } from 'react';\nimport classnames from 'classnames';\nimport ReactFlow, {\n Background,\n Controls,\n Handle,\n MiniMap,\n NodeProps,\n NodeTypes,\n ReactFlowInstance,\n Position,\n ReactFlowProps,\n ReactFlowProvider,\n} from 'reactflow';\nimport { ComponentID } from '@teambit/component';\nimport { ComponentWidgetSlot } from '../../graph.ui.runtime';\nimport { ComponentNode } from '../component-node';\nimport { EdgeModel, GraphModel, NodeModel } from '../query';\nimport { calcElements } from './calc-elements';\nimport { calcMinimapColors } from './minimap';\nimport { ComponentGraphContext } from './graph-context';\nimport 'reactflow/dist/style.css';\nimport styles from './dependencies-graph.module.scss';\n\nfunction ComponentNodeContainer(props: NodeProps) {\n const { sourcePosition = Position.Top, targetPosition = Position.Bottom, data, id } = props;\n const ReactFlowHandle = Handle;\n return (\n <div key={id}>\n <ReactFlowHandle type=\"target\" position={targetPosition} isConnectable={false} />\n <ReactFlowHandle type=\"source\" position={sourcePosition} isConnectable={false} />\n <ComponentNode node={data.node} type={data.type} />\n </div>\n );\n}\n\nexport type DependenciesGraphProps = {\n rootNode: ComponentID;\n graph: GraphModel<NodeModel, EdgeModel>;\n componentWidgets: ComponentWidgetSlot;\n onLoad?: (instance: ReactFlowInstance) => void;\n} & Omit<ReactFlowProps, 'elements'>;\n\nexport function DependenciesGraph({\n graph,\n rootNode,\n componentWidgets,\n className,\n onLoad,\n children,\n ...rest\n}: DependenciesGraphProps) {\n const nodeTypes: NodeTypes = React.useMemo(() => ({ ComponentNode: ComponentNodeContainer }), []);\n const graphRef = useRef<ReactFlowInstance>();\n const elements = calcElements(graph, { rootNode });\n\n const context = useMemo(() => ({ componentWidgets }), [componentWidgets]);\n\n const handleLoad = useCallback(\n (instance: ReactFlowInstance) => {\n if ((graph?.nodes.length ?? 0) <= 3) {\n instance.fitView({\n padding: 2,\n maxZoom: 1,\n });\n } else {\n instance.fitView({\n maxZoom: 1,\n });\n }\n onLoad?.(instance);\n },\n [onLoad]\n );\n\n // clear ref on unmount\n useEffect(() => () => (graphRef.current = undefined), []);\n\n useEffect(() => {\n setTimeout(() => {\n if (graph.nodes.length <= 3)\n return graphRef.current?.fitView({\n padding: 2,\n });\n return graphRef.current?.fitView();\n }, 0);\n }, [graph]);\n\n return (\n <ComponentGraphContext.Provider value={context}>\n {/* @ts-ignore - TODO - remove when ReactFlowProvider will be of type `FC<PropsWithChildren<{}>>` instead of `FC` (#5746) */}\n <ReactFlowProvider>\n <ReactFlow\n draggable={false}\n nodesDraggable={true}\n selectNodesOnDrag={false}\n nodesConnectable={false}\n zoomOnDoubleClick={false}\n elementsSelectable={false}\n maxZoom={100}\n minZoom={0}\n {...rest}\n className={classnames(styles.graph, className)}\n defaultNodes={elements.nodes}\n defaultEdges={elements.edges}\n nodeTypes={nodeTypes}\n onInit={handleLoad}\n proOptions={{\n hideAttribution: true,\n }}\n >\n <Background />\n <Controls className={styles.controls} />\n <MiniMap nodeColor={calcMinimapColors} className={styles.minimap} />\n {children}\n </ReactFlow>\n </ReactFlowProvider>\n </ComponentGraphContext.Provider>\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,YAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAF,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAA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,QAAQ;IAAC3C,SAAS,EAAEmC,kCAAM,CAACS;EAAS,CAAE,CAAC,eACxC/G,MAAA,GAAAe,OAAA,CAAAwC,aAAA,CAACjD,UAAA,GAAA0G,OAAO;IAACC,SAAS,EAAEC,4BAAkB;IAAC/C,SAAS,EAAEmC,kCAAM,CAACa;EAAQ,CAAE,CAAC,EACnE9C,QACQ,CACM,CACW,CAAC;AAErC","ignoreList":[]}
@@ -101,7 +101,7 @@ function _calcElements() {
101
101
  };
102
102
  return data;
103
103
  }
104
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
104
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
105
105
  const {
106
106
  graph,
107
107
  minimap,
@@ -1 +1 @@
1
- {"version":3,"names":["_dependenciesGraphModule","data","_interopRequireDefault","require","_dependenciesGraph","_graphContext","_depEdge","_minimap","_calcLayout","_calcElements","obj","__esModule","default","graph","minimap","controls","componentStyles","styles","exports"],"sources":["index.ts"],"sourcesContent":["import componentStyles from './dependencies-graph.module.scss';\n\nexport { DependenciesGraph } from './dependencies-graph';\nexport { ComponentGraphContext, ComponentGraph } from './graph-context';\nexport type { DependenciesGraphProps } from './dependencies-graph';\nexport { depTypeToClass, depTypeToLabel } from './dep-edge';\nexport { calcMinimapColors } from './minimap';\nexport { calcLayout } from './calc-layout';\nexport { calcElements } from './calc-elements';\n\nconst { graph, minimap, controls } = componentStyles;\nexport const styles = { graph, minimap, controls };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,yBAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,wBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,mBAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,kBAAA,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;AAEA,SAAAK,SAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,QAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,QAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,YAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,WAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,cAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,aAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA+C,SAAAC,uBAAAQ,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE/C,MAAM;EAAEG,KAAK;EAAEC,OAAO;EAAEC;AAAS,CAAC,GAAGC,kCAAe;AAC7C,MAAMC,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG;EAAEJ,KAAK;EAAEC,OAAO;EAAEC;AAAS,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_dependenciesGraphModule","data","_interopRequireDefault","require","_dependenciesGraph","_graphContext","_depEdge","_minimap","_calcLayout","_calcElements","e","__esModule","default","graph","minimap","controls","componentStyles","styles","exports"],"sources":["index.ts"],"sourcesContent":["import componentStyles from './dependencies-graph.module.scss';\n\nexport { DependenciesGraph } from './dependencies-graph';\nexport { ComponentGraphContext, ComponentGraph } from './graph-context';\nexport type { DependenciesGraphProps } from './dependencies-graph';\nexport { depTypeToClass, depTypeToLabel } from './dep-edge';\nexport { calcMinimapColors } from './minimap';\nexport { calcLayout } from './calc-layout';\nexport { calcElements } from './calc-elements';\n\nconst { graph, minimap, controls } = componentStyles;\nexport const styles = { graph, minimap, controls };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,yBAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,wBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,mBAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,kBAAA,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;AAEA,SAAAK,SAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,QAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,QAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,YAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,WAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,cAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,aAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA+C,SAAAC,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE/C,MAAM;EAAEG,KAAK;EAAEC,OAAO;EAAEC;AAAS,CAAC,GAAGC,kCAAe;AAC7C,MAAMC,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG;EAAEJ,KAAK;EAAEC,OAAO;EAAEC;AAAS,CAAC","ignoreList":[]}
@@ -26,9 +26,9 @@ function _evangelistInputCheckbox() {
26
26
  return data;
27
27
  }
28
28
  const _excluded = ["onChangeFilter", "isFiltered", "disable"];
29
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
30
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
31
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
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], t.indexOf(o) >= 0 || {}.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 (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
32
32
  function GraphFilters(_ref) {
33
33
  let {
34
34
  onChangeFilter,
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","_baseUiSurfaces","_evangelistInputCheckbox","_excluded","obj","__esModule","default","_objectWithoutProperties","source","excluded","target","_objectWithoutPropertiesLoose","key","i","Object","getOwnPropertySymbols","sourceSymbolKeys","length","indexOf","prototype","propertyIsEnumerable","call","hasOwnProperty","GraphFilters","_ref","onChangeFilter","isFiltered","disable","rest","createElement","Card","CheckboxLabel","checked","disabled","onInputChanged","e"],"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 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>\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,gBAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,eAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,yBAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,wBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAyE,MAAAK,SAAA;AAAA,SAAAJ,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD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ACN,UAAW;IACrBO,QAAQ,EAAEN,OAAQ;IAClBO,cAAc,EAAGC,CAAC,IAAKV,cAAc,CAAC,CAACU,CAAC,CAACzB,MAAM,CAACsB,OAAO;EAAE,GAExD,GAAG,EAAC,kBAEQ,CACZ,CACD,CAAC;AAEX","ignoreList":[]}
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 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>\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,gBAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,eAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,yBAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;E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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":[]}
@@ -74,7 +74,7 @@ function _graphPageModule() {
74
74
  };
75
75
  return data;
76
76
  }
77
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
77
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
78
78
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
79
79
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
80
80
  function GraphPage({
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireWildcard","require","_documenterUi","_designUiPages","_designUiPages2","_component","_uiFoundationUi","_query","_dependenciesGraph","_graphFilters","_graphPageModule","_interopRequireDefault","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","GraphPage","componentWidgets","component","useContext","ComponentContext","filter","setFilter","useState","onCheckFilter","isFiltered","undefined","graph","error","loading","useGraphQuery","id","toString","code","createElement","NotFoundPage","ServerErrorPage","FullLoader","className","styles","page","H2","size","DependenciesGraph","rootNode","GraphFilters","filters","disable","onChangeFilter"],"sources":["graph-page.tsx"],"sourcesContent":["import React, { useContext, useState } from 'react';\n\nimport { H2 } from '@teambit/documenter.ui.heading';\nimport { NotFoundPage } from '@teambit/design.ui.pages.not-found';\nimport { ServerErrorPage } from '@teambit/design.ui.pages.server-error';\nimport { ComponentContext } from '@teambit/component';\nimport { FullLoader } from '@teambit/ui-foundation.ui.full-loader';\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 const onCheckFilter = (isFiltered: boolean) => {\n setFilter(isFiltered ? 'runtimeOnly' : undefined);\n };\n\n const { graph, error, loading } = useGraphQuery([component.id.toString()], filter);\n if (error) return error.code === 404 ? <NotFoundPage /> : <ServerErrorPage />;\n if (!graph) return <FullLoader />;\n\n const isFiltered = filter === 'runtimeOnly';\n\n return (\n <div className={styles.page}>\n <H2 size=\"xs\">Component Dependencies</H2>\n <DependenciesGraph\n componentWidgets={componentWidgets}\n graph={graph}\n rootNode={component.id}\n className={styles.graph}\n >\n <GraphFilters\n className={styles.filters}\n disable={loading}\n isFiltered={isFiltered}\n onChangeFilter={onCheckFilter}\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,OAA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CAAAqC,aAAA,CAAC1C,aAAA,GAAAqD,YAAY;IACXP,SAAS,EAAEC,0BAAM,CAACO,OAAQ;IAC1BC,OAAO,EAAElB,OAAQ;IACjBJ,UAAU,EAAEA,UAAW;IACvBuB,cAAc,EAAExB;EAAc,CAC/B,CACgB,CAChB,CAAC;AAEV","ignoreList":[]}
1
+ {"version":3,"names":["_react","data","_interopRequireWildcard","require","_documenterUi","_designUiPages","_designUiPages2","_component","_uiFoundationUi","_query","_dependenciesGraph","_graphFilters","_graphPageModule","_interopRequireDefault","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","GraphPage","componentWidgets","component","useContext","ComponentContext","filter","setFilter","useState","onCheckFilter","isFiltered","undefined","graph","error","loading","useGraphQuery","id","toString","code","createElement","NotFoundPage","ServerErrorPage","FullLoader","className","styles","page","H2","size","DependenciesGraph","rootNode","GraphFilters","filters","disable","onChangeFilter"],"sources":["graph-page.tsx"],"sourcesContent":["import React, { useContext, useState } from 'react';\n\nimport { H2 } from '@teambit/documenter.ui.heading';\nimport { NotFoundPage } from '@teambit/design.ui.pages.not-found';\nimport { ServerErrorPage } from '@teambit/design.ui.pages.server-error';\nimport { ComponentContext } from '@teambit/component';\nimport { FullLoader } from '@teambit/ui-foundation.ui.full-loader';\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 const onCheckFilter = (isFiltered: boolean) => {\n setFilter(isFiltered ? 'runtimeOnly' : undefined);\n };\n\n const { graph, error, loading } = useGraphQuery([component.id.toString()], filter);\n if (error) return error.code === 404 ? <NotFoundPage /> : <ServerErrorPage />;\n if (!graph) return <FullLoader />;\n\n const isFiltered = filter === 'runtimeOnly';\n\n return (\n <div className={styles.page}>\n <H2 size=\"xs\">Component Dependencies</H2>\n <DependenciesGraph\n componentWidgets={componentWidgets}\n graph={graph}\n rootNode={component.id}\n className={styles.graph}\n >\n <GraphFilters\n className={styles.filters}\n disable={loading}\n isFiltered={isFiltered}\n onChangeFilter={onCheckFilter}\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;AAEA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,eAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,cAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,gBAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,eAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,WAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,UAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,gBAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,eAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAQ,OAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,MAAA,Y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EAEjC,MAAMZ,UAAU,GAAGJ,MAAM,KAAK,aAAa;EAE3C,oBACEvC,MAAA,GAAAgB,OAAA,CAAAoC,aAAA;IAAKI,SAAS,EAAEC,0BAAM,CAACC;EAAK,gBAC1B1D,MAAA,GAAAgB,OAAA,CAAAoC,aAAA,CAAChD,aAAA,GAAAuD,EAAE;IAACC,IAAI,EAAC;EAAI,GAAC,wBAA0B,CAAC,eACzC5D,MAAA,GAAAgB,OAAA,CAAAoC,aAAA,CAAC1C,kBAAA,GAAAmD,iBAAiB;IAChB1B,gBAAgB,EAAEA,gBAAiB;IACnCU,KAAK,EAAEA,KAAM;IACbiB,QAAQ,EAAE1B,SAAS,CAACa,EAAG;IACvBO,SAAS,EAAEC,0BAAM,CAACZ;EAAM,gBAExB7C,MAAA,GAAAgB,OAAA,CAAAoC,aAAA,CAACzC,aAAA,GAAAoD,YAAY;IACXP,SAAS,EAAEC,0BAAM,CAACO,OAAQ;IAC1BC,OAAO,EAAElB,OAAQ;IACjBJ,UAAU,EAAEA,UAAW;IACvBuB,cAAc,EAAExB;EAAc,CAC/B,CACgB,CAChB,CAAC;AAEV","ignoreList":[]}
@@ -37,7 +37,7 @@ function _graphFilters() {
37
37
  };
38
38
  return data;
39
39
  }
40
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
40
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
41
41
  const {
42
42
  graph,
43
43
  filters
@@ -1 +1 @@
1
- {"version":3,"names":["_graphPageModule","data","_interopRequireDefault","require","_graphPage","_graphFilters","obj","__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,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE/C,MAAM;EAAEG,KAAK;EAAEC;AAAQ,CAAC,GAAGC,0BAAU;AAC9B,MAAMC,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG;EAAEH,KAAK;EAAEC;AAAQ,CAAC","ignoreList":[]}
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":[]}
@@ -18,8 +18,8 @@ function _graphPage() {
18
18
  };
19
19
  return data;
20
20
  }
21
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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
23
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
24
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
25
  class GraphSection {
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","_graphPage","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","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: '~dependencies',\n element: <GraphPage componentWidgets={this.componentWidgetSlot} />,\n };\n navigationLink = {\n href: '~dependencies',\n children: 'Dependencies',\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,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAJ,GAAA,IAAAO,MAAA,CAAAC,cAAA,CAAAR,GAAA,EAAAI,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAX,GAAA,CAAAI,GAAA,IAAAC,KAAA,WAAAL,GAAA;AAAA,SAAAM,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAG,CAAA,2BAAAH,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAI,CAAA,GAAAJ,CAAA,CAAAK,MAAA,CAAAC,WAAA,kBAAAF,CAAA,QAAAH,CAAA,GAAAG,CAAA,CAAAG,IAAA,CAAAP,CAAA,EAAAG,CAAA,uCAAAF,CAAA,SAAAA,CAAA,YAAAO,SAAA,yEAAAL,CAAA,GAAAM,MAAA,GAAAC,MAAA,EAAAV,CAAA;AAGlC,MAAMW,YAAY,CAAoB;EAC3CC,WAAWA,CAASC,mBAAwC,EAAE;IAAA,KAA1CA,mBAAwC,GAAxCA,mBAAwC;IAAAtB,eAAA,gBAEpD;MACNuB,IAAI,EAAE,eAAe;MACrBC,OAAO,eAAEhC,MAAA,GAAAO,OAAA,CAAA0B,aAAA,CAAC7B,UAAA,GAAA8B,SAAS;QAACC,gBAAgB,EAAE,IAAI,CAACL;MAAoB,CAAE;IACnE,CAAC;IAAAtB,eAAA,yBACgB;MACf4B,IAAI,EAAE,eAAe;MACrBC,QAAQ,EAAE;IACZ,CAAC;IAAA7B,eAAA,gBACO,EAAE;EAVqD;AAWjE;AAAC8B,OAAA,CAAAV,YAAA,GAAAA,YAAA","ignoreList":[]}
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: '~dependencies',\n element: <GraphPage componentWidgets={this.componentWidgetSlot} />,\n };\n navigationLink = {\n href: '~dependencies',\n children: 'Dependencies',\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,IA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;IACnE,CAAC;IAAApB,eAAA,yBACgB;MACf0B,IAAI,EAAE,eAAe;MACrBC,QAAQ,EAAE;IACZ,CAAC;IAAA3B,eAAA,gBACO,EAAE;EAVqD;AAWjE;AAAC4B,OAAA,CAAAV,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.EdgeModel = void 0;
7
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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
8
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
9
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
10
  class EdgeModel {
@@ -1 +1 @@
1
- {"version":3,"names":["_client","data","require","GET_GRAPH","exports","gql"],"sources":["get-graph.query.ts"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { EdgeType } from '../../edge-type';\n\n// please update types when updating query, for added safety\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\n displayName: string;\n\n deprecation: {\n isDeprecate: boolean;\n };\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;AAGA;;AAEO,MAAME,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,IAAAE,aAAG,CAAC;AAC7B;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":[]}
1
+ {"version":3,"names":["_client","data","require","GET_GRAPH","exports","gql"],"sources":["get-graph.query.ts"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { EdgeType } from '../../edge-type';\n\n// please update types when updating query, for added safety\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\n displayName: string;\n\n deprecation: {\n isDeprecate: boolean;\n };\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;AAGA;;AAEO,MAAME,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,IAAAE,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":[]}
@@ -11,7 +11,7 @@ function _component() {
11
11
  };
12
12
  return data;
13
13
  }
14
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
14
+ 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; }
15
15
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
16
16
  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); }
17
17
  class NodeModel {
@@ -1 +1 @@
1
- {"version":3,"names":["_component","data","require","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","NodeModel","constructor","from","rawNode","node","id","component","ComponentModel","exports"],"sources":["node-model.ts"],"sourcesContent":["import { ComponentModel } from '@teambit/component';\nimport { RawNode } from './get-graph.query';\n\nexport class NodeModel {\n id: string;\n component: ComponentModel;\n\n static from(rawNode: RawNode) {\n const node = new NodeModel();\n node.id = rawNode.id;\n // @TODO - component model should not expect all fields to have values\n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,IAAI;EACb;AACF;AAACI,OAAA,CAAAR,SAAA,GAAAA,SAAA","ignoreList":[]}
1
+ {"version":3,"names":["_component","data","require","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","NodeModel","constructor","from","rawNode","node","id","component","ComponentModel","exports"],"sources":["node-model.ts"],"sourcesContent":["import { ComponentModel } from '@teambit/component';\nimport { RawNode } from './get-graph.query';\n\nexport class NodeModel {\n id: string;\n component: ComponentModel;\n\n static from(rawNode: RawNode) {\n const node = new NodeModel();\n node.id = rawNode.id;\n // @TODO - component model should not expect all fields to have values\n // @ts-ignore\n node.component = ComponentModel.from(rawNode.component);\n return node;\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAoD,SAAAE,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAD,CAAA,GAAAI,MAAA,CAAAC,cAAA,CAAAL,CAAA,EAAAC,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAT,CAAA,CAAAC,CAAA,IAAAC,CAAA,EAAAF,CAAA;AAAA,SAAAG,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,MAAAF,CAAA,GAAAE,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAb,CAAA,QAAAU,CAAA,GAAAV,CAAA,CAAAc,IAAA,CAAAZ,CAAA,EAAAD,CAAA,uCAAAS,CAAA,SAAAA,CAAA,YAAAK,SAAA,yEAAAd,CAAA,GAAAe,MAAA,GAAAC,MAAA,EAAAf,CAAA;AAG7C,MAAMgB,SAAS,CAAC;EAAAC,YAAA;IAAApB,eAAA;IAAAA,eAAA;EAAA;EAIrB,OAAOqB,IAAIA,CAACC,OAAgB,EAAE;IAC5B,MAAMC,IAAI,GAAG,IAAIJ,SAAS,CAAC,CAAC;IAC5BI,IAAI,CAACC,EAAE,GAAGF,OAAO,CAACE,EAAE;IACpB;IACA;IACAD,IAAI,CAACE,SAAS,GAAGC,2BAAc,CAACL,IAAI,CAACC,OAAO,CAACG,SAAS,CAAC;IACvD,OAAOF,IAAI;EACb;AACF;AAACI,OAAA,CAAAR,SAAA,GAAAA,SAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/graph",
3
- "version": "1.0.281",
3
+ "version": "1.0.283",
4
4
  "homepage": "https://bit.cloud/teambit/component/graph",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "graph",
9
- "version": "1.0.281"
9
+ "version": "1.0.283"
10
10
  },
11
11
  "dependencies": {
12
12
  "graphlib": "2.1.8",
@@ -15,8 +15,8 @@
15
15
  "graphql-tag": "2.12.1",
16
16
  "classnames": "2.2.6",
17
17
  "reactflow": "^11.11.3",
18
- "@dagrejs/dagre": "^1.1.2",
19
18
  "semver": "7.5.2",
19
+ "@dagrejs/dagre": "^1.1.2",
20
20
  "@teambit/component-id": "1.2.0",
21
21
  "@teambit/graph.cleargraph": "0.0.8",
22
22
  "@teambit/harmony": "0.4.6",
@@ -26,6 +26,8 @@
26
26
  "@teambit/component.ui.deprecation-icon": "0.0.509",
27
27
  "@teambit/design.ui.styles.ellipsis": "0.0.357",
28
28
  "@teambit/base-ui.routing.nav-link": "1.0.0",
29
+ "@teambit/design.ui.round-loader": "0.0.355",
30
+ "@teambit/component.ui.component-compare.status-resolver": "0.0.9",
29
31
  "@teambit/evangelist.input.checkbox.label": "1.0.3",
30
32
  "@teambit/design.ui.pages.not-found": "0.0.371",
31
33
  "@teambit/design.ui.pages.server-error": "0.0.368",
@@ -33,16 +35,14 @@
33
35
  "@teambit/ui-foundation.ui.full-loader": "0.0.500",
34
36
  "@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.505",
35
37
  "@teambit/ui-foundation.ui.react-router.use-query": "0.0.501",
36
- "@teambit/design.ui.round-loader": "0.0.355",
37
- "@teambit/component.ui.component-compare.status-resolver": "0.0.9",
38
- "@teambit/component": "1.0.281",
38
+ "@teambit/component": "1.0.283",
39
39
  "@teambit/cli": "0.0.865",
40
40
  "@teambit/toolbox.string.random": "0.0.1",
41
41
  "@teambit/component.ui.component-compare.models.component-compare-props": "0.0.109",
42
- "@teambit/graphql": "1.0.281",
42
+ "@teambit/graphql": "1.0.283",
43
43
  "@teambit/logger": "0.0.958",
44
- "@teambit/component-compare": "1.0.281",
45
- "@teambit/ui": "1.0.281",
44
+ "@teambit/component-compare": "1.0.283",
45
+ "@teambit/ui": "1.0.283",
46
46
  "@teambit/component.modules.component-url": "0.0.167",
47
47
  "@teambit/envs.ui.env-icon": "0.0.505",
48
48
  "@teambit/component.ui.component-compare.context": "0.0.118"