import type { ServiceScope } from '@microsoft/sp-core-library'; import type { IDynamicDataPropertyDefinition } from './interfaces/IDynamicDataPropertyDefinition'; import type { IDynamicDataEventDefinition } from './interfaces/IDynamicDataEventDefinition'; import type { IDynamicDataAnnotatedPropertyValue } from './interfaces/IDynamicDataAnnotatedPropertyValue'; import type { IContextPropertyInfo } from './interfaces/IContextPropertyInfo'; /** * The page context data source. It should contain all app-level contextual information * * @internal */ export default class PageContextDataSource { /** * Id of the PageContext dynamic data source. */ static pageContextDataSourceId: string; private static _pageContextDataSourceAlias; private _propertyDefinitions; private _eventDefinitions; private _serviceScope; private _dynamicDataManager; constructor(serviceScope: ServiceScope); /** * * @param propInfo - The "sub-datasource" property. */ addPropertyHandler(propInfo: IContextPropertyInfo): void; /** * Used by the downstream content providers to indicate that their properties have changed. * @param propertyId - the propertyId (not the context property info, but the property id) that has changed */ notifyPropertyChanged(propertyId: string): void; /** * Remove all of the properties * * @param id - the id of the data provider that you want to remove. */ removePropertyHandler(id: string): void; /** * Iterate over all of the properties we are aware of and return * the set */ getPropertyDefinitions(): ReadonlyArray; /** * Return the property value for the given property ID. This will * iterate over all the different data providers exposed in the * context data source * * @param propertyId - the name of the property you want the value for */ getPropertyValue(propertyId: string): any; /** * Returns the annotated value for the property supplied. * @param propertyId - The id of the property that contains the annotated value. */ getAnnotatedPropertyValue(propertyId: string): IDynamicDataAnnotatedPropertyValue; /** * Iterate over all of the properties we are aware of and return * the set */ getPropertyDefinitionsAsync(): Promise>; /** * Return the property value for the given property ID. This will * iterate over all the different data providers exposed in the * context data source * @param propertyId - the name of the property you want the value for. */ getPropertyValueAsync(propertyId: string): Promise; /** * Returns the annotated value for the property supplied. * @param propertyId - The id of the property that contains the annotated value. */ getAnnotatedPropertyValueAsync(propertyId: string): Promise; /** * iterate over all the known event handlers and return the * complete set. */ allowedEventsAsync(): Promise>; /** * This simply passes the sendEvent method to the appropriate * function end point. * * @param eventName - The event name that is being called * @param data - The data to be passed into the event */ sendEvent(eventName: string, data: any): void; } //# sourceMappingURL=PageContextDataSource.d.ts.map