barsa-kanban 1.0.455 → 2.0.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.
Files changed (32) hide show
  1. package/{esm2020 → esm2022}/barsa-kanban.mjs +4 -4
  2. package/{esm2020 → esm2022}/lib/Models/drop-info.mjs +1 -1
  3. package/{esm2020 → esm2022}/lib/Models/kanban-view-setting.interface.mjs +1 -1
  4. package/esm2022/lib/avatar-group/barsa-avatar-group.component.mjs +82 -0
  5. package/esm2022/lib/barsa-kanban.module.mjs +79 -0
  6. package/{esm2020 → esm2022}/lib/kanban-base/kanban-base.component.mjs +20 -20
  7. package/esm2022/lib/kanban-card/kanban-card.component.mjs +35 -0
  8. package/esm2022/lib/kanban-tags/kanban-tags.component.mjs +43 -0
  9. package/esm2022/lib/kanban-view/kanban-view.component.mjs +244 -0
  10. package/{esm2020 → esm2022}/public-api.mjs +6 -6
  11. package/fesm2022/barsa-kanban.mjs +473 -0
  12. package/fesm2022/barsa-kanban.mjs.map +1 -0
  13. package/index.d.ts +5 -5
  14. package/lib/Models/drop-info.d.ts +8 -8
  15. package/lib/Models/kanban-view-setting.interface.d.ts +17 -17
  16. package/lib/avatar-group/barsa-avatar-group.component.d.ts +28 -28
  17. package/lib/barsa-kanban.module.d.ts +29 -29
  18. package/lib/kanban-base/kanban-base.component.d.ts +9 -9
  19. package/lib/kanban-card/kanban-card.component.d.ts +16 -16
  20. package/lib/kanban-tags/kanban-tags.component.d.ts +16 -16
  21. package/lib/kanban-view/kanban-view.component.d.ts +40 -40
  22. package/package.json +7 -13
  23. package/public-api.d.ts +6 -6
  24. package/esm2020/lib/avatar-group/barsa-avatar-group.component.mjs +0 -84
  25. package/esm2020/lib/barsa-kanban.module.mjs +0 -82
  26. package/esm2020/lib/kanban-card/kanban-card.component.mjs +0 -36
  27. package/esm2020/lib/kanban-tags/kanban-tags.component.mjs +0 -43
  28. package/esm2020/lib/kanban-view/kanban-view.component.mjs +0 -244
  29. package/fesm2015/barsa-kanban.mjs +0 -477
  30. package/fesm2015/barsa-kanban.mjs.map +0 -1
  31. package/fesm2020/barsa-kanban.mjs +0 -478
  32. package/fesm2020/barsa-kanban.mjs.map +0 -1
@@ -0,0 +1,473 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, Input, ViewChild, ElementRef, NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
3
+ import * as i1$1 from 'barsa-novin-ray-core';
4
+ import { BaseComponent, BaseViewItemPropsComponent, FormPanelService, ReportViewBaseComponent, BaseModule, BarsaNovinRayCoreModule } from 'barsa-novin-ray-core';
5
+ import * as i1 from '@angular/common';
6
+ import { CommonModule } from '@angular/common';
7
+ import * as i3 from '@fundamental-ngx/core/button';
8
+ import * as i3$1 from '@fundamental-ngx/core/form';
9
+ import * as i4 from '@fundamental-ngx/core/info-label';
10
+ import * as i5 from '@fundamental-ngx/core/popover';
11
+ import * as i6 from '@angular/forms';
12
+ import { FormsModule } from '@angular/forms';
13
+ import * as i4$1 from '@fundamental-ngx/core/card';
14
+ import * as i3$2 from '@fundamental-ngx/core/icon';
15
+ import * as i4$2 from '@fundamental-ngx/platform';
16
+ import { PlatformMenuModule } from '@fundamental-ngx/platform';
17
+ import * as i5$1 from 'barsa-sap-ui';
18
+ import { BarsaSapUiModule } from 'barsa-sap-ui';
19
+ import { ESCAPE, TAB, SPACE, ENTER } from '@angular/cdk/keycodes';
20
+ import { KeyUtil } from '@fundamental-ngx/core/utils';
21
+ import { AvatarGroupComponent, FundamentalNgxCoreModule } from '@fundamental-ngx/core';
22
+ import * as i1$2 from '@fundamental-ngx/core/avatar';
23
+ import * as i2 from '@fundamental-ngx/core/bar';
24
+ import * as i4$3 from '@fundamental-ngx/core/list';
25
+ import * as i13 from '@angular/cdk/drag-drop';
26
+ import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
27
+ import * as i5$2 from '@fundamental-ngx/core/checkbox';
28
+ import * as i8 from '@fundamental-ngx/core/layout-grid';
29
+ import * as i9 from '@fundamental-ngx/core/layout-panel';
30
+ import * as i10 from '@fundamental-ngx/core/table';
31
+ import { BarsaEchartsModule } from 'barsa-echarts';
32
+ import { HttpClientModule } from '@angular/common/http';
33
+
34
+ class KanbanBaseComponent extends BaseComponent {
35
+ openPopover(e, popover) {
36
+ e.stopPropagation();
37
+ e.preventDefault();
38
+ popover.toggle();
39
+ }
40
+ closePopover(popover) {
41
+ popover.close();
42
+ }
43
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: KanbanBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
44
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: KanbanBaseComponent, selector: "bk-kanban-base", usesInheritance: true, ngImport: i0, template: "<p>kanban-base works!</p>\r\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
45
+ }
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: KanbanBaseComponent, decorators: [{
47
+ type: Component,
48
+ args: [{ selector: 'bk-kanban-base', changeDetection: ChangeDetectionStrategy.OnPush, template: "<p>kanban-base works!</p>\r\n" }]
49
+ }] });
50
+
51
+ class KanbanTagsComponent extends KanbanBaseComponent {
52
+ constructor() {
53
+ super(...arguments);
54
+ this.colorList = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'];
55
+ this.currentTagLabel = '';
56
+ this.selectedColor = '';
57
+ }
58
+ colorClick(color) {
59
+ this.selectedColor = color;
60
+ }
61
+ addTag() {
62
+ const newTag = { Id: '', $Caption: '' };
63
+ newTag[this.viewSetting.TagColor] = this.selectedColor;
64
+ newTag[this.viewSetting.TagName] = this.currentTagLabel;
65
+ this.tags.push(newTag);
66
+ this.currentTagLabel = '';
67
+ this.selectedColor = '';
68
+ }
69
+ deleteTag(index) {
70
+ this.tags.splice(index, 1);
71
+ }
72
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: KanbanTagsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
73
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: KanbanTagsComponent, selector: "bk-kanban-tags", inputs: { tags: "tags", viewSetting: "viewSetting" }, usesInheritance: true, ngImport: i0, template: "<div class=\"row tags-container\">\r\n @for (tag of tags; track tag; let i = $index) {\r\n <fd-popover placement=\"bottom\" [closeOnOutsideClick]=\"true\">\r\n <fd-popover-control>\r\n <div class=\"tag\">\r\n <fd-info-label\r\n [label]=\"tag[viewSetting.TagName]\"\r\n [color]=\"tag[viewSetting.TagColor]\"\r\n [title]=\"tag[viewSetting.TagName]\"\r\n ></fd-info-label>\r\n </div>\r\n </fd-popover-control>\r\n <fd-popover-body>\r\n <div class=\"tag-delete\">\r\n <button fd-button (click)=\"deleteTag(i)\" [label]=\"'Delete' | bbbTranslate\" glyph=\"decline\"></button>\r\n </div>\r\n </fd-popover-body>\r\n </fd-popover>\r\n }\r\n\r\n <fd-popover\r\n #tagPopover\r\n [triggers]=\"[]\"\r\n [focusTrapped]=\"false\"\r\n [closeOnOutsideClick]=\"true\"\r\n [noArrow]=\"false\"\r\n placement=\"bottom\"\r\n [focusAutoCapture]=\"true\"\r\n >\r\n <fd-popover-control>\r\n <div>\r\n <button\r\n fd-button\r\n (click)=\"openPopover($event, tagPopover)\"\r\n fdType=\"transparent\"\r\n glyph=\"sys-add\"\r\n ></button>\r\n </div>\r\n </fd-popover-control>\r\n <fd-popover-body>\r\n <div class=\"new-tag\" (keydown.enter)=\"addTag()\">\r\n <div fd-form-item class=\"row\">\r\n <input fd-form-control type=\"text\" [(ngModel)]=\"currentTagLabel\" id=\"input-1\" placeholder=\" \u0646\u0627\u0645\" />\r\n </div>\r\n <div class=\"colors-colection row\">\r\n @for (color of colorList; track color) {\r\n <div\r\n (click)=\"colorClick(color)\"\r\n [ngClass]=\"'fd-info-label--accent-color-' + color\"\r\n [class.selected-color]=\"selectedColor === color\"\r\n class=\"color\"\r\n ></div>\r\n }\r\n </div>\r\n <div class=\"ok-cancel-btns row\">\r\n <button fd-button [label]=\"'Ok' | bbbTranslate\" [fdType]=\"'emphasized'\" (click)=\"addTag()\"></button>\r\n <button\r\n fd-button\r\n [label]=\"'Cancel' | bbbTranslate\"\r\n [fdType]=\"'transparent'\"\r\n (click)=\"closePopover(tagPopover)\"\r\n ></button>\r\n </div>\r\n </div>\r\n </fd-popover-body>\r\n </fd-popover>\r\n</div>\r\n", styles: [":host ::ng-deep .fd-info-label__text{height:auto!important}.row,.new-tag .colors-colection{display:flex;align-items:center}.tags-container{column-gap:10px;flex-wrap:wrap}.new-tag{padding:15px;max-width:200px;row-gap:15px;display:flex;flex-direction:column;justify-content:center;align-items:center}.new-tag .row,.new-tag .colors-colection{column-gap:15px;width:100%}.new-tag .colors-colection{flex-wrap:wrap;row-gap:10px}.new-tag .colors-colection .color{width:40px;height:24px;border-radius:10px;border:1px solid var(--sapBackgroundColor, #f7f7f7)}.new-tag .colors-colection .selected-color{border-color:var(--sapList_SelectionBorderColor, #0854a0)}.ok-cancel-btns{justify-content:flex-end}.tag-delete{display:flex;align-items:center;justify-content:center;width:100px;height:80px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i3$1.FormControlComponent, selector: "input[fd-form-control], textarea[fd-form-control]", inputs: ["state", "type", "class", "ariaLabel", "ariaLabelledBy"] }, { kind: "component", type: i3$1.FormItemComponent, selector: "[fd-form-item]", inputs: ["isInline", "horizontal"] }, { kind: "component", type: i4.InfoLabelComponent, selector: "fd-info-label", inputs: ["class", "type", "glyph", "font", "color", "label", "title", "ariaLabel", "ariaLabelledBy"] }, { kind: "component", type: i5.PopoverControlComponent, selector: "fd-popover-control, [fdPopoverControl]" }, { kind: "component", type: i5.PopoverBodyComponent, selector: "fd-popover-body", inputs: ["minWidth", "maxWidth", "minHeight", "maxHeight"] }, { kind: "component", type: i5.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig", "preventSpaceKeyScroll"] }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i1$1.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
74
+ }
75
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: KanbanTagsComponent, decorators: [{
76
+ type: Component,
77
+ args: [{ selector: 'bk-kanban-tags', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"row tags-container\">\r\n @for (tag of tags; track tag; let i = $index) {\r\n <fd-popover placement=\"bottom\" [closeOnOutsideClick]=\"true\">\r\n <fd-popover-control>\r\n <div class=\"tag\">\r\n <fd-info-label\r\n [label]=\"tag[viewSetting.TagName]\"\r\n [color]=\"tag[viewSetting.TagColor]\"\r\n [title]=\"tag[viewSetting.TagName]\"\r\n ></fd-info-label>\r\n </div>\r\n </fd-popover-control>\r\n <fd-popover-body>\r\n <div class=\"tag-delete\">\r\n <button fd-button (click)=\"deleteTag(i)\" [label]=\"'Delete' | bbbTranslate\" glyph=\"decline\"></button>\r\n </div>\r\n </fd-popover-body>\r\n </fd-popover>\r\n }\r\n\r\n <fd-popover\r\n #tagPopover\r\n [triggers]=\"[]\"\r\n [focusTrapped]=\"false\"\r\n [closeOnOutsideClick]=\"true\"\r\n [noArrow]=\"false\"\r\n placement=\"bottom\"\r\n [focusAutoCapture]=\"true\"\r\n >\r\n <fd-popover-control>\r\n <div>\r\n <button\r\n fd-button\r\n (click)=\"openPopover($event, tagPopover)\"\r\n fdType=\"transparent\"\r\n glyph=\"sys-add\"\r\n ></button>\r\n </div>\r\n </fd-popover-control>\r\n <fd-popover-body>\r\n <div class=\"new-tag\" (keydown.enter)=\"addTag()\">\r\n <div fd-form-item class=\"row\">\r\n <input fd-form-control type=\"text\" [(ngModel)]=\"currentTagLabel\" id=\"input-1\" placeholder=\" \u0646\u0627\u0645\" />\r\n </div>\r\n <div class=\"colors-colection row\">\r\n @for (color of colorList; track color) {\r\n <div\r\n (click)=\"colorClick(color)\"\r\n [ngClass]=\"'fd-info-label--accent-color-' + color\"\r\n [class.selected-color]=\"selectedColor === color\"\r\n class=\"color\"\r\n ></div>\r\n }\r\n </div>\r\n <div class=\"ok-cancel-btns row\">\r\n <button fd-button [label]=\"'Ok' | bbbTranslate\" [fdType]=\"'emphasized'\" (click)=\"addTag()\"></button>\r\n <button\r\n fd-button\r\n [label]=\"'Cancel' | bbbTranslate\"\r\n [fdType]=\"'transparent'\"\r\n (click)=\"closePopover(tagPopover)\"\r\n ></button>\r\n </div>\r\n </div>\r\n </fd-popover-body>\r\n </fd-popover>\r\n</div>\r\n", styles: [":host ::ng-deep .fd-info-label__text{height:auto!important}.row,.new-tag .colors-colection{display:flex;align-items:center}.tags-container{column-gap:10px;flex-wrap:wrap}.new-tag{padding:15px;max-width:200px;row-gap:15px;display:flex;flex-direction:column;justify-content:center;align-items:center}.new-tag .row,.new-tag .colors-colection{column-gap:15px;width:100%}.new-tag .colors-colection{flex-wrap:wrap;row-gap:10px}.new-tag .colors-colection .color{width:40px;height:24px;border-radius:10px;border:1px solid var(--sapBackgroundColor, #f7f7f7)}.new-tag .colors-colection .selected-color{border-color:var(--sapList_SelectionBorderColor, #0854a0)}.ok-cancel-btns{justify-content:flex-end}.tag-delete{display:flex;align-items:center;justify-content:center;width:100px;height:80px}\n"] }]
78
+ }], propDecorators: { tags: [{
79
+ type: Input
80
+ }], viewSetting: [{
81
+ type: Input
82
+ }] } });
83
+
84
+ class KanbanCardComponent extends BaseViewItemPropsComponent {
85
+ constructor() {
86
+ super(...arguments);
87
+ this.moTasksCount = 4;
88
+ this.moFinishedTasksCount = 2;
89
+ }
90
+ ngOnInit() {
91
+ super.ngOnInit();
92
+ this.moTaskPercentage = Math.floor((this.moFinishedTasksCount / this.moTasksCount) * 100);
93
+ }
94
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: KanbanCardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
95
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: KanbanCardComponent, selector: "bk-kanban-card", inputs: { index: "index", mo: "mo", viewSetting: "viewSetting", allAvailableAssignees: "allAvailableAssignees" }, providers: [FormPanelService], usesInheritance: true, ngImport: i0, template: "<fd-card cardType=\"quickView\" class=\"docs-flex-item-margin\" style=\"background: transparent\" ellipsify>\r\n <div class=\"row task-cover\">\r\n <img\r\n [src]=\"\r\n viewSetting.Cover\r\n ? (mo[viewSetting.Cover]?.FileId\r\n | picFieldSrc: 'ID':viewSetting[viewSetting.Cover + 'Column']?.FieldDefId)\r\n : ''\r\n \"\r\n />\r\n </div>\r\n <fdp-action-button-group class=\"card-menu\">\r\n <fdp-button\r\n contentDensity=\"compact\"\r\n glyph=\"overflow\"\r\n buttonType=\"transparent\"\r\n [fdpMenuTriggerFor]=\"basicMenu\"\r\n ></fdp-button>\r\n <fdp-menu #basicMenu id=\"basic-menu\" [xPosition]=\"'before'\">\r\n <fdp-menu-item>{{ 'Edit' | bbbTranslate }}</fdp-menu-item>\r\n <fdp-menu-item>{{ 'Delete' | bbbTranslate }}</fdp-menu-item>\r\n </fdp-menu>\r\n </fdp-action-button-group>\r\n <fd-card-content>\r\n @if (layout$ | async; as layout94) {\r\n <bsu-ly-layout-container-of-root\r\n [config]=\"layout94\"\r\n [isPanel]=\"false\"\r\n [isRoot]=\"true\"\r\n ></bsu-ly-layout-container-of-root>\r\n }\r\n </fd-card-content>\r\n <fd-card-footer>\r\n <div class=\"kanban-footer row\">\r\n <div class=\"comment row\">\r\n <fd-icon glyph=\"post\"></fd-icon>\r\n {{ mo[viewSetting.CommentsCount] }}\r\n </div>\r\n <div class=\"attachment row\">\r\n <fd-icon glyph=\"attachment\"></fd-icon>\r\n {{ mo[viewSetting.AttachesCount] }}\r\n </div>\r\n\r\n <div class=\"task row\">\r\n {{ mo[viewSetting.ProgressLabel] }}\r\n <div class=\"circle-icon\">\r\n <fd-icon glyph=\"accept\"></fd-icon>\r\n </div>\r\n </div>\r\n </div>\r\n </fd-card-footer>\r\n</fd-card>\r\n", styles: [":host{position:relative}:host.selected{background-color:var(--sapList_SelectionBackgroundColor, #e5f0fa)}:host.selected fd-card{border-color:var(--sapList_SelectionBorderColor, #0854a0)}:host.selected fd-card,:host.selected fd-card-header,:host.selected .fd-bar--footer,:host.selected fd-quick-view-subheader .fd-bar{background-color:inherit!important}.row{display:flex;align-items:center}.fd-card{background:var(--sapBackgroundColor, #f7f7f7)!important;box-shadow:none}.fd-card:hover .card-menu fdp-button{display:block}.fd-card .card-menu{position:absolute;right:1rem;top:1rem;background-color:#fff}.fd-card .card-menu fdp-button{display:none}.fd-card .card-menu [aria-controls=fdp-menu-basic-menu]{display:block}.fd-card .task-cover{width:100%;height:150px;justify-content:center}.fd-card .task-cover img{object-fit:cover;width:100%;height:100%}.fd-card fd-card-content{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;row-gap:20px;padding:1rem}.fd-card fd-card-content .progress-indicator{flex:1}.fd-card fd-card-content .progress-indicator ::ng-deep .fd-progress-indicator__remaining{display:flex;align-items:center}.fd-card ::ng-deep fd-info-label .fd-info-label__text{display:inline-flex!important}.kanban-footer{padding:1rem;column-gap:10px}.kanban-footer .comment,.kanban-footer .attachment,.kanban-footer .task{column-gap:2px}.kanban-footer .task{margin-right:auto}.kanban-footer .task .circle-icon{width:calc(var(--sapFontSize, .875rem) + 6px);height:calc(var(--sapFontSize, .875rem) + 6px);border-radius:calc(var(--sapFontSize, .875rem) + 6px);border:1px solid var(--sapButton_BorderColor, #0854a0);display:flex;align-items:center;justify-content:center}\n"], dependencies: [{ kind: "directive", type: i1$1.EllipsifyDirective, selector: "[ellipsify]", inputs: ["limitLine"] }, { kind: "component", type: i4$1.CardComponent, selector: "fd-card", inputs: ["badge", "isLoading", "cardType", "id", "role"] }, { kind: "component", type: i4$1.CardContentComponent, selector: "fd-card-content" }, { kind: "component", type: i4$1.CardFooterComponent, selector: "fd-card-footer" }, { kind: "component", type: i3$2.IconComponent, selector: "fd-icon", inputs: ["glyph", "font", "color", "background", "class", "ariaLabel", "ariaHidden"] }, { kind: "component", type: i4$2.MenuComponent, selector: "fdp-menu", inputs: ["id", "openByArrowKeys", "xPosition"], outputs: ["close"] }, { kind: "component", type: i4$2.MenuItemComponent, selector: "fdp-menu-item", inputs: ["disabled", "cascadeDirection"], outputs: ["itemSelect"] }, { kind: "directive", type: i4$2.MenuTriggerDirective, selector: "[fdpMenuTriggerFor]", inputs: ["fdpMenuTriggerFor"] }, { kind: "component", type: i5$1.LyLayoutContainerOfRootComponent, selector: "bsu-ly-layout-container-of-root" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.PictureFieldSourcePipe, name: "picFieldSrc" }, { kind: "pipe", type: i1$1.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
96
+ }
97
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: KanbanCardComponent, decorators: [{
98
+ type: Component,
99
+ args: [{ selector: 'bk-kanban-card', providers: [FormPanelService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<fd-card cardType=\"quickView\" class=\"docs-flex-item-margin\" style=\"background: transparent\" ellipsify>\r\n <div class=\"row task-cover\">\r\n <img\r\n [src]=\"\r\n viewSetting.Cover\r\n ? (mo[viewSetting.Cover]?.FileId\r\n | picFieldSrc: 'ID':viewSetting[viewSetting.Cover + 'Column']?.FieldDefId)\r\n : ''\r\n \"\r\n />\r\n </div>\r\n <fdp-action-button-group class=\"card-menu\">\r\n <fdp-button\r\n contentDensity=\"compact\"\r\n glyph=\"overflow\"\r\n buttonType=\"transparent\"\r\n [fdpMenuTriggerFor]=\"basicMenu\"\r\n ></fdp-button>\r\n <fdp-menu #basicMenu id=\"basic-menu\" [xPosition]=\"'before'\">\r\n <fdp-menu-item>{{ 'Edit' | bbbTranslate }}</fdp-menu-item>\r\n <fdp-menu-item>{{ 'Delete' | bbbTranslate }}</fdp-menu-item>\r\n </fdp-menu>\r\n </fdp-action-button-group>\r\n <fd-card-content>\r\n @if (layout$ | async; as layout94) {\r\n <bsu-ly-layout-container-of-root\r\n [config]=\"layout94\"\r\n [isPanel]=\"false\"\r\n [isRoot]=\"true\"\r\n ></bsu-ly-layout-container-of-root>\r\n }\r\n </fd-card-content>\r\n <fd-card-footer>\r\n <div class=\"kanban-footer row\">\r\n <div class=\"comment row\">\r\n <fd-icon glyph=\"post\"></fd-icon>\r\n {{ mo[viewSetting.CommentsCount] }}\r\n </div>\r\n <div class=\"attachment row\">\r\n <fd-icon glyph=\"attachment\"></fd-icon>\r\n {{ mo[viewSetting.AttachesCount] }}\r\n </div>\r\n\r\n <div class=\"task row\">\r\n {{ mo[viewSetting.ProgressLabel] }}\r\n <div class=\"circle-icon\">\r\n <fd-icon glyph=\"accept\"></fd-icon>\r\n </div>\r\n </div>\r\n </div>\r\n </fd-card-footer>\r\n</fd-card>\r\n", styles: [":host{position:relative}:host.selected{background-color:var(--sapList_SelectionBackgroundColor, #e5f0fa)}:host.selected fd-card{border-color:var(--sapList_SelectionBorderColor, #0854a0)}:host.selected fd-card,:host.selected fd-card-header,:host.selected .fd-bar--footer,:host.selected fd-quick-view-subheader .fd-bar{background-color:inherit!important}.row{display:flex;align-items:center}.fd-card{background:var(--sapBackgroundColor, #f7f7f7)!important;box-shadow:none}.fd-card:hover .card-menu fdp-button{display:block}.fd-card .card-menu{position:absolute;right:1rem;top:1rem;background-color:#fff}.fd-card .card-menu fdp-button{display:none}.fd-card .card-menu [aria-controls=fdp-menu-basic-menu]{display:block}.fd-card .task-cover{width:100%;height:150px;justify-content:center}.fd-card .task-cover img{object-fit:cover;width:100%;height:100%}.fd-card fd-card-content{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;row-gap:20px;padding:1rem}.fd-card fd-card-content .progress-indicator{flex:1}.fd-card fd-card-content .progress-indicator ::ng-deep .fd-progress-indicator__remaining{display:flex;align-items:center}.fd-card ::ng-deep fd-info-label .fd-info-label__text{display:inline-flex!important}.kanban-footer{padding:1rem;column-gap:10px}.kanban-footer .comment,.kanban-footer .attachment,.kanban-footer .task{column-gap:2px}.kanban-footer .task{margin-right:auto}.kanban-footer .task .circle-icon{width:calc(var(--sapFontSize, .875rem) + 6px);height:calc(var(--sapFontSize, .875rem) + 6px);border-radius:calc(var(--sapFontSize, .875rem) + 6px);border:1px solid var(--sapButton_BorderColor, #0854a0);display:flex;align-items:center;justify-content:center}\n"] }]
100
+ }], propDecorators: { index: [{
101
+ type: Input
102
+ }], mo: [{
103
+ type: Input
104
+ }], viewSetting: [{
105
+ type: Input
106
+ }], allAvailableAssignees: [{
107
+ type: Input
108
+ }] } });
109
+
110
+ class BarsaAvatarGroupComponent extends KanbanBaseComponent {
111
+ constructor() {
112
+ super(...arguments);
113
+ this.visibleFields = [];
114
+ this.size = 'l';
115
+ this.personDetails = null;
116
+ this.overflowPopoverStage = 'main';
117
+ }
118
+ get isDetailStage() {
119
+ return this.overflowPopoverStage === 'detail';
120
+ }
121
+ isOpenChanged(isOpened) {
122
+ if (isOpened) {
123
+ this.openOverflowMain();
124
+ }
125
+ }
126
+ newItem(newItem) {
127
+ const exist = this.existedItems.find((item) => item.Id === newItem.Id);
128
+ if (!exist) {
129
+ this.existedItems.push(newItem);
130
+ }
131
+ }
132
+ deleteAvatar(idx) {
133
+ this.existedItems.splice(idx, 1);
134
+ }
135
+ openOverflowMain() {
136
+ this.personDetails = null;
137
+ this.overflowPopoverStage = 'main';
138
+ setTimeout(() => this.popoverBodyComponent?._focusFirstTabbableElement(), 0);
139
+ }
140
+ handleControlClick(event, popover) {
141
+ popover.open();
142
+ }
143
+ handleControlKeydown(event, popover) {
144
+ if (!KeyUtil.isKeyCode(event, [ESCAPE, TAB, SPACE, ENTER])) {
145
+ return;
146
+ }
147
+ if (KeyUtil.isKeyCode(event, [ESCAPE, TAB])) {
148
+ popover.close();
149
+ }
150
+ if (KeyUtil.isKeyCode(event, [SPACE, ENTER])) {
151
+ popover.open();
152
+ }
153
+ }
154
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: BarsaAvatarGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
155
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: BarsaAvatarGroupComponent, selector: "bk-avatar-group", inputs: { existedItems: "existedItems", availableItems: "availableItems", viewSetting: "viewSetting", visibleFields: "visibleFields", addItem: "addItem", size: "size" }, viewQueries: [{ propertyName: "popoverBodyComponent", first: true, predicate: ["overflowPopoverBody"], descendants: true }, { propertyName: "avatarGroupCom", first: true, predicate: AvatarGroupComponent, descendants: true, read: AvatarGroupComponent, static: true }], usesInheritance: true, ngImport: i0, template: "<fd-avatar-group #avatarGroupCom type=\"group\" [size]=\"size\">\r\n <fd-popover\r\n [noArrow]=\"false\"\r\n [focusTrapped]=\"true\"\r\n [focusAutoCapture]=\"true\"\r\n [triggers]=\"[]\"\r\n [closeOnOutsideClick]=\"true\"\r\n [closeOnEscapeKey]=\"true\"\r\n (isOpenChange)=\"isOpenChanged($event)\"\r\n placement=\"bottom\"\r\n [maxWidth]=\"312\"\r\n #overflowPopover\r\n >\r\n <fd-popover-control\r\n fd-avatar-group-popover-control\r\n [attr.aria-label]=\"\r\n 'Has popup type dialog Conjoined avatars, ' +\r\n ' avatars displayed, ' +\r\n 1 +\r\n ' avatars hidden, activate for complete list'\r\n \"\r\n (click)=\"handleControlClick($event, overflowPopover)\"\r\n (keydown)=\"handleControlKeydown($event, overflowPopover)\"\r\n >\r\n @for (person of existedItems; track person) {\r\n <div fd-avatar-group-item>\r\n @if (!person[viewSetting.AssigneeImage]) {\r\n <fd-avatar\r\n [label]=\"person[viewSetting.AssigneeName]\"\r\n [title]=\"person[viewSetting.AssigneeName]\"\r\n [ariaLabel]=\"person[viewSetting.AssigneeName] + ' avatar'\"\r\n role=\"img\"\r\n [circle]=\"true\"\r\n [border]=\"true\"\r\n [size]=\"size\"\r\n ></fd-avatar>\r\n } @if (person[viewSetting.AssigneeImage]; as avatar) {\r\n <fd-avatar\r\n role=\"img\"\r\n [title]=\"person[viewSetting.AssigneeName]\"\r\n [ariaLabel]=\"person[viewSetting.AssigneeName] + ' avatar'\"\r\n [circle]=\"true\"\r\n [border]=\"true\"\r\n [size]=\"size\"\r\n [image]=\"(avatar.FileId | picFieldSrc: 'ID':person.Id) || ''\"\r\n >\r\n </fd-avatar>\r\n }\r\n </div>\r\n } \r\n <button fd-button fd-avatar-group-overflow-button tabindex=\"-1\" [compact]=\"false\" [size]=\"size\">\r\n <bdi fd-avatar-group-overflow-button-text> 1 </bdi>\r\n </button>\r\n \r\n </fd-popover-control>\r\n <fd-popover-body #overflowPopoverBody aria-labelledby=\"avatar-group-1-popover-header\" role=\"tooltip\">\r\n <div class=\"fd-popover__wrapper\">\r\n <div fd-popover-body-header>\r\n <div fd-bar barDesign=\"header\">\r\n <div fd-bar-left>\r\n @if (isDetailStage) {\r\n <fd-button-bar\r\n (click)=\"openOverflowMain()\"\r\n glyph=\"navigation-left-arrow\"\r\n fdType=\"transparent\"\r\n aria-label=\"Back\"\r\n title=\"Back\"\r\n ></fd-button-bar>\r\n }\r\n <fd-bar-element id=\"avatar-group-1-popover-header\">\r\n {{ isDetailStage ? 'Business Card' : 'Team Members (' + existedItems?.length + ')' }}\r\n </fd-bar-element>\r\n @if (isDetailStage) {\r\n <fd-bar-element>&nbsp;</fd-bar-element>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n fd-avatar-group-overflow-body\r\n [noPadding]=\"isDetailStage\"\r\n [noHorizontalScroll]=\"isDetailStage\"\r\n [noVerticalScroll]=\"false\"\r\n >\r\n @if (overflowPopoverStage === 'main') { @for (person of existedItems; track person; let idx =\r\n $index) {\r\n <div fd-avatar-group-overflow-item>\r\n <fd-popover [triggers]=\"['click']\">\r\n <fd-popover-control>\r\n @if (!person[viewSetting.AssigneeImage]) {\r\n <fd-avatar\r\n fd-avatar-group-focusable-avatar\r\n [circle]=\"true\"\r\n size=\"s\"\r\n [label]=\"person[viewSetting.AssigneeName]\"\r\n [title]=\"person[viewSetting.AssigneeName]\"\r\n [ariaLabel]=\"person[viewSetting.AssigneeName] + ' avatar'\"\r\n role=\"img\"\r\n ></fd-avatar>\r\n } @if (person[viewSetting.AssigneeImage]; as avatar) {\r\n <fd-avatar\r\n fd-avatar-group-focusable-avatar\r\n role=\"img\"\r\n [title]=\"person[viewSetting.AssigneeName]\"\r\n [ariaLabel]=\"person[viewSetting.AssigneeName] + ' avatar'\"\r\n [circle]=\"true\"\r\n size=\"s\"\r\n [image]=\"(avatar.FileId | picFieldSrc: 'ID':person.Id) || ''\"\r\n ></fd-avatar>\r\n }\r\n </fd-popover-control>\r\n <fd-popover-body>\r\n <div class=\"avatar-actions\">\r\n <button\r\n fd-button\r\n (click)=\"deleteAvatar(idx)\"\r\n [label]=\"'Delete' | bbbTranslate\"\r\n glyph=\"decline\"\r\n ></button>\r\n <button fd-button [label]=\"'Show' | bbbTranslate\" glyph=\"detail-view\"></button>\r\n </div>\r\n </fd-popover-body>\r\n </fd-popover>\r\n </div>\r\n } }\r\n </div>\r\n </div>\r\n </fd-popover-body>\r\n </fd-popover>\r\n</fd-avatar-group>\r\n\r\n@if (addItem) {\r\n<fd-popover\r\n #peoplePopover\r\n [triggers]=\"[]\"\r\n [focusTrapped]=\"false\"\r\n [closeOnOutsideClick]=\"true\"\r\n [noArrow]=\"false\"\r\n placement=\"bottom\"\r\n [focusAutoCapture]=\"true\"\r\n>\r\n <fd-popover-control>\r\n <div>\r\n <button\r\n fd-button\r\n (click)=\"openPopover($event, peoplePopover)\"\r\n fdType=\"transparent\"\r\n glyph=\"sys-add\"\r\n ></button>\r\n </div>\r\n </fd-popover-control>\r\n <fd-popover-body>\r\n <ul fd-list>\r\n @for (item of availableItems; track item) {\r\n <li fd-list-item (click)=\"newItem(item)\">\r\n @if (visibleFields.length > 0) { @for (field of visibleFields; track field) {\r\n {{ item[field] }}\r\n } } @else {\r\n {{ item }}\r\n }\r\n </li>\r\n }\r\n </ul>\r\n </fd-popover-body>\r\n</fd-popover>\r\n}\r\n", styles: [":host{display:flex;align-items:center;column-gap:2px;width:130px}.avatar-actions{display:flex;padding:10px;flex-direction:column;justify-content:center;row-gap:15px;width:100px}\n"], dependencies: [{ kind: "component", type: i1$2.AvatarComponent, selector: "fd-avatar", inputs: ["class", "id", "ariaLabel", "ariaLabelledby", "label", "size", "font", "glyph", "zoomGlyph", "circle", "transparent", "contain", "placeholder", "tile", "border", "colorAccent", "random", "clickable", "valueState", "image", "alterIcon", "backupImage"], outputs: ["avatarClicked", "zoomGlyphClicked"] }, { kind: "component", type: i2.BarComponent, selector: "[fd-bar]", inputs: ["class", "barDesign", "inPage", "inHomePage", "size"] }, { kind: "directive", type: i2.BarLeftDirective, selector: "[fd-bar-left]" }, { kind: "directive", type: i2.BarElementDirective, selector: "fd-bar-element", inputs: ["fullWidth"] }, { kind: "component", type: i2.ButtonBarComponent, selector: "fd-button-bar", inputs: ["fullWidth", "fdType", "title", "ariaLabelledby", "id"] }, { kind: "component", type: i3.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i4$3.ListComponent, selector: "[fd-list], [fdList]", inputs: ["dropdownMode", "multiInputMode", "mobileMode", "hasMessage", "noBorder", "navigationIndicator", "selection", "keyboardSupport", "byline", "unreadIndicator", "role"], outputs: ["focusEscapeList"] }, { kind: "component", type: i4$3.ListItemComponent, selector: "[fdListItem] ,[fd-list-item]", inputs: ["selected", "noData", "action", "interactive", "growing", "counter", "unread", "byline", "ariaRole", "id"], outputs: ["keyDown"] }, { kind: "component", type: i5.PopoverControlComponent, selector: "fd-popover-control, [fdPopoverControl]" }, { kind: "component", type: i5.PopoverBodyComponent, selector: "fd-popover-body", inputs: ["minWidth", "maxWidth", "minHeight", "maxHeight"] }, { kind: "directive", type: i5.PopoverBodyHeaderDirective, selector: "[fdPopoverBodyHeader], [fd-popover-body-header]" }, { kind: "component", type: i5.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig", "preventSpaceKeyScroll"] }, { kind: "pipe", type: i1$1.PictureFieldSourcePipe, name: "picFieldSrc" }, { kind: "pipe", type: i1$1.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
156
+ }
157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: BarsaAvatarGroupComponent, decorators: [{
158
+ type: Component,
159
+ args: [{ selector: 'bk-avatar-group', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fd-avatar-group #avatarGroupCom type=\"group\" [size]=\"size\">\r\n <fd-popover\r\n [noArrow]=\"false\"\r\n [focusTrapped]=\"true\"\r\n [focusAutoCapture]=\"true\"\r\n [triggers]=\"[]\"\r\n [closeOnOutsideClick]=\"true\"\r\n [closeOnEscapeKey]=\"true\"\r\n (isOpenChange)=\"isOpenChanged($event)\"\r\n placement=\"bottom\"\r\n [maxWidth]=\"312\"\r\n #overflowPopover\r\n >\r\n <fd-popover-control\r\n fd-avatar-group-popover-control\r\n [attr.aria-label]=\"\r\n 'Has popup type dialog Conjoined avatars, ' +\r\n ' avatars displayed, ' +\r\n 1 +\r\n ' avatars hidden, activate for complete list'\r\n \"\r\n (click)=\"handleControlClick($event, overflowPopover)\"\r\n (keydown)=\"handleControlKeydown($event, overflowPopover)\"\r\n >\r\n @for (person of existedItems; track person) {\r\n <div fd-avatar-group-item>\r\n @if (!person[viewSetting.AssigneeImage]) {\r\n <fd-avatar\r\n [label]=\"person[viewSetting.AssigneeName]\"\r\n [title]=\"person[viewSetting.AssigneeName]\"\r\n [ariaLabel]=\"person[viewSetting.AssigneeName] + ' avatar'\"\r\n role=\"img\"\r\n [circle]=\"true\"\r\n [border]=\"true\"\r\n [size]=\"size\"\r\n ></fd-avatar>\r\n } @if (person[viewSetting.AssigneeImage]; as avatar) {\r\n <fd-avatar\r\n role=\"img\"\r\n [title]=\"person[viewSetting.AssigneeName]\"\r\n [ariaLabel]=\"person[viewSetting.AssigneeName] + ' avatar'\"\r\n [circle]=\"true\"\r\n [border]=\"true\"\r\n [size]=\"size\"\r\n [image]=\"(avatar.FileId | picFieldSrc: 'ID':person.Id) || ''\"\r\n >\r\n </fd-avatar>\r\n }\r\n </div>\r\n } \r\n <button fd-button fd-avatar-group-overflow-button tabindex=\"-1\" [compact]=\"false\" [size]=\"size\">\r\n <bdi fd-avatar-group-overflow-button-text> 1 </bdi>\r\n </button>\r\n \r\n </fd-popover-control>\r\n <fd-popover-body #overflowPopoverBody aria-labelledby=\"avatar-group-1-popover-header\" role=\"tooltip\">\r\n <div class=\"fd-popover__wrapper\">\r\n <div fd-popover-body-header>\r\n <div fd-bar barDesign=\"header\">\r\n <div fd-bar-left>\r\n @if (isDetailStage) {\r\n <fd-button-bar\r\n (click)=\"openOverflowMain()\"\r\n glyph=\"navigation-left-arrow\"\r\n fdType=\"transparent\"\r\n aria-label=\"Back\"\r\n title=\"Back\"\r\n ></fd-button-bar>\r\n }\r\n <fd-bar-element id=\"avatar-group-1-popover-header\">\r\n {{ isDetailStage ? 'Business Card' : 'Team Members (' + existedItems?.length + ')' }}\r\n </fd-bar-element>\r\n @if (isDetailStage) {\r\n <fd-bar-element>&nbsp;</fd-bar-element>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n fd-avatar-group-overflow-body\r\n [noPadding]=\"isDetailStage\"\r\n [noHorizontalScroll]=\"isDetailStage\"\r\n [noVerticalScroll]=\"false\"\r\n >\r\n @if (overflowPopoverStage === 'main') { @for (person of existedItems; track person; let idx =\r\n $index) {\r\n <div fd-avatar-group-overflow-item>\r\n <fd-popover [triggers]=\"['click']\">\r\n <fd-popover-control>\r\n @if (!person[viewSetting.AssigneeImage]) {\r\n <fd-avatar\r\n fd-avatar-group-focusable-avatar\r\n [circle]=\"true\"\r\n size=\"s\"\r\n [label]=\"person[viewSetting.AssigneeName]\"\r\n [title]=\"person[viewSetting.AssigneeName]\"\r\n [ariaLabel]=\"person[viewSetting.AssigneeName] + ' avatar'\"\r\n role=\"img\"\r\n ></fd-avatar>\r\n } @if (person[viewSetting.AssigneeImage]; as avatar) {\r\n <fd-avatar\r\n fd-avatar-group-focusable-avatar\r\n role=\"img\"\r\n [title]=\"person[viewSetting.AssigneeName]\"\r\n [ariaLabel]=\"person[viewSetting.AssigneeName] + ' avatar'\"\r\n [circle]=\"true\"\r\n size=\"s\"\r\n [image]=\"(avatar.FileId | picFieldSrc: 'ID':person.Id) || ''\"\r\n ></fd-avatar>\r\n }\r\n </fd-popover-control>\r\n <fd-popover-body>\r\n <div class=\"avatar-actions\">\r\n <button\r\n fd-button\r\n (click)=\"deleteAvatar(idx)\"\r\n [label]=\"'Delete' | bbbTranslate\"\r\n glyph=\"decline\"\r\n ></button>\r\n <button fd-button [label]=\"'Show' | bbbTranslate\" glyph=\"detail-view\"></button>\r\n </div>\r\n </fd-popover-body>\r\n </fd-popover>\r\n </div>\r\n } }\r\n </div>\r\n </div>\r\n </fd-popover-body>\r\n </fd-popover>\r\n</fd-avatar-group>\r\n\r\n@if (addItem) {\r\n<fd-popover\r\n #peoplePopover\r\n [triggers]=\"[]\"\r\n [focusTrapped]=\"false\"\r\n [closeOnOutsideClick]=\"true\"\r\n [noArrow]=\"false\"\r\n placement=\"bottom\"\r\n [focusAutoCapture]=\"true\"\r\n>\r\n <fd-popover-control>\r\n <div>\r\n <button\r\n fd-button\r\n (click)=\"openPopover($event, peoplePopover)\"\r\n fdType=\"transparent\"\r\n glyph=\"sys-add\"\r\n ></button>\r\n </div>\r\n </fd-popover-control>\r\n <fd-popover-body>\r\n <ul fd-list>\r\n @for (item of availableItems; track item) {\r\n <li fd-list-item (click)=\"newItem(item)\">\r\n @if (visibleFields.length > 0) { @for (field of visibleFields; track field) {\r\n {{ item[field] }}\r\n } } @else {\r\n {{ item }}\r\n }\r\n </li>\r\n }\r\n </ul>\r\n </fd-popover-body>\r\n</fd-popover>\r\n}\r\n", styles: [":host{display:flex;align-items:center;column-gap:2px;width:130px}.avatar-actions{display:flex;padding:10px;flex-direction:column;justify-content:center;row-gap:15px;width:100px}\n"] }]
160
+ }], propDecorators: { popoverBodyComponent: [{
161
+ type: ViewChild,
162
+ args: ['overflowPopoverBody']
163
+ }], avatarGroupCom: [{
164
+ type: ViewChild,
165
+ args: [AvatarGroupComponent, { static: true, read: AvatarGroupComponent }]
166
+ }], existedItems: [{
167
+ type: Input
168
+ }], availableItems: [{
169
+ type: Input
170
+ }], viewSetting: [{
171
+ type: Input
172
+ }], visibleFields: [{
173
+ type: Input
174
+ }], addItem: [{
175
+ type: Input
176
+ }], size: [{
177
+ type: Input
178
+ }] } });
179
+
180
+ class KanbanViewComponent extends ReportViewBaseComponent {
181
+ constructor() {
182
+ super(...arguments);
183
+ this.groupbyProperty = 'State';
184
+ this.isNewColumnMode = false;
185
+ this.newCard = { Id: null, $Caption: null };
186
+ this.newColumn = { Id: null, $Caption: null };
187
+ }
188
+ ngOnInit() {
189
+ super.ngOnInit();
190
+ const columnsReport = this.viewSetting.ColumnsReport.$Caption;
191
+ this._portalService.ReportExecute(columnsReport).subscribe((report) => {
192
+ this.kanbanColumns = report.MoDataList;
193
+ this._changeDetect();
194
+ });
195
+ this.formSetting.View.ControlInfo.forEach((c) => (c.InlineEditMode = true));
196
+ const assigneesReport = this.viewSetting.AssigneesReport.$Caption;
197
+ this._portalService.ReportExecute(assigneesReport).subscribe((report) => {
198
+ this.allAvailableAssignees = report.MoDataList;
199
+ this._changeDetect();
200
+ });
201
+ this.viewSetting = {
202
+ ...this.viewSetting,
203
+ ...this._findColumn(this.allColumns, [
204
+ this.viewSetting.Cover,
205
+ this.viewSetting.State,
206
+ this.viewSetting.Caption
207
+ ])
208
+ };
209
+ }
210
+ onAddNewColumn() {
211
+ this.kanbanColumns.push(this.newColumn);
212
+ this._cdr.detectChanges();
213
+ this._resetNewColumn();
214
+ this._scrollInputIntoView();
215
+ }
216
+ onActiveNewColumnMode() {
217
+ this._changeNewColumnMode(true);
218
+ }
219
+ onCancelNewColumn() {
220
+ this._changeNewColumnMode(false);
221
+ this._resetNewColumn();
222
+ }
223
+ onInitNewCard(groupby) {
224
+ this._resetNewCard();
225
+ this.newCard[this.groupbyProperty] = groupby;
226
+ }
227
+ onAddNewCard(e) {
228
+ e.stopPropagation();
229
+ e.preventDefault();
230
+ this._addNewCard();
231
+ }
232
+ onNewCardInputFocusout() {
233
+ if (this.newCard.$Caption) {
234
+ this._addNewCard();
235
+ }
236
+ else {
237
+ this._cancelNewCard();
238
+ }
239
+ }
240
+ onCancelNewCard(e) {
241
+ e.stopPropagation();
242
+ e.preventDefault();
243
+ this._cancelNewCard();
244
+ }
245
+ onDrop(event, isColumn) {
246
+ let previousIndex;
247
+ let currentIndex;
248
+ const array = event.container.data;
249
+ if (isColumn) {
250
+ previousIndex = event.previousIndex;
251
+ currentIndex = event.currentIndex;
252
+ }
253
+ else {
254
+ const draggedItemId = this.dropActionTodo.draggedId;
255
+ if (!draggedItemId) {
256
+ return;
257
+ }
258
+ const draggedItem = this._getMoById(draggedItemId);
259
+ const targetState = this.dropActionTodo.targetState;
260
+ previousIndex = array.indexOf(draggedItem);
261
+ currentIndex = this.dropActionTodo.targetIndex;
262
+ draggedItem.State = targetState;
263
+ this._stopDragging();
264
+ }
265
+ moveItemInArray(array, previousIndex, currentIndex);
266
+ }
267
+ onDragMove(event, draggedMo, draggedIndex, targetState) {
268
+ const elementFromPoint = document.elementFromPoint(event.pointerPosition.x, event.pointerPosition.y);
269
+ if (targetState) {
270
+ }
271
+ if (!elementFromPoint) {
272
+ this._stopDragging();
273
+ return;
274
+ }
275
+ const targetNodeElement = elementFromPoint.closest('[state]');
276
+ if (!targetNodeElement) {
277
+ this._stopDragging();
278
+ return;
279
+ }
280
+ this.dropActionTodo = {
281
+ draggedId: draggedMo.Id,
282
+ targetId: targetNodeElement.getAttribute('id'),
283
+ targetState: null,
284
+ targetIndex: Number(targetNodeElement.getAttribute('index'))
285
+ };
286
+ const targetRect = targetNodeElement.getBoundingClientRect();
287
+ const oneThird = targetRect.height / 3;
288
+ const isCardTarget = !targetNodeElement.classList.contains('column');
289
+ const isBefore = event.pointerPosition.y - targetRect.top < oneThird && isCardTarget;
290
+ const isAfter = event.pointerPosition.y - targetRect.top > 2 * oneThird && isCardTarget;
291
+ const isInside = !isCardTarget;
292
+ const targetIndex = this.dropActionTodo.targetIndex ?? -1;
293
+ const targetMo = this.moDataList[targetIndex];
294
+ if (isCardTarget) {
295
+ this.dropActionTodo.targetState = targetMo[this.viewSetting.State];
296
+ }
297
+ else {
298
+ this.dropActionTodo.targetState = {
299
+ $Caption: targetNodeElement.getAttribute('state'),
300
+ Id: targetNodeElement.getAttribute('id'),
301
+ $TypeDefId: draggedMo[this.viewSetting.State]?.$TypeDefId
302
+ };
303
+ }
304
+ if (isBefore) {
305
+ this.dropActionTodo.action = 'before';
306
+ this.dropActionTodo.targetIndex = draggedIndex > targetIndex ? targetIndex : targetIndex - 1;
307
+ }
308
+ else if (isAfter) {
309
+ this.dropActionTodo.action = 'after';
310
+ this.dropActionTodo.targetIndex = draggedIndex < targetIndex ? targetIndex : targetIndex + 1;
311
+ }
312
+ else if (isInside) {
313
+ this.dropActionTodo.action = 'inside';
314
+ this.dropActionTodo.targetIndex = 0;
315
+ }
316
+ // console.log(this.dropActionTodo.targetState);
317
+ this._showDragInfo();
318
+ }
319
+ _changeDetect() {
320
+ this._cdr.detectChanges();
321
+ }
322
+ _stopDragging() {
323
+ this._clearDragInfo();
324
+ this._resetDropActionTodo();
325
+ }
326
+ _changeNewColumnMode(mode) {
327
+ this.isNewColumnMode = mode;
328
+ }
329
+ _resetDropActionTodo() {
330
+ this.dropActionTodo = {
331
+ targetId: null,
332
+ draggedId: null,
333
+ targetState: null,
334
+ targetIndex: null,
335
+ action: null
336
+ };
337
+ }
338
+ _scrollInputIntoView() {
339
+ const inputEl = this.inputEl.nativeElement;
340
+ inputEl.focus();
341
+ inputEl.scrollIntoView({ inline: 'end' });
342
+ }
343
+ _resetNewColumn() {
344
+ this.newColumn = { Id: '', $Caption: '' };
345
+ }
346
+ _clearDragInfo(dropped = false) {
347
+ if (dropped) {
348
+ this._resetDropActionTodo();
349
+ }
350
+ const elDom = this._el.nativeElement;
351
+ elDom
352
+ .querySelectorAll('.drop-before')
353
+ .forEach((element) => this._renderer2.removeClass(element, 'drop-before'));
354
+ elDom.querySelectorAll('.drop-after').forEach((element) => this._renderer2.removeClass(element, 'drop-after'));
355
+ elDom
356
+ .querySelectorAll('.drop-inside')
357
+ .forEach((element) => this._renderer2.removeClass(element, 'drop-inside'));
358
+ }
359
+ _showDragInfo() {
360
+ this._clearDragInfo();
361
+ if (this.dropActionTodo.targetId) {
362
+ const targetNodeElement = this._el.nativeElement.querySelector('#' + this.dropActionTodo.targetId);
363
+ if (!targetNodeElement) {
364
+ this._resetDropActionTodo();
365
+ return;
366
+ }
367
+ this._renderer2.addClass(targetNodeElement, 'drop-' + this.dropActionTodo?.action);
368
+ }
369
+ }
370
+ _addNewCard() {
371
+ this.moDataList.push(this.newCard);
372
+ const currentGroupby = this.newCard[this.groupbyProperty];
373
+ this.onInitNewCard(currentGroupby);
374
+ }
375
+ _resetNewCard() {
376
+ this.newCard = { Id: null, $Caption: null };
377
+ }
378
+ _cancelNewCard() {
379
+ this._resetNewCard();
380
+ }
381
+ _getMoById(id) {
382
+ return this.moDataList.find((c) => c.Id === id);
383
+ }
384
+ _findColumn(allColumns, columnsName) {
385
+ const columns = {};
386
+ columnsName.forEach((name) => {
387
+ columns[name + 'Column'] = this._findColumnByDbName.transform(this.allColumns, name);
388
+ });
389
+ return columns;
390
+ }
391
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: KanbanViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
392
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: KanbanViewComponent, selector: "bk-kanban-view", inputs: { kanbanColumns: "kanbanColumns", groupbyProperty: "groupbyProperty" }, viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<fd-layout-panel>\r\n <fd-layout-panel-body [bleed]=\"true\">\r\n @if (isCheckList) {\r\n <table fd-table>\r\n <thead fd-table-header>\r\n <tr fd-table-row>\r\n <th fd-table-cell>\r\n <fd-checkbox\r\n name=\"allCheckbox\"\r\n [ngModel]=\"allChecked\"\r\n (ngModelChange)=\"onAllCheckbox($event)\"\r\n >{{ 'All' | bbbTranslate }}</fd-checkbox\r\n >\r\n </th>\r\n </tr>\r\n </thead>\r\n </table>\r\n }\r\n </fd-layout-panel-body>\r\n</fd-layout-panel>\r\n\r\n@if (moDataList?.length) {\r\n<fd-layout-grid\r\n class=\"columns\"\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n [cdkDropListData]=\"kanbanColumns\"\r\n [id]=\"'$Root'\"\r\n (cdkDropListDropped)=\"onDrop($event, true)\"\r\n>\r\n @for (column of kanbanColumns; track column; let columnIndex = $index) {\r\n <div\r\n [fdLayoutGridCol]=\"12\"\r\n [colMd]=\"6\"\r\n [colLg]=\"4\"\r\n [colXl]=\"3\"\r\n class=\"column\"\r\n [id]=\"column.Id\"\r\n [attr.state]=\"column.$Caption\"\r\n cdkDrag\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n columnCard;\r\n context: {\r\n column: column,\r\n columnIndex: columnIndex\r\n }\r\n \"\r\n ></ng-container>\r\n </div>\r\n } @if (!isNewColumnMode) {\r\n <div [fdLayoutGridCol]=\"12\" [colMd]=\"6\" [colLg]=\"4\" [colXl]=\"3\" class=\"newColumn\" (click)=\"onActiveNewColumnMode()\">\r\n <ng-container>\r\n <span>\u0633\u062A\u0648\u0646 \u062C\u062F\u06CC\u062F</span>\r\n </ng-container>\r\n </div>\r\n } @else {\r\n <div [fdLayoutGridCol]=\"12\" [colMd]=\"6\" [colLg]=\"4\" [colXl]=\"3\">\r\n <input\r\n #inputEl\r\n fd-form-control\r\n type=\"text\"\r\n autofocus\r\n (focusout)=\"onCancelNewColumn()\"\r\n [(ngModel)]=\"newColumn.$Caption\"\r\n (keydown.enter)=\"onAddNewColumn()\"\r\n id=\"new-column-name\"\r\n placeholder=\" \u0646\u0627\u0645\"\r\n />\r\n </div>\r\n }\r\n</fd-layout-grid>\r\n} @else {\r\n<bsu-no-data></bsu-no-data>\r\n}\r\n\r\n<!--noData-->\r\n\r\n<!--column card-->\r\n<ng-template #columnCard let-column=\"column\" let-columnIndex=\"columnIndex\">\r\n <fd-card cardType=\"quickView\" class=\"docs-flex-item-margin\" ellipsify>\r\n <fd-card-header>\r\n <span fd-card-title>{{ column.$Caption }}</span>\r\n </fd-card-header>\r\n <fd-card-content\r\n cdkDropList\r\n (cdkDropListDropped)=\"onDrop($event)\"\r\n [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListData]=\"moDataList\"\r\n >\r\n @for (mo of moDataList; track mo; let index = $index) { @if (mo[viewSetting.State].$Caption ===\r\n column.$Caption) {\r\n <bk-kanban-card\r\n [mo]=\"mo\"\r\n [viewSetting]=\"viewSetting\"\r\n [formSetting]=\"formSetting\"\r\n [allAvailableAssignees]=\"allAvailableAssignees\"\r\n [index]=\"index\"\r\n [attr.id]=\"mo.Id\"\r\n [inlineEditMode]=\"true\"\r\n [isChecked]=\"true\"\r\n [attr.state]=\"column.$Caption\"\r\n [attr.index]=\"index\"\r\n [class.selected]=\"mo.$IsChecked\"\r\n (cdkDragMoved)=\"onDragMove($event, mo, index, column)\"\r\n (click)=\"onRowCheck({mo, index})\"\r\n (dblclick)=\"onRowClick({mo, index})\"\r\n cdkDrag\r\n >\r\n </bk-kanban-card>\r\n } }\r\n </fd-card-content>\r\n <fd-card-footer class=\"column-footer\">\r\n @if (newCard[groupbyProperty] === column.$Caption) {\r\n <div class=\"new-card\">\r\n <fd-card>\r\n <div fd-form-item>\r\n <textarea\r\n fd-form-control\r\n [autofocus]=\"true\"\r\n [(ngModel)]=\"newCard.$Caption\"\r\n (keydown.enter)=\"onAddNewCard($event)\"\r\n (focusout)=\"onNewCardInputFocusout()\"\r\n [placeholder]=\"'Title' | bbbTranslate\"\r\n ></textarea>\r\n </div>\r\n </fd-card>\r\n <div class=\"new-card-actions\">\r\n <button\r\n fd-button\r\n (click)=\"onAddNewCard($event)\"\r\n fdType=\"emphasized\"\r\n class=\"add-card-btn\"\r\n [label]=\"'\u0627\u0641\u0632\u0648\u062F\u0646'\"\r\n ></button>\r\n <fd-icon (mousedown)=\"onCancelNewCard($event)\" glyph=\"decline\"></fd-icon>\r\n </div>\r\n </div>\r\n } @else {\r\n <div class=\"add-new-card\" (click)=\"onInitNewCard(column.$Caption)\">\r\n <span>\r\n <fd-icon glyph=\"add\"></fd-icon>\r\n \u06A9\u0627\u0631\u062A \u062C\u062F\u06CC\u062F\r\n </span>\r\n </div>\r\n }\r\n </fd-card-footer>\r\n </fd-card>\r\n</ng-template>\r\n", styles: [":host{display:flex;column-gap:20px;row-gap:20px;flex-wrap:wrap;overflow:auto;padding-bottom:1rem;height:calc(100% - 38.5px)}::-webkit-scrollbar{height:7px;width:7px}::-webkit-scrollbar-track{box-shadow:inset 0 0 2px #d0cece;border-radius:10px}::-webkit-scrollbar-thumb{background:#c8cacb;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:#adb0b2}.columns{height:inherit;width:100%;column-gap:15px;flex-wrap:nowrap!important}.column{height:100%;background-color:var(--sapList_Background, #fff)!important}.column.cdk-drag-placeholder{opacity:0}.column>fd-card{overflow-y:hidden;height:100%;box-shadow:none}.column>fd-card fd-card-header{border:none;background:none;padding:1rem 2rem!important}.column>fd-card fd-card-content{flex:1;overflow-y:auto;padding:0 1rem;margin:0;display:flex;flex-direction:column;row-gap:20px}.column>fd-card .column-footer{padding:1rem 1rem 1rem 1.5rem;position:sticky}.column>fd-card .column-footer .new-card{display:flex;flex-direction:column;justify-content:center;row-gap:1rem}.column>fd-card .column-footer .new-card fd-card{padding:0 1rem;background:var(--sapBackgroundColor, #f7f7f7)!important}.column>fd-card .column-footer .new-card textarea{background:var(--sapBackgroundColor, #f7f7f7)!important;border:none}.column>fd-card .column-footer .new-card span{height:auto!important}.column>fd-card .column-footer .new-card .new-card-actions{display:flex;align-items:center;column-gap:10px}.column>fd-card .column-footer .new-card .new-card-actions fd-icon{font-size:1rem}.column>fd-card .column-footer .add-new-card{padding:0 1rem}.column>fd-card .column-footer .add-new-card span{display:flex;column-gap:4px}.newColumn{background-color:var(--sapList_Background, #fff)!important;border-radius:var(--sapElement_BorderCornerRadius, .25rem);align-self:flex-start;height:100px;opacity:.5;display:flex;align-items:center;justify-content:center;border:1px dashed;position:relative;cursor:pointer}.newColumn span{position:absolute}.newColumn .new-column-popover{width:100%}.newColumn .new-column-popover fd-popover-control{width:100%;height:1px}.new-column-popover-body input{border:none}.row{display:flex;align-items:center}.drop-inside{border:1px solid #00f}.drop-inside ::ng-deep .fd-list__item{background-color:#dce9f6!important}.drop-before{border-top:2px solid #00f}.drop-before ::ng-deep .fd-list__item{background-color:#dce9f6!important}.drop-after{border-bottom:2px solid #00f}.drop-after ::ng-deep .fd-list__item{background-color:#dce9f6!important}.columns.cdk-drop-list-dragging .column:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.EllipsifyDirective, selector: "[ellipsify]", inputs: ["limitLine"] }, { kind: "component", type: i3.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i4$1.CardComponent, selector: "fd-card", inputs: ["badge", "isLoading", "cardType", "id", "role"] }, { kind: "component", type: i4$1.CardHeaderComponent, selector: "fd-card-header", inputs: ["interactive", "tabindex"] }, { kind: "component", type: i4$1.CardContentComponent, selector: "fd-card-content" }, { kind: "directive", type: i4$1.CardTitleDirective, selector: "[fd-card-title]", inputs: ["id"] }, { kind: "component", type: i4$1.CardFooterComponent, selector: "fd-card-footer" }, { kind: "component", type: i5$2.CheckboxComponent, selector: "fd-checkbox", inputs: ["wrapLabel", "valignLabel", "ariaLabel", "value", "ariaLabelledBy", "ariaDescribedBy", "title", "inputId", "state", "name", "label", "disabled", "tristate", "tristateSelectable", "labelClass", "required", "displayOnly", "values", "standalone"], outputs: ["focusChange"] }, { kind: "component", type: i3$1.FormControlComponent, selector: "input[fd-form-control], textarea[fd-form-control]", inputs: ["state", "type", "class", "ariaLabel", "ariaLabelledBy"] }, { kind: "component", type: i3$1.FormItemComponent, selector: "[fd-form-item]", inputs: ["isInline", "horizontal"] }, { kind: "component", type: i3$2.IconComponent, selector: "fd-icon", inputs: ["glyph", "font", "color", "background", "class", "ariaLabel", "ariaHidden"] }, { kind: "component", type: i8.LayoutGridComponent, selector: "fd-layout-grid, [fdLayoutGrid]", inputs: ["class", "noGap", "noHorizontalGap", "noVerticalGap"] }, { kind: "directive", type: i8.LayoutGridColDirective, selector: "[fd-layout-grid-col], [fdLayoutGridCol]", inputs: ["fdLayoutGridCol", "colGrow", "colMd", "colLg", "colXl", "colOffset", "colOffsetMd", "colOffsetLg", "colOffsetXl", "class"] }, { kind: "component", type: i9.LayoutPanelComponent, selector: "fd-layout-panel", inputs: ["backgroundImage", "id", "transparent"] }, { kind: "component", type: i9.LayoutPanelBodyComponent, selector: "fd-layout-panel-body", inputs: ["bleed"] }, { kind: "component", type: i10.TableComponent, selector: "table[fd-table]", inputs: ["noBorderX", "noBorderY", "noOuterBorder", "topBorder", "popIn", "responsive", "keys", "allCellsFocusable"], exportAs: ["fd-table"] }, { kind: "directive", type: i10.TableHeaderDirective, selector: "[fdTableHeader], [fd-table-header]", inputs: ["noBorderX", "noBorderY"] }, { kind: "directive", type: i10.TableRowDirective, selector: "[fdTableRow], [fd-table-row]", inputs: ["activable", "highlightActive", "hoverable", "focusable", "main", "secondary", "active"] }, { kind: "directive", type: i10.TableCellDirective, selector: "[fdTableCell], [fd-table-cell]", inputs: ["noBorderX", "noBorderY", "activable", "focusable", "hoverable", "fitContent", "noPadding", "noData", "key"] }, { kind: "component", type: i5$1.NoDataComponent, selector: "bsu-no-data", inputs: ["simple"] }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i13.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: i13.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: "component", type: KanbanCardComponent, selector: "bk-kanban-card", inputs: ["index", "mo", "viewSetting", "allAvailableAssignees"] }, { kind: "pipe", type: i1$1.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
393
+ }
394
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: KanbanViewComponent, decorators: [{
395
+ type: Component,
396
+ args: [{ selector: 'bk-kanban-view', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fd-layout-panel>\r\n <fd-layout-panel-body [bleed]=\"true\">\r\n @if (isCheckList) {\r\n <table fd-table>\r\n <thead fd-table-header>\r\n <tr fd-table-row>\r\n <th fd-table-cell>\r\n <fd-checkbox\r\n name=\"allCheckbox\"\r\n [ngModel]=\"allChecked\"\r\n (ngModelChange)=\"onAllCheckbox($event)\"\r\n >{{ 'All' | bbbTranslate }}</fd-checkbox\r\n >\r\n </th>\r\n </tr>\r\n </thead>\r\n </table>\r\n }\r\n </fd-layout-panel-body>\r\n</fd-layout-panel>\r\n\r\n@if (moDataList?.length) {\r\n<fd-layout-grid\r\n class=\"columns\"\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n [cdkDropListData]=\"kanbanColumns\"\r\n [id]=\"'$Root'\"\r\n (cdkDropListDropped)=\"onDrop($event, true)\"\r\n>\r\n @for (column of kanbanColumns; track column; let columnIndex = $index) {\r\n <div\r\n [fdLayoutGridCol]=\"12\"\r\n [colMd]=\"6\"\r\n [colLg]=\"4\"\r\n [colXl]=\"3\"\r\n class=\"column\"\r\n [id]=\"column.Id\"\r\n [attr.state]=\"column.$Caption\"\r\n cdkDrag\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n columnCard;\r\n context: {\r\n column: column,\r\n columnIndex: columnIndex\r\n }\r\n \"\r\n ></ng-container>\r\n </div>\r\n } @if (!isNewColumnMode) {\r\n <div [fdLayoutGridCol]=\"12\" [colMd]=\"6\" [colLg]=\"4\" [colXl]=\"3\" class=\"newColumn\" (click)=\"onActiveNewColumnMode()\">\r\n <ng-container>\r\n <span>\u0633\u062A\u0648\u0646 \u062C\u062F\u06CC\u062F</span>\r\n </ng-container>\r\n </div>\r\n } @else {\r\n <div [fdLayoutGridCol]=\"12\" [colMd]=\"6\" [colLg]=\"4\" [colXl]=\"3\">\r\n <input\r\n #inputEl\r\n fd-form-control\r\n type=\"text\"\r\n autofocus\r\n (focusout)=\"onCancelNewColumn()\"\r\n [(ngModel)]=\"newColumn.$Caption\"\r\n (keydown.enter)=\"onAddNewColumn()\"\r\n id=\"new-column-name\"\r\n placeholder=\" \u0646\u0627\u0645\"\r\n />\r\n </div>\r\n }\r\n</fd-layout-grid>\r\n} @else {\r\n<bsu-no-data></bsu-no-data>\r\n}\r\n\r\n<!--noData-->\r\n\r\n<!--column card-->\r\n<ng-template #columnCard let-column=\"column\" let-columnIndex=\"columnIndex\">\r\n <fd-card cardType=\"quickView\" class=\"docs-flex-item-margin\" ellipsify>\r\n <fd-card-header>\r\n <span fd-card-title>{{ column.$Caption }}</span>\r\n </fd-card-header>\r\n <fd-card-content\r\n cdkDropList\r\n (cdkDropListDropped)=\"onDrop($event)\"\r\n [cdkDropListSortingDisabled]=\"true\"\r\n [cdkDropListData]=\"moDataList\"\r\n >\r\n @for (mo of moDataList; track mo; let index = $index) { @if (mo[viewSetting.State].$Caption ===\r\n column.$Caption) {\r\n <bk-kanban-card\r\n [mo]=\"mo\"\r\n [viewSetting]=\"viewSetting\"\r\n [formSetting]=\"formSetting\"\r\n [allAvailableAssignees]=\"allAvailableAssignees\"\r\n [index]=\"index\"\r\n [attr.id]=\"mo.Id\"\r\n [inlineEditMode]=\"true\"\r\n [isChecked]=\"true\"\r\n [attr.state]=\"column.$Caption\"\r\n [attr.index]=\"index\"\r\n [class.selected]=\"mo.$IsChecked\"\r\n (cdkDragMoved)=\"onDragMove($event, mo, index, column)\"\r\n (click)=\"onRowCheck({mo, index})\"\r\n (dblclick)=\"onRowClick({mo, index})\"\r\n cdkDrag\r\n >\r\n </bk-kanban-card>\r\n } }\r\n </fd-card-content>\r\n <fd-card-footer class=\"column-footer\">\r\n @if (newCard[groupbyProperty] === column.$Caption) {\r\n <div class=\"new-card\">\r\n <fd-card>\r\n <div fd-form-item>\r\n <textarea\r\n fd-form-control\r\n [autofocus]=\"true\"\r\n [(ngModel)]=\"newCard.$Caption\"\r\n (keydown.enter)=\"onAddNewCard($event)\"\r\n (focusout)=\"onNewCardInputFocusout()\"\r\n [placeholder]=\"'Title' | bbbTranslate\"\r\n ></textarea>\r\n </div>\r\n </fd-card>\r\n <div class=\"new-card-actions\">\r\n <button\r\n fd-button\r\n (click)=\"onAddNewCard($event)\"\r\n fdType=\"emphasized\"\r\n class=\"add-card-btn\"\r\n [label]=\"'\u0627\u0641\u0632\u0648\u062F\u0646'\"\r\n ></button>\r\n <fd-icon (mousedown)=\"onCancelNewCard($event)\" glyph=\"decline\"></fd-icon>\r\n </div>\r\n </div>\r\n } @else {\r\n <div class=\"add-new-card\" (click)=\"onInitNewCard(column.$Caption)\">\r\n <span>\r\n <fd-icon glyph=\"add\"></fd-icon>\r\n \u06A9\u0627\u0631\u062A \u062C\u062F\u06CC\u062F\r\n </span>\r\n </div>\r\n }\r\n </fd-card-footer>\r\n </fd-card>\r\n</ng-template>\r\n", styles: [":host{display:flex;column-gap:20px;row-gap:20px;flex-wrap:wrap;overflow:auto;padding-bottom:1rem;height:calc(100% - 38.5px)}::-webkit-scrollbar{height:7px;width:7px}::-webkit-scrollbar-track{box-shadow:inset 0 0 2px #d0cece;border-radius:10px}::-webkit-scrollbar-thumb{background:#c8cacb;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:#adb0b2}.columns{height:inherit;width:100%;column-gap:15px;flex-wrap:nowrap!important}.column{height:100%;background-color:var(--sapList_Background, #fff)!important}.column.cdk-drag-placeholder{opacity:0}.column>fd-card{overflow-y:hidden;height:100%;box-shadow:none}.column>fd-card fd-card-header{border:none;background:none;padding:1rem 2rem!important}.column>fd-card fd-card-content{flex:1;overflow-y:auto;padding:0 1rem;margin:0;display:flex;flex-direction:column;row-gap:20px}.column>fd-card .column-footer{padding:1rem 1rem 1rem 1.5rem;position:sticky}.column>fd-card .column-footer .new-card{display:flex;flex-direction:column;justify-content:center;row-gap:1rem}.column>fd-card .column-footer .new-card fd-card{padding:0 1rem;background:var(--sapBackgroundColor, #f7f7f7)!important}.column>fd-card .column-footer .new-card textarea{background:var(--sapBackgroundColor, #f7f7f7)!important;border:none}.column>fd-card .column-footer .new-card span{height:auto!important}.column>fd-card .column-footer .new-card .new-card-actions{display:flex;align-items:center;column-gap:10px}.column>fd-card .column-footer .new-card .new-card-actions fd-icon{font-size:1rem}.column>fd-card .column-footer .add-new-card{padding:0 1rem}.column>fd-card .column-footer .add-new-card span{display:flex;column-gap:4px}.newColumn{background-color:var(--sapList_Background, #fff)!important;border-radius:var(--sapElement_BorderCornerRadius, .25rem);align-self:flex-start;height:100px;opacity:.5;display:flex;align-items:center;justify-content:center;border:1px dashed;position:relative;cursor:pointer}.newColumn span{position:absolute}.newColumn .new-column-popover{width:100%}.newColumn .new-column-popover fd-popover-control{width:100%;height:1px}.new-column-popover-body input{border:none}.row{display:flex;align-items:center}.drop-inside{border:1px solid #00f}.drop-inside ::ng-deep .fd-list__item{background-color:#dce9f6!important}.drop-before{border-top:2px solid #00f}.drop-before ::ng-deep .fd-list__item{background-color:#dce9f6!important}.drop-after{border-bottom:2px solid #00f}.drop-after ::ng-deep .fd-list__item{background-color:#dce9f6!important}.columns.cdk-drop-list-dragging .column:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}\n"] }]
397
+ }], propDecorators: { inputEl: [{
398
+ type: ViewChild,
399
+ args: ['inputEl', { read: ElementRef }]
400
+ }], kanbanColumns: [{
401
+ type: Input
402
+ }], groupbyProperty: [{
403
+ type: Input
404
+ }] } });
405
+
406
+ const components = [
407
+ KanbanViewComponent,
408
+ BarsaAvatarGroupComponent,
409
+ KanbanCardComponent,
410
+ KanbanTagsComponent,
411
+ KanbanBaseComponent
412
+ ];
413
+ class BarsaKanbanModule extends BaseModule {
414
+ constructor(dcm, componentFactoryResolver) {
415
+ super(dcm, componentFactoryResolver, 'BarsaKanbanModule');
416
+ this.dcm = dcm;
417
+ this.componentFactoryResolver = componentFactoryResolver;
418
+ this.dynamicComponents = [...components];
419
+ }
420
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: BarsaKanbanModule, deps: [{ token: i1$1.DynamicComponentService }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.NgModule }); }
421
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.5", ngImport: i0, type: BarsaKanbanModule, declarations: [KanbanViewComponent,
422
+ BarsaAvatarGroupComponent,
423
+ KanbanCardComponent,
424
+ KanbanTagsComponent,
425
+ KanbanBaseComponent], imports: [CommonModule,
426
+ BarsaNovinRayCoreModule,
427
+ FundamentalNgxCoreModule,
428
+ PlatformMenuModule,
429
+ BarsaEchartsModule,
430
+ BarsaSapUiModule,
431
+ FormsModule,
432
+ DragDropModule,
433
+ HttpClientModule], exports: [KanbanViewComponent,
434
+ BarsaAvatarGroupComponent,
435
+ KanbanCardComponent,
436
+ KanbanTagsComponent,
437
+ KanbanBaseComponent] }); }
438
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: BarsaKanbanModule, imports: [CommonModule,
439
+ BarsaNovinRayCoreModule,
440
+ FundamentalNgxCoreModule,
441
+ PlatformMenuModule,
442
+ BarsaEchartsModule,
443
+ BarsaSapUiModule,
444
+ FormsModule,
445
+ DragDropModule,
446
+ HttpClientModule] }); }
447
+ }
448
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: BarsaKanbanModule, decorators: [{
449
+ type: NgModule,
450
+ args: [{
451
+ declarations: [...components],
452
+ schemas: [NO_ERRORS_SCHEMA],
453
+ imports: [
454
+ CommonModule,
455
+ BarsaNovinRayCoreModule,
456
+ FundamentalNgxCoreModule,
457
+ PlatformMenuModule,
458
+ BarsaEchartsModule,
459
+ BarsaSapUiModule,
460
+ FormsModule,
461
+ DragDropModule,
462
+ HttpClientModule
463
+ ],
464
+ exports: [...components]
465
+ }]
466
+ }], ctorParameters: () => [{ type: i1$1.DynamicComponentService }, { type: i0.ComponentFactoryResolver }] });
467
+
468
+ /**
469
+ * Generated bundle index. Do not edit.
470
+ */
471
+
472
+ export { BarsaAvatarGroupComponent, BarsaKanbanModule, KanbanBaseComponent, KanbanCardComponent, KanbanTagsComponent, KanbanViewComponent };
473
+ //# sourceMappingURL=barsa-kanban.mjs.map