@leanix/components 0.2.220 → 0.2.223
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/bundles/leanix-components.umd.js +31 -2
- package/bundles/leanix-components.umd.js.map +1 -1
- package/esm2015/lib/forms-ui/components/drag-and-drop-list/drag-and-drop-list-item/drag-and-drop-list-item.component.js +19 -2
- package/esm2015/lib/forms-ui/components/drag-and-drop-list/drag-and-drop-list-item/drag-and-drop-list-item.component.js.map +1 -1
- package/esm2015/lib/forms-ui/components/drag-and-drop-list/drag-and-drop-list.component.js +19 -2
- package/esm2015/lib/forms-ui/components/drag-and-drop-list/drag-and-drop-list.component.js.map +1 -1
- package/fesm2015/leanix-components.js +31 -2
- package/fesm2015/leanix-components.js.map +1 -1
- package/lib/forms-ui/components/drag-and-drop-list/drag-and-drop-list-item/drag-and-drop-list-item.component.d.ts +5 -1
- package/lib/forms-ui/components/drag-and-drop-list/drag-and-drop-list.component.d.ts +4 -1
- package/package.json +1 -1
@@ -3496,6 +3496,10 @@
|
|
3496
3496
|
this.NAME = 'DragAndDropListItemComponent';
|
3497
3497
|
this.draggable = true;
|
3498
3498
|
this.action = new i0.EventEmitter();
|
3499
|
+
this.moveToTop = new i0.EventEmitter();
|
3500
|
+
this.moveUp = new i0.EventEmitter();
|
3501
|
+
this.moveToBottom = new i0.EventEmitter();
|
3502
|
+
this.moveDown = new i0.EventEmitter();
|
3499
3503
|
}
|
3500
3504
|
Object.defineProperty(DragAndDropListItemComponent.prototype, "draggingDisabled", {
|
3501
3505
|
get: function () {
|
@@ -3510,7 +3514,7 @@
|
|
3510
3514
|
return DragAndDropListItemComponent;
|
3511
3515
|
}());
|
3512
3516
|
DragAndDropListItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.4", ngImport: i0__namespace, type: DragAndDropListItemComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
3513
|
-
DragAndDropListItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.4", type: DragAndDropListItemComponent, selector: "lx-drag-and-drop-list-item", inputs: { item: "item", draggable: "draggable", actions: "actions" }, outputs: { action: "action" }, host: { properties: { "class.draggingDisabled": "this.draggingDisabled" } }, ngImport: i0__namespace, template: "<
|
3517
|
+
DragAndDropListItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.4", type: DragAndDropListItemComponent, selector: "lx-drag-and-drop-list-item", inputs: { item: "item", draggable: "draggable", actions: "actions" }, outputs: { action: "action", moveToTop: "moveToTop", moveUp: "moveUp", moveToBottom: "moveToBottom", moveDown: "moveDown" }, host: { properties: { "class.draggingDisabled": "this.draggingDisabled" } }, ngImport: i0__namespace, template: "<div class=\"drag-item-wrappper\">\n <i *ngIf=\"draggable\" class=\"far fa-bars drag-handle\"></i>\n <span [attr.title]=\"item\" class=\"itemWrapperForTruncation truncate\">{{ item }}</span>\n</div>\n<div class=\"left-button-container\" align=\"left\">\n <div class=\"action-buttons-wrapper\" *ngIf=\"!!actions\">\n <button\n lx-button\n *ngFor=\"let act of actions; trackBy: trackByAction\"\n (click)=\"action.emit({ actionId: act.id, item: item })\"\n [title]=\"act.label\"\n [square]=\"true\"\n mode=\"ghost\"\n size=\"small\"\n class=\"action-button\"\n [class.show-on-hover-button]=\"act.showOnlyOnHover ? true : false\"\n >\n <i class=\"far {{ act.icon }} actionIcon\"></i>\n </button>\n </div>\n\n <lx-cdk-options-dropdown *ngIf=\"draggable\">\n <button lx-button [square]=\"true\" mode=\"ghost\" size=\"small\" lxKeyboardActionSource class=\"moreButton far fa-ellipsis-v\"></button>\n <lx-option-group>\n <lx-option [hasSelectedState]=\"false\" (select)=\"moveToTop.emit()\">\n <i class=\"far fa-fw fa-arrow-to-top\"></i>{{ NAME + '.moveToTop' | translate }}\n </lx-option>\n <lx-option [hasSelectedState]=\"false\" (select)=\"moveUp.emit()\">\n <i class=\"far fa-fw fa-arrow-up\"></i>{{ NAME + '.moveUp' | translate }}\n </lx-option>\n <lx-option [hasSelectedState]=\"false\" (select)=\"moveDown.emit()\">\n <i class=\"far fa-fw fa-arrow-down\"></i>{{ NAME + '.moveDown' | translate }}\n </lx-option>\n <lx-option [hasSelectedState]=\"false\" (select)=\"moveToBottom.emit()\">\n <i class=\"far fa-fw fa-arrow-down\"></i>{{ NAME + '.moveToBottom' | translate }}\n </lx-option>\n </lx-option-group>\n </lx-cdk-options-dropdown>\n</div>\n", styles: [":host{padding:6px 8px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;background:#fff}:host.draggingDisabled{background:#eaedf1}:host:hover .show-on-hover-button{opacity:1}.truncate{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drag-handle{padding-right:4px}.actionIcon{padding:0 2px}.drag-item-wrappper{display:flex;min-width:0;align-items:baseline}.action-buttons-wrapper,.left-button-container{display:flex;flex-direction:row;flex-wrap:nowrap}.show-on-hover-button{opacity:0}.show-on-hover-button:focus{opacity:1}lx-option i{margin-right:8px}"], components: [{ type: ButtonComponent, selector: "button[lx-button]", inputs: ["size", "color", "mode", "pressed", "selected", "square", "circle", "disabled", "showSpinner"] }, { type: CdkOptionsDropdownComponent, selector: "lx-cdk-options-dropdown", inputs: ["align", "closeOnScroll", "disabled", "maxHeight"] }, { type: OptionGroupComponent, selector: "lx-option-group", inputs: ["hasSelectedState", "label"], outputs: ["select"] }, { type: OptionComponent, selector: "lx-option", inputs: ["selected", "isHighlighted", "disabled", "value", "hasSelectedState"], outputs: ["select", "highlight", "selectedClick"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: KeyboardActionSourceDirective, selector: "[lxKeyboardActionSource]", exportAs: ["keyboardActionSource"] }], pipes: { "translate": i1__namespace$2.TranslatePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
3514
3518
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.4", ngImport: i0__namespace, type: DragAndDropListItemComponent, decorators: [{
|
3515
3519
|
type: i0.Component,
|
3516
3520
|
args: [{
|
@@ -3527,6 +3531,14 @@
|
|
3527
3531
|
type: i0.Input
|
3528
3532
|
}], action: [{
|
3529
3533
|
type: i0.Output
|
3534
|
+
}], moveToTop: [{
|
3535
|
+
type: i0.Output
|
3536
|
+
}], moveUp: [{
|
3537
|
+
type: i0.Output
|
3538
|
+
}], moveToBottom: [{
|
3539
|
+
type: i0.Output
|
3540
|
+
}], moveDown: [{
|
3541
|
+
type: i0.Output
|
3530
3542
|
}], draggingDisabled: [{
|
3531
3543
|
type: i0.HostBinding,
|
3532
3544
|
args: ['class.draggingDisabled']
|
@@ -3539,6 +3551,8 @@
|
|
3539
3551
|
* Override the global label font weight of 700
|
3540
3552
|
*/
|
3541
3553
|
this.labelFontWeight = 700;
|
3554
|
+
this.color = 'default';
|
3555
|
+
this.fontSize = 'normal';
|
3542
3556
|
/**
|
3543
3557
|
* Use the moveToIndex Output in favor of moveItem,
|
3544
3558
|
* when moving is restricted to one item through this.draggableItem.
|
@@ -3573,13 +3587,18 @@
|
|
3573
3587
|
this.moveToIndex.emit(event.currentIndex);
|
3574
3588
|
this.moveItem.emit({ item: event.item.data, index: event.currentIndex });
|
3575
3589
|
};
|
3590
|
+
DragAndDropListComponent.prototype.dropToIndex = function (item, previousIndex, currentIndex) {
|
3591
|
+
i3$3.moveItemInArray(this._items.toArray(), previousIndex, currentIndex);
|
3592
|
+
this.moveToIndex.emit(currentIndex);
|
3593
|
+
this.moveItem.emit({ item: item, index: currentIndex });
|
3594
|
+
};
|
3576
3595
|
DragAndDropListComponent.prototype.trackById = function (_index, item) {
|
3577
3596
|
return item[this.itemIdProperty];
|
3578
3597
|
};
|
3579
3598
|
return DragAndDropListComponent;
|
3580
3599
|
}());
|
3581
3600
|
DragAndDropListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.4", ngImport: i0__namespace, type: DragAndDropListComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
3582
|
-
DragAndDropListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.4", type: DragAndDropListComponent, selector: "lx-drag-and-drop-list", inputs: { label: "label", labelFontWeight: "labelFontWeight", items: "items", itemIdProperty: "itemIdProperty" }, outputs: { moveToIndex: "moveToIndex", moveItem: "moveItem" }, queries: [{ propertyName: "itemTemplateRef", first: true, predicate: ["itemTemplate"], descendants: true }, { propertyName: "_items", predicate: DragAndDropListItemComponent }], ngImport: i0__namespace, template: "<label *ngIf=\"label\" [style.font-weight]=\"labelFontWeight\">{{ label }}</label>\n<ul cdkDropList class=\"list\" [cdkDropListData]=\"items$ | async\" (cdkDropListDropped)=\"drop($event)\">\n <ng-container *ngIf=\"items; else contentChildList\">\n <li\n *ngFor=\"let item of items; let index = index; trackBy: trackById\"\n class=\"item\"\n cdkDrag\n cdkDragLockAxis=\"y\"\n [cdkDragData]=\"item[itemIdProperty!]\"\n >\n <ng-container *ngTemplateOutlet=\"itemTemplateRef; context: { $implicit: item, index: index }\"></ng-container>\n </li>\n </ng-container>\n <ng-template #contentChildList>\n <li\n *ngFor=\"let itemComponent of items$ | async\"\n class=\"item\"\n cdkDrag\n cdkDragLockAxis=\"y\"\n [cdkDragData]=\"itemComponent.item\"\n [cdkDragDisabled]=\"!itemComponent.draggable\"\n >\n <lx-drag-and-drop-list-item\n class=\"dragAndDropItem\"\n [item]=\"itemComponent.item\"\n [draggable]=\"itemComponent.draggable\"\n [actions]=\"itemComponent.actions\"\n (action)=\"emitContentChildAction($event)\"\n ></lx-drag-and-drop-list-item>\n </li>\n </ng-template>\n</ul>\n", styles: ["@-webkit-keyframes subtleScaleUpKeyFrames{0%{transform:scale(.95);opacity:0}}@keyframes subtleScaleUpKeyFrames{0%{transform:scale(.95);opacity:0}}:host{display:block}.list{list-style-type:none;width:100%;
|
3601
|
+
DragAndDropListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.4", type: DragAndDropListComponent, selector: "lx-drag-and-drop-list", inputs: { label: "label", labelFontWeight: "labelFontWeight", items: "items", itemIdProperty: "itemIdProperty", color: "color", fontSize: "fontSize" }, outputs: { moveToIndex: "moveToIndex", moveItem: "moveItem" }, host: { properties: { "attr.color": "this.color", "attr.fontSize": "this.fontSize" } }, queries: [{ propertyName: "itemTemplateRef", first: true, predicate: ["itemTemplate"], descendants: true }, { propertyName: "_items", predicate: DragAndDropListItemComponent }], ngImport: i0__namespace, template: "<label *ngIf=\"label\" [style.font-weight]=\"labelFontWeight\">{{ label }}</label>\n<ul cdkDropList class=\"list\" [cdkDropListData]=\"items$ | async\" (cdkDropListDropped)=\"drop($event)\">\n <ng-container *ngIf=\"items; else contentChildList\">\n <li\n *ngFor=\"let item of items; let index = index; trackBy: trackById\"\n class=\"item\"\n cdkDrag\n cdkDragLockAxis=\"y\"\n [cdkDragData]=\"item[itemIdProperty!]\"\n >\n <ng-container *ngTemplateOutlet=\"itemTemplateRef; context: { $implicit: item, index: index }\"></ng-container>\n </li>\n </ng-container>\n <ng-template #contentChildList>\n <li\n *ngFor=\"let itemComponent of items$ | async; let i = index; let length = count\"\n class=\"item\"\n cdkDrag\n cdkDragLockAxis=\"y\"\n [cdkDragData]=\"itemComponent.item\"\n [cdkDragDisabled]=\"!itemComponent.draggable\"\n [class.gray]=\"color === 'gray'\"\n [class.big]=\"fontSize === 'big'\"\n >\n <lx-drag-and-drop-list-item\n class=\"dragAndDropItem\"\n [item]=\"itemComponent.item\"\n [draggable]=\"itemComponent.draggable\"\n [actions]=\"itemComponent.actions\"\n (action)=\"emitContentChildAction($event)\"\n (moveToTop)=\"dropToIndex(itemComponent.item, i, 0)\"\n (moveUp)=\"dropToIndex(itemComponent.item, i, i - 1)\"\n (moveDown)=\"dropToIndex(itemComponent.item, i, i + 1)\"\n (moveToBottom)=\"dropToIndex(itemComponent.item, i, length)\"\n ></lx-drag-and-drop-list-item>\n </li>\n </ng-template>\n</ul>\n", styles: ["@-webkit-keyframes subtleScaleUpKeyFrames{0%{transform:scale(.95);opacity:0}}@keyframes subtleScaleUpKeyFrames{0%{transform:scale(.95);opacity:0}}:host{display:block}.list{list-style-type:none;width:100%;display:block;padding:0;color:#526179}.item.cdk-drag-disabled{background:#eaedf1;cursor:default}.item{cursor:move;border:1px solid #99a5bb;margin-bottom:4px;border-radius:3px}.cdk-drag-preview{box-sizing:border-box;border-radius:3px;list-style:none;border:1px solid #99a5bb!important;box-shadow:0 3px 4px hsla(0,0%,45%,.3)}.cdk-drag-placeholder{opacity:.5}.cdk-drag-placeholder i{opacity:0}.cdk-drag-animating,.list.cdk-drop-list-dragging .item:not(.cdk-drag-placeholder){transition:transform .18s;transition-delay:0s;transition-timing-function:ease}:host[color=gray] lx-drag-and-drop-list-item{background-color:#f0f2f5;color:#526179;border-radius:3px}:host[color=gray] .item,:host[color=gray] .list{border:0}:host[color=gray] .item.cdk-drag-disabled lx-drag-and-drop-list-item{background:#fff;color:#99a5bb;border:1px solid #99a5bb}:host[fontSize=big] .item{text-transform:uppercase;font-weight:700}.cdk-drag-preview.gray{border:0!important}.cdk-drag-preview.gray lx-drag-and-drop-list-item{background-color:#f0f2f5;color:#526179;border-radius:3px}.cdk-drag-preview.big{text-transform:uppercase;font-weight:700}"], components: [{ type: DragAndDropListItemComponent, selector: "lx-drag-and-drop-list-item", inputs: ["item", "draggable", "actions"], outputs: ["action", "moveToTop", "moveUp", "moveToBottom", "moveDown"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "id", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListAutoScrollDisabled", "cdkDropListOrientation", "cdkDropListLockAxis", "cdkDropListData", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragDisabled", "cdkDragStartDelay", "cdkDragLockAxis", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragBoundary", "cdkDragRootElement", "cdkDragPreviewContainer", "cdkDragData", "cdkDragFreeDragPosition"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i2__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i2__namespace.AsyncPipe } });
|
3583
3602
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.4", ngImport: i0__namespace, type: DragAndDropListComponent, decorators: [{
|
3584
3603
|
type: i0.Component,
|
3585
3604
|
args: [{
|
@@ -3595,6 +3614,16 @@
|
|
3595
3614
|
type: i0.Input
|
3596
3615
|
}], itemIdProperty: [{
|
3597
3616
|
type: i0.Input
|
3617
|
+
}], color: [{
|
3618
|
+
type: i0.Input
|
3619
|
+
}, {
|
3620
|
+
type: i0.HostBinding,
|
3621
|
+
args: ['attr.color']
|
3622
|
+
}], fontSize: [{
|
3623
|
+
type: i0.Input
|
3624
|
+
}, {
|
3625
|
+
type: i0.HostBinding,
|
3626
|
+
args: ['attr.fontSize']
|
3598
3627
|
}], moveToIndex: [{
|
3599
3628
|
type: i0.Output
|
3600
3629
|
}], moveItem: [{
|