vue-instantsearch 4.19.13 → 4.20.1
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 +5 -5
- package/src/components/InstantSearch.js +6 -1
- package/src/util/createInstantSearchComponent.js +5 -0
- 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/InstantSearch.js +1 -1
- package/vue2/es/src/components/InstantSearch.js.map +1 -1
- package/vue2/es/src/util/createInstantSearchComponent.js +1 -1
- package/vue2/es/src/util/createInstantSearchComponent.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/InstantSearch.js +1 -1
- package/vue3/es/src/components/InstantSearch.js.map +1 -1
- package/vue3/es/src/util/createInstantSearchComponent.js +1 -1
- package/vue3/es/src/util/createInstantSearchComponent.js.map +1 -1
- package/vue3/umd/index.js +1 -1
- package/vue3/umd/index.js.map +1 -1
package/vue3/es/package.json.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var r="4.
|
|
1
|
+
var r="4.20.1";export{r as version};
|
|
2
2
|
//# sourceMappingURL=package.json.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{renderCompat as t,getDefaultSlot as e}from"../util/vue-compat/index-vue3.js";import{warn as i}from"../util/warn.js";import n from"instantsearch.js/es/index.js";import{createInstantSearchComponent as a}from"../util/createInstantSearchComponent.js";var r="Vue InstantSearch: You used the prop api-key or app-id.\nThese have been replaced by search-client.\n\nSee more info here: https://www.algolia.com/doc/api-reference/widgets/instantsearch/vue/#widget-param-search-client";export default a({name:"AisInstantSearch",props:{searchClient:{type:Object,required:!0},insightsClient:{type:Function,default:void 0},indexName:{type:String,required:!
|
|
1
|
+
import{renderCompat as t,getDefaultSlot as e}from"../util/vue-compat/index-vue3.js";import{warn as i}from"../util/warn.js";import n from"instantsearch.js/es/index.js";import{createInstantSearchComponent as a}from"../util/createInstantSearchComponent.js";var r="Vue InstantSearch: You used the prop api-key or app-id.\nThese have been replaced by search-client.\n\nSee more info here: https://www.algolia.com/doc/api-reference/widgets/instantsearch/vue/#widget-param-search-client";export default a({name:"AisInstantSearch",props:{searchClient:{type:Object,required:!0},insightsClient:{type:Function,default:void 0},indexName:{type:String,required:!1},compositionID:{type:String,required:!1},routing:{default:void 0,validator:function(t){return!("boolean"==typeof t||!t.router&&!t.stateMapping)||(i("The `routing` option expects an object with `router` and/or `stateMapping`.\n\nSee https://www.algolia.com/doc/api-reference/widgets/instantsearch/vue/#widget-param-routing"),!1)}},insights:{default:void 0,validator:function(t){return void 0===t||"boolean"==typeof t||"object"==typeof t}},stalledSearchDelay:{type:Number,default:void 0},searchFunction:{type:Function,default:void 0},onStateChange:{type:Function,default:void 0},initialUiState:{type:Object,default:void 0},apiKey:{type:String,default:void 0,validator:function(t){return t&&i(r),!1}},appId:{type:String,default:void 0,validator:function(t){return t&&i(r),!1}},middlewares:{type:Array,default:null},future:{type:Object,default:void 0}},data:function(){return{instantSearchInstance:n({searchClient:this.searchClient,insightsClient:this.insightsClient,insights:this.insights,indexName:this.indexName,compositionID:this.compositionID,routing:this.routing,stalledSearchDelay:this.stalledSearchDelay,searchFunction:this.searchFunction,onStateChange:this.onStateChange,initialUiState:this.initialUiState,future:this.future})}},render:t(function(t){var i;return t("div",{class:(i={},i[this.suit()]=!0,i[this.suit("","ssr")]=!1,i)},e(this))})});
|
|
2
2
|
//# sourceMappingURL=InstantSearch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InstantSearch.js","sources":["../../../../src/components/InstantSearch.js"],"sourcesContent":["import instantsearch from 'instantsearch.js/es';\n\nimport { createInstantSearchComponent } from '../util/createInstantSearchComponent';\nimport { renderCompat, getDefaultSlot } from '../util/vue-compat';\nimport { warn } from '../util/warn';\n\nconst oldApiWarning = `Vue InstantSearch: You used the prop api-key or app-id.\nThese have been replaced by search-client.\n\nSee more info here: https://www.algolia.com/doc/api-reference/widgets/instantsearch/vue/#widget-param-search-client`;\n\nexport default createInstantSearchComponent({\n name: 'AisInstantSearch',\n props: {\n searchClient: {\n type: Object,\n required: true,\n },\n insightsClient: {\n type: Function,\n default: undefined,\n },\n indexName: {\n type: String,\n required:
|
|
1
|
+
{"version":3,"file":"InstantSearch.js","sources":["../../../../src/components/InstantSearch.js"],"sourcesContent":["import instantsearch from 'instantsearch.js/es';\n\nimport { createInstantSearchComponent } from '../util/createInstantSearchComponent';\nimport { renderCompat, getDefaultSlot } from '../util/vue-compat';\nimport { warn } from '../util/warn';\n\nconst oldApiWarning = `Vue InstantSearch: You used the prop api-key or app-id.\nThese have been replaced by search-client.\n\nSee more info here: https://www.algolia.com/doc/api-reference/widgets/instantsearch/vue/#widget-param-search-client`;\n\nexport default createInstantSearchComponent({\n name: 'AisInstantSearch',\n props: {\n searchClient: {\n type: Object,\n required: true,\n },\n insightsClient: {\n type: Function,\n default: undefined,\n },\n indexName: {\n type: String,\n required: false,\n },\n compositionID: {\n type: String,\n required: false,\n },\n routing: {\n default: undefined,\n validator(value) {\n if (\n typeof value === 'boolean' ||\n (!value.router && !value.stateMapping)\n ) {\n warn(\n 'The `routing` option expects an object with `router` and/or `stateMapping`.\\n\\nSee https://www.algolia.com/doc/api-reference/widgets/instantsearch/vue/#widget-param-routing'\n );\n return false;\n }\n return true;\n },\n },\n insights: {\n default: undefined,\n validator(value) {\n return (\n typeof value === 'undefined' ||\n typeof value === 'boolean' ||\n typeof value === 'object'\n );\n },\n },\n stalledSearchDelay: {\n type: Number,\n default: undefined,\n },\n searchFunction: {\n type: Function,\n default: undefined,\n },\n onStateChange: {\n type: Function,\n default: undefined,\n },\n initialUiState: {\n type: Object,\n default: undefined,\n },\n apiKey: {\n type: String,\n default: undefined,\n validator(value) {\n if (value) {\n warn(oldApiWarning);\n }\n return false;\n },\n },\n appId: {\n type: String,\n default: undefined,\n validator(value) {\n if (value) {\n warn(oldApiWarning);\n }\n return false;\n },\n },\n middlewares: {\n type: Array,\n default: null,\n },\n future: {\n type: Object,\n default: undefined,\n },\n },\n data() {\n return {\n instantSearchInstance: instantsearch({\n searchClient: this.searchClient,\n insightsClient: this.insightsClient,\n insights: this.insights,\n indexName: this.indexName,\n compositionID: this.compositionID,\n routing: this.routing,\n stalledSearchDelay: this.stalledSearchDelay,\n searchFunction: this.searchFunction,\n onStateChange: this.onStateChange,\n initialUiState: this.initialUiState,\n future: this.future,\n }),\n };\n },\n render: renderCompat(function (h) {\n return h(\n 'div',\n {\n class: {\n [this.suit()]: true,\n [this.suit('', 'ssr')]: false,\n },\n },\n getDefaultSlot(this)\n );\n }),\n});\n"],"names":["const","oldApiWarning","createInstantSearchComponent","name","props","searchClient","type","Object","required","insightsClient","Function","default","undefined","indexName","String","compositionID","routing","validator","value","router","stateMapping","warn","insights","stalledSearchDelay","Number","searchFunction","onStateChange","initialUiState","apiKey","appId","middlewares","Array","future","data","instantSearchInstance","instantsearch","this","render","renderCompat","h","class","suit","getDefaultSlot"],"mappings":"8PAMAA,IAAMC,EAAgB,4OAKPC,EAA6B,CAC1CC,KAAM,mBACNC,MAAO,CACLC,aAAc,CACZC,KAAMC,OACNC,UAAU,GAEZC,eAAgB,CACdH,KAAMI,SACNC,aAASC,GAEXC,UAAW,CACTP,KAAMQ,OACNN,UAAU,GAEZO,cAAe,CACbT,KAAMQ,OACNN,UAAU,GAEZQ,QAAS,CACPL,aAASC,EACTK,mBAAUC,GACR,QACmB,kBAAVA,IACLA,EAAMC,SAAWD,EAAME,gBAEzBC,EACE,iLAEK,KAKbC,SAAU,CACRX,aAASC,EACTK,mBAAUC,GACR,YACmB,IAAVA,GACU,kBAAVA,GACU,iBAAVA,IAIbK,mBAAoB,CAClBjB,KAAMkB,OACNb,aAASC,GAEXa,eAAgB,CACdnB,KAAMI,SACNC,aAASC,GAEXc,cAAe,CACbpB,KAAMI,SACNC,aAASC,GAEXe,eAAgB,CACdrB,KAAMC,OACNI,aAASC,GAEXgB,OAAQ,CACNtB,KAAMQ,OACNH,aAASC,EACTK,mBAAUC,GAIR,OAHIA,GACFG,EAAKpB,IAEA,IAGX4B,MAAO,CACLvB,KAAMQ,OACNH,aAASC,EACTK,mBAAUC,GAIR,OAHIA,GACFG,EAAKpB,IAEA,IAGX6B,YAAa,CACXxB,KAAMyB,MACNpB,QAAS,MAEXqB,OAAQ,CACN1B,KAAMC,OACNI,aAASC,IAGbqB,gBACE,MAAO,CACLC,sBAAuBC,EAAc,CACnC9B,aAAc+B,KAAK/B,aACnBI,eAAgB2B,KAAK3B,eACrBa,SAAUc,KAAKd,SACfT,UAAWuB,KAAKvB,UAChBE,cAAeqB,KAAKrB,cACpBC,QAASoB,KAAKpB,QACdO,mBAAoBa,KAAKb,mBACzBE,eAAgBW,KAAKX,eACrBC,cAAeU,KAAKV,cACpBC,eAAgBS,KAAKT,eACrBK,OAAQI,KAAKJ,WAInBK,OAAQC,EAAa,SAAUC,SAC7B,OAAOA,EACL,MACA,CACEC,SAAO,KACJJ,KAAKK,SAAS,IACdL,KAAKK,KAAK,GAAI,SAAS,MAG5BC,EAAeN"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createSuitMixin as n}from"../mixins/suit.js";import{_objectSpread as t}from"./polyfills.js";import{version as e}from"vue";import"./vue-compat/index-vue3.js";import{warn as a}from"./warn.js";import{INSTANTSEARCH_FUTURE_DEFAULTS as i}from"instantsearch.js/es/lib/InstantSearch.js";import{version as s}from"../../package.json.js";var r=function(r){var c;return t(((c={mixins:[n({name:"InstantSearch"})],provide:function(){return{$_ais_instantSearchInstance:this.instantSearchInstance}},watch:{searchClient:function(n){a(!1),this.instantSearchInstance.helper.setClient(n).search()},indexName:function(n){this.instantSearchInstance.helper.setIndex(n||"").search()},stalledSearchDelay:function(n){this.instantSearchInstance._stalledSearchDelay=n},routing:function(){throw new Error("routing configuration can not be changed dynamically at this point.\n\nPlease open a new issue: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage%2cLibrary%3A+Vue+InstantSearch&title=Feature%20request%3A%20dynamic%20props")},onStateChange:function(){throw new Error("onStateChange configuration can not be changed dynamically at this point.\n\nPlease open a new issue: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage%2cLibrary%3A+Vue+InstantSearch&title=Feature%20request%3A%20dynamic%20props")},searchFunction:function(n){this.instantSearchInstance._searchFunction=n},middlewares:{immediate:!0,handler:function(n,t){var e=this;(t||[]).filter(function(t){return-1===(n||[]).indexOf(t)}).forEach(function(n){e.instantSearchInstance.unuse(n)}),(n||[]).filter(function(n){return-1===(t||[]).indexOf(n)}).forEach(function(n){e.instantSearchInstance.use(n)})}},future:function(n){this.instantSearchInstance.future=Object.assign(i,n)}},created:function(){var n=this.instantSearchInstance.client;"function"==typeof n.addAlgoliaAgent&&(n.addAlgoliaAgent("Vue ("+e+")"),n.addAlgoliaAgent("Vue InstantSearch ("+s+")"))},mounted:function(){var n=this;this.$nextTick(function(){n.instantSearchInstance.started||n.instantSearchInstance.start()})}}).beforeUnmount=function(){this.instantSearchInstance.started&&this.instantSearchInstance.dispose(),this.instantSearchInstance.__initialSearchResults=void 0},c),r)};export{r as createInstantSearchComponent};
|
|
1
|
+
import{createSuitMixin as n}from"../mixins/suit.js";import{_objectSpread as t}from"./polyfills.js";import{version as e}from"vue";import"./vue-compat/index-vue3.js";import{warn as a}from"./warn.js";import{INSTANTSEARCH_FUTURE_DEFAULTS as i}from"instantsearch.js/es/lib/InstantSearch.js";import{version as s}from"../../package.json.js";var r=function(r){var c;return t(((c={mixins:[n({name:"InstantSearch"})],provide:function(){return{$_ais_instantSearchInstance:this.instantSearchInstance}},watch:{searchClient:function(n){a(!1),this.instantSearchInstance.helper.setClient(n).search()},indexName:function(n){this.instantSearchInstance.helper.setIndex(n||"").search()},compositionID:function(n){this.instantSearchInstance.helper.setIndex(n||"").search()},stalledSearchDelay:function(n){this.instantSearchInstance._stalledSearchDelay=n},routing:function(){throw new Error("routing configuration can not be changed dynamically at this point.\n\nPlease open a new issue: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage%2cLibrary%3A+Vue+InstantSearch&title=Feature%20request%3A%20dynamic%20props")},onStateChange:function(){throw new Error("onStateChange configuration can not be changed dynamically at this point.\n\nPlease open a new issue: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage%2cLibrary%3A+Vue+InstantSearch&title=Feature%20request%3A%20dynamic%20props")},searchFunction:function(n){this.instantSearchInstance._searchFunction=n},middlewares:{immediate:!0,handler:function(n,t){var e=this;(t||[]).filter(function(t){return-1===(n||[]).indexOf(t)}).forEach(function(n){e.instantSearchInstance.unuse(n)}),(n||[]).filter(function(n){return-1===(t||[]).indexOf(n)}).forEach(function(n){e.instantSearchInstance.use(n)})}},future:function(n){this.instantSearchInstance.future=Object.assign(i,n)}},created:function(){var n=this.instantSearchInstance.client;"function"==typeof n.addAlgoliaAgent&&(n.addAlgoliaAgent("Vue ("+e+")"),n.addAlgoliaAgent("Vue InstantSearch ("+s+")"))},mounted:function(){var n=this;this.$nextTick(function(){n.instantSearchInstance.started||n.instantSearchInstance.start()})}}).beforeUnmount=function(){this.instantSearchInstance.started&&this.instantSearchInstance.dispose(),this.instantSearchInstance.__initialSearchResults=void 0},c),r)};export{r as createInstantSearchComponent};
|
|
2
2
|
//# sourceMappingURL=createInstantSearchComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createInstantSearchComponent.js","sources":["../../../../src/util/createInstantSearchComponent.js"],"sourcesContent":["import { INSTANTSEARCH_FUTURE_DEFAULTS } from 'instantsearch.js/es/lib/InstantSearch';\n\nimport { version } from '../../package.json'; // rollup does pick only what needed from json\nimport { createSuitMixin } from '../mixins/suit';\n\nimport { _objectSpread } from './polyfills';\nimport { isVue3, version as vueVersion } from './vue-compat';\nimport { warn } from './warn';\n\nexport const createInstantSearchComponent = (component) =>\n _objectSpread(\n {\n mixins: [createSuitMixin({ name: 'InstantSearch' })],\n provide() {\n return {\n $_ais_instantSearchInstance: this.instantSearchInstance,\n };\n },\n watch: {\n searchClient(searchClient) {\n warn(\n false,\n 'The `search-client` prop of `<ais-instant-search>` changed between renders, which may cause more search requests than necessary. If this is an unwanted behavior, please provide a stable reference: https://www.algolia.com/doc/api-reference/widgets/instantsearch/vue/#widget-param-search-client'\n );\n\n this.instantSearchInstance.helper.setClient(searchClient).search();\n },\n indexName(indexName) {\n this.instantSearchInstance.helper.setIndex(indexName || '').search();\n },\n stalledSearchDelay(stalledSearchDelay) {\n // private InstantSearch.js API:\n this.instantSearchInstance._stalledSearchDelay = stalledSearchDelay;\n },\n routing() {\n throw new Error(\n 'routing configuration can not be changed dynamically at this point.' +\n '\\n\\n' +\n 'Please open a new issue: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage%2cLibrary%3A+Vue+InstantSearch&title=Feature%20request%3A%20dynamic%20props'\n );\n },\n onStateChange() {\n throw new Error(\n 'onStateChange configuration can not be changed dynamically at this point.' +\n '\\n\\n' +\n 'Please open a new issue: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage%2cLibrary%3A+Vue+InstantSearch&title=Feature%20request%3A%20dynamic%20props'\n );\n },\n searchFunction(searchFunction) {\n // private InstantSearch.js API:\n this.instantSearchInstance._searchFunction = searchFunction;\n },\n middlewares: {\n immediate: true,\n handler(next, prev) {\n (prev || [])\n .filter((middleware) => (next || []).indexOf(middleware) === -1)\n .forEach((middlewareToRemove) => {\n this.instantSearchInstance.unuse(middlewareToRemove);\n });\n\n (next || [])\n .filter((middleware) => (prev || []).indexOf(middleware) === -1)\n .forEach((middlewareToAdd) => {\n this.instantSearchInstance.use(middlewareToAdd);\n });\n },\n },\n future(future) {\n this.instantSearchInstance.future = Object.assign(\n INSTANTSEARCH_FUTURE_DEFAULTS,\n future\n );\n },\n },\n created() {\n const searchClient = this.instantSearchInstance.client;\n if (typeof searchClient.addAlgoliaAgent === 'function') {\n searchClient.addAlgoliaAgent(`Vue (${vueVersion})`);\n searchClient.addAlgoliaAgent(`Vue InstantSearch (${version})`);\n }\n },\n mounted() {\n // from the documentation: https://vuejs.org/v2/api/#mounted\n // \"Note that mounted does not guarantee that all child components have also been mounted. If you want to\n // wait until the entire view has been rendered, you can use vm.$nextTick inside of mounted\"\n this.$nextTick(() => {\n if (!this.instantSearchInstance.started) {\n this.instantSearchInstance.start();\n }\n });\n },\n [isVue3 ? 'beforeUnmount' : 'beforeDestroy']() {\n if (this.instantSearchInstance.started) {\n this.instantSearchInstance.dispose();\n }\n\n // a hydrated instance will no longer be hydrated once disposed, and starts from scratch\n this.instantSearchInstance.__initialSearchResults = undefined;\n },\n },\n component\n );\n"],"names":["createInstantSearchComponent","component","_objectSpread","mixins","createSuitMixin","name","provide","$_ais_instantSearchInstance","this","instantSearchInstance","watch","searchClient","warn","helper","setClient","search","indexName","setIndex","stalledSearchDelay","_stalledSearchDelay","routing","Error","onStateChange","searchFunction","_searchFunction","middlewares","immediate","handler","next","prev","filter","middleware","indexOf","forEach","middlewareToRemove","unuse","middlewareToAdd","use","future","Object","assign","INSTANTSEARCH_FUTURE_DEFAULTS","created","const","client","addAlgoliaAgent","vueVersion","version","mounted","$nextTick","started","start","dispose","__initialSearchResults","undefined"],"mappings":"kVASaA,WAAgCC,gBAC3CC,MACE,CACEC,OAAQ,CAACC,EAAgB,CAAEC,KAAM,mBACjCC,mBACE,MAAO,CACLC,4BAA6BC,KAAKC,wBAGtCC,MAAO,CACLC,sBAAaA,GACXC,GACE,GAIFJ,KAAKC,sBAAsBI,OAAOC,UAAUH,GAAcI,UAE5DC,mBAAUA,GACRR,KAAKC,sBAAsBI,OAAOI,SAASD,GAAa,IAAID,UAE9DG,4BAAmBA,
|
|
1
|
+
{"version":3,"file":"createInstantSearchComponent.js","sources":["../../../../src/util/createInstantSearchComponent.js"],"sourcesContent":["import { INSTANTSEARCH_FUTURE_DEFAULTS } from 'instantsearch.js/es/lib/InstantSearch';\n\nimport { version } from '../../package.json'; // rollup does pick only what needed from json\nimport { createSuitMixin } from '../mixins/suit';\n\nimport { _objectSpread } from './polyfills';\nimport { isVue3, version as vueVersion } from './vue-compat';\nimport { warn } from './warn';\n\nexport const createInstantSearchComponent = (component) =>\n _objectSpread(\n {\n mixins: [createSuitMixin({ name: 'InstantSearch' })],\n provide() {\n return {\n $_ais_instantSearchInstance: this.instantSearchInstance,\n };\n },\n watch: {\n searchClient(searchClient) {\n warn(\n false,\n 'The `search-client` prop of `<ais-instant-search>` changed between renders, which may cause more search requests than necessary. If this is an unwanted behavior, please provide a stable reference: https://www.algolia.com/doc/api-reference/widgets/instantsearch/vue/#widget-param-search-client'\n );\n\n this.instantSearchInstance.helper.setClient(searchClient).search();\n },\n indexName(indexName) {\n this.instantSearchInstance.helper.setIndex(indexName || '').search();\n },\n compositionID(compositionID) {\n this.instantSearchInstance.helper\n .setIndex(compositionID || '')\n .search();\n },\n stalledSearchDelay(stalledSearchDelay) {\n // private InstantSearch.js API:\n this.instantSearchInstance._stalledSearchDelay = stalledSearchDelay;\n },\n routing() {\n throw new Error(\n 'routing configuration can not be changed dynamically at this point.' +\n '\\n\\n' +\n 'Please open a new issue: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage%2cLibrary%3A+Vue+InstantSearch&title=Feature%20request%3A%20dynamic%20props'\n );\n },\n onStateChange() {\n throw new Error(\n 'onStateChange configuration can not be changed dynamically at this point.' +\n '\\n\\n' +\n 'Please open a new issue: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage%2cLibrary%3A+Vue+InstantSearch&title=Feature%20request%3A%20dynamic%20props'\n );\n },\n searchFunction(searchFunction) {\n // private InstantSearch.js API:\n this.instantSearchInstance._searchFunction = searchFunction;\n },\n middlewares: {\n immediate: true,\n handler(next, prev) {\n (prev || [])\n .filter((middleware) => (next || []).indexOf(middleware) === -1)\n .forEach((middlewareToRemove) => {\n this.instantSearchInstance.unuse(middlewareToRemove);\n });\n\n (next || [])\n .filter((middleware) => (prev || []).indexOf(middleware) === -1)\n .forEach((middlewareToAdd) => {\n this.instantSearchInstance.use(middlewareToAdd);\n });\n },\n },\n future(future) {\n this.instantSearchInstance.future = Object.assign(\n INSTANTSEARCH_FUTURE_DEFAULTS,\n future\n );\n },\n },\n created() {\n const searchClient = this.instantSearchInstance.client;\n if (typeof searchClient.addAlgoliaAgent === 'function') {\n searchClient.addAlgoliaAgent(`Vue (${vueVersion})`);\n searchClient.addAlgoliaAgent(`Vue InstantSearch (${version})`);\n }\n },\n mounted() {\n // from the documentation: https://vuejs.org/v2/api/#mounted\n // \"Note that mounted does not guarantee that all child components have also been mounted. If you want to\n // wait until the entire view has been rendered, you can use vm.$nextTick inside of mounted\"\n this.$nextTick(() => {\n if (!this.instantSearchInstance.started) {\n this.instantSearchInstance.start();\n }\n });\n },\n [isVue3 ? 'beforeUnmount' : 'beforeDestroy']() {\n if (this.instantSearchInstance.started) {\n this.instantSearchInstance.dispose();\n }\n\n // a hydrated instance will no longer be hydrated once disposed, and starts from scratch\n this.instantSearchInstance.__initialSearchResults = undefined;\n },\n },\n component\n );\n"],"names":["createInstantSearchComponent","component","_objectSpread","mixins","createSuitMixin","name","provide","$_ais_instantSearchInstance","this","instantSearchInstance","watch","searchClient","warn","helper","setClient","search","indexName","setIndex","compositionID","stalledSearchDelay","_stalledSearchDelay","routing","Error","onStateChange","searchFunction","_searchFunction","middlewares","immediate","handler","next","prev","filter","middleware","indexOf","forEach","middlewareToRemove","unuse","middlewareToAdd","use","future","Object","assign","INSTANTSEARCH_FUTURE_DEFAULTS","created","const","client","addAlgoliaAgent","vueVersion","version","mounted","$nextTick","started","start","dispose","__initialSearchResults","undefined"],"mappings":"kVASaA,WAAgCC,gBAC3CC,MACE,CACEC,OAAQ,CAACC,EAAgB,CAAEC,KAAM,mBACjCC,mBACE,MAAO,CACLC,4BAA6BC,KAAKC,wBAGtCC,MAAO,CACLC,sBAAaA,GACXC,GACE,GAIFJ,KAAKC,sBAAsBI,OAAOC,UAAUH,GAAcI,UAE5DC,mBAAUA,GACRR,KAAKC,sBAAsBI,OAAOI,SAASD,GAAa,IAAID,UAE9DG,uBAAcA,GACZV,KAAKC,sBAAsBI,OACxBI,SAASC,GAAiB,IAC1BH,UAELI,4BAAmBA,GAEjBX,KAAKC,sBAAsBW,oBAAsBD,GAEnDE,mBACE,MAAM,IAAIC,MACR,sQAKJC,yBACE,MAAM,IAAID,MACR,4QAKJE,wBAAeA,GAEbhB,KAAKC,sBAAsBgB,gBAAkBD,GAE/CE,YAAa,CACXC,WAAW,EACXC,iBAAQC,EAAMC,eACXA,GAAQ,IACNC,gBAAQC,UAAqD,KAArCH,GAAQ,IAAII,QAAQD,KAC5CE,iBAASC,GACR3B,EAAKC,sBAAsB2B,MAAMD,MAGpCN,GAAQ,IACNE,gBAAQC,UAAqD,KAArCF,GAAQ,IAAIG,QAAQD,KAC5CE,iBAASG,GACR7B,EAAKC,sBAAsB6B,IAAID,OAIvCE,gBAAOA,GACL/B,KAAKC,sBAAsB8B,OAASC,OAAOC,OACzCC,EACAH,KAINI,mBACEC,IAAMjC,EAAeH,KAAKC,sBAAsBoC,OACJ,mBAAjClC,EAAamC,kBACtBnC,EAAamC,wBAAwBC,OACrCpC,EAAamC,sCAAsCE,SAGvDC,8BAIEzC,KAAK0C,qBACE1C,EAAKC,sBAAsB0C,SAC9B3C,EAAKC,sBAAsB2C,aAIU,yBACrC5C,KAAKC,sBAAsB0C,SAC7B3C,KAAKC,sBAAsB4C,UAI7B7C,KAAKC,sBAAsB6C,4BAAyBC,MAGxDtD"}
|