@mikezimm/npmfunctions
Version:
Functions used in my SPFx webparts
32 lines (30 loc) • 1.45 kB
TypeScript
/**
* This is modeled after npmFunctions/Services/DOM/FPSExpandoramic.ts
*
* @returns
*/
import { IPageLayoutType } from '../../PropPane/FPSInterfaces';
import { DisplayMode } from '@microsoft/sp-core-library';
export declare type IPinMeState = 'normal' | 'pinFull' | 'pinMini' | 'disabled';
export interface IFPSPinMenu {
defPinState: IPinMeState;
forcePinState: boolean;
domElement: HTMLElement;
pageLayout: IPageLayoutType;
}
export interface IPinStatus {
defPinState: IPinMeState;
refresh: boolean;
}
/**
* getDefaultFPSPinState gets the default defPinState depending on if the page is in Edit Mode.
* Edit Mode requires the pinMode to change so that it does not hide the Edit/Save buttons.
* Originally copied from FPSPageInfo.tsx
* @param prevfpsPinMenu
* @param currfpsPinMenu
* @param displayMode - basically current component must have displayMode in it's props and passed in here.
* @returns
*/
export declare function getDefaultFPSPinState(prevfpsPinMenu: IFPSPinMenu, currfpsPinMenu: IFPSPinMenu, displayMode: DisplayMode): IPinStatus;
export declare function checkIsInVerticalSection(domElement: HTMLElement): boolean;
export declare function FPSPinMe(domElement: HTMLElement, pinState: IPinMeState, controlStyle: any, alertError: boolean | undefined, consoleResult: boolean | undefined, pinMePadding: number, host: IPageLayoutType, displayMode: DisplayMode): void;