import powerbi from 'powerbi-visuals-api' ; import VisualObjectInstanceEnumerationObject = powerbi . VisualObjectInstanceEnumerationObject ; import VisualEnumerationInstanceKinds = powerbi . VisualEnumerationInstanceKinds ; import SettingsBase from './SettingsBase' ; import { getConfig } from '../core/utils/config' ; /**
 * Manages theme integration preferences.
 */ const defaults = getConfig ( ) . propertyDefaults . theme ; export default class ThemeSettings extends SettingsBase { public ordinalColorCount = defaults . ordinalColorCount ; param enumerationObject param options public processEnumerationObject ( enumerationObject , options = { } ) { enumerationObject . instances . map ( ( i ) => { i . validValues = { ordinalColorCount : { numberRange : { min : defaults . ordinalColorCountMin , max : defaults . ordinalColorCountMax } } } ; i . propertyInstanceKind = { ordinalColorCount : VisualEnumerationInstanceKinds . ConstantOrRule } ; } ) ; return enumerationObject ; } }