Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{
displayGroupsAsAccordion: true,
header: {
description: strings.PropertyPaneDescription
},
groups: [
{
groupName: strings.FeedSettingsGroupName,
groupFields: [
// feed type drop down. Add your own types in the drop-down list
PropertyPaneDropdown("feedType", {
label: strings.FeedTypeFieldLabel,
options: feedTypeOptions
}),
// feed url input box -- only if not using a mock provider
!isMock && PropertyFieldTextWithCallout("feedUrl", {
calloutTrigger: CalloutTriggers.Hover,
key: "feedUrlFieldId",
label: strings.FeedUrlFieldLabel,
calloutContent:
React.createElement("div", {}, strings.FeedUrlCallout),
calloutWidth: 200,
value: feedUrl,
placeholder: "https://",
deferredValidationTime: 200,
onGetErrorMessage: this._validateFeedUrl.bind(this)
}),
// how days ahead from today are we getting
PropertyPaneDropdown("dateRange", {
label: strings.DateRangeFieldLabel,
options: [
{ key: DateRange.OneWeek, text: strings.DateRangeOptionWeek },
switch(this.properties.displayType === 'object' ? this.properties.displaySubPropertyType : this.properties.displayType) {
case "bool":
displayPaneFields.push(...[
PropertyPaneTextField('displayBoolTrue',{
label: 'Value when true'
}),
PropertyPaneTextField('displayBoolFalse',{
label: 'Value when false'
}),
]);
break;
}
//Advanced Display Template
displayPaneFields.push(...[
PropertyFieldTextWithCallout('displayTemplate', {
calloutTrigger: CalloutTriggers.Hover,
key: 'displayTemplate',
label: 'Template (Advanced)',
calloutWidth: 200,
value: this.properties.displayTemplate,
calloutContent: displayTemplateCallout(),
}),
PropertyPaneDropdown('displayUndefined', {
label: 'When value is undefined',
options: [
{key:'blank', text:'Show blank value'},
{key:'undefined', text:'Show "undefined"'},
{key:'custom', text:'Use custom value'}
]
})
]);