diff --git a/package-lock.json b/package-lock.json index 33b3282..fcb3598 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@adobe/storefront-product-listing-page", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@adobe/storefront-product-listing-page", - "version": "1.0.1", + "version": "1.0.2", "license": "MIT", "dependencies": { "@headlessui/react": "^1.7.17", @@ -2253,32 +2253,6 @@ "node": ">=0.1.90" } }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -6404,38 +6378,6 @@ "node": ">=10.13.0" } }, - "node_modules/@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", - "dev": true, - "optional": true, - "peer": true - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true, - "optional": true, - "peer": true - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true, - "optional": true, - "peer": true - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true, - "optional": true, - "peer": true - }, "node_modules/@types/aria-query": { "version": "5.0.3", "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/@types/aria-query/-/aria-query-5.0.3.tgz", @@ -9380,14 +9322,6 @@ "node": ">=8" } }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true, - "optional": true, - "peer": true - }, "node_modules/cross-env": { "version": "7.0.3", "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/cross-env/-/cross-env-7.0.3.tgz", @@ -10136,17 +10070,6 @@ "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", "dev": true }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/diff-sequences": { "version": "29.6.3", "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/diff-sequences/-/diff-sequences-29.6.3.tgz", @@ -10780,178 +10703,6 @@ "eslint": "6.x || 7.x || 8.x" } }, - "node_modules/eslint-config-preact/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.62.0", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", - "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/type-utils": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/eslint-config-preact/node_modules/@typescript-eslint/parser": { - "version": "5.62.0", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/@typescript-eslint/parser/-/parser-5.62.0.tgz", - "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/eslint-config-preact/node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint-config-preact/node_modules/@typescript-eslint/type-utils": { - "version": "5.62.0", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", - "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/eslint-config-preact/node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint-config-preact/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/eslint-config-preact/node_modules/@typescript-eslint/utils": { - "version": "5.62.0", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/@typescript-eslint/utils/-/utils-5.62.0.tgz", - "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/eslint-config-preact/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, "node_modules/eslint-config-preact/node_modules/eslint-plugin-jest": { "version": "25.7.0", "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/eslint-plugin-jest/-/eslint-plugin-jest-25.7.0.tgz", @@ -10976,90 +10727,6 @@ } } }, - "node_modules/eslint-config-preact/node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-config-preact/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/eslint-config-preact/node_modules/globby": { - "version": "11.1.0", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint-config-preact/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint-config-preact/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint-config-preact/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true, - "optional": true, - "peer": true - }, "node_modules/eslint-config-prettier": { "version": "9.0.0", "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", @@ -16021,7 +15688,8 @@ "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true }, "node_modules/js-yaml": { "version": "4.1.0", @@ -16530,6 +16198,7 @@ "version": "1.4.0", "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -16911,14 +16580,6 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node_modules/natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true, - "optional": true, - "peer": true - }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/negotiator/-/negotiator-0.6.3.tgz", @@ -18718,6 +18379,7 @@ "version": "18.2.0", "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/react/-/react-18.2.0.tgz", "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "dev": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -18739,6 +18401,7 @@ "version": "18.2.0", "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/react-dom/-/react-dom-18.2.0.tgz", "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "dev": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.0" @@ -19361,6 +19024,7 @@ "version": "0.23.0", "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/scheduler/-/scheduler-0.23.0.tgz", "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "dev": true, "dependencies": { "loose-envify": "^1.1.0" } @@ -21111,59 +20775,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/ts-node/node_modules/arg": { - "version": "4.1.3", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true, - "optional": true, - "peer": true - }, "node_modules/tsconfig-paths": { "version": "4.2.0", "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", @@ -21705,14 +21316,6 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true, - "optional": true, - "peer": true - }, "node_modules/v8-to-istanbul": { "version": "9.1.3", "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/v8-to-istanbul/-/v8-to-istanbul-9.1.3.tgz", @@ -22567,17 +22170,6 @@ "fd-slicer": "~1.1.0" } }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-release/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 72bfadb..4d4169f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@adobe/storefront-product-listing-page", - "version": "1.0.1", + "version": "1.0.2", "license": "MIT", "typings": "./dist/@types/index.d.ts", "engines": { diff --git a/src/components/Alert/Alert.stories.mdx b/src/components/Alert/Alert.stories.mdx index a0385b3..55b05f3 100644 --- a/src/components/Alert/Alert.stories.mdx +++ b/src/components/Alert/Alert.stories.mdx @@ -2,7 +2,7 @@ import { Canvas, Meta, Story, ArgsTable } from "@storybook/addon-docs"; import { Alert } from "./Alert"; @@ -28,10 +28,11 @@ import { CategoryFilters } from './CategoryFilters' args={{ loading: false, facets: mockFilters, -totalCount: 15, -categoryName: 'Pants', -phrase: "pants", -setShowFilters: action("setShowFilters") + totalCount: 15, + categoryName: 'Pants', + phrase: 'pants', + showFilters: true, + setShowFilters: action('setShowFilters'), }} > {Template.bind({})} diff --git a/src/components/CategoryFilters/CategoryFilters.test.tsx b/src/components/CategoryFilters/CategoryFilters.test.tsx index 980328a..717fa74 100644 --- a/src/components/CategoryFilters/CategoryFilters.test.tsx +++ b/src/components/CategoryFilters/CategoryFilters.test.tsx @@ -22,7 +22,9 @@ describe('PLP widget/CategoryFilters', () => { facets={[]} categoryName="" phrase="" + showFilters={true} setShowFilters={() => true} + filterCount={0} /> ); diff --git a/src/components/CategoryFilters/CategoryFilters.tsx b/src/components/CategoryFilters/CategoryFilters.tsx index 683fe3a..1ccf068 100644 --- a/src/components/CategoryFilters/CategoryFilters.tsx +++ b/src/components/CategoryFilters/CategoryFilters.tsx @@ -22,7 +22,9 @@ interface CategoryFiltersProps { facets: Facet[]; categoryName: string; phrase: string; + showFilters: boolean; setShowFilters: (showFilters: boolean) => void; + filterCount: number; } export const CategoryFilters: FunctionComponent = ({ @@ -33,6 +35,7 @@ export const CategoryFilters: FunctionComponent = ({ categoryName, phrase, setShowFilters, + filterCount, }) => { const translation = useContext(TranslationContext); let title = categoryName || ''; @@ -52,13 +55,15 @@ export const CategoryFilters: FunctionComponent = ({ )} - {!pageLoading && ( + {!pageLoading && facets.length > 0 && totalCount > 0 && ( <>
setShowFilters(false)} type="desktop" - title={translation.Filter.hideTitle} + title={`${translation.Filter.hideTitle}${ + filterCount > 0 ? ` (${filterCount})` : '' + }`} />
diff --git a/src/components/Facets/Facets.tsx b/src/components/Facets/Facets.tsx index 448c06b..b7019f2 100644 --- a/src/components/Facets/Facets.tsx +++ b/src/components/Facets/Facets.tsx @@ -9,13 +9,7 @@ it. import { FunctionComponent } from 'preact'; -import { useProducts, useSearch } from '../../context'; -import { - Facet as FacetType, - FacetFilter, - PriceFacet, -} from '../../types/interface'; -import { Pill } from '../Pill'; +import { Facet as FacetType, PriceFacet } from '../../types/interface'; import { RangeFacet } from './Range/RangeFacet'; import { ScalarFacet } from './Scalar/ScalarFacet'; @@ -26,101 +20,8 @@ interface FacetsProps { export const Facets: FunctionComponent = ({ searchFacets, }: FacetsProps) => { - const searchCtx = useSearch(); - const productsCtx = useProducts(); - - // format range with null "to" - const formatRangeLabel = (filter: FacetFilter) => { - const range = filter.range; - - const currencyRate = productsCtx.currencyRate - ? productsCtx.currencyRate - : '1'; - const currencySymbol = productsCtx.currencySymbol - ? productsCtx.currencySymbol - : '$'; - const label = `${currencySymbol}${ - range?.from && - parseFloat(currencyRate) * parseInt(range.to.toFixed(0), 10) - ? ( - parseFloat(currencyRate) * parseInt(range.from?.toFixed(0), 10) - )?.toFixed(2) - : 0 - }${ - range?.to && parseFloat(currencyRate) * parseInt(range.to.toFixed(0), 10) - ? ` - ${currencySymbol}${( - parseFloat(currencyRate) * parseInt(range.to.toFixed(0), 10) - ).toFixed(2)}` - : ' and above' - }`; - return label; - }; - - const formatBinaryLabel = (filter: FacetFilter, option: string) => { - if (productsCtx.categoryPath) { - const category = searchCtx.categoryNames.find( - (facet) => - facet.attribute === filter.attribute && facet.value === option - ); - - if (category?.name) { - return category.name; - } - } - - const title = filter.attribute?.split('_'); - if (option === 'yes') { - return title.join(' '); - } else if (option === 'no') { - return `not ${title.join(' ')}`; - } - return option; - }; - return (
- {searchCtx.filters?.length > 0 && ( - <> -
-
- - Filters - - -
- -
- {searchCtx.filters.map((filter) => ( -
- {filter.in?.map((option) => ( - - searchCtx.updateFilterOptions(filter, option) - } - /> - ))} - {filter.range && ( - { - searchCtx.removeFilter(filter.attribute); - }} - /> - )} -
- ))} -
- - )} -
{searchFacets?.map((facet) => { const bucketType = facet?.buckets[0]?.__typename; diff --git a/src/components/Facets/Range/RangeFacet.stories.mdx b/src/components/Facets/Range/RangeFacet.stories.mdx index 9135e5c..c554825 100644 --- a/src/components/Facets/Range/RangeFacet.stories.mdx +++ b/src/components/Facets/Range/RangeFacet.stories.mdx @@ -4,7 +4,7 @@ import { mockPriceFilter } from "../mocks.tsx"; import { SearchDecorator } from "../../../../.storybook/decorators/SearchDecorator"; { + const searchCtx = useSearch(); + const productsCtx = useProducts(); + + return ( +
+ {searchCtx.filters?.length > 0 && ( +
+ {searchCtx.filters.map((filter) => ( +
+ {filter.in?.map((option) => ( + searchCtx.updateFilterOptions(filter, option)} + /> + ))} + {filter.range && ( + { + searchCtx.removeFilter(filter.attribute); + }} + /> + )} +
+ ))} +
+ +
+
+ )} +
+ ); +}; diff --git a/src/components/Facets/format.ts b/src/components/Facets/format.ts new file mode 100644 index 0000000..a102371 --- /dev/null +++ b/src/components/Facets/format.ts @@ -0,0 +1,61 @@ +/* +Copyright 2024 Adobe +All Rights Reserved. + +NOTICE: Adobe permits you to use, modify, and distribute this file in +accordance with the terms of the Adobe license agreement accompanying +it. +*/ + +import { FacetFilter } from '../../types/interface'; + +// format range with null "to" +const formatRangeLabel = ( + filter: FacetFilter, + currencyRate: string, + currencySymbol: string +) => { + const range = filter.range; + + const rate = currencyRate ? currencyRate : '1'; + const symbol = currencySymbol ? currencySymbol : '$'; + const label = `${symbol}${ + range?.from && parseFloat(rate) * parseInt(range.from.toFixed(0), 10) + ? (parseFloat(rate) * parseInt(range.from?.toFixed(0), 10))?.toFixed(2) + : 0 + }${ + range?.to && parseFloat(rate) * parseInt(range.to.toFixed(0), 10) + ? ` - ${symbol}${( + parseFloat(rate) * parseInt(range.to.toFixed(0), 10) + ).toFixed(2)}` + : ' and above' + }`; + return label; +}; + +const formatBinaryLabel = ( + filter: FacetFilter, + option: string, + categoryNames?: { value: string; name: string; attribute: string }[], + categoryPath?: string +) => { + if (categoryPath && categoryNames) { + const category = categoryNames.find( + (facet) => facet.attribute === filter.attribute && facet.value === option + ); + + if (category?.name) { + return category.name; + } + } + + const title = filter.attribute?.split('_'); + if (option === 'yes') { + return title.join(' '); + } else if (option === 'no') { + return `not ${title.join(' ')}`; + } + return option; +}; + +export { formatBinaryLabel, formatRangeLabel }; diff --git a/src/components/Facets/index.ts b/src/components/Facets/index.ts index 252cf6d..84d9a13 100644 --- a/src/components/Facets/index.ts +++ b/src/components/Facets/index.ts @@ -8,6 +8,7 @@ it. */ export * from './Facets'; +export * from './SelectedFilters'; export * from './Range/RangeFacet'; export * from './Scalar/ScalarFacet'; export { Facets as default } from './Facets'; diff --git a/src/components/FilterButton/FilterButton.stories.mdx b/src/components/FilterButton/FilterButton.stories.mdx index 935a122..dc837a0 100644 --- a/src/components/FilterButton/FilterButton.stories.mdx +++ b/src/components/FilterButton/FilterButton.stories.mdx @@ -3,7 +3,7 @@ import { action } from "@storybook/addon-actions" import { FilterButton } from '../FilterButton'; ; # Filter - ``` import { InputButtonGroup } from '../InputButtonGroup' ``` diff --git a/src/components/InputButtonGroup/InputButtonGroup.tsx b/src/components/InputButtonGroup/InputButtonGroup.tsx index ea247f0..3e5ca16 100644 --- a/src/components/InputButtonGroup/InputButtonGroup.tsx +++ b/src/components/InputButtonGroup/InputButtonGroup.tsx @@ -25,6 +25,7 @@ export type InputButtonGroupOnChangeProps = { export type InputButtonGroupOnChange = ( arg0: InputButtonGroupOnChangeProps ) => void; +export type InputButtonGroupTitleSlot = (label: string) => FunctionComponent; export type Bucket = { title: string; id?: string; @@ -41,6 +42,7 @@ export interface InputButtonGroupProps { isSelected: (title: string) => boolean | undefined; onChange: InputButtonGroupOnChange; type: 'radio' | 'checkbox'; + inputGroupTitleSlot?: InputButtonGroupTitleSlot; } const numberOfOptionsShown = 5; @@ -51,6 +53,7 @@ export const InputButtonGroup: FunctionComponent = ({ isSelected, onChange, type, + inputGroupTitleSlot, }) => { const translation = useContext(TranslationContext); const productsCtx = useProducts(); @@ -106,9 +109,13 @@ export const InputButtonGroup: FunctionComponent = ({ return (
- + {inputGroupTitleSlot ? ( + inputGroupTitleSlot(title) + ) : ( + + )}
{buckets.slice(0, numberOfOptions).map((option) => { diff --git a/src/components/LabelledInput/LabelledInput.stories.mdx b/src/components/LabelledInput/LabelledInput.stories.mdx index ae91f8b..3728245 100644 --- a/src/components/LabelledInput/LabelledInput.stories.mdx +++ b/src/components/LabelledInput/LabelledInput.stories.mdx @@ -3,7 +3,7 @@ import { LabelledInput } from "./LabelledInput"; import { action } from "@storybook/addon-actions"; void; CTA?: JSXInternal.Element; classes?: string; + type?: string; } const defaultIcon = ( @@ -27,8 +28,19 @@ export const Pill: FunctionComponent = ({ label, onClick, CTA = defaultIcon, + type, }) => { - return ( + return type === 'transparent' ? ( +
+ {label} + + {CTA} + +
+ ) : (
; # SwatchButtonGroup - - ``` import { SwatchButtonGroup } from '../SwatchButtonGroup' ``` diff --git a/src/containers/App.tsx b/src/containers/App.tsx index ed66e1b..88ffd14 100644 --- a/src/containers/App.tsx +++ b/src/containers/App.tsx @@ -9,15 +9,18 @@ it. import { FunctionComponent } from 'preact'; import { useContext, useState } from 'preact/hooks'; +import FilterButton from 'src/components/FilterButton'; +import Loading from 'src/components/Loading'; -import { FilterButton, Loading } from '../components'; import { CategoryFilters } from '../components/CategoryFilters'; -import { useProducts, useSensor, useStore } from '../context'; +import { SelectedFilters } from '../components/Facets'; +import { useProducts, useSearch, useSensor, useStore } from '../context'; import { TranslationContext } from '../context/translation'; import { ProductsContainer } from './ProductsContainer'; import { ProductsHeader } from './ProductsHeader'; export const App: FunctionComponent = () => { + const searchCtx = useSearch(); const productsCtx = useProducts(); const { screenSize } = useSensor(); const { displayMode } = useStore().config; @@ -46,7 +49,9 @@ export const App: FunctionComponent = () => { totalCount={productsCtx.totalCount} categoryName={productsCtx.categoryName ?? ''} phrase={productsCtx.variables.phrase ?? ''} + showFilters={showFilters} setShowFilters={setShowFilters} + filterCount={searchCtx.filterCount} />
{ totalCount={productsCtx.totalCount} screenSize={screenSize} /> + {productsCtx.loading ? ( ) : ( @@ -86,15 +92,22 @@ export const App: FunctionComponent = () => {
- {!screenSize.mobile && ( -
- setShowFilters(true)} - type="desktop" - title={translation.Filter.showTitle} - /> -
- )} + {!screenSize.mobile && + !productsCtx.loading && + productsCtx.facets.length && + productsCtx.totalCount > 0 && ( +
+ setShowFilters(true)} + type="desktop" + title={`${translation.Filter.showTitle}${ + searchCtx.filterCount > 0 + ? ` (${searchCtx.filterCount})` + : '' + }`} + /> +
+ )}
{ />
+ {productsCtx.loading ? ( ) : ( diff --git a/src/context/search.tsx b/src/context/search.tsx index 0c4b151..c6d7bbe 100644 --- a/src/context/search.tsx +++ b/src/context/search.tsx @@ -9,6 +9,7 @@ it. import { createContext, FunctionComponent, useContext } from 'preact/compat'; import { useState } from 'preact/hooks'; +import { useEffect } from 'react'; import { FacetFilter, @@ -35,6 +36,7 @@ interface SearchContextProps { setFilters: any; setSort: any; setCategoryNames: any; + filterCount: number; categoryNames: { name: string; value: string; attribute: string }[]; createFilter: (filter: FacetFilter) => void; updateFilter: (filter: FacetFilter) => void; @@ -63,6 +65,7 @@ const SearchProvider: FunctionComponent = ({ children }) => { { name: string; value: string; attribute: string }[] >([]); const [sort, setSort] = useState(sortDefault); + const [filterCount, setFilterCount] = useState(0); const createFilter = (filter: SearchClauseInput) => { const newFilters = [...filters, filter]; @@ -112,12 +115,30 @@ const SearchProvider: FunctionComponent = ({ children }) => { } }; + const getFilterCount = (filters: SearchClauseInput[]) => { + let count = 0; + filters.forEach((filter) => { + if (filter.in) { + count += filter.in.length; + } else { + count += 1; + } + }); + return count; + }; + + useEffect(() => { + const count = getFilterCount(filters); + setFilterCount(count); + }, [filters]); + const context: SearchContextProps = { phrase, categoryPath, filters, sort, categoryNames, + filterCount, setPhrase, setCategoryPath, setFilters, diff --git a/src/examples/inputGroupTitleSlot/InputGroupTitleSlot.stories.mdx b/src/examples/inputGroupTitleSlot/InputGroupTitleSlot.stories.mdx new file mode 100644 index 0000000..25fb879 --- /dev/null +++ b/src/examples/inputGroupTitleSlot/InputGroupTitleSlot.stories.mdx @@ -0,0 +1,38 @@ +import { Canvas, Meta, Story, ArgsTable } from "@storybook/addon-docs"; +import { InputButtonGroup } from '../../components/InputButtonGroup' +import { TextWithTooltip } from "./TextWithTooltip"; + + + +export const Template = args => ; + +# Filter + + + Math.floor(Math.random() * 10) % 2 === 0, + onChange: () => {}, + type: "checkbox", + inputGroupTitleSlot: (title) => { + return + } + }} + > + {Template.bind({})} + + diff --git a/src/examples/inputGroupTitleSlot/TextWithTooltip.tsx b/src/examples/inputGroupTitleSlot/TextWithTooltip.tsx new file mode 100644 index 0000000..df5a03f --- /dev/null +++ b/src/examples/inputGroupTitleSlot/TextWithTooltip.tsx @@ -0,0 +1,22 @@ +import { FunctionComponent } from 'preact'; + +import TooltipIcon from '../../icons/info.svg'; + +export const TextWithTooltip: FunctionComponent<{ + text: string; + tooltipText: string; +}> = ({ text, tooltipText }) => { + return ( +
+ + + + {tooltipText} + +
+ ); +}; diff --git a/src/styles/index.css b/src/styles/index.css index dd77be0..5519827 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -604,6 +604,10 @@ video { z-index: 20; } +.m-4 { + margin: 1rem; +} + .m-auto { margin: auto; } @@ -654,10 +658,6 @@ video { margin-bottom: var(--spacing-md); } -.ml-0 { - margin-left: 0px; -} - .ml-1 { margin-left: 0.25rem; } @@ -710,6 +710,10 @@ video { margin-top: 1rem; } +.mt-8 { + margin-top: 2rem; +} + .mt-md { margin-top: var(--spacing-md); } @@ -754,6 +758,10 @@ video { height: 1.25rem; } +.h-\[10px\] { + height: 10px; +} + .h-\[12px\] { height: 12px; } @@ -794,6 +802,10 @@ video { width: 1.25rem; } +.w-\[10px\] { + width: 10px; +} + .w-\[12px\] { width: 12px; } @@ -941,10 +953,6 @@ video { justify-content: space-between; } -.gap-3 { - gap: 0.75rem; -} - .gap-x-2xl { -moz-column-gap: var(--spacing-2xl); column-gap: var(--spacing-2xl); @@ -1109,6 +1117,11 @@ video { padding: var(--spacing-xs); } +.px-1 { + padding-left: 0.25rem; + padding-right: 0.25rem; +} + .px-2 { padding-left: 0.5rem; padding-right: 0.5rem; @@ -1144,11 +1157,6 @@ video { padding-bottom: 0.5rem; } -.py-md { - padding-top: var(--spacing-md); - padding-bottom: var(--spacing-md); -} - .py-sm { padding-top: var(--spacing-sm); padding-bottom: var(--spacing-sm); @@ -1203,10 +1211,6 @@ video { text-align: center; } -.align-middle { - vertical-align: middle; -} - .text-2xl { font-size: var(--font-2xl); line-height: var(--leading-loose); @@ -1443,6 +1447,12 @@ video { transition-duration: 150ms; } +.transition-opacity { + transition-property: opacity; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + .duration-100 { transition-duration: 100ms; } @@ -1655,6 +1665,10 @@ video { box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } +.group:hover .group-hover\:opacity-100 { + opacity: 1; +} + @media (min-width: 640px) { .sm\:flex { display: flex;