@@ -19,8 +19,7 @@ import { extensiblePredicateDefinitions } from "../../data-extensions-editor/pre
1919import { Mode } from "../../data-extensions-editor/shared/mode" ;
2020import { Dropdown } from "../common/Dropdown" ;
2121import { MethodClassifications } from "./MethodClassifications" ;
22- import { Codicon } from "../common/icon" ;
23- import { assertNever } from "../../common/helpers-pure" ;
22+ import { ModelingStatusIndicator } from "./ModelingStatusIndicator" ;
2423
2524const ApiOrMethodCell = styled ( VSCodeDataGridCell ) `
2625 display: flex;
@@ -215,7 +214,7 @@ function ModelableMethodRow(props: Props) {
215214 return (
216215 < VSCodeDataGridRow >
217216 < ApiOrMethodCell gridColumn = { 1 } >
218- < ModificationIndicator state = { modificationState } />
217+ < ModelingStatusIndicator status = { modificationState } />
219218 < ExternalApiUsageName { ...props } />
220219 { mode === Mode . Application && (
221220 < UsagesButton onClick = { jumpToUsage } >
@@ -271,7 +270,7 @@ function UnmodelableMethodRow(props: Props) {
271270 return (
272271 < VSCodeDataGridRow >
273272 < ApiOrMethodCell gridColumn = { 1 } >
274- < ModificationIndicator state = "saved" />
273+ < ModelingStatusIndicator status = "saved" />
275274 < ExternalApiUsageName { ...props } />
276275 { mode === Mode . Application && (
277276 < UsagesButton onClick = { jumpToUsage } >
@@ -307,20 +306,3 @@ function sendJumpToUsageMessage(externalApiUsage: ExternalApiUsage) {
307306 location : externalApiUsage . usages [ 0 ] . url ,
308307 } ) ;
309308}
310-
311- function ModificationIndicator ( {
312- state,
313- } : {
314- state : "unmodeled" | "unsaved" | "saved" ;
315- } ) {
316- switch ( state ) {
317- case "unmodeled" :
318- return < Codicon name = "circle-large-outline" label = "Method not modeled" /> ;
319- case "unsaved" :
320- return < Codicon name = "pass" label = "Changes have not been saved" /> ;
321- case "saved" :
322- return < Codicon name = "pass-filled" label = "Method modeled" /> ;
323- default :
324- assertNever ( state ) ;
325- }
326- }
0 commit comments