@progress/kendo-angular-sortable 24.2.2 → 25.0.0-develop.12
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/fesm2022/progress-kendo-angular-sortable.mjs +248 -117
- package/index.d.ts +925 -16
- package/package-metadata.mjs +2 -2
- package/package.json +9 -9
- package/binding.directive.d.ts +0 -63
- package/directives.d.ts +0 -32
- package/draggable.directive.d.ts +0 -29
- package/events/data-event-args.interface.d.ts +0 -23
- package/events/data-events.d.ts +0 -74
- package/events/draggable-event.d.ts +0 -24
- package/events/navigate-event.d.ts +0 -27
- package/events/preventable-event.d.ts +0 -26
- package/events/sortable-event-args.interface.d.ts +0 -18
- package/events/sortable-events.d.ts +0 -35
- package/item-template.directive.d.ts +0 -24
- package/package-metadata.d.ts +0 -9
- package/sortable-container.d.ts +0 -14
- package/sortable.component.d.ts +0 -397
- package/sortable.module.d.ts +0 -32
- package/sortable.service.d.ts +0 -129
- package/util.d.ts +0 -58
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { Injectable, HostBinding, Input, Directive, QueryList, EventEmitter, TemplateRef, forwardRef, Output, ViewChild, ViewChildren, ContentChildren, Component, NgModule } from '@angular/core';
|
|
6
|
+
import { signal, Injectable, HostBinding, Input, Directive, QueryList, EventEmitter, computed, afterNextRender, TemplateRef, forwardRef, Output, ViewChild, ViewChildren, ContentChildren, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
7
7
|
import { Subject, merge } from 'rxjs';
|
|
8
|
-
import { isDocumentAvailable, focusableSelector,
|
|
8
|
+
import { isDocumentAvailable, focusableSelector, Keys, normalizeKeys, EventsOutsideAngularDirective, KENDO_WEBMCP_HOST } from '@progress/kendo-angular-common';
|
|
9
9
|
import { filter, tap, take, switchMap } from 'rxjs/operators';
|
|
10
10
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
11
11
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
@@ -193,8 +193,8 @@ const packageMetadata = {
|
|
|
193
193
|
productName: 'Kendo UI for Angular',
|
|
194
194
|
productCode: 'KENDOUIANGULAR',
|
|
195
195
|
productCodes: ['KENDOUIANGULAR'],
|
|
196
|
-
publishDate:
|
|
197
|
-
version: '
|
|
196
|
+
publishDate: 1785318043,
|
|
197
|
+
version: '25.0.0-develop.12',
|
|
198
198
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
199
199
|
};
|
|
200
200
|
|
|
@@ -240,12 +240,6 @@ class SortableService {
|
|
|
240
240
|
* @hidden
|
|
241
241
|
*/
|
|
242
242
|
onReleaseSubject = new Subject();
|
|
243
|
-
subscriptions;
|
|
244
|
-
source = null;
|
|
245
|
-
_target = null;
|
|
246
|
-
sortableCounter = 0;
|
|
247
|
-
sortableRegister = {};
|
|
248
|
-
pressArgs;
|
|
249
243
|
/**
|
|
250
244
|
* Specifies the `SortableComponent` instance under the currently dragged item.
|
|
251
245
|
*/
|
|
@@ -255,6 +249,16 @@ class SortableService {
|
|
|
255
249
|
get target() {
|
|
256
250
|
return this._target;
|
|
257
251
|
}
|
|
252
|
+
subscriptions;
|
|
253
|
+
source = signal(null, ...(ngDevMode ? [{ debugName: "source" }] : []));
|
|
254
|
+
_target = null;
|
|
255
|
+
sortableCounter = 0;
|
|
256
|
+
sortableRegister = {};
|
|
257
|
+
pressArgs;
|
|
258
|
+
/**
|
|
259
|
+
* @hidden
|
|
260
|
+
*/
|
|
261
|
+
source$ = this.source.asReadonly();
|
|
258
262
|
/**
|
|
259
263
|
* @hidden
|
|
260
264
|
*/
|
|
@@ -328,7 +332,7 @@ class SortableService {
|
|
|
328
332
|
* @param sortable - The `SortableComponent`.
|
|
329
333
|
*/
|
|
330
334
|
setSource(sortable) {
|
|
331
|
-
this.source
|
|
335
|
+
this.source.set(sortable);
|
|
332
336
|
}
|
|
333
337
|
/**
|
|
334
338
|
* Returns the source `SortableComponent` from which
|
|
@@ -337,7 +341,7 @@ class SortableService {
|
|
|
337
341
|
* @return - The `SourceComponent`.
|
|
338
342
|
*/
|
|
339
343
|
getSource() {
|
|
340
|
-
return this.source;
|
|
344
|
+
return this.source();
|
|
341
345
|
}
|
|
342
346
|
/**
|
|
343
347
|
* The method that finds the `SortableComponent` which is registered to
|
|
@@ -378,14 +382,14 @@ class SortableService {
|
|
|
378
382
|
}
|
|
379
383
|
}
|
|
380
384
|
release(event) {
|
|
381
|
-
if (this.source) {
|
|
385
|
+
if (this.source()) {
|
|
382
386
|
this.ngZone.run(() => {
|
|
383
387
|
if (this.targetSortable) {
|
|
384
388
|
const dropTarget = draggableFromEvent(event, this.targetSortable.component);
|
|
385
|
-
this.source.endDrag({ target: dropTarget, originalEvent: event });
|
|
389
|
+
this.source().endDrag({ target: dropTarget, originalEvent: event });
|
|
386
390
|
}
|
|
387
|
-
this.source.positionHintFromEvent(null);
|
|
388
|
-
this.source.markForCheck();
|
|
391
|
+
this.source().positionHintFromEvent(null);
|
|
392
|
+
this.source().markForCheck();
|
|
389
393
|
});
|
|
390
394
|
}
|
|
391
395
|
this.targetSortable = null;
|
|
@@ -400,27 +404,27 @@ class SortableService {
|
|
|
400
404
|
if (this.start()) {
|
|
401
405
|
return;
|
|
402
406
|
}
|
|
403
|
-
this.source.positionHintFromEvent(event);
|
|
407
|
+
this.source().positionHintFromEvent(event);
|
|
404
408
|
const sortable = this.getSortableComponentFromTouch(event);
|
|
405
409
|
if (!sortable || sortable && sortable.component !== this.target) {
|
|
406
410
|
if (this.target) {
|
|
407
411
|
this.target.leave({ target: undefined, originalEvent: event });
|
|
408
412
|
}
|
|
409
|
-
else if (this.source !== this.target) {
|
|
410
|
-
this.source.leave({ target: undefined, originalEvent: event });
|
|
413
|
+
else if (this.source() !== this.target) {
|
|
414
|
+
this.source().leave({ target: undefined, originalEvent: event });
|
|
411
415
|
}
|
|
412
416
|
}
|
|
413
417
|
if (sortable && sortable.component) {
|
|
414
418
|
const draggable = draggableFromEvent(event, sortable.component);
|
|
415
419
|
sortable.component.drag({ target: draggable, originalEvent: event });
|
|
416
420
|
}
|
|
417
|
-
this.source.markForCheck();
|
|
421
|
+
this.source().markForCheck();
|
|
418
422
|
});
|
|
419
423
|
}
|
|
420
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
421
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
424
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SortableService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
425
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SortableService, providedIn: 'root' });
|
|
422
426
|
}
|
|
423
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
427
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SortableService, decorators: [{
|
|
424
428
|
type: Injectable,
|
|
425
429
|
args: [{
|
|
426
430
|
providedIn: 'root'
|
|
@@ -431,10 +435,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
431
435
|
* @hidden
|
|
432
436
|
*/
|
|
433
437
|
class SortableContainer {
|
|
434
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
435
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
438
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SortableContainer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
439
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SortableContainer });
|
|
436
440
|
}
|
|
437
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SortableContainer, decorators: [{
|
|
438
442
|
type: Injectable
|
|
439
443
|
}] });
|
|
440
444
|
|
|
@@ -445,16 +449,25 @@ class DraggableDirective {
|
|
|
445
449
|
parent;
|
|
446
450
|
el;
|
|
447
451
|
renderer;
|
|
448
|
-
index
|
|
449
|
-
|
|
452
|
+
set index(value) {
|
|
453
|
+
this._index.set(value);
|
|
454
|
+
}
|
|
455
|
+
get index() {
|
|
456
|
+
return this._index();
|
|
457
|
+
}
|
|
458
|
+
set disabled(value) {
|
|
459
|
+
this._disabled.set(value);
|
|
460
|
+
}
|
|
461
|
+
get disabled() {
|
|
462
|
+
return this._disabled();
|
|
463
|
+
}
|
|
450
464
|
set hidden(value) {
|
|
451
|
-
this._hidden
|
|
465
|
+
this._hidden.set(value);
|
|
452
466
|
this.updateDisplayStyle();
|
|
453
467
|
}
|
|
454
468
|
get hidden() {
|
|
455
|
-
return this._hidden;
|
|
469
|
+
return this._hidden();
|
|
456
470
|
}
|
|
457
|
-
_hidden;
|
|
458
471
|
get _focused() {
|
|
459
472
|
return this.disabled ? false : (this.index === this.parent.activeIndex);
|
|
460
473
|
}
|
|
@@ -466,6 +479,9 @@ class DraggableDirective {
|
|
|
466
479
|
this.updateDisplayStyle();
|
|
467
480
|
}
|
|
468
481
|
_display;
|
|
482
|
+
_index = signal(undefined, ...(ngDevMode ? [{ debugName: "_index" }] : []));
|
|
483
|
+
_disabled = signal(undefined, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
|
|
484
|
+
_hidden = signal(undefined, ...(ngDevMode ? [{ debugName: "_hidden" }] : []));
|
|
469
485
|
constructor(parent, el, renderer) {
|
|
470
486
|
this.parent = parent;
|
|
471
487
|
this.el = el;
|
|
@@ -484,10 +500,10 @@ class DraggableDirective {
|
|
|
484
500
|
updateDisplayStyle() {
|
|
485
501
|
this.renderer.setStyle(this.el.nativeElement, 'display', this.display);
|
|
486
502
|
}
|
|
487
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
488
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
503
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DraggableDirective, deps: [{ token: SortableContainer }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
504
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: DraggableDirective, isStandalone: true, selector: "[kendoDraggable]", inputs: { index: "index", disabled: "disabled", hidden: "hidden" }, host: { properties: { "class.k-focus": "this._focused" } }, ngImport: i0 });
|
|
489
505
|
}
|
|
490
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
506
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DraggableDirective, decorators: [{
|
|
491
507
|
type: Directive,
|
|
492
508
|
args: [{
|
|
493
509
|
selector: '[kendoDraggable]',
|
|
@@ -513,10 +529,10 @@ class ItemTemplateDirective {
|
|
|
513
529
|
constructor(templateRef) {
|
|
514
530
|
this.templateRef = templateRef;
|
|
515
531
|
}
|
|
516
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
517
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
532
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ItemTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
533
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: ItemTemplateDirective, isStandalone: true, selector: "[kendoSortableItemTemplate]", ngImport: i0 });
|
|
518
534
|
}
|
|
519
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
535
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ItemTemplateDirective, decorators: [{
|
|
520
536
|
type: Directive,
|
|
521
537
|
args: [{
|
|
522
538
|
selector: '[kendoSortableItemTemplate]',
|
|
@@ -531,10 +547,10 @@ class PlaceholderTemplateDirective {
|
|
|
531
547
|
constructor(templateRef) {
|
|
532
548
|
this.templateRef = templateRef;
|
|
533
549
|
}
|
|
534
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
535
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
550
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PlaceholderTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
551
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: PlaceholderTemplateDirective, isStandalone: true, selector: "[kendoSortablePlaceholderTemplate]", ngImport: i0 });
|
|
536
552
|
}
|
|
537
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
553
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PlaceholderTemplateDirective, decorators: [{
|
|
538
554
|
type: Directive,
|
|
539
555
|
args: [{
|
|
540
556
|
selector: '[kendoSortablePlaceholderTemplate]',
|
|
@@ -664,29 +680,39 @@ const KEY_SHORTCUTS = 'Control+ArrowLeft Control+ArrowRight Meta+ArrowLeft Meta+
|
|
|
664
680
|
class SortableComponent {
|
|
665
681
|
ngZone;
|
|
666
682
|
renderer;
|
|
667
|
-
changeDetector;
|
|
668
|
-
localization;
|
|
669
683
|
cdr;
|
|
684
|
+
localization;
|
|
685
|
+
injector;
|
|
670
686
|
/**
|
|
671
687
|
* Specifies the tab index of the Sortable component.
|
|
672
688
|
*/
|
|
673
|
-
tabIndex
|
|
689
|
+
set tabIndex(value) {
|
|
690
|
+
this._tabIndex.set(value);
|
|
691
|
+
}
|
|
692
|
+
get tabIndex() {
|
|
693
|
+
return this._tabIndex();
|
|
694
|
+
}
|
|
674
695
|
/**
|
|
675
696
|
* Configures how the Sortable component tracks changes in its items collection.
|
|
676
697
|
*/
|
|
677
|
-
trackBy
|
|
698
|
+
set trackBy(value) {
|
|
699
|
+
this._trackBy.set(value);
|
|
700
|
+
}
|
|
701
|
+
get trackBy() {
|
|
702
|
+
return this._trackBy();
|
|
703
|
+
}
|
|
678
704
|
/**
|
|
679
705
|
* Sets an array of any data that is used as a data source for the Sortable.
|
|
680
706
|
*/
|
|
681
707
|
set data(data) {
|
|
682
|
-
this._data
|
|
708
|
+
this._data.set(data);
|
|
683
709
|
//Cache each _data item instance locally to avoid repaint due to the ngTemplateOutletContext (generated by itemData)
|
|
684
710
|
//This prevents destroying the kendoDraggable instance, which otherwise leads to losing the dragEnd event
|
|
685
711
|
//due to non-exisitng HTML element
|
|
686
712
|
this.cacheData();
|
|
687
713
|
}
|
|
688
714
|
get data() {
|
|
689
|
-
return this._data;
|
|
715
|
+
return this._data();
|
|
690
716
|
}
|
|
691
717
|
/**
|
|
692
718
|
* Sets a boolean value that determines whether the Sortable items are navigable using the keyboard. [See example](https://www.telerik.com/kendo-angular-ui/components/sortable/keyboard-navigation).
|
|
@@ -695,64 +721,137 @@ class SortableComponent {
|
|
|
695
721
|
* @remarks
|
|
696
722
|
* This property is related to accessibility.
|
|
697
723
|
*/
|
|
698
|
-
navigable
|
|
724
|
+
set navigable(value) {
|
|
725
|
+
this._navigable.set(value);
|
|
726
|
+
}
|
|
727
|
+
get navigable() {
|
|
728
|
+
return this._navigable();
|
|
729
|
+
}
|
|
699
730
|
/**
|
|
700
731
|
* Enables or disables built-in animations.
|
|
701
732
|
* @default false
|
|
702
733
|
*/
|
|
703
|
-
animation
|
|
734
|
+
set animation(value) {
|
|
735
|
+
this._animation.set(value);
|
|
736
|
+
}
|
|
737
|
+
get animation() {
|
|
738
|
+
return this._animation();
|
|
739
|
+
}
|
|
704
740
|
/**
|
|
705
741
|
* Sets an array of integers that represent the indexes of the disabled items from the data array. [See example](https://www.telerik.com/kendo-angular-ui/components/sortable/items#disabling-items).
|
|
706
742
|
*/
|
|
707
|
-
disabledIndexes
|
|
743
|
+
set disabledIndexes(value) {
|
|
744
|
+
this._disabledIndexes.set(value);
|
|
745
|
+
if (this.data) {
|
|
746
|
+
this.cacheData();
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
get disabledIndexes() {
|
|
750
|
+
return this._disabledIndexes();
|
|
751
|
+
}
|
|
708
752
|
/**
|
|
709
753
|
* Sets a string that represents the name of the zone to which the Sortable belongs
|
|
710
754
|
* ([see example](https://www.telerik.com/kendo-angular-ui/components/sortable/items#transferring-items)). Items can be transferred
|
|
711
755
|
* between Sortables in the same zone.
|
|
712
756
|
*/
|
|
713
|
-
zone
|
|
757
|
+
set zone(value) {
|
|
758
|
+
this._zone.set(value);
|
|
759
|
+
}
|
|
760
|
+
get zone() {
|
|
761
|
+
return this._zone();
|
|
762
|
+
}
|
|
714
763
|
/**
|
|
715
764
|
* Defines the zones from which items can be transferred onto the current Sortable component
|
|
716
765
|
* ([see example](https://www.telerik.com/kendo-angular-ui/components/sortable/items#transferring-items)). If the `acceptZones` property
|
|
717
766
|
* of the target Sortable is set, you can transfer items between Sortables in different zones.
|
|
718
767
|
*/
|
|
719
|
-
acceptZones
|
|
768
|
+
set acceptZones(value) {
|
|
769
|
+
this._acceptZones.set(value);
|
|
770
|
+
}
|
|
771
|
+
get acceptZones() {
|
|
772
|
+
return this._acceptZones();
|
|
773
|
+
}
|
|
720
774
|
/**
|
|
721
775
|
* Represents the CSS styles applied to each Sortable item.
|
|
722
776
|
*/
|
|
723
|
-
itemStyle
|
|
777
|
+
set itemStyle(value) {
|
|
778
|
+
this._itemStyle.set(value);
|
|
779
|
+
}
|
|
780
|
+
get itemStyle() {
|
|
781
|
+
return this._itemStyle();
|
|
782
|
+
}
|
|
724
783
|
/**
|
|
725
784
|
* Defines the CSS styles applied to an empty item ([see example](https://www.telerik.com/kendo-angular-ui/components/sortable/templates)).
|
|
726
785
|
*/
|
|
727
|
-
emptyItemStyle
|
|
786
|
+
set emptyItemStyle(value) {
|
|
787
|
+
this._emptyItemStyle.set(value);
|
|
788
|
+
}
|
|
789
|
+
get emptyItemStyle() {
|
|
790
|
+
return this._emptyItemStyle();
|
|
791
|
+
}
|
|
728
792
|
/**
|
|
729
793
|
* Defines the CSS styles which are applied to the currently dragged item ([see example](https://www.telerik.com/kendo-angular-ui/components/sortable/templates)).
|
|
730
794
|
*/
|
|
731
|
-
activeItemStyle
|
|
795
|
+
set activeItemStyle(value) {
|
|
796
|
+
this._activeItemStyle.set(value);
|
|
797
|
+
}
|
|
798
|
+
get activeItemStyle() {
|
|
799
|
+
return this._activeItemStyle();
|
|
800
|
+
}
|
|
732
801
|
/**
|
|
733
802
|
* Defines the CSS styles which are applied to all disabled items.
|
|
734
803
|
*/
|
|
735
|
-
disabledItemStyle
|
|
804
|
+
set disabledItemStyle(value) {
|
|
805
|
+
this._disabledItemStyle.set(value);
|
|
806
|
+
}
|
|
807
|
+
get disabledItemStyle() {
|
|
808
|
+
return this._disabledItemStyle();
|
|
809
|
+
}
|
|
736
810
|
/**
|
|
737
811
|
* Defines the class which is applied to each Sortable item.
|
|
738
812
|
*/
|
|
739
|
-
itemClass
|
|
813
|
+
set itemClass(value) {
|
|
814
|
+
this._itemClass.set(value);
|
|
815
|
+
}
|
|
816
|
+
get itemClass() {
|
|
817
|
+
return this._itemClass();
|
|
818
|
+
}
|
|
740
819
|
/**
|
|
741
820
|
* Defines the class which is applied to the active Sortable item.
|
|
742
821
|
*/
|
|
743
|
-
activeItemClass
|
|
822
|
+
set activeItemClass(value) {
|
|
823
|
+
this._activeItemClass.set(value);
|
|
824
|
+
}
|
|
825
|
+
get activeItemClass() {
|
|
826
|
+
return this._activeItemClass();
|
|
827
|
+
}
|
|
744
828
|
/**
|
|
745
829
|
* Defines the class which is applied to the empty item when the Sortable has empty data.
|
|
746
830
|
*/
|
|
747
|
-
emptyItemClass
|
|
831
|
+
set emptyItemClass(value) {
|
|
832
|
+
this._emptyItemClass.set(value);
|
|
833
|
+
}
|
|
834
|
+
get emptyItemClass() {
|
|
835
|
+
return this._emptyItemClass();
|
|
836
|
+
}
|
|
748
837
|
/**
|
|
749
838
|
* Defines the class which is applied to each disabled Sortable item.
|
|
750
839
|
*/
|
|
751
|
-
disabledItemClass
|
|
840
|
+
set disabledItemClass(value) {
|
|
841
|
+
this._disabledItemClass.set(value);
|
|
842
|
+
}
|
|
843
|
+
get disabledItemClass() {
|
|
844
|
+
return this._disabledItemClass();
|
|
845
|
+
}
|
|
752
846
|
/**
|
|
753
847
|
* Sets the text message that will be displayed when the Sortable has no items.
|
|
754
848
|
*/
|
|
755
|
-
emptyText
|
|
849
|
+
set emptyText(value) {
|
|
850
|
+
this._emptyText.set(value);
|
|
851
|
+
}
|
|
852
|
+
get emptyText() {
|
|
853
|
+
return this._emptyText();
|
|
854
|
+
}
|
|
756
855
|
/**
|
|
757
856
|
* @hidden
|
|
758
857
|
*/
|
|
@@ -807,12 +906,17 @@ class SortableComponent {
|
|
|
807
906
|
* The index of the currently focused item.
|
|
808
907
|
* If no item is focused, set to `-1`.
|
|
809
908
|
*/
|
|
810
|
-
activeIndex
|
|
909
|
+
set activeIndex(value) {
|
|
910
|
+
this._activeIndex.set(value);
|
|
911
|
+
}
|
|
912
|
+
get activeIndex() {
|
|
913
|
+
return this._activeIndex();
|
|
914
|
+
}
|
|
811
915
|
get touchAction() {
|
|
812
916
|
return "none";
|
|
813
917
|
}
|
|
814
918
|
get dir() {
|
|
815
|
-
return this.
|
|
919
|
+
return this._direction();
|
|
816
920
|
}
|
|
817
921
|
hostRole = 'list';
|
|
818
922
|
/**
|
|
@@ -823,11 +927,21 @@ class SortableComponent {
|
|
|
823
927
|
/**
|
|
824
928
|
* The index of the currently dragged item.
|
|
825
929
|
*/
|
|
826
|
-
dragIndex
|
|
930
|
+
set dragIndex(value) {
|
|
931
|
+
this._dragIndex.set(value);
|
|
932
|
+
}
|
|
933
|
+
get dragIndex() {
|
|
934
|
+
return this._dragIndex();
|
|
935
|
+
}
|
|
827
936
|
/**
|
|
828
937
|
* The index of the item above which the dragged item is.
|
|
829
938
|
*/
|
|
830
|
-
dragOverIndex
|
|
939
|
+
set dragOverIndex(value) {
|
|
940
|
+
this._dragOverIndex.set(value);
|
|
941
|
+
}
|
|
942
|
+
get dragOverIndex() {
|
|
943
|
+
return this._dragOverIndex();
|
|
944
|
+
}
|
|
831
945
|
onDragStartSubject = new Subject();
|
|
832
946
|
onDragOverSubject = new Subject();
|
|
833
947
|
onDragLeaveSubject = new Subject();
|
|
@@ -839,16 +953,41 @@ class SortableComponent {
|
|
|
839
953
|
/**
|
|
840
954
|
* The location of the hint indicator when dragging on mobile devices.
|
|
841
955
|
*/
|
|
842
|
-
hintLocation
|
|
956
|
+
set hintLocation(value) {
|
|
957
|
+
this._hintLocation.set(value);
|
|
958
|
+
}
|
|
959
|
+
get hintLocation() {
|
|
960
|
+
return this._hintLocation();
|
|
961
|
+
}
|
|
843
962
|
id;
|
|
844
963
|
itemTemplateRef;
|
|
845
964
|
placeholderTemplateRef;
|
|
846
|
-
_data;
|
|
847
965
|
_localData = [];
|
|
848
966
|
/**
|
|
849
967
|
* @hidden
|
|
850
968
|
*/
|
|
851
969
|
ariaKeyShortcuts = KEY_SHORTCUTS;
|
|
970
|
+
_tabIndex = signal(null, ...(ngDevMode ? [{ debugName: "_tabIndex" }] : []));
|
|
971
|
+
_trackBy = signal((_, idx) => idx, ...(ngDevMode ? [{ debugName: "_trackBy" }] : []));
|
|
972
|
+
_data = signal(undefined, ...(ngDevMode ? [{ debugName: "_data" }] : []));
|
|
973
|
+
_navigable = signal(true, ...(ngDevMode ? [{ debugName: "_navigable" }] : []));
|
|
974
|
+
_animation = signal(false, ...(ngDevMode ? [{ debugName: "_animation" }] : []));
|
|
975
|
+
_disabledIndexes = signal([], ...(ngDevMode ? [{ debugName: "_disabledIndexes" }] : []));
|
|
976
|
+
_zone = signal(undefined, ...(ngDevMode ? [{ debugName: "_zone" }] : []));
|
|
977
|
+
_acceptZones = signal(undefined, ...(ngDevMode ? [{ debugName: "_acceptZones" }] : []));
|
|
978
|
+
_itemStyle = signal({}, ...(ngDevMode ? [{ debugName: "_itemStyle" }] : []));
|
|
979
|
+
_emptyItemStyle = signal(undefined, ...(ngDevMode ? [{ debugName: "_emptyItemStyle" }] : []));
|
|
980
|
+
_activeItemStyle = signal(undefined, ...(ngDevMode ? [{ debugName: "_activeItemStyle" }] : []));
|
|
981
|
+
_disabledItemStyle = signal(undefined, ...(ngDevMode ? [{ debugName: "_disabledItemStyle" }] : []));
|
|
982
|
+
_itemClass = signal("", ...(ngDevMode ? [{ debugName: "_itemClass" }] : []));
|
|
983
|
+
_activeItemClass = signal(null, ...(ngDevMode ? [{ debugName: "_activeItemClass" }] : []));
|
|
984
|
+
_emptyItemClass = signal(null, ...(ngDevMode ? [{ debugName: "_emptyItemClass" }] : []));
|
|
985
|
+
_disabledItemClass = signal(null, ...(ngDevMode ? [{ debugName: "_disabledItemClass" }] : []));
|
|
986
|
+
_emptyText = signal("Empty", ...(ngDevMode ? [{ debugName: "_emptyText" }] : []));
|
|
987
|
+
_activeIndex = signal(-1, ...(ngDevMode ? [{ debugName: "_activeIndex" }] : []));
|
|
988
|
+
_dragIndex = signal(-1, ...(ngDevMode ? [{ debugName: "_dragIndex" }] : []));
|
|
989
|
+
_dragOverIndex = signal(-1, ...(ngDevMode ? [{ debugName: "_dragOverIndex" }] : []));
|
|
990
|
+
_hintLocation = signal(null, ...(ngDevMode ? [{ debugName: "_hintLocation" }] : []));
|
|
852
991
|
localizationChangeSubscription;
|
|
853
992
|
dragStartSubscription;
|
|
854
993
|
dragOverSubscription;
|
|
@@ -859,9 +998,9 @@ class SortableComponent {
|
|
|
859
998
|
animationDuration = 300;
|
|
860
999
|
afterKeyPress = false;
|
|
861
1000
|
sortableService = null;
|
|
862
|
-
_hideActiveItem = false;
|
|
1001
|
+
_hideActiveItem = signal(false, ...(ngDevMode ? [{ debugName: "_hideActiveItem" }] : []));
|
|
863
1002
|
prevActiveIndex = 0;
|
|
864
|
-
|
|
1003
|
+
_direction = signal('ltr', ...(ngDevMode ? [{ debugName: "_direction" }] : []));
|
|
865
1004
|
_animating;
|
|
866
1005
|
draggable;
|
|
867
1006
|
offsetParent;
|
|
@@ -883,15 +1022,19 @@ class SortableComponent {
|
|
|
883
1022
|
}
|
|
884
1023
|
return template;
|
|
885
1024
|
}
|
|
886
|
-
|
|
1025
|
+
/**
|
|
1026
|
+
* @hidden
|
|
1027
|
+
*/
|
|
1028
|
+
hintVisible = computed(() => this._dragIndex() >= 0 && this._hintLocation() !== null && this === this.sortableService.source$(), ...(ngDevMode ? [{ debugName: "hintVisible" }] : []));
|
|
1029
|
+
constructor(ngZone, renderer, cdr, localization, wrapper, sortableService, injector) {
|
|
887
1030
|
this.ngZone = ngZone;
|
|
888
1031
|
this.renderer = renderer;
|
|
889
|
-
this.changeDetector = changeDetector;
|
|
890
|
-
this.localization = localization;
|
|
891
1032
|
this.cdr = cdr;
|
|
1033
|
+
this.localization = localization;
|
|
1034
|
+
this.injector = injector;
|
|
892
1035
|
validatePackage(packageMetadata);
|
|
893
1036
|
this.wrapper = wrapper.nativeElement;
|
|
894
|
-
this.
|
|
1037
|
+
this._direction.set(localization.rtl ? 'rtl' : 'ltr');
|
|
895
1038
|
this.sortableService = sortableService;
|
|
896
1039
|
this.subscribeEvents();
|
|
897
1040
|
}
|
|
@@ -931,11 +1074,6 @@ class SortableComponent {
|
|
|
931
1074
|
}
|
|
932
1075
|
});
|
|
933
1076
|
}
|
|
934
|
-
ngOnChanges(changes) {
|
|
935
|
-
if (this.data && isChanged('disabledIndexes', changes, false)) {
|
|
936
|
-
this.cacheData();
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
1077
|
ngOnDestroy() {
|
|
940
1078
|
this.unsubscribeEvents();
|
|
941
1079
|
this.sortableService.unregisterComponent(this.id);
|
|
@@ -990,7 +1128,7 @@ class SortableComponent {
|
|
|
990
1128
|
*/
|
|
991
1129
|
cacheData() {
|
|
992
1130
|
this._localData = [];
|
|
993
|
-
this.
|
|
1131
|
+
this.data.forEach((item, index) => {
|
|
994
1132
|
this._localData.push({ item: item, active: false, disabled: !this.itemEnabled(index), index: index, hidden: false });
|
|
995
1133
|
});
|
|
996
1134
|
}
|
|
@@ -1045,12 +1183,6 @@ class SortableComponent {
|
|
|
1045
1183
|
this.onDragEndSubject.next(endEvent);
|
|
1046
1184
|
return endEvent.isDefaultPrevented();
|
|
1047
1185
|
}
|
|
1048
|
-
/**
|
|
1049
|
-
* @hidden
|
|
1050
|
-
*/
|
|
1051
|
-
hintVisible() {
|
|
1052
|
-
return this.dragIndex >= 0 && this.hintLocation && this === this.sortableService.getSource();
|
|
1053
|
-
}
|
|
1054
1186
|
/**
|
|
1055
1187
|
* @hidden
|
|
1056
1188
|
*/
|
|
@@ -1144,7 +1276,7 @@ class SortableComponent {
|
|
|
1144
1276
|
* @hidden
|
|
1145
1277
|
*/
|
|
1146
1278
|
onArrowHandler(event, keyCode) {
|
|
1147
|
-
const leftKey = this.
|
|
1279
|
+
const leftKey = this._direction() === 'rtl' ? Keys.ArrowRight : Keys.ArrowLeft;
|
|
1148
1280
|
const dir = keyCode === Keys.ArrowUp || keyCode === leftKey ? -1 : 1;
|
|
1149
1281
|
const limit = this.data.length - 1;
|
|
1150
1282
|
let targetIndex = this.activeIndex + dir;
|
|
@@ -1198,7 +1330,6 @@ class SortableComponent {
|
|
|
1198
1330
|
if (!this.navigable) {
|
|
1199
1331
|
return;
|
|
1200
1332
|
}
|
|
1201
|
-
this.cdr.markForCheck();
|
|
1202
1333
|
const targetIsWrapper = this.itemWrappers.toArray().some((item) => item.nativeElement === event.target);
|
|
1203
1334
|
const index = this.activeIndex === -1 ? this.prevActiveIndex : this.activeIndex;
|
|
1204
1335
|
const item = this.itemWrappers.toArray()[index]?.nativeElement;
|
|
@@ -1250,11 +1381,11 @@ class SortableComponent {
|
|
|
1250
1381
|
* If the currently dragged item is visible, returns `false`.
|
|
1251
1382
|
*/
|
|
1252
1383
|
get hideActiveItem() {
|
|
1253
|
-
return this._hideActiveItem;
|
|
1384
|
+
return this._hideActiveItem();
|
|
1254
1385
|
}
|
|
1255
1386
|
set hideActiveItem(value) {
|
|
1256
1387
|
this.activeIndex = -1;
|
|
1257
|
-
this._hideActiveItem
|
|
1388
|
+
this._hideActiveItem.set(value);
|
|
1258
1389
|
}
|
|
1259
1390
|
/**
|
|
1260
1391
|
* Clears the active item.
|
|
@@ -1299,12 +1430,12 @@ class SortableComponent {
|
|
|
1299
1430
|
}
|
|
1300
1431
|
this.dragIndex = index;
|
|
1301
1432
|
this.dragOverIndex = index;
|
|
1302
|
-
|
|
1433
|
+
afterNextRender(() => {
|
|
1303
1434
|
this.sortableService.target = this;
|
|
1304
1435
|
this.sortableService.setSource(this);
|
|
1305
1436
|
this.sortableService.activeDraggable = this.draggables.toArray()[index];
|
|
1306
1437
|
this.sortableService.lastDraggable = null;
|
|
1307
|
-
});
|
|
1438
|
+
}, { injector: this.injector });
|
|
1308
1439
|
}
|
|
1309
1440
|
/**
|
|
1310
1441
|
* Moves a data item from one index to another in the Sortable component.
|
|
@@ -1352,10 +1483,10 @@ class SortableComponent {
|
|
|
1352
1483
|
this.animate(toAnimate);
|
|
1353
1484
|
});
|
|
1354
1485
|
}
|
|
1355
|
-
|
|
1486
|
+
afterNextRender(() => {
|
|
1356
1487
|
this.sortableService.activeDraggable = this.draggables.toArray()[dragIndex];
|
|
1357
1488
|
this.sortableService.lastDraggable = null;
|
|
1358
|
-
});
|
|
1489
|
+
}, { injector: this.injector });
|
|
1359
1490
|
}
|
|
1360
1491
|
/**
|
|
1361
1492
|
* @hidden
|
|
@@ -1421,7 +1552,9 @@ class SortableComponent {
|
|
|
1421
1552
|
* @hidden
|
|
1422
1553
|
*/
|
|
1423
1554
|
markForCheck() {
|
|
1424
|
-
|
|
1555
|
+
// Retained markForCheck: called by SortableService from native Draggable library callbacks
|
|
1556
|
+
// to trigger CD after _localData mutations and drag state changes
|
|
1557
|
+
this.cdr.markForCheck();
|
|
1425
1558
|
}
|
|
1426
1559
|
/**
|
|
1427
1560
|
* @hidden
|
|
@@ -1450,7 +1583,7 @@ class SortableComponent {
|
|
|
1450
1583
|
subscribeEvents() {
|
|
1451
1584
|
this.localizationChangeSubscription = this.localization
|
|
1452
1585
|
.changes
|
|
1453
|
-
.subscribe(({ rtl }) => this.
|
|
1586
|
+
.subscribe(({ rtl }) => this._direction.set(rtl ? 'rtl' : 'ltr'));
|
|
1454
1587
|
this.dragStartSubscription = this.onDragStartSubject
|
|
1455
1588
|
.subscribe((event) => {
|
|
1456
1589
|
if (!event.target) {
|
|
@@ -1527,6 +1660,7 @@ class SortableComponent {
|
|
|
1527
1660
|
target.dragIndex = -1;
|
|
1528
1661
|
target.dragOverIndex = -1;
|
|
1529
1662
|
}
|
|
1663
|
+
// Retained setTimeout: deferred cleanup allows event propagation to complete before resetting service state
|
|
1530
1664
|
setTimeout(() => {
|
|
1531
1665
|
this.sortableService.activeDraggable = null;
|
|
1532
1666
|
this.sortableService.lastDraggable = null;
|
|
@@ -1596,8 +1730,8 @@ class SortableComponent {
|
|
|
1596
1730
|
}
|
|
1597
1731
|
}
|
|
1598
1732
|
}
|
|
1599
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1600
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1733
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SortableComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }, { token: i0.ElementRef }, { token: SortableService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1734
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SortableComponent, isStandalone: true, selector: "kendo-sortable", inputs: { tabIndex: "tabIndex", trackBy: "trackBy", data: "data", navigable: "navigable", 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", "attr.role": "this.hostRole" } }, providers: [
|
|
1601
1735
|
LocalizationService,
|
|
1602
1736
|
{
|
|
1603
1737
|
provide: L10N_PREFIX,
|
|
@@ -1611,7 +1745,7 @@ class SortableComponent {
|
|
|
1611
1745
|
provide: KENDO_WEBMCP_HOST,
|
|
1612
1746
|
useExisting: forwardRef(() => SortableComponent)
|
|
1613
1747
|
}
|
|
1614
|
-
], 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"],
|
|
1748
|
+
], 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"], ngImport: i0, template: `
|
|
1615
1749
|
@for (item of _localData; track trackBy(i, item); let i = $index) {
|
|
1616
1750
|
<div #itemWrapper
|
|
1617
1751
|
kendoDraggable
|
|
@@ -1638,14 +1772,13 @@ class SortableComponent {
|
|
|
1638
1772
|
[ngTemplateOutlet]="itemTemplate(i)"
|
|
1639
1773
|
[ngTemplateOutletContext]="item">
|
|
1640
1774
|
</ng-container>
|
|
1641
|
-
}
|
|
1642
|
-
@if (!itemTemplateRef) {
|
|
1775
|
+
} @else {
|
|
1643
1776
|
{{item.item}}
|
|
1644
1777
|
}
|
|
1645
1778
|
</div>
|
|
1646
1779
|
}
|
|
1647
1780
|
|
|
1648
|
-
@if (!
|
|
1781
|
+
@if (!data.length || _localData.length === 1 && _localData[0].hidden) {
|
|
1649
1782
|
<ng-container #noDataRef>
|
|
1650
1783
|
<div
|
|
1651
1784
|
kendoDraggable
|
|
@@ -1665,18 +1798,18 @@ class SortableComponent {
|
|
|
1665
1798
|
[ngTemplateOutlet]="itemTemplateRef"
|
|
1666
1799
|
[ngTemplateOutletContext]="{item: _localData[dragIndex].item}">
|
|
1667
1800
|
</ng-container>
|
|
1668
|
-
}
|
|
1669
|
-
@if (!itemTemplateRef) {
|
|
1801
|
+
} @else {
|
|
1670
1802
|
{{_localData[dragIndex].item}}
|
|
1671
1803
|
}
|
|
1672
1804
|
</div>
|
|
1673
1805
|
}
|
|
1674
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["index", "disabled", "hidden"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }] });
|
|
1806
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["index", "disabled", "hidden"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1675
1807
|
}
|
|
1676
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1808
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SortableComponent, decorators: [{
|
|
1677
1809
|
type: Component,
|
|
1678
1810
|
args: [{
|
|
1679
1811
|
exportAs: 'kendoSortable',
|
|
1812
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1680
1813
|
providers: [
|
|
1681
1814
|
LocalizationService,
|
|
1682
1815
|
{
|
|
@@ -1720,14 +1853,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1720
1853
|
[ngTemplateOutlet]="itemTemplate(i)"
|
|
1721
1854
|
[ngTemplateOutletContext]="item">
|
|
1722
1855
|
</ng-container>
|
|
1723
|
-
}
|
|
1724
|
-
@if (!itemTemplateRef) {
|
|
1856
|
+
} @else {
|
|
1725
1857
|
{{item.item}}
|
|
1726
1858
|
}
|
|
1727
1859
|
</div>
|
|
1728
1860
|
}
|
|
1729
1861
|
|
|
1730
|
-
@if (!
|
|
1862
|
+
@if (!data.length || _localData.length === 1 && _localData[0].hidden) {
|
|
1731
1863
|
<ng-container #noDataRef>
|
|
1732
1864
|
<div
|
|
1733
1865
|
kendoDraggable
|
|
@@ -1747,8 +1879,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1747
1879
|
[ngTemplateOutlet]="itemTemplateRef"
|
|
1748
1880
|
[ngTemplateOutletContext]="{item: _localData[dragIndex].item}">
|
|
1749
1881
|
</ng-container>
|
|
1750
|
-
}
|
|
1751
|
-
@if (!itemTemplateRef) {
|
|
1882
|
+
} @else {
|
|
1752
1883
|
{{_localData[dragIndex].item}}
|
|
1753
1884
|
}
|
|
1754
1885
|
</div>
|
|
@@ -1757,7 +1888,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1757
1888
|
standalone: true,
|
|
1758
1889
|
imports: [DraggableDirective, NgClass, NgStyle, NgTemplateOutlet, EventsOutsideAngularDirective]
|
|
1759
1890
|
}]
|
|
1760
|
-
}], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i1.LocalizationService }, { type: i0.ElementRef }, { type: SortableService }, { type: i0.
|
|
1891
|
+
}], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i1.LocalizationService }, { type: i0.ElementRef }, { type: SortableService }, { type: i0.Injector }], propDecorators: { tabIndex: [{
|
|
1761
1892
|
type: Input
|
|
1762
1893
|
}], trackBy: [{
|
|
1763
1894
|
type: Input
|
|
@@ -2162,10 +2293,10 @@ class SortableBindingDirective {
|
|
|
2162
2293
|
this.removeHiddenSubscription.unsubscribe();
|
|
2163
2294
|
}
|
|
2164
2295
|
}
|
|
2165
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2166
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2296
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SortableBindingDirective, deps: [{ token: SortableComponent }, { token: SortableService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2297
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: SortableBindingDirective, isStandalone: true, selector: "[kendoSortableBinding]", inputs: { data: ["kendoSortableBinding", "data"] }, ngImport: i0 });
|
|
2167
2298
|
}
|
|
2168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2299
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SortableBindingDirective, decorators: [{
|
|
2169
2300
|
type: Directive,
|
|
2170
2301
|
args: [{
|
|
2171
2302
|
selector: '[kendoSortableBinding]',
|
|
@@ -2227,11 +2358,11 @@ const KENDO_SORTABLE = [
|
|
|
2227
2358
|
* ```
|
|
2228
2359
|
*/
|
|
2229
2360
|
class SortableModule {
|
|
2230
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2231
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2232
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2361
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SortableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2362
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: SortableModule, imports: [SortableComponent, DraggableDirective, PlaceholderTemplateDirective, ItemTemplateDirective, SortableBindingDirective], exports: [SortableComponent, DraggableDirective, PlaceholderTemplateDirective, ItemTemplateDirective, SortableBindingDirective] });
|
|
2363
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SortableModule, providers: [SortableService] });
|
|
2233
2364
|
}
|
|
2234
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2365
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SortableModule, decorators: [{
|
|
2235
2366
|
type: NgModule,
|
|
2236
2367
|
args: [{
|
|
2237
2368
|
imports: [...KENDO_SORTABLE],
|