@kameleoon/react-sdk 10.11.0 → 10.12.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/CHANGELOG.md +24 -2
- package/dist/createClient.js +1 -1
- package/dist/interfaces/useData.d.ts +2 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,30 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## 10.
|
|
3
|
+
## 10.12.0 (2025-06-27)
|
|
4
4
|
|
|
5
|
-
### Features
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- Added support for using a Custom Data value for traffic bucketing instead of the default visitor code. [Learn More](https://help.kameleoon.com/create-feature-flag/#Advanced_Flag_Settings).
|
|
8
|
+
- Added support for **304 (Not Modified)** responses from the SDK config service to avoid redundant updates and reduce traffic when the configuration hasn't changed.
|
|
9
|
+
- Added new optional parameter `instant` to the [`flush`][flush] method, allowing data to be sent to the server immediately without waiting for the next scheduled flush cycle.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
- @kameleoon/javascript-sdk@4.11.0
|
|
15
|
+
|
|
16
|
+
## 10.11.1 (2025-06-26)
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Fixed synchronization of the **visitor's legal consent** with the Kameleoon Engine (`engine.js`) when the SDK was initialized before the consent value was set.
|
|
21
|
+
- Fixed a potential error: `Cannot read property 'createCondition' of undefined`, which could occur due to differences in how various JavaScript bundlers or module loaders handle dependency initialization timing.
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
- @kameleoon/javascript-sdk@4.10.1
|
|
24
|
+
|
|
25
|
+
## 10.11.0 (2025-05-26)
|
|
26
|
+
|
|
27
|
+
### Features
|
|
6
28
|
|
|
7
29
|
- Added automatic detection of the [`PageView`](pageView), [`Browser`](browser), [`Device`](device) and [`OperatingSystem`](operatingSystem) types for targeting and reporting purposes. However, it can still be manually overridden using the [`addData`](addData) method.
|
|
8
30
|
- Added support for a **New**/**Returning** visitor breakdown filter in reports.
|
package/dist/createClient.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _javascriptSdk=require("@kameleoon/javascript-sdk");Object.defineProperty(exports,"__esModule",{value:!0}),exports.createClient=createClient;function createClient(a){let{siteCode:b,configuration:c,externals:d,stubMode:e}=a;const f=new _javascriptSdk.KameleoonClient({siteCode:b,configuration:c,externals:d,_internals:{packageInfo:{type:_javascriptSdk.SdkLanguageType.REACT,version:"10.
|
|
1
|
+
"use strict";var _javascriptSdk=require("@kameleoon/javascript-sdk");Object.defineProperty(exports,"__esModule",{value:!0}),exports.createClient=createClient;function createClient(a){let{siteCode:b,configuration:c,externals:d,stubMode:e}=a;const f=new _javascriptSdk.KameleoonClient({siteCode:b,configuration:c,externals:d,_internals:{packageInfo:{type:_javascriptSdk.SdkLanguageType.REACT,version:"10.12.0",isServer:!1},prng:null===d||void 0===d?void 0:d.prng},stubMode:e});return f}
|
|
@@ -19,13 +19,14 @@ export default interface IUseData {
|
|
|
19
19
|
* execution starts with sending all previously failed tracking requests which were stored locally during the offline mode and then proceeds further.
|
|
20
20
|
*
|
|
21
21
|
* @param {string | undefined} visitorCode - unique visitor identification string, can't exceed 255 characters length.
|
|
22
|
+
* @param {boolean} instant - if `true`, the data will be sent immediately, otherwise it will be sent with the next tracking request.
|
|
22
23
|
* @throws `KameleoonError` with one of the following `type` s:
|
|
23
24
|
*
|
|
24
25
|
* - `KameleoonException.VisitorCodeMaxLength` - The visitor code length was exceeded
|
|
25
26
|
* - `KameleoonException.VisitorCodeEmpty` The visitor code is empty
|
|
26
27
|
* - `KameleoonException.Initialization` - Method was executed before the `kameleoonClient` completed it's `initialize` call.
|
|
27
28
|
*/
|
|
28
|
-
flush: (visitorCode?: string) => void;
|
|
29
|
+
flush: (visitorCode?: string, instant?: boolean) => void;
|
|
29
30
|
/**
|
|
30
31
|
* Creates and adds `Conversion` data to the visitor with specified parameters and executes `flushData`. Note: it's a helper method for the quick and convenient conversion tracking, however creating and adding `Conversion` manually allows more flexible `Conversion` with `negative` parameter.
|
|
31
32
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kameleoon/react-sdk",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.12.0",
|
|
4
4
|
"description": "Kameleoon React SDK",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
],
|
|
41
41
|
"license": "ISC",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@kameleoon/javascript-sdk": "4.
|
|
43
|
+
"@kameleoon/javascript-sdk": "4.11.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
|