@netless/telebox-insider 0.3.0-beta.10 → 0.3.0-beta.11
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/package.json
CHANGED
|
@@ -48,16 +48,16 @@ type ValConfig = {
|
|
|
48
48
|
export interface TeleBoxManager extends ValEnhancedResult<ValConfig> {}
|
|
49
49
|
|
|
50
50
|
export class TeleBoxManager {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
protected boxesStatus$: Map<string, TeleBoxState>;
|
|
52
|
+
protected lastNotMinimizedBoxesStatus$: Map<string, NotMinimizedBoxState>;
|
|
53
|
+
protected appMenu: AppMenu | undefined;
|
|
54
|
+
protected useBoxesStatus: boolean;
|
|
55
|
+
protected effectBoxesStatusTimer?: {
|
|
56
56
|
skipUpdate: boolean;
|
|
57
57
|
timer: number | undefined;
|
|
58
58
|
resolve?: (skipUpdate: boolean) => void;
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
protected effectLastNotMinimizedBoxStatusTimer?: {
|
|
61
61
|
skipUpdate: boolean;
|
|
62
62
|
timer: number | undefined;
|
|
63
63
|
resolve?: (skipUpdate: boolean) => void;
|
|
@@ -572,7 +572,7 @@ export class TeleBoxManager {
|
|
|
572
572
|
return this.boxesStatus$;
|
|
573
573
|
}
|
|
574
574
|
|
|
575
|
-
|
|
575
|
+
protected effectBoxStatusChange(){
|
|
576
576
|
if (!this.useBoxesStatus) {
|
|
577
577
|
return;
|
|
578
578
|
}
|
|
@@ -590,7 +590,7 @@ export class TeleBoxManager {
|
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
592
|
|
|
593
|
-
|
|
593
|
+
protected effectBoxesStatusTimerFunc(skipUpdate: boolean){
|
|
594
594
|
if (!this.useBoxesStatus) {
|
|
595
595
|
return;
|
|
596
596
|
}
|
|
@@ -734,7 +734,7 @@ export class TeleBoxManager {
|
|
|
734
734
|
this.effectLastNotMinimizedBoxStatusChange(skipUpdate);
|
|
735
735
|
}
|
|
736
736
|
|
|
737
|
-
|
|
737
|
+
protected async effectLastNotMinimizedBoxStatusChange(skipUpdate = false): Promise<void> {
|
|
738
738
|
if (!this.useBoxesStatus) {
|
|
739
739
|
if (this.effectLastNotMinimizedBoxStatusTimer && this.effectLastNotMinimizedBoxStatusTimer.timer) {
|
|
740
740
|
clearTimeout(this.effectLastNotMinimizedBoxStatusTimer.timer);
|
|
@@ -781,7 +781,7 @@ export class TeleBoxManager {
|
|
|
781
781
|
}
|
|
782
782
|
}
|
|
783
783
|
|
|
784
|
-
|
|
784
|
+
protected effectLastNotMinimizedBoxStatusFunc(skipUpdate = false){
|
|
785
785
|
if (!this.useBoxesStatus) {
|
|
786
786
|
return;
|
|
787
787
|
}
|
|
@@ -793,19 +793,10 @@ export class TeleBoxManager {
|
|
|
793
793
|
});
|
|
794
794
|
}
|
|
795
795
|
|
|
796
|
-
|
|
796
|
+
protected getUnabledBoxesStatusZIndex(): number {
|
|
797
797
|
return this.topBox ? this.topBox.zIndex : 99;
|
|
798
798
|
}
|
|
799
799
|
|
|
800
|
-
// private getTopBoxZIndex(): number {
|
|
801
|
-
// if (!this.useBoxesStatus) {
|
|
802
|
-
// return this.getUnabledBoxesStatusZIndex();
|
|
803
|
-
// }
|
|
804
|
-
// return [...this.boxes].filter((box) => box.boxStatus !== TELE_BOX_STATE.Minimized).reduce((maxZIndex, box) => {
|
|
805
|
-
// return Math.max(maxZIndex, box.zIndex);
|
|
806
|
-
// }, 100);
|
|
807
|
-
// }
|
|
808
|
-
|
|
809
800
|
/** Maximized box zIndex range: 100-299 */
|
|
810
801
|
public getMaxMaximizedBoxZIndex(): number {
|
|
811
802
|
if (!this.useBoxesStatus) {
|
|
@@ -1288,7 +1279,7 @@ export class TeleBoxManager {
|
|
|
1288
1279
|
}
|
|
1289
1280
|
}
|
|
1290
1281
|
|
|
1291
|
-
|
|
1282
|
+
protected getMaximizedTopBox(): MaxTitleBarTeleBox | undefined {
|
|
1292
1283
|
if (!this.useBoxesStatus) {
|
|
1293
1284
|
return undefined;
|
|
1294
1285
|
}
|