@acontplus/ng-components 2.1.7 → 2.1.8
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.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { Type, AfterViewInit, OnDestroy, ViewContainerRef, ElementRef, OnInit, TemplateRef, OnChanges, SimpleChanges, InjectionToken, QueryList, TrackByFunction, KeyValueChangeRecord, PipeTransform } from '@angular/core';
|
|
2
|
+
import { Type, AfterViewInit, OnDestroy, ViewContainerRef, ElementRef, OnInit, TemplateRef, OnChanges, SimpleChanges, InjectionToken, QueryList, TrackByFunction, KeyValueChangeRecord, EventEmitter, ComponentRef, AfterContentInit, PipeTransform } from '@angular/core';
|
|
3
3
|
import { MatDialogRef } from '@angular/material/dialog';
|
|
4
4
|
import { ScrollStrategy } from '@angular/cdk/overlay';
|
|
5
5
|
import { FormControl, ControlValueAccessor } from '@angular/forms';
|
|
6
6
|
import { SelectOption, IconDefinition, ButtonVariant, ButtonType, MaterialButtonStyle, REPORT_FORMAT } from '@acontplus/ui-kit';
|
|
7
7
|
import { SafeHtml } from '@angular/platform-browser';
|
|
8
8
|
import { MatChipInputEvent, MatChipEditedEvent } from '@angular/material/chips';
|
|
9
|
-
import { LiveAnnouncer } from '@angular/cdk/a11y';
|
|
9
|
+
import { LiveAnnouncer, FocusOrigin } from '@angular/cdk/a11y';
|
|
10
10
|
import { Tabulator } from 'tabulator-tables';
|
|
11
11
|
import * as rxjs from 'rxjs';
|
|
12
12
|
import { Observable, Subject } from 'rxjs';
|
|
@@ -22,6 +22,8 @@ import { MatFormFieldControl } from '@angular/material/form-field';
|
|
|
22
22
|
import { DatexOptions } from 'datex-ui';
|
|
23
23
|
export { BOOTSTRAP_THEME, DEFAULT_THEME, Datex, DatexCallback, DatexLocale, DatexOptions, DatexTheme, MATERIAL_THEME, SPANISH_LOCALE, SPANISH_LOCALE_WITH_TIME } from 'datex-ui';
|
|
24
24
|
import { ComponentType } from '@angular/cdk/portal';
|
|
25
|
+
import { Direction } from '@angular/cdk/bidi';
|
|
26
|
+
import { DialogRole, CdkDialogContainer, DialogRef } from '@angular/cdk/dialog';
|
|
25
27
|
|
|
26
28
|
/**
|
|
27
29
|
* A versatile card component that wraps Angular Material's mat-card with additional functionality
|
|
@@ -1198,8 +1200,9 @@ declare class DataGrid<T = any> implements AfterViewInit, OnDestroy, OnChanges {
|
|
|
1198
1200
|
private _defaultOptions;
|
|
1199
1201
|
private _keyboardNavService;
|
|
1200
1202
|
private _destroy$;
|
|
1203
|
+
paginator: _angular_core.Signal<MatPaginator | undefined>;
|
|
1201
1204
|
table: MatTable<any>;
|
|
1202
|
-
|
|
1205
|
+
paginator1: MatPaginator;
|
|
1203
1206
|
sort: MatSort;
|
|
1204
1207
|
tableContainer: ElementRef<HTMLDivElement>;
|
|
1205
1208
|
rowDefs: QueryList<MatRowDef<any>>;
|
|
@@ -1221,7 +1224,7 @@ declare class DataGrid<T = any> implements AfterViewInit, OnDestroy, OnChanges {
|
|
|
1221
1224
|
noResultTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
1222
1225
|
paginationTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
1223
1226
|
summaryTemplate: _angular_core.InputSignal<TemplateRef<any> | DataGridCellTemplate | undefined>;
|
|
1224
|
-
size: _angular_core.InputSignal<"
|
|
1227
|
+
size: _angular_core.InputSignal<"small" | "medium" | "normal">;
|
|
1225
1228
|
headerCellTemplate: _angular_core.InputSignal<TemplateRef<any> | DataGridCellTemplate | undefined>;
|
|
1226
1229
|
expandable: _angular_core.InputSignal<boolean>;
|
|
1227
1230
|
expansionTemplate: _angular_core.InputSignal<TemplateRef<any> | null>;
|
|
@@ -1490,6 +1493,827 @@ declare class DateRangePicker<AsString extends boolean = true> implements OnInit
|
|
|
1490
1493
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DateRangePicker<any>, "acp-date-range-picker", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "placeholderText": { "alias": "placeholderText"; "required": false; "isSignal": true; }; "isDisabled": { "alias": "isDisabled"; "required": false; "isSignal": true; }; "inputReadonly": { "alias": "inputReadonly"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "formatOutputAsString": { "alias": "formatOutputAsString"; "required": false; "isSignal": true; }; "calendarIcon": { "alias": "calendarIcon"; "required": false; "isSignal": true; }; "showCalendarButton": { "alias": "showCalendarButton"; "required": false; "isSignal": true; }; "showCheckbox": { "alias": "showCheckbox"; "required": false; "isSignal": true; }; "checkboxChecked": { "alias": "checkboxChecked"; "required": false; "isSignal": true; }; "checkboxReadonly": { "alias": "checkboxReadonly"; "required": false; "isSignal": true; }; "checkboxAriaLabel": { "alias": "checkboxAriaLabel"; "required": false; "isSignal": true; }; "checkboxPosition": { "alias": "checkboxPosition"; "required": false; "isSignal": true; }; }, { "checkboxChecked": "checkboxCheckedChange"; "dateRangeSelected": "dateRangeSelected"; "pickerShow": "pickerShow"; "pickerHide": "pickerHide"; "pickerApply": "pickerApply"; "pickerCancel": "pickerCancel"; "checkboxChange": "checkboxChange"; }, never, never, true, never>;
|
|
1491
1494
|
}
|
|
1492
1495
|
|
|
1496
|
+
/** Options for where to set focus to automatically on dialog open. */
|
|
1497
|
+
type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';
|
|
1498
|
+
/** Possible overrides for a drawer's position. */
|
|
1499
|
+
type DrawerPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
1500
|
+
/**
|
|
1501
|
+
* Configuration used when opening a drawer.
|
|
1502
|
+
*
|
|
1503
|
+
* This class provides all the configuration options available when opening
|
|
1504
|
+
* a drawer, including positioning, sizing, behavior, and accessibility options.
|
|
1505
|
+
*
|
|
1506
|
+
* @template D The type of data to be injected into the drawer component
|
|
1507
|
+
*
|
|
1508
|
+
* @example
|
|
1509
|
+
* ```typescript
|
|
1510
|
+
* const config: AcpDrawerConfig = {
|
|
1511
|
+
* position: 'right',
|
|
1512
|
+
* width: '400px',
|
|
1513
|
+
* hasBackdrop: true,
|
|
1514
|
+
* disableClose: false,
|
|
1515
|
+
* data: { message: 'Hello from drawer!' },
|
|
1516
|
+
* ariaLabel: 'Settings drawer'
|
|
1517
|
+
* };
|
|
1518
|
+
*
|
|
1519
|
+
* this.drawer.open(MyDrawerComponent, config);
|
|
1520
|
+
* ```
|
|
1521
|
+
*/
|
|
1522
|
+
declare class AcpDrawerConfig<D = any> {
|
|
1523
|
+
/** The view container to place the overlay for the drawer into. */
|
|
1524
|
+
viewContainerRef?: ViewContainerRef;
|
|
1525
|
+
/** ID for the drawer. If omitted, a unique one will be generated. */
|
|
1526
|
+
id?: string;
|
|
1527
|
+
/** The ARIA role of the dialog element. */
|
|
1528
|
+
role?: DialogRole;
|
|
1529
|
+
/** Extra CSS classes to be added to the drawer container. */
|
|
1530
|
+
panelClass?: string | string[];
|
|
1531
|
+
/** Text layout direction for the drawer. */
|
|
1532
|
+
direction?: Direction;
|
|
1533
|
+
/** Data being injected into the child component. */
|
|
1534
|
+
data?: D | null;
|
|
1535
|
+
/** Whether the drawer has a backdrop. */
|
|
1536
|
+
hasBackdrop?: boolean;
|
|
1537
|
+
/** Custom class for the backdrop. */
|
|
1538
|
+
backdropClass?: string;
|
|
1539
|
+
/** Whether the user can use escape or clicking outside to close the drawer. */
|
|
1540
|
+
disableClose?: boolean;
|
|
1541
|
+
/** Aria label to assign to the drawer element. */
|
|
1542
|
+
ariaLabel?: string | null;
|
|
1543
|
+
/**
|
|
1544
|
+
* Whether this is a modal dialog. Used to set the `aria-modal` attribute. Off by default,
|
|
1545
|
+
* because it can interfere with other overlay-based components (e.g. `mat-select`) and because
|
|
1546
|
+
* it is redundant since the dialog marks all outside content as `aria-hidden` anyway.
|
|
1547
|
+
*/
|
|
1548
|
+
ariaModal?: boolean;
|
|
1549
|
+
/**
|
|
1550
|
+
* Whether the drawer should close when the user goes backwards/forwards in history.
|
|
1551
|
+
* Note that this usually doesn't include clicking on links (unless the user is using
|
|
1552
|
+
* the `HashLocationStrategy`).
|
|
1553
|
+
*/
|
|
1554
|
+
closeOnNavigation?: boolean;
|
|
1555
|
+
/**
|
|
1556
|
+
* Where the drawer should focus on open.
|
|
1557
|
+
* @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or
|
|
1558
|
+
* AutoFocusTarget instead.
|
|
1559
|
+
*/
|
|
1560
|
+
autoFocus?: AutoFocusTarget | string | boolean;
|
|
1561
|
+
/**
|
|
1562
|
+
* Whether the drawer should restore focus to the
|
|
1563
|
+
* previously-focused element, after it's closed.
|
|
1564
|
+
*/
|
|
1565
|
+
restoreFocus?: boolean;
|
|
1566
|
+
/** Scroll strategy to be used for the drawer. */
|
|
1567
|
+
scrollStrategy?: ScrollStrategy;
|
|
1568
|
+
/** Position of the drawer. */
|
|
1569
|
+
position?: DrawerPosition;
|
|
1570
|
+
/** Width of the drawer. */
|
|
1571
|
+
width?: string;
|
|
1572
|
+
/** Height of the drawer. */
|
|
1573
|
+
height?: string;
|
|
1574
|
+
/** Whether the drawer should take the full screen. */
|
|
1575
|
+
fullScreen?: boolean;
|
|
1576
|
+
/** Min-width of the drawer. If a number is provided, assumes pixel units. */
|
|
1577
|
+
minWidth?: number | string;
|
|
1578
|
+
/** Min-height of the drawer. If a number is provided, assumes pixel units. */
|
|
1579
|
+
minHeight?: number | string;
|
|
1580
|
+
/** Max-width of the drawer. If a number is provided, assumes pixel units. */
|
|
1581
|
+
maxWidth?: number | string;
|
|
1582
|
+
/** Max-height of the drawer. If a number is provided, assumes pixel units. */
|
|
1583
|
+
maxHeight?: number | string;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
/**
|
|
1587
|
+
* Internal component that wraps user-provided drawer content.
|
|
1588
|
+
*
|
|
1589
|
+
* This component handles the drawer's animations, positioning, and lifecycle.
|
|
1590
|
+
* It extends the CDK's DialogContainer to provide drawer-specific behavior
|
|
1591
|
+
* including slide-in/slide-out animations and proper focus management.
|
|
1592
|
+
*
|
|
1593
|
+
* @docs-private
|
|
1594
|
+
*/
|
|
1595
|
+
declare class AcpDrawerContainer extends CdkDialogContainer<AcpDrawerConfig> implements OnDestroy {
|
|
1596
|
+
/** Whether animations are disabled in the current environment. */
|
|
1597
|
+
protected _animationsDisabled: boolean;
|
|
1598
|
+
/** The state of the drawer animations. */
|
|
1599
|
+
_animationState: 'void' | 'visible' | 'hidden';
|
|
1600
|
+
/** Emits whenever the state of the animation changes. */
|
|
1601
|
+
_animationStateChanged: EventEmitter<{
|
|
1602
|
+
toState: "visible" | "hidden";
|
|
1603
|
+
phase: "start" | "done";
|
|
1604
|
+
}>;
|
|
1605
|
+
/** Whether the component has been destroyed. */
|
|
1606
|
+
private _destroyed;
|
|
1607
|
+
/**
|
|
1608
|
+
* Gets the CSS class for the drawer position.
|
|
1609
|
+
* @returns CSS class name based on the drawer's position
|
|
1610
|
+
*/
|
|
1611
|
+
get _drawerPosition(): string;
|
|
1612
|
+
/**
|
|
1613
|
+
* Called when content is attached to the container.
|
|
1614
|
+
* Initializes the dialog container and starts the entrance animation.
|
|
1615
|
+
*/
|
|
1616
|
+
protected _contentAttached(): void;
|
|
1617
|
+
/**
|
|
1618
|
+
* Begin animation of drawer entrance into view.
|
|
1619
|
+
* Sets the animation state to visible and triggers change detection.
|
|
1620
|
+
*/
|
|
1621
|
+
enter(): void;
|
|
1622
|
+
/**
|
|
1623
|
+
* Begin animation of the drawer exiting from view.
|
|
1624
|
+
* Sets the animation state to hidden and triggers the exit animation.
|
|
1625
|
+
*/
|
|
1626
|
+
exit(): void;
|
|
1627
|
+
/**
|
|
1628
|
+
* Lifecycle hook called when the component is destroyed.
|
|
1629
|
+
* Marks the component as destroyed and calls the parent's ngOnDestroy.
|
|
1630
|
+
*/
|
|
1631
|
+
ngOnDestroy(): void;
|
|
1632
|
+
/**
|
|
1633
|
+
* Simulates animation events when animations are disabled.
|
|
1634
|
+
* @param name The animation name to simulate
|
|
1635
|
+
*/
|
|
1636
|
+
private _simulateAnimation;
|
|
1637
|
+
/**
|
|
1638
|
+
* Handles animation events for both start and end phases.
|
|
1639
|
+
* @param isStart Whether this is the start or end of the animation
|
|
1640
|
+
* @param animationName The name of the animation
|
|
1641
|
+
*/
|
|
1642
|
+
protected _handleAnimationEvent(isStart: boolean, animationName: string): void;
|
|
1643
|
+
/**
|
|
1644
|
+
* Override to prevent automatic focus capture.
|
|
1645
|
+
* Focus is handled by the enter animation instead.
|
|
1646
|
+
*/
|
|
1647
|
+
protected _captureInitialFocus(): void;
|
|
1648
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AcpDrawerContainer, never>;
|
|
1649
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AcpDrawerContainer, "acp-drawer-container", never, {}, {}, never, never, true, never>;
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
/**
|
|
1653
|
+
* Reference to a drawer dispatched from the drawer service.
|
|
1654
|
+
*
|
|
1655
|
+
* This class provides methods and properties to interact with an open drawer,
|
|
1656
|
+
* including dismissing it, accessing its component instance, and subscribing
|
|
1657
|
+
* to lifecycle events like opening and closing.
|
|
1658
|
+
*
|
|
1659
|
+
* @template T The type of the component opened in the drawer
|
|
1660
|
+
* @template R The type of the result returned when the drawer is dismissed
|
|
1661
|
+
*
|
|
1662
|
+
* @example
|
|
1663
|
+
* ```typescript
|
|
1664
|
+
* const drawerRef = this.drawer.open(MyComponent);
|
|
1665
|
+
*
|
|
1666
|
+
* // Access component instance
|
|
1667
|
+
* drawerRef.instance.someProperty = 'value';
|
|
1668
|
+
*
|
|
1669
|
+
* // Listen for dismissal
|
|
1670
|
+
* drawerRef.afterDismissed().subscribe(result => {
|
|
1671
|
+
* console.log('Drawer dismissed with:', result);
|
|
1672
|
+
* });
|
|
1673
|
+
*
|
|
1674
|
+
* // Dismiss programmatically
|
|
1675
|
+
* drawerRef.dismiss('some result');
|
|
1676
|
+
* ```
|
|
1677
|
+
*/
|
|
1678
|
+
declare class AcpDrawerRef<T = any, R = any> {
|
|
1679
|
+
private _ref;
|
|
1680
|
+
/** Instance of the component making up the content of the drawer. */
|
|
1681
|
+
get instance(): T;
|
|
1682
|
+
/**
|
|
1683
|
+
* `ComponentRef` of the component opened into the drawer. Will be
|
|
1684
|
+
* null when the drawer is opened using a `TemplateRef`.
|
|
1685
|
+
*/
|
|
1686
|
+
get componentRef(): ComponentRef<T> | null;
|
|
1687
|
+
/**
|
|
1688
|
+
* Instance of the component into which the drawer content is projected.
|
|
1689
|
+
* @docs-private
|
|
1690
|
+
*/
|
|
1691
|
+
containerInstance: AcpDrawerContainer;
|
|
1692
|
+
/** Whether the user is allowed to close the drawer. */
|
|
1693
|
+
disableClose: boolean | undefined;
|
|
1694
|
+
/** Unique ID for the drawer. */
|
|
1695
|
+
id: string;
|
|
1696
|
+
/** Subject for notifying the user that the drawer has been dismissed. */
|
|
1697
|
+
private readonly _afterDismissed;
|
|
1698
|
+
/** Subject for notifying the user that the drawer has opened and appeared. */
|
|
1699
|
+
private readonly _afterOpened;
|
|
1700
|
+
/** Result to be passed down to the `afterDismissed` stream. */
|
|
1701
|
+
private _result;
|
|
1702
|
+
/** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */
|
|
1703
|
+
private _closeFallbackTimeout;
|
|
1704
|
+
/**
|
|
1705
|
+
* Creates a new drawer reference.
|
|
1706
|
+
* @param _ref The underlying CDK dialog reference
|
|
1707
|
+
* @param config Configuration options for the drawer
|
|
1708
|
+
* @param containerInstance The drawer container instance
|
|
1709
|
+
*/
|
|
1710
|
+
constructor(_ref: DialogRef<R, T>, config: AcpDrawerConfig, containerInstance: AcpDrawerContainer);
|
|
1711
|
+
/**
|
|
1712
|
+
* Dismisses the drawer.
|
|
1713
|
+
* @param result Data to be passed back to the drawer opener.
|
|
1714
|
+
*/
|
|
1715
|
+
dismiss(result?: R): void;
|
|
1716
|
+
/**
|
|
1717
|
+
* Gets an observable that is notified when the drawer is finished closing.
|
|
1718
|
+
* @returns Observable that emits the result passed to dismiss() or undefined
|
|
1719
|
+
*/
|
|
1720
|
+
afterDismissed(): Observable<R | undefined>;
|
|
1721
|
+
/**
|
|
1722
|
+
* Gets an observable that is notified when the drawer has opened and appeared.
|
|
1723
|
+
* @returns Observable that emits when the drawer is fully visible
|
|
1724
|
+
*/
|
|
1725
|
+
afterOpened(): Observable<void>;
|
|
1726
|
+
/**
|
|
1727
|
+
* Gets an observable that emits when the overlay's backdrop has been clicked.
|
|
1728
|
+
* @returns Observable that emits mouse events from backdrop clicks
|
|
1729
|
+
*/
|
|
1730
|
+
backdropClick(): Observable<MouseEvent>;
|
|
1731
|
+
/**
|
|
1732
|
+
* Gets an observable that emits when keydown events are targeted on the overlay.
|
|
1733
|
+
* @returns Observable that emits keyboard events
|
|
1734
|
+
*/
|
|
1735
|
+
keydownEvents(): Observable<KeyboardEvent>;
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
/** Injection token that can be used to access the data that was passed in to a drawer. */
|
|
1739
|
+
declare const ACP_DRAWER_DATA: InjectionToken<any>;
|
|
1740
|
+
/** Injection token that can be used to specify default drawer options. */
|
|
1741
|
+
declare const ACP_DRAWER_DEFAULT_OPTIONS: InjectionToken<AcpDrawerConfig<any>>;
|
|
1742
|
+
/**
|
|
1743
|
+
* Service to trigger ACP drawer components.
|
|
1744
|
+
*
|
|
1745
|
+
* The AcpDrawer service provides methods to open, manage, and dismiss drawer panels
|
|
1746
|
+
* that slide in from any side of the screen. It's built on top of Angular CDK Dialog
|
|
1747
|
+
* and provides a flexible way to display additional content without navigating away
|
|
1748
|
+
* from the current page.
|
|
1749
|
+
*
|
|
1750
|
+
* @example
|
|
1751
|
+
* ```typescript
|
|
1752
|
+
* constructor(private drawer: AcpDrawer) {}
|
|
1753
|
+
*
|
|
1754
|
+
* openDrawer() {
|
|
1755
|
+
* const drawerRef = this.drawer.open(MyDrawerComponent, {
|
|
1756
|
+
* position: 'right',
|
|
1757
|
+
* width: '400px',
|
|
1758
|
+
* data: { message: 'Hello from drawer!' }
|
|
1759
|
+
* });
|
|
1760
|
+
*
|
|
1761
|
+
* drawerRef.afterDismissed().subscribe(result => {
|
|
1762
|
+
* console.log('Drawer closed with result:', result);
|
|
1763
|
+
* });
|
|
1764
|
+
* }
|
|
1765
|
+
* ```
|
|
1766
|
+
*/
|
|
1767
|
+
declare class AcpDrawer implements OnDestroy {
|
|
1768
|
+
private _overlay;
|
|
1769
|
+
private _parentDrawer;
|
|
1770
|
+
private _defaultOptions;
|
|
1771
|
+
private readonly _openDrawersAtThisLevel;
|
|
1772
|
+
private readonly _afterAllDismissedAtThisLevel;
|
|
1773
|
+
private readonly _afterOpenedAtThisLevel;
|
|
1774
|
+
private _dialog;
|
|
1775
|
+
/** Keeps track of the currently-open dialogs. */
|
|
1776
|
+
get openDrawers(): AcpDrawerRef<any>[];
|
|
1777
|
+
/** Stream that emits when a drawer has been opened. */
|
|
1778
|
+
get afterOpened(): Subject<AcpDrawerRef<any>>;
|
|
1779
|
+
/**
|
|
1780
|
+
* Gets the subject for tracking when all drawers are dismissed.
|
|
1781
|
+
* @returns Subject that emits when all drawers at this level are closed
|
|
1782
|
+
*/
|
|
1783
|
+
private _getAfterAllDismissed;
|
|
1784
|
+
/**
|
|
1785
|
+
* Stream that emits when all open drawer have finished closing.
|
|
1786
|
+
* Will emit on subscribe if there are no open drawers to begin with.
|
|
1787
|
+
*/
|
|
1788
|
+
readonly afterAllDismissed: Observable<void>;
|
|
1789
|
+
/**
|
|
1790
|
+
* Opens a drawer containing the given component.
|
|
1791
|
+
* @param component Type of the component to load into the drawer.
|
|
1792
|
+
* @param config Extra configuration options.
|
|
1793
|
+
* @returns Reference to the newly-opened drawer.
|
|
1794
|
+
*/
|
|
1795
|
+
open<T, D = any, R = any>(component: ComponentType<T>, config?: AcpDrawerConfig<D>): AcpDrawerRef<T, R>;
|
|
1796
|
+
/**
|
|
1797
|
+
* Opens a drawer containing the given template.
|
|
1798
|
+
* @param template TemplateRef to instantiate as the drawer content.
|
|
1799
|
+
* @param config Extra configuration options.
|
|
1800
|
+
* @returns Reference to the newly-opened drawer.
|
|
1801
|
+
*/
|
|
1802
|
+
open<T, D = any, R = any>(template: TemplateRef<T>, config?: AcpDrawerConfig<D>): AcpDrawerRef<T, R>;
|
|
1803
|
+
/**
|
|
1804
|
+
* Dismisses all of the currently-open drawers.
|
|
1805
|
+
* This will close all drawers at the current level and emit the afterAllDismissed event.
|
|
1806
|
+
*/
|
|
1807
|
+
dismissAll(): void;
|
|
1808
|
+
/**
|
|
1809
|
+
* Finds an open drawer by its id.
|
|
1810
|
+
* @param id ID to use when looking up the drawer.
|
|
1811
|
+
* @returns The drawer reference if found, undefined otherwise.
|
|
1812
|
+
*/
|
|
1813
|
+
getDrawerById(id: string): AcpDrawerRef<any> | undefined;
|
|
1814
|
+
/**
|
|
1815
|
+
* Lifecycle hook that is called when the service is destroyed.
|
|
1816
|
+
* Dismisses all drawers at this level and completes observables.
|
|
1817
|
+
*/
|
|
1818
|
+
ngOnDestroy(): void;
|
|
1819
|
+
/**
|
|
1820
|
+
* Dismisses multiple drawers.
|
|
1821
|
+
* @param drawers Array of drawer references to dismiss
|
|
1822
|
+
*/
|
|
1823
|
+
private _dismissDrawers;
|
|
1824
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AcpDrawer, never>;
|
|
1825
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AcpDrawer>;
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
/**
|
|
1829
|
+
* Injection token that can be used to reference instances of `AcpPopoverContent`. It serves
|
|
1830
|
+
* as alternative token to the actual `AcpPopoverContent` class which could cause unnecessary
|
|
1831
|
+
* retention of the class and its directive metadata.
|
|
1832
|
+
*/
|
|
1833
|
+
declare const ACP_POPOVER_CONTENT: InjectionToken<AcpPopoverContent>;
|
|
1834
|
+
/**
|
|
1835
|
+
* Base class for popover content that provides common functionality.
|
|
1836
|
+
*
|
|
1837
|
+
* This abstract class handles the attachment and detachment of popover content
|
|
1838
|
+
* using Angular CDK portals. It manages the DOM manipulation required to display
|
|
1839
|
+
* popover content in an overlay.
|
|
1840
|
+
*
|
|
1841
|
+
* @docs-private
|
|
1842
|
+
*/
|
|
1843
|
+
declare abstract class _AcpPopoverContentBase implements OnDestroy {
|
|
1844
|
+
private _template;
|
|
1845
|
+
private _appRef;
|
|
1846
|
+
private _injector;
|
|
1847
|
+
private _viewContainerRef;
|
|
1848
|
+
private _document;
|
|
1849
|
+
private _changeDetectorRef;
|
|
1850
|
+
private _portal;
|
|
1851
|
+
private _outlet;
|
|
1852
|
+
/** Emits when the popover content has been attached. */
|
|
1853
|
+
readonly _attached: Subject<void>;
|
|
1854
|
+
/**
|
|
1855
|
+
* Attaches the content with a particular context.
|
|
1856
|
+
* @param context Context data to pass to the template
|
|
1857
|
+
* @docs-private
|
|
1858
|
+
*/
|
|
1859
|
+
attach(context?: any): void;
|
|
1860
|
+
/**
|
|
1861
|
+
* Detaches the content from the DOM.
|
|
1862
|
+
* @docs-private
|
|
1863
|
+
*/
|
|
1864
|
+
detach(): void;
|
|
1865
|
+
/**
|
|
1866
|
+
* Lifecycle hook called when the component is destroyed.
|
|
1867
|
+
* Cleans up the portal outlet to prevent memory leaks.
|
|
1868
|
+
*/
|
|
1869
|
+
ngOnDestroy(): void;
|
|
1870
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<_AcpPopoverContentBase, never>;
|
|
1871
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<_AcpPopoverContentBase, never, never, {}, {}, never, never, true, never>;
|
|
1872
|
+
}
|
|
1873
|
+
/**
|
|
1874
|
+
* Popover content that will be rendered lazily once the popover is opened.
|
|
1875
|
+
*
|
|
1876
|
+
* This directive allows you to define content that should be rendered inside
|
|
1877
|
+
* a popover panel. The content is only created when the popover is actually
|
|
1878
|
+
* opened, which can improve performance for complex content.
|
|
1879
|
+
*
|
|
1880
|
+
* @example
|
|
1881
|
+
* ```html
|
|
1882
|
+
* <ng-template acpPopoverContent>
|
|
1883
|
+
* <div>This content will be shown in the popover</div>
|
|
1884
|
+
* </ng-template>
|
|
1885
|
+
* ```
|
|
1886
|
+
*/
|
|
1887
|
+
declare class AcpPopoverContent extends _AcpPopoverContentBase {
|
|
1888
|
+
constructor();
|
|
1889
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AcpPopoverContent, never>;
|
|
1890
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AcpPopoverContent, "ng-template[acpPopoverContent]", never, {}, {}, never, never, true, never>;
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
/** First value of popover's position. */
|
|
1894
|
+
type AcpPopoverPositionStart = 'above' | 'below' | 'before' | 'after';
|
|
1895
|
+
/** Second value of popover's position. */
|
|
1896
|
+
type AcpPopoverPositionEnd = AcpPopoverPositionStart | 'center';
|
|
1897
|
+
/** Popover's position. */
|
|
1898
|
+
type AcpPopoverPosition = [AcpPopoverPositionStart, AcpPopoverPositionEnd];
|
|
1899
|
+
/** Popover's trigger event. */
|
|
1900
|
+
type AcpPopoverTriggerEvent = 'click' | 'hover' | 'none';
|
|
1901
|
+
/** Reason why the popover was closed. */
|
|
1902
|
+
type PopoverCloseReason = void | 'click' | 'keydown' | 'tab';
|
|
1903
|
+
|
|
1904
|
+
/**
|
|
1905
|
+
* Interface for a custom popover panel that can be used with `acpPopoverTriggerFor`.
|
|
1906
|
+
* @docs-private
|
|
1907
|
+
*/
|
|
1908
|
+
interface AcpPopoverPanel {
|
|
1909
|
+
triggerEvent: AcpPopoverTriggerEvent;
|
|
1910
|
+
enterDelay: number;
|
|
1911
|
+
leaveDelay: number;
|
|
1912
|
+
position: AcpPopoverPosition;
|
|
1913
|
+
xOffset: number;
|
|
1914
|
+
yOffset: number;
|
|
1915
|
+
closeOnPanelClick: boolean;
|
|
1916
|
+
closeOnBackdropClick: boolean;
|
|
1917
|
+
closeDisabled: boolean;
|
|
1918
|
+
backdropClass?: string;
|
|
1919
|
+
overlayPanelClass?: string | string[];
|
|
1920
|
+
hasBackdrop?: boolean;
|
|
1921
|
+
templateRef: TemplateRef<any>;
|
|
1922
|
+
lazyContent?: any;
|
|
1923
|
+
direction?: Direction;
|
|
1924
|
+
readonly panelId?: string;
|
|
1925
|
+
readonly closed: EventEmitter<PopoverCloseReason>;
|
|
1926
|
+
setCurrentStyles: (pos?: AcpPopoverPosition) => void;
|
|
1927
|
+
setPositionClasses: (pos?: AcpPopoverPosition) => void;
|
|
1928
|
+
setElevation: () => void;
|
|
1929
|
+
}
|
|
1930
|
+
/** Default `acp-popover` options that can be overridden. */
|
|
1931
|
+
interface AcpPopoverDefaultOptions {
|
|
1932
|
+
triggerEvent?: AcpPopoverTriggerEvent;
|
|
1933
|
+
enterDelay?: number;
|
|
1934
|
+
leaveDelay?: number;
|
|
1935
|
+
position?: AcpPopoverPosition;
|
|
1936
|
+
xOffset?: number;
|
|
1937
|
+
yOffset?: number;
|
|
1938
|
+
arrowWidth?: number;
|
|
1939
|
+
arrowHeight?: number;
|
|
1940
|
+
arrowOffsetX?: number;
|
|
1941
|
+
arrowOffsetY?: number;
|
|
1942
|
+
hideArrow?: boolean;
|
|
1943
|
+
closeOnPanelClick?: boolean;
|
|
1944
|
+
closeOnBackdropClick?: boolean;
|
|
1945
|
+
overlayPanelClass?: string;
|
|
1946
|
+
backdropClass?: string;
|
|
1947
|
+
hasBackdrop?: boolean;
|
|
1948
|
+
focusTrapEnabled?: boolean;
|
|
1949
|
+
focusTrapAutoCaptureEnabled?: boolean;
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
/** Injection token to be used to override the default options for `acp-popover`. */
|
|
1953
|
+
declare const ACP_POPOVER_DEFAULT_OPTIONS: InjectionToken<AcpPopoverDefaultOptions>;
|
|
1954
|
+
/**
|
|
1955
|
+
* ACP Popover component that displays content in an overlay panel.
|
|
1956
|
+
*
|
|
1957
|
+
* The popover can be triggered by hover or click events and supports
|
|
1958
|
+
* various positioning options. It's built on top of Angular CDK Overlay
|
|
1959
|
+
* and provides a flexible way to display contextual information.
|
|
1960
|
+
*
|
|
1961
|
+
* @example
|
|
1962
|
+
* ```html
|
|
1963
|
+
* <acp-popover #popover="acpPopover" [position]="['below', 'after']">
|
|
1964
|
+
* <div>Popover content goes here</div>
|
|
1965
|
+
* </acp-popover>
|
|
1966
|
+
*
|
|
1967
|
+
* <button [acpPopoverTriggerFor]="popover">Show popover</button>
|
|
1968
|
+
* ```
|
|
1969
|
+
*/
|
|
1970
|
+
declare class AcpPopover implements AcpPopoverPanel, OnInit, OnDestroy {
|
|
1971
|
+
private _changeDetectorRef;
|
|
1972
|
+
private _elementRef;
|
|
1973
|
+
private _unusedNgZone;
|
|
1974
|
+
private _defaultOptions;
|
|
1975
|
+
private _previousElevation?;
|
|
1976
|
+
private _elevationPrefix;
|
|
1977
|
+
private _baseElevation;
|
|
1978
|
+
private _exitFallbackTimeout;
|
|
1979
|
+
private _mouseleaveTimer;
|
|
1980
|
+
/** Whether animations are currently disabled. */
|
|
1981
|
+
protected _animationsDisabled: boolean;
|
|
1982
|
+
/** Config object to be passed into the popover's class. */
|
|
1983
|
+
_classList: Record<string, boolean>;
|
|
1984
|
+
/** Current state of the panel animation. */
|
|
1985
|
+
_panelAnimationState: 'void' | 'enter';
|
|
1986
|
+
/** Emits whenever an animation on the popover completes. */
|
|
1987
|
+
readonly _animationDone: Subject<"void" | "enter">;
|
|
1988
|
+
/** Whether the popover is animating. */
|
|
1989
|
+
_isAnimating: boolean;
|
|
1990
|
+
/** Closing disabled on popover */
|
|
1991
|
+
closeDisabled: boolean;
|
|
1992
|
+
/** Config object to be passed into the popover's arrow style */
|
|
1993
|
+
arrowStyles?: Record<string, unknown>;
|
|
1994
|
+
/** Layout direction of the popover. */
|
|
1995
|
+
direction?: Direction;
|
|
1996
|
+
/** Class or list of classes to be added to the overlay panel. */
|
|
1997
|
+
overlayPanelClass: string | string[];
|
|
1998
|
+
/** Class to be added to the backdrop element. */
|
|
1999
|
+
backdropClass: string | undefined;
|
|
2000
|
+
/** aria-label for the popover panel. */
|
|
2001
|
+
ariaLabel?: string;
|
|
2002
|
+
/** aria-labelledby for the popover panel. */
|
|
2003
|
+
ariaLabelledby?: string;
|
|
2004
|
+
/** aria-describedby for the popover panel. */
|
|
2005
|
+
ariaDescribedby?: string;
|
|
2006
|
+
/** Popover's trigger event. */
|
|
2007
|
+
triggerEvent: AcpPopoverTriggerEvent;
|
|
2008
|
+
/** Popover's enter delay. */
|
|
2009
|
+
enterDelay: number;
|
|
2010
|
+
/** Popover's leave delay. */
|
|
2011
|
+
leaveDelay: number;
|
|
2012
|
+
/** Popover's position. */
|
|
2013
|
+
get position(): AcpPopoverPosition;
|
|
2014
|
+
set position(value: AcpPopoverPosition);
|
|
2015
|
+
private _position;
|
|
2016
|
+
/** Popover-panel's X offset. */
|
|
2017
|
+
xOffset: number;
|
|
2018
|
+
/** Popover-panel's Y offset. */
|
|
2019
|
+
yOffset: number;
|
|
2020
|
+
/** Popover-arrow's width. */
|
|
2021
|
+
arrowWidth: number;
|
|
2022
|
+
/** Popover-arrow's height. */
|
|
2023
|
+
arrowHeight: number;
|
|
2024
|
+
/** Popover-arrow's X offset. */
|
|
2025
|
+
arrowOffsetX: number;
|
|
2026
|
+
/** Popover-arrow's Y offset. */
|
|
2027
|
+
arrowOffsetY: number;
|
|
2028
|
+
/** Whether the popover arrow should be hidden. */
|
|
2029
|
+
hideArrow: boolean;
|
|
2030
|
+
/** Whether popover can be closed when click the popover-panel. */
|
|
2031
|
+
closeOnPanelClick: boolean;
|
|
2032
|
+
/** Whether popover can be closed when click the backdrop. */
|
|
2033
|
+
closeOnBackdropClick: boolean;
|
|
2034
|
+
/** Whether enable focus trap using `cdkTrapFocus`. */
|
|
2035
|
+
focusTrapEnabled: boolean;
|
|
2036
|
+
/** Whether enable focus trap auto capture using `cdkTrapFocusAutoCapture`. */
|
|
2037
|
+
focusTrapAutoCaptureEnabled: boolean;
|
|
2038
|
+
/** Whether the popover has a backdrop. It will always be false if the trigger event is hover. */
|
|
2039
|
+
hasBackdrop: boolean | undefined;
|
|
2040
|
+
/**
|
|
2041
|
+
* This method takes classes set on the host acp-popover element and applies them on the
|
|
2042
|
+
* popover template that displays in the overlay container. Otherwise, it's difficult
|
|
2043
|
+
* to style the containing popover from outside the component.
|
|
2044
|
+
* @param classes list of class names
|
|
2045
|
+
*/
|
|
2046
|
+
set panelClass(classes: string);
|
|
2047
|
+
private _previousPanelClass?;
|
|
2048
|
+
/**
|
|
2049
|
+
* This method takes classes set on the host acp-popover element and applies them on the
|
|
2050
|
+
* popover template that displays in the overlay container. Otherwise, it's difficult
|
|
2051
|
+
* to style the containing popover from outside the component.
|
|
2052
|
+
* @deprecated Use `panelClass` instead.
|
|
2053
|
+
* @breaking-change 8.0.0
|
|
2054
|
+
*/
|
|
2055
|
+
get classList(): string;
|
|
2056
|
+
set classList(classes: string);
|
|
2057
|
+
/** Event emitted when the popover is closed. */
|
|
2058
|
+
closed: EventEmitter<PopoverCloseReason>;
|
|
2059
|
+
/** @docs-private */
|
|
2060
|
+
templateRef: TemplateRef<any>;
|
|
2061
|
+
/**
|
|
2062
|
+
* Popover content that will be rendered lazily.
|
|
2063
|
+
* @docs-private
|
|
2064
|
+
*/
|
|
2065
|
+
lazyContent?: AcpPopoverContent;
|
|
2066
|
+
readonly panelId: string;
|
|
2067
|
+
/**
|
|
2068
|
+
* Lifecycle hook called when the component is initialized.
|
|
2069
|
+
* Sets up the initial position classes for the popover.
|
|
2070
|
+
*/
|
|
2071
|
+
ngOnInit(): void;
|
|
2072
|
+
/**
|
|
2073
|
+
* Lifecycle hook called when the component is destroyed.
|
|
2074
|
+
* Cleans up subscriptions and timers.
|
|
2075
|
+
*/
|
|
2076
|
+
ngOnDestroy(): void;
|
|
2077
|
+
/**
|
|
2078
|
+
* Handle a keyboard event from the popover, delegating to the appropriate action.
|
|
2079
|
+
* @param event The keyboard event to handle
|
|
2080
|
+
*/
|
|
2081
|
+
_handleKeydown(event: KeyboardEvent): void;
|
|
2082
|
+
/**
|
|
2083
|
+
* Close popover on click if `closeOnPanelClick` is true.
|
|
2084
|
+
*/
|
|
2085
|
+
_handleClick(): void;
|
|
2086
|
+
/**
|
|
2087
|
+
* Disables close of popover when leaving trigger element and mouse over the popover.
|
|
2088
|
+
*/
|
|
2089
|
+
_handleMouseOver(): void;
|
|
2090
|
+
/**
|
|
2091
|
+
* Enables close of popover when mouse leaving popover element.
|
|
2092
|
+
*/
|
|
2093
|
+
_handleMouseLeave(): void;
|
|
2094
|
+
/**
|
|
2095
|
+
* Sets the current styles for the popover to allow for dynamically changing settings.
|
|
2096
|
+
* @param pos The position to set styles for, defaults to current position
|
|
2097
|
+
*/
|
|
2098
|
+
setCurrentStyles(pos?: AcpPopoverPosition): void;
|
|
2099
|
+
/**
|
|
2100
|
+
* It's necessary to set position-based classes to ensure the popover panel animation
|
|
2101
|
+
* folds out from the correct direction.
|
|
2102
|
+
* @param pos The position to set classes for, defaults to current position
|
|
2103
|
+
*/
|
|
2104
|
+
setPositionClasses(pos?: AcpPopoverPosition): void;
|
|
2105
|
+
/**
|
|
2106
|
+
* Sets the popover-panel's elevation.
|
|
2107
|
+
* Applies Material Design elevation classes based on the base elevation level.
|
|
2108
|
+
*/
|
|
2109
|
+
setElevation(): void;
|
|
2110
|
+
/**
|
|
2111
|
+
* Callback that is invoked when the panel animation completes.
|
|
2112
|
+
* @param state The animation state that completed
|
|
2113
|
+
*/
|
|
2114
|
+
protected _onAnimationDone(state: string): void;
|
|
2115
|
+
/**
|
|
2116
|
+
* Callback that is invoked when the panel animation starts.
|
|
2117
|
+
* @param state The animation state that started
|
|
2118
|
+
*/
|
|
2119
|
+
protected _onAnimationStart(state: string): void;
|
|
2120
|
+
/**
|
|
2121
|
+
* Sets the open state of the popover and manages animations.
|
|
2122
|
+
* @param isOpen Whether the popover should be open
|
|
2123
|
+
*/
|
|
2124
|
+
_setIsOpen(isOpen: boolean): void;
|
|
2125
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AcpPopover, never>;
|
|
2126
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AcpPopover, "acp-popover", ["acpPopover"], { "backdropClass": { "alias": "backdropClass"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; }; "triggerEvent": { "alias": "triggerEvent"; "required": false; }; "enterDelay": { "alias": "enterDelay"; "required": false; }; "leaveDelay": { "alias": "leaveDelay"; "required": false; }; "position": { "alias": "position"; "required": false; }; "xOffset": { "alias": "xOffset"; "required": false; }; "yOffset": { "alias": "yOffset"; "required": false; }; "arrowWidth": { "alias": "arrowWidth"; "required": false; }; "arrowHeight": { "alias": "arrowHeight"; "required": false; }; "arrowOffsetX": { "alias": "arrowOffsetX"; "required": false; }; "arrowOffsetY": { "alias": "arrowOffsetY"; "required": false; }; "hideArrow": { "alias": "hideArrow"; "required": false; }; "closeOnPanelClick": { "alias": "closeOnPanelClick"; "required": false; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; }; "focusTrapEnabled": { "alias": "focusTrapEnabled"; "required": false; }; "focusTrapAutoCaptureEnabled": { "alias": "focusTrapAutoCaptureEnabled"; "required": false; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "classList": { "alias": "classList"; "required": false; }; }, { "closed": "closed"; }, ["lazyContent"], ["*"], true, never>;
|
|
2127
|
+
static ngAcceptInputType_hideArrow: unknown;
|
|
2128
|
+
static ngAcceptInputType_closeOnPanelClick: unknown;
|
|
2129
|
+
static ngAcceptInputType_closeOnBackdropClick: unknown;
|
|
2130
|
+
static ngAcceptInputType_focusTrapEnabled: unknown;
|
|
2131
|
+
static ngAcceptInputType_focusTrapAutoCaptureEnabled: unknown;
|
|
2132
|
+
static ngAcceptInputType_hasBackdrop: unknown;
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
/**
|
|
2136
|
+
* Directive that marks an element as a popover target.
|
|
2137
|
+
*
|
|
2138
|
+
* This directive provides a reference to an element that can be used
|
|
2139
|
+
* as the target for popover positioning. It's useful when you want
|
|
2140
|
+
* the popover to appear relative to a different element than the trigger.
|
|
2141
|
+
*
|
|
2142
|
+
* @example
|
|
2143
|
+
* ```html
|
|
2144
|
+
* <div acpPopoverTarget #target="acpPopoverTarget">Target element</div>
|
|
2145
|
+
* <button [acpPopoverTriggerFor]="popover" [acpPopoverTargetAt]="target">
|
|
2146
|
+
* Trigger
|
|
2147
|
+
* </button>
|
|
2148
|
+
* ```
|
|
2149
|
+
*/
|
|
2150
|
+
declare class AcpPopoverTarget {
|
|
2151
|
+
/** Reference to the target element. */
|
|
2152
|
+
elementRef: ElementRef<any>;
|
|
2153
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AcpPopoverTarget, never>;
|
|
2154
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AcpPopoverTarget, "acp-popover-target, [acpPopoverTarget]", ["acpPopoverTarget"], {}, {}, never, never, true, never>;
|
|
2155
|
+
}
|
|
2156
|
+
|
|
2157
|
+
/** Injection token that determines the scroll handling while the popover is open. */
|
|
2158
|
+
declare const ACP_POPOVER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
|
|
2159
|
+
/**
|
|
2160
|
+
* This directive is intended to be used in conjunction with an `acp-popover` tag. It is
|
|
2161
|
+
* responsible for toggling the display of the provided popover instance.
|
|
2162
|
+
*
|
|
2163
|
+
* The trigger handles various events (click, hover) and manages the popover's lifecycle,
|
|
2164
|
+
* including opening, closing, positioning, and focus management.
|
|
2165
|
+
*
|
|
2166
|
+
* @example
|
|
2167
|
+
* ```html
|
|
2168
|
+
* <acp-popover #popover="acpPopover">
|
|
2169
|
+
* <div>Popover content</div>
|
|
2170
|
+
* </acp-popover>
|
|
2171
|
+
*
|
|
2172
|
+
* <button [acpPopoverTriggerFor]="popover">
|
|
2173
|
+
* Show popover
|
|
2174
|
+
* </button>
|
|
2175
|
+
* ```
|
|
2176
|
+
*/
|
|
2177
|
+
declare class AcpPopoverTrigger implements AfterContentInit, OnDestroy {
|
|
2178
|
+
private _overlay;
|
|
2179
|
+
private _elementRef;
|
|
2180
|
+
private _viewContainerRef;
|
|
2181
|
+
private _dir;
|
|
2182
|
+
private _changeDetectorRef;
|
|
2183
|
+
private _focusMonitor;
|
|
2184
|
+
private _portal?;
|
|
2185
|
+
private _overlayRef;
|
|
2186
|
+
private _popoverOpen;
|
|
2187
|
+
private _halt;
|
|
2188
|
+
private _positionSubscription;
|
|
2189
|
+
private _popoverCloseSubscription;
|
|
2190
|
+
private _pendingRemoval;
|
|
2191
|
+
private _closingActionsSubscription;
|
|
2192
|
+
private _scrollStrategy;
|
|
2193
|
+
private _mouseoverTimer;
|
|
2194
|
+
private _mouseleaveTimer;
|
|
2195
|
+
_openedBy: Exclude<FocusOrigin, 'program' | null> | undefined;
|
|
2196
|
+
/** References the popover instance that the trigger is associated with. */
|
|
2197
|
+
get popover(): AcpPopoverPanel;
|
|
2198
|
+
set popover(popover: AcpPopoverPanel);
|
|
2199
|
+
private _popover;
|
|
2200
|
+
/** Data to be passed along to any lazily-rendered content. */
|
|
2201
|
+
popoverData: any;
|
|
2202
|
+
/** References the popover target instance that the trigger is associated with. */
|
|
2203
|
+
targetElement?: AcpPopoverTarget;
|
|
2204
|
+
/** Popover trigger event */
|
|
2205
|
+
triggerEvent?: AcpPopoverTriggerEvent;
|
|
2206
|
+
/** Event emitted when the associated popover is opened. */
|
|
2207
|
+
popoverOpened: EventEmitter<void>;
|
|
2208
|
+
/** Event emitted when the associated popover is closed. */
|
|
2209
|
+
popoverClosed: EventEmitter<void>;
|
|
2210
|
+
/**
|
|
2211
|
+
* Lifecycle hook called after content initialization.
|
|
2212
|
+
* Validates the popover reference and sets up initial configuration.
|
|
2213
|
+
*/
|
|
2214
|
+
ngAfterContentInit(): void;
|
|
2215
|
+
/**
|
|
2216
|
+
* Lifecycle hook called when the component is destroyed.
|
|
2217
|
+
* Cleans up subscriptions and overlay references.
|
|
2218
|
+
*/
|
|
2219
|
+
ngOnDestroy(): void;
|
|
2220
|
+
/**
|
|
2221
|
+
* Sets the current configuration for the popover.
|
|
2222
|
+
* Updates trigger event and applies current styles.
|
|
2223
|
+
*/
|
|
2224
|
+
private _setCurrentConfig;
|
|
2225
|
+
/** Whether the popover is open. */
|
|
2226
|
+
get popoverOpen(): boolean;
|
|
2227
|
+
/** The text direction of the containing app. */
|
|
2228
|
+
get dir(): Direction;
|
|
2229
|
+
/**
|
|
2230
|
+
* Handles mouse click on the trigger.
|
|
2231
|
+
* @param _event The mouse event
|
|
2232
|
+
*/
|
|
2233
|
+
_handleClick(_event: MouseEvent): void;
|
|
2234
|
+
/**
|
|
2235
|
+
* Handles mouse enter on the trigger.
|
|
2236
|
+
* @param _event The mouse event
|
|
2237
|
+
*/
|
|
2238
|
+
_handleMouseEnter(_event: MouseEvent): void;
|
|
2239
|
+
/**
|
|
2240
|
+
* Handles mouse leave on the trigger.
|
|
2241
|
+
* @param _event The mouse event
|
|
2242
|
+
*/
|
|
2243
|
+
_handleMouseLeave(_event: MouseEvent): void;
|
|
2244
|
+
/** Handles mouse presses on the trigger. */
|
|
2245
|
+
_handleMousedown(event: MouseEvent): void;
|
|
2246
|
+
/** Handles key presses on the trigger. */
|
|
2247
|
+
_handleKeydown(event: KeyboardEvent): void;
|
|
2248
|
+
/** Toggles the popover between the open and closed states. */
|
|
2249
|
+
togglePopover(): void;
|
|
2250
|
+
/** Opens the popover. */
|
|
2251
|
+
openPopover(): void;
|
|
2252
|
+
/** Closes the popover. */
|
|
2253
|
+
closePopover(): void;
|
|
2254
|
+
/**
|
|
2255
|
+
* Focuses the popover trigger.
|
|
2256
|
+
* @param origin Source of the popover trigger's focus.
|
|
2257
|
+
*/
|
|
2258
|
+
focus(origin?: FocusOrigin, options?: FocusOptions): void;
|
|
2259
|
+
/** Removes the popover from the DOM. */
|
|
2260
|
+
private _destroyPopover;
|
|
2261
|
+
/**
|
|
2262
|
+
* This method sets the popover state to open.
|
|
2263
|
+
*/
|
|
2264
|
+
private _initPopover;
|
|
2265
|
+
private _setIsPopoverOpen;
|
|
2266
|
+
/**
|
|
2267
|
+
* This method checks that a valid instance of AcpPopover has been passed into
|
|
2268
|
+
* `acpPopoverTriggerFor`. If not, an exception is thrown.
|
|
2269
|
+
*/
|
|
2270
|
+
private _checkPopover;
|
|
2271
|
+
/**
|
|
2272
|
+
* This method creates the overlay from the provided popover's template and saves its
|
|
2273
|
+
* OverlayRef so that it can be attached to the DOM when openPopover is called.
|
|
2274
|
+
*/
|
|
2275
|
+
private _createOverlay;
|
|
2276
|
+
/**
|
|
2277
|
+
* This method builds the configuration object needed to create the overlay, the OverlayConfig.
|
|
2278
|
+
* @returns OverlayConfig
|
|
2279
|
+
*/
|
|
2280
|
+
private _getOverlayConfig;
|
|
2281
|
+
private _getTargetElement;
|
|
2282
|
+
/**
|
|
2283
|
+
* Listens to changes in the position of the overlay and sets the correct classes
|
|
2284
|
+
* on the popover based on the new position. This ensures the animation origin is always
|
|
2285
|
+
* correct, even if a fallback position is used for the overlay.
|
|
2286
|
+
*/
|
|
2287
|
+
private _subscribeToPositions;
|
|
2288
|
+
/**
|
|
2289
|
+
* Sets the appropriate positions on a position strategy
|
|
2290
|
+
* so the overlay connects with the trigger correctly.
|
|
2291
|
+
* @param positionStrategy Strategy whose position to update.
|
|
2292
|
+
*/
|
|
2293
|
+
private _setPosition;
|
|
2294
|
+
/** Returns a stream that emits whenever an action that should close the popover occurs. */
|
|
2295
|
+
private _popoverClosingActions;
|
|
2296
|
+
/** Gets the portal that should be attached to the overlay. */
|
|
2297
|
+
private _getPortal;
|
|
2298
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AcpPopoverTrigger, never>;
|
|
2299
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AcpPopoverTrigger, "[acpPopoverTriggerFor]", ["acpPopoverTrigger"], { "popover": { "alias": "acpPopoverTriggerFor"; "required": false; }; "popoverData": { "alias": "popoverData"; "required": false; }; "targetElement": { "alias": "targetElement"; "required": false; }; "triggerEvent": { "alias": "triggerEvent"; "required": false; }; }, { "popoverOpened": "popoverOpened"; "popoverClosed": "popoverClosed"; }, never, never, true, never>;
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2302
|
+
/**
|
|
2303
|
+
* Throws an exception for the case when popover trigger doesn't have a valid acp-popover instance
|
|
2304
|
+
*/
|
|
2305
|
+
declare function throwAcpPopoverMissingError(): void;
|
|
2306
|
+
/**
|
|
2307
|
+
* Throws an exception for the case when popover's acpPopoverPosition[0] value isn't valid.
|
|
2308
|
+
* In other words, it doesn't match 'above', 'below', 'before' or 'after'.
|
|
2309
|
+
*/
|
|
2310
|
+
declare function throwAcpPopoverInvalidPositionStart(): void;
|
|
2311
|
+
/**
|
|
2312
|
+
* Throws an exception for the case when popover's acpPopoverPosition[1] value isn't valid.
|
|
2313
|
+
* In other words, it doesn't match 'above', 'below', 'before', 'after' or 'center'.
|
|
2314
|
+
*/
|
|
2315
|
+
declare function throwAcpPopoverInvalidPositionEnd(): void;
|
|
2316
|
+
|
|
1493
2317
|
declare class ToUpperCase implements ControlValueAccessor {
|
|
1494
2318
|
private el;
|
|
1495
2319
|
private renderer;
|
|
@@ -1533,5 +2357,5 @@ declare class StatusDisplayPipe implements PipeTransform {
|
|
|
1533
2357
|
static ɵpipe: _angular_core.ɵɵPipeDeclaration<StatusDisplayPipe, "statusDisplay", true>;
|
|
1534
2358
|
}
|
|
1535
2359
|
|
|
1536
|
-
export { AUTOCOMPLETE_WRAPPER_CUSTOMER_CONFIG, AUTOCOMPLETE_WRAPPER_DEFAULT_CONFIG, AUTOCOMPLETE_WRAPPER_LOCAL_CONFIG, AUTOCOMPLETE_WRAPPER_PAGINATED_CONFIG, AUTOCOMPLETE_WRAPPER_PRODUCT_CONFIG, AUTOCOMPLETE_WRAPPER_SIMPLE_CONFIG, AdvancedDialogService, AutocompleteWrapperService, Button, DATA_GRID_DEFAULT_OPTIONS, DataGrid, DateRangePicker, DialogWrapper, DynamicCard, DynamicSelect, GetTotalPipe, IconRegistryService, InputChip, KeyboardNavigationService, OverlayService, Pagination, ReusableAutocompleteComponent, Spinner, StatusDisplayPipe, SvgIcon, TabulatorTable, ThemeSwitcher, ThemeToggle, ToUpperCase, UserIcon, createAutocompleteWrapperConfig };
|
|
1537
|
-
export type { AutocompleteWrapperActions, AutocompleteWrapperConfig, AutocompleteWrapperEventHandler, AutocompleteWrapperEvents, AutocompleteWrapperFilters, AutocompleteWrapperItem, AutocompleteWrapperItemProperty, AutocompleteWrapperPaginationInfo, AutocompleteWrapperSearchField, AutocompleteWrapperSearchFunction, AutocompleteWrapperSearchMode, AutocompleteWrapperSearchResult, AutocompleteWrapperState, AutocompleteWrapperStockOption, DataGridButtonType, DataGridCellTemplate, DataGridColumn, DataGridColumnButton, DataGridColumnButtonBadge, DataGridColumnButtonPop, DataGridColumnButtonTooltip, DataGridColumnPinOption, DataGridColumnPinValue, DataGridColumnTag, DataGridColumnTagValue, DataGridColumnType, DataGridColumnTypeParameter, DataGridDefaultOptions, DataGridMenuItem, DataGridRowClassFormatter, DataGridRowSelectionFormatter, DataGridSortProp, DateRangePickerOptions, DateRangeValue, DialogSize, DialogWrapperConfig, FocusableElement, IconRegistryConfig, MatCustomDialogConfig, ReusableAutocompleteWrapperComponent, TabulatorColumn, TabulatorConfig, TabulatorEventHandlers, TabulatorTheme };
|
|
2360
|
+
export { ACP_DRAWER_DATA, ACP_DRAWER_DEFAULT_OPTIONS, ACP_POPOVER_CONTENT, ACP_POPOVER_DEFAULT_OPTIONS, ACP_POPOVER_SCROLL_STRATEGY, AUTOCOMPLETE_WRAPPER_CUSTOMER_CONFIG, AUTOCOMPLETE_WRAPPER_DEFAULT_CONFIG, AUTOCOMPLETE_WRAPPER_LOCAL_CONFIG, AUTOCOMPLETE_WRAPPER_PAGINATED_CONFIG, AUTOCOMPLETE_WRAPPER_PRODUCT_CONFIG, AUTOCOMPLETE_WRAPPER_SIMPLE_CONFIG, AcpDrawer, AcpDrawerConfig, AcpDrawerContainer, AcpDrawerRef, AcpPopover, AcpPopoverContent, AcpPopoverTarget, AcpPopoverTrigger, AdvancedDialogService, AutocompleteWrapperService, Button, DATA_GRID_DEFAULT_OPTIONS, DataGrid, DateRangePicker, DialogWrapper, DynamicCard, DynamicSelect, GetTotalPipe, IconRegistryService, InputChip, KeyboardNavigationService, OverlayService, Pagination, ReusableAutocompleteComponent, Spinner, StatusDisplayPipe, SvgIcon, TabulatorTable, ThemeSwitcher, ThemeToggle, ToUpperCase, UserIcon, _AcpPopoverContentBase, createAutocompleteWrapperConfig, throwAcpPopoverInvalidPositionEnd, throwAcpPopoverInvalidPositionStart, throwAcpPopoverMissingError };
|
|
2361
|
+
export type { AcpPopoverDefaultOptions, AcpPopoverPanel, AcpPopoverPosition, AcpPopoverPositionEnd, AcpPopoverPositionStart, AcpPopoverTriggerEvent, AutoFocusTarget, AutocompleteWrapperActions, AutocompleteWrapperConfig, AutocompleteWrapperEventHandler, AutocompleteWrapperEvents, AutocompleteWrapperFilters, AutocompleteWrapperItem, AutocompleteWrapperItemProperty, AutocompleteWrapperPaginationInfo, AutocompleteWrapperSearchField, AutocompleteWrapperSearchFunction, AutocompleteWrapperSearchMode, AutocompleteWrapperSearchResult, AutocompleteWrapperState, AutocompleteWrapperStockOption, DataGridButtonType, DataGridCellTemplate, DataGridColumn, DataGridColumnButton, DataGridColumnButtonBadge, DataGridColumnButtonPop, DataGridColumnButtonTooltip, DataGridColumnPinOption, DataGridColumnPinValue, DataGridColumnTag, DataGridColumnTagValue, DataGridColumnType, DataGridColumnTypeParameter, DataGridDefaultOptions, DataGridMenuItem, DataGridRowClassFormatter, DataGridRowSelectionFormatter, DataGridSortProp, DateRangePickerOptions, DateRangeValue, DialogSize, DialogWrapperConfig, DrawerPosition, FocusableElement, IconRegistryConfig, MatCustomDialogConfig, PopoverCloseReason, ReusableAutocompleteWrapperComponent, TabulatorColumn, TabulatorConfig, TabulatorEventHandlers, TabulatorTheme };
|