@sonic-equipment/ui 0.0.119 → 120.0.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 (407) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +5 -0
  2. package/dist/_virtual/index.js +7 -0
  3. package/dist/algolia/algolia-active-categories.js +38 -0
  4. package/dist/algolia/algolia-active-filters.js +33 -0
  5. package/dist/algolia/algolia-categories-filters.js +29 -0
  6. package/dist/algolia/algolia-dummy-refinement-list-consumer.js +20 -0
  7. package/dist/algolia/algolia-filter-panel.js +42 -0
  8. package/dist/algolia/algolia-filter-panel.module.css.js +3 -0
  9. package/dist/algolia/algolia-hit-type.js +6 -0
  10. package/dist/algolia/algolia-hits-provider.js +17 -0
  11. package/dist/algolia/algolia-index-config.js +175 -0
  12. package/dist/algolia/algolia-insight-instant-search-provider.js +14 -0
  13. package/dist/algolia/algolia-insights-provider.js +18 -0
  14. package/dist/algolia/algolia-instant-search-state-provider.js +16 -0
  15. package/dist/algolia/algolia-intialization.js +26 -0
  16. package/dist/algolia/algolia-multi-select-filter-section.js +27 -0
  17. package/dist/algolia/algolia-pagination.js +18 -0
  18. package/dist/algolia/algolia-provider.js +34 -0
  19. package/dist/algolia/algolia-query-string-routing.js +106 -0
  20. package/dist/algolia/algolia-results-count.js +14 -0
  21. package/dist/algolia/algolia-search-provider.js +139 -0
  22. package/dist/algolia/algolia-searchclient-offline.js +25 -0
  23. package/dist/algolia/algolia-sonic-searchclient.js +25 -0
  24. package/dist/algolia/algolia-sort-by.js +29 -0
  25. package/dist/algolia/filter-section.js +33 -0
  26. package/dist/algolia/filter-section.module.css.js +3 -0
  27. package/dist/algolia/use-algolia-hits.js +19 -0
  28. package/dist/algolia/use-algolia-insights-provider-global-state.js +9 -0
  29. package/dist/algolia/use-algolia-insights.js +181 -0
  30. package/dist/algolia/use-algolia-instant-search-state.js +25 -0
  31. package/dist/algolia/use-algolia-search.js +41 -0
  32. package/dist/background-overlay/background-overlay.js +36 -0
  33. package/dist/background-overlay/background-overlay.module.css.js +3 -0
  34. package/dist/badges/badge/badge.js +22 -0
  35. package/dist/badges/badge/badge.module.css.js +3 -0
  36. package/dist/badges/badge/icon-with-badge/icon-with-badge.js +8 -0
  37. package/dist/badges/badge/icon-with-badge/icon-with-badge.module.css.js +3 -0
  38. package/dist/badges/tag/tag.js +10 -0
  39. package/dist/badges/tag/tag.module.css.js +3 -0
  40. package/dist/breadcrumbs/breadcrumb.js +35 -0
  41. package/dist/breadcrumbs/breadcrumb.module.css.js +3 -0
  42. package/dist/buttons/add-to-cart-button/add-to-cart-button.js +113 -0
  43. package/dist/buttons/add-to-cart-button/add-to-cart-button.module.css.js +3 -0
  44. package/dist/buttons/add-to-cart-button/connected-add-to-cart-button.js +92 -0
  45. package/dist/buttons/button/button.js +21 -0
  46. package/dist/buttons/button/button.module.css.js +3 -0
  47. package/dist/buttons/favorite/connected-favorite-button.js +64 -0
  48. package/dist/buttons/favorite/favorite-button.js +15 -0
  49. package/dist/buttons/favorite/favorite-button.module.css.js +3 -0
  50. package/dist/buttons/icon-button/icon-button.js +15 -0
  51. package/dist/buttons/icon-button/icon-button.module.css.js +3 -0
  52. package/dist/buttons/link/link.js +10 -0
  53. package/dist/buttons/link/link.module.css.js +3 -0
  54. package/dist/buttons/print-button/print-button.js +9 -0
  55. package/dist/cards/category-card/category-card.js +15 -0
  56. package/dist/cards/category-card/category-card.module.css.js +3 -0
  57. package/dist/cards/orderline-card/connected-orderline-card.js +13 -0
  58. package/dist/cards/orderline-card/connected-remove-button.js +19 -0
  59. package/dist/cards/orderline-card/orderline-card.js +17 -0
  60. package/dist/cards/orderline-card/orderline-card.module.css.js +3 -0
  61. package/dist/cards/product-card/connected-product-card.js +11 -0
  62. package/dist/cards/product-card/product-card.js +15 -0
  63. package/dist/cards/product-card/product-card.module.css.js +3 -0
  64. package/dist/carousel/card-carousel/card-carousel.js +23 -0
  65. package/dist/carousel/card-carousel/card-carousel.module.css.js +3 -0
  66. package/dist/carousel/carousel-navigation-button.js +13 -0
  67. package/dist/carousel/carousel-navigation-button.module.css.js +3 -0
  68. package/dist/carousel/carousel.js +69 -0
  69. package/dist/carousel/carousel.module.css.js +3 -0
  70. package/dist/carousel/category-carousel/category-carousel.js +9 -0
  71. package/dist/carousel/category-carousel/category-carousel.module.css.js +3 -0
  72. package/dist/carousel/pagination/pagination.js +40 -0
  73. package/dist/carousel/pagination/pagination.module.css.js +3 -0
  74. package/dist/carousel/pagination/transitions.js +144 -0
  75. package/dist/carousel/usp-carousel/product-usp-carousel-slide.js +10 -0
  76. package/dist/carousel/usp-carousel/product-usp-carousel.js +9 -0
  77. package/dist/carousel/usp-carousel/usp-carousel.js +47 -0
  78. package/dist/carousel/usp-carousel/usp-carousel.module.css.js +3 -0
  79. package/dist/cart-totals/cart-totals-summary.js +11 -0
  80. package/dist/cart-totals/cart-totals-summary.module.css.js +3 -0
  81. package/dist/cart-totals/cart-totals.js +10 -0
  82. package/dist/cart-totals/cart-totals.module.css.js +3 -0
  83. package/dist/collapsables/accordion/accordion-item.js +18 -0
  84. package/dist/collapsables/accordion/accordion.js +15 -0
  85. package/dist/collapsables/accordion/accordion.module.css.js +3 -0
  86. package/dist/collapsables/show-all/show-all.js +33 -0
  87. package/dist/collapsables/show-all/show-all.module.css.js +3 -0
  88. package/dist/config.d.ts +1 -1
  89. package/dist/config.js +82 -0
  90. package/dist/country-selector/connected-country-selector.js +37 -0
  91. package/dist/country-selector/country-selector-dialog/country-selector-dialog.js +42 -0
  92. package/dist/country-selector/country-selector-dialog/country-selector-dialog.module.css.js +3 -0
  93. package/dist/country-selector/country-selector-trigger/country-selector-trigger.js +16 -0
  94. package/dist/country-selector/country-selector-trigger/country-selector-trigger.module.css.js +3 -0
  95. package/dist/country-selector/use-countries-languages.js +72 -0
  96. package/dist/delivery-time/delivery-time.js +18 -0
  97. package/dist/delivery-time/delivery-time.module.css.js +3 -0
  98. package/dist/display/product-price/product-price.js +19 -0
  99. package/dist/display/product-price/product-price.module.css.js +3 -0
  100. package/dist/display/product-price/product-total-price.js +16 -0
  101. package/dist/display/product-price/product-total-price.module.css.js +3 -0
  102. package/dist/display/product-sku/product-sku.js +8 -0
  103. package/dist/display/product-sku/product-sku.module.css.js +3 -0
  104. package/dist/exports.d.ts +4 -4
  105. package/dist/filters/active-filters/active-filters.js +20 -0
  106. package/dist/filters/active-filters/active-filters.module.css.js +3 -0
  107. package/dist/filters/multi-select/multi-select.js +20 -0
  108. package/dist/filters/multi-select/multi-select.module.css.js +3 -0
  109. package/dist/filters/pagination/pagination.js +14 -0
  110. package/dist/filters/pagination/pagination.module.css.js +3 -0
  111. package/dist/forms/checkbox/checkbox.js +11 -0
  112. package/dist/forms/checkbox/checkbox.module.css.js +3 -0
  113. package/dist/forms/color-checkbox/color-checkbox.js +13 -0
  114. package/dist/forms/field-error/field-error.js +10 -0
  115. package/dist/forms/field-error/field-error.module.css.js +3 -0
  116. package/dist/forms/input/input.js +31 -0
  117. package/dist/forms/input/input.module.css.js +3 -0
  118. package/dist/forms/label/label.js +12 -0
  119. package/dist/forms/label/label.module.css.js +3 -0
  120. package/dist/forms/number-field/number-field.js +29 -0
  121. package/dist/forms/number-field/number-field.module.css.js +3 -0
  122. package/dist/forms/select/select.js +31 -0
  123. package/dist/forms/select/select.module.css.js +3 -0
  124. package/dist/forms/text-field/text-field.js +22 -0
  125. package/dist/forms/text-field/text-field.module.css.js +3 -0
  126. package/dist/forms/textarea/textarea.js +54 -0
  127. package/dist/forms/textarea/textarea.module.css.js +3 -0
  128. package/dist/global-search/categories-grid/categories-grid.js +14 -0
  129. package/dist/global-search/categories-grid/categories-grid.module.css.js +3 -0
  130. package/dist/global-search/global-search-provider/global-search-provider.js +15 -0
  131. package/dist/global-search/global-search-provider/use-search-disclosure.js +13 -0
  132. package/dist/global-search/global-search.js +43 -0
  133. package/dist/global-search/global-search.module.css.js +3 -0
  134. package/dist/global-search/plugins/categories-plugin.js +35 -0
  135. package/dist/global-search/plugins/popular-categories-plugin.js +32 -0
  136. package/dist/global-search/plugins/popular-searches-plugin.js +23 -0
  137. package/dist/global-search/plugins/query-suggestions-plugin.js +21 -0
  138. package/dist/global-search/plugins/quick-access-plugin.js +34 -0
  139. package/dist/global-search/plugins/recent-searches-plugin.js +16 -0
  140. package/dist/global-search/search-highlight/highlight.js +13 -0
  141. package/dist/global-search/search-input/connected-search-input.js +22 -0
  142. package/dist/global-search/search-input/search-input.js +29 -0
  143. package/dist/global-search/search-input/search-input.module.css.js +3 -0
  144. package/dist/global-search/search-result-panel/panel-content.js +13 -0
  145. package/dist/global-search/search-result-panel/search-result-panel.js +17 -0
  146. package/dist/global-search/search-result-panel/search-result-panel.module.css.js +3 -0
  147. package/dist/global-search/search-result-panel/sections/no-search-results.js +30 -0
  148. package/dist/global-search/search-result-panel/sections/no-search.js +56 -0
  149. package/dist/global-search/search-result-panel/sections/search-content.module.css.js +3 -0
  150. package/dist/global-search/search-result-panel/sections/section-container.js +8 -0
  151. package/dist/global-search/search-result-panel/sections/with-results.js +101 -0
  152. package/dist/global-search/search-section/search-list-item.js +25 -0
  153. package/dist/global-search/search-section/search-list-item.module.css.js +3 -0
  154. package/dist/global-search/search-section/search-list.js +9 -0
  155. package/dist/global-search/search-section/search-list.module.css.js +3 -0
  156. package/dist/global-search/search-section/search-section.js +9 -0
  157. package/dist/global-search/search-section/search-section.module.css.js +3 -0
  158. package/dist/header/cart-icon/connected-cart-icon.js +14 -0
  159. package/dist/icons/glyph/glyphs-arrow-boldcaps-left-icon.js +7 -0
  160. package/dist/icons/glyph/glyphs-arrow-boldcaps-right-icon.js +7 -0
  161. package/dist/icons/glyph/glyphs-arrow-semibold-right-icon.js +7 -0
  162. package/dist/icons/glyph/glyphs-chevrons-bold-down-icon.js +7 -0
  163. package/dist/icons/glyph/glyphs-chevrons-slim-down-icon.js +7 -0
  164. package/dist/icons/glyph/glyphs-chevrons-slim-left-icon.js +7 -0
  165. package/dist/icons/glyph/glyphs-chevrons-slim-right-icon.js +7 -0
  166. package/dist/icons/solid/solid-attention-icon.js +7 -0
  167. package/dist/icons/solid/solid-cart-icon.js +7 -0
  168. package/dist/icons/solid/solid-close-icon.js +7 -0
  169. package/dist/icons/solid/solid-event-icon.js +7 -0
  170. package/dist/icons/solid/solid-favorite-icon.js +7 -0
  171. package/dist/icons/solid/solid-home-icon.js +7 -0
  172. package/dist/icons/solid/solid-information-icon.js +7 -0
  173. package/dist/icons/solid/solid-news-icon.js +7 -0
  174. package/dist/icons/solid/solid-notice-icon.js +7 -0
  175. package/dist/icons/solid/solid-okay-icon.js +7 -0
  176. package/dist/icons/solid/solid-sale-icon.js +7 -0
  177. package/dist/icons/solid/solid-tag-icon.js +7 -0
  178. package/dist/icons/stroke/stroke-categories-icon.js +7 -0
  179. package/dist/icons/stroke/stroke-checkmark-icon.js +7 -0
  180. package/dist/icons/stroke/stroke-closebox-icon.js +7 -0
  181. package/dist/icons/stroke/stroke-collapse-icon.js +7 -0
  182. package/dist/icons/stroke/stroke-download-icon.js +7 -0
  183. package/dist/icons/stroke/stroke-expand-icon.js +7 -0
  184. package/dist/icons/stroke/stroke-favorite-icon.js +7 -0
  185. package/dist/icons/stroke/stroke-filter-icon.js +7 -0
  186. package/dist/icons/stroke/stroke-recent-icon.js +7 -0
  187. package/dist/icons/stroke/stroke-search-icon.js +7 -0
  188. package/dist/icons/stroke/stroke-trash-icon.js +7 -0
  189. package/dist/index.d.ts +2 -0
  190. package/dist/index.js +254 -12972
  191. package/dist/intl/formatted-message.js +6 -0
  192. package/dist/intl/intl-context.js +10 -0
  193. package/dist/intl/intl-provider.js +15 -0
  194. package/dist/intl/types.js +17 -0
  195. package/dist/intl/use-culture-code.js +14 -0
  196. package/dist/intl/use-formatted-message.js +17 -0
  197. package/dist/intl/use-language-code.js +11 -0
  198. package/dist/intl/utils.js +29 -0
  199. package/dist/lists/download-document-list/download-document-list.js +16 -0
  200. package/dist/lists/download-document-list/download-document-list.module.css.js +3 -0
  201. package/dist/lists/feature-list/feature-list.js +22 -0
  202. package/dist/lists/feature-list/feature-list.module.css.js +3 -0
  203. package/dist/lists/orderline-list/orderline-list.js +25 -0
  204. package/dist/lists/orderline-list/orderline-list.module.css.js +3 -0
  205. package/dist/lists/product-overview-grid/product-overview-grid.js +10 -0
  206. package/dist/lists/product-overview-grid/product-overview-grid.module.css.js +3 -0
  207. package/dist/lists/ul/list.js +11 -0
  208. package/dist/lists/ul/list.module.css.js +3 -0
  209. package/dist/loading/blank-page-spacer.js +8 -0
  210. package/dist/loading/blank-page-spacer.module.css.js +3 -0
  211. package/dist/loading/loading-overlay.js +9 -0
  212. package/dist/loading/loading-overlay.module.css.js +3 -0
  213. package/dist/loading/progress-circle.js +9 -0
  214. package/dist/loading/progress-circle.module.css.js +3 -0
  215. package/dist/media/image/image.js +46 -0
  216. package/dist/media/image/image.module.css.js +3 -0
  217. package/dist/media/image-grid/images-grid.js +32 -0
  218. package/dist/media/image-grid/images-grid.module.css.js +3 -0
  219. package/dist/media/image-lightbox/image-lightbox.js +35 -0
  220. package/dist/media/image-lightbox/image-lightbox.module.css.js +3 -0
  221. package/dist/media/zoom-image/zoom-image.js +33 -0
  222. package/dist/media/zoom-image/zoom-image.module.css.js +3 -0
  223. package/dist/modals/confirmation/confirmation-dialog.js +12 -0
  224. package/dist/modals/confirmation/confirmation-dialog.module.css.js +3 -0
  225. package/dist/modals/dialog/dialog.js +30 -0
  226. package/dist/modals/dialog/dialog.module.css.js +3 -0
  227. package/dist/modals/favorite/add-to-favorite-dialog.js +60 -0
  228. package/dist/modals/favorite/add-to-favorite-dialog.module.css.js +3 -0
  229. package/dist/modals/modal/modal.js +34 -0
  230. package/dist/modals/modal/modal.module.css.js +3 -0
  231. package/dist/modals/signin/sign-in-dialog.js +22 -0
  232. package/dist/modals/signin/sign-in-dialog.module.css.js +3 -0
  233. package/dist/node_modules/.pnpm/instantsearch.js@4.75.4_algoliasearch@4.24.0/node_modules/instantsearch.js/es/lib/routers/history.js +341 -0
  234. package/dist/node_modules/.pnpm/instantsearch.js@4.75.4_algoliasearch@4.24.0/node_modules/instantsearch.js/es/lib/stateMappings/simple.js +36 -0
  235. package/dist/node_modules/.pnpm/instantsearch.js@4.75.4_algoliasearch@4.24.0/node_modules/instantsearch.js/es/lib/utils/documentation.js +8 -0
  236. package/dist/node_modules/.pnpm/instantsearch.js@4.75.4_algoliasearch@4.24.0/node_modules/instantsearch.js/es/lib/utils/logger.js +32 -0
  237. package/dist/node_modules/.pnpm/instantsearch.js@4.75.4_algoliasearch@4.24.0/node_modules/instantsearch.js/es/lib/utils/noop.js +3 -0
  238. package/dist/node_modules/.pnpm/instantsearch.js@4.75.4_algoliasearch@4.24.0/node_modules/instantsearch.js/es/lib/utils/safelyRunOnBrowser.js +24 -0
  239. package/dist/node_modules/.pnpm/qs@6.9.7/node_modules/qs/lib/formats.js +33 -0
  240. package/dist/node_modules/.pnpm/qs@6.9.7/node_modules/qs/lib/index.js +25 -0
  241. package/dist/node_modules/.pnpm/qs@6.9.7/node_modules/qs/lib/parse.js +269 -0
  242. package/dist/node_modules/.pnpm/qs@6.9.7/node_modules/qs/lib/stringify.js +300 -0
  243. package/dist/node_modules/.pnpm/qs@6.9.7/node_modules/qs/lib/utils.js +264 -0
  244. package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/modules/free-mode.js +237 -0
  245. package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/modules/navigation.js +200 -0
  246. package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/modules/thumbs.js +193 -0
  247. package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/shared/create-element-if-not-defined.js +21 -0
  248. package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/shared/ssr-window.esm.js +145 -0
  249. package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/shared/swiper-core.js +3912 -0
  250. package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/shared/update-on-virtual-data.js +130 -0
  251. package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/shared/update-swiper.js +230 -0
  252. package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/shared/utils.js +287 -0
  253. package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/swiper-react.js +389 -0
  254. package/dist/notifications/announcements/announcement-provider.js +32 -0
  255. package/dist/notifications/announcements/announcement-provider.module.css.js +3 -0
  256. package/dist/notifications/announcements/announcement.js +30 -0
  257. package/dist/notifications/announcements/announcement.module.css.js +3 -0
  258. package/dist/notifications/announcements/connected-announcement.js +27 -0
  259. package/dist/observers/intersection-observer.js +18 -0
  260. package/dist/pages/cart-page/cart-page.js +114 -0
  261. package/dist/pages/error-page/error-page.js +22 -0
  262. package/dist/pages/layouts/checkout-page-layout/checkout-page-layout.js +30 -0
  263. package/dist/pages/layouts/checkout-page-layout/checkout-page-layout.module.css.js +3 -0
  264. package/dist/pages/layouts/product-details-page-layout/product-details-page-layout.js +8 -0
  265. package/dist/pages/layouts/product-details-page-layout/product-details-page-layout.module.css.js +3 -0
  266. package/dist/pages/loading-page/loading-page.js +9 -0
  267. package/dist/pages/page/page.js +18 -0
  268. package/dist/pages/page/page.module.css.js +3 -0
  269. package/dist/pages/page-container/page-container.js +9 -0
  270. package/dist/pages/page-container/page-container.module.css.js +3 -0
  271. package/dist/pages/product-details-page/components/product-details-images/product-detail-images.js +35 -0
  272. package/dist/pages/product-details-page/components/product-details-images/product-detail-images.module.css.js +3 -0
  273. package/dist/pages/product-details-page/components/product-details-panel/product-details-panel.d.ts +3 -2
  274. package/dist/pages/product-details-page/components/product-details-panel/product-details-panel.js +35 -0
  275. package/dist/pages/product-details-page/components/product-details-panel/product-details-panel.module.css.js +3 -0
  276. package/dist/pages/product-details-page/components/product-details-recently-viewed/product-details-recently-viewed.d.ts +4 -0
  277. package/dist/pages/product-details-page/components/product-details-recently-viewed/product-details-recently-viewed.js +15 -0
  278. package/dist/pages/product-details-page/product-details-page.js +22 -0
  279. package/dist/pages/product-details-page/product-details.d.ts +6 -0
  280. package/dist/pages/product-details-page/product-details.js +25 -0
  281. package/dist/pages/product-listing-page/no-results/no-results.js +14 -0
  282. package/dist/pages/product-listing-page/no-results/no-results.module.css.js +3 -0
  283. package/dist/pages/product-listing-page/product-listing-page-category-carousel/product-listing-page-category-carousel.js +22 -0
  284. package/dist/pages/product-listing-page/product-listing-page-provider/product-listing-page-context.js +8 -0
  285. package/dist/pages/product-listing-page/product-listing-page-provider/product-listing-page-provider.js +13 -0
  286. package/dist/pages/product-listing-page/product-listing-page.js +29 -0
  287. package/dist/pages/product-listing-page/product-listing-page.module.css.js +3 -0
  288. package/dist/pages/product-listing-page/product-listing-product-overview/product-listing-product-overview.js +36 -0
  289. package/dist/pages/product-listing-page/product-listing.d.ts +6 -0
  290. package/dist/pages/product-listing-page/product-listing.js +42 -0
  291. package/dist/pages/search-result-page/search-result-product-overview/search-result-product-overview.js +38 -0
  292. package/dist/pages/search-result-page/search-results-page-category-carousel/search-results-page-category-carousel.js +22 -0
  293. package/dist/pages/search-result-page/search-results-page.js +49 -0
  294. package/dist/pages/search-result-page/search-results-page.module.css.js +3 -0
  295. package/dist/promos/promo-banner/promo-banner.js +11 -0
  296. package/dist/promos/promo-banner/promo-banner.module.css.js +3 -0
  297. package/dist/promos/promo-banners/promo-banners.js +16 -0
  298. package/dist/promos/promo-banners/promo-banners.module.css.js +3 -0
  299. package/dist/promos/promo-card/promo-card.js +11 -0
  300. package/dist/promos/promo-card/promo-card.module.css.js +3 -0
  301. package/dist/shared/api/bff/hooks/use-fetch-announcements.js +15 -0
  302. package/dist/shared/api/bff/hooks/use-fetch-product-details-page-data.js +14 -0
  303. package/dist/shared/api/bff/hooks/use-fetch-product-listing-page-data.js +14 -0
  304. package/dist/shared/api/bff/model/bff.model.d.ts +1 -1
  305. package/dist/shared/api/bff/model/bff.model.js +1 -0
  306. package/dist/shared/api/bff/services/bff-service.js +76 -0
  307. package/dist/shared/api/storefront/hooks/authentication/use-fetch-session.js +18 -0
  308. package/dist/shared/api/storefront/hooks/authentication/use-invalidate-session.js +9 -0
  309. package/dist/shared/api/storefront/hooks/authentication/use-is-authenticated.js +8 -0
  310. package/dist/shared/api/storefront/hooks/authentication/use-sign-in.js +21 -0
  311. package/dist/shared/api/storefront/hooks/authentication/use-sign-out.js +25 -0
  312. package/dist/shared/api/storefront/hooks/cart/use-add-product-to-current-cart.js +31 -0
  313. package/dist/shared/api/storefront/hooks/cart/use-delete-cart-line-by-id.js +23 -0
  314. package/dist/shared/api/storefront/hooks/cart/use-delete-current-cart.js +18 -0
  315. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-checkout-atp.js +15 -0
  316. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-count.js +8 -0
  317. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-lines-with-atp.js +11 -0
  318. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-lines.js +11 -0
  319. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-product-atp.js +15 -0
  320. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-promotions.js +15 -0
  321. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-with-atp.js +26 -0
  322. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart.js +17 -0
  323. package/dist/shared/api/storefront/hooks/cart/use-invalidate-current-cart.js +9 -0
  324. package/dist/shared/api/storefront/hooks/cart/use-patch-cart.js +15 -0
  325. package/dist/shared/api/storefront/hooks/cart/use-place-order.js +15 -0
  326. package/dist/shared/api/storefront/hooks/cart/use-save-cart-for-later.js +17 -0
  327. package/dist/shared/api/storefront/hooks/cart/use-update-cart-line-by-id.js +30 -0
  328. package/dist/shared/api/storefront/hooks/translation/use-fetch-translations.js +15 -0
  329. package/dist/shared/api/storefront/hooks/website/use-fetch-countries-languages.js +15 -0
  330. package/dist/shared/api/storefront/hooks/website/use-fetch-countries-with-languages.js +15 -0
  331. package/dist/shared/api/storefront/hooks/website/use-fetch-countries.js +14 -0
  332. package/dist/shared/api/storefront/hooks/website/use-fetch-settings.js +18 -0
  333. package/dist/shared/api/storefront/hooks/website/use-update-locale.js +11 -0
  334. package/dist/shared/api/storefront/hooks/wishlist/use-add-wishlist-item-to-current-wishlist.js +34 -0
  335. package/dist/shared/api/storefront/hooks/wishlist/use-add-wishlist-item-to-wishlist.js +33 -0
  336. package/dist/shared/api/storefront/hooks/wishlist/use-create-wishlist.js +17 -0
  337. package/dist/shared/api/storefront/hooks/wishlist/use-delete-wishlist-item-from-wishlist.js +21 -0
  338. package/dist/shared/api/storefront/hooks/wishlist/use-fetch-all-wishlists-items.js +36 -0
  339. package/dist/shared/api/storefront/hooks/wishlist/use-fetch-wishlists.js +14 -0
  340. package/dist/shared/api/storefront/model/shop.model.js +42 -0
  341. package/dist/shared/api/storefront/services/authentication-service.js +80 -0
  342. package/dist/shared/api/storefront/services/cart-service.js +128 -0
  343. package/dist/shared/api/storefront/services/translation-service.js +16 -0
  344. package/dist/shared/api/storefront/services/website-service.js +83 -0
  345. package/dist/shared/api/storefront/services/wishlist-service.js +72 -0
  346. package/dist/shared/feature-flags/use-feature-flags.js +45 -0
  347. package/dist/shared/fetch/request.d.ts +5 -0
  348. package/dist/shared/fetch/request.js +263 -0
  349. package/dist/shared/hooks/use-breakpoint.js +24 -0
  350. package/dist/shared/hooks/use-cookie.js +27 -0
  351. package/dist/shared/hooks/use-debounced-callback.js +18 -0
  352. package/dist/shared/hooks/use-disclosure.js +24 -0
  353. package/dist/shared/hooks/use-enable-mobile-zoom.js +36 -0
  354. package/dist/shared/hooks/use-intersection-observer.js +66 -0
  355. package/dist/shared/hooks/use-is-breakpoint.js +19 -0
  356. package/dist/shared/hooks/use-local-storage.js +19 -0
  357. package/dist/shared/hooks/use-resize-observer.d.ts +2 -2
  358. package/dist/shared/hooks/use-resize-observer.js +30 -0
  359. package/dist/shared/hooks/use-scroll-lock.js +11 -0
  360. package/dist/shared/hooks/use-scroll-to.js +19 -0
  361. package/dist/shared/hooks/use-session-storage.js +19 -0
  362. package/dist/shared/hooks/use-watch-css-property.d.ts +1 -0
  363. package/dist/shared/hooks/use-watch-css-property.js +29 -0
  364. package/dist/shared/model/announcement.js +18 -0
  365. package/dist/shared/model/category.js +25 -0
  366. package/dist/shared/model/currency.js +29 -0
  367. package/dist/shared/model/hit.js +45 -0
  368. package/dist/shared/model/image.js +5 -0
  369. package/dist/shared/providers/cart-provider.js +13 -0
  370. package/dist/shared/providers/favorite-provider.js +33 -0
  371. package/dist/shared/providers/global-state-provider.js +83 -0
  372. package/dist/shared/providers/react-query-container.js +20 -0
  373. package/dist/shared/routing/route-button.js +7 -0
  374. package/dist/shared/routing/route-icon-button.js +7 -0
  375. package/dist/shared/routing/route-link.js +7 -0
  376. package/dist/shared/routing/route-provider.d.ts +3 -1
  377. package/dist/shared/routing/route-provider.js +48 -0
  378. package/dist/shared/routing/with-routing.js +36 -0
  379. package/dist/shared/utils/array.js +5 -0
  380. package/dist/shared/utils/breakpoints.js +33 -0
  381. package/dist/shared/utils/date.js +58 -0
  382. package/dist/shared/utils/environment.d.ts +2 -2
  383. package/dist/shared/utils/environment.js +61 -0
  384. package/dist/shared/utils/event-emitter.js +34 -0
  385. package/dist/shared/utils/local-storage.js +108 -0
  386. package/dist/shared/utils/merge.js +70 -0
  387. package/dist/shared/utils/price.js +6 -0
  388. package/dist/shared/utils/time.js +9 -0
  389. package/dist/shared/utils/uuid.js +15 -0
  390. package/dist/shared/utils/wait.js +5 -0
  391. package/dist/sidebar/sidebar-provider.js +46 -0
  392. package/dist/sidebar/sidebar-provider.module.css.js +3 -0
  393. package/dist/sidebar/sidebar.js +23 -0
  394. package/dist/sidebar/sidebar.module.css.js +3 -0
  395. package/dist/sidebar/toggle-sidebar-button.js +13 -0
  396. package/dist/sidebar/use-sidebar.js +38 -0
  397. package/dist/styles.css +5 -16
  398. package/dist/toast/toast-provider.js +9 -0
  399. package/dist/toast/toast-provider.module.css.js +3 -0
  400. package/dist/toast/toast.js +24 -0
  401. package/dist/toast/toast.module.css.js +3 -0
  402. package/dist/toast/use-toast.js +21 -0
  403. package/dist/tokens/tokens.js +8 -0
  404. package/dist/typography/heading/heading.js +27 -0
  405. package/dist/typography/heading/heading.module.css.js +3 -0
  406. package/package.json +3 -2
  407. package/dist/pages/product-listing-page/product-listing-page-provider/use-subcategories.d.ts +0 -4
@@ -0,0 +1,34 @@
1
+ "use client";
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import { ModalOverlay, Modal as Modal$1 } from 'react-aria-components';
4
+ import clsx from 'clsx';
5
+ import { IconButton } from '../../buttons/icon-button/icon-button.js';
6
+ import { StrokeCloseboxIcon } from '../../icons/stroke/stroke-closebox-icon.js';
7
+ import styles from './modal.module.css.js';
8
+
9
+ const getDocument = () => typeof window === 'undefined' ? undefined : window.document;
10
+ function Modal({ children, className, hasCloseButton, isDismissable, isFullScreen, isKeyboardDismissDisabled, isOpen, onOpenChange, shouldCloseOnInteractOutside = true, }) {
11
+ const document = getDocument();
12
+ if (!document)
13
+ return;
14
+ return (jsx(ModalOverlay, { ref: ref => {
15
+ ref?.addEventListener('click', e => {
16
+ if ((!e.target || ref.contains(e.target)) &&
17
+ ref !== e.target)
18
+ return;
19
+ e.preventDefault();
20
+ e.stopPropagation();
21
+ });
22
+ ref?.addEventListener('touchend', e => {
23
+ if ((!e.target || ref.contains(e.target)) &&
24
+ ref !== e.target)
25
+ return;
26
+ e.preventDefault();
27
+ e.stopPropagation();
28
+ });
29
+ }, className: clsx(styles['modal-overlay'], typeof className === 'string' ? className : className?.overlay), isDismissable: isDismissable, isKeyboardDismissDisabled: isKeyboardDismissDisabled, isOpen: isOpen, onOpenChange: onOpenChange, shouldCloseOnInteractOutside: () => shouldCloseOnInteractOutside, UNSTABLE_portalContainer: document.body, children: jsxs(Modal$1, { className: clsx(styles.modal, {
30
+ [styles['is-full-screen']]: isFullScreen,
31
+ }, typeof className === 'string' ? undefined : className?.modal), children: [hasCloseButton && (jsx("div", { className: clsx(styles.close, typeof className === 'string' ? className : className?.close), children: jsx(IconButton, { color: "secondary", isDisabled: !isDismissable, onClick: () => onOpenChange?.(false), children: jsx(StrokeCloseboxIcon, {}) }) })), jsx("div", { className: clsx(styles.content, typeof className === 'string' ? className : className?.content), children: children })] }) }));
32
+ }
33
+
34
+ export { Modal };
@@ -0,0 +1,3 @@
1
+ var styles = {"modal-overlay":"modal-module-rVFJc","modal-fade":"modal-module-63Uyl","is-full-screen":"modal-module-uwets","modal":"modal-module-6vlFt","content":"modal-module-FJxzx","modal-slide":"modal-module-jkAe7","modal-delayed-fade":"modal-module-WOZ01","close":"modal-module-7zIZE","modal-zoom":"modal-module-aPJ7X"};
2
+
3
+ export { styles as default };
@@ -0,0 +1,22 @@
1
+ "use client";
2
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
+ import { SolidOkayIcon } from '../../icons/solid/solid-okay-icon.js';
4
+ import { FormattedMessage } from '../../intl/formatted-message.js';
5
+ import { useFormattedMessage } from '../../intl/use-formatted-message.js';
6
+ import { List, ListItem } from '../../lists/ul/list.js';
7
+ import { useFavorite } from '../../shared/providers/favorite-provider.js';
8
+ import { RouteButton } from '../../shared/routing/route-button.js';
9
+ import { Dialog } from '../dialog/dialog.js';
10
+ import styles from './sign-in-dialog.module.css.js';
11
+
12
+ const getLocation = () => typeof window === 'undefined' ? undefined : window.location;
13
+ function SignInDialog({ isOpen, onOpenChange }) {
14
+ const { signInUrl } = useFavorite();
15
+ const t = useFormattedMessage();
16
+ const location = getLocation();
17
+ if (!location)
18
+ return null;
19
+ return (jsx(Dialog, { isDismissable: true, className: { dialog: styles['sign-in-dialog'] }, footer: jsxs(Fragment, { children: [jsx(RouteButton, { withArrow: true, color: "primary", href: `${signInUrl}?returnUrl=${encodeURIComponent(location.pathname + location.search)}`, onClick: () => onOpenChange(false), variant: "solid", children: jsx(FormattedMessage, { id: "sign in" }) }), jsx(RouteButton, { color: "secondary", href: `${signInUrl}?returnUrl=${encodeURIComponent(location.pathname + location.search)}`, onClick: () => onOpenChange(false), variant: "outline", children: jsx(FormattedMessage, { id: "create account" }) })] }), isOpen: isOpen, onOpenChange: onOpenChange, title: t('Shop more efficiently and quicker with a favorites list'), children: jsxs(List, { children: [jsx(ListItem, { icon: jsx(SolidOkayIcon, { fill: "var(--color-status-available)" }), text: t('Easily add your favorite products') }), jsx(ListItem, { icon: jsx(SolidOkayIcon, { fill: "var(--color-status-available)" }), text: t('Your favorites are available on multiple devices') }), jsx(ListItem, { icon: jsx(SolidOkayIcon, { fill: "var(--color-status-available)" }), text: t('Share your favorite list with others') })] }) }));
20
+ }
21
+
22
+ export { SignInDialog };
@@ -0,0 +1,3 @@
1
+ var styles = {"sign-in-dialog":"sign-in-dialog-module-P-AHV"};
2
+
3
+ export { styles as default };
@@ -0,0 +1,341 @@
1
+ import qs from '../../../../../../../../_virtual/index.js';
2
+ import { safelyRunOnBrowser } from '../utils/safelyRunOnBrowser.js';
3
+ import { createDocumentationLink } from '../utils/documentation.js';
4
+ import { warning as _warning } from '../utils/logger.js';
5
+
6
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
7
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
9
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
10
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
12
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
13
+ var setWindowTitle = function setWindowTitle(title) {
14
+ if (title) {
15
+ // This function is only executed on browsers so we can disable this check.
16
+ // eslint-disable-next-line no-restricted-globals
17
+ window.document.title = title;
18
+ }
19
+ };
20
+ var BrowserHistory = /*#__PURE__*/function () {
21
+ /**
22
+ * Initializes a new storage provider that syncs the search state to the URL
23
+ * using web APIs (`window.location.pushState` and `onpopstate` event).
24
+ */
25
+ function BrowserHistory(_ref) {
26
+ var _this = this;
27
+ var windowTitle = _ref.windowTitle,
28
+ _ref$writeDelay = _ref.writeDelay,
29
+ writeDelay = _ref$writeDelay === void 0 ? 400 : _ref$writeDelay,
30
+ createURL = _ref.createURL,
31
+ parseURL = _ref.parseURL,
32
+ getLocation = _ref.getLocation,
33
+ start = _ref.start,
34
+ dispose = _ref.dispose,
35
+ push = _ref.push,
36
+ cleanUrlOnDispose = _ref.cleanUrlOnDispose;
37
+ _classCallCheck(this, BrowserHistory);
38
+ _defineProperty(this, "$$type", 'ais.browser');
39
+ /**
40
+ * Transforms a UI state into a title for the page.
41
+ */
42
+ _defineProperty(this, "windowTitle", void 0);
43
+ /**
44
+ * Time in milliseconds before performing a write in the history.
45
+ * It prevents from adding too many entries in the history and
46
+ * makes the back button more usable.
47
+ *
48
+ * @default 400
49
+ */
50
+ _defineProperty(this, "writeDelay", void 0);
51
+ /**
52
+ * Creates a full URL based on the route state.
53
+ * The storage adaptor maps all syncable keys to the query string of the URL.
54
+ */
55
+ _defineProperty(this, "_createURL", void 0);
56
+ /**
57
+ * Parses the URL into a route state.
58
+ * It should be symmetrical to `createURL`.
59
+ */
60
+ _defineProperty(this, "parseURL", void 0);
61
+ /**
62
+ * Returns the location to store in the history.
63
+ * @default () => window.location
64
+ */
65
+ _defineProperty(this, "getLocation", void 0);
66
+ _defineProperty(this, "writeTimer", void 0);
67
+ _defineProperty(this, "_onPopState", void 0);
68
+ /**
69
+ * Indicates if last action was back/forward in the browser.
70
+ */
71
+ _defineProperty(this, "inPopState", false);
72
+ /**
73
+ * Indicates whether the history router is disposed or not.
74
+ */
75
+ _defineProperty(this, "isDisposed", false);
76
+ /**
77
+ * Indicates the window.history.length before the last call to
78
+ * window.history.pushState (called in `write`).
79
+ * It allows to determine if a `pushState` has been triggered elsewhere,
80
+ * and thus to prevent the `write` method from calling `pushState`.
81
+ */
82
+ _defineProperty(this, "latestAcknowledgedHistory", 0);
83
+ _defineProperty(this, "_start", void 0);
84
+ _defineProperty(this, "_dispose", void 0);
85
+ _defineProperty(this, "_push", void 0);
86
+ _defineProperty(this, "_cleanUrlOnDispose", void 0);
87
+ this.windowTitle = windowTitle;
88
+ this.writeTimer = undefined;
89
+ this.writeDelay = writeDelay;
90
+ this._createURL = createURL;
91
+ this.parseURL = parseURL;
92
+ this.getLocation = getLocation;
93
+ this._start = start;
94
+ this._dispose = dispose;
95
+ this._push = push;
96
+ this._cleanUrlOnDispose = typeof cleanUrlOnDispose === 'undefined' ? true : cleanUrlOnDispose;
97
+ if (process.env.NODE_ENV === 'development' && typeof cleanUrlOnDispose === 'undefined') {
98
+ // eslint-disable-next-line no-console
99
+ console.info("Starting from the next major version, InstantSearch will not clean up the URL from active refinements when it is disposed.\n\nWe recommend setting `cleanUrlOnDispose` to false to adopt this change today.\nTo stay with the current behaviour and remove this warning, set the option to true.\n\nSee documentation: ".concat(createDocumentationLink({
100
+ name: 'history-router'
101
+ }), "#widget-param-cleanurlondispose"));
102
+ }
103
+ safelyRunOnBrowser(function (_ref2) {
104
+ var window = _ref2.window;
105
+ var title = _this.windowTitle && _this.windowTitle(_this.read());
106
+ setWindowTitle(title);
107
+ _this.latestAcknowledgedHistory = window.history.length;
108
+ });
109
+ }
110
+
111
+ /**
112
+ * Reads the URL and returns a syncable UI search state.
113
+ */
114
+ _createClass(BrowserHistory, [{
115
+ key: "read",
116
+ value: function read() {
117
+ return this.parseURL({
118
+ qsModule: qs,
119
+ location: this.getLocation()
120
+ });
121
+ }
122
+
123
+ /**
124
+ * Pushes a search state into the URL.
125
+ */
126
+ }, {
127
+ key: "write",
128
+ value: function write(routeState) {
129
+ var _this2 = this;
130
+ safelyRunOnBrowser(function (_ref3) {
131
+ var window = _ref3.window;
132
+ var url = _this2.createURL(routeState);
133
+ var title = _this2.windowTitle && _this2.windowTitle(routeState);
134
+ if (_this2.writeTimer) {
135
+ clearTimeout(_this2.writeTimer);
136
+ }
137
+ _this2.writeTimer = setTimeout(function () {
138
+ setWindowTitle(title);
139
+ if (_this2.shouldWrite(url)) {
140
+ if (_this2._push) {
141
+ _this2._push(url);
142
+ } else {
143
+ window.history.pushState(routeState, title || '', url);
144
+ }
145
+ _this2.latestAcknowledgedHistory = window.history.length;
146
+ }
147
+ _this2.inPopState = false;
148
+ _this2.writeTimer = undefined;
149
+ }, _this2.writeDelay);
150
+ });
151
+ }
152
+
153
+ /**
154
+ * Sets a callback on the `onpopstate` event of the history API of the current page.
155
+ * It enables the URL sync to keep track of the changes.
156
+ */
157
+ }, {
158
+ key: "onUpdate",
159
+ value: function onUpdate(callback) {
160
+ var _this3 = this;
161
+ if (this._start) {
162
+ this._start(function () {
163
+ callback(_this3.read());
164
+ });
165
+ }
166
+ this._onPopState = function () {
167
+ if (_this3.writeTimer) {
168
+ clearTimeout(_this3.writeTimer);
169
+ _this3.writeTimer = undefined;
170
+ }
171
+ _this3.inPopState = true;
172
+
173
+ // We always read the state from the URL because the state of the history
174
+ // can be incorect in some cases (e.g. using React Router).
175
+ callback(_this3.read());
176
+ };
177
+ safelyRunOnBrowser(function (_ref4) {
178
+ var window = _ref4.window;
179
+ window.addEventListener('popstate', _this3._onPopState);
180
+ });
181
+ }
182
+
183
+ /**
184
+ * Creates a complete URL from a given syncable UI state.
185
+ *
186
+ * It always generates the full URL, not a relative one.
187
+ * This allows to handle cases like using a <base href>.
188
+ * See: https://github.com/algolia/instantsearch/issues/790
189
+ */
190
+ }, {
191
+ key: "createURL",
192
+ value: function createURL(routeState) {
193
+ var url = this._createURL({
194
+ qsModule: qs,
195
+ routeState: routeState,
196
+ location: this.getLocation()
197
+ });
198
+ if (process.env.NODE_ENV === 'development') {
199
+ try {
200
+ // We just want to check if the URL is valid.
201
+ // eslint-disable-next-line no-new
202
+ new URL(url);
203
+ } catch (e) {
204
+ process.env.NODE_ENV === 'development' ? _warning(false, "The URL returned by the `createURL` function is invalid.\nPlease make sure it returns an absolute URL to avoid issues, e.g: `https://algolia.com/search?query=iphone`.") : void 0;
205
+ }
206
+ }
207
+ return url;
208
+ }
209
+
210
+ /**
211
+ * Removes the event listener and cleans up the URL.
212
+ */
213
+ }, {
214
+ key: "dispose",
215
+ value: function dispose() {
216
+ var _this4 = this;
217
+ if (this._dispose) {
218
+ this._dispose();
219
+ }
220
+ this.isDisposed = true;
221
+ safelyRunOnBrowser(function (_ref5) {
222
+ var window = _ref5.window;
223
+ if (_this4._onPopState) {
224
+ window.removeEventListener('popstate', _this4._onPopState);
225
+ }
226
+ });
227
+ if (this.writeTimer) {
228
+ clearTimeout(this.writeTimer);
229
+ }
230
+ if (this._cleanUrlOnDispose) {
231
+ this.write({});
232
+ }
233
+ }
234
+ }, {
235
+ key: "start",
236
+ value: function start() {
237
+ this.isDisposed = false;
238
+ }
239
+ }, {
240
+ key: "shouldWrite",
241
+ value: function shouldWrite(url) {
242
+ var _this5 = this;
243
+ return safelyRunOnBrowser(function (_ref6) {
244
+ var window = _ref6.window;
245
+ // When disposed and the cleanUrlOnDispose is set to false, we do not want to write the URL.
246
+ if (_this5.isDisposed && !_this5._cleanUrlOnDispose) {
247
+ return false;
248
+ }
249
+
250
+ // We do want to `pushState` if:
251
+ // - the router is not disposed, IS.js needs to update the URL
252
+ // OR
253
+ // - the last write was from InstantSearch.js
254
+ // (unlike a SPA, where it would have last written)
255
+ var lastPushWasByISAfterDispose = !(_this5.isDisposed && _this5.latestAcknowledgedHistory !== window.history.length);
256
+ return (
257
+ // When the last state change was through popstate, the IS.js state changes,
258
+ // but that should not write the URL.
259
+ !_this5.inPopState &&
260
+ // When the previous pushState after dispose was by IS.js, we want to write the URL.
261
+ lastPushWasByISAfterDispose &&
262
+ // When the URL is the same as the current one, we do not want to write it.
263
+ url !== window.location.href
264
+ );
265
+ });
266
+ }
267
+ }]);
268
+ return BrowserHistory;
269
+ }();
270
+ function historyRouter() {
271
+ var _ref7 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
272
+ _ref7$createURL = _ref7.createURL,
273
+ createURL = _ref7$createURL === void 0 ? function (_ref8) {
274
+ var qsModule = _ref8.qsModule,
275
+ routeState = _ref8.routeState,
276
+ location = _ref8.location;
277
+ var protocol = location.protocol,
278
+ hostname = location.hostname,
279
+ _location$port = location.port,
280
+ port = _location$port === void 0 ? '' : _location$port,
281
+ pathname = location.pathname,
282
+ hash = location.hash;
283
+ var queryString = qsModule.stringify(routeState);
284
+ var portWithPrefix = port === '' ? '' : ":".concat(port);
285
+
286
+ // IE <= 11 has no proper `location.origin` so we cannot rely on it.
287
+ if (!queryString) {
288
+ return "".concat(protocol, "//").concat(hostname).concat(portWithPrefix).concat(pathname).concat(hash);
289
+ }
290
+ return "".concat(protocol, "//").concat(hostname).concat(portWithPrefix).concat(pathname, "?").concat(queryString).concat(hash);
291
+ } : _ref7$createURL,
292
+ _ref7$parseURL = _ref7.parseURL,
293
+ parseURL = _ref7$parseURL === void 0 ? function (_ref9) {
294
+ var qsModule = _ref9.qsModule,
295
+ location = _ref9.location;
296
+ // `qs` by default converts arrays with more than 20 items to an object.
297
+ // We want to avoid this because the data structure manipulated can therefore vary.
298
+ // Setting the limit to `100` seems a good number because the engine's default is 100
299
+ // (it can go up to 1000 but it is very unlikely to select more than 100 items in the UI).
300
+ //
301
+ // Using an `arrayLimit` of `n` allows `n + 1` items.
302
+ //
303
+ // See:
304
+ // - https://github.com/ljharb/qs#parsing-arrays
305
+ // - https://www.algolia.com/doc/api-reference/api-parameters/maxValuesPerFacet/
306
+ return qsModule.parse(location.search.slice(1), {
307
+ arrayLimit: 99
308
+ });
309
+ } : _ref7$parseURL,
310
+ _ref7$writeDelay = _ref7.writeDelay,
311
+ writeDelay = _ref7$writeDelay === void 0 ? 400 : _ref7$writeDelay,
312
+ windowTitle = _ref7.windowTitle,
313
+ _ref7$getLocation = _ref7.getLocation,
314
+ getLocation = _ref7$getLocation === void 0 ? function () {
315
+ return safelyRunOnBrowser(function (_ref10) {
316
+ var window = _ref10.window;
317
+ return window.location;
318
+ }, {
319
+ fallback: function fallback() {
320
+ throw new Error('You need to provide `getLocation` to the `history` router in environments where `window` does not exist.');
321
+ }
322
+ });
323
+ } : _ref7$getLocation,
324
+ start = _ref7.start,
325
+ dispose = _ref7.dispose,
326
+ push = _ref7.push,
327
+ cleanUrlOnDispose = _ref7.cleanUrlOnDispose;
328
+ return new BrowserHistory({
329
+ createURL: createURL,
330
+ parseURL: parseURL,
331
+ writeDelay: writeDelay,
332
+ windowTitle: windowTitle,
333
+ getLocation: getLocation,
334
+ start: start,
335
+ dispose: dispose,
336
+ push: push,
337
+ cleanUrlOnDispose: cleanUrlOnDispose
338
+ });
339
+ }
340
+
341
+ export { historyRouter as default };
@@ -0,0 +1,36 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ var _excluded = ["configure"];
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
+ function getIndexStateWithoutConfigure(uiState) {
11
+ uiState.configure;
12
+ var trackedUiState = _objectWithoutProperties(uiState, _excluded);
13
+ return trackedUiState;
14
+ }
15
+
16
+ // technically a URL could contain any key, since users provide it,
17
+ // which is why the input to this function is UiState, not something
18
+ // which excludes "configure" as this function does.
19
+ function simpleStateMapping() {
20
+ return {
21
+ $$type: 'ais.simple',
22
+ stateToRoute: function stateToRoute(uiState) {
23
+ return Object.keys(uiState).reduce(function (state, indexId) {
24
+ return _objectSpread(_objectSpread({}, state), {}, _defineProperty({}, indexId, getIndexStateWithoutConfigure(uiState[indexId])));
25
+ }, {});
26
+ },
27
+ routeToState: function routeToState() {
28
+ var routeState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
29
+ return Object.keys(routeState).reduce(function (state, indexId) {
30
+ return _objectSpread(_objectSpread({}, state), {}, _defineProperty({}, indexId, getIndexStateWithoutConfigure(routeState[indexId])));
31
+ }, {});
32
+ }
33
+ };
34
+ }
35
+
36
+ export { simpleStateMapping as default };
@@ -0,0 +1,8 @@
1
+ function createDocumentationLink(_ref) {
2
+ var name = _ref.name,
3
+ _ref$connector = _ref.connector,
4
+ connector = _ref$connector === void 0 ? false : _ref$connector;
5
+ return ['https://www.algolia.com/doc/api-reference/widgets/', name, '/js/', connector ? '#connector' : ''].join('');
6
+ }
7
+
8
+ export { createDocumentationLink };
@@ -0,0 +1,32 @@
1
+ import { noop } from './noop.js';
2
+
3
+ /**
4
+ * Logs a warning
5
+ * This is used to log issues in development environment only.
6
+ */
7
+ var warn = noop;
8
+
9
+ /**
10
+ * Logs a warning if the condition is not met.
11
+ * This is used to log issues in development environment only.
12
+ */
13
+ var _warning = noop;
14
+ if (process.env.NODE_ENV === 'development') {
15
+ warn = function warn(message) {
16
+ // eslint-disable-next-line no-console
17
+ console.warn("[InstantSearch.js]: ".concat(message.trim()));
18
+ };
19
+ _warning = function warning(condition, message) {
20
+ if (condition) {
21
+ return;
22
+ }
23
+ var hasAlreadyPrinted = _warning.cache[message];
24
+ if (!hasAlreadyPrinted) {
25
+ _warning.cache[message] = true;
26
+ process.env.NODE_ENV === 'development' ? warn(message) : void 0;
27
+ }
28
+ };
29
+ _warning.cache = {};
30
+ }
31
+
32
+ export { warn, _warning as warning };
@@ -0,0 +1,24 @@
1
+ // eslint-disable-next-line no-restricted-globals
2
+
3
+ /**
4
+ * Runs code on browser environments safely.
5
+ */
6
+ function safelyRunOnBrowser(callback) {
7
+ var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
8
+ fallback: function fallback() {
9
+ return undefined;
10
+ }
11
+ },
12
+ fallback = _ref.fallback;
13
+ // eslint-disable-next-line no-restricted-globals
14
+ if (typeof window === 'undefined') {
15
+ return fallback();
16
+ }
17
+
18
+ // eslint-disable-next-line no-restricted-globals
19
+ return callback({
20
+ window: window
21
+ });
22
+ }
23
+
24
+ export { safelyRunOnBrowser };
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var formats;
3
+ var hasRequiredFormats;
4
+
5
+ function requireFormats () {
6
+ if (hasRequiredFormats) return formats;
7
+ hasRequiredFormats = 1;
8
+
9
+ var replace = String.prototype.replace;
10
+ var percentTwenties = /%20/g;
11
+
12
+ var Format = {
13
+ RFC1738: 'RFC1738',
14
+ RFC3986: 'RFC3986'
15
+ };
16
+
17
+ formats = {
18
+ 'default': Format.RFC3986,
19
+ formatters: {
20
+ RFC1738: function (value) {
21
+ return replace.call(value, percentTwenties, '+');
22
+ },
23
+ RFC3986: function (value) {
24
+ return String(value);
25
+ }
26
+ },
27
+ RFC1738: Format.RFC1738,
28
+ RFC3986: Format.RFC3986
29
+ };
30
+ return formats;
31
+ }
32
+
33
+ export { requireFormats as __require };
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ import { __require as requireStringify } from './stringify.js';
3
+ import { __require as requireParse } from './parse.js';
4
+ import { __require as requireFormats } from './formats.js';
5
+
6
+ var lib;
7
+ var hasRequiredLib;
8
+
9
+ function requireLib () {
10
+ if (hasRequiredLib) return lib;
11
+ hasRequiredLib = 1;
12
+
13
+ var stringify = requireStringify();
14
+ var parse = requireParse();
15
+ var formats = requireFormats();
16
+
17
+ lib = {
18
+ formats: formats,
19
+ parse: parse,
20
+ stringify: stringify
21
+ };
22
+ return lib;
23
+ }
24
+
25
+ export { requireLib as __require };