pb-sxp-ui 1.15.20-alpha.2 → 1.15.20-alpha.3

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/pb-ui.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('uuid'), require('pako'), require('react'), require('qs'), require('eventemitter3'), require('crypto-js'), require('@emotion/css'), require('react-dom')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'uuid', 'pako', 'react', 'qs', 'eventemitter3', 'crypto-js', '@emotion/css', 'react-dom'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PUI = {}, global.lodash, global.uuid$1, global.pako, global.React, global.qs, global.EventEmitter, global.CryptoJS, global.css, global.ReactDOM));
5
- })(this, (function (exports, lodash, uuid$1, pako, React, qs, EventEmitter, CryptoJS, css, ReactDOM) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('uuid'), require('pako'), require('react'), require('qs'), require('eventemitter3'), require('@emotion/css'), require('react-dom')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'uuid', 'pako', 'react', 'qs', 'eventemitter3', '@emotion/css', 'react-dom'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PUI = {}, global.lodash, global.uuid$1, global.pako, global.React, global.qs, global.EventEmitter, global.css, global.ReactDOM));
5
+ })(this, (function (exports, lodash, uuid$1, pako, React, qs, EventEmitter, css, ReactDOM) { 'use strict';
6
6
 
7
7
  function _interopNamespaceDefault(e) {
8
8
  var n = Object.create(null);
@@ -625,25 +625,6 @@
625
625
  };
626
626
  var Consent$4 = React.memo(Consent$3);
627
627
 
628
- /*
629
- * @Author: binruan@chatlabs.com
630
- * @Date: 2025-03-24 17:20:35
631
- * @LastEditors: binruan@chatlabs.com
632
- * @LastEditTime: 2025-04-27 13:43:15
633
- * @FilePath: \pb-sxp-ui\src\core\utils\cryptojs.ts
634
- *
635
- */
636
- // 使用CryptoJS实现
637
- function encrypt(text, key) {
638
- const encrypted = CryptoJS.AES.encrypt(text, CryptoJS.enc.Utf8.parse(key), // 密钥
639
- {
640
- iv: CryptoJS.enc.Utf8.parse(key), // IV是密钥的字节
641
- mode: CryptoJS.mode.CBC,
642
- padding: CryptoJS.pad.Pkcs7
643
- });
644
- return encrypted.ciphertext.toString(CryptoJS.enc.Base64);
645
- }
646
-
647
628
  const SxpDataSourceContext = React.createContext({
648
629
  rtcList: [],
649
630
  tagList: []
@@ -758,11 +739,9 @@
758
739
  // 事件上报优化
759
740
  // Beacon API 用于发送异步和非阻塞请求到服务器。这类请求不需要响应。
760
741
  if (options.type === 'beacon' && navigator.sendBeacon) {
761
- return navigator.sendBeacon(`${url}/api/${path}`, new Blob([
762
- encrypt(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId })), 'dcAR82I0b8sgwCku')
763
- ], {
764
- type: 'application/json;charset=UTF-8'
765
- }));
742
+ const formData = new FormData();
743
+ formData.append('data', JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId })));
744
+ return navigator.sendBeacon(`${url}/api/${path}`, formData);
766
745
  }
767
746
  return window
768
747
  .fetch(`${url}/api/${path}`, {