@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.
Files changed (34) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +138 -21
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/info-sign/info-sign.component.d.ts +1 -0
  6. package/components/info-sign/info-sign.directive.d.ts +1 -0
  7. package/components/kanban/components/kanban-column/kanban-column.component.d.ts +2 -0
  8. package/components/kanban/components/kanban-item/kanban-item.component.d.ts +7 -4
  9. package/components/kanban/kanban.component.d.ts +7 -5
  10. package/components/kanban/models/index.d.ts +1 -1
  11. package/components/kanban/models/kanban-data.d.ts +9 -2
  12. package/components/tooltip/tooltip.directive.d.ts +32 -2
  13. package/esm2015/components/info-sign/info-sign.component.js +2 -2
  14. package/esm2015/components/info-sign/info-sign.directive.js +5 -1
  15. package/esm2015/components/kanban/components/kanban-column/kanban-column.component.js +14 -2
  16. package/esm2015/components/kanban/components/kanban-item/kanban-item.component.js +20 -6
  17. package/esm2015/components/kanban/kanban.component.js +26 -18
  18. package/esm2015/components/kanban/models/index.js +1 -1
  19. package/esm2015/components/kanban/models/kanban-data.js +1 -1
  20. package/esm2015/components/tooltip/tooltip.directive.js +84 -8
  21. package/esm5/components/info-sign/info-sign.component.js +2 -2
  22. package/esm5/components/info-sign/info-sign.directive.js +5 -1
  23. package/esm5/components/kanban/components/kanban-column/kanban-column.component.js +16 -3
  24. package/esm5/components/kanban/components/kanban-item/kanban-item.component.js +22 -7
  25. package/esm5/components/kanban/kanban.component.js +26 -18
  26. package/esm5/components/kanban/models/index.js +1 -1
  27. package/esm5/components/kanban/models/kanban-data.js +1 -1
  28. package/esm5/components/tooltip/tooltip.directive.js +85 -8
  29. package/fesm2015/seniorsistemas-angular-components.js +136 -22
  30. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  31. package/fesm5/seniorsistemas-angular-components.js +139 -22
  32. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  33. package/package.json +1 -1
  34. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -591,13 +591,14 @@
591
591
  })(TooltipEvent || (TooltipEvent = {}));
592
592
 
593
593
  var TooltipDirective = /** @class */ (function () {
594
- function TooltipDirective(elementRef, appRef, componentFactoryResolver, injector, debounceUtils) {
594
+ function TooltipDirective(elementRef, appRef, componentFactoryResolver, injector, debounceUtils, renderer) {
595
595
  var _this = this;
596
596
  this.elementRef = elementRef;
597
597
  this.appRef = appRef;
598
598
  this.componentFactoryResolver = componentFactoryResolver;
599
599
  this.injector = injector;
600
600
  this.debounceUtils = debounceUtils;
601
+ this.renderer = renderer;
601
602
  this.position = exports.TooltipPosition.Top;
602
603
  this.showDelay = 500;
603
604
  this.tooltipEvent = TooltipEvent.Hover;
@@ -610,6 +611,7 @@
610
611
  }
611
612
  TooltipDirective.prototype.ngOnInit = function () {
612
613
  this.validatePosition();
614
+ this.updateTooltipVisibilityWhenFocusOnInput();
613
615
  };
614
616
  TooltipDirective.prototype.ngOnDestroy = function () {
615
617
  this.destroy();
@@ -633,6 +635,59 @@
633
635
  TooltipDirective.prototype.isMousePositionOutsideOfElement = function (mouseX, mouseY, elementArea) {
634
636
  return mouseX < elementArea.left || mouseX >= elementArea.right || mouseY < elementArea.top || mouseY >= elementArea.bottom;
635
637
  };
638
+ /**
639
+ * Manipula a visibilidade do tooltip quando houver uma referência de input.
640
+ */
641
+ TooltipDirective.prototype.updateTooltipVisibilityWhenFocusOnInput = function () {
642
+ var _this = this;
643
+ if (this.focusedInputRef) {
644
+ var inputFocus = this.focusedInputRef;
645
+ var icon_1 = this.getIconFromFocusedInput(inputFocus);
646
+ this.renderer.listen(inputFocus, 'focus', function () {
647
+ if (icon_1 && _this.isMatchingTooltip(icon_1)) {
648
+ _this.createTootipByFocus(icon_1);
649
+ }
650
+ });
651
+ this.renderer.listen(inputFocus, 'blur', function () {
652
+ if (icon_1 && _this.isMatchingTooltip(icon_1)) {
653
+ _this.removeTooltip(icon_1);
654
+ _this.destroy();
655
+ }
656
+ });
657
+ }
658
+ };
659
+ /**
660
+ * Obtém o elemento do ícone associado ao label do input em focus.
661
+ * @param focusedInput O input em focus.
662
+ * @returns O ícone do input em focus ou null.
663
+ */
664
+ TooltipDirective.prototype.getIconFromFocusedInput = function (focusedInput) {
665
+ var label = document.querySelector("label[for='" + focusedInput.id + "']");
666
+ if (label) {
667
+ var icon = label.nextElementSibling;
668
+ return (icon === null || icon === void 0 ? void 0 : icon.classList.contains('info-sign__icon')) ? icon : null;
669
+ }
670
+ return null;
671
+ };
672
+ /**
673
+ * Verifica se o ícone tem o tooltip correspondente ao atual.
674
+ * @param icon O ícone do input em focus.
675
+ * @returns true se o tooltip corresponde; caso contrário, false.
676
+ */
677
+ TooltipDirective.prototype.isMatchingTooltip = function (icon) {
678
+ var tooltipText = icon.getAttribute('ng-reflect-tooltip');
679
+ return this.tooltip === tooltipText;
680
+ };
681
+ /**
682
+ * Remove o tooltip associado ao ícone do input em focus.
683
+ * @param icon O ícone do input em focus.
684
+ */
685
+ TooltipDirective.prototype.removeTooltip = function (icon) {
686
+ var tooltip = icon.querySelector('.tooltip');
687
+ if (tooltip) {
688
+ tooltip.remove();
689
+ }
690
+ };
636
691
  // whenever the component with the tooltip is clicked I destroy the tooltip.
637
692
  // whenever a key is pressed on the component with the tooltip I destroy the tooltip.
638
693
  TooltipDirective.prototype.onClick = function () {
@@ -697,10 +752,7 @@
697
752
  TooltipDirective.prototype.createTootip = function () {
698
753
  var _a;
699
754
  if (this.componentRef === null && ((_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.length)) {
700
- var componentFactory = this.componentFactoryResolver.resolveComponentFactory(TooltipComponent);
701
- this.componentRef = componentFactory.create(this.injector);
702
- this.appRef.attachView(this.componentRef.hostView);
703
- var domElem = this.componentRef.hostView.rootNodes[0];
755
+ var domElem = this.getDomElement();
704
756
  document.body.appendChild(domElem);
705
757
  this.setTooltipComponentProperties();
706
758
  this.showTimeout = window.setTimeout(this.showTooltip.bind(this), this.showDelay);
@@ -710,6 +762,27 @@
710
762
  }
711
763
  }
712
764
  };
765
+ TooltipDirective.prototype.getDomElement = function () {
766
+ var componentFactory = this.componentFactoryResolver.resolveComponentFactory(TooltipComponent);
767
+ this.componentRef = componentFactory.create(this.injector);
768
+ this.appRef.attachView(this.componentRef.hostView);
769
+ return this.componentRef.hostView.rootNodes[0];
770
+ };
771
+ /**
772
+ * Cria um tooltip para o icone do input em focus.
773
+ *
774
+ * @param icon O ícone do input em focus.
775
+ */
776
+ TooltipDirective.prototype.createTootipByFocus = function (icon) {
777
+ var _a;
778
+ if (this.componentRef === null && ((_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.length)) {
779
+ var domElem = this.getDomElement();
780
+ var tooltip_1 = domElem.querySelector('.tooltip');
781
+ icon.appendChild(tooltip_1);
782
+ this.setTooltipComponentProperties();
783
+ setTimeout(function () { return tooltip_1.classList.add("tooltip--visible"); }, 0);
784
+ }
785
+ };
713
786
  TooltipDirective.prototype.showTooltip = function () {
714
787
  if (this.componentRef !== null) {
715
788
  this.componentRef.instance.visible = this.visible;
@@ -827,7 +900,8 @@
827
900
  { type: core.ApplicationRef },
828
901
  { type: core.ComponentFactoryResolver },
829
902
  { type: core.Injector },
830
- { type: DebounceUtils }
903
+ { type: DebounceUtils },
904
+ { type: core.Renderer2 }
831
905
  ]; };
832
906
  __decorate([
833
907
  core.Input("sTooltip")
@@ -853,6 +927,9 @@
853
927
  __decorate([
854
928
  core.Input()
855
929
  ], TooltipDirective.prototype, "mobileBehavior", void 0);
930
+ __decorate([
931
+ core.Input()
932
+ ], TooltipDirective.prototype, "focusedInputRef", void 0);
856
933
  __decorate([
857
934
  core.HostListener("click"),
858
935
  core.HostListener("keydown")
@@ -6718,7 +6795,7 @@
6718
6795
  InfoSignComponent = __decorate([
6719
6796
  core.Component({
6720
6797
  selector: "s-info-sign-component",
6721
- 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>",
6798
+ 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",
6722
6799
  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}"]
6723
6800
  })
6724
6801
  ], InfoSignComponent);
@@ -6740,6 +6817,7 @@
6740
6817
  this.componentRef.instance.templateRef = this.templateRef;
6741
6818
  this.componentRef.instance.tooltip = this.sInfoSign;
6742
6819
  this.componentRef.instance.displayTime = this.displayTime;
6820
+ this.componentRef.instance.focusedInputRef = this.focusedInputRef;
6743
6821
  }
6744
6822
  else if (this.componentRef && this.sInfoSign) {
6745
6823
  this.componentRef.instance.tooltip = this.sInfoSign;
@@ -6765,6 +6843,9 @@
6765
6843
  __decorate([
6766
6844
  core.Input('sInfoSignDisplayTime')
6767
6845
  ], InfoSignDirective.prototype, "displayTime", void 0);
6846
+ __decorate([
6847
+ core.Input('sInfoSignFocusedInputRef')
6848
+ ], InfoSignDirective.prototype, "focusedInputRef", void 0);
6768
6849
  InfoSignDirective = __decorate([
6769
6850
  core.Directive({
6770
6851
  selector: "[sInfoSign]",
@@ -14537,6 +14618,8 @@
14537
14618
  var KanbanComponent = /** @class */ (function () {
14538
14619
  function KanbanComponent(kanbanEventService) {
14539
14620
  this.kanbanEventService = kanbanEventService;
14621
+ this.showItemCheckboxes = true;
14622
+ this.showColumnCheckboxes = true;
14540
14623
  this.itemsMoved = new core.EventEmitter();
14541
14624
  this.dataUpdated = new core.EventEmitter();
14542
14625
  this.itemsSelected = new core.EventEmitter();
@@ -14596,6 +14679,8 @@
14596
14679
  this.selectedItems.clear();
14597
14680
  };
14598
14681
  KanbanComponent.prototype.selectItem = function (event, item, column) {
14682
+ if (item.disabled || item.frozen)
14683
+ return;
14599
14684
  if (event.ctrlKey) {
14600
14685
  if (this.selectedItems.delete(item)) {
14601
14686
  this.kanbanEventService.emitUnselectItemEvent(item);
@@ -14610,6 +14695,8 @@
14610
14695
  }
14611
14696
  }
14612
14697
  else {
14698
+ if (this.selectedItems.delete(item))
14699
+ return;
14613
14700
  this.selectedItems.clear();
14614
14701
  this.selectedItems.add(item);
14615
14702
  this.selectedColumn = column;
@@ -14626,9 +14713,7 @@
14626
14713
  this.draggingItems.clear();
14627
14714
  };
14628
14715
  KanbanComponent.prototype.getLinkedColumns = function (currentColumn) {
14629
- return this.data.columns
14630
- .filter(function (column) { return column != currentColumn; })
14631
- .map(function (column) { return column.id; });
14716
+ return this.data.columns.filter(function (column) { return column != currentColumn; }).map(function (column) { return column.id; });
14632
14717
  };
14633
14718
  KanbanComponent.prototype.getColumnHeaderTemplate = function () {
14634
14719
  return this._getCustomTemplate(exports.KanbanTemplateTypes.ColumnHeader);
@@ -14655,7 +14740,7 @@
14655
14740
  .pipe(operators.takeUntil(this._unsubscribe$))
14656
14741
  .subscribe(function (column) {
14657
14742
  column.items
14658
- .filter(function (item) { return !item.disabled; })
14743
+ .filter(function (item) { return !item.disabled && !item.frozen; })
14659
14744
  .forEach(function (item) {
14660
14745
  _this.selectedItems.add(item);
14661
14746
  });
@@ -14685,9 +14770,7 @@
14685
14770
  });
14686
14771
  });
14687
14772
  });
14688
- this.kanbanEventService.unselectItemEvent
14689
- .pipe(operators.takeUntil(this._unsubscribe$))
14690
- .subscribe(function (item) {
14773
+ this.kanbanEventService.unselectItemEvent.pipe(operators.takeUntil(this._unsubscribe$)).subscribe(function (item) {
14691
14774
  _this.selectedItems.delete(item);
14692
14775
  });
14693
14776
  };
@@ -14716,6 +14799,12 @@
14716
14799
  __decorate([
14717
14800
  core.Input()
14718
14801
  ], KanbanComponent.prototype, "data", void 0);
14802
+ __decorate([
14803
+ core.Input()
14804
+ ], KanbanComponent.prototype, "showItemCheckboxes", void 0);
14805
+ __decorate([
14806
+ core.Input()
14807
+ ], KanbanComponent.prototype, "showColumnCheckboxes", void 0);
14719
14808
  __decorate([
14720
14809
  core.Output()
14721
14810
  ], KanbanComponent.prototype, "itemsMoved", void 0);
@@ -14730,9 +14819,9 @@
14730
14819
  ], KanbanComponent.prototype, "templates", void 0);
14731
14820
  KanbanComponent = __decorate([
14732
14821
  core.Component({
14733
- selector: 's-kanban',
14734
- 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>&nbsp;\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",
14735
- 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%}"]
14822
+ selector: "s-kanban",
14823
+ 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>&nbsp;\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",
14824
+ 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%}"]
14736
14825
  })
14737
14826
  ], KanbanComponent);
14738
14827
  return KanbanComponent;
@@ -14741,17 +14830,27 @@
14741
14830
  var KanbanColumnComponent = /** @class */ (function () {
14742
14831
  function KanbanColumnComponent(kanbanEventService) {
14743
14832
  this.kanbanEventService = kanbanEventService;
14833
+ this.showCheckbox = true;
14744
14834
  this.selectionControl = new forms.FormControl(false);
14745
14835
  this._unsubscribe$ = new rxjs.Subject();
14746
14836
  }
14747
14837
  KanbanColumnComponent.prototype.ngOnInit = function () {
14748
14838
  this._validateInputs();
14749
14839
  this._subscriveEvents();
14840
+ this._createTieredOptions();
14750
14841
  };
14751
14842
  KanbanColumnComponent.prototype.ngOnDestroy = function () {
14752
14843
  this._unsubscribe$.next();
14753
14844
  this._unsubscribe$.complete();
14754
14845
  };
14846
+ KanbanColumnComponent.prototype._createTieredOptions = function () {
14847
+ var _this = this;
14848
+ var options = [];
14849
+ this.data.options.forEach(function (option) {
14850
+ options.push(__assign(__assign({}, option), { command: function () { option.command(_this.data); } }));
14851
+ });
14852
+ this.data.options = options;
14853
+ };
14755
14854
  KanbanColumnComponent.prototype._subscriveEvents = function () {
14756
14855
  var _this = this;
14757
14856
  this.selectionControl.valueChanges
@@ -14802,13 +14901,16 @@
14802
14901
  __decorate([
14803
14902
  core.Input()
14804
14903
  ], KanbanColumnComponent.prototype, "data", void 0);
14904
+ __decorate([
14905
+ core.Input()
14906
+ ], KanbanColumnComponent.prototype, "showCheckbox", void 0);
14805
14907
  __decorate([
14806
14908
  core.Input()
14807
14909
  ], KanbanColumnComponent.prototype, "headerTemplate", void 0);
14808
14910
  KanbanColumnComponent = __decorate([
14809
14911
  core.Component({
14810
14912
  selector: "s-kanban-column",
14811
- 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>",
14913
+ 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>",
14812
14914
  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%}"]
14813
14915
  })
14814
14916
  ], KanbanColumnComponent);
@@ -14836,7 +14938,11 @@
14836
14938
  function KanbanItemComponent(_kanbanEventService) {
14837
14939
  this._kanbanEventService = _kanbanEventService;
14838
14940
  this.selected = false;
14941
+ this.showCheckbox = true;
14839
14942
  }
14943
+ KanbanItemComponent.prototype.ngOnInit = function () {
14944
+ this._createTieredOptions();
14945
+ };
14840
14946
  KanbanItemComponent.prototype.onSelectedChange = function (value) {
14841
14947
  if (value) {
14842
14948
  this._kanbanEventService.emitSelectItemEvent(this.item);
@@ -14845,6 +14951,14 @@
14845
14951
  this._kanbanEventService.emitUnselectItemEvent(this.item);
14846
14952
  }
14847
14953
  };
14954
+ KanbanItemComponent.prototype._createTieredOptions = function () {
14955
+ var _this = this;
14956
+ var options = [];
14957
+ this.item.options.forEach(function (option) {
14958
+ options.push(__assign(__assign({}, option), { command: function () { option.command(_this.item); } }));
14959
+ });
14960
+ this.item.options = options;
14961
+ };
14848
14962
  KanbanItemComponent.ctorParameters = function () { return [
14849
14963
  { type: KanbanEventService }
14850
14964
  ]; };
@@ -14854,6 +14968,9 @@
14854
14968
  __decorate([
14855
14969
  core.Input()
14856
14970
  ], KanbanItemComponent.prototype, "selected", void 0);
14971
+ __decorate([
14972
+ core.Input()
14973
+ ], KanbanItemComponent.prototype, "showCheckbox", void 0);
14857
14974
  __decorate([
14858
14975
  core.Input()
14859
14976
  ], KanbanItemComponent.prototype, "headerTemplate", void 0);
@@ -14865,9 +14982,9 @@
14865
14982
  ], KanbanItemComponent.prototype, "footerTemplate", void 0);
14866
14983
  KanbanItemComponent = __decorate([
14867
14984
  core.Component({
14868
- selector: 's-kanban-item',
14869
- 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>",
14870
- 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%}"]
14985
+ selector: "s-kanban-item",
14986
+ 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>",
14987
+ 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}"]
14871
14988
  })
14872
14989
  ], KanbanItemComponent);
14873
14990
  return KanbanItemComponent;