@netless/telebox-insider 0.3.0-beta.7 → 0.3.0-beta.9
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.d.ts +2 -1
- package/dist/telebox-insider.cjs.js +18 -9
- package/dist/telebox-insider.cjs.js.map +1 -1
- package/dist/telebox-insider.es.js +18 -9
- package/dist/telebox-insider.es.js.map +1 -1
- package/package.json +1 -1
- package/src/AppMenu/index.ts +9 -1
- package/src/TeleBoxManager/index.ts +12 -8
|
@@ -2877,6 +2877,13 @@ class AppMenu {
|
|
|
2877
2877
|
c(className) {
|
|
2878
2878
|
return `${this.namespace}-${className}`;
|
|
2879
2879
|
}
|
|
2880
|
+
setContainer(container) {
|
|
2881
|
+
if (this.container) {
|
|
2882
|
+
this.container.remove();
|
|
2883
|
+
}
|
|
2884
|
+
this.container = container;
|
|
2885
|
+
this.init();
|
|
2886
|
+
}
|
|
2880
2887
|
createDefaultAppMenu() {
|
|
2881
2888
|
this.badge.classList.add(this.c("app-menu-badge"));
|
|
2882
2889
|
this.menuView.classList.add(this.c("app-menu-tooltip"));
|
|
@@ -3053,6 +3060,9 @@ class TeleBoxManager {
|
|
|
3053
3060
|
collector2.setVisible(minimized$.value);
|
|
3054
3061
|
collector2.setReadonly(readonly$.value);
|
|
3055
3062
|
collector2.setDarkMode(this._darkMode$.value);
|
|
3063
|
+
if (this.useBoxesStatus && this.appMenu) {
|
|
3064
|
+
this.appMenu.setContainer(collector2.$appMenuContainer);
|
|
3065
|
+
}
|
|
3056
3066
|
this._sideEffect.add(() => {
|
|
3057
3067
|
collector2.getBoxesStatus = () => {
|
|
3058
3068
|
return this.boxesStatus$;
|
|
@@ -3222,7 +3232,7 @@ class TeleBoxManager {
|
|
|
3222
3232
|
const box = this.getBox(targetBox.id);
|
|
3223
3233
|
if (box) {
|
|
3224
3234
|
let isFocusChanged = false;
|
|
3225
|
-
if (
|
|
3235
|
+
if (box.focus) {
|
|
3226
3236
|
this.blurBox(box);
|
|
3227
3237
|
isFocusChanged = true;
|
|
3228
3238
|
}
|
|
@@ -3252,7 +3262,7 @@ class TeleBoxManager {
|
|
|
3252
3262
|
const box = this.getBox(targetBox.id);
|
|
3253
3263
|
if (box) {
|
|
3254
3264
|
let isFocusChanged = false;
|
|
3255
|
-
if (
|
|
3265
|
+
if (box.focus) {
|
|
3256
3266
|
this.blurBox(box);
|
|
3257
3267
|
isFocusChanged = true;
|
|
3258
3268
|
}
|
|
@@ -3398,13 +3408,12 @@ class TeleBoxManager {
|
|
|
3398
3408
|
}
|
|
3399
3409
|
});
|
|
3400
3410
|
this.effectBoxStatusChange();
|
|
3411
|
+
console.log("effectBoxesStatusTimerFunc===>newTopBox", newTopBox, curTopBox);
|
|
3401
3412
|
if (newTopBox && curTopBox !== newTopBox) {
|
|
3402
3413
|
this.topBox$.setValue(newTopBox);
|
|
3403
|
-
this.focusBox(newTopBox, skipUpdate);
|
|
3404
3414
|
}
|
|
3405
3415
|
if (!newTopBox && curTopBox) {
|
|
3406
3416
|
this.topBox$.setValue(void 0);
|
|
3407
|
-
this.blurBox(curTopBox, skipUpdate);
|
|
3408
3417
|
}
|
|
3409
3418
|
}
|
|
3410
3419
|
async effectBoxesStatusChange(skipUpdate = false) {
|
|
@@ -3660,12 +3669,9 @@ class TeleBoxManager {
|
|
|
3660
3669
|
}
|
|
3661
3670
|
});
|
|
3662
3671
|
box._delegateEvents.on(TELE_BOX_DELEGATE_EVENT.Minimize, () => {
|
|
3663
|
-
var _a2;
|
|
3664
3672
|
if (box.boxStatus && this.useBoxesStatus) {
|
|
3665
|
-
if (
|
|
3666
|
-
|
|
3667
|
-
this.blurBox(this.topBox);
|
|
3668
|
-
}
|
|
3673
|
+
if (box.focus) {
|
|
3674
|
+
this.blurBox(box);
|
|
3669
3675
|
}
|
|
3670
3676
|
this.setBox(box, {
|
|
3671
3677
|
status: TELE_BOX_STATE.Minimized,
|
|
@@ -3678,6 +3684,9 @@ class TeleBoxManager {
|
|
|
3678
3684
|
}
|
|
3679
3685
|
});
|
|
3680
3686
|
box._delegateEvents.on(TELE_BOX_DELEGATE_EVENT.Close, () => {
|
|
3687
|
+
if (this.useBoxesStatus && box.focus) {
|
|
3688
|
+
this.blurBox(box);
|
|
3689
|
+
}
|
|
3681
3690
|
this.remove(box);
|
|
3682
3691
|
this.focusTopBox();
|
|
3683
3692
|
});
|