@rxap/material-table-system 14.2.2 → 14.4.0-dev.1
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/esm2020/index.mjs +3 -1
- package/esm2020/lib/select-row/select-row.service.mjs +2 -2
- package/esm2020/lib/select-row/selection-model.mjs +218 -0
- package/esm2020/lib/table-data-source.directive.mjs +9 -2
- package/esm2020/lib/table-filter/filter-header-row.directive.mjs +13 -4
- package/esm2020/lib/table-row-actions/decorators.mjs +28 -3
- package/esm2020/lib/table-row-actions/row-action-check.pipe.mjs +43 -0
- package/esm2020/lib/table-row-actions/table-row-action.directive.mjs +55 -15
- package/esm2020/lib/table-row-actions/table-row-action.method.mjs +24 -4
- package/esm2020/lib/table-row-actions/table-row-actions.module.mjs +12 -4
- package/esm2020/lib/table-row-actions/table-row-header-action.directive.mjs +29 -14
- package/esm2020/lib/table-row-actions/types.mjs +2 -0
- package/fesm2015/rxap-material-table-system.mjs +427 -47
- package/fesm2015/rxap-material-table-system.mjs.map +1 -1
- package/fesm2020/rxap-material-table-system.mjs +417 -47
- package/fesm2020/rxap-material-table-system.mjs.map +1 -1
- package/index.d.ts +2 -0
- package/lib/select-row/select-row.service.d.ts +1 -1
- package/lib/select-row/selection-model.d.ts +118 -0
- package/lib/table-data-source.directive.d.ts +2 -0
- package/lib/table-filter/filter-header-row.directive.d.ts +2 -1
- package/lib/table-row-actions/decorators.d.ts +41 -1
- package/lib/table-row-actions/row-action-check.pipe.d.ts +10 -0
- package/lib/table-row-actions/table-row-action.directive.d.ts +13 -5
- package/lib/table-row-actions/table-row-action.method.d.ts +6 -7
- package/lib/table-row-actions/table-row-actions.module.d.ts +8 -7
- package/lib/table-row-actions/table-row-header-action.directive.d.ts +6 -4
- package/lib/table-row-actions/types.d.ts +8 -0
- package/package.json +7 -8
package/index.d.ts
CHANGED
|
@@ -60,3 +60,5 @@ export * from './lib/table-row-actions/table-row-action-status';
|
|
|
60
60
|
export * from './lib/table-row-actions/table-row-actions.module';
|
|
61
61
|
export * from './lib/table-row-actions/table-row-header-action.directive';
|
|
62
62
|
export * from './lib/table-row-actions/tokens';
|
|
63
|
+
export * from './lib/table-row-actions/types';
|
|
64
|
+
export * from './lib/table-row-actions/row-action-check.pipe';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SelectionModel } from '@angular/cdk/collections';
|
|
2
1
|
import type { Observable } from 'rxjs';
|
|
3
2
|
import { SelectRowOptions } from './select-row.options';
|
|
3
|
+
import { SelectionModel } from './selection-model';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class SelectRowService<Data extends Record<string, any>> {
|
|
6
6
|
selectedRows$: Observable<Data[]>;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { Subject } from 'rxjs';
|
|
9
|
+
/**
|
|
10
|
+
* Class to be used to power selecting one or more options from a list.
|
|
11
|
+
*/
|
|
12
|
+
export declare class SelectionModel<T> {
|
|
13
|
+
private _multiple;
|
|
14
|
+
private _emitChanges;
|
|
15
|
+
compareWith?: ((o1: T, o2: T) => boolean) | undefined;
|
|
16
|
+
/** Currently-selected values. */
|
|
17
|
+
private _selection;
|
|
18
|
+
/** Keeps track of the deselected options that haven't been emitted by the change event. */
|
|
19
|
+
private _deselectedToEmit;
|
|
20
|
+
/** Keeps track of the selected options that haven't been emitted by the change event. */
|
|
21
|
+
private _selectedToEmit;
|
|
22
|
+
/** Cache for the array value of the selected items. */
|
|
23
|
+
private _selected;
|
|
24
|
+
/** Selected values. */
|
|
25
|
+
get selected(): T[];
|
|
26
|
+
/** Event emitted when the value has changed. */
|
|
27
|
+
readonly changed: Subject<SelectionChange<T>>;
|
|
28
|
+
constructor(_multiple?: boolean, initiallySelectedValues?: T[], _emitChanges?: boolean, compareWith?: ((o1: T, o2: T) => boolean) | undefined);
|
|
29
|
+
/**
|
|
30
|
+
* Selects a value or an array of values.
|
|
31
|
+
* @param values The values to select
|
|
32
|
+
* @return Whether the selection changed as a result of this call
|
|
33
|
+
* @breaking-change 16.0.0 make return type boolean
|
|
34
|
+
*/
|
|
35
|
+
select(...values: T[]): boolean | void;
|
|
36
|
+
/**
|
|
37
|
+
* Deselects a value or an array of values.
|
|
38
|
+
* @param values The values to deselect
|
|
39
|
+
* @return Whether the selection changed as a result of this call
|
|
40
|
+
* @breaking-change 16.0.0 make return type boolean
|
|
41
|
+
*/
|
|
42
|
+
deselect(...values: T[]): boolean | void;
|
|
43
|
+
/**
|
|
44
|
+
* Sets the selected values
|
|
45
|
+
* @param values The new selected values
|
|
46
|
+
* @return Whether the selection changed as a result of this call
|
|
47
|
+
* @breaking-change 16.0.0 make return type boolean
|
|
48
|
+
*/
|
|
49
|
+
setSelection(...values: T[]): boolean | void;
|
|
50
|
+
/**
|
|
51
|
+
* Toggles a value between selected and deselected.
|
|
52
|
+
* @param value The value to toggle
|
|
53
|
+
* @return Whether the selection changed as a result of this call
|
|
54
|
+
* @breaking-change 16.0.0 make return type boolean
|
|
55
|
+
*/
|
|
56
|
+
toggle(value: T): boolean | void;
|
|
57
|
+
/**
|
|
58
|
+
* Clears all of the selected values.
|
|
59
|
+
* @param flushEvent Whether to flush the changes in an event.
|
|
60
|
+
* If false, the changes to the selection will be flushed along with the next event.
|
|
61
|
+
* @return Whether the selection changed as a result of this call
|
|
62
|
+
* @breaking-change 16.0.0 make return type boolean
|
|
63
|
+
*/
|
|
64
|
+
clear(flushEvent?: boolean): boolean | void;
|
|
65
|
+
/**
|
|
66
|
+
* Determines whether a value is selected.
|
|
67
|
+
*/
|
|
68
|
+
isSelected(value: T): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Determines whether the model does not have a value.
|
|
71
|
+
*/
|
|
72
|
+
isEmpty(): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Determines whether the model has a value.
|
|
75
|
+
*/
|
|
76
|
+
hasValue(): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Sorts the selected values based on a predicate function.
|
|
79
|
+
*/
|
|
80
|
+
sort(predicate?: (a: T, b: T) => number): void;
|
|
81
|
+
/**
|
|
82
|
+
* Gets whether multiple values can be selected.
|
|
83
|
+
*/
|
|
84
|
+
isMultipleSelection(): boolean;
|
|
85
|
+
/** Emits a change event and clears the records of selected and deselected values. */
|
|
86
|
+
private _emitChangeEvent;
|
|
87
|
+
/** Selects a value. */
|
|
88
|
+
private _markSelected;
|
|
89
|
+
/** Deselects a value. */
|
|
90
|
+
private _unmarkSelected;
|
|
91
|
+
/** Clears out the selected values. */
|
|
92
|
+
private _unmarkAll;
|
|
93
|
+
/**
|
|
94
|
+
* Verifies the value assignment and throws an error if the specified value array is
|
|
95
|
+
* including multiple values while the selection model is not supporting multiple values.
|
|
96
|
+
*/
|
|
97
|
+
private _verifyValueAssignment;
|
|
98
|
+
/** Whether there are queued up change to be emitted. */
|
|
99
|
+
private _hasQueuedChanges;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Event emitted when the value of a MatSelectionModel has changed.
|
|
103
|
+
* @docs-private
|
|
104
|
+
*/
|
|
105
|
+
export interface SelectionChange<T> {
|
|
106
|
+
/** Model that dispatched the event. */
|
|
107
|
+
source: SelectionModel<T>;
|
|
108
|
+
/** Options that were added to the model. */
|
|
109
|
+
added: T[];
|
|
110
|
+
/** Options that were removed from the model. */
|
|
111
|
+
removed: T[];
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Returns an error that reports that multiple values are passed into a selection model
|
|
115
|
+
* with a single value.
|
|
116
|
+
* @docs-private
|
|
117
|
+
*/
|
|
118
|
+
export declare function getMultipleValuesInSingleSelectionError(): Error;
|
|
@@ -38,6 +38,7 @@ export declare class TableDataSourceDirective<Data extends Record<string, any> =
|
|
|
38
38
|
parameters?: Observable<Record<string, any>>;
|
|
39
39
|
dataSource?: AbstractTableDataSource<Data>;
|
|
40
40
|
method?: Method<Data[], TableEvent>;
|
|
41
|
+
readonly hasError$: ToggleSubject;
|
|
41
42
|
/**
|
|
42
43
|
* @deprecated use method instead
|
|
43
44
|
*/
|
|
@@ -53,6 +54,7 @@ export declare class TableDataSourceDirective<Data extends Record<string, any> =
|
|
|
53
54
|
ngOnInit(): void;
|
|
54
55
|
ngOnDestroy(): void;
|
|
55
56
|
refresh(): void;
|
|
57
|
+
retry(): void;
|
|
56
58
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableDataSourceDirective<any>, [null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
57
59
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TableDataSourceDirective<any>, "table[mat-table][rxapTableDataSource],mat-table[rxapTableDataSource]", ["rxapTableDataSource"], { "setDataSource": "rxapTableDataSource"; "paginator": "paginator"; "id": "id"; "parameters": "parameters"; "dataSource": "dataSource"; }, {}, never, never, false>;
|
|
58
60
|
}
|
|
@@ -4,10 +4,11 @@ import { TableFilterService } from './table-filter.service';
|
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class FilterHeaderRowDirective extends FormDirective implements OnInit, OnDestroy {
|
|
6
6
|
private readonly tableFilter;
|
|
7
|
+
set useFormDefinition(value: FormDefinition | '');
|
|
7
8
|
private _subscription?;
|
|
8
9
|
constructor(tableFilter: TableFilterService, cdr: ChangeDetectorRef, formDefinition: FormDefinition | null);
|
|
9
10
|
ngOnInit(): void;
|
|
10
11
|
ngOnDestroy(): void;
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<FilterHeaderRowDirective, [null, null, { optional: true; }]>;
|
|
12
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FilterHeaderRowDirective, "table[rxap-filter-header-row]", never, {}, {}, never, never, false>;
|
|
13
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FilterHeaderRowDirective, "table[rxap-filter-header-row]", never, { "useFormDefinition": "rxap-filter-header-row"; }, {}, never, never, false>;
|
|
13
14
|
}
|
|
@@ -1,2 +1,42 @@
|
|
|
1
|
+
import { RowActionCheckFunction } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated use RXAP_TABLE_ACTION_METHOD_METADATA instead
|
|
4
|
+
*/
|
|
1
5
|
export declare const RXAP_TABLE_ACTION_METHOD_TYPE_METADATA = "rxap-table-action-method-type-metadata";
|
|
2
|
-
export declare
|
|
6
|
+
export declare const RXAP_TABLE_ACTION_METHOD_METADATA = "rxap-table-action-method-metadata";
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated use RXAP_TABLE_ACTION_METHOD_METADATA instead
|
|
9
|
+
*/
|
|
10
|
+
export declare const RXAP_TABLE_ACTION_METHOD_CHECK_FUNCTION_METADATA = "rxap-table-action-method-check-function-metadata";
|
|
11
|
+
export interface TableActionMethodOptions<Data = unknown> {
|
|
12
|
+
type?: string;
|
|
13
|
+
checkFunction?: RowActionCheckFunction<Data>;
|
|
14
|
+
/**
|
|
15
|
+
* If true, the table will be refreshed after the action is executed.
|
|
16
|
+
*/
|
|
17
|
+
refresh?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* If true, the user will be asked to confirm the action before execution.
|
|
20
|
+
*/
|
|
21
|
+
confirm?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The tooltip of the action button.
|
|
24
|
+
*/
|
|
25
|
+
tooltip?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The error message that will be displayed if the action fails.
|
|
28
|
+
*/
|
|
29
|
+
errorMessage?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The success message that will be displayed if the action succeeds.
|
|
32
|
+
*/
|
|
33
|
+
successMessage?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The priority of the action. If multiple action with the same type exists.
|
|
36
|
+
* The action with the highest priority will be used. To set the defaults for
|
|
37
|
+
* the directive.
|
|
38
|
+
*/
|
|
39
|
+
priority?: number;
|
|
40
|
+
}
|
|
41
|
+
export declare function TableActionMethod<Data = unknown>(options: TableActionMethodOptions): ClassDecorator;
|
|
42
|
+
export declare function TableActionMethod<Data = unknown>(type: string, checkFunction?: RowActionCheckFunction<Data>): ClassDecorator;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { TableRowActionTypeMethod } from './types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class RowActionCheckPipe<RowType> implements PipeTransform {
|
|
5
|
+
private readonly actionMethodList;
|
|
6
|
+
constructor(tableRowActionMethodList: Array<TableRowActionTypeMethod<RowType>> | TableRowActionTypeMethod<RowType> | null);
|
|
7
|
+
transform(value: RowType | RowType[], type: string): boolean;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RowActionCheckPipe<any>, [{ optional: true; }]>;
|
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<RowActionCheckPipe<any>, "rxapRowActionCheck", false>;
|
|
10
|
+
}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
import { ChangeDetectorRef, ViewContainerRef } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, ViewContainerRef, OnInit, ElementRef } from '@angular/core';
|
|
2
2
|
import { MatButton } from '@angular/material/button';
|
|
3
3
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
4
|
-
import { TableRowActionMethod } from './table-row-action.method';
|
|
5
4
|
import { TableDataSourceDirective } from '../table-data-source.directive';
|
|
5
|
+
import { TableRowActionMethod } from './types';
|
|
6
|
+
import { TableActionMethodOptions } from './decorators';
|
|
7
|
+
import { MatTooltip } from '@angular/material/tooltip';
|
|
8
|
+
import { ConfirmDirective } from '@rxap/components';
|
|
9
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
6
10
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class TableRowActionDirective<Data extends Record<string, any>> {
|
|
11
|
+
export declare class TableRowActionDirective<Data extends Record<string, any>> extends ConfirmDirective implements OnInit {
|
|
8
12
|
protected readonly cdr: ChangeDetectorRef;
|
|
9
13
|
private readonly vcr;
|
|
10
14
|
private readonly tableDataSourceDirective;
|
|
11
15
|
private readonly snackBar;
|
|
12
16
|
private readonly matButton;
|
|
17
|
+
private readonly matTooltip;
|
|
13
18
|
private _hasConfirmDirective;
|
|
14
19
|
set hasConfirmDirective(value: any);
|
|
15
20
|
element: Data;
|
|
@@ -24,7 +29,9 @@ export declare class TableRowActionDirective<Data extends Record<string, any>> {
|
|
|
24
29
|
private _currentStatus;
|
|
25
30
|
private readonly actionMethodList;
|
|
26
31
|
private _actionDisabled;
|
|
27
|
-
|
|
32
|
+
protected options: TableActionMethodOptions | null;
|
|
33
|
+
constructor(overlay: Overlay, elementRef: ElementRef, actionMethodList: Array<TableRowActionMethod<Data>> | TableRowActionMethod<Data>, cdr: ChangeDetectorRef, vcr: ViewContainerRef, tableDataSourceDirective: TableDataSourceDirective, snackBar: MatSnackBar, matButton: MatButton | null, matTooltip: MatTooltip | null);
|
|
34
|
+
ngOnInit(): void;
|
|
28
35
|
onConfirmed(): Promise<void>;
|
|
29
36
|
onClick($event: Event): Promise<void>;
|
|
30
37
|
execute(): Promise<void>;
|
|
@@ -59,6 +66,7 @@ export declare class TableRowActionDirective<Data extends Record<string, any>> {
|
|
|
59
66
|
*/
|
|
60
67
|
protected setButtonEnabled(): void;
|
|
61
68
|
private setStatus;
|
|
62
|
-
|
|
69
|
+
private getTableActionOptions;
|
|
70
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableRowActionDirective<any>, [null, null, null, null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
63
71
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TableRowActionDirective<any>, "button[rxapTableRowAction]", never, { "hasConfirmDirective": "rxapConfirm"; "element": "element"; "type": "rxapTableRowAction"; "errorMessage": "errorMessage"; "successMessage": "successMessage"; "refresh": "refresh"; }, {}, ["executingDirective"], never, false>;
|
|
64
72
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
element: Data;
|
|
4
|
-
type: string;
|
|
5
|
-
}>;
|
|
6
|
-
export declare type TableRowActionTypeMethod<Data extends Record<string, any>> = Method<any, Data>;
|
|
7
|
-
export declare type TableRowActionMethod<Data extends Record<string, any>> = TableRowActionTypeSwitchMethod<Data> | TableRowActionTypeMethod<Data>;
|
|
1
|
+
import { TableActionMethodOptions } from './decorators';
|
|
2
|
+
import { TableRowActionMethod, TableRowActionTypeMethod, TableRowActionTypeSwitchMethod, RowActionCheckFunction } from './types';
|
|
8
3
|
export declare function IsTableRowActionTypeSwitchMethod<Data extends Record<string, any>>(method: TableRowActionMethod<Data>): method is TableRowActionTypeSwitchMethod<Data>;
|
|
9
4
|
export declare function IsTableRowActionTypeMethod<Data extends Record<string, any>>(type: string): (method: TableRowActionMethod<Data>) => method is TableRowActionTypeMethod<Data>;
|
|
5
|
+
export declare function HasTableRowActionCheckFunction(method: TableRowActionMethod<any>): boolean;
|
|
6
|
+
export declare function GetTableRowActionCheckFunction<Data>(method: TableRowActionMethod<Data>): RowActionCheckFunction<Data>;
|
|
7
|
+
export declare function HasTableRowActionMetadata(method: TableRowActionMethod): boolean;
|
|
8
|
+
export declare function GetTableRowActionMetadata(method: TableRowActionMethod): TableActionMethodOptions;
|
|
@@ -2,14 +2,15 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
import * as i1 from "./table-row-action.directive";
|
|
3
3
|
import * as i2 from "./table-row-action-executing.directive";
|
|
4
4
|
import * as i3 from "./table-row-header-action.directive";
|
|
5
|
-
import * as i4 from "
|
|
6
|
-
import * as i5 from "@
|
|
7
|
-
import * as i6 from "@
|
|
8
|
-
import * as i7 from "@angular/material/
|
|
9
|
-
import * as i8 from "@angular/material/
|
|
10
|
-
import * as i9 from "@angular/
|
|
5
|
+
import * as i4 from "./row-action-check.pipe";
|
|
6
|
+
import * as i5 from "@rxap/components";
|
|
7
|
+
import * as i6 from "@angular/material/tooltip";
|
|
8
|
+
import * as i7 from "@angular/material/button";
|
|
9
|
+
import * as i8 from "@angular/material/icon";
|
|
10
|
+
import * as i9 from "@angular/material/progress-bar";
|
|
11
|
+
import * as i10 from "@angular/common";
|
|
11
12
|
export declare class TableRowActionsModule {
|
|
12
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableRowActionsModule, never>;
|
|
13
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<TableRowActionsModule, [typeof i1.TableRowActionDirective, typeof i2.TableRowActionExecutingDirective, typeof i3.TableRowHeaderActionDirective],
|
|
14
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TableRowActionsModule, [typeof i1.TableRowActionDirective, typeof i2.TableRowActionExecutingDirective, typeof i3.TableRowHeaderActionDirective, typeof i4.RowActionCheckPipe], [typeof i5.ConfirmComponentModule], [typeof i1.TableRowActionDirective, typeof i3.TableRowHeaderActionDirective, typeof i2.TableRowActionExecutingDirective, typeof i4.RowActionCheckPipe, typeof i6.MatTooltipModule, typeof i7.MatButtonModule, typeof i5.ConfirmComponentModule, typeof i8.MatIconModule, typeof i9.MatProgressBarModule, typeof i10.CommonModule]>;
|
|
14
15
|
static ɵinj: i0.ɵɵInjectorDeclaration<TableRowActionsModule>;
|
|
15
16
|
}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import { ChangeDetectorRef, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, OnDestroy, OnInit, ViewContainerRef, ElementRef } from '@angular/core';
|
|
2
2
|
import { MatButton } from '@angular/material/button';
|
|
3
3
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
4
4
|
import { TableRowActionDirective } from './table-row-action.directive';
|
|
5
|
-
import { TableRowActionMethod } from './table-row-action.method';
|
|
6
5
|
import { TableDataSourceDirective } from '../table-data-source.directive';
|
|
7
6
|
import { SelectRowService } from '../select-row/select-row.service';
|
|
7
|
+
import { TableRowActionMethod } from './types';
|
|
8
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
9
|
+
import { MatTooltip } from '@angular/material/tooltip';
|
|
8
10
|
import * as i0 from "@angular/core";
|
|
9
11
|
export declare class TableRowHeaderActionDirective<Data extends Record<string, any>> extends TableRowActionDirective<Data> implements OnInit, OnDestroy {
|
|
10
12
|
private readonly selectRowService;
|
|
11
13
|
private _subscription?;
|
|
12
|
-
constructor(actionMethod: TableRowActionMethod<Data>, cdr: ChangeDetectorRef, vcr: ViewContainerRef, tableDataSourceDirective: TableDataSourceDirective, snackBar: MatSnackBar, matButton: MatButton | null, selectRowService: SelectRowService<Data> | null);
|
|
14
|
+
constructor(overlay: Overlay, elementRef: ElementRef, actionMethod: TableRowActionMethod<Data>, cdr: ChangeDetectorRef, vcr: ViewContainerRef, tableDataSourceDirective: TableDataSourceDirective, snackBar: MatSnackBar, matButton: MatButton | null, matTooltip: MatTooltip | null, selectRowService: SelectRowService<Data> | null);
|
|
13
15
|
ngOnDestroy(): void;
|
|
14
16
|
ngOnInit(): void;
|
|
15
17
|
protected getElementList(): Data[];
|
|
16
18
|
type: string;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TableRowHeaderActionDirective<any>, [null, null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableRowHeaderActionDirective<any>, [null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
18
20
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TableRowHeaderActionDirective<any>, "button[rxapTableRowHeaderAction]", never, { "type": "rxapTableRowHeaderAction"; }, {}, never, never, false>;
|
|
19
21
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Method } from '@rxap/utilities/rxjs';
|
|
2
|
+
export declare type RowActionCheckFunction<Data extends Record<string, any>> = (element: Data, index: number, array: Data[]) => boolean;
|
|
3
|
+
export declare type TableRowActionTypeSwitchMethod<Data extends Record<string, any>> = Method<any, {
|
|
4
|
+
element: Data;
|
|
5
|
+
type: string;
|
|
6
|
+
}>;
|
|
7
|
+
export declare type TableRowActionTypeMethod<Data extends Record<string, any>> = Method<any, Data>;
|
|
8
|
+
export declare type TableRowActionMethod<Data extends Record<string, any> = Record<string, any>> = TableRowActionTypeSwitchMethod<Data> | TableRowActionTypeMethod<Data>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxap/material-table-system",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.4.0-dev.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular-devkit/schematics": "^14.2.3",
|
|
6
6
|
"@angular/animations": "^14.2.2",
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
"@angular/platform-browser": "^14.2.2",
|
|
15
15
|
"@angular/platform-browser-dynamic": "^14.2.2",
|
|
16
16
|
"@angular/router": "^14.2.2",
|
|
17
|
-
"@rxap/components": "^14.0.
|
|
18
|
-
"@rxap/config": "^14.1.
|
|
19
|
-
"@rxap/data-source": "^14.
|
|
17
|
+
"@rxap/components": "^14.0.3-dev.0",
|
|
18
|
+
"@rxap/config": "^14.1.4-dev.0",
|
|
19
|
+
"@rxap/data-source": "^14.2.0-dev.0",
|
|
20
20
|
"@rxap/definition": "^14.0.3",
|
|
21
21
|
"@rxap/directives": "^14.0.3",
|
|
22
|
-
"@rxap/forms": "^14.0.
|
|
22
|
+
"@rxap/forms": "^14.1.0-dev.0",
|
|
23
23
|
"@rxap/material-directives": "^14.0.2",
|
|
24
24
|
"@rxap/mixin": "^14.0.2",
|
|
25
|
-
"@rxap/open-api": "^14.
|
|
25
|
+
"@rxap/open-api": "^14.2.0-dev.0",
|
|
26
26
|
"@rxap/remote-method": "^14.0.2",
|
|
27
27
|
"@rxap/services": "^14.0.5",
|
|
28
|
-
"@rxap/utilities": "^14.0.
|
|
28
|
+
"@rxap/utilities": "^14.1.0-dev.0",
|
|
29
29
|
"@rxap/window-system": "^14.0.2",
|
|
30
30
|
"@schematics/angular": "^14.2.10",
|
|
31
31
|
"joi": "^17.6.3",
|
|
@@ -56,7 +56,6 @@
|
|
|
56
56
|
"directory": "../../../dist/libs/material/table-system",
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "e75f92d806744f93d00f5abf69fb80cfec0ccace",
|
|
60
59
|
"license": "MIT",
|
|
61
60
|
"keywords": [
|
|
62
61
|
"rxap",
|