@mikezimm/npmfunctions
Version:
Functions used in my SPFx webparts
85 lines (64 loc) • 2.5 kB
text/typescript
import { WebPartContext, } from "@microsoft/sp-webpart-base";
import { IWebpartBannerProps, } from '../HelpPanelOnNPM/onNpm/bannerProps';
import { DisplayMode } from '@microsoft/sp-core-library';
import { IWebpartHistory, } from '../Services/PropPane/WebPartHistory/Interface';
import { IPinMeState, IFPSPinMenu } from "../Services/DOM/PinMe/FPSPinMenu";
import { ISitePreConfigProps, } from '../PropPaneHelp/PreConfigFunctions';
/**
* Use this to extend the default react component props for FPS Banner functionality
*
* Usage:
* export interface IYourComponentProps extends IFPSCoreReactComponentProps {
*
*/
export interface IFPSCoreReactComponentProps { // WITHOUT PinMe option
[key: string]: ISitePreConfigProps | DisplayMode | WebPartContext | IWebpartBannerProps | IWebpartHistory | IFPSPinMenu ;
sitePresets : ISitePreConfigProps;
//FPS Banner and Options props
displayMode: DisplayMode;
//Environement props
context: WebPartContext;
//Banner related props
errMessage: any;
bannerProps: IWebpartBannerProps;
//ADDED FOR WEBPART HISTORY:
webpartHistory: IWebpartHistory;
// saveLoadAnalytics: any;
FPSPropsObj: any;
}
/**
* Use this to extend the default react component props for FPS Banner functionality
*
* Usage:
* export interface IYourComponentProps extends IFPSCorePinMeReactComponentProps {
*
*/
export interface IFPSCorePinMeReactComponentProps extends IFPSCoreReactComponentProps {
fpsPinMenu: IFPSPinMenu;
}
/**
* Use this to extend the default react component state WITHOUT PinMe option
*
* Usage:
* export interface IYourComponentState extends IFPSCoreReactComponentState {
*
*/
export interface IFPSCoreReactComponentState {
[key: string]: boolean | string | IPinMeState | undefined ;
showDevHeader: boolean;
lastStateChange: string;
analyticsWasExecuted: boolean;
refreshId: string; // If needed to track/force a refresh of the banner
debugMode?: boolean; //Option to display visual ques in app like special color coding and text DeviceBug
showSpinner?: boolean; //Optional if you use a spnner to show loading message
}
/**
* Use this to extend the default react component state WITH PinMe option
*
* Usage:
* export interface IYourComponentState extends IFPSCorePinMeReactComponentState {
*
*/
export interface IFPSCorePinMeReactComponentState extends IFPSCoreReactComponentState {
pinState: IPinMeState;
}