@algolia/autocomplete-plugin-redirect-url
Advanced tools
Comparing version 1.9.1 to 1.9.2
@@ -1,2 +0,2 @@ | ||
/*! @algolia/autocomplete-plugin-redirect-url 1.9.1 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */ | ||
/*! @algolia/autocomplete-plugin-redirect-url 1.9.2 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */ | ||
(function (global, factory) { | ||
@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : |
@@ -1,3 +0,3 @@ | ||
/*! @algolia/autocomplete-plugin-redirect-url 1.9.1 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */ | ||
/*! @algolia/autocomplete-plugin-redirect-url 1.9.2 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/autocomplete-plugin-redirect-url"]={})}(this,(function(e){"use strict";function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?t(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function n(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o={item:function(e){var t=e.createElement,r=e.item,n=e.state;return t("div",{className:"aa-ItemWrapper"},t("div",{className:"aa-ItemContent"},t("div",{className:"aa-ItemIcon aa-ItemIcon--noBorder"},t("svg",{viewBox:"0 0 24 24",fill:"currentColor"},t("path",{d:"M16.041 15.856c-0.034 0.026-0.067 0.055-0.099 0.087s-0.060 0.064-0.087 0.099c-1.258 1.213-2.969 1.958-4.855 1.958-1.933 0-3.682-0.782-4.95-2.050s-2.050-3.017-2.050-4.95 0.782-3.682 2.050-4.95 3.017-2.050 4.95-2.050 3.682 0.782 4.95 2.050 2.050 3.017 2.050 4.95c0 1.886-0.745 3.597-1.959 4.856zM21.707 20.293l-3.675-3.675c1.231-1.54 1.968-3.493 1.968-5.618 0-2.485-1.008-4.736-2.636-6.364s-3.879-2.636-6.364-2.636-4.736 1.008-6.364 2.636-2.636 3.879-2.636 6.364 1.008 4.736 2.636 6.364 3.879 2.636 6.364 2.636c2.125 0 4.078-0.737 5.618-1.968l3.675 3.675c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414z"}))),t("div",{className:"aa-ItemContentBody"},t("div",{className:"aa-ItemContentTitle"},t("a",{className:"aa-ItemLink",href:r.urls[0]},n.query)))),t("div",{className:"aa-ItemActions"},t("div",{className:"aa-ItemActionButton"},t("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},t("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),t("polyline",{points:"12 5 19 12 12 19"})))))}};function i(e){var t,r;return null===(t=e.renderingContent)||void 0===t||null===(r=t.redirect)||void 0===r?void 0:r.url}function a(e,t){var r,n=t.event,o=t.navigator,i=t.state,a=e[0],u=null==a||null===(r=a.urls)||void 0===r?void 0:r[0];u&&(n.metaKey||n.ctrlKey?o.navigateNewTab({itemUrl:u,item:a,state:i}):n.shiftKey?o.navigateNewWindow({itemUrl:u,item:a,state:i}):o.navigate({itemUrl:u,item:a,state:i}))}function u(e){return r({transformResponse:i,templates:o,onRedirect:a},e)}function s(e){var t,r=e.state.context.redirectUrlPlugin;return null!==(t=null==r?void 0:r.data)&&void 0!==t?t:[]}e.createRedirectUrlPlugin=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=u(e),n=t.transformResponse,o=t.templates,i=t.onRedirect;function a(e){var t,r,o=e.results,i=e.source,a=e.state,u={sourceId:i.sourceId,urls:o.map((function(e){return n(e)})).filter((function(e){return void 0!==e}))},s=null!==(t=null===(r=a.context.redirectUrlPlugin)||void 0===r?void 0:r.data)&&void 0!==t?t:[],l=s.findIndex((function(e){return e.sourceId===i.sourceId}));return-1!==l?0===u.urls.length?s.splice(l,1):s[l]=u:u.urls.length>0&&s.push(u),s}return{name:"aa.redirectUrlPlugin",subscribe:function(e){var t=e.onResolve,n=e.onSelect,o=e.setContext,i=e.setIsOpen;t((function(e){var t=e.results,n=e.source,i=e.state;o(r(r({},i.context),{},{redirectUrlPlugin:{data:a({results:t,source:n,state:i})}}))})),n((function(e){s({state:e.state}).length>0&&i(!0)}))},reshape:function(e){var t,n,a=e.state,u=e.sourcesBySourceId;return(null!==(t=null===(n=a.context.redirectUrlPlugin)||void 0===n?void 0:n.data)&&void 0!==t?t:[]).forEach((function(e){var t=u[e.sourceId];void 0!==t&&(u[e.sourceId]=r(r({},t),{},{getItems:function(){return t.getItems().filter((function(e){if(t.getItemInputValue.__default)return!0;var r=t.getItemInputValue({item:e,state:a});return void 0===r||r.toLowerCase()!==a.query.toLowerCase()}))}}))})),{sourcesBySourceId:r({redirect:{sourceId:"redirectUrlPlugin",templates:o,getItemUrl:function(e){return e.item.urls[0]},onSelect:function(e){var t=e.event,r=e.item,n=e.state,o=e.navigator;i([r],{event:t,navigator:o,state:n})},getItemInputValue:function(){return a.query},onActive:function(){},getItems:function(){return s({state:a})}}},u),state:a}},onSubmit:function(e){var t=e.event,r=e.navigator,n=e.state;i(s({state:n}),{event:t,navigator:r,state:n})},__autocomplete_pluginOptions:e}},e.defaultTemplates=o,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.production.js.map |
{ | ||
"name": "@algolia/autocomplete-plugin-redirect-url", | ||
"description": "A plugin to add redirect URL functionality to Algolia Autocomplete.", | ||
"version": "1.9.1", | ||
"version": "1.9.2", | ||
"license": "MIT", | ||
@@ -34,6 +34,6 @@ "homepage": "https://github.com/algolia/autocomplete", | ||
"dependencies": { | ||
"@algolia/autocomplete-core": "1.9.1", | ||
"@algolia/autocomplete-js": "1.9.1", | ||
"@algolia/autocomplete-preset-algolia": "1.9.0", | ||
"@algolia/autocomplete-shared": "1.9.0" | ||
"@algolia/autocomplete-core": "1.9.2", | ||
"@algolia/autocomplete-js": "1.9.2", | ||
"@algolia/autocomplete-preset-algolia": "1.9.2", | ||
"@algolia/autocomplete-shared": "1.9.2" | ||
}, | ||
@@ -40,0 +40,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
+ Added@algolia/autocomplete-core@1.9.2(transitive)
+ Added@algolia/autocomplete-js@1.9.2(transitive)
+ Added@algolia/autocomplete-plugin-algolia-insights@1.9.2(transitive)
+ Added@algolia/autocomplete-preset-algolia@1.9.2(transitive)
+ Added@algolia/autocomplete-shared@1.9.2(transitive)
- Removed@algolia/autocomplete-core@1.9.1(transitive)
- Removed@algolia/autocomplete-js@1.9.1(transitive)
- Removed@algolia/autocomplete-plugin-algolia-insights@1.9.1(transitive)
- Removed@algolia/autocomplete-preset-algolia@1.9.0(transitive)
- Removed@algolia/autocomplete-shared@1.9.0(transitive)