@ninetailed/experience.js-react 6.4.1 → 7.1.0-beta.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/index.cjs +33 -1718
- package/index.js +41 -1726
- package/lib/NinetailedProvider.d.ts +4 -2
- package/lib/useProfile.d.ts +1 -6
- package/package.json +8 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Ninetailed, NinetailedPlugin } from '@ninetailed/experience.js';
|
|
3
|
-
import { Profile, Locale, OnErrorHandler, OnLogHandler } from '@ninetailed/experience.js-shared';
|
|
2
|
+
import { Ninetailed, NinetailedPlugin, Storage } from '@ninetailed/experience.js';
|
|
3
|
+
import { Profile, Locale, OnErrorHandler, OnLogHandler, NinetailedRequestContext } from '@ninetailed/experience.js-shared';
|
|
4
4
|
export type NinetailedProviderInstantiationProps = {
|
|
5
5
|
clientId: string;
|
|
6
6
|
environment?: string;
|
|
@@ -13,6 +13,8 @@ export type NinetailedProviderInstantiationProps = {
|
|
|
13
13
|
onLog?: OnLogHandler;
|
|
14
14
|
onError?: OnErrorHandler;
|
|
15
15
|
componentViewTrackingThreshold?: number;
|
|
16
|
+
buildClientContext?: () => NinetailedRequestContext;
|
|
17
|
+
storageImpl?: Storage;
|
|
16
18
|
};
|
|
17
19
|
export type NinetailedProviderProps = NinetailedProviderInstantiationProps | {
|
|
18
20
|
ninetailed: Ninetailed;
|
package/lib/useProfile.d.ts
CHANGED
|
@@ -3,12 +3,7 @@ export declare const useProfile: () => {
|
|
|
3
3
|
from: "api" | "hydrated";
|
|
4
4
|
status: "loading";
|
|
5
5
|
profile: null;
|
|
6
|
-
error: null;
|
|
7
|
-
* This effect compares the old and new profile state before updating it.
|
|
8
|
-
* We use a ref to avoid an infinite loop which can happen when an empty profile state was updated with no changes.
|
|
9
|
-
* This behaviour occurred as the validation handling on the error property was not set properly in the "CreateProfile" and "UpdateProfile" endpoint types.
|
|
10
|
-
* Furthermore, it was also observed, that it "only" occurred when the preview plugin was used in parallel.
|
|
11
|
-
*/
|
|
6
|
+
error: null;
|
|
12
7
|
} | {
|
|
13
8
|
loading: boolean;
|
|
14
9
|
from: "api" | "hydrated";
|
package/package.json
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ninetailed/experience.js-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.1.0-beta.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": ">=16.8.0"
|
|
6
6
|
},
|
|
7
|
+
"module": "./index.js",
|
|
8
|
+
"main": "./index.cjs",
|
|
9
|
+
"type": "module",
|
|
10
|
+
"types": "./index.d.ts",
|
|
7
11
|
"dependencies": {
|
|
8
|
-
"@
|
|
9
|
-
"react-visibility-sensor": "5.1.1",
|
|
10
|
-
"@ninetailed/experience.js": "6.4.1",
|
|
12
|
+
"@ninetailed/experience.js": "7.1.0-beta.0",
|
|
11
13
|
"react-is": "18.2.0",
|
|
12
|
-
"@ninetailed/experience.js-shared": "
|
|
14
|
+
"@ninetailed/experience.js-shared": "7.1.0-beta.0",
|
|
13
15
|
"radash": "10.9.0",
|
|
14
16
|
"react-intersection-observer": "8.34.0"
|
|
15
|
-
}
|
|
16
|
-
"module": "./index.js",
|
|
17
|
-
"main": "./index.cjs",
|
|
18
|
-
"type": "module",
|
|
19
|
-
"types": "./index.d.ts"
|
|
17
|
+
}
|
|
20
18
|
}
|