@recursyve/nice-ui-kit.v2 14.0.0-beta.108 → 14.0.0-beta.110
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/lib/directives/draggable-list/draggable-list.directive.mjs +94 -0
- package/esm2020/lib/directives/draggable-list/draggable-list.module.mjs +18 -0
- package/esm2020/lib/directives/draggable-list/index.mjs +2 -0
- package/esm2020/lib/directives/draggable-list/public-api.mjs +3 -0
- package/esm2020/lib/directives/public-api.mjs +2 -1
- package/esm2020/lib/utils/lexorank.utils.mjs +28 -0
- package/esm2020/lib/utils/public-api.mjs +2 -1
- package/fesm2015/recursyve-nice-ui-kit.v2.mjs +134 -2
- package/fesm2015/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs +131 -2
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/lib/directives/draggable-list/draggable-list.directive.d.ts +24 -0
- package/lib/directives/draggable-list/draggable-list.module.d.ts +8 -0
- package/lib/directives/draggable-list/index.d.ts +1 -0
- package/lib/directives/draggable-list/public-api.d.ts +2 -0
- package/lib/directives/public-api.d.ts +1 -0
- package/lib/utils/lexorank.utils.d.ts +6 -0
- package/lib/utils/public-api.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CdkDragDrop, CdkDropList } from "@angular/cdk/drag-drop";
|
|
2
|
+
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from "@angular/core";
|
|
3
|
+
import { FormArray, FormArrayName } from "@angular/forms";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NiceDraggableListDirective<T> implements OnInit, OnDestroy, OnChanges {
|
|
6
|
+
private formArrayName;
|
|
7
|
+
private cdkDropList;
|
|
8
|
+
items: T[];
|
|
9
|
+
rankProperty: string;
|
|
10
|
+
itemsUpdated: EventEmitter<T[]>;
|
|
11
|
+
itemRankUpdated: EventEmitter<T>;
|
|
12
|
+
sortedItems: T[];
|
|
13
|
+
formArray: FormArray;
|
|
14
|
+
private unsubscribeAll$;
|
|
15
|
+
constructor(formArrayName: FormArrayName, cdkDropList: CdkDropList);
|
|
16
|
+
ngOnInit(): void;
|
|
17
|
+
ngOnDestroy(): void;
|
|
18
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
19
|
+
drop(event: CdkDragDrop<any, any>): void;
|
|
20
|
+
private sortItems;
|
|
21
|
+
private getNextRank;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceDraggableListDirective<any>, [{ optional: true; }, null]>;
|
|
23
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NiceDraggableListDirective<any>, "[cdkDropList][niceDraggableList]", never, { "items": "items"; "rankProperty": "rankProperty"; }, { "itemsUpdated": "itemsUpdated"; "itemRankUpdated": "itemRankUpdated"; }, never, never, false>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./draggable-list.directive";
|
|
3
|
+
import * as i2 from "@angular/cdk/drag-drop";
|
|
4
|
+
export declare class NiceDraggableListModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceDraggableListModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NiceDraggableListModule, [typeof i1.NiceDraggableListDirective], [typeof i2.DragDropModule], [typeof i1.NiceDraggableListDirective]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NiceDraggableListModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./public-api";
|
|
@@ -2,6 +2,7 @@ export * from "./autofocus";
|
|
|
2
2
|
export * from "./autogrow";
|
|
3
3
|
export * from "./chip-async-typeahead";
|
|
4
4
|
export * from "./chip-list";
|
|
5
|
+
export * from "./draggable-list";
|
|
5
6
|
export * from "./dropzone";
|
|
6
7
|
export * from "./image-error-placeholder";
|
|
7
8
|
export * from "./material";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LexoRank } from "lexorank";
|
|
2
|
+
export declare class LexoRankUtils {
|
|
3
|
+
static compareStringFn(previousRank?: string, nextRank?: string): number;
|
|
4
|
+
static compareFn(previousRank: LexoRank, nextRank: LexoRank): number;
|
|
5
|
+
static getNewRank(afterRank?: string, beforeRank?: string): string;
|
|
6
|
+
}
|
|
@@ -7,6 +7,7 @@ export * from "./font-awesome.utils";
|
|
|
7
7
|
export * from "./form-data.utils";
|
|
8
8
|
export * from "./http-status.utils";
|
|
9
9
|
export * from "./keyboard.utils";
|
|
10
|
+
export * from "./lexorank.utils";
|
|
10
11
|
export * from "./modal.utils";
|
|
11
12
|
export * from "./number.utils";
|
|
12
13
|
export * from "./object.utils";
|