From f05f823e49ade6059473ee5c73771d6139cbfd7a Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Wed, 26 May 2021 18:12:33 -0300 Subject: [PATCH] Facet filters: Don't remove spaces from value --- assets/js/facets.js | 2 +- dist/js/facets-script.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/facets.js b/assets/js/facets.js index a457eaf26b..7e34ef2daa 100644 --- a/assets/js/facets.js +++ b/assets/js/facets.js @@ -10,7 +10,7 @@ import { debounce } from './utils/helpers'; */ const handleFacetSearch = (event, facetTerms) => { const { target } = event; - const searchTerm = target.value.replace(/\s/g, '').toLowerCase(); + const searchTerm = target.value.toLowerCase(); const terms = facetTerms.querySelectorAll('.term'); terms.forEach((term) => { diff --git a/dist/js/facets-script.min.js b/dist/js/facets-script.min.js index 48732d4e82..215f44e17b 100644 --- a/dist/js/facets-script.min.js +++ b/dist/js/facets-script.min.js @@ -1 +1 @@ -!function(t){var r={};function n(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=r,n.d=function(t,r,e){n.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:e})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,r){if(1&r&&(t=n(t)),8&r)return t;if(4&r&&"object"===typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)n.d(e,o,function(r){return t[r]}.bind(null,o));return e},n.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(r,"a",r),r},n.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},n.p="",n(n.s=368)}([,,function(t,r,n){(function(r){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r&&r)||function(){return this}()||Function("return this")()}).call(this,n(52))},function(t,r){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,r,n){var e=n(2),o=n(35),i=n(7),u=n(36),c=n(39),a=n(66),f=o("wks"),s=e.Symbol,l=a?s:s&&s.withoutSetter||u;t.exports=function(t){return i(f,t)&&(c||"string"==typeof f[t])||(c&&i(s,t)?f[t]=s[t]:f[t]=l("Symbol."+t)),f[t]}},function(t,r){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},function(t,r,n){var e=n(5);t.exports=function(t){if(!e(t))throw TypeError(String(t)+" is not an object");return t}},function(t,r){var n={}.hasOwnProperty;t.exports=function(t,r){return n.call(t,r)}},function(t,r,n){var e=n(2),o=n(30).f,i=n(10),u=n(21),c=n(23),a=n(70),f=n(53);t.exports=function(t,r){var n,s,l,p,v,d=t.target,y=t.global,g=t.stat;if(n=y?e:g?e[d]||c(d,{}):(e[d]||{}).prototype)for(s in r){if(p=r[s],l=t.noTargetGet?(v=o(n,s))&&v.value:n[s],!f(y?s:d+(g?".":"#")+s,t.forced)&&void 0!==l){if(typeof p===typeof l)continue;a(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),u(n,s,p,t)}}},function(t,r,n){var e=n(3);t.exports=!e((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,r,n){var e=n(9),o=n(11),i=n(20);t.exports=e?function(t,r,n){return o.f(t,r,i(1,n))}:function(t,r,n){return t[r]=n,t}},function(t,r,n){var e=n(9),o=n(40),i=n(6),u=n(26),c=Object.defineProperty;r.f=e?c:function(t,r,n){if(i(t),r=u(r,!0),i(n),o)try{return c(t,r,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[r]=n.value),t}},function(t,r,n){var e=n(19),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},function(t,r,n){var e=n(28),o=n(15);t.exports=function(t){return e(o(t))}},function(t,r){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,r){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},,function(t,r,n){var e=n(15);t.exports=function(t){return Object(e(t))}},function(t,r,n){var e=n(64),o=n(2),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,r){return arguments.length<2?i(e[t])||i(o[t]):e[t]&&e[t][r]||o[t]&&o[t][r]}},function(t,r){var n=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:n)(t)}},function(t,r){t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},function(t,r,n){var e=n(2),o=n(10),i=n(7),u=n(23),c=n(34),a=n(42),f=a.get,s=a.enforce,l=String(String).split("String");(t.exports=function(t,r,n,c){var a,f=!!c&&!!c.unsafe,p=!!c&&!!c.enumerable,v=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof r||i(n,"name")||o(n,"name",r),(a=s(n)).source||(a.source=l.join("string"==typeof r?r:""))),t!==e?(f?!v&&t[r]&&(p=!0):delete t[r],p?t[r]=n:o(t,r,n)):p?t[r]=n:u(r,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&f(this).source||c(this)}))},function(t,r,n){var e=n(115),o=n(116),i=n(100),u=n(117);t.exports=function(t){return e(t)||o(t)||i(t)||u()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,r,n){var e=n(2),o=n(10);t.exports=function(t,r){try{o(e,t,r)}catch(n){e[t]=r}return r}},function(t,r,n){var e=n(2),o=n(23),i=e["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,r){t.exports={}},function(t,r,n){var e=n(5);t.exports=function(t,r){if(!e(t))return t;var n,o;if(r&&"function"==typeof(n=t.toString)&&!e(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!e(o=n.call(t)))return o;if(!r&&"function"==typeof(n=t.toString)&&!e(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,r){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,r,n){var e=n(3),o=n(14),i="".split;t.exports=e((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},function(t,r,n){var e,o,i=n(2),u=n(60),c=i.process,a=c&&c.versions,f=a&&a.v8;f?o=(e=f.split("."))[0]+e[1]:u&&(!(e=u.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=u.match(/Chrome\/(\d+)/))&&(o=e[1]),t.exports=o&&+o},function(t,r,n){var e=n(9),o=n(58),i=n(20),u=n(13),c=n(26),a=n(7),f=n(40),s=Object.getOwnPropertyDescriptor;r.f=e?s:function(t,r){if(t=u(t),r=c(r,!0),f)try{return s(t,r)}catch(t){}if(a(t,r))return i(!o.f.call(t,r),t[r])}},function(t,r,n){var e=n(35),o=n(36),i=e("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,r,n){var e=n(50),o=n(28),i=n(17),u=n(12),c=n(46),a=[].push,f=function(t){var r=1==t,n=2==t,f=3==t,s=4==t,l=6==t,p=7==t,v=5==t||l;return function(d,y,g,x){for(var h,m,b=i(d),S=o(b),E=e(y,g,3),O=u(S.length),w=0,A=x||c,_=r?A(d,O):n||p?A(d,0):void 0;O>w;w++)if((v||w in S)&&(m=E(h=S[w],w,b),t))if(r)_[w]=m;else if(m)switch(t){case 3:return!0;case 5:return h;case 6:return w;case 2:a.call(_,h)}else switch(t){case 4:return!1;case 7:a.call(_,h)}return l?-1:f||s?s:_}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterOut:f(7)}},,function(t,r,n){var e=n(24),o=Function.toString;"function"!=typeof e.inspectSource&&(e.inspectSource=function(t){return o.call(t)}),t.exports=e.inspectSource},function(t,r,n){var e=n(43),o=n(24);(t.exports=function(t,r){return o[t]||(o[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.9.1",mode:e?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(t,r){var n=0,e=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+e).toString(36)}},function(t,r){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,r,n){var e=n(14);t.exports=Array.isArray||function(t){return"Array"==e(t)}},function(t,r,n){var e=n(54),o=n(29),i=n(3);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){return!Symbol.sham&&(e?38===o:o>37&&o<41)}))},function(t,r,n){var e=n(9),o=n(3),i=n(41);t.exports=!e&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,r,n){var e=n(2),o=n(5),i=e.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},function(t,r,n){var e,o,i,u=n(69),c=n(2),a=n(5),f=n(10),s=n(7),l=n(24),p=n(31),v=n(25),d=c.WeakMap;if(u){var y=l.state||(l.state=new d),g=y.get,x=y.has,h=y.set;e=function(t,r){return r.facade=t,h.call(y,t,r),r},o=function(t){return g.call(y,t)||{}},i=function(t){return x.call(y,t)}}else{var m=p("state");v[m]=!0,e=function(t,r){return r.facade=t,f(t,m,r),r},o=function(t){return s(t,m)?t[m]:{}},i=function(t){return s(t,m)}}t.exports={set:e,get:o,has:i,enforce:function(t){return i(t)?o(t):e(t,{})},getterFor:function(t){return function(r){var n;if(!a(r)||(n=o(r)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,r){t.exports=!1},function(t,r,n){var e=n(7),o=n(13),i=n(59).indexOf,u=n(25);t.exports=function(t,r){var n,c=o(t),a=0,f=[];for(n in c)!e(u,n)&&e(c,n)&&f.push(n);for(;r.length>a;)e(c,n=r[a++])&&(~i(f,n)||f.push(n));return f}},function(t,r,n){var e=n(3),o=n(4),i=n(29),u=o("species");t.exports=function(t){return i>=51||!e((function(){var r=[];return(r.constructor={})[u]=function(){return{foo:1}},1!==r[t](Boolean).foo}))}},function(t,r,n){var e=n(5),o=n(38),i=n(4)("species");t.exports=function(t,r){var n;return o(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!o(n.prototype)?e(n)&&null===(n=n[i])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===r?0:r)}},function(t,r,n){"use strict";var e=n(71),o=n(83),i=RegExp.prototype.exec,u=String.prototype.replace,c=i,a=function(){var t=/a/,r=/b*/g;return i.call(t,"a"),i.call(r,"a"),0!==t.lastIndex||0!==r.lastIndex}(),f=o.UNSUPPORTED_Y||o.BROKEN_CARET,s=void 0!==/()??/.exec("")[1];(a||s||f)&&(c=function(t){var r,n,o,c,l=this,p=f&&l.sticky,v=e.call(l),d=l.source,y=0,g=t;return p&&(-1===(v=v.replace("y","")).indexOf("g")&&(v+="g"),g=String(t).slice(l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==t[l.lastIndex-1])&&(d="(?: "+d+")",g=" "+g,y++),n=new RegExp("^(?:"+d+")",v)),s&&(n=new RegExp("^"+d+"$(?!\\s)",v)),a&&(r=l.lastIndex),o=i.call(p?n:l,g),p?o?(o.input=o.input.slice(y),o[0]=o[0].slice(y),o.index=l.lastIndex,l.lastIndex+=o[0].length):l.lastIndex=0:a&&o&&(l.lastIndex=l.global?o.index+o[0].length:r),s&&o&&o.length>1&&u.call(o[0],n,(function(){for(c=1;cs;)if((c=a[s++])!=c)return!0}else for(;f>s;s++)if((t||s in a)&&a[s]===n)return t||s||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},function(t,r,n){var e=n(18);t.exports=e("navigator","userAgent")||""},function(t,r,n){var e,o=n(6),i=n(80),u=n(27),c=n(25),a=n(74),f=n(41),s=n(31),l=s("IE_PROTO"),p=function(){},v=function(t){return"