customer-chat-sdk 1.3.6 → 1.3.7
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/customer-sdk.cjs.js +15 -19
- package/dist/customer-sdk.esm.js +15 -19
- package/dist/customer-sdk.min.js +4 -4
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/customer-sdk.cjs.js
CHANGED
|
@@ -29685,13 +29685,9 @@ class CustomerServiceSDK {
|
|
|
29685
29685
|
timestamp: Date.now()
|
|
29686
29686
|
};
|
|
29687
29687
|
// 处理图标管理器(优化:如果配置没变化,保留图标避免闪烁)
|
|
29688
|
-
//
|
|
29689
|
-
const iconPosition =
|
|
29690
|
-
|
|
29691
|
-
: (this.lastIconConfig?.position || undefined);
|
|
29692
|
-
const iconTarget = options?.target !== undefined
|
|
29693
|
-
? options.target
|
|
29694
|
-
: (this.lastIconConfig?.target || undefined);
|
|
29688
|
+
// target 和 iconPosition 只从 config 读取
|
|
29689
|
+
const iconPosition = config.iconPosition ?? this.lastIconConfig?.position;
|
|
29690
|
+
const iconTarget = config.target ?? this.lastIconConfig?.target;
|
|
29695
29691
|
// 检查图标配置是否变化
|
|
29696
29692
|
const iconConfigChanged = this.isIconConfigChanged(iconPosition, iconTarget);
|
|
29697
29693
|
if (iconConfigChanged) {
|
|
@@ -29704,12 +29700,12 @@ class CustomerServiceSDK {
|
|
|
29704
29700
|
}
|
|
29705
29701
|
}
|
|
29706
29702
|
this.iconManager = new IconManager(iconPosition, this.debug, iconTarget, {
|
|
29707
|
-
sideAttach:
|
|
29708
|
-
sideHideRatio:
|
|
29709
|
-
magnetic:
|
|
29710
|
-
magneticDirection:
|
|
29711
|
-
margin:
|
|
29712
|
-
autoAttachDelay:
|
|
29703
|
+
sideAttach: config.sideAttach ?? true,
|
|
29704
|
+
sideHideRatio: config.sideHideRatio ?? 0.5,
|
|
29705
|
+
magnetic: config.magnetic ?? true,
|
|
29706
|
+
magneticDirection: config.magneticDirection ?? 'x',
|
|
29707
|
+
margin: config.margin ?? 10,
|
|
29708
|
+
autoAttachDelay: config.autoAttachDelay ?? 3000
|
|
29713
29709
|
});
|
|
29714
29710
|
await this.iconManager.show();
|
|
29715
29711
|
// 保存新的配置
|
|
@@ -29720,12 +29716,12 @@ class CustomerServiceSDK {
|
|
|
29720
29716
|
if (!this.iconManager) {
|
|
29721
29717
|
// 如果不存在,创建新的
|
|
29722
29718
|
this.iconManager = new IconManager(iconPosition, this.debug, iconTarget, {
|
|
29723
|
-
sideAttach:
|
|
29724
|
-
sideHideRatio:
|
|
29725
|
-
magnetic:
|
|
29726
|
-
magneticDirection:
|
|
29727
|
-
margin:
|
|
29728
|
-
autoAttachDelay:
|
|
29719
|
+
sideAttach: config.sideAttach ?? true,
|
|
29720
|
+
sideHideRatio: config.sideHideRatio ?? 0.5,
|
|
29721
|
+
magnetic: config.magnetic ?? true,
|
|
29722
|
+
magneticDirection: config.magneticDirection ?? 'x',
|
|
29723
|
+
margin: config.margin ?? 10,
|
|
29724
|
+
autoAttachDelay: config.autoAttachDelay ?? 3000
|
|
29729
29725
|
});
|
|
29730
29726
|
await this.iconManager.show();
|
|
29731
29727
|
}
|
package/dist/customer-sdk.esm.js
CHANGED
|
@@ -29681,13 +29681,9 @@ class CustomerServiceSDK {
|
|
|
29681
29681
|
timestamp: Date.now()
|
|
29682
29682
|
};
|
|
29683
29683
|
// 处理图标管理器(优化:如果配置没变化,保留图标避免闪烁)
|
|
29684
|
-
//
|
|
29685
|
-
const iconPosition =
|
|
29686
|
-
|
|
29687
|
-
: (this.lastIconConfig?.position || undefined);
|
|
29688
|
-
const iconTarget = options?.target !== undefined
|
|
29689
|
-
? options.target
|
|
29690
|
-
: (this.lastIconConfig?.target || undefined);
|
|
29684
|
+
// target 和 iconPosition 只从 config 读取
|
|
29685
|
+
const iconPosition = config.iconPosition ?? this.lastIconConfig?.position;
|
|
29686
|
+
const iconTarget = config.target ?? this.lastIconConfig?.target;
|
|
29691
29687
|
// 检查图标配置是否变化
|
|
29692
29688
|
const iconConfigChanged = this.isIconConfigChanged(iconPosition, iconTarget);
|
|
29693
29689
|
if (iconConfigChanged) {
|
|
@@ -29700,12 +29696,12 @@ class CustomerServiceSDK {
|
|
|
29700
29696
|
}
|
|
29701
29697
|
}
|
|
29702
29698
|
this.iconManager = new IconManager(iconPosition, this.debug, iconTarget, {
|
|
29703
|
-
sideAttach:
|
|
29704
|
-
sideHideRatio:
|
|
29705
|
-
magnetic:
|
|
29706
|
-
magneticDirection:
|
|
29707
|
-
margin:
|
|
29708
|
-
autoAttachDelay:
|
|
29699
|
+
sideAttach: config.sideAttach ?? true,
|
|
29700
|
+
sideHideRatio: config.sideHideRatio ?? 0.5,
|
|
29701
|
+
magnetic: config.magnetic ?? true,
|
|
29702
|
+
magneticDirection: config.magneticDirection ?? 'x',
|
|
29703
|
+
margin: config.margin ?? 10,
|
|
29704
|
+
autoAttachDelay: config.autoAttachDelay ?? 3000
|
|
29709
29705
|
});
|
|
29710
29706
|
await this.iconManager.show();
|
|
29711
29707
|
// 保存新的配置
|
|
@@ -29716,12 +29712,12 @@ class CustomerServiceSDK {
|
|
|
29716
29712
|
if (!this.iconManager) {
|
|
29717
29713
|
// 如果不存在,创建新的
|
|
29718
29714
|
this.iconManager = new IconManager(iconPosition, this.debug, iconTarget, {
|
|
29719
|
-
sideAttach:
|
|
29720
|
-
sideHideRatio:
|
|
29721
|
-
magnetic:
|
|
29722
|
-
magneticDirection:
|
|
29723
|
-
margin:
|
|
29724
|
-
autoAttachDelay:
|
|
29715
|
+
sideAttach: config.sideAttach ?? true,
|
|
29716
|
+
sideHideRatio: config.sideHideRatio ?? 0.5,
|
|
29717
|
+
magnetic: config.magnetic ?? true,
|
|
29718
|
+
magneticDirection: config.magneticDirection ?? 'x',
|
|
29719
|
+
margin: config.margin ?? 10,
|
|
29720
|
+
autoAttachDelay: config.autoAttachDelay ?? 3000
|
|
29725
29721
|
});
|
|
29726
29722
|
await this.iconManager.show();
|
|
29727
29723
|
}
|