vue-instantsearch 4.3.3 → 4.4.0

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.
Files changed (191) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/package.json +5 -5
  3. package/src/__tests__/index.js +133 -26
  4. package/src/components/Autocomplete.vue +8 -1
  5. package/src/components/Breadcrumb.vue +8 -1
  6. package/src/components/ClearRefinements.vue +8 -1
  7. package/src/components/Configure.js +8 -1
  8. package/src/components/ConfigureRelatedItems.js +8 -1
  9. package/src/components/CurrentRefinements.vue +8 -1
  10. package/src/components/DynamicWidgets.js +8 -1
  11. package/src/components/HierarchicalMenu.vue +8 -1
  12. package/src/components/Hits.vue +8 -1
  13. package/src/components/HitsPerPage.vue +8 -1
  14. package/src/components/Index.js +6 -1
  15. package/src/components/InfiniteHits.vue +8 -1
  16. package/src/components/Menu.vue +6 -1
  17. package/src/components/MenuSelect.vue +6 -1
  18. package/src/components/NumericMenu.vue +8 -1
  19. package/src/components/Pagination.vue +9 -1
  20. package/src/components/QueryRuleContext.js +8 -3
  21. package/src/components/QueryRuleCustomData.vue +8 -3
  22. package/src/components/RangeInput.vue +8 -1
  23. package/src/components/RatingMenu.vue +8 -1
  24. package/src/components/RefinementList.vue +8 -1
  25. package/src/components/RelevantSort.vue +8 -1
  26. package/src/components/SearchBox.vue +8 -1
  27. package/src/components/SortBy.vue +6 -1
  28. package/src/components/StateResults.vue +8 -1
  29. package/src/components/Stats.vue +6 -1
  30. package/src/components/ToggleRefinement.vue +8 -1
  31. package/src/components/VoiceSearch.vue +8 -1
  32. package/src/components/__tests__/__snapshots__/Pagination.js.snap +21 -21
  33. package/src/mixins/__tests__/widget.test.js +102 -0
  34. package/src/mixins/widget.js +13 -3
  35. package/src/util/__tests__/createServerRootMixin.test.js +3 -2
  36. package/src/util/createServerRootMixin.js +1 -1
  37. package/vue2/cjs/index.js +1 -1
  38. package/vue2/cjs/index.js.map +1 -1
  39. package/vue2/es/package.json.js +1 -1
  40. package/vue2/es/src/components/Autocomplete.vue.js +1 -1
  41. package/vue2/es/src/components/Autocomplete.vue.js.map +1 -1
  42. package/vue2/es/src/components/Breadcrumb.vue.js +1 -1
  43. package/vue2/es/src/components/Breadcrumb.vue.js.map +1 -1
  44. package/vue2/es/src/components/ClearRefinements.vue.js +1 -1
  45. package/vue2/es/src/components/ClearRefinements.vue.js.map +1 -1
  46. package/vue2/es/src/components/Configure.js +1 -1
  47. package/vue2/es/src/components/Configure.js.map +1 -1
  48. package/vue2/es/src/components/ConfigureRelatedItems.js +1 -1
  49. package/vue2/es/src/components/ConfigureRelatedItems.js.map +1 -1
  50. package/vue2/es/src/components/CurrentRefinements.vue.js +1 -1
  51. package/vue2/es/src/components/CurrentRefinements.vue.js.map +1 -1
  52. package/vue2/es/src/components/DynamicWidgets.js +1 -1
  53. package/vue2/es/src/components/DynamicWidgets.js.map +1 -1
  54. package/vue2/es/src/components/HierarchicalMenu.vue.js +1 -1
  55. package/vue2/es/src/components/HierarchicalMenu.vue.js.map +1 -1
  56. package/vue2/es/src/components/Hits.vue.js +1 -1
  57. package/vue2/es/src/components/Hits.vue.js.map +1 -1
  58. package/vue2/es/src/components/HitsPerPage.vue.js +1 -1
  59. package/vue2/es/src/components/HitsPerPage.vue.js.map +1 -1
  60. package/vue2/es/src/components/Index.js +1 -1
  61. package/vue2/es/src/components/Index.js.map +1 -1
  62. package/vue2/es/src/components/InfiniteHits.vue.js +1 -1
  63. package/vue2/es/src/components/InfiniteHits.vue.js.map +1 -1
  64. package/vue2/es/src/components/Menu.vue.js +1 -1
  65. package/vue2/es/src/components/Menu.vue.js.map +1 -1
  66. package/vue2/es/src/components/MenuSelect.vue.js +1 -1
  67. package/vue2/es/src/components/MenuSelect.vue.js.map +1 -1
  68. package/vue2/es/src/components/NumericMenu.vue.js +1 -1
  69. package/vue2/es/src/components/NumericMenu.vue.js.map +1 -1
  70. package/vue2/es/src/components/Pagination.vue.js +1 -1
  71. package/vue2/es/src/components/Pagination.vue.js.map +1 -1
  72. package/vue2/es/src/components/QueryRuleContext.js +1 -1
  73. package/vue2/es/src/components/QueryRuleContext.js.map +1 -1
  74. package/vue2/es/src/components/QueryRuleCustomData.vue.js +1 -1
  75. package/vue2/es/src/components/QueryRuleCustomData.vue.js.map +1 -1
  76. package/vue2/es/src/components/RangeInput.vue.js +1 -1
  77. package/vue2/es/src/components/RangeInput.vue.js.map +1 -1
  78. package/vue2/es/src/components/RatingMenu.vue.js +1 -1
  79. package/vue2/es/src/components/RatingMenu.vue.js.map +1 -1
  80. package/vue2/es/src/components/RefinementList.vue.js +1 -1
  81. package/vue2/es/src/components/RefinementList.vue.js.map +1 -1
  82. package/vue2/es/src/components/RelevantSort.vue.js +1 -1
  83. package/vue2/es/src/components/RelevantSort.vue.js.map +1 -1
  84. package/vue2/es/src/components/SearchBox.vue.js +1 -1
  85. package/vue2/es/src/components/SearchBox.vue.js.map +1 -1
  86. package/vue2/es/src/components/SortBy.vue.js +1 -1
  87. package/vue2/es/src/components/SortBy.vue.js.map +1 -1
  88. package/vue2/es/src/components/StateResults.vue.js +1 -1
  89. package/vue2/es/src/components/StateResults.vue.js.map +1 -1
  90. package/vue2/es/src/components/Stats.vue.js +1 -1
  91. package/vue2/es/src/components/Stats.vue.js.map +1 -1
  92. package/vue2/es/src/components/ToggleRefinement.vue.js +1 -1
  93. package/vue2/es/src/components/ToggleRefinement.vue.js.map +1 -1
  94. package/vue2/es/src/components/VoiceSearch.vue.js +1 -1
  95. package/vue2/es/src/components/VoiceSearch.vue.js.map +1 -1
  96. package/vue2/es/src/mixins/widget.js +1 -1
  97. package/vue2/es/src/mixins/widget.js.map +1 -1
  98. package/vue2/es/src/util/createInstantSearchComponent.js +1 -1
  99. package/vue2/es/src/util/createServerRootMixin.js.map +1 -1
  100. package/vue2/umd/index.js +1 -1
  101. package/vue2/umd/index.js.map +1 -1
  102. package/vue3/cjs/index.js +1 -1
  103. package/vue3/cjs/index.js.map +1 -1
  104. package/vue3/es/package.json.js +1 -1
  105. package/vue3/es/src/components/Autocomplete.vue_vue&type=script&lang.js +1 -1
  106. package/vue3/es/src/components/Autocomplete.vue_vue&type=script&lang.js.map +1 -1
  107. package/vue3/es/src/components/Autocomplete.vue_vue&type=template&id=e7c95fd0&lang.js.map +1 -1
  108. package/vue3/es/src/components/Breadcrumb.vue_vue&type=script&lang.js +1 -1
  109. package/vue3/es/src/components/Breadcrumb.vue_vue&type=script&lang.js.map +1 -1
  110. package/vue3/es/src/components/Breadcrumb.vue_vue&type=template&id=6f46de9a&lang.js.map +1 -1
  111. package/vue3/es/src/components/ClearRefinements.vue_vue&type=script&lang.js +1 -1
  112. package/vue3/es/src/components/ClearRefinements.vue_vue&type=script&lang.js.map +1 -1
  113. package/vue3/es/src/components/ClearRefinements.vue_vue&type=template&id=410a3aaa&lang.js.map +1 -1
  114. package/vue3/es/src/components/Configure.js +1 -1
  115. package/vue3/es/src/components/Configure.js.map +1 -1
  116. package/vue3/es/src/components/ConfigureRelatedItems.js +1 -1
  117. package/vue3/es/src/components/ConfigureRelatedItems.js.map +1 -1
  118. package/vue3/es/src/components/CurrentRefinements.vue_vue&type=script&lang.js +1 -1
  119. package/vue3/es/src/components/CurrentRefinements.vue_vue&type=script&lang.js.map +1 -1
  120. package/vue3/es/src/components/CurrentRefinements.vue_vue&type=template&id=4f1917ff&lang.js.map +1 -1
  121. package/vue3/es/src/components/DynamicWidgets.js +1 -1
  122. package/vue3/es/src/components/DynamicWidgets.js.map +1 -1
  123. package/vue3/es/src/components/HierarchicalMenu.vue_vue&type=script&lang.js +1 -1
  124. package/vue3/es/src/components/HierarchicalMenu.vue_vue&type=script&lang.js.map +1 -1
  125. package/vue3/es/src/components/HierarchicalMenu.vue_vue&type=template&id=4361a0b8&lang.js.map +1 -1
  126. package/vue3/es/src/components/Hits.vue_vue&type=script&lang.js +1 -1
  127. package/vue3/es/src/components/Hits.vue_vue&type=script&lang.js.map +1 -1
  128. package/vue3/es/src/components/Hits.vue_vue&type=template&id=ef242920&lang.js.map +1 -1
  129. package/vue3/es/src/components/HitsPerPage.vue_vue&type=script&lang.js +1 -1
  130. package/vue3/es/src/components/HitsPerPage.vue_vue&type=script&lang.js.map +1 -1
  131. package/vue3/es/src/components/HitsPerPage.vue_vue&type=template&id=74f3ac28&lang.js.map +1 -1
  132. package/vue3/es/src/components/Index.js +1 -1
  133. package/vue3/es/src/components/Index.js.map +1 -1
  134. package/vue3/es/src/components/InfiniteHits.vue_vue&type=script&lang.js +1 -1
  135. package/vue3/es/src/components/InfiniteHits.vue_vue&type=script&lang.js.map +1 -1
  136. package/vue3/es/src/components/InfiniteHits.vue_vue&type=template&id=dcfb64b8&lang.js.map +1 -1
  137. package/vue3/es/src/components/Menu.vue_vue&type=script&lang.js +1 -1
  138. package/vue3/es/src/components/Menu.vue_vue&type=script&lang.js.map +1 -1
  139. package/vue3/es/src/components/Menu.vue_vue&type=template&id=9bcc0be2&lang.js.map +1 -1
  140. package/vue3/es/src/components/MenuSelect.vue_vue&type=script&lang.js +1 -1
  141. package/vue3/es/src/components/MenuSelect.vue_vue&type=script&lang.js.map +1 -1
  142. package/vue3/es/src/components/MenuSelect.vue_vue&type=template&id=694477eb&lang.js.map +1 -1
  143. package/vue3/es/src/components/NumericMenu.vue_vue&type=script&lang.js +1 -1
  144. package/vue3/es/src/components/NumericMenu.vue_vue&type=script&lang.js.map +1 -1
  145. package/vue3/es/src/components/NumericMenu.vue_vue&type=template&id=160fae0c&lang.js.map +1 -1
  146. package/vue3/es/src/components/Pagination.vue_vue&type=script&lang.js +1 -1
  147. package/vue3/es/src/components/Pagination.vue_vue&type=script&lang.js.map +1 -1
  148. package/vue3/es/src/components/Pagination.vue_vue&type=template&id=849a166c&lang.js +1 -1
  149. package/vue3/es/src/components/Pagination.vue_vue&type=template&id=849a166c&lang.js.map +1 -1
  150. package/vue3/es/src/components/QueryRuleContext.js +1 -1
  151. package/vue3/es/src/components/QueryRuleContext.js.map +1 -1
  152. package/vue3/es/src/components/QueryRuleCustomData.vue_vue&type=script&lang.js +1 -1
  153. package/vue3/es/src/components/QueryRuleCustomData.vue_vue&type=script&lang.js.map +1 -1
  154. package/vue3/es/src/components/QueryRuleCustomData.vue_vue&type=template&id=e4da0782&lang.js.map +1 -1
  155. package/vue3/es/src/components/RangeInput.vue_vue&type=script&lang.js +1 -1
  156. package/vue3/es/src/components/RangeInput.vue_vue&type=script&lang.js.map +1 -1
  157. package/vue3/es/src/components/RangeInput.vue_vue&type=template&id=1e17783d&lang.js.map +1 -1
  158. package/vue3/es/src/components/RatingMenu.vue_vue&type=script&lang.js +1 -1
  159. package/vue3/es/src/components/RatingMenu.vue_vue&type=script&lang.js.map +1 -1
  160. package/vue3/es/src/components/RatingMenu.vue_vue&type=template&id=9254de68&lang.js.map +1 -1
  161. package/vue3/es/src/components/RefinementList.vue_vue&type=script&lang.js +1 -1
  162. package/vue3/es/src/components/RefinementList.vue_vue&type=script&lang.js.map +1 -1
  163. package/vue3/es/src/components/RefinementList.vue_vue&type=template&id=28927239&lang.js.map +1 -1
  164. package/vue3/es/src/components/RelevantSort.vue_vue&type=script&lang.js +1 -1
  165. package/vue3/es/src/components/RelevantSort.vue_vue&type=script&lang.js.map +1 -1
  166. package/vue3/es/src/components/RelevantSort.vue_vue&type=template&id=257b248b&lang.js.map +1 -1
  167. package/vue3/es/src/components/SearchBox.vue_vue&type=script&lang.js +1 -1
  168. package/vue3/es/src/components/SearchBox.vue_vue&type=script&lang.js.map +1 -1
  169. package/vue3/es/src/components/SearchBox.vue_vue&type=template&id=27029d83&lang.js.map +1 -1
  170. package/vue3/es/src/components/SortBy.vue_vue&type=script&lang.js +1 -1
  171. package/vue3/es/src/components/SortBy.vue_vue&type=script&lang.js.map +1 -1
  172. package/vue3/es/src/components/SortBy.vue_vue&type=template&id=b69b3b76&lang.js.map +1 -1
  173. package/vue3/es/src/components/StateResults.vue_vue&type=script&lang.js +1 -1
  174. package/vue3/es/src/components/StateResults.vue_vue&type=script&lang.js.map +1 -1
  175. package/vue3/es/src/components/StateResults.vue_vue&type=template&id=5992f3d5&lang.js.map +1 -1
  176. package/vue3/es/src/components/Stats.vue_vue&type=script&lang.js +1 -1
  177. package/vue3/es/src/components/Stats.vue_vue&type=script&lang.js.map +1 -1
  178. package/vue3/es/src/components/Stats.vue_vue&type=template&id=7337491f&lang.js.map +1 -1
  179. package/vue3/es/src/components/ToggleRefinement.vue_vue&type=script&lang.js +1 -1
  180. package/vue3/es/src/components/ToggleRefinement.vue_vue&type=script&lang.js.map +1 -1
  181. package/vue3/es/src/components/ToggleRefinement.vue_vue&type=template&id=14e4586f&lang.js.map +1 -1
  182. package/vue3/es/src/components/VoiceSearch.vue_vue&type=script&lang.js +1 -1
  183. package/vue3/es/src/components/VoiceSearch.vue_vue&type=script&lang.js.map +1 -1
  184. package/vue3/es/src/components/VoiceSearch.vue_vue&type=template&id=24b0f67a&lang.js.map +1 -1
  185. package/vue3/es/src/mixins/widget.js +1 -1
  186. package/vue3/es/src/mixins/widget.js.map +1 -1
  187. package/vue3/es/src/util/createInstantSearchComponent.js +1 -1
  188. package/vue3/es/src/util/createServerRootMixin.js +1 -1
  189. package/vue3/es/src/util/createServerRootMixin.js.map +1 -1
  190. package/vue3/umd/index.js +1 -1
  191. package/vue3/umd/index.js.map +1 -1
@@ -1,2 +1,2 @@
1
- var r="4.3.3";export{r as version};
1
+ var r="4.4.0";export{r as version};
2
2
  //# sourceMappingURL=package.json.js.map
@@ -1,2 +1,2 @@
1
- import{createSuitMixin as e}from"../mixins/suit.js";import{createWidgetMixin as t}from"../mixins/widget.js";import{connectAutocomplete as o}from"instantsearch.js/es/connectors/index.js";export default{name:"AisAutocomplete",mixins:[t({connector:o}),e({name:"Autocomplete"})],props:{escapeHTML:{type:Boolean,required:!1,default:!0}},computed:{widgetParams:function(){return{escapeHTML:this.escapeHTML}}}};
1
+ import{createSuitMixin as e}from"../mixins/suit.js";import{createWidgetMixin as t}from"../mixins/widget.js";import{connectAutocomplete as o}from"instantsearch.js/es/connectors/index.js";export default{name:"AisAutocomplete",mixins:[t({connector:o},{$$widgetType:"ais.autocomplete"}),e({name:"Autocomplete"})],props:{escapeHTML:{type:Boolean,required:!1,default:!0}},computed:{widgetParams:function(){return{escapeHTML:this.escapeHTML}}}};
2
2
  //# sourceMappingURL=Autocomplete.vue_vue&type=script&lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Autocomplete.vue_vue&type=script&lang.js","sources":["../../../../src/components/Autocomplete.vue"],"sourcesContent":["<template>\n <div\n :class=\"suit()\"\n v-if=\"state\"\n >\n <slot\n :refine=\"state.refine\"\n :current-refinement=\"state.currentRefinement\"\n :indices=\"state.indices\"\n >\n <p>This widget doesn't render anything without a filled in default slot.</p>\n <p>query, function to refine and results are provided.</p>\n <pre>refine: Function</pre>\n <pre>currentRefinement: \"{{ state.currentRefinement }}\"</pre>\n <details>\n <summary><code>indices</code>:</summary>\n <pre>{{ state.indices }}</pre>\n </details>\n </slot>\n </div>\n</template>\n\n<script>\nimport { createWidgetMixin } from '../mixins/widget';\nimport { connectAutocomplete } from 'instantsearch.js/es/connectors';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisAutocomplete',\n mixins: [\n createWidgetMixin({ connector: connectAutocomplete }),\n createSuitMixin({ name: 'Autocomplete' }),\n ],\n props: {\n escapeHTML: {\n type: Boolean,\n required: false,\n default: true,\n },\n },\n computed: {\n widgetParams() {\n return {\n escapeHTML: this.escapeHTML,\n };\n },\n },\n};\n</script>\n"],"names":["name","mixins","createWidgetMixin","connector","connectAutocomplete","createSuitMixin","props","escapeHTML","type","Boolean","required","default","computed","widgetParams","this"],"mappings":"wMA2Be,CACbA,KAAM,kBACNC,OAAQ,CACNC,EAAkB,CAAEC,UAAWC,IAC/BC,EAAgB,CAAEL,KAAM,kBAE1BM,MAAO,CACLC,WAAY,CACVC,KAAMC,QACNC,UAAU,EACVC,SAAS,IAGbC,SAAU,CACRC,8BACS,CACLN,WAAYO,KAAKP"}
1
+ {"version":3,"file":"Autocomplete.vue_vue&type=script&lang.js","sources":["../../../../src/components/Autocomplete.vue"],"sourcesContent":["<template>\n <div\n :class=\"suit()\"\n v-if=\"state\"\n >\n <slot\n :refine=\"state.refine\"\n :current-refinement=\"state.currentRefinement\"\n :indices=\"state.indices\"\n >\n <p>This widget doesn't render anything without a filled in default slot.</p>\n <p>query, function to refine and results are provided.</p>\n <pre>refine: Function</pre>\n <pre>currentRefinement: \"{{ state.currentRefinement }}\"</pre>\n <details>\n <summary><code>indices</code>:</summary>\n <pre>{{ state.indices }}</pre>\n </details>\n </slot>\n </div>\n</template>\n\n<script>\nimport { createWidgetMixin } from '../mixins/widget';\nimport { connectAutocomplete } from 'instantsearch.js/es/connectors';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisAutocomplete',\n mixins: [\n createWidgetMixin(\n {\n connector: connectAutocomplete,\n },\n {\n $$widgetType: 'ais.autocomplete',\n }\n ),\n createSuitMixin({ name: 'Autocomplete' }),\n ],\n props: {\n escapeHTML: {\n type: Boolean,\n required: false,\n default: true,\n },\n },\n computed: {\n widgetParams() {\n return {\n escapeHTML: this.escapeHTML,\n };\n },\n },\n};\n</script>\n"],"names":["name","mixins","createWidgetMixin","connector","connectAutocomplete","$$widgetType","createSuitMixin","props","escapeHTML","type","Boolean","required","default","computed","widgetParams","this"],"mappings":"wMA2Be,CACbA,KAAM,kBACNC,OAAQ,CACNC,EACE,CACEC,UAAWC,GAEb,CACEC,aAAc,qBAGlBC,EAAgB,CAAEN,KAAM,kBAE1BO,MAAO,CACLC,WAAY,CACVC,KAAMC,QACNC,UAAU,EACVC,SAAS,IAGbC,SAAU,CACRC,8BACS,CACLN,WAAYO,KAAKP"}
@@ -1 +1 @@
1
- {"version":3,"file":"Autocomplete.vue_vue&type=template&id=e7c95fd0&lang.js","sources":["../../../../src/components/Autocomplete.vue?vue&type=template&id=e7c95fd0&lang.js"],"sourcesContent":["<template>\n <div\n :class=\"suit()\"\n v-if=\"state\"\n >\n <slot\n :refine=\"state.refine\"\n :current-refinement=\"state.currentRefinement\"\n :indices=\"state.indices\"\n >\n <p>This widget doesn't render anything without a filled in default slot.</p>\n <p>query, function to refine and results are provided.</p>\n <pre>refine: Function</pre>\n <pre>currentRefinement: \"{{ state.currentRefinement }}\"</pre>\n <details>\n <summary><code>indices</code>:</summary>\n <pre>{{ state.indices }}</pre>\n </details>\n </slot>\n </div>\n</template>\n\n<script>\nimport { createWidgetMixin } from '../mixins/widget';\nimport { connectAutocomplete } from 'instantsearch.js/es/connectors';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisAutocomplete',\n mixins: [\n createWidgetMixin({ connector: connectAutocomplete }),\n createSuitMixin({ name: 'Autocomplete' }),\n ],\n props: {\n escapeHTML: {\n type: Boolean,\n required: false,\n default: true,\n },\n },\n computed: {\n widgetParams() {\n return {\n escapeHTML: this.escapeHTML,\n };\n },\n },\n};\n</script>\n"],"names":["_createVNode","_ctx","_createBlock","class","_renderSlot","refine","currentRefinement","indices","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4"],"mappings":"0JAUMA,WAAG,8EACHA,WAAG,4DACHA,aAAK,yBAGHA,kBAASA,EAAoB,YAAd,aAAc,yCAZ3BC,aAFRC,eACGC,MAAOF,WAGRG,sBACGC,OAAQJ,QAAMI,OACdC,kBAAoBL,QAAMK,kBAC1BC,QAASN,QAAMM,2BAEhBC,EACAC,EACAC,EACAV,aAAK,yBAAuBC,QAAMK,mBAAoB,OACtDN,kBACEW,EACAX,eAAQC,QAAMM"}
1
+ {"version":3,"file":"Autocomplete.vue_vue&type=template&id=e7c95fd0&lang.js","sources":["../../../../src/components/Autocomplete.vue?vue&type=template&id=e7c95fd0&lang.js"],"sourcesContent":["<template>\n <div\n :class=\"suit()\"\n v-if=\"state\"\n >\n <slot\n :refine=\"state.refine\"\n :current-refinement=\"state.currentRefinement\"\n :indices=\"state.indices\"\n >\n <p>This widget doesn't render anything without a filled in default slot.</p>\n <p>query, function to refine and results are provided.</p>\n <pre>refine: Function</pre>\n <pre>currentRefinement: \"{{ state.currentRefinement }}\"</pre>\n <details>\n <summary><code>indices</code>:</summary>\n <pre>{{ state.indices }}</pre>\n </details>\n </slot>\n </div>\n</template>\n\n<script>\nimport { createWidgetMixin } from '../mixins/widget';\nimport { connectAutocomplete } from 'instantsearch.js/es/connectors';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisAutocomplete',\n mixins: [\n createWidgetMixin(\n {\n connector: connectAutocomplete,\n },\n {\n $$widgetType: 'ais.autocomplete',\n }\n ),\n createSuitMixin({ name: 'Autocomplete' }),\n ],\n props: {\n escapeHTML: {\n type: Boolean,\n required: false,\n default: true,\n },\n },\n computed: {\n widgetParams() {\n return {\n escapeHTML: this.escapeHTML,\n };\n },\n },\n};\n</script>\n"],"names":["_createVNode","_ctx","_createBlock","class","_renderSlot","refine","currentRefinement","indices","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4"],"mappings":"0JAUMA,WAAG,8EACHA,WAAG,4DACHA,aAAK,yBAGHA,kBAASA,EAAoB,YAAd,aAAc,yCAZ3BC,aAFRC,eACGC,MAAOF,WAGRG,sBACGC,OAAQJ,QAAMI,OACdC,kBAAoBL,QAAMK,kBAC1BC,QAASN,QAAMM,2BAEhBC,EACAC,EACAC,EACAV,aAAK,yBAAuBC,QAAMK,mBAAoB,OACtDN,kBACEW,EACAX,eAAQC,QAAMM"}
@@ -1,2 +1,2 @@
1
- import{createSuitMixin as t}from"../mixins/suit.js";import{createWidgetMixin as r}from"../mixins/widget.js";import{connectBreadcrumb as e}from"instantsearch.js/es/connectors/index.js";import{createPanelConsumerMixin as i}from"../mixins/panel.js";export default{name:"AisBreadcrumb",mixins:[r({connector:e}),i({mapStateToCanRefine:function(t){return Boolean(t.canRefine)}}),t({name:"Breadcrumb"})],props:{attributes:{type:Array,required:!0},separator:{type:String,default:void 0},rootPath:{type:String,default:void 0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{attributes:this.attributes,separator:this.separator,rootPath:this.rootPath,transformItems:this.transformItems}}},methods:{isLastItem:function(t){return this.state.items.length-1===t}}};
1
+ import{createSuitMixin as t}from"../mixins/suit.js";import{createWidgetMixin as e}from"../mixins/widget.js";import{connectBreadcrumb as r}from"instantsearch.js/es/connectors/index.js";import{createPanelConsumerMixin as i}from"../mixins/panel.js";export default{name:"AisBreadcrumb",mixins:[e({connector:r},{$$widgetType:"ais.breadcrumb"}),i({mapStateToCanRefine:function(t){return Boolean(t.canRefine)}}),t({name:"Breadcrumb"})],props:{attributes:{type:Array,required:!0},separator:{type:String,default:void 0},rootPath:{type:String,default:void 0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{attributes:this.attributes,separator:this.separator,rootPath:this.rootPath,transformItems:this.transformItems}}},methods:{isLastItem:function(t){return this.state.items.length-1===t}}};
2
2
  //# sourceMappingURL=Breadcrumb.vue_vue&type=script&lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumb.vue_vue&type=script&lang.js","sources":["../../../../src/components/Breadcrumb.vue"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"[suit(), !state.canRefine && suit('', 'noRefinement')]\"\n >\n <slot\n :items=\"state.items\"\n :can-refine=\"state.canRefine\"\n :refine=\"state.refine\"\n :createURL=\"state.createURL\"\n >\n <ul :class=\"suit('list')\">\n <li :class=\"[suit('item'), !state.items.length && suit('item', 'selected')]\">\n <a\n v-if=\"Boolean(state.items.length)\"\n :href=\"state.createURL()\"\n :class=\"suit('link')\"\n @click.prevent=\"state.refine()\"\n >\n <slot name=\"rootLabel\">Home</slot>\n </a>\n <span v-else>\n <slot name=\"rootLabel\">Home</slot>\n </span>\n </li>\n <li\n v-for=\"(item, index) in state.items\"\n :key=\"item.label\"\n :class=\"[suit('item'), isLastItem(index) && suit('item', 'selected')]\"\n >\n <span\n :class=\"suit('separator')\"\n aria-hidden=\"true\"\n >\n <slot name=\"separator\">></slot>\n </span>\n <a\n v-if=\"!isLastItem(index)\"\n :href=\"state.createURL(item.value)\"\n :class=\"suit('link')\"\n @click.prevent=\"state.refine(item.value)\"\n >{{ item.label }}</a>\n <span v-else>{{ item.label }}</span>\n </li>\n </ul>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectBreadcrumb } from 'instantsearch.js/es/connectors';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport { createSuitMixin } from '../mixins/suit';\nimport { createWidgetMixin } from '../mixins/widget';\n\nexport default {\n name: 'AisBreadcrumb',\n mixins: [\n createWidgetMixin({ connector: connectBreadcrumb }),\n createPanelConsumerMixin({\n mapStateToCanRefine: state => Boolean(state.canRefine),\n }),\n createSuitMixin({ name: 'Breadcrumb' }),\n ],\n props: {\n attributes: {\n type: Array,\n required: true,\n },\n separator: {\n type: String,\n default: undefined,\n },\n rootPath: {\n type: String,\n default: undefined,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n widgetParams() {\n return {\n attributes: this.attributes,\n separator: this.separator,\n rootPath: this.rootPath,\n transformItems: this.transformItems,\n };\n },\n },\n methods: {\n isLastItem(index) {\n return this.state.items.length - 1 === index;\n },\n },\n};\n</script>\n"],"names":["name","mixins","createWidgetMixin","connector","connectBreadcrumb","createPanelConsumerMixin","mapStateToCanRefine","state","Boolean","canRefine","createSuitMixin","props","attributes","type","Array","required","separator","String","default","undefined","rootPath","transformItems","Function","computed","widgetParams","this","methods","isLastItem","index","items","length"],"mappings":"oQAuDe,CACbA,KAAM,gBACNC,OAAQ,CACNC,EAAkB,CAAEC,UAAWC,IAC/BC,EAAyB,CACvBC,6BAAqBC,UAASC,QAAQD,EAAME,cAE9CC,EAAgB,CAAEV,KAAM,gBAE1BW,MAAO,CACLC,WAAY,CACVC,KAAMC,MACNC,UAAU,GAEZC,UAAW,CACTH,KAAMI,OACNC,aAASC,GAEXC,SAAU,CACRP,KAAMI,OACNC,aAASC,GAEXE,eAAgB,CACdR,KAAMS,SACNJ,aAASC,IAGbI,SAAU,CACRC,8BACS,CACLZ,WAAYa,KAAKb,WACjBI,UAAWS,KAAKT,UAChBI,SAAUK,KAAKL,SACfC,eAAgBI,KAAKJ,kBAI3BK,QAAS,CACPC,oBAAWC,UACFH,KAAKlB,MAAMsB,MAAMC,OAAS,IAAMF"}
1
+ {"version":3,"file":"Breadcrumb.vue_vue&type=script&lang.js","sources":["../../../../src/components/Breadcrumb.vue"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"[suit(), !state.canRefine && suit('', 'noRefinement')]\"\n >\n <slot\n :items=\"state.items\"\n :can-refine=\"state.canRefine\"\n :refine=\"state.refine\"\n :createURL=\"state.createURL\"\n >\n <ul :class=\"suit('list')\">\n <li :class=\"[suit('item'), !state.items.length && suit('item', 'selected')]\">\n <a\n v-if=\"Boolean(state.items.length)\"\n :href=\"state.createURL()\"\n :class=\"suit('link')\"\n @click.prevent=\"state.refine()\"\n >\n <slot name=\"rootLabel\">Home</slot>\n </a>\n <span v-else>\n <slot name=\"rootLabel\">Home</slot>\n </span>\n </li>\n <li\n v-for=\"(item, index) in state.items\"\n :key=\"item.label\"\n :class=\"[suit('item'), isLastItem(index) && suit('item', 'selected')]\"\n >\n <span\n :class=\"suit('separator')\"\n aria-hidden=\"true\"\n >\n <slot name=\"separator\">></slot>\n </span>\n <a\n v-if=\"!isLastItem(index)\"\n :href=\"state.createURL(item.value)\"\n :class=\"suit('link')\"\n @click.prevent=\"state.refine(item.value)\"\n >{{ item.label }}</a>\n <span v-else>{{ item.label }}</span>\n </li>\n </ul>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectBreadcrumb } from 'instantsearch.js/es/connectors';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport { createSuitMixin } from '../mixins/suit';\nimport { createWidgetMixin } from '../mixins/widget';\n\nexport default {\n name: 'AisBreadcrumb',\n mixins: [\n createWidgetMixin(\n {\n connector: connectBreadcrumb,\n },\n {\n $$widgetType: 'ais.breadcrumb',\n }\n ),\n createPanelConsumerMixin({\n mapStateToCanRefine: state => Boolean(state.canRefine),\n }),\n createSuitMixin({ name: 'Breadcrumb' }),\n ],\n props: {\n attributes: {\n type: Array,\n required: true,\n },\n separator: {\n type: String,\n default: undefined,\n },\n rootPath: {\n type: String,\n default: undefined,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n widgetParams() {\n return {\n attributes: this.attributes,\n separator: this.separator,\n rootPath: this.rootPath,\n transformItems: this.transformItems,\n };\n },\n },\n methods: {\n isLastItem(index) {\n return this.state.items.length - 1 === index;\n },\n },\n};\n</script>\n"],"names":["name","mixins","createWidgetMixin","connector","connectBreadcrumb","$$widgetType","createPanelConsumerMixin","mapStateToCanRefine","state","Boolean","canRefine","createSuitMixin","props","attributes","type","Array","required","separator","String","default","undefined","rootPath","transformItems","Function","computed","widgetParams","this","methods","isLastItem","index","items","length"],"mappings":"oQAuDe,CACbA,KAAM,gBACNC,OAAQ,CACNC,EACE,CACEC,UAAWC,GAEb,CACEC,aAAc,mBAGlBC,EAAyB,CACvBC,6BAAqBC,UAASC,QAAQD,EAAME,cAE9CC,EAAgB,CAAEX,KAAM,gBAE1BY,MAAO,CACLC,WAAY,CACVC,KAAMC,MACNC,UAAU,GAEZC,UAAW,CACTH,KAAMI,OACNC,aAASC,GAEXC,SAAU,CACRP,KAAMI,OACNC,aAASC,GAEXE,eAAgB,CACdR,KAAMS,SACNJ,aAASC,IAGbI,SAAU,CACRC,8BACS,CACLZ,WAAYa,KAAKb,WACjBI,UAAWS,KAAKT,UAChBI,SAAUK,KAAKL,SACfC,eAAgBI,KAAKJ,kBAI3BK,QAAS,CACPC,oBAAWC,UACFH,KAAKlB,MAAMsB,MAAMC,OAAS,IAAMF"}
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumb.vue_vue&type=template&id=6f46de9a&lang.js","sources":["../../../../src/components/Breadcrumb.vue?vue&type=template&id=6f46de9a&lang.js"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"[suit(), !state.canRefine && suit('', 'noRefinement')]\"\n >\n <slot\n :items=\"state.items\"\n :can-refine=\"state.canRefine\"\n :refine=\"state.refine\"\n :createURL=\"state.createURL\"\n >\n <ul :class=\"suit('list')\">\n <li :class=\"[suit('item'), !state.items.length && suit('item', 'selected')]\">\n <a\n v-if=\"Boolean(state.items.length)\"\n :href=\"state.createURL()\"\n :class=\"suit('link')\"\n @click.prevent=\"state.refine()\"\n >\n <slot name=\"rootLabel\">Home</slot>\n </a>\n <span v-else>\n <slot name=\"rootLabel\">Home</slot>\n </span>\n </li>\n <li\n v-for=\"(item, index) in state.items\"\n :key=\"item.label\"\n :class=\"[suit('item'), isLastItem(index) && suit('item', 'selected')]\"\n >\n <span\n :class=\"suit('separator')\"\n aria-hidden=\"true\"\n >\n <slot name=\"separator\">></slot>\n </span>\n <a\n v-if=\"!isLastItem(index)\"\n :href=\"state.createURL(item.value)\"\n :class=\"suit('link')\"\n @click.prevent=\"state.refine(item.value)\"\n >{{ item.label }}</a>\n <span v-else>{{ item.label }}</span>\n </li>\n </ul>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectBreadcrumb } from 'instantsearch.js/es/connectors';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport { createSuitMixin } from '../mixins/suit';\nimport { createWidgetMixin } from '../mixins/widget';\n\nexport default {\n name: 'AisBreadcrumb',\n mixins: [\n createWidgetMixin({ connector: connectBreadcrumb }),\n createPanelConsumerMixin({\n mapStateToCanRefine: state => Boolean(state.canRefine),\n }),\n createSuitMixin({ name: 'Breadcrumb' }),\n ],\n props: {\n attributes: {\n type: Array,\n required: true,\n },\n separator: {\n type: String,\n default: undefined,\n },\n rootPath: {\n type: String,\n default: undefined,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n widgetParams() {\n return {\n attributes: this.attributes,\n separator: this.separator,\n rootPath: this.rootPath,\n transformItems: this.transformItems,\n };\n },\n },\n methods: {\n isLastItem(index) {\n return this.state.items.length - 1 === index;\n },\n },\n};\n</script>\n"],"names":["_ctx","_createBlock","class","canRefine","_renderSlot","items","refine","createURL","_createVNode","length","Boolean","href","onClick","item","index","key","label","$options","value"],"mappings":"6MAmBmC,sBAGA,YAYA,8CAhCzBA,aADRC,eAEGC,OAAQF,UAASA,QAAMG,WAAaH,6BAErCI,sBACGC,MAAOL,QAAMK,MACbF,UAAYH,QAAMG,UAClBG,OAAQN,QAAMM,OACdC,UAAWP,QAAMO,6BAElBC,QAAKN,MAAOF,iBACVQ,QAAKN,OAAQF,gBAAeA,QAAMK,MAAMI,QAAUT,6BAExCU,QAAQV,QAAMK,MAAMI,aAD5BR,aAEGU,KAAMX,QAAMO,YACZL,MAAOF,eACPY,yCAAeZ,QAAMM,0BAEtBF,qEAEFH,YACEG,+DAGJH,WAC0BD,QAAMK,eAAtBQ,EAAMC,cADhBb,QAEGc,IAAKF,EAAKG,MACVd,OAAQF,eAAciB,aAAWH,IAAUd,6BAE5CQ,UACGN,MAAOF,kCACI,SAEZI,qDAGOa,aAAWH,QAKpBb,aAAgBY,EAAKG,gBANrBf,aAEGU,KAAMX,QAAMO,UAAUM,EAAKK,OAC3BhB,MAAOF,eACPY,6BAAeZ,QAAMM,OAAOO,EAAKK,wBAChCL,EAAKG"}
1
+ {"version":3,"file":"Breadcrumb.vue_vue&type=template&id=6f46de9a&lang.js","sources":["../../../../src/components/Breadcrumb.vue?vue&type=template&id=6f46de9a&lang.js"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"[suit(), !state.canRefine && suit('', 'noRefinement')]\"\n >\n <slot\n :items=\"state.items\"\n :can-refine=\"state.canRefine\"\n :refine=\"state.refine\"\n :createURL=\"state.createURL\"\n >\n <ul :class=\"suit('list')\">\n <li :class=\"[suit('item'), !state.items.length && suit('item', 'selected')]\">\n <a\n v-if=\"Boolean(state.items.length)\"\n :href=\"state.createURL()\"\n :class=\"suit('link')\"\n @click.prevent=\"state.refine()\"\n >\n <slot name=\"rootLabel\">Home</slot>\n </a>\n <span v-else>\n <slot name=\"rootLabel\">Home</slot>\n </span>\n </li>\n <li\n v-for=\"(item, index) in state.items\"\n :key=\"item.label\"\n :class=\"[suit('item'), isLastItem(index) && suit('item', 'selected')]\"\n >\n <span\n :class=\"suit('separator')\"\n aria-hidden=\"true\"\n >\n <slot name=\"separator\">></slot>\n </span>\n <a\n v-if=\"!isLastItem(index)\"\n :href=\"state.createURL(item.value)\"\n :class=\"suit('link')\"\n @click.prevent=\"state.refine(item.value)\"\n >{{ item.label }}</a>\n <span v-else>{{ item.label }}</span>\n </li>\n </ul>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectBreadcrumb } from 'instantsearch.js/es/connectors';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport { createSuitMixin } from '../mixins/suit';\nimport { createWidgetMixin } from '../mixins/widget';\n\nexport default {\n name: 'AisBreadcrumb',\n mixins: [\n createWidgetMixin(\n {\n connector: connectBreadcrumb,\n },\n {\n $$widgetType: 'ais.breadcrumb',\n }\n ),\n createPanelConsumerMixin({\n mapStateToCanRefine: state => Boolean(state.canRefine),\n }),\n createSuitMixin({ name: 'Breadcrumb' }),\n ],\n props: {\n attributes: {\n type: Array,\n required: true,\n },\n separator: {\n type: String,\n default: undefined,\n },\n rootPath: {\n type: String,\n default: undefined,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n widgetParams() {\n return {\n attributes: this.attributes,\n separator: this.separator,\n rootPath: this.rootPath,\n transformItems: this.transformItems,\n };\n },\n },\n methods: {\n isLastItem(index) {\n return this.state.items.length - 1 === index;\n },\n },\n};\n</script>\n"],"names":["_ctx","_createBlock","class","canRefine","_renderSlot","items","refine","createURL","_createVNode","length","Boolean","href","onClick","item","index","key","label","$options","value"],"mappings":"6MAmBmC,sBAGA,YAYA,8CAhCzBA,aADRC,eAEGC,OAAQF,UAASA,QAAMG,WAAaH,6BAErCI,sBACGC,MAAOL,QAAMK,MACbF,UAAYH,QAAMG,UAClBG,OAAQN,QAAMM,OACdC,UAAWP,QAAMO,6BAElBC,QAAKN,MAAOF,iBACVQ,QAAKN,OAAQF,gBAAeA,QAAMK,MAAMI,QAAUT,6BAExCU,QAAQV,QAAMK,MAAMI,aAD5BR,aAEGU,KAAMX,QAAMO,YACZL,MAAOF,eACPY,yCAAeZ,QAAMM,0BAEtBF,qEAEFH,YACEG,+DAGJH,WAC0BD,QAAMK,eAAtBQ,EAAMC,cADhBb,QAEGc,IAAKF,EAAKG,MACVd,OAAQF,eAAciB,aAAWH,IAAUd,6BAE5CQ,UACGN,MAAOF,kCACI,SAEZI,qDAGOa,aAAWH,QAKpBb,aAAgBY,EAAKG,gBANrBf,aAEGU,KAAMX,QAAMO,UAAUM,EAAKK,OAC3BhB,MAAOF,eACPY,6BAAeZ,QAAMM,OAAOO,EAAKK,wBAChCL,EAAKG"}
@@ -1,2 +1,2 @@
1
- import{createSuitMixin as t}from"../mixins/suit.js";import{createWidgetMixin as e}from"../mixins/widget.js";import{connectClearRefinements as i}from"instantsearch.js/es/connectors/index.js";import{createPanelConsumerMixin as n}from"../mixins/panel.js";export default{name:"AisClearRefinements",mixins:[e({connector:i}),n({mapStateToCanRefine:function(t){return Boolean(t.hasRefinements)}}),t({name:"ClearRefinements"})],props:{excludedAttributes:{type:Array,default:void 0},includedAttributes:{type:Array,default:void 0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{includedAttributes:this.includedAttributes,excludedAttributes:this.excludedAttributes,transformItems:this.transformItems}},canRefine:function(){return this.state.hasRefinements}}};
1
+ import{createSuitMixin as e}from"../mixins/suit.js";import{createWidgetMixin as t}from"../mixins/widget.js";import{connectClearRefinements as i}from"instantsearch.js/es/connectors/index.js";import{createPanelConsumerMixin as n}from"../mixins/panel.js";export default{name:"AisClearRefinements",mixins:[t({connector:i},{$$widgetType:"ais.clearRefinements"}),n({mapStateToCanRefine:function(e){return Boolean(e.hasRefinements)}}),e({name:"ClearRefinements"})],props:{excludedAttributes:{type:Array,default:void 0},includedAttributes:{type:Array,default:void 0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{includedAttributes:this.includedAttributes,excludedAttributes:this.excludedAttributes,transformItems:this.transformItems}},canRefine:function(){return this.state.hasRefinements}}};
2
2
  //# sourceMappingURL=ClearRefinements.vue_vue&type=script&lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ClearRefinements.vue_vue&type=script&lang.js","sources":["../../../../src/components/ClearRefinements.vue"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"suit()\"\n >\n <slot\n :can-refine=\"canRefine\"\n :refine=\"state.refine\"\n :createURL=\"state.createURL\"\n >\n <button\n type=\"reset\"\n :class=\"[suit('button'), !canRefine && suit('button', 'disabled')]\"\n :disabled=\"!canRefine\"\n @click.prevent=\"state.refine\"\n >\n <slot name=\"resetLabel\">Clear refinements</slot>\n </button>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectClearRefinements } from 'instantsearch.js/es/connectors';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport { createSuitMixin } from '../mixins/suit';\nimport { createWidgetMixin } from '../mixins/widget';\n\nexport default {\n name: 'AisClearRefinements',\n mixins: [\n createWidgetMixin({ connector: connectClearRefinements }),\n createPanelConsumerMixin({\n mapStateToCanRefine: state => Boolean(state.hasRefinements),\n }),\n createSuitMixin({ name: 'ClearRefinements' }),\n ],\n props: {\n excludedAttributes: {\n type: Array,\n default: undefined,\n },\n includedAttributes: {\n type: Array,\n default: undefined,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n widgetParams() {\n return {\n includedAttributes: this.includedAttributes,\n excludedAttributes: this.excludedAttributes,\n transformItems: this.transformItems,\n };\n },\n canRefine() {\n return this.state.hasRefinements;\n },\n },\n};\n</script>\n"],"names":["name","mixins","createWidgetMixin","connector","connectClearRefinements","createPanelConsumerMixin","mapStateToCanRefine","state","Boolean","hasRefinements","createSuitMixin","props","excludedAttributes","type","Array","default","undefined","includedAttributes","transformItems","Function","computed","widgetParams","this","canRefine"],"mappings":"0QA4Be,CACbA,KAAM,sBACNC,OAAQ,CACNC,EAAkB,CAAEC,UAAWC,IAC/BC,EAAyB,CACvBC,6BAAqBC,UAASC,QAAQD,EAAME,mBAE9CC,EAAgB,CAAEV,KAAM,sBAE1BW,MAAO,CACLC,mBAAoB,CAClBC,KAAMC,MACNC,aAASC,GAEXC,mBAAoB,CAClBJ,KAAMC,MACNC,aAASC,GAEXE,eAAgB,CACdL,KAAMM,SACNJ,aAASC,IAGbI,SAAU,CACRC,8BACS,CACLJ,mBAAoBK,KAAKL,mBACzBL,mBAAoBU,KAAKV,mBACzBM,eAAgBI,KAAKJ,iBAGzBK,4BACSD,KAAKf,MAAME"}
1
+ {"version":3,"file":"ClearRefinements.vue_vue&type=script&lang.js","sources":["../../../../src/components/ClearRefinements.vue"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"suit()\"\n >\n <slot\n :can-refine=\"canRefine\"\n :refine=\"state.refine\"\n :createURL=\"state.createURL\"\n >\n <button\n type=\"reset\"\n :class=\"[suit('button'), !canRefine && suit('button', 'disabled')]\"\n :disabled=\"!canRefine\"\n @click.prevent=\"state.refine\"\n >\n <slot name=\"resetLabel\">Clear refinements</slot>\n </button>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectClearRefinements } from 'instantsearch.js/es/connectors';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport { createSuitMixin } from '../mixins/suit';\nimport { createWidgetMixin } from '../mixins/widget';\n\nexport default {\n name: 'AisClearRefinements',\n mixins: [\n createWidgetMixin(\n {\n connector: connectClearRefinements,\n },\n {\n $$widgetType: 'ais.clearRefinements',\n }\n ),\n createPanelConsumerMixin({\n mapStateToCanRefine: state => Boolean(state.hasRefinements),\n }),\n createSuitMixin({ name: 'ClearRefinements' }),\n ],\n props: {\n excludedAttributes: {\n type: Array,\n default: undefined,\n },\n includedAttributes: {\n type: Array,\n default: undefined,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n widgetParams() {\n return {\n includedAttributes: this.includedAttributes,\n excludedAttributes: this.excludedAttributes,\n transformItems: this.transformItems,\n };\n },\n canRefine() {\n return this.state.hasRefinements;\n },\n },\n};\n</script>\n"],"names":["name","mixins","createWidgetMixin","connector","connectClearRefinements","$$widgetType","createPanelConsumerMixin","mapStateToCanRefine","state","Boolean","hasRefinements","createSuitMixin","props","excludedAttributes","type","Array","default","undefined","includedAttributes","transformItems","Function","computed","widgetParams","this","canRefine"],"mappings":"0QA4Be,CACbA,KAAM,sBACNC,OAAQ,CACNC,EACE,CACEC,UAAWC,GAEb,CACEC,aAAc,yBAGlBC,EAAyB,CACvBC,6BAAqBC,UAASC,QAAQD,EAAME,mBAE9CC,EAAgB,CAAEX,KAAM,sBAE1BY,MAAO,CACLC,mBAAoB,CAClBC,KAAMC,MACNC,aAASC,GAEXC,mBAAoB,CAClBJ,KAAMC,MACNC,aAASC,GAEXE,eAAgB,CACdL,KAAMM,SACNJ,aAASC,IAGbI,SAAU,CACRC,8BACS,CACLJ,mBAAoBK,KAAKL,mBACzBL,mBAAoBU,KAAKV,mBACzBM,eAAgBI,KAAKJ,iBAGzBK,4BACSD,KAAKf,MAAME"}
@@ -1 +1 @@
1
- {"version":3,"file":"ClearRefinements.vue_vue&type=template&id=410a3aaa&lang.js","sources":["../../../../src/components/ClearRefinements.vue?vue&type=template&id=410a3aaa&lang.js"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"suit()\"\n >\n <slot\n :can-refine=\"canRefine\"\n :refine=\"state.refine\"\n :createURL=\"state.createURL\"\n >\n <button\n type=\"reset\"\n :class=\"[suit('button'), !canRefine && suit('button', 'disabled')]\"\n :disabled=\"!canRefine\"\n @click.prevent=\"state.refine\"\n >\n <slot name=\"resetLabel\">Clear refinements</slot>\n </button>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectClearRefinements } from 'instantsearch.js/es/connectors';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport { createSuitMixin } from '../mixins/suit';\nimport { createWidgetMixin } from '../mixins/widget';\n\nexport default {\n name: 'AisClearRefinements',\n mixins: [\n createWidgetMixin({ connector: connectClearRefinements }),\n createPanelConsumerMixin({\n mapStateToCanRefine: state => Boolean(state.hasRefinements),\n }),\n createSuitMixin({ name: 'ClearRefinements' }),\n ],\n props: {\n excludedAttributes: {\n type: Array,\n default: undefined,\n },\n includedAttributes: {\n type: Array,\n default: undefined,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n widgetParams() {\n return {\n includedAttributes: this.includedAttributes,\n excludedAttributes: this.excludedAttributes,\n transformItems: this.transformItems,\n };\n },\n canRefine() {\n return this.state.hasRefinements;\n },\n },\n};\n</script>\n"],"names":["_ctx","_createBlock","class","_renderSlot","canRefine","$options","refine","createURL","_createVNode","type","disabled","onClick"],"mappings":"0JAgBgC,oDAdtBA,aADRC,eAEGC,MAAOF,WAERG,sBACGC,UAAYC,YACZC,OAAQN,QAAMM,OACdC,UAAWP,QAAMO,6BAElBC,YACEC,KAAK,QACJP,OAAQF,kBAAiBK,aAAaL,6BACtCU,UAAWL,YACXM,iGAAeX,QAAMM,WAANN,SAAMM,mCAEtBH"}
1
+ {"version":3,"file":"ClearRefinements.vue_vue&type=template&id=410a3aaa&lang.js","sources":["../../../../src/components/ClearRefinements.vue?vue&type=template&id=410a3aaa&lang.js"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"suit()\"\n >\n <slot\n :can-refine=\"canRefine\"\n :refine=\"state.refine\"\n :createURL=\"state.createURL\"\n >\n <button\n type=\"reset\"\n :class=\"[suit('button'), !canRefine && suit('button', 'disabled')]\"\n :disabled=\"!canRefine\"\n @click.prevent=\"state.refine\"\n >\n <slot name=\"resetLabel\">Clear refinements</slot>\n </button>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectClearRefinements } from 'instantsearch.js/es/connectors';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport { createSuitMixin } from '../mixins/suit';\nimport { createWidgetMixin } from '../mixins/widget';\n\nexport default {\n name: 'AisClearRefinements',\n mixins: [\n createWidgetMixin(\n {\n connector: connectClearRefinements,\n },\n {\n $$widgetType: 'ais.clearRefinements',\n }\n ),\n createPanelConsumerMixin({\n mapStateToCanRefine: state => Boolean(state.hasRefinements),\n }),\n createSuitMixin({ name: 'ClearRefinements' }),\n ],\n props: {\n excludedAttributes: {\n type: Array,\n default: undefined,\n },\n includedAttributes: {\n type: Array,\n default: undefined,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n widgetParams() {\n return {\n includedAttributes: this.includedAttributes,\n excludedAttributes: this.excludedAttributes,\n transformItems: this.transformItems,\n };\n },\n canRefine() {\n return this.state.hasRefinements;\n },\n },\n};\n</script>\n"],"names":["_ctx","_createBlock","class","_renderSlot","canRefine","$options","refine","createURL","_createVNode","type","disabled","onClick"],"mappings":"0JAgBgC,oDAdtBA,aADRC,eAEGC,MAAOF,WAERG,sBACGC,UAAYC,YACZC,OAAQN,QAAMM,OACdC,UAAWP,QAAMO,6BAElBC,YACEC,KAAK,QACJP,OAAQF,kBAAiBK,aAAaL,6BACtCU,UAAWL,YACXM,iGAAeX,QAAMM,WAANN,SAAMM,mCAEtBH"}
@@ -1,2 +1,2 @@
1
- import{createSuitMixin as t}from"../mixins/suit.js";import{renderCompat as e}from"../util/vue-compat/index-vue3.js";import{createWidgetMixin as s}from"../mixins/widget.js";import{connectConfigure as r}from"instantsearch.js/es/connectors/index.js";export default{inheritAttrs:!1,name:"AisConfigure",mixins:[t({name:"Configure"}),s({connector:r})],computed:{widgetParams:function(){return{searchParameters:this.$attrs}}},render:e(function(t){var e=this.$slots.default;return this.state&&e?t("div",{class:this.suit()},[e({refine:this.state.refine,searchParameters:this.state.widgetParams.searchParameters})]):null})};
1
+ import{createSuitMixin as t}from"../mixins/suit.js";import{renderCompat as e}from"../util/vue-compat/index-vue3.js";import{createWidgetMixin as s}from"../mixins/widget.js";import{connectConfigure as i}from"instantsearch.js/es/connectors/index.js";export default{inheritAttrs:!1,name:"AisConfigure",mixins:[t({name:"Configure"}),s({connector:i},{$$widgetType:"ais.configure"})],computed:{widgetParams:function(){return{searchParameters:this.$attrs}}},render:e(function(t){var e=this.$slots.default;return this.state&&e?t("div",{class:this.suit()},[e({refine:this.state.refine,searchParameters:this.state.widgetParams.searchParameters})]):null})};
2
2
  //# sourceMappingURL=Configure.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Configure.js","sources":["../../../../src/components/Configure.js"],"sourcesContent":["import { createWidgetMixin } from '../mixins/widget';\nimport { createSuitMixin } from '../mixins/suit';\nimport { connectConfigure } from 'instantsearch.js/es/connectors';\nimport { isVue3, renderCompat } from '../util/vue-compat';\n\nexport default {\n inheritAttrs: false,\n name: 'AisConfigure',\n mixins: [\n createSuitMixin({ name: 'Configure' }),\n createWidgetMixin({ connector: connectConfigure }),\n ],\n computed: {\n widgetParams() {\n return {\n searchParameters: this.$attrs,\n };\n },\n },\n render: renderCompat(function(h) {\n const slot = isVue3 ? this.$slots.default : this.$scopedSlots.default;\n\n if (!this.state || !slot) {\n return null;\n }\n\n return h(\n 'div',\n {\n class: this.suit(),\n },\n [\n slot({\n refine: this.state.refine,\n searchParameters: this.state.widgetParams.searchParameters,\n }),\n ]\n );\n }),\n};\n"],"names":["inheritAttrs","name","mixins","createSuitMixin","createWidgetMixin","connector","connectConfigure","computed","widgetParams","searchParameters","this","$attrs","render","renderCompat","h","slot","$slots","default","state","class","suit","refine"],"mappings":"qQAKe,CACbA,cAAc,EACdC,KAAM,eACNC,OAAQ,CACNC,EAAgB,CAAEF,KAAM,cACxBG,EAAkB,CAAEC,UAAWC,KAEjCC,SAAU,CACRC,8BACS,CACLC,iBAAkBC,KAAKC,UAI7BC,OAAQC,EAAa,SAASC,OACtBC,EAAgBL,KAAKM,OAAOC,eAE7BP,KAAKQ,OAAUH,EAIbD,EACL,MACA,CACEK,MAAOT,KAAKU,QAEd,CACEL,EAAK,CACHM,OAAQX,KAAKQ,MAAMG,OACnBZ,iBAAkBC,KAAKQ,MAAMV,aAAaC,qBAXvC"}
1
+ {"version":3,"file":"Configure.js","sources":["../../../../src/components/Configure.js"],"sourcesContent":["import { createWidgetMixin } from '../mixins/widget';\nimport { createSuitMixin } from '../mixins/suit';\nimport { connectConfigure } from 'instantsearch.js/es/connectors';\nimport { isVue3, renderCompat } from '../util/vue-compat';\n\nexport default {\n inheritAttrs: false,\n name: 'AisConfigure',\n mixins: [\n createSuitMixin({ name: 'Configure' }),\n createWidgetMixin(\n {\n connector: connectConfigure,\n },\n {\n $$widgetType: 'ais.configure',\n }\n ),\n ],\n computed: {\n widgetParams() {\n return {\n searchParameters: this.$attrs,\n };\n },\n },\n render: renderCompat(function(h) {\n const slot = isVue3 ? this.$slots.default : this.$scopedSlots.default;\n\n if (!this.state || !slot) {\n return null;\n }\n\n return h(\n 'div',\n {\n class: this.suit(),\n },\n [\n slot({\n refine: this.state.refine,\n searchParameters: this.state.widgetParams.searchParameters,\n }),\n ]\n );\n }),\n};\n"],"names":["inheritAttrs","name","mixins","createSuitMixin","createWidgetMixin","connector","connectConfigure","$$widgetType","computed","widgetParams","searchParameters","this","$attrs","render","renderCompat","h","slot","$slots","default","state","class","suit","refine"],"mappings":"qQAKe,CACbA,cAAc,EACdC,KAAM,eACNC,OAAQ,CACNC,EAAgB,CAAEF,KAAM,cACxBG,EACE,CACEC,UAAWC,GAEb,CACEC,aAAc,mBAIpBC,SAAU,CACRC,8BACS,CACLC,iBAAkBC,KAAKC,UAI7BC,OAAQC,EAAa,SAASC,OACtBC,EAAgBL,KAAKM,OAAOC,eAE7BP,KAAKQ,OAAUH,EAIbD,EACL,MACA,CACEK,MAAOT,KAAKU,QAEd,CACEL,EAAK,CACHM,OAAQX,KAAKQ,MAAMG,OACnBZ,iBAAkBC,KAAKQ,MAAMV,aAAaC,qBAXvC"}
@@ -1,2 +1,2 @@
1
- import{createWidgetMixin as t}from"../mixins/widget.js";import{EXPERIMENTAL_connectConfigureRelatedItems as e}from"instantsearch.js/es/connectors/index.js";export default{inheritAttrs:!1,name:"AisExperimentalConfigureRelatedItems",mixins:[t({connector:e})],props:{hit:{type:Object,required:!0},matchingPatterns:{type:Object,required:!0},transformSearchParameters:{type:Function,required:!1}},computed:{widgetParams:function(){return{hit:this.hit,matchingPatterns:this.matchingPatterns,transformSearchParameters:this.transformSearchParameters}}},render:function(){return null}};
1
+ import{createWidgetMixin as e}from"../mixins/widget.js";import{EXPERIMENTAL_connectConfigureRelatedItems as t}from"instantsearch.js/es/connectors/index.js";export default{inheritAttrs:!1,name:"AisExperimentalConfigureRelatedItems",mixins:[e({connector:t},{$$widgetType:"ais.configureRelatedItems"})],props:{hit:{type:Object,required:!0},matchingPatterns:{type:Object,required:!0},transformSearchParameters:{type:Function,required:!1}},computed:{widgetParams:function(){return{hit:this.hit,matchingPatterns:this.matchingPatterns,transformSearchParameters:this.transformSearchParameters}}},render:function(){return null}};
2
2
  //# sourceMappingURL=ConfigureRelatedItems.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigureRelatedItems.js","sources":["../../../../src/components/ConfigureRelatedItems.js"],"sourcesContent":["import { createWidgetMixin } from '../mixins/widget';\nimport { EXPERIMENTAL_connectConfigureRelatedItems } from 'instantsearch.js/es/connectors';\n\nexport default {\n inheritAttrs: false,\n name: 'AisExperimentalConfigureRelatedItems',\n mixins: [\n createWidgetMixin({ connector: EXPERIMENTAL_connectConfigureRelatedItems }),\n ],\n props: {\n hit: {\n type: Object,\n required: true,\n },\n matchingPatterns: {\n type: Object,\n required: true,\n },\n transformSearchParameters: {\n type: Function,\n required: false,\n },\n },\n computed: {\n widgetParams() {\n return {\n hit: this.hit,\n matchingPatterns: this.matchingPatterns,\n transformSearchParameters: this.transformSearchParameters,\n };\n },\n },\n render() {\n return null;\n },\n};\n"],"names":["inheritAttrs","name","mixins","createWidgetMixin","connector","EXPERIMENTAL_connectConfigureRelatedItems","props","hit","type","Object","required","matchingPatterns","transformSearchParameters","Function","computed","widgetParams","this","render"],"mappings":"0KAGe,CACbA,cAAc,EACdC,KAAM,uCACNC,OAAQ,CACNC,EAAkB,CAAEC,UAAWC,KAEjCC,MAAO,CACLC,IAAK,CACHC,KAAMC,OACNC,UAAU,GAEZC,iBAAkB,CAChBH,KAAMC,OACNC,UAAU,GAEZE,0BAA2B,CACzBJ,KAAMK,SACNH,UAAU,IAGdI,SAAU,CACRC,8BACS,CACLR,IAAKS,KAAKT,IACVI,iBAAkBK,KAAKL,iBACvBC,0BAA2BI,KAAKJ,6BAItCK,yBACS"}
1
+ {"version":3,"file":"ConfigureRelatedItems.js","sources":["../../../../src/components/ConfigureRelatedItems.js"],"sourcesContent":["import { createWidgetMixin } from '../mixins/widget';\nimport { EXPERIMENTAL_connectConfigureRelatedItems } from 'instantsearch.js/es/connectors';\n\nexport default {\n inheritAttrs: false,\n name: 'AisExperimentalConfigureRelatedItems',\n mixins: [\n createWidgetMixin(\n {\n connector: EXPERIMENTAL_connectConfigureRelatedItems,\n },\n {\n $$widgetType: 'ais.configureRelatedItems',\n }\n ),\n ],\n props: {\n hit: {\n type: Object,\n required: true,\n },\n matchingPatterns: {\n type: Object,\n required: true,\n },\n transformSearchParameters: {\n type: Function,\n required: false,\n },\n },\n computed: {\n widgetParams() {\n return {\n hit: this.hit,\n matchingPatterns: this.matchingPatterns,\n transformSearchParameters: this.transformSearchParameters,\n };\n },\n },\n render() {\n return null;\n },\n};\n"],"names":["inheritAttrs","name","mixins","createWidgetMixin","connector","EXPERIMENTAL_connectConfigureRelatedItems","$$widgetType","props","hit","type","Object","required","matchingPatterns","transformSearchParameters","Function","computed","widgetParams","this","render"],"mappings":"0KAGe,CACbA,cAAc,EACdC,KAAM,uCACNC,OAAQ,CACNC,EACE,CACEC,UAAWC,GAEb,CACEC,aAAc,+BAIpBC,MAAO,CACLC,IAAK,CACHC,KAAMC,OACNC,UAAU,GAEZC,iBAAkB,CAChBH,KAAMC,OACNC,UAAU,GAEZE,0BAA2B,CACzBJ,KAAMK,SACNH,UAAU,IAGdI,SAAU,CACRC,8BACS,CACLR,IAAKS,KAAKT,IACVI,iBAAkBK,KAAKL,iBACvBC,0BAA2BI,KAAKJ,6BAItCK,yBACS"}
@@ -1,2 +1,2 @@
1
- import{createSuitMixin as t}from"../mixins/suit.js";import{createWidgetMixin as e}from"../mixins/widget.js";import{connectCurrentRefinements as i}from"instantsearch.js/es/connectors/index.js";import{createPanelConsumerMixin as n}from"../mixins/panel.js";export default{name:"AisCurrentRefinements",mixins:[t({name:"CurrentRefinements"}),e({connector:i}),n({mapStateToCanRefine:function(t){return Boolean(t.items)&&t.items.length>0}})],props:{includedAttributes:{type:Array,default:void 0},excludedAttributes:{type:Array,default:void 0},transformItems:{type:Function,default:void 0}},computed:{noRefinement:function(){return this.state&&0===this.state.items.length},widgetParams:function(){return{includedAttributes:this.includedAttributes,excludedAttributes:this.excludedAttributes,transformItems:this.transformItems}}},methods:{createItemKey:function(t){var e=t.attribute,i=t.value;return[e,t.type,i,t.operator].join(":")},capitalize:function(t){return t?t.toString().charAt(0).toLocaleUpperCase()+t.toString().slice(1):""}}};
1
+ import{createSuitMixin as t}from"../mixins/suit.js";import{createWidgetMixin as e}from"../mixins/widget.js";import{connectCurrentRefinements as i}from"instantsearch.js/es/connectors/index.js";import{createPanelConsumerMixin as n}from"../mixins/panel.js";export default{name:"AisCurrentRefinements",mixins:[t({name:"CurrentRefinements"}),e({connector:i},{$$widgetType:"ais.currentRefinements"}),n({mapStateToCanRefine:function(t){return Boolean(t.items)&&t.items.length>0}})],props:{includedAttributes:{type:Array,default:void 0},excludedAttributes:{type:Array,default:void 0},transformItems:{type:Function,default:void 0}},computed:{noRefinement:function(){return this.state&&0===this.state.items.length},widgetParams:function(){return{includedAttributes:this.includedAttributes,excludedAttributes:this.excludedAttributes,transformItems:this.transformItems}}},methods:{createItemKey:function(t){var e=t.attribute,i=t.value;return[e,t.type,i,t.operator].join(":")},capitalize:function(t){return t?t.toString().charAt(0).toLocaleUpperCase()+t.toString().slice(1):""}}};
2
2
  //# sourceMappingURL=CurrentRefinements.vue_vue&type=script&lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CurrentRefinements.vue_vue&type=script&lang.js","sources":["../../../../src/components/CurrentRefinements.vue"],"sourcesContent":["<template>\n <div\n :class=\"[suit(), noRefinement && suit('','noRefinement')]\"\n v-if=\"state\"\n >\n <slot\n :refine=\"state.refine\"\n :items=\"state.items\"\n :createURL=\"state.createURL\"\n >\n <ul :class=\"suit('list')\">\n <li\n v-for=\"item in state.items\"\n :key=\"item.attribute\"\n :class=\"suit('item')\"\n >\n <slot\n name=\"item\"\n :refine=\"item.refine\"\n :item=\"item\"\n :createURL=\"state.createURL\"\n >\n <span :class=\"suit('label')\">{{ capitalize(item.label) }}: </span>\n <span\n v-for=\"refinement in item.refinements\"\n :key=\"createItemKey(refinement)\"\n :class=\"suit('category')\"\n >\n <slot\n name=\"refinement\"\n :refine=\"item.refine\"\n :refinement=\"refinement\"\n :createURL=\"state.createURL\"\n >\n <span :class=\"suit('categoryLabel')\">\n <q v-if=\"refinement.attribute === 'query'\">{{ refinement.label }}</q>\n <template v-else>\n {{ refinement.label }}\n </template>\n </span>\n <button\n :class=\"suit('delete')\"\n @click=\"item.refine(refinement)\"\n >\n ✕\n </button>\n </slot>\n </span>\n </slot>\n </li>\n </ul>\n </slot>\n </div>\n</template>\n\n<script>\nimport { createWidgetMixin } from '../mixins/widget';\nimport { connectCurrentRefinements } from 'instantsearch.js/es/connectors';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisCurrentRefinements',\n mixins: [\n createSuitMixin({ name: 'CurrentRefinements' }),\n createWidgetMixin({ connector: connectCurrentRefinements }),\n createPanelConsumerMixin({\n mapStateToCanRefine: state =>\n Boolean(state.items) && state.items.length > 0,\n }),\n ],\n props: {\n includedAttributes: {\n type: Array,\n default: undefined,\n },\n excludedAttributes: {\n type: Array,\n default: undefined,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n noRefinement() {\n return this.state && this.state.items.length === 0;\n },\n widgetParams() {\n return {\n includedAttributes: this.includedAttributes,\n excludedAttributes: this.excludedAttributes,\n transformItems: this.transformItems,\n };\n },\n },\n methods: {\n createItemKey({ attribute, value, type, operator }) {\n return [attribute, type, value, operator].join(':');\n },\n capitalize(value) {\n if (!value) return '';\n return (\n value\n .toString()\n .charAt(0)\n .toLocaleUpperCase() + value.toString().slice(1)\n );\n },\n },\n};\n</script>\n"],"names":["name","mixins","createSuitMixin","createWidgetMixin","connector","connectCurrentRefinements","createPanelConsumerMixin","mapStateToCanRefine","state","Boolean","items","length","props","includedAttributes","type","Array","default","undefined","excludedAttributes","transformItems","Function","computed","noRefinement","this","widgetParams","methods","createItemKey","ref","attribute","value","join","capitalize","toString","charAt","toLocaleUpperCase","slice"],"mappings":"4QA6De,CACbA,KAAM,wBACNC,OAAQ,CACNC,EAAgB,CAAEF,KAAM,uBACxBG,EAAkB,CAAEC,UAAWC,IAC/BC,EAAyB,CACvBC,6BAAqBC,UACnBC,QAAQD,EAAME,QAAUF,EAAME,MAAMC,OAAS,MAGnDC,MAAO,CACLC,mBAAoB,CAClBC,KAAMC,MACNC,aAASC,GAEXC,mBAAoB,CAClBJ,KAAMC,MACNC,aAASC,GAEXE,eAAgB,CACdL,KAAMM,SACNJ,aAASC,IAGbI,SAAU,CACRC,+BACSC,KAAKf,OAAqC,IAA5Be,KAAKf,MAAME,MAAMC,QAExCa,8BACS,CACLX,mBAAoBU,KAAKV,mBACzBK,mBAAoBK,KAAKL,mBACzBC,eAAgBI,KAAKJ,kBAI3BM,QAAS,CACPC,uBAAcC,qCACL,CAACC,SAAiBC,cAAiBC,KAAK,MAEjDC,oBAAWF,UACJA,EAEHA,EACGG,WACAC,OAAO,GACPC,oBAAsBL,EAAMG,WAAWG,MAAM,GAL/B"}
1
+ {"version":3,"file":"CurrentRefinements.vue_vue&type=script&lang.js","sources":["../../../../src/components/CurrentRefinements.vue"],"sourcesContent":["<template>\n <div\n :class=\"[suit(), noRefinement && suit('','noRefinement')]\"\n v-if=\"state\"\n >\n <slot\n :refine=\"state.refine\"\n :items=\"state.items\"\n :createURL=\"state.createURL\"\n >\n <ul :class=\"suit('list')\">\n <li\n v-for=\"item in state.items\"\n :key=\"item.attribute\"\n :class=\"suit('item')\"\n >\n <slot\n name=\"item\"\n :refine=\"item.refine\"\n :item=\"item\"\n :createURL=\"state.createURL\"\n >\n <span :class=\"suit('label')\">{{ capitalize(item.label) }}: </span>\n <span\n v-for=\"refinement in item.refinements\"\n :key=\"createItemKey(refinement)\"\n :class=\"suit('category')\"\n >\n <slot\n name=\"refinement\"\n :refine=\"item.refine\"\n :refinement=\"refinement\"\n :createURL=\"state.createURL\"\n >\n <span :class=\"suit('categoryLabel')\">\n <q v-if=\"refinement.attribute === 'query'\">{{ refinement.label }}</q>\n <template v-else>\n {{ refinement.label }}\n </template>\n </span>\n <button\n :class=\"suit('delete')\"\n @click=\"item.refine(refinement)\"\n >\n ✕\n </button>\n </slot>\n </span>\n </slot>\n </li>\n </ul>\n </slot>\n </div>\n</template>\n\n<script>\nimport { createWidgetMixin } from '../mixins/widget';\nimport { connectCurrentRefinements } from 'instantsearch.js/es/connectors';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisCurrentRefinements',\n mixins: [\n createSuitMixin({ name: 'CurrentRefinements' }),\n createWidgetMixin(\n {\n connector: connectCurrentRefinements,\n },\n {\n $$widgetType: 'ais.currentRefinements',\n }\n ),\n createPanelConsumerMixin({\n mapStateToCanRefine: state =>\n Boolean(state.items) && state.items.length > 0,\n }),\n ],\n props: {\n includedAttributes: {\n type: Array,\n default: undefined,\n },\n excludedAttributes: {\n type: Array,\n default: undefined,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n noRefinement() {\n return this.state && this.state.items.length === 0;\n },\n widgetParams() {\n return {\n includedAttributes: this.includedAttributes,\n excludedAttributes: this.excludedAttributes,\n transformItems: this.transformItems,\n };\n },\n },\n methods: {\n createItemKey({ attribute, value, type, operator }) {\n return [attribute, type, value, operator].join(':');\n },\n capitalize(value) {\n if (!value) return '';\n return (\n value\n .toString()\n .charAt(0)\n .toLocaleUpperCase() + value.toString().slice(1)\n );\n },\n },\n};\n</script>\n"],"names":["name","mixins","createSuitMixin","createWidgetMixin","connector","connectCurrentRefinements","$$widgetType","createPanelConsumerMixin","mapStateToCanRefine","state","Boolean","items","length","props","includedAttributes","type","Array","default","undefined","excludedAttributes","transformItems","Function","computed","noRefinement","this","widgetParams","methods","createItemKey","ref","attribute","value","join","capitalize","toString","charAt","toLocaleUpperCase","slice"],"mappings":"4QA6De,CACbA,KAAM,wBACNC,OAAQ,CACNC,EAAgB,CAAEF,KAAM,uBACxBG,EACE,CACEC,UAAWC,GAEb,CACEC,aAAc,2BAGlBC,EAAyB,CACvBC,6BAAqBC,UACnBC,QAAQD,EAAME,QAAUF,EAAME,MAAMC,OAAS,MAGnDC,MAAO,CACLC,mBAAoB,CAClBC,KAAMC,MACNC,aAASC,GAEXC,mBAAoB,CAClBJ,KAAMC,MACNC,aAASC,GAEXE,eAAgB,CACdL,KAAMM,SACNJ,aAASC,IAGbI,SAAU,CACRC,+BACSC,KAAKf,OAAqC,IAA5Be,KAAKf,MAAME,MAAMC,QAExCa,8BACS,CACLX,mBAAoBU,KAAKV,mBACzBK,mBAAoBK,KAAKL,mBACzBC,eAAgBI,KAAKJ,kBAI3BM,QAAS,CACPC,uBAAcC,qCACL,CAACC,SAAiBC,cAAiBC,KAAK,MAEjDC,oBAAWF,UACJA,EAEHA,EACGG,WACAC,OAAO,GACPC,oBAAsBL,EAAMG,WAAWG,MAAM,GAL/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"CurrentRefinements.vue_vue&type=template&id=4f1917ff&lang.js","sources":["../../../../src/components/CurrentRefinements.vue?vue&type=template&id=4f1917ff&lang.js"],"sourcesContent":["<template>\n <div\n :class=\"[suit(), noRefinement && suit('','noRefinement')]\"\n v-if=\"state\"\n >\n <slot\n :refine=\"state.refine\"\n :items=\"state.items\"\n :createURL=\"state.createURL\"\n >\n <ul :class=\"suit('list')\">\n <li\n v-for=\"item in state.items\"\n :key=\"item.attribute\"\n :class=\"suit('item')\"\n >\n <slot\n name=\"item\"\n :refine=\"item.refine\"\n :item=\"item\"\n :createURL=\"state.createURL\"\n >\n <span :class=\"suit('label')\">{{ capitalize(item.label) }}: </span>\n <span\n v-for=\"refinement in item.refinements\"\n :key=\"createItemKey(refinement)\"\n :class=\"suit('category')\"\n >\n <slot\n name=\"refinement\"\n :refine=\"item.refine\"\n :refinement=\"refinement\"\n :createURL=\"state.createURL\"\n >\n <span :class=\"suit('categoryLabel')\">\n <q v-if=\"refinement.attribute === 'query'\">{{ refinement.label }}</q>\n <template v-else>\n {{ refinement.label }}\n </template>\n </span>\n <button\n :class=\"suit('delete')\"\n @click=\"item.refine(refinement)\"\n >\n ✕\n </button>\n </slot>\n </span>\n </slot>\n </li>\n </ul>\n </slot>\n </div>\n</template>\n\n<script>\nimport { createWidgetMixin } from '../mixins/widget';\nimport { connectCurrentRefinements } from 'instantsearch.js/es/connectors';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisCurrentRefinements',\n mixins: [\n createSuitMixin({ name: 'CurrentRefinements' }),\n createWidgetMixin({ connector: connectCurrentRefinements }),\n createPanelConsumerMixin({\n mapStateToCanRefine: state =>\n Boolean(state.items) && state.items.length > 0,\n }),\n ],\n props: {\n includedAttributes: {\n type: Array,\n default: undefined,\n },\n excludedAttributes: {\n type: Array,\n default: undefined,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n noRefinement() {\n return this.state && this.state.items.length === 0;\n },\n widgetParams() {\n return {\n includedAttributes: this.includedAttributes,\n excludedAttributes: this.excludedAttributes,\n transformItems: this.transformItems,\n };\n },\n },\n methods: {\n createItemKey({ attribute, value, type, operator }) {\n return [attribute, type, value, operator].join(':');\n },\n capitalize(value) {\n if (!value) return '';\n return (\n value\n .toString()\n .charAt(0)\n .toLocaleUpperCase() + value.toString().slice(1)\n );\n },\n },\n};\n</script>\n"],"names":["_ctx","_createBlock","class","$options","_renderSlot","refine","items","createURL","_createVNode","item","key","attribute","label","refinements","refinement","onClick"],"mappings":"+NAGUA,aAFRC,eACGC,OAAQF,SAAQG,gBAAgBH,6BAGjCI,sBACGC,OAAQL,QAAMK,OACdC,MAAON,QAAMM,MACbC,UAAWP,QAAMO,6BAElBC,QAAKN,MAAOF,wBACVC,WACiBD,QAAMM,eAAdG,cADTR,QAEGS,IAAKD,EAAKE,UACVT,MAAOF,iBAERI,mBAEGC,OAAQI,EAAKJ,OACbI,KAAMA,EACNF,UAAWP,QAAMO,6BAElBC,UAAON,MAAOF,mBAAkBG,aAAWM,EAAKG,QAAS,eACzDX,WACuBQ,EAAKI,qBAAnBC,cADTb,UAEGS,IAAKP,gBAAcW,GACnBZ,MAAOF,qBAERI,yBAEGC,OAAQI,EAAKJ,OACbS,WAAYA,EACZP,UAAWP,QAAMO,6BAElBC,UAAON,MAAOF,oCACHc,EAAWH,eAApBV,UAA8Ca,EAAWF,gBACzDX,iBACKa,EAAWF,sBAGlBJ,YACGN,MAAOF,iBACPe,2BAAON,EAAKJ,OAAOS"}
1
+ {"version":3,"file":"CurrentRefinements.vue_vue&type=template&id=4f1917ff&lang.js","sources":["../../../../src/components/CurrentRefinements.vue?vue&type=template&id=4f1917ff&lang.js"],"sourcesContent":["<template>\n <div\n :class=\"[suit(), noRefinement && suit('','noRefinement')]\"\n v-if=\"state\"\n >\n <slot\n :refine=\"state.refine\"\n :items=\"state.items\"\n :createURL=\"state.createURL\"\n >\n <ul :class=\"suit('list')\">\n <li\n v-for=\"item in state.items\"\n :key=\"item.attribute\"\n :class=\"suit('item')\"\n >\n <slot\n name=\"item\"\n :refine=\"item.refine\"\n :item=\"item\"\n :createURL=\"state.createURL\"\n >\n <span :class=\"suit('label')\">{{ capitalize(item.label) }}: </span>\n <span\n v-for=\"refinement in item.refinements\"\n :key=\"createItemKey(refinement)\"\n :class=\"suit('category')\"\n >\n <slot\n name=\"refinement\"\n :refine=\"item.refine\"\n :refinement=\"refinement\"\n :createURL=\"state.createURL\"\n >\n <span :class=\"suit('categoryLabel')\">\n <q v-if=\"refinement.attribute === 'query'\">{{ refinement.label }}</q>\n <template v-else>\n {{ refinement.label }}\n </template>\n </span>\n <button\n :class=\"suit('delete')\"\n @click=\"item.refine(refinement)\"\n >\n ✕\n </button>\n </slot>\n </span>\n </slot>\n </li>\n </ul>\n </slot>\n </div>\n</template>\n\n<script>\nimport { createWidgetMixin } from '../mixins/widget';\nimport { connectCurrentRefinements } from 'instantsearch.js/es/connectors';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisCurrentRefinements',\n mixins: [\n createSuitMixin({ name: 'CurrentRefinements' }),\n createWidgetMixin(\n {\n connector: connectCurrentRefinements,\n },\n {\n $$widgetType: 'ais.currentRefinements',\n }\n ),\n createPanelConsumerMixin({\n mapStateToCanRefine: state =>\n Boolean(state.items) && state.items.length > 0,\n }),\n ],\n props: {\n includedAttributes: {\n type: Array,\n default: undefined,\n },\n excludedAttributes: {\n type: Array,\n default: undefined,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n noRefinement() {\n return this.state && this.state.items.length === 0;\n },\n widgetParams() {\n return {\n includedAttributes: this.includedAttributes,\n excludedAttributes: this.excludedAttributes,\n transformItems: this.transformItems,\n };\n },\n },\n methods: {\n createItemKey({ attribute, value, type, operator }) {\n return [attribute, type, value, operator].join(':');\n },\n capitalize(value) {\n if (!value) return '';\n return (\n value\n .toString()\n .charAt(0)\n .toLocaleUpperCase() + value.toString().slice(1)\n );\n },\n },\n};\n</script>\n"],"names":["_ctx","_createBlock","class","$options","_renderSlot","refine","items","createURL","_createVNode","item","key","attribute","label","refinements","refinement","onClick"],"mappings":"+NAGUA,aAFRC,eACGC,OAAQF,SAAQG,gBAAgBH,6BAGjCI,sBACGC,OAAQL,QAAMK,OACdC,MAAON,QAAMM,MACbC,UAAWP,QAAMO,6BAElBC,QAAKN,MAAOF,wBACVC,WACiBD,QAAMM,eAAdG,cADTR,QAEGS,IAAKD,EAAKE,UACVT,MAAOF,iBAERI,mBAEGC,OAAQI,EAAKJ,OACbI,KAAMA,EACNF,UAAWP,QAAMO,6BAElBC,UAAON,MAAOF,mBAAkBG,aAAWM,EAAKG,QAAS,eACzDX,WACuBQ,EAAKI,qBAAnBC,cADTb,UAEGS,IAAKP,gBAAcW,GACnBZ,MAAOF,qBAERI,yBAEGC,OAAQI,EAAKJ,OACbS,WAAYA,EACZP,UAAWP,QAAMO,6BAElBC,UAAON,MAAOF,oCACHc,EAAWH,eAApBV,UAA8Ca,EAAWF,gBACzDX,iBACKa,EAAWF,sBAGlBJ,YACGN,MAAOF,iBACPe,2BAAON,EAAKJ,OAAOS"}
@@ -1,2 +1,2 @@
1
- import{createSuitMixin as t}from"../mixins/suit.js";import{renderCompat as r,getDefaultSlot as e}from"../util/vue-compat/index-vue3.js";import{createWidgetMixin as i}from"../mixins/widget.js";import{connectDynamicWidgets as s}from"instantsearch.js/es/connectors/index.js";import{_objectSpread as a}from"../util/polyfills.js";export default{name:"AisDynamicWidgets",mixins:[i({connector:s}),t({name:"DynamicWidgets"})],props:{transformItems:{type:Function,default:void 0},facets:{type:Array,default:void 0},maxValuesPerFacet:{type:Number,default:void 0}},render:r(function(t){var r=this,i=new Map;if((e(this)||[]).forEach(function(e){var s=function t(r){var e,i=r.props;if(i){if(i.attribute)return i.attribute;if(Array.isArray(i.attributes))return i.attributes[0]}if(e=r.children&&r.children.default&&r.children.default(),Array.isArray(e))return e.reduce(function(r,e){return r||t(e)},void 0)}(e);s&&i.set(s,t("div",{key:s,class:[r.suit("widget")]},[e]))}),!this.state){var s=[];return i.forEach(function(t){return s.push(t)}),t("div",a({class:[this.suit()]},{attrs:{hidden:!0}}),s)}return t("div",{class:[this.suit()]},this.state.attributesToRender.map(function(t){return i.get(t)}))}),computed:{widgetParams:function(){return{transformItems:this.transformItems,facets:this.facets,maxValuesPerFacet:this.maxValuesPerFacet,widgets:[]}}}};
1
+ import{createSuitMixin as t}from"../mixins/suit.js";import{_objectSpread as e}from"../util/polyfills.js";import{renderCompat as i,getDefaultSlot as r}from"../util/vue-compat/index-vue3.js";import{createWidgetMixin as s}from"../mixins/widget.js";import{connectDynamicWidgets as a}from"instantsearch.js/es/connectors/index.js";export default{name:"AisDynamicWidgets",mixins:[s({connector:a},{$$widgetType:"ais.dynamicWidgets"}),t({name:"DynamicWidgets"})],props:{transformItems:{type:Function,default:void 0},facets:{type:Array,default:void 0},maxValuesPerFacet:{type:Number,default:void 0}},render:i(function(t){var i=this,s=new Map;if((r(this)||[]).forEach(function(e){var r=function t(e){var i,r=e.props;if(r){if(r.attribute)return r.attribute;if(Array.isArray(r.attributes))return r.attributes[0]}if(i=e.children&&e.children.default&&e.children.default(),Array.isArray(i))return i.reduce(function(e,i){return e||t(i)},void 0)}(e);r&&s.set(r,t("div",{key:r,class:[i.suit("widget")]},[e]))}),!this.state){var a=[];return s.forEach(function(t){return a.push(t)}),t("div",e({class:[this.suit()]},{attrs:{hidden:!0}}),a)}return t("div",{class:[this.suit()]},this.state.attributesToRender.map(function(t){return s.get(t)}))}),computed:{widgetParams:function(){return{transformItems:this.transformItems,facets:this.facets,maxValuesPerFacet:this.maxValuesPerFacet,widgets:[]}}}};
2
2
  //# sourceMappingURL=DynamicWidgets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DynamicWidgets.js","sources":["../../../../src/components/DynamicWidgets.js"],"sourcesContent":["import { createWidgetMixin } from '../mixins/widget';\nimport { connectDynamicWidgets } from 'instantsearch.js/es/connectors';\nimport { createSuitMixin } from '../mixins/suit';\nimport { _objectSpread } from '../util/polyfills';\nimport { isVue3, renderCompat, getDefaultSlot } from '../util/vue-compat';\n\nfunction getWidgetAttribute(vnode) {\n const props = isVue3\n ? vnode.props\n : vnode.componentOptions && vnode.componentOptions.propsData;\n if (props) {\n if (props.attribute) {\n return props.attribute;\n }\n if (Array.isArray(props.attributes)) {\n return props.attributes[0];\n }\n }\n\n let children;\n if (isVue3) {\n children =\n vnode.children && vnode.children.default && vnode.children.default();\n } else {\n children =\n vnode.componentOptions && vnode.componentOptions.children\n ? vnode.componentOptions.children\n : vnode.children;\n }\n\n if (Array.isArray(children)) {\n // return first child with a truthy attribute\n return children.reduce(\n (acc, curr) => acc || getWidgetAttribute(curr),\n undefined\n );\n }\n\n return undefined;\n}\n\nexport default {\n name: 'AisDynamicWidgets',\n mixins: [\n createWidgetMixin({ connector: connectDynamicWidgets }),\n createSuitMixin({ name: 'DynamicWidgets' }),\n ],\n props: {\n transformItems: {\n type: Function,\n default: undefined,\n },\n facets: {\n type: Array,\n default: undefined,\n },\n maxValuesPerFacet: {\n type: Number,\n default: undefined,\n },\n },\n render: renderCompat(function(h) {\n const components = new Map();\n\n (getDefaultSlot(this) || []).forEach(vnode => {\n const attribute = getWidgetAttribute(vnode);\n if (attribute) {\n components.set(\n attribute,\n h('div', { key: attribute, class: [this.suit('widget')] }, [vnode])\n );\n }\n });\n\n // by default, render everything, but hidden so that the routing doesn't disappear\n if (!this.state) {\n const allComponents = [];\n components.forEach(component => allComponents.push(component));\n\n return h(\n 'div',\n _objectSpread(\n {\n class: [this.suit()],\n },\n { attrs: { hidden: true } }\n ),\n allComponents\n );\n }\n\n return h(\n 'div',\n { class: [this.suit()] },\n this.state.attributesToRender.map(attribute => components.get(attribute))\n );\n }),\n computed: {\n widgetParams() {\n return {\n transformItems: this.transformItems,\n facets: this.facets,\n maxValuesPerFacet: this.maxValuesPerFacet,\n // we do not pass \"widgets\" to the connector, since Vue is in charge of rendering\n widgets: [],\n };\n },\n },\n};\n"],"names":["name","mixins","createWidgetMixin","connector","connectDynamicWidgets","createSuitMixin","props","transformItems","type","Function","default","undefined","facets","Array","maxValuesPerFacet","Number","render","renderCompat","h","components","Map","getDefaultSlot","this","forEach","vnode","attribute","getWidgetAttribute","children","isArray","attributes","reduce","acc","curr","set","key","class","suit","state","allComponents","component","push","_objectSpread","attrs","hidden","attributesToRender","map","get","computed","widgetParams","widgets"],"mappings":"mVAyCe,CACbA,KAAM,oBACNC,OAAQ,CACNC,EAAkB,CAAEC,UAAWC,IAC/BC,EAAgB,CAAEL,KAAM,oBAE1BM,MAAO,CACLC,eAAgB,CACdC,KAAMC,SACNC,aAASC,GAEXC,OAAQ,CACNJ,KAAMK,MACNH,aAASC,GAEXG,kBAAmB,CACjBN,KAAMO,OACNL,aAASC,IAGbK,OAAQC,EAAa,SAASC,cACtBC,EAAa,IAAIC,QAEtBC,EAAeC,OAAS,IAAIC,iBAAQC,OAC7BC,EA3DZ,SAASC,EAAmBF,OAatBG,EAZErB,EACFkB,EAAMlB,SAENA,EAAO,IACLA,EAAMmB,iBACDnB,EAAMmB,aAEXZ,MAAMe,QAAQtB,EAAMuB,mBACfvB,EAAMuB,WAAW,MAM1BF,EACEH,EAAMG,UAAYH,EAAMG,SAASjB,SAAWc,EAAMG,SAASjB,UAQ3DG,MAAMe,QAAQD,UAETA,EAASG,gBACbC,EAAKC,UAASD,GAAOL,EAAmBM,SACzCrB,GA+BkBe,CAAmBF,GACjCC,GACFN,EAAWc,IACTR,EACAP,EAAE,MAAO,CAAEgB,IAAKT,EAAWU,MAAO,CAACb,EAAKc,KAAK,YAAc,CAACZ,QAM7DF,KAAKe,MAAO,KACTC,EAAgB,UACtBnB,EAAWI,iBAAQgB,UAAaD,EAAcE,KAAKD,KAE5CrB,EACL,MACAuB,EACE,CACEN,MAAO,CAACb,KAAKc,SAEf,CAAEM,MAAO,CAAEC,QAAQ,KAErBL,UAIGpB,EACL,MACA,CAAEiB,MAAO,CAACb,KAAKc,SACfd,KAAKe,MAAMO,mBAAmBC,aAAIpB,UAAaN,EAAW2B,IAAIrB,QAGlEsB,SAAU,CACRC,8BACS,CACLzC,eAAgBe,KAAKf,eACrBK,OAAQU,KAAKV,OACbE,kBAAmBQ,KAAKR,kBAExBmC,QAAS"}
1
+ {"version":3,"file":"DynamicWidgets.js","sources":["../../../../src/components/DynamicWidgets.js"],"sourcesContent":["import { createWidgetMixin } from '../mixins/widget';\nimport { connectDynamicWidgets } from 'instantsearch.js/es/connectors';\nimport { createSuitMixin } from '../mixins/suit';\nimport { _objectSpread } from '../util/polyfills';\nimport { isVue3, renderCompat, getDefaultSlot } from '../util/vue-compat';\n\nfunction getWidgetAttribute(vnode) {\n const props = isVue3\n ? vnode.props\n : vnode.componentOptions && vnode.componentOptions.propsData;\n if (props) {\n if (props.attribute) {\n return props.attribute;\n }\n if (Array.isArray(props.attributes)) {\n return props.attributes[0];\n }\n }\n\n let children;\n if (isVue3) {\n children =\n vnode.children && vnode.children.default && vnode.children.default();\n } else {\n children =\n vnode.componentOptions && vnode.componentOptions.children\n ? vnode.componentOptions.children\n : vnode.children;\n }\n\n if (Array.isArray(children)) {\n // return first child with a truthy attribute\n return children.reduce(\n (acc, curr) => acc || getWidgetAttribute(curr),\n undefined\n );\n }\n\n return undefined;\n}\n\nexport default {\n name: 'AisDynamicWidgets',\n mixins: [\n createWidgetMixin(\n {\n connector: connectDynamicWidgets,\n },\n {\n $$widgetType: 'ais.dynamicWidgets',\n }\n ),\n createSuitMixin({ name: 'DynamicWidgets' }),\n ],\n props: {\n transformItems: {\n type: Function,\n default: undefined,\n },\n facets: {\n type: Array,\n default: undefined,\n },\n maxValuesPerFacet: {\n type: Number,\n default: undefined,\n },\n },\n render: renderCompat(function(h) {\n const components = new Map();\n\n (getDefaultSlot(this) || []).forEach(vnode => {\n const attribute = getWidgetAttribute(vnode);\n if (attribute) {\n components.set(\n attribute,\n h('div', { key: attribute, class: [this.suit('widget')] }, [vnode])\n );\n }\n });\n\n // by default, render everything, but hidden so that the routing doesn't disappear\n if (!this.state) {\n const allComponents = [];\n components.forEach(component => allComponents.push(component));\n\n return h(\n 'div',\n _objectSpread(\n {\n class: [this.suit()],\n },\n { attrs: { hidden: true } }\n ),\n allComponents\n );\n }\n\n return h(\n 'div',\n { class: [this.suit()] },\n this.state.attributesToRender.map(attribute => components.get(attribute))\n );\n }),\n computed: {\n widgetParams() {\n return {\n transformItems: this.transformItems,\n facets: this.facets,\n maxValuesPerFacet: this.maxValuesPerFacet,\n // we do not pass \"widgets\" to the connector, since Vue is in charge of rendering\n widgets: [],\n };\n },\n },\n};\n"],"names":["name","mixins","createWidgetMixin","connector","connectDynamicWidgets","$$widgetType","createSuitMixin","props","transformItems","type","Function","default","undefined","facets","Array","maxValuesPerFacet","Number","render","renderCompat","h","components","Map","getDefaultSlot","this","forEach","vnode","attribute","getWidgetAttribute","children","isArray","attributes","reduce","acc","curr","set","key","class","suit","state","allComponents","component","push","_objectSpread","attrs","hidden","attributesToRender","map","get","computed","widgetParams","widgets"],"mappings":"mVAyCe,CACbA,KAAM,oBACNC,OAAQ,CACNC,EACE,CACEC,UAAWC,GAEb,CACEC,aAAc,uBAGlBC,EAAgB,CAAEN,KAAM,oBAE1BO,MAAO,CACLC,eAAgB,CACdC,KAAMC,SACNC,aAASC,GAEXC,OAAQ,CACNJ,KAAMK,MACNH,aAASC,GAEXG,kBAAmB,CACjBN,KAAMO,OACNL,aAASC,IAGbK,OAAQC,EAAa,SAASC,cACtBC,EAAa,IAAIC,QAEtBC,EAAeC,OAAS,IAAIC,iBAAQC,OAC7BC,EAlEZ,SAASC,EAAmBF,OAatBG,EAZErB,EACFkB,EAAMlB,SAENA,EAAO,IACLA,EAAMmB,iBACDnB,EAAMmB,aAEXZ,MAAMe,QAAQtB,EAAMuB,mBACfvB,EAAMuB,WAAW,MAM1BF,EACEH,EAAMG,UAAYH,EAAMG,SAASjB,SAAWc,EAAMG,SAASjB,UAQ3DG,MAAMe,QAAQD,UAETA,EAASG,gBACbC,EAAKC,UAASD,GAAOL,EAAmBM,SACzCrB,GAsCkBe,CAAmBF,GACjCC,GACFN,EAAWc,IACTR,EACAP,EAAE,MAAO,CAAEgB,IAAKT,EAAWU,MAAO,CAACb,EAAKc,KAAK,YAAc,CAACZ,QAM7DF,KAAKe,MAAO,KACTC,EAAgB,UACtBnB,EAAWI,iBAAQgB,UAAaD,EAAcE,KAAKD,KAE5CrB,EACL,MACAuB,EACE,CACEN,MAAO,CAACb,KAAKc,SAEf,CAAEM,MAAO,CAAEC,QAAQ,KAErBL,UAIGpB,EACL,MACA,CAAEiB,MAAO,CAACb,KAAKc,SACfd,KAAKe,MAAMO,mBAAmBC,aAAIpB,UAAaN,EAAW2B,IAAIrB,QAGlEsB,SAAU,CACRC,8BACS,CACLzC,eAAgBe,KAAKf,eACrBK,OAAQU,KAAKV,OACbE,kBAAmBQ,KAAKR,kBAExBmC,QAAS"}
@@ -1,2 +1,2 @@
1
- import{createSuitMixin as t}from"../mixins/suit.js";import{createWidgetMixin as e}from"../mixins/widget.js";import{connectHierarchicalMenu as i}from"instantsearch.js/es/connectors/index.js";import{createPanelConsumerMixin as r}from"../mixins/panel.js";import o from"./HierarchicalMenuList.vue.js";var s=function(t){return Boolean(t.items)&&t.items.length>0};export default{name:"AisHierarchicalMenu",mixins:[t({name:"HierarchicalMenu"}),e({connector:i}),r({mapStateToCanRefine:s})],components:{HierarchicalMenuList:o},props:{attributes:{type:Array,required:!0},limit:{type:Number,default:void 0},showMoreLimit:{type:Number,default:void 0},showMore:{type:Boolean,default:!1},sortBy:{type:[Array,Function],default:void 0},separator:{type:String,default:void 0},rootPath:{type:String,default:void 0},showParentLevel:{type:Boolean,default:void 0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{attributes:this.attributes,limit:this.limit,showMore:this.showMore,showMoreLimit:this.showMoreLimit,separator:this.separator,rootPath:this.rootPath,showParentLevel:this.showParentLevel,sortBy:this.sortBy,transformItems:this.transformItems}},canRefine:function(){return s(this.state)}}};
1
+ import{createSuitMixin as t}from"../mixins/suit.js";import{createWidgetMixin as e}from"../mixins/widget.js";import{connectHierarchicalMenu as i}from"instantsearch.js/es/connectors/index.js";import{createPanelConsumerMixin as r}from"../mixins/panel.js";import o from"./HierarchicalMenuList.vue.js";var s=function(t){return Boolean(t.items)&&t.items.length>0};export default{name:"AisHierarchicalMenu",mixins:[t({name:"HierarchicalMenu"}),e({connector:i},{$$widgetType:"ais.hierarchicalMenu"}),r({mapStateToCanRefine:s})],components:{HierarchicalMenuList:o},props:{attributes:{type:Array,required:!0},limit:{type:Number,default:void 0},showMoreLimit:{type:Number,default:void 0},showMore:{type:Boolean,default:!1},sortBy:{type:[Array,Function],default:void 0},separator:{type:String,default:void 0},rootPath:{type:String,default:void 0},showParentLevel:{type:Boolean,default:void 0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{attributes:this.attributes,limit:this.limit,showMore:this.showMore,showMoreLimit:this.showMoreLimit,separator:this.separator,rootPath:this.rootPath,showParentLevel:this.showParentLevel,sortBy:this.sortBy,transformItems:this.transformItems}},canRefine:function(){return s(this.state)}}};
2
2
  //# sourceMappingURL=HierarchicalMenu.vue_vue&type=script&lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchicalMenu.vue_vue&type=script&lang.js","sources":["../../../../src/components/HierarchicalMenu.vue"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"[suit(), !canRefine && suit('', 'noRefinement')]\"\n >\n <slot\n :items=\"state.items\"\n :can-refine=\"canRefine\"\n :can-toggle-show-more=\"state.canToggleShowMore\"\n :is-showing-more=\"state.isShowingMore\"\n :refine=\"state.refine\"\n :createURL=\"state.createURL\"\n :toggle-show-more=\"state.toggleShowMore\"\n :send-event=\"state.sendEvent\"\n >\n <hierarchical-menu-list\n :items=\"state.items\"\n :level=\"0\"\n :refine=\"state.refine\"\n :createURL=\"state.createURL\"\n :suit=\"suit\"\n />\n\n <button\n v-if=\"showMore\"\n :class=\"[\n suit('showMore'),\n !state.canToggleShowMore && suit('showMore', 'disabled')\n ]\"\n :disabled=\"!state.canToggleShowMore\"\n @click.prevent=\"state.toggleShowMore\"\n >\n <slot\n name=\"showMoreLabel\"\n :is-showing-more=\"state.isShowingMore\"\n >{{ state.isShowingMore ? 'Show less' : 'Show more' }}</slot>\n </button>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectHierarchicalMenu } from 'instantsearch.js/es/connectors';\nimport { createWidgetMixin } from '../mixins/widget';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport HierarchicalMenuList from './HierarchicalMenuList.vue';\nimport { createSuitMixin } from '../mixins/suit';\n\nconst mapStateToCanRefine = state =>\n Boolean(state.items) && state.items.length > 0;\n\nexport default {\n name: 'AisHierarchicalMenu',\n mixins: [\n createSuitMixin({ name: 'HierarchicalMenu' }),\n createWidgetMixin({ connector: connectHierarchicalMenu }),\n createPanelConsumerMixin({\n mapStateToCanRefine,\n }),\n ],\n components: {\n HierarchicalMenuList,\n },\n props: {\n attributes: {\n type: Array,\n required: true,\n },\n limit: {\n type: Number,\n default: undefined,\n },\n showMoreLimit: {\n type: Number,\n default: undefined,\n },\n showMore: {\n type: Boolean,\n default: false,\n },\n sortBy: {\n type: [Array, Function],\n default: undefined,\n },\n separator: {\n type: String,\n default: undefined,\n },\n rootPath: {\n type: String,\n default: undefined,\n },\n showParentLevel: {\n type: Boolean,\n default: undefined,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n widgetParams() {\n return {\n attributes: this.attributes,\n limit: this.limit,\n showMore: this.showMore,\n showMoreLimit: this.showMoreLimit,\n separator: this.separator,\n rootPath: this.rootPath,\n showParentLevel: this.showParentLevel,\n sortBy: this.sortBy,\n transformItems: this.transformItems,\n };\n },\n canRefine() {\n return mapStateToCanRefine(this.state);\n },\n },\n};\n</script>\n"],"names":["const","mapStateToCanRefine","state","Boolean","items","length","name","mixins","createSuitMixin","createWidgetMixin","connector","connectHierarchicalMenu","createPanelConsumerMixin","components","HierarchicalMenuList","props","attributes","type","Array","required","limit","Number","default","undefined","showMoreLimit","showMore","sortBy","Function","separator","String","rootPath","showParentLevel","transformItems","computed","widgetParams","this","canRefine"],"mappings":"ySAgDAA,IAAMC,WAAsBC,UAC1BC,QAAQD,EAAME,QAAUF,EAAME,MAAMC,OAAS,iBAEhC,CACbC,KAAM,sBACNC,OAAQ,CACNC,EAAgB,CAAEF,KAAM,qBACxBG,EAAkB,CAAEC,UAAWC,IAC/BC,EAAyB,qBACvBX,KAGJY,WAAY,sBACVC,GAEFC,MAAO,CACLC,WAAY,CACVC,KAAMC,MACNC,UAAU,GAEZC,MAAO,CACLH,KAAMI,OACNC,aAASC,GAEXC,cAAe,CACbP,KAAMI,OACNC,aAASC,GAEXE,SAAU,CACRR,KAAMd,QACNmB,SAAS,GAEXI,OAAQ,CACNT,KAAM,CAACC,MAAOS,UACdL,aAASC,GAEXK,UAAW,CACTX,KAAMY,OACNP,aAASC,GAEXO,SAAU,CACRb,KAAMY,OACNP,aAASC,GAEXQ,gBAAiB,CACfd,KAAMd,QACNmB,aAASC,GAEXS,eAAgB,CACdf,KAAMU,SACNL,aAASC,IAGbU,SAAU,CACRC,8BACS,CACLlB,WAAYmB,KAAKnB,WACjBI,MAAOe,KAAKf,MACZK,SAAUU,KAAKV,SACfD,cAAeW,KAAKX,cACpBI,UAAWO,KAAKP,UAChBE,SAAUK,KAAKL,SACfC,gBAAiBI,KAAKJ,gBACtBL,OAAQS,KAAKT,OACbM,eAAgBG,KAAKH,iBAGzBI,4BACSnC,EAAoBkC,KAAKjC"}
1
+ {"version":3,"file":"HierarchicalMenu.vue_vue&type=script&lang.js","sources":["../../../../src/components/HierarchicalMenu.vue"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"[suit(), !canRefine && suit('', 'noRefinement')]\"\n >\n <slot\n :items=\"state.items\"\n :can-refine=\"canRefine\"\n :can-toggle-show-more=\"state.canToggleShowMore\"\n :is-showing-more=\"state.isShowingMore\"\n :refine=\"state.refine\"\n :createURL=\"state.createURL\"\n :toggle-show-more=\"state.toggleShowMore\"\n :send-event=\"state.sendEvent\"\n >\n <hierarchical-menu-list\n :items=\"state.items\"\n :level=\"0\"\n :refine=\"state.refine\"\n :createURL=\"state.createURL\"\n :suit=\"suit\"\n />\n\n <button\n v-if=\"showMore\"\n :class=\"[\n suit('showMore'),\n !state.canToggleShowMore && suit('showMore', 'disabled')\n ]\"\n :disabled=\"!state.canToggleShowMore\"\n @click.prevent=\"state.toggleShowMore\"\n >\n <slot\n name=\"showMoreLabel\"\n :is-showing-more=\"state.isShowingMore\"\n >{{ state.isShowingMore ? 'Show less' : 'Show more' }}</slot>\n </button>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectHierarchicalMenu } from 'instantsearch.js/es/connectors';\nimport { createWidgetMixin } from '../mixins/widget';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport HierarchicalMenuList from './HierarchicalMenuList.vue';\nimport { createSuitMixin } from '../mixins/suit';\n\nconst mapStateToCanRefine = state =>\n Boolean(state.items) && state.items.length > 0;\n\nexport default {\n name: 'AisHierarchicalMenu',\n mixins: [\n createSuitMixin({ name: 'HierarchicalMenu' }),\n createWidgetMixin(\n {\n connector: connectHierarchicalMenu,\n },\n {\n $$widgetType: 'ais.hierarchicalMenu',\n }\n ),\n createPanelConsumerMixin({\n mapStateToCanRefine,\n }),\n ],\n components: {\n HierarchicalMenuList,\n },\n props: {\n attributes: {\n type: Array,\n required: true,\n },\n limit: {\n type: Number,\n default: undefined,\n },\n showMoreLimit: {\n type: Number,\n default: undefined,\n },\n showMore: {\n type: Boolean,\n default: false,\n },\n sortBy: {\n type: [Array, Function],\n default: undefined,\n },\n separator: {\n type: String,\n default: undefined,\n },\n rootPath: {\n type: String,\n default: undefined,\n },\n showParentLevel: {\n type: Boolean,\n default: undefined,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n widgetParams() {\n return {\n attributes: this.attributes,\n limit: this.limit,\n showMore: this.showMore,\n showMoreLimit: this.showMoreLimit,\n separator: this.separator,\n rootPath: this.rootPath,\n showParentLevel: this.showParentLevel,\n sortBy: this.sortBy,\n transformItems: this.transformItems,\n };\n },\n canRefine() {\n return mapStateToCanRefine(this.state);\n },\n },\n};\n</script>\n"],"names":["const","mapStateToCanRefine","state","Boolean","items","length","name","mixins","createSuitMixin","createWidgetMixin","connector","connectHierarchicalMenu","$$widgetType","createPanelConsumerMixin","components","HierarchicalMenuList","props","attributes","type","Array","required","limit","Number","default","undefined","showMoreLimit","showMore","sortBy","Function","separator","String","rootPath","showParentLevel","transformItems","computed","widgetParams","this","canRefine"],"mappings":"ySAgDAA,IAAMC,WAAsBC,UAC1BC,QAAQD,EAAME,QAAUF,EAAME,MAAMC,OAAS,iBAEhC,CACbC,KAAM,sBACNC,OAAQ,CACNC,EAAgB,CAAEF,KAAM,qBACxBG,EACE,CACEC,UAAWC,GAEb,CACEC,aAAc,yBAGlBC,EAAyB,qBACvBZ,KAGJa,WAAY,sBACVC,GAEFC,MAAO,CACLC,WAAY,CACVC,KAAMC,MACNC,UAAU,GAEZC,MAAO,CACLH,KAAMI,OACNC,aAASC,GAEXC,cAAe,CACbP,KAAMI,OACNC,aAASC,GAEXE,SAAU,CACRR,KAAMf,QACNoB,SAAS,GAEXI,OAAQ,CACNT,KAAM,CAACC,MAAOS,UACdL,aAASC,GAEXK,UAAW,CACTX,KAAMY,OACNP,aAASC,GAEXO,SAAU,CACRb,KAAMY,OACNP,aAASC,GAEXQ,gBAAiB,CACfd,KAAMf,QACNoB,aAASC,GAEXS,eAAgB,CACdf,KAAMU,SACNL,aAASC,IAGbU,SAAU,CACRC,8BACS,CACLlB,WAAYmB,KAAKnB,WACjBI,MAAOe,KAAKf,MACZK,SAAUU,KAAKV,SACfD,cAAeW,KAAKX,cACpBI,UAAWO,KAAKP,UAChBE,SAAUK,KAAKL,SACfC,gBAAiBI,KAAKJ,gBACtBL,OAAQS,KAAKT,OACbM,eAAgBG,KAAKH,iBAGzBI,4BACSpC,EAAoBmC,KAAKlC"}
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchicalMenu.vue_vue&type=template&id=4361a0b8&lang.js","sources":["../../../../src/components/HierarchicalMenu.vue?vue&type=template&id=4361a0b8&lang.js"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"[suit(), !canRefine && suit('', 'noRefinement')]\"\n >\n <slot\n :items=\"state.items\"\n :can-refine=\"canRefine\"\n :can-toggle-show-more=\"state.canToggleShowMore\"\n :is-showing-more=\"state.isShowingMore\"\n :refine=\"state.refine\"\n :createURL=\"state.createURL\"\n :toggle-show-more=\"state.toggleShowMore\"\n :send-event=\"state.sendEvent\"\n >\n <hierarchical-menu-list\n :items=\"state.items\"\n :level=\"0\"\n :refine=\"state.refine\"\n :createURL=\"state.createURL\"\n :suit=\"suit\"\n />\n\n <button\n v-if=\"showMore\"\n :class=\"[\n suit('showMore'),\n !state.canToggleShowMore && suit('showMore', 'disabled')\n ]\"\n :disabled=\"!state.canToggleShowMore\"\n @click.prevent=\"state.toggleShowMore\"\n >\n <slot\n name=\"showMoreLabel\"\n :is-showing-more=\"state.isShowingMore\"\n >{{ state.isShowingMore ? 'Show less' : 'Show more' }}</slot>\n </button>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectHierarchicalMenu } from 'instantsearch.js/es/connectors';\nimport { createWidgetMixin } from '../mixins/widget';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport HierarchicalMenuList from './HierarchicalMenuList.vue';\nimport { createSuitMixin } from '../mixins/suit';\n\nconst mapStateToCanRefine = state =>\n Boolean(state.items) && state.items.length > 0;\n\nexport default {\n name: 'AisHierarchicalMenu',\n mixins: [\n createSuitMixin({ name: 'HierarchicalMenu' }),\n createWidgetMixin({ connector: connectHierarchicalMenu }),\n createPanelConsumerMixin({\n mapStateToCanRefine,\n }),\n ],\n components: {\n HierarchicalMenuList,\n },\n props: {\n attributes: {\n type: Array,\n required: true,\n },\n limit: {\n type: Number,\n default: undefined,\n },\n showMoreLimit: {\n type: Number,\n default: undefined,\n },\n showMore: {\n type: Boolean,\n default: false,\n },\n sortBy: {\n type: [Array, Function],\n default: undefined,\n },\n separator: {\n type: String,\n default: undefined,\n },\n rootPath: {\n type: String,\n default: undefined,\n },\n showParentLevel: {\n type: Boolean,\n default: undefined,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n widgetParams() {\n return {\n attributes: this.attributes,\n limit: this.limit,\n showMore: this.showMore,\n showMoreLimit: this.showMoreLimit,\n separator: this.separator,\n rootPath: this.rootPath,\n showParentLevel: this.showParentLevel,\n sortBy: this.sortBy,\n transformItems: this.transformItems,\n };\n },\n canRefine() {\n return mapStateToCanRefine(this.state);\n },\n },\n};\n</script>\n"],"names":["_ctx","_createBlock","class","$options","_renderSlot","items","canRefine","canToggleShowMore","isShowingMore","refine","createURL","toggleShowMore","sendEvent","_createVNode","level","suit","$props","disabled","onClick"],"mappings":"8PAEUA,aADRC,eAEGC,OAAQF,UAASG,aAAaH,6BAE/BI,sBACGC,MAAOL,QAAMK,MACbC,UAAYH,YACZI,kBAAsBP,QAAMO,kBAC5BC,cAAiBR,QAAMQ,cACvBC,OAAQT,QAAMS,OACdC,UAAWV,QAAMU,UACjBC,eAAkBX,QAAMW,eACxBC,UAAYZ,QAAMY,6BAEnBC,KACGR,MAAOL,QAAMK,MACbS,MAAO,EACPL,OAAQT,QAAMS,OACdC,UAAWV,QAAMU,UACjBK,KAAMf,sDAIDgB,gBADRf,kBAEGC,qFAIAe,UAAWjB,QAAMO,kBACjBW,iGAAelB,QAAMW,mBAANX,SAAMW,2CAEtBP,4BAEGI,cAAiBR,QAAMQ,qCACtBR,QAAMQ"}
1
+ {"version":3,"file":"HierarchicalMenu.vue_vue&type=template&id=4361a0b8&lang.js","sources":["../../../../src/components/HierarchicalMenu.vue?vue&type=template&id=4361a0b8&lang.js"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"[suit(), !canRefine && suit('', 'noRefinement')]\"\n >\n <slot\n :items=\"state.items\"\n :can-refine=\"canRefine\"\n :can-toggle-show-more=\"state.canToggleShowMore\"\n :is-showing-more=\"state.isShowingMore\"\n :refine=\"state.refine\"\n :createURL=\"state.createURL\"\n :toggle-show-more=\"state.toggleShowMore\"\n :send-event=\"state.sendEvent\"\n >\n <hierarchical-menu-list\n :items=\"state.items\"\n :level=\"0\"\n :refine=\"state.refine\"\n :createURL=\"state.createURL\"\n :suit=\"suit\"\n />\n\n <button\n v-if=\"showMore\"\n :class=\"[\n suit('showMore'),\n !state.canToggleShowMore && suit('showMore', 'disabled')\n ]\"\n :disabled=\"!state.canToggleShowMore\"\n @click.prevent=\"state.toggleShowMore\"\n >\n <slot\n name=\"showMoreLabel\"\n :is-showing-more=\"state.isShowingMore\"\n >{{ state.isShowingMore ? 'Show less' : 'Show more' }}</slot>\n </button>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectHierarchicalMenu } from 'instantsearch.js/es/connectors';\nimport { createWidgetMixin } from '../mixins/widget';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport HierarchicalMenuList from './HierarchicalMenuList.vue';\nimport { createSuitMixin } from '../mixins/suit';\n\nconst mapStateToCanRefine = state =>\n Boolean(state.items) && state.items.length > 0;\n\nexport default {\n name: 'AisHierarchicalMenu',\n mixins: [\n createSuitMixin({ name: 'HierarchicalMenu' }),\n createWidgetMixin(\n {\n connector: connectHierarchicalMenu,\n },\n {\n $$widgetType: 'ais.hierarchicalMenu',\n }\n ),\n createPanelConsumerMixin({\n mapStateToCanRefine,\n }),\n ],\n components: {\n HierarchicalMenuList,\n },\n props: {\n attributes: {\n type: Array,\n required: true,\n },\n limit: {\n type: Number,\n default: undefined,\n },\n showMoreLimit: {\n type: Number,\n default: undefined,\n },\n showMore: {\n type: Boolean,\n default: false,\n },\n sortBy: {\n type: [Array, Function],\n default: undefined,\n },\n separator: {\n type: String,\n default: undefined,\n },\n rootPath: {\n type: String,\n default: undefined,\n },\n showParentLevel: {\n type: Boolean,\n default: undefined,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n widgetParams() {\n return {\n attributes: this.attributes,\n limit: this.limit,\n showMore: this.showMore,\n showMoreLimit: this.showMoreLimit,\n separator: this.separator,\n rootPath: this.rootPath,\n showParentLevel: this.showParentLevel,\n sortBy: this.sortBy,\n transformItems: this.transformItems,\n };\n },\n canRefine() {\n return mapStateToCanRefine(this.state);\n },\n },\n};\n</script>\n"],"names":["_ctx","_createBlock","class","$options","_renderSlot","items","canRefine","canToggleShowMore","isShowingMore","refine","createURL","toggleShowMore","sendEvent","_createVNode","level","suit","$props","disabled","onClick"],"mappings":"8PAEUA,aADRC,eAEGC,OAAQF,UAASG,aAAaH,6BAE/BI,sBACGC,MAAOL,QAAMK,MACbC,UAAYH,YACZI,kBAAsBP,QAAMO,kBAC5BC,cAAiBR,QAAMQ,cACvBC,OAAQT,QAAMS,OACdC,UAAWV,QAAMU,UACjBC,eAAkBX,QAAMW,eACxBC,UAAYZ,QAAMY,6BAEnBC,KACGR,MAAOL,QAAMK,MACbS,MAAO,EACPL,OAAQT,QAAMS,OACdC,UAAWV,QAAMU,UACjBK,KAAMf,sDAIDgB,gBADRf,kBAEGC,qFAIAe,UAAWjB,QAAMO,kBACjBW,iGAAelB,QAAMW,mBAANX,SAAMW,2CAEtBP,4BAEGI,cAAiBR,QAAMQ,qCACtBR,QAAMQ"}
@@ -1,2 +1,2 @@
1
- import{createSuitMixin as t}from"../mixins/suit.js";import{createWidgetMixin as s}from"../mixins/widget.js";import{connectHitsWithInsights as e}from"instantsearch.js/es/connectors/index.js";export default{name:"AisHits",mixins:[s({connector:e}),t({name:"Hits"})],props:{escapeHTML:{type:Boolean,default:!0},transformItems:{type:Function,default:void 0}},computed:{items:function(){return this.state.hits},widgetParams:function(){return{escapeHTML:this.escapeHTML,transformItems:this.transformItems}}}};
1
+ import{createSuitMixin as t}from"../mixins/suit.js";import{createWidgetMixin as s}from"../mixins/widget.js";import{connectHitsWithInsights as e}from"instantsearch.js/es/connectors/index.js";export default{name:"AisHits",mixins:[s({connector:e},{$$widgetType:"ais.hits"}),t({name:"Hits"})],props:{escapeHTML:{type:Boolean,default:!0},transformItems:{type:Function,default:void 0}},computed:{items:function(){return this.state.hits},widgetParams:function(){return{escapeHTML:this.escapeHTML,transformItems:this.transformItems}}}};
2
2
  //# sourceMappingURL=Hits.vue_vue&type=script&lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Hits.vue_vue&type=script&lang.js","sources":["../../../../src/components/Hits.vue"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"suit()\"\n >\n <slot\n :items=\"items\"\n :insights=\"state.insights\"\n :send-event=\"state.sendEvent\"\n >\n <ol :class=\"suit('list')\">\n <li\n v-for=\"(item, itemIndex) in items\"\n :key=\"item.objectID\"\n :class=\"suit('item')\"\n >\n <slot\n name=\"item\"\n :item=\"item\"\n :index=\"itemIndex\"\n :insights=\"state.insights\"\n >objectID: {{ item.objectID }}, index: {{ itemIndex }}</slot>\n </li>\n </ol>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectHitsWithInsights } from 'instantsearch.js/es/connectors';\nimport { createWidgetMixin } from '../mixins/widget';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisHits',\n mixins: [\n createWidgetMixin({ connector: connectHitsWithInsights }),\n createSuitMixin({ name: 'Hits' }),\n ],\n props: {\n escapeHTML: {\n type: Boolean,\n default: true,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n items() {\n return this.state.hits;\n },\n widgetParams() {\n return {\n escapeHTML: this.escapeHTML,\n transformItems: this.transformItems,\n };\n },\n },\n};\n</script>\n"],"names":["name","mixins","createWidgetMixin","connector","connectHitsWithInsights","createSuitMixin","props","escapeHTML","type","Boolean","default","transformItems","Function","undefined","computed","items","this","state","hits","widgetParams"],"mappings":"4MAiCe,CACbA,KAAM,UACNC,OAAQ,CACNC,EAAkB,CAAEC,UAAWC,IAC/BC,EAAgB,CAAEL,KAAM,UAE1BM,MAAO,CACLC,WAAY,CACVC,KAAMC,QACNC,SAAS,GAEXC,eAAgB,CACdH,KAAMI,SACNF,aAASG,IAGbC,SAAU,CACRC,wBACSC,KAAKC,MAAMC,MAEpBC,8BACS,CACLZ,WAAYS,KAAKT,WACjBI,eAAgBK,KAAKL"}
1
+ {"version":3,"file":"Hits.vue_vue&type=script&lang.js","sources":["../../../../src/components/Hits.vue"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"suit()\"\n >\n <slot\n :items=\"items\"\n :insights=\"state.insights\"\n :send-event=\"state.sendEvent\"\n >\n <ol :class=\"suit('list')\">\n <li\n v-for=\"(item, itemIndex) in items\"\n :key=\"item.objectID\"\n :class=\"suit('item')\"\n >\n <slot\n name=\"item\"\n :item=\"item\"\n :index=\"itemIndex\"\n :insights=\"state.insights\"\n >objectID: {{ item.objectID }}, index: {{ itemIndex }}</slot>\n </li>\n </ol>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectHitsWithInsights } from 'instantsearch.js/es/connectors';\nimport { createWidgetMixin } from '../mixins/widget';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisHits',\n mixins: [\n createWidgetMixin(\n {\n connector: connectHitsWithInsights,\n },\n {\n $$widgetType: 'ais.hits',\n }\n ),\n createSuitMixin({ name: 'Hits' }),\n ],\n props: {\n escapeHTML: {\n type: Boolean,\n default: true,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n items() {\n return this.state.hits;\n },\n widgetParams() {\n return {\n escapeHTML: this.escapeHTML,\n transformItems: this.transformItems,\n };\n },\n },\n};\n</script>\n"],"names":["name","mixins","createWidgetMixin","connector","connectHitsWithInsights","$$widgetType","createSuitMixin","props","escapeHTML","type","Boolean","default","transformItems","Function","undefined","computed","items","this","state","hits","widgetParams"],"mappings":"4MAiCe,CACbA,KAAM,UACNC,OAAQ,CACNC,EACE,CACEC,UAAWC,GAEb,CACEC,aAAc,aAGlBC,EAAgB,CAAEN,KAAM,UAE1BO,MAAO,CACLC,WAAY,CACVC,KAAMC,QACNC,SAAS,GAEXC,eAAgB,CACdH,KAAMI,SACNF,aAASG,IAGbC,SAAU,CACRC,wBACSC,KAAKC,MAAMC,MAEpBC,8BACS,CACLZ,WAAYS,KAAKT,WACjBI,eAAgBK,KAAKL"}
@@ -1 +1 @@
1
- {"version":3,"file":"Hits.vue_vue&type=template&id=ef242920&lang.js","sources":["../../../../src/components/Hits.vue?vue&type=template&id=ef242920&lang.js"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"suit()\"\n >\n <slot\n :items=\"items\"\n :insights=\"state.insights\"\n :send-event=\"state.sendEvent\"\n >\n <ol :class=\"suit('list')\">\n <li\n v-for=\"(item, itemIndex) in items\"\n :key=\"item.objectID\"\n :class=\"suit('item')\"\n >\n <slot\n name=\"item\"\n :item=\"item\"\n :index=\"itemIndex\"\n :insights=\"state.insights\"\n >objectID: {{ item.objectID }}, index: {{ itemIndex }}</slot>\n </li>\n </ol>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectHitsWithInsights } from 'instantsearch.js/es/connectors';\nimport { createWidgetMixin } from '../mixins/widget';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisHits',\n mixins: [\n createWidgetMixin({ connector: connectHitsWithInsights }),\n createSuitMixin({ name: 'Hits' }),\n ],\n props: {\n escapeHTML: {\n type: Boolean,\n default: true,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n items() {\n return this.state.hits;\n },\n widgetParams() {\n return {\n escapeHTML: this.escapeHTML,\n transformItems: this.transformItems,\n };\n },\n },\n};\n</script>\n"],"names":["_ctx","_createBlock","class","_renderSlot","items","$options","insights","sendEvent","_createVNode","item","itemIndex","key","objectID","index"],"mappings":"iNAEUA,aADRC,eAEGC,MAAOF,WAERG,sBACGC,MAAOC,QACPC,SAAUN,QAAMM,SAChBC,UAAYP,QAAMO,6BAEnBC,QAAKN,MAAOF,wBACVC,WAC8BI,iBAApBI,EAAMC,cADhBT,QAEGU,IAAKF,EAAKG,SACVV,MAAOF,iBAERG,mBAEGM,KAAMA,EACNI,MAAOH,EACPJ,SAAUN,QAAMM,8BAClB,eAAaG,EAAKG,UAAW,cAAYF"}
1
+ {"version":3,"file":"Hits.vue_vue&type=template&id=ef242920&lang.js","sources":["../../../../src/components/Hits.vue?vue&type=template&id=ef242920&lang.js"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"suit()\"\n >\n <slot\n :items=\"items\"\n :insights=\"state.insights\"\n :send-event=\"state.sendEvent\"\n >\n <ol :class=\"suit('list')\">\n <li\n v-for=\"(item, itemIndex) in items\"\n :key=\"item.objectID\"\n :class=\"suit('item')\"\n >\n <slot\n name=\"item\"\n :item=\"item\"\n :index=\"itemIndex\"\n :insights=\"state.insights\"\n >objectID: {{ item.objectID }}, index: {{ itemIndex }}</slot>\n </li>\n </ol>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectHitsWithInsights } from 'instantsearch.js/es/connectors';\nimport { createWidgetMixin } from '../mixins/widget';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisHits',\n mixins: [\n createWidgetMixin(\n {\n connector: connectHitsWithInsights,\n },\n {\n $$widgetType: 'ais.hits',\n }\n ),\n createSuitMixin({ name: 'Hits' }),\n ],\n props: {\n escapeHTML: {\n type: Boolean,\n default: true,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n computed: {\n items() {\n return this.state.hits;\n },\n widgetParams() {\n return {\n escapeHTML: this.escapeHTML,\n transformItems: this.transformItems,\n };\n },\n },\n};\n</script>\n"],"names":["_ctx","_createBlock","class","_renderSlot","items","$options","insights","sendEvent","_createVNode","item","itemIndex","key","objectID","index"],"mappings":"iNAEUA,aADRC,eAEGC,MAAOF,WAERG,sBACGC,MAAOC,QACPC,SAAUN,QAAMM,SAChBC,UAAYP,QAAMO,6BAEnBC,QAAKN,MAAOF,wBACVC,WAC8BI,iBAApBI,EAAMC,cADhBT,QAEGU,IAAKF,EAAKG,SACVV,MAAOF,iBAERG,mBAEGM,KAAMA,EACNI,MAAOH,EACPJ,SAAUN,QAAMM,8BAClB,eAAaG,EAAKG,UAAW,cAAYF"}
@@ -1,2 +1,2 @@
1
- import{createSuitMixin as t}from"../mixins/suit.js";import{createWidgetMixin as e}from"../mixins/widget.js";import{connectHitsPerPage as s}from"instantsearch.js/es/connectors/index.js";import{createPanelConsumerMixin as i}from"../mixins/panel.js";export default{name:"AisHitsPerPage",mixins:[t({name:"HitsPerPage"}),e({connector:s}),i({mapStateToCanRefine:function(t){return!1===t.hasNoResults}})],props:{items:{type:Array,required:!0},transformItems:{type:Function,default:void 0}},data:function(){return{selected:this.items.find(function(t){return!0===t.default}).value}},computed:{widgetParams:function(){return{items:this.items,transformItems:this.transformItems}}},methods:{handleChange:function(){this.state.refine(this.selected)}}};
1
+ import{createSuitMixin as t}from"../mixins/suit.js";import{createWidgetMixin as e}from"../mixins/widget.js";import{connectHitsPerPage as i}from"instantsearch.js/es/connectors/index.js";import{createPanelConsumerMixin as s}from"../mixins/panel.js";export default{name:"AisHitsPerPage",mixins:[t({name:"HitsPerPage"}),e({connector:i},{$$widgetType:"ais.hitsPerPage"}),s({mapStateToCanRefine:function(t){return!1===t.hasNoResults}})],props:{items:{type:Array,required:!0},transformItems:{type:Function,default:void 0}},data:function(){return{selected:this.items.find(function(t){return!0===t.default}).value}},computed:{widgetParams:function(){return{items:this.items,transformItems:this.transformItems}}},methods:{handleChange:function(){this.state.refine(this.selected)}}};
2
2
  //# sourceMappingURL=HitsPerPage.vue_vue&type=script&lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HitsPerPage.vue_vue&type=script&lang.js","sources":["../../../../src/components/HitsPerPage.vue"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"suit()\"\n >\n <slot\n :items=\"state.items\"\n :refine=\"state.refine\"\n :hasNoResults=\"state.hasNoResults\"\n >\n <select\n :class=\"suit('select')\"\n v-model=\"selected\"\n @change=\"handleChange\"\n >\n <option\n v-for=\"item in state.items\"\n :key=\"item.value\"\n :class=\"suit('option')\"\n :value=\"item.value\"\n >{{ item.label }}</option>\n </select>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectHitsPerPage } from 'instantsearch.js/es/connectors';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport { createWidgetMixin } from '../mixins/widget';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisHitsPerPage',\n mixins: [\n createSuitMixin({ name: 'HitsPerPage' }),\n createWidgetMixin({ connector: connectHitsPerPage }),\n createPanelConsumerMixin({\n mapStateToCanRefine: state => state.hasNoResults === false,\n }),\n ],\n props: {\n items: {\n type: Array,\n required: true,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n data() {\n return {\n selected: this.items.find(item => item.default === true).value,\n };\n },\n computed: {\n widgetParams() {\n return {\n items: this.items,\n transformItems: this.transformItems,\n };\n },\n },\n methods: {\n handleChange() {\n this.state.refine(this.selected);\n },\n },\n};\n</script>\n"],"names":["name","mixins","createSuitMixin","createWidgetMixin","connector","connectHitsPerPage","createPanelConsumerMixin","mapStateToCanRefine","state","hasNoResults","props","items","type","Array","required","transformItems","Function","default","undefined","data","selected","this","find","item","value","computed","widgetParams","methods","handleChange","refine"],"mappings":"qQAgCe,CACbA,KAAM,iBACNC,OAAQ,CACNC,EAAgB,CAAEF,KAAM,gBACxBG,EAAkB,CAAEC,UAAWC,IAC/BC,EAAyB,CACvBC,6BAAqBC,UAAgC,IAAvBA,EAAMC,iBAGxCC,MAAO,CACLC,MAAO,CACLC,KAAMC,MACNC,UAAU,GAEZC,eAAgB,CACdH,KAAMI,SACNC,aAASC,IAGbC,sBACS,CACLC,SAAUC,KAAKV,MAAMW,cAAKC,UAAyB,IAAjBA,EAAKN,UAAkBO,QAG7DC,SAAU,CACRC,8BACS,CACLf,MAAOU,KAAKV,MACZI,eAAgBM,KAAKN,kBAI3BY,QAAS,CACPC,6BACOpB,MAAMqB,OAAOR,KAAKD"}
1
+ {"version":3,"file":"HitsPerPage.vue_vue&type=script&lang.js","sources":["../../../../src/components/HitsPerPage.vue"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"suit()\"\n >\n <slot\n :items=\"state.items\"\n :refine=\"state.refine\"\n :hasNoResults=\"state.hasNoResults\"\n >\n <select\n :class=\"suit('select')\"\n v-model=\"selected\"\n @change=\"handleChange\"\n >\n <option\n v-for=\"item in state.items\"\n :key=\"item.value\"\n :class=\"suit('option')\"\n :value=\"item.value\"\n >{{ item.label }}</option>\n </select>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectHitsPerPage } from 'instantsearch.js/es/connectors';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport { createWidgetMixin } from '../mixins/widget';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisHitsPerPage',\n mixins: [\n createSuitMixin({ name: 'HitsPerPage' }),\n createWidgetMixin(\n {\n connector: connectHitsPerPage,\n },\n {\n $$widgetType: 'ais.hitsPerPage',\n }\n ),\n createPanelConsumerMixin({\n mapStateToCanRefine: state => state.hasNoResults === false,\n }),\n ],\n props: {\n items: {\n type: Array,\n required: true,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n data() {\n return {\n selected: this.items.find(item => item.default === true).value,\n };\n },\n computed: {\n widgetParams() {\n return {\n items: this.items,\n transformItems: this.transformItems,\n };\n },\n },\n methods: {\n handleChange() {\n this.state.refine(this.selected);\n },\n },\n};\n</script>\n"],"names":["name","mixins","createSuitMixin","createWidgetMixin","connector","connectHitsPerPage","$$widgetType","createPanelConsumerMixin","mapStateToCanRefine","state","hasNoResults","props","items","type","Array","required","transformItems","Function","default","undefined","data","selected","this","find","item","value","computed","widgetParams","methods","handleChange","refine"],"mappings":"qQAgCe,CACbA,KAAM,iBACNC,OAAQ,CACNC,EAAgB,CAAEF,KAAM,gBACxBG,EACE,CACEC,UAAWC,GAEb,CACEC,aAAc,oBAGlBC,EAAyB,CACvBC,6BAAqBC,UAAgC,IAAvBA,EAAMC,iBAGxCC,MAAO,CACLC,MAAO,CACLC,KAAMC,MACNC,UAAU,GAEZC,eAAgB,CACdH,KAAMI,SACNC,aAASC,IAGbC,sBACS,CACLC,SAAUC,KAAKV,MAAMW,cAAKC,UAAyB,IAAjBA,EAAKN,UAAkBO,QAG7DC,SAAU,CACRC,8BACS,CACLf,MAAOU,KAAKV,MACZI,eAAgBM,KAAKN,kBAI3BY,QAAS,CACPC,6BACOpB,MAAMqB,OAAOR,KAAKD"}
@@ -1 +1 @@
1
- {"version":3,"file":"HitsPerPage.vue_vue&type=template&id=74f3ac28&lang.js","sources":["../../../../src/components/HitsPerPage.vue?vue&type=template&id=74f3ac28&lang.js"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"suit()\"\n >\n <slot\n :items=\"state.items\"\n :refine=\"state.refine\"\n :hasNoResults=\"state.hasNoResults\"\n >\n <select\n :class=\"suit('select')\"\n v-model=\"selected\"\n @change=\"handleChange\"\n >\n <option\n v-for=\"item in state.items\"\n :key=\"item.value\"\n :class=\"suit('option')\"\n :value=\"item.value\"\n >{{ item.label }}</option>\n </select>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectHitsPerPage } from 'instantsearch.js/es/connectors';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport { createWidgetMixin } from '../mixins/widget';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisHitsPerPage',\n mixins: [\n createSuitMixin({ name: 'HitsPerPage' }),\n createWidgetMixin({ connector: connectHitsPerPage }),\n createPanelConsumerMixin({\n mapStateToCanRefine: state => state.hasNoResults === false,\n }),\n ],\n props: {\n items: {\n type: Array,\n required: true,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n data() {\n return {\n selected: this.items.find(item => item.default === true).value,\n };\n },\n computed: {\n widgetParams() {\n return {\n items: this.items,\n transformItems: this.transformItems,\n };\n },\n },\n methods: {\n handleChange() {\n this.state.refine(this.selected);\n },\n },\n};\n</script>\n"],"names":["_ctx","_createBlock","class","_renderSlot","items","refine","hasNoResults","_createVNode","$data","onChange","$options","item","key","value","label"],"mappings":"kOAEUA,aADRC,eAEGC,MAAOF,WAERG,sBACGC,MAAOJ,QAAMI,MACbC,OAAQL,QAAMK,OACdC,aAAcN,QAAMM,kCAErBC,YACGL,MAAOF,sEACCQ,eACRC,8FAAQC,qDAETT,WACiBD,QAAMI,eAAdO,cADTV,YAEGW,IAAKD,EAAKE,MACVX,MAAOF,iBACPa,MAAOF,EAAKE,SACXF,EAAKG,sCARAN"}
1
+ {"version":3,"file":"HitsPerPage.vue_vue&type=template&id=74f3ac28&lang.js","sources":["../../../../src/components/HitsPerPage.vue?vue&type=template&id=74f3ac28&lang.js"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"suit()\"\n >\n <slot\n :items=\"state.items\"\n :refine=\"state.refine\"\n :hasNoResults=\"state.hasNoResults\"\n >\n <select\n :class=\"suit('select')\"\n v-model=\"selected\"\n @change=\"handleChange\"\n >\n <option\n v-for=\"item in state.items\"\n :key=\"item.value\"\n :class=\"suit('option')\"\n :value=\"item.value\"\n >{{ item.label }}</option>\n </select>\n </slot>\n </div>\n</template>\n\n<script>\nimport { connectHitsPerPage } from 'instantsearch.js/es/connectors';\nimport { createPanelConsumerMixin } from '../mixins/panel';\nimport { createWidgetMixin } from '../mixins/widget';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisHitsPerPage',\n mixins: [\n createSuitMixin({ name: 'HitsPerPage' }),\n createWidgetMixin(\n {\n connector: connectHitsPerPage,\n },\n {\n $$widgetType: 'ais.hitsPerPage',\n }\n ),\n createPanelConsumerMixin({\n mapStateToCanRefine: state => state.hasNoResults === false,\n }),\n ],\n props: {\n items: {\n type: Array,\n required: true,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n },\n data() {\n return {\n selected: this.items.find(item => item.default === true).value,\n };\n },\n computed: {\n widgetParams() {\n return {\n items: this.items,\n transformItems: this.transformItems,\n };\n },\n },\n methods: {\n handleChange() {\n this.state.refine(this.selected);\n },\n },\n};\n</script>\n"],"names":["_ctx","_createBlock","class","_renderSlot","items","refine","hasNoResults","_createVNode","$data","onChange","$options","item","key","value","label"],"mappings":"kOAEUA,aADRC,eAEGC,MAAOF,WAERG,sBACGC,MAAOJ,QAAMI,MACbC,OAAQL,QAAMK,OACdC,aAAcN,QAAMM,kCAErBC,YACGL,MAAOF,sEACCQ,eACRC,8FAAQC,qDAETT,WACiBD,QAAMI,eAAdO,cADTV,YAEGW,IAAKD,EAAKE,MACVX,MAAOF,iBACPa,MAAOF,EAAKE,SACXF,EAAKG,sCARAN"}
@@ -1,2 +1,2 @@
1
- import{createSuitMixin as e}from"../mixins/suit.js";import{renderCompat as i,getDefaultSlot as n}from"../util/vue-compat/index-vue3.js";import{createWidgetMixin as t}from"../mixins/widget.js";import r from"instantsearch.js/es/widgets/index/index.js";export default{name:"AisIndex",mixins:[e({name:"Index"}),t({connector:function(){return r}})],provide:function(){var e=this;return{$_ais_getParentIndex:function(){return e.widget}}},props:{indexName:{type:String,required:!0},indexId:{type:String,required:!1}},render:i(function(e){return e("div",{},n(this))}),computed:{widgetParams:function(){return{indexName:this.indexName,indexId:this.indexId}}}};
1
+ import{createSuitMixin as e}from"../mixins/suit.js";import{renderCompat as i,getDefaultSlot as n}from"../util/vue-compat/index-vue3.js";import{createWidgetMixin as t}from"../mixins/widget.js";import r from"instantsearch.js/es/widgets/index/index.js";export default{name:"AisIndex",mixins:[e({name:"Index"}),t({connector:function(){return r}},{$$widgetType:"ais.index"})],provide:function(){var e=this;return{$_ais_getParentIndex:function(){return e.widget}}},props:{indexName:{type:String,required:!0},indexId:{type:String,required:!1}},render:i(function(e){return e("div",{},n(this))}),computed:{widgetParams:function(){return{indexName:this.indexName,indexId:this.indexId}}}};
2
2
  //# sourceMappingURL=Index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Index.js","sources":["../../../../src/components/Index.js"],"sourcesContent":["import { createSuitMixin } from '../mixins/suit';\nimport { createWidgetMixin } from '../mixins/widget';\nimport indexWidget from 'instantsearch.js/es/widgets/index/index';\nimport { renderCompat, getDefaultSlot } from '../util/vue-compat';\n\n// wrapped in a dummy function, since indexWidget doesn't render\nconst connectIndex = () => indexWidget;\n\nexport default {\n name: 'AisIndex',\n mixins: [\n createSuitMixin({ name: 'Index' }),\n createWidgetMixin({ connector: connectIndex }),\n ],\n provide() {\n return {\n // The widget is created & registered by widgetMixin, accessor is needed\n // because provide is not reactive.\n $_ais_getParentIndex: () => this.widget,\n };\n },\n props: {\n indexName: {\n type: String,\n required: true,\n },\n indexId: {\n type: String,\n required: false,\n },\n },\n render: renderCompat(function(h) {\n return h('div', {}, getDefaultSlot(this));\n }),\n computed: {\n widgetParams() {\n return {\n indexName: this.indexName,\n indexId: this.indexId,\n };\n },\n },\n};\n"],"names":["name","mixins","createSuitMixin","createWidgetMixin","connector","indexWidget","provide","$_ais_getParentIndex","this","widget","props","indexName","type","String","required","indexId","render","renderCompat","h","getDefaultSlot","computed","widgetParams"],"mappings":"wQAQe,CACbA,KAAM,WACNC,OAAQ,CACNC,EAAgB,CAAEF,KAAM,UACxBG,EAAkB,CAAEC,4BANGC,MAQzBC,oCACS,CAGLC,uCAA4BC,EAAKC,UAGrCC,MAAO,CACLC,UAAW,CACTC,KAAMC,OACNC,UAAU,GAEZC,QAAS,CACPH,KAAMC,OACNC,UAAU,IAGdE,OAAQC,EAAa,SAASC,UACrBA,EAAE,MAAO,GAAIC,EAAeX,SAErCY,SAAU,CACRC,8BACS,CACLV,UAAWH,KAAKG,UAChBI,QAASP,KAAKO"}
1
+ {"version":3,"file":"Index.js","sources":["../../../../src/components/Index.js"],"sourcesContent":["import { createSuitMixin } from '../mixins/suit';\nimport { createWidgetMixin } from '../mixins/widget';\nimport indexWidget from 'instantsearch.js/es/widgets/index/index';\nimport { renderCompat, getDefaultSlot } from '../util/vue-compat';\n\n// wrapped in a dummy function, since indexWidget doesn't render\nconst connectIndex = () => indexWidget;\n\nexport default {\n name: 'AisIndex',\n mixins: [\n createSuitMixin({ name: 'Index' }),\n createWidgetMixin(\n { connector: connectIndex },\n {\n $$widgetType: 'ais.index',\n }\n ),\n ],\n provide() {\n return {\n // The widget is created & registered by widgetMixin, accessor is needed\n // because provide is not reactive.\n $_ais_getParentIndex: () => this.widget,\n };\n },\n props: {\n indexName: {\n type: String,\n required: true,\n },\n indexId: {\n type: String,\n required: false,\n },\n },\n render: renderCompat(function(h) {\n return h('div', {}, getDefaultSlot(this));\n }),\n computed: {\n widgetParams() {\n return {\n indexName: this.indexName,\n indexId: this.indexId,\n };\n },\n },\n};\n"],"names":["name","mixins","createSuitMixin","createWidgetMixin","connector","indexWidget","$$widgetType","provide","$_ais_getParentIndex","this","widget","props","indexName","type","String","required","indexId","render","renderCompat","h","getDefaultSlot","computed","widgetParams"],"mappings":"wQAQe,CACbA,KAAM,WACNC,OAAQ,CACNC,EAAgB,CAAEF,KAAM,UACxBG,EACE,CAAEC,4BAPmBC,IAQrB,CACEC,aAAc,eAIpBC,oCACS,CAGLC,uCAA4BC,EAAKC,UAGrCC,MAAO,CACLC,UAAW,CACTC,KAAMC,OACNC,UAAU,GAEZC,QAAS,CACPH,KAAMC,OACNC,UAAU,IAGdE,OAAQC,EAAa,SAASC,UACrBA,EAAE,MAAO,GAAIC,EAAeX,SAErCY,SAAU,CACRC,8BACS,CACLV,UAAWH,KAAKG,UAChBI,QAASP,KAAKO"}
@@ -1,2 +1,2 @@
1
- import{createSuitMixin as t}from"../mixins/suit.js";import{createWidgetMixin as e}from"../mixins/widget.js";import{connectInfiniteHitsWithInsights as s}from"instantsearch.js/es/connectors/index.js";export default{name:"AisInfiniteHits",mixins:[e({connector:s}),t({name:"InfiniteHits"})],props:{showPrevious:{type:Boolean,default:!1},escapeHTML:{type:Boolean,default:!0},transformItems:{type:Function,default:void 0},cache:{type:Object,default:void 0}},computed:{widgetParams:function(){return{showPrevious:this.showPrevious,escapeHTML:this.escapeHTML,transformItems:this.transformItems,cache:this.cache}},items:function(){return this.state.hits}},methods:{refinePrevious:function(){this.state.showPrevious()},refineNext:function(){this.state.showMore()}}};
1
+ import{createSuitMixin as t}from"../mixins/suit.js";import{createWidgetMixin as e}from"../mixins/widget.js";import{connectInfiniteHitsWithInsights as s}from"instantsearch.js/es/connectors/index.js";export default{name:"AisInfiniteHits",mixins:[e({connector:s},{$$widgetType:"ais.infiniteHits"}),t({name:"InfiniteHits"})],props:{showPrevious:{type:Boolean,default:!1},escapeHTML:{type:Boolean,default:!0},transformItems:{type:Function,default:void 0},cache:{type:Object,default:void 0}},computed:{widgetParams:function(){return{showPrevious:this.showPrevious,escapeHTML:this.escapeHTML,transformItems:this.transformItems,cache:this.cache}},items:function(){return this.state.hits}},methods:{refinePrevious:function(){this.state.showPrevious()},refineNext:function(){this.state.showMore()}}};
2
2
  //# sourceMappingURL=InfiniteHits.vue_vue&type=script&lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InfiniteHits.vue_vue&type=script&lang.js","sources":["../../../../src/components/InfiniteHits.vue"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"suit()\"\n >\n\n <slot\n v-if=\"showPrevious\"\n name=\"loadPrevious\"\n :refine-previous=\"refinePrevious\"\n :page=\"state.results.page\"\n :is-first-page=\"state.isFirstPage\"\n >\n <button\n :class=\"[suit('loadPrevious'), state.isFirstPage && suit('loadPrevious', 'disabled')]\"\n :disabled=\"state.isFirstPage\"\n @click=\"refinePrevious()\"\n >Show previous results</button>\n </slot>\n\n <slot\n :items=\"items\"\n :results=\"state.results\"\n :is-last-page=\"state.isLastPage\"\n :refine-previous=\"refinePrevious\"\n :refine-next=\"refineNext\"\n :refine=\"refineNext\"\n :insights=\"state.insights\"\n :send-event=\"state.sendEvent\"\n >\n <ol :class=\"suit('list')\">\n <li\n v-for=\"(item, index) in items\"\n :class=\"suit('item')\"\n :key=\"item.objectID\"\n >\n <slot\n name=\"item\"\n :item=\"item\"\n :index=\"index\"\n :insights=\"state.insights\"\n >objectID: {{ item.objectID }}, index: {{ index }}</slot>\n </li>\n </ol>\n\n <slot\n name=\"loadMore\"\n :refine-next=\"refineNext\"\n :refine=\"refineNext\"\n :page=\"state.results.page\"\n :is-last-page=\"state.isLastPage\"\n >\n <button\n :class=\"[suit('loadMore'), state.isLastPage && suit('loadMore', 'disabled')]\"\n :disabled=\"state.isLastPage\"\n @click=\"refineNext()\"\n >Show more results</button>\n </slot>\n </slot>\n </div>\n</template>\n\n<script>\nimport { createWidgetMixin } from '../mixins/widget';\nimport { connectInfiniteHitsWithInsights } from 'instantsearch.js/es/connectors';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisInfiniteHits',\n mixins: [\n createWidgetMixin({ connector: connectInfiniteHitsWithInsights }),\n createSuitMixin({ name: 'InfiniteHits' }),\n ],\n props: {\n showPrevious: {\n type: Boolean,\n default: false,\n },\n escapeHTML: {\n type: Boolean,\n default: true,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n cache: {\n type: Object,\n default: undefined,\n },\n },\n computed: {\n widgetParams() {\n return {\n showPrevious: this.showPrevious,\n escapeHTML: this.escapeHTML,\n transformItems: this.transformItems,\n cache: this.cache,\n };\n },\n items() {\n // Fixes InstantSearch.js connectors API: every list\n // of things must be called `items`\n return this.state.hits;\n },\n },\n methods: {\n refinePrevious() {\n this.state.showPrevious();\n },\n refineNext() {\n this.state.showMore();\n },\n },\n};\n</script>\n"],"names":["name","mixins","createWidgetMixin","connector","connectInfiniteHitsWithInsights","createSuitMixin","props","showPrevious","type","Boolean","default","escapeHTML","transformItems","Function","undefined","cache","Object","computed","widgetParams","this","items","state","hits","methods","refinePrevious","refineNext","showMore"],"mappings":"oNAmEe,CACbA,KAAM,kBACNC,OAAQ,CACNC,EAAkB,CAAEC,UAAWC,IAC/BC,EAAgB,CAAEL,KAAM,kBAE1BM,MAAO,CACLC,aAAc,CACZC,KAAMC,QACNC,SAAS,GAEXC,WAAY,CACVH,KAAMC,QACNC,SAAS,GAEXE,eAAgB,CACdJ,KAAMK,SACNH,aAASI,GAEXC,MAAO,CACLP,KAAMQ,OACNN,aAASI,IAGbG,SAAU,CACRC,8BACS,CACLX,aAAcY,KAAKZ,aACnBI,WAAYQ,KAAKR,WACjBC,eAAgBO,KAAKP,eACrBG,MAAOI,KAAKJ,QAGhBK,wBAGSD,KAAKE,MAAMC,OAGtBC,QAAS,CACPC,+BACOH,MAAMd,gBAEbkB,2BACOJ,MAAMK"}
1
+ {"version":3,"file":"InfiniteHits.vue_vue&type=script&lang.js","sources":["../../../../src/components/InfiniteHits.vue"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"suit()\"\n >\n\n <slot\n v-if=\"showPrevious\"\n name=\"loadPrevious\"\n :refine-previous=\"refinePrevious\"\n :page=\"state.results.page\"\n :is-first-page=\"state.isFirstPage\"\n >\n <button\n :class=\"[suit('loadPrevious'), state.isFirstPage && suit('loadPrevious', 'disabled')]\"\n :disabled=\"state.isFirstPage\"\n @click=\"refinePrevious()\"\n >Show previous results</button>\n </slot>\n\n <slot\n :items=\"items\"\n :results=\"state.results\"\n :is-last-page=\"state.isLastPage\"\n :refine-previous=\"refinePrevious\"\n :refine-next=\"refineNext\"\n :refine=\"refineNext\"\n :insights=\"state.insights\"\n :send-event=\"state.sendEvent\"\n >\n <ol :class=\"suit('list')\">\n <li\n v-for=\"(item, index) in items\"\n :class=\"suit('item')\"\n :key=\"item.objectID\"\n >\n <slot\n name=\"item\"\n :item=\"item\"\n :index=\"index\"\n :insights=\"state.insights\"\n >objectID: {{ item.objectID }}, index: {{ index }}</slot>\n </li>\n </ol>\n\n <slot\n name=\"loadMore\"\n :refine-next=\"refineNext\"\n :refine=\"refineNext\"\n :page=\"state.results.page\"\n :is-last-page=\"state.isLastPage\"\n >\n <button\n :class=\"[suit('loadMore'), state.isLastPage && suit('loadMore', 'disabled')]\"\n :disabled=\"state.isLastPage\"\n @click=\"refineNext()\"\n >Show more results</button>\n </slot>\n </slot>\n </div>\n</template>\n\n<script>\nimport { createWidgetMixin } from '../mixins/widget';\nimport { connectInfiniteHitsWithInsights } from 'instantsearch.js/es/connectors';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisInfiniteHits',\n mixins: [\n createWidgetMixin(\n {\n connector: connectInfiniteHitsWithInsights,\n },\n {\n $$widgetType: 'ais.infiniteHits',\n }\n ),\n createSuitMixin({ name: 'InfiniteHits' }),\n ],\n props: {\n showPrevious: {\n type: Boolean,\n default: false,\n },\n escapeHTML: {\n type: Boolean,\n default: true,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n cache: {\n type: Object,\n default: undefined,\n },\n },\n computed: {\n widgetParams() {\n return {\n showPrevious: this.showPrevious,\n escapeHTML: this.escapeHTML,\n transformItems: this.transformItems,\n cache: this.cache,\n };\n },\n items() {\n // Fixes InstantSearch.js connectors API: every list\n // of things must be called `items`\n return this.state.hits;\n },\n },\n methods: {\n refinePrevious() {\n this.state.showPrevious();\n },\n refineNext() {\n this.state.showMore();\n },\n },\n};\n</script>\n"],"names":["name","mixins","createWidgetMixin","connector","connectInfiniteHitsWithInsights","$$widgetType","createSuitMixin","props","showPrevious","type","Boolean","default","escapeHTML","transformItems","Function","undefined","cache","Object","computed","widgetParams","this","items","state","hits","methods","refinePrevious","refineNext","showMore"],"mappings":"oNAmEe,CACbA,KAAM,kBACNC,OAAQ,CACNC,EACE,CACEC,UAAWC,GAEb,CACEC,aAAc,qBAGlBC,EAAgB,CAAEN,KAAM,kBAE1BO,MAAO,CACLC,aAAc,CACZC,KAAMC,QACNC,SAAS,GAEXC,WAAY,CACVH,KAAMC,QACNC,SAAS,GAEXE,eAAgB,CACdJ,KAAMK,SACNH,aAASI,GAEXC,MAAO,CACLP,KAAMQ,OACNN,aAASI,IAGbG,SAAU,CACRC,8BACS,CACLX,aAAcY,KAAKZ,aACnBI,WAAYQ,KAAKR,WACjBC,eAAgBO,KAAKP,eACrBG,MAAOI,KAAKJ,QAGhBK,wBAGSD,KAAKE,MAAMC,OAGtBC,QAAS,CACPC,+BACOH,MAAMd,gBAEbkB,2BACOJ,MAAMK"}
@@ -1 +1 @@
1
- {"version":3,"file":"InfiniteHits.vue_vue&type=template&id=dcfb64b8&lang.js","sources":["../../../../src/components/InfiniteHits.vue?vue&type=template&id=dcfb64b8&lang.js"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"suit()\"\n >\n\n <slot\n v-if=\"showPrevious\"\n name=\"loadPrevious\"\n :refine-previous=\"refinePrevious\"\n :page=\"state.results.page\"\n :is-first-page=\"state.isFirstPage\"\n >\n <button\n :class=\"[suit('loadPrevious'), state.isFirstPage && suit('loadPrevious', 'disabled')]\"\n :disabled=\"state.isFirstPage\"\n @click=\"refinePrevious()\"\n >Show previous results</button>\n </slot>\n\n <slot\n :items=\"items\"\n :results=\"state.results\"\n :is-last-page=\"state.isLastPage\"\n :refine-previous=\"refinePrevious\"\n :refine-next=\"refineNext\"\n :refine=\"refineNext\"\n :insights=\"state.insights\"\n :send-event=\"state.sendEvent\"\n >\n <ol :class=\"suit('list')\">\n <li\n v-for=\"(item, index) in items\"\n :class=\"suit('item')\"\n :key=\"item.objectID\"\n >\n <slot\n name=\"item\"\n :item=\"item\"\n :index=\"index\"\n :insights=\"state.insights\"\n >objectID: {{ item.objectID }}, index: {{ index }}</slot>\n </li>\n </ol>\n\n <slot\n name=\"loadMore\"\n :refine-next=\"refineNext\"\n :refine=\"refineNext\"\n :page=\"state.results.page\"\n :is-last-page=\"state.isLastPage\"\n >\n <button\n :class=\"[suit('loadMore'), state.isLastPage && suit('loadMore', 'disabled')]\"\n :disabled=\"state.isLastPage\"\n @click=\"refineNext()\"\n >Show more results</button>\n </slot>\n </slot>\n </div>\n</template>\n\n<script>\nimport { createWidgetMixin } from '../mixins/widget';\nimport { connectInfiniteHitsWithInsights } from 'instantsearch.js/es/connectors';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisInfiniteHits',\n mixins: [\n createWidgetMixin({ connector: connectInfiniteHitsWithInsights }),\n createSuitMixin({ name: 'InfiniteHits' }),\n ],\n props: {\n showPrevious: {\n type: Boolean,\n default: false,\n },\n escapeHTML: {\n type: Boolean,\n default: true,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n cache: {\n type: Object,\n default: undefined,\n },\n },\n computed: {\n widgetParams() {\n return {\n showPrevious: this.showPrevious,\n escapeHTML: this.escapeHTML,\n transformItems: this.transformItems,\n cache: this.cache,\n };\n },\n items() {\n // Fixes InstantSearch.js connectors API: every list\n // of things must be called `items`\n return this.state.hits;\n },\n },\n methods: {\n refinePrevious() {\n this.state.showPrevious();\n },\n refineNext() {\n this.state.showMore();\n },\n },\n};\n</script>\n"],"names":["_ctx","_createBlock","class","$props","_renderSlot","refinePrevious","$options","page","results","isFirstPage","_createVNode","disabled","onClick","items","isLastPage","refineNext","refine","insights","sendEvent","item","index","key","objectID"],"mappings":"iNAEUA,aADRC,eAEGC,MAAOF,WAIAG,eADRC,iCAGGC,eAAiBC,iBACjBC,KAAMP,QAAMQ,QAAQD,KACpBE,YAAeT,QAAMS,+BAEtBC,YACGR,OAAQF,uBAAsBA,QAAMS,aAAeT,mCACnDW,SAAUX,QAAMS,YAChBG,uCAAON,sBACT,yDAGHF,sBACGS,MAAOP,QACPE,QAASR,QAAMQ,QACfM,WAAcd,QAAMc,WACpBT,eAAiBC,iBACjBS,WAAaT,aACbU,OAAQV,aACRW,SAAUjB,QAAMiB,SAChBC,UAAYlB,QAAMkB,6BAEnBR,QAAKR,MAAOF,wBACVC,WAC0BK,iBAAhBa,EAAMC,cADhBnB,QAEGC,MAAOF,eACPqB,IAAKF,EAAKG,WAEXlB,mBAEGe,KAAMA,EACNC,MAAOA,EACPH,SAAUjB,QAAMiB,8BAClB,eAAaE,EAAKG,UAAW,cAAYF,yBAI9ChB,uBAEGW,WAAaT,aACbU,OAAQV,aACRC,KAAMP,QAAMQ,QAAQD,KACpBO,WAAcd,QAAMc,8BAErBJ,YACGR,OAAQF,mBAAkBA,QAAMc,YAAcd,+BAC9CW,SAAUX,QAAMc,WAChBF,uCAAON,kBACT"}
1
+ {"version":3,"file":"InfiniteHits.vue_vue&type=template&id=dcfb64b8&lang.js","sources":["../../../../src/components/InfiniteHits.vue?vue&type=template&id=dcfb64b8&lang.js"],"sourcesContent":["<template>\n <div\n v-if=\"state\"\n :class=\"suit()\"\n >\n\n <slot\n v-if=\"showPrevious\"\n name=\"loadPrevious\"\n :refine-previous=\"refinePrevious\"\n :page=\"state.results.page\"\n :is-first-page=\"state.isFirstPage\"\n >\n <button\n :class=\"[suit('loadPrevious'), state.isFirstPage && suit('loadPrevious', 'disabled')]\"\n :disabled=\"state.isFirstPage\"\n @click=\"refinePrevious()\"\n >Show previous results</button>\n </slot>\n\n <slot\n :items=\"items\"\n :results=\"state.results\"\n :is-last-page=\"state.isLastPage\"\n :refine-previous=\"refinePrevious\"\n :refine-next=\"refineNext\"\n :refine=\"refineNext\"\n :insights=\"state.insights\"\n :send-event=\"state.sendEvent\"\n >\n <ol :class=\"suit('list')\">\n <li\n v-for=\"(item, index) in items\"\n :class=\"suit('item')\"\n :key=\"item.objectID\"\n >\n <slot\n name=\"item\"\n :item=\"item\"\n :index=\"index\"\n :insights=\"state.insights\"\n >objectID: {{ item.objectID }}, index: {{ index }}</slot>\n </li>\n </ol>\n\n <slot\n name=\"loadMore\"\n :refine-next=\"refineNext\"\n :refine=\"refineNext\"\n :page=\"state.results.page\"\n :is-last-page=\"state.isLastPage\"\n >\n <button\n :class=\"[suit('loadMore'), state.isLastPage && suit('loadMore', 'disabled')]\"\n :disabled=\"state.isLastPage\"\n @click=\"refineNext()\"\n >Show more results</button>\n </slot>\n </slot>\n </div>\n</template>\n\n<script>\nimport { createWidgetMixin } from '../mixins/widget';\nimport { connectInfiniteHitsWithInsights } from 'instantsearch.js/es/connectors';\nimport { createSuitMixin } from '../mixins/suit';\n\nexport default {\n name: 'AisInfiniteHits',\n mixins: [\n createWidgetMixin(\n {\n connector: connectInfiniteHitsWithInsights,\n },\n {\n $$widgetType: 'ais.infiniteHits',\n }\n ),\n createSuitMixin({ name: 'InfiniteHits' }),\n ],\n props: {\n showPrevious: {\n type: Boolean,\n default: false,\n },\n escapeHTML: {\n type: Boolean,\n default: true,\n },\n transformItems: {\n type: Function,\n default: undefined,\n },\n cache: {\n type: Object,\n default: undefined,\n },\n },\n computed: {\n widgetParams() {\n return {\n showPrevious: this.showPrevious,\n escapeHTML: this.escapeHTML,\n transformItems: this.transformItems,\n cache: this.cache,\n };\n },\n items() {\n // Fixes InstantSearch.js connectors API: every list\n // of things must be called `items`\n return this.state.hits;\n },\n },\n methods: {\n refinePrevious() {\n this.state.showPrevious();\n },\n refineNext() {\n this.state.showMore();\n },\n },\n};\n</script>\n"],"names":["_ctx","_createBlock","class","$props","_renderSlot","refinePrevious","$options","page","results","isFirstPage","_createVNode","disabled","onClick","items","isLastPage","refineNext","refine","insights","sendEvent","item","index","key","objectID"],"mappings":"iNAEUA,aADRC,eAEGC,MAAOF,WAIAG,eADRC,iCAGGC,eAAiBC,iBACjBC,KAAMP,QAAMQ,QAAQD,KACpBE,YAAeT,QAAMS,+BAEtBC,YACGR,OAAQF,uBAAsBA,QAAMS,aAAeT,mCACnDW,SAAUX,QAAMS,YAChBG,uCAAON,sBACT,yDAGHF,sBACGS,MAAOP,QACPE,QAASR,QAAMQ,QACfM,WAAcd,QAAMc,WACpBT,eAAiBC,iBACjBS,WAAaT,aACbU,OAAQV,aACRW,SAAUjB,QAAMiB,SAChBC,UAAYlB,QAAMkB,6BAEnBR,QAAKR,MAAOF,wBACVC,WAC0BK,iBAAhBa,EAAMC,cADhBnB,QAEGC,MAAOF,eACPqB,IAAKF,EAAKG,WAEXlB,mBAEGe,KAAMA,EACNC,MAAOA,EACPH,SAAUjB,QAAMiB,8BAClB,eAAaE,EAAKG,UAAW,cAAYF,yBAI9ChB,uBAEGW,WAAaT,aACbU,OAAQV,aACRC,KAAMP,QAAMQ,QAAQD,KACpBO,WAAcd,QAAMc,8BAErBJ,YACGR,OAAQF,mBAAkBA,QAAMc,YAAcd,+BAC9CW,SAAUX,QAAMc,WAChBF,uCAAON,kBACT"}
@@ -1,2 +1,2 @@
1
- import{createSuitMixin as t}from"../mixins/suit.js";import{createWidgetMixin as e}from"../mixins/widget.js";import{connectMenu as i}from"instantsearch.js/es/connectors/index.js";import{createPanelConsumerMixin as o}from"../mixins/panel.js";export default{name:"AisMenu",mixins:[t({name:"Menu"}),e({connector:i}),o({mapStateToCanRefine:function(t){return Boolean(t.canRefine)}})],props:{attribute:{type:String,required:!0},limit:{type:Number,default:void 0},showMoreLimit:{type:Number,default:void 0},showMore:{type:Boolean,default:!1},sortBy:{type:[Array,Function],default:void 0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{attribute:this.attribute,limit:this.limit,showMore:this.showMore,showMoreLimit:this.showMoreLimit,sortBy:this.sortBy,transformItems:this.transformItems}},showShowMoreButton:function(){return this.state.canRefine&&this.showMore}}};
1
+ import{createSuitMixin as t}from"../mixins/suit.js";import{createWidgetMixin as e}from"../mixins/widget.js";import{connectMenu as i}from"instantsearch.js/es/connectors/index.js";import{createPanelConsumerMixin as o}from"../mixins/panel.js";export default{name:"AisMenu",mixins:[t({name:"Menu"}),e({connector:i},{$$widgetType:"ais.menu"}),o({mapStateToCanRefine:function(t){return Boolean(t.canRefine)}})],props:{attribute:{type:String,required:!0},limit:{type:Number,default:void 0},showMoreLimit:{type:Number,default:void 0},showMore:{type:Boolean,default:!1},sortBy:{type:[Array,Function],default:void 0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{attribute:this.attribute,limit:this.limit,showMore:this.showMore,showMoreLimit:this.showMoreLimit,sortBy:this.sortBy,transformItems:this.transformItems}},showShowMoreButton:function(){return this.state.canRefine&&this.showMore}}};
2
2
  //# sourceMappingURL=Menu.vue_vue&type=script&lang.js.map