File tree Expand file tree Collapse file tree 5 files changed +10
-8
lines changed Expand file tree Collapse file tree 5 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ interface Props {
2525}
2626
2727const SUPPORTED_FAMILIES = [
28+ {
29+ name : 'Query Context' ,
30+ family : 'context' ,
31+ } ,
2832 {
2933 name : 'Data Source' ,
3034 family : 'inputs' ,
Original file line number Diff line number Diff line change @@ -146,24 +146,21 @@ export const FlowQueryProvider: FC = ({children}) => {
146146 }
147147
148148 if ( typeof PIPE_DEFINITIONS [ panel . type ] . scope === 'function' ) {
149- meta . scope = PIPE_DEFINITIONS [ panel . type ] . scope (
150- panel ,
151- acc [ acc . length - 1 ] ?. scope || { }
152- )
149+ meta . scope = PIPE_DEFINITIONS [ panel . type ] . scope ( panel , last . scope )
153150 }
154151
155152 if ( typeof PIPE_DEFINITIONS [ panel . type ] . source === 'function' ) {
156153 meta . source = PIPE_DEFINITIONS [ panel . type ] . source (
157154 panel ,
158- '' + ( acc [ acc . length - 1 ] ?. source || '' ) ,
155+ '' + last . source ,
159156 meta . scope
160157 )
161158 }
162159
163160 if ( typeof PIPE_DEFINITIONS [ panel . type ] . visual === 'function' ) {
164161 meta . visual = PIPE_DEFINITIONS [ panel . type ] . visual (
165162 panel ,
166- '' + ( acc [ acc . length - 1 ] ?. source || '' ) ,
163+ '' + last . source ,
167164 meta . scope
168165 )
169166 }
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import ReadOnly from './readOnly'
44export default register => {
55 register ( {
66 type : 'region' ,
7- family : 'inputs ' ,
7+ family : 'context ' ,
88 component : View ,
99 featureFlag : 'flow-panel--remote' ,
1010 button : 'Remote Database' ,
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import View from './view'
33export default register => {
44 register ( {
55 type : 'time' ,
6- family : 'inputs ' ,
6+ family : 'context ' ,
77 featureFlag : 'flow-panel--time' ,
88 button : 'Time Range' ,
99 component : View ,
Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ export interface QueryScope {
151151export interface TypeRegistration {
152152 type : string // a unique string that identifies a pipe
153153 family :
154+ | 'context'
154155 | 'inputs'
155156 | 'passThrough'
156157 | 'test'
You can’t perform that action at this time.
0 commit comments