File tree Expand file tree Collapse file tree 4 files changed +8
-9
lines changed
packages/compass-indexes/src Expand file tree Collapse file tree 4 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import { usePreference } from 'compass-preferences-model/provider';
2121import IndexFlowSection from './index-flow-section' ;
2222import QueryFlowSection from './query-flow-section' ;
2323import toNS from 'mongodb-ns' ;
24- import type { Document as BsonDocument } from 'bson ' ;
24+ import type { Document } from 'mongodb ' ;
2525
2626const createIndexModalFieldsStyles = css ( {
2727 margin : `${ spacing [ 600 ] } px 0 ${ spacing [ 800 ] } px 0` ,
@@ -50,7 +50,7 @@ export type CreateIndexFormProps = {
5050 onRemoveFieldClick : ( idx : number ) => void ; // Minus icon.
5151 onTabClick : ( tab : Tab ) => void ;
5252 showIndexesGuidanceVariant ?: boolean ;
53- query : BsonDocument | null ;
53+ query : Document | null ;
5454} ;
5555
5656function CreateIndexForm ( {
Original file line number Diff line number Diff line change 77 useFocusRing ,
88 ParagraphSkeleton ,
99} from '@mongodb-js/compass-components' ;
10- import type { Document as BsonDocument } from 'bson ' ;
10+ import type { Document } from 'mongodb ' ;
1111import React , { useMemo , useCallback } from 'react' ;
1212import { css , spacing } from '@mongodb-js/compass-components' ;
1313import {
@@ -107,7 +107,7 @@ const QueryFlowSection = ({
107107 } : SuggestedIndexFetchedProps ) => Promise < void > ;
108108 indexSuggestions : Record < string , number > | null ;
109109 fetchingSuggestionsState : IndexSuggestionState ;
110- initialQuery : BsonDocument | null ;
110+ initialQuery : Document | null ;
111111} ) => {
112112 const [ inputQuery , setInputQuery ] = React . useState (
113113 JSON . stringify ( initialQuery ?? '' , null , 2 )
Original file line number Diff line number Diff line change @@ -29,14 +29,14 @@ import {
2929import { useConnectionInfoRef } from '@mongodb-js/compass-connections/provider' ;
3030import { usePreference } from 'compass-preferences-model/provider' ;
3131import CreateIndexModalHeader from './create-index-modal-header' ;
32- import type { Document as BsonDocument } from 'bson ' ;
32+ import type { Document } from 'mongodb ' ;
3333
3434type CreateIndexModalProps = React . ComponentProps < typeof CreateIndexForm > & {
3535 isVisible : boolean ;
3636 namespace : string ;
3737 error : string | null ;
3838 currentTab : Tab ;
39- query : BsonDocument | null ;
39+ query : Document | null ;
4040 onErrorBannerCloseClick : ( ) => void ;
4141 onCreateIndexClick : ( ) => void ;
4242 onCancelCreateIndexClick : ( ) => void ;
Original file line number Diff line number Diff line change 11import type { Document } from 'mongodb' ;
2- import type { Document as BsonDocument } from 'bson' ;
32import { EJSON , ObjectId } from 'bson' ;
43import type { CreateIndexesOptions , IndexDirection } from 'mongodb' ;
54import { isCollationValid } from 'mongodb-query-parser' ;
@@ -77,7 +76,7 @@ type ErrorClearedAction = {
7776
7877export type CreateIndexOpenedAction = {
7978 type : ActionTypes . CreateIndexOpened ;
80- query ?: BsonDocument ;
79+ query ?: Document ;
8180} ;
8281
8382type CreateIndexClosedAction = {
@@ -314,7 +313,7 @@ export type State = {
314313 sampleDocs : Array < Document > | null ;
315314
316315 // base query to be used for query flow index creation
317- query : BsonDocument | null ;
316+ query : Document | null ;
318317} ;
319318
320319export const INITIAL_STATE : State = {
You can’t perform that action at this time.
0 commit comments