• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atinc / ngx-tethys / 85b806b8-794f-4793-b127-9b12bd4fc630

21 Nov 2024 08:14AM UTC coverage: 90.325% (-0.02%) from 90.343%
85b806b8-794f-4793-b127-9b12bd4fc630

Pull #3264

circleci

web-flow
Merge branch 'master' into xl/#TINFR-602
Pull Request #3264: feat(dialog): support overlay toTop with dialogRef(#TINFR-602)

5531 of 6774 branches covered (81.65%)

Branch coverage included in aggregate %.

6 of 6 new or added lines in 4 files covered. (100.0%)

4 existing lines in 3 files now uncovered.

13243 of 14011 relevant lines covered (94.52%)

993.55 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.0
/src/dialog/dialog-ref.ts
1
import { GlobalPositionStrategy, OverlayRef } from '@angular/cdk/overlay';
2
import { ThyAbstractInternalOverlayRef, ThyAbstractOverlayPosition, ThyAbstractOverlayRef } from 'ngx-tethys/core';
3

4
import { ThyDialogContainer } from './dialog-container.component';
5
import { ThyDialogConfig } from './dialog.config';
6
import { dialogAbstractOverlayOptions } from './dialog.options';
7

111✔
8
/**
111✔
9
 * @publicApi
10
 * @order 30
11
 */
12
export interface ThyAbstractDialog {
13
    toTop(id: string): void;
14
}
15

112✔
16
export abstract class ThyDialogRef<T, TResult = unknown> extends ThyAbstractOverlayRef<T, ThyDialogContainer, TResult> {}
112✔
17

18
export class ThyInternalDialogRef<T, TResult = unknown> extends ThyAbstractInternalOverlayRef<T, ThyDialogContainer, TResult> {
19
    abstractDialog: ThyAbstractDialog;
20

21
    constructor(
22
        overlayRef: OverlayRef,
23
        containerInstance: ThyDialogContainer,
220✔
24
        config: ThyDialogConfig<T>,
111✔
25
        abstractDialog: ThyAbstractDialog
111✔
26
    ) {
111✔
27
        super(dialogAbstractOverlayOptions, overlayRef, containerInstance, config);
28
        this.abstractDialog = abstractDialog;
29
    }
30

31
    /**
UNCOV
32
     * Updates the dialog's position.
×
33
     * @param position New dialog position.
34
     */
35
    updatePosition(position?: ThyAbstractOverlayPosition): this {
36
        this.updateGlobalPosition(position);
37
        return this;
38
    }
39

40
    /**
41
     * Updates the dialog's width and height.
42
     * @param width New width of the dialog.
43
     * @param height New height of the dialog.
44
     */
45
    updateSizeAndPosition(width: string = '', height: string = '', position?: ThyAbstractOverlayPosition): this {
46
        (this.getPositionStrategy() as GlobalPositionStrategy).width(width).height(height);
47
        this.updatePosition(position);
48
        return this;
49
    }
50

51
    /**
52
     * Update dialog to top
53
     */
54
    toTop() {
55
        this.abstractDialog.toTop(this.id);
56
    }
57
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc