@mikezimm/fps-library-v2
Version:
Library of reusable typescript/javascript functions, interfaces and constants
55 lines (53 loc) • 2.61 kB
JavaScript
/**
* CodeAnalizerComment: Updated 4 imports on 2024-09-22 14:49:52
* Update:: import { IPropertyPaneDropdownProps } to '@mikezimm/fps-core-v7/lib/types/@msft/1.15.2/sp-property-pane;'
* Update:: import { IPropertyPaneGroup } to '@mikezimm/fps-core-v7/lib/types/@msft/1.15.2/sp-property-pane;'
* Update:: import { IPropertyPaneField } to '@mikezimm/fps-core-v7/lib/types/@msft/1.15.2/sp-property-pane;'
* Update:: import { IThisFPSWebPartClass } to '@mikezimm/fps-core-v7/lib/banner/FPSWebPartClass/IThisFPSWebPartClass1152;'
*/
/**
* CodeAnalizerComment: Updated 3 imports on 2024-09-21 23:07:24
* Update:: import { IPropertyPaneDropdownProps } to '@mikezimm/fps-core-v7/lib/types/@msft/1.15.2/sp-property-pane;'
* Update:: import { IPropertyPaneDropdownOption } to '@mikezimm/fps-core-v7/lib/types/@msft/1.15.2/sp-property-pane;'
* Update:: import { IThisFPSWebPartClass } to '@mikezimm/fps-core-v7/lib/banner/FPSWebPartClass/IThisFPSWebPartClass1152;'
*/
import { PropertyPaneLabel, PropertyPaneToggle, PropertyPaneDropdown, } from '@microsoft/sp-property-pane';
export const PinMeLocations = [
{ index: 0, key: 'normal', text: "normal" },
{ index: 1, key: 'pinFull', text: "Pin Expanded" },
{ index: 2, key: 'pinMini', text: "Pin Collapsed" },
{ index: 0, key: 'disabled', text: "disabled" },
];
export function FPSPinMePropsGroupX(thisWPClass) {
let fields = [];
// Added this check for https://github.com/mikezimm/fps-library-v2/issues/7
if (thisWPClass._isSPA === true) {
fields.push(PropertyPaneLabel('nothing', {
text: 'This set of options is NOT available in SPA Format'
}));
}
else {
fields = [
PropertyPaneDropdown('defPinState', {
label: 'Default Location - "Pin Expanded" updates after save',
options: PinMeLocations, //MinHeadingOptions
}),
//
PropertyPaneToggle("forcePinState", {
label: "Force Pin State",
onText: "Enforce - No toggle",
offText: "Let user change",
// disabled: true,
}),
];
}
// fix https://github.com/mikezimm/drilldown7/issues/304
const collapseGroup = thisWPClass._repoLink.desc && thisWPClass._repoLink.desc.toLowerCase().indexOf('pageinfo') > -1 ? false : true;
const returnGroup = {
groupName: "Pin Me",
groupFields: fields,
isCollapsed: collapseGroup,
};
return returnGroup;
}
//# sourceMappingURL=PinMePropGroup.js.map