@mikezimm/fps-library-v2
Version:
Library of reusable typescript/javascript functions, interfaces and constants
24 lines (23 loc) • 1.27 kB
JavaScript
/**
* CodeAnalizerComment: Updated 1 imports on 2024-09-22 14:49:52
* Update:: import { IThisFPSWebPartClass } to '@mikezimm/fps-core-v7/lib/banner/FPSWebPartClass/IThisFPSWebPartClass1152;'
*/
export function onFPSPropPaneClosed(thisWPClass) {
if (thisWPClass.properties.requireContacts !== true)
return Promise.resolve();
const supportContacts = thisWPClass.properties.supportContacts;
if (!supportContacts || supportContacts.length === 0) {
thisWPClass.properties.supportContacts = [
{
Title: thisWPClass._FPSUser.Title,
Id: typeof thisWPClass._FPSUser.id === 'string' ? parseInt(thisWPClass._FPSUser.id) : thisWPClass._FPSUser.id,
Email: thisWPClass._FPSUser.email,
LoginName: thisWPClass._FPSUser.name,
imageUrl: thisWPClass.context.pageContext.user.imageUrl, // Verified context.pageContext.user.imageUrl was valid as of 2023-01-09 - SPFx v1.15.2
}
];
console.log('FPS-onFPSPropPaneClosed... We ADDED you to supportContacts because it can not be left empty:', thisWPClass.properties.supportContacts);
}
return Promise.resolve();
}
//# sourceMappingURL=runOnPropPaneCompleted.js.map