@acontplus/ng-components 1.0.11 → 1.0.13
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/README.md +111 -1
- package/fesm2022/acontplus-ng-components.mjs +75 -57
- package/fesm2022/acontplus-ng-components.mjs.map +1 -1
- package/index.d.ts +36 -26
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { Type, AfterViewInit, ViewContainerRef, ElementRef, OnChanges,
|
|
2
|
+
import { Type, AfterViewInit, OnDestroy, ViewContainerRef, ElementRef, OnChanges, SimpleChanges, TemplateRef, AfterContentInit, OnInit, InjectionToken, PipeTransform } from '@angular/core';
|
|
3
3
|
import { MatDialogRef } from '@angular/material/dialog';
|
|
4
4
|
import { ScrollStrategy } from '@angular/cdk/overlay';
|
|
5
5
|
import { MatChipInputEvent, MatChipEditedEvent } from '@angular/material/chips';
|
|
@@ -8,7 +8,7 @@ import { ThemePalette } from '@angular/material/core';
|
|
|
8
8
|
import { Tabulator } from 'tabulator-tables';
|
|
9
9
|
import * as _angular_material_paginator from '@angular/material/paginator';
|
|
10
10
|
import { PageEvent } from '@angular/material/paginator';
|
|
11
|
-
import { MatTableDataSource, MatHeaderRowDef, MatRowDef, MatFooterRowDef, MatColumnDef,
|
|
11
|
+
import { MatTableDataSource, MatHeaderRowDef, MatRowDef, MatFooterRowDef, MatColumnDef, MatTable } from '@angular/material/table';
|
|
12
12
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
13
13
|
import * as rxjs from 'rxjs';
|
|
14
14
|
import { Observable } from 'rxjs';
|
|
@@ -91,7 +91,7 @@ declare class MatDynamicCardComponent {
|
|
|
91
91
|
* Alignment of the action buttons.
|
|
92
92
|
* @default 'end'
|
|
93
93
|
*/
|
|
94
|
-
buttonsPosition: _angular_core.InputSignal<"
|
|
94
|
+
buttonsPosition: _angular_core.InputSignal<"end" | "start">;
|
|
95
95
|
/**
|
|
96
96
|
* Event emitted when the primary button is clicked.
|
|
97
97
|
*/
|
|
@@ -132,7 +132,7 @@ type DialogSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | 'full';
|
|
|
132
132
|
* This is the main configuration object for any dialog opened through the service.
|
|
133
133
|
* It extends the standard MatDialogConfig with custom properties for convenience.
|
|
134
134
|
*/
|
|
135
|
-
interface MatCustomDialogConfig<T =
|
|
135
|
+
interface MatCustomDialogConfig<T = unknown> {
|
|
136
136
|
data?: T;
|
|
137
137
|
size?: DialogSize;
|
|
138
138
|
width?: string;
|
|
@@ -179,12 +179,12 @@ interface MatCustomDialogConfig<T = any> {
|
|
|
179
179
|
* hideHeader: false
|
|
180
180
|
* };
|
|
181
181
|
*/
|
|
182
|
-
interface DialogWrapperConfig<T =
|
|
182
|
+
interface DialogWrapperConfig<T = unknown> {
|
|
183
183
|
/**
|
|
184
184
|
* The component type to render inside the dialog wrapper.
|
|
185
185
|
* This component will be dynamically created and inserted into the dialog.
|
|
186
186
|
*/
|
|
187
|
-
component: Type<
|
|
187
|
+
component: Type<unknown>;
|
|
188
188
|
/**
|
|
189
189
|
* The title text to display in the dialog header.
|
|
190
190
|
*/
|
|
@@ -218,7 +218,7 @@ declare class AdvancedDialogService {
|
|
|
218
218
|
* @param config The detailed configuration for the dialog.
|
|
219
219
|
* @returns A MatDialogRef instance.
|
|
220
220
|
*/
|
|
221
|
-
open<T, D =
|
|
221
|
+
open<T, D = unknown, R = unknown>(component: ComponentType<T>, config?: MatCustomDialogConfig<D>): Promise<MatDialogRef<T, R>>;
|
|
222
222
|
/**
|
|
223
223
|
* A powerful helper to open a component inside our standard, branded "wrapper".
|
|
224
224
|
* This provides maximum consistency.
|
|
@@ -226,11 +226,11 @@ declare class AdvancedDialogService {
|
|
|
226
226
|
* @param matDialogConfig Standard MatDialog configuration (size, position, etc.).
|
|
227
227
|
* @returns A MatDialogRef instance pointing to the wrapper.
|
|
228
228
|
*/
|
|
229
|
-
openInWrapper<T, R =
|
|
229
|
+
openInWrapper<T, R = unknown>(wrapperConfig: DialogWrapperConfig<T>, matDialogConfig?: MatCustomDialogConfig<T>): Promise<MatDialogRef<DialogWrapperComponent, R>>;
|
|
230
230
|
/**
|
|
231
231
|
* Helper to open a dialog and only get an observable of the result.
|
|
232
232
|
*/
|
|
233
|
-
openAndGetResult<T, D =
|
|
233
|
+
openAndGetResult<T, D = unknown, R = unknown>(component: ComponentType<T>, config?: MatCustomDialogConfig<D>): Promise<R | undefined>;
|
|
234
234
|
/**
|
|
235
235
|
* Closes all currently open dialogs.
|
|
236
236
|
*/
|
|
@@ -245,10 +245,8 @@ declare class AdvancedDialogService {
|
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
declare class OverlayService {
|
|
248
|
-
private overlay;
|
|
248
|
+
private readonly overlay;
|
|
249
249
|
private overlayRef;
|
|
250
|
-
/** Inserted by Angular inject() migration for backwards compatibility */
|
|
251
|
-
constructor(...args: unknown[]);
|
|
252
250
|
showSpinner(): void;
|
|
253
251
|
hideSpinner(): void;
|
|
254
252
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OverlayService, never>;
|
|
@@ -453,9 +451,9 @@ declare class AutocompleteWrapperService {
|
|
|
453
451
|
* data: { message: 'This is some data passed to the dialog content component' }
|
|
454
452
|
* });
|
|
455
453
|
*/
|
|
456
|
-
declare class DialogWrapperComponent implements AfterViewInit {
|
|
454
|
+
declare class DialogWrapperComponent implements AfterViewInit, OnDestroy {
|
|
457
455
|
dialogRef: MatDialogRef<DialogWrapperComponent, any>;
|
|
458
|
-
config: DialogWrapperConfig<
|
|
456
|
+
config: DialogWrapperConfig<unknown>;
|
|
459
457
|
/**
|
|
460
458
|
* A template reference that acts as an anchor for dynamic content.
|
|
461
459
|
* This is where the component specified in the config will be rendered.
|
|
@@ -471,13 +469,26 @@ declare class DialogWrapperComponent implements AfterViewInit {
|
|
|
471
469
|
* Ensures that the most recently clicked dialog appears on top.
|
|
472
470
|
*/
|
|
473
471
|
private static lastZIndex;
|
|
474
|
-
/**
|
|
475
|
-
|
|
472
|
+
/**
|
|
473
|
+
* Timeout ID for debouncing z-index updates to prevent excessive DOM manipulations.
|
|
474
|
+
*/
|
|
475
|
+
private bringToFrontTimeoutId;
|
|
476
|
+
/**
|
|
477
|
+
* Creates an instance of DialogWrapperComponent.
|
|
478
|
+
*
|
|
479
|
+
* @param dialogRef Reference to the dialog opened via the Material Dialog service
|
|
480
|
+
* @param config Configuration for the dialog wrapper, injected from MAT_DIALOG_DATA
|
|
481
|
+
*/
|
|
482
|
+
constructor();
|
|
476
483
|
/**
|
|
477
484
|
* Lifecycle hook that initializes the dynamic content after the view is ready.
|
|
478
485
|
* Creates the component specified in the config and passes data to it.
|
|
479
486
|
*/
|
|
480
487
|
ngAfterViewInit(): void;
|
|
488
|
+
/**
|
|
489
|
+
* Cleanup lifecycle hook to cancel any pending animation frame requests.
|
|
490
|
+
*/
|
|
491
|
+
ngOnDestroy(): void;
|
|
481
492
|
/**
|
|
482
493
|
* Closes the dialog.
|
|
483
494
|
* Called when the close button in the header is clicked.
|
|
@@ -485,6 +496,7 @@ declare class DialogWrapperComponent implements AfterViewInit {
|
|
|
485
496
|
onClose(): void;
|
|
486
497
|
/**
|
|
487
498
|
* Brings the dialog to the front by adjusting its z-index.
|
|
499
|
+
* Uses requestAnimationFrame to debounce updates and prevent excessive DOM manipulations.
|
|
488
500
|
* Called when the dialog header is clicked.
|
|
489
501
|
*/
|
|
490
502
|
bringToFront(): void;
|
|
@@ -730,7 +742,7 @@ declare class ColumnDefinition<T = any> extends FieldDefinition<T> {
|
|
|
730
742
|
constructor(options?: Partial<ColumnDefinition<T>>);
|
|
731
743
|
}
|
|
732
744
|
|
|
733
|
-
interface OptionSearchConfig
|
|
745
|
+
interface OptionSearchConfig {
|
|
734
746
|
displayedColumns?: string[];
|
|
735
747
|
displayColumnDefs?: ColumnDefinition[];
|
|
736
748
|
close?: boolean;
|
|
@@ -810,7 +822,6 @@ declare class MatDynamicTableComponent<T extends TableRow> implements AfterConte
|
|
|
810
822
|
readonly rowDefs: _angular_core.Signal<readonly MatRowDef<unknown>[]>;
|
|
811
823
|
readonly footerRowDefs: _angular_core.Signal<readonly MatFooterRowDef[]>;
|
|
812
824
|
readonly columnDefs: _angular_core.Signal<readonly MatColumnDef[]>;
|
|
813
|
-
readonly noDataRow: _angular_core.Signal<MatNoDataRow>;
|
|
814
825
|
readonly table: _angular_core.Signal<MatTable<any>>;
|
|
815
826
|
readonly rows: _angular_core.Signal<readonly ViewContainerRef[]>;
|
|
816
827
|
ngOnInit(): void;
|
|
@@ -831,14 +842,13 @@ declare class MatDynamicTableComponent<T extends TableRow> implements AfterConte
|
|
|
831
842
|
getRowColor(element: T): Record<string, string>;
|
|
832
843
|
handlePageEvent(e: PageEvent): void;
|
|
833
844
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MatDynamicTableComponent<any>, never>;
|
|
834
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MatDynamicTableComponent<any>, "acp-mat-dynamic-table", never, { "showExpand": { "alias": "showExpand"; "required": false; "isSignal": true; }; "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "highlightRowIndex": { "alias": "highlightRowIndex"; "required": false; "isSignal": true; }; "visibleColumns": { "alias": "visibleColumns"; "required": false; }; "columnDefinitions": { "alias": "columnDefinitions"; "required": false; }; "showSelectBox": { "alias": "showSelectBox"; "required": false; "isSignal": true; }; "tableData": { "alias": "tableData"; "required": false; "isSignal": true; }; "rowTemplate": { "alias": "rowTemplate"; "required": false; "isSignal": true; }; "expandedDetail": { "alias": "expandedDetail"; "required": false; }; "enablePagination": { "alias": "enablePagination"; "required": false; "isSignal": true; }; "paginationConfig": { "alias": "paginationConfig"; "required": false; }; "isLoadingData": { "alias": "isLoadingData"; "required": false; "isSignal": true; }; }, { "rowSelected": "rowSelected"; "copyRow": "copyRow"; "showExpanded": "showExpanded"; "hideExpanded": "hideExpanded"; "pageEvent": "pageEvent"; }, ["headerRowDefs", "rowDefs", "footerRowDefs", "columnDefs", "
|
|
845
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MatDynamicTableComponent<any>, "acp-mat-dynamic-table", never, { "showExpand": { "alias": "showExpand"; "required": false; "isSignal": true; }; "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "highlightRowIndex": { "alias": "highlightRowIndex"; "required": false; "isSignal": true; }; "visibleColumns": { "alias": "visibleColumns"; "required": false; }; "columnDefinitions": { "alias": "columnDefinitions"; "required": false; }; "showSelectBox": { "alias": "showSelectBox"; "required": false; "isSignal": true; }; "tableData": { "alias": "tableData"; "required": false; "isSignal": true; }; "rowTemplate": { "alias": "rowTemplate"; "required": false; "isSignal": true; }; "expandedDetail": { "alias": "expandedDetail"; "required": false; }; "enablePagination": { "alias": "enablePagination"; "required": false; "isSignal": true; }; "paginationConfig": { "alias": "paginationConfig"; "required": false; }; "isLoadingData": { "alias": "isLoadingData"; "required": false; "isSignal": true; }; }, { "rowSelected": "rowSelected"; "copyRow": "copyRow"; "showExpanded": "showExpanded"; "hideExpanded": "hideExpanded"; "pageEvent": "pageEvent"; }, ["headerRowDefs", "rowDefs", "footerRowDefs", "columnDefs", "rows"], never, true, never>;
|
|
835
846
|
}
|
|
836
847
|
|
|
837
848
|
declare class ThemeToggleComponent {
|
|
838
849
|
private themeService;
|
|
839
850
|
darkMode$: Observable<boolean>;
|
|
840
|
-
|
|
841
|
-
constructor(...args: unknown[]);
|
|
851
|
+
constructor();
|
|
842
852
|
toggleDarkMode(): void;
|
|
843
853
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThemeToggleComponent, never>;
|
|
844
854
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ThemeToggleComponent, "acp-theme-toggle", never, {}, {}, never, never, true, never>;
|
|
@@ -910,7 +920,7 @@ declare class ReusableAutocompleteComponent implements OnInit, OnDestroy {
|
|
|
910
920
|
goToPreviousPage(): void;
|
|
911
921
|
goToNextPage(): void;
|
|
912
922
|
goToLastPage(): void;
|
|
913
|
-
onCreateNew($event: MouseEvent): void;
|
|
923
|
+
onCreateNew(_$event: MouseEvent): void;
|
|
914
924
|
onAdvancedSearch(): void;
|
|
915
925
|
onShowAllResults(): void;
|
|
916
926
|
getItemDisplayText(item: AutocompleteWrapperItem): string;
|
|
@@ -927,11 +937,11 @@ declare class ToUpperCaseDirective implements ControlValueAccessor {
|
|
|
927
937
|
private el;
|
|
928
938
|
private renderer;
|
|
929
939
|
onInput(): void;
|
|
930
|
-
onChange: (
|
|
940
|
+
onChange: (_value: string) => void;
|
|
931
941
|
onTouched: () => void;
|
|
932
|
-
writeValue(value:
|
|
933
|
-
registerOnChange(fn:
|
|
934
|
-
registerOnTouched(fn:
|
|
942
|
+
writeValue(value: string): void;
|
|
943
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
944
|
+
registerOnTouched(fn: () => void): void;
|
|
935
945
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToUpperCaseDirective, never>;
|
|
936
946
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ToUpperCaseDirective, "[acpToUpperCase]", never, {}, {}, never, never, true, never>;
|
|
937
947
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acontplus/ng-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "Angular Material UI component library with dynamic tables, theming support, dialog wrappers, and comprehensive styling utilities",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/cdk": "^20.2.5",
|