Skip to content

Commit

Permalink
Merge pull request #4202 from microsoft-search/develop
Browse files Browse the repository at this point in the history
v4.15
  • Loading branch information
wobba authored Jan 28, 2025
2 parents aab1930 + b02941f commit 0747bdd
Show file tree
Hide file tree
Showing 66 changed files with 37,161 additions and 36,296 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: "6.x"
versionSpec: "6.0"

- name: Setup pnpm
uses: pnpm/action-setup@v4
Expand Down
Binary file modified docs/assets/webparts/search-filters/filter_settings_panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions docs/usage/search-filters/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ The filter settings are as follow:
| **Display Name** | A friendly name for the filter |
| **Filter field** | The internal data source field to use as filter. Here you can select a field from the current data source (if data have been already retrieved) of type your own custom value (press enter to validate).
| **# of values** | The maximum number of values to be retrieved for a given filter. This value is useful if you use SharePoint refiners with a lot of refiner values. By default SharePoint will only retreve the first 100 values. To get all refiner values, you must specify an higher number manually (maximum value is 1000).
| **Template** | The template to use to display filter values. The builtin templates are: </br><ul><li>**Check box** <p align="center">!["Check box"](../../assets/webparts/search-filters/checkbox_template.png)</p></li><li>**Date range** <p align="center">!["Date range"](../../assets/webparts/search-filters/daterange_template.png)</p></li><li>**Date interval** <p align="center">!["Date interval"](../../assets/webparts/search-filters/dateinterval_template.png)</p></li><li>**Combo** <p align="center">!["Combo"](../../assets/webparts/search-filters/combo_template.png)</p></br> You can search a value directly in the list by typing keywords in the combo text field.</li></ul>
| **Filter type** | Specify if the filter is a 'static' filter or a 'refiner' filter. See below for more information.
| **Template** | The template to use to display filter values. The builtin templates are: </br><ul><li>**Check box** <p align="center">!["Check box"](../../assets/webparts/search-filters/checkbox_template.png)</p></li><li>**Date range** <p align="center">!["Date range"](../../assets/webparts/search-filters/daterange_template.png)</p></li><li>**Date interval** <p align="center">!["Date interval"](../../assets/webparts/search-filters/dateinterval_template.png)</p></li><li>**Combo** <p align="center">!["Combo"](../../assets/webparts/search-filters/combo_template.png)</p></br> You can search a value directly in the list by typing keywords in the combo text field.</br></br><li>**People Template** <p align="center">!["People Template"](../../assets/webparts/search-filters/people_template.png) </p></br></li></ul>
| **Expand by default** | If applicable for the selected template, display values as expanded.
| **Show count** | If applicable for the selected template, display counts for values.
| **Mutli values** | If applicable for the selected template, allow selection of multiple values.
Expand Down
4 changes: 2 additions & 2 deletions search-extensibility/.yo-rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"@microsoft/generator-sharepoint": {
"isCreatingSolution": true,
"environment": "spo",
"version": "1.19.0",
"version": "1.20.0",
"libraryName": "pnp-search-extensibility",
"libraryId": "f13a5866-004f-4219-b078-69731f848bd1",
"packageManager": "npm",
"isDomainIsolated": false,
"componentType": "library",
"nodeVersion": "18.20.4",
"sdkVersions": {
"@microsoft/teams-js": "2.12.0",
"@microsoft/teams-js": "2.24.0",
"@microsoft/microsoft-graph-client": "3.0.2"
}
}
Expand Down
20,204 changes: 11,419 additions & 8,785 deletions search-extensibility/package-lock.json

Large diffs are not rendered by default.

25 changes: 12 additions & 13 deletions 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.19.0",
"version": "1.20.1",
"private": false,
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand All @@ -13,31 +13,30 @@
"build": "tsc"
},
"devDependencies": {
"@microsoft/eslint-config-spfx": "1.20.1",
"@microsoft/eslint-plugin-spfx": "1.20.1",
"@microsoft/rush-stack-compiler-4.5": "0.2.2",
"@microsoft/eslint-config-spfx": "1.20.2",
"@microsoft/eslint-plugin-spfx": "1.20.2",
"@microsoft/rush-stack-compiler-4.7": "0.1.0",
"@microsoft/sp-build-web": "1.20.1",
"@microsoft/sp-module-interfaces": "1.20.1",
"@microsoft/sp-build-web": "1.20.2",
"@microsoft/sp-module-interfaces": "1.20.2",
"@rushstack/eslint-config": "2.5.1",
"@types/es6-promise": "0.0.33",
"@types/react": "17.0.45",
"@types/react-dom": "17.0.17",
"@types/webpack-env": "~1.15.2",
"ajv": "^6.12.5",
"eslint": "8.7.0",
"eslint": "8.57.0",
"eslint-plugin-react-hooks": "4.3.0",
"gulp": "4.0.2",
"typescript": "4.7.4"
},
"dependencies": {
"@fluentui/react": "8.106.4",
"@microsoft/sp-adaptive-card-extension-base": "1.19.0",
"@microsoft/sp-component-base": "1.19.0",
"@microsoft/sp-core-library": "1.19.0",
"@microsoft/sp-lodash-subset": "1.19.0",
"@microsoft/sp-property-pane": "1.19.0",
"@microsoft/sp-webpart-base": "1.19.0",
"@microsoft/sp-adaptive-card-extension-base": "1.20.0",
"@microsoft/sp-component-base": "1.20.0",
"@microsoft/sp-core-library": "1.20.0",
"@microsoft/sp-lodash-subset": "1.20.0",
"@microsoft/sp-property-pane": "1.20.0",
"@microsoft/sp-webpart-base": "1.20.0",
"@webcomponents/custom-elements": "1.5.1",
"@webcomponents/webcomponentsjs": "2.7.0",
"handlebars": "4.7.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export interface IDataFilterConfiguration {
/**
* The type of the filter ('Refiner' or 'Static Filter')
*/
type: FilterType;
// type: FilterType;

/**
* If the filter should be sorted by name or by count
Expand Down
9 changes: 9 additions & 0 deletions search-extensibility/src/models/layouts/BaseLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export abstract class BaseLayout<T> implements ILayout {

private _properties!: T;
private _context: WebPartContext;
private _editMode: boolean;
protected serviceScope: ServiceScope;

get properties(): T {
Expand All @@ -29,6 +30,14 @@ export abstract class BaseLayout<T> implements ILayout {
this.serviceScope = serviceScope;
}

get editMode() {
return this._editMode;
}

set editMode(editMode: boolean) {
this._editMode = editMode;
}

public onInit(): void | Promise<void> {
}

Expand Down
5 changes: 5 additions & 0 deletions search-extensibility/src/models/layouts/ILayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ export interface ILayout {
*/
context: WebPartContext;

/**
* Check if web part is in display or edit mode
*/
editMode: boolean;

/**
* Method called during the Web Part initialization.
*/
Expand Down
34 changes: 0 additions & 34 deletions search-parts/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,6 @@ module.exports = {
'@rushstack/security/no-unsafe-regexp': 0,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/adjacent-overload-signatures': 1,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
//
// CONFIGURATION: By default, these are banned: String, Boolean, Number, Object, Symbol
'@typescript-eslint/ban-types': [
1,
{
'extendDefaults': false,
'types': {
'String': {
'message': 'Use \'string\' instead',
'fixWith': 'string'
},
'Boolean': {
'message': 'Use \'boolean\' instead',
'fixWith': 'boolean'
},
'Number': {
'message': 'Use \'number\' instead',
'fixWith': 'number'
},
'Object': {
'message': 'Use \'object\' instead, or else define a proper TypeScript type:'
},
'Symbol': {
'message': 'Use \'symbol\' instead',
'fixWith': 'symbol'
},
'Function': {
'message': 'The \'Function\' type accepts any function-like value.\nIt provides no type safety when calling the function, which can be a common source of bugs.\nIt also accepts things like class declarations, which will throw at runtime as they will not be called with \'new\'.\nIf you are expecting the function to accept certain arguments, you should explicitly define the function shape.'
}
}
}
],
// RATIONALE: Code is more readable when the type of every variable is immediately obvious.
// Even if the compiler may be able to infer a type, this inference will be unavailable
// to a person who is reviewing a GitHub diff. This rule makes writing code harder,
Expand Down Expand Up @@ -328,7 +295,6 @@ module.exports = {
'no-case-declarations': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/ban-ts-comment': 0

}
},
{
Expand Down
2 changes: 1 addition & 1 deletion search-parts/.npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
auto-install-peers=true
auto-install-peers=false
strict-peer-dependencies=false
4 changes: 2 additions & 2 deletions search-parts/.yo-rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"plusBeta": false,
"isCreatingSolution": true,
"environment": "spo",
"version": "1.18.2",
"version": "1.20.0",
"solutionName": "modern-pnp-modern-search-web-parts",
"libraryName": "modern-pnp-modern-search-web-parts",
"libraryId": "8aa14115-d64a-4545-b215-ee8fb8d82e59",
Expand All @@ -14,7 +14,7 @@
"skipFeatureDeployment": true,
"nodeVersion": "16.20.0",
"sdkVersions": {
"@microsoft/teams-js": "2.12.0",
"@microsoft/teams-js": "2.24.0",
"@microsoft/microsoft-graph-client": "3.0.2"
}
}
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.14.0.0",
"version": "4.15.0.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"isDomainIsolated": false,
Expand Down
77 changes: 47 additions & 30 deletions search-parts/fast-serve/webpack.extend.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,24 @@
*/

const webpack = require("webpack");
const { IgnorePlugin } = require('webpack');
const { ProvidePlugin } = require('webpack');

// you can add your project related webpack configuration here, it will be merged using webpack-merge module
// i.e. plugins: [new webpack.Plugin()]
const webpackConfig = {
node: {
fs: "empty"
},
resolve: {
alias: { handlebars: 'handlebars/dist/handlebars.min.js' }
alias: {
handlebars: 'handlebars/dist/handlebars.min.js',
process: 'process/browser',
},
fallback: {
"path": require.resolve("path-browserify"),
"util": require.resolve("util/"),
"url": require.resolve("url/"),
"querystring": require.resolve("querystring-es3"),
"fs": false
}
},
module: {
rules: [{
Expand All @@ -33,31 +42,33 @@ const webpackConfig = {
]
}
}
}, {
test: /utils\.js$/,
loader: "unlazy-loader",
include: [
/node_modules/,
]
},
{
test: /index.js$/,
loader: 'string-replace-loader',
include: [
/handlebars-helpers/,
],
options: {
search: '(logging|markdown): require.*?,',
replace: '',
flags: 'g'
}
}, {
// Skip HoverReactionsBar from spfx controls as it's not used and is bundles
test: /index\.js$/,
include: [/spfx-controls-react[/\\]lib[/\\]controls[/\\]HoverReactionsBar/],
loader: 'ignore-loader',
}
]
},
{
test: /utils\.js$/,
loader: "unlazy-loader",
include: [
/node_modules/,
]
},
{
test: /index.js$/,
loader: 'string-replace-loader',
include: [
/handlebars-helpers/,
],
options: {
search: '(logging|markdown): require.*?,',
replace: '',
flags: 'g'
}
},
{
// Skip HoverReactionsBar from spfx controls as it's not used and is bundles
test: /index\.js$/,
include: [/spfx-controls-react[/\\]lib[/\\]controls[/\\]HoverReactionsBar/],
loader: 'ignore-loader',
}
]
},
optimization: {
splitChunks: {
Expand All @@ -67,7 +78,13 @@ const webpackConfig = {
}
},
plugins: [
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)
new IgnorePlugin({
resourceRegExp: /^\.\/locale$/, // Example: Ignore all locale files
contextRegExp: /moment$/ // Example: Ignore locale files in moment package
}),
new ProvidePlugin({
process: 'process/browser'
}),
]
}

Expand Down
Loading

0 comments on commit 0747bdd

Please sign in to comment.