@microsoft/sp-search-extensibility 1.23.0-rc.0 → 1.23.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"sp-search-extensibility": {
|
|
14
14
|
"type": "path",
|
|
15
15
|
"path": {
|
|
16
|
-
"path": "sp-search-
|
|
17
|
-
"integrity": "sha256-
|
|
16
|
+
"path": "sp-search-extensibility_none_bfd684902a3289cfba0b.js",
|
|
17
|
+
"integrity": "sha256-XS+2eUpEtWaXXUBREjeQySfqrZvUpwR0wo3ACBHBjk0="
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"tslib": {
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"id": "01c4df03-e775-48cb-aa14-171ee5199a15",
|
|
23
23
|
"version": "2.3.1"
|
|
24
24
|
},
|
|
25
|
-
"@microsoft/sp-
|
|
25
|
+
"@microsoft/sp-core-library": {
|
|
26
26
|
"type": "component",
|
|
27
|
-
"id": "
|
|
27
|
+
"id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b",
|
|
28
28
|
"version": "1.23.0"
|
|
29
29
|
},
|
|
30
|
-
"@microsoft/sp-
|
|
30
|
+
"@microsoft/sp-extension-base": {
|
|
31
31
|
"type": "component",
|
|
32
|
-
"id": "
|
|
32
|
+
"id": "0773bd53-a69e-4293-87e6-ba80ea4d614b",
|
|
33
33
|
"version": "1.23.0"
|
|
34
34
|
},
|
|
35
35
|
"@microsoft/sp-diagnostics": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
define("4958ea79-6ff3-4480-8291-0932dd010869_1.23.0",["tslib","@microsoft/sp-core-library","@microsoft/sp-extension-base","@microsoft/sp-diagnostics","@microsoft/sp-loader"],(e,t,n,a,i)=>(()=>{"use strict";var r={676(e){e.exports=t},207(e){e.exports=a},0(e){e.exports=n},414(e){e.exports=i},280(t){t.exports=e}},o={};function s(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,s),n.exports}s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{s.r(c),s.d(c,{BaseSearchQueryModifier:()=>r,SearchQueryModifierContext:()=>o,SearchQueryScenario:()=>e,_SearchQueryExtensionManager:()=>u});var e,t=s(280),n=s(676),a=s(0);!function(e){e[e.SearchResults=1]="SearchResults",e[e.SearchSuggestions=2]="SearchSuggestions"}(e||(e={}));var i=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return(0,t.__extends)(n,e),Object.defineProperty(n.prototype,"timeout",{get:function(){return 1e4},enumerable:!1,configurable:!0}),n.prototype.modifySearchQuery=function(e,t){return Promise.resolve(e)},n}(a.BaseExtension);const r=i;(0,n._ES5CompatibleClass)(i);const o=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return(0,t.__extends)(n,e),n}(a.ExtensionContext);var d=s(207),l=s(414);const u=function(){function i(e){this._extensionManager=new a._ExtensionManager(e,r),this._extensions=[]}return i.prototype.initializeExtensions=function(e){var t=this,n=new d._QosMonitor("SearchQueryExtensionManager.initializeExtensions"),a=this._getCustomActions(e).filter(function(e){return"ClientSideExtension.SearchQueryModifier"===e.location&&!!l.SPComponentLoader.tryGetManifestById(e.clientSideComponentId)}).sort(function(e,t){return(e.sequence||Number.MAX_VALUE)-(t.sequence||Number.MAX_VALUE)}).map(function(e){return t._extensionManager.createExtension(e.clientSideComponentId.toString(),e.clientSideComponentProperties,function(e){return new o(e)})});return Promise.all(a).then(function(e){t._extensions=e;var a=t._extensions.length;return n.writeSuccess({numberOfExtensions:a}),a}).catch(function(e){throw n.writeUnexpectedFailure(void 0,e,{numberOfExtensions:0}),e})},i.prototype.getSearchQuery=function(e){var t=this,n=Promise.resolve({queryText:e,originalQueryText:e});return this._extensions.forEach(function(a){n=n.then(function(n){return t._processQuery(a,n,e)})}),n.then(function(e){return e.queryText})},i.prototype._processQuery=function(n,a,i){var r=new d._QosMonitor("SearchQueryExtensionManager.processQuery"),o={componentId:n.componentId,alias:n.manifest.alias},s=new Promise(function(e){setTimeout(function(){r.writeExpectedFailure("Timeout",void 0,o),e(a)},n.timeout)});return Promise.race([s,n.modifySearchQuery((0,t.__assign)((0,t.__assign)({},a),{originalQueryText:i}),e.SearchResults)]).then(function(e){return r.writeSuccess(o),e}).catch(function(e){throw r.writeUnexpectedFailure(void 0,e,o),e})},i.prototype._getCustomActions=function(e){return this._getDebugCustomActions().concat(e)},i.prototype._getDebugCustomActions=function(){var e=[],t=new URL(window.location.href).searchParams.get("customActions");if(t){var a=decodeURIComponent(t),i=JSON.parse(a);if(i)for(var r=0,o=Object.keys(i);r<o.length;r++){var s=o[r],c=n.Guid.tryParse(s),d=i[s].location,l=i[s].sequence;e.push({clientSideComponentId:c.toString(),location:d,sequence:l})}}return e},i}()})(),c})());
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SearchQueryScenario = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
+
var sp_core_library_1 = require("@microsoft/sp-core-library");
|
|
5
6
|
var sp_extension_base_1 = require("@microsoft/sp-extension-base");
|
|
6
7
|
/**
|
|
7
8
|
* Scenario for the search query modifier.
|
|
@@ -60,4 +61,5 @@ var BaseSearchQueryModifier = /** @class */ (function (_super) {
|
|
|
60
61
|
return BaseSearchQueryModifier;
|
|
61
62
|
}(sp_extension_base_1.BaseExtension));
|
|
62
63
|
exports.default = BaseSearchQueryModifier;
|
|
64
|
+
(0, sp_core_library_1._ES5CompatibleClass)(BaseSearchQueryModifier);
|
|
63
65
|
//# sourceMappingURL=BaseSearchQueryModifier.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/sp-search-extensibility",
|
|
3
|
-
"version": "1.23.0-rc.
|
|
3
|
+
"version": "1.23.0-rc.1",
|
|
4
4
|
"description": "SharePoint Framework developer support for customizing search",
|
|
5
5
|
"homepage": "http://aka.ms/spfx",
|
|
6
6
|
"license": "https://aka.ms/spfx/license",
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@swc/helpers": "^0.5.12",
|
|
18
18
|
"tslib": "2.3.1",
|
|
19
|
-
"@microsoft/sp-
|
|
20
|
-
"@microsoft/sp-core-library": "1.23.0-rc.
|
|
21
|
-
"@microsoft/sp-
|
|
22
|
-
"@microsoft/sp-
|
|
19
|
+
"@microsoft/sp-extension-base": "1.23.0-rc.1",
|
|
20
|
+
"@microsoft/sp-core-library": "1.23.0-rc.1",
|
|
21
|
+
"@microsoft/sp-loader": "1.23.0-rc.1",
|
|
22
|
+
"@microsoft/sp-diagnostics": "1.23.0-rc.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@playwright/test": "1.56.1",
|
|
26
|
-
"@rushstack/heft": "1.2.
|
|
26
|
+
"@rushstack/heft": "1.2.12",
|
|
27
27
|
"eslint": "9.37.0",
|
|
28
|
-
"@msinternal/sp-tab-tasklib": "0.0.4",
|
|
29
28
|
"@msinternal/playwright-tab-utilities": "0.1.0",
|
|
29
|
+
"@msinternal/sp-tab-tasklib": "0.0.4",
|
|
30
30
|
"@msinternal/spfx-internal-web-build-rig": "0.1.0"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define("4958ea79-6ff3-4480-8291-0932dd010869_1.23.0",["tslib","@microsoft/sp-extension-base","@microsoft/sp-core-library","@microsoft/sp-diagnostics","@microsoft/sp-loader"],(e,t,n,a,i)=>(()=>{"use strict";var r={676(e){e.exports=n},207(e){e.exports=a},0(e){e.exports=t},414(e){e.exports=i},280(t){t.exports=e}},o={};function s(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,s),n.exports}s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{s.r(c),s.d(c,{BaseSearchQueryModifier:()=>a,SearchQueryModifierContext:()=>i,SearchQueryScenario:()=>e,_SearchQueryExtensionManager:()=>l});var e,t=s(280),n=s(0);!function(e){e[e.SearchResults=1]="SearchResults",e[e.SearchSuggestions=2]="SearchSuggestions"}(e||(e={}));const a=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return(0,t.__extends)(n,e),Object.defineProperty(n.prototype,"timeout",{get:function(){return 1e4},enumerable:!1,configurable:!0}),n.prototype.modifySearchQuery=function(e,t){return Promise.resolve(e)},n}(n.BaseExtension),i=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return(0,t.__extends)(n,e),n}(n.ExtensionContext);var r=s(676),o=s(207),d=s(414);const l=function(){function s(e){this._extensionManager=new n._ExtensionManager(e,a),this._extensions=[]}return s.prototype.initializeExtensions=function(e){var t=this,n=new o._QosMonitor("SearchQueryExtensionManager.initializeExtensions"),a=this._getCustomActions(e).filter(function(e){return"ClientSideExtension.SearchQueryModifier"===e.location&&!!d.SPComponentLoader.tryGetManifestById(e.clientSideComponentId)}).sort(function(e,t){return(e.sequence||Number.MAX_VALUE)-(t.sequence||Number.MAX_VALUE)}).map(function(e){return t._extensionManager.createExtension(e.clientSideComponentId.toString(),e.clientSideComponentProperties,function(e){return new i(e)})});return Promise.all(a).then(function(e){t._extensions=e;var a=t._extensions.length;return n.writeSuccess({numberOfExtensions:a}),a}).catch(function(e){throw n.writeUnexpectedFailure(void 0,e,{numberOfExtensions:0}),e})},s.prototype.getSearchQuery=function(e){var t=this,n=Promise.resolve({queryText:e,originalQueryText:e});return this._extensions.forEach(function(a){n=n.then(function(n){return t._processQuery(a,n,e)})}),n.then(function(e){return e.queryText})},s.prototype._processQuery=function(n,a,i){var r=new o._QosMonitor("SearchQueryExtensionManager.processQuery"),s={componentId:n.componentId,alias:n.manifest.alias},c=new Promise(function(e){setTimeout(function(){r.writeExpectedFailure("Timeout",void 0,s),e(a)},n.timeout)});return Promise.race([c,n.modifySearchQuery((0,t.__assign)((0,t.__assign)({},a),{originalQueryText:i}),e.SearchResults)]).then(function(e){return r.writeSuccess(s),e}).catch(function(e){throw r.writeUnexpectedFailure(void 0,e,s),e})},s.prototype._getCustomActions=function(e){return this._getDebugCustomActions().concat(e)},s.prototype._getDebugCustomActions=function(){var e=[],t=new URL(window.location.href).searchParams.get("customActions");if(t){var n=decodeURIComponent(t),a=JSON.parse(n);if(a)for(var i=0,o=Object.keys(a);i<o.length;i++){var s=o[i],c=r.Guid.tryParse(s),d=a[s].location,l=a[s].sequence;e.push({clientSideComponentId:c.toString(),location:d,sequence:l})}}return e},s}()})(),c})());
|