UNPKG

@mikezimm/fps-library-v2

Version:

Library of reusable typescript/javascript functions, interfaces and constants

71 lines (69 loc) 3.33 kB
/** * CodeAnalizerComment: Updated 3 imports on 2024-09-22 14:49:52 * Update:: import { IPropertyPaneField } to '@mikezimm/fps-core-v7/lib/types/@msft/1.15.2/sp-property-pane;' * Update:: import { fpsLogo326 } to '@mikezimm/fps-core-v7/lib/components/atoms/SVGIcons/fpsLogo326;' * Update:: import { IThisFPSWebPartClass } to '@mikezimm/fps-core-v7/lib/banner/FPSWebPartClass/IThisFPSWebPartClass1152;' */ /** * CodeAnalizerComment: Updated 2 imports on 2024-09-21 23:07:24 * Update:: import { IRepoLinks } to '@mikezimm/fps-core-v7/lib/components/atoms/Links/IRepoLinks;' * Update:: import { IThisFPSWebPartClass } to '@mikezimm/fps-core-v7/lib/banner/FPSWebPartClass/IThisFPSWebPartClass1152;' */ // was src\Services\PropPane\zReusablePropPane.ts import { PropertyPaneLink, PropertyPaneToggle, } from '@microsoft/sp-property-pane'; // } from '@mikezimm/fps-core-v7/lib/types/@msft/1.15.2/sp-property-pane'; import { fpsLogo326 } from '@mikezimm/fps-core-v7/lib/components/atoms/SVGIcons/fpsLogo326'; /** * * @param gitLinks * @param shortDescription * @param PropertyPaneWebPartInformation import { PropertyPaneWebPartInformation } from '@pnp/spfx-property-controls/lib/PropertyPaneWebPartInformation'; * @returns */ export function WebPartInfoGroup(thisWPClass, shortDescription, PropertyPaneWebPartInformation) { const gitLinks = thisWPClass._repoLink; const allowPropsEasyMode = thisWPClass._allowPropsEasyMode ? true : false; // Allows for auto expanding WebPartInfoGroup on opening the prop pane if desired; let infoGroup = { groupName: 'Web Part Info', isCollapsed: thisWPClass._wpInfoGroupExpanded === true && (allowPropsEasyMode === true || thisWPClass.properties.propsEasyMode === true) ? false : true, groupFields: [ PropertyPaneWebPartInformation({ description: `<img src='${fpsLogo326}'/>`, key: 'webPartInfoId' }), PropertyPaneWebPartInformation({ description: `<p><i>"If you change the way you look at things, the things you look at change."</i></p>`, key: 'webPartInfoId2' }), /* PropertyPanePropertyEditor({ webpart: this, key: 'propertyEditor' }), */ PropertyPaneWebPartInformation({ description: shortDescription, key: 'webPartInfoId3' }), PropertyPaneLink('About Link', { text: 'Github Repo: ' + gitLinks.desc, href: gitLinks.href, target: gitLinks.target, }), PropertyPaneLink('Issues Link', { text: 'Report Issues: ' + gitLinks.desc, href: gitLinks.href + '/issues', target: gitLinks.target, }), ] }; if (allowPropsEasyMode === true) { infoGroup.groupFields.push(PropPaneEasyModeToggle); } return infoGroup; } export const PropPaneEasyModeToggle = PropertyPaneToggle('propsEasyMode', { label: 'Easy Mode - Property Pane options', onText: 'Easy Mode - Keep it simple mode', offText: 'Complex - All options', }); //# sourceMappingURL=WebPartInfoGroup.js.map