PluginProbe
ElasticPress / 5.0.2
ElasticPress v5.0.2
5.3.5 5.3.4 3.6.5 3.6.6 4.0.0 4.0.1 4.1.0 4.2.0 4.2.1 4.2.2 4.3.0 4.3.1 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.6.0 4.6.1 4.7.0 4.7.1 4.7.2 5.0.0 5.0.1 5.0.2 All 108 releases
elasticpress / dist / js / instant-results-admin-script.js

instant-results-admin-script.js in ElasticPress 5.0.2, at dist/js/instant-results-admin-script.js

1 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 !function(){"use strict";var e={5251:function(e,t,n){var a=n(9196),o=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var r=Symbol.for;o=r("react.element"),t.Fragment=r("react.fragment")}var s=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,i={key:!0,ref:!0,__self:!0,__source:!0};function f(e,t,n){var a,r={},f=null,u=null;for(a in void 0!==n&&(f=""+n),void 0!==t.key&&(f=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,a)&&!i.hasOwnProperty(a)&&(r[a]=t[a]);if(e&&e.defaultProps)for(a in t=e.defaultProps)void 0===r[a]&&(r[a]=t[a]);return{$$typeof:o,type:e,key:f,ref:u,props:r,_owner:s.current}}t.jsx=f,t.jsxs=f},5893:function(e,t,n){e.exports=n(5251)},9196:function(e){e.exports=window.React}},t={};function n(a){var o=t[a];if(void 0!==o)return o.exports;var r=t[a]={exports:{}};return e[a](r,r.exports,n),r.exports}!function(){var e=window.wp.element,t=window.wp.components,a=window.wp.i18n;const{facets:o}=window.epInstantResultsAdmin;var r=n(5893),s=({defaultValue:n,...s})=>{const l=n.split(","),[i,f]=(0,e.useState)(l),u=e=>o[e]?.label,d=e=>Object.keys(o).find((t=>e===o[t].label)),c=(0,e.useMemo)((()=>Object.keys(o).map(u).filter(Boolean)),[]),p=(0,e.useMemo)((()=>i.map(u).filter(Boolean)),[i]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.FormTokenField,{__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,label:(0,a.__)("Select filters","elasticpress"),onChange:e=>{f(e.map(d).filter(Boolean))},suggestions:c,value:p}),(0,r.jsx)("input",{type:"hidden",value:i.join(","),...s})]})};document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById("feature_instant_results_facets");if(!t)return;const{className:n,dataset:{fieldName:a},id:o,name:l,value:i}=t;if("function"===typeof e.createRoot){(0,e.createRoot)(t.parentElement).render((0,r.jsx)(s,{className:n,"data-field-name":a,defaultValue:i,id:o,name:l}))}else(0,e.render)((0,r.jsx)(s,{className:n,"data-field-name":a,defaultValue:i,id:o,name:l}),t.parentElement)}))}()}();