@sebgroup/green-angular 3.5.2 → 3.6.1
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/index.mjs +2 -1
- package/esm2020/lib/green-angular.module.mjs +7 -3
- package/esm2020/lib/modal/modal.component.mjs +3 -3
- package/esm2020/lib/sortable-list/index.mjs +3 -0
- package/esm2020/lib/sortable-list/sortable-list.component.mjs +181 -0
- package/esm2020/lib/sortable-list/sortable-list.module.mjs +20 -0
- package/fesm2015/sebgroup-green-angular.mjs +200 -5
- package/fesm2015/sebgroup-green-angular.mjs.map +1 -1
- package/fesm2020/sebgroup-green-angular.mjs +200 -5
- package/fesm2020/sebgroup-green-angular.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/green-angular.module.d.ts +2 -1
- package/lib/sortable-list/index.d.ts +2 -0
- package/lib/sortable-list/sortable-list.component.d.ts +91 -0
- package/lib/sortable-list/sortable-list.module.d.ts +10 -0
- package/package.json +3 -3
|
@@ -15,6 +15,8 @@ import * as i1$2 from '@angular/router';
|
|
|
15
15
|
import { RouterModule } from '@angular/router';
|
|
16
16
|
import { Subject, fromEvent, interval } from 'rxjs';
|
|
17
17
|
import { takeUntil, throttle } from 'rxjs/operators';
|
|
18
|
+
import * as i2$1 from '@angular/cdk/drag-drop';
|
|
19
|
+
import { moveItemInArray, transferArrayItem, DragDropModule } from '@angular/cdk/drag-drop';
|
|
18
20
|
import * as i1$3 from '@angular/platform-browser';
|
|
19
21
|
|
|
20
22
|
class NggAccordionListItemComponent {
|
|
@@ -989,10 +991,10 @@ class NggModalComponent {
|
|
|
989
991
|
}
|
|
990
992
|
}
|
|
991
993
|
NggModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModalComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ConfigurableFocusTrapFactory }], target: i0.ɵɵFactoryTarget.Component });
|
|
992
|
-
NggModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggModalComponent, selector: "ngg-modal", inputs: { modalType: "modalType", header: "header", confirmLabel: "confirmLabel", dismissLabel: "dismissLabel", size: "size", hideHeader: "hideHeader", hideFooter: "hideFooter", trapFocus: "trapFocus", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange", closed: "closed", confirm: "confirm", dismiss: "dismiss" }, host: { properties: { "class.open": "this.open" } }, queries: [{ propertyName: "modalHeaderContent", first: true, predicate: NggModalHeaderDirective, descendants: true }, { propertyName: "modalFooterContent", first: true, predicate: NggModalFooterDirective, descendants: true }], viewQueries: [{ propertyName: "backdropRef", first: true, predicate: ["backdrop"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"isOpen\" [ngSwitch]=\"modalType\">\n <div class=\"gds-dialog-wrapper\">\n <aside\n data-testid=\"modal\"\n *ngSwitchCase=\"'slideout'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [class.small]=\"size === 'sm'\"\n [class.
|
|
994
|
+
NggModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggModalComponent, selector: "ngg-modal", inputs: { modalType: "modalType", header: "header", confirmLabel: "confirmLabel", dismissLabel: "dismissLabel", size: "size", hideHeader: "hideHeader", hideFooter: "hideFooter", trapFocus: "trapFocus", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange", closed: "closed", confirm: "confirm", dismiss: "dismiss" }, host: { properties: { "class.open": "this.open" } }, queries: [{ propertyName: "modalHeaderContent", first: true, predicate: NggModalHeaderDirective, descendants: true }, { propertyName: "modalFooterContent", first: true, predicate: NggModalFooterDirective, descendants: true }], viewQueries: [{ propertyName: "backdropRef", first: true, predicate: ["backdrop"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"isOpen\" [ngSwitch]=\"modalType\">\n <div class=\"gds-dialog-wrapper\">\n <aside\n data-testid=\"modal\"\n *ngSwitchCase=\"'slideout'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [class.small]=\"size === 'sm'\"\n [class.gds-slide-out--768]=\"size === 'md'\"\n [class.gds-slide-out--960]=\"size === 'lg'\"\n [class.entered]=\"isOpen\"\n >\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n </aside>\n <main\n data-testid=\"modal\"\n *ngSwitchCase=\"'takeover'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [class.entered]=\"isOpen\"\n >\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n </main>\n <section\n data-testid=\"modal\"\n *ngSwitchDefault\n role=\"dialog\"\n aria-modal=\"true\"\n [class.small]=\"size === 'sm'\"\n [class.medium]=\"size === 'md'\"\n [class.large]=\"size === 'lg'\"\n [class.entered]=\"isOpen\"\n >\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n </section>\n <ng-template #contentTemplate>\n <ng-container *ngIf=\"!hideHeader\">\n <header\n *ngIf=\"!modalHeaderContent; else headerContentTemplate\"\n ngg-modal-header\n data-testid=\"modal-header\"\n [header]=\"header\"\n (closed)=\"this.handleCloseClick($event)\"\n ></header>\n </ng-container>\n <div ngg-modal-body data-testid=\"modal-body\" class=\"body\">\n <ng-container *ngTemplateOutlet=\"bodyContentTemplate\"></ng-container>\n </div>\n <ng-container *ngIf=\"!hideFooter && (dismissLabel || confirmLabel)\">\n <footer\n *ngIf=\"!modalFooterContent; else footerContentTemplate\"\n ngg-modal-footer\n data-testid=\"modal-footer\"\n [dismissLabel]=\"dismissLabel\"\n [confirmLabel]=\"confirmLabel\"\n (dismiss)=\"this.handleDismiss($event)\"\n (confirm)=\"this.handleConfirm($event)\"\n ></footer>\n </ng-container>\n </ng-template>\n <ng-template #headerContentTemplate>\n <header data-testid=\"modal-header\">\n <ng-content select=\"[nggModalHeader]\"></ng-content>\n </header>\n </ng-template>\n <ng-template #bodyContentTemplate>\n <ng-content></ng-content>\n </ng-template>\n <ng-template #footerContentTemplate>\n <footer data-testid=\"modal-footer\">\n <ng-content select=\"[nggModalFooter]\"></ng-content>\n </footer>\n </ng-template>\n <div\n #backdrop\n data-testid=\"modal-backdrop\"\n class=\"backdrop entered\"\n (click)=\"this.handleBackdropClick($event)\"\n [attr.aria-hidden]=\"true\"\n ></div>\n </div>\n</ng-container>\n", styles: [":host.open{height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:var(--sg-z-index-modal)}:host.open>section[role=dialog]{left:50%;top:50%;transform:translate(-50%,-50%)}.body::-webkit-scrollbar{background-color:#f8f8f8;height:10px;width:10px}.body::-webkit-scrollbar-thumb{background-color:#cecece}.body::-webkit-scrollbar-track{background-color:#f8f8f8;box-shadow:inset 0 0 10px #00000040}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(function () { return i1.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(function () { return i1.NgTemplateOutlet; }), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i0.forwardRef(function () { return i1.NgSwitch; }), selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i0.forwardRef(function () { return i1.NgSwitchCase; }), selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i0.forwardRef(function () { return i1.NgSwitchDefault; }), selector: "[ngSwitchDefault]" }, { kind: "component", type: i0.forwardRef(function () { return NggModalHeaderComponent; }), selector: "[ngg-modal-header]", inputs: ["header"], outputs: ["closed"] }, { kind: "component", type: i0.forwardRef(function () { return NggModalBodyComponent; }), selector: "[ngg-modal-body]" }, { kind: "component", type: i0.forwardRef(function () { return NggModalFooterComponent; }), selector: "[ngg-modal-footer]", inputs: ["dismissLabel", "confirmLabel"], outputs: ["dismiss", "confirm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
993
995
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModalComponent, decorators: [{
|
|
994
996
|
type: Component,
|
|
995
|
-
args: [{ selector: 'ngg-modal', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"isOpen\" [ngSwitch]=\"modalType\">\n <div class=\"gds-dialog-wrapper\">\n <aside\n data-testid=\"modal\"\n *ngSwitchCase=\"'slideout'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [class.small]=\"size === 'sm'\"\n [class.
|
|
997
|
+
args: [{ selector: 'ngg-modal', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"isOpen\" [ngSwitch]=\"modalType\">\n <div class=\"gds-dialog-wrapper\">\n <aside\n data-testid=\"modal\"\n *ngSwitchCase=\"'slideout'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [class.small]=\"size === 'sm'\"\n [class.gds-slide-out--768]=\"size === 'md'\"\n [class.gds-slide-out--960]=\"size === 'lg'\"\n [class.entered]=\"isOpen\"\n >\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n </aside>\n <main\n data-testid=\"modal\"\n *ngSwitchCase=\"'takeover'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [class.entered]=\"isOpen\"\n >\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n </main>\n <section\n data-testid=\"modal\"\n *ngSwitchDefault\n role=\"dialog\"\n aria-modal=\"true\"\n [class.small]=\"size === 'sm'\"\n [class.medium]=\"size === 'md'\"\n [class.large]=\"size === 'lg'\"\n [class.entered]=\"isOpen\"\n >\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n </section>\n <ng-template #contentTemplate>\n <ng-container *ngIf=\"!hideHeader\">\n <header\n *ngIf=\"!modalHeaderContent; else headerContentTemplate\"\n ngg-modal-header\n data-testid=\"modal-header\"\n [header]=\"header\"\n (closed)=\"this.handleCloseClick($event)\"\n ></header>\n </ng-container>\n <div ngg-modal-body data-testid=\"modal-body\" class=\"body\">\n <ng-container *ngTemplateOutlet=\"bodyContentTemplate\"></ng-container>\n </div>\n <ng-container *ngIf=\"!hideFooter && (dismissLabel || confirmLabel)\">\n <footer\n *ngIf=\"!modalFooterContent; else footerContentTemplate\"\n ngg-modal-footer\n data-testid=\"modal-footer\"\n [dismissLabel]=\"dismissLabel\"\n [confirmLabel]=\"confirmLabel\"\n (dismiss)=\"this.handleDismiss($event)\"\n (confirm)=\"this.handleConfirm($event)\"\n ></footer>\n </ng-container>\n </ng-template>\n <ng-template #headerContentTemplate>\n <header data-testid=\"modal-header\">\n <ng-content select=\"[nggModalHeader]\"></ng-content>\n </header>\n </ng-template>\n <ng-template #bodyContentTemplate>\n <ng-content></ng-content>\n </ng-template>\n <ng-template #footerContentTemplate>\n <footer data-testid=\"modal-footer\">\n <ng-content select=\"[nggModalFooter]\"></ng-content>\n </footer>\n </ng-template>\n <div\n #backdrop\n data-testid=\"modal-backdrop\"\n class=\"backdrop entered\"\n (click)=\"this.handleBackdropClick($event)\"\n [attr.aria-hidden]=\"true\"\n ></div>\n </div>\n</ng-container>\n", styles: [":host.open{height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:var(--sg-z-index-modal)}:host.open>section[role=dialog]{left:50%;top:50%;transform:translate(-50%,-50%)}.body::-webkit-scrollbar{background-color:#f8f8f8;height:10px;width:10px}.body::-webkit-scrollbar-thumb{background-color:#cecece}.body::-webkit-scrollbar-track{background-color:#f8f8f8;box-shadow:inset 0 0 10px #00000040}\n"] }]
|
|
996
998
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ConfigurableFocusTrapFactory }]; }, propDecorators: { modalType: [{
|
|
997
999
|
type: Input
|
|
998
1000
|
}], header: [{
|
|
@@ -1449,6 +1451,196 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1449
1451
|
}]
|
|
1450
1452
|
}] });
|
|
1451
1453
|
|
|
1454
|
+
class NggSortableListComponent {
|
|
1455
|
+
constructor() {
|
|
1456
|
+
this.groups = [];
|
|
1457
|
+
this.shouldDisplayCheckboxes = false;
|
|
1458
|
+
this.isReadOnly = false;
|
|
1459
|
+
this.isDraggable = true;
|
|
1460
|
+
this.description = '';
|
|
1461
|
+
this.suffixTemplate = null;
|
|
1462
|
+
this.itemSelectionChanged = new EventEmitter();
|
|
1463
|
+
this.itemOrderChanged = new EventEmitter();
|
|
1464
|
+
this.focusedIndex = { 0: 0 };
|
|
1465
|
+
}
|
|
1466
|
+
/**
|
|
1467
|
+
* Toggles the selection of a checklist item and updates its position in the list.
|
|
1468
|
+
*
|
|
1469
|
+
* @param item - The checklist item to update.
|
|
1470
|
+
*/
|
|
1471
|
+
toggleSelection(item) {
|
|
1472
|
+
item.selected = !item.selected;
|
|
1473
|
+
this.emitCheckListItem(item);
|
|
1474
|
+
}
|
|
1475
|
+
/**
|
|
1476
|
+
* Handles the onDragDrop event.
|
|
1477
|
+
*
|
|
1478
|
+
* @param event - The drag and drop event.
|
|
1479
|
+
*/
|
|
1480
|
+
onDragDrop(event) {
|
|
1481
|
+
if (event.previousContainer === event.container) {
|
|
1482
|
+
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
|
|
1483
|
+
}
|
|
1484
|
+
else {
|
|
1485
|
+
transferArrayItem(event.previousContainer.data, event.container.data, event.previousIndex, event.currentIndex);
|
|
1486
|
+
}
|
|
1487
|
+
this.emitItemOrderChanged([Number(event.previousContainer.id), event.previousIndex], [Number(event.container.id), event.currentIndex]);
|
|
1488
|
+
}
|
|
1489
|
+
/**
|
|
1490
|
+
* Handles moving items up or down using the alt + arrow up or alt + arrow down keys.
|
|
1491
|
+
*
|
|
1492
|
+
* @param groupIndex - The index of the group.
|
|
1493
|
+
* @param currentItemIndex - The current index of the item.
|
|
1494
|
+
* @param newItemIndex - The new index of the item.
|
|
1495
|
+
*/
|
|
1496
|
+
onAltArrowKeydown(groupIndex, currentItemIndex, newItemIndex, event) {
|
|
1497
|
+
event.preventDefault();
|
|
1498
|
+
let newIndex = newItemIndex;
|
|
1499
|
+
let newGroupIndex = groupIndex;
|
|
1500
|
+
let transfer = false;
|
|
1501
|
+
if (newIndex > this.groups[groupIndex].items.length - 1) {
|
|
1502
|
+
newIndex = 0;
|
|
1503
|
+
newGroupIndex = groupIndex + 1;
|
|
1504
|
+
transfer = true;
|
|
1505
|
+
this.focusedIndex[groupIndex] = this.groups[groupIndex].items.length - 2;
|
|
1506
|
+
}
|
|
1507
|
+
else if (newIndex < 0) {
|
|
1508
|
+
newGroupIndex = groupIndex - 1;
|
|
1509
|
+
newIndex = this.groups[newGroupIndex].items.length;
|
|
1510
|
+
transfer = true;
|
|
1511
|
+
this.focusedIndex[groupIndex] = 0;
|
|
1512
|
+
}
|
|
1513
|
+
if (transfer) {
|
|
1514
|
+
transferArrayItem(this.groups[groupIndex].items, this.groups[newGroupIndex].items, currentItemIndex, newIndex);
|
|
1515
|
+
}
|
|
1516
|
+
else {
|
|
1517
|
+
moveItemInArray(this.groups[groupIndex].items, currentItemIndex, newIndex);
|
|
1518
|
+
}
|
|
1519
|
+
this.emitItemOrderChanged([groupIndex, currentItemIndex], [newGroupIndex, newIndex]);
|
|
1520
|
+
setTimeout(() => {
|
|
1521
|
+
this.focusItem(newGroupIndex, newIndex);
|
|
1522
|
+
});
|
|
1523
|
+
}
|
|
1524
|
+
/**
|
|
1525
|
+
* Handles focus by arrow keydown event.
|
|
1526
|
+
*
|
|
1527
|
+
* @param groupIndex - The index of the group.
|
|
1528
|
+
* @param itemIndex - The index of the item.
|
|
1529
|
+
* @param event - The keyboard event.
|
|
1530
|
+
*/
|
|
1531
|
+
onArrowKeydown(groupIndex, itemIndex, event) {
|
|
1532
|
+
event.preventDefault();
|
|
1533
|
+
setTimeout(() => {
|
|
1534
|
+
let gi = groupIndex;
|
|
1535
|
+
if (itemIndex > this.groups[groupIndex].items.length - 1) {
|
|
1536
|
+
gi = groupIndex + 1;
|
|
1537
|
+
itemIndex = 0;
|
|
1538
|
+
}
|
|
1539
|
+
if (itemIndex < 0) {
|
|
1540
|
+
gi = groupIndex - 1;
|
|
1541
|
+
if (gi < 0) {
|
|
1542
|
+
return;
|
|
1543
|
+
}
|
|
1544
|
+
itemIndex = this.groups[gi].items.length - 1;
|
|
1545
|
+
}
|
|
1546
|
+
this.focusItem(gi, itemIndex);
|
|
1547
|
+
});
|
|
1548
|
+
}
|
|
1549
|
+
/**
|
|
1550
|
+
* Emits the item order changed event.
|
|
1551
|
+
*
|
|
1552
|
+
* @param previousIndex - The previous index of the item.
|
|
1553
|
+
* @param currentIndex - The current index of the item.
|
|
1554
|
+
*/
|
|
1555
|
+
emitItemOrderChanged(previousIndex, currentIndex) {
|
|
1556
|
+
this.itemOrderChanged.emit({
|
|
1557
|
+
previousIndex,
|
|
1558
|
+
currentIndex,
|
|
1559
|
+
groups: [...this.groups],
|
|
1560
|
+
});
|
|
1561
|
+
}
|
|
1562
|
+
/**
|
|
1563
|
+
* Emits the selected checklist item through an event.
|
|
1564
|
+
*
|
|
1565
|
+
* @param item - The checklist item to emit.
|
|
1566
|
+
*/
|
|
1567
|
+
emitCheckListItem(item) {
|
|
1568
|
+
this.itemSelectionChanged.emit({ changedItem: item, groups: this.groups });
|
|
1569
|
+
}
|
|
1570
|
+
/**
|
|
1571
|
+
* Focuses on a specific item in the sortable list.
|
|
1572
|
+
*
|
|
1573
|
+
* @param groupIndex - The index of the group.
|
|
1574
|
+
* @param itemIndex - The index of the item.
|
|
1575
|
+
*/
|
|
1576
|
+
focusItem(groupIndex, itemIndex) {
|
|
1577
|
+
const groupElements = this.sortableListGroups.nativeElement.querySelectorAll('.item-list-group');
|
|
1578
|
+
if (groupElements && groupElements.length > groupIndex) {
|
|
1579
|
+
const itemElements = groupElements[groupIndex].querySelectorAll('.item');
|
|
1580
|
+
if (itemElements && itemElements.length > itemIndex) {
|
|
1581
|
+
if (this.shouldDisplayCheckboxes) {
|
|
1582
|
+
itemElements[itemIndex].querySelector('input').focus();
|
|
1583
|
+
}
|
|
1584
|
+
else {
|
|
1585
|
+
itemElements[itemIndex].focus();
|
|
1586
|
+
}
|
|
1587
|
+
this.focusedIndex[groupIndex] = itemIndex;
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
/**
|
|
1592
|
+
* Checks if an item has focus.
|
|
1593
|
+
*
|
|
1594
|
+
* @param groupIndex - The index of the group.
|
|
1595
|
+
* @param itemIndex - The index of the item.
|
|
1596
|
+
*/
|
|
1597
|
+
itemHasFocus(groupIndex, itemIndex) {
|
|
1598
|
+
if (!this.focusedIndex[groupIndex]) {
|
|
1599
|
+
this.focusedIndex[groupIndex] = 0;
|
|
1600
|
+
}
|
|
1601
|
+
return this.focusedIndex[groupIndex] === itemIndex;
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
NggSortableListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1605
|
+
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$1.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$1.CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { kind: "directive", type: i2$1.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$1.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }] });
|
|
1606
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListComponent, decorators: [{
|
|
1607
|
+
type: Component,
|
|
1608
|
+
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"] }]
|
|
1609
|
+
}], propDecorators: { groups: [{
|
|
1610
|
+
type: Input
|
|
1611
|
+
}], shouldDisplayCheckboxes: [{
|
|
1612
|
+
type: Input
|
|
1613
|
+
}], isReadOnly: [{
|
|
1614
|
+
type: Input
|
|
1615
|
+
}], isDraggable: [{
|
|
1616
|
+
type: Input
|
|
1617
|
+
}], description: [{
|
|
1618
|
+
type: Input
|
|
1619
|
+
}], suffixTemplate: [{
|
|
1620
|
+
type: Input
|
|
1621
|
+
}], itemSelectionChanged: [{
|
|
1622
|
+
type: Output
|
|
1623
|
+
}], itemOrderChanged: [{
|
|
1624
|
+
type: Output
|
|
1625
|
+
}], sortableListGroups: [{
|
|
1626
|
+
type: ViewChild,
|
|
1627
|
+
args: ['sortableListGroups']
|
|
1628
|
+
}] } });
|
|
1629
|
+
|
|
1630
|
+
class NggSortableListModule {
|
|
1631
|
+
}
|
|
1632
|
+
NggSortableListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1633
|
+
NggSortableListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListModule, declarations: [NggSortableListComponent], imports: [CommonModule, FormsModule, DragDropModule], exports: [NggSortableListComponent] });
|
|
1634
|
+
NggSortableListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListModule, imports: [CommonModule, FormsModule, DragDropModule] });
|
|
1635
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListModule, decorators: [{
|
|
1636
|
+
type: NgModule,
|
|
1637
|
+
args: [{
|
|
1638
|
+
imports: [CommonModule, FormsModule, DragDropModule],
|
|
1639
|
+
exports: [NggSortableListComponent],
|
|
1640
|
+
declarations: [NggSortableListComponent],
|
|
1641
|
+
}]
|
|
1642
|
+
}] });
|
|
1643
|
+
|
|
1452
1644
|
class SlidingUnderlineDirective {
|
|
1453
1645
|
constructor(element) {
|
|
1454
1646
|
this.element = element;
|
|
@@ -1724,7 +1916,8 @@ NggModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
|
|
|
1724
1916
|
NggContextMenuModule,
|
|
1725
1917
|
NggInPageWizardModule,
|
|
1726
1918
|
NggCellTableModule,
|
|
1727
|
-
NggSharedModule
|
|
1919
|
+
NggSharedModule,
|
|
1920
|
+
NggSortableListModule] });
|
|
1728
1921
|
NggModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModule, imports: [CommonModule, NggAccordionModule,
|
|
1729
1922
|
NggBadgeModule,
|
|
1730
1923
|
NggButtonModule,
|
|
@@ -1737,7 +1930,8 @@ NggModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
|
1737
1930
|
NggContextMenuModule,
|
|
1738
1931
|
NggInPageWizardModule,
|
|
1739
1932
|
NggCellTableModule,
|
|
1740
|
-
NggSharedModule
|
|
1933
|
+
NggSharedModule,
|
|
1934
|
+
NggSortableListModule] });
|
|
1741
1935
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModule, decorators: [{
|
|
1742
1936
|
type: NgModule,
|
|
1743
1937
|
args: [{
|
|
@@ -1757,6 +1951,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1757
1951
|
NggInPageWizardModule,
|
|
1758
1952
|
NggCellTableModule,
|
|
1759
1953
|
NggSharedModule,
|
|
1954
|
+
NggSortableListModule,
|
|
1760
1955
|
],
|
|
1761
1956
|
}]
|
|
1762
1957
|
}] });
|
|
@@ -1950,5 +2145,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1950
2145
|
* Generated bundle index. Do not edit.
|
|
1951
2146
|
*/
|
|
1952
2147
|
|
|
1953
|
-
export { NggAccordionComponent, NggAccordionListItemComponent, NggAccordionModule, NggBadgeComponent, NggBadgeModule, NggButtonComponent, NggButtonModule, NggCellTableComponent, NggCellTableModule, NggContextMenuComponent, NggContextMenuModule, NggCoreElementDirective, NggCoreWrapperModule, NggDatepickerComponent, NggDatepickerModule, NggDropdownButtonDirective, NggDropdownComponent, NggDropdownModule, NggDropdownOptionDirective, NggInPageWizardModule, NggInPageWizardStepCardComponent, NggModalBodyComponent, NggModalComponent, NggModalFooterComponent, NggModalFooterDirective, NggModalHeaderComponent, NggModalHeaderDirective, NggModalModule, NggModule, NggOnScrollDirective, NggPaginationComponent, NggPaginationModule, NggProgressCircleComponent, NggProgressCircleModule, NggSegmentedControlComponent, NggSegmentedControlModule, NggSharedModule, NggSliderComponent, NggSliderModule, ON_SCROLL_TOKEN, dateValidator };
|
|
2148
|
+
export { NggAccordionComponent, NggAccordionListItemComponent, NggAccordionModule, NggBadgeComponent, NggBadgeModule, NggButtonComponent, NggButtonModule, NggCellTableComponent, NggCellTableModule, NggContextMenuComponent, NggContextMenuModule, NggCoreElementDirective, NggCoreWrapperModule, NggDatepickerComponent, NggDatepickerModule, NggDropdownButtonDirective, NggDropdownComponent, NggDropdownModule, NggDropdownOptionDirective, NggInPageWizardModule, NggInPageWizardStepCardComponent, NggModalBodyComponent, NggModalComponent, NggModalFooterComponent, NggModalFooterDirective, NggModalHeaderComponent, NggModalHeaderDirective, NggModalModule, NggModule, NggOnScrollDirective, NggPaginationComponent, NggPaginationModule, NggProgressCircleComponent, NggProgressCircleModule, NggSegmentedControlComponent, NggSegmentedControlModule, NggSharedModule, NggSliderComponent, NggSliderModule, NggSortableListComponent, NggSortableListModule, ON_SCROLL_TOKEN, dateValidator };
|
|
1954
2149
|
//# sourceMappingURL=sebgroup-green-angular.mjs.map
|