export { getPatchedVegaSpec , vegaUtils } ; import { Signal } from 'vega' ; import { getConfig } from '../utils/config' ; const getPatchedVegaSpec = ( spec ) => ( { ... spec , ... getPatchedTopLevelDimensions ( spec ) , ... getPatchedSignals ( spec ) } ) ; const getPatchedTopLevelDimensions = ( spec ) => ( { height : spec [ 'height' ] || { signal : 'pbiContainerHeight' } , width : spec [ 'width' ] || { signal : 'pbiContainerWidth' } } ) ; const getPatchedSignals = ( spec ) => ( { signals : [ ... ( spec [ 'signals' ] || [ ] ) , ... customSignals ] } ) ; const customSignals = getConfig ( ) ?. providerResources ?. vega ?. patch ?. signals || [ ] ; const vegaUtils = null ;