@leanix/components 0.2.83 → 0.2.84
Sign up to get free protection for your applications and to get access to all the features.
- package/bundles/leanix-components.umd.js +16 -1
- package/bundles/leanix-components.umd.js.map +1 -1
- package/esm2015/lib/forms-ui/components/drag-and-drop-list/drag-and-drop-list.component.js +17 -2
- package/esm2015/lib/forms-ui/components/drag-and-drop-list/drag-and-drop-list.component.js.map +1 -1
- package/fesm2015/leanix-components.js +16 -1
- package/fesm2015/leanix-components.js.map +1 -1
- package/lib/forms-ui/components/drag-and-drop-list/drag-and-drop-list.component.d.ts +14 -3
- package/package.json +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
2
|
-
import { AfterContentInit, EventEmitter } from '@angular/core';
|
2
|
+
import { AfterContentInit, EventEmitter, OnInit, TemplateRef } from '@angular/core';
|
3
3
|
import { Observable } from 'rxjs';
|
4
4
|
import { DragAndDropListActionEvent, DragAndDropListItemComponent } from './drag-and-drop-list-item/drag-and-drop-list-item.component';
|
5
5
|
import * as i0 from "@angular/core";
|
@@ -7,7 +7,7 @@ export interface DragAndDropListMoveEvent {
|
|
7
7
|
item: string;
|
8
8
|
index: number;
|
9
9
|
}
|
10
|
-
export declare class DragAndDropListComponent implements AfterContentInit {
|
10
|
+
export declare class DragAndDropListComponent implements AfterContentInit, OnInit {
|
11
11
|
readonly NAME = "DragAndDropListComponent";
|
12
12
|
items$: Observable<DragAndDropListItemComponent[]>;
|
13
13
|
/**
|
@@ -18,6 +18,14 @@ export declare class DragAndDropListComponent implements AfterContentInit {
|
|
18
18
|
* Override the global label font weight of 700
|
19
19
|
*/
|
20
20
|
labelFontWeight?: number;
|
21
|
+
/**
|
22
|
+
* Pass in the template to render an item in the drag-and-drop
|
23
|
+
* list as a ng-template with id #itemTemplate.
|
24
|
+
* itemIdProperty must be defined if items is defined and
|
25
|
+
* be the property name on an item that uniquely identifies it.
|
26
|
+
*/
|
27
|
+
items?: any[];
|
28
|
+
itemIdProperty?: string;
|
21
29
|
/**
|
22
30
|
* Use the moveToIndex Output in favor of moveItem,
|
23
31
|
* when moving is restricted to one item through this.draggableItem.
|
@@ -25,6 +33,8 @@ export declare class DragAndDropListComponent implements AfterContentInit {
|
|
25
33
|
moveToIndex: EventEmitter<number>;
|
26
34
|
moveItem: EventEmitter<DragAndDropListMoveEvent>;
|
27
35
|
private _items;
|
36
|
+
itemTemplateRef?: TemplateRef<any>;
|
37
|
+
ngOnInit(): void;
|
28
38
|
ngAfterContentInit(): void;
|
29
39
|
emitContentChildAction(action: DragAndDropListActionEvent): void;
|
30
40
|
/**
|
@@ -37,6 +47,7 @@ export declare class DragAndDropListComponent implements AfterContentInit {
|
|
37
47
|
* You're supposed to update the data in the parent and pass the new items as input.
|
38
48
|
*/
|
39
49
|
drop(event: CdkDragDrop<string[]>): void;
|
50
|
+
trackById(_index: number, item: any): any;
|
40
51
|
static ɵfac: i0.ɵɵFactoryDeclaration<DragAndDropListComponent, never>;
|
41
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DragAndDropListComponent, "lx-drag-and-drop-list", never, { "label": "label"; "labelFontWeight": "labelFontWeight"; }, { "moveToIndex": "moveToIndex"; "moveItem": "moveItem"; }, ["_items"], never>;
|
52
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DragAndDropListComponent, "lx-drag-and-drop-list", never, { "label": "label"; "labelFontWeight": "labelFontWeight"; "items": "items"; "itemIdProperty": "itemIdProperty"; }, { "moveToIndex": "moveToIndex"; "moveItem": "moveItem"; }, ["itemTemplateRef", "_items"], never>;
|
42
53
|
}
|