@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.
- package/.eslintrc.cjs +15 -0
- package/.prettierrc.json +8 -0
- package/README.md +46 -0
- package/dist/containerStyle.css +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/lupaSearch.iife.js +15899 -0
- package/dist/lupaSearch.js +15897 -0
- package/dist/lupaSearch.mjs +15897 -0
- package/dist/lupaSearch.umd.js +15900 -0
- package/dist/src/components/common/ProductImage.vue.d.ts +39 -0
- package/dist/src/components/common/Spinner.vue.d.ts +2 -0
- package/dist/src/components/product-list/CategoryDescription.vue.d.ts +14 -0
- package/dist/src/components/product-list/CategoryFilter.vue.d.ts +14 -0
- package/dist/src/components/product-list/CategoryFilterItem.vue.d.ts +22 -0
- package/dist/src/components/product-list/CategoryTopFilters.vue.d.ts +14 -0
- package/dist/src/components/product-list/ProductList.vue.d.ts +14 -0
- package/dist/src/components/recommendations/Recommendations.vue.d.ts +14 -0
- package/dist/src/components/search-box/SearchBox.vue.d.ts +22 -0
- package/dist/src/components/search-box/SearchBoxInput.vue.d.ts +42 -0
- package/dist/src/components/search-box/SearchBoxMainPanel.vue.d.ts +52 -0
- package/dist/src/components/search-box/SearchBoxMoreResults.vue.d.ts +24 -0
- package/dist/src/components/search-box/history/SearchBoxHistoryItem.vue.d.ts +24 -0
- package/dist/src/components/search-box/history/SearchBoxHistoryPanel.vue.d.ts +16 -0
- package/dist/src/components/search-box/products/SearchBoxProduct.vue.d.ts +50 -0
- package/dist/src/components/search-box/products/SearchBoxProducts.vue.d.ts +40 -0
- package/dist/src/components/search-box/products/SearchBoxProductsWrapper.vue.d.ts +50 -0
- package/dist/src/components/search-box/products/elements/SearchBoxProductCustom.vue.d.ts +23 -0
- package/dist/src/components/search-box/products/elements/SearchBoxProductCustomHtml.vue.d.ts +22 -0
- package/dist/src/components/search-box/products/elements/SearchBoxProductDescription.vue.d.ts +23 -0
- package/dist/src/components/search-box/products/elements/SearchBoxProductElement.vue.d.ts +32 -0
- package/dist/src/components/search-box/products/elements/SearchBoxProductImage.vue.d.ts +23 -0
- package/dist/src/components/search-box/products/elements/SearchBoxProductPrice.vue.d.ts +32 -0
- package/dist/src/components/search-box/products/elements/SearchBoxProductRegularPrice.vue.d.ts +32 -0
- package/dist/src/components/search-box/products/elements/SearchBoxProductTitle.vue.d.ts +23 -0
- package/dist/src/components/search-box/suggestions/SearchBoxSuggestion.vue.d.ts +33 -0
- package/dist/src/components/search-box/suggestions/SearchBoxSuggestions.vue.d.ts +41 -0
- package/dist/src/components/search-box/suggestions/SearchBoxSuggestionsWrapper.vue.d.ts +51 -0
- package/dist/src/components/search-container/SearchContainer.vue.d.ts +14 -0
- package/dist/src/components/search-results/SearchResults.vue.d.ts +39 -0
- package/dist/src/components/search-results/SearchResultsBreadcrumbs.vue.d.ts +14 -0
- package/dist/src/components/search-results/SearchResultsDidYouMean.vue.d.ts +14 -0
- package/dist/src/components/search-results/SearchResultsTitle.vue.d.ts +30 -0
- package/dist/src/components/search-results/additional-panels/AdditionalPanel.vue.d.ts +23 -0
- package/dist/src/components/search-results/additional-panels/AdditionalPanels.vue.d.ts +31 -0
- package/dist/src/components/search-results/filters/CurrentFilterDisplay.vue.d.ts +16 -0
- package/dist/src/components/search-results/filters/CurrentFilters.vue.d.ts +22 -0
- package/dist/src/components/search-results/filters/FiltersTopDropdown.vue.d.ts +14 -0
- package/dist/src/components/search-results/filters/MobileFilterSidebar.vue.d.ts +14 -0
- package/dist/src/components/search-results/filters/SearchResultsFilters.vue.d.ts +22 -0
- package/dist/src/components/search-results/filters/facets/FacetDisplay.vue.d.ts +42 -0
- package/dist/src/components/search-results/filters/facets/FacetList.vue.d.ts +50 -0
- package/dist/src/components/search-results/filters/facets/Facets.vue.d.ts +30 -0
- package/dist/src/components/search-results/filters/facets/HierarchyFacet.vue.d.ts +33 -0
- package/dist/src/components/search-results/filters/facets/HierarchyFacetLevel.vue.d.ts +41 -0
- package/dist/src/components/search-results/filters/facets/StatsFacet.vue.d.ts +33 -0
- package/dist/src/components/search-results/filters/facets/TermFacet.vue.d.ts +33 -0
- package/dist/src/components/search-results/products/SearchResultsLayoutSelection.vue.d.ts +2 -0
- package/dist/src/components/search-results/products/SearchResultsMobileToggle.vue.d.ts +21 -0
- package/dist/src/components/search-results/products/SearchResultsProducts.vue.d.ts +14 -0
- package/dist/src/components/search-results/products/SearchResultsSummary.vue.d.ts +21 -0
- package/dist/src/components/search-results/products/SearchResultsToolbar.vue.d.ts +22 -0
- package/dist/src/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +30 -0
- package/dist/src/components/search-results/products/pagination/SearchResultsPageSize.vue.d.ts +22 -0
- package/dist/src/components/search-results/products/product-card/SearchResultsProductCard.vue.d.ts +40 -0
- package/dist/src/components/search-results/products/product-card/badges/CustomBadge.vue.d.ts +14 -0
- package/dist/src/components/search-results/products/product-card/badges/ImageBadge.vue.d.ts +14 -0
- package/dist/src/components/search-results/products/product-card/badges/SearchResultGeneratedBadges.vue.d.ts +14 -0
- package/dist/src/components/search-results/products/product-card/badges/SearchResultsBadgeWrapper.vue.d.ts +22 -0
- package/dist/src/components/search-results/products/product-card/badges/TextBadge.vue.d.ts +14 -0
- package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductAddToCart.vue.d.ts +33 -0
- package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductCardElement.vue.d.ts +50 -0
- package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductCustom.vue.d.ts +23 -0
- package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductDescription.vue.d.ts +23 -0
- package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductImage.vue.d.ts +23 -0
- package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductPrice.vue.d.ts +32 -0
- package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductRating.vue.d.ts +23 -0
- package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductRegularPrice.vue.d.ts +32 -0
- package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductSingleStarRating.vue.d.ts +23 -0
- package/dist/src/components/search-results/products/product-card/elements/SearchResultsProductTitle.vue.d.ts +31 -0
- package/dist/src/components/search-results/products/product-card/elements/custom/SearchResultsProductCustomHtmlElement.vue.d.ts +23 -0
- package/dist/src/components/search-results/products/similar-queries/SearchResultsSimilarQueries.vue.d.ts +31 -0
- package/dist/src/components/search-results/products/similar-queries/SimilarQueryText.vue.d.ts +22 -0
- package/dist/src/components/search-results/products/sort/SearchResultsSort.vue.d.ts +14 -0
- package/dist/src/constants/global.const.d.ts +17 -0
- package/dist/src/constants/queryParams.const.d.ts +26 -0
- package/dist/src/constants/searchBox.const.d.ts +48 -0
- package/dist/src/constants/searchResults.const.d.ts +107 -0
- package/dist/src/index.d.ts +21 -0
- package/dist/src/stores/dynamicData.d.ts +24 -0
- package/dist/src/stores/history.d.ts +31 -0
- package/dist/src/stores/options.d.ts +75 -0
- package/dist/src/stores/params.d.ts +124 -0
- package/dist/src/stores/screen.d.ts +22 -0
- package/dist/src/stores/searchBox.d.ts +204 -0
- package/dist/src/stores/searchResult.d.ts +125 -0
- package/dist/src/stores/tracking.d.ts +46 -0
- package/dist/src/types/AnalyticsOptions.d.ts +14 -0
- package/dist/src/types/DocumentElement.d.ts +91 -0
- package/dist/src/types/General.d.ts +20 -0
- package/dist/src/types/product-list/ProductListOptions.d.ts +29 -0
- package/dist/src/types/recommendations/RecommendationsOptions.d.ts +26 -0
- package/dist/src/types/search-box/Common.d.ts +51 -0
- package/dist/src/types/search-box/SearchBoxHistory.d.ts +6 -0
- package/dist/src/types/search-box/SearchBoxOptions.d.ts +36 -0
- package/dist/src/types/search-box/SearchBoxPanel.d.ts +28 -0
- package/dist/src/types/search-container/SearchContainerOptions.d.ts +15 -0
- package/dist/src/types/search-results/BadgeOptions.d.ts +61 -0
- package/dist/src/types/search-results/FacetAction.d.ts +16 -0
- package/dist/src/types/search-results/Filters.d.ts +9 -0
- package/dist/src/types/search-results/PaginationOptions.d.ts +20 -0
- package/dist/src/types/search-results/QueryParams.d.ts +4 -0
- package/dist/src/types/search-results/ResultsLayout.d.ts +5 -0
- package/dist/src/types/search-results/RoutingBehavior.d.ts +1 -0
- package/dist/src/types/search-results/SearchResultsAdditionalPanelOptions.d.ts +16 -0
- package/dist/src/types/search-results/SearchResultsOptions.d.ts +177 -0
- package/dist/src/types/search-results/SearchResultsPagination.d.ts +21 -0
- package/dist/src/types/search-results/SearchResultsProductCardOptions.d.ts +24 -0
- package/dist/src/types/search-results/SearchResultsSort.d.ts +11 -0
- package/dist/src/utils/debounce.utils.d.ts +1 -0
- package/dist/src/utils/document.utils.d.ts +1 -0
- package/dist/src/utils/event.utils.d.ts +2 -0
- package/dist/src/utils/filter.toggle.utils.d.ts +23 -0
- package/dist/src/utils/filter.utils.d.ts +11 -0
- package/dist/src/utils/history.utils.d.ts +2 -0
- package/dist/src/utils/link.utils.d.ts +6 -0
- package/dist/src/utils/params.utils.d.ts +9 -0
- package/dist/src/utils/picker.utils.d.ts +5 -0
- package/dist/src/utils/price.utils.d.ts +2 -0
- package/dist/src/utils/query.utils.d.ts +5 -0
- package/dist/src/utils/routing.utils.d.ts +6 -0
- package/dist/src/utils/scroll.utils.d.ts +4 -0
- package/dist/src/utils/string.utils.d.ts +9 -0
- package/dist/src/utils/suggestion.utils.d.ts +3 -0
- package/dist/src/utils/tracking.utils.d.ts +15 -0
- package/dist/style.css +1 -0
- package/dist/style.js +1 -0
- package/env.d.ts +1 -0
- package/index.html +13 -0
- package/package.json +62 -0
- package/tsconfig.app.json +18 -0
- package/tsconfig.node.json +15 -0
- 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
|
+
})
|