pb-sxp-ui 1.15.20-alpha.2 → 1.15.20-alpha.4
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/dist/index.cjs +2 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -24
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +4 -4
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +4 -4
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +6 -27
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +4 -4
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/context/SxpDataSourceProvider.js +2 -5
- package/lib/core/context/SxpDataSourceProvider.js +2 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -8,7 +8,6 @@ var pako = require('pako');
|
|
8
8
|
var React = require('react');
|
9
9
|
var qs = require('qs');
|
10
10
|
var EventEmitter = require('eventemitter3');
|
11
|
-
var CryptoJS = require('crypto-js');
|
12
11
|
var css = require('@emotion/css');
|
13
12
|
var ReactDOM = require('react-dom');
|
14
13
|
|
@@ -633,25 +632,6 @@ const Consent$3 = ({ width = window.innerWidth, height = window.innerHeight, pri
|
|
633
632
|
};
|
634
633
|
var Consent$4 = React.memo(Consent$3);
|
635
634
|
|
636
|
-
/*
|
637
|
-
* @Author: binruan@chatlabs.com
|
638
|
-
* @Date: 2025-03-24 17:20:35
|
639
|
-
* @LastEditors: binruan@chatlabs.com
|
640
|
-
* @LastEditTime: 2025-04-27 13:43:15
|
641
|
-
* @FilePath: \pb-sxp-ui\src\core\utils\cryptojs.ts
|
642
|
-
*
|
643
|
-
*/
|
644
|
-
// 使用CryptoJS实现
|
645
|
-
function encrypt(text, key) {
|
646
|
-
const encrypted = CryptoJS.AES.encrypt(text, CryptoJS.enc.Utf8.parse(key), // 密钥
|
647
|
-
{
|
648
|
-
iv: CryptoJS.enc.Utf8.parse(key), // IV是密钥的字节
|
649
|
-
mode: CryptoJS.mode.CBC,
|
650
|
-
padding: CryptoJS.pad.Pkcs7
|
651
|
-
});
|
652
|
-
return encrypted.ciphertext.toString(CryptoJS.enc.Base64);
|
653
|
-
}
|
654
|
-
|
655
635
|
const SxpDataSourceContext = React.createContext({
|
656
636
|
rtcList: [],
|
657
637
|
tagList: []
|
@@ -766,10 +746,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
766
746
|
// 事件上报优化
|
767
747
|
// Beacon API 用于发送异步和非阻塞请求到服务器。这类请求不需要响应。
|
768
748
|
if (options.type === 'beacon' && navigator.sendBeacon) {
|
769
|
-
return navigator.sendBeacon(`${url}/api/${path}`, new Blob([
|
770
|
-
|
771
|
-
], {
|
772
|
-
type: 'application/json;charset=UTF-8'
|
749
|
+
return navigator.sendBeacon(`${url}/api/${path}`, new Blob([JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))], {
|
750
|
+
type: 'text/plain'
|
773
751
|
}));
|
774
752
|
}
|
775
753
|
return window
|