@getlupa/vue 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/.eslintrc.cjs +15 -0
  2. package/.prettierrc.json +8 -0
  3. package/README.md +46 -0
  4. package/dist/containerStyle.css +1 -0
  5. package/dist/favicon.ico +0 -0
  6. package/dist/lupaSearch.iife.js +15899 -0
  7. package/dist/lupaSearch.js +15897 -0
  8. package/dist/lupaSearch.mjs +15897 -0
  9. package/dist/lupaSearch.umd.js +15900 -0
  10. package/dist/src/components/common/ProductImage.vue.d.ts +39 -0
  11. package/dist/src/components/common/Spinner.vue.d.ts +2 -0
  12. package/dist/src/components/product-list/CategoryDescription.vue.d.ts +14 -0
  13. package/dist/src/components/product-list/CategoryFilter.vue.d.ts +14 -0
  14. package/dist/src/components/product-list/CategoryFilterItem.vue.d.ts +22 -0
  15. package/dist/src/components/product-list/CategoryTopFilters.vue.d.ts +14 -0
  16. package/dist/src/components/product-list/ProductList.vue.d.ts +14 -0
  17. package/dist/src/components/recommendations/Recommendations.vue.d.ts +14 -0
  18. package/dist/src/components/search-box/SearchBox.vue.d.ts +22 -0
  19. package/dist/src/components/search-box/SearchBoxInput.vue.d.ts +42 -0
  20. package/dist/src/components/search-box/SearchBoxMainPanel.vue.d.ts +52 -0
  21. package/dist/src/components/search-box/SearchBoxMoreResults.vue.d.ts +24 -0
  22. package/dist/src/components/search-box/history/SearchBoxHistoryItem.vue.d.ts +24 -0
  23. package/dist/src/components/search-box/history/SearchBoxHistoryPanel.vue.d.ts +16 -0
  24. package/dist/src/components/search-box/products/SearchBoxProduct.vue.d.ts +50 -0
  25. package/dist/src/components/search-box/products/SearchBoxProducts.vue.d.ts +40 -0
  26. package/dist/src/components/search-box/products/SearchBoxProductsWrapper.vue.d.ts +50 -0
  27. package/dist/src/components/search-box/products/elements/SearchBoxProductCustom.vue.d.ts +23 -0
  28. package/dist/src/components/search-box/products/elements/SearchBoxProductCustomHtml.vue.d.ts +22 -0
  29. package/dist/src/components/search-box/products/elements/SearchBoxProductDescription.vue.d.ts +23 -0
  30. package/dist/src/components/search-box/products/elements/SearchBoxProductElement.vue.d.ts +32 -0
  31. package/dist/src/components/search-box/products/elements/SearchBoxProductImage.vue.d.ts +23 -0
  32. package/dist/src/components/search-box/products/elements/SearchBoxProductPrice.vue.d.ts +32 -0
  33. package/dist/src/components/search-box/products/elements/SearchBoxProductRegularPrice.vue.d.ts +32 -0
  34. package/dist/src/components/search-box/products/elements/SearchBoxProductTitle.vue.d.ts +23 -0
  35. package/dist/src/components/search-box/suggestions/SearchBoxSuggestion.vue.d.ts +33 -0
  36. package/dist/src/components/search-box/suggestions/SearchBoxSuggestions.vue.d.ts +41 -0
  37. package/dist/src/components/search-box/suggestions/SearchBoxSuggestionsWrapper.vue.d.ts +51 -0
  38. package/dist/src/components/search-container/SearchContainer.vue.d.ts +14 -0
  39. package/dist/src/components/search-results/SearchResults.vue.d.ts +39 -0
  40. package/dist/src/components/search-results/SearchResultsBreadcrumbs.vue.d.ts +14 -0
  41. package/dist/src/components/search-results/SearchResultsDidYouMean.vue.d.ts +14 -0
  42. package/dist/src/components/search-results/SearchResultsTitle.vue.d.ts +30 -0
  43. package/dist/src/components/search-results/additional-panels/AdditionalPanel.vue.d.ts +23 -0
  44. package/dist/src/components/search-results/additional-panels/AdditionalPanels.vue.d.ts +31 -0
  45. package/dist/src/components/search-results/filters/CurrentFilterDisplay.vue.d.ts +16 -0
  46. package/dist/src/components/search-results/filters/CurrentFilters.vue.d.ts +22 -0
  47. package/dist/src/components/search-results/filters/FiltersTopDropdown.vue.d.ts +14 -0
  48. package/dist/src/components/search-results/filters/MobileFilterSidebar.vue.d.ts +14 -0
  49. package/dist/src/components/search-results/filters/SearchResultsFilters.vue.d.ts +22 -0
  50. package/dist/src/components/search-results/filters/facets/FacetDisplay.vue.d.ts +42 -0
  51. package/dist/src/components/search-results/filters/facets/FacetList.vue.d.ts +50 -0
  52. package/dist/src/components/search-results/filters/facets/Facets.vue.d.ts +30 -0
  53. package/dist/src/components/search-results/filters/facets/HierarchyFacet.vue.d.ts +33 -0
  54. package/dist/src/components/search-results/filters/facets/HierarchyFacetLevel.vue.d.ts +41 -0
  55. package/dist/src/components/search-results/filters/facets/StatsFacet.vue.d.ts +33 -0
  56. package/dist/src/components/search-results/filters/facets/TermFacet.vue.d.ts +33 -0
  57. package/dist/src/components/search-results/products/SearchResultsLayoutSelection.vue.d.ts +2 -0
  58. package/dist/src/components/search-results/products/SearchResultsMobileToggle.vue.d.ts +21 -0
  59. package/dist/src/components/search-results/products/SearchResultsProducts.vue.d.ts +14 -0
  60. package/dist/src/components/search-results/products/SearchResultsSummary.vue.d.ts +21 -0
  61. package/dist/src/components/search-results/products/SearchResultsToolbar.vue.d.ts +22 -0
  62. package/dist/src/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +30 -0
  63. package/dist/src/components/search-results/products/pagination/SearchResultsPageSize.vue.d.ts +22 -0
  64. package/dist/src/components/search-results/products/product-card/SearchResultsProductCard.vue.d.ts +40 -0
  65. package/dist/src/components/search-results/products/product-card/badges/CustomBadge.vue.d.ts +14 -0
  66. package/dist/src/components/search-results/products/product-card/badges/ImageBadge.vue.d.ts +14 -0
  67. package/dist/src/components/search-results/products/product-card/badges/SearchResultGeneratedBadges.vue.d.ts +14 -0
  68. package/dist/src/components/search-results/products/product-card/badges/SearchResultsBadgeWrapper.vue.d.ts +22 -0
  69. package/dist/src/components/search-results/products/product-card/badges/TextBadge.vue.d.ts +14 -0
  70. package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductAddToCart.vue.d.ts +33 -0
  71. package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductCardElement.vue.d.ts +50 -0
  72. package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductCustom.vue.d.ts +23 -0
  73. package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductDescription.vue.d.ts +23 -0
  74. package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductImage.vue.d.ts +23 -0
  75. package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductPrice.vue.d.ts +32 -0
  76. package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductRating.vue.d.ts +23 -0
  77. package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductRegularPrice.vue.d.ts +32 -0
  78. package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductSingleStarRating.vue.d.ts +23 -0
  79. package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductTitle.vue.d.ts +31 -0
  80. package/dist/src/components/search-results/products/product-card/elements/custom/SearchResultsProductCustomHtmlElement.vue.d.ts +23 -0
  81. package/dist/src/components/search-results/products/similar-queries/SearchResultsSimilarQueries.vue.d.ts +31 -0
  82. package/dist/src/components/search-results/products/similar-queries/SimilarQueryText.vue.d.ts +22 -0
  83. package/dist/src/components/search-results/products/sort/SearchResultsSort.vue.d.ts +14 -0
  84. package/dist/src/constants/global.const.d.ts +17 -0
  85. package/dist/src/constants/queryParams.const.d.ts +26 -0
  86. package/dist/src/constants/searchBox.const.d.ts +48 -0
  87. package/dist/src/constants/searchResults.const.d.ts +107 -0
  88. package/dist/src/index.d.ts +21 -0
  89. package/dist/src/stores/dynamicData.d.ts +24 -0
  90. package/dist/src/stores/history.d.ts +31 -0
  91. package/dist/src/stores/options.d.ts +75 -0
  92. package/dist/src/stores/params.d.ts +124 -0
  93. package/dist/src/stores/screen.d.ts +22 -0
  94. package/dist/src/stores/searchBox.d.ts +204 -0
  95. package/dist/src/stores/searchResult.d.ts +125 -0
  96. package/dist/src/stores/tracking.d.ts +46 -0
  97. package/dist/src/types/AnalyticsOptions.d.ts +14 -0
  98. package/dist/src/types/DocumentElement.d.ts +91 -0
  99. package/dist/src/types/General.d.ts +20 -0
  100. package/dist/src/types/product-list/ProductListOptions.d.ts +29 -0
  101. package/dist/src/types/recommendations/RecommendationsOptions.d.ts +26 -0
  102. package/dist/src/types/search-box/Common.d.ts +51 -0
  103. package/dist/src/types/search-box/SearchBoxHistory.d.ts +6 -0
  104. package/dist/src/types/search-box/SearchBoxOptions.d.ts +36 -0
  105. package/dist/src/types/search-box/SearchBoxPanel.d.ts +28 -0
  106. package/dist/src/types/search-container/SearchContainerOptions.d.ts +15 -0
  107. package/dist/src/types/search-results/BadgeOptions.d.ts +61 -0
  108. package/dist/src/types/search-results/FacetAction.d.ts +16 -0
  109. package/dist/src/types/search-results/Filters.d.ts +9 -0
  110. package/dist/src/types/search-results/PaginationOptions.d.ts +20 -0
  111. package/dist/src/types/search-results/QueryParams.d.ts +4 -0
  112. package/dist/src/types/search-results/ResultsLayout.d.ts +5 -0
  113. package/dist/src/types/search-results/RoutingBehavior.d.ts +1 -0
  114. package/dist/src/types/search-results/SearchResultsAdditionalPanelOptions.d.ts +16 -0
  115. package/dist/src/types/search-results/SearchResultsOptions.d.ts +177 -0
  116. package/dist/src/types/search-results/SearchResultsPagination.d.ts +21 -0
  117. package/dist/src/types/search-results/SearchResultsProductCardOptions.d.ts +24 -0
  118. package/dist/src/types/search-results/SearchResultsSort.d.ts +11 -0
  119. package/dist/src/utils/debounce.utils.d.ts +1 -0
  120. package/dist/src/utils/document.utils.d.ts +1 -0
  121. package/dist/src/utils/event.utils.d.ts +2 -0
  122. package/dist/src/utils/filter.toggle.utils.d.ts +23 -0
  123. package/dist/src/utils/filter.utils.d.ts +11 -0
  124. package/dist/src/utils/history.utils.d.ts +2 -0
  125. package/dist/src/utils/link.utils.d.ts +6 -0
  126. package/dist/src/utils/params.utils.d.ts +9 -0
  127. package/dist/src/utils/picker.utils.d.ts +5 -0
  128. package/dist/src/utils/price.utils.d.ts +2 -0
  129. package/dist/src/utils/query.utils.d.ts +5 -0
  130. package/dist/src/utils/routing.utils.d.ts +6 -0
  131. package/dist/src/utils/scroll.utils.d.ts +4 -0
  132. package/dist/src/utils/string.utils.d.ts +9 -0
  133. package/dist/src/utils/suggestion.utils.d.ts +3 -0
  134. package/dist/src/utils/tracking.utils.d.ts +15 -0
  135. package/dist/style.css +1 -0
  136. package/dist/style.js +1 -0
  137. package/env.d.ts +1 -0
  138. package/index.html +13 -0
  139. package/package.json +62 -0
  140. package/tsconfig.app.json +18 -0
  141. package/tsconfig.node.json +15 -0
  142. package/vite.config.ts +35 -0
package/index.html ADDED
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <link rel="icon" href="/favicon.ico">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Vite App</title>
8
+ </head>
9
+ <body>
10
+ <div id="app"></div>
11
+ <script type="module" src="/src/main.ts"></script>
12
+ </body>
13
+ </html>
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "@getlupa/vue",
3
+ "version": "0.0.1",
4
+ "main": "dist/lupaSearch.js",
5
+ "module": "dist/index.mjs",
6
+ "types": "dist/src/index.d.ts",
7
+ "scripts": {
8
+ "dev": "vite & yarn css:watch",
9
+ "css:watch": "rollup --config build/rollupContainerDev.config.js --bundleConfigAsCjs --watch",
10
+ "build": "yarn build-only && yarn css",
11
+ "css": "rollup --config build/lupaStyle.config.js --bundleConfigAsCjs",
12
+ "preview": "vite preview",
13
+ "build-only": "vite build",
14
+ "type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
15
+ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
16
+ "format": "prettier --write src/"
17
+ },
18
+ "dependencies": {
19
+ "@getlupa/client-sdk": "^1.3.1",
20
+ "lodash": "^4.17.21",
21
+ "pinia": "^2.1.3",
22
+ "vue": "^3.3.4",
23
+ "vue-slider-component": "^4.1.0-beta.7",
24
+ "vue3-carousel": "^0.3.1"
25
+ },
26
+ "devDependencies": {
27
+ "@rollup/plugin-babel": "5.3.0",
28
+ "@rollup/plugin-commonjs": "^21.0.1",
29
+ "@rollup/plugin-json": "^4.1.0",
30
+ "@rollup/plugin-typescript": "^8.3.0",
31
+ "@rushstack/eslint-patch": "^1.2.0",
32
+ "@tsconfig/node18": "^2.0.1",
33
+ "@types/jest": "^29.5.2",
34
+ "@types/jsdom": "^21.1.1",
35
+ "@types/lodash": "^4.14.195",
36
+ "@types/node": "^18.16.17",
37
+ "@vitejs/plugin-vue": "^4.2.3",
38
+ "@vue/eslint-config-prettier": "^7.1.0",
39
+ "@vue/eslint-config-typescript": "^11.0.3",
40
+ "@vue/test-utils": "^2.3.2",
41
+ "@vue/tsconfig": "^0.4.0",
42
+ "eslint": "^8.39.0",
43
+ "eslint-plugin-vue": "^9.11.0",
44
+ "jest-junit": "^16.0.0",
45
+ "jsdom": "^22.1.0",
46
+ "npm-run-all": "^4.1.5",
47
+ "prettier": "^2.8.8",
48
+ "rollup-plugin-filesize": "^9.1.2",
49
+ "rollup-plugin-node-resolve": "^5.2.0",
50
+ "rollup-plugin-replace": "^2.2.0",
51
+ "rollup-plugin-scss": "3",
52
+ "sass": "^1.63.4",
53
+ "start-server-and-test": "^2.0.0",
54
+ "ts-jest": "^29.1.0",
55
+ "typescript": "~5.0.4",
56
+ "vite": "^4.3.9",
57
+ "vite-aliases": "^0.11.2",
58
+ "vite-plugin-dts": "^2.3.0",
59
+ "vitest": "^0.32.0",
60
+ "vue-tsc": "^1.6.5"
61
+ }
62
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "extends": "@vue/tsconfig/tsconfig.dom.json",
3
+ "include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
4
+ "exclude": ["src/**/__tests__/*", "dist"],
5
+ "compilerOptions": {
6
+ "composite": true,
7
+ "baseUrl": ".",
8
+ "paths": {
9
+ "~assets/*": ["src/assets/*"],
10
+ "~components/*": ["src/components/*"],
11
+ "~constants/*": ["src/constants/*"],
12
+ "~stores/*": ["src/stores/*"],
13
+ "~types/*": ["src/types/*"],
14
+ "~utils/*": ["src/utils/*"],
15
+ "~/*": ["src/*"]
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "extends": "@tsconfig/node18/tsconfig.json",
3
+ "include": [
4
+ "vite.config.*",
5
+ "vitest.config.*",
6
+ "cypress.config.*",
7
+ "nightwatch.conf.*",
8
+ "playwright.config.*"
9
+ ],
10
+ "compilerOptions": {
11
+ "composite": true,
12
+ "module": "ESNext",
13
+ "types": ["node"]
14
+ }
15
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,35 @@
1
+ import { fileURLToPath, URL } from 'node:url'
2
+ import * as path from 'path'
3
+ import { defineConfig } from 'vite'
4
+ import vue from '@vitejs/plugin-vue'
5
+ import dts from 'vite-plugin-dts'
6
+
7
+ // https://vitejs.dev/config/`
8
+ export default defineConfig({
9
+ resolve: {
10
+ alias: [{ find: '@', replacement: fileURLToPath(new URL('./src', import.meta.url)) }]
11
+ },
12
+ plugins: [vue(), dts()],
13
+ build: {
14
+ minify: false,
15
+ target: 'es6',
16
+ lib: {
17
+ entry: path.resolve(__dirname, 'src/index.ts'),
18
+ name: 'LupaSearch',
19
+ fileName: 'lupaSearch',
20
+ formats: ['es', 'umd', 'iife', 'cjs']
21
+ },
22
+ rollupOptions: {
23
+ // make sure to externalize deps that shouldn't be bundled
24
+ // into your library
25
+ external: ['vue'],
26
+ output: {
27
+ // Provide global variables to use in the UMD build
28
+ // for externalized deps
29
+ globals: {
30
+ vue: 'Vue'
31
+ }
32
+ }
33
+ }
34
+ }
35
+ })