From 8b4b10b216ab2a002192e49d2b0a8bca4597cf71 Mon Sep 17 00:00:00 2001 From: Laura Kokkarinen Date: Thu, 14 Oct 2021 11:38:17 +0300 Subject: [PATCH 01/36] Added Finnish translations for texts that are visible to end users (configurations are clearer in English). --- search-parts/src/loc/fi-fi.js | 325 ++++++++++++++++++++++++++++++++++ 1 file changed, 325 insertions(+) create mode 100644 search-parts/src/loc/fi-fi.js diff --git a/search-parts/src/loc/fi-fi.js b/search-parts/src/loc/fi-fi.js new file mode 100644 index 000000000..64612a6de --- /dev/null +++ b/search-parts/src/loc/fi-fi.js @@ -0,0 +1,325 @@ +define([], function() { + return { + Tokens: { + SelectTokenLabel: "Select a token...", + Context: { + ContextTokensGroupName: "Context tokens", + SiteAbsoluteUrl: "Site absolute URL", + SiteRelativeUrl: "Site server relative URL", + WebAbsoluteUrl: "Web absolute URL", + WebRelativeUrl: "Web server relative URL", + WebTitle: "Web title", + InputQueryText: "Input query text" + }, + Custom: { + CustomTokensGroupName: "Custom value", + CustomValuePlaceholder: "Enter a value...", + InvalidtokenFormatErrorMessage: "Please enter a supported token format using '{' and '}'. (ex: {Today})" + }, + Date: { + DateTokensGroupName: "Date tokens", + Today: "Today", + Yesterday: "Yesterday", + Tomorrow: "Tomorrow", + OneWeekAgo: "One week ago", + OneMonthAgo: "One month ago", + OneYearAgo: "One year ago" + }, + Page: { + PageTokensGroupName: "Page tokens", + PageId: "Page ID", + PageTitle: "Page Title", + PageCustom: "Other page column", + }, + User: { + UserTokensGroupName: "User tokens", + UserName: "User Name", + Me: "Me", + UserDepartment: "User Department", + UserCustom: "User custom property" + } + }, + General: { + OnTextLabel: "On", + OffTextLabel: "Off", + StaticArrayFieldName: "Array like field", + About: "About", + Authors: "Author(s)", + Version: "Version", + InstanceId: "Web Part instance ID", + Resources: { + GroupName: "Resources", + Documentation: "Documentation", + PleaseReferToDocumentationMessage: "Please refer to the official documentation." + }, + Extensibility: { + InvalidDataSourceInstance: "The selected data source '{0}' does not implement the 'BaseDataSource' abstract class correctly. Some methods are missing.", + DataSourceDefinitionNotFound: "The custom data source with key '{0}' was not found. Make sure the solution is correctly deployed to the app caltog and the manifest ID registered for this Web Part.", + LayoutDefinitionNotFound: "The custom layout with key '{0}' was not found. Make sure the solution is correctly deployed to the app caltog and the manifest ID registered for this Web Part.", + InvalidLayoutInstance: "The selected layout '{0}' does not implement the 'BaseLayout' abstract class correctly. Some methods are missing.", + DefaultExtensibilityLibraryName: "Default extensibility library", + InvalidProviderInstance: "The selected suggestions provider '{0}' does not implement the 'BaseSuggestionProvider' abstract class correctly. Some methods are missing.", + ProviderDefinitionNotFound: "The custom suggestions provider with key '{0}' was not found. Make sure the solution is correctly deployed to the app caltog and the manifest ID registered for this Web Part.", + }, + DateFromLabel: "Alkaa", + DateTolabel: "Päättyy", + DatePickerStrings: { + months: ['Tammikuu', 'Helmikuu', 'Maaliskuu', 'Huhtikuu', 'Toukokuu', 'Kesäkuu', 'Heinäkuu', 'Elokuu', 'Syyskuu', 'Lokakuu', 'Marraskuu', 'Joulukuu'], + shortMonths: ['tammi', 'helmi', 'maalis', 'huhti', 'touko', 'kesä', 'heinä', 'elo', 'syys', 'loka', 'marras', 'joulu'], + days: ['Sunnuntai', 'Maanantai', 'Tiistai', 'Keskiviikko', 'Torstai', 'Perjantai', 'Lauantai'], + shortDays: ['Su', 'Ma', 'Ti', 'Ke', 'To', 'Pe', 'La'], + goToToday: 'Siirry tähän päivään', + prevMonthAriaLabel: 'Edellinen kuukausi', + nextMonthAriaLabel: 'Seuraava kuukausi', + prevYearAriaLabel: 'Edellinen vuosi', + nextYearAriaLabel: 'Seuraava vuosi', + closeButtonAriaLabel: 'Sulje kalenteri', + isRequiredErrorMessage: 'Määritä aloituspäivä.', + invalidInputErrorMessage: 'Virheellinen päivämäärän muotoilu.' + }, + DateIntervalStrings: { + AnyTime: "Milloin tahansa", + PastDay: "Edelliset 24 tuntia", + PastWeek: "Viime viikolla", + PastMonth: "Viime kuussa", + Past3Months: "Viimeiset 3 kuukautta", + PastYear: "Viime vuosi", + Older: "Yli vuoden vanha" + }, + SameTabOpenBehavior: "Avaa samaan välilehteen", + NewTabOpenBehavior: "Avaa uuteen välilehteen", + PageOpenBehaviorLabel: "Avautumistapa", + EmptyFieldErrorMessage: "Tämä kenttä on pakollinen" + }, + DataSources: { + SharePointSearch: { + SourceName: "SharePoint Search", + SourceConfigurationGroupName: "Source configuration", + QueryTextFieldLabel: "Query text", + QueryTextFieldInfoMessage: "Use the Available connections Web Part configuration tab to specifiy either a static value or a value from a dynamic component on the page like a searchbox", + QueryTemplateFieldLabel: "Query template", + QueryTemplatePlaceHolderText: "ex: Path:{Site}", + QueryTemplateFieldDescription: "The search query template. You can also use {} to build a dynamic query.", + ResultSourceIdLabel: "Result source ID", + ResultSourceIdDescription: "Use a default SharePoint result source ID or type your own GUID value and press 'Enter' to save.", + InvalidResultSourceIdMessage: "The provided value is not a valid GUID", + EnableQueryRulesLabel: "Enable query rules", + IncludeOneDriveResultsLabel: "Include OneDrive for Business results", + RefinementFilters: "Refinement filters", + RefinementFiltersDescription: "Initial refinement filters to apply to the query. These won't appear in the selected filters. For string expressions, use double quotes (\") instead of single quote (').", + EnableLocalizationLabel: "Enable localization", + EnableLocalizationOnLabel: "On", + EnableLocalizationOffLabel: "Off", + QueryCultureLabel: "Language of search request", + QueryCultureUseUiLanguageLabel: "Use interface language", + SelectedPropertiesFieldLabel: "Selected properties", + SelectedPropertiesFieldDescription: "Specifies the properties to retrieve from the search results.", + SelectedPropertiesPlaceholderLabel: "Select properties", + TermNotFound: "(Term with ID '{0}' not found)", + ApplyQueryTemplateBtnText: "Apply", + EnableAudienceTargetingTglLabel: "Enable audience targeting" + }, + MicrosoftSearch: { + QueryTextFieldLabel: "Query text", + QueryTextFieldInfoMessage: "Use the Available connections Web Part configuration tab to specifiy either a static value or a value from a dynamic component on the page like a searchbox", + SourceName: "Microsoft Search", + SourceConfigurationGroupName: "Microsoft Search", + EntityTypesField: "Entity types to search", + SelectedFieldsPropertiesFieldLabel: "Selected fields", + SelectedFieldsPropertiesFieldDescription: "Specifies the fields to retrieve from the search results.", + SelectedFieldsPlaceholderLabel: "Select fields", + EnableTopResultsLabel: "Enable top results", + ContentSourcesFieldLabel: "Content sources", + ContentSourcesFieldDescriptionLabel: "IDs of connections defined in the Microsoft Search connectors administration portal.", + ContentSourcesFieldPlaceholderLabel: "ex: 'MyCustomConnectorId'" + }, + SearchCommon: { + Sort: { + SortPropertyPaneFieldLabel: "Sort order", + SortListDescription: "Specify the initial sort order for the search results. You can either select a field from the dropdown list (only if the data source data have already be fetched) or type your own custom value (press 'Enter' to save your entry)", + SortDirectionAscendingLabel: "Ascending", + SortDirectionDescendingLabel: "Descending", + SortErrorMessage: "Invalid search property (Check if the managed property is sortable).", + SortPanelSortFieldLabel: "Sort on field", + SortPanelSortFieldAria: "Sort by", + SortPanelSortFieldPlaceHolder: "Sort by", + SortPanelSortDirectionLabel: "Sort Direction", + SortDirectionColumnLabel: "Direction", + SortFieldColumnLabel: "Field name", + EditSortLabel: "Edit sort order", + SortInvalidSortableFieldMessage: "This property is not sortable", + SortFieldColumnPlaceholder: "Select field..." + } + } + }, + Controls: { + TextDialogButtonText: "Add Handlebars expression", + TextDialogTitle: "Edit Handlebars expression", + TextDialogCancelButtonText: "Cancel", + TextDialogSaveButtonText: "Save", + SelectItemComboPlaceHolder: "Select property", + AddStaticDataLabel: "Add static data", + TextFieldApplyButtonText: "Apply" + }, + Layouts: { + Debug: { + Name: "Debug" + }, + Custom: { + Name: "Custom" + }, + SimpleList: { + Name: "List", + ShowFileIconLabel: "Show file icon", + ShowItemThumbnailLabel: "Show thumbnail" + }, + DetailsList: { + Name: "Details List", + UseHandlebarsExpressionLabel: "Use Handlebars expression", + MinimumWidthColumnLabel: "Minimum width (px)", + MaximumWidthColumnLabel: "Maximum width (px)", + SortableColumnLabel: "Sortable", + ResizableColumnLabel: "Resizable", + MultilineColumnLabel: "Multiline", + LinkToItemColumnLabel: "Link to item", + CompactModeLabel: "Compact mode", + ShowFileIcon: "Show file icon", + ManageDetailsListColumnDescription: "Add, update or remove columns for the details list layout. You can use either property values in the list directly without any transformation or use an Handlebars expression in the value field. HTML is supported for all fields as well.", + ManageDetailsListColumnLabel: "Manage columns", + ValueColumnLabel: "Column value", + DisplayNameColumnLabel: "Column display name", + FileExtensionFieldLabel: "Field to use for file extension", + GroupByFieldLabel: "Group by field", + EnableGrouping: "Enable grouping", + CollapsedGroupsByDefault: "Show collapsed", + ResetFieldsBtnLabel: "Reset fields to default values" + }, + Cards: { + Name: "Cards", + ManageTilesFieldsLabel: "Managed card fields", + ManageTilesFieldsPanelDescriptionLabel: "Here you can map each field values with the corresponding card placeholders. You can use either a result property directly without any transformation or use an Handlebars expression as field value. Also, when specified, you can also inject your own HTML code in annotated fields.", + PlaceholderNameFieldLabel: "Name", + SupportHTMLColumnLabel: "Allow HTML", + PlaceholderValueFieldLabel: "Value", + UseHandlebarsExpressionLabel: "Use Handlebars expression", + EnableItemPreview: "Enable result preview", + EnableItemPreviewHoverMessage: "Turning on this option may have an impact on performances if too many items are displayed at once and you use the 'AutoPreviewUrl' slot field. We recommend you to use this option with a small amount of items or use predefined preview URLs from your data source fields in slots.", + ShowFileIcon: "Show file icon", + CompactModeLabel: "Compact mode", + PreferedCardNumberPerRow: "Preferred number of cards per row", + Fields: { + Title: "Title", + Location: "Location", + Tags: "Tags", + PreviewImage: "Preview Image", + PreviewUrl: "Preview Url", + Url: "Url", + Date: "Date", + Author: "Author", + ProfileImage: "Profile Image Url", + FileExtension: "File Extension", + IsContainer: "Is Folder" + }, + ResetFieldsBtnLabel: "Reset fields to default values" + }, + Slider: { + Name: "Slider", + SliderAutoPlay: "Auto play", + SliderAutoPlayDuration: "Auto play duration (in seconds)", + SliderPauseAutoPlayOnHover: "Pause on hover", + SliderGroupCells: "Number of elements to group together in slides", + SliderShowPageDots: "Show page dots", + SliderWrapAround: "Infinite scrolling", + SlideHeight: "Slide height (in px)", + SlideWidth: "Slide width (in px)" + }, + People: { + Name: "People", + ManagePeopleFieldsLabel: "Manage people fields", + ManagePeopleFieldsPanelDescriptionLabel: "Here you can map each field values with the corresponding persona placeholders. You can use either data source field value directly without any transformation or use an Handlebars expression in the value field.", + PlaceholderNameFieldLabel: "Name", + PlaceholderValueFieldLabel: "Value", + UseHandlebarsExpressionLabel: "Use Handlebars expression", + PersonaSizeOptionsLabel: "Component size", + PersonaSizeExtraSmall: "Extra small", + PersonaSizeSmall: "Small", + PersonaSizeRegular: "Regular", + PersonaSizeLarge: "Large", + PersonaSizeExtraLarge: "Extra large", + ShowInitialsToggleLabel: "Show initials if no picture available", + SupportHTMLColumnLabel: "Allow HTML", + ResetFieldsBtnLabel: "Reset fields to default values", + ShowPersonaCardOnHover: "Show persona card on hover", + ShowPersonaCardOnHoverCalloutMsg: "This feature uses Microsoft Graph to display information about the user and needs the following API permissions in your tenant to work: ['User.Read','People.Read','Contacts.Read','User.ReadBasic.All'].", + Fields: { + ImageUrl: "Image URL", + PrimaryText: "Primary text", + SecondaryText: "Secondary text", + TertiaryText: "Tertiary text", + OptionalText: "Optional text" + } + }, + Vertical: { + Name: "Vertical" + }, + Horizontal: { + Name: "Horizontal", + PreferedFilterNumberPerRow: "Preferred number of filters per row", + }, + Panel: { + Name: "Panel", + IsModal: "Modal", + IsLightDismiss: "Light dismiss", + Size: "Panel size", + ButtonLabel: "Show filters", + ButtonLabelFieldName: "Button label to display", + HeaderText: "Filters", + HeaderTextFieldName: "Panel header text", + SizeOptions: { + SmallFixedFar: 'Small (default)', + SmallFixedNear: 'Small, near side', + Medium: 'Medium', + Large: 'Large', + LargeFixed: 'Large fixed-width', + ExtraLarge: 'Extra large', + SmallFluid: 'Full-width (fluid)' + } + } + }, + HandlebarsHelpers: { + CountMessageLong: "{0} tulosta haulle '{1}'", + CountMessageShort: "{0} tulosta", + }, + PropertyPane: { + ConnectionsPage: { + DataConnectionsGroupName: "Available connections" + }, + InformationPage: { + Extensibility: { + GroupName: "Extensibility configuration", + FieldLabel: "Extensibility libraries to load", + ManageBtnLabel: "Configure", + Columns: { + Name: "Name/Purpose", + Id: "Manifest GUID", + Enabled: "Enabled/Disabled" + } + } + } + }, + Filters: { + ApplyAllFiltersButtonLabel: "Käytä", + ClearAllFiltersButtonLabel: "Tyhjennä", + FilterNoValuesMessage: "Ei tuloksia tälle suodattimelle", + OrOperator: "TAI", + AndOperator: "JA", + ComboBoxPlaceHolder: "Valitse arvo" + }, + SuggestionProviders: { + SharePointStatic: { + ProviderName: "SharePoint Static search suggestions", + ProviderDescription: "Retrieve SharePoint static user defined search suggestions" + } + } + } +}) \ No newline at end of file From a953498f3a238cf7ec6f5cb6d2c2160087af8c93 Mon Sep 17 00:00:00 2001 From: Franck Cornu Date: Tue, 21 Dec 2021 09:43:50 -0500 Subject: [PATCH 02/36] Fixed missing FR translations #1662 (#1663) --- search-parts/src/webparts/searchFilters/loc/fr-fr.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/search-parts/src/webparts/searchFilters/loc/fr-fr.js b/search-parts/src/webparts/searchFilters/loc/fr-fr.js index 5623f8214..8833b32b8 100644 --- a/search-parts/src/webparts/searchFilters/loc/fr-fr.js +++ b/search-parts/src/webparts/searchFilters/loc/fr-fr.js @@ -4,7 +4,7 @@ define([], function() { PlaceHolder: { EditLabel: "Modifier", IconText: "Filtres de recherche par @PnP", - Description: "Affiche les filtres d’un composant Web connecté des résultats de recherche ", + Description: "Affiche les filtres d'un composant Web connecté des résultats de recherche ", ConfigureBtnLabel: "Configurer" }, NoAvailableFilterMessage: "Aucun filtre disponible à afficher.", @@ -16,7 +16,9 @@ define([], function() { UseDataResultsFromComponentsLabel: "Utiliser les données de ces composants Web", UseDataResultsFromComponentsDescription: "Si vous connectez plusieurs composants Web, les valeurs et les nombres de filtres seront fusionnés avec les noms de filtres similaires", UseDataVerticalsWebPartLabel: "Se connecter à un composant WebPart de verticales", - UseDataVerticalsFromComponentLabel: "Utiliser les verticales de ce composant" + UseDataVerticalsFromComponentLabel: "Utiliser les verticales de ce composant", + LinkToVerticalLabel: "Afficher les données uniquement lorsque les verticales suivantes sont sélectionnées", + LinkToVerticalLabelHoverMessage: "Les filtres ne seront affichés que si la verticale sélectionnée correspond à celles configurées pour ce composant WebPart. Sinon, le composant WebPart restera vide (pas de marge ni de remplissage) en mode affichage." }, FiltersSettingsPage: { SettingsGroupName: "Paramètres des filtres", @@ -26,7 +28,7 @@ define([], function() { SelectFilterComboBoxLabel: "Sélectionner un champ", FilterNameLabel: "Champ Filtre", FilterMaxBuckets: "Nombre de valeurs", - FilterDisplayName: "Nom d’affichage", + FilterDisplayName: "Nom d'affichage", FilterTemplate: "Modèle", FilterExpandByDefault: "Agrandir par défaut", FilterType: "Type de filtre", @@ -61,7 +63,7 @@ define([], function() { TemplateUrlFieldLabel: "Utiliser une adresse URL de modèle externe", TemplateUrlPlaceholder: "https://myfile.html", ErrorTemplateExtension: "Le modèle doit être un fichier .htm ou .html valide", - ErrorTemplateResolve: "Impossible de résoudre le modèle indiqué. Renseignements sur l’erreur '{0}'", + ErrorTemplateResolve: "Impossible de résoudre le modèle indiqué. Renseignements sur l'erreur '{0}'", FiltersTemplateFieldLabel: "Modifier le modèle de filtres", FiltersTemplatePanelHeader: "Modifier le modèle de filtres" } From b5f94b9a6073c17bed9767a92c2152f576e0a9f6 Mon Sep 17 00:00:00 2001 From: Mikael Svenson Date: Tue, 21 Dec 2021 16:26:57 +0100 Subject: [PATCH 03/36] Add back some keyboard navigation tags --- search-parts/src/components/CollapsibleContentComponent.tsx | 2 ++ search-parts/src/components/PanelComponent.tsx | 2 ++ .../src/components/filters/FilterValueOperatorComponent.tsx | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/search-parts/src/components/CollapsibleContentComponent.tsx b/search-parts/src/components/CollapsibleContentComponent.tsx index 762de688b..680672e1d 100644 --- a/search-parts/src/components/CollapsibleContentComponent.tsx +++ b/search-parts/src/components/CollapsibleContentComponent.tsx @@ -131,6 +131,8 @@ export class CollapsibleContentComponent extends React.Component
{ this._onTogglePanel(props); }} diff --git a/search-parts/src/components/PanelComponent.tsx b/search-parts/src/components/PanelComponent.tsx index cfc0e2b35..08aa8f0f7 100644 --- a/search-parts/src/components/PanelComponent.tsx +++ b/search-parts/src/components/PanelComponent.tsx @@ -134,6 +134,8 @@ export class PanelComponent extends React.Component
{ diff --git a/search-parts/src/components/filters/FilterValueOperatorComponent.tsx b/search-parts/src/components/filters/FilterValueOperatorComponent.tsx index 6d9497292..f4b7a5fce 100644 --- a/search-parts/src/components/filters/FilterValueOperatorComponent.tsx +++ b/search-parts/src/components/filters/FilterValueOperatorComponent.tsx @@ -42,7 +42,7 @@ export class FilterValueOperator extends React.Component Date: Tue, 21 Dec 2021 16:29:13 +0100 Subject: [PATCH 04/36] #1650 Add back some keyboard navigation tags --- search-parts/src/components/CollapsibleContentComponent.tsx | 2 ++ search-parts/src/components/PanelComponent.tsx | 2 ++ .../src/components/filters/FilterValueOperatorComponent.tsx | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/search-parts/src/components/CollapsibleContentComponent.tsx b/search-parts/src/components/CollapsibleContentComponent.tsx index 762de688b..680672e1d 100644 --- a/search-parts/src/components/CollapsibleContentComponent.tsx +++ b/search-parts/src/components/CollapsibleContentComponent.tsx @@ -131,6 +131,8 @@ export class CollapsibleContentComponent extends React.Component
{ this._onTogglePanel(props); }} diff --git a/search-parts/src/components/PanelComponent.tsx b/search-parts/src/components/PanelComponent.tsx index cfc0e2b35..08aa8f0f7 100644 --- a/search-parts/src/components/PanelComponent.tsx +++ b/search-parts/src/components/PanelComponent.tsx @@ -134,6 +134,8 @@ export class PanelComponent extends React.Component
{ diff --git a/search-parts/src/components/filters/FilterValueOperatorComponent.tsx b/search-parts/src/components/filters/FilterValueOperatorComponent.tsx index 6d9497292..f4b7a5fce 100644 --- a/search-parts/src/components/filters/FilterValueOperatorComponent.tsx +++ b/search-parts/src/components/filters/FilterValueOperatorComponent.tsx @@ -42,7 +42,7 @@ export class FilterValueOperator extends React.Component Date: Tue, 21 Dec 2021 17:01:56 +0100 Subject: [PATCH 05/36] #1651 Possible fix --- .../src/webparts/searchBox/components/SearchBoxContainer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/search-parts/src/webparts/searchBox/components/SearchBoxContainer.tsx b/search-parts/src/webparts/searchBox/components/SearchBoxContainer.tsx index 6d0a243bf..dce104d5b 100644 --- a/search-parts/src/webparts/searchBox/components/SearchBoxContainer.tsx +++ b/search-parts/src/webparts/searchBox/components/SearchBoxContainer.tsx @@ -50,7 +50,7 @@ export default class SearchBoxContainer extends React.Component this.setState({ searchInputValue: event.currentTarget.value })} + onChange={(event) => this.setState({ searchInputValue: event && event.currentTarget ? event.currentTarget.value : "" })} onSearch={() => this._onSearch(this.state.searchInputValue)} onClear={() => { this._onSearch('', true); From 83f4067ec62d141e75f2a59864d2d5f9d2719eac Mon Sep 17 00:00:00 2001 From: Franck Cornu Date: Tue, 21 Dec 2021 11:31:53 -0500 Subject: [PATCH 06/36] Fixed #1660 by moving Apply/Clear buttons on top of the combo box. (#1666) --- .../filters/FilterComboBoxComponent.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/search-parts/src/components/filters/FilterComboBoxComponent.tsx b/search-parts/src/components/filters/FilterComboBoxComponent.tsx index c66fcfc3a..e7d22633f 100644 --- a/search-parts/src/components/filters/FilterComboBoxComponent.tsx +++ b/search-parts/src/components/filters/FilterComboBoxComponent.tsx @@ -344,7 +344,8 @@ export class FilterComboBox extends React.Component Date: Wed, 22 Dec 2021 13:54:07 +0100 Subject: [PATCH 07/36] Create Create-a-search-page-with-verticals-within-the-same-page.md new scenario article --- ...age-with-verticals-within-the-same-page.md | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 docs/scenarios/Create-a-search-page-with-verticals-within-the-same-page.md diff --git a/docs/scenarios/Create-a-search-page-with-verticals-within-the-same-page.md b/docs/scenarios/Create-a-search-page-with-verticals-within-the-same-page.md new file mode 100644 index 000000000..2bc86ab9b --- /dev/null +++ b/docs/scenarios/Create-a-search-page-with-verticals-within-the-same-page.md @@ -0,0 +1,66 @@ +# Scenario 8 - Create a search page with verticals (within the same page) + +!!! note + The PnP Modern Search Web Parts must be deployed to your App Catalog and activated on your site. See the [installation documentation](../installation.md) for details. + +This scenario describes how to configure multiple Search Verticals on the same page. + +## Create a new sharepoint page + +To add the Search Web Parts, you must first create a new modern SharePoint page. We will be configure this new page as a search page with the PnP Modern Search Web Parts. + +![Create a page](https://user-images.githubusercontent.com/65955023/147087709-cb1fc905-3e21-46f0-8866-b68ed0e97fcb.png) + +## Add PnP Search Web Parts + +On the newly created page, add the PnP Modern Search Web Part Search Box, Search Verticals, and Search Results, twice. + +![Add PnP Web Parts](https://user-images.githubusercontent.com/65955023/147087924-8671f0d6-bcb3-448e-829c-28513605b291.png) + +The WebParts can be arranged and configured on the page as desired. + +![Search Web Parts](https://user-images.githubusercontent.com/65955023/147088318-fe68658a-e2dd-4fb3-8fe3-260a5e56a6c1.png) + +## Configure Search Box + +You can leave the default configuration. + +![Configure Search Box Web Part](https://user-images.githubusercontent.com/65955023/147088354-c14b0c1e-ec64-48a5-99cc-38490c7668ba.png) + +## Configure Search Vertical + +In the Search Verticals Web Part, the verticals (tabs) must be configured. + +![Search Vertical](https://user-images.githubusercontent.com/65955023/147088917-d04194ea-d019-4e9f-af47-8de38703ebde.png) + +Insert the tab name and a fluent icon for e better visualization. The results are on the same page, so a link URL are not necessary. + +![Configure Search Vertical Web Part](https://user-images.githubusercontent.com/65955023/147088936-c89be36b-bc2c-4003-8012-b35e5af12fe6.png) + +## Configure first Search Result Web Part + +The first Results WebPart displays all results. Select the data source SharePoint and the result source "LocalSharePointResults". + +![First Result Web Part Vertical Everything](https://user-images.githubusercontent.com/65955023/147088983-4a15ac6f-97f1-403e-8c1a-f714237036da.png) + +In the "available connections" section, the connection to the Search Box and the Search Vertical must be configured. The results web part should only be displayed if the vertical "Everything" is active. + +![First Result Web Part connection](https://user-images.githubusercontent.com/65955023/147088970-3f16a7df-1c1a-4d95-a2ad-d62fca16c581.png) + +## Configure second Search Result Web Part + +The second results web part displays results from the predefined result source knowledge, configures the result source in the SharePoint admin center, and the GUID must be added to the Web Part. + +![Second Result Web Part Vertical Knowledge](https://user-images.githubusercontent.com/65955023/147089009-fde930ea-c138-4ad0-b6a1-e1fcd1c0ff3b.png) + +In the "available connections" section, the connection to the Search Box and the Search Vertical must be configured again. The Results Web Part should only be displayed if the vertical "Knowledge" is selected. + +![Second Result Web Part connection](https://user-images.githubusercontent.com/65955023/147089051-11f97261-ccca-41e3-84a5-2f099783f047.png) + +After that, the minimum configuration is complete and the search page must be saved and published. The configuration can be customized, and a different layout can be used for the search results per Results WebPart. + +## Testing your configuration + +Now the query from the Search Box is sent to the verticals, depending on the choice of the verticals, the results are then displayed in the search result. + +![Test Your Search page](https://user-images.githubusercontent.com/65955023/147089091-76df179d-c707-43d5-9fb0-d317d49cb2f3.png) From b6b6381332423465b7628789f1469727766c4d50 Mon Sep 17 00:00:00 2001 From: Franck Cornu Date: Wed, 22 Dec 2021 21:21:41 -0500 Subject: [PATCH 08/36] Updated the ObjectHelper,byPath method to handle wrong expression correctly. (#1673) --- search-parts/src/helpers/ObjectHelper.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/search-parts/src/helpers/ObjectHelper.ts b/search-parts/src/helpers/ObjectHelper.ts index f665ffef2..0c5de9dd8 100644 --- a/search-parts/src/helpers/ObjectHelper.ts +++ b/search-parts/src/helpers/ObjectHelper.ts @@ -41,9 +41,19 @@ export class ObjectHelper { */ public static byPath(object: any, path: string): string { - if (path && object) { + let isValidPredicate = true; + + // Test if the provided path is a valid predicate https://www.npmjs.com/package/jspath#documentation + try { + jspath.compile(`.${path}`); + } catch (e) { + isValidPredicate = false; + } + + if (path && object && isValidPredicate) { try { + // jsPath always returns an array. See https://www.npmjs.com/package/jspath#result const value: any[] = jspath.apply(`.${path}`, object); @@ -67,7 +77,7 @@ export class ObjectHelper { } catch (error) { // Case when unexpected string or tokens are passed in the path - return object[path]; // fallback to see if the prop is on the object verbatim + return null; } } else { From 9a77156f45f1a14812997bfa6e8854038b0d2bba Mon Sep 17 00:00:00 2001 From: Franck Cornu Date: Mon, 3 Jan 2022 10:06:56 -0500 Subject: [PATCH 09/36] Fixed https://github.com/microsoft-search/pnp-modern-search/issues/1675. Render MGT component only if the user id is not empty (#1684) --- search-parts/src/dataSources/SharePointSearchDataSource.ts | 2 +- search-parts/src/layouts/results/people/people.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/search-parts/src/dataSources/SharePointSearchDataSource.ts b/search-parts/src/dataSources/SharePointSearchDataSource.ts index c8e8a5e73..037eb9ed7 100644 --- a/search-parts/src/dataSources/SharePointSearchDataSource.ts +++ b/search-parts/src/dataSources/SharePointSearchDataSource.ts @@ -486,7 +486,7 @@ export class SharePointSearchDataSource extends BaseDataSource {{#> resultTypes item=item}} - {{#if @root.properties.layoutProperties.showPersonaCard}} + {{#and @root.properties.layoutProperties.showPersonaCard (slot item @root.slots.PersonQuery)}}