-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add openAddDataControlFlyout
to API
#42
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ | |
* Side Public License, v 1. | ||
*/ | ||
|
||
import { Observable } from 'rxjs'; | ||
|
||
import { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public'; | ||
import { Filter } from '@kbn/es-query'; | ||
import { | ||
|
@@ -24,10 +26,11 @@ import { | |
PublishingSubject, | ||
} from '@kbn/presentation-publishing'; | ||
import { PublishesDataViews } from '@kbn/presentation-publishing/interfaces/publishes_data_views'; | ||
import { Observable } from 'rxjs'; | ||
import { ControlStyle, ControlWidth } from '../../types'; | ||
|
||
import { ParentIgnoreSettings } from '../..'; | ||
import { ControlInputTransform } from '../../../common'; | ||
import { ControlGroupChainingSystem } from '../../../common/control_group/types'; | ||
import { ControlStyle, ControlWidth } from '../../types'; | ||
import { DefaultControlState, PublishesControlDisplaySettings } from '../controls/types'; | ||
import { ControlFetchContext } from './control_fetch/control_fetch'; | ||
|
||
|
@@ -66,7 +69,9 @@ export type ControlGroupApi = PresentationContainer & | |
ignoreParentSettings$: PublishingSubject<ParentIgnoreSettings | undefined>; | ||
allowExpensiveQueries$: PublishingSubject<boolean>; | ||
untilInitialized: () => Promise<void>; | ||
openAddDataControlFlyout: () => void; | ||
openAddDataControlFlyout: (settings?: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since settings is just a wrapper around controlInputTransform? How about just There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There used to be more than one setting for the legacy version of |
||
controlInputTransform?: ControlInputTransform; | ||
}) => void; | ||
}; | ||
|
||
export interface ControlGroupRuntimeState { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be
Partial<DefaultControlState>
since the initialState is the control's initial state?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely a bad cast here, woops! Technically it should be
Partial<ControlInput>
because of howControlInputTransform
is defined insrc/plugins/controls/common/types.ts
. But since we don't want to touch any of the stuff that is shared between React controls and legacy at this point, perhaps we just cast toDataControlEditorState
? This satisfiesPartial<ControlInput>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good. We can always iterator on this