vue-instantsearch 4.13.4 → 4.13.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/src/components/SearchBox.vue +5 -0
- package/src/components/SearchInput.vue +5 -1
- package/src/util/__tests__/createServerRootMixin.test.js +12 -0
- package/src/util/createServerRootMixin.js +5 -2
- package/src/util/vue-compat/index-vue3.js +9 -1
- package/vue2/cjs/index.js +1 -1
- package/vue2/cjs/index.js.map +1 -1
- package/vue2/es/package.json.js +1 -1
- package/vue2/es/src/components/SearchBox.vue.js +1 -1
- package/vue2/es/src/components/SearchBox.vue_rollup-plugin-vue=script.js +1 -1
- package/vue2/es/src/components/SearchInput.vue_rollup-plugin-vue=script.js +1 -1
- package/vue2/es/src/util/createServerRootMixin.js +1 -1
- package/vue2/es/src/util/createServerRootMixin.js.map +1 -1
- package/vue2/umd/index.js +1 -1
- package/vue2/umd/index.js.map +1 -1
- package/vue3/cjs/index.js +1 -1
- package/vue3/cjs/index.js.map +1 -1
- package/vue3/es/package.json.js +1 -1
- package/vue3/es/src/components/SearchBox.vue.js +1 -1
- package/vue3/es/src/components/SearchBox.vue_vue&type=script&lang.js +1 -1
- package/vue3/es/src/components/SearchBox.vue_vue&type=script&lang.js.map +1 -1
- package/vue3/es/src/components/SearchBox.vue_vue&type=template&id=b43316e4&lang.js +2 -0
- package/vue3/es/src/components/SearchBox.vue_vue&type=template&id=b43316e4&lang.js.map +1 -0
- package/vue3/es/src/components/SearchInput.vue.js +1 -1
- package/vue3/es/src/components/SearchInput.vue_vue&type=script&lang.js +1 -1
- package/vue3/es/src/components/SearchInput.vue_vue&type=script&lang.js.map +1 -1
- package/vue3/es/src/components/{SearchInput.vue_vue&type=template&id=3a66396c&lang.js → SearchInput.vue_vue&type=template&id=02fb82e2&lang.js} +1 -1
- package/vue3/es/src/components/{SearchInput.vue_vue&type=template&id=3a66396c&lang.js.map → SearchInput.vue_vue&type=template&id=02fb82e2&lang.js.map} +1 -1
- package/vue3/es/src/util/createServerRootMixin.js +1 -1
- package/vue3/es/src/util/createServerRootMixin.js.map +1 -1
- package/vue3/es/src/util/vue-compat/index-vue3.js +1 -1
- package/vue3/es/src/util/vue-compat/index-vue3.js.map +1 -1
- package/vue3/umd/index.js +1 -1
- package/vue3/umd/index.js.map +1 -1
- package/vue3/es/src/components/SearchBox.vue_vue&type=template&id=47fdc6ba&lang.js +0 -2
- package/vue3/es/src/components/SearchBox.vue_vue&type=template&id=47fdc6ba&lang.js.map +0 -1
package/vue3/es/package.json.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var r="4.13.
|
|
1
|
+
var r="4.13.6";export{r as version};
|
|
2
2
|
//# sourceMappingURL=package.json.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"./SearchBox.vue_vue&type=script&lang.js";import{render as r}from"./SearchBox.vue_vue&type=template&id=
|
|
1
|
+
import e from"./SearchBox.vue_vue&type=script&lang.js";import{render as r}from"./SearchBox.vue_vue&type=template&id=b43316e4&lang.js";e.render=r;export default e;
|
|
2
2
|
//# sourceMappingURL=SearchBox.vue.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createSuitMixin as e}from"../mixins/suit.js";import{isVue2 as t,isVue3 as i}from"../util/vue-compat/index-vue3.js";import{createWidgetMixin as o}from"../mixins/widget.js";import{connectSearchBox as s}from"instantsearch.js/es/connectors/index.js";import u from"./SearchInput.vue.js";export default{name:"AisSearchBox",mixins:[o({connector:s},{$$widgetType:"ais.searchBox"}),e({name:"SearchBox"})],components:{SearchInput:u},props:{placeholder:{type:String,default:""},autofocus:{type:Boolean,default:!1},showLoadingIndicator:{type:Boolean,default:!0},submitTitle:{type:String,default:"Submit the search query"},resetTitle:{type:String,default:"Clear the search query"},value:{type:String,default:void 0},modelValue:{type:String,default:void 0},queryHook:{type:Function,default:void 0}},data:function(){return{localValue:"",isVue2:t,isVue3:i}},computed:{widgetParams:function(){return{queryHook:this.queryHook}},isControlled:function(){return void 0!==this.value||void 0!==this.modelValue},model:function(){return this.value||this.modelValue},currentRefinement:{get:function(){this.isControlled&&this.model!==this.localValue&&(this.localValue=this.model,this.$emit("input",this.model),this.$emit("update:modelValue",this.model),this.state.refine(this.model));var e=this.$refs.searchInput;return e&&e.isFocused()?this.localValue:this.model||this.state.query||""},set:function(e){this.localValue=e,this.state.refine(e),this.isControlled&&(this.$emit("input",e),this.$emit("update:modelValue",e))}}}};
|
|
1
|
+
import{createSuitMixin as e}from"../mixins/suit.js";import{isVue2 as t,isVue3 as i}from"../util/vue-compat/index-vue3.js";import{createWidgetMixin as o}from"../mixins/widget.js";import{connectSearchBox as s}from"instantsearch.js/es/connectors/index.js";import u from"./SearchInput.vue.js";export default{name:"AisSearchBox",mixins:[o({connector:s},{$$widgetType:"ais.searchBox"}),e({name:"SearchBox"})],components:{SearchInput:u},props:{placeholder:{type:String,default:""},autofocus:{type:Boolean,default:!1},showLoadingIndicator:{type:Boolean,default:!0},ignoreCompositionEvents:{type:Boolean,default:!1},submitTitle:{type:String,default:"Submit the search query"},resetTitle:{type:String,default:"Clear the search query"},value:{type:String,default:void 0},modelValue:{type:String,default:void 0},queryHook:{type:Function,default:void 0}},data:function(){return{localValue:"",isVue2:t,isVue3:i}},computed:{widgetParams:function(){return{queryHook:this.queryHook}},isControlled:function(){return void 0!==this.value||void 0!==this.modelValue},model:function(){return this.value||this.modelValue},currentRefinement:{get:function(){this.isControlled&&this.model!==this.localValue&&(this.localValue=this.model,this.$emit("input",this.model),this.$emit("update:modelValue",this.model),this.state.refine(this.model));var e=this.$refs.searchInput;return e&&e.isFocused()?this.localValue:this.model||this.state.query||""},set:function(e){this.localValue=e,this.state.refine(e),this.isControlled&&(this.$emit("input",e),this.$emit("update:modelValue",e))}}}};
|
|
2
2
|
//# sourceMappingURL=SearchBox.vue_vue&type=script&lang.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBox.vue_vue&type=script&lang.js","sources":["../../../../src/components/SearchBox.vue"],"sourcesContent":["<template>\n <div v-if=\"state\" :class=\"suit()\">\n <slot\n :current-refinement=\"currentRefinement\"\n :is-search-stalled=\"state.isSearchStalled\"\n :refine=\"state.refine\"\n >\n <search-input\n @focus=\"$emit('focus', $event)\"\n @blur=\"$emit('blur', $event)\"\n @reset=\"$emit('reset')\"\n :placeholder=\"placeholder\"\n :autofocus=\"autofocus\"\n :show-loading-indicator=\"showLoadingIndicator\"\n :should-show-loading-indicator=\"state.isSearchStalled\"\n :submit-title=\"submitTitle\"\n :reset-title=\"resetTitle\"\n :class-names=\"classNames\"\n v-model=\"currentRefinement\"\n ref=\"searchInput\"\n >\n <template #loading-indicator v-if=\"isVue3\">\n <slot name=\"loading-indicator\" />\n </template>\n <slot v-if=\"isVue2\" name=\"loading-indicator\" slot=\"loading-indicator\" />\n\n <template #submit-icon v-if=\"isVue3\">\n <slot name=\"submit-icon\" />\n </template>\n <slot v-if=\"isVue2\" name=\"submit-icon\" slot=\"submit-icon\" />\n\n <template #reset-icon v-if=\"isVue3\">\n <slot name=\"reset-icon\" />\n </template>\n <slot v-if=\"isVue2\" name=\"reset-icon\" slot=\"reset-icon\" />\n </search-input>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectSearchBox } from 'instantsearch.js/es/connectors';\n\nimport { createSuitMixin } from '../mixins/suit';\nimport { createWidgetMixin } from '../mixins/widget';\nimport { isVue3, isVue2 } from '../util/vue-compat';\n\nimport SearchInput from './SearchInput.vue';\n\nexport default {\n name: 'AisSearchBox',\n mixins: [\n createWidgetMixin(\n {\n connector: connectSearchBox,\n },\n {\n $$widgetType: 'ais.searchBox',\n }\n ),\n createSuitMixin({ name: 'SearchBox' }),\n ],\n components: {\n SearchInput,\n },\n props: {\n placeholder: {\n type: String,\n default: '',\n },\n autofocus: {\n type: Boolean,\n default: false,\n },\n showLoadingIndicator: {\n type: Boolean,\n default: true,\n },\n submitTitle: {\n type: String,\n default: 'Submit the search query',\n },\n resetTitle: {\n type: String,\n default: 'Clear the search query',\n },\n value: {\n type: String,\n default: undefined,\n },\n modelValue: {\n type: String,\n default: undefined,\n },\n queryHook: {\n type: Function,\n default: undefined,\n },\n },\n data() {\n return {\n localValue: '',\n isVue2,\n isVue3,\n };\n },\n computed: {\n widgetParams() {\n return {\n queryHook: this.queryHook,\n };\n },\n isControlled() {\n return (\n typeof this.value !== 'undefined' ||\n typeof this.modelValue !== 'undefined'\n );\n },\n model() {\n return this.value || this.modelValue;\n },\n currentRefinement: {\n get() {\n // if the input is controlled, but not up to date\n // this means it didn't search, and we should pretend it was `set`\n if (this.isControlled && this.model !== this.localValue) {\n // eslint-disable-next-line vue/no-side-effects-in-computed-properties\n this.localValue = this.model;\n this.$emit('input', this.model);\n this.$emit('update:modelValue', this.model);\n this.state.refine(this.model);\n }\n\n // we return the local value if the input is focused to avoid\n // concurrent updates when typing\n const { searchInput } = this.$refs;\n if (searchInput && searchInput.isFocused()) {\n return this.localValue;\n }\n\n return this.model || this.state.query || '';\n },\n set(val) {\n this.localValue = val;\n this.state.refine(val);\n if (this.isControlled) {\n this.$emit('input', val);\n this.$emit('update:modelValue', val);\n }\n },\n },\n },\n};\n</script>\n"],"names":["name","mixins","createWidgetMixin","connector","connectSearchBox","$$widgetType","createSuitMixin","components","SearchInput","props","placeholder","type","String","default","autofocus","Boolean","showLoadingIndicator","submitTitle","resetTitle","value","undefined","modelValue","queryHook","Function","data","localValue","isVue2","isVue3","computed","widgetParams","this","isControlled","model","currentRefinement","get","$emit","state","refine","$refs","searchInput","isFocused","query","set","val"],"mappings":"+
|
|
1
|
+
{"version":3,"file":"SearchBox.vue_vue&type=script&lang.js","sources":["../../../../src/components/SearchBox.vue"],"sourcesContent":["<template>\n <div v-if=\"state\" :class=\"suit()\">\n <slot\n :current-refinement=\"currentRefinement\"\n :is-search-stalled=\"state.isSearchStalled\"\n :refine=\"state.refine\"\n >\n <search-input\n @focus=\"$emit('focus', $event)\"\n @blur=\"$emit('blur', $event)\"\n @reset=\"$emit('reset')\"\n :placeholder=\"placeholder\"\n :autofocus=\"autofocus\"\n :show-loading-indicator=\"showLoadingIndicator\"\n :should-show-loading-indicator=\"state.isSearchStalled\"\n :ignore-composition-events=\"ignoreCompositionEvents\"\n :submit-title=\"submitTitle\"\n :reset-title=\"resetTitle\"\n :class-names=\"classNames\"\n v-model=\"currentRefinement\"\n ref=\"searchInput\"\n >\n <template #loading-indicator v-if=\"isVue3\">\n <slot name=\"loading-indicator\" />\n </template>\n <slot v-if=\"isVue2\" name=\"loading-indicator\" slot=\"loading-indicator\" />\n\n <template #submit-icon v-if=\"isVue3\">\n <slot name=\"submit-icon\" />\n </template>\n <slot v-if=\"isVue2\" name=\"submit-icon\" slot=\"submit-icon\" />\n\n <template #reset-icon v-if=\"isVue3\">\n <slot name=\"reset-icon\" />\n </template>\n <slot v-if=\"isVue2\" name=\"reset-icon\" slot=\"reset-icon\" />\n </search-input>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectSearchBox } from 'instantsearch.js/es/connectors';\n\nimport { createSuitMixin } from '../mixins/suit';\nimport { createWidgetMixin } from '../mixins/widget';\nimport { isVue3, isVue2 } from '../util/vue-compat';\n\nimport SearchInput from './SearchInput.vue';\n\nexport default {\n name: 'AisSearchBox',\n mixins: [\n createWidgetMixin(\n {\n connector: connectSearchBox,\n },\n {\n $$widgetType: 'ais.searchBox',\n }\n ),\n createSuitMixin({ name: 'SearchBox' }),\n ],\n components: {\n SearchInput,\n },\n props: {\n placeholder: {\n type: String,\n default: '',\n },\n autofocus: {\n type: Boolean,\n default: false,\n },\n showLoadingIndicator: {\n type: Boolean,\n default: true,\n },\n ignoreCompositionEvents: {\n type: Boolean,\n default: false,\n },\n submitTitle: {\n type: String,\n default: 'Submit the search query',\n },\n resetTitle: {\n type: String,\n default: 'Clear the search query',\n },\n value: {\n type: String,\n default: undefined,\n },\n modelValue: {\n type: String,\n default: undefined,\n },\n queryHook: {\n type: Function,\n default: undefined,\n },\n },\n data() {\n return {\n localValue: '',\n isVue2,\n isVue3,\n };\n },\n computed: {\n widgetParams() {\n return {\n queryHook: this.queryHook,\n };\n },\n isControlled() {\n return (\n typeof this.value !== 'undefined' ||\n typeof this.modelValue !== 'undefined'\n );\n },\n model() {\n return this.value || this.modelValue;\n },\n currentRefinement: {\n get() {\n // if the input is controlled, but not up to date\n // this means it didn't search, and we should pretend it was `set`\n if (this.isControlled && this.model !== this.localValue) {\n // eslint-disable-next-line vue/no-side-effects-in-computed-properties\n this.localValue = this.model;\n this.$emit('input', this.model);\n this.$emit('update:modelValue', this.model);\n this.state.refine(this.model);\n }\n\n // we return the local value if the input is focused to avoid\n // concurrent updates when typing\n const { searchInput } = this.$refs;\n if (searchInput && searchInput.isFocused()) {\n return this.localValue;\n }\n\n return this.model || this.state.query || '';\n },\n set(val) {\n this.localValue = val;\n this.state.refine(val);\n if (this.isControlled) {\n this.$emit('input', val);\n this.$emit('update:modelValue', val);\n }\n },\n },\n },\n};\n</script>\n"],"names":["name","mixins","createWidgetMixin","connector","connectSearchBox","$$widgetType","createSuitMixin","components","SearchInput","props","placeholder","type","String","default","autofocus","Boolean","showLoadingIndicator","ignoreCompositionEvents","submitTitle","resetTitle","value","undefined","modelValue","queryHook","Function","data","localValue","isVue2","isVue3","computed","widgetParams","this","isControlled","model","currentRefinement","get","$emit","state","refine","$refs","searchInput","isFocused","query","set","val"],"mappings":"+SAkDe,CACbA,KAAM,eACNC,OAAQ,CACNC,EACE,CACEC,UAAWC,GAEb,CACEC,aAAc,kBAGlBC,EAAgB,CAAEN,KAAM,eAE1BO,WAAY,aACVC,GAEFC,MAAO,CACLC,YAAa,CACXC,KAAMC,OACNC,QAAS,IAEXC,UAAW,CACTH,KAAMI,QACNF,SAAS,GAEXG,qBAAsB,CACpBL,KAAMI,QACNF,SAAS,GAEXI,wBAAyB,CACvBN,KAAMI,QACNF,SAAS,GAEXK,YAAa,CACXP,KAAMC,OACNC,QAAS,2BAEXM,WAAY,CACVR,KAAMC,OACNC,QAAS,0BAEXO,MAAO,CACLT,KAAMC,OACNC,aAASQ,GAEXC,WAAY,CACVX,KAAMC,OACNC,aAASQ,GAEXE,UAAW,CACTZ,KAAMa,SACNX,aAASQ,IAGbI,gBACE,MAAO,CACLC,WAAY,UACZC,SACAC,IAGJC,SAAU,CACRC,wBACE,MAAO,CACLP,UAAWQ,KAAKR,YAGpBS,wBACE,YACwB,IAAfD,KAAKX,YACe,IAApBW,KAAKT,YAGhBW,iBACE,OAAOF,KAAKX,OAASW,KAAKT,YAE5BY,kBAAmB,CACjBC,eAGMJ,KAAKC,cAAgBD,KAAKE,QAAUF,KAAKL,aAE3CK,KAAKL,WAAaK,KAAKE,MACvBF,KAAKK,MAAM,QAASL,KAAKE,OACzBF,KAAKK,MAAM,oBAAqBL,KAAKE,OACrCF,KAAKM,MAAMC,OAAOP,KAAKE,cAKDF,KAAKQ,kBAC7B,OAAIC,GAAeA,EAAYC,YACtBV,KAAKL,WAGPK,KAAKE,OAASF,KAAKM,MAAMK,OAAS,IAE3CC,aAAIC,GACFb,KAAKL,WAAakB,EAClBb,KAAKM,MAAMC,OAAOM,GACdb,KAAKC,eACPD,KAAKK,MAAM,QAASQ,GACpBb,KAAKK,MAAM,oBAAqBQ"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{resolveComponent as e,openBlock as t,createElementBlock as n,normalizeClass as i,renderSlot as o,createVNode as s,createSlots as r,withCtx as u,createCommentVNode as a}from"vue";function l(l,c,d,m,f,h){var g=e("search-input");return l.state?(t(),n("div",{key:0,class:i(l.suit())},[o(l.$slots,"default",{currentRefinement:h.currentRefinement,isSearchStalled:l.state.isSearchStalled,refine:l.state.refine},function(){return[s(g,{onFocus:c[0]||(c[0]=function(e){return l.$emit("focus",e)}),onBlur:c[1]||(c[1]=function(e){return l.$emit("blur",e)}),onReset:c[2]||(c[2]=function(e){return l.$emit("reset")}),placeholder:d.placeholder,autofocus:d.autofocus,"show-loading-indicator":d.showLoadingIndicator,"should-show-loading-indicator":l.state.isSearchStalled,"ignore-composition-events":d.ignoreCompositionEvents,"submit-title":d.submitTitle,"reset-title":d.resetTitle,"class-names":l.classNames,modelValue:h.currentRefinement,"onUpdate:modelValue":c[3]||(c[3]=function(e){return h.currentRefinement=e}),ref:"searchInput"},r({default:u(function(){return[f.isVue2?o(l.$slots,"loading-indicator",{key:0,slot:"loading-indicator"}):a("",!0),f.isVue2?o(l.$slots,"submit-icon",{key:1,slot:"submit-icon"}):a("",!0),f.isVue2?o(l.$slots,"reset-icon",{key:2,slot:"reset-icon"}):a("",!0)]}),_:2},[f.isVue3?{name:"loading-indicator",fn:u(function(){return[o(l.$slots,"loading-indicator")]}),key:"0"}:void 0,f.isVue3?{name:"submit-icon",fn:u(function(){return[o(l.$slots,"submit-icon")]}),key:"1"}:void 0,f.isVue3?{name:"reset-icon",fn:u(function(){return[o(l.$slots,"reset-icon")]}),key:"2"}:void 0]),1032,["placeholder","autofocus","show-loading-indicator","should-show-loading-indicator","ignore-composition-events","submit-title","reset-title","class-names","modelValue"])]})],2)):a("",!0)}export{l as render};
|
|
2
|
+
//# sourceMappingURL=SearchBox.vue_vue&type=template&id=b43316e4&lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchBox.vue_vue&type=template&id=b43316e4&lang.js","sources":["../../../../src/components/SearchBox.vue?vue&type=template&id=b43316e4&lang.js"],"sourcesContent":["<template>\n <div v-if=\"state\" :class=\"suit()\">\n <slot\n :current-refinement=\"currentRefinement\"\n :is-search-stalled=\"state.isSearchStalled\"\n :refine=\"state.refine\"\n >\n <search-input\n @focus=\"$emit('focus', $event)\"\n @blur=\"$emit('blur', $event)\"\n @reset=\"$emit('reset')\"\n :placeholder=\"placeholder\"\n :autofocus=\"autofocus\"\n :show-loading-indicator=\"showLoadingIndicator\"\n :should-show-loading-indicator=\"state.isSearchStalled\"\n :ignore-composition-events=\"ignoreCompositionEvents\"\n :submit-title=\"submitTitle\"\n :reset-title=\"resetTitle\"\n :class-names=\"classNames\"\n v-model=\"currentRefinement\"\n ref=\"searchInput\"\n >\n <template #loading-indicator v-if=\"isVue3\">\n <slot name=\"loading-indicator\" />\n </template>\n <slot v-if=\"isVue2\" name=\"loading-indicator\" slot=\"loading-indicator\" />\n\n <template #submit-icon v-if=\"isVue3\">\n <slot name=\"submit-icon\" />\n </template>\n <slot v-if=\"isVue2\" name=\"submit-icon\" slot=\"submit-icon\" />\n\n <template #reset-icon v-if=\"isVue3\">\n <slot name=\"reset-icon\" />\n </template>\n <slot v-if=\"isVue2\" name=\"reset-icon\" slot=\"reset-icon\" />\n </search-input>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectSearchBox } from 'instantsearch.js/es/connectors';\n\nimport { createSuitMixin } from '../mixins/suit';\nimport { createWidgetMixin } from '../mixins/widget';\nimport { isVue3, isVue2 } from '../util/vue-compat';\n\nimport SearchInput from './SearchInput.vue';\n\nexport default {\n name: 'AisSearchBox',\n mixins: [\n createWidgetMixin(\n {\n connector: connectSearchBox,\n },\n {\n $$widgetType: 'ais.searchBox',\n }\n ),\n createSuitMixin({ name: 'SearchBox' }),\n ],\n components: {\n SearchInput,\n },\n props: {\n placeholder: {\n type: String,\n default: '',\n },\n autofocus: {\n type: Boolean,\n default: false,\n },\n showLoadingIndicator: {\n type: Boolean,\n default: true,\n },\n ignoreCompositionEvents: {\n type: Boolean,\n default: false,\n },\n submitTitle: {\n type: String,\n default: 'Submit the search query',\n },\n resetTitle: {\n type: String,\n default: 'Clear the search query',\n },\n value: {\n type: String,\n default: undefined,\n },\n modelValue: {\n type: String,\n default: undefined,\n },\n queryHook: {\n type: Function,\n default: undefined,\n },\n },\n data() {\n return {\n localValue: '',\n isVue2,\n isVue3,\n };\n },\n computed: {\n widgetParams() {\n return {\n queryHook: this.queryHook,\n };\n },\n isControlled() {\n return (\n typeof this.value !== 'undefined' ||\n typeof this.modelValue !== 'undefined'\n );\n },\n model() {\n return this.value || this.modelValue;\n },\n currentRefinement: {\n get() {\n // if the input is controlled, but not up to date\n // this means it didn't search, and we should pretend it was `set`\n if (this.isControlled && this.model !== this.localValue) {\n // eslint-disable-next-line vue/no-side-effects-in-computed-properties\n this.localValue = this.model;\n this.$emit('input', this.model);\n this.$emit('update:modelValue', this.model);\n this.state.refine(this.model);\n }\n\n // we return the local value if the input is focused to avoid\n // concurrent updates when typing\n const { searchInput } = this.$refs;\n if (searchInput && searchInput.isFocused()) {\n return this.localValue;\n }\n\n return this.model || this.state.query || '';\n },\n set(val) {\n this.localValue = val;\n this.state.refine(val);\n if (this.isControlled) {\n this.$emit('input', val);\n this.$emit('update:modelValue', val);\n }\n },\n },\n },\n};\n</script>\n"],"names":["_ctx","_createElementBlock","class","_renderSlot","currentRefinement","$options","isSearchStalled","refine","_createVNode","onFocus","$event","onBlur","onReset","placeholder","$props","autofocus","show-loading-indicator","should-show-loading-indicator","ignore-composition-events","submit-title","reset-title","class-names","ref","$data","slot"],"mappings":"gPACaA,aAAXC,eAAmBC,QAAOF,YACxBG,sBACGC,kBAAoBC,oBACpBC,gBAAmBN,QAAMM,gBACzBC,OAAQP,QAAMO,0BAEfC,KACGC,uCAAOT,gBAAeU,KACtBC,sCAAMX,eAAcU,KACpBE,uCAAOZ,mBACPa,YAAaC,cACbC,UAAWD,YACXE,yBAAwBF,uBACxBG,gCAA+BjB,QAAMM,gBACrCY,4BAA2BJ,0BAC3BK,eAAcL,cACdM,cAAaN,aACbO,cAAarB,wBACLK,yEAAAA,wBACTiB,IAAI,8CAKQC,SAAZpB,sCAA6CqB,KAAK,+BAKtCD,SAAZpB,gCAAuCqB,KAAK,yBAKhCD,SAAZpB,+BAAsCqB,KAAK,iCAbRD,eAAxB,2CACTpB,mDAI2BoB,eAAlB,qCACTpB,6CAI0BoB,eAAjB,oCACTpB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"./SearchInput.vue_vue&type=script&lang.js";import{render as t}from"./SearchInput.vue_vue&type=template&id=
|
|
1
|
+
import e from"./SearchInput.vue_vue&type=script&lang.js";import{render as t}from"./SearchInput.vue_vue&type=template&id=02fb82e2&lang.js";e.render=t;export default e;
|
|
2
2
|
//# sourceMappingURL=SearchInput.vue.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createSuitMixin as e}from"../mixins/suit.js";export default{name:"SearchInput",mixins:[e({name:"SearchBox"})],props:{placeholder:{type:String,default:"Search here…"},autofocus:{type:Boolean,default:!1},showLoadingIndicator:{type:Boolean,default:!1},shouldShowLoadingIndicator:{type:Boolean,default:!1},submitTitle:{type:String,default:"Search"},resetTitle:{type:String,default:"Clear"},value:{type:String,required:!1,default:void 0},modelValue:{type:String,required:!1,default:void 0}},emits:["input","update:modelValue","blur","focus","reset"],data:function(){return{query:""}},methods:{isFocused:function(){return document.activeElement===this.$refs.input},onInput:function(e){
|
|
1
|
+
import{createSuitMixin as e}from"../mixins/suit.js";export default{name:"SearchInput",mixins:[e({name:"SearchBox"})],props:{placeholder:{type:String,default:"Search here…"},autofocus:{type:Boolean,default:!1},showLoadingIndicator:{type:Boolean,default:!1},shouldShowLoadingIndicator:{type:Boolean,default:!1},ignoreCompositionEvents:{type:Boolean,default:!1},submitTitle:{type:String,default:"Search"},resetTitle:{type:String,default:"Clear"},value:{type:String,required:!1,default:void 0},modelValue:{type:String,required:!1,default:void 0}},emits:["input","update:modelValue","blur","focus","reset"],data:function(){return{query:""}},methods:{isFocused:function(){return document.activeElement===this.$refs.input},onInput:function(e){this.ignoreCompositionEvents&&e.isComposing||(this.$emit("input",e.target.value),this.$emit("update:modelValue",e.target.value))},onFormSubmit:function(){this.$refs.input.blur()},onFormReset:function(){this.$emit("input",""),this.$emit("update:modelValue",""),this.$emit("reset")}}};
|
|
2
2
|
//# sourceMappingURL=SearchInput.vue_vue&type=script&lang.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.vue_vue&type=script&lang.js","sources":["../../../../src/components/SearchInput.vue"],"sourcesContent":["<template>\n <form\n action=\"\"\n role=\"search\"\n novalidate\n :class=\"suit('form')\"\n @submit.prevent=\"onFormSubmit\"\n @reset.prevent=\"onFormReset\"\n >\n <!-- :value/@input allows us to pass v-model to the component in v2 -->\n <!-- :modelValue/@update:modelValue allows us to pass v-model to the component in v3 -->\n <input\n type=\"search\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n maxlength=\"512\"\n aria-label=\"Search\"\n :placeholder=\"placeholder\"\n :autofocus=\"autofocus\"\n :class=\"suit('input')\"\n :value=\"value || modelValue\"\n @focus=\"$emit('focus', $event)\"\n @blur=\"$emit('blur', $event)\"\n @input=\"onInput($event)\"\n @compositionend=\"onInput($event)\"\n ref=\"input\"\n />\n <button\n type=\"submit\"\n :title=\"submitTitle\"\n :class=\"suit('submit')\"\n :hidden=\"showLoadingIndicator && shouldShowLoadingIndicator\"\n >\n <slot name=\"submit-icon\">\n <svg\n aria-hidden=\"true\"\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n :class=\"suit('submitIcon')\"\n >\n <path\n d=\"M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z\"\n />\n </svg>\n </slot>\n </button>\n\n <button\n type=\"reset\"\n :title=\"resetTitle\"\n :class=\"suit('reset')\"\n :hidden=\"\n (!value && !modelValue) ||\n (showLoadingIndicator && shouldShowLoadingIndicator)\n \"\n >\n <slot name=\"reset-icon\">\n <svg\n aria-hidden=\"true\"\n height=\"10\"\n viewBox=\"0 0 20 20\"\n :class=\"suit('resetIcon')\"\n width=\"10\"\n >\n <path\n d=\"M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z\"\n />\n </svg>\n </slot>\n </button>\n\n <span\n v-if=\"showLoadingIndicator\"\n :hidden=\"!shouldShowLoadingIndicator\"\n :class=\"suit('loadingIndicator')\"\n >\n <slot name=\"loading-indicator\">\n <svg\n :aria-hidden=\"!shouldShowLoadingIndicator\"\n aria-label=\"Results are loading\"\n width=\"16\"\n height=\"16\"\n stroke=\"#444\"\n viewBox=\"0 0 38 38\"\n :class=\"suit('loadingIcon')\"\n >\n <g fill=\"none\" fill-rule=\"evenodd\">\n <g transform=\"translate(1 1)\" stroke-width=\"2\">\n <circle stroke-opacity=\".5\" cx=\"18\" cy=\"18\" r=\"18\" />\n <path d=\"M36 18c0-9.94-8.06-18-18-18\">\n <animateTransform\n attributeName=\"transform\"\n type=\"rotate\"\n from=\"0 18 18\"\n to=\"360 18 18\"\n dur=\"1s\"\n repeatCount=\"indefinite\"\n />\n </path>\n </g>\n </g>\n </svg>\n </slot>\n </span>\n </form>\n</template>\n\n<script>\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'SearchInput',\n mixins: [createSuitMixin({ name: 'SearchBox' })],\n props: {\n placeholder: {\n type: String,\n default: 'Search here…',\n },\n autofocus: {\n type: Boolean,\n default: false,\n },\n showLoadingIndicator: {\n type: Boolean,\n default: false,\n },\n shouldShowLoadingIndicator: {\n type: Boolean,\n default: false,\n },\n submitTitle: {\n type: String,\n default: 'Search',\n },\n resetTitle: {\n type: String,\n default: 'Clear',\n },\n value: {\n type: String,\n required: false,\n default: undefined,\n },\n modelValue: {\n type: String,\n required: false,\n default: undefined,\n },\n },\n emits: ['input', 'update:modelValue', 'blur', 'focus', 'reset'],\n data() {\n return {\n query: '',\n };\n },\n methods: {\n isFocused() {\n return document.activeElement === this.$refs.input;\n },\n onInput(event) {\n if (
|
|
1
|
+
{"version":3,"file":"SearchInput.vue_vue&type=script&lang.js","sources":["../../../../src/components/SearchInput.vue"],"sourcesContent":["<template>\n <form\n action=\"\"\n role=\"search\"\n novalidate\n :class=\"suit('form')\"\n @submit.prevent=\"onFormSubmit\"\n @reset.prevent=\"onFormReset\"\n >\n <!-- :value/@input allows us to pass v-model to the component in v2 -->\n <!-- :modelValue/@update:modelValue allows us to pass v-model to the component in v3 -->\n <input\n type=\"search\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n maxlength=\"512\"\n aria-label=\"Search\"\n :placeholder=\"placeholder\"\n :autofocus=\"autofocus\"\n :class=\"suit('input')\"\n :value=\"value || modelValue\"\n @focus=\"$emit('focus', $event)\"\n @blur=\"$emit('blur', $event)\"\n @input=\"onInput($event)\"\n @compositionend=\"onInput($event)\"\n ref=\"input\"\n />\n <button\n type=\"submit\"\n :title=\"submitTitle\"\n :class=\"suit('submit')\"\n :hidden=\"showLoadingIndicator && shouldShowLoadingIndicator\"\n >\n <slot name=\"submit-icon\">\n <svg\n aria-hidden=\"true\"\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n :class=\"suit('submitIcon')\"\n >\n <path\n d=\"M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z\"\n />\n </svg>\n </slot>\n </button>\n\n <button\n type=\"reset\"\n :title=\"resetTitle\"\n :class=\"suit('reset')\"\n :hidden=\"\n (!value && !modelValue) ||\n (showLoadingIndicator && shouldShowLoadingIndicator)\n \"\n >\n <slot name=\"reset-icon\">\n <svg\n aria-hidden=\"true\"\n height=\"10\"\n viewBox=\"0 0 20 20\"\n :class=\"suit('resetIcon')\"\n width=\"10\"\n >\n <path\n d=\"M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z\"\n />\n </svg>\n </slot>\n </button>\n\n <span\n v-if=\"showLoadingIndicator\"\n :hidden=\"!shouldShowLoadingIndicator\"\n :class=\"suit('loadingIndicator')\"\n >\n <slot name=\"loading-indicator\">\n <svg\n :aria-hidden=\"!shouldShowLoadingIndicator\"\n aria-label=\"Results are loading\"\n width=\"16\"\n height=\"16\"\n stroke=\"#444\"\n viewBox=\"0 0 38 38\"\n :class=\"suit('loadingIcon')\"\n >\n <g fill=\"none\" fill-rule=\"evenodd\">\n <g transform=\"translate(1 1)\" stroke-width=\"2\">\n <circle stroke-opacity=\".5\" cx=\"18\" cy=\"18\" r=\"18\" />\n <path d=\"M36 18c0-9.94-8.06-18-18-18\">\n <animateTransform\n attributeName=\"transform\"\n type=\"rotate\"\n from=\"0 18 18\"\n to=\"360 18 18\"\n dur=\"1s\"\n repeatCount=\"indefinite\"\n />\n </path>\n </g>\n </g>\n </svg>\n </slot>\n </span>\n </form>\n</template>\n\n<script>\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'SearchInput',\n mixins: [createSuitMixin({ name: 'SearchBox' })],\n props: {\n placeholder: {\n type: String,\n default: 'Search here…',\n },\n autofocus: {\n type: Boolean,\n default: false,\n },\n showLoadingIndicator: {\n type: Boolean,\n default: false,\n },\n shouldShowLoadingIndicator: {\n type: Boolean,\n default: false,\n },\n ignoreCompositionEvents: {\n type: Boolean,\n default: false,\n },\n submitTitle: {\n type: String,\n default: 'Search',\n },\n resetTitle: {\n type: String,\n default: 'Clear',\n },\n value: {\n type: String,\n required: false,\n default: undefined,\n },\n modelValue: {\n type: String,\n required: false,\n default: undefined,\n },\n },\n emits: ['input', 'update:modelValue', 'blur', 'focus', 'reset'],\n data() {\n return {\n query: '',\n };\n },\n methods: {\n isFocused() {\n return document.activeElement === this.$refs.input;\n },\n onInput(event) {\n if (!(this.ignoreCompositionEvents && event.isComposing)) {\n this.$emit('input', event.target.value);\n this.$emit('update:modelValue', event.target.value);\n }\n },\n onFormSubmit() {\n const input = this.$refs.input;\n input.blur();\n },\n onFormReset() {\n this.$emit('input', '');\n this.$emit('update:modelValue', '');\n this.$emit('reset');\n },\n },\n};\n</script>\n"],"names":["name","mixins","createSuitMixin","props","placeholder","type","String","default","autofocus","Boolean","showLoadingIndicator","shouldShowLoadingIndicator","ignoreCompositionEvents","submitTitle","resetTitle","value","required","undefined","modelValue","emits","data","query","methods","isFocused","document","activeElement","this","$refs","input","onInput","event","isComposing","$emit","target","onFormSubmit","blur","onFormReset"],"mappings":"kEAiHe,CACbA,KAAM,cACNC,OAAQ,CAACC,EAAgB,CAAEF,KAAM,eACjCG,MAAO,CACLC,YAAa,CACXC,KAAMC,OACNC,QAAS,gBAEXC,UAAW,CACTH,KAAMI,QACNF,SAAS,GAEXG,qBAAsB,CACpBL,KAAMI,QACNF,SAAS,GAEXI,2BAA4B,CAC1BN,KAAMI,QACNF,SAAS,GAEXK,wBAAyB,CACvBP,KAAMI,QACNF,SAAS,GAEXM,YAAa,CACXR,KAAMC,OACNC,QAAS,UAEXO,WAAY,CACVT,KAAMC,OACNC,QAAS,SAEXQ,MAAO,CACLV,KAAMC,OACNU,UAAU,EACVT,aAASU,GAEXC,WAAY,CACVb,KAAMC,OACNU,UAAU,EACVT,aAASU,IAGbE,MAAO,CAAC,QAAS,oBAAqB,OAAQ,QAAS,SACvDC,gBACE,MAAO,CACLC,MAAO,KAGXC,QAAS,CACPC,qBACE,OAAOC,SAASC,gBAAkBC,KAAKC,MAAMC,OAE/CC,iBAAQC,GACAJ,KAAKd,yBAA2BkB,EAAMC,cAC1CL,KAAKM,MAAM,QAASF,EAAMG,OAAOlB,OACjCW,KAAKM,MAAM,oBAAqBF,EAAMG,OAAOlB,SAGjDmB,wBACgBR,KAAKC,MAAMC,MACnBO,QAERC,uBACEV,KAAKM,MAAM,QAAS,IACpBN,KAAKM,MAAM,oBAAqB,IAChCN,KAAKM,MAAM"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{openBlock as t,createElementBlock as o,normalizeClass as e,withModifiers as n,createElementVNode as i,renderSlot as a,createCommentVNode as r,createStaticVNode as l}from"vue";var u=["placeholder","autofocus","value"],s=["title","hidden"],c=[i("path",{d:"M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"},null,-1)],d=["title","hidden"],h=[i("path",{d:"M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"},null,-1)],f=["hidden"],m=["aria-hidden"],p=[l('<g fill="none" fill-rule="evenodd"><g transform="translate(1 1)" stroke-width="2"><circle stroke-opacity=".5" cx="18" cy="18" r="18"></circle><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="1s" repeatCount="indefinite"></animateTransform></path></g></g>',1)];function g(l,g,v,b,w,I){return t(),o("form",{action:"",role:"search",novalidate:"",class:e(l.suit("form")),onSubmit:g[4]||(g[4]=n(function(){for(var t=[],o=arguments.length;o--;)t[o]=arguments[o];return I.onFormSubmit&&I.onFormSubmit.apply(I,t)},["prevent"])),onReset:g[5]||(g[5]=n(function(){for(var t=[],o=arguments.length;o--;)t[o]=arguments[o];return I.onFormReset&&I.onFormReset.apply(I,t)},["prevent"]))},[i("input",{type:"search",autocorrect:"off",autocapitalize:"off",autocomplete:"off",spellcheck:"false",maxlength:"512","aria-label":"Search",placeholder:v.placeholder,autofocus:v.autofocus,class:e(l.suit("input")),value:v.value||v.modelValue,onFocus:g[0]||(g[0]=function(t){return l.$emit("focus",t)}),onBlur:g[1]||(g[1]=function(t){return l.$emit("blur",t)}),onInput:g[2]||(g[2]=function(t){return I.onInput(t)}),onCompositionend:g[3]||(g[3]=function(t){return I.onInput(t)}),ref:"input"},null,42,u),i("button",{type:"submit",title:v.submitTitle,class:e(l.suit("submit")),hidden:v.showLoadingIndicator&&v.shouldShowLoadingIndicator},[a(l.$slots,"submit-icon",{},function(){return[(t(),o("svg",{"aria-hidden":"true",width:"10",height:"10",viewBox:"0 0 40 40",class:e(l.suit("submitIcon"))},c,2))]})],10,s),i("button",{type:"reset",title:v.resetTitle,class:e(l.suit("reset")),hidden:!v.value&&!v.modelValue||v.showLoadingIndicator&&v.shouldShowLoadingIndicator},[a(l.$slots,"reset-icon",{},function(){return[(t(),o("svg",{"aria-hidden":"true",height:"10",viewBox:"0 0 20 20",class:e(l.suit("resetIcon")),width:"10"},h,2))]})],10,d),v.showLoadingIndicator?(t(),o("span",{key:0,hidden:!v.shouldShowLoadingIndicator,class:e(l.suit("loadingIndicator"))},[a(l.$slots,"loading-indicator",{},function(){return[(t(),o("svg",{"aria-hidden":!v.shouldShowLoadingIndicator,"aria-label":"Results are loading",width:"16",height:"16",stroke:"#444",viewBox:"0 0 38 38",class:e(l.suit("loadingIcon"))},p,10,m))]})],10,f)):r("",!0)],34)}export{g as render};
|
|
2
|
-
//# sourceMappingURL=SearchInput.vue_vue&type=template&id=
|
|
2
|
+
//# sourceMappingURL=SearchInput.vue_vue&type=template&id=02fb82e2&lang.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.vue_vue&type=template&id=
|
|
1
|
+
{"version":3,"file":"SearchInput.vue_vue&type=template&id=02fb82e2&lang.js","sources":["../../../../src/components/SearchInput.vue?vue&type=template&id=02fb82e2&lang.js"],"sourcesContent":["<template>\n <form\n action=\"\"\n role=\"search\"\n novalidate\n :class=\"suit('form')\"\n @submit.prevent=\"onFormSubmit\"\n @reset.prevent=\"onFormReset\"\n >\n <!-- :value/@input allows us to pass v-model to the component in v2 -->\n <!-- :modelValue/@update:modelValue allows us to pass v-model to the component in v3 -->\n <input\n type=\"search\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n maxlength=\"512\"\n aria-label=\"Search\"\n :placeholder=\"placeholder\"\n :autofocus=\"autofocus\"\n :class=\"suit('input')\"\n :value=\"value || modelValue\"\n @focus=\"$emit('focus', $event)\"\n @blur=\"$emit('blur', $event)\"\n @input=\"onInput($event)\"\n @compositionend=\"onInput($event)\"\n ref=\"input\"\n />\n <button\n type=\"submit\"\n :title=\"submitTitle\"\n :class=\"suit('submit')\"\n :hidden=\"showLoadingIndicator && shouldShowLoadingIndicator\"\n >\n <slot name=\"submit-icon\">\n <svg\n aria-hidden=\"true\"\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 40 40\"\n :class=\"suit('submitIcon')\"\n >\n <path\n d=\"M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z\"\n />\n </svg>\n </slot>\n </button>\n\n <button\n type=\"reset\"\n :title=\"resetTitle\"\n :class=\"suit('reset')\"\n :hidden=\"\n (!value && !modelValue) ||\n (showLoadingIndicator && shouldShowLoadingIndicator)\n \"\n >\n <slot name=\"reset-icon\">\n <svg\n aria-hidden=\"true\"\n height=\"10\"\n viewBox=\"0 0 20 20\"\n :class=\"suit('resetIcon')\"\n width=\"10\"\n >\n <path\n d=\"M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z\"\n />\n </svg>\n </slot>\n </button>\n\n <span\n v-if=\"showLoadingIndicator\"\n :hidden=\"!shouldShowLoadingIndicator\"\n :class=\"suit('loadingIndicator')\"\n >\n <slot name=\"loading-indicator\">\n <svg\n :aria-hidden=\"!shouldShowLoadingIndicator\"\n aria-label=\"Results are loading\"\n width=\"16\"\n height=\"16\"\n stroke=\"#444\"\n viewBox=\"0 0 38 38\"\n :class=\"suit('loadingIcon')\"\n >\n <g fill=\"none\" fill-rule=\"evenodd\">\n <g transform=\"translate(1 1)\" stroke-width=\"2\">\n <circle stroke-opacity=\".5\" cx=\"18\" cy=\"18\" r=\"18\" />\n <path d=\"M36 18c0-9.94-8.06-18-18-18\">\n <animateTransform\n attributeName=\"transform\"\n type=\"rotate\"\n from=\"0 18 18\"\n to=\"360 18 18\"\n dur=\"1s\"\n repeatCount=\"indefinite\"\n />\n </path>\n </g>\n </g>\n </svg>\n </slot>\n </span>\n </form>\n</template>\n\n<script>\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'SearchInput',\n mixins: [createSuitMixin({ name: 'SearchBox' })],\n props: {\n placeholder: {\n type: String,\n default: 'Search here…',\n },\n autofocus: {\n type: Boolean,\n default: false,\n },\n showLoadingIndicator: {\n type: Boolean,\n default: false,\n },\n shouldShowLoadingIndicator: {\n type: Boolean,\n default: false,\n },\n ignoreCompositionEvents: {\n type: Boolean,\n default: false,\n },\n submitTitle: {\n type: String,\n default: 'Search',\n },\n resetTitle: {\n type: String,\n default: 'Clear',\n },\n value: {\n type: String,\n required: false,\n default: undefined,\n },\n modelValue: {\n type: String,\n required: false,\n default: undefined,\n },\n },\n emits: ['input', 'update:modelValue', 'blur', 'focus', 'reset'],\n data() {\n return {\n query: '',\n };\n },\n methods: {\n isFocused() {\n return document.activeElement === this.$refs.input;\n },\n onInput(event) {\n if (!(this.ignoreCompositionEvents && event.isComposing)) {\n this.$emit('input', event.target.value);\n this.$emit('update:modelValue', event.target.value);\n }\n },\n onFormSubmit() {\n const input = this.$refs.input;\n input.blur();\n },\n onFormReset() {\n this.$emit('input', '');\n this.$emit('update:modelValue', '');\n this.$emit('reset');\n },\n },\n};\n</script>\n"],"names":["_createElementVNode","d","_createElementBlock","action","role","novalidate","class","_ctx","onSubmit","$options","onReset","type","autocorrect","autocapitalize","autocomplete","spellcheck","maxlength","aria-label","placeholder","$props","autofocus","value","onFocus","$event","onBlur","onInput","onCompositionend","ref","title","hidden","_renderSlot","aria-hidden","width","height","viewBox","stroke"],"mappings":"wPA2CUA,UACEC,EAAE,sbAuBJD,UACEC,EAAE,knBAnEZC,UACEC,OAAO,GACPC,KAAK,SACLC,WAAA,GACCC,QAAOC,gBACPC,gGAAgBC,yDAChBC,+FAAeD,yDAIhBT,WACEW,KAAK,SACLC,YAAY,MACZC,eAAe,MACfC,aAAa,MACbC,WAAW,QACXC,UAAU,MACVC,aAAW,SACVC,YAAaC,cACbC,UAAWD,YACXb,QAAOC,iBACPc,MAAOF,SAASA,aAChBG,uCAAOf,gBAAegB,KACtBC,sCAAMjB,eAAcgB,KACpBE,uCAAOhB,UAAQc,KACfG,gDAAgBjB,UAAQc,KACzBI,IAAI,oBAEN3B,YACEW,KAAK,SACJiB,MAAOT,cACPb,QAAOC,kBACPsB,OAAQV,wBAAwBA,+BAEjCW,mDACE5B,SACE6B,cAAY,OACZC,MAAM,KACNC,OAAO,KACPC,QAAQ,YACP5B,QAAOC,uCASdP,YACEW,KAAK,QACJiB,MAAOT,aACPb,QAAOC,iBACPsB,uFAKDC,kDACE5B,SACE6B,cAAY,OACZE,OAAO,KACPC,QAAQ,YACP5B,QAAOC,qBACRyB,MAAM,sBAUJb,4BADRjB,gBAEG2B,QAASV,6BACTb,QAAOC,8BAERuB,yDACE5B,SACG6B,eAAcZ,6BACfF,aAAW,sBACXe,MAAM,KACNC,OAAO,KACPE,OAAO,OACPD,QAAQ,YACP5B,QAAOC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createSSRApp as t}from"vue";import"./vue-compat/index-vue3.js";import{warn as e}from"./warn.js";import r from"instantsearch.js/es/index.js";import{waitForResults as n,getInitialResults as s}from"instantsearch.js/es/lib/server.js";function o(e,r){void 0===r&&(r={});var n=r.mixins;void 0===n&&(n=[]);var s,o={serverPrefetch:void 0,fetch:void 0,_base:void 0,name:"ais-ssr-root-component"},i=Object.assign({},e.$options,o);return i.mixins=n.concat(i.mixins||[]),s=t(i),e.$router&&s.use(e.$router),e.$store&&s.use(e.$store),e.$i18n&&s.use(e.$i18n),s.$slots=e.$slots,s.$root=e.$root,s}function i(t){void 0===t&&(t={});var i=t.$cloneComponent;void 0===i&&(i=o);var a=function(t,o){var i,a=r(t);return a.findResultsState=function(t){var e,r,u=t.component,c=t.renderToString;if(!c)throw new Error("findResultsState requires `renderToString: (component) => Promise<string>` in the first argument.");return Promise.resolve().then(function(){e=o(u,{mixins:[{beforeCreate:function(){var t=Object.getOwnPropertyDescriptor(u,"$nuxt"),e=!!t&&(t.writable||t.set);u.$nuxt&&e&&(this.$nuxt=u.$nuxt)},created:function(){(r=this.instantsearch).start(),r.started=!1}}]})}).then(function(){return c(e)}).then(function(){return n(r)}).then(function(){return i=s(r.mainIndex),a.hydrate(i),a.getState()})},a.getState=function(){if(!i)throw new Error("You need to wait for findResultsState to finish");return i},a.__forceRender=function(t,e){var r=e.getResults();if(null!==r){var n=r._state,s=e.getHelper();s.state=n,t.render({helper:s,results:r,scopedResults:e.getScopedResults(),parent:e,state:n,templatesConfig:{},createURL:e.createURL,instantSearchInstance:a,searchMetadata:{isSearchStalled:!1}})}},a.hydrate=function(t){t?(a._initialResults=t,a.start(),a.started=!1):e("The result of `findResultsState()` needs to be passed to `hydrate()`.")},a}(t,i);return{provide:function(){return{$_ais_ssrInstantSearchInstance:this.instantsearch}},data:function(){return{instantsearch:a}}}}export{i as createServerRootMixin};
|
|
1
|
+
import{createSSRApp as t}from"vue";import"./vue-compat/index-vue3.js";import{warn as e}from"./warn.js";import r from"instantsearch.js/es/index.js";import{waitForResults as n,getInitialResults as s}from"instantsearch.js/es/lib/server.js";function o(e,r){void 0===r&&(r={});var n=r.mixins;void 0===n&&(n=[]);var s,o={serverPrefetch:void 0,fetch:void 0,_base:void 0,name:"ais-ssr-root-component"},i=Object.assign({},e.$options,o);return i.mixins=n.concat(i.mixins||[]),s=t(i),e.$router&&s.use(e.$router),e.$store&&s.use(e.$store),e.$i18n&&s.use(e.$i18n),s.$slots=e.$slots,s.$root=e.$root,s}function i(t){void 0===t&&(t={});var i=t.$cloneComponent;void 0===i&&(i=o);var a=function(t,o){var i,a=r(t);return a.findResultsState=function(t){var e,r,u=t.component,c=t.renderToString;if(!c)throw new Error("findResultsState requires `renderToString: (component) => Promise<string>` in the first argument.");return Promise.resolve().then(function(){e=o(u,{mixins:[{beforeCreate:function(){var t=Object.getOwnPropertyDescriptor(u,"$nuxt"),e=!!t&&(t.writable||t.set);u.$nuxt&&e&&(this.$nuxt=u.$nuxt)},created:function(){(r=this.instantsearch).start(),r.started=!1}}]})}).then(function(){return c(e)}).then(function(){return n(r)}).then(function(t){return i=s(r.mainIndex,t),a.hydrate(i),a.getState()})},a.getState=function(){if(!i)throw new Error("You need to wait for findResultsState to finish");return i},a.__forceRender=function(t,e){var r=e.getResults();if(null!==r){var n=r._state,s=e.getHelper();s.state=n,t.render({helper:s,results:r,scopedResults:e.getScopedResults(),parent:e,state:n,templatesConfig:{},createURL:e.createURL,instantSearchInstance:a,searchMetadata:{isSearchStalled:!1}})}},a.hydrate=function(t){t?(a._initialResults=t,a.start(),a.started=!1):e("The result of `findResultsState()` needs to be passed to `hydrate()`.")},a}(t,i);return{provide:function(){return{$_ais_ssrInstantSearchInstance:this.instantsearch}},data:function(){return{instantsearch:a}}}}export{i as createServerRootMixin};
|
|
2
2
|
//# sourceMappingURL=createServerRootMixin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createServerRootMixin.js","sources":["../../../../src/util/createServerRootMixin.js"],"sourcesContent":["import instantsearch from 'instantsearch.js/es';\nimport {\n waitForResults,\n getInitialResults,\n} from 'instantsearch.js/es/lib/server';\n\nimport { isVue3, isVue2, Vue2, createSSRApp } from './vue-compat';\nimport { warn } from './warn';\n\nfunction defaultCloneComponent(componentInstance, { mixins = [] } = {}) {\n const options = {\n serverPrefetch: undefined,\n fetch: undefined,\n _base: undefined,\n name: 'ais-ssr-root-component',\n };\n\n let app;\n\n if (isVue3) {\n const appOptions = Object.assign({}, componentInstance.$options, options);\n appOptions.mixins = [...mixins, ...(appOptions.mixins || [])];\n app = createSSRApp(appOptions);\n if (componentInstance.$router) {\n app.use(componentInstance.$router);\n }\n if (componentInstance.$store) {\n app.use(componentInstance.$store);\n }\n if (componentInstance.$i18n) {\n app.use(componentInstance.$i18n);\n }\n } else {\n // copy over global Vue APIs\n options.router = componentInstance.$router;\n options.store = componentInstance.$store;\n options.i18n = componentInstance.$i18n;\n\n const Extended = componentInstance.$vnode\n ? componentInstance.$vnode.componentOptions.Ctor.extend(options)\n : Vue2.component(\n options.name,\n Object.assign({}, componentInstance.$options, options)\n );\n\n app = new Extended({\n propsData: componentInstance.$options.propsData,\n mixins: [...mixins],\n });\n }\n\n // https://stackoverflow.com/a/48195006/3185307\n app.$slots = componentInstance.$slots;\n app.$root = componentInstance.$root;\n if (isVue2) {\n app.$options.serverPrefetch = [];\n }\n\n return app;\n}\n\nfunction augmentInstantSearch(instantSearchOptions, cloneComponent) {\n const search = instantsearch(instantSearchOptions);\n\n let initialResults;\n\n /**\n * main API for SSR, called in serverPrefetch of a root component which contains instantsearch\n * @param {Object} props the object including `component` and `renderToString`\n * @param {Object} props.component the calling component's `this`\n * @param {Function} props.renderToString the function to render componentInstance to string\n * @returns {Promise} result of the search, to save for .hydrate\n */\n search.findResultsState = function ({ component, renderToString }) {\n if (!renderToString) {\n throw new Error(\n 'findResultsState requires `renderToString: (component) => Promise<string>` in the first argument.'\n );\n }\n\n let app;\n let instance;\n\n return Promise.resolve()\n .then(() => {\n app = cloneComponent(component, {\n mixins: [\n {\n beforeCreate() {\n const descriptor = Object.getOwnPropertyDescriptor(\n component,\n '$nuxt'\n );\n\n const isWritable = descriptor\n ? descriptor.writable || descriptor.set\n : false;\n\n if (component.$nuxt && isWritable) {\n // In case of Nuxt (3), we ensure the context is shared between\n // the real and cloned component\n this.$nuxt = component.$nuxt;\n }\n },\n created() {\n instance = this.instantsearch;\n\n instance.start();\n // although we use start for initializing the main index,\n // we don't want to send search requests yet\n instance.started = false;\n },\n },\n ],\n });\n })\n .then(() => renderToString(app))\n .then(() => waitForResults(instance))\n .then(() => {\n initialResults = getInitialResults(instance.mainIndex);\n search.hydrate(initialResults);\n return search.getState();\n });\n };\n\n /**\n * @returns {Promise} result state to serialize and enter into .hydrate\n */\n search.getState = function () {\n if (!initialResults) {\n throw new Error('You need to wait for findResultsState to finish');\n }\n return initialResults;\n };\n\n /**\n * make sure correct data is available in each widget's state.\n * called in widget mixin with (this.widget, this)\n *\n * @param {object} widget The widget instance\n * @param {object} parent The local parent index\n * @returns {void}\n */\n search.__forceRender = function (widget, parent) {\n const results = parent.getResults();\n\n // this happens when a different InstantSearch gets rendered initially,\n // after the hydrate finished. There's thus no initial results available.\n if (results === null) {\n return;\n }\n\n const state = results._state;\n\n const localHelper = parent.getHelper();\n // helper gets created in init, but that means it doesn't get the injected\n // parameters, because those are from the lastResults\n localHelper.state = state;\n\n widget.render({\n helper: localHelper,\n results,\n scopedResults: parent.getScopedResults(),\n parent,\n state,\n templatesConfig: {},\n createURL: parent.createURL,\n instantSearchInstance: search,\n searchMetadata: {\n isSearchStalled: false,\n },\n });\n };\n\n /**\n * Called both in server\n * @param {object} results a map of indexId: SearchResults\n * @returns {void}\n */\n search.hydrate = function (results) {\n if (!results) {\n warn(\n 'The result of `findResultsState()` needs to be passed to `hydrate()`.'\n );\n return;\n }\n\n search._initialResults = results;\n\n search.start();\n search.started = false;\n };\n return search;\n}\n\nexport function createServerRootMixin(instantSearchOptions = {}) {\n const { $cloneComponent = defaultCloneComponent } = instantSearchOptions;\n\n const search = augmentInstantSearch(instantSearchOptions, $cloneComponent);\n\n // put this in the user's root Vue instance\n // we can then reuse that InstantSearch instance seamlessly from `ais-instant-search-ssr`\n const rootMixin = {\n provide() {\n return {\n $_ais_ssrInstantSearchInstance: this.instantsearch,\n };\n },\n data() {\n return {\n // this is in data, so that the real & cloned render do not share\n // the same instantsearch instance.\n instantsearch: search,\n };\n },\n };\n\n return rootMixin;\n}\n"],"names":["defaultCloneComponent","componentInstance","const","app","options","serverPrefetch","undefined","fetch","_base","name","appOptions","Object","assign","$options","mixins","createSSRApp","$router","use","$store","$i18n","$slots","$root","createServerRootMixin","instantSearchOptions","search","cloneComponent","initialResults","instantsearch","findResultsState","instance","renderToString","Error","Promise","resolve","then","component","beforeCreate","descriptor","getOwnPropertyDescriptor","isWritable","writable","set","$nuxt","this","created","start","started","waitForResults","getInitialResults","mainIndex","hydrate","getState","__forceRender","widget","parent","results","getResults","state","_state","localHelper","getHelper","render","helper","scopedResults","getScopedResults","templatesConfig","createURL","instantSearchInstance","searchMetadata","isSearchStalled","_initialResults","warn","augmentInstantSearch","$cloneComponent","provide","$_ais_ssrInstantSearchInstance","data"],"mappings":"6OASA,SAASA,EAAsBC,oBAAqC,kCAAP,IAC3DC,IAOIC,EAPEC,EAAU,CACdC,oBAAgBC,EAChBC,WAAOD,EACPE,WAAOF,EACPG,KAAM,0BAMAC,EAAaC,OAAOC,OAAO,GAAIX,EAAkBY,SAAUT,GAsCnE,OArCEM,EAAWI,OAAaA,SAAYJ,EAAWI,QAAU,IACzDX,EAAMY,EAAaL,GACfT,EAAkBe,SACpBb,EAAIc,IAAIhB,EAAkBe,SAExBf,EAAkBiB,QACpBf,EAAIc,IAAIhB,EAAkBiB,QAExBjB,EAAkBkB,OACpBhB,EAAIc,IAAIhB,EAAkBkB,OAsB9BhB,EAAIiB,OAASnB,EAAkBmB,OAC/BjB,EAAIkB,MAAQpB,EAAkBoB,MAKvBlB,
|
|
1
|
+
{"version":3,"file":"createServerRootMixin.js","sources":["../../../../src/util/createServerRootMixin.js"],"sourcesContent":["import instantsearch from 'instantsearch.js/es';\nimport {\n waitForResults,\n getInitialResults,\n} from 'instantsearch.js/es/lib/server';\n\nimport { isVue3, isVue2, Vue2, createSSRApp } from './vue-compat';\nimport { warn } from './warn';\n\nfunction defaultCloneComponent(componentInstance, { mixins = [] } = {}) {\n const options = {\n serverPrefetch: undefined,\n fetch: undefined,\n _base: undefined,\n name: 'ais-ssr-root-component',\n };\n\n let app;\n\n if (isVue3) {\n const appOptions = Object.assign({}, componentInstance.$options, options);\n appOptions.mixins = [...mixins, ...(appOptions.mixins || [])];\n app = createSSRApp(appOptions);\n if (componentInstance.$router) {\n app.use(componentInstance.$router);\n }\n if (componentInstance.$store) {\n app.use(componentInstance.$store);\n }\n if (componentInstance.$i18n) {\n app.use(componentInstance.$i18n);\n }\n } else {\n // copy over global Vue APIs\n options.router = componentInstance.$router;\n options.store = componentInstance.$store;\n options.i18n = componentInstance.$i18n;\n\n const Extended = componentInstance.$vnode\n ? componentInstance.$vnode.componentOptions.Ctor.extend(options)\n : Vue2.component(\n options.name,\n Object.assign({}, componentInstance.$options, options)\n );\n\n app = new Extended({\n propsData: componentInstance.$options.propsData,\n mixins: [...mixins],\n });\n }\n\n // https://stackoverflow.com/a/48195006/3185307\n app.$slots = componentInstance.$slots;\n app.$root = componentInstance.$root;\n if (isVue2) {\n app.$options.serverPrefetch = [];\n }\n\n return app;\n}\n\nfunction augmentInstantSearch(instantSearchOptions, cloneComponent) {\n const search = instantsearch(instantSearchOptions);\n\n let initialResults;\n\n /**\n * main API for SSR, called in serverPrefetch of a root component which contains instantsearch\n * @param {Object} props the object including `component` and `renderToString`\n * @param {Object} props.component the calling component's `this`\n * @param {Function} props.renderToString the function to render componentInstance to string\n * @returns {Promise} result of the search, to save for .hydrate\n */\n search.findResultsState = function ({ component, renderToString }) {\n if (!renderToString) {\n throw new Error(\n 'findResultsState requires `renderToString: (component) => Promise<string>` in the first argument.'\n );\n }\n\n let app;\n let instance;\n\n return Promise.resolve()\n .then(() => {\n app = cloneComponent(component, {\n mixins: [\n {\n beforeCreate() {\n const descriptor = Object.getOwnPropertyDescriptor(\n component,\n '$nuxt'\n );\n\n const isWritable = descriptor\n ? descriptor.writable || descriptor.set\n : false;\n\n if (component.$nuxt && isWritable) {\n // In case of Nuxt (3), we ensure the context is shared between\n // the real and cloned component\n this.$nuxt = component.$nuxt;\n }\n },\n created() {\n instance = this.instantsearch;\n\n instance.start();\n // although we use start for initializing the main index,\n // we don't want to send search requests yet\n instance.started = false;\n },\n },\n ],\n });\n })\n .then(() => renderToString(app))\n .then(() => waitForResults(instance))\n .then((requestParamsList) => {\n initialResults = getInitialResults(\n instance.mainIndex,\n requestParamsList\n );\n search.hydrate(initialResults);\n return search.getState();\n });\n };\n\n /**\n * @returns {Promise} result state to serialize and enter into .hydrate\n */\n search.getState = function () {\n if (!initialResults) {\n throw new Error('You need to wait for findResultsState to finish');\n }\n return initialResults;\n };\n\n /**\n * make sure correct data is available in each widget's state.\n * called in widget mixin with (this.widget, this)\n *\n * @param {object} widget The widget instance\n * @param {object} parent The local parent index\n * @returns {void}\n */\n search.__forceRender = function (widget, parent) {\n const results = parent.getResults();\n\n // this happens when a different InstantSearch gets rendered initially,\n // after the hydrate finished. There's thus no initial results available.\n if (results === null) {\n return;\n }\n\n const state = results._state;\n\n const localHelper = parent.getHelper();\n // helper gets created in init, but that means it doesn't get the injected\n // parameters, because those are from the lastResults\n localHelper.state = state;\n\n widget.render({\n helper: localHelper,\n results,\n scopedResults: parent.getScopedResults(),\n parent,\n state,\n templatesConfig: {},\n createURL: parent.createURL,\n instantSearchInstance: search,\n searchMetadata: {\n isSearchStalled: false,\n },\n });\n };\n\n /**\n * Called both in server\n * @param {object} results a map of indexId: SearchResults\n * @returns {void}\n */\n search.hydrate = function (results) {\n if (!results) {\n warn(\n 'The result of `findResultsState()` needs to be passed to `hydrate()`.'\n );\n return;\n }\n\n search._initialResults = results;\n\n search.start();\n search.started = false;\n };\n return search;\n}\n\nexport function createServerRootMixin(instantSearchOptions = {}) {\n const { $cloneComponent = defaultCloneComponent } = instantSearchOptions;\n\n const search = augmentInstantSearch(instantSearchOptions, $cloneComponent);\n\n // put this in the user's root Vue instance\n // we can then reuse that InstantSearch instance seamlessly from `ais-instant-search-ssr`\n const rootMixin = {\n provide() {\n return {\n $_ais_ssrInstantSearchInstance: this.instantsearch,\n };\n },\n data() {\n return {\n // this is in data, so that the real & cloned render do not share\n // the same instantsearch instance.\n instantsearch: search,\n };\n },\n };\n\n return rootMixin;\n}\n"],"names":["defaultCloneComponent","componentInstance","const","app","options","serverPrefetch","undefined","fetch","_base","name","appOptions","Object","assign","$options","mixins","createSSRApp","$router","use","$store","$i18n","$slots","$root","createServerRootMixin","instantSearchOptions","search","cloneComponent","initialResults","instantsearch","findResultsState","instance","renderToString","Error","Promise","resolve","then","component","beforeCreate","descriptor","getOwnPropertyDescriptor","isWritable","writable","set","$nuxt","this","created","start","started","waitForResults","requestParamsList","getInitialResults","mainIndex","hydrate","getState","__forceRender","widget","parent","results","getResults","state","_state","localHelper","getHelper","render","helper","scopedResults","getScopedResults","templatesConfig","createURL","instantSearchInstance","searchMetadata","isSearchStalled","_initialResults","warn","augmentInstantSearch","$cloneComponent","provide","$_ais_ssrInstantSearchInstance","data"],"mappings":"6OASA,SAASA,EAAsBC,oBAAqC,kCAAP,IAC3DC,IAOIC,EAPEC,EAAU,CACdC,oBAAgBC,EAChBC,WAAOD,EACPE,WAAOF,EACPG,KAAM,0BAMAC,EAAaC,OAAOC,OAAO,GAAIX,EAAkBY,SAAUT,GAsCnE,OArCEM,EAAWI,OAAaA,SAAYJ,EAAWI,QAAU,IACzDX,EAAMY,EAAaL,GACfT,EAAkBe,SACpBb,EAAIc,IAAIhB,EAAkBe,SAExBf,EAAkBiB,QACpBf,EAAIc,IAAIhB,EAAkBiB,QAExBjB,EAAkBkB,OACpBhB,EAAIc,IAAIhB,EAAkBkB,OAsB9BhB,EAAIiB,OAASnB,EAAkBmB,OAC/BjB,EAAIkB,MAAQpB,EAAkBoB,MAKvBlB,EA4IF,SAASmB,EAAsBC,kBAAuB,2CACjCvB,GAE1BE,IAAMsB,EA5IR,SAA8BD,EAAsBE,GAClDvB,IAEIwB,EAFEF,EAASG,EAAcJ,GAqI7B,OA1HAC,EAAOI,iBAAmB,gBAOpBzB,EACA0B,mCAPJ,IAAKC,EACH,MAAM,IAAIC,MACR,qGAOJ,OAAOC,QAAQC,UACZC,gBACC/B,EAAMsB,EAAeU,EAAW,CAC9BrB,OAAQ,CACN,CACEsB,wBACElC,IAAMmC,EAAa1B,OAAO2B,yBACxBH,EACA,SAGII,IAAaF,IACfA,EAAWG,UAAYH,EAAWI,KAGlCN,EAAUO,OAASH,IAGrBI,KAAKD,MAAQP,EAAUO,QAG3BE,oBACEf,EAAWc,KAAKhB,eAEPkB,QAGThB,EAASiB,SAAU,SAM5BZ,uBAAWJ,EAAe3B,KAC1B+B,uBAAWa,EAAelB,KAC1BK,cAAMc,GAML,OALAtB,EAAiBuB,EACfpB,EAASqB,UACTF,GAEFxB,EAAO2B,QAAQzB,GACRF,EAAO4B,cAOpB5B,EAAO4B,SAAW,WAChB,IAAK1B,EACH,MAAM,IAAIK,MAAM,mDAElB,OAAOL,GAWTF,EAAO6B,cAAgB,SAAUC,EAAQC,GACvCrD,IAAMsD,EAAUD,EAAOE,aAIvB,GAAgB,OAAZD,EAAJ,CAIAtD,IAAMwD,EAAQF,EAAQG,OAEhBC,EAAcL,EAAOM,YAG3BD,EAAYF,MAAQA,EAEpBJ,EAAOQ,OAAO,CACZC,OAAQH,UACRJ,EACAQ,cAAeT,EAAOU,0BACtBV,QACAG,EACAQ,gBAAiB,GACjBC,UAAWZ,EAAOY,UAClBC,sBAAuB5C,EACvB6C,eAAgB,CACdC,iBAAiB,OAUvB9C,EAAO2B,QAAU,SAAUK,GACpBA,GAOLhC,EAAO+C,gBAAkBf,EAEzBhC,EAAOqB,QACPrB,EAAOsB,SAAU,GATf0B,EACE,0EAUChD,EAMQiD,CAAqBlD,EAAsBmD,GAmB1D,MAfkB,CAChBC,mBACE,MAAO,CACLC,+BAAgCjC,KAAKhB,gBAGzCkD,gBACE,MAAO,CAGLlD,cAAeH"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{h as e}from"vue";import*as t from"vue";export{t as Vue};export{createApp,createSSRApp,h,nextTick,version}from"vue";var o=!1,r=!0;function n(t){function o(t,o,r){if("object"==typeof o&&(o.attrs||o.props||o.scopedSlots||o.on)){var n=Object.keys(o.on||{}),s=Object.assign({},o,o.attrs,o.props,n.reduce(function(e,t){return e["on"+t[0].toUpperCase()+t.slice(1)]=o.on[t],e},{}));return delete s.attrs,delete s.props,delete s.scopedSlots,n.forEach(function(e){return delete s.on[e]}),e(t,s,o.scopedSlots?Object.assign({default:function(){return r}},o.scopedSlots):r)}return e(t,o,r)}return function(){return t.call(this,o)}}function s(e){
|
|
1
|
+
import{h as e}from"vue";import*as t from"vue";export{t as Vue};export{createApp,createSSRApp,h,nextTick,version}from"vue";var o=!1,r=!0;function n(t){function o(t,o,r){if("object"==typeof o&&(o.attrs||o.props||o.scopedSlots||o.on)){var n=Object.keys(o.on||{}),s=Object.assign({},o,o.attrs,o.props,n.reduce(function(e,t){return e["on"+t[0].toUpperCase()+t.slice(1)]=o.on[t],e},{}));return delete s.attrs,delete s.props,delete s.scopedSlots,n.forEach(function(e){return delete s.on[e]}),e(t,s,o.scopedSlots?Object.assign({default:function(){return r}},o.scopedSlots):r)}return e(t,o,r)}return function(){return t.call(this,o)}}function s(e){var t=e.$slots||e.slots;return"function"==typeof t.default?t.default():t.default}export{s as getDefaultSlot,o as isVue2,r as isVue3,n as renderCompat};
|
|
2
2
|
//# sourceMappingURL=index-vue3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-vue3.js","sources":["../../../../../src/util/vue-compat/index-vue3.js"],"sourcesContent":["import * as Vue from 'vue';\n\nconst isVue2 = false;\nconst isVue3 = true;\nconst Vue2 = undefined;\n\nexport { createApp, createSSRApp, h, version, nextTick } from 'vue';\nexport { Vue, Vue2, isVue2, isVue3 };\n\nexport function renderCompat(fn) {\n function h(tag, props, children) {\n if (\n typeof props === 'object' &&\n (props.attrs || props.props || props.scopedSlots || props.on)\n ) {\n // In vue 3, we no longer wrap with `attrs` or `props` key.\n const onPropKeys = Object.keys(props.on || {});\n const flatProps = Object.assign(\n {},\n props,\n props.attrs,\n props.props,\n onPropKeys.reduce((acc, key) => {\n // eslint-disable-next-line no-param-reassign\n acc[`on${key[0].toUpperCase()}${key.slice(1)}`] = props.on[key];\n return acc;\n }, {})\n );\n delete flatProps.attrs;\n delete flatProps.props;\n delete flatProps.scopedSlots;\n onPropKeys.forEach((key) => delete flatProps.on[key]);\n\n return Vue.h(\n tag,\n flatProps,\n props.scopedSlots\n ? Object.assign({ default: () => children }, props.scopedSlots)\n : children\n );\n }\n\n return Vue.h(tag, props, children);\n }\n\n return function () {\n return fn.call(this, h);\n };\n}\n\nexport function getDefaultSlot(component) {\n
|
|
1
|
+
{"version":3,"file":"index-vue3.js","sources":["../../../../../src/util/vue-compat/index-vue3.js"],"sourcesContent":["import * as Vue from 'vue';\n\nconst isVue2 = false;\nconst isVue3 = true;\nconst Vue2 = undefined;\n\nexport { createApp, createSSRApp, h, version, nextTick } from 'vue';\nexport { Vue, Vue2, isVue2, isVue3 };\n\nexport function renderCompat(fn) {\n function h(tag, props, children) {\n if (\n typeof props === 'object' &&\n (props.attrs || props.props || props.scopedSlots || props.on)\n ) {\n // In vue 3, we no longer wrap with `attrs` or `props` key.\n const onPropKeys = Object.keys(props.on || {});\n const flatProps = Object.assign(\n {},\n props,\n props.attrs,\n props.props,\n onPropKeys.reduce((acc, key) => {\n // eslint-disable-next-line no-param-reassign\n acc[`on${key[0].toUpperCase()}${key.slice(1)}`] = props.on[key];\n return acc;\n }, {})\n );\n delete flatProps.attrs;\n delete flatProps.props;\n delete flatProps.scopedSlots;\n onPropKeys.forEach((key) => delete flatProps.on[key]);\n\n return Vue.h(\n tag,\n flatProps,\n props.scopedSlots\n ? Object.assign({ default: () => children }, props.scopedSlots)\n : children\n );\n }\n\n return Vue.h(tag, props, children);\n }\n\n return function () {\n return fn.call(this, h);\n };\n}\n\nexport function getDefaultSlot(component) {\n const $slots = component.$slots || component.slots;\n\n if (typeof $slots.default === 'function') {\n // Vue 3\n return $slots.default();\n }\n\n // Vue 3 with @vue/compat\n return $slots.default;\n}\n"],"names":["isVue2","isVue3","renderCompat","fn","h","tag","props","children","attrs","scopedSlots","on","const","onPropKeys","Object","keys","flatProps","assign","reduce","acc","key","toUpperCase","slice","forEach","Vue","default","call","this","getDefaultSlot","component","$slots","slots"],"mappings":"8HAEMA,GAAS,EACTC,GAAS,EAMR,SAASC,EAAaC,GAC3B,SAASC,EAAEC,EAAKC,EAAOC,GACrB,GACmB,iBAAVD,IACNA,EAAME,OAASF,EAAMA,OAASA,EAAMG,aAAeH,EAAMI,IAC1D,CAEAC,IAAMC,EAAaC,OAAOC,KAAKR,EAAMI,IAAM,IACrCK,EAAYF,OAAOG,OACvB,GACAV,EACAA,EAAME,MACNF,EAAMA,MACNM,EAAWK,gBAAQC,EAAKC,GAGtB,OADAD,OAASC,EAAI,GAAGC,cAAgBD,EAAIE,MAAM,IAAQf,EAAMI,GAAGS,GACpDD,GACN,KAOL,cALOH,EAAUP,aACVO,EAAUT,aACVS,EAAUN,YACjBG,EAAWU,iBAASH,iBAAeJ,EAAUL,GAAGS,KAEzCI,EACLlB,EACAU,EACAT,EAAMG,YACFI,OAAOG,OAAO,CAAEQ,0BAAejB,IAAYD,EAAMG,aACjDF,GAIR,OAAOgB,EAAMlB,EAAKC,EAAOC,GAG3B,OAAO,WACL,OAAOJ,EAAGsB,KAAKC,KAAMtB,IAIlB,SAASuB,EAAeC,GAC7BjB,IAAMkB,EAASD,EAAUC,QAAUD,EAAUE,MAE7C,MAA8B,mBAAnBD,EAAOL,QAETK,EAAOL,UAITK,EAAOL"}
|