@ecodev/natural 38.1.0 → 40.0.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/bundles/ecodev-natural.umd.js +51 -41
- package/bundles/ecodev-natural.umd.js.map +1 -1
- package/ecodev-natural.metadata.json +1 -1
- package/esm2015/lib/classes/abstract-list.js +14 -18
- package/esm2015/lib/modules/columns-picker/columns-picker.component.js +26 -8
- package/fesm2015/ecodev-natural.js +38 -24
- package/fesm2015/ecodev-natural.js.map +1 -1
- package/lib/classes/abstract-list.d.ts +6 -9
- package/lib/modules/columns-picker/columns-picker.component.d.ts +15 -5
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ declare type MaybeNavigable = Literal | NavigableItem<Literal>;
|
|
|
22
22
|
* Components inheriting from this class can be used as standalone with input attributes.
|
|
23
23
|
*
|
|
24
24
|
* Usage :
|
|
25
|
-
* <natural-my-listing [forcedVariables]="{filter:...}" [
|
|
25
|
+
* <natural-my-listing [forcedVariables]="{filter:...}" [selectedColumns]="['col1']" [persistSearch]="false">
|
|
26
26
|
*/
|
|
27
27
|
export declare class NaturalAbstractList<TService extends NaturalAbstractModelService<any, any, PaginatedData<Literal>, QueryVariables, any, any, any, any, any, any>, Tall extends PaginatedData<MaybeNavigable> = ExtractTall<TService>> extends NaturalAbstractPanel implements OnInit, OnDestroy {
|
|
28
28
|
readonly service: TService;
|
|
@@ -34,17 +34,15 @@ export declare class NaturalAbstractList<TService extends NaturalAbstractModelSe
|
|
|
34
34
|
/**
|
|
35
35
|
* Columns list after interaction with <natural-columns-picker>
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
columnsForTable: string[];
|
|
38
38
|
/**
|
|
39
39
|
* The default column selection that automatically happened after <natural-columns-picker> initialization
|
|
40
40
|
*/
|
|
41
41
|
private defaultSelectedColumns;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* Changing this value after initialization will have no effect at all
|
|
43
|
+
* Visible (checked) columns
|
|
46
44
|
*/
|
|
47
|
-
|
|
45
|
+
selectedColumns?: string[];
|
|
48
46
|
/**
|
|
49
47
|
* Source of the list
|
|
50
48
|
*/
|
|
@@ -158,7 +156,7 @@ export declare class NaturalAbstractList<TService extends NaturalAbstractModelSe
|
|
|
158
156
|
* Uses data provided by router such as:
|
|
159
157
|
*
|
|
160
158
|
* - `route.data.forcedVariables`
|
|
161
|
-
* - `route.data.
|
|
159
|
+
* - `route.data.selectedColumns`
|
|
162
160
|
*/
|
|
163
161
|
protected initFromRoute(): void;
|
|
164
162
|
protected getDataObservable(): Observable<Tall>;
|
|
@@ -174,7 +172,6 @@ export declare class NaturalAbstractList<TService extends NaturalAbstractModelSe
|
|
|
174
172
|
*/
|
|
175
173
|
protected bulkDelete(): Observable<void>;
|
|
176
174
|
private applyForcedVariables;
|
|
177
|
-
|
|
178
|
-
set selectedColumns(columns: string[]);
|
|
175
|
+
selectColumns(columns: string[]): void;
|
|
179
176
|
}
|
|
180
177
|
export {};
|
|
@@ -2,17 +2,27 @@ import { AfterViewInit, ChangeDetectorRef, EventEmitter, OnDestroy, QueryList }
|
|
|
2
2
|
import { NaturalColumnsPickerColumnDirective } from './columns-picker-column.directive';
|
|
3
3
|
export declare class NaturalColumnsPickerComponent implements AfterViewInit, OnDestroy {
|
|
4
4
|
private readonly changeDetectorRef;
|
|
5
|
-
|
|
5
|
+
private _selections?;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Set the columns that are wanted but might be unavailable.
|
|
8
|
+
*
|
|
9
|
+
* If a column is unavailable it will be ignored silently. To know what columns were actually applied
|
|
10
|
+
* you should use `selectionChange`.
|
|
11
|
+
*
|
|
12
|
+
* It is often set once on component initialization, but it can also be set again later in the lifespan of the component.
|
|
13
|
+
*/
|
|
14
|
+
set selections(columns: string[] | undefined);
|
|
15
|
+
/**
|
|
16
|
+
* Emit a list of valid and selected column keys whenever the selection changes
|
|
8
17
|
*/
|
|
9
18
|
readonly selectionChange: EventEmitter<string[]>;
|
|
10
|
-
readonly defaultSelectionChange: EventEmitter<string[]>;
|
|
11
19
|
/**
|
|
12
|
-
*
|
|
20
|
+
* Available columns are defined by options in the template
|
|
13
21
|
*/
|
|
14
|
-
initialSelection?: string[];
|
|
15
22
|
availableColumns: QueryList<NaturalColumnsPickerColumnDirective> | null;
|
|
23
|
+
/**
|
|
24
|
+
* Displayed options in the dropdown menu
|
|
25
|
+
*/
|
|
16
26
|
displayedColumns: NaturalColumnsPickerColumnDirective[];
|
|
17
27
|
private ngUnsubscribe;
|
|
18
28
|
constructor(changeDetectorRef: ChangeDetectorRef);
|