Socket
Socket
Sign inDemoInstall

@algolia/autocomplete-plugin-tags

Package Overview
Dependencies
0
Maintainers
87
Versions
42
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.17.0 to 1.17.1

2

dist/umd/index.development.js

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

/*! @algolia/autocomplete-plugin-tags 1.17.0 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
/*! @algolia/autocomplete-plugin-tags 1.17.1 | 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.17.0 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
/*! @algolia/autocomplete-plugin-tags 1.17.1 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@algolia/autocomplete-plugin-tags"]={})}(this,(function(t){"use strict";function e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function r(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?e(Object(o),!0).forEach((function(e){n(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function n(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t)||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 i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var a=function(){};function u(t){var e=t.initialTags,n={current:a(void 0===e?[]:e)},i=[];function a(t){return t.map((function(t){var e=r(r({},t),{},{remove:function(){var t=n.current.slice();n.current=n.current.filter((function(t){return e!==t})),i.forEach((function(e){return e({prevTags:t,tags:n.current})}))}});return e}))}return{get:function(){return n.current},set:function(t){var e=n.current.slice();n.current=a(t),i.forEach((function(t){return t({prevTags:e,tags:n.current})}))},add:function(t){var e,r=n.current.slice();(e=n.current).push.apply(e,o(a(t))),i.forEach((function(t){return t({prevTags:r,tags:n.current})}))},onChange:function(t){i.push(t)}}}function c(t){return r({initialTags:[],getTagsSubscribers:function(){return[]},transformSource:function(t){return t.source},onChange:a},t)}t.createTagsPlugin=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=c(t),n=e.initialTags,o=e.getTagsSubscribers,i=e.transformSource,a=e.onChange,s=u({initialTags:n}),f={setTags:s.set,addTags:s.add};return{name:"aa.tagsPlugin",subscribe:function(t){var e=t.setContext,n=t.onSelect,i=t.setIsOpen,u=t.refresh,c=o();e({tagsPlugin:r(r({},f),{},{tags:s.get()})}),n((function(t){var e=t.source,r=t.item,n=c.find((function(t){return t.sourceId===e.sourceId}));n&&s.add([n.getTag({item:r})])})),s.onChange((function(n){var o=n.prevTags;e({tagsPlugin:r(r({},f),{},{tags:s.get()})}),i(!0),a(r(r({},t),{},{prevTags:o,tags:s.get()})),u()}))},getSources:function(t){var e=t.state;return[i({source:{sourceId:"tagsPlugin",getItems:function(){return s.get()},onSelect:function(t){t.item.remove()},templates:{item:function(t){var e=t.item,r=t.createElement;return r("div",{className:"aa-TagsPlugin-Tag"},r("span",{className:"aa-TagsPlugin-TagLabel"},e.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:e})]},data:r(r({},f),{},{get tags(){return s.get()}}),__autocomplete_pluginOptions:t}},Object.defineProperty(t,"__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.17.0",
"version": "1.17.1",
"license": "MIT",

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

"devDependencies": {
"@algolia/autocomplete-core": "1.17.0",
"@algolia/autocomplete-js": "1.17.0",
"@algolia/autocomplete-shared": "1.17.0"
"@algolia/autocomplete-core": "1.17.1",
"@algolia/autocomplete-js": "1.17.1",
"@algolia/autocomplete-shared": "1.17.1"
}
}

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc