@mikezimm/fps-library-v2
Version:
Library of reusable typescript/javascript functions, interfaces and constants
84 lines (82 loc) • 4.23 kB
JavaScript
/**
* CodeAnalizerComment: Updated 6 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 { IPropertyPaneDropdownOption } 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;'
* Update:: import { EveryoneAudienceChoices } to '@mikezimm/fps-core-v7/lib/types/fps-common/AudienceInterfaces;'
*/
/**
* CodeAnalizerComment: Updated 4 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;'
* Update:: import { EveryoneAudienceChoices } to '@mikezimm/fps-core-v7/lib/types/fps-class/prop-pane/AudienceInterfaces;'
*/
import { PropertyPaneLabel, PropertyPaneToggle, PropertyPaneSlider, PropertyPaneTextField, PropertyPaneDropdown, } from '@microsoft/sp-property-pane';
import { JSON_Edit_Link } from '../../../common/PropPaneHelp/atoms/JSONEdit';
import { EveryoneAudienceChoices } from '@mikezimm/fps-core-v7/lib/types/fps-common/AudienceInterfaces';
/**
* This is the second version which is more simple (toggles and sliders)
* @param showSearch
* @param pageStyle
* @param quickLaunchHide
* @param containerMaxWidth
*/
/**
* Model for IFPSBasicToggleSetting properties
* For if ( allSectWidth !== 'skip' ) {
*/
export function FPSOptionsExpando(thisWPClass) {
let fields = [];
if (thisWPClass._allowPandoramic !== true) {
fields.push(PropertyPaneLabel('nothing', {
text: 'This set of options is NOT available in webpart'
}));
}
else {
fields.push(PropertyPaneLabel('expandoText1', {
text: 'NOTE: This feature MAY BE deprecated by MSFT at any time without notice. Please contact your SharePoint team if this happens.',
}));
fields.push(PropertyPaneToggle('enableExpandoramic', {
label: 'Enable Expandoramic Mode',
offText: 'Off',
onText: 'On',
}));
fields.push(PropertyPaneLabel('expandoText2', {
text: 'If you expand by default, some users may still see the full page briefly depending on their connection.',
}));
fields.push(PropertyPaneToggle('expandoDefault', {
label: 'Page load default',
offText: 'Normal',
onText: 'Expanded',
disabled: thisWPClass.properties.enableExpandoramic === true ? false : true,
}));
fields.push(PropertyPaneDropdown('expandoAudience', {
disabled: thisWPClass.properties.enableExpandoramic === true ? false : true,
label: 'Expandoramic Audience',
options: EveryoneAudienceChoices,
}));
fields.push(PropertyPaneTextField('expandoStyle', {
disabled: thisWPClass.properties.enableExpandoramic === true ? false : true,
label: 'Expandoramic Styling',
description: 'React.CSSProperties format like: "fontSize":"larger","color":"red"',
multiline: true,
}));
fields.push(PropertyPaneSlider('expandoPadding', {
label: 'Expanded padding',
disabled: thisWPClass.properties.enableExpandoramic === true ? false : true,
min: 0,
max: 100,
step: 10,
}));
fields.push(JSON_Edit_Link);
}
let optionsGroup = { groupName: 'FPS Banner - Expandoramic',
isCollapsed: true,
groupFields: fields
};
return optionsGroup;
}
//# sourceMappingURL=ExpandoPropGroup.js.map