@acontplus/ng-components 2.1.8 → 2.1.10
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acontplus/ng-components",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.10",
|
|
4
4
|
"description": "Comprehensive Angular Material UI component library featuring dynamic Tabulator tables, theme toggle with dark mode, dialog wrappers, autocomplete components, cards, buttons, icons, input chips, spinners, directives, pipes, and SCSS styling utilities.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@acontplus/ui-kit": "^1.0.2",
|
|
@@ -503,7 +503,7 @@ declare class DynamicSelect implements OnInit, OnDestroy {
|
|
|
503
503
|
clearable: _angular_core.InputSignal<boolean>;
|
|
504
504
|
searchable: _angular_core.InputSignal<boolean>;
|
|
505
505
|
virtualScroll: _angular_core.InputSignal<boolean>;
|
|
506
|
-
dropdownPosition: _angular_core.InputSignal<"
|
|
506
|
+
dropdownPosition: _angular_core.InputSignal<"top" | "bottom" | "auto">;
|
|
507
507
|
closeOnSelect: _angular_core.InputSignal<boolean>;
|
|
508
508
|
hideSelected: _angular_core.InputSignal<boolean>;
|
|
509
509
|
multiple: _angular_core.InputSignal<boolean>;
|
|
@@ -1899,7 +1899,7 @@ type AcpPopoverPosition = [AcpPopoverPositionStart, AcpPopoverPositionEnd];
|
|
|
1899
1899
|
/** Popover's trigger event. */
|
|
1900
1900
|
type AcpPopoverTriggerEvent = 'click' | 'hover' | 'none';
|
|
1901
1901
|
/** Reason why the popover was closed. */
|
|
1902
|
-
type PopoverCloseReason = void | 'click' | 'keydown' | 'tab';
|
|
1902
|
+
type PopoverCloseReason = void | 'click' | 'keydown' | 'tab' | 'programmatic';
|
|
1903
1903
|
|
|
1904
1904
|
/**
|
|
1905
1905
|
* Interface for a custom popover panel that can be used with `acpPopoverTriggerFor`.
|
|
@@ -1958,6 +1958,7 @@ declare const ACP_POPOVER_DEFAULT_OPTIONS: InjectionToken<AcpPopoverDefaultOptio
|
|
|
1958
1958
|
* various positioning options. It's built on top of Angular CDK Overlay
|
|
1959
1959
|
* and provides a flexible way to display contextual information.
|
|
1960
1960
|
*
|
|
1961
|
+
* ## Basic Usage
|
|
1961
1962
|
* @example
|
|
1962
1963
|
* ```html
|
|
1963
1964
|
* <acp-popover #popover="acpPopover" [position]="['below', 'after']">
|
|
@@ -1966,6 +1967,62 @@ declare const ACP_POPOVER_DEFAULT_OPTIONS: InjectionToken<AcpPopoverDefaultOptio
|
|
|
1966
1967
|
*
|
|
1967
1968
|
* <button [acpPopoverTriggerFor]="popover">Show popover</button>
|
|
1968
1969
|
* ```
|
|
1970
|
+
*
|
|
1971
|
+
* ## Closing Explicitly
|
|
1972
|
+
*
|
|
1973
|
+
* ### 1. Close from within popover content:
|
|
1974
|
+
* @example
|
|
1975
|
+
* ```html
|
|
1976
|
+
* <acp-popover #popover="acpPopover">
|
|
1977
|
+
* <div>
|
|
1978
|
+
* <p>Popover content</p>
|
|
1979
|
+
* <button (click)="popover.close()">Close</button>
|
|
1980
|
+
* <button (click)="popover.close('user-action')">Close with reason</button>
|
|
1981
|
+
* </div>
|
|
1982
|
+
* </acp-popover>
|
|
1983
|
+
* ```
|
|
1984
|
+
*
|
|
1985
|
+
* ### 2. Close from component using ViewChild:
|
|
1986
|
+
* @example
|
|
1987
|
+
* ```typescript
|
|
1988
|
+
* @Component({
|
|
1989
|
+
* template: `
|
|
1990
|
+
* <acp-popover #popover="acpPopover">
|
|
1991
|
+
* <div>Content with external close</div>
|
|
1992
|
+
* </acp-popover>
|
|
1993
|
+
* <button [acpPopoverTriggerFor]="popover">Open</button>
|
|
1994
|
+
* <button (click)="closePopover()">Close from outside</button>
|
|
1995
|
+
* `
|
|
1996
|
+
* })
|
|
1997
|
+
* export class MyComponent {
|
|
1998
|
+
* @ViewChild('popover') popover!: AcpPopover;
|
|
1999
|
+
*
|
|
2000
|
+
* closePopover() {
|
|
2001
|
+
* this.popover.close('programmatic');
|
|
2002
|
+
* }
|
|
2003
|
+
* }
|
|
2004
|
+
* ```
|
|
2005
|
+
*
|
|
2006
|
+
* ### 3. Close using trigger reference:
|
|
2007
|
+
* @example
|
|
2008
|
+
* ```html
|
|
2009
|
+
* <acp-popover #popover="acpPopover">
|
|
2010
|
+
* <div>Popover content</div>
|
|
2011
|
+
* </acp-popover>
|
|
2012
|
+
*
|
|
2013
|
+
* <button [acpPopoverTriggerFor]="popover" #trigger="acpPopoverTrigger">
|
|
2014
|
+
* Show popover
|
|
2015
|
+
* </button>
|
|
2016
|
+
* <button (click)="trigger.closePopover()">Close via trigger</button>
|
|
2017
|
+
* <button (click)="trigger.closePopoverWithReason('external')">Close with reason</button>
|
|
2018
|
+
* ```
|
|
2019
|
+
*
|
|
2020
|
+
* ## Automatic Closing
|
|
2021
|
+
* The popover automatically closes on:
|
|
2022
|
+
* - ESC key press
|
|
2023
|
+
* - Click outside (backdrop) when `closeOnBackdropClick` is true
|
|
2024
|
+
* - Mouse leave after delay when `triggerEvent` is 'hover'
|
|
2025
|
+
* - Click on panel when `closeOnPanelClick` is true
|
|
1969
2026
|
*/
|
|
1970
2027
|
declare class AcpPopover implements AcpPopoverPanel, OnInit, OnDestroy {
|
|
1971
2028
|
private _changeDetectorRef;
|
|
@@ -2056,6 +2113,11 @@ declare class AcpPopover implements AcpPopoverPanel, OnInit, OnDestroy {
|
|
|
2056
2113
|
set classList(classes: string);
|
|
2057
2114
|
/** Event emitted when the popover is closed. */
|
|
2058
2115
|
closed: EventEmitter<PopoverCloseReason>;
|
|
2116
|
+
/**
|
|
2117
|
+
* Programmatically closes the popover.
|
|
2118
|
+
* @param reason Optional reason for closing
|
|
2119
|
+
*/
|
|
2120
|
+
close(reason?: PopoverCloseReason): void;
|
|
2059
2121
|
/** @docs-private */
|
|
2060
2122
|
templateRef: TemplateRef<any>;
|
|
2061
2123
|
/**
|
|
@@ -2163,6 +2225,7 @@ declare const ACP_POPOVER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
|
|
|
2163
2225
|
* The trigger handles various events (click, hover) and manages the popover's lifecycle,
|
|
2164
2226
|
* including opening, closing, positioning, and focus management.
|
|
2165
2227
|
*
|
|
2228
|
+
* ## Basic Usage
|
|
2166
2229
|
* @example
|
|
2167
2230
|
* ```html
|
|
2168
2231
|
* <acp-popover #popover="acpPopover">
|
|
@@ -2173,6 +2236,33 @@ declare const ACP_POPOVER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
|
|
|
2173
2236
|
* Show popover
|
|
2174
2237
|
* </button>
|
|
2175
2238
|
* ```
|
|
2239
|
+
*
|
|
2240
|
+
* ## Programmatic Control
|
|
2241
|
+
* @example
|
|
2242
|
+
* ```html
|
|
2243
|
+
* <acp-popover #popover="acpPopover">
|
|
2244
|
+
* <div>Popover content</div>
|
|
2245
|
+
* </acp-popover>
|
|
2246
|
+
*
|
|
2247
|
+
* <button [acpPopoverTriggerFor]="popover" #trigger="acpPopoverTrigger">
|
|
2248
|
+
* Toggle popover
|
|
2249
|
+
* </button>
|
|
2250
|
+
*
|
|
2251
|
+
* <!-- Programmatic control -->
|
|
2252
|
+
* <button (click)="trigger.openPopover()">Open</button>
|
|
2253
|
+
* <button (click)="trigger.closePopover()">Close</button>
|
|
2254
|
+
* <button (click)="trigger.closePopoverWithReason('manual')">Close with reason</button>
|
|
2255
|
+
* <button (click)="trigger.togglePopover()">Toggle</button>
|
|
2256
|
+
* ```
|
|
2257
|
+
*
|
|
2258
|
+
* ## Custom Target
|
|
2259
|
+
* @example
|
|
2260
|
+
* ```html
|
|
2261
|
+
* <div acpPopoverTarget #target="acpPopoverTarget">Target element</div>
|
|
2262
|
+
* <button [acpPopoverTriggerFor]="popover" [targetElement]="target">
|
|
2263
|
+
* Trigger (popover appears at target)
|
|
2264
|
+
* </button>
|
|
2265
|
+
* ```
|
|
2176
2266
|
*/
|
|
2177
2267
|
declare class AcpPopoverTrigger implements AfterContentInit, OnDestroy {
|
|
2178
2268
|
private _overlay;
|
|
@@ -2251,6 +2341,11 @@ declare class AcpPopoverTrigger implements AfterContentInit, OnDestroy {
|
|
|
2251
2341
|
openPopover(): void;
|
|
2252
2342
|
/** Closes the popover. */
|
|
2253
2343
|
closePopover(): void;
|
|
2344
|
+
/**
|
|
2345
|
+
* Programmatically closes the popover with a specific reason.
|
|
2346
|
+
* @param reason The reason for closing
|
|
2347
|
+
*/
|
|
2348
|
+
closePopoverWithReason(reason: PopoverCloseReason): void;
|
|
2254
2349
|
/**
|
|
2255
2350
|
* Focuses the popover trigger.
|
|
2256
2351
|
* @param origin Source of the popover trigger's focus.
|