@coveo/headless-react 2.7.0-pre.f3edc21585 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
## Learn more
|
|
14
14
|
|
|
15
|
-
- Checkout our [Documentation for SSR Search](https://docs.coveo.com/en/headless/latest/usage/headless-server-side-rendering/) and refer to [samples/headless-ssr](https://github.com/coveo/ui-kit/tree/
|
|
16
|
-
- Checkout our [Documentation for SSR Commerce](https://docs.coveo.com/en/obif0156) and refer to [samples/headless-ssr-commerce](https://github.com/coveo/ui-kit/tree/
|
|
15
|
+
- Checkout our [Documentation for SSR Search](https://docs.coveo.com/en/headless/latest/usage/headless-server-side-rendering/) and refer to [samples/headless-ssr](https://github.com/coveo/ui-kit/tree/main/samples/headless-ssr) for examples.
|
|
16
|
+
- Checkout our [Documentation for SSR Commerce](https://docs.coveo.com/en/obif0156) and refer to [samples/headless-ssr/commerce-express](https://github.com/coveo/ui-kit/tree/main/samples/headless-ssr/commerce-express), [samples/headless-ssr/commerce-nextjs](https://github.com/coveo/ui-kit/tree/main/samples/headless-ssr/commerce-nextjs), or [samples/headless-ssr/commerce-react-router](https://github.com/coveo/ui-kit/tree/main/samples/headless-ssr/commerce-react-router) for examples.
|
|
17
17
|
- For the latest features and upcoming breaking changes, see the `ssr-next` and `ssr-commerce-next` sub-packages and their respective documentation and samples.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import { ResultType } from '@coveo/headless/ssr-commerce';
|
|
2
3
|
const createMockProduct = (overrides = {}) => ({
|
|
3
4
|
additionalFields: {},
|
|
4
5
|
children: [],
|
|
@@ -22,6 +23,7 @@ const createMockProduct = (overrides = {}) => ({
|
|
|
22
23
|
permanentid: randomUUID(),
|
|
23
24
|
position: 1,
|
|
24
25
|
totalNumberOfChildren: 0,
|
|
26
|
+
resultType: ResultType.PRODUCT,
|
|
25
27
|
...overrides,
|
|
26
28
|
});
|
|
27
29
|
export const generateMockProducts = (count) => Array.from({ length: count }, (_, index) => createMockProduct({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-products.js","sourceRoot":"","sources":["../../src/__tests__/mock-products.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"mock-products.js","sourceRoot":"","sources":["../../src/__tests__/mock-products.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAExD,MAAM,iBAAiB,GAAG,CAAC,YAA8B,EAAE,EAAW,EAAE,CAAC,CAAC;IACxE,gBAAgB,EAAE,EAAE;IACpB,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,CAAC,eAAe,CAAC;IAC9B,QAAQ,EAAE,YAAY;IACtB,cAAc,EAAE,kBAAkB;IAClC,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,EAAE;IACb,WAAW,EAAE,IAAI;IACjB,gBAAgB,EAAE,YAAY;IAC9B,UAAU,EAAE,cAAc;IAC1B,OAAO,EAAE,cAAc;IACvB,QAAQ,EAAE,KAAK;IACf,aAAa,EAAE,UAAU,EAAE;IAC3B,cAAc,EAAE,KAAK;IACrB,SAAS,EAAE,GAAG;IACd,YAAY,EAAE,wBAAwB;IACtC,aAAa,EAAE,EAAE;IACjB,WAAW,EAAE,UAAU,EAAE;IACzB,QAAQ,EAAE,CAAC;IACX,qBAAqB,EAAE,CAAC;IACxB,UAAU,EAAE,UAAU,CAAC,OAAO;IAC9B,GAAG,SAAS;CACb,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAa,EAAa,EAAE,CAC/D,KAAK,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,KAAK,EAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CACvC,iBAAiB,CAAC;IAChB,OAAO,EAAE,WAAW,KAAK,GAAG,CAAC,EAAE;IAC/B,QAAQ,EAAE,KAAK,GAAG,CAAC;CACpB,CAAC,CACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coveo/headless-react",
|
|
3
|
-
"version": "2.7.0
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "React utilities for SSR (Server Side Rendering) with headless",
|
|
5
5
|
"homepage": "https://docs.coveo.com/en/headless/latest/",
|
|
6
6
|
"repository": {
|
|
@@ -25,31 +25,15 @@
|
|
|
25
25
|
"files": [
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
|
-
"scripts": {
|
|
29
|
-
"build": "tsc --project ./tsconfig.build.json",
|
|
30
|
-
"clean": "rimraf dist",
|
|
31
|
-
"test": "vitest run",
|
|
32
|
-
"test:watch": "vitest",
|
|
33
|
-
"release:phase3": "npm run-script -w=@coveo/ci npm-publish",
|
|
34
|
-
"release:phase1": "npm run-script -w=@coveo/ci bump",
|
|
35
|
-
"promote:npm:latest": "npm run-script -w=@coveo/ci promote-npm-prod",
|
|
36
|
-
"build:typedoc": "npm run build:typedoc:docs && npm run build:typedoc:merge",
|
|
37
|
-
"build:typedoc:docs": "concurrently \"npm run build:typedoc:ssr\" \"npm run build:typedoc:ssr-commerce\"",
|
|
38
|
-
"build:typedoc:ssr": "typedoc --json ./temp/ssr.json --tsconfig tsconfig.json --options typedoc-configs/ssr.typedoc.json",
|
|
39
|
-
"build:typedoc:ssr-commerce": "typedoc --json ./temp/ssr-commerce.json --tsconfig tsconfig.json --options typedoc-configs/ssr-commerce.typedoc.json",
|
|
40
|
-
"build:typedoc:merge": "typedoc --tsconfig tsconfig.typedoc.json",
|
|
41
|
-
"serve:typedoc": "live-server ./docs"
|
|
42
|
-
},
|
|
43
28
|
"dependencies": {
|
|
44
|
-
"@coveo/headless": "3.
|
|
29
|
+
"@coveo/headless": "3.36.0"
|
|
45
30
|
},
|
|
46
31
|
"devDependencies": {
|
|
47
32
|
"@testing-library/react": "16.3.0",
|
|
48
33
|
"live-server": "1.2.2",
|
|
49
|
-
"rimraf": "6.0.1",
|
|
50
34
|
"typescript": "5.8.3",
|
|
51
|
-
"typedoc": "0.28.
|
|
52
|
-
"vitest": "
|
|
35
|
+
"typedoc": "0.28.13",
|
|
36
|
+
"vitest": "4.0.10",
|
|
53
37
|
"@coveo/documentation": "1.0.0"
|
|
54
38
|
},
|
|
55
39
|
"peerDependencies": {
|
|
@@ -68,5 +52,20 @@
|
|
|
68
52
|
},
|
|
69
53
|
"engines": {
|
|
70
54
|
"node": "^20.9.0 || ^22.11.0"
|
|
55
|
+
},
|
|
56
|
+
"scripts": {
|
|
57
|
+
"build": "tsc --project ./tsconfig.build.json",
|
|
58
|
+
"clean": "node ../../utils/ci/rm-rf.mjs dist",
|
|
59
|
+
"test": "vitest run",
|
|
60
|
+
"test:watch": "vitest",
|
|
61
|
+
"release:phase3": "pnpm --filter @coveo/ci npm-publish",
|
|
62
|
+
"release:phase1": "pnpm --filter @coveo/ci bump",
|
|
63
|
+
"promote:npm:latest": "pnpm --filter @coveo/ci promote-npm-prod",
|
|
64
|
+
"build:typedoc": "pnpm run build:typedoc:docs && pnpm run build:typedoc:merge",
|
|
65
|
+
"build:typedoc:docs": "concurrently \"pnpm run build:typedoc:ssr\" \"pnpm run build:typedoc:ssr-commerce\"",
|
|
66
|
+
"build:typedoc:ssr": "typedoc --json ./temp/ssr.json --tsconfig tsconfig.json --options typedoc-configs/ssr.typedoc.json",
|
|
67
|
+
"build:typedoc:ssr-commerce": "typedoc --json ./temp/ssr-commerce.json --tsconfig tsconfig.json --options typedoc-configs/ssr-commerce.typedoc.json",
|
|
68
|
+
"build:typedoc:merge": "typedoc --tsconfig tsconfig.typedoc.json",
|
|
69
|
+
"serve:typedoc": "live-server ./docs"
|
|
71
70
|
}
|
|
72
71
|
}
|