import powerbi from 'powerbi-visuals-api' ; import VisualObjectInstanceEnumerationObject = powerbi . VisualObjectInstanceEnumerationObject ; import SettingsBase from './SettingsBase' ; import { getConfig } from '../core/utils/config' ; import { isFetchMoreEnabled } from '../core/data/dataView' ; const defaults = getConfig ( ) . propertyDefaults . dataLimit ; /**
 * Manages data limit override preferences for the visual.
 */ export default class DataLimitSettings extends SettingsBase { public enabled : boolean = isFetchMoreEnabled ; public override : boolean = defaults . override ; public showCustomVisualNotes : boolean = defaults . showCustomVisualNotes ; param instances returns public processEnumerationObject ( enumerationObject , options = { } ) { if ( this . enabled ) { enumerationObject . instances . map ( ( i ) => { if ( ! this . override ) { delete i . properties [ 'showCustomVisualNotes' ] ; } } ) ; } else { enumerationObject . instances = [ ] ; } return enumerationObject ; } }