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