@seniorsistemas/angular-components 17.9.0 → 17.9.2
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/seniorsistemas-angular-components.umd.js +138 -21
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/info-sign/info-sign.component.d.ts +1 -0
- package/components/info-sign/info-sign.directive.d.ts +1 -0
- package/components/kanban/components/kanban-column/kanban-column.component.d.ts +2 -0
- package/components/kanban/components/kanban-item/kanban-item.component.d.ts +7 -4
- package/components/kanban/kanban.component.d.ts +7 -5
- package/components/kanban/models/index.d.ts +1 -1
- package/components/kanban/models/kanban-data.d.ts +9 -2
- package/components/tooltip/tooltip.directive.d.ts +32 -2
- package/esm2015/components/info-sign/info-sign.component.js +2 -2
- package/esm2015/components/info-sign/info-sign.directive.js +5 -1
- package/esm2015/components/kanban/components/kanban-column/kanban-column.component.js +14 -2
- package/esm2015/components/kanban/components/kanban-item/kanban-item.component.js +20 -6
- package/esm2015/components/kanban/kanban.component.js +26 -18
- package/esm2015/components/kanban/models/index.js +1 -1
- package/esm2015/components/kanban/models/kanban-data.js +1 -1
- package/esm2015/components/tooltip/tooltip.directive.js +84 -8
- package/esm5/components/info-sign/info-sign.component.js +2 -2
- package/esm5/components/info-sign/info-sign.directive.js +5 -1
- package/esm5/components/kanban/components/kanban-column/kanban-column.component.js +16 -3
- package/esm5/components/kanban/components/kanban-item/kanban-item.component.js +22 -7
- package/esm5/components/kanban/kanban.component.js +26 -18
- package/esm5/components/kanban/models/index.js +1 -1
- package/esm5/components/kanban/models/kanban-data.js +1 -1
- package/esm5/components/tooltip/tooltip.directive.js +85 -8
- package/fesm2015/seniorsistemas-angular-components.js +136 -22
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +139 -22
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __awaiter, __param, __rest } from 'tslib';
|
|
2
|
-
import { EventEmitter, Input, Output, Component, ContentChildren, ViewChild, HostListener, forwardRef, NgModule, ɵɵdefineInjectable, Injectable, ElementRef, ApplicationRef, ComponentFactoryResolver, Injector, Directive, KeyValueDiffers, HostBinding,
|
|
2
|
+
import { EventEmitter, Input, Output, Component, ContentChildren, ViewChild, HostListener, forwardRef, NgModule, ɵɵdefineInjectable, Injectable, ElementRef, ApplicationRef, ComponentFactoryResolver, Injector, Renderer2, Directive, KeyValueDiffers, HostBinding, TemplateRef, InjectionToken, Inject, ViewEncapsulation, ViewContainerRef, ChangeDetectorRef, Pipe, ɵɵinject, ContentChild, Optional, ViewChildren } from '@angular/core';
|
|
3
3
|
import { trigger, transition, style as style$7, animate, state, group, query, animateChild } from '@angular/animations';
|
|
4
4
|
import { Subject, of, from, ReplaySubject, throwError, forkJoin } from 'rxjs';
|
|
5
5
|
import { takeUntil, tap, map, switchMap, catchError, first, filter, take, delay, debounceTime, repeat, finalize } from 'rxjs/operators';
|
|
@@ -415,12 +415,13 @@ var TooltipEvent;
|
|
|
415
415
|
})(TooltipEvent || (TooltipEvent = {}));
|
|
416
416
|
|
|
417
417
|
let TooltipDirective = class TooltipDirective {
|
|
418
|
-
constructor(elementRef, appRef, componentFactoryResolver, injector, debounceUtils) {
|
|
418
|
+
constructor(elementRef, appRef, componentFactoryResolver, injector, debounceUtils, renderer) {
|
|
419
419
|
this.elementRef = elementRef;
|
|
420
420
|
this.appRef = appRef;
|
|
421
421
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
422
422
|
this.injector = injector;
|
|
423
423
|
this.debounceUtils = debounceUtils;
|
|
424
|
+
this.renderer = renderer;
|
|
424
425
|
this.position = TooltipPosition.Top;
|
|
425
426
|
this.showDelay = 500;
|
|
426
427
|
this.tooltipEvent = TooltipEvent.Hover;
|
|
@@ -433,6 +434,7 @@ let TooltipDirective = class TooltipDirective {
|
|
|
433
434
|
}
|
|
434
435
|
ngOnInit() {
|
|
435
436
|
this.validatePosition();
|
|
437
|
+
this.updateTooltipVisibilityWhenFocusOnInput();
|
|
436
438
|
}
|
|
437
439
|
ngOnDestroy() {
|
|
438
440
|
this.destroy();
|
|
@@ -456,6 +458,58 @@ let TooltipDirective = class TooltipDirective {
|
|
|
456
458
|
isMousePositionOutsideOfElement(mouseX, mouseY, elementArea) {
|
|
457
459
|
return mouseX < elementArea.left || mouseX >= elementArea.right || mouseY < elementArea.top || mouseY >= elementArea.bottom;
|
|
458
460
|
}
|
|
461
|
+
/**
|
|
462
|
+
* Manipula a visibilidade do tooltip quando houver uma referência de input.
|
|
463
|
+
*/
|
|
464
|
+
updateTooltipVisibilityWhenFocusOnInput() {
|
|
465
|
+
if (this.focusedInputRef) {
|
|
466
|
+
const inputFocus = this.focusedInputRef;
|
|
467
|
+
const icon = this.getIconFromFocusedInput(inputFocus);
|
|
468
|
+
this.renderer.listen(inputFocus, 'focus', () => {
|
|
469
|
+
if (icon && this.isMatchingTooltip(icon)) {
|
|
470
|
+
this.createTootipByFocus(icon);
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
this.renderer.listen(inputFocus, 'blur', () => {
|
|
474
|
+
if (icon && this.isMatchingTooltip(icon)) {
|
|
475
|
+
this.removeTooltip(icon);
|
|
476
|
+
this.destroy();
|
|
477
|
+
}
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Obtém o elemento do ícone associado ao label do input em focus.
|
|
483
|
+
* @param focusedInput O input em focus.
|
|
484
|
+
* @returns O ícone do input em focus ou null.
|
|
485
|
+
*/
|
|
486
|
+
getIconFromFocusedInput(focusedInput) {
|
|
487
|
+
const label = document.querySelector(`label[for='${focusedInput.id}']`);
|
|
488
|
+
if (label) {
|
|
489
|
+
const icon = label.nextElementSibling;
|
|
490
|
+
return (icon === null || icon === void 0 ? void 0 : icon.classList.contains('info-sign__icon')) ? icon : null;
|
|
491
|
+
}
|
|
492
|
+
return null;
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Verifica se o ícone tem o tooltip correspondente ao atual.
|
|
496
|
+
* @param icon O ícone do input em focus.
|
|
497
|
+
* @returns true se o tooltip corresponde; caso contrário, false.
|
|
498
|
+
*/
|
|
499
|
+
isMatchingTooltip(icon) {
|
|
500
|
+
const tooltipText = icon.getAttribute('ng-reflect-tooltip');
|
|
501
|
+
return this.tooltip === tooltipText;
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Remove o tooltip associado ao ícone do input em focus.
|
|
505
|
+
* @param icon O ícone do input em focus.
|
|
506
|
+
*/
|
|
507
|
+
removeTooltip(icon) {
|
|
508
|
+
const tooltip = icon.querySelector('.tooltip');
|
|
509
|
+
if (tooltip) {
|
|
510
|
+
tooltip.remove();
|
|
511
|
+
}
|
|
512
|
+
}
|
|
459
513
|
// whenever the component with the tooltip is clicked I destroy the tooltip.
|
|
460
514
|
// whenever a key is pressed on the component with the tooltip I destroy the tooltip.
|
|
461
515
|
onClick() {
|
|
@@ -520,10 +574,7 @@ let TooltipDirective = class TooltipDirective {
|
|
|
520
574
|
createTootip() {
|
|
521
575
|
var _a;
|
|
522
576
|
if (this.componentRef === null && ((_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
523
|
-
const
|
|
524
|
-
this.componentRef = componentFactory.create(this.injector);
|
|
525
|
-
this.appRef.attachView(this.componentRef.hostView);
|
|
526
|
-
const domElem = this.componentRef.hostView.rootNodes[0];
|
|
577
|
+
const domElem = this.getDomElement();
|
|
527
578
|
document.body.appendChild(domElem);
|
|
528
579
|
this.setTooltipComponentProperties();
|
|
529
580
|
this.showTimeout = window.setTimeout(this.showTooltip.bind(this), this.showDelay);
|
|
@@ -533,6 +584,27 @@ let TooltipDirective = class TooltipDirective {
|
|
|
533
584
|
}
|
|
534
585
|
}
|
|
535
586
|
}
|
|
587
|
+
getDomElement() {
|
|
588
|
+
const componentFactory = this.componentFactoryResolver.resolveComponentFactory(TooltipComponent);
|
|
589
|
+
this.componentRef = componentFactory.create(this.injector);
|
|
590
|
+
this.appRef.attachView(this.componentRef.hostView);
|
|
591
|
+
return this.componentRef.hostView.rootNodes[0];
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* Cria um tooltip para o icone do input em focus.
|
|
595
|
+
*
|
|
596
|
+
* @param icon O ícone do input em focus.
|
|
597
|
+
*/
|
|
598
|
+
createTootipByFocus(icon) {
|
|
599
|
+
var _a;
|
|
600
|
+
if (this.componentRef === null && ((_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
601
|
+
const domElem = this.getDomElement();
|
|
602
|
+
const tooltip = domElem.querySelector('.tooltip');
|
|
603
|
+
icon.appendChild(tooltip);
|
|
604
|
+
this.setTooltipComponentProperties();
|
|
605
|
+
setTimeout(() => tooltip.classList.add("tooltip--visible"), 0);
|
|
606
|
+
}
|
|
607
|
+
}
|
|
536
608
|
showTooltip() {
|
|
537
609
|
if (this.componentRef !== null) {
|
|
538
610
|
this.componentRef.instance.visible = this.visible;
|
|
@@ -651,7 +723,8 @@ TooltipDirective.ctorParameters = () => [
|
|
|
651
723
|
{ type: ApplicationRef },
|
|
652
724
|
{ type: ComponentFactoryResolver },
|
|
653
725
|
{ type: Injector },
|
|
654
|
-
{ type: DebounceUtils }
|
|
726
|
+
{ type: DebounceUtils },
|
|
727
|
+
{ type: Renderer2 }
|
|
655
728
|
];
|
|
656
729
|
__decorate([
|
|
657
730
|
Input("sTooltip")
|
|
@@ -677,6 +750,9 @@ __decorate([
|
|
|
677
750
|
__decorate([
|
|
678
751
|
Input()
|
|
679
752
|
], TooltipDirective.prototype, "mobileBehavior", void 0);
|
|
753
|
+
__decorate([
|
|
754
|
+
Input()
|
|
755
|
+
], TooltipDirective.prototype, "focusedInputRef", void 0);
|
|
680
756
|
__decorate([
|
|
681
757
|
HostListener("click"),
|
|
682
758
|
HostListener("keydown")
|
|
@@ -6174,7 +6250,7 @@ let InfoSignComponent = class InfoSignComponent {
|
|
|
6174
6250
|
InfoSignComponent = __decorate([
|
|
6175
6251
|
Component({
|
|
6176
6252
|
selector: "s-info-sign-component",
|
|
6177
|
-
template: "<span class=\"info-sign\">\n <span *ngTemplateOutlet=\"templateRef\"></span>\n <i\n class=\"info-sign__icon fa fa-info-circle\"\n aria-hidden=\"true\"\n [sTooltip]=\"tooltip\"\n [escape]=\"false\"\n tooltipPosition=\"top\"\n [displayTime]=\"displayTime\"\n mobileBehavior=\"tap\"\n showDelay=\"0\">\n </i>\n</span
|
|
6253
|
+
template: "<span class=\"info-sign\">\n <span *ngTemplateOutlet=\"templateRef\"></span>\n <i\n class=\"info-sign__icon fa fa-info-circle\"\n aria-hidden=\"true\"\n [sTooltip]=\"tooltip\"\n [escape]=\"false\"\n tooltipPosition=\"top\"\n [displayTime]=\"displayTime\"\n mobileBehavior=\"tap\"\n showDelay=\"0\"\n [focusedInputRef]=\"focusedInputRef\">\n </i>\n</span>\n",
|
|
6178
6254
|
styles: [".info-sign{-ms-flex-align:baseline;align-items:baseline;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:start;justify-content:flex-start}.info-sign .info-sign__icon{padding:0 12px}"]
|
|
6179
6255
|
})
|
|
6180
6256
|
], InfoSignComponent);
|
|
@@ -6194,6 +6270,7 @@ let InfoSignDirective = class InfoSignDirective {
|
|
|
6194
6270
|
this.componentRef.instance.templateRef = this.templateRef;
|
|
6195
6271
|
this.componentRef.instance.tooltip = this.sInfoSign;
|
|
6196
6272
|
this.componentRef.instance.displayTime = this.displayTime;
|
|
6273
|
+
this.componentRef.instance.focusedInputRef = this.focusedInputRef;
|
|
6197
6274
|
}
|
|
6198
6275
|
else if (this.componentRef && this.sInfoSign) {
|
|
6199
6276
|
this.componentRef.instance.tooltip = this.sInfoSign;
|
|
@@ -6220,6 +6297,9 @@ __decorate([
|
|
|
6220
6297
|
__decorate([
|
|
6221
6298
|
Input('sInfoSignDisplayTime')
|
|
6222
6299
|
], InfoSignDirective.prototype, "displayTime", void 0);
|
|
6300
|
+
__decorate([
|
|
6301
|
+
Input('sInfoSignFocusedInputRef')
|
|
6302
|
+
], InfoSignDirective.prototype, "focusedInputRef", void 0);
|
|
6223
6303
|
InfoSignDirective = __decorate([
|
|
6224
6304
|
Directive({
|
|
6225
6305
|
selector: "[sInfoSign]",
|
|
@@ -13467,6 +13547,8 @@ var KanbanTemplateTypes;
|
|
|
13467
13547
|
let KanbanComponent = class KanbanComponent {
|
|
13468
13548
|
constructor(kanbanEventService) {
|
|
13469
13549
|
this.kanbanEventService = kanbanEventService;
|
|
13550
|
+
this.showItemCheckboxes = true;
|
|
13551
|
+
this.showColumnCheckboxes = true;
|
|
13470
13552
|
this.itemsMoved = new EventEmitter();
|
|
13471
13553
|
this.dataUpdated = new EventEmitter();
|
|
13472
13554
|
this.itemsSelected = new EventEmitter();
|
|
@@ -13525,6 +13607,8 @@ let KanbanComponent = class KanbanComponent {
|
|
|
13525
13607
|
this.selectedItems.clear();
|
|
13526
13608
|
}
|
|
13527
13609
|
selectItem(event, item, column) {
|
|
13610
|
+
if (item.disabled || item.frozen)
|
|
13611
|
+
return;
|
|
13528
13612
|
if (event.ctrlKey) {
|
|
13529
13613
|
if (this.selectedItems.delete(item)) {
|
|
13530
13614
|
this.kanbanEventService.emitUnselectItemEvent(item);
|
|
@@ -13539,6 +13623,8 @@ let KanbanComponent = class KanbanComponent {
|
|
|
13539
13623
|
}
|
|
13540
13624
|
}
|
|
13541
13625
|
else {
|
|
13626
|
+
if (this.selectedItems.delete(item))
|
|
13627
|
+
return;
|
|
13542
13628
|
this.selectedItems.clear();
|
|
13543
13629
|
this.selectedItems.add(item);
|
|
13544
13630
|
this.selectedColumn = column;
|
|
@@ -13554,9 +13640,7 @@ let KanbanComponent = class KanbanComponent {
|
|
|
13554
13640
|
this.draggingItems.clear();
|
|
13555
13641
|
}
|
|
13556
13642
|
getLinkedColumns(currentColumn) {
|
|
13557
|
-
return this.data.columns
|
|
13558
|
-
.filter((column) => column != currentColumn)
|
|
13559
|
-
.map((column) => column.id);
|
|
13643
|
+
return this.data.columns.filter((column) => column != currentColumn).map((column) => column.id);
|
|
13560
13644
|
}
|
|
13561
13645
|
getColumnHeaderTemplate() {
|
|
13562
13646
|
return this._getCustomTemplate(KanbanTemplateTypes.ColumnHeader);
|
|
@@ -13582,7 +13666,7 @@ let KanbanComponent = class KanbanComponent {
|
|
|
13582
13666
|
.pipe(takeUntil(this._unsubscribe$))
|
|
13583
13667
|
.subscribe((column) => {
|
|
13584
13668
|
column.items
|
|
13585
|
-
.filter((item) => !item.disabled)
|
|
13669
|
+
.filter((item) => !item.disabled && !item.frozen)
|
|
13586
13670
|
.forEach((item) => {
|
|
13587
13671
|
this.selectedItems.add(item);
|
|
13588
13672
|
});
|
|
@@ -13612,9 +13696,7 @@ let KanbanComponent = class KanbanComponent {
|
|
|
13612
13696
|
});
|
|
13613
13697
|
});
|
|
13614
13698
|
});
|
|
13615
|
-
this.kanbanEventService.unselectItemEvent
|
|
13616
|
-
.pipe(takeUntil(this._unsubscribe$))
|
|
13617
|
-
.subscribe((item) => {
|
|
13699
|
+
this.kanbanEventService.unselectItemEvent.pipe(takeUntil(this._unsubscribe$)).subscribe((item) => {
|
|
13618
13700
|
this.selectedItems.delete(item);
|
|
13619
13701
|
});
|
|
13620
13702
|
}
|
|
@@ -13644,6 +13726,12 @@ KanbanComponent.ctorParameters = () => [
|
|
|
13644
13726
|
__decorate([
|
|
13645
13727
|
Input()
|
|
13646
13728
|
], KanbanComponent.prototype, "data", void 0);
|
|
13729
|
+
__decorate([
|
|
13730
|
+
Input()
|
|
13731
|
+
], KanbanComponent.prototype, "showItemCheckboxes", void 0);
|
|
13732
|
+
__decorate([
|
|
13733
|
+
Input()
|
|
13734
|
+
], KanbanComponent.prototype, "showColumnCheckboxes", void 0);
|
|
13647
13735
|
__decorate([
|
|
13648
13736
|
Output()
|
|
13649
13737
|
], KanbanComponent.prototype, "itemsMoved", void 0);
|
|
@@ -13658,26 +13746,35 @@ __decorate([
|
|
|
13658
13746
|
], KanbanComponent.prototype, "templates", void 0);
|
|
13659
13747
|
KanbanComponent = __decorate([
|
|
13660
13748
|
Component({
|
|
13661
|
-
selector:
|
|
13662
|
-
template: "<div class=\"kanban\">\n <s-kanban-column\n *ngFor=\"let column of data.columns\"\n [data]=\"column\"\n [headerTemplate]=\"columnHeaderTemplate\">\n <div\n [id]=\"column.id\"\n style=\"height: 100%; width: 100%;\"\n cdkDropList\n #dynamicList=\"cdkDropList\"\n [cdkDropListData]=\"column.items\"\n [cdkDropListConnectedTo]=\"getLinkedColumns(column)\"\n (cdkDropListDropped)=\"drop($event)\">\n\n <ng-container *ngIf=\"!columnEmptyMessageTemplate; then defaultEmptyMessageTemplate else customEmptyMessageTemplate\"></ng-container>\n\n <ng-template #defaultEmptyMessageTemplate>\n <div *ngIf=\"!column.items.length\" class=\"empty-message\">\n <p class=\"text\">\n <span class=\"fas fa-clock\"></span> \n <span>{{ \"platform.angular_components.count_items_in_target\" | translate:{ count: column.items.length, target: column.title } }}</span>\n </p>\n </div>\n </ng-template>\n\n <ng-template #customEmptyMessageTemplate>\n <ng-container *ngTemplateOutlet=\"columnEmptyMessageTemplate; context: { $implicit: column }\"></ng-container>\n </ng-template>\n\n <div\n *ngFor=\"let item of column.items\"\n cdkDrag\n [cdkDragData]=\"item\"\n [cdkDragDisabled]=\"item.disabled\"\n (cdkDragStarted)=\"dragStarted()\"\n (cdkDragReleased)=\"dragReleased()\"\n (click)=\"selectItem($event, item, column)\">\n \n <ng-container *ngTemplateOutlet=\"itemTemplate\"></ng-container>\n\n <ng-container *cdkDragPreview>\n <ng-container *ngIf=\"selectedItems.size > 1; then itemDraggingTemplate else itemTemplate\"></ng-container>\n </ng-container>\n\n <ng-template #itemTemplate>\n <s-kanban-item\n [item]=\"item\"\n [selected]=\"selectedItems.has(item)\"\n [headerTemplate]=\"itemHeaderTemplate\"\n [bodyTemplate]=\"itemBodyTemplate\"\n [footerTemplate]=\"itemFooterTemplate\">\n </s-kanban-item>\n </ng-template>\n\n <ng-template #itemDraggingTemplate>\n <s-kanban-item-dragging [quantityItems]=\"selectedItems.size\"></s-kanban-item-dragging>\n </ng-template>\n\n <div *cdkDragPlaceholder>\n <div class=\"placeholder\">\n <div class=\"placeholder-line\"></div>\n </div>\n </div>\n </div>\n </div>\n </s-kanban-column>\n</div>\n\n",
|
|
13663
|
-
styles: [".kanban{display:-ms-flexbox;display:flex;gap:16px;width:100%}.kanban .empty-message{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:16px}.kanban .empty-message .text{overflow:hidden;text-align:center;text-overflow:ellipsis;width:100%;white-space:nowrap}@media screen and (max-width:600px){.kanban{-ms-flex-direction:column;flex-direction:column}}s-kanban-column{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;min-width:292px}.placeholder{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.placeholder .placeholder-line{background-color:#a5a5b2;height:1px;margin:6px 0;width:50%}"]
|
|
13749
|
+
selector: "s-kanban",
|
|
13750
|
+
template: "<div class=\"kanban\">\n <s-kanban-column\n *ngFor=\"let column of data.columns\"\n [data]=\"column\"\n [showCheckbox]=\"showColumnCheckboxes\"\n [headerTemplate]=\"columnHeaderTemplate\">\n <div\n [id]=\"column.id\"\n style=\"height: 100%; width: 100%;\"\n cdkDropList\n #dynamicList=\"cdkDropList\"\n [cdkDropListData]=\"column.items\"\n [cdkDropListConnectedTo]=\"getLinkedColumns(column)\"\n (cdkDropListDropped)=\"drop($event)\">\n\n <ng-container *ngIf=\"!columnEmptyMessageTemplate; then defaultEmptyMessageTemplate else customEmptyMessageTemplate\"></ng-container>\n\n <ng-template #defaultEmptyMessageTemplate>\n <div *ngIf=\"!column.items.length\" class=\"empty-message\">\n <p class=\"text\">\n <span class=\"fas fa-clock\"></span> \n <span>{{ \"platform.angular_components.count_items_in_target\" | translate:{ count: column.items.length, target: column.title } }}</span>\n </p>\n </div>\n </ng-template>\n\n <ng-template #customEmptyMessageTemplate>\n <ng-container *ngTemplateOutlet=\"columnEmptyMessageTemplate; context: { $implicit: column }\"></ng-container>\n </ng-template>\n\n <div\n *ngFor=\"let item of column.items\"\n cdkDrag\n [cdkDragData]=\"item\"\n [cdkDragDisabled]=\"item.disabled || item.frozen\"\n (cdkDragStarted)=\"dragStarted()\"\n (cdkDragReleased)=\"dragReleased()\"\n (click)=\"selectItem($event, item, column)\">\n \n <ng-container *ngTemplateOutlet=\"itemTemplate\"></ng-container>\n\n <ng-container *cdkDragPreview>\n <ng-container *ngIf=\"selectedItems.size > 1; then itemDraggingTemplate else itemTemplate\"></ng-container>\n </ng-container>\n\n <ng-template #itemTemplate>\n <s-kanban-item\n [item]=\"item\"\n [selected]=\"selectedItems.has(item)\"\n [showCheckbox]=\"showItemCheckboxes\"\n [headerTemplate]=\"itemHeaderTemplate\"\n [bodyTemplate]=\"itemBodyTemplate\"\n [footerTemplate]=\"itemFooterTemplate\">\n </s-kanban-item>\n </ng-template>\n\n <ng-template #itemDraggingTemplate>\n <s-kanban-item-dragging [quantityItems]=\"selectedItems.size\"></s-kanban-item-dragging>\n </ng-template>\n\n <div *cdkDragPlaceholder>\n <div class=\"placeholder\">\n <div class=\"placeholder-line\"></div>\n </div>\n </div>\n </div>\n </div>\n </s-kanban-column>\n</div>\n\n",
|
|
13751
|
+
styles: [".kanban{display:-ms-flexbox;display:flex;gap:16px;overflow:auto;width:100%}.kanban .empty-message{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:16px}.kanban .empty-message .text{overflow:hidden;text-align:center;text-overflow:ellipsis;width:100%;white-space:nowrap}@media screen and (max-width:600px){.kanban{-ms-flex-direction:column;flex-direction:column}}s-kanban-column{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;min-width:292px}.placeholder{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.placeholder .placeholder-line{background-color:#a5a5b2;height:1px;margin:6px 0;width:50%}"]
|
|
13664
13752
|
})
|
|
13665
13753
|
], KanbanComponent);
|
|
13666
13754
|
|
|
13667
13755
|
let KanbanColumnComponent = class KanbanColumnComponent {
|
|
13668
13756
|
constructor(kanbanEventService) {
|
|
13669
13757
|
this.kanbanEventService = kanbanEventService;
|
|
13758
|
+
this.showCheckbox = true;
|
|
13670
13759
|
this.selectionControl = new FormControl(false);
|
|
13671
13760
|
this._unsubscribe$ = new Subject();
|
|
13672
13761
|
}
|
|
13673
13762
|
ngOnInit() {
|
|
13674
13763
|
this._validateInputs();
|
|
13675
13764
|
this._subscriveEvents();
|
|
13765
|
+
this._createTieredOptions();
|
|
13676
13766
|
}
|
|
13677
13767
|
ngOnDestroy() {
|
|
13678
13768
|
this._unsubscribe$.next();
|
|
13679
13769
|
this._unsubscribe$.complete();
|
|
13680
13770
|
}
|
|
13771
|
+
_createTieredOptions() {
|
|
13772
|
+
const options = [];
|
|
13773
|
+
this.data.options.forEach((option) => {
|
|
13774
|
+
options.push(Object.assign(Object.assign({}, option), { command: () => { option.command(this.data); } }));
|
|
13775
|
+
});
|
|
13776
|
+
this.data.options = options;
|
|
13777
|
+
}
|
|
13681
13778
|
_subscriveEvents() {
|
|
13682
13779
|
this.selectionControl.valueChanges
|
|
13683
13780
|
.pipe(takeUntil(this._unsubscribe$))
|
|
@@ -13728,13 +13825,16 @@ KanbanColumnComponent.ctorParameters = () => [
|
|
|
13728
13825
|
__decorate([
|
|
13729
13826
|
Input()
|
|
13730
13827
|
], KanbanColumnComponent.prototype, "data", void 0);
|
|
13828
|
+
__decorate([
|
|
13829
|
+
Input()
|
|
13830
|
+
], KanbanColumnComponent.prototype, "showCheckbox", void 0);
|
|
13731
13831
|
__decorate([
|
|
13732
13832
|
Input()
|
|
13733
13833
|
], KanbanColumnComponent.prototype, "headerTemplate", void 0);
|
|
13734
13834
|
KanbanColumnComponent = __decorate([
|
|
13735
13835
|
Component({
|
|
13736
13836
|
selector: "s-kanban-column",
|
|
13737
|
-
template: "<div class=\"kanban-column\">\n <div class=\"kanban-column__header\">\n <div class=\"content\">\n <form>\n <input\n type=\"checkbox\"\n name=\"checkbox\"\n [formControl]=\"selectionControl\">\n </form>\n\n <ng-container *ngIf=\"!headerTemplate; then defaultHeaderTemplate else customHeaderTemplate\"></ng-container>\n \n <ng-template #defaultHeaderTemplate>\n <div class=\"header\">\n <span class=\"title\">{{ data.title }} ({{ data.items.length }})</span>\n </div>\n </ng-template>\n \n <ng-template #customHeaderTemplate>\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { $implicit: data }\"></ng-container>\n </ng-template>\n </div>\n <s-button\n *ngIf=\"data.options\"\n priority=\"default\"\n [disabled]=\"false\"\n [auxiliary]=\"true\"\n size=\"small\"\n [model]=\"data.options\">\n </s-button>\n </div>\n <div class=\"kanban-column__body\">\n <ng-content></ng-content>\n </div>\n</div>",
|
|
13837
|
+
template: "<div class=\"kanban-column\">\n <div class=\"kanban-column__header\">\n <div class=\"content\">\n <form>\n <input\n *ngIf=\"showCheckbox\"\n type=\"checkbox\"\n name=\"checkbox\"\n [formControl]=\"selectionControl\">\n </form>\n\n <ng-container *ngIf=\"!headerTemplate; then defaultHeaderTemplate else customHeaderTemplate\"></ng-container>\n \n <ng-template #defaultHeaderTemplate>\n <div class=\"header\">\n <span class=\"title\">{{ data.title }} ({{ data.items.length }})</span>\n </div>\n </ng-template>\n \n <ng-template #customHeaderTemplate>\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { $implicit: data }\"></ng-container>\n </ng-template>\n </div>\n <s-button\n *ngIf=\"data.options\"\n priority=\"default\"\n [disabled]=\"false\"\n [auxiliary]=\"true\"\n size=\"small\"\n [model]=\"data.options\">\n </s-button>\n </div>\n <div class=\"kanban-column__body\">\n <ng-content></ng-content>\n </div>\n</div>",
|
|
13738
13838
|
styles: [".kanban-column{-ms-flex-align:center;align-items:center;background-color:#fbfafc;border:1px solid #dedce5;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;min-height:120px;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:100%}.kanban-column .kanban-column__header{-ms-flex-align:center;align-items:center;border-bottom:1px solid #dedce5;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:16px 16px 8px;width:100%}.kanban-column .kanban-column__header .content{display:-ms-flexbox;display:flex;gap:16px}.kanban-column .kanban-column__header .content .teste{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:\"Open Sans\" sans-serif}.kanban-column .kanban-column__header .content .teste .title{font-size:14px;font-weight:800}.kanban-column .kanban-column__header .content .teste .description{font-size:12px}.kanban-column .kanban-column__body{display:-ms-flexbox;display:flex;height:100%;-ms-flex-pack:center;justify-content:center;width:100%}"]
|
|
13739
13839
|
})
|
|
13740
13840
|
], KanbanColumnComponent);
|
|
@@ -13759,6 +13859,10 @@ let KanbanItemComponent = class KanbanItemComponent {
|
|
|
13759
13859
|
constructor(_kanbanEventService) {
|
|
13760
13860
|
this._kanbanEventService = _kanbanEventService;
|
|
13761
13861
|
this.selected = false;
|
|
13862
|
+
this.showCheckbox = true;
|
|
13863
|
+
}
|
|
13864
|
+
ngOnInit() {
|
|
13865
|
+
this._createTieredOptions();
|
|
13762
13866
|
}
|
|
13763
13867
|
onSelectedChange(value) {
|
|
13764
13868
|
if (value) {
|
|
@@ -13768,6 +13872,13 @@ let KanbanItemComponent = class KanbanItemComponent {
|
|
|
13768
13872
|
this._kanbanEventService.emitUnselectItemEvent(this.item);
|
|
13769
13873
|
}
|
|
13770
13874
|
}
|
|
13875
|
+
_createTieredOptions() {
|
|
13876
|
+
const options = [];
|
|
13877
|
+
this.item.options.forEach((option) => {
|
|
13878
|
+
options.push(Object.assign(Object.assign({}, option), { command: () => { option.command(this.item); } }));
|
|
13879
|
+
});
|
|
13880
|
+
this.item.options = options;
|
|
13881
|
+
}
|
|
13771
13882
|
};
|
|
13772
13883
|
KanbanItemComponent.ctorParameters = () => [
|
|
13773
13884
|
{ type: KanbanEventService }
|
|
@@ -13778,6 +13889,9 @@ __decorate([
|
|
|
13778
13889
|
__decorate([
|
|
13779
13890
|
Input()
|
|
13780
13891
|
], KanbanItemComponent.prototype, "selected", void 0);
|
|
13892
|
+
__decorate([
|
|
13893
|
+
Input()
|
|
13894
|
+
], KanbanItemComponent.prototype, "showCheckbox", void 0);
|
|
13781
13895
|
__decorate([
|
|
13782
13896
|
Input()
|
|
13783
13897
|
], KanbanItemComponent.prototype, "headerTemplate", void 0);
|
|
@@ -13789,9 +13903,9 @@ __decorate([
|
|
|
13789
13903
|
], KanbanItemComponent.prototype, "footerTemplate", void 0);
|
|
13790
13904
|
KanbanItemComponent = __decorate([
|
|
13791
13905
|
Component({
|
|
13792
|
-
selector:
|
|
13793
|
-
template: "<p-tieredMenu\n #optionsMenu\n [popup]=\"true\"\n appendTo=\"body\"\n [baseZIndex]=\"9999\"\n [model]=\"item.options\">\n</p-tieredMenu>\n\n<div\n class=\"kanban-item\"\n [ngClass]=\"{\n 'kanban-item--selected': selected && !item.disabled,\n 'kanban-item--disabled': item.disabled\n }\">\n <div class=\"kanban-item__header\">\n <div class=\"content\">\n <form>\n <input\n *ngIf=\"!item.disabled\"\n type=\"checkbox\"\n name=\"checkbox\"\n [(ngModel)]=\"selected\"\n (ngModelChange)=\"onSelectedChange($event)\"\n (click)=\"$event.stopPropagation()\">\n </form>\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { $implicit: item }\"></ng-container>\n </div>\n <button\n *ngIf=\"item.options && !item.disabled\"\n class=\"options-button\"\n (click)=\"optionsMenu.toggle($event); $event.stopPropagation();\">\n <i class=\"fas fa-ellipsis-v\"></i>\n </button>\n </div>\n <div class=\"kanban-item__body\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: { $implicit: item }\"></ng-container>\n </div>\n <div *ngIf=\"footerTemplate\" class=\"kanban-item__footer\">\n <ng-container *ngTemplateOutlet=\"footerTemplate; context: { $implicit: item }\"></ng-container> \n </div>\n</div>",
|
|
13794
|
-
styles: [".kanban-item{background-color:#fff;border-radius:4px;box-shadow:0 1px 5px 0 rgba(0,0,0,.25);cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:16px;min-width:260px;padding:16px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.kanban-item .kanban-item__header{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.kanban-item .kanban-item__header .content{display:-ms-flexbox;display:flex;gap:16px}.kanban-item .kanban-item__header .options-button{background-color:transparent;border:none;cursor:pointer;margin-right:-8px;padding:0 8px}.kanban-item .kanban-item__body{margin:16px 0}.kanban-item .kanban-item__footer{border-top:1px solid #dedce5;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.kanban-item .kanban-item__footer .date-info{-ms-flex-align:center;align-items:center;color:#6e7280;display:-ms-flexbox;display:flex;font-family:\"Open Sans\" sans-serif;font-size:12px;gap:4px;line-height:150%}.kanban-item--selected{border:1px solid #428bca}.kanban-item--disabled{opacity:50%}"]
|
|
13906
|
+
selector: "s-kanban-item",
|
|
13907
|
+
template: "<p-tieredMenu\n #optionsMenu\n [popup]=\"true\"\n appendTo=\"body\"\n [baseZIndex]=\"9999\"\n [model]=\"item.options\">\n</p-tieredMenu>\n\n<div\n class=\"kanban-item\"\n [ngClass]=\"{\n 'kanban-item--selected': selected && !item.disabled,\n 'kanban-item--disabled': item.disabled,\n 'kanban-item--frozen': !item.disabled && item.frozen\n }\">\n <div class=\"kanban-item__header\">\n <div class=\"content\">\n <form>\n <input\n *ngIf=\"showCheckbox && !item.disabled && !item.frozen\"\n type=\"checkbox\"\n name=\"checkbox\"\n [(ngModel)]=\"selected\"\n (ngModelChange)=\"onSelectedChange($event)\"\n (click)=\"$event.stopPropagation()\">\n </form>\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { $implicit: item }\"></ng-container>\n </div>\n <button\n *ngIf=\"item.options && !item.disabled\"\n class=\"options-button\"\n (click)=\"optionsMenu.toggle($event); $event.stopPropagation();\">\n <i class=\"fas fa-ellipsis-v\"></i>\n </button>\n </div>\n <div class=\"kanban-item__body\">\n <ng-container *ngTemplateOutlet=\"bodyTemplate; context: { $implicit: item }\"></ng-container>\n </div>\n <div *ngIf=\"footerTemplate\" class=\"kanban-item__footer\">\n <ng-container *ngTemplateOutlet=\"footerTemplate; context: { $implicit: item }\"></ng-container> \n </div>\n</div>",
|
|
13908
|
+
styles: [".kanban-item{background-color:#fff;border-radius:4px;box-shadow:0 1px 5px 0 rgba(0,0,0,.25);cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:16px;min-width:260px;padding:16px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.kanban-item .kanban-item__header{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.kanban-item .kanban-item__header .content{display:-ms-flexbox;display:flex;gap:16px}.kanban-item .kanban-item__header .options-button{background-color:transparent;border:none;cursor:pointer;margin-right:-8px;padding:0 8px}.kanban-item .kanban-item__body{margin:16px 0}.kanban-item .kanban-item__footer{border-top:1px solid #dedce5;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.kanban-item .kanban-item__footer .date-info{-ms-flex-align:center;align-items:center;color:#6e7280;display:-ms-flexbox;display:flex;font-family:\"Open Sans\" sans-serif;font-size:12px;gap:4px;line-height:150%}.kanban-item--selected{border:1px solid #428bca}.kanban-item--disabled{opacity:50%}.kanban-item--frozen{box-shadow:none}"]
|
|
13795
13909
|
})
|
|
13796
13910
|
], KanbanItemComponent);
|
|
13797
13911
|
|