diff --git a/.deployment.config.json b/.deployment.config.json index 342cb7e371c..a659869473b 100644 --- a/.deployment.config.json +++ b/.deployment.config.json @@ -9,7 +9,7 @@ "sequential": ["dev", "stg", "prd"] }, "team_jenkins": "searchuibuilds", - "start_environment_automatically": false, + "start_environment_automatically": true, "notifications": { "slack_channels": ["#searchuibuilds"] } diff --git a/.github/actions/e2e-atomic-insight-panel/action.yml b/.github/actions/e2e-atomic-insight-panel/action.yml index 4aaa6f6b7bb..04082a54fa8 100644 --- a/.github/actions/e2e-atomic-insight-panel/action.yml +++ b/.github/actions/e2e-atomic-insight-panel/action.yml @@ -13,7 +13,7 @@ runs: with: browser: chrome command-prefix: 'npx -w @coveo/atomic cypress-repeat run -n 3 --until-passes --rerun-failed-only --' - config-file: cypress-insight-panel.config.ts + config-file: cypress-insight-panel.config.mjs start: npm start -w @coveo/atomic wait-on: 'http://localhost:3333/ping' wait-on-timeout: 600000 diff --git a/.github/actions/e2e-atomic-screenshots/action.yml b/.github/actions/e2e-atomic-screenshots/action.yml index d5882bfed41..008bd258f63 100644 --- a/.github/actions/e2e-atomic-screenshots/action.yml +++ b/.github/actions/e2e-atomic-screenshots/action.yml @@ -15,7 +15,7 @@ runs: with: browser: chrome command-prefix: 'npx -w @coveo/atomic cypress-repeat run -n 3 --until-passes --rerun-failed-only --' - config-file: cypress-screenshots.config.ts + config-file: cypress-screenshots.config.mjs start: npm start -w @coveo/atomic wait-on: 'http://localhost:3333/ping' wait-on-timeout: 600000 diff --git a/.github/workflows/prbot.yml b/.github/workflows/prbot.yml index 08d32a043b9..2736a5771be 100644 --- a/.github/workflows/prbot.yml +++ b/.github/workflows/prbot.yml @@ -91,7 +91,6 @@ jobs: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - uses: ./.github/actions/setup - run: npm run build - - run: cat packages/atomic/dist/atomic/atomic.esm.js - uses: ./.github/actions/playwright-atomic with: shardIndex: ${{ matrix.shardIndex }} @@ -107,7 +106,6 @@ jobs: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - uses: ./.github/actions/setup - run: npm run build - - run: cat packages/atomic/dist/atomic/atomic.esm.js - uses: ./.github/actions/merge-playwright-reports - name: Generate a token if: ${{ always() && github.event_name == 'pull_request'}} diff --git a/.prettierignore b/.prettierignore index 26b8de76282..6603d0cf302 100644 --- a/.prettierignore +++ b/.prettierignore @@ -20,7 +20,8 @@ packages/atomic/dist-storybook/**/* packages/atomic/src/components/search/atomic-search-interface/lang/*.json packages/atomic/src/external-builds/**/* packages/atomic/src/generated/** +packages/headless/src/external-builds/**/* packages/quantic/docs/out/quantic-docs.json packages/samples/headless-react/build/**/* packages/samples/angular/src/lang/*.json -packages/samples/vuejs/public/lang/*.json \ No newline at end of file +packages/samples/vuejs/public/lang/*.json diff --git a/package-lock.json b/package-lock.json index 4840951bd1c..58c9d8ee55e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4935,6 +4935,12 @@ "resolved": "packages/bueno", "link": true }, + "node_modules/@coveo/explorer-messenger": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@coveo/explorer-messenger/-/explorer-messenger-0.4.0.tgz", + "integrity": "sha512-nVxwn+4Z+SZe6K94evxPaIeJWJq7hATNaUrTKznnauVptFMYcujts/nnhMplddm9ePg7NgZQjvcHwbi5kqw/EA==", + "license": "Apache-2.0" + }, "node_modules/@coveo/headless": { "resolved": "packages/headless", "link": true @@ -4975,6 +4981,29 @@ "resolved": "packages/quantic", "link": true }, + "node_modules/@coveo/relay": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@coveo/relay/-/relay-0.7.10.tgz", + "integrity": "sha512-d/4Vf8wwj746M0RV9xAek7SV/rZhv3ERoQoZo6I2IKAqzMxX8r0Vyrau+UZG1sdxybd6zzo8AVIzvRFHGXxvnA==", + "license": "Apache-2.0", + "dependencies": { + "@coveo/explorer-messenger": "^0.4.0", + "uuid": "^9.0.1" + } + }, + "node_modules/@coveo/relay/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@coveo/release": { "resolved": "utils/release", "link": true @@ -7166,9 +7195,9 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", @@ -10635,6 +10664,30 @@ } } }, + "node_modules/@reduxjs/toolkit": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.2.7.tgz", + "integrity": "sha512-faI3cZbSdFb8yv9dhDTmGwclW0vk0z5o1cia+kf7gCbaCwHI5e+7tP57mJUv22pNcNbeA62GSrPpfrUfdXcQ6g==", + "license": "MIT", + "dependencies": { + "immer": "^10.0.3", + "redux": "^5.0.1", + "redux-thunk": "^3.1.0", + "reselect": "^5.1.0" + }, + "peerDependencies": { + "react": "^16.9.0 || ^17.0.0 || ^18", + "react-redux": "^7.2.1 || ^8.1.3 || ^9.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-redux": { + "optional": true + } + } + }, "node_modules/@remix-run/router": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.19.0.tgz", @@ -10938,9 +10991,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", - "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz", + "integrity": "sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==", "cpu": [ "arm" ], @@ -21302,6 +21355,63 @@ "url": "https://opencollective.com/vitest" } }, + "node_modules/@vitest/mocker": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.1.tgz", + "integrity": "sha512-LNN5VwOEdJqCmJ/2XJBywB11DLlkbY0ooDJW3uRX5cZyYCrc4PI/ePX0iQhE3BiEGiQmK4GE7Q/PqCkkaiPnrA==", + "dev": true, + "dependencies": { + "@vitest/spy": "^2.1.0-beta.1", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.11" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@vitest/spy": "2.1.1", + "msw": "^2.3.5", + "vite": "^5.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/mocker/node_modules/@vitest/spy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.1.tgz", + "integrity": "sha512-ZM39BnZ9t/xZ/nF4UwRH5il0Sw93QnZXd9NAZGRpIgj0yvVwPpLd702s/Cx955rGaMlyBQkZJ2Ir7qyY48VZ+g==", + "dev": true, + "dependencies": { + "tinyspy": "^3.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker/node_modules/magic-string": { + "version": "0.30.11", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", + "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/@vitest/mocker/node_modules/tinyspy": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz", + "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@vitest/pretty-format": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.0.5.tgz", @@ -25410,6 +25520,17 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/core-js": { + "version": "3.37.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.37.1.tgz", + "integrity": "sha512-Xn6qmxrQZyB0FFY8E3bgRXei3lWDJHhvI+u0q9TKIYM49G8pAr0FgnnrFRAmsbptZL1yxRADVXn+x5AGsbBfyw==", + "hasInstallScript": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/core-js-compat": { "version": "3.37.1", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.37.1.tgz", @@ -28514,6 +28635,36 @@ "integrity": "sha512-jyfL/pwPqaFXyKnj8lP8iLk6Z0m099uXR45aSN8Av1XD4vhvQutxxPzgA2bTcAwQpa1zCXDcWOlhFgyP3GKqhQ==", "dev": true }, + "node_modules/esbuild-plugin-alias-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esbuild-plugin-alias-path/-/esbuild-plugin-alias-path-2.0.2.tgz", + "integrity": "sha512-YK8H9bzx6/CG6YBV11XjoNLjRhNZP0Ta4xZ3ATHhPn7pN8ljQGg+zne4d47DpIzF8/sX2qM+xQWev0CvaD2rSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "5.0.0", + "fs-extra": "^10.1.0", + "jsonfile": "^6.1.0" + }, + "peerDependencies": { + "esbuild": ">= 0.14.0" + } + }, + "node_modules/esbuild-plugin-alias-path/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/esbuild-plugin-umd-wrapper": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esbuild-plugin-umd-wrapper/-/esbuild-plugin-umd-wrapper-2.0.3.tgz", @@ -31700,6 +31851,19 @@ "node": ">= 8" } }, + "node_modules/fix-esm-import-path": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/fix-esm-import-path/-/fix-esm-import-path-1.10.0.tgz", + "integrity": "sha512-c4BoKC4qA8GFAPrApmF4j0QNDWeeaGy51C9/QQw2z671sgfdDmOwUbGmPp/bdyQ4SoThB7CEjy97PJ3LlfuvfA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "debug": "^4.3.2" + }, + "bin": { + "fix-esm-import-path": "fix-esm-import-path.js" + } + }, "node_modules/flat": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", @@ -33917,6 +34081,38 @@ "url": "https://github.com/sponsors/typicode" } }, + "node_modules/i18next": { + "version": "23.12.2", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.12.2.tgz", + "integrity": "sha512-XIeh5V+bi8SJSWGL3jqbTEBW5oD6rbP5L+E7dVQh1MNTxxYef0x15rhJVcRb7oiuq4jLtgy2SD8eFlf6P2cmqg==", + "funding": [ + { + "type": "individual", + "url": "https://locize.com" + }, + { + "type": "individual", + "url": "https://locize.com/i18next.html" + }, + { + "type": "individual", + "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" + } + ], + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.2" + } + }, + "node_modules/i18next-http-backend": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/i18next-http-backend/-/i18next-http-backend-2.5.2.tgz", + "integrity": "sha512-+K8HbDfrvc1/2X8jpb7RLhI9ZxBDpx3xogYkQwGKlWAUXLSEGXzgdt3EcUjLlBCdMwdQY+K+EUF6oh8oB6rwHw==", + "license": "MIT", + "dependencies": { + "cross-fetch": "4.0.0" + } + }, "node_modules/iconv-lite": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", @@ -33979,6 +34175,16 @@ "node": ">=10" } }, + "node_modules/immer": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/immer/-/immer-10.1.1.tgz", + "integrity": "sha512-s2MPrmjovJcoMaHtx6K11Ra7oD05NT97w1IC5zpMkT6Atjr7H8LjaDd81iIxUYpMKSRRNMJE703M1Fhr/TctHw==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/immer" + } + }, "node_modules/immutable": { "version": "4.3.5", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.5.tgz", @@ -45242,6 +45448,21 @@ "balanced-match": "^1.0.0" } }, + "node_modules/redux": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", + "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", + "license": "MIT" + }, + "node_modules/redux-thunk": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-3.1.0.tgz", + "integrity": "sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw==", + "license": "MIT", + "peerDependencies": { + "redux": "^5.0.0" + } + }, "node_modules/reflect-metadata": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.1.tgz", @@ -45637,6 +45858,12 @@ "lodash": "^4.17.21" } }, + "node_modules/reselect": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-5.1.1.tgz", + "integrity": "sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w==", + "license": "MIT" + }, "node_modules/resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", @@ -48864,6 +49091,12 @@ "integrity": "sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==", "dev": true }, + "node_modules/tinyexec": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.0.tgz", + "integrity": "sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==", + "dev": true + }, "node_modules/tinypool": { "version": "0.8.4", "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.4.tgz", @@ -49017,6 +49250,12 @@ "typescript": ">=4.2.0" } }, + "node_modules/ts-debounce": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ts-debounce/-/ts-debounce-4.0.0.tgz", + "integrity": "sha512-+1iDGY6NmOGidq7i7xZGA4cm8DAa6fqdYcvO5Z6yBevH++Bdo9Qt/mN0TzHUgcCcKv1gmh9+W5dHqz8pMWbCbg==", + "license": "MIT" + }, "node_modules/ts-dedent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz", @@ -51882,11 +52121,11 @@ }, "packages/atomic": { "name": "@coveo/atomic", - "version": "3.1.1", + "version": "3.2.3", "license": "Apache-2.0", "dependencies": { - "@coveo/bueno": "1.0.0", - "@coveo/headless": "3.0.0", + "@coveo/bueno": "1.0.1", + "@coveo/headless": "3.1.3", "@popperjs/core": "^2.11.6", "@salesforce-ux/design-system": "^2.16.1", "@stencil/store": "2.0.16", @@ -51904,7 +52143,7 @@ "devDependencies": { "@axe-core/playwright": "4.9.1", "@babel/core": "7.24.9", - "@coveo/atomic": "file:.", + "@coveo/atomic-storybook-utils": "file:./storybookUtils", "@coveo/release": "1.0.0", "@coveo/rollup-plugin-replace-with-ast": "1.0.0", "@custom-elements-manifest/analyzer": "0.10.3", @@ -51967,6 +52206,7 @@ "postcss-nested": "6.2.0", "puppeteer": "22.14.0", "react": "18.3.1", + "rollup": "4.22.4", "rollup-plugin-html": "0.2.1", "shadow-dom-testing-library": "1.11.2", "storybook": "8.1.2", @@ -51982,7 +52222,8 @@ "node": "^20.9.0" }, "peerDependencies": { - "@coveo/headless": "3.0.0" + "@coveo/bueno": "1.0.1", + "@coveo/headless": "3.1.3" } }, "packages/atomic-angular": { @@ -51997,14 +52238,14 @@ "@angular/platform-browser": "17.3.12", "@angular/platform-browser-dynamic": "17.3.12", "@angular/router": "17.3.12", - "@coveo/atomic": "3.1.1", + "@coveo/atomic": "3.2.3", "rxjs": "7.8.1" }, "devDependencies": { "@angular-devkit/build-angular": "17.3.9", "@angular/cli": "17.3.9", "@angular/compiler-cli": "17.3.12", - "@coveo/headless": "3.0.0", + "@coveo/headless": "3.1.3", "@types/node": "20.14.12", "jasmine-core": "5.2.0", "karma": "6.4.3", @@ -52020,7 +52261,7 @@ "node": "^20.9.0" }, "peerDependencies": { - "@coveo/headless": "3.0.0" + "@coveo/headless": "3.1.3" } }, "packages/atomic-angular/node_modules/jasmine-core": { @@ -52049,10 +52290,10 @@ }, "packages/atomic-angular/projects/atomic-angular": { "name": "@coveo/atomic-angular", - "version": "3.0.2", + "version": "3.1.3", "license": "Apache-2.0", "dependencies": { - "@coveo/atomic": "3.1.1", + "@coveo/atomic": "3.2.3", "tslib": "2.6.3" }, "engines": { @@ -52061,16 +52302,16 @@ "peerDependencies": { "@angular/common": "14 - 17", "@angular/core": "14 - 17", - "@coveo/headless": "3.0.0" + "@coveo/headless": "3.1.3" } }, "packages/atomic-hosted-page": { "name": "@coveo/atomic-hosted-page", - "version": "1.0.0", + "version": "1.0.4", "license": "Apache-2.0", "dependencies": { - "@coveo/bueno": "1.0.0", - "@coveo/headless": "3.0.0", + "@coveo/bueno": "1.0.1", + "@coveo/headless": "3.1.3", "@stencil/core": "4.20.0" }, "devDependencies": { @@ -52152,9 +52393,9 @@ }, "packages/atomic-react": { "name": "@coveo/atomic-react", - "version": "3.0.2", + "version": "3.1.3", "dependencies": { - "@coveo/atomic": "3.1.1" + "@coveo/atomic": "3.2.3" }, "devDependencies": { "@coveo/release": "1.0.0", @@ -52168,6 +52409,7 @@ "@types/node": "20.14.12", "@types/react": "18.3.3", "@types/react-dom": "18.3.0", + "fix-esm-import-path": "1.10.0", "ncp": "2.0.0", "react": "18.3.1", "react-dom": "18.3.1", @@ -52178,7 +52420,7 @@ "node": "^20.9.0" }, "peerDependencies": { - "@coveo/headless": "3.0.0", + "@coveo/headless": "3.1.3", "react": ">=18.0.0", "react-dom": ">=18.0.0" } @@ -52384,6 +52626,10 @@ "node": ">=6.9.0" } }, + "packages/atomic/node_modules/@coveo/atomic-storybook-utils": { + "resolved": "packages/atomic/storybookUtils", + "link": true + }, "packages/atomic/node_modules/@custom-elements-manifest/analyzer": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/@custom-elements-manifest/analyzer/-/analyzer-0.10.3.tgz", @@ -52821,13 +53067,6 @@ "postcss": "^8.0.0" } }, - "packages/atomic/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true, - "license": "MIT" - }, "packages/atomic/node_modules/@lit/reactive-element": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-2.0.4.tgz", @@ -53239,195 +53478,210 @@ } }, "packages/atomic/node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", - "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz", + "integrity": "sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "packages/atomic/node_modules/@rollup/rollup-android-arm64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", - "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz", + "integrity": "sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "packages/atomic/node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", - "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz", + "integrity": "sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "packages/atomic/node_modules/@rollup/rollup-darwin-x64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", - "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz", + "integrity": "sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "packages/atomic/node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", - "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz", + "integrity": "sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "packages/atomic/node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", - "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz", + "integrity": "sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "packages/atomic/node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", - "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz", + "integrity": "sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "packages/atomic/node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", - "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz", + "integrity": "sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "packages/atomic/node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", - "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz", + "integrity": "sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==", "cpu": [ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "packages/atomic/node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", - "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz", + "integrity": "sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==", "cpu": [ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "packages/atomic/node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", - "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz", + "integrity": "sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "packages/atomic/node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", - "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz", + "integrity": "sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "packages/atomic/node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", - "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz", + "integrity": "sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "packages/atomic/node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", - "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz", + "integrity": "sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "packages/atomic/node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", - "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz", + "integrity": "sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -53651,16 +53905,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "packages/atomic/node_modules/core-js": { - "version": "3.37.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.37.1.tgz", - "integrity": "sha512-Xn6qmxrQZyB0FFY8E3bgRXei3lWDJHhvI+u0q9TKIYM49G8pAr0FgnnrFRAmsbptZL1yxRADVXn+x5AGsbBfyw==", - "hasInstallScript": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, "packages/atomic/node_modules/cosmiconfig": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", @@ -53863,36 +54107,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "packages/atomic/node_modules/i18next": { - "version": "23.12.2", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.12.2.tgz", - "integrity": "sha512-XIeh5V+bi8SJSWGL3jqbTEBW5oD6rbP5L+E7dVQh1MNTxxYef0x15rhJVcRb7oiuq4jLtgy2SD8eFlf6P2cmqg==", - "funding": [ - { - "type": "individual", - "url": "https://locize.com" - }, - { - "type": "individual", - "url": "https://locize.com/i18next.html" - }, - { - "type": "individual", - "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" - } - ], - "dependencies": { - "@babel/runtime": "^7.23.2" - } - }, - "packages/atomic/node_modules/i18next-http-backend": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/i18next-http-backend/-/i18next-http-backend-2.5.2.tgz", - "integrity": "sha512-+K8HbDfrvc1/2X8jpb7RLhI9ZxBDpx3xogYkQwGKlWAUXLSEGXzgdt3EcUjLlBCdMwdQY+K+EUF6oh8oB6rwHw==", - "dependencies": { - "cross-fetch": "4.0.0" - } - }, "packages/atomic/node_modules/js-yaml": { "name": "@zkochan/js-yaml", "version": "0.0.7", @@ -54270,10 +54484,11 @@ } }, "packages/atomic/node_modules/rollup": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", - "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.22.4.tgz", + "integrity": "sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "1.0.5" }, @@ -54285,22 +54500,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.18.0", - "@rollup/rollup-android-arm64": "4.18.0", - "@rollup/rollup-darwin-arm64": "4.18.0", - "@rollup/rollup-darwin-x64": "4.18.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", - "@rollup/rollup-linux-arm-musleabihf": "4.18.0", - "@rollup/rollup-linux-arm64-gnu": "4.18.0", - "@rollup/rollup-linux-arm64-musl": "4.18.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", - "@rollup/rollup-linux-riscv64-gnu": "4.18.0", - "@rollup/rollup-linux-s390x-gnu": "4.18.0", - "@rollup/rollup-linux-x64-gnu": "4.18.0", - "@rollup/rollup-linux-x64-musl": "4.18.0", - "@rollup/rollup-win32-arm64-msvc": "4.18.0", - "@rollup/rollup-win32-ia32-msvc": "4.18.0", - "@rollup/rollup-win32-x64-msvc": "4.18.0", + "@rollup/rollup-android-arm-eabi": "4.22.4", + "@rollup/rollup-android-arm64": "4.22.4", + "@rollup/rollup-darwin-arm64": "4.22.4", + "@rollup/rollup-darwin-x64": "4.22.4", + "@rollup/rollup-linux-arm-gnueabihf": "4.22.4", + "@rollup/rollup-linux-arm-musleabihf": "4.22.4", + "@rollup/rollup-linux-arm64-gnu": "4.22.4", + "@rollup/rollup-linux-arm64-musl": "4.22.4", + "@rollup/rollup-linux-powerpc64le-gnu": "4.22.4", + "@rollup/rollup-linux-riscv64-gnu": "4.22.4", + "@rollup/rollup-linux-s390x-gnu": "4.22.4", + "@rollup/rollup-linux-x64-gnu": "4.22.4", + "@rollup/rollup-linux-x64-musl": "4.22.4", + "@rollup/rollup-win32-arm64-msvc": "4.22.4", + "@rollup/rollup-win32-ia32-msvc": "4.22.4", + "@rollup/rollup-win32-x64-msvc": "4.22.4", "fsevents": "~2.3.2" } }, @@ -54481,11 +54696,6 @@ "streamx": "^2.15.0" } }, - "packages/atomic/node_modules/ts-debounce": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/ts-debounce/-/ts-debounce-4.0.0.tgz", - "integrity": "sha512-+1iDGY6NmOGidq7i7xZGA4cm8DAa6fqdYcvO5Z6yBevH++Bdo9Qt/mN0TzHUgcCcKv1gmh9+W5dHqz8pMWbCbg==" - }, "packages/atomic/node_modules/tsconfig-paths": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", @@ -54682,9 +54892,12 @@ "url": "https://github.com/sponsors/colinhacks" } }, + "packages/atomic/storybookUtils": { + "dev": true + }, "packages/auth": { "name": "@coveo/auth", - "version": "2.0.0", + "version": "2.0.1", "license": "Apache-2.0", "devDependencies": { "@coveo/release": "1.0.0", @@ -55284,7 +55497,7 @@ }, "packages/bueno": { "name": "@coveo/bueno", - "version": "1.0.0", + "version": "1.0.1", "license": "Apache-2.0", "devDependencies": { "@coveo/release": "1.0.0", @@ -55345,10 +55558,10 @@ }, "packages/headless": { "name": "@coveo/headless", - "version": "3.0.0", + "version": "3.1.3", "license": "Apache-2.0", "dependencies": { - "@coveo/bueno": "1.0.0", + "@coveo/bueno": "1.0.1", "@coveo/relay": "0.7.10", "@coveo/relay-event-types": "9.4.0", "@microsoft/fetch-event-source": "2.0.1", @@ -55369,12 +55582,12 @@ "@microsoft/api-extractor": "7.47.3", "@microsoft/api-extractor-model": "7.29.3", "@microsoft/tsdoc": "0.15.0", + "esbuild-plugin-alias-path": "2.0.2", "eslint-plugin-canonical": "4.18.0", "execa": "8.0.1", "install": "0.13.0", - "jest": "29.7.0", - "ts-jest": "29.2.3", - "ts-node": "10.9.2" + "ts-node": "10.9.2", + "vitest": "2.1.1" }, "engines": { "node": "^20.9.0" @@ -55386,10 +55599,10 @@ }, "packages/headless-react": { "name": "@coveo/headless-react", - "version": "2.0.0", + "version": "2.0.4", "license": "Apache-2.0", "dependencies": { - "@coveo/headless": "3.0.0" + "@coveo/headless": "3.1.3" }, "devDependencies": { "@coveo/release": "1.0.0", @@ -55402,12 +55615,11 @@ "eslint-plugin-react": "7.35.0", "eslint-plugin-testing-library": "6.2.2", "gts": "5.3.1", - "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", "publint": "0.2.9", "rimraf": "5.0.9", - "ts-jest": "29.2.3", - "typescript": "5.4.5" + "typescript": "5.4.5", + "vitest": "2.1.1" }, "engines": { "node": "^20.9.0" @@ -55455,6 +55667,179 @@ "@types/react": "*" } }, + "packages/headless-react/node_modules/@vitest/expect": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.1.tgz", + "integrity": "sha512-YeueunS0HiHiQxk+KEOnq/QMzlUuOzbU1Go+PgAsHvvv3tUkJPm9xWt+6ITNTlzsMXUjmgm5T+U7KBPK2qQV6w==", + "dev": true, + "dependencies": { + "@vitest/spy": "2.1.1", + "@vitest/utils": "2.1.1", + "chai": "^5.1.1", + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/headless-react/node_modules/@vitest/pretty-format": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.1.tgz", + "integrity": "sha512-SjxPFOtuINDUW8/UkElJYQSFtnWX7tMksSGW0vfjxMneFqxVr8YJ979QpMbDW7g+BIiq88RAGDjf7en6rvLPPQ==", + "dev": true, + "dependencies": { + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/headless-react/node_modules/@vitest/runner": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.1.tgz", + "integrity": "sha512-uTPuY6PWOYitIkLPidaY5L3t0JJITdGTSwBtwMjKzo5O6RCOEncz9PUN+0pDidX8kTHYjO0EwUIvhlGpnGpxmA==", + "dev": true, + "dependencies": { + "@vitest/utils": "2.1.1", + "pathe": "^1.1.2" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/headless-react/node_modules/@vitest/snapshot": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.1.tgz", + "integrity": "sha512-BnSku1WFy7r4mm96ha2FzN99AZJgpZOWrAhtQfoxjUU5YMRpq1zmHRq7a5K9/NjqonebO7iVDla+VvZS8BOWMw==", + "dev": true, + "dependencies": { + "@vitest/pretty-format": "2.1.1", + "magic-string": "^0.30.11", + "pathe": "^1.1.2" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/headless-react/node_modules/@vitest/spy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.1.tgz", + "integrity": "sha512-ZM39BnZ9t/xZ/nF4UwRH5il0Sw93QnZXd9NAZGRpIgj0yvVwPpLd702s/Cx955rGaMlyBQkZJ2Ir7qyY48VZ+g==", + "dev": true, + "dependencies": { + "tinyspy": "^3.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/headless-react/node_modules/@vitest/utils": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.1.tgz", + "integrity": "sha512-Y6Q9TsI+qJ2CC0ZKj6VBb+T8UPz593N113nnUykqwANqhgf3QkZeHFlusgKLTqrnVHbj/XDKZcDHol+dxVT+rQ==", + "dev": true, + "dependencies": { + "@vitest/pretty-format": "2.1.1", + "loupe": "^3.1.1", + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/headless-react/node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "packages/headless-react/node_modules/chai": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.1.tgz", + "integrity": "sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==", + "dev": true, + "dependencies": { + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "packages/headless-react/node_modules/check-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", + "dev": true, + "engines": { + "node": ">= 16" + } + }, + "packages/headless-react/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "packages/headless-react/node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "packages/headless-react/node_modules/loupe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz", + "integrity": "sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "packages/headless-react/node_modules/magic-string": { + "version": "0.30.11", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", + "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "packages/headless-react/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "packages/headless-react/node_modules/pathval": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", + "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==", + "dev": true, + "engines": { + "node": ">= 14.16" + } + }, "packages/headless-react/node_modules/publint": { "version": "0.2.9", "resolved": "https://registry.npmjs.org/publint/-/publint-0.2.9.tgz", @@ -55475,66 +55860,129 @@ "url": "https://bjornlu.com/sponsor" } }, - "packages/headless-react/node_modules/ts-jest": { - "version": "29.2.3", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.3.tgz", - "integrity": "sha512-yCcfVdiBFngVz9/keHin9EnsrQtQtEu3nRykNy9RVp+FiPFFbPJ3Sg6Qg4+TkmH0vMP5qsTKgXSsk80HRwvdgQ==", + "packages/headless-react/node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true + }, + "packages/headless-react/node_modules/tinypool": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.1.tgz", + "integrity": "sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==", + "dev": true, + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, + "packages/headless-react/node_modules/tinyspy": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz", + "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "packages/headless-react/node_modules/vite-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.1.tgz", + "integrity": "sha512-N/mGckI1suG/5wQI35XeR9rsMsPqKXzq1CdUndzVstBj/HvyxxGctwnK6WX43NGt5L3Z5tcRf83g4TITKJhPrA==", "dev": true, "dependencies": { - "bs-logger": "0.x", - "ejs": "^3.1.10", - "fast-json-stable-stringify": "2.x", - "jest-util": "^29.0.0", - "json5": "^2.2.3", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "^7.5.3", - "yargs-parser": "^21.0.1" + "cac": "^6.7.14", + "debug": "^4.3.6", + "pathe": "^1.1.2", + "vite": "^5.0.0" }, "bin": { - "ts-jest": "cli.js" + "vite-node": "vite-node.mjs" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/headless-react/node_modules/vitest": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.1.tgz", + "integrity": "sha512-97We7/VC0e9X5zBVkvt7SGQMGrRtn3KtySFQG5fpaMlS+l62eeXRQO633AYhSTC3z7IMebnPPNjGXVGNRFlxBA==", + "dev": true, + "dependencies": { + "@vitest/expect": "2.1.1", + "@vitest/mocker": "2.1.1", + "@vitest/pretty-format": "^2.1.1", + "@vitest/runner": "2.1.1", + "@vitest/snapshot": "2.1.1", + "@vitest/spy": "2.1.1", + "@vitest/utils": "2.1.1", + "chai": "^5.1.1", + "debug": "^4.3.6", + "magic-string": "^0.30.11", + "pathe": "^1.1.2", + "std-env": "^3.7.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.0", + "tinypool": "^1.0.0", + "tinyrainbow": "^1.2.0", + "vite": "^5.0.0", + "vite-node": "2.1.1", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0", - "@jest/types": "^29.0.0", - "babel-jest": "^29.0.0", - "jest": "^29.0.0", - "typescript": ">=4.3 <6" + "@edge-runtime/vm": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "2.1.1", + "@vitest/ui": "2.1.1", + "happy-dom": "*", + "jsdom": "*" }, "peerDependenciesMeta": { - "@babel/core": { + "@edge-runtime/vm": { "optional": true }, - "@jest/transform": { + "@types/node": { "optional": true }, - "@jest/types": { + "@vitest/browser": { "optional": true }, - "babel-jest": { + "@vitest/ui": { "optional": true }, - "esbuild": { + "happy-dom": { + "optional": true + }, + "jsdom": { "optional": true } } }, - "packages/headless/node_modules/@coveo/explorer-messenger": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@coveo/explorer-messenger/-/explorer-messenger-0.4.0.tgz", - "integrity": "sha512-nVxwn+4Z+SZe6K94evxPaIeJWJq7hATNaUrTKznnauVptFMYcujts/nnhMplddm9ePg7NgZQjvcHwbi5kqw/EA==" - }, - "packages/headless/node_modules/@coveo/relay": { - "version": "0.7.10", - "resolved": "https://registry.npmjs.org/@coveo/relay/-/relay-0.7.10.tgz", - "integrity": "sha512-d/4Vf8wwj746M0RV9xAek7SV/rZhv3ERoQoZo6I2IKAqzMxX8r0Vyrau+UZG1sdxybd6zzo8AVIzvRFHGXxvnA==", + "packages/headless-react/node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, "dependencies": { - "@coveo/explorer-messenger": "^0.4.0", - "uuid": "^9.0.1" + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" } }, "packages/headless/node_modules/@coveo/relay-event-types": { @@ -55595,30 +56043,6 @@ "resolve": "~1.22.2" } }, - "packages/headless/node_modules/@reduxjs/toolkit": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.2.7.tgz", - "integrity": "sha512-faI3cZbSdFb8yv9dhDTmGwclW0vk0z5o1cia+kf7gCbaCwHI5e+7tP57mJUv22pNcNbeA62GSrPpfrUfdXcQ6g==", - "license": "MIT", - "dependencies": { - "immer": "^10.0.3", - "redux": "^5.0.1", - "redux-thunk": "^3.1.0", - "reselect": "^5.1.0" - }, - "peerDependencies": { - "react": "^16.9.0 || ^17.0.0 || ^18", - "react-redux": "^7.2.1 || ^8.1.3 || ^9.0.0" - }, - "peerDependenciesMeta": { - "react": { - "optional": true - }, - "react-redux": { - "optional": true - } - } - }, "packages/headless/node_modules/@rushstack/node-core-library": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-5.5.0.tgz", @@ -55703,6 +56127,86 @@ "string-argv": "~0.3.1" } }, + "packages/headless/node_modules/@vitest/expect": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.1.tgz", + "integrity": "sha512-YeueunS0HiHiQxk+KEOnq/QMzlUuOzbU1Go+PgAsHvvv3tUkJPm9xWt+6ITNTlzsMXUjmgm5T+U7KBPK2qQV6w==", + "dev": true, + "dependencies": { + "@vitest/spy": "2.1.1", + "@vitest/utils": "2.1.1", + "chai": "^5.1.1", + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/headless/node_modules/@vitest/pretty-format": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.1.tgz", + "integrity": "sha512-SjxPFOtuINDUW8/UkElJYQSFtnWX7tMksSGW0vfjxMneFqxVr8YJ979QpMbDW7g+BIiq88RAGDjf7en6rvLPPQ==", + "dev": true, + "dependencies": { + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/headless/node_modules/@vitest/runner": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.1.tgz", + "integrity": "sha512-uTPuY6PWOYitIkLPidaY5L3t0JJITdGTSwBtwMjKzo5O6RCOEncz9PUN+0pDidX8kTHYjO0EwUIvhlGpnGpxmA==", + "dev": true, + "dependencies": { + "@vitest/utils": "2.1.1", + "pathe": "^1.1.2" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/headless/node_modules/@vitest/snapshot": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.1.tgz", + "integrity": "sha512-BnSku1WFy7r4mm96ha2FzN99AZJgpZOWrAhtQfoxjUU5YMRpq1zmHRq7a5K9/NjqonebO7iVDla+VvZS8BOWMw==", + "dev": true, + "dependencies": { + "@vitest/pretty-format": "2.1.1", + "magic-string": "^0.30.11", + "pathe": "^1.1.2" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/headless/node_modules/@vitest/spy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.1.tgz", + "integrity": "sha512-ZM39BnZ9t/xZ/nF4UwRH5il0Sw93QnZXd9NAZGRpIgj0yvVwPpLd702s/Cx955rGaMlyBQkZJ2Ir7qyY48VZ+g==", + "dev": true, + "dependencies": { + "tinyspy": "^3.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/headless/node_modules/@vitest/utils": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.1.tgz", + "integrity": "sha512-Y6Q9TsI+qJ2CC0ZKj6VBb+T8UPz593N113nnUykqwANqhgf3QkZeHFlusgKLTqrnVHbj/XDKZcDHol+dxVT+rQ==", + "dev": true, + "dependencies": { + "@vitest/pretty-format": "2.1.1", + "loupe": "^3.1.1", + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, "packages/headless/node_modules/ajv-formats": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", @@ -55720,11 +56224,71 @@ } } }, + "packages/headless/node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "packages/headless/node_modules/chai": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.1.tgz", + "integrity": "sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==", + "dev": true, + "dependencies": { + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "packages/headless/node_modules/check-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", + "dev": true, + "engines": { + "node": ">= 16" + } + }, "packages/headless/node_modules/dayjs": { "version": "1.11.12", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.12.tgz", "integrity": "sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg==" }, + "packages/headless/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "packages/headless/node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "packages/headless/node_modules/exponential-backoff": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.0.tgz", @@ -55744,15 +56308,6 @@ "node": ">=6 <7 || >=8" } }, - "packages/headless/node_modules/immer": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/immer/-/immer-10.0.3.tgz", - "integrity": "sha512-pwupu3eWfouuaowscykeckFmVTpqbzW+rXFCX8rQLkZzM9ftBmU/++Ra+o+L27mz03zJTlyV4UUr+fdKNffo4A==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/immer" - } - }, "packages/headless/node_modules/jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -55762,6 +56317,15 @@ "graceful-fs": "^4.1.6" } }, + "packages/headless/node_modules/loupe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz", + "integrity": "sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.1" + } + }, "packages/headless/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -55774,6 +56338,15 @@ "node": ">=10" } }, + "packages/headless/node_modules/magic-string": { + "version": "0.30.11", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", + "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, "packages/headless/node_modules/minimatch": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", @@ -55796,24 +56369,21 @@ "concat-map": "0.0.1" } }, - "packages/headless/node_modules/redux": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", - "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==" + "packages/headless/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true }, - "packages/headless/node_modules/redux-thunk": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-3.1.0.tgz", - "integrity": "sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw==", - "peerDependencies": { - "redux": "^5.0.0" + "packages/headless/node_modules/pathval": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", + "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==", + "dev": true, + "engines": { + "node": ">= 14.16" } }, - "packages/headless/node_modules/reselect": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/reselect/-/reselect-5.1.0.tgz", - "integrity": "sha512-aw7jcGLDpSgNDyWBQLv2cedml85qd95/iszJjN988zX1t7AVRJi19d9kto5+W7oCfQ94gyo40dVbT6g2k4/kXg==" - }, "packages/headless/node_modules/semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", @@ -55829,57 +56399,28 @@ "node": ">=10" } }, - "packages/headless/node_modules/ts-debounce": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/ts-debounce/-/ts-debounce-4.0.0.tgz", - "integrity": "sha512-+1iDGY6NmOGidq7i7xZGA4cm8DAa6fqdYcvO5Z6yBevH++Bdo9Qt/mN0TzHUgcCcKv1gmh9+W5dHqz8pMWbCbg==" + "packages/headless/node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true }, - "packages/headless/node_modules/ts-jest": { - "version": "29.2.3", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.3.tgz", - "integrity": "sha512-yCcfVdiBFngVz9/keHin9EnsrQtQtEu3nRykNy9RVp+FiPFFbPJ3Sg6Qg4+TkmH0vMP5qsTKgXSsk80HRwvdgQ==", + "packages/headless/node_modules/tinypool": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.1.tgz", + "integrity": "sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==", "dev": true, - "dependencies": { - "bs-logger": "0.x", - "ejs": "^3.1.10", - "fast-json-stable-stringify": "2.x", - "jest-util": "^29.0.0", - "json5": "^2.2.3", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "^7.5.3", - "yargs-parser": "^21.0.1" - }, - "bin": { - "ts-jest": "cli.js" - }, "engines": { - "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0", - "@jest/types": "^29.0.0", - "babel-jest": "^29.0.0", - "jest": "^29.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/transform": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - } + "node": "^18.0.0 || >=20.0.0" + } + }, + "packages/headless/node_modules/tinyspy": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz", + "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==", + "dev": true, + "engines": { + "node": ">=14.0.0" } }, "packages/headless/node_modules/typescript": { @@ -55904,16 +56445,105 @@ "node": ">= 4.0.0" } }, - "packages/headless/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], + "packages/headless/node_modules/vite-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.1.tgz", + "integrity": "sha512-N/mGckI1suG/5wQI35XeR9rsMsPqKXzq1CdUndzVstBj/HvyxxGctwnK6WX43NGt5L3Z5tcRf83g4TITKJhPrA==", + "dev": true, + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.3.6", + "pathe": "^1.1.2", + "vite": "^5.0.0" + }, "bin": { - "uuid": "dist/bin/uuid" + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "packages/headless/node_modules/vitest": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.1.tgz", + "integrity": "sha512-97We7/VC0e9X5zBVkvt7SGQMGrRtn3KtySFQG5fpaMlS+l62eeXRQO633AYhSTC3z7IMebnPPNjGXVGNRFlxBA==", + "dev": true, + "dependencies": { + "@vitest/expect": "2.1.1", + "@vitest/mocker": "2.1.1", + "@vitest/pretty-format": "^2.1.1", + "@vitest/runner": "2.1.1", + "@vitest/snapshot": "2.1.1", + "@vitest/spy": "2.1.1", + "@vitest/utils": "2.1.1", + "chai": "^5.1.1", + "debug": "^4.3.6", + "magic-string": "^0.30.11", + "pathe": "^1.1.2", + "std-env": "^3.7.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.0", + "tinypool": "^1.0.0", + "tinyrainbow": "^1.2.0", + "vite": "^5.0.0", + "vite-node": "2.1.1", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "2.1.1", + "@vitest/ui": "2.1.1", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "packages/headless/node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" } }, "packages/headless/node_modules/yallist": { @@ -55924,12 +56554,12 @@ }, "packages/quantic": { "name": "@coveo/quantic", - "version": "3.0.0", + "version": "3.0.4", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@coveo/bueno": "1.0.0", - "@coveo/headless": "3.0.0", + "@coveo/bueno": "1.0.1", + "@coveo/headless": "3.1.3", "dompurify": "3.1.6", "marked": "12.0.2" }, @@ -57638,13 +58268,6 @@ } } }, - "packages/rollup-plugin-replace-with-ast/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true, - "license": "MIT" - }, "packages/rollup-plugin-replace-with-ast/node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.0.0-24", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.0.0-24.tgz", @@ -57876,7 +58499,7 @@ "@angular/platform-browser": "17.3.12", "@angular/platform-browser-dynamic": "17.3.12", "@angular/router": "17.3.12", - "@coveo/atomic-angular": "3.0.2", + "@coveo/atomic-angular": "3.1.3", "rxjs": "7.8.1", "tslib": "2.6.3", "zone.js": "0.14.8" @@ -58176,9 +58799,9 @@ "name": "@coveo/atomic-next-samples", "version": "0.0.0", "dependencies": { - "@coveo/atomic": "3.1.1", - "@coveo/atomic-react": "3.0.2", - "@coveo/headless": "3.0.0", + "@coveo/atomic": "3.2.3", + "@coveo/atomic-react": "3.1.3", + "@coveo/headless": "3.1.3", "next": "14.2.5", "react": "18.3.1", "react-dom": "18.3.1" @@ -58241,9 +58864,9 @@ "name": "@coveo/atomic-react-samples", "version": "0.0.0", "dependencies": { - "@coveo/atomic": "3.1.1", - "@coveo/atomic-react": "3.0.2", - "@coveo/headless": "3.0.0", + "@coveo/atomic": "3.2.3", + "@coveo/atomic-react": "3.1.3", + "@coveo/headless": "3.1.3", "react": "18.3.1", "react-dom": "18.3.1" }, @@ -58731,7 +59354,7 @@ "name": "@coveo/headless-commerce-react-samples", "version": "0.1.0", "dependencies": { - "@coveo/headless": "3.0.0", + "@coveo/headless": "3.1.3", "react": "18.3.1", "react-dom": "18.3.1" }, @@ -59117,12 +59740,6 @@ "node": ">=12" } }, - "packages/samples/headless-commerce-react/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true - }, "packages/samples/headless-commerce-react/node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.21.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.1.tgz", @@ -59963,8 +60580,8 @@ "name": "@coveo/headless-react-samples", "version": "0.0.0", "dependencies": { - "@coveo/auth": "2.0.0", - "@coveo/headless": "3.0.0", + "@coveo/auth": "2.0.1", + "@coveo/headless": "3.1.3", "@testing-library/jest-dom": "6.4.8", "@testing-library/react": "14.3.1", "@testing-library/user-event": "14.5.2", @@ -61355,8 +61972,8 @@ "name": "@coveo/headless-ssr-samples-common", "version": "0.0.0", "dependencies": { - "@coveo/headless": "3.0.0", - "@coveo/headless-react": "2.0.0", + "@coveo/headless": "3.1.3", + "@coveo/headless-react": "2.0.4", "next": "14.2.5", "react": "^18.2.0", "react-dom": "^18.2.0" @@ -61377,7 +61994,7 @@ "name": "@coveo/headless-ssr-commerce-samples", "version": "0.0.0", "dependencies": { - "@coveo/headless": "3.0.0", + "@coveo/headless": "3.1.3", "next": "14.2.5", "react": "^18.2.0", "react-dom": "^18.2.0" @@ -61496,10 +62113,10 @@ "version": "0.1.0", "dependencies": { "@babel/standalone": "7.25.0", - "@coveo/atomic": "3.1.1", - "@coveo/atomic-hosted-page": "1.0.0", - "@coveo/atomic-react": "3.0.2", - "@coveo/headless": "3.0.0", + "@coveo/atomic": "3.2.3", + "@coveo/atomic-hosted-page": "1.0.4", + "@coveo/atomic-react": "3.1.3", + "@coveo/headless": "3.1.3", "react": "18.3.1", "react-dom": "18.3.1" }, @@ -61568,8 +62185,9 @@ "name": "@coveo/atomic-stencil-samples", "version": "0.0.0", "dependencies": { - "@coveo/atomic": "3.1.1", - "@coveo/headless": "3.0.0", + "@coveo/atomic": "3.2.3", + "@coveo/bueno": "1.0.1", + "@coveo/headless": "3.1.3", "@stencil/core": "4.20.0", "stencil-router-v2": "0.6.0" }, @@ -61852,7 +62470,7 @@ "name": "@coveo/atomic-vuejs-samples", "version": "0.0.0", "dependencies": { - "@coveo/atomic": "3.1.1", + "@coveo/atomic": "3.2.3", "vue": "^3.4.15" }, "devDependencies": { diff --git a/packages/atomic-angular/package.json b/packages/atomic-angular/package.json index 1724aab8d20..8189d0e5cef 100644 --- a/packages/atomic-angular/package.json +++ b/packages/atomic-angular/package.json @@ -20,17 +20,17 @@ "@angular/platform-browser": "17.3.12", "@angular/platform-browser-dynamic": "17.3.12", "@angular/router": "17.3.12", - "@coveo/atomic": "3.1.1", + "@coveo/atomic": "3.2.3", "rxjs": "7.8.1" }, "peerDependencies": { - "@coveo/headless": "3.0.0" + "@coveo/headless": "3.1.3" }, "devDependencies": { "@angular-devkit/build-angular": "17.3.9", "@angular/cli": "17.3.9", "@angular/compiler-cli": "17.3.12", - "@coveo/headless": "3.0.0", + "@coveo/headless": "3.1.3", "@types/node": "20.14.12", "jasmine-core": "5.2.0", "karma": "6.4.3", diff --git a/packages/atomic-angular/projects/atomic-angular/CHANGELOG.md b/packages/atomic-angular/projects/atomic-angular/CHANGELOG.md index 0fee5f31241..8f76c184370 100644 --- a/packages/atomic-angular/projects/atomic-angular/CHANGELOG.md +++ b/packages/atomic-angular/projects/atomic-angular/CHANGELOG.md @@ -1,3 +1,8 @@ +## 3.1.0 (2024-09-24) + +- feat(atomic): add tab support for atomic-generated-answer (#4285) ([744fb61](https://github.com/coveo/ui-kit/commits/744fb61)), closes [#4285](https://github.com/coveo/ui-kit/issues/4285) +- feat(atomic): atomic insight user actions toggle component created (#4298) ([bad4ff5](https://github.com/coveo/ui-kit/commits/bad4ff5)), closes [#4298](https://github.com/coveo/ui-kit/issues/4298) + ## 3.0.0 (2024-09-18) - chore!: update node engine definition in all exported packages (#4330) ([d6d8a1a](https://github.com/coveo/ui-kit/commits/d6d8a1a)), closes [#4330](https://github.com/coveo/ui-kit/issues/4330) diff --git a/packages/atomic-angular/projects/atomic-angular/package.json b/packages/atomic-angular/projects/atomic-angular/package.json index 298c7411e44..85739caa6dc 100644 --- a/packages/atomic-angular/projects/atomic-angular/package.json +++ b/packages/atomic-angular/projects/atomic-angular/package.json @@ -1,6 +1,6 @@ { "name": "@coveo/atomic-angular", - "version": "3.0.2", + "version": "3.1.3", "license": "Apache-2.0", "repository": { "url": "https://github.com/coveo/ui-kit" @@ -8,10 +8,10 @@ "peerDependencies": { "@angular/common": "14 - 17", "@angular/core": "14 - 17", - "@coveo/headless": "3.0.0" + "@coveo/headless": "3.1.3" }, "dependencies": { - "@coveo/atomic": "3.1.1", + "@coveo/atomic": "3.2.3", "tslib": "2.6.3" }, "engines": { diff --git a/packages/atomic-angular/projects/atomic-angular/src/lib/stencil-generated/atomic-angular.module.ts b/packages/atomic-angular/projects/atomic-angular/src/lib/stencil-generated/atomic-angular.module.ts index c90fe40ecff..f523722e45a 100644 --- a/packages/atomic-angular/projects/atomic-angular/src/lib/stencil-generated/atomic-angular.module.ts +++ b/packages/atomic-angular/projects/atomic-angular/src/lib/stencil-generated/atomic-angular.module.ts @@ -51,7 +51,6 @@ AtomicFormatUnit, AtomicGeneratedAnswer, AtomicHtml, AtomicIcon, -AtomicInsightUserActionsTimeline, AtomicLayoutSection, AtomicLoadMoreResults, AtomicNoResults, @@ -195,7 +194,6 @@ AtomicFormatUnit, AtomicGeneratedAnswer, AtomicHtml, AtomicIcon, -AtomicInsightUserActionsTimeline, AtomicLayoutSection, AtomicLoadMoreResults, AtomicNoResults, diff --git a/packages/atomic-angular/projects/atomic-angular/src/lib/stencil-generated/components.ts b/packages/atomic-angular/projects/atomic-angular/src/lib/stencil-generated/components.ts index 12a188fcfa8..d57c6c8a5c9 100644 --- a/packages/atomic-angular/projects/atomic-angular/src/lib/stencil-generated/components.ts +++ b/packages/atomic-angular/projects/atomic-angular/src/lib/stencil-generated/components.ts @@ -984,14 +984,14 @@ export declare interface AtomicFormatUnit extends Components.AtomicFormatUnit {} @ProxyCmp({ - inputs: ['collapsible', 'withToggle'] + inputs: ['collapsible', 'tabsExcluded', 'tabsIncluded', 'withToggle'] }) @Component({ selector: 'atomic-generated-answer', changeDetection: ChangeDetectionStrategy.OnPush, template: '', // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property - inputs: ['collapsible', 'withToggle'], + inputs: ['collapsible', 'tabsExcluded', 'tabsIncluded', 'withToggle'], }) export class AtomicGeneratedAnswer { protected el: HTMLElement; @@ -1049,28 +1049,6 @@ export class AtomicIcon { export declare interface AtomicIcon extends Components.AtomicIcon {} -@ProxyCmp({ - inputs: ['ticketCreationDateTime', 'userId'] -}) -@Component({ - selector: 'atomic-insight-user-actions-timeline', - changeDetection: ChangeDetectionStrategy.OnPush, - template: '', - // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property - inputs: ['ticketCreationDateTime', 'userId'], -}) -export class AtomicInsightUserActionsTimeline { - protected el: HTMLElement; - constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) { - c.detach(); - this.el = r.nativeElement; - } -} - - -export declare interface AtomicInsightUserActionsTimeline extends Components.AtomicInsightUserActionsTimeline {} - - @ProxyCmp({ inputs: ['maxWidth', 'minWidth', 'section'] }) diff --git a/packages/atomic-hosted-page/package.json b/packages/atomic-hosted-page/package.json index 4948c30cbc9..5eb4fb78187 100644 --- a/packages/atomic-hosted-page/package.json +++ b/packages/atomic-hosted-page/package.json @@ -1,7 +1,7 @@ { "name": "@coveo/atomic-hosted-page", "description": "Web Component used to inject a Coveo Hosted Search Page in the DOM.", - "version": "1.0.0", + "version": "1.0.4", "repository": { "type": "git", "url": "git+https://github.com/coveo/ui-kit.git", @@ -30,8 +30,8 @@ "promote:npm:latest": "node ../../scripts/deploy/update-npm-tag.mjs latest" }, "dependencies": { - "@coveo/bueno": "1.0.0", - "@coveo/headless": "3.0.0", + "@coveo/bueno": "1.0.1", + "@coveo/headless": "3.1.3", "@stencil/core": "4.20.0" }, "devDependencies": { diff --git a/packages/atomic-react/CHANGELOG.md b/packages/atomic-react/CHANGELOG.md index c000123f70a..ec24eb5e323 100644 --- a/packages/atomic-react/CHANGELOG.md +++ b/packages/atomic-react/CHANGELOG.md @@ -1,3 +1,14 @@ +## 3.1.1 (2024-09-24) + +- docs: document headless, atomic, and atomic-react entry points (#4455) ([3853bdc](https://github.com/coveo/ui-kit/commits/3853bdc)), closes [#4455](https://github.com/coveo/ui-kit/issues/4455) + +## 3.1.0 (2024-09-24) + +- chore(atomic, headless): make bueno external (#4433) ([e1f7f2d](https://github.com/coveo/ui-kit/commits/e1f7f2d)), closes [#4433](https://github.com/coveo/ui-kit/issues/4433) +- chore(headless,atomic): add type "module" to atomic, atomic-react and headless (#4442) ([21896c3](https://github.com/coveo/ui-kit/commits/21896c3)), closes [#4442](https://github.com/coveo/ui-kit/issues/4442) [/github.com/coveo/ui-kit/pull/4449/files#diff-75f80b97846615f5b074710648b8191f74aa4f00fd1536c45bc344b284ca8e87](https://github.com//github.com/coveo/ui-kit/pull/4449/files/issues/diff-75f80b97846615f5b074710648b8191f74aa4f00fd1536c45bc344b284ca8e87) +- feat(atomic): atomic insight user actions toggle component created (#4298) ([bad4ff5](https://github.com/coveo/ui-kit/commits/bad4ff5)), closes [#4298](https://github.com/coveo/ui-kit/issues/4298) +- docs(atomic-react): update examples in readme (#4432) ([037b2ca](https://github.com/coveo/ui-kit/commits/037b2ca)), closes [#4432](https://github.com/coveo/ui-kit/issues/4432) + ## 3.0.1 (2024-09-18) - fix(atomic, atomic-react): use root-relative URL for CDN (#4431) ([39313ea](https://github.com/coveo/ui-kit/commits/39313ea)), closes [#4431](https://github.com/coveo/ui-kit/issues/4431) diff --git a/packages/atomic-react/README.md b/packages/atomic-react/README.md index 2fcc1819c79..889123eba3e 100644 --- a/packages/atomic-react/README.md +++ b/packages/atomic-react/README.md @@ -24,6 +24,14 @@ Since Atomic React is built on top of the core [Atomic](https://docs.coveo.com/e However, there are still some special considerations. +## Entry points + +The `@coveo/atomic-react` package exposes the following entry points: + +- `@coveo/atomic-react`: exports the components and utilities for building non-commerce search interfaces with Atomic React. +- `@coveo/atomic-react/recommendation`: exports the components and utilities for building non-commerce recommendation interfaces with Atomic React. +- `@coveo/atomic-react/commerce`: exports the components and utilities for building commerce applications with Atomic React. + ## Static Assets - Languages and SVGs For performance reasons, the generated JavaScript bundle does not automatically include static assets that are loaded on demand. This impacts language support, as well as the use of included SVG icons. diff --git a/packages/atomic-react/package.json b/packages/atomic-react/package.json index ba02f726718..e6aa2ac4d07 100644 --- a/packages/atomic-react/package.json +++ b/packages/atomic-react/package.json @@ -1,7 +1,8 @@ { "name": "@coveo/atomic-react", "sideEffects": false, - "version": "3.0.2", + "type": "module", + "version": "3.1.3", "description": "React specific wrapper for the Atomic component library", "repository": { "type": "git", @@ -11,6 +12,7 @@ "scripts": { "build": "nx build", "clean": "rimraf -rf dist", + "build:fixGeneratedImportPaths": "fix-esm-import-path src/components/stencil-generated", "build:bundles:esm": "tsc -p tsconfig.esm.json", "build:bundles:iife-cjs": "rollup --config rollup.config.mjs --bundleConfigAsCjs", "build:bundles": "concurrently \"npm run build:bundles:esm\" \"npm run build:bundles:iife-cjs\"", @@ -19,7 +21,7 @@ "promote:npm:latest": "node ../../scripts/deploy/update-npm-tag.mjs latest", "build:assets": "ncp ../atomic/dist/atomic/assets dist/assets && ncp ../atomic/dist/atomic/lang dist/lang " }, - "main": "./dist/cjs/atomic-react.js", + "main": "./dist/cjs/atomic-react.cjs", "module": "./dist/index.js", "types": "./dist/index.d.ts", "files": [ @@ -28,11 +30,11 @@ "commerce/" ], "dependencies": { - "@coveo/atomic": "3.1.1" + "@coveo/atomic": "3.2.3" }, "devDependencies": { - "@coveo/rollup-plugin-replace-with-ast": "1.0.0", "@coveo/release": "1.0.0", + "@coveo/rollup-plugin-replace-with-ast": "1.0.0", "@rollup/plugin-commonjs": "^25.0.0", "@rollup/plugin-json": "6.1.0", "@rollup/plugin-node-resolve": "^15.0.0", @@ -42,6 +44,7 @@ "@types/node": "20.14.12", "@types/react": "18.3.3", "@types/react-dom": "18.3.0", + "fix-esm-import-path": "1.10.0", "ncp": "2.0.0", "react": "18.3.1", "react-dom": "18.3.1", @@ -49,7 +52,7 @@ "rollup-plugin-polyfill-node": "^0.13.0" }, "peerDependencies": { - "@coveo/headless": "3.0.0", + "@coveo/headless": "3.1.3", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, @@ -60,17 +63,17 @@ ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js", - "require": "./dist/cjs/atomic-react.js" + "require": "./dist/cjs/atomic-react.cjs" }, "./commerce": { "types": "./dist/commerce.index.d.ts", "import": "./dist/commerce.index.js", - "require": "./dist/cjs/commerce/atomic-react.js" + "require": "./dist/cjs/commerce/atomic-react.cjs" }, "./recommendation": { "types": "./dist/recommendation.index.d.ts", "import": "./dist/recommendation.index.js", - "require": "./dist/cjs/recommendation/atomic-react.js" + "require": "./dist/cjs/recommendation/atomic-react.cjs" } } } diff --git a/packages/atomic-react/project.json b/packages/atomic-react/project.json index 5d391a98c5b..5af3ade9955 100644 --- a/packages/atomic-react/project.json +++ b/packages/atomic-react/project.json @@ -7,7 +7,11 @@ "dependsOn": ["^build", "clean"], "executor": "nx:run-commands", "options": { - "commands": ["npm run build:bundles", "npm run build:assets"], + "commands": [ + "npm run build:fixGeneratedImportPaths", + "npm run build:bundles", + "npm run build:assets" + ], "parallel": false, "cwd": "packages/atomic-react" } diff --git a/packages/atomic-react/rollup.config.mjs b/packages/atomic-react/rollup.config.mjs index 20e58942cdd..cc4e9596f95 100644 --- a/packages/atomic-react/rollup.config.mjs +++ b/packages/atomic-react/rollup.config.mjs @@ -52,9 +52,6 @@ const packageMappings = { '@coveo/headless/insight': { cdn: `/headless/${headlessVersion}/insight/headless.esm.js`, }, - '@coveo/headless/product-recommendation': { - cdn: `/headless/${headlessVersion}/product-recommendation/headless.esm.js`, - }, '@coveo/headless/recommendation': { cdn: `/headless/${headlessVersion}/recommendation/headless.esm.js`, }, @@ -97,7 +94,7 @@ const commonExternal = [ /** @returns {import('rollup').OutputOptions} */ const outputCJS = ({useCase}) => ({ - file: `dist/cjs/${useCase}atomic-react.js`, + file: `dist/cjs/${useCase}atomic-react.cjs`, format: 'cjs', }); diff --git a/packages/atomic-react/src/commerce.index.ts b/packages/atomic-react/src/commerce.index.ts index a0c1e37992f..59f141892c8 100644 --- a/packages/atomic-react/src/commerce.index.ts +++ b/packages/atomic-react/src/commerce.index.ts @@ -1 +1 @@ -export * from './components/commerce/index'; +export * from './components/commerce/index.js'; diff --git a/packages/atomic-react/src/components/commerce/CommerceInterfaceWrapper.tsx b/packages/atomic-react/src/components/commerce/CommerceInterfaceWrapper.tsx index d90dba7129d..c11375b142a 100644 --- a/packages/atomic-react/src/components/commerce/CommerceInterfaceWrapper.tsx +++ b/packages/atomic-react/src/components/commerce/CommerceInterfaceWrapper.tsx @@ -1,6 +1,6 @@ import type {JSX, i18n} from '@coveo/atomic'; import React, {useEffect, useRef} from 'react'; -import {AtomicCommerceInterface} from '../stencil-generated/commerce'; +import {AtomicCommerceInterface} from '../stencil-generated/commerce/index.js'; type ExecuteRequest = HTMLAtomicCommerceInterfaceElement['executeFirstRequest']; diff --git a/packages/atomic-react/src/components/commerce/CommerceProductListWrapper.tsx b/packages/atomic-react/src/components/commerce/CommerceProductListWrapper.tsx index 4769ae01562..b8cd37bac9a 100644 --- a/packages/atomic-react/src/components/commerce/CommerceProductListWrapper.tsx +++ b/packages/atomic-react/src/components/commerce/CommerceProductListWrapper.tsx @@ -6,7 +6,7 @@ import {renderToString} from 'react-dom/server'; import { AtomicCommerceProductList, AtomicProductLink, -} from '../stencil-generated/commerce'; +} from '../stencil-generated/commerce/index.js'; interface Template { contentTemplate: JSX.Element; diff --git a/packages/atomic-react/src/components/commerce/CommerceRecommendationListWrapper.tsx b/packages/atomic-react/src/components/commerce/CommerceRecommendationListWrapper.tsx index dd9b5de1d80..ee54bd59c5a 100644 --- a/packages/atomic-react/src/components/commerce/CommerceRecommendationListWrapper.tsx +++ b/packages/atomic-react/src/components/commerce/CommerceRecommendationListWrapper.tsx @@ -6,7 +6,7 @@ import {renderToString} from 'react-dom/server'; import { AtomicCommerceRecommendationList, AtomicProductLink, -} from '../stencil-generated/commerce'; +} from '../stencil-generated/commerce/index.js'; interface Template { contentTemplate: JSX.Element; diff --git a/packages/atomic-react/src/components/commerce/index.ts b/packages/atomic-react/src/components/commerce/index.ts index b05a05fe33a..f19c168d961 100644 --- a/packages/atomic-react/src/components/commerce/index.ts +++ b/packages/atomic-react/src/components/commerce/index.ts @@ -1,8 +1,8 @@ -export * from '../stencil-generated/commerce/index'; +export * from '../stencil-generated/commerce/index.js'; export {CommerceBindings, i18n} from '@coveo/atomic'; // Important: Re-exporting under the same name (eg: "AtomicCommerceInterface") shadows the original component // and should wrap it nicely for users of the library -export {InterfaceWrapper as AtomicCommerceInterface} from './CommerceInterfaceWrapper'; -export {ListWrapper as AtomicCommerceProductList} from './CommerceProductListWrapper'; -export {ListWrapper as AtomicCommerceRecommendationList} from './CommerceRecommendationListWrapper'; +export {InterfaceWrapper as AtomicCommerceInterface} from './CommerceInterfaceWrapper.js'; +export {ListWrapper as AtomicCommerceProductList} from './CommerceProductListWrapper.js'; +export {ListWrapper as AtomicCommerceRecommendationList} from './CommerceRecommendationListWrapper.js'; diff --git a/packages/atomic-react/src/components/recommendation/RecsInterfaceWrapper.tsx b/packages/atomic-react/src/components/recommendation/RecsInterfaceWrapper.tsx index 90978b630ee..b7db822b74a 100644 --- a/packages/atomic-react/src/components/recommendation/RecsInterfaceWrapper.tsx +++ b/packages/atomic-react/src/components/recommendation/RecsInterfaceWrapper.tsx @@ -4,7 +4,7 @@ import { buildRecommendationEngine, } from '@coveo/headless/recommendation'; import React, {useEffect, useRef} from 'react'; -import {AtomicRecsInterface} from '../stencil-generated/search'; +import {AtomicRecsInterface} from '../stencil-generated/search/index.js'; type GetRecommendations = HTMLAtomicRecsInterfaceElement['getRecommendations']; /** diff --git a/packages/atomic-react/src/components/recommendation/RecsListWrapper.tsx b/packages/atomic-react/src/components/recommendation/RecsListWrapper.tsx index 21f610cae81..1cca9001acd 100644 --- a/packages/atomic-react/src/components/recommendation/RecsListWrapper.tsx +++ b/packages/atomic-react/src/components/recommendation/RecsListWrapper.tsx @@ -3,7 +3,10 @@ import type {Result} from '@coveo/headless/recommendation'; import React, {useEffect, useRef} from 'react'; import {createRoot} from 'react-dom/client'; import {renderToString} from 'react-dom/server'; -import {AtomicRecsList, AtomicResultLink} from '../stencil-generated/search'; +import { + AtomicRecsList, + AtomicResultLink, +} from '../stencil-generated/search/index.js'; interface Template { contentTemplate: JSX.Element; diff --git a/packages/atomic-react/src/components/recommendation/index.ts b/packages/atomic-react/src/components/recommendation/index.ts index 6bf52b067d2..f958aeaa3d2 100644 --- a/packages/atomic-react/src/components/recommendation/index.ts +++ b/packages/atomic-react/src/components/recommendation/index.ts @@ -1,7 +1,7 @@ -export * from '../stencil-generated/search'; +export * from '../stencil-generated/search/index.js'; export {RecsBindings, i18n} from '@coveo/atomic'; // Important: Re-exporting under the same name (eg: "AtomicRecsInterface") shadows the original component // and should wrap it nicely for users of the library -export {RecsInterfaceWrapper as AtomicRecsInterface} from './RecsInterfaceWrapper'; -export {RecsListWrapper as AtomicRecsList} from './RecsListWrapper'; +export {RecsInterfaceWrapper as AtomicRecsInterface} from './RecsInterfaceWrapper.js'; +export {RecsListWrapper as AtomicRecsList} from './RecsListWrapper.js'; diff --git a/packages/atomic-react/src/components/search/FoldedResultListWrapper.tsx b/packages/atomic-react/src/components/search/FoldedResultListWrapper.tsx index 1a1ba555200..a67ef7af48f 100644 --- a/packages/atomic-react/src/components/search/FoldedResultListWrapper.tsx +++ b/packages/atomic-react/src/components/search/FoldedResultListWrapper.tsx @@ -3,7 +3,7 @@ import type {FoldedResult} from '@coveo/headless'; import React, {useEffect, useRef} from 'react'; import {createRoot} from 'react-dom/client'; import {renderToString} from 'react-dom/server'; -import {AtomicFoldedResultList} from '../stencil-generated/search'; +import {AtomicFoldedResultList} from '../stencil-generated/search/index.js'; /** * The properties of the AtomicFoldedResultList component diff --git a/packages/atomic-react/src/components/search/ResultListWrapper.tsx b/packages/atomic-react/src/components/search/ResultListWrapper.tsx index 183c1489a04..a678a38ada4 100644 --- a/packages/atomic-react/src/components/search/ResultListWrapper.tsx +++ b/packages/atomic-react/src/components/search/ResultListWrapper.tsx @@ -3,7 +3,10 @@ import type {Result} from '@coveo/headless'; import React, {useEffect, useRef} from 'react'; import {createRoot} from 'react-dom/client'; import {renderToString} from 'react-dom/server'; -import {AtomicResultLink, AtomicResultList} from '../stencil-generated/search'; +import { + AtomicResultLink, + AtomicResultList, +} from '../stencil-generated/search/index.js'; interface Template { contentTemplate: JSX.Element; diff --git a/packages/atomic-react/src/components/search/SearchBoxInstantResultsWrapper.tsx b/packages/atomic-react/src/components/search/SearchBoxInstantResultsWrapper.tsx index b35912589d4..61ee79a7142 100644 --- a/packages/atomic-react/src/components/search/SearchBoxInstantResultsWrapper.tsx +++ b/packages/atomic-react/src/components/search/SearchBoxInstantResultsWrapper.tsx @@ -3,7 +3,7 @@ import type {FoldedResult, Result} from '@coveo/headless'; import React, {useEffect, useRef} from 'react'; import {createRoot} from 'react-dom/client'; import {renderToString} from 'react-dom/server'; -import {AtomicSearchBoxInstantResults} from '../stencil-generated/search'; +import {AtomicSearchBoxInstantResults} from '../stencil-generated/search/index.js'; /** * The properties of the AtomicSearchBoxInstantResults component diff --git a/packages/atomic-react/src/components/search/SearchInterfaceWrapper.tsx b/packages/atomic-react/src/components/search/SearchInterfaceWrapper.tsx index 24be32f5e7a..fe28754930a 100644 --- a/packages/atomic-react/src/components/search/SearchInterfaceWrapper.tsx +++ b/packages/atomic-react/src/components/search/SearchInterfaceWrapper.tsx @@ -4,7 +4,7 @@ import { getSampleSearchEngineConfiguration, } from '@coveo/headless'; import React, {useEffect, useRef} from 'react'; -import {AtomicSearchInterface} from '../stencil-generated/search'; +import {AtomicSearchInterface} from '../stencil-generated/search/index.js'; type ExecuteSearch = HTMLAtomicSearchInterfaceElement['executeFirstSearch']; /** diff --git a/packages/atomic-react/src/components/search/index.ts b/packages/atomic-react/src/components/search/index.ts index 4972d7bb5c2..6f8c73831f7 100644 --- a/packages/atomic-react/src/components/search/index.ts +++ b/packages/atomic-react/src/components/search/index.ts @@ -1,9 +1,9 @@ -export * from '../stencil-generated/search/index'; +export * from '../stencil-generated/search/index.js'; export {Bindings, i18n} from '@coveo/atomic'; // Important: Re-exporting under the same name (eg: "AtomicSearchInterface") shadows the original component // and should wrap it nicely for users of the library -export {SearchInterfaceWrapper as AtomicSearchInterface} from './SearchInterfaceWrapper'; -export {ResultListWrapper as AtomicResultList} from './ResultListWrapper'; -export {FoldedResultListWrapper as AtomicFoldedResultList} from './FoldedResultListWrapper'; -export {SearchBoxInstantResultsWrapper as AtomicSearchBoxInstantResults} from './SearchBoxInstantResultsWrapper'; +export {SearchInterfaceWrapper as AtomicSearchInterface} from './SearchInterfaceWrapper.js'; +export {ResultListWrapper as AtomicResultList} from './ResultListWrapper.js'; +export {FoldedResultListWrapper as AtomicFoldedResultList} from './FoldedResultListWrapper.js'; +export {SearchBoxInstantResultsWrapper as AtomicSearchBoxInstantResults} from './SearchBoxInstantResultsWrapper.js'; diff --git a/packages/atomic-react/src/components/stencil-generated/commerce/index.ts b/packages/atomic-react/src/components/stencil-generated/commerce/index.ts index 36191fb6a57..1d1213dc90c 100644 --- a/packages/atomic-react/src/components/stencil-generated/commerce/index.ts +++ b/packages/atomic-react/src/components/stencil-generated/commerce/index.ts @@ -1,7 +1,7 @@ /* eslint-disable */ /* tslint:disable */ /* auto-generated react proxies */ -import { createReactComponent } from './react-component-lib'; +import { createReactComponent } from './react-component-lib/index.js'; import type { JSX } from '@coveo/atomic'; @@ -36,7 +36,6 @@ export const AtomicCommerceSortDropdown = /*@__PURE__*/createReactComponent('atomic-commerce-text'); export const AtomicCommerceTimeframeFacet = /*@__PURE__*/createReactComponent('atomic-commerce-timeframe-facet'); export const AtomicIcon = /*@__PURE__*/createReactComponent('atomic-icon'); -export const AtomicInsightUserActionsTimeline = /*@__PURE__*/createReactComponent('atomic-insight-user-actions-timeline'); export const AtomicLayoutSection = /*@__PURE__*/createReactComponent('atomic-layout-section'); export const AtomicNumericRange = /*@__PURE__*/createReactComponent('atomic-numeric-range'); export const AtomicProduct = /*@__PURE__*/createReactComponent('atomic-product'); diff --git a/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/createComponent.tsx b/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/createComponent.tsx index 7c7415a29d8..7e1d1ef7dbb 100644 --- a/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/createComponent.tsx +++ b/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/createComponent.tsx @@ -1,6 +1,6 @@ import React, { createElement } from 'react'; -import { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils'; +import { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils/index.js'; export interface HTMLStencilElement extends HTMLElement { componentOnReady(): Promise; diff --git a/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/createOverlayComponent.tsx b/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/createOverlayComponent.tsx index 288c38dd54c..f491c5927c9 100644 --- a/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/createOverlayComponent.tsx +++ b/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/createOverlayComponent.tsx @@ -1,8 +1,8 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import { OverlayEventDetail } from './interfaces'; -import { StencilReactForwardedRef, attachProps, dashToPascalCase, defineCustomElement, setRef } from './utils'; +import { OverlayEventDetail } from './interfaces.js'; +import { StencilReactForwardedRef, attachProps, dashToPascalCase, defineCustomElement, setRef } from './utils/index.js'; interface OverlayElement extends HTMLElement { present: () => Promise; diff --git a/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/index.ts b/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/index.ts index 85e81ad196c..611f53c9483 100644 --- a/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/index.ts +++ b/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/index.ts @@ -1,2 +1,2 @@ -export { createReactComponent } from './createComponent'; -export { createOverlayComponent } from './createOverlayComponent'; +export { createReactComponent } from './createComponent.js'; +export { createOverlayComponent } from './createOverlayComponent.js'; diff --git a/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/utils/attachProps.ts b/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/utils/attachProps.ts index 9a1825f54f3..b67b5f36f08 100644 --- a/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/utils/attachProps.ts +++ b/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/utils/attachProps.ts @@ -1,4 +1,4 @@ -import { camelToDashCase } from './case'; +import { camelToDashCase } from './case.js'; export const attachProps = (node: HTMLElement, newProps: any, oldProps: any = {}) => { // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first diff --git a/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/utils/index.tsx b/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/utils/index.tsx index a66bd02de76..9ed0c12fd49 100644 --- a/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/utils/index.tsx +++ b/packages/atomic-react/src/components/stencil-generated/commerce/react-component-lib/utils/index.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import type { StyleReactProps } from '../interfaces'; +import type { StyleReactProps } from '../interfaces.js'; export type StencilReactExternalProps = PropType & Omit, 'style'> & @@ -46,5 +46,5 @@ export const defineCustomElement = (tagName: string, customElement: any) => { } }; -export * from './attachProps'; -export * from './case'; +export * from './attachProps.js'; +export * from './case.js'; diff --git a/packages/atomic-react/src/components/stencil-generated/search/index.ts b/packages/atomic-react/src/components/stencil-generated/search/index.ts index 7e8c8dcb455..a70b162825e 100644 --- a/packages/atomic-react/src/components/stencil-generated/search/index.ts +++ b/packages/atomic-react/src/components/stencil-generated/search/index.ts @@ -1,7 +1,7 @@ /* eslint-disable */ /* tslint:disable */ /* auto-generated react proxies */ -import { createReactComponent } from './react-component-lib'; +import { createReactComponent } from './react-component-lib/index.js'; import type { JSX } from '@coveo/atomic'; @@ -26,7 +26,6 @@ export const AtomicFormatUnit = /*@__PURE__*/createReactComponent('atomic-generated-answer'); export const AtomicHtml = /*@__PURE__*/createReactComponent('atomic-html'); export const AtomicIcon = /*@__PURE__*/createReactComponent('atomic-icon'); -export const AtomicInsightUserActionsTimeline = /*@__PURE__*/createReactComponent('atomic-insight-user-actions-timeline'); export const AtomicLayoutSection = /*@__PURE__*/createReactComponent('atomic-layout-section'); export const AtomicLoadMoreResults = /*@__PURE__*/createReactComponent('atomic-load-more-results'); export const AtomicNoResults = /*@__PURE__*/createReactComponent('atomic-no-results'); diff --git a/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/createComponent.tsx b/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/createComponent.tsx index 7c7415a29d8..7e1d1ef7dbb 100644 --- a/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/createComponent.tsx +++ b/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/createComponent.tsx @@ -1,6 +1,6 @@ import React, { createElement } from 'react'; -import { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils'; +import { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils/index.js'; export interface HTMLStencilElement extends HTMLElement { componentOnReady(): Promise; diff --git a/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/createOverlayComponent.tsx b/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/createOverlayComponent.tsx index 288c38dd54c..f491c5927c9 100644 --- a/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/createOverlayComponent.tsx +++ b/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/createOverlayComponent.tsx @@ -1,8 +1,8 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import { OverlayEventDetail } from './interfaces'; -import { StencilReactForwardedRef, attachProps, dashToPascalCase, defineCustomElement, setRef } from './utils'; +import { OverlayEventDetail } from './interfaces.js'; +import { StencilReactForwardedRef, attachProps, dashToPascalCase, defineCustomElement, setRef } from './utils/index.js'; interface OverlayElement extends HTMLElement { present: () => Promise; diff --git a/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/index.ts b/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/index.ts index 85e81ad196c..611f53c9483 100644 --- a/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/index.ts +++ b/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/index.ts @@ -1,2 +1,2 @@ -export { createReactComponent } from './createComponent'; -export { createOverlayComponent } from './createOverlayComponent'; +export { createReactComponent } from './createComponent.js'; +export { createOverlayComponent } from './createOverlayComponent.js'; diff --git a/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/utils/attachProps.ts b/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/utils/attachProps.ts index 9a1825f54f3..b67b5f36f08 100644 --- a/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/utils/attachProps.ts +++ b/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/utils/attachProps.ts @@ -1,4 +1,4 @@ -import { camelToDashCase } from './case'; +import { camelToDashCase } from './case.js'; export const attachProps = (node: HTMLElement, newProps: any, oldProps: any = {}) => { // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first diff --git a/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/utils/index.tsx b/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/utils/index.tsx index a66bd02de76..9ed0c12fd49 100644 --- a/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/utils/index.tsx +++ b/packages/atomic-react/src/components/stencil-generated/search/react-component-lib/utils/index.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import type { StyleReactProps } from '../interfaces'; +import type { StyleReactProps } from '../interfaces.js'; export type StencilReactExternalProps = PropType & Omit, 'style'> & @@ -46,5 +46,5 @@ export const defineCustomElement = (tagName: string, customElement: any) => { } }; -export * from './attachProps'; -export * from './case'; +export * from './attachProps.js'; +export * from './case.js'; diff --git a/packages/atomic-react/src/index.ts b/packages/atomic-react/src/index.ts index 6ff5bae67ba..e47c98de44d 100644 --- a/packages/atomic-react/src/index.ts +++ b/packages/atomic-react/src/index.ts @@ -1 +1 @@ -export * from './components/search'; +export * from './components/search/index.js'; diff --git a/packages/atomic-react/src/recommendation.index.ts b/packages/atomic-react/src/recommendation.index.ts index 2455d463adc..277cd823808 100644 --- a/packages/atomic-react/src/recommendation.index.ts +++ b/packages/atomic-react/src/recommendation.index.ts @@ -1 +1 @@ -export * from './components/recommendation'; +export * from './components/recommendation/index.js'; diff --git a/packages/atomic/.eslintrc.js b/packages/atomic/.eslintrc.cjs similarity index 100% rename from packages/atomic/.eslintrc.js rename to packages/atomic/.eslintrc.cjs diff --git a/packages/atomic/.storybook/main.mts b/packages/atomic/.storybook/main.mts index 5d0e5e60ef5..91c3af17e60 100644 --- a/packages/atomic/.storybook/main.mts +++ b/packages/atomic/.storybook/main.mts @@ -1,14 +1,45 @@ import {nxViteTsPaths} from '@nx/vite/plugins/nx-tsconfig-paths.plugin'; import type {StorybookConfig} from '@storybook/web-components-vite'; -import path from 'node:path'; +import path from 'path'; +import {PluginImpl} from 'rollup'; import {mergeConfig} from 'vite'; -import headlessJson from '../../../packages/headless/package.json'; +import {generateExternalPackageMappings} from '../scripts/externalPackageMappings'; +const externalizeDependencies: PluginImpl = () => { + return { + name: 'externalize-dependencies', + enforce: 'pre', + resolveId(source, _importer, _options) { + if (/^\/(headless|bueno)/.test(source)) { + return false; + } + + const packageMappings = generateExternalPackageMappings(__dirname); + const packageMapping = packageMappings[source]; + + if (packageMapping) { + if (!isCDN) { + return false; + } + + return { + id: packageMapping.cdn, + external: 'absolute', + }; + } + + return null; + }, + }; +}; const isCDN = process.env.DEPLOYMENT_ENVIRONMENT === 'CDN'; const config: StorybookConfig = { stories: ['../src/**/*.new.stories.@(js|jsx|ts|tsx|mdx)'], - staticDirs: [{from: '../dist/atomic', to: './assets'}], + staticDirs: [ + {from: '../dist/atomic', to: './assets'}, + {from: '../dist/atomic/lang', to: './lang'}, + ], addons: [ '@storybook/addon-essentials', '@storybook/addon-interactions', @@ -24,87 +55,28 @@ const config: StorybookConfig = { mergeConfig(config, { plugins: [ nxViteTsPaths(), + resolveStorybookUtils(), configType === 'PRODUCTION' && isCDN && externalizeDependencies(), ], }), }; -function externalizeDependencies() { +const resolveStorybookUtils: PluginImpl = () => { return { - name: 'externalize-dependencies', - enforce: 'pre', - resolveId: (id: string) => { - if (id.startsWith('/headless')) { - return false; - } - if (packageMappings[id]) { - if (!isCDN) { - return false; - } - - return { - id: packageMappings[id].cdn, - external: 'absolute', - }; + name: 'resolve-storybook-utils', + async resolveId(source: string, importer, options) { + if (source.startsWith('@coveo/atomic-storybook-utils')) { + return this.resolve( + source.replace( + '@coveo/atomic-storybook-utils', + path.resolve(__dirname, '../storybookUtils') + ), + importer, + options + ); } }, }; -} - -let headlessVersion: string; -if (isCDN) { - console.log('Building for CDN'); - headlessVersion = 'v' + headlessJson.version; -} - -const packageMappings: {[key: string]: {devWatch: string; cdn: string}} = { - '@coveo/headless/commerce': { - devWatch: path.resolve( - __dirname, - '../src/external-builds/commerce/headless.esm.js' - ), - cdn: `/headless/${headlessVersion}/commerce/headless.esm.js`, - }, - '@coveo/headless/insight': { - devWatch: path.resolve( - __dirname, - '../src/external-builds/insight/headless.esm.js' - ), - cdn: `/headless/${headlessVersion}/insight/headless.esm.js`, - }, - '@coveo/headless/product-recommendation': { - devWatch: path.resolve( - __dirname, - '../src/external-builds/product-recommendation/headless.esm.js' - ), - cdn: `/headless/${headlessVersion}/product-recommendation/headless.esm.js`, - }, - '@coveo/headless/recommendation': { - devWatch: path.resolve( - __dirname, - '../src/external-builds/recommendation/headless.esm.js' - ), - cdn: `/headless/${headlessVersion}/recommendation/headless.esm.js`, - }, - '@coveo/headless/case-assist': { - devWatch: path.resolve( - __dirname, - '../src/external-builds/case-assist/headless.esm.js' - ), - cdn: `/headless/${headlessVersion}/case-assist/headless.esm.js`, - }, - '@coveo/headless': { - devWatch: path.resolve(__dirname, '../src/external-builds/headless.esm.js'), - cdn: `/headless/${headlessVersion}/headless.esm.js`, - }, - /* '@coveo/bueno': { - devWatch: path.resolve(__dirname, './src/external-builds/bueno.esm.js'), - cdn: `/bueno/${headlessVersion}/bueno.esm.js`, - }, */ }; export default config; - -// To customize your Vite configuration you can use the viteFinal field. -// Check https://storybook.js.org/docs/react/builders/vite#configuration -// and https://nx.dev/recipes/storybook/custom-builder-configs diff --git a/packages/atomic/.storybook/preview.ts b/packages/atomic/.storybook/preview.ts index 91e4a18d94f..c34f863eca3 100644 --- a/packages/atomic/.storybook/preview.ts +++ b/packages/atomic/.storybook/preview.ts @@ -1,7 +1,7 @@ -import '@coveo/atomic/dist/atomic/atomic.esm.js'; -import '@coveo/atomic/dist/atomic/themes/coveo.css'; +import '@coveo/atomic/themes/coveo.css'; import {setCustomElementsManifest} from '@storybook/web-components'; import customElements from '../custom-elements.json'; +import '../dist/atomic/atomic.esm.js'; setCustomElementsManifest(customElements); diff --git a/packages/atomic/CHANGELOG.md b/packages/atomic/CHANGELOG.md index 51d198be6ab..dc1b64a16ac 100644 --- a/packages/atomic/CHANGELOG.md +++ b/packages/atomic/CHANGELOG.md @@ -1,3 +1,25 @@ +## 3.2.3 (2024-09-25) + +- chore(atomic): fix tsconfig resolution for the e2e folders (#4462) ([2a037ff](https://github.com/coveo/ui-kit/commits/2a037ff)), closes [#4462](https://github.com/coveo/ui-kit/issues/4462) + +## 3.2.1 (2024-09-24) + +- docs: document headless, atomic, and atomic-react entry points (#4455) ([3853bdc](https://github.com/coveo/ui-kit/commits/3853bdc)), closes [#4455](https://github.com/coveo/ui-kit/issues/4455) +- fix: use correct pjson for bueno version replacement (#4454) ([bab0883](https://github.com/coveo/ui-kit/commits/bab0883)), closes [#4454](https://github.com/coveo/ui-kit/issues/4454) + +## 3.2.0 (2024-09-24) + +- chore(atomic, headless): make bueno external (#4433) ([e1f7f2d](https://github.com/coveo/ui-kit/commits/e1f7f2d)), closes [#4433](https://github.com/coveo/ui-kit/issues/4433) +- chore(headless,atomic): add type "module" to atomic, atomic-react and headless (#4442) ([21896c3](https://github.com/coveo/ui-kit/commits/21896c3)), closes [#4442](https://github.com/coveo/ui-kit/issues/4442) [/github.com/coveo/ui-kit/pull/4449/files#diff-75f80b97846615f5b074710648b8191f74aa4f00fd1536c45bc344b284ca8e87](https://github.com//github.com/coveo/ui-kit/pull/4449/files/issues/diff-75f80b97846615f5b074710648b8191f74aa4f00fd1536c45bc344b284ca8e87) +- feat: add answer configuration id to atomic-insight-generated-answer (#4451) ([6b7c2bd](https://github.com/coveo/ui-kit/commits/6b7c2bd)), closes [#4451](https://github.com/coveo/ui-kit/issues/4451) +- feat(atomic): add tab support for atomic-generated-answer (#4285) ([744fb61](https://github.com/coveo/ui-kit/commits/744fb61)), closes [#4285](https://github.com/coveo/ui-kit/issues/4285) +- feat(atomic): atomic insight user actions toggle component created (#4298) ([bad4ff5](https://github.com/coveo/ui-kit/commits/bad4ff5)), closes [#4298](https://github.com/coveo/ui-kit/issues/4298) +- test(atomic): add tests for atomic-product-rating (#4440) ([498beff](https://github.com/coveo/ui-kit/commits/498beff)), closes [#4440](https://github.com/coveo/ui-kit/issues/4440) +- test(atomic): add tests for product link (#4203) ([b62f3c7](https://github.com/coveo/ui-kit/commits/b62f3c7)), closes [#4203](https://github.com/coveo/ui-kit/issues/4203) +- fix(atomic): bad search box layout when removing textarea prop (#4435) ([70d9378](https://github.com/coveo/ui-kit/commits/70d9378)), closes [#4435](https://github.com/coveo/ui-kit/issues/4435) +- fix(atomic): enable/disable facet based on tab with updateActiveTab action (#4313) ([08fe92a](https://github.com/coveo/ui-kit/commits/08fe92a)), closes [#4313](https://github.com/coveo/ui-kit/issues/4313) [#4311](https://github.com/coveo/ui-kit/issues/4311) +- fix(atomic): remove unnecessary css (#4397) ([1ee2897](https://github.com/coveo/ui-kit/commits/1ee2897)), closes [#4397](https://github.com/coveo/ui-kit/issues/4397) + ## 3.1.1 (2024-09-18) - chore: ensure absolute paths are not resolved as local when building for the CDN (#4434) ([b9ee6e1](https://github.com/coveo/ui-kit/commits/b9ee6e1)), closes [#4434](https://github.com/coveo/ui-kit/issues/4434) diff --git a/packages/atomic/README.md b/packages/atomic/README.md index 61813c5622a..c2334b43922 100644 --- a/packages/atomic/README.md +++ b/packages/atomic/README.md @@ -7,6 +7,16 @@ A web-component library for building modern UIs interfacing with the Coveo platf Using the library: [Coveo Atomic Library Official Documentation](https://docs.coveo.com/en/atomic/latest/). +## Entry points + +The `@coveo/atomic` package exposes the following entry points: + +- `@coveo/atomic`: exports various types and utilities used by Coveo Atomic. +- `@coveo/atomic/loader`: exports the Coveo Atomic components types, as well as the `defineCustomElements` and `setNonce` utilities. +- `@coveo/atomic/themes`: exports the sample Coveo Atomic themes. +- `@coveo/atomic/assets`: exports the SVG icons used by Coveo Atomic. +- `@coveo/atomic/lang`: exports the localization files used by Coveo Atomic. + ## Getting Started Once you have cloned the repo, follow the instructions in the top-level [README.md](../../README.md) to install dependencies and link packages. diff --git a/packages/atomic/cypress-hsp.config.ts b/packages/atomic/cypress-hsp.config.mjs similarity index 88% rename from packages/atomic/cypress-hsp.config.ts rename to packages/atomic/cypress-hsp.config.mjs index 7700f6e7a69..3e11bf69477 100644 --- a/packages/atomic/cypress-hsp.config.ts +++ b/packages/atomic/cypress-hsp.config.mjs @@ -1,4 +1,5 @@ import {defineConfig} from 'cypress'; +import plugin from './cypress/plugins/index.js'; export default defineConfig({ projectId: '5ph2j4', @@ -21,7 +22,7 @@ export default defineConfig({ // We've imported your old cypress plugins here. // You may want to clean this up later by importing these. setupNodeEvents(on, config) { - return require('./cypress/plugins/index.js')(on, config); + return plugin(on, config); }, baseUrl: 'http://localhost:3333', specPattern: 'cypress/integration-hsp/**/*.cypress.ts', diff --git a/packages/atomic/cypress-insight-panel.config.ts b/packages/atomic/cypress-insight-panel.config.mjs similarity index 89% rename from packages/atomic/cypress-insight-panel.config.ts rename to packages/atomic/cypress-insight-panel.config.mjs index 7e50c0c0343..308861318ef 100644 --- a/packages/atomic/cypress-insight-panel.config.ts +++ b/packages/atomic/cypress-insight-panel.config.mjs @@ -1,4 +1,5 @@ import {defineConfig} from 'cypress'; +import plugin from './cypress/plugins/index.js'; export default defineConfig({ projectId: '5ph2j4', @@ -21,7 +22,7 @@ export default defineConfig({ // We've imported your old cypress plugins here. // You may want to clean this up later by importing these. setupNodeEvents(on, config) { - return require('./cypress/plugins/index.js')(on, config); + return plugin(on, config); }, baseUrl: 'http://localhost:3333', specPattern: 'cypress/integration-insight-panel/**/*.cypress.ts', diff --git a/packages/atomic/cypress-screenshots.config.ts b/packages/atomic/cypress-screenshots.config.mjs similarity index 89% rename from packages/atomic/cypress-screenshots.config.ts rename to packages/atomic/cypress-screenshots.config.mjs index 675813955a5..b026a1183fb 100644 --- a/packages/atomic/cypress-screenshots.config.ts +++ b/packages/atomic/cypress-screenshots.config.mjs @@ -1,4 +1,5 @@ import {defineConfig} from 'cypress'; +import plugin from './cypress/plugins/index.js'; export default defineConfig({ projectId: '5ph2j4', @@ -21,7 +22,7 @@ export default defineConfig({ // We've imported your old cypress plugins here. // You may want to clean this up later by importing these. setupNodeEvents(on, config) { - return require('./cypress/plugins/index.js')(on, config); + return plugin(on, config); }, baseUrl: 'http://localhost:3333', specPattern: 'cypress/integration-screenshots/**/*.cypress.ts', diff --git a/packages/atomic/cypress.config.ts b/packages/atomic/cypress.config.mjs similarity index 88% rename from packages/atomic/cypress.config.ts rename to packages/atomic/cypress.config.mjs index 31fc03d189f..4f8e8844f4f 100644 --- a/packages/atomic/cypress.config.ts +++ b/packages/atomic/cypress.config.mjs @@ -1,4 +1,5 @@ import {defineConfig} from 'cypress'; +import plugin from './cypress/plugins/index.js'; export default defineConfig({ projectId: '5ph2j4', @@ -21,7 +22,7 @@ export default defineConfig({ // We've imported your old cypress plugins here. // You may want to clean this up later by importing these. setupNodeEvents(on, config) { - return require('./cypress/plugins/index.js')(on, config); + return plugin(on, config); }, baseUrl: 'http://localhost:3333', specPattern: 'cypress/e2e/**/*.cypress.ts', diff --git a/packages/atomic/cypress/e2e/external.cypress.ts b/packages/atomic/cypress/e2e/external.cypress.ts deleted file mode 100644 index 96f5508e53a..00000000000 --- a/packages/atomic/cypress/e2e/external.cypress.ts +++ /dev/null @@ -1,40 +0,0 @@ -import {RouteAlias, setupIntercept} from '../fixtures/fixture-common'; - -// TODO: https://coveord.atlassian.net/browse/KIT-3540 - rewrite in playwright -describe.skip('External Test Suite', () => { - describe('when modifying state of a component (search box) that is a child of an atomic-external component', () => { - beforeEach(() => { - setupIntercept(); - cy.visit('examples/external.html'); - cy.wait(RouteAlias.UA); - cy.wait(RouteAlias.UA); - - cy.get('atomic-external > atomic-search-box') - .shadow() - .find('[part="textarea"]') - .type('hello{enter}'); - cy.wait(RouteAlias.UA); - }); - - it("other components' state under the same atomic-external should be affected", () => { - cy.get('atomic-external > atomic-query-summary') - .shadow() - .invoke('text') - .should('contain', 'hello'); - }); - - it("other components' state under the linked atomic-search-interface should be affected", () => { - cy.get('atomic-search-interface#interface-2 > atomic-query-summary') - .shadow() - .invoke('text') - .should('contain', 'hello'); - }); - - it("other components' state under a different atomic-search-interface should not be affected", () => { - cy.get('atomic-search-interface#interface-1 > atomic-query-summary') - .shadow() - .invoke('text') - .should('not.contain', 'hello'); - }); - }); -}); diff --git a/packages/atomic/cypress/e2e/recommendations/recs-interface-utils.ts b/packages/atomic/cypress/e2e/recommendations/recs-interface-utils.ts deleted file mode 100644 index 359c58fac7a..00000000000 --- a/packages/atomic/cypress/e2e/recommendations/recs-interface-utils.ts +++ /dev/null @@ -1,19 +0,0 @@ -import {RecsInterface} from '../../fixtures/test-recs-fixture'; - -export function getRecsInterface(cb: (searchInterface: RecsInterface) => void) { - return cy.get('atomic-recs-interface').then(($el) => { - cb($el.get(0) as RecsInterface); - }); -} - -export function setLanguage(lang: string) { - return getRecsInterface((recsInterface) => { - recsInterface.language = lang; - }); -} - -export function getRecommendations() { - return getRecsInterface((recsInterface) => { - recsInterface.getRecommendations(); - }); -} diff --git a/packages/atomic/cypress/e2e/recommendations/recs-interface.cypress.ts b/packages/atomic/cypress/e2e/recommendations/recs-interface.cypress.ts deleted file mode 100644 index 287b88c548c..00000000000 --- a/packages/atomic/cypress/e2e/recommendations/recs-interface.cypress.ts +++ /dev/null @@ -1,91 +0,0 @@ -import {TestRecsFixture} from '../../fixtures/test-recs-fixture'; -import { - assertConsoleError, - assertConsoleErrorMessage, -} from '../common-assertions'; -import {setLanguage, getRecommendations} from './recs-interface-utils'; - -// TODO: https://coveord.atlassian.net/browse/KIT-3540 - rewrite in playwright -describe.skip('Recs Interface Component', () => { - const engineError = - 'You have to call "initialize" on the atomic-recs-interface component before modifying the props or calling other public methods.'; - - describe('before being initialized', () => { - beforeEach(() => { - new TestRecsFixture().withoutInterfaceInitialization().init(); - }); - - describe('when calling "getRecommendations"', () => { - beforeEach(() => { - getRecommendations(); - }); - assertConsoleErrorMessage(engineError); - }); - - describe('when changing a prop', () => { - beforeEach(() => { - cy.wait(300); - setLanguage('fr'); - }); - assertConsoleErrorMessage(engineError); - }); - }); - - describe('when being initialized', () => { - beforeEach(() => { - new TestRecsFixture().withoutGetRecommendations().init(); - }); - - assertConsoleError(false); - }); - - function verifyLanguageIntercepts(language: string) { - it('should set locale for search request', (done) => { - cy.wait(TestRecsFixture.interceptAliases.Search).then((intercept) => { - expect(intercept.request.body.locale).to.be.eq(language); - done(); - }); - }); - - it('should set language for analytics request', (done) => { - cy.wait(TestRecsFixture.interceptAliases.UA).then((intercept) => { - const analyticsBody = intercept.request.body; - expect(analyticsBody).to.have.property('language', language); - done(); - }); - }); - } - - describe('initially setting language', () => { - const language = 'fr'; - beforeEach(() => { - new TestRecsFixture() - .withLanguage(language) - .withoutFirstIntercept() - .init(); - }); - - verifyLanguageIntercepts(language); - }); - - describe('updating the language after initialization', () => { - const language = 'fr'; - beforeEach(() => { - new TestRecsFixture().init(); - setLanguage('fr'); - getRecommendations(); - }); - - verifyLanguageIntercepts(language); - }); - - describe('without analytics', () => { - beforeEach(() => { - new TestRecsFixture().withoutAnalytics().init(); - }); - - it('should not call the analytics server', () => { - cy.shouldBeCalled(TestRecsFixture.interceptAliases.UA, 0); - }); - }); -}); diff --git a/packages/atomic/cypress/e2e/recommendations/recs-list-assertions.ts b/packages/atomic/cypress/e2e/recommendations/recs-list-assertions.ts deleted file mode 100644 index 2029c67e7ad..00000000000 --- a/packages/atomic/cypress/e2e/recommendations/recs-list-assertions.ts +++ /dev/null @@ -1,30 +0,0 @@ -import {RecsSelectors} from './recs-list-selectors'; - -export function assertRendersRecommendations(numberOfRecs: number) { - RecsSelectors.result().should('have.length', numberOfRecs).and('be.visible'); -} - -export function assertRendersPlaceholders(numberOfRecs: number) { - RecsSelectors.placeholder() - .should('have.length', numberOfRecs) - .and('be.visible'); -} - -export function assertRendersIndicators(numberOfPages: number) { - RecsSelectors.indicator() - .should('have.length', numberOfPages) - .and('be.visible'); -} - -export function assertIndicatorsActiveAtIndex(index: number) { - RecsSelectors.indicator() - .eq(index) - .should('have.attr', 'part') - .then((part) => { - expect(part).to.contain('active-indicator'); - }); -} - -export function assertFirstRecommendationsContainsText(text: string) { - RecsSelectors.firstResult().should('contain.text', text); -} diff --git a/packages/atomic/cypress/e2e/recommendations/recs-list-selectors.ts b/packages/atomic/cypress/e2e/recommendations/recs-list-selectors.ts deleted file mode 100644 index e63c844592e..00000000000 --- a/packages/atomic/cypress/e2e/recommendations/recs-list-selectors.ts +++ /dev/null @@ -1,14 +0,0 @@ -export const recsListComponent = 'atomic-recs-list'; -export const resultPlaceholderComponent = 'atomic-result-placeholder'; -export const resultTemplateComponent = 'atomic-recs-result-template'; -export const resultComponent = 'atomic-recs-result'; - -export const RecsSelectors = { - shadow: () => cy.get(recsListComponent).shadow(), - placeholder: () => RecsSelectors.shadow().find(resultPlaceholderComponent), - result: () => RecsSelectors.shadow().find(resultComponent), - indicator: () => RecsSelectors.shadow().find('[part~="indicator"]'), - firstResult: () => RecsSelectors.result().first().shadow(), - nextButton: () => RecsSelectors.shadow().find('[part="next-button"]'), - previousButton: () => RecsSelectors.shadow().find('[part="previous-button"]'), -}; diff --git a/packages/atomic/cypress/e2e/recommendations/recs-list.cypress.ts b/packages/atomic/cypress/e2e/recommendations/recs-list.cypress.ts deleted file mode 100644 index 64d7da7be40..00000000000 --- a/packages/atomic/cypress/e2e/recommendations/recs-list.cypress.ts +++ /dev/null @@ -1,158 +0,0 @@ -import {generateComponentHTML} from '../../fixtures/fixture-common'; -import {TestRecsFixture} from '../../fixtures/test-recs-fixture'; -import * as CommonAssertions from '../common-assertions'; -import {buildTemplateWithSections} from '../result-list/result-list-actions'; -import {withAnySectionnableResultList} from '../result-list/result-list-utils'; -import * as RecsAssertions from './recs-list-assertions'; -import { - recsListComponent, - resultTemplateComponent, - RecsSelectors, -} from './recs-list-selectors'; - -export const addRecsList = - (props = {}, template?: HTMLElement) => - (env: TestRecsFixture) => { - const recsList = generateComponentHTML(recsListComponent, props); - if (template) { - recsList.appendChild(template); - } - env.withElement(recsList); - }; - -const numberOfRecs = 3; -const numberOfRecsPerPage = 1; - -// TODO: https://coveord.atlassian.net/browse/KIT-3540 - rewrite in playwright -describe.skip('Recs Interface Component', () => { - describe('before recommendation have loaded', () => { - beforeEach(() => { - new TestRecsFixture() - .withoutGetRecommendations() - .with(addRecsList({'number-of-recommendations': numberOfRecs})) - .init(); - }); - - it('verify accessibility and placeholders', () => { - CommonAssertions.assertAccessibility(); - RecsAssertions.assertRendersPlaceholders(numberOfRecs); - }); - }); - - describe('after recommendation have loaded', () => { - beforeEach(() => { - new TestRecsFixture() - .with(addRecsList({'number-of-recommendations': numberOfRecs})) - .init(); - }); - - it('verify accessibility and recommendations', () => { - CommonAssertions.assertConsoleError(false); - CommonAssertions.assertAccessibility(); - RecsAssertions.assertRendersRecommendations(numberOfRecs); - }); - }); - - describe('with a full result template', () => { - function generateSimpleTextElement() { - const element = generateComponentHTML('span'); - element.innerText = - 'I will not use meaningless placeholder text for testing'; - return element; - } - beforeEach(() => { - new TestRecsFixture() - .with( - addRecsList( - {'number-of-recommendations': numberOfRecs}, - buildTemplateWithSections( - { - visual: generateSimpleTextElement(), - badges: generateSimpleTextElement(), - actions: generateSimpleTextElement(), - title: generateSimpleTextElement(), - titleMetadata: generateSimpleTextElement(), - emphasized: generateSimpleTextElement(), - excerpt: generateSimpleTextElement(), - bottomMetadata: generateSimpleTextElement(), - }, - {}, - resultTemplateComponent - ) - ) - ) - .init(); - }); - withAnySectionnableResultList( - () => { - CommonAssertions.assertAccessibility(recsListComponent); - }, - { - componentTag: recsListComponent, - densities: ['normal'], - imageSizes: ['icon', 'small'], - useBeforeEach: true, - } - ); - }); - - describe('with a unloaded carousel', () => { - beforeEach(() => { - // Setup Carousel - new TestRecsFixture() - .withoutGetRecommendations() - .with( - addRecsList({ - 'number-of-recommendations': numberOfRecs, - 'number-of-recommendations-per-page': numberOfRecsPerPage, - }) - ) - .init(); - }); - it('verify placeholders', () => { - RecsAssertions.assertRendersPlaceholders(numberOfRecsPerPage); - }); - }); - - describe('with a loaded carousel', () => { - beforeEach(() => { - new TestRecsFixture() - .with( - addRecsList({ - 'number-of-recommendations': numberOfRecs, - 'number-of-recommendations-per-page': numberOfRecsPerPage, - }) - ) - .withCustomResponse((response) => { - response.results.forEach((result, index) => { - result.title = `${index}`; - }); - return response; - }) - .init(); - }); - - it('verify rendering and going forward/backward', () => { - CommonAssertions.assertConsoleError(false); - CommonAssertions.assertAccessibility(); - RecsAssertions.assertRendersIndicators( - numberOfRecs / numberOfRecsPerPage - ); - RecsAssertions.assertIndicatorsActiveAtIndex(0); - RecsAssertions.assertFirstRecommendationsContainsText('0'); - // Going forward - RecsSelectors.nextButton().click(); - RecsAssertions.assertIndicatorsActiveAtIndex(1); - RecsAssertions.assertFirstRecommendationsContainsText('1'); - // Going backward full loop - RecsSelectors.previousButton().click(); - RecsSelectors.previousButton().click(); - RecsAssertions.assertIndicatorsActiveAtIndex(2); - RecsAssertions.assertFirstRecommendationsContainsText('2'); - // Going forward full loop - RecsSelectors.nextButton().click(); - RecsAssertions.assertIndicatorsActiveAtIndex(0); - RecsAssertions.assertFirstRecommendationsContainsText('0'); - }); - }); -}); diff --git a/packages/atomic/cypress/plugins/index.js b/packages/atomic/cypress/plugins/index.js index f02a8039cb4..1c103079a47 100644 --- a/packages/atomic/cypress/plugins/index.js +++ b/packages/atomic/cypress/plugins/index.js @@ -1,4 +1,4 @@ -const cypressSplit = require('cypress-split'); +import cypressSplit from 'cypress-split'; /// // *********************************************************** @@ -17,7 +17,7 @@ const cypressSplit = require('cypress-split'); /** * @type {Cypress.PluginConfig} */ -module.exports = (on, config) => { +export default (on, config) => { cypressSplit(on, config); // `on` is used to hook into various events Cypress emits // `config` is the resolved Cypress config diff --git a/packages/atomic/jest/setup.js b/packages/atomic/jest/setup.cjs similarity index 100% rename from packages/atomic/jest/setup.js rename to packages/atomic/jest/setup.cjs diff --git a/packages/atomic/package.json b/packages/atomic/package.json index 31a6db524c7..41f2232b7de 100644 --- a/packages/atomic/package.json +++ b/packages/atomic/package.json @@ -1,6 +1,7 @@ { "name": "@coveo/atomic", - "version": "3.1.1", + "type": "module", + "version": "3.2.3", "description": "A web-component library for building modern UIs interfacing with the Coveo platform", "homepage": "https://docs.coveo.com/en/atomic/latest/", "repository": { @@ -10,21 +11,39 @@ }, "main": "dist/index.cjs.js", "module": "dist/index.js", - "es2015": "dist/esm/index.mjs", - "es2017": "dist/esm/index.mjs", "types": "dist/types/index.d.ts", - "collection": "collection-manifest.json", - "collection:main": "dist/index.js", - "unpkg": "dist/atomic/atomic.esm.js", + "exports": { + "./loader": { + "types": "./loader/index.d.ts", + "import": "./loader/index.js", + "require": "./loader/index.cjs.js" + }, + ".": { + "types": "./dist/types/index.d.ts", + "import": "./dist/index.js", + "require": "./dist/index.cjs.js" + }, + "./themes/*": { + "import": "./dist/atomic/themes/*", + "require": "./dist/atomic/themes/*" + }, + "./assets/*": { + "import": "./dist/atomic/assets/*", + "require": "./dist/atomic/assets/*" + }, + "./lang/*": { + "import": "./dist/atomic/lang/*", + "require": "./dist/atomic/lang/*" + } + }, "files": [ "dist/", - "loader/", "docs/", "licenses/", - "collection-manifest.json" + "loader/" ], "scripts": { - "clean": "rimraf -rf dist/*", + "clean": "rimraf -rf dist/* dist-storybook/* www/* docs/* loader/* playwright-report/*", "build": "nx build", "build:locales": "npx nx build:locales atomic", "start": "nx dev atomic", @@ -34,21 +53,21 @@ "e2e": "cypress run --browser chrome", "e2e:firefox": "cypress run --browser firefox", "e2e:watch": "cypress open --browser chrome --e2e", - "e2e:hsp": "cypress run --config-file cypress-hsp.config.ts --browser chrome", - "e2e:hsp:firefox": "cypress run --config-file cypress-hsp.config.ts --browser firefox", - "e2e:hsp:watch": "cypress open --config-file cypress-hsp.config.ts", - "e2e:snapshots": "cypress run --config-file cypress-screenshots.config.ts --browser chrome", - "e2e:snapshots:watch": "cypress open --config-file cypress-screenshots.config.ts --browser chrome", - "e2e:insight": "cypress run --config-file cypress-insight-panel.config.ts --browser chrome", - "e2e:insight:watch": "cypress open --config-file cypress-insight-panel.config.ts --browser chrome", + "e2e:hsp": "cypress run --config-file cypress-hsp.config.mjs --browser chrome", + "e2e:hsp:firefox": "cypress run --config-file cypress-hsp.config.mjs --browser firefox", + "e2e:hsp:watch": "cypress open --config-file cypress-hsp.config.mjs", + "e2e:snapshots": "cypress run --config-file cypress-screenshots.config.mjs --browser chrome", + "e2e:snapshots:watch": "cypress open --config-file cypress-screenshots.config.mjs --browser chrome", + "e2e:insight": "cypress run --config-file cypress-insight-panel.config.mjs --browser chrome", + "e2e:insight:watch": "cypress open --config-file cypress-insight-panel.config.mjs --browser chrome", "publish:npm": "npm run-script -w=@coveo/release npm-publish", "publish:bump": "npm run-script -w=@coveo/release bump", "promote:npm:latest": "node ../../scripts/deploy/update-npm-tag.mjs latest", "validate:definitions": "tsc --noEmit --esModuleInterop --skipLibCheck ./dist/types/components.d.ts" }, "dependencies": { - "@coveo/bueno": "1.0.0", - "@coveo/headless": "3.0.0", + "@coveo/bueno": "1.0.1", + "@coveo/headless": "3.1.3", "@popperjs/core": "^2.11.6", "@salesforce-ux/design-system": "^2.16.1", "@stencil/store": "2.0.16", @@ -66,7 +85,7 @@ "devDependencies": { "@axe-core/playwright": "4.9.1", "@babel/core": "7.24.9", - "@coveo/atomic": "file:.", + "@coveo/atomic-storybook-utils": "file:./storybookUtils", "@coveo/release": "1.0.0", "@coveo/rollup-plugin-replace-with-ast": "1.0.0", "@custom-elements-manifest/analyzer": "0.10.3", @@ -129,6 +148,7 @@ "postcss-nested": "6.2.0", "puppeteer": "22.14.0", "react": "18.3.1", + "rollup": "4.22.4", "rollup-plugin-html": "0.2.1", "shadow-dom-testing-library": "1.11.2", "storybook": "8.1.2", @@ -141,7 +161,8 @@ "wait-on": "7.2.0" }, "peerDependencies": { - "@coveo/headless": "3.0.0" + "@coveo/bueno": "1.0.1", + "@coveo/headless": "3.1.3" }, "license": "Apache-2.0", "engines": { diff --git a/packages/atomic/project.json b/packages/atomic/project.json index af2134ea9ba..1b1eb78f69a 100644 --- a/packages/atomic/project.json +++ b/packages/atomic/project.json @@ -12,8 +12,8 @@ "buildInputs": [ "{projectRoot}/stencil.config.ts", "{projectRoot}/collection-manifest.json", - "{projectRoot}/tailwind.config.js", - "{projectRoot}/svg.transform.js", + "{projectRoot}/tailwind.config.cjs", + "{projectRoot}/svg.transform.cjs", "{projectRoot}/stencil-plugin/**", "!{projectRoot}/src/external-builds/**", "!{projectRoot}/src/generated/**", @@ -117,9 +117,16 @@ "command": "wait-on dist/atomic" } }, + "wait-on:stencil-ping": { + "executor": "nx:run-commands", + "options": { + "cwd": "{projectRoot}", + "command": "wait-on http://localhost:3333/ping" + } + }, "storybook": { "executor": "nx:run-commands", - "dependsOn": ["wait-on:dist"], + "dependsOn": ["wait-on:stencil-ping"], "options": { "cwd": "{projectRoot}", "command": "npx storybook dev -p 4400" diff --git a/packages/atomic/scripts/externalPackageMappings.ts b/packages/atomic/scripts/externalPackageMappings.ts new file mode 100644 index 00000000000..6d1892678e9 --- /dev/null +++ b/packages/atomic/scripts/externalPackageMappings.ts @@ -0,0 +1,49 @@ +import path from 'node:path'; +import buenoJson from '../../bueno/package.json'; +import headlessJson from '../../headless/package.json'; + +const headlessVersion = 'v' + headlessJson.version; +const buenoVersion = 'v' + buenoJson.version; + +export function generateExternalPackageMappings(basePath: string): { + [key: string]: {devWatch: string; cdn: string}; +} { + return { + '@coveo/headless/commerce': { + devWatch: path.resolve( + basePath, + 'src/external-builds/commerce/headless.esm.js' + ), + cdn: `/headless/${headlessVersion}/commerce/headless.esm.js`, + }, + '@coveo/headless/insight': { + devWatch: path.resolve( + basePath, + 'src/external-builds/insight/headless.esm.js' + ), + cdn: `/headless/${headlessVersion}/insight/headless.esm.js`, + }, + '@coveo/headless/recommendation': { + devWatch: path.resolve( + basePath, + 'src/external-builds/recommendation/headless.esm.js' + ), + cdn: `/headless/${headlessVersion}/recommendation/headless.esm.js`, + }, + '@coveo/headless/case-assist': { + devWatch: path.resolve( + basePath, + 'src/external-builds/case-assist/headless.esm.js' + ), + cdn: `/headless/${headlessVersion}/case-assist/headless.esm.js`, + }, + '@coveo/headless': { + devWatch: path.resolve(basePath, 'src/external-builds/headless.esm.js'), + cdn: `/headless/${headlessVersion}/headless.esm.js`, + }, + '@coveo/bueno': { + devWatch: path.resolve(basePath, 'src/external-builds/bueno.esm.js'), + cdn: `/bueno/${buenoVersion}/bueno.esm.js`, + }, + }; +} diff --git a/packages/atomic/src/components.d.ts b/packages/atomic/src/components.d.ts index 64b5dab630d..1ed53e7e6ed 100644 --- a/packages/atomic/src/components.d.ts +++ b/packages/atomic/src/components.d.ts @@ -1073,6 +1073,14 @@ export namespace Components { * @default false */ "collapsible"?: boolean; + /** + * The tabs on which this generated answer must not be displayed. This property should not be used at the same time as `tabs-included`. Set this property as a stringified JSON array, e.g., ```html ``` If you don't set this property, the generated answer can be displayed on any tab. Otherwise, the generated answer won't be displayed on any of the specified tabs. + */ + "tabsExcluded": string[] | string; + /** + * The tabs on which the generated answer can be displayed. This property should not be used at the same time as `tabs-excluded`. Set this property as a stringified JSON array, e.g., ```html ``` If you don't set this property, the generated answer can be displayed on any tab. Otherwise, the generated answer can only be displayed on the specified tabs. + */ + "tabsIncluded": string[] | string; /** * Whether to render a toggle button that lets the user hide or show the answer. * @default false @@ -1205,6 +1213,7 @@ export namespace Components { "tooltip": string; } interface AtomicInsightGeneratedAnswer { + "answerConfigurationId"?: string; /** * Whether to allow the answer to be collapsed when the text is taller than 250px. * @default false @@ -1573,6 +1582,18 @@ export namespace Components { */ "withDatePicker": boolean; } + interface AtomicInsightUserActionsModal { + "isOpen": boolean; + "openButton"?: HTMLElement; + /** + * The date and time when the case was created. For example "2024-01-01T00:00:00Z" + */ + "ticketCreationDateTime": string; + /** + * The ID of the user whose actions are being displayed. + */ + "userId": string; + } /** * @category Insight Panel * @example @@ -1588,9 +1609,6 @@ export namespace Components { "userActions": Array; } /** - * This component displays all the actions performed by a user around the time they created a case. - * The actions are grouped into multiple sessions, including the session during which the case was created, - * the sessions preceding the case creation and the sessions following the case creation. * @component * @example */ @@ -1604,6 +1622,16 @@ export namespace Components { */ "userId": string; } + interface AtomicInsightUserActionsToggle { + /** + * The date and time when the case was created. For example "2024-01-01T00:00:00Z" + */ + "ticketCreationDateTime": string; + /** + * The ID of the user whose actions are being displayed. + */ + "userId": string; + } interface AtomicIpxBody { "displayFooterSlot": boolean; "isOpen"?: boolean; @@ -2082,6 +2110,7 @@ export namespace Components { "maxValueInIndex": number; /** * The field whose value you want to display next to the rating. This field can be used to display the number of reviews or the numerical value of the rating, for example. + * @type {string} */ "ratingDetailsField"?: string; } @@ -4482,6 +4511,12 @@ declare global { prototype: HTMLAtomicInsightTimeframeFacetElement; new (): HTMLAtomicInsightTimeframeFacetElement; }; + interface HTMLAtomicInsightUserActionsModalElement extends Components.AtomicInsightUserActionsModal, HTMLStencilElement { + } + var HTMLAtomicInsightUserActionsModalElement: { + prototype: HTMLAtomicInsightUserActionsModalElement; + new (): HTMLAtomicInsightUserActionsModalElement; + }; /** * @category Insight Panel * @example @@ -4493,9 +4528,6 @@ declare global { new (): HTMLAtomicInsightUserActionsSessionElement; }; /** - * This component displays all the actions performed by a user around the time they created a case. - * The actions are grouped into multiple sessions, including the session during which the case was created, - * the sessions preceding the case creation and the sessions following the case creation. * @component * @example */ @@ -4505,6 +4537,12 @@ declare global { prototype: HTMLAtomicInsightUserActionsTimelineElement; new (): HTMLAtomicInsightUserActionsTimelineElement; }; + interface HTMLAtomicInsightUserActionsToggleElement extends Components.AtomicInsightUserActionsToggle, HTMLStencilElement { + } + var HTMLAtomicInsightUserActionsToggleElement: { + prototype: HTMLAtomicInsightUserActionsToggleElement; + new (): HTMLAtomicInsightUserActionsToggleElement; + }; interface HTMLAtomicIpxBodyElementEventMap { "animationEnded": never; } @@ -5873,8 +5911,10 @@ declare global { "atomic-insight-tab": HTMLAtomicInsightTabElement; "atomic-insight-tabs": HTMLAtomicInsightTabsElement; "atomic-insight-timeframe-facet": HTMLAtomicInsightTimeframeFacetElement; + "atomic-insight-user-actions-modal": HTMLAtomicInsightUserActionsModalElement; "atomic-insight-user-actions-session": HTMLAtomicInsightUserActionsSessionElement; "atomic-insight-user-actions-timeline": HTMLAtomicInsightUserActionsTimelineElement; + "atomic-insight-user-actions-toggle": HTMLAtomicInsightUserActionsToggleElement; "atomic-ipx-body": HTMLAtomicIpxBodyElement; "atomic-ipx-button": HTMLAtomicIpxButtonElement; "atomic-ipx-embedded": HTMLAtomicIpxEmbeddedElement; @@ -6957,6 +6997,14 @@ declare namespace LocalJSX { * @default false */ "collapsible"?: boolean; + /** + * The tabs on which this generated answer must not be displayed. This property should not be used at the same time as `tabs-included`. Set this property as a stringified JSON array, e.g., ```html ``` If you don't set this property, the generated answer can be displayed on any tab. Otherwise, the generated answer won't be displayed on any of the specified tabs. + */ + "tabsExcluded"?: string[] | string; + /** + * The tabs on which the generated answer can be displayed. This property should not be used at the same time as `tabs-excluded`. Set this property as a stringified JSON array, e.g., ```html ``` If you don't set this property, the generated answer can be displayed on any tab. Otherwise, the generated answer can only be displayed on the specified tabs. + */ + "tabsIncluded"?: string[] | string; /** * Whether to render a toggle button that lets the user hide or show the answer. * @default false @@ -7086,6 +7134,7 @@ declare namespace LocalJSX { "tooltip"?: string; } interface AtomicInsightGeneratedAnswer { + "answerConfigurationId"?: string; /** * Whether to allow the answer to be collapsed when the text is taller than 250px. * @default false @@ -7428,6 +7477,18 @@ declare namespace LocalJSX { */ "withDatePicker"?: boolean; } + interface AtomicInsightUserActionsModal { + "isOpen"?: boolean; + "openButton"?: HTMLElement; + /** + * The date and time when the case was created. For example "2024-01-01T00:00:00Z" + */ + "ticketCreationDateTime": string; + /** + * The ID of the user whose actions are being displayed. + */ + "userId": string; + } /** * @category Insight Panel * @example @@ -7443,9 +7504,6 @@ declare namespace LocalJSX { "userActions": Array; } /** - * This component displays all the actions performed by a user around the time they created a case. - * The actions are grouped into multiple sessions, including the session during which the case was created, - * the sessions preceding the case creation and the sessions following the case creation. * @component * @example */ @@ -7459,6 +7517,16 @@ declare namespace LocalJSX { */ "userId": string; } + interface AtomicInsightUserActionsToggle { + /** + * The date and time when the case was created. For example "2024-01-01T00:00:00Z" + */ + "ticketCreationDateTime": string; + /** + * The ID of the user whose actions are being displayed. + */ + "userId": string; + } interface AtomicIpxBody { "displayFooterSlot"?: boolean; "isOpen"?: boolean; @@ -7913,6 +7981,7 @@ declare namespace LocalJSX { "maxValueInIndex"?: number; /** * The field whose value you want to display next to the rating. This field can be used to display the number of reviews or the numerical value of the rating, for example. + * @type {string} */ "ratingDetailsField"?: string; } @@ -9464,8 +9533,10 @@ declare namespace LocalJSX { "atomic-insight-tab": AtomicInsightTab; "atomic-insight-tabs": AtomicInsightTabs; "atomic-insight-timeframe-facet": AtomicInsightTimeframeFacet; + "atomic-insight-user-actions-modal": AtomicInsightUserActionsModal; "atomic-insight-user-actions-session": AtomicInsightUserActionsSession; "atomic-insight-user-actions-timeline": AtomicInsightUserActionsTimeline; + "atomic-insight-user-actions-toggle": AtomicInsightUserActionsToggle; "atomic-ipx-body": AtomicIpxBody; "atomic-ipx-button": AtomicIpxButton; "atomic-ipx-embedded": AtomicIpxEmbedded; @@ -9858,19 +9929,18 @@ declare module "@stencil/core" { "atomic-insight-tab": LocalJSX.AtomicInsightTab & JSXBase.HTMLAttributes; "atomic-insight-tabs": LocalJSX.AtomicInsightTabs & JSXBase.HTMLAttributes; "atomic-insight-timeframe-facet": LocalJSX.AtomicInsightTimeframeFacet & JSXBase.HTMLAttributes; + "atomic-insight-user-actions-modal": LocalJSX.AtomicInsightUserActionsModal & JSXBase.HTMLAttributes; /** * @category Insight Panel * @example */ "atomic-insight-user-actions-session": LocalJSX.AtomicInsightUserActionsSession & JSXBase.HTMLAttributes; /** - * This component displays all the actions performed by a user around the time they created a case. - * The actions are grouped into multiple sessions, including the session during which the case was created, - * the sessions preceding the case creation and the sessions following the case creation. * @component * @example */ "atomic-insight-user-actions-timeline": LocalJSX.AtomicInsightUserActionsTimeline & JSXBase.HTMLAttributes; + "atomic-insight-user-actions-toggle": LocalJSX.AtomicInsightUserActionsToggle & JSXBase.HTMLAttributes; "atomic-ipx-body": LocalJSX.AtomicIpxBody & JSXBase.HTMLAttributes; "atomic-ipx-button": LocalJSX.AtomicIpxButton & JSXBase.HTMLAttributes; "atomic-ipx-embedded": LocalJSX.AtomicIpxEmbedded & JSXBase.HTMLAttributes; diff --git a/packages/atomic/src/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.new.stories.tsx b/packages/atomic/src/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.new.stories.tsx index 14298677670..c788bfd1b76 100644 --- a/packages/atomic/src/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.new.stories.tsx +++ b/packages/atomic/src/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.new.stories.tsx @@ -1,9 +1,9 @@ import { playExecuteFirstSearch, wrapInCommerceInterface, -} from '@coveo/atomic/storybookUtils/commerce/commerce-interface-wrapper'; -import {parameters} from '@coveo/atomic/storybookUtils/common/common-meta-parameters'; -import {renderComponent} from '@coveo/atomic/storybookUtils/common/render-component'; +} from '@coveo/atomic-storybook-utils/commerce/commerce-interface-wrapper'; +import {parameters} from '@coveo/atomic-storybook-utils/common/common-meta-parameters'; +import {renderComponent} from '@coveo/atomic-storybook-utils/common/render-component'; import { CommerceEngineConfiguration, getSampleCommerceEngineConfiguration, diff --git a/packages/atomic/src/components/commerce/atomic-commerce-interface/atomic-commerce-interface.new.stories.tsx b/packages/atomic/src/components/commerce/atomic-commerce-interface/atomic-commerce-interface.new.stories.tsx index 95bf1869029..97df1d7ea9f 100644 --- a/packages/atomic/src/components/commerce/atomic-commerce-interface/atomic-commerce-interface.new.stories.tsx +++ b/packages/atomic/src/components/commerce/atomic-commerce-interface/atomic-commerce-interface.new.stories.tsx @@ -1,5 +1,5 @@ -import {parameters} from '@coveo/atomic/storybookUtils/common/common-meta-parameters'; -import {renderComponent} from '@coveo/atomic/storybookUtils/common/render-component'; +import {parameters} from '@coveo/atomic-storybook-utils/common/common-meta-parameters'; +import {renderComponent} from '@coveo/atomic-storybook-utils/common/render-component'; import {getSampleCommerceEngineConfiguration} from '@coveo/headless/commerce'; import type {Meta, StoryObj as Story} from '@storybook/web-components'; diff --git a/packages/atomic/src/components/commerce/atomic-commerce-load-more-products/atomic-commerce-load-more-products.new.stories.tsx b/packages/atomic/src/components/commerce/atomic-commerce-load-more-products/atomic-commerce-load-more-products.new.stories.tsx index c3424d36e6a..40ac967d443 100644 --- a/packages/atomic/src/components/commerce/atomic-commerce-load-more-products/atomic-commerce-load-more-products.new.stories.tsx +++ b/packages/atomic/src/components/commerce/atomic-commerce-load-more-products/atomic-commerce-load-more-products.new.stories.tsx @@ -1,9 +1,9 @@ import { playExecuteFirstSearch, wrapInCommerceInterface, -} from '@coveo/atomic/storybookUtils/commerce/commerce-interface-wrapper'; -import {parameters} from '@coveo/atomic/storybookUtils/common/common-meta-parameters'; -import {renderComponent} from '@coveo/atomic/storybookUtils/common/render-component'; +} from '@coveo/atomic-storybook-utils/commerce/commerce-interface-wrapper'; +import {parameters} from '@coveo/atomic-storybook-utils/common/common-meta-parameters'; +import {renderComponent} from '@coveo/atomic-storybook-utils/common/render-component'; import type {Meta, StoryObj as Story} from '@storybook/web-components'; import {html} from 'lit/static-html.js'; diff --git a/packages/atomic/src/components/commerce/atomic-commerce-no-products/atomic-commerce-no-products.new.stories.tsx b/packages/atomic/src/components/commerce/atomic-commerce-no-products/atomic-commerce-no-products.new.stories.tsx index 68204dad741..cd23512b430 100644 --- a/packages/atomic/src/components/commerce/atomic-commerce-no-products/atomic-commerce-no-products.new.stories.tsx +++ b/packages/atomic/src/components/commerce/atomic-commerce-no-products/atomic-commerce-no-products.new.stories.tsx @@ -1,9 +1,9 @@ import { playExecuteFirstSearch, wrapInCommerceInterface, -} from '@coveo/atomic/storybookUtils/commerce/commerce-interface-wrapper'; -import {parameters} from '@coveo/atomic/storybookUtils/common/common-meta-parameters'; -import {renderComponent} from '@coveo/atomic/storybookUtils/common/render-component'; +} from '@coveo/atomic-storybook-utils/commerce/commerce-interface-wrapper'; +import {parameters} from '@coveo/atomic-storybook-utils/common/common-meta-parameters'; +import {renderComponent} from '@coveo/atomic-storybook-utils/common/render-component'; import type {Meta, StoryObj as Story} from '@storybook/web-components'; import {html} from 'lit/static-html.js'; diff --git a/packages/atomic/src/components/commerce/atomic-commerce-pager/atomic-commerce-pager.new.stories.tsx b/packages/atomic/src/components/commerce/atomic-commerce-pager/atomic-commerce-pager.new.stories.tsx index 1dcd6a0f354..f720670d938 100644 --- a/packages/atomic/src/components/commerce/atomic-commerce-pager/atomic-commerce-pager.new.stories.tsx +++ b/packages/atomic/src/components/commerce/atomic-commerce-pager/atomic-commerce-pager.new.stories.tsx @@ -1,9 +1,9 @@ import { playExecuteFirstSearch, wrapInCommerceInterface, -} from '@coveo/atomic/storybookUtils/commerce/commerce-interface-wrapper'; -import {parameters} from '@coveo/atomic/storybookUtils/common/common-meta-parameters'; -import {renderComponent} from '@coveo/atomic/storybookUtils/common/render-component'; +} from '@coveo/atomic-storybook-utils/commerce/commerce-interface-wrapper'; +import {parameters} from '@coveo/atomic-storybook-utils/common/common-meta-parameters'; +import {renderComponent} from '@coveo/atomic-storybook-utils/common/render-component'; import type {Meta, StoryObj as Story} from '@storybook/web-components'; const {decorator, play} = wrapInCommerceInterface({skipFirstSearch: true}); diff --git a/packages/atomic/src/components/commerce/atomic-commerce-product-list/atomic-commerce-product-list.new.stories.tsx b/packages/atomic/src/components/commerce/atomic-commerce-product-list/atomic-commerce-product-list.new.stories.tsx index 8a40b086557..44488284583 100644 --- a/packages/atomic/src/components/commerce/atomic-commerce-product-list/atomic-commerce-product-list.new.stories.tsx +++ b/packages/atomic/src/components/commerce/atomic-commerce-product-list/atomic-commerce-product-list.new.stories.tsx @@ -1,9 +1,9 @@ import { playExecuteFirstSearch, wrapInCommerceInterface, -} from '@coveo/atomic/storybookUtils/commerce/commerce-interface-wrapper'; -import {parameters} from '@coveo/atomic/storybookUtils/common/common-meta-parameters'; -import {renderComponent} from '@coveo/atomic/storybookUtils/common/render-component'; +} from '@coveo/atomic-storybook-utils/commerce/commerce-interface-wrapper'; +import {parameters} from '@coveo/atomic-storybook-utils/common/common-meta-parameters'; +import {renderComponent} from '@coveo/atomic-storybook-utils/common/render-component'; import {CommerceEngineConfiguration} from '@coveo/headless/dist/definitions/commerce.index'; import type {Meta, StoryObj as Story} from '@storybook/web-components'; import {html} from 'lit-html/static.js'; diff --git a/packages/atomic/src/components/commerce/atomic-commerce-products-per-page/atomic-commerce-products-per-page.new.stories.tsx b/packages/atomic/src/components/commerce/atomic-commerce-products-per-page/atomic-commerce-products-per-page.new.stories.tsx index 1db5cc66a2b..ec0f191225a 100644 --- a/packages/atomic/src/components/commerce/atomic-commerce-products-per-page/atomic-commerce-products-per-page.new.stories.tsx +++ b/packages/atomic/src/components/commerce/atomic-commerce-products-per-page/atomic-commerce-products-per-page.new.stories.tsx @@ -1,6 +1,6 @@ -import {wrapInCommerceInterface} from '@coveo/atomic/storybookUtils/commerce/commerce-interface-wrapper'; -import {parameters} from '@coveo/atomic/storybookUtils/common/common-meta-parameters'; -import {renderComponent} from '@coveo/atomic/storybookUtils/common/render-component'; +import {wrapInCommerceInterface} from '@coveo/atomic-storybook-utils/commerce/commerce-interface-wrapper'; +import {parameters} from '@coveo/atomic-storybook-utils/common/common-meta-parameters'; +import {renderComponent} from '@coveo/atomic-storybook-utils/common/render-component'; import type {Meta, StoryObj as Story} from '@storybook/web-components'; import {html} from 'lit/static-html.js'; diff --git a/packages/atomic/src/components/commerce/atomic-commerce-query-error/atomic-commerce-query-error.new.stories.tsx b/packages/atomic/src/components/commerce/atomic-commerce-query-error/atomic-commerce-query-error.new.stories.tsx index e52f6fd6d6f..8234e09d70d 100644 --- a/packages/atomic/src/components/commerce/atomic-commerce-query-error/atomic-commerce-query-error.new.stories.tsx +++ b/packages/atomic/src/components/commerce/atomic-commerce-query-error/atomic-commerce-query-error.new.stories.tsx @@ -1,6 +1,6 @@ -import {wrapInCommerceInterface} from '@coveo/atomic/storybookUtils/commerce/commerce-interface-wrapper'; -import {parameters} from '@coveo/atomic/storybookUtils/common/common-meta-parameters'; -import {renderComponent} from '@coveo/atomic/storybookUtils/common/render-component'; +import {wrapInCommerceInterface} from '@coveo/atomic-storybook-utils/commerce/commerce-interface-wrapper'; +import {parameters} from '@coveo/atomic-storybook-utils/common/common-meta-parameters'; +import {renderComponent} from '@coveo/atomic-storybook-utils/common/render-component'; import type {Meta, StoryObj as Story} from '@storybook/web-components'; const {decorator, play} = wrapInCommerceInterface({ diff --git a/packages/atomic/src/components/commerce/atomic-commerce-query-summary/atomic-commerce-query-summary.new.stories.tsx b/packages/atomic/src/components/commerce/atomic-commerce-query-summary/atomic-commerce-query-summary.new.stories.tsx index 1fd72ed2065..ba599a0eff5 100644 --- a/packages/atomic/src/components/commerce/atomic-commerce-query-summary/atomic-commerce-query-summary.new.stories.tsx +++ b/packages/atomic/src/components/commerce/atomic-commerce-query-summary/atomic-commerce-query-summary.new.stories.tsx @@ -1,6 +1,6 @@ -import {wrapInCommerceInterface} from '@coveo/atomic/storybookUtils/commerce/commerce-interface-wrapper'; -import {parameters} from '@coveo/atomic/storybookUtils/common/common-meta-parameters'; -import {renderComponent} from '@coveo/atomic/storybookUtils/common/render-component'; +import {wrapInCommerceInterface} from '@coveo/atomic-storybook-utils/commerce/commerce-interface-wrapper'; +import {parameters} from '@coveo/atomic-storybook-utils/common/common-meta-parameters'; +import {renderComponent} from '@coveo/atomic-storybook-utils/common/render-component'; import {CommerceEngineConfiguration} from '@coveo/headless/commerce'; import type {Meta, StoryObj as Story} from '@storybook/web-components'; import {html} from 'lit/static-html.js'; diff --git a/packages/atomic/src/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.new.stories.tsx b/packages/atomic/src/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.new.stories.tsx index 723fcc10aa6..05b1919de42 100644 --- a/packages/atomic/src/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.new.stories.tsx +++ b/packages/atomic/src/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.new.stories.tsx @@ -1,9 +1,9 @@ import { playExecuteFirstSearch, wrapInCommerceInterface, -} from '@coveo/atomic/storybookUtils/commerce/commerce-interface-wrapper'; -import {parameters} from '@coveo/atomic/storybookUtils/common/common-meta-parameters'; -import {renderComponent} from '@coveo/atomic/storybookUtils/common/render-component'; +} from '@coveo/atomic-storybook-utils/commerce/commerce-interface-wrapper'; +import {parameters} from '@coveo/atomic-storybook-utils/common/common-meta-parameters'; +import {renderComponent} from '@coveo/atomic-storybook-utils/common/render-component'; import type {Meta, StoryObj as Story} from '@storybook/web-components'; import {html} from 'lit/static-html.js'; diff --git a/packages/atomic/src/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.pcss b/packages/atomic/src/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.pcss index 69dc883c395..1225171962f 100644 --- a/packages/atomic/src/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.pcss +++ b/packages/atomic/src/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.pcss @@ -1,5 +1 @@ @import '../../search/atomic-search-box/atomic-search-box.pcss'; - -:host { - @apply relative z-10; -} diff --git a/packages/atomic/src/components/commerce/atomic-commerce-search-box/e2e/atomic-commerce-search-box.e2e.ts b/packages/atomic/src/components/commerce/atomic-commerce-search-box/e2e/atomic-commerce-search-box.e2e.ts index e28c87f6c32..5e0eaa18596 100644 --- a/packages/atomic/src/components/commerce/atomic-commerce-search-box/e2e/atomic-commerce-search-box.e2e.ts +++ b/packages/atomic/src/components/commerce/atomic-commerce-search-box/e2e/atomic-commerce-search-box.e2e.ts @@ -514,3 +514,10 @@ test.describe('standalone searchbox', () => { expect(accessibilityResults.violations).toEqual([]); }); }); + +test('should have position:relative and z-index:10', async ({searchBox}) => { + await searchBox.load(); + + await expect(searchBox.hydrated).toHaveCSS('position', 'relative'); + await expect(searchBox.hydrated).toHaveCSS('z-index', '10'); +}); diff --git a/packages/atomic/src/components/commerce/atomic-commerce-text/atomic-commerce-text.new.stories.tsx b/packages/atomic/src/components/commerce/atomic-commerce-text/atomic-commerce-text.new.stories.tsx index 3573d1d4c0a..4b4930210b9 100644 --- a/packages/atomic/src/components/commerce/atomic-commerce-text/atomic-commerce-text.new.stories.tsx +++ b/packages/atomic/src/components/commerce/atomic-commerce-text/atomic-commerce-text.new.stories.tsx @@ -1,6 +1,6 @@ -import {wrapInCommerceInterface} from '@coveo/atomic/storybookUtils/commerce/commerce-interface-wrapper'; -import {parameters} from '@coveo/atomic/storybookUtils/common/common-meta-parameters'; -import {renderComponent} from '@coveo/atomic/storybookUtils/common/render-component'; +import {wrapInCommerceInterface} from '@coveo/atomic-storybook-utils/commerce/commerce-interface-wrapper'; +import {parameters} from '@coveo/atomic-storybook-utils/common/common-meta-parameters'; +import {renderComponent} from '@coveo/atomic-storybook-utils/common/render-component'; import {within} from '@storybook/test'; import type {Meta, StoryObj as Story} from '@storybook/web-components'; diff --git a/packages/atomic/src/components/commerce/facets/atomic-commerce-category-facet/atomic-commerce-category-facet.new.stories.tsx b/packages/atomic/src/components/commerce/facets/atomic-commerce-category-facet/atomic-commerce-category-facet.new.stories.tsx index cc6062f0694..49008602a83 100644 --- a/packages/atomic/src/components/commerce/facets/atomic-commerce-category-facet/atomic-commerce-category-facet.new.stories.tsx +++ b/packages/atomic/src/components/commerce/facets/atomic-commerce-category-facet/atomic-commerce-category-facet.new.stories.tsx @@ -2,9 +2,9 @@ import { wrapInCommerceInterface, playExecuteFirstSearch, playKeepOnlyFirstFacetOfType, -} from '@coveo/atomic/storybookUtils/commerce/commerce-interface-wrapper'; -import {parameters} from '@coveo/atomic/storybookUtils/common/common-meta-parameters'; -import {renderComponent} from '@coveo/atomic/storybookUtils/common/render-component'; +} from '@coveo/atomic-storybook-utils/commerce/commerce-interface-wrapper'; +import {parameters} from '@coveo/atomic-storybook-utils/common/common-meta-parameters'; +import {renderComponent} from '@coveo/atomic-storybook-utils/common/render-component'; import type {Meta, StoryObj as Story} from '@storybook/web-components'; import {html} from 'lit-html'; diff --git a/packages/atomic/src/components/commerce/facets/atomic-commerce-facet/atomic-commerce-facet.new.stories.tsx b/packages/atomic/src/components/commerce/facets/atomic-commerce-facet/atomic-commerce-facet.new.stories.tsx index 2a2a0710abf..7380175930e 100644 --- a/packages/atomic/src/components/commerce/facets/atomic-commerce-facet/atomic-commerce-facet.new.stories.tsx +++ b/packages/atomic/src/components/commerce/facets/atomic-commerce-facet/atomic-commerce-facet.new.stories.tsx @@ -2,9 +2,9 @@ import { wrapInCommerceInterface, playExecuteFirstSearch, playKeepOnlyFirstFacetOfType, -} from '@coveo/atomic/storybookUtils/commerce/commerce-interface-wrapper'; -import {parameters} from '@coveo/atomic/storybookUtils/common/common-meta-parameters'; -import {renderComponent} from '@coveo/atomic/storybookUtils/common/render-component'; +} from '@coveo/atomic-storybook-utils/commerce/commerce-interface-wrapper'; +import {parameters} from '@coveo/atomic-storybook-utils/common/common-meta-parameters'; +import {renderComponent} from '@coveo/atomic-storybook-utils/common/render-component'; import type {Meta, StoryObj as Story} from '@storybook/web-components'; import {html} from 'lit-html'; diff --git a/packages/atomic/src/components/commerce/facets/atomic-commerce-facets/atomic-commerce-facets.new.stories.tsx b/packages/atomic/src/components/commerce/facets/atomic-commerce-facets/atomic-commerce-facets.new.stories.tsx index fbda2063598..30a644d854f 100644 --- a/packages/atomic/src/components/commerce/facets/atomic-commerce-facets/atomic-commerce-facets.new.stories.tsx +++ b/packages/atomic/src/components/commerce/facets/atomic-commerce-facets/atomic-commerce-facets.new.stories.tsx @@ -1,9 +1,9 @@ import { playExecuteFirstSearch, wrapInCommerceInterface, -} from '@coveo/atomic/storybookUtils/commerce/commerce-interface-wrapper'; -import {parameters} from '@coveo/atomic/storybookUtils/common/common-meta-parameters'; -import {renderComponent} from '@coveo/atomic/storybookUtils/common/render-component'; +} from '@coveo/atomic-storybook-utils/commerce/commerce-interface-wrapper'; +import {parameters} from '@coveo/atomic-storybook-utils/common/common-meta-parameters'; +import {renderComponent} from '@coveo/atomic-storybook-utils/common/render-component'; import type {Meta, StoryObj as Story} from '@storybook/web-components'; import {html} from 'lit/static-html.js'; diff --git a/packages/atomic/src/components/commerce/facets/atomic-commerce-numeric-facet/atomic-commerce-numeric-facet.new.stories.tsx b/packages/atomic/src/components/commerce/facets/atomic-commerce-numeric-facet/atomic-commerce-numeric-facet.new.stories.tsx index 710cd4c2d84..d87b38f5c1d 100644 --- a/packages/atomic/src/components/commerce/facets/atomic-commerce-numeric-facet/atomic-commerce-numeric-facet.new.stories.tsx +++ b/packages/atomic/src/components/commerce/facets/atomic-commerce-numeric-facet/atomic-commerce-numeric-facet.new.stories.tsx @@ -2,9 +2,9 @@ import { wrapInCommerceInterface, playExecuteFirstSearch, playKeepOnlyFirstFacetOfType, -} from '@coveo/atomic/storybookUtils/commerce/commerce-interface-wrapper'; -import {parameters} from '@coveo/atomic/storybookUtils/common/common-meta-parameters'; -import {renderComponent} from '@coveo/atomic/storybookUtils/common/render-component'; +} from '@coveo/atomic-storybook-utils/commerce/commerce-interface-wrapper'; +import {parameters} from '@coveo/atomic-storybook-utils/common/common-meta-parameters'; +import {renderComponent} from '@coveo/atomic-storybook-utils/common/render-component'; import type {Meta, StoryObj as Story} from '@storybook/web-components'; import {html} from 'lit-html'; diff --git a/packages/atomic/src/components/commerce/product-template-components/atomic-product-link/atomic-product-link.new.stories.tsx b/packages/atomic/src/components/commerce/product-template-components/atomic-product-link/atomic-product-link.new.stories.tsx index db78f992ef9..473e51f78ec 100644 --- a/packages/atomic/src/components/commerce/product-template-components/atomic-product-link/atomic-product-link.new.stories.tsx +++ b/packages/atomic/src/components/commerce/product-template-components/atomic-product-link/atomic-product-link.new.stories.tsx @@ -1,8 +1,8 @@ -import {wrapInCommerceInterface} from '@coveo/atomic/storybookUtils/commerce/commerce-interface-wrapper'; -import {wrapInCommerceProductList} from '@coveo/atomic/storybookUtils/commerce/commerce-product-list-wrapper'; -import {wrapInProductTemplate} from '@coveo/atomic/storybookUtils/commerce/commerce-product-template-wrapper'; -import {parameters} from '@coveo/atomic/storybookUtils/common/common-meta-parameters'; -import {renderComponent} from '@coveo/atomic/storybookUtils/common/render-component'; +import {wrapInCommerceInterface} from '@coveo/atomic-storybook-utils/commerce/commerce-interface-wrapper'; +import {wrapInCommerceProductList} from '@coveo/atomic-storybook-utils/commerce/commerce-product-list-wrapper'; +import {wrapInProductTemplate} from '@coveo/atomic-storybook-utils/commerce/commerce-product-template-wrapper'; +import {parameters} from '@coveo/atomic-storybook-utils/common/common-meta-parameters'; +import {renderComponent} from '@coveo/atomic-storybook-utils/common/render-component'; import type {Meta, StoryObj as Story} from '@storybook/web-components'; import {html} from 'lit-html'; diff --git a/packages/atomic/src/components/commerce/product-template-components/atomic-product-numeric-field-value/atomic-product-numeric-field-value.tsx b/packages/atomic/src/components/commerce/product-template-components/atomic-product-numeric-field-value/atomic-product-numeric-field-value.tsx index 632657e51bc..15295522b03 100644 --- a/packages/atomic/src/components/commerce/product-template-components/atomic-product-numeric-field-value/atomic-product-numeric-field-value.tsx +++ b/packages/atomic/src/components/commerce/product-template-components/atomic-product-numeric-field-value/atomic-product-numeric-field-value.tsx @@ -1,4 +1,4 @@ -import {Product, ProductTemplatesHelpers} from '@coveo/headless/commerce'; +import {Product} from '@coveo/headless/commerce'; import {Component, Prop, Element, State, Listen} from '@stencil/core'; import {Bindings} from '../../../../components'; import {InitializeBindings} from '../../../../utils/initialization-utils'; @@ -7,6 +7,7 @@ import { NumberFormatter, } from '../../../common/formats/format-common'; import {ProductContext} from '../product-template-decorators'; +import {parseValue} from '../product-utils'; /** * @alpha @@ -43,24 +44,6 @@ export class AtomicProductNumber { this.formatter = event.detail; } - private parseValue() { - const value = ProductTemplatesHelpers.getProductProperty( - this.product, - this.field - ); - if (value === null) { - return null; - } - const valueAsNumber = parseFloat(`${value}`); - if (Number.isNaN(valueAsNumber)) { - this.error = new Error( - `Could not parse "${value}" from field "${this.field}" as a number.` - ); - return null; - } - return valueAsNumber; - } - private formatValue(value: number) { try { return this.formatter(value, this.bindings.i18n.languages as string[]); @@ -71,7 +54,7 @@ export class AtomicProductNumber { } private updateValueToDisplay() { - const value = this.parseValue(); + const value = parseValue(this.product, this.field); if (value !== null) { this.valueToDisplay = this.formatValue(value); } diff --git a/packages/atomic/src/components/commerce/product-template-components/atomic-product-price/atomic-product-price.tsx b/packages/atomic/src/components/commerce/product-template-components/atomic-product-price/atomic-product-price.tsx index 6220cf32401..43fd9d1655b 100644 --- a/packages/atomic/src/components/commerce/product-template-components/atomic-product-price/atomic-product-price.tsx +++ b/packages/atomic/src/components/commerce/product-template-components/atomic-product-price/atomic-product-price.tsx @@ -10,8 +10,10 @@ import { InitializableComponent, InitializeBindings, } from '../../../../utils/initialization-utils'; +import {defaultCurrencyFormatter} from '../../../common/formats/format-common'; import {CommerceBindings} from '../../atomic-commerce-interface/atomic-commerce-interface'; import {ProductContext} from '../product-template-decorators'; +import {parseValue} from '../product-utils'; /** * @alpha @@ -35,31 +37,61 @@ export class AtomicProductPrice this.context = buildContext(this.bindings.engine); } - public render() { - const hasPromotionalPrice = + private formatValue(value: number) { + try { + const {currency} = this.contextState; + const formatter = defaultCurrencyFormatter(currency); + return formatter(value, this.bindings.i18n.languages as string[]); + } catch (error) { + this.error = error as Error; + return value.toString(); + } + } + + private parse(field: string) { + try { + return parseValue(this.product, field); + } catch (error) { + this.error = error as Error; + return null; + } + } + + private getFormattedValue(field: string) { + const value = this.parse(field); + if (value !== null) { + return this.formatValue(value); + } + } + + private get hasPromotionalPrice() { + return ( this.product.ec_promo_price !== null && this.product.ec_price !== null && - this.product.ec_promo_price < this.product.ec_price; + this.product.ec_promo_price < this.product.ec_price + ); + } + + public render() { + const mainPrice = this.getFormattedValue( + this.hasPromotionalPrice ? 'ec_promo_price' : 'ec_price' + ); - const {currency} = this.contextState; + const originalPrice = this.hasPromotionalPrice + ? this.getFormattedValue('ec_price') + : null; return (
- - - - {hasPromotionalPrice && ( - - - + {mainPrice} +
+ {originalPrice && ( +
+ {originalPrice} +
)} ); diff --git a/packages/atomic/src/components/commerce/product-template-components/atomic-product-rating/atomic-product-rating.new.stories.tsx b/packages/atomic/src/components/commerce/product-template-components/atomic-product-rating/atomic-product-rating.new.stories.tsx new file mode 100644 index 00000000000..389ae29b469 --- /dev/null +++ b/packages/atomic/src/components/commerce/product-template-components/atomic-product-rating/atomic-product-rating.new.stories.tsx @@ -0,0 +1,65 @@ +import type {Meta, StoryObj as Story} from '@storybook/web-components'; +import {wrapInCommerceInterface} from '../../../../../storybookUtils/commerce/commerce-interface-wrapper'; +import {wrapInCommerceProductList} from '../../../../../storybookUtils/commerce/commerce-product-list-wrapper'; +import {wrapInProductTemplate} from '../../../../../storybookUtils/commerce/commerce-product-template-wrapper'; +import {parameters} from '../../../../../storybookUtils/common/common-meta-parameters'; +import {renderComponent} from '../../../../../storybookUtils/common/render-component'; + +const { + decorator: commerceInterfaceDecorator, + play: initializeCommerceInterface, +} = wrapInCommerceInterface({ + skipFirstSearch: false, + type: 'product-listing', + engineConfig: { + context: { + view: { + url: 'https://sports.barca.group/browse/promotions/ui-kit-testing', + }, + language: 'en', + country: 'US', + currency: 'USD', + }, + }, +}); +const {decorator: commerceProductListDecorator} = wrapInCommerceProductList(); +const {decorator: productTemplateDecorator} = wrapInProductTemplate(); + +const meta: Meta = { + component: 'atomic-product-rating', + title: 'Atomic-Commerce/Product Template Components/ProductRating', + id: 'atomic-product-rating', + render: renderComponent, + decorators: [ + productTemplateDecorator, + commerceProductListDecorator, + commerceInterfaceDecorator, + ], + parameters, + play: initializeCommerceInterface, +}; + +export default meta; + +export const Default: Story = { + name: 'atomic-product-rating', +}; + +export const WithARatingDetailsField: Story = { + args: { + 'attributes-rating-details-field': 'ec_rating', + }, +}; + +export const WithAMaxValueInIndex: Story = { + args: { + 'attributes-max-value-in-index': 10, + }, +}; + +export const WithADifferentIcon: Story = { + args: { + 'attributes-icon': + 'https://raw.githubusercontent.com/Rush/Font-Awesome-SVG-PNG/master/black/svg/circle.svg', + }, +}; diff --git a/packages/atomic/src/components/commerce/product-template-components/atomic-product-rating/atomic-product-rating.tsx b/packages/atomic/src/components/commerce/product-template-components/atomic-product-rating/atomic-product-rating.tsx index b8dde9ffd48..9a34fa7ca0a 100644 --- a/packages/atomic/src/components/commerce/product-template-components/atomic-product-rating/atomic-product-rating.tsx +++ b/packages/atomic/src/components/commerce/product-template-components/atomic-product-rating/atomic-product-rating.tsx @@ -40,6 +40,7 @@ export class AtomicProductRating /** * The field whose value you want to display next to the rating. This field can be used to display the number of reviews or the numerical value of the rating, for example. + * @type {string} */ @Prop({reflect: true}) public ratingDetailsField?: string; diff --git a/packages/atomic/src/components/commerce/product-template-components/atomic-product-rating/e2e/atomic-product-rating.e2e.ts b/packages/atomic/src/components/commerce/product-template-components/atomic-product-rating/e2e/atomic-product-rating.e2e.ts new file mode 100644 index 00000000000..41a991a724d --- /dev/null +++ b/packages/atomic/src/components/commerce/product-template-components/atomic-product-rating/e2e/atomic-product-rating.e2e.ts @@ -0,0 +1,82 @@ +import {test, expect} from './fixture'; + +test.describe('default', () => { + test.beforeEach(async ({productRating}) => { + await productRating.load(); + }); + + test('should be accessible', async ({productRating, makeAxeBuilder}) => { + await expect(productRating.hydrated.first()).toBeVisible(); + + expect((await makeAxeBuilder().analyze()).violations.length).toBe(0); + }); + + test('should have the right number of yellow icons', async ({ + productRating, + }) => { + await expect(productRating.blueLagoonYellowIcons).toHaveAttribute( + 'style', + 'width: 80%;' + ); + }); +}); + +test.describe('with a rating details field', () => { + test.beforeEach(async ({productRating}) => { + await productRating.load({story: 'with-a-rating-details-field'}); + }); + + test('should be accessible', async ({productRating, makeAxeBuilder}) => { + await expect(productRating.hydrated.first()).toBeVisible(); + + expect((await makeAxeBuilder().analyze()).violations.length).toBe(0); + }); + + test('should show the rating details next to the rating', async ({ + productRating, + }) => { + await expect(productRating.hydrated.first().getByText('4')).toBeVisible(); + }); +}); + +test.describe('with a max value in index of 10', () => { + test.beforeEach(async ({productRating}) => { + await productRating.load({story: 'with-a-max-value-in-index'}); + }); + + test('should be accessible', async ({productRating, makeAxeBuilder}) => { + await expect(productRating.hydrated.first()).toBeVisible(); + + expect((await makeAxeBuilder().analyze()).violations.length).toBe(0); + }); + + test('should have the right number of yellow icons', async ({ + productRating, + }) => { + await expect(productRating.blueLagoonYellowIcons).toHaveAttribute( + 'style', + 'width: 40%;' + ); + }); +}); + +test.describe('with a different icon', () => { + test.beforeEach(async ({productRating}) => { + await productRating.load({story: 'with-a-different-icon'}); + }); + + test('should be accessible', async ({productRating, makeAxeBuilder}) => { + await expect(productRating.hydrated.first()).toBeVisible(); + + expect((await makeAxeBuilder().analyze()).violations.length).toBe(0); + }); + + test('should have the right number of yellow icons', async ({ + productRating, + }) => { + await expect(productRating.blueLagoonYellowIcons).toHaveAttribute( + 'style', + 'width: 80%;' + ); + }); +}); diff --git a/packages/atomic/src/components/commerce/product-template-components/atomic-product-rating/e2e/fixture.ts b/packages/atomic/src/components/commerce/product-template-components/atomic-product-rating/e2e/fixture.ts new file mode 100644 index 00000000000..0d4b561145d --- /dev/null +++ b/packages/atomic/src/components/commerce/product-template-components/atomic-product-rating/e2e/fixture.ts @@ -0,0 +1,19 @@ +import {test as base} from '@playwright/test'; +import { + makeAxeBuilder, + AxeFixture, +} from '../../../../../../playwright-utils/base-fixture'; +import {ProductRatingPageObject} from './page-object'; + +type MyFixtures = { + productRating: ProductRatingPageObject; +}; + +export const test = base.extend({ + makeAxeBuilder, + productRating: async ({page}, use) => { + await use(new ProductRatingPageObject(page)); + }, +}); + +export {expect} from '@playwright/test'; diff --git a/packages/atomic/src/components/commerce/product-template-components/atomic-product-rating/e2e/page-object.ts b/packages/atomic/src/components/commerce/product-template-components/atomic-product-rating/e2e/page-object.ts new file mode 100644 index 00000000000..a8c88fdcb98 --- /dev/null +++ b/packages/atomic/src/components/commerce/product-template-components/atomic-product-rating/e2e/page-object.ts @@ -0,0 +1,15 @@ +import {Page} from '@playwright/test'; +import {BasePageObject} from '../../../../../../playwright-utils/base-page-object'; + +export class ProductRatingPageObject extends BasePageObject<'atomic-product-rating'> { + constructor(page: Page) { + super(page, 'atomic-product-rating'); + } + + get blueLagoonYellowIcons() { + return this.page + .getByLabel('4 stars out of', {exact: false}) + .locator('div') + .nth(1); + } +} diff --git a/packages/atomic/src/components/commerce/product-template-components/error.ts b/packages/atomic/src/components/commerce/product-template-components/error.ts new file mode 100644 index 00000000000..133a3855d34 --- /dev/null +++ b/packages/atomic/src/components/commerce/product-template-components/error.ts @@ -0,0 +1,6 @@ +export class FieldValueIsNaNError extends Error { + constructor(field: string, value?: {}) { + super(`Could not parse "${value}" from field "${field}" as a number.`); + this.name = 'FieldValueIsNaNError'; + } +} diff --git a/packages/atomic/src/components/commerce/product-template-components/product-utils.ts b/packages/atomic/src/components/commerce/product-template-components/product-utils.ts index bce0b69cb26..2f7f54f5573 100644 --- a/packages/atomic/src/components/commerce/product-template-components/product-utils.ts +++ b/packages/atomic/src/components/commerce/product-template-components/product-utils.ts @@ -1,6 +1,19 @@ import {Product, ProductTemplatesHelpers} from '@coveo/headless/commerce'; import {readFromObject} from '../../../utils/object-utils'; import {CommerceBindings} from '../atomic-commerce-interface/atomic-commerce-interface'; +import {FieldValueIsNaNError} from './error'; + +export function parseValue(product: Product, field: string) { + const value = ProductTemplatesHelpers.getProductProperty(product, field); + if (value === null) { + return null; + } + const valueAsNumber = parseFloat(`${value}`); + if (Number.isNaN(valueAsNumber)) { + throw new FieldValueIsNaNError(field, value); + } + return valueAsNumber; +} export function getStringValueFromProductOrNull( product: Product, diff --git a/packages/atomic/src/components/commerce/product-template/atomic-product-template.new.stories.tsx b/packages/atomic/src/components/commerce/product-template/atomic-product-template.new.stories.tsx index 6b0ade161d2..c17be0b9499 100644 --- a/packages/atomic/src/components/commerce/product-template/atomic-product-template.new.stories.tsx +++ b/packages/atomic/src/components/commerce/product-template/atomic-product-template.new.stories.tsx @@ -1,12 +1,12 @@ -import {wrapInCommerceInterface} from '@coveo/atomic/storybookUtils/commerce/commerce-interface-wrapper'; -import {wrapInCommerceProductList} from '@coveo/atomic/storybookUtils/commerce/commerce-product-list-wrapper'; -import {parameters} from '@coveo/atomic/storybookUtils/common/common-meta-parameters'; -import {renderComponentWithoutCodeRoot} from '@coveo/atomic/storybookUtils/common/render-component'; +import {wrapInCommerceInterface} from '@coveo/atomic-storybook-utils/commerce/commerce-interface-wrapper'; +import {wrapInCommerceProductList} from '@coveo/atomic-storybook-utils/commerce/commerce-product-list-wrapper'; +import {wrapInCommerceRecommendationInterface} from '@coveo/atomic-storybook-utils/commerce/commerce-recommendation-interface-wrapper'; +import {wrapInCommerceRecommendationList} from '@coveo/atomic-storybook-utils/commerce/commerce-recommendation-list-wrapper'; +import {wrapInCommerceSearchBoxInstantProducts} from '@coveo/atomic-storybook-utils/commerce/commerce-searchbox-instant-products-wrapper'; +import {parameters} from '@coveo/atomic-storybook-utils/common/common-meta-parameters'; +import {renderComponentWithoutCodeRoot} from '@coveo/atomic-storybook-utils/common/render-component'; import type {Meta, StoryObj as Story} from '@storybook/web-components'; import {within} from 'shadow-dom-testing-library'; -import {wrapInCommerceRecommendationInterface} from '../../../../storybookUtils/commerce/commerce-recommendation-interface-wrapper'; -import {wrapInCommerceRecommendationList} from '../../../../storybookUtils/commerce/commerce-recommendation-list-wrapper'; -import {wrapInCommerceSearchBoxInstantProducts} from '../../../../storybookUtils/commerce/commerce-searchbox-instant-products-wrapper'; const TEMPLATE_EXAMPLE = `