From b33a61cf1a82145d4831fdf9711158d0b1e5ce3e Mon Sep 17 00:00:00 2001 From: Google AI Edge Date: Fri, 4 Oct 2024 16:21:11 -0700 Subject: [PATCH] Automated Code Change PiperOrigin-RevId: 682487306 --- src/ui/package-lock.json | 8 ++++---- src/ui/package.json | 2 +- src/ui/src/components/visualizer/graph_selector.ts | 4 ++-- src/ui/src/components/visualizer/node_styler_dialog.ts | 4 ++-- src/ui/src/components/visualizer/selection_panel.ts | 4 ++-- src/ui/src/components/visualizer/webgl_renderer.ts | 4 ++-- src/ui/src/services/server_director_service.ts | 4 ++-- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/ui/package-lock.json b/src/ui/package-lock.json index f0475832..da66cfd2 100644 --- a/src/ui/package-lock.json +++ b/src/ui/package-lock.json @@ -20,7 +20,7 @@ "@angular/router": "^18.1.0", "d3": "5.7.0", "rxjs": "~7.8.0", - "safevalues": "0.6.0", + "safevalues": "0.7.0", "three": "0.134.0", "tslib": "^2.3.0", "zone.js": "~0.14.3" @@ -11446,9 +11446,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/safevalues": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/safevalues/-/safevalues-0.6.0.tgz", - "integrity": "sha512-MZ7DcTOcIoPXN36/UONVE9BT0pmwlCr9WcS7Pj/q4FxOwr33FkWC0CUWj/THQXYWxf/F7urbhaHaOeFPSqGqHA==" + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/safevalues/-/safevalues-0.7.0.tgz", + "integrity": "sha512-nIQw6wmX9GPcAocYNRnYptG6jxVxeMBOurD53SV73AsldQpsYD4QqODjgQ5Vinix0b5bTQHWIC9o/Iq8zkgxqQ==" }, "node_modules/sass": { "version": "1.77.6", diff --git a/src/ui/package.json b/src/ui/package.json index 4f537dea..123b8c24 100644 --- a/src/ui/package.json +++ b/src/ui/package.json @@ -23,7 +23,7 @@ "@angular/router": "^18.1.0", "d3": "5.7.0", "rxjs": "~7.8.0", - "safevalues": "0.6.0", + "safevalues": "0.7.0", "three": "0.134.0", "tslib": "^2.3.0", "zone.js": "~0.14.3" diff --git a/src/ui/src/components/visualizer/graph_selector.ts b/src/ui/src/components/visualizer/graph_selector.ts index c679cb58..203c8a62 100644 --- a/src/ui/src/components/visualizer/graph_selector.ts +++ b/src/ui/src/components/visualizer/graph_selector.ts @@ -35,7 +35,7 @@ import {MatFormFieldModule} from '@angular/material/form-field'; import {MatIconModule} from '@angular/material/icon'; import {MatSelect, MatSelectModule} from '@angular/material/select'; import {MatTooltipModule} from '@angular/material/tooltip'; -import {safeAnchorEl} from 'safevalues/dom'; +import {setAnchorHref} from 'safevalues/dom'; import {AppService} from './app_service'; import {Graph, GraphCollection} from './common/input_graph'; import {exportToResource} from './common/utils'; @@ -231,7 +231,7 @@ export class GraphSelector { const dataUrl = `data:text/json;charset=utf-8, ${encodeURIComponent( JSON.stringify(this.selectedCollection, null, 2), )}`; - safeAnchorEl.setHref(link, dataUrl); + setAnchorHref(link, dataUrl); link.click(); } diff --git a/src/ui/src/components/visualizer/node_styler_dialog.ts b/src/ui/src/components/visualizer/node_styler_dialog.ts index 23142808..9a38b13e 100644 --- a/src/ui/src/components/visualizer/node_styler_dialog.ts +++ b/src/ui/src/components/visualizer/node_styler_dialog.ts @@ -31,7 +31,7 @@ import {MatDialogModule} from '@angular/material/dialog'; import {MatIconModule} from '@angular/material/icon'; import {MatMenuModule} from '@angular/material/menu'; import {MatTooltipModule} from '@angular/material/tooltip'; -import {safeAnchorEl} from 'safevalues/dom'; +import {setAnchorHref} from 'safevalues/dom'; import {Bubble} from '../bubble/bubble'; @@ -160,7 +160,7 @@ export class NodeStylerDialog { const dataUrl = `data:text/json;charset=utf-8, ${encodeURIComponent( JSON.stringify(this.rules(), null, 2), )}`; - safeAnchorEl.setHref(link, dataUrl); + setAnchorHref(link, dataUrl); link.click(); } diff --git a/src/ui/src/components/visualizer/selection_panel.ts b/src/ui/src/components/visualizer/selection_panel.ts index ecd86665..a4548bab 100644 --- a/src/ui/src/components/visualizer/selection_panel.ts +++ b/src/ui/src/components/visualizer/selection_panel.ts @@ -25,7 +25,7 @@ import { } from '@angular/core'; import {MatButtonModule} from '@angular/material/button'; import {MatIconModule} from '@angular/material/icon'; -import {safeAnchorEl} from 'safevalues/dom'; +import {setAnchorHref} from 'safevalues/dom'; import {AppService} from './app_service'; import {exportToResource} from './common/utils'; @@ -73,7 +73,7 @@ export class SelectionPanel { const dataUrl = `data:text/json;charset=utf-8, ${encodeURIComponent( JSON.stringify([subgraph], null, 2), )}`; - safeAnchorEl.setHref(link, dataUrl); + setAnchorHref(link, dataUrl); link.click(); } diff --git a/src/ui/src/components/visualizer/webgl_renderer.ts b/src/ui/src/components/visualizer/webgl_renderer.ts index 11ed792c..d9b6e8de 100644 --- a/src/ui/src/components/visualizer/webgl_renderer.ts +++ b/src/ui/src/components/visualizer/webgl_renderer.ts @@ -42,7 +42,7 @@ import {MatIconModule} from '@angular/material/icon'; import {MatMenuModule, MatMenuTrigger} from '@angular/material/menu'; import {MatSnackBar} from '@angular/material/snack-bar'; import {MatTooltip, MatTooltipModule} from '@angular/material/tooltip'; -import {safeAnchorEl} from 'safevalues/dom'; +import {setAnchorHref} from 'safevalues/dom'; import * as three from 'three'; import {AppService} from './app_service'; @@ -2633,7 +2633,7 @@ export class WebglRenderer implements OnInit, OnDestroy { // Download canvas data as png. const link = document.createElement('a'); link.download = 'model_explorer_graph.png'; - safeAnchorEl.setHref(link, canvas.toDataURL()); + setAnchorHref(link, canvas.toDataURL()); link.click(); this.webglRendererThreejsService.setSceneBackground( new THREE.Color(0xffffff), diff --git a/src/ui/src/services/server_director_service.ts b/src/ui/src/services/server_director_service.ts index a804d76e..88bc67ad 100644 --- a/src/ui/src/services/server_director_service.ts +++ b/src/ui/src/services/server_director_service.ts @@ -16,7 +16,7 @@ * ============================================================================== */ -import {safeLocation} from 'safevalues/dom'; +import {setLocationHref} from 'safevalues/dom'; import {IS_EXTERNAL} from '../common/flags'; import {INTERNAL_COLAB} from '../common/utils'; @@ -55,7 +55,7 @@ export class ServerDirectorService { switch (directive.name) { // Refresh page with the given url. case DirectiveName.RefreshPage: - safeLocation.setHref( + setLocationHref( window.location, directive.url, );