@seniorsistemas/data-seniorx-core 2.2.0 → 2.3.0
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/core/types/table-options.type.d.ts +11 -0
- package/core/types/table.type.d.ts +2 -1
- package/esm2022/core/types/table-options.type.mjs +8 -2
- package/esm2022/core/types/table.type.mjs +2 -2
- package/esm2022/features/loading-state/loading-state.component.mjs +63 -6
- package/esm2022/features/table/components/table-actions-menu.component.mjs +151 -4
- package/esm2022/features/table/components/table-cell-content.component.mjs +6 -3
- package/esm2022/features/table/table.component.mjs +42 -5
- package/features/loading-state/loading-state.component.d.ts +2 -0
- package/features/table/components/table-actions-menu.component.d.ts +18 -4
- package/features/table/components/table-cell-content.component.d.ts +2 -1
- package/features/table/table.component.d.ts +6 -2
- package/fesm2022/seniorsistemas-data-seniorx-core.mjs +381 -133
- package/fesm2022/seniorsistemas-data-seniorx-core.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { OnDestroy, TemplateRef } from '@angular/core';
|
|
|
2
2
|
import type { LoadingStateIndicator } from '../../core/types/loading-state.type';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class LoadingStateComponent implements OnDestroy {
|
|
5
|
+
private static readonly LOGO_SVG;
|
|
5
6
|
contents: TemplateRef<unknown> | null;
|
|
6
7
|
indicator: LoadingStateIndicator;
|
|
7
8
|
id: string;
|
|
@@ -12,6 +13,7 @@ export declare class LoadingStateComponent implements OnDestroy {
|
|
|
12
13
|
get loading(): boolean;
|
|
13
14
|
get blocking(): boolean;
|
|
14
15
|
readonly fullscreenZIndex = 1005;
|
|
16
|
+
readonly logoSvg: string;
|
|
15
17
|
private readonly _loading;
|
|
16
18
|
private readonly _blocking;
|
|
17
19
|
private blockTimeoutId?;
|
|
@@ -1,12 +1,26 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import type
|
|
1
|
+
import { AfterViewInit, EventEmitter } from '@angular/core';
|
|
2
|
+
import { type TableActionMenuCloseEvent, type TableActionMenuItem } from '../../../core/types/table.type';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class TableActionsMenuComponent {
|
|
4
|
+
export declare class TableActionsMenuComponent implements AfterViewInit {
|
|
5
|
+
private readonly menuItems;
|
|
6
|
+
ariaLabel: string;
|
|
5
7
|
items: TableActionMenuItem[];
|
|
6
8
|
left: number;
|
|
9
|
+
menuId: string;
|
|
7
10
|
top: number;
|
|
8
11
|
width: number;
|
|
12
|
+
close: EventEmitter<TableActionMenuCloseEvent>;
|
|
9
13
|
select: EventEmitter<TableActionMenuItem>;
|
|
14
|
+
protected activeIndex: number;
|
|
15
|
+
ngAfterViewInit(): void;
|
|
16
|
+
protected onItemFocus(index: number): void;
|
|
17
|
+
protected onItemKeydown(event: KeyboardEvent, index: number): void;
|
|
18
|
+
private focusFirstEnabledItem;
|
|
19
|
+
private focusEdge;
|
|
20
|
+
private focusRelative;
|
|
21
|
+
private focusIndex;
|
|
22
|
+
private enabledIndexes;
|
|
23
|
+
private handleTabNavigation;
|
|
10
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableActionsMenuComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableActionsMenuComponent, "sdc-table-actions-menu", never, { "items": { "alias": "items"; "required": false; }; "left": { "alias": "left"; "required": false; }; "top": { "alias": "top"; "required": false; }; "width": { "alias": "width"; "required": false; }; }, { "select": "select"; }, never, never, true, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableActionsMenuComponent, "sdc-table-actions-menu", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "items": { "alias": "items"; "required": false; }; "left": { "alias": "left"; "required": false; }; "menuId": { "alias": "menuId"; "required": false; }; "top": { "alias": "top"; "required": false; }; "width": { "alias": "width"; "required": false; }; }, { "close": "close"; "select": "select"; }, never, never, true, never>;
|
|
12
26
|
}
|
|
@@ -9,6 +9,7 @@ export declare class TableCellContentComponent<T extends RowBase = RowBase> {
|
|
|
9
9
|
resolveValue: (row: T, field?: string) => unknown;
|
|
10
10
|
row: T;
|
|
11
11
|
actionsMenuOpen: boolean;
|
|
12
|
+
actionsMenuId: string | null;
|
|
12
13
|
defaultTextOverflow?: TableTextOverflow;
|
|
13
14
|
rowCheckboxId: string;
|
|
14
15
|
rowLabel: string;
|
|
@@ -37,5 +38,5 @@ export declare class TableCellContentComponent<T extends RowBase = RowBase> {
|
|
|
37
38
|
protected actionsButtonLabel(): string;
|
|
38
39
|
protected onActionsClick(event: Event, trigger: HTMLElement): void;
|
|
39
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableCellContentComponent<any>, never>;
|
|
40
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableCellContentComponent<any>, "sdc-table-cell-content", never, { "cellConfigs": { "alias": "cellConfigs"; "required": true; }; "col": { "alias": "col"; "required": true; }; "resolveValue": { "alias": "resolveValue"; "required": true; }; "row": { "alias": "row"; "required": true; }; "actionsMenuOpen": { "alias": "actionsMenuOpen"; "required": false; }; "defaultTextOverflow": { "alias": "defaultTextOverflow"; "required": false; }; "rowCheckboxId": { "alias": "rowCheckboxId"; "required": false; }; "rowLabel": { "alias": "rowLabel"; "required": false; }; "rowSelected": { "alias": "rowSelected"; "required": false; }; }, { "toggleActionsMenu": "toggleActionsMenu"; "toggleRow": "toggleRow"; "triggerButtonAction": "triggerButtonAction"; }, never, never, true, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableCellContentComponent<any>, "sdc-table-cell-content", never, { "cellConfigs": { "alias": "cellConfigs"; "required": true; }; "col": { "alias": "col"; "required": true; }; "resolveValue": { "alias": "resolveValue"; "required": true; }; "row": { "alias": "row"; "required": true; }; "actionsMenuOpen": { "alias": "actionsMenuOpen"; "required": false; }; "actionsMenuId": { "alias": "actionsMenuId"; "required": false; }; "defaultTextOverflow": { "alias": "defaultTextOverflow"; "required": false; }; "rowCheckboxId": { "alias": "rowCheckboxId"; "required": false; }; "rowLabel": { "alias": "rowLabel"; "required": false; }; "rowSelected": { "alias": "rowSelected"; "required": false; }; }, { "toggleActionsMenu": "toggleActionsMenu"; "toggleRow": "toggleRow"; "triggerButtonAction": "triggerButtonAction"; }, never, never, true, never>;
|
|
41
42
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import type { PaginatorState } from '../../core/types/paginator.type';
|
|
3
3
|
import { type SearchTriggerMode } from '../../core/types/searchbox.type';
|
|
4
|
-
import { type RowBase, type SortOrder, type TableActionMenuItem as NativeActionMenuItem, type TableCellConfig, type TableColumn, type TableOpenMenuState as OpenMenuState, type TableOptions, type TableSearchEvent } from '../../core/types/table.type';
|
|
4
|
+
import { type RowBase, type SortOrder, type TableActionMenuItem as NativeActionMenuItem, type TableActionMenuCloseEvent, type TableCellConfig, type TableColumn, type TableOpenMenuState as OpenMenuState, type TableOptions, type TableSearchEvent, TableMenuFocusTarget } from '../../core/types/table.type';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class TableComponent<T extends RowBase = RowBase> {
|
|
7
|
+
private actionsMenuIdSequence;
|
|
7
8
|
private readonly colsSignal;
|
|
8
9
|
private readonly dataSignal;
|
|
9
10
|
private readonly loadingSignal;
|
|
@@ -85,10 +86,11 @@ export declare class TableComponent<T extends RowBase = RowBase> {
|
|
|
85
86
|
protected getRowCheckboxLabel(row: T): string;
|
|
86
87
|
protected tableAriaLabelKey(): string;
|
|
87
88
|
protected toggleActionsMenu(event: Event, row: T, col: TableColumn<T>, triggerElement: HTMLElement): void;
|
|
88
|
-
protected closeActionsMenu(): void;
|
|
89
|
+
protected closeActionsMenu(focusTarget?: TableMenuFocusTarget): void;
|
|
89
90
|
protected isActionsMenuOpen(row: T, col: TableColumn<T>): boolean;
|
|
90
91
|
protected actionItemsFor(row: T, options: TableCellConfig<T, 'actions'>): NativeActionMenuItem[];
|
|
91
92
|
protected onPortalActionClick(item: NativeActionMenuItem): void;
|
|
93
|
+
protected onMenuClose(event: TableActionMenuCloseEvent): void;
|
|
92
94
|
protected onActionSelect(row: T, col: TableColumn<T>, item: {
|
|
93
95
|
key: string;
|
|
94
96
|
label: string;
|
|
@@ -101,6 +103,8 @@ export declare class TableComponent<T extends RowBase = RowBase> {
|
|
|
101
103
|
private clampPage;
|
|
102
104
|
private reconcileSelectionWithData;
|
|
103
105
|
private resolveActionDisabled;
|
|
106
|
+
private nextActionsMenuId;
|
|
107
|
+
private focusClosedMenuTarget;
|
|
104
108
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any>, never>;
|
|
105
109
|
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "sdc-table", never, { "cols": { "alias": "cols"; "required": true; }; "data": { "alias": "data"; "required": true; }; "loading": { "alias": "loading"; "required": false; }; "config": { "alias": "config"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, { "action": "action"; "lazyLoad": "lazyLoad"; }, never, never, true, never>;
|
|
106
110
|
}
|