@firestitch/list 12.8.2 → 12.10.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/app/classes/data-controller.d.ts +2 -1
- package/app/classes/reorder-controller.d.ts +5 -1
- package/app/classes/selection-controller.d.ts +5 -0
- package/app/components/body/body.component.d.ts +2 -2
- package/app/components/body/row/row.component.d.ts +2 -0
- package/app/components/list/list.component.d.ts +2 -0
- package/app/directives/draggable-list/draggable-list.directive.d.ts +12 -3
- package/app/directives/draggable-row/draggable-row.directive.d.ts +2 -0
- package/app/interfaces/listconfig.interface.d.ts +2 -0
- package/bundles/firestitch-list.umd.js +199 -39
- package/bundles/firestitch-list.umd.js.map +1 -1
- package/esm2015/app/classes/data-controller.js +23 -2
- package/esm2015/app/classes/reorder-controller.js +7 -2
- package/esm2015/app/classes/selection-controller.js +16 -2
- package/esm2015/app/components/body/body.component.js +4 -4
- package/esm2015/app/components/body/row/row.component.js +13 -3
- package/esm2015/app/components/head/head.component.js +2 -2
- package/esm2015/app/components/list/list.component.js +9 -3
- package/esm2015/app/directives/draggable-list/draggable-list.directive.js +97 -31
- package/esm2015/app/directives/draggable-row/draggable-row.directive.js +9 -1
- package/esm2015/app/interfaces/listconfig.interface.js +1 -1
- package/fesm2015/firestitch-list.js +169 -39
- package/fesm2015/firestitch-list.js.map +1 -1
- package/package.json +1 -1
|
@@ -69,9 +69,10 @@ export declare class DataController {
|
|
|
69
69
|
* @param data
|
|
70
70
|
*/
|
|
71
71
|
removeData(data: FsListAbstractRow | FsListAbstractRow[] | FsListTrackByTargetRowFn): boolean;
|
|
72
|
-
swapRows(row1: any, row2: any): void;
|
|
72
|
+
swapRows(row1: any, row2: any, selectedRows?: Row[], isMultipleDrag?: boolean): void;
|
|
73
73
|
destroy(): void;
|
|
74
74
|
toggleRowGroup(rowData: any): void;
|
|
75
|
+
finishReorder(): void;
|
|
75
76
|
private _updateRowsStack;
|
|
76
77
|
private _extendRowsStack;
|
|
77
78
|
private _destroyRowsStack;
|
|
@@ -3,6 +3,7 @@ import { Observable } from 'rxjs';
|
|
|
3
3
|
import { FsListReorderConfig, FsListReorderDoneCallback, FsListReorderMovedCallback, FsListReorderMoveInGroupCallback } from '../interfaces';
|
|
4
4
|
import { DataController } from './data-controller';
|
|
5
5
|
import { ActionsController } from './actions-controller';
|
|
6
|
+
import { SelectionController } from './selection-controller';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
export declare enum ReorderPosition {
|
|
8
9
|
Left = "left",
|
|
@@ -23,8 +24,10 @@ export declare class ReorderController implements OnDestroy {
|
|
|
23
24
|
menu: boolean;
|
|
24
25
|
position: ReorderPosition;
|
|
25
26
|
strategy: ReorderStrategy;
|
|
27
|
+
multiple: boolean;
|
|
26
28
|
private _dataController;
|
|
27
29
|
private _actionsController;
|
|
30
|
+
private _selectionController;
|
|
28
31
|
private _enabled$;
|
|
29
32
|
private _manualReorderActivated$;
|
|
30
33
|
private _reorderDisabled$;
|
|
@@ -34,13 +37,14 @@ export declare class ReorderController implements OnDestroy {
|
|
|
34
37
|
get enabled(): boolean;
|
|
35
38
|
set enabled(value: boolean);
|
|
36
39
|
get dataController(): DataController;
|
|
40
|
+
get selectionController(): SelectionController;
|
|
37
41
|
get manualReorderActivated$(): Observable<boolean>;
|
|
38
42
|
get manualReorderActivated(): boolean;
|
|
39
43
|
get leftReorderActivated$(): Observable<boolean>;
|
|
40
44
|
get rightReorderActivated$(): Observable<boolean>;
|
|
41
45
|
get reorderDisabled$(): Observable<boolean>;
|
|
42
46
|
get reorderDisabled(): boolean;
|
|
43
|
-
initWithConfig(data: FsListReorderConfig, dataController: DataController, actionsController: ActionsController): void;
|
|
47
|
+
initWithConfig(data: FsListReorderConfig, dataController: DataController, actionsController: ActionsController, selectionController: SelectionController): void;
|
|
44
48
|
enableReorder(): void;
|
|
45
49
|
disableReorder(): void;
|
|
46
50
|
/**
|
|
@@ -27,7 +27,10 @@ export declare class SelectionController {
|
|
|
27
27
|
private _visibleRecordsCount;
|
|
28
28
|
private _totalRecordsCount;
|
|
29
29
|
private _destroy$;
|
|
30
|
+
private _disabled$;
|
|
30
31
|
constructor(config: FsListSelectionConfig, _trackBy: string, _selectionDialog: SelectionDialog);
|
|
32
|
+
get disabled(): boolean;
|
|
33
|
+
get disabled$(): Observable<boolean>;
|
|
31
34
|
get selectedAll(): boolean;
|
|
32
35
|
get selectionChange$(): Observable<{
|
|
33
36
|
type: SelectionChangeType;
|
|
@@ -62,6 +65,8 @@ export declare class SelectionController {
|
|
|
62
65
|
*/
|
|
63
66
|
updateTotalRecordsCount(count: number): void;
|
|
64
67
|
pageChanged(infinityScrollEnabled: any): void;
|
|
68
|
+
enableSelection(): void;
|
|
69
|
+
disableSelection(): void;
|
|
65
70
|
/**
|
|
66
71
|
* Method will be called from List for remove row if it was selected
|
|
67
72
|
*
|
|
@@ -5,7 +5,7 @@ import { SelectionController } from '../../classes/selection-controller';
|
|
|
5
5
|
import { Row } from '../../models/row';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class FsBodyComponent implements DoCheck, OnDestroy {
|
|
8
|
-
|
|
8
|
+
reorderController: ReorderController;
|
|
9
9
|
private el;
|
|
10
10
|
private cdRef;
|
|
11
11
|
private differs;
|
|
@@ -24,7 +24,7 @@ export declare class FsBodyComponent implements DoCheck, OnDestroy {
|
|
|
24
24
|
headerTemplate: TemplateRef<any>;
|
|
25
25
|
private _rowsDiffer;
|
|
26
26
|
private _destroy$;
|
|
27
|
-
constructor(
|
|
27
|
+
constructor(reorderController: ReorderController, el: ElementRef, cdRef: ChangeDetectorRef, differs: IterableDiffers);
|
|
28
28
|
ngDoCheck(): void;
|
|
29
29
|
ngOnDestroy(): void;
|
|
30
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsBodyComponent, never>;
|
|
@@ -42,6 +42,8 @@ export declare class FsRowComponent implements OnInit, DoCheck, OnDestroy {
|
|
|
42
42
|
get isGroupRow(): boolean;
|
|
43
43
|
get isChildRow(): boolean;
|
|
44
44
|
get isGroupFooterRow(): boolean;
|
|
45
|
+
get isDragDisabled(): boolean;
|
|
46
|
+
get isMultipleSelection(): boolean;
|
|
45
47
|
get rowCssClass(): string;
|
|
46
48
|
get dragCellVisible(): boolean;
|
|
47
49
|
ngOnInit(): void;
|
|
@@ -72,6 +72,8 @@ export declare class FsListComponent implements OnInit, OnDestroy {
|
|
|
72
72
|
replaceRow(row: FsListAbstractRow, trackBy?: FsListTrackByTargetRowFn): boolean;
|
|
73
73
|
updateSelectionConfig(config: FsListSelectionConfig): void;
|
|
74
74
|
resetSelectionActions(): void;
|
|
75
|
+
enableSelection(): void;
|
|
76
|
+
disableSelection(): void;
|
|
75
77
|
removeData(data: FsListAbstractRow | FsListAbstractRow[] | FsListTrackByTargetRowFn): boolean;
|
|
76
78
|
setHeading(heading: string): void;
|
|
77
79
|
setSubheading(subheading: string): void;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { ChangeDetectorRef, ElementRef, NgZone } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, NgZone, Renderer2 } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ReorderController } from '../../classes/reorder-controller';
|
|
4
4
|
import { Row } from '../../models/row';
|
|
5
|
+
import { FsListDraggableRowDirective } from '../draggable-row/draggable-row.directive';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class FsListDraggableListDirective {
|
|
7
8
|
private _cdRef;
|
|
8
9
|
private _zone;
|
|
9
10
|
private _containerElement;
|
|
10
11
|
private _reorderController;
|
|
12
|
+
private _renderer;
|
|
11
13
|
private _draggableElement;
|
|
12
14
|
private _draggableElementPreview;
|
|
15
|
+
private _multipleDraggableElementPreview;
|
|
13
16
|
private _draggableElementHeight;
|
|
14
17
|
private _draggableElementIndex;
|
|
15
18
|
private _dragToHandler;
|
|
@@ -20,11 +23,16 @@ export declare class FsListDraggableListDirective {
|
|
|
20
23
|
private _dragStart$;
|
|
21
24
|
private _dragEnd$;
|
|
22
25
|
private _rows;
|
|
26
|
+
private _draggableChildrenDirectives;
|
|
27
|
+
private _selectedRowsDirectives;
|
|
23
28
|
private _destroy$;
|
|
24
|
-
constructor(_cdRef: ChangeDetectorRef, _zone: NgZone, _containerElement: ElementRef, _reorderController: ReorderController);
|
|
29
|
+
constructor(_cdRef: ChangeDetectorRef, _zone: NgZone, _containerElement: ElementRef, _reorderController: ReorderController, _renderer: Renderer2);
|
|
25
30
|
get dragStart$(): Observable<void>;
|
|
26
31
|
get dragEnd$(): Observable<void>;
|
|
27
32
|
get draggableItem(): Row;
|
|
33
|
+
private get _isMultipleDrag();
|
|
34
|
+
addDraggableDirective(dir: FsListDraggableRowDirective): void;
|
|
35
|
+
removeDraggableDirective(dir: FsListDraggableRowDirective): void;
|
|
28
36
|
/**
|
|
29
37
|
* Prepare draggable elements and add events
|
|
30
38
|
* @param draggableElement
|
|
@@ -56,7 +64,7 @@ export declare class FsListDraggableListDirective {
|
|
|
56
64
|
*/
|
|
57
65
|
private initDraggableElement;
|
|
58
66
|
/**
|
|
59
|
-
* Looking by stored row
|
|
67
|
+
* Looking by stored row elements for overlapped row
|
|
60
68
|
* @param event
|
|
61
69
|
*/
|
|
62
70
|
private lookupElementUnder;
|
|
@@ -70,6 +78,7 @@ export declare class FsListDraggableListDirective {
|
|
|
70
78
|
*/
|
|
71
79
|
private updateDraggableDims;
|
|
72
80
|
private _waitUntilIsNotDone;
|
|
81
|
+
private _detectSelectedRows;
|
|
73
82
|
/**
|
|
74
83
|
* Fix background when mobile
|
|
75
84
|
* @param e
|
|
@@ -11,8 +11,10 @@ export declare class FsListDraggableRowDirective implements OnInit, OnDestroy {
|
|
|
11
11
|
row: Row;
|
|
12
12
|
private _destroy$;
|
|
13
13
|
constructor(_el: ElementRef, _renderer: Renderer2, _reorderController: ReorderController, _draggableList: FsListDraggableListDirective);
|
|
14
|
+
get elRef(): ElementRef;
|
|
14
15
|
ngOnInit(): void;
|
|
15
16
|
ngOnDestroy(): void;
|
|
17
|
+
dragHide(): void;
|
|
16
18
|
private _listenDragEvents;
|
|
17
19
|
private _markReadyToSwapRows;
|
|
18
20
|
private _unmarkRows;
|
|
@@ -77,6 +77,7 @@ export interface FsListReorderConfig {
|
|
|
77
77
|
toggle?: boolean;
|
|
78
78
|
label?: string;
|
|
79
79
|
menu?: boolean;
|
|
80
|
+
multiple?: boolean;
|
|
80
81
|
}
|
|
81
82
|
export declare type FsListReorderMovedCallback = (rows: FsListReorderData[]) => void;
|
|
82
83
|
export declare type FsListReorderDoneCallback = (rows: FsListReorderData[]) => void | Observable<any>;
|
|
@@ -134,6 +135,7 @@ export interface FsListSelectionConfig {
|
|
|
134
135
|
actionSelected?: (action: FsListActionSelected) => Observable<boolean>;
|
|
135
136
|
allSelected?: () => void;
|
|
136
137
|
cancelled?: () => void;
|
|
138
|
+
disabled?: boolean;
|
|
137
139
|
selectAll?: boolean;
|
|
138
140
|
selectionChanged?: (data: any, selectedAll: boolean, selectionRef: SelectionRef) => FsSelectionDialogConfigAction[] | Observable<FsSelectionDialogConfigAction[] | void> | void;
|
|
139
141
|
}
|