Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APM][ML] Update cytoscape with new index.d.ts def, fix typing issues #206651

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@
"css-box-model": "^1.2.1",
"css.escape": "^1.5.1",
"cypress-data-session": "^2.8.0",
"cytoscape": "^3.30.4",
"cytoscape": "^3.31.0",
"cytoscape-dagre": "^2.5.0",
"d3": "3.5.17",
"d3-array": "2.12.1",
Expand Down Expand Up @@ -1565,7 +1565,6 @@
"@types/cli-progress": "^3.11.5",
"@types/color": "^3.0.3",
"@types/cssstyle": "^2.2.4",
"@types/cytoscape": "^3.21.8",
"@types/d3": "^3.5.43",
"@types/d3-array": "^2.12.1",
"@types/d3-brush": "^3.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import type { CSSProperties, PropsWithChildren } from 'react';
import React, { useState, useRef, useEffect, createContext, useCallback, useMemo } from 'react';
import { css } from '@emotion/react';
import cytoscape, { type Stylesheet } from 'cytoscape';
import cytoscape, { type StylesheetJson } from 'cytoscape';
// @ts-ignore no declaration file
import dagre from 'cytoscape-dagre';
import { useCytoscapeOptions } from './cytoscape_options';
Expand All @@ -35,7 +35,7 @@ function useCytoscape(options: cytoscape.CytoscapeOptions) {
setCy(cytoscape({ ...options, container: ref.current }));
} else {
// update styles for existing instance
cy.style(options.style as unknown as Stylesheet);
cy.style(options.style as StylesheetJson);
}
}, [options, cy]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function isService(el: cytoscape.NodeSingular) {
const getStyle = (
euiTheme: EuiThemeComputed,
isTraceExplorerEnabled: boolean
): cytoscape.Stylesheet[] => {
): cytoscape.StylesheetJson => {
const lineColor = euiTheme.colors.mediumShade;
return [
{
Expand Down
13 changes: 4 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11446,11 +11446,6 @@
resolved "https://registry.yarnpkg.com/@types/cssstyle/-/cssstyle-2.2.4.tgz#3d333ab9f8e6c40183ad1d6ebeebfcb8da2bfe4b"
integrity sha512-FTGMeuHZtLB7hRm+NGvOLZElslR1UkKvZmEmFevOZe/e7Av0nFleka1s8ZwoX+QvbJ2y7r9NDZXIzyqpRWDJXQ==

"@types/cytoscape@^3.21.8":
version "3.21.8"
resolved "https://registry.yarnpkg.com/@types/cytoscape/-/cytoscape-3.21.8.tgz#6166a2eabd66d3ae3259024875e037492adb8db6"
integrity sha512-6Bo9ZDrv0vfwe8Sg/ERc5VL0yU0gYvP4dgZi0fAXYkKHfyHaNqWRMcwYm3mu4sLsXbB8ZuXE75sR7qnaOL5JgQ==

"@types/d3-array@^2.12.1":
version "2.12.3"
resolved "https://registry.yarnpkg.com/@types/d3-array/-/d3-array-2.12.3.tgz#8d16d51fb04ad5a5a8ebe14eb8263a579f1efdd1"
Expand Down Expand Up @@ -16568,10 +16563,10 @@ cytoscape-dagre@^2.5.0:
dependencies:
dagre "^0.8.5"

cytoscape@^3.30.4:
version "3.30.4"
resolved "https://registry.yarnpkg.com/cytoscape/-/cytoscape-3.30.4.tgz#3404da0a159c00a1a3df2c85b2b43fdc66a0e28e"
integrity sha512-OxtlZwQl1WbwMmLiyPSEBuzeTIQnwZhJYYWFzZ2PhEHVFwpeaqNIkUzSiso00D98qk60l8Gwon2RP304d3BJ1A==
cytoscape@^3.31.0:
version "3.31.0"
resolved "https://registry.yarnpkg.com/cytoscape/-/cytoscape-3.31.0.tgz#cffbbb8ca51db01cbf360e0cf59088db6d429837"
integrity sha512-zDGn1K/tfZwEnoGOcHc0H4XazqAAXAuDpcYw9mUnUjATjqljyCNGJv8uEvbvxGaGHaVshxMecyl6oc6uKzRfbw==

"d3-array@1 - 3", "d3-array@2 - 3", "[email protected] - 3", "[email protected] - 3", [email protected], d3-array@^3.2.2:
version "3.2.2"
Expand Down