@teambit/graph 1.0.1187 → 1.0.1188

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.
@@ -4,6 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.GraphMain = void 0;
7
+ function _harmonyModules() {
8
+ const data = require("@teambit/harmony.modules.runtimes");
9
+ _harmonyModules = function () {
10
+ return data;
11
+ };
12
+ return data;
13
+ }
7
14
  function _cli() {
8
15
  const data = require("@teambit/cli");
9
16
  _cli = function () {
@@ -152,7 +159,7 @@ class GraphMain {
152
159
  exports.GraphMain = GraphMain;
153
160
  _defineProperty(GraphMain, "slots", []);
154
161
  _defineProperty(GraphMain, "dependencies", [_graphql().GraphqlAspect, _component().ComponentAspect, _cli().CLIAspect, _logger().LoggerAspect]);
155
- _defineProperty(GraphMain, "runtime", _cli().MainRuntime);
162
+ _defineProperty(GraphMain, "runtime", _harmonyModules().MainRuntime);
156
163
  _graph2().GraphAspect.addRuntime(GraphMain);
157
164
 
158
165
  //# sourceMappingURL=graph.main.runtime.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_component","_graphql","_logger","_lodash","_graphBuilder","_graph","_graph2","_graphCmd","_legacy","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","GraphMain","constructor","componentAspect","logger","getGraph","ids","opts","graphBuilder","GraphBuilder","getGraphIds","getVisualGraphIds","setStatusLine","layout","includeLocalOnly","cycles","graphVizOpts","graphIdsAll","host","getHost","list","listIds","idsWithVersion","getIdsWithVersions","listStr","map","id","toString","graphIds","successorsSubgraph","nodeFilter","node","includes","edgeFilter","edge","targetId","sourceId","getVisualCyclesFromGraph","VisualDependencyGraph","loadFromClearGraph","cyclesGraph","findCycles","multipleCycles","cycle","intersection","length","undefined","subgraph","loadFromMultipleClearGraphs","compact","comps","getMany","comp","provider","graphql","cli","loggerMain","createLogger","GraphAspect","register","graphSchema","graphMain","GraphCmd","exports","GraphqlAspect","ComponentAspect","CLIAspect","LoggerAspect","MainRuntime","addRuntime"],"sources":["graph.main.runtime.ts"],"sourcesContent":["import type { CLIMain } from '@teambit/cli';\nimport { CLIAspect, MainRuntime } from '@teambit/cli';\nimport type { ComponentMain, ComponentID } from '@teambit/component';\nimport { ComponentAspect } from '@teambit/component';\nimport type { GraphqlMain } from '@teambit/graphql';\nimport { GraphqlAspect } from '@teambit/graphql';\nimport type { Logger, LoggerMain } from '@teambit/logger';\nimport { LoggerAspect } from '@teambit/logger';\nimport { compact, intersection } from 'lodash';\nimport type { GetGraphOpts } from './graph-builder';\nimport { GraphBuilder } from './graph-builder';\nimport { graphSchema } from './graph.graphql';\nimport { GraphAspect } from './graph.aspect';\nimport type { GraphOpt } from './graph-cmd';\nimport { GraphCmd } from './graph-cmd';\nimport type { ComponentGraph } from './component-graph';\nimport type { ComponentIdGraph } from './component-id-graph';\nimport type { GraphConfig } from '@teambit/legacy.dependency-graph';\nimport { VisualDependencyGraph } from '@teambit/legacy.dependency-graph';\n\nexport class GraphMain {\n constructor(\n private componentAspect: ComponentMain,\n private logger: Logger\n ) {}\n\n /**\n * important - prefer using `getGraphIds()` it's way better in terms of performance.\n */\n async getGraph(ids?: ComponentID[], opts: GetGraphOpts = {}): Promise<ComponentGraph> {\n const graphBuilder = new GraphBuilder(this.componentAspect);\n return graphBuilder.getGraph(ids, opts);\n }\n\n async getGraphIds(ids?: ComponentID[], opts: GetGraphOpts = {}): Promise<ComponentIdGraph> {\n const graphBuilder = new GraphBuilder(this.componentAspect);\n return graphBuilder.getGraphIds(ids, opts);\n }\n\n /**\n * this visual graph-ids can render the graph as a SVG/png and other formats.\n */\n async getVisualGraphIds(ids?: ComponentID[], opts: GraphOpt = {}): Promise<VisualDependencyGraph> {\n this.logger.setStatusLine('loading graph');\n const { layout, includeLocalOnly, cycles } = opts;\n const graphVizOpts: GraphConfig = {};\n if (layout) graphVizOpts.layout = layout;\n const graphIdsAll = await this.getGraphIds(ids);\n\n const host = this.componentAspect.getHost();\n const list = await host.listIds();\n const idsWithVersion = await this.getIdsWithVersions(ids);\n const listStr = list.map((id) => id.toString());\n const graphIds = includeLocalOnly\n ? graphIdsAll.successorsSubgraph(idsWithVersion || listStr, {\n nodeFilter: (node) => listStr.includes(node.id),\n edgeFilter: (edge) => listStr.includes(edge.targetId) && listStr.includes(edge.sourceId),\n })\n : graphIdsAll;\n this.logger.setStatusLine('rendering graph');\n if (cycles) {\n return this.getVisualCyclesFromGraph(graphIds, idsWithVersion, graphVizOpts);\n }\n return VisualDependencyGraph.loadFromClearGraph(graphIds, graphVizOpts, idsWithVersion);\n }\n\n private async getVisualCyclesFromGraph(\n graphIds: ComponentIdGraph,\n idsWithVersion?: string[],\n graphVizOpts: GraphConfig = {}\n ): Promise<VisualDependencyGraph> {\n const cyclesGraph = graphIds.findCycles();\n const multipleCycles = cyclesGraph.map((cycle) => {\n if (idsWithVersion && intersection(idsWithVersion, cycle).length < 1) return undefined;\n return graphIds.subgraph(cycle, {\n nodeFilter: (node) => cycle.includes(node.id),\n edgeFilter: (edge) => cycle.includes(edge.targetId),\n });\n });\n return VisualDependencyGraph.loadFromMultipleClearGraphs(compact(multipleCycles), graphVizOpts, idsWithVersion);\n }\n\n private async getIdsWithVersions(ids?: ComponentID[]): Promise<string[] | undefined> {\n const host = this.componentAspect.getHost();\n if (!ids) return undefined;\n const comps = await host.getMany(ids);\n if (comps.length) return comps.map((comp) => comp.id.toString());\n return undefined;\n }\n\n static slots = [];\n static dependencies = [GraphqlAspect, ComponentAspect, CLIAspect, LoggerAspect];\n static runtime = MainRuntime;\n static async provider([graphql, componentAspect, cli, loggerMain]: [\n GraphqlMain,\n ComponentMain,\n CLIMain,\n LoggerMain,\n ]) {\n const logger = loggerMain.createLogger(GraphAspect.id);\n\n const graphBuilder = new GraphBuilder(componentAspect);\n graphql.register(() => graphSchema(graphBuilder, componentAspect));\n\n const graphMain = new GraphMain(componentAspect, logger);\n cli.register(new GraphCmd(componentAspect, graphMain));\n\n return graphMain;\n }\n}\n\nGraphAspect.addRuntime(GraphMain);\n"],"mappings":";;;;;;AACA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,SAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,QAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,cAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,aAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,OAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,MAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,QAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,OAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAS,UAAA;EAAA,MAAAT,IAAA,GAAAC,OAAA;EAAAQ,SAAA,YAAAA,CAA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AO,CAAC7C,GAAG,CAAC;IACrC,IAAI4C,KAAK,CAACL,MAAM,EAAE,OAAOK,KAAK,CAACzB,GAAG,CAAE2B,IAAI,IAAKA,IAAI,CAAC1B,EAAE,CAACC,QAAQ,CAAC,CAAC,CAAC;IAChE,OAAOmB,SAAS;EAClB;EAKA,aAAaO,QAAQA,CAAC,CAACC,OAAO,EAAEnD,eAAe,EAAEoD,GAAG,EAAEC,UAAU,CAK/D,EAAE;IACD,MAAMpD,MAAM,GAAGoD,UAAU,CAACC,YAAY,CAACC,qBAAW,CAAChC,EAAE,CAAC;IAEtD,MAAMlB,YAAY,GAAG,KAAIC,4BAAY,EAACN,eAAe,CAAC;IACtDmD,OAAO,CAACK,QAAQ,CAAC,MAAM,IAAAC,oBAAW,EAACpD,YAAY,EAAEL,eAAe,CAAC,CAAC;IAElE,MAAM0D,SAAS,GAAG,IAAI5D,SAAS,CAACE,eAAe,EAAEC,MAAM,CAAC;IACxDmD,GAAG,CAACI,QAAQ,CAAC,KAAIG,oBAAQ,EAAC3D,eAAe,EAAE0D,SAAS,CAAC,CAAC;IAEtD,OAAOA,SAAS;EAClB;AACF;AAACE,OAAA,CAAA9D,SAAA,GAAAA,SAAA;AAAAnB,eAAA,CAzFYmB,SAAS,WAsEL,EAAE;AAAAnB,eAAA,CAtENmB,SAAS,kBAuEE,CAAC+D,wBAAa,EAAEC,4BAAe,EAAEC,gBAAS,EAAEC,sBAAY,CAAC;AAAArF,eAAA,CAvEpEmB,SAAS,aAwEHmE,kBAAW;AAmB9BV,qBAAW,CAACW,UAAU,CAACpE,SAAS,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_harmonyModules","data","require","_cli","_component","_graphql","_logger","_lodash","_graphBuilder","_graph","_graph2","_graphCmd","_legacy","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","GraphMain","constructor","componentAspect","logger","getGraph","ids","opts","graphBuilder","GraphBuilder","getGraphIds","getVisualGraphIds","setStatusLine","layout","includeLocalOnly","cycles","graphVizOpts","graphIdsAll","host","getHost","list","listIds","idsWithVersion","getIdsWithVersions","listStr","map","id","toString","graphIds","successorsSubgraph","nodeFilter","node","includes","edgeFilter","edge","targetId","sourceId","getVisualCyclesFromGraph","VisualDependencyGraph","loadFromClearGraph","cyclesGraph","findCycles","multipleCycles","cycle","intersection","length","undefined","subgraph","loadFromMultipleClearGraphs","compact","comps","getMany","comp","provider","graphql","cli","loggerMain","createLogger","GraphAspect","register","graphSchema","graphMain","GraphCmd","exports","GraphqlAspect","ComponentAspect","CLIAspect","LoggerAspect","MainRuntime","addRuntime"],"sources":["graph.main.runtime.ts"],"sourcesContent":["import type { CLIMain } from '@teambit/cli';\nimport { MainRuntime } from '@teambit/harmony.modules.runtimes';\nimport { CLIAspect } from '@teambit/cli';\nimport type { ComponentMain, ComponentID } from '@teambit/component';\nimport { ComponentAspect } from '@teambit/component';\nimport type { GraphqlMain } from '@teambit/graphql';\nimport { GraphqlAspect } from '@teambit/graphql';\nimport type { Logger, LoggerMain } from '@teambit/logger';\nimport { LoggerAspect } from '@teambit/logger';\nimport { compact, intersection } from 'lodash';\nimport type { GetGraphOpts } from './graph-builder';\nimport { GraphBuilder } from './graph-builder';\nimport { graphSchema } from './graph.graphql';\nimport { GraphAspect } from './graph.aspect';\nimport type { GraphOpt } from './graph-cmd';\nimport { GraphCmd } from './graph-cmd';\nimport type { ComponentGraph } from './component-graph';\nimport type { ComponentIdGraph } from './component-id-graph';\nimport type { GraphConfig } from '@teambit/legacy.dependency-graph';\nimport { VisualDependencyGraph } from '@teambit/legacy.dependency-graph';\n\nexport class GraphMain {\n constructor(\n private componentAspect: ComponentMain,\n private logger: Logger\n ) {}\n\n /**\n * important - prefer using `getGraphIds()` it's way better in terms of performance.\n */\n async getGraph(ids?: ComponentID[], opts: GetGraphOpts = {}): Promise<ComponentGraph> {\n const graphBuilder = new GraphBuilder(this.componentAspect);\n return graphBuilder.getGraph(ids, opts);\n }\n\n async getGraphIds(ids?: ComponentID[], opts: GetGraphOpts = {}): Promise<ComponentIdGraph> {\n const graphBuilder = new GraphBuilder(this.componentAspect);\n return graphBuilder.getGraphIds(ids, opts);\n }\n\n /**\n * this visual graph-ids can render the graph as a SVG/png and other formats.\n */\n async getVisualGraphIds(ids?: ComponentID[], opts: GraphOpt = {}): Promise<VisualDependencyGraph> {\n this.logger.setStatusLine('loading graph');\n const { layout, includeLocalOnly, cycles } = opts;\n const graphVizOpts: GraphConfig = {};\n if (layout) graphVizOpts.layout = layout;\n const graphIdsAll = await this.getGraphIds(ids);\n\n const host = this.componentAspect.getHost();\n const list = await host.listIds();\n const idsWithVersion = await this.getIdsWithVersions(ids);\n const listStr = list.map((id) => id.toString());\n const graphIds = includeLocalOnly\n ? graphIdsAll.successorsSubgraph(idsWithVersion || listStr, {\n nodeFilter: (node) => listStr.includes(node.id),\n edgeFilter: (edge) => listStr.includes(edge.targetId) && listStr.includes(edge.sourceId),\n })\n : graphIdsAll;\n this.logger.setStatusLine('rendering graph');\n if (cycles) {\n return this.getVisualCyclesFromGraph(graphIds, idsWithVersion, graphVizOpts);\n }\n return VisualDependencyGraph.loadFromClearGraph(graphIds, graphVizOpts, idsWithVersion);\n }\n\n private async getVisualCyclesFromGraph(\n graphIds: ComponentIdGraph,\n idsWithVersion?: string[],\n graphVizOpts: GraphConfig = {}\n ): Promise<VisualDependencyGraph> {\n const cyclesGraph = graphIds.findCycles();\n const multipleCycles = cyclesGraph.map((cycle) => {\n if (idsWithVersion && intersection(idsWithVersion, cycle).length < 1) return undefined;\n return graphIds.subgraph(cycle, {\n nodeFilter: (node) => cycle.includes(node.id),\n edgeFilter: (edge) => cycle.includes(edge.targetId),\n });\n });\n return VisualDependencyGraph.loadFromMultipleClearGraphs(compact(multipleCycles), graphVizOpts, idsWithVersion);\n }\n\n private async getIdsWithVersions(ids?: ComponentID[]): Promise<string[] | undefined> {\n const host = this.componentAspect.getHost();\n if (!ids) return undefined;\n const comps = await host.getMany(ids);\n if (comps.length) return comps.map((comp) => comp.id.toString());\n return undefined;\n }\n\n static slots = [];\n static dependencies = [GraphqlAspect, ComponentAspect, CLIAspect, LoggerAspect];\n static runtime = MainRuntime;\n static async provider([graphql, componentAspect, cli, loggerMain]: [\n GraphqlMain,\n ComponentMain,\n CLIMain,\n LoggerMain,\n ]) {\n const logger = loggerMain.createLogger(GraphAspect.id);\n\n const graphBuilder = new GraphBuilder(componentAspect);\n graphql.register(() => graphSchema(graphBuilder, componentAspect));\n\n const graphMain = new GraphMain(componentAspect, logger);\n cli.register(new GraphCmd(componentAspect, graphMain));\n\n return graphMain;\n }\n}\n\nGraphAspect.addRuntime(GraphMain);\n"],"mappings":";;;;;;AACA,SAAAA,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,KAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,SAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,QAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,QAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,OAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;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,SAAS,WAsEL,EAAE;AAAAnB,eAAA,CAtENmB,SAAS,kBAuEE,CAAC+D,wBAAa,EAAEC,4BAAe,EAAEC,gBAAS,EAAEC,sBAAY,CAAC;AAAArF,eAAA,CAvEpEmB,SAAS,aAwEHmE,6BAAW;AAmB9BV,qBAAW,CAACW,UAAU,CAACpE,SAAS,CAAC","ignoreList":[]}
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.GraphUI = void 0;
7
- function _ui() {
8
- const data = require("@teambit/ui");
9
- _ui = function () {
7
+ function _harmonyModules() {
8
+ const data = require("@teambit/harmony.modules.runtimes");
9
+ _harmonyModules = function () {
10
10
  return data;
11
11
  };
12
12
  return data;
@@ -94,7 +94,7 @@ class GraphUI {
94
94
  }
95
95
  exports.GraphUI = GraphUI;
96
96
  _defineProperty(GraphUI, "dependencies", [_component().ComponentAspect, _componentCompare().ComponentCompareAspect]);
97
- _defineProperty(GraphUI, "runtime", _ui().UIRuntime);
97
+ _defineProperty(GraphUI, "runtime", _harmonyModules().UIRuntime);
98
98
  _defineProperty(GraphUI, "slots", [_harmony().Slot.withType()]);
99
99
  _defineProperty(GraphUI, "defaultConfig", {
100
100
  componentTab: true
@@ -1 +1 @@
1
- {"version":3,"names":["_ui","data","require","_harmony","_componentCompare","_component","_graph","_graph2","_graphCompare","_dependenciesGraph","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","GraphUI","getDependenciesGraph","DependenciesGraph","registerComponentWidget","componentWidgetSlot","register","constructor","provider","componentUI","componentCompare","config","graphUI","section","GraphSection","graphSection","GraphCompareSection","componentTab","registerNavigation","navigationLink","order","registerRoute","route","registerRoutes","exports","ComponentAspect","ComponentCompareAspect","UIRuntime","Slot","withType","GraphAspect","addRuntime"],"sources":["graph.ui.runtime.tsx"],"sourcesContent":["import type { ComponentType } from 'react';\nimport { UIRuntime } from '@teambit/ui';\nimport type { SlotRegistry } from '@teambit/harmony';\nimport { Slot } from '@teambit/harmony';\nimport type { ComponentCompareUI } from '@teambit/component-compare';\nimport { ComponentCompareAspect } from '@teambit/component-compare';\nimport type { ComponentUI, ComponentModel } from '@teambit/component';\nimport { ComponentAspect } from '@teambit/component';\nimport { GraphAspect } from './graph.aspect';\nimport { GraphSection } from './ui/graph.section';\nimport { GraphCompareSection } from './graph.compare.section';\nimport { DependenciesGraph } from './ui/dependencies-graph';\n\nexport interface ComponentWidgetProps extends React.HTMLAttributes<HTMLDivElement> {\n component: ComponentModel;\n}\nexport type ComponentWidget = ComponentType<ComponentWidgetProps>;\nexport type ComponentWidgetSlot = SlotRegistry<ComponentWidget>;\n\nexport type GraphUIConfig = {\n componentTab: boolean;\n};\n\n/**\n * Presents dependencies graph in the component page\n */\nexport class GraphUI {\n getDependenciesGraph() {\n return DependenciesGraph;\n }\n\n /**\n * adds plugins to component nodes\n * @param value\n */\n registerComponentWidget(value: ComponentWidget) {\n this.componentWidgetSlot.register(value);\n }\n\n constructor(private componentWidgetSlot: ComponentWidgetSlot) {}\n static dependencies = [ComponentAspect, ComponentCompareAspect];\n static runtime = UIRuntime;\n static slots = [Slot.withType<ComponentWidget>()];\n static defaultConfig = {\n componentTab: true,\n };\n\n static async provider(\n [componentUI, componentCompare]: [ComponentUI, ComponentCompareUI],\n config: GraphUIConfig,\n [componentWidgetSlot]: [ComponentWidgetSlot]\n ) {\n const graphUI = new GraphUI(componentWidgetSlot);\n const section = new GraphSection(componentWidgetSlot);\n const graphSection = new GraphCompareSection();\n if (config.componentTab) componentUI.registerNavigation(section.navigationLink, section.order);\n componentUI.registerRoute(section.route);\n componentCompare.registerNavigation(graphSection);\n componentCompare.registerRoutes([graphSection.route]);\n return graphUI;\n }\n}\n\nGraphAspect.addRuntime(GraphUI);\n"],"mappings":";;;;;;AACA,SAAAA,IAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,GAAA,YAAAA,C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AAY,CAAC;IACjDL,gBAAgB,CAACa,cAAc,CAAC,CAACR,YAAY,CAACO,KAAK,CAAC,CAAC;IACrD,OAAOV,OAAO;EAChB;AACF;AAACY,OAAA,CAAAvB,OAAA,GAAAA,OAAA;AAAAnB,eAAA,CAnCYmB,OAAO,kBAcI,CAACwB,4BAAe,EAAEC,0CAAsB,CAAC;AAAA5C,eAAA,CAdpDmB,OAAO,aAeD0B,eAAS;AAAA7C,eAAA,CAffmB,OAAO,WAgBH,CAAC2B,eAAI,CAACC,QAAQ,CAAkB,CAAC,CAAC;AAAA/C,eAAA,CAhBtCmB,OAAO,mBAiBK;EACrBgB,YAAY,EAAE;AAChB,CAAC;AAkBHa,oBAAW,CAACC,UAAU,CAAC9B,OAAO,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_harmonyModules","data","require","_harmony","_componentCompare","_component","_graph","_graph2","_graphCompare","_dependenciesGraph","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","GraphUI","getDependenciesGraph","DependenciesGraph","registerComponentWidget","componentWidgetSlot","register","constructor","provider","componentUI","componentCompare","config","graphUI","section","GraphSection","graphSection","GraphCompareSection","componentTab","registerNavigation","navigationLink","order","registerRoute","route","registerRoutes","exports","ComponentAspect","ComponentCompareAspect","UIRuntime","Slot","withType","GraphAspect","addRuntime"],"sources":["graph.ui.runtime.tsx"],"sourcesContent":["import type { ComponentType } from 'react';\nimport { UIRuntime } from '@teambit/harmony.modules.runtimes';\nimport type { SlotRegistry } from '@teambit/harmony';\nimport { Slot } from '@teambit/harmony';\nimport type { ComponentCompareUI } from '@teambit/component-compare';\nimport { ComponentCompareAspect } from '@teambit/component-compare';\nimport type { ComponentUI, ComponentModel } from '@teambit/component';\nimport { ComponentAspect } from '@teambit/component';\nimport { GraphAspect } from './graph.aspect';\nimport { GraphSection } from './ui/graph.section';\nimport { GraphCompareSection } from './graph.compare.section';\nimport { DependenciesGraph } from './ui/dependencies-graph';\n\nexport interface ComponentWidgetProps extends React.HTMLAttributes<HTMLDivElement> {\n component: ComponentModel;\n}\nexport type ComponentWidget = ComponentType<ComponentWidgetProps>;\nexport type ComponentWidgetSlot = SlotRegistry<ComponentWidget>;\n\nexport type GraphUIConfig = {\n componentTab: boolean;\n};\n\n/**\n * Presents dependencies graph in the component page\n */\nexport class GraphUI {\n getDependenciesGraph() {\n return DependenciesGraph;\n }\n\n /**\n * adds plugins to component nodes\n * @param value\n */\n registerComponentWidget(value: ComponentWidget) {\n this.componentWidgetSlot.register(value);\n }\n\n constructor(private componentWidgetSlot: ComponentWidgetSlot) {}\n static dependencies = [ComponentAspect, ComponentCompareAspect];\n static runtime = UIRuntime;\n static slots = [Slot.withType<ComponentWidget>()];\n static defaultConfig = {\n componentTab: true,\n };\n\n static async provider(\n [componentUI, componentCompare]: [ComponentUI, ComponentCompareUI],\n config: GraphUIConfig,\n [componentWidgetSlot]: [ComponentWidgetSlot]\n ) {\n const graphUI = new GraphUI(componentWidgetSlot);\n const section = new GraphSection(componentWidgetSlot);\n const graphSection = new GraphCompareSection();\n if (config.componentTab) componentUI.registerNavigation(section.navigationLink, section.order);\n componentUI.registerRoute(section.route);\n componentCompare.registerNavigation(graphSection);\n componentCompare.registerRoutes([graphSection.route]);\n return graphUI;\n }\n}\n\nGraphAspect.addRuntime(GraphUI);\n"],"mappings":";;;;;;AACA,SAAAA,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,SAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,kBAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,iBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;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CAffmB,OAAO,WAgBH,CAAC2B,eAAI,CAACC,QAAQ,CAAkB,CAAC,CAAC;AAAA/C,eAAA,CAhBtCmB,OAAO,mBAiBK;EACrBgB,YAAY,EAAE;AAChB,CAAC;AAkBHa,oBAAW,CAACC,UAAU,CAAC9B,OAAO,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_graph@1.0.1187/dist/graph.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_graph@1.0.1187/dist/graph.docs.md';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_graph@1.0.1188/dist/graph.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_graph@1.0.1188/dist/graph.docs.md';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -1,5 +1,5 @@
1
1
  import type { ComponentType } from 'react';
2
- import { UIRuntime } from '@teambit/ui';
2
+ import { UIRuntime } from '@teambit/harmony.modules.runtimes';
3
3
  import type { SlotRegistry } from '@teambit/harmony';
4
4
  import { Slot } from '@teambit/harmony';
5
5
  import type { ComponentCompareUI } from '@teambit/component-compare';
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/graph",
3
- "version": "1.0.1187",
3
+ "version": "1.0.1188",
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.1187"
9
+ "version": "1.0.1188"
10
10
  },
11
11
  "dependencies": {
12
12
  "graphlib": "2.1.8",
@@ -18,6 +18,8 @@
18
18
  "@dagrejs/dagre": "^1.1.2",
19
19
  "@teambit/component-id": "1.2.4",
20
20
  "@teambit/graph.cleargraph": "0.0.11",
21
+ "@teambit/legacy.dependency-graph": "0.0.174",
22
+ "@teambit/scope.remotes": "0.0.171",
21
23
  "@teambit/harmony": "0.4.12",
22
24
  "@teambit/component.ui.component-compare.models.component-compare-change-type": "0.0.7",
23
25
  "@teambit/component.ui.component-compare.models.component-compare-props": "0.0.142",
@@ -36,14 +38,12 @@
36
38
  "@teambit/design.ui.pages.not-found": "0.0.371",
37
39
  "@teambit/design.ui.pages.server-error": "0.0.368",
38
40
  "@teambit/ui-foundation.ui.react-router.use-query": "0.0.505",
39
- "@teambit/legacy.dependency-graph": "0.0.174",
40
- "@teambit/component": "1.0.1187",
41
- "@teambit/cli": "0.0.1400",
42
- "@teambit/scope.remotes": "0.0.171",
43
- "@teambit/graphql": "1.0.1187",
44
- "@teambit/logger": "0.0.1493",
45
- "@teambit/component-compare": "1.0.1187",
46
- "@teambit/ui": "1.0.1187"
41
+ "@teambit/component": "1.0.1188",
42
+ "@teambit/cli": "0.0.1401",
43
+ "@teambit/graphql": "1.0.1188",
44
+ "@teambit/harmony.modules.runtimes": "0.0.1",
45
+ "@teambit/logger": "0.0.1494",
46
+ "@teambit/component-compare": "1.0.1188"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/graphlib": "2.1.7",