@sebgroup/green-angular 3.6.3 → 3.7.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/esm2020/lib/context-menu/context-menu.component.mjs +4 -4
- package/esm2020/lib/context-menu/context-menu.module.mjs +2 -2
- package/esm2020/lib/datepicker/datepicker.component.mjs +4 -4
- package/esm2020/lib/datepicker/datepicker.module.mjs +5 -6
- package/esm2020/lib/dropdown/dropdown.component.mjs +4 -4
- package/esm2020/lib/dropdown/dropdown.module.mjs +2 -2
- package/esm2020/lib/shared/index.mjs +2 -1
- package/esm2020/src/lib/accordion/accordion-list-item.component.mjs +47 -0
- package/esm2020/src/lib/accordion/accordion.component.mjs +72 -0
- package/esm2020/src/lib/accordion/accordion.module.mjs +19 -0
- package/esm2020/src/lib/accordion/index.mjs +4 -0
- package/esm2020/src/lib/accordion/sebgroup-green-angular-src-lib-accordion.mjs +5 -0
- package/esm2020/src/lib/badge/badge.component.mjs +80 -0
- package/esm2020/src/lib/badge/badge.module.mjs +18 -0
- package/esm2020/src/lib/badge/index.mjs +3 -0
- package/esm2020/src/lib/badge/sebgroup-green-angular-src-lib-badge.mjs +5 -0
- package/esm2020/src/lib/button/button.component.mjs +28 -0
- package/esm2020/src/lib/button/button.module.mjs +18 -0
- package/esm2020/src/lib/button/index.mjs +3 -0
- package/esm2020/src/lib/button/sebgroup-green-angular-src-lib-button.mjs +5 -0
- package/esm2020/src/lib/cell-table/cell-table-item.component.mjs +91 -0
- package/esm2020/src/lib/cell-table/cell-table.component.mjs +97 -0
- package/esm2020/src/lib/cell-table/cell-table.module.mjs +26 -0
- package/esm2020/src/lib/cell-table/cell-table.types.mjs +7 -0
- package/esm2020/src/lib/cell-table/cell-underline.directive.mjs +55 -0
- package/esm2020/src/lib/cell-table/index.mjs +4 -0
- package/esm2020/src/lib/cell-table/sebgroup-green-angular-src-lib-cell-table.mjs +5 -0
- package/esm2020/src/lib/context-menu/context-menu.component.mjs +80 -0
- package/esm2020/src/lib/context-menu/context-menu.module.mjs +20 -0
- package/esm2020/src/lib/context-menu/index.mjs +3 -0
- package/esm2020/src/lib/context-menu/sebgroup-green-angular-src-lib-context-menu.mjs +5 -0
- package/esm2020/src/lib/datepicker/datepicker.component.mjs +138 -0
- package/esm2020/src/lib/datepicker/datepicker.module.mjs +20 -0
- package/esm2020/src/lib/datepicker/index.mjs +3 -0
- package/esm2020/src/lib/datepicker/sebgroup-green-angular-src-lib-datepicker.mjs +5 -0
- package/esm2020/src/lib/dropdown/dropdown-button.directive.mjs +16 -0
- package/esm2020/src/lib/dropdown/dropdown-option.directive.mjs +16 -0
- package/esm2020/src/lib/dropdown/dropdown.component.mjs +212 -0
- package/esm2020/src/lib/dropdown/dropdown.module.mjs +34 -0
- package/esm2020/src/lib/dropdown/index.mjs +5 -0
- package/esm2020/src/lib/dropdown/sebgroup-green-angular-src-lib-dropdown.mjs +5 -0
- package/esm2020/src/lib/in-page-wizard/in-page-wizard-step-card.component.mjs +50 -0
- package/esm2020/src/lib/in-page-wizard/in-page-wizard.module.mjs +18 -0
- package/esm2020/src/lib/in-page-wizard/index.mjs +3 -0
- package/esm2020/src/lib/in-page-wizard/sebgroup-green-angular-src-lib-in-page-wizard.mjs +5 -0
- package/esm2020/src/lib/modal/index.mjs +5 -0
- package/esm2020/src/lib/modal/modal-footer.directive.mjs +16 -0
- package/esm2020/src/lib/modal/modal-header.directive.mjs +16 -0
- package/esm2020/src/lib/modal/modal.component.mjs +251 -0
- package/esm2020/src/lib/modal/modal.module.mjs +41 -0
- package/esm2020/src/lib/modal/sebgroup-green-angular-src-lib-modal.mjs +5 -0
- package/esm2020/src/lib/pagination/index.mjs +3 -0
- package/esm2020/src/lib/pagination/pagination.component.mjs +175 -0
- package/esm2020/src/lib/pagination/pagination.module.mjs +18 -0
- package/esm2020/src/lib/pagination/sebgroup-green-angular-src-lib-pagination.mjs +5 -0
- package/esm2020/src/lib/progress-circle/index.mjs +3 -0
- package/esm2020/src/lib/progress-circle/progress-circle.component.mjs +41 -0
- package/esm2020/src/lib/progress-circle/progress-circle.module.mjs +18 -0
- package/esm2020/src/lib/progress-circle/sebgroup-green-angular-src-lib-progress-circle.mjs +5 -0
- package/esm2020/src/lib/segmented-control/index.mjs +3 -0
- package/esm2020/src/lib/segmented-control/sebgroup-green-angular-src-lib-segmented-control.mjs +5 -0
- package/esm2020/src/lib/segmented-control/segmented-control.component.mjs +35 -0
- package/esm2020/src/lib/segmented-control/segmented-control.module.mjs +19 -0
- package/esm2020/src/lib/shared/core-element/core-element.directive.mjs +33 -0
- package/esm2020/src/lib/shared/core-element/core-element.module.mjs +18 -0
- package/esm2020/src/lib/shared/core-element/index.mjs +3 -0
- package/esm2020/src/lib/shared/index.mjs +4 -0
- package/esm2020/src/lib/shared/on-scroll.directive.mjs +47 -0
- package/esm2020/src/lib/shared/sebgroup-green-angular-src-lib-shared.mjs +5 -0
- package/esm2020/src/lib/shared/shared.module.mjs +18 -0
- package/esm2020/src/lib/slider/index.mjs +3 -0
- package/esm2020/src/lib/slider/sebgroup-green-angular-src-lib-slider.mjs +5 -0
- package/esm2020/src/lib/slider/slider.component.mjs +113 -0
- package/esm2020/src/lib/slider/slider.module.mjs +19 -0
- package/esm2020/src/lib/sortable-list/index.mjs +3 -0
- package/esm2020/src/lib/sortable-list/sebgroup-green-angular-src-lib-sortable-list.mjs +5 -0
- package/esm2020/src/lib/sortable-list/sortable-list.component.mjs +181 -0
- package/esm2020/src/lib/sortable-list/sortable-list.module.mjs +20 -0
- package/fesm2015/sebgroup-green-angular-src-lib-accordion.mjs +140 -0
- package/fesm2015/sebgroup-green-angular-src-lib-accordion.mjs.map +1 -0
- package/fesm2015/sebgroup-green-angular-src-lib-badge.mjs +102 -0
- package/fesm2015/sebgroup-green-angular-src-lib-badge.mjs.map +1 -0
- package/fesm2015/sebgroup-green-angular-src-lib-button.mjs +50 -0
- package/fesm2015/sebgroup-green-angular-src-lib-button.mjs.map +1 -0
- package/fesm2015/sebgroup-green-angular-src-lib-cell-table.mjs +272 -0
- package/fesm2015/sebgroup-green-angular-src-lib-cell-table.mjs.map +1 -0
- package/fesm2015/sebgroup-green-angular-src-lib-context-menu.mjs +104 -0
- package/fesm2015/sebgroup-green-angular-src-lib-context-menu.mjs.map +1 -0
- package/fesm2015/sebgroup-green-angular-src-lib-datepicker.mjs +166 -0
- package/fesm2015/sebgroup-green-angular-src-lib-datepicker.mjs.map +1 -0
- package/fesm2015/sebgroup-green-angular-src-lib-dropdown.mjs +266 -0
- package/fesm2015/sebgroup-green-angular-src-lib-dropdown.mjs.map +1 -0
- package/fesm2015/sebgroup-green-angular-src-lib-in-page-wizard.mjs +72 -0
- package/fesm2015/sebgroup-green-angular-src-lib-in-page-wizard.mjs.map +1 -0
- package/fesm2015/sebgroup-green-angular-src-lib-modal.mjs +321 -0
- package/fesm2015/sebgroup-green-angular-src-lib-modal.mjs.map +1 -0
- package/fesm2015/sebgroup-green-angular-src-lib-pagination.mjs +197 -0
- package/fesm2015/sebgroup-green-angular-src-lib-pagination.mjs.map +1 -0
- package/fesm2015/sebgroup-green-angular-src-lib-progress-circle.mjs +63 -0
- package/fesm2015/sebgroup-green-angular-src-lib-progress-circle.mjs.map +1 -0
- package/fesm2015/sebgroup-green-angular-src-lib-segmented-control.mjs +58 -0
- package/fesm2015/sebgroup-green-angular-src-lib-segmented-control.mjs.map +1 -0
- package/fesm2015/sebgroup-green-angular-src-lib-shared.mjs +114 -0
- package/fesm2015/sebgroup-green-angular-src-lib-shared.mjs.map +1 -0
- package/fesm2015/sebgroup-green-angular-src-lib-slider.mjs +136 -0
- package/fesm2015/sebgroup-green-angular-src-lib-slider.mjs.map +1 -0
- package/fesm2015/sebgroup-green-angular-src-lib-sortable-list.mjs +204 -0
- package/fesm2015/sebgroup-green-angular-src-lib-sortable-list.mjs.map +1 -0
- package/fesm2015/sebgroup-green-angular.mjs +81 -77
- package/fesm2015/sebgroup-green-angular.mjs.map +1 -1
- package/fesm2020/sebgroup-green-angular-src-lib-accordion.mjs +138 -0
- package/fesm2020/sebgroup-green-angular-src-lib-accordion.mjs.map +1 -0
- package/fesm2020/sebgroup-green-angular-src-lib-badge.mjs +102 -0
- package/fesm2020/sebgroup-green-angular-src-lib-badge.mjs.map +1 -0
- package/fesm2020/sebgroup-green-angular-src-lib-button.mjs +50 -0
- package/fesm2020/sebgroup-green-angular-src-lib-button.mjs.map +1 -0
- package/fesm2020/sebgroup-green-angular-src-lib-cell-table.mjs +270 -0
- package/fesm2020/sebgroup-green-angular-src-lib-cell-table.mjs.map +1 -0
- package/fesm2020/sebgroup-green-angular-src-lib-context-menu.mjs +104 -0
- package/fesm2020/sebgroup-green-angular-src-lib-context-menu.mjs.map +1 -0
- package/fesm2020/sebgroup-green-angular-src-lib-datepicker.mjs +162 -0
- package/fesm2020/sebgroup-green-angular-src-lib-datepicker.mjs.map +1 -0
- package/fesm2020/sebgroup-green-angular-src-lib-dropdown.mjs +274 -0
- package/fesm2020/sebgroup-green-angular-src-lib-dropdown.mjs.map +1 -0
- package/fesm2020/sebgroup-green-angular-src-lib-in-page-wizard.mjs +72 -0
- package/fesm2020/sebgroup-green-angular-src-lib-in-page-wizard.mjs.map +1 -0
- package/fesm2020/sebgroup-green-angular-src-lib-modal.mjs +319 -0
- package/fesm2020/sebgroup-green-angular-src-lib-modal.mjs.map +1 -0
- package/fesm2020/sebgroup-green-angular-src-lib-pagination.mjs +197 -0
- package/fesm2020/sebgroup-green-angular-src-lib-pagination.mjs.map +1 -0
- package/fesm2020/sebgroup-green-angular-src-lib-progress-circle.mjs +63 -0
- package/fesm2020/sebgroup-green-angular-src-lib-progress-circle.mjs.map +1 -0
- package/fesm2020/sebgroup-green-angular-src-lib-segmented-control.mjs +58 -0
- package/fesm2020/sebgroup-green-angular-src-lib-segmented-control.mjs.map +1 -0
- package/fesm2020/sebgroup-green-angular-src-lib-shared.mjs +113 -0
- package/fesm2020/sebgroup-green-angular-src-lib-shared.mjs.map +1 -0
- package/fesm2020/sebgroup-green-angular-src-lib-slider.mjs +135 -0
- package/fesm2020/sebgroup-green-angular-src-lib-slider.mjs.map +1 -0
- package/fesm2020/sebgroup-green-angular-src-lib-sortable-list.mjs +204 -0
- package/fesm2020/sebgroup-green-angular-src-lib-sortable-list.mjs.map +1 -0
- package/fesm2020/sebgroup-green-angular.mjs +81 -77
- package/fesm2020/sebgroup-green-angular.mjs.map +1 -1
- package/lib/context-menu/context-menu.component.d.ts +1 -1
- package/lib/context-menu/context-menu.module.d.ts +1 -1
- package/lib/datepicker/datepicker.module.d.ts +2 -3
- package/lib/dropdown/dropdown.module.d.ts +1 -1
- package/lib/shared/index.d.ts +1 -0
- package/package.json +122 -2
- package/src/lib/accordion/accordion-list-item.component.d.ts +15 -0
- package/src/lib/accordion/accordion.component.d.ts +16 -0
- package/src/lib/accordion/accordion.module.d.ts +9 -0
- package/src/lib/accordion/index.d.ts +3 -0
- package/src/lib/badge/badge.component.d.ts +25 -0
- package/src/lib/badge/badge.module.d.ts +8 -0
- package/src/lib/badge/index.d.ts +2 -0
- package/src/lib/button/button.component.d.ts +9 -0
- package/src/lib/button/button.module.d.ts +8 -0
- package/src/lib/button/index.d.ts +2 -0
- package/src/lib/cell-table/cell-table-item.component.d.ts +14 -0
- package/src/lib/cell-table/cell-table.component.d.ts +44 -0
- package/src/lib/cell-table/cell-table.module.d.ts +10 -0
- package/src/lib/cell-table/cell-table.types.d.ts +34 -0
- package/src/lib/cell-table/cell-underline.directive.d.ts +14 -0
- package/src/lib/cell-table/index.d.ts +3 -0
- package/src/lib/context-menu/context-menu.component.d.ts +49 -0
- package/src/lib/context-menu/context-menu.module.d.ts +9 -0
- package/src/lib/context-menu/index.d.ts +2 -0
- package/src/lib/datepicker/datepicker.component.d.ts +66 -0
- package/src/lib/datepicker/datepicker.module.d.ts +9 -0
- package/src/lib/datepicker/index.d.ts +2 -0
- package/src/lib/dropdown/dropdown-button.directive.d.ts +8 -0
- package/src/lib/dropdown/dropdown-option.directive.d.ts +8 -0
- package/src/lib/dropdown/dropdown.component.d.ts +79 -0
- package/src/lib/dropdown/dropdown.module.d.ts +11 -0
- package/src/lib/dropdown/index.d.ts +4 -0
- package/src/lib/in-page-wizard/in-page-wizard-step-card.component.d.ts +17 -0
- package/src/lib/in-page-wizard/in-page-wizard.module.d.ts +8 -0
- package/src/lib/in-page-wizard/index.d.ts +2 -0
- package/src/lib/modal/index.d.ts +4 -0
- package/src/lib/modal/modal-footer.directive.d.ts +8 -0
- package/src/lib/modal/modal-header.directive.d.ts +8 -0
- package/src/lib/modal/modal.component.d.ts +65 -0
- package/src/lib/modal/modal.module.d.ts +11 -0
- package/src/lib/pagination/index.d.ts +2 -0
- package/src/lib/pagination/pagination.component.d.ts +42 -0
- package/src/lib/pagination/pagination.module.d.ts +8 -0
- package/src/lib/progress-circle/index.d.ts +2 -0
- package/src/lib/progress-circle/progress-circle.component.d.ts +14 -0
- package/src/lib/progress-circle/progress-circle.module.d.ts +8 -0
- package/src/lib/segmented-control/index.d.ts +2 -0
- package/src/lib/segmented-control/segmented-control.component.d.ts +11 -0
- package/src/lib/segmented-control/segmented-control.module.d.ts +9 -0
- package/src/lib/shared/core-element/core-element.directive.d.ts +13 -0
- package/src/lib/shared/core-element/core-element.module.d.ts +8 -0
- package/src/lib/shared/core-element/index.d.ts +2 -0
- package/src/lib/shared/index.d.ts +3 -0
- package/src/lib/shared/on-scroll.directive.d.ts +14 -0
- package/src/lib/shared/shared.module.d.ts +8 -0
- package/src/lib/slider/index.d.ts +2 -0
- package/src/lib/slider/slider.component.d.ts +38 -0
- package/src/lib/slider/slider.module.d.ts +9 -0
- package/src/lib/sortable-list/index.d.ts +2 -0
- package/src/lib/sortable-list/sortable-list.component.d.ts +91 -0
- package/src/lib/sortable-list/sortable-list.module.d.ts +10 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, Input, Output, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/cdk/drag-drop';
|
|
4
|
+
import { moveItemInArray, transferArrayItem, DragDropModule } from '@angular/cdk/drag-drop';
|
|
5
|
+
import * as i1 from '@angular/common';
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
import { FormsModule } from '@angular/forms';
|
|
8
|
+
|
|
9
|
+
class NggSortableListComponent {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.groups = [];
|
|
12
|
+
this.shouldDisplayCheckboxes = false;
|
|
13
|
+
this.isReadOnly = false;
|
|
14
|
+
this.isDraggable = true;
|
|
15
|
+
this.description = '';
|
|
16
|
+
this.suffixTemplate = null;
|
|
17
|
+
this.itemSelectionChanged = new EventEmitter();
|
|
18
|
+
this.itemOrderChanged = new EventEmitter();
|
|
19
|
+
this.focusedIndex = { 0: 0 };
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Toggles the selection of a checklist item and updates its position in the list.
|
|
23
|
+
*
|
|
24
|
+
* @param item - The checklist item to update.
|
|
25
|
+
*/
|
|
26
|
+
toggleSelection(item) {
|
|
27
|
+
item.selected = !item.selected;
|
|
28
|
+
this.emitCheckListItem(item);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Handles the onDragDrop event.
|
|
32
|
+
*
|
|
33
|
+
* @param event - The drag and drop event.
|
|
34
|
+
*/
|
|
35
|
+
onDragDrop(event) {
|
|
36
|
+
if (event.previousContainer === event.container) {
|
|
37
|
+
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
transferArrayItem(event.previousContainer.data, event.container.data, event.previousIndex, event.currentIndex);
|
|
41
|
+
}
|
|
42
|
+
this.emitItemOrderChanged([Number(event.previousContainer.id), event.previousIndex], [Number(event.container.id), event.currentIndex]);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Handles moving items up or down using the alt + arrow up or alt + arrow down keys.
|
|
46
|
+
*
|
|
47
|
+
* @param groupIndex - The index of the group.
|
|
48
|
+
* @param currentItemIndex - The current index of the item.
|
|
49
|
+
* @param newItemIndex - The new index of the item.
|
|
50
|
+
*/
|
|
51
|
+
onAltArrowKeydown(groupIndex, currentItemIndex, newItemIndex, event) {
|
|
52
|
+
event.preventDefault();
|
|
53
|
+
let newIndex = newItemIndex;
|
|
54
|
+
let newGroupIndex = groupIndex;
|
|
55
|
+
let transfer = false;
|
|
56
|
+
if (newIndex > this.groups[groupIndex].items.length - 1) {
|
|
57
|
+
newIndex = 0;
|
|
58
|
+
newGroupIndex = groupIndex + 1;
|
|
59
|
+
transfer = true;
|
|
60
|
+
this.focusedIndex[groupIndex] = this.groups[groupIndex].items.length - 2;
|
|
61
|
+
}
|
|
62
|
+
else if (newIndex < 0) {
|
|
63
|
+
newGroupIndex = groupIndex - 1;
|
|
64
|
+
newIndex = this.groups[newGroupIndex].items.length;
|
|
65
|
+
transfer = true;
|
|
66
|
+
this.focusedIndex[groupIndex] = 0;
|
|
67
|
+
}
|
|
68
|
+
if (transfer) {
|
|
69
|
+
transferArrayItem(this.groups[groupIndex].items, this.groups[newGroupIndex].items, currentItemIndex, newIndex);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
moveItemInArray(this.groups[groupIndex].items, currentItemIndex, newIndex);
|
|
73
|
+
}
|
|
74
|
+
this.emitItemOrderChanged([groupIndex, currentItemIndex], [newGroupIndex, newIndex]);
|
|
75
|
+
setTimeout(() => {
|
|
76
|
+
this.focusItem(newGroupIndex, newIndex);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Handles focus by arrow keydown event.
|
|
81
|
+
*
|
|
82
|
+
* @param groupIndex - The index of the group.
|
|
83
|
+
* @param itemIndex - The index of the item.
|
|
84
|
+
* @param event - The keyboard event.
|
|
85
|
+
*/
|
|
86
|
+
onArrowKeydown(groupIndex, itemIndex, event) {
|
|
87
|
+
event.preventDefault();
|
|
88
|
+
setTimeout(() => {
|
|
89
|
+
let gi = groupIndex;
|
|
90
|
+
if (itemIndex > this.groups[groupIndex].items.length - 1) {
|
|
91
|
+
gi = groupIndex + 1;
|
|
92
|
+
itemIndex = 0;
|
|
93
|
+
}
|
|
94
|
+
if (itemIndex < 0) {
|
|
95
|
+
gi = groupIndex - 1;
|
|
96
|
+
if (gi < 0) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
itemIndex = this.groups[gi].items.length - 1;
|
|
100
|
+
}
|
|
101
|
+
this.focusItem(gi, itemIndex);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Emits the item order changed event.
|
|
106
|
+
*
|
|
107
|
+
* @param previousIndex - The previous index of the item.
|
|
108
|
+
* @param currentIndex - The current index of the item.
|
|
109
|
+
*/
|
|
110
|
+
emitItemOrderChanged(previousIndex, currentIndex) {
|
|
111
|
+
this.itemOrderChanged.emit({
|
|
112
|
+
previousIndex,
|
|
113
|
+
currentIndex,
|
|
114
|
+
groups: [...this.groups],
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Emits the selected checklist item through an event.
|
|
119
|
+
*
|
|
120
|
+
* @param item - The checklist item to emit.
|
|
121
|
+
*/
|
|
122
|
+
emitCheckListItem(item) {
|
|
123
|
+
this.itemSelectionChanged.emit({ changedItem: item, groups: this.groups });
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Focuses on a specific item in the sortable list.
|
|
127
|
+
*
|
|
128
|
+
* @param groupIndex - The index of the group.
|
|
129
|
+
* @param itemIndex - The index of the item.
|
|
130
|
+
*/
|
|
131
|
+
focusItem(groupIndex, itemIndex) {
|
|
132
|
+
const groupElements = this.sortableListGroups.nativeElement.querySelectorAll('.item-list-group');
|
|
133
|
+
if (groupElements && groupElements.length > groupIndex) {
|
|
134
|
+
const itemElements = groupElements[groupIndex].querySelectorAll('.item');
|
|
135
|
+
if (itemElements && itemElements.length > itemIndex) {
|
|
136
|
+
if (this.shouldDisplayCheckboxes) {
|
|
137
|
+
itemElements[itemIndex].querySelector('input').focus();
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
itemElements[itemIndex].focus();
|
|
141
|
+
}
|
|
142
|
+
this.focusedIndex[groupIndex] = itemIndex;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Checks if an item has focus.
|
|
148
|
+
*
|
|
149
|
+
* @param groupIndex - The index of the group.
|
|
150
|
+
* @param itemIndex - The index of the item.
|
|
151
|
+
*/
|
|
152
|
+
itemHasFocus(groupIndex, itemIndex) {
|
|
153
|
+
if (!this.focusedIndex[groupIndex]) {
|
|
154
|
+
this.focusedIndex[groupIndex] = 0;
|
|
155
|
+
}
|
|
156
|
+
return this.focusedIndex[groupIndex] === itemIndex;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
NggSortableListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
160
|
+
NggSortableListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggSortableListComponent, selector: "ngg-sortable-list", inputs: { groups: "groups", shouldDisplayCheckboxes: "shouldDisplayCheckboxes", isReadOnly: "isReadOnly", isDraggable: "isDraggable", description: "description", suffixTemplate: "suffixTemplate" }, outputs: { itemSelectionChanged: "itemSelectionChanged", itemOrderChanged: "itemOrderChanged" }, viewQueries: [{ propertyName: "sortableListGroups", first: true, predicate: ["sortableListGroups"], descendants: true }], ngImport: i0, template: "<div class=\"item-list\">\n <ng-container>\n <p class=\"item-list-header\">\n <span class=\"item-list-header-title\">{{ description }}</span>\n </p>\n <div #sortableListGroups cdkDropListGroup>\n <div\n *ngFor=\"let group of groups; let g_i = index\"\n class=\"item-list-group\"\n [class.drag-enabled]=\"isDraggable && !isReadOnly\"\n role=\"list\"\n cdkDropList\n [cdkDropListData]=\"group.items\"\n [id]=\"g_i.toString()\"\n (cdkDropListDropped)=\"onDragDrop($event)\"\n >\n <p\n *ngIf=\"group.title && group.title.length > 0\"\n class=\"item-list-header\"\n >\n <span class=\"item-list-header-title\">{{ group.title }}</span>\n </p>\n <p\n *ngIf=\"group.description && group.description.length > 0\"\n class=\"item-list-header-description\"\n >\n {{ group.description }}\n </p>\n <div\n *ngFor=\"let checklistItem of group.items; let i = index\"\n [cdkDragDisabled]=\"!isDraggable || isReadOnly\"\n [cdkDragData]=\"checklistItem\"\n cdkDrag\n cdkDragLockAxis=\"y\"\n class=\"item-box\"\n role=\"listitem\"\n >\n <div *cdkDragPlaceholder class=\"item-custom-placeholder\"></div>\n <label\n (keydown.alt.arrowDown)=\"onAltArrowKeydown(g_i, i, i + 1, $event)\"\n (keydown.alt.arrowUp)=\"onAltArrowKeydown(g_i, i, i - 1, $event)\"\n (keydown.arrowDown)=\"onArrowKeydown(g_i, i + 1, $event)\"\n (keydown.arrowUp)=\"onArrowKeydown(g_i, i - 1, $event)\"\n class=\"form-control item-control align-items-center item\"\n [tabindex]=\"shouldDisplayCheckboxes ? '-1' : '0'\"\n >\n <div class=\"form-control\">\n <input\n (change)=\"toggleSelection(checklistItem)\"\n [checked]=\"checklistItem.selected\"\n [disabled]=\"isReadOnly\"\n [type]=\"shouldDisplayCheckboxes ? 'checkbox' : 'hidden'\"\n />\n <div class=\"item-box-title\">\n <span name=\"agendaItemName\"\n >{{ checklistItem.name }}\n <span\n *ngIf=\"checklistItem.hasCustomSuffix\"\n class=\"item-list-suffix\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n suffixTemplate;\n context: { $implicit: checklistItem }\n \"\n class=\"user-icon\"\n >\n </ng-container>\n </span>\n </span>\n <br />\n <span *ngIf=\"!!checklistItem.description\">\n <span class=\"item-list-suffix\" name=\"agendaItemToolTip\">\n {{ checklistItem.description }}\n </span>\n <br />\n </span>\n </div>\n <i></i>\n </div>\n <div *ngIf=\"isDraggable && !isReadOnly\" class=\"item-grip-icon\">\n <i class=\"sg-icon sg-icon-grip-vertical text-primary\"></i>\n </div>\n </label>\n </div>\n </div>\n </div>\n </ng-container>\n</div>\n", styles: [".item-list{width:100%;display:block}label.item{padding:0!important}.item-box{background-color:var(--sg-card-background);color:var(--text-primary-color);display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;font-size:14px;margin:5px 0;border:1px solid var(--border-color);border-radius:4px}.form-control{line-height:20px;font-size:16px;font-weight:500}.item-list-header{display:flex;flex-direction:row;justify-content:space-between;margin-bottom:1rem}.item-list-header-title{font-weight:600;font-size:1rem;line-height:1.25rem;font-style:normal}.item-list-header-subtitle{font-size:.75rem;color:var(--text-primary-color);display:flex;justify-content:center;align-content:center}.item-list-suffix{font-weight:400;font-size:.85rem}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.item-grip-icon{font-weight:400;padding:.75rem 1rem .75rem 0rem}.cdk-drop-list.cdk-drop-list-dragging{cursor:grabbing!important;pointer-events:all!important}.item-custom-placeholder.cdk-drag-placeholder{pointer-events:all!important}.cdk-drop-list.drag-enabled:not(.cdk-drag-placeholder) label{cursor:grab}.cdk-drop-list label:focus-visible{outline-color:#333;outline-offset:4px}.item-list.cdk-drop-list-dragging .item-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1);pointer-events:all!important}.item-custom-placeholder{border:dotted 1px #999;min-height:44px;transition:transform .25s cubic-bezier(0,0,.2,1);border-radius:4px;margin:5px 0;padding:12px 12px 12px 16px}.user-icon{margin-right:.5rem}.item-control{width:100%;display:flex;flex-direction:row;justify-content:space-between}.form-control.item-layout{display:flex;justify-content:space-between}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2.CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { kind: "directive", type: i2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }] });
|
|
161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListComponent, decorators: [{
|
|
162
|
+
type: Component,
|
|
163
|
+
args: [{ selector: 'ngg-sortable-list', template: "<div class=\"item-list\">\n <ng-container>\n <p class=\"item-list-header\">\n <span class=\"item-list-header-title\">{{ description }}</span>\n </p>\n <div #sortableListGroups cdkDropListGroup>\n <div\n *ngFor=\"let group of groups; let g_i = index\"\n class=\"item-list-group\"\n [class.drag-enabled]=\"isDraggable && !isReadOnly\"\n role=\"list\"\n cdkDropList\n [cdkDropListData]=\"group.items\"\n [id]=\"g_i.toString()\"\n (cdkDropListDropped)=\"onDragDrop($event)\"\n >\n <p\n *ngIf=\"group.title && group.title.length > 0\"\n class=\"item-list-header\"\n >\n <span class=\"item-list-header-title\">{{ group.title }}</span>\n </p>\n <p\n *ngIf=\"group.description && group.description.length > 0\"\n class=\"item-list-header-description\"\n >\n {{ group.description }}\n </p>\n <div\n *ngFor=\"let checklistItem of group.items; let i = index\"\n [cdkDragDisabled]=\"!isDraggable || isReadOnly\"\n [cdkDragData]=\"checklistItem\"\n cdkDrag\n cdkDragLockAxis=\"y\"\n class=\"item-box\"\n role=\"listitem\"\n >\n <div *cdkDragPlaceholder class=\"item-custom-placeholder\"></div>\n <label\n (keydown.alt.arrowDown)=\"onAltArrowKeydown(g_i, i, i + 1, $event)\"\n (keydown.alt.arrowUp)=\"onAltArrowKeydown(g_i, i, i - 1, $event)\"\n (keydown.arrowDown)=\"onArrowKeydown(g_i, i + 1, $event)\"\n (keydown.arrowUp)=\"onArrowKeydown(g_i, i - 1, $event)\"\n class=\"form-control item-control align-items-center item\"\n [tabindex]=\"shouldDisplayCheckboxes ? '-1' : '0'\"\n >\n <div class=\"form-control\">\n <input\n (change)=\"toggleSelection(checklistItem)\"\n [checked]=\"checklistItem.selected\"\n [disabled]=\"isReadOnly\"\n [type]=\"shouldDisplayCheckboxes ? 'checkbox' : 'hidden'\"\n />\n <div class=\"item-box-title\">\n <span name=\"agendaItemName\"\n >{{ checklistItem.name }}\n <span\n *ngIf=\"checklistItem.hasCustomSuffix\"\n class=\"item-list-suffix\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n suffixTemplate;\n context: { $implicit: checklistItem }\n \"\n class=\"user-icon\"\n >\n </ng-container>\n </span>\n </span>\n <br />\n <span *ngIf=\"!!checklistItem.description\">\n <span class=\"item-list-suffix\" name=\"agendaItemToolTip\">\n {{ checklistItem.description }}\n </span>\n <br />\n </span>\n </div>\n <i></i>\n </div>\n <div *ngIf=\"isDraggable && !isReadOnly\" class=\"item-grip-icon\">\n <i class=\"sg-icon sg-icon-grip-vertical text-primary\"></i>\n </div>\n </label>\n </div>\n </div>\n </div>\n </ng-container>\n</div>\n", styles: [".item-list{width:100%;display:block}label.item{padding:0!important}.item-box{background-color:var(--sg-card-background);color:var(--text-primary-color);display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;font-size:14px;margin:5px 0;border:1px solid var(--border-color);border-radius:4px}.form-control{line-height:20px;font-size:16px;font-weight:500}.item-list-header{display:flex;flex-direction:row;justify-content:space-between;margin-bottom:1rem}.item-list-header-title{font-weight:600;font-size:1rem;line-height:1.25rem;font-style:normal}.item-list-header-subtitle{font-size:.75rem;color:var(--text-primary-color);display:flex;justify-content:center;align-content:center}.item-list-suffix{font-weight:400;font-size:.85rem}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.item-grip-icon{font-weight:400;padding:.75rem 1rem .75rem 0rem}.cdk-drop-list.cdk-drop-list-dragging{cursor:grabbing!important;pointer-events:all!important}.item-custom-placeholder.cdk-drag-placeholder{pointer-events:all!important}.cdk-drop-list.drag-enabled:not(.cdk-drag-placeholder) label{cursor:grab}.cdk-drop-list label:focus-visible{outline-color:#333;outline-offset:4px}.item-list.cdk-drop-list-dragging .item-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1);pointer-events:all!important}.item-custom-placeholder{border:dotted 1px #999;min-height:44px;transition:transform .25s cubic-bezier(0,0,.2,1);border-radius:4px;margin:5px 0;padding:12px 12px 12px 16px}.user-icon{margin-right:.5rem}.item-control{width:100%;display:flex;flex-direction:row;justify-content:space-between}.form-control.item-layout{display:flex;justify-content:space-between}\n"] }]
|
|
164
|
+
}], propDecorators: { groups: [{
|
|
165
|
+
type: Input
|
|
166
|
+
}], shouldDisplayCheckboxes: [{
|
|
167
|
+
type: Input
|
|
168
|
+
}], isReadOnly: [{
|
|
169
|
+
type: Input
|
|
170
|
+
}], isDraggable: [{
|
|
171
|
+
type: Input
|
|
172
|
+
}], description: [{
|
|
173
|
+
type: Input
|
|
174
|
+
}], suffixTemplate: [{
|
|
175
|
+
type: Input
|
|
176
|
+
}], itemSelectionChanged: [{
|
|
177
|
+
type: Output
|
|
178
|
+
}], itemOrderChanged: [{
|
|
179
|
+
type: Output
|
|
180
|
+
}], sortableListGroups: [{
|
|
181
|
+
type: ViewChild,
|
|
182
|
+
args: ['sortableListGroups']
|
|
183
|
+
}] } });
|
|
184
|
+
|
|
185
|
+
class NggSortableListModule {
|
|
186
|
+
}
|
|
187
|
+
NggSortableListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
188
|
+
NggSortableListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListModule, declarations: [NggSortableListComponent], imports: [CommonModule, FormsModule, DragDropModule], exports: [NggSortableListComponent] });
|
|
189
|
+
NggSortableListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListModule, imports: [CommonModule, FormsModule, DragDropModule] });
|
|
190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListModule, decorators: [{
|
|
191
|
+
type: NgModule,
|
|
192
|
+
args: [{
|
|
193
|
+
imports: [CommonModule, FormsModule, DragDropModule],
|
|
194
|
+
exports: [NggSortableListComponent],
|
|
195
|
+
declarations: [NggSortableListComponent],
|
|
196
|
+
}]
|
|
197
|
+
}] });
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Generated bundle index. Do not edit.
|
|
201
|
+
*/
|
|
202
|
+
|
|
203
|
+
export { NggSortableListComponent, NggSortableListModule };
|
|
204
|
+
//# sourceMappingURL=sebgroup-green-angular-src-lib-sortable-list.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sebgroup-green-angular-src-lib-sortable-list.mjs","sources":["../../../../libs/angular/src/lib/sortable-list/sortable-list.component.ts","../../../../libs/angular/src/lib/sortable-list/sortable-list.component.html","../../../../libs/angular/src/lib/sortable-list/sortable-list.module.ts","../../../../libs/angular/src/lib/sortable-list/sebgroup-green-angular-src-lib-sortable-list.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n TemplateRef,\n ViewChild,\n} from '@angular/core'\nimport {\n CdkDragDrop,\n moveItemInArray,\n transferArrayItem,\n} from '@angular/cdk/drag-drop'\n\nexport interface SortableListItem {\n id: any\n name: string\n description?: string\n selected?: boolean\n hasCustomSuffix?: boolean\n}\n\nexport interface SortableListGroup {\n items: SortableListItem[]\n title: string\n description?: string\n}\n\n@Component({\n selector: 'ngg-sortable-list',\n templateUrl: './sortable-list.component.html',\n styleUrls: ['./sortable-list.component.scss'],\n})\nexport class NggSortableListComponent {\n @Input() groups: SortableListGroup[] = []\n @Input() shouldDisplayCheckboxes = false\n @Input() isReadOnly = false\n @Input() isDraggable = true\n @Input() description = ''\n @Input() suffixTemplate: TemplateRef<any> | null = null\n\n @Output() itemSelectionChanged = new EventEmitter<{\n changedItem: SortableListItem\n groups: SortableListGroup[]\n }>()\n @Output() itemOrderChanged = new EventEmitter<{\n previousIndex: [number, number]\n currentIndex: [number, number]\n groups: SortableListGroup[]\n }>()\n\n @ViewChild('sortableListGroups') sortableListGroups!: ElementRef\n\n focusedIndex: Record<number, number> = { 0: 0 }\n\n /**\n * Toggles the selection of a checklist item and updates its position in the list.\n *\n * @param item - The checklist item to update.\n */\n toggleSelection(item: SortableListItem) {\n item.selected = !item.selected\n this.emitCheckListItem(item)\n }\n\n /**\n * Handles the onDragDrop event.\n *\n * @param event - The drag and drop event.\n */\n onDragDrop(event: CdkDragDrop<SortableListItem[]>) {\n if (event.previousContainer === event.container) {\n moveItemInArray(\n event.container.data,\n event.previousIndex,\n event.currentIndex,\n )\n } else {\n transferArrayItem(\n event.previousContainer.data,\n event.container.data,\n event.previousIndex,\n event.currentIndex,\n )\n }\n\n this.emitItemOrderChanged(\n [Number(event.previousContainer.id), event.previousIndex],\n [Number(event.container.id), event.currentIndex],\n )\n }\n\n /**\n * Handles moving items up or down using the alt + arrow up or alt + arrow down keys.\n *\n * @param groupIndex - The index of the group.\n * @param currentItemIndex - The current index of the item.\n * @param newItemIndex - The new index of the item.\n */\n onAltArrowKeydown(\n groupIndex: number,\n currentItemIndex: number,\n newItemIndex: number,\n event: any,\n ) {\n event.preventDefault()\n\n let newIndex = newItemIndex\n let newGroupIndex = groupIndex\n let transfer = false\n\n if (newIndex > this.groups[groupIndex].items.length - 1) {\n newIndex = 0\n newGroupIndex = groupIndex + 1\n transfer = true\n this.focusedIndex[groupIndex] = this.groups[groupIndex].items.length - 2\n } else if (newIndex < 0) {\n newGroupIndex = groupIndex - 1\n newIndex = this.groups[newGroupIndex].items.length\n transfer = true\n this.focusedIndex[groupIndex] = 0\n }\n\n if (transfer) {\n transferArrayItem(\n this.groups[groupIndex].items,\n this.groups[newGroupIndex].items,\n currentItemIndex,\n newIndex,\n )\n } else {\n moveItemInArray(this.groups[groupIndex].items, currentItemIndex, newIndex)\n }\n\n this.emitItemOrderChanged(\n [groupIndex, currentItemIndex],\n [newGroupIndex, newIndex],\n )\n\n setTimeout(() => {\n this.focusItem(newGroupIndex, newIndex)\n })\n }\n\n /**\n * Handles focus by arrow keydown event.\n *\n * @param groupIndex - The index of the group.\n * @param itemIndex - The index of the item.\n * @param event - The keyboard event.\n */\n onArrowKeydown(groupIndex: number, itemIndex: number, event: Event) {\n event.preventDefault()\n setTimeout(() => {\n let gi = groupIndex\n\n if (itemIndex > this.groups[groupIndex].items.length - 1) {\n gi = groupIndex + 1\n itemIndex = 0\n }\n\n if (itemIndex < 0) {\n gi = groupIndex - 1\n if (gi < 0) {\n return\n }\n itemIndex = this.groups[gi].items.length - 1\n }\n\n this.focusItem(gi, itemIndex)\n })\n }\n\n /**\n * Emits the item order changed event.\n *\n * @param previousIndex - The previous index of the item.\n * @param currentIndex - The current index of the item.\n */\n private emitItemOrderChanged(\n previousIndex: [number, number],\n currentIndex: [number, number],\n ) {\n this.itemOrderChanged.emit({\n previousIndex,\n currentIndex,\n groups: [...this.groups],\n })\n }\n\n /**\n * Emits the selected checklist item through an event.\n *\n * @param item - The checklist item to emit.\n */\n private emitCheckListItem(item: SortableListItem) {\n this.itemSelectionChanged.emit({ changedItem: item, groups: this.groups })\n }\n\n /**\n * Focuses on a specific item in the sortable list.\n *\n * @param groupIndex - The index of the group.\n * @param itemIndex - The index of the item.\n */\n private focusItem(groupIndex: number, itemIndex: number): void {\n const groupElements =\n this.sortableListGroups.nativeElement.querySelectorAll('.item-list-group')\n\n if (groupElements && groupElements.length > groupIndex) {\n const itemElements = groupElements[groupIndex].querySelectorAll('.item')\n if (itemElements && itemElements.length > itemIndex) {\n if (this.shouldDisplayCheckboxes) {\n itemElements[itemIndex].querySelector('input').focus()\n } else {\n itemElements[itemIndex].focus()\n }\n this.focusedIndex[groupIndex] = itemIndex\n }\n }\n }\n\n /**\n * Checks if an item has focus.\n *\n * @param groupIndex - The index of the group.\n * @param itemIndex - The index of the item.\n */\n itemHasFocus(groupIndex: number, itemIndex: number) {\n if (!this.focusedIndex[groupIndex]) {\n this.focusedIndex[groupIndex] = 0\n }\n return this.focusedIndex[groupIndex] === itemIndex\n }\n}\n","<div class=\"item-list\">\n <ng-container>\n <p class=\"item-list-header\">\n <span class=\"item-list-header-title\">{{ description }}</span>\n </p>\n <div #sortableListGroups cdkDropListGroup>\n <div\n *ngFor=\"let group of groups; let g_i = index\"\n class=\"item-list-group\"\n [class.drag-enabled]=\"isDraggable && !isReadOnly\"\n role=\"list\"\n cdkDropList\n [cdkDropListData]=\"group.items\"\n [id]=\"g_i.toString()\"\n (cdkDropListDropped)=\"onDragDrop($event)\"\n >\n <p\n *ngIf=\"group.title && group.title.length > 0\"\n class=\"item-list-header\"\n >\n <span class=\"item-list-header-title\">{{ group.title }}</span>\n </p>\n <p\n *ngIf=\"group.description && group.description.length > 0\"\n class=\"item-list-header-description\"\n >\n {{ group.description }}\n </p>\n <div\n *ngFor=\"let checklistItem of group.items; let i = index\"\n [cdkDragDisabled]=\"!isDraggable || isReadOnly\"\n [cdkDragData]=\"checklistItem\"\n cdkDrag\n cdkDragLockAxis=\"y\"\n class=\"item-box\"\n role=\"listitem\"\n >\n <div *cdkDragPlaceholder class=\"item-custom-placeholder\"></div>\n <label\n (keydown.alt.arrowDown)=\"onAltArrowKeydown(g_i, i, i + 1, $event)\"\n (keydown.alt.arrowUp)=\"onAltArrowKeydown(g_i, i, i - 1, $event)\"\n (keydown.arrowDown)=\"onArrowKeydown(g_i, i + 1, $event)\"\n (keydown.arrowUp)=\"onArrowKeydown(g_i, i - 1, $event)\"\n class=\"form-control item-control align-items-center item\"\n [tabindex]=\"shouldDisplayCheckboxes ? '-1' : '0'\"\n >\n <div class=\"form-control\">\n <input\n (change)=\"toggleSelection(checklistItem)\"\n [checked]=\"checklistItem.selected\"\n [disabled]=\"isReadOnly\"\n [type]=\"shouldDisplayCheckboxes ? 'checkbox' : 'hidden'\"\n />\n <div class=\"item-box-title\">\n <span name=\"agendaItemName\"\n >{{ checklistItem.name }}\n <span\n *ngIf=\"checklistItem.hasCustomSuffix\"\n class=\"item-list-suffix\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n suffixTemplate;\n context: { $implicit: checklistItem }\n \"\n class=\"user-icon\"\n >\n </ng-container>\n </span>\n </span>\n <br />\n <span *ngIf=\"!!checklistItem.description\">\n <span class=\"item-list-suffix\" name=\"agendaItemToolTip\">\n {{ checklistItem.description }}\n </span>\n <br />\n </span>\n </div>\n <i></i>\n </div>\n <div *ngIf=\"isDraggable && !isReadOnly\" class=\"item-grip-icon\">\n <i class=\"sg-icon sg-icon-grip-vertical text-primary\"></i>\n </div>\n </label>\n </div>\n </div>\n </div>\n </ng-container>\n</div>\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { FormsModule } from '@angular/forms'\nimport { NggSortableListComponent } from './sortable-list.component'\nimport { DragDropModule } from '@angular/cdk/drag-drop'\n\n@NgModule({\n imports: [CommonModule, FormsModule, DragDropModule],\n exports: [NggSortableListComponent],\n declarations: [NggSortableListComponent],\n})\nexport class NggSortableListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAkCa,wBAAwB,CAAA;AALrC,IAAA,WAAA,GAAA;AAMW,QAAA,IAAM,CAAA,MAAA,GAAwB,EAAE,CAAA;AAChC,QAAA,IAAuB,CAAA,uBAAA,GAAG,KAAK,CAAA;AAC/B,QAAA,IAAU,CAAA,UAAA,GAAG,KAAK,CAAA;AAClB,QAAA,IAAW,CAAA,WAAA,GAAG,IAAI,CAAA;AAClB,QAAA,IAAW,CAAA,WAAA,GAAG,EAAE,CAAA;AAChB,QAAA,IAAc,CAAA,cAAA,GAA4B,IAAI,CAAA;AAE7C,QAAA,IAAA,CAAA,oBAAoB,GAAG,IAAI,YAAY,EAG7C,CAAA;AACM,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,YAAY,EAIzC,CAAA;QAIJ,IAAA,CAAA,YAAY,GAA2B,EAAE,CAAC,EAAE,CAAC,EAAE,CAAA;KAqLhD;AAnLC;;;;AAIG;AACH,IAAA,eAAe,CAAC,IAAsB,EAAA;AACpC,QAAA,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAA;AAC9B,QAAA,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CA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