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 / blocks-script.js

blocks-script.js in ElasticPress 5.0.2, at dist/js/blocks-script.js

1 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 !function(){"use strict";var e={n:function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(a,{a:a}),a},d:function(t,a){for(var n in a)e.o(a,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:a[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.data,a=window.wp.apiFetch,n=e.n(a);const r={setMetaKeys(e){return{type:"SET_META_KEYS",metaKeys:e}},getMetaKeys(){return{type:"GET_META_KEYS"}},setTaxonomies(e){return{type:"SET_TAXONOMIES",taxonomies:e}},getTaxonomies(){return{type:"GET_TAXONOMIES"}},setMetaRange(e,t){return{type:"SET_META_RANGE",key:e,metaRange:t}},getMetaRange(e){return{type:"GET_META_RANGE",key:e}}};var s={reducer:(e,t)=>{switch(t.type){case"SET_META_KEYS":return{...e,metaKeys:t.metaKeys};case"SET_TAXONOMIES":return{...e,taxonomies:t.taxonomies};case"SET_META_RANGE":return{...e,metaRanges:{...e.metaRanges,[t.key]:t.metaRange}};default:return e}},controls:{GET_META_KEYS(){return n()({path:"elasticpress/v1/meta-keys"})},GET_TAXONOMIES(){return n()({path:"elasticpress/v1/taxonomies"})},GET_META_RANGE({key:e}){const t=new URLSearchParams({facet:e});return n()({path:`/elasticpress/v1/meta-range?${t}`})}},selectors:{getMetaKeys(e){const{metaKeys:t}=e;return t},getTaxonomies(e){const{taxonomies:t}=e;return t},getMetaRange(e,t){const{metaRanges:{[t]:a}}=e;return a}},resolvers:{*getMetaKeys(){const e=yield r.getMetaKeys();return r.setMetaKeys(e)},*getTaxonomies(){const e=yield r.getTaxonomies();return r.setTaxonomies(e)},*getMetaRange(e){const{data:{min:t=!1,max:a=!1}={}}=yield r.getMetaRange(e);return r.setMetaRange(e,{min:t,max:a})}},actions:r,initialState:{metaKeys:[],metaRanges:{},taxonomies:{}}};if("function"===typeof t.createReduxStore){const e=(0,t.createReduxStore)("elasticpress",s);(0,t.register)(e)}else(0,t.registerStore)("elasticpress",s)}();