Skip to content

Commit

Permalink
Merge branch 'release/4.4.1' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
FranckyC committed Oct 28, 2021
2 parents 20b547f + 4f7abc6 commit 7f829eb
Show file tree
Hide file tree
Showing 28 changed files with 822 additions and 75 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions docs/usage/search-filters/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,14 @@ Using an indexed property bag value could be useful to store information about a
`L0|#a2cf1afb-44b6-4cf4-bf37-642bb2e9bff3|Category 1;L0|#02e3406c0-1048-4bce-90eb-e7a51dfa7f31|Category3;L0|#07e094327-23d7-48af-9699-781eb26dc40f|Category2`

These taxonomy values can then be used in the Filters Web Part using a `RefinableStringXX` search managed property to filter specific sites or elements. As an example, you can refer to the ["Create an end-to-end Office 365 groups provisioning solution"](https://github.com/pnp/tutorial-workspace-provisioning) tutorial GitHub project to leverage this format.

## Filter deep linking

The Search Filter Web Part supports deep linking, meaning you can preselect filters from the URL at page load. When filter values are selected, a query string parameter `f` is append to the current URL containing the current filter values data.

> If you have connected the search result web part to a search box, ensure the search term is set to be dynamic and part of the URL in the search box web part. If not, copying the URL will not contain the search terms."
!["Filters deep linking"](../../assets/webparts/search-filters/filter_deep_linking.png){: .center}

!!! important
**We recommend to use the URL generated from filter values selection instead of crafting the URL manually.**
2 changes: 1 addition & 1 deletion search-extensibility/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@pnp/modern-search-extensibility",
"description": "Base library for creating PnP Modern Search extensions",
"version": "1.0.5",
"version": "1.0.6",
"private": false,
"main": "lib/index.js",
"engines": {
Expand Down
7 changes: 6 additions & 1 deletion search-extensibility/src/models/dataSources/IDataContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ export interface IDataContext {
/**
* The current selected sorting for this data source
*/
selectedSorting?: ISortFieldConfiguration[];
selectedSorting?: ISortFieldConfiguration[];
};

/**
* Information about current query string parameters
*/
queryStringParameters?: {[name: string]: string };
}
9 changes: 5 additions & 4 deletions search-extensibility/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./node_modules/@microsoft/rush-stack-compiler-3.7/includes/tsconfig-web.json",
"compilerOptions": {
"target": "es5",
"target": "es6",
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
Expand All @@ -23,9 +23,10 @@
"webpack-env"
],
"lib": [
"es5",
"dom",
"es2015.collection"
"es6",
"dom",
"es2015.collection",
"es2015.promise"
]
},
"include": [
Expand Down
2 changes: 1 addition & 1 deletion search-parts/config/package-solution.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"solution": {
"name": "PnP Modern Search - Search Web Parts - v4",
"id": "59903278-dd5d-4e9e-bef6-562aae716b8b",
"version": "4.4.0.0",
"version": "4.4.1.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"isDomainIsolated": false,
Expand Down
4 changes: 2 additions & 2 deletions search-parts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pnp/modern-search-web-parts",
"version": "4.4.0",
"version": "4.4.1",
"private": true,
"main": "lib/index.js",
"engines": {
Expand All @@ -25,7 +25,7 @@
"@microsoft/sp-property-pane": "1.12.1",
"@microsoft/sp-webpart-base": "1.12.1",
"@pnp/common": "2.0.13",
"@pnp/modern-search-extensibility": "1.0.5",
"@pnp/modern-search-extensibility": "1.0.6",
"@pnp/spfx-controls-react": "3.3.0",
"@pnp/spfx-property-controls": "3.2.0",
"@pnp/telemetry-js": "2.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export class CollapsibleContentComponent extends React.Component<ICollapsibleCon
role={"menubar"}
tabIndex={0}
onClick={() => {
this._onTogglePanel(props)
this._onTogglePanel(props);
}}
onKeyPress={(e) => {
if (e.charCode === 13) {
Expand Down
15 changes: 15 additions & 0 deletions search-parts/src/helpers/UrlHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,21 @@ export class UrlHelper {
return newString;
}

/**
* Gets the current query string parameters
* @returns query string parameters as object
*/
public static getQueryStringParams(): {[parameter: string]: string } {

let queryStringParameters: {[parameter: string]: string } = {};
const urlParams = new URLSearchParams(window.location.search);
urlParams.forEach((value, key) => {
queryStringParameters[key] = value;
});

return queryStringParameters;
}

/**
* Decodes a provided string
* @param encodedStr the string to decode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export class DetailsListLayout extends BaseLayout<IDetailsListLayoutProperties>
key: `${field.id}-${itemId}`,
checked: item[field.id] ? item[field.id] : false,
onChange: (ev, value) => {
onChange(field.id, value)
onChange(field.id, value);
this._updateRequiredValueSorting(value, otherDependentField, item, onCustomFieldValidation);
},
disabled: field.disableEdit,
Expand Down
Loading

0 comments on commit 7f829eb

Please sign in to comment.