Socket
Socket
Sign inDemoInstall

@algolia/autocomplete-plugin-tags

Package Overview
Dependencies
Maintainers
68
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@algolia/autocomplete-plugin-tags - npm Package Compare versions

Comparing version 1.7.3 to 1.7.4

2

dist/umd/index.development.js

@@ -1,2 +0,2 @@

/*! @algolia/autocomplete-plugin-tags 1.7.3 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
/*! @algolia/autocomplete-plugin-tags 1.7.4 | 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-tags 1.7.3 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
/*! @algolia/autocomplete-plugin-tags 1.7.4 | 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-tags"]={})}(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 in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var u=function(){};function i(e){var t=e.initialTags,n={current:u(void 0===t?[]:t)},a=[];function u(e){return e.map((function(e){var t=r(r({},e),{},{remove:function(){var e=n.current.slice();n.current=n.current.filter((function(e){return t!==e})),a.forEach((function(t){return t({prevTags:e,tags:n.current})}))}});return t}))}return{get:function(){return n.current},set:function(e){var t=n.current.slice();n.current=u(e),a.forEach((function(e){return e({prevTags:t,tags:n.current})}))},add:function(e){var t,r=n.current.slice();(t=n.current).push.apply(t,o(u(e))),a.forEach((function(e){return e({prevTags:r,tags:n.current})}))},onChange:function(e){a.push(e)}}}function c(e){return r({initialTags:[],getTagsSubscribers:function(){return[]},transformSource:function(e){return e.source},onChange:u},e)}e.createTagsPlugin=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=c(e),n=t.initialTags,o=t.getTagsSubscribers,a=t.transformSource,u=t.onChange,s=i({initialTags:n}),f={setTags:s.set,addTags:s.add};return{name:"aa.tagsPlugin",subscribe:function(e){var t=e.setContext,n=e.onSelect,a=e.setIsOpen,i=e.refresh,c=o();t({tagsPlugin:r(r({},f),{},{tags:s.get()})}),n((function(e){var t=e.source,r=e.item,n=c.find((function(e){return e.sourceId===t.sourceId}));n&&s.add([n.getTag({item:r})])})),s.onChange((function(n){var o=n.prevTags;t({tagsPlugin:r(r({},f),{},{tags:s.get()})}),a(!0),u(r(r({},e),{},{prevTags:o,tags:s.get()})),i()}))},getSources:function(e){var t=e.state;return[a({source:{sourceId:"tagsPlugin",getItems:function(){return s.get()},onSelect:function(e){e.item.remove()},templates:{item:function(e){var t=e.item,r=e.createElement;return r("div",{className:"aa-TagsPlugin-Tag"},r("span",{className:"aa-TagsPlugin-TagLabel"},t.label),r("button",{className:"aa-TagsPlugin-RemoveButton",title:"Remove this tag"},r("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24"},r("path",{d:"M18 6L6 18"}),r("path",{d:"M6 6L18 18"}))))}}},state:t})]},data:r(r({},f),{},{get tags(){return s.get()}}),__autocomplete_pluginOptions:e}},Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.production.js.map
{
"name": "@algolia/autocomplete-plugin-tags",
"description": "A plugin to manage and display a list of tags in Algolia Autocomplete.",
"version": "1.7.3",
"version": "1.7.4",
"license": "MIT",

@@ -39,6 +39,6 @@ "homepage": "https://github.com/algolia/autocomplete",

"devDependencies": {
"@algolia/autocomplete-core": "1.7.3",
"@algolia/autocomplete-js": "1.7.3",
"@algolia/autocomplete-shared": "1.7.3"
"@algolia/autocomplete-core": "1.7.4",
"@algolia/autocomplete-js": "1.7.4",
"@algolia/autocomplete-shared": "1.7.4"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc