@progress/kendo-angular-sortable 4.0.7-dev.202203091022 → 5.0.0-dev.202204131843
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/{dist/es2015/binding.directive.d.ts → binding.directive.d.ts} +4 -1
- package/bundles/kendo-angular-sortable.umd.js +5 -0
- package/{dist/es2015/data-event-args.interface.d.ts → data-event-args.interface.d.ts} +0 -0
- package/{dist/es2015/data-events.d.ts → data-events.d.ts} +0 -0
- package/{dist/es2015/draggable-event.d.ts → draggable-event.d.ts} +0 -0
- package/{dist/es2015/draggable.directive.d.ts → draggable.directive.d.ts} +11 -4
- package/{dist/es2015 → esm2015}/binding.directive.js +16 -18
- package/{dist/es2015 → esm2015}/data-event-args.interface.js +1 -0
- package/{dist/es2015 → esm2015}/data-events.js +0 -0
- package/{dist/es2015 → esm2015}/draggable-event.js +0 -0
- package/esm2015/draggable.directive.js +71 -0
- package/esm2015/item-template.directive.js +39 -0
- package/{dist/es/index.js → esm2015/kendo-angular-sortable.js} +0 -0
- package/{dist/es → esm2015}/main.js +0 -0
- package/{dist/es2015 → esm2015}/navigate-event.js +0 -0
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/{dist/es2015 → esm2015}/preventable-event.js +0 -0
- package/esm2015/sortable-container.js +16 -0
- package/{dist/es2015 → esm2015}/sortable-event-args.interface.js +1 -0
- package/{dist/es2015 → esm2015}/sortable-events.js +0 -0
- package/{dist/es2015 → esm2015}/sortable.component.js +162 -179
- package/{dist/es2015 → esm2015}/sortable.module.js +23 -12
- package/{dist/es2015 → esm2015}/sortable.service.js +9 -11
- package/{dist/es2015 → esm2015}/util.js +0 -3
- package/{dist/fesm2015/index.js → fesm2015/kendo-angular-sortable.js} +406 -407
- package/{dist/es2015/item-template.directive.d.ts → item-template.directive.d.ts} +5 -0
- package/{dist/es2015/index.d.ts → kendo-angular-sortable.d.ts} +1 -0
- package/{dist/es2015/main.d.ts → main.d.ts} +0 -0
- package/{dist/es2015/navigate-event.d.ts → navigate-event.d.ts} +0 -0
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +32 -92
- package/{dist/es2015/preventable-event.d.ts → preventable-event.d.ts} +0 -0
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/{dist/es2015/sortable-container.d.ts → sortable-container.d.ts} +3 -0
- package/{dist/es2015/sortable-event-args.interface.d.ts → sortable-event-args.interface.d.ts} +0 -0
- package/{dist/es2015/sortable-events.d.ts → sortable-events.d.ts} +0 -0
- package/{dist/es2015/sortable.component.d.ts → sortable.component.d.ts} +13 -8
- package/{dist/es2015/sortable.module.d.ts → sortable.module.d.ts} +9 -0
- package/{dist/es2015/sortable.service.d.ts → sortable.service.d.ts} +5 -1
- package/{dist/es2015/util.d.ts → util.d.ts} +0 -0
- package/dist/cdn/js/kendo-angular-sortable.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/binding.directive.js +0 -177
- package/dist/es/data-event-args.interface.js +0 -4
- package/dist/es/data-events.js +0 -54
- package/dist/es/draggable-event.js +0 -23
- package/dist/es/draggable.directive.js +0 -88
- package/dist/es/item-template.directive.js +0 -39
- package/dist/es/navigate-event.js +0 -22
- package/dist/es/package-metadata.js +0 -15
- package/dist/es/preventable-event.js +0 -34
- package/dist/es/sortable-container.js +0 -18
- package/dist/es/sortable-event-args.interface.js +0 -4
- package/dist/es/sortable-events.js +0 -54
- package/dist/es/sortable.component.js +0 -1075
- package/dist/es/sortable.module.js +0 -64
- package/dist/es/sortable.service.js +0 -236
- package/dist/es/util.js +0 -144
- package/dist/es2015/draggable.directive.js +0 -75
- package/dist/es2015/index.js +0 -8
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/es2015/item-template.directive.js +0 -37
- package/dist/es2015/main.js +0 -17
- package/dist/es2015/sortable-container.js +0 -15
- package/dist/fesm5/index.js +0 -1944
- package/dist/npm/binding.directive.js +0 -179
- package/dist/npm/data-event-args.interface.js +0 -6
- package/dist/npm/data-events.js +0 -56
- package/dist/npm/draggable-event.js +0 -25
- package/dist/npm/draggable.directive.js +0 -90
- package/dist/npm/index.js +0 -11
- package/dist/npm/item-template.directive.js +0 -41
- package/dist/npm/main.js +0 -34
- package/dist/npm/navigate-event.js +0 -24
- package/dist/npm/package-metadata.js +0 -17
- package/dist/npm/preventable-event.js +0 -36
- package/dist/npm/sortable-container.js +0 -20
- package/dist/npm/sortable-event-args.interface.js +0 -6
- package/dist/npm/sortable-events.js +0 -56
- package/dist/npm/sortable.component.js +0 -1077
- package/dist/npm/sortable.module.js +0 -66
- package/dist/npm/sortable.service.js +0 -238
- package/dist/npm/util.js +0 -147
- package/dist/systemjs/kendo-angular-sortable.js +0 -5
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import
|
|
6
|
-
var SortableComponent_1;
|
|
7
|
-
import { Component, Input, Output, QueryList, ContentChildren, ViewChild, ViewChildren, TemplateRef, ElementRef, EventEmitter, HostBinding, NgZone, ChangeDetectorRef, forwardRef } from '@angular/core';
|
|
5
|
+
import { Component, Input, Output, ContentChildren, ViewChild, ViewChildren, TemplateRef, EventEmitter, HostBinding, forwardRef } from '@angular/core';
|
|
8
6
|
import { Subject, merge } from 'rxjs';
|
|
9
7
|
import { isDocumentAvailable, isChanged } from '@progress/kendo-angular-common';
|
|
10
8
|
import { relativeContextElement } from './util';
|
|
@@ -12,7 +10,6 @@ import { filter, take } from 'rxjs/operators';
|
|
|
12
10
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
13
11
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
14
12
|
import { packageMetadata } from './package-metadata';
|
|
15
|
-
import { SortableService } from './sortable.service';
|
|
16
13
|
import { DraggableDirective } from './draggable.directive';
|
|
17
14
|
import { SortableContainer } from './sortable-container';
|
|
18
15
|
import { ItemTemplateDirective, PlaceholderTemplateDirective } from './item-template.directive';
|
|
@@ -20,6 +17,11 @@ import { NavigateEvent } from './navigate-event';
|
|
|
20
17
|
import { DraggableEvent } from './draggable-event';
|
|
21
18
|
import { DragStartEvent, DragOverEvent, DragEndEvent } from './sortable-events';
|
|
22
19
|
import Draggable from '@telerik/kendo-draggable';
|
|
20
|
+
import * as i0 from "@angular/core";
|
|
21
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
|
22
|
+
import * as i2 from "./sortable.service";
|
|
23
|
+
import * as i3 from "@angular/common";
|
|
24
|
+
import * as i4 from "./draggable.directive";
|
|
23
25
|
/**
|
|
24
26
|
* Represents the [Kendo UI Sortable component for Angular]({% slug overview_sortable %}).
|
|
25
27
|
*
|
|
@@ -27,11 +29,10 @@ import Draggable from '@telerik/kendo-draggable';
|
|
|
27
29
|
* {% embed_file shared/app.module.ts preview %}
|
|
28
30
|
* {% embed_file shared/main.ts hidden %}
|
|
29
31
|
*/
|
|
30
|
-
let SortableComponent = SortableComponent_1 =
|
|
31
32
|
/**
|
|
32
33
|
* Represents the Kendo UI Sortable component for Angular.
|
|
33
34
|
*/
|
|
34
|
-
class SortableComponent {
|
|
35
|
+
export class SortableComponent {
|
|
35
36
|
constructor(ngZone, localization, changeDetector, wrapper, sortableService) {
|
|
36
37
|
this.ngZone = ngZone;
|
|
37
38
|
this.localization = localization;
|
|
@@ -867,167 +868,80 @@ class SortableComponent {
|
|
|
867
868
|
}
|
|
868
869
|
}
|
|
869
870
|
}
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
]
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
]
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
]
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
]
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
], SortableComponent.prototype, "defaultTemplateRef", void 0);
|
|
945
|
-
tslib_1.__decorate([
|
|
946
|
-
ContentChildren(ItemTemplateDirective, { read: TemplateRef, descendants: false }),
|
|
947
|
-
tslib_1.__metadata("design:type", QueryList)
|
|
948
|
-
], SortableComponent.prototype, "itemTemplateDirectiveRef", void 0);
|
|
949
|
-
tslib_1.__decorate([
|
|
950
|
-
ContentChildren(PlaceholderTemplateDirective, { read: TemplateRef, descendants: false }),
|
|
951
|
-
tslib_1.__metadata("design:type", QueryList)
|
|
952
|
-
], SortableComponent.prototype, "placeholderTemplateDirectiveRef", void 0);
|
|
953
|
-
tslib_1.__decorate([
|
|
954
|
-
ViewChildren('itemWrapper'),
|
|
955
|
-
tslib_1.__metadata("design:type", QueryList)
|
|
956
|
-
], SortableComponent.prototype, "itemWrappers", void 0);
|
|
957
|
-
tslib_1.__decorate([
|
|
958
|
-
ViewChildren(DraggableDirective),
|
|
959
|
-
tslib_1.__metadata("design:type", QueryList)
|
|
960
|
-
], SortableComponent.prototype, "draggables", void 0);
|
|
961
|
-
tslib_1.__decorate([
|
|
962
|
-
ViewChild('noDataRef', { static: false }),
|
|
963
|
-
tslib_1.__metadata("design:type", ElementRef)
|
|
964
|
-
], SortableComponent.prototype, "noDataContainer", void 0);
|
|
965
|
-
tslib_1.__decorate([
|
|
966
|
-
ViewChild('hint', { static: false }),
|
|
967
|
-
tslib_1.__metadata("design:type", ElementRef)
|
|
968
|
-
], SortableComponent.prototype, "hint", void 0);
|
|
969
|
-
tslib_1.__decorate([
|
|
970
|
-
Output(),
|
|
971
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
972
|
-
], SortableComponent.prototype, "dragStart", void 0);
|
|
973
|
-
tslib_1.__decorate([
|
|
974
|
-
Output(),
|
|
975
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
976
|
-
], SortableComponent.prototype, "dragEnd", void 0);
|
|
977
|
-
tslib_1.__decorate([
|
|
978
|
-
Output(),
|
|
979
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
980
|
-
], SortableComponent.prototype, "dragOver", void 0);
|
|
981
|
-
tslib_1.__decorate([
|
|
982
|
-
Output(),
|
|
983
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
984
|
-
], SortableComponent.prototype, "dragLeave", void 0);
|
|
985
|
-
tslib_1.__decorate([
|
|
986
|
-
Output(),
|
|
987
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
988
|
-
], SortableComponent.prototype, "dataMove", void 0);
|
|
989
|
-
tslib_1.__decorate([
|
|
990
|
-
Output(),
|
|
991
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
992
|
-
], SortableComponent.prototype, "dataAdd", void 0);
|
|
993
|
-
tslib_1.__decorate([
|
|
994
|
-
Output(),
|
|
995
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
996
|
-
], SortableComponent.prototype, "dataRemove", void 0);
|
|
997
|
-
tslib_1.__decorate([
|
|
998
|
-
Output(),
|
|
999
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
1000
|
-
], SortableComponent.prototype, "navigate", void 0);
|
|
1001
|
-
tslib_1.__decorate([
|
|
1002
|
-
Input(),
|
|
1003
|
-
tslib_1.__metadata("design:type", Number)
|
|
1004
|
-
], SortableComponent.prototype, "activeIndex", void 0);
|
|
1005
|
-
tslib_1.__decorate([
|
|
1006
|
-
HostBinding('style.touch-action'),
|
|
1007
|
-
tslib_1.__metadata("design:type", String),
|
|
1008
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
1009
|
-
], SortableComponent.prototype, "touchAction", null);
|
|
1010
|
-
tslib_1.__decorate([
|
|
1011
|
-
HostBinding('attr.dir'),
|
|
1012
|
-
tslib_1.__metadata("design:type", String),
|
|
1013
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
1014
|
-
], SortableComponent.prototype, "dir", null);
|
|
1015
|
-
SortableComponent = SortableComponent_1 = tslib_1.__decorate([
|
|
1016
|
-
Component({
|
|
1017
|
-
exportAs: 'kendoSortable',
|
|
1018
|
-
providers: [
|
|
1019
|
-
LocalizationService,
|
|
1020
|
-
{
|
|
1021
|
-
provide: L10N_PREFIX,
|
|
1022
|
-
useValue: 'kendo.sortable'
|
|
1023
|
-
},
|
|
1024
|
-
{
|
|
1025
|
-
provide: SortableContainer,
|
|
1026
|
-
useExisting: forwardRef(() => SortableComponent_1)
|
|
1027
|
-
}
|
|
1028
|
-
],
|
|
1029
|
-
selector: 'kendo-sortable',
|
|
1030
|
-
template: `
|
|
871
|
+
}
|
|
872
|
+
SortableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SortableComponent, deps: [{ token: i0.NgZone }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i2.SortableService }], target: i0.ɵɵFactoryTarget.Component });
|
|
873
|
+
SortableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SortableComponent, selector: "kendo-sortable", inputs: { tabIndex: "tabIndex", data: "data", navigable: "navigable", navigatable: "navigatable", animation: "animation", disabledIndexes: "disabledIndexes", zone: "zone", acceptZones: "acceptZones", itemStyle: "itemStyle", emptyItemStyle: "emptyItemStyle", activeItemStyle: "activeItemStyle", disabledItemStyle: "disabledItemStyle", itemClass: "itemClass", activeItemClass: "activeItemClass", emptyItemClass: "emptyItemClass", disabledItemClass: "disabledItemClass", emptyText: "emptyText", activeIndex: "activeIndex" }, outputs: { dragStart: "dragStart", dragEnd: "dragEnd", dragOver: "dragOver", dragLeave: "dragLeave", dataMove: "dataMove", dataAdd: "dataAdd", dataRemove: "dataRemove", navigate: "navigate" }, host: { properties: { "style.touch-action": "this.touchAction", "attr.dir": "this.dir" } }, providers: [
|
|
874
|
+
LocalizationService,
|
|
875
|
+
{
|
|
876
|
+
provide: L10N_PREFIX,
|
|
877
|
+
useValue: 'kendo.sortable'
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
provide: SortableContainer,
|
|
881
|
+
useExisting: forwardRef(() => SortableComponent)
|
|
882
|
+
}
|
|
883
|
+
], queries: [{ propertyName: "defaultTemplateRef", predicate: TemplateRef }, { propertyName: "itemTemplateDirectiveRef", predicate: ItemTemplateDirective, read: TemplateRef }, { propertyName: "placeholderTemplateDirectiveRef", predicate: PlaceholderTemplateDirective, read: TemplateRef }], viewQueries: [{ propertyName: "noDataContainer", first: true, predicate: ["noDataRef"], descendants: true }, { propertyName: "hint", first: true, predicate: ["hint"], descendants: true }, { propertyName: "itemWrappers", predicate: ["itemWrapper"], descendants: true }, { propertyName: "draggables", predicate: DraggableDirective, descendants: true }], exportAs: ["kendoSortable"], usesOnChanges: true, ngImport: i0, template: `
|
|
884
|
+
<div #itemWrapper *ngFor="let item of _localData;let i=index"
|
|
885
|
+
kendoDraggable
|
|
886
|
+
[attr.tabIndex]="itemEnabled(i)?(navigable?tabIndex||0:tabIndex):null"
|
|
887
|
+
[attr.aria-grabbed]="i===dragIndex"
|
|
888
|
+
[attr.aria-dropeffect]="ariaDropEffect(i)"
|
|
889
|
+
[attr.data-sortable-item] = "true"
|
|
890
|
+
[attr.data-sortable-index]="i"
|
|
891
|
+
[attr.data-sortable-id]="id"
|
|
892
|
+
[index]="i"
|
|
893
|
+
[hidden]="item.hidden"
|
|
894
|
+
[disabled]="!itemEnabled(i)"
|
|
895
|
+
[ngClass]="currentItemClass(i)"
|
|
896
|
+
[ngStyle]="currentItemStyle(i)"
|
|
897
|
+
|
|
898
|
+
(focus)="focusHandler(i)"
|
|
899
|
+
(blur)="blurHandler()"
|
|
900
|
+
(keydown)="keydownHandler($event)"
|
|
901
|
+
>
|
|
902
|
+
<ng-container *ngIf="itemTemplateRef"
|
|
903
|
+
[ngTemplateOutlet]="itemTemplate(i)"
|
|
904
|
+
[ngTemplateOutletContext]="item">
|
|
905
|
+
</ng-container>
|
|
906
|
+
<ng-container *ngIf="!itemTemplateRef">{{item.item}}</ng-container>
|
|
907
|
+
</div>
|
|
908
|
+
|
|
909
|
+
<ng-container #noDataRef *ngIf="!_data.length || _localData.length === 1 && _localData[0].hidden">
|
|
910
|
+
<div
|
|
911
|
+
kendoDraggable
|
|
912
|
+
[index]="0"
|
|
913
|
+
[disabled]="true"
|
|
914
|
+
[attr.data-sortable-id]="id"
|
|
915
|
+
[attr.data-sortable-index]="0"
|
|
916
|
+
[ngStyle]="currentItemStyle(-1)"
|
|
917
|
+
[ngClass]="currentItemClass(-1)"
|
|
918
|
+
>{{emptyText}}</div>
|
|
919
|
+
</ng-container>
|
|
920
|
+
<div *ngIf="hintVisible()" [ngStyle]="hintStyle()" [ngClass]="currentItemClass(dragIndex)">
|
|
921
|
+
<ng-container *ngIf="itemTemplateRef"
|
|
922
|
+
[ngTemplateOutlet]="itemTemplateRef"
|
|
923
|
+
[ngTemplateOutletContext]="{item: _localData[dragIndex].item}">
|
|
924
|
+
</ng-container>
|
|
925
|
+
<ng-container *ngIf="!itemTemplateRef">{{_localData[dragIndex].item}}</ng-container>
|
|
926
|
+
</div>
|
|
927
|
+
`, isInline: true, directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.DraggableDirective, selector: "[kendoDraggable]", inputs: ["index", "disabled", "hidden"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
928
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SortableComponent, decorators: [{
|
|
929
|
+
type: Component,
|
|
930
|
+
args: [{
|
|
931
|
+
exportAs: 'kendoSortable',
|
|
932
|
+
providers: [
|
|
933
|
+
LocalizationService,
|
|
934
|
+
{
|
|
935
|
+
provide: L10N_PREFIX,
|
|
936
|
+
useValue: 'kendo.sortable'
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
provide: SortableContainer,
|
|
940
|
+
useExisting: forwardRef(() => SortableComponent)
|
|
941
|
+
}
|
|
942
|
+
],
|
|
943
|
+
selector: 'kendo-sortable',
|
|
944
|
+
template: `
|
|
1031
945
|
<div #itemWrapper *ngFor="let item of _localData;let i=index"
|
|
1032
946
|
kendoDraggable
|
|
1033
947
|
[attr.tabIndex]="itemEnabled(i)?(navigable?tabIndex||0:tabIndex):null"
|
|
@@ -1072,15 +986,84 @@ SortableComponent = SortableComponent_1 = tslib_1.__decorate([
|
|
|
1072
986
|
<ng-container *ngIf="!itemTemplateRef">{{_localData[dragIndex].item}}</ng-container>
|
|
1073
987
|
</div>
|
|
1074
988
|
`
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
989
|
+
}]
|
|
990
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i2.SortableService }]; }, propDecorators: { tabIndex: [{
|
|
991
|
+
type: Input
|
|
992
|
+
}], data: [{
|
|
993
|
+
type: Input
|
|
994
|
+
}], navigable: [{
|
|
995
|
+
type: Input
|
|
996
|
+
}], navigatable: [{
|
|
997
|
+
type: Input
|
|
998
|
+
}], animation: [{
|
|
999
|
+
type: Input
|
|
1000
|
+
}], disabledIndexes: [{
|
|
1001
|
+
type: Input
|
|
1002
|
+
}], zone: [{
|
|
1003
|
+
type: Input
|
|
1004
|
+
}], acceptZones: [{
|
|
1005
|
+
type: Input
|
|
1006
|
+
}], itemStyle: [{
|
|
1007
|
+
type: Input
|
|
1008
|
+
}], emptyItemStyle: [{
|
|
1009
|
+
type: Input
|
|
1010
|
+
}], activeItemStyle: [{
|
|
1011
|
+
type: Input
|
|
1012
|
+
}], disabledItemStyle: [{
|
|
1013
|
+
type: Input
|
|
1014
|
+
}], itemClass: [{
|
|
1015
|
+
type: Input
|
|
1016
|
+
}], activeItemClass: [{
|
|
1017
|
+
type: Input
|
|
1018
|
+
}], emptyItemClass: [{
|
|
1019
|
+
type: Input
|
|
1020
|
+
}], disabledItemClass: [{
|
|
1021
|
+
type: Input
|
|
1022
|
+
}], emptyText: [{
|
|
1023
|
+
type: Input
|
|
1024
|
+
}], defaultTemplateRef: [{
|
|
1025
|
+
type: ContentChildren,
|
|
1026
|
+
args: [TemplateRef, { descendants: false }]
|
|
1027
|
+
}], itemTemplateDirectiveRef: [{
|
|
1028
|
+
type: ContentChildren,
|
|
1029
|
+
args: [ItemTemplateDirective, { read: TemplateRef, descendants: false }]
|
|
1030
|
+
}], placeholderTemplateDirectiveRef: [{
|
|
1031
|
+
type: ContentChildren,
|
|
1032
|
+
args: [PlaceholderTemplateDirective, { read: TemplateRef, descendants: false }]
|
|
1033
|
+
}], itemWrappers: [{
|
|
1034
|
+
type: ViewChildren,
|
|
1035
|
+
args: ['itemWrapper']
|
|
1036
|
+
}], draggables: [{
|
|
1037
|
+
type: ViewChildren,
|
|
1038
|
+
args: [DraggableDirective]
|
|
1039
|
+
}], noDataContainer: [{
|
|
1040
|
+
type: ViewChild,
|
|
1041
|
+
args: ['noDataRef', { static: false }]
|
|
1042
|
+
}], hint: [{
|
|
1043
|
+
type: ViewChild,
|
|
1044
|
+
args: ['hint', { static: false }]
|
|
1045
|
+
}], dragStart: [{
|
|
1046
|
+
type: Output
|
|
1047
|
+
}], dragEnd: [{
|
|
1048
|
+
type: Output
|
|
1049
|
+
}], dragOver: [{
|
|
1050
|
+
type: Output
|
|
1051
|
+
}], dragLeave: [{
|
|
1052
|
+
type: Output
|
|
1053
|
+
}], dataMove: [{
|
|
1054
|
+
type: Output
|
|
1055
|
+
}], dataAdd: [{
|
|
1056
|
+
type: Output
|
|
1057
|
+
}], dataRemove: [{
|
|
1058
|
+
type: Output
|
|
1059
|
+
}], navigate: [{
|
|
1060
|
+
type: Output
|
|
1061
|
+
}], activeIndex: [{
|
|
1062
|
+
type: Input
|
|
1063
|
+
}], touchAction: [{
|
|
1064
|
+
type: HostBinding,
|
|
1065
|
+
args: ['style.touch-action']
|
|
1066
|
+
}], dir: [{
|
|
1067
|
+
type: HostBinding,
|
|
1068
|
+
args: ['attr.dir']
|
|
1069
|
+
}] } });
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
5
|
import { NgModule } from '@angular/core';
|
|
7
6
|
import { CommonModule } from '@angular/common';
|
|
8
7
|
import { SortableComponent } from './sortable.component';
|
|
@@ -11,6 +10,7 @@ import { DraggableDirective } from "./draggable.directive";
|
|
|
11
10
|
import { PlaceholderTemplateDirective } from './item-template.directive';
|
|
12
11
|
import { ItemTemplateDirective } from './item-template.directive';
|
|
13
12
|
import { SortableBindingDirective } from "./binding.directive";
|
|
13
|
+
import * as i0 from "@angular/core";
|
|
14
14
|
const COMPONENT_DIRECTIVES = [
|
|
15
15
|
SortableComponent,
|
|
16
16
|
DraggableDirective,
|
|
@@ -48,14 +48,25 @@ const COMPONENT_DIRECTIVES = [
|
|
|
48
48
|
*
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
SortableModule =
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
51
|
+
export class SortableModule {
|
|
52
|
+
}
|
|
53
|
+
SortableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SortableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
54
|
+
SortableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SortableModule, declarations: [SortableComponent,
|
|
55
|
+
DraggableDirective,
|
|
56
|
+
PlaceholderTemplateDirective,
|
|
57
|
+
ItemTemplateDirective,
|
|
58
|
+
SortableBindingDirective], imports: [CommonModule], exports: [SortableComponent,
|
|
59
|
+
DraggableDirective,
|
|
60
|
+
PlaceholderTemplateDirective,
|
|
61
|
+
ItemTemplateDirective,
|
|
62
|
+
SortableBindingDirective] });
|
|
63
|
+
SortableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SortableModule, providers: [SortableService], imports: [[CommonModule]] });
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SortableModule, decorators: [{
|
|
65
|
+
type: NgModule,
|
|
66
|
+
args: [{
|
|
67
|
+
declarations: [COMPONENT_DIRECTIVES],
|
|
68
|
+
exports: [COMPONENT_DIRECTIVES],
|
|
69
|
+
imports: [CommonModule],
|
|
70
|
+
providers: [SortableService]
|
|
71
|
+
}]
|
|
72
|
+
}] });
|
|
@@ -2,23 +2,22 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import
|
|
6
|
-
import { Injectable, NgZone } from '@angular/core';
|
|
5
|
+
import { Injectable } from '@angular/core';
|
|
7
6
|
import { isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
8
7
|
import { draggableFromEvent, isFocusable, widgetTarget } from './util';
|
|
9
8
|
import { Subject } from 'rxjs';
|
|
10
9
|
import { switchMap, filter, take, tap } from 'rxjs/operators';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
11
|
const allowDrag = (e) => {
|
|
12
12
|
const target = e.originalEvent.target;
|
|
13
13
|
return target.hasAttribute('data-sortable-item') || !(isFocusable(target) || widgetTarget(target));
|
|
14
14
|
};
|
|
15
|
-
const ɵ0 = allowDrag;
|
|
16
15
|
/**
|
|
17
16
|
* The service that provides the drag-and-drop functionality for
|
|
18
17
|
* transferring items between Sortable components within the same page.
|
|
19
18
|
*
|
|
20
19
|
*/
|
|
21
|
-
|
|
20
|
+
export class SortableService {
|
|
22
21
|
constructor(ngZone) {
|
|
23
22
|
this.ngZone = ngZone;
|
|
24
23
|
/**
|
|
@@ -217,10 +216,9 @@ let SortableService = class SortableService {
|
|
|
217
216
|
this.source.markForCheck();
|
|
218
217
|
});
|
|
219
218
|
}
|
|
220
|
-
}
|
|
221
|
-
SortableService =
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
export { ɵ0 };
|
|
219
|
+
}
|
|
220
|
+
SortableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SortableService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
221
|
+
SortableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SortableService });
|
|
222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SortableService, decorators: [{
|
|
223
|
+
type: Injectable
|
|
224
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
|
@@ -91,7 +91,6 @@ export const isFocusable = (element) => {
|
|
|
91
91
|
return false;
|
|
92
92
|
};
|
|
93
93
|
const toClassList = (classNames) => String(classNames).trim().split(' ');
|
|
94
|
-
const ɵ0 = toClassList;
|
|
95
94
|
/**
|
|
96
95
|
* @hidden
|
|
97
96
|
*/
|
|
@@ -120,7 +119,6 @@ const hasRelativeStackingContext = () => {
|
|
|
120
119
|
document.body.removeChild(parent);
|
|
121
120
|
return isDifferent;
|
|
122
121
|
};
|
|
123
|
-
const ɵ1 = hasRelativeStackingContext;
|
|
124
122
|
const HAS_RELATIVE_STACKING_CONTEXT = hasRelativeStackingContext();
|
|
125
123
|
/**
|
|
126
124
|
* @hidden
|
|
@@ -137,4 +135,3 @@ export const relativeContextElement = (element) => {
|
|
|
137
135
|
node = node.parentElement;
|
|
138
136
|
}
|
|
139
137
|
};
|
|
140
|
-
export { ɵ0, ɵ1 };
|