@mosaicoo/kanban 0.1.0 → 0.3.0
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/fesm2022/mosaicoo-kanban-core.mjs +1 -1
- package/fesm2022/mosaicoo-kanban-designer.mjs +3551 -0
- package/fesm2022/mosaicoo-kanban-ui.mjs +666 -666
- package/package.json +16 -2
- package/types/mosaicoo-kanban-core.d.ts +1 -1
- package/types/mosaicoo-kanban-designer.d.ts +141 -0
- package/types/mosaicoo-kanban-ui.d.ts +1 -1
|
@@ -1064,70 +1064,70 @@ class MosKanbanCell {
|
|
|
1064
1064
|
this.cardContext.emit({ item, x: mouse.clientX, y: mouse.clientY });
|
|
1065
1065
|
}
|
|
1066
1066
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: MosKanbanCell, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1067
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.18", type: MosKanbanCell, isStandalone: true, selector: "mos-kanban-cell", inputs: { board: { classPropertyName: "board", publicName: "board", isSignal: true, isRequired: true, transformFunction: null }, columnId: { classPropertyName: "columnId", publicName: "columnId", isSignal: true, isRequired: true, transformFunction: null }, laneId: { classPropertyName: "laneId", publicName: "laneId", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, cardTemplate: { classPropertyName: "cardTemplate", publicName: "cardTemplate", isSignal: true, isRequired: false, transformFunction: null }, cardConfig: { classPropertyName: "cardConfig", publicName: "cardConfig", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, connectedTo: { classPropertyName: "connectedTo", publicName: "connectedTo", isSignal: true, isRequired: false, transformFunction: null }, allCardIds: { classPropertyName: "allCardIds", publicName: "allCardIds", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cardActivate: "cardActivate", cardContext: "cardContext", cardKey: "cardKey", cardAction: "cardAction", entryCheck: "entryCheck", entryAction: "entryAction", entryMove: "entryMove", lifecycle: "lifecycle", dropRejected: "dropRejected" }, ngImport: i0, template: `
|
|
1068
|
-
<div
|
|
1069
|
-
class="mkb-cell-body"
|
|
1070
|
-
cdkDropList
|
|
1071
|
-
[id]="cellId()"
|
|
1072
|
-
[cdkDropListConnectedTo]="connectedTo()"
|
|
1073
|
-
[cdkDropListDisabled]="readOnly()"
|
|
1074
|
-
[cdkDropListEnterPredicate]="enterPredicate"
|
|
1075
|
-
(cdkDropListDropped)="onDrop($event)"
|
|
1076
|
-
role="listbox"
|
|
1077
|
-
aria-multiselectable="true"
|
|
1078
|
-
[attr.aria-label]="label()"
|
|
1079
|
-
[attr.data-column]="columnId()"
|
|
1080
|
-
[attr.data-lane]="laneId() ?? null"
|
|
1081
|
-
>
|
|
1082
|
-
@for (item of items(); track item.id) {
|
|
1083
|
-
<div
|
|
1084
|
-
class="mkb-card"
|
|
1085
|
-
cdkDrag
|
|
1086
|
-
[cdkDragData]="item.id"
|
|
1087
|
-
[cdkDragDisabled]="readOnly()"
|
|
1088
|
-
[cdkDragStartDelay]="dragStartDelay"
|
|
1089
|
-
role="option"
|
|
1090
|
-
tabindex="0"
|
|
1091
|
-
[class.is-selected]="selection().includes(item.id)"
|
|
1092
|
-
[attr.data-item]="item.id"
|
|
1093
|
-
[attr.aria-selected]="selection().includes(item.id)"
|
|
1094
|
-
aria-keyshortcuts="Control+ArrowLeft Control+ArrowRight Control+ArrowUp Control+ArrowDown"
|
|
1095
|
-
(click)="activate(item, $event)"
|
|
1096
|
-
(keydown)="onKeydown(item, $event)"
|
|
1097
|
-
(contextmenu)="onContextMenu(item, $event)"
|
|
1098
|
-
(cdkDragStarted)="lifecycle.emit({ phase: 'start', kind: 'card', id: item.id })"
|
|
1099
|
-
(cdkDragEnded)="lifecycle.emit({ phase: 'end', kind: 'card', id: item.id })"
|
|
1100
|
-
>
|
|
1101
|
-
@if (cardConfig()?.dragHandle && !readOnly()) {
|
|
1102
|
-
<span class="mkb-card-grip" cdkDragHandle aria-hidden="true">⠿</span>
|
|
1103
|
-
}
|
|
1104
|
-
@if (cardTemplate(); as tpl) {
|
|
1105
|
-
<ng-container *ngTemplateOutlet="tpl; context: { $implicit: item }" />
|
|
1106
|
-
} @else if (cardConfig(); as card) {
|
|
1107
|
-
<mos-kanban-card-blocks
|
|
1108
|
-
[blocks]="card.blocks"
|
|
1109
|
-
[item]="item"
|
|
1110
|
-
[registry]="board().registry"
|
|
1111
|
-
[locale]="board().locale"
|
|
1112
|
-
[column]="columnId()"
|
|
1113
|
-
[lane]="laneId()"
|
|
1114
|
-
[allCardIds]="allCardIds()"
|
|
1115
|
-
[canDropEntry]="canDropEntryFn"
|
|
1116
|
-
(action)="cardAction.emit($event)"
|
|
1117
|
-
(entryCheck)="entryCheck.emit($event)"
|
|
1118
|
-
(entryAction)="entryAction.emit($event)"
|
|
1119
|
-
(entryMove)="entryMove.emit($event)"
|
|
1120
|
-
(lifecycle)="lifecycle.emit($event)"
|
|
1121
|
-
/>
|
|
1122
|
-
} @else {
|
|
1123
|
-
<mos-kanban-card [item]="item" />
|
|
1124
|
-
}
|
|
1125
|
-
</div>
|
|
1126
|
-
} @empty {
|
|
1127
|
-
<div class="mkb-cell-empty">Solte itens aqui</div>
|
|
1128
|
-
}
|
|
1129
|
-
</div>
|
|
1130
|
-
`, isInline: true, styles: [":host{display:
|
|
1067
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.18", type: MosKanbanCell, isStandalone: true, selector: "mos-kanban-cell", inputs: { board: { classPropertyName: "board", publicName: "board", isSignal: true, isRequired: true, transformFunction: null }, columnId: { classPropertyName: "columnId", publicName: "columnId", isSignal: true, isRequired: true, transformFunction: null }, laneId: { classPropertyName: "laneId", publicName: "laneId", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, cardTemplate: { classPropertyName: "cardTemplate", publicName: "cardTemplate", isSignal: true, isRequired: false, transformFunction: null }, cardConfig: { classPropertyName: "cardConfig", publicName: "cardConfig", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, connectedTo: { classPropertyName: "connectedTo", publicName: "connectedTo", isSignal: true, isRequired: false, transformFunction: null }, allCardIds: { classPropertyName: "allCardIds", publicName: "allCardIds", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cardActivate: "cardActivate", cardContext: "cardContext", cardKey: "cardKey", cardAction: "cardAction", entryCheck: "entryCheck", entryAction: "entryAction", entryMove: "entryMove", lifecycle: "lifecycle", dropRejected: "dropRejected" }, ngImport: i0, template: `
|
|
1068
|
+
<div
|
|
1069
|
+
class="mkb-cell-body"
|
|
1070
|
+
cdkDropList
|
|
1071
|
+
[id]="cellId()"
|
|
1072
|
+
[cdkDropListConnectedTo]="connectedTo()"
|
|
1073
|
+
[cdkDropListDisabled]="readOnly()"
|
|
1074
|
+
[cdkDropListEnterPredicate]="enterPredicate"
|
|
1075
|
+
(cdkDropListDropped)="onDrop($event)"
|
|
1076
|
+
role="listbox"
|
|
1077
|
+
aria-multiselectable="true"
|
|
1078
|
+
[attr.aria-label]="label()"
|
|
1079
|
+
[attr.data-column]="columnId()"
|
|
1080
|
+
[attr.data-lane]="laneId() ?? null"
|
|
1081
|
+
>
|
|
1082
|
+
@for (item of items(); track item.id) {
|
|
1083
|
+
<div
|
|
1084
|
+
class="mkb-card"
|
|
1085
|
+
cdkDrag
|
|
1086
|
+
[cdkDragData]="item.id"
|
|
1087
|
+
[cdkDragDisabled]="readOnly()"
|
|
1088
|
+
[cdkDragStartDelay]="dragStartDelay"
|
|
1089
|
+
role="option"
|
|
1090
|
+
tabindex="0"
|
|
1091
|
+
[class.is-selected]="selection().includes(item.id)"
|
|
1092
|
+
[attr.data-item]="item.id"
|
|
1093
|
+
[attr.aria-selected]="selection().includes(item.id)"
|
|
1094
|
+
aria-keyshortcuts="Control+ArrowLeft Control+ArrowRight Control+ArrowUp Control+ArrowDown"
|
|
1095
|
+
(click)="activate(item, $event)"
|
|
1096
|
+
(keydown)="onKeydown(item, $event)"
|
|
1097
|
+
(contextmenu)="onContextMenu(item, $event)"
|
|
1098
|
+
(cdkDragStarted)="lifecycle.emit({ phase: 'start', kind: 'card', id: item.id })"
|
|
1099
|
+
(cdkDragEnded)="lifecycle.emit({ phase: 'end', kind: 'card', id: item.id })"
|
|
1100
|
+
>
|
|
1101
|
+
@if (cardConfig()?.dragHandle && !readOnly()) {
|
|
1102
|
+
<span class="mkb-card-grip" cdkDragHandle aria-hidden="true">⠿</span>
|
|
1103
|
+
}
|
|
1104
|
+
@if (cardTemplate(); as tpl) {
|
|
1105
|
+
<ng-container *ngTemplateOutlet="tpl; context: { $implicit: item }" />
|
|
1106
|
+
} @else if (cardConfig(); as card) {
|
|
1107
|
+
<mos-kanban-card-blocks
|
|
1108
|
+
[blocks]="card.blocks"
|
|
1109
|
+
[item]="item"
|
|
1110
|
+
[registry]="board().registry"
|
|
1111
|
+
[locale]="board().locale"
|
|
1112
|
+
[column]="columnId()"
|
|
1113
|
+
[lane]="laneId()"
|
|
1114
|
+
[allCardIds]="allCardIds()"
|
|
1115
|
+
[canDropEntry]="canDropEntryFn"
|
|
1116
|
+
(action)="cardAction.emit($event)"
|
|
1117
|
+
(entryCheck)="entryCheck.emit($event)"
|
|
1118
|
+
(entryAction)="entryAction.emit($event)"
|
|
1119
|
+
(entryMove)="entryMove.emit($event)"
|
|
1120
|
+
(lifecycle)="lifecycle.emit($event)"
|
|
1121
|
+
/>
|
|
1122
|
+
} @else {
|
|
1123
|
+
<mos-kanban-card [item]="item" />
|
|
1124
|
+
}
|
|
1125
|
+
</div>
|
|
1126
|
+
} @empty {
|
|
1127
|
+
<div class="mkb-cell-empty">Solte itens aqui</div>
|
|
1128
|
+
}
|
|
1129
|
+
</div>
|
|
1130
|
+
`, isInline: true, styles: [":host{display:flex;flex-direction:column;min-width:0;min-height:0}.mkb-cell-body{display:flex;flex-direction:column;flex:1;gap:var(--mkb-card-gap, 8px);padding:var(--mkb-cell-padding, 4px 8px 10px);overflow-y:auto;min-height:60px}.mkb-card{position:relative;display:flex;flex-direction:column;gap:var(--mkb-block-gap, 8px);background:var(--mkb-card-bg, var(--color-panel, #fff));border:1px solid var(--mkb-border, var(--color-border, #e3e0ea));border-radius:var(--mkb-radius-sm, var(--radius-sm, 6px));padding:var(--mkb-card-padding, 10px 12px);cursor:grab;-webkit-tap-highlight-color:transparent;transition:box-shadow var(--mkb-dur, .15s) var(--mkb-ease, ease),border-color var(--mkb-dur, .15s) var(--mkb-ease, ease)}.mkb-card.is-selected{border-color:var(--mkb-accent, #5e35b1);box-shadow:0 0 0 1px var(--mkb-accent, #5e35b1)}.mkb-card:focus-visible{outline:none;box-shadow:var(--mkb-focus-ring, 0 0 0 3px rgba(94, 53, 177, .35))}.mkb-card.cdk-drag-dragging{cursor:grabbing}.mkb-card-grip{position:absolute;top:8px;right:8px;cursor:grab;color:var(--mkb-muted, #6f6a7c);font-size:11px;line-height:1;-webkit-user-select:none;user-select:none}.mkb-card:has(.mkb-card-grip){cursor:default}.mkb-card.cdk-drag-preview{box-shadow:0 10px 28px #00000038;rotate:2deg;opacity:.95}.mkb-card.cdk-drag-animating{transition:transform var(--mkb-dur-move, .18s) var(--mkb-ease, ease)}@media(prefers-reduced-motion:reduce){.mkb-card,.mkb-card.cdk-drag-animating{transition:none}.mkb-card.cdk-drag-preview{rotate:none}}.mkb-card.cdk-drag-placeholder{opacity:.4;border:1px dashed var(--mkb-accent, #5e35b1);background:color-mix(in srgb,var(--mkb-accent, #5e35b1) 6%,var(--mkb-card-bg, #fff))}.mkb-cell-empty{padding:14px 8px;text-align:center;font-size:11.5px;color:var(--mkb-muted, var(--color-muted, #6f6a7c));border:1px dashed var(--mkb-border-strong, #c9c4d4);border-radius:var(--mkb-radius-sm, 6px)}:host-context(.mkb-readonly) .mkb-card{cursor:default}\n"], dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MosKanbanCard, selector: "mos-kanban-card", inputs: ["item"] }, { kind: "component", type: MosKanbanCardBlocks, selector: "mos-kanban-card-blocks", inputs: ["blocks", "item", "registry", "locale", "column", "lane", "allCardIds", "canDropEntry"], outputs: ["action", "entryCheck", "entryAction", "entryMove", "lifecycle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1131
1131
|
}
|
|
1132
1132
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: MosKanbanCell, decorators: [{
|
|
1133
1133
|
type: Component,
|
|
@@ -1138,70 +1138,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImpo
|
|
|
1138
1138
|
NgTemplateOutlet,
|
|
1139
1139
|
MosKanbanCard,
|
|
1140
1140
|
MosKanbanCardBlocks,
|
|
1141
|
-
], template: `
|
|
1142
|
-
<div
|
|
1143
|
-
class="mkb-cell-body"
|
|
1144
|
-
cdkDropList
|
|
1145
|
-
[id]="cellId()"
|
|
1146
|
-
[cdkDropListConnectedTo]="connectedTo()"
|
|
1147
|
-
[cdkDropListDisabled]="readOnly()"
|
|
1148
|
-
[cdkDropListEnterPredicate]="enterPredicate"
|
|
1149
|
-
(cdkDropListDropped)="onDrop($event)"
|
|
1150
|
-
role="listbox"
|
|
1151
|
-
aria-multiselectable="true"
|
|
1152
|
-
[attr.aria-label]="label()"
|
|
1153
|
-
[attr.data-column]="columnId()"
|
|
1154
|
-
[attr.data-lane]="laneId() ?? null"
|
|
1155
|
-
>
|
|
1156
|
-
@for (item of items(); track item.id) {
|
|
1157
|
-
<div
|
|
1158
|
-
class="mkb-card"
|
|
1159
|
-
cdkDrag
|
|
1160
|
-
[cdkDragData]="item.id"
|
|
1161
|
-
[cdkDragDisabled]="readOnly()"
|
|
1162
|
-
[cdkDragStartDelay]="dragStartDelay"
|
|
1163
|
-
role="option"
|
|
1164
|
-
tabindex="0"
|
|
1165
|
-
[class.is-selected]="selection().includes(item.id)"
|
|
1166
|
-
[attr.data-item]="item.id"
|
|
1167
|
-
[attr.aria-selected]="selection().includes(item.id)"
|
|
1168
|
-
aria-keyshortcuts="Control+ArrowLeft Control+ArrowRight Control+ArrowUp Control+ArrowDown"
|
|
1169
|
-
(click)="activate(item, $event)"
|
|
1170
|
-
(keydown)="onKeydown(item, $event)"
|
|
1171
|
-
(contextmenu)="onContextMenu(item, $event)"
|
|
1172
|
-
(cdkDragStarted)="lifecycle.emit({ phase: 'start', kind: 'card', id: item.id })"
|
|
1173
|
-
(cdkDragEnded)="lifecycle.emit({ phase: 'end', kind: 'card', id: item.id })"
|
|
1174
|
-
>
|
|
1175
|
-
@if (cardConfig()?.dragHandle && !readOnly()) {
|
|
1176
|
-
<span class="mkb-card-grip" cdkDragHandle aria-hidden="true">⠿</span>
|
|
1177
|
-
}
|
|
1178
|
-
@if (cardTemplate(); as tpl) {
|
|
1179
|
-
<ng-container *ngTemplateOutlet="tpl; context: { $implicit: item }" />
|
|
1180
|
-
} @else if (cardConfig(); as card) {
|
|
1181
|
-
<mos-kanban-card-blocks
|
|
1182
|
-
[blocks]="card.blocks"
|
|
1183
|
-
[item]="item"
|
|
1184
|
-
[registry]="board().registry"
|
|
1185
|
-
[locale]="board().locale"
|
|
1186
|
-
[column]="columnId()"
|
|
1187
|
-
[lane]="laneId()"
|
|
1188
|
-
[allCardIds]="allCardIds()"
|
|
1189
|
-
[canDropEntry]="canDropEntryFn"
|
|
1190
|
-
(action)="cardAction.emit($event)"
|
|
1191
|
-
(entryCheck)="entryCheck.emit($event)"
|
|
1192
|
-
(entryAction)="entryAction.emit($event)"
|
|
1193
|
-
(entryMove)="entryMove.emit($event)"
|
|
1194
|
-
(lifecycle)="lifecycle.emit($event)"
|
|
1195
|
-
/>
|
|
1196
|
-
} @else {
|
|
1197
|
-
<mos-kanban-card [item]="item" />
|
|
1198
|
-
}
|
|
1199
|
-
</div>
|
|
1200
|
-
} @empty {
|
|
1201
|
-
<div class="mkb-cell-empty">Solte itens aqui</div>
|
|
1202
|
-
}
|
|
1203
|
-
</div>
|
|
1204
|
-
`, styles: [":host{display:
|
|
1141
|
+
], template: `
|
|
1142
|
+
<div
|
|
1143
|
+
class="mkb-cell-body"
|
|
1144
|
+
cdkDropList
|
|
1145
|
+
[id]="cellId()"
|
|
1146
|
+
[cdkDropListConnectedTo]="connectedTo()"
|
|
1147
|
+
[cdkDropListDisabled]="readOnly()"
|
|
1148
|
+
[cdkDropListEnterPredicate]="enterPredicate"
|
|
1149
|
+
(cdkDropListDropped)="onDrop($event)"
|
|
1150
|
+
role="listbox"
|
|
1151
|
+
aria-multiselectable="true"
|
|
1152
|
+
[attr.aria-label]="label()"
|
|
1153
|
+
[attr.data-column]="columnId()"
|
|
1154
|
+
[attr.data-lane]="laneId() ?? null"
|
|
1155
|
+
>
|
|
1156
|
+
@for (item of items(); track item.id) {
|
|
1157
|
+
<div
|
|
1158
|
+
class="mkb-card"
|
|
1159
|
+
cdkDrag
|
|
1160
|
+
[cdkDragData]="item.id"
|
|
1161
|
+
[cdkDragDisabled]="readOnly()"
|
|
1162
|
+
[cdkDragStartDelay]="dragStartDelay"
|
|
1163
|
+
role="option"
|
|
1164
|
+
tabindex="0"
|
|
1165
|
+
[class.is-selected]="selection().includes(item.id)"
|
|
1166
|
+
[attr.data-item]="item.id"
|
|
1167
|
+
[attr.aria-selected]="selection().includes(item.id)"
|
|
1168
|
+
aria-keyshortcuts="Control+ArrowLeft Control+ArrowRight Control+ArrowUp Control+ArrowDown"
|
|
1169
|
+
(click)="activate(item, $event)"
|
|
1170
|
+
(keydown)="onKeydown(item, $event)"
|
|
1171
|
+
(contextmenu)="onContextMenu(item, $event)"
|
|
1172
|
+
(cdkDragStarted)="lifecycle.emit({ phase: 'start', kind: 'card', id: item.id })"
|
|
1173
|
+
(cdkDragEnded)="lifecycle.emit({ phase: 'end', kind: 'card', id: item.id })"
|
|
1174
|
+
>
|
|
1175
|
+
@if (cardConfig()?.dragHandle && !readOnly()) {
|
|
1176
|
+
<span class="mkb-card-grip" cdkDragHandle aria-hidden="true">⠿</span>
|
|
1177
|
+
}
|
|
1178
|
+
@if (cardTemplate(); as tpl) {
|
|
1179
|
+
<ng-container *ngTemplateOutlet="tpl; context: { $implicit: item }" />
|
|
1180
|
+
} @else if (cardConfig(); as card) {
|
|
1181
|
+
<mos-kanban-card-blocks
|
|
1182
|
+
[blocks]="card.blocks"
|
|
1183
|
+
[item]="item"
|
|
1184
|
+
[registry]="board().registry"
|
|
1185
|
+
[locale]="board().locale"
|
|
1186
|
+
[column]="columnId()"
|
|
1187
|
+
[lane]="laneId()"
|
|
1188
|
+
[allCardIds]="allCardIds()"
|
|
1189
|
+
[canDropEntry]="canDropEntryFn"
|
|
1190
|
+
(action)="cardAction.emit($event)"
|
|
1191
|
+
(entryCheck)="entryCheck.emit($event)"
|
|
1192
|
+
(entryAction)="entryAction.emit($event)"
|
|
1193
|
+
(entryMove)="entryMove.emit($event)"
|
|
1194
|
+
(lifecycle)="lifecycle.emit($event)"
|
|
1195
|
+
/>
|
|
1196
|
+
} @else {
|
|
1197
|
+
<mos-kanban-card [item]="item" />
|
|
1198
|
+
}
|
|
1199
|
+
</div>
|
|
1200
|
+
} @empty {
|
|
1201
|
+
<div class="mkb-cell-empty">Solte itens aqui</div>
|
|
1202
|
+
}
|
|
1203
|
+
</div>
|
|
1204
|
+
`, styles: [":host{display:flex;flex-direction:column;min-width:0;min-height:0}.mkb-cell-body{display:flex;flex-direction:column;flex:1;gap:var(--mkb-card-gap, 8px);padding:var(--mkb-cell-padding, 4px 8px 10px);overflow-y:auto;min-height:60px}.mkb-card{position:relative;display:flex;flex-direction:column;gap:var(--mkb-block-gap, 8px);background:var(--mkb-card-bg, var(--color-panel, #fff));border:1px solid var(--mkb-border, var(--color-border, #e3e0ea));border-radius:var(--mkb-radius-sm, var(--radius-sm, 6px));padding:var(--mkb-card-padding, 10px 12px);cursor:grab;-webkit-tap-highlight-color:transparent;transition:box-shadow var(--mkb-dur, .15s) var(--mkb-ease, ease),border-color var(--mkb-dur, .15s) var(--mkb-ease, ease)}.mkb-card.is-selected{border-color:var(--mkb-accent, #5e35b1);box-shadow:0 0 0 1px var(--mkb-accent, #5e35b1)}.mkb-card:focus-visible{outline:none;box-shadow:var(--mkb-focus-ring, 0 0 0 3px rgba(94, 53, 177, .35))}.mkb-card.cdk-drag-dragging{cursor:grabbing}.mkb-card-grip{position:absolute;top:8px;right:8px;cursor:grab;color:var(--mkb-muted, #6f6a7c);font-size:11px;line-height:1;-webkit-user-select:none;user-select:none}.mkb-card:has(.mkb-card-grip){cursor:default}.mkb-card.cdk-drag-preview{box-shadow:0 10px 28px #00000038;rotate:2deg;opacity:.95}.mkb-card.cdk-drag-animating{transition:transform var(--mkb-dur-move, .18s) var(--mkb-ease, ease)}@media(prefers-reduced-motion:reduce){.mkb-card,.mkb-card.cdk-drag-animating{transition:none}.mkb-card.cdk-drag-preview{rotate:none}}.mkb-card.cdk-drag-placeholder{opacity:.4;border:1px dashed var(--mkb-accent, #5e35b1);background:color-mix(in srgb,var(--mkb-accent, #5e35b1) 6%,var(--mkb-card-bg, #fff))}.mkb-cell-empty{padding:14px 8px;text-align:center;font-size:11.5px;color:var(--mkb-muted, var(--color-muted, #6f6a7c));border:1px dashed var(--mkb-border-strong, #c9c4d4);border-radius:var(--mkb-radius-sm, 6px)}:host-context(.mkb-readonly) .mkb-card{cursor:default}\n"] }]
|
|
1205
1205
|
}], propDecorators: { board: [{ type: i0.Input, args: [{ isSignal: true, alias: "board", required: true }] }], columnId: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnId", required: true }] }], laneId: [{ type: i0.Input, args: [{ isSignal: true, alias: "laneId", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], cardTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardTemplate", required: false }] }], cardConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardConfig", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }], connectedTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "connectedTo", required: false }] }], allCardIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "allCardIds", required: false }] }], cardActivate: [{ type: i0.Output, args: ["cardActivate"] }], cardContext: [{ type: i0.Output, args: ["cardContext"] }], cardKey: [{ type: i0.Output, args: ["cardKey"] }], cardAction: [{ type: i0.Output, args: ["cardAction"] }], entryCheck: [{ type: i0.Output, args: ["entryCheck"] }], entryAction: [{ type: i0.Output, args: ["entryAction"] }], entryMove: [{ type: i0.Output, args: ["entryMove"] }], lifecycle: [{ type: i0.Output, args: ["lifecycle"] }], dropRejected: [{ type: i0.Output, args: ["dropRejected"] }] } });
|
|
1206
1206
|
|
|
1207
1207
|
/** Uma coluna do board SEM lanes: cabeçalho (título/contagem/WIP) + uma única
|
|
@@ -1253,102 +1253,102 @@ class MosKanbanColumn {
|
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
1255
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: MosKanbanColumn, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1256
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.18", type: MosKanbanColumn, isStandalone: true, selector: "mos-kanban-column", inputs: { board: { classPropertyName: "board", publicName: "board", isSignal: true, isRequired: true, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, cardTemplate: { classPropertyName: "cardTemplate", publicName: "cardTemplate", isSignal: true, isRequired: false, transformFunction: null }, cardConfig: { classPropertyName: "cardConfig", publicName: "cardConfig", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, reorderable: { classPropertyName: "reorderable", publicName: "reorderable", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, connectedTo: { classPropertyName: "connectedTo", publicName: "connectedTo", isSignal: true, isRequired: false, transformFunction: null }, allCardIds: { classPropertyName: "allCardIds", publicName: "allCardIds", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cardActivate: "cardActivate", cardContext: "cardContext", cardKey: "cardKey", cardAction: "cardAction", entryCheck: "entryCheck", entryAction: "entryAction", entryMove: "entryMove", lifecycle: "lifecycle", dropRejected: "dropRejected", reorderKey: "reorderKey" }, host: { properties: { "style.--mkb-col-accent": "color()" } }, ngImport: i0, template: `
|
|
1257
|
-
<header
|
|
1258
|
-
class="mkb-col-header"
|
|
1259
|
-
[class.mkb-col-accented]="!!color()"
|
|
1260
|
-
[class.mkb-col-reorderable]="reorderable()"
|
|
1261
|
-
[attr.tabindex]="reorderable() ? 0 : null"
|
|
1262
|
-
[attr.data-column-header]="column().id"
|
|
1263
|
-
[attr.role]="reorderable() ? 'button' : null"
|
|
1264
|
-
[attr.aria-label]="reorderable() ? 'Coluna ' + (column().title ?? column().id) + ' — Ctrl+setas para reordenar' : null"
|
|
1265
|
-
[attr.aria-keyshortcuts]="reorderable() ? 'Control+ArrowLeft Control+ArrowRight' : null"
|
|
1266
|
-
(keydown)="onHeaderKeydown($event)"
|
|
1267
|
-
>
|
|
1268
|
-
<!-- alça CDK projetada pelo board: o cdkDragHandle precisa ser
|
|
1269
|
-
conteúdo do MESMO cdkDrag (aplicado no host deste componente) -->
|
|
1270
|
-
<ng-content select="[mkbColHandle]" />
|
|
1271
|
-
<span class="mkb-col-title">{{ column().title ?? column().id }}</span>
|
|
1272
|
-
<span
|
|
1273
|
-
class="mkb-col-count"
|
|
1274
|
-
[class.is-full]="isFull()"
|
|
1275
|
-
[attr.title]="isFull() ? 'Limite de itens atingido' : null"
|
|
1276
|
-
>
|
|
1277
|
-
{{ column().count }}{{ column().limit !== undefined ? ' / ' + column().limit : '' }}
|
|
1278
|
-
</span>
|
|
1279
|
-
</header>
|
|
1280
|
-
|
|
1281
|
-
<mos-kanban-cell
|
|
1282
|
-
class="mkb-col-cell"
|
|
1283
|
-
[board]="board()"
|
|
1284
|
-
[columnId]="column().id"
|
|
1285
|
-
[items]="items()"
|
|
1286
|
-
[cardTemplate]="cardTemplate()"
|
|
1287
|
-
[cardConfig]="cardConfig()"
|
|
1288
|
-
[readOnly]="readOnly()"
|
|
1289
|
-
[selection]="selection()"
|
|
1290
|
-
[connectedTo]="connectedTo()"
|
|
1291
|
-
[allCardIds]="allCardIds()"
|
|
1292
|
-
(cardActivate)="cardActivate.emit($event)"
|
|
1293
|
-
(cardContext)="cardContext.emit($event)"
|
|
1294
|
-
(cardKey)="cardKey.emit($event)"
|
|
1295
|
-
(cardAction)="cardAction.emit($event)"
|
|
1296
|
-
(entryCheck)="entryCheck.emit($event)"
|
|
1297
|
-
(entryAction)="entryAction.emit($event)"
|
|
1298
|
-
(entryMove)="entryMove.emit($event)"
|
|
1299
|
-
(lifecycle)="lifecycle.emit($event)"
|
|
1300
|
-
(dropRejected)="dropRejected.emit($event)"
|
|
1301
|
-
/>
|
|
1256
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.18", type: MosKanbanColumn, isStandalone: true, selector: "mos-kanban-column", inputs: { board: { classPropertyName: "board", publicName: "board", isSignal: true, isRequired: true, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, cardTemplate: { classPropertyName: "cardTemplate", publicName: "cardTemplate", isSignal: true, isRequired: false, transformFunction: null }, cardConfig: { classPropertyName: "cardConfig", publicName: "cardConfig", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, reorderable: { classPropertyName: "reorderable", publicName: "reorderable", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, connectedTo: { classPropertyName: "connectedTo", publicName: "connectedTo", isSignal: true, isRequired: false, transformFunction: null }, allCardIds: { classPropertyName: "allCardIds", publicName: "allCardIds", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cardActivate: "cardActivate", cardContext: "cardContext", cardKey: "cardKey", cardAction: "cardAction", entryCheck: "entryCheck", entryAction: "entryAction", entryMove: "entryMove", lifecycle: "lifecycle", dropRejected: "dropRejected", reorderKey: "reorderKey" }, host: { properties: { "style.--mkb-col-accent": "color()" } }, ngImport: i0, template: `
|
|
1257
|
+
<header
|
|
1258
|
+
class="mkb-col-header"
|
|
1259
|
+
[class.mkb-col-accented]="!!color()"
|
|
1260
|
+
[class.mkb-col-reorderable]="reorderable()"
|
|
1261
|
+
[attr.tabindex]="reorderable() ? 0 : null"
|
|
1262
|
+
[attr.data-column-header]="column().id"
|
|
1263
|
+
[attr.role]="reorderable() ? 'button' : null"
|
|
1264
|
+
[attr.aria-label]="reorderable() ? 'Coluna ' + (column().title ?? column().id) + ' — Ctrl+setas para reordenar' : null"
|
|
1265
|
+
[attr.aria-keyshortcuts]="reorderable() ? 'Control+ArrowLeft Control+ArrowRight' : null"
|
|
1266
|
+
(keydown)="onHeaderKeydown($event)"
|
|
1267
|
+
>
|
|
1268
|
+
<!-- alça CDK projetada pelo board: o cdkDragHandle precisa ser
|
|
1269
|
+
conteúdo do MESMO cdkDrag (aplicado no host deste componente) -->
|
|
1270
|
+
<ng-content select="[mkbColHandle]" />
|
|
1271
|
+
<span class="mkb-col-title">{{ column().title ?? column().id }}</span>
|
|
1272
|
+
<span
|
|
1273
|
+
class="mkb-col-count"
|
|
1274
|
+
[class.is-full]="isFull()"
|
|
1275
|
+
[attr.title]="isFull() ? 'Limite de itens atingido' : null"
|
|
1276
|
+
>
|
|
1277
|
+
{{ column().count }}{{ column().limit !== undefined ? ' / ' + column().limit : '' }}
|
|
1278
|
+
</span>
|
|
1279
|
+
</header>
|
|
1280
|
+
|
|
1281
|
+
<mos-kanban-cell
|
|
1282
|
+
class="mkb-col-cell"
|
|
1283
|
+
[board]="board()"
|
|
1284
|
+
[columnId]="column().id"
|
|
1285
|
+
[items]="items()"
|
|
1286
|
+
[cardTemplate]="cardTemplate()"
|
|
1287
|
+
[cardConfig]="cardConfig()"
|
|
1288
|
+
[readOnly]="readOnly()"
|
|
1289
|
+
[selection]="selection()"
|
|
1290
|
+
[connectedTo]="connectedTo()"
|
|
1291
|
+
[allCardIds]="allCardIds()"
|
|
1292
|
+
(cardActivate)="cardActivate.emit($event)"
|
|
1293
|
+
(cardContext)="cardContext.emit($event)"
|
|
1294
|
+
(cardKey)="cardKey.emit($event)"
|
|
1295
|
+
(cardAction)="cardAction.emit($event)"
|
|
1296
|
+
(entryCheck)="entryCheck.emit($event)"
|
|
1297
|
+
(entryAction)="entryAction.emit($event)"
|
|
1298
|
+
(entryMove)="entryMove.emit($event)"
|
|
1299
|
+
(lifecycle)="lifecycle.emit($event)"
|
|
1300
|
+
(dropRejected)="dropRejected.emit($event)"
|
|
1301
|
+
/>
|
|
1302
1302
|
`, isInline: true, styles: [":host{display:flex;flex-direction:column;min-width:0;max-height:100%;background:var(--mkb-column-bg, var(--color-surface, #efedf3));border:1px solid var(--mkb-border, var(--color-border, #e3e0ea));border-radius:var(--mkb-radius, var(--radius-md, 10px))}.mkb-col-header{display:flex;align-items:center;gap:8px;padding:var(--mkb-header-padding, 10px 12px)}.mkb-col-header .mkb-col-title{flex:1}.mkb-col-header:focus-visible{outline:none;box-shadow:var(--mkb-focus-ring, 0 0 0 3px rgba(94, 53, 177, .35));border-radius:var(--mkb-radius-sm, 6px)}.mkb-col-grip{cursor:grab;color:var(--mkb-muted, #6f6a7c);font-size:12px;line-height:1;-webkit-user-select:none;user-select:none}.mkb-col-grip:active{cursor:grabbing}.mkb-col-header.mkb-col-accented{background:color-mix(in srgb,var(--mkb-col-accent) 16%,transparent);border-top:3px solid var(--mkb-col-accent);border-radius:var(--mkb-radius, 10px) var(--mkb-radius, 10px) 0 0}.mkb-col-title{font-size:12.5px;font-weight:600;letter-spacing:.2px;color:var(--mkb-foreground, var(--color-foreground, #241f33))}.mkb-col-count{font-size:11px;font-weight:500;padding:1px 8px;border-radius:999px;background:var(--mkb-card-bg, var(--color-panel, #fff));color:var(--mkb-muted, var(--color-muted, #6f6a7c))}.mkb-col-count.is-full{color:var(--mkb-danger, #b3261e)}.mkb-col-cell{flex:1;min-height:0}\n"], dependencies: [{ kind: "component", type: MosKanbanCell, selector: "mos-kanban-cell", inputs: ["board", "columnId", "laneId", "items", "cardTemplate", "cardConfig", "readOnly", "selection", "connectedTo", "allCardIds"], outputs: ["cardActivate", "cardContext", "cardKey", "cardAction", "entryCheck", "entryAction", "entryMove", "lifecycle", "dropRejected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1303
1303
|
}
|
|
1304
1304
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: MosKanbanColumn, decorators: [{
|
|
1305
1305
|
type: Component,
|
|
1306
|
-
args: [{ selector: 'mos-kanban-column', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MosKanbanCell], template: `
|
|
1307
|
-
<header
|
|
1308
|
-
class="mkb-col-header"
|
|
1309
|
-
[class.mkb-col-accented]="!!color()"
|
|
1310
|
-
[class.mkb-col-reorderable]="reorderable()"
|
|
1311
|
-
[attr.tabindex]="reorderable() ? 0 : null"
|
|
1312
|
-
[attr.data-column-header]="column().id"
|
|
1313
|
-
[attr.role]="reorderable() ? 'button' : null"
|
|
1314
|
-
[attr.aria-label]="reorderable() ? 'Coluna ' + (column().title ?? column().id) + ' — Ctrl+setas para reordenar' : null"
|
|
1315
|
-
[attr.aria-keyshortcuts]="reorderable() ? 'Control+ArrowLeft Control+ArrowRight' : null"
|
|
1316
|
-
(keydown)="onHeaderKeydown($event)"
|
|
1317
|
-
>
|
|
1318
|
-
<!-- alça CDK projetada pelo board: o cdkDragHandle precisa ser
|
|
1319
|
-
conteúdo do MESMO cdkDrag (aplicado no host deste componente) -->
|
|
1320
|
-
<ng-content select="[mkbColHandle]" />
|
|
1321
|
-
<span class="mkb-col-title">{{ column().title ?? column().id }}</span>
|
|
1322
|
-
<span
|
|
1323
|
-
class="mkb-col-count"
|
|
1324
|
-
[class.is-full]="isFull()"
|
|
1325
|
-
[attr.title]="isFull() ? 'Limite de itens atingido' : null"
|
|
1326
|
-
>
|
|
1327
|
-
{{ column().count }}{{ column().limit !== undefined ? ' / ' + column().limit : '' }}
|
|
1328
|
-
</span>
|
|
1329
|
-
</header>
|
|
1330
|
-
|
|
1331
|
-
<mos-kanban-cell
|
|
1332
|
-
class="mkb-col-cell"
|
|
1333
|
-
[board]="board()"
|
|
1334
|
-
[columnId]="column().id"
|
|
1335
|
-
[items]="items()"
|
|
1336
|
-
[cardTemplate]="cardTemplate()"
|
|
1337
|
-
[cardConfig]="cardConfig()"
|
|
1338
|
-
[readOnly]="readOnly()"
|
|
1339
|
-
[selection]="selection()"
|
|
1340
|
-
[connectedTo]="connectedTo()"
|
|
1341
|
-
[allCardIds]="allCardIds()"
|
|
1342
|
-
(cardActivate)="cardActivate.emit($event)"
|
|
1343
|
-
(cardContext)="cardContext.emit($event)"
|
|
1344
|
-
(cardKey)="cardKey.emit($event)"
|
|
1345
|
-
(cardAction)="cardAction.emit($event)"
|
|
1346
|
-
(entryCheck)="entryCheck.emit($event)"
|
|
1347
|
-
(entryAction)="entryAction.emit($event)"
|
|
1348
|
-
(entryMove)="entryMove.emit($event)"
|
|
1349
|
-
(lifecycle)="lifecycle.emit($event)"
|
|
1350
|
-
(dropRejected)="dropRejected.emit($event)"
|
|
1351
|
-
/>
|
|
1306
|
+
args: [{ selector: 'mos-kanban-column', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MosKanbanCell], template: `
|
|
1307
|
+
<header
|
|
1308
|
+
class="mkb-col-header"
|
|
1309
|
+
[class.mkb-col-accented]="!!color()"
|
|
1310
|
+
[class.mkb-col-reorderable]="reorderable()"
|
|
1311
|
+
[attr.tabindex]="reorderable() ? 0 : null"
|
|
1312
|
+
[attr.data-column-header]="column().id"
|
|
1313
|
+
[attr.role]="reorderable() ? 'button' : null"
|
|
1314
|
+
[attr.aria-label]="reorderable() ? 'Coluna ' + (column().title ?? column().id) + ' — Ctrl+setas para reordenar' : null"
|
|
1315
|
+
[attr.aria-keyshortcuts]="reorderable() ? 'Control+ArrowLeft Control+ArrowRight' : null"
|
|
1316
|
+
(keydown)="onHeaderKeydown($event)"
|
|
1317
|
+
>
|
|
1318
|
+
<!-- alça CDK projetada pelo board: o cdkDragHandle precisa ser
|
|
1319
|
+
conteúdo do MESMO cdkDrag (aplicado no host deste componente) -->
|
|
1320
|
+
<ng-content select="[mkbColHandle]" />
|
|
1321
|
+
<span class="mkb-col-title">{{ column().title ?? column().id }}</span>
|
|
1322
|
+
<span
|
|
1323
|
+
class="mkb-col-count"
|
|
1324
|
+
[class.is-full]="isFull()"
|
|
1325
|
+
[attr.title]="isFull() ? 'Limite de itens atingido' : null"
|
|
1326
|
+
>
|
|
1327
|
+
{{ column().count }}{{ column().limit !== undefined ? ' / ' + column().limit : '' }}
|
|
1328
|
+
</span>
|
|
1329
|
+
</header>
|
|
1330
|
+
|
|
1331
|
+
<mos-kanban-cell
|
|
1332
|
+
class="mkb-col-cell"
|
|
1333
|
+
[board]="board()"
|
|
1334
|
+
[columnId]="column().id"
|
|
1335
|
+
[items]="items()"
|
|
1336
|
+
[cardTemplate]="cardTemplate()"
|
|
1337
|
+
[cardConfig]="cardConfig()"
|
|
1338
|
+
[readOnly]="readOnly()"
|
|
1339
|
+
[selection]="selection()"
|
|
1340
|
+
[connectedTo]="connectedTo()"
|
|
1341
|
+
[allCardIds]="allCardIds()"
|
|
1342
|
+
(cardActivate)="cardActivate.emit($event)"
|
|
1343
|
+
(cardContext)="cardContext.emit($event)"
|
|
1344
|
+
(cardKey)="cardKey.emit($event)"
|
|
1345
|
+
(cardAction)="cardAction.emit($event)"
|
|
1346
|
+
(entryCheck)="entryCheck.emit($event)"
|
|
1347
|
+
(entryAction)="entryAction.emit($event)"
|
|
1348
|
+
(entryMove)="entryMove.emit($event)"
|
|
1349
|
+
(lifecycle)="lifecycle.emit($event)"
|
|
1350
|
+
(dropRejected)="dropRejected.emit($event)"
|
|
1351
|
+
/>
|
|
1352
1352
|
`, host: { '[style.--mkb-col-accent]': 'color()' }, styles: [":host{display:flex;flex-direction:column;min-width:0;max-height:100%;background:var(--mkb-column-bg, var(--color-surface, #efedf3));border:1px solid var(--mkb-border, var(--color-border, #e3e0ea));border-radius:var(--mkb-radius, var(--radius-md, 10px))}.mkb-col-header{display:flex;align-items:center;gap:8px;padding:var(--mkb-header-padding, 10px 12px)}.mkb-col-header .mkb-col-title{flex:1}.mkb-col-header:focus-visible{outline:none;box-shadow:var(--mkb-focus-ring, 0 0 0 3px rgba(94, 53, 177, .35));border-radius:var(--mkb-radius-sm, 6px)}.mkb-col-grip{cursor:grab;color:var(--mkb-muted, #6f6a7c);font-size:12px;line-height:1;-webkit-user-select:none;user-select:none}.mkb-col-grip:active{cursor:grabbing}.mkb-col-header.mkb-col-accented{background:color-mix(in srgb,var(--mkb-col-accent) 16%,transparent);border-top:3px solid var(--mkb-col-accent);border-radius:var(--mkb-radius, 10px) var(--mkb-radius, 10px) 0 0}.mkb-col-title{font-size:12.5px;font-weight:600;letter-spacing:.2px;color:var(--mkb-foreground, var(--color-foreground, #241f33))}.mkb-col-count{font-size:11px;font-weight:500;padding:1px 8px;border-radius:999px;background:var(--mkb-card-bg, var(--color-panel, #fff));color:var(--mkb-muted, var(--color-muted, #6f6a7c))}.mkb-col-count.is-full{color:var(--mkb-danger, #b3261e)}.mkb-col-cell{flex:1;min-height:0}\n"] }]
|
|
1353
1353
|
}], propDecorators: { board: [{ type: i0.Input, args: [{ isSignal: true, alias: "board", required: true }] }], column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], cardTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardTemplate", required: false }] }], cardConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardConfig", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], reorderable: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorderable", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }], connectedTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "connectedTo", required: false }] }], allCardIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "allCardIds", required: false }] }], cardActivate: [{ type: i0.Output, args: ["cardActivate"] }], cardContext: [{ type: i0.Output, args: ["cardContext"] }], cardKey: [{ type: i0.Output, args: ["cardKey"] }], cardAction: [{ type: i0.Output, args: ["cardAction"] }], entryCheck: [{ type: i0.Output, args: ["entryCheck"] }], entryAction: [{ type: i0.Output, args: ["entryAction"] }], entryMove: [{ type: i0.Output, args: ["entryMove"] }], lifecycle: [{ type: i0.Output, args: ["lifecycle"] }], dropRejected: [{ type: i0.Output, args: ["dropRejected"] }], reorderKey: [{ type: i0.Output, args: ["reorderKey"] }] } });
|
|
1354
1354
|
|
|
@@ -1820,229 +1820,229 @@ class MosKanbanBoard {
|
|
|
1820
1820
|
});
|
|
1821
1821
|
}
|
|
1822
1822
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: MosKanbanBoard, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1823
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.18", type: MosKanbanBoard, isStandalone: true, selector: "mos-kanban-board", inputs: { board: { classPropertyName: "board", publicName: "board", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, showSearch: { classPropertyName: "showSearch", publicName: "showSearch", isSignal: true, isRequired: false, transformFunction: null }, itemActions: { classPropertyName: "itemActions", publicName: "itemActions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", itemMove: "itemMove", moveRejected: "moveRejected", itemAction: "itemAction", entryAction: "entryAction", dragStarted: "dragStarted", dragEnded: "dragEnded", dragCanceled: "dragCanceled" }, host: { listeners: { "document:click": "closeMenu()", "document:keydown.escape": "onEscape()" } }, providers: [DragCancelFlag], queries: [{ propertyName: "cardDef", first: true, predicate: MosKanbanCardDef, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1824
|
-
@if (error(); as message) {
|
|
1825
|
-
<div class="mkb-state mkb-error" role="alert">
|
|
1826
|
-
<span class="mkb-state-title">Não foi possível carregar o board</span>
|
|
1827
|
-
<span class="mkb-state-hint">{{ message }}</span>
|
|
1828
|
-
</div>
|
|
1829
|
-
} @else if (loading()) {
|
|
1830
|
-
<div class="mkb-state" aria-label="Carregando board" aria-busy="true">
|
|
1831
|
-
<div class="mkb-skeleton">
|
|
1832
|
-
@for (i of [0, 1, 2]; track i) {
|
|
1833
|
-
<div class="mkb-skeleton-col"></div>
|
|
1834
|
-
}
|
|
1835
|
-
</div>
|
|
1836
|
-
</div>
|
|
1837
|
-
} @else if (!board()) {
|
|
1838
|
-
<div class="mkb-state">
|
|
1839
|
-
<span class="mkb-state-title">Nenhum board configurado</span>
|
|
1840
|
-
<span class="mkb-state-hint">mos-kanban-board · v{{ version }}</span>
|
|
1841
|
-
</div>
|
|
1842
|
-
} @else {
|
|
1843
|
-
<div
|
|
1844
|
-
class="mkb-board"
|
|
1845
|
-
[class.mkb-readonly]="readOnly()"
|
|
1846
|
-
role="region"
|
|
1847
|
-
aria-label="Kanban board"
|
|
1848
|
-
>
|
|
1849
|
-
@if (readOnly()) {
|
|
1850
|
-
<span class="mkb-readonly-pill">somente leitura</span>
|
|
1851
|
-
}
|
|
1852
|
-
|
|
1853
|
-
<div class="mkb-sr-only" aria-live="polite">{{ announcement() }}</div>
|
|
1854
|
-
|
|
1855
|
-
@if (showSearch()) {
|
|
1856
|
-
<div class="mkb-search">
|
|
1857
|
-
<input
|
|
1858
|
-
type="search"
|
|
1859
|
-
placeholder="Pesquisar…"
|
|
1860
|
-
aria-label="Pesquisar itens do board"
|
|
1861
|
-
#search
|
|
1862
|
-
(input)="onSearch(search.value)"
|
|
1863
|
-
/>
|
|
1864
|
-
</div>
|
|
1865
|
-
}
|
|
1866
|
-
|
|
1867
|
-
@if (laneVMs(); as lanes) {
|
|
1868
|
-
<div class="mkb-grid" cdkScrollable>
|
|
1869
|
-
<div class="mkb-grid-inner">
|
|
1870
|
-
<div class="mkb-grid-head">
|
|
1871
|
-
<div class="mkb-grid-corner"></div>
|
|
1872
|
-
<div
|
|
1873
|
-
class="mkb-grid-head-cols"
|
|
1874
|
-
cdkDropList
|
|
1875
|
-
cdkDropListOrientation="horizontal"
|
|
1876
|
-
[cdkDropListDisabled]="!columnsReorderable() || readOnly()"
|
|
1877
|
-
(cdkDropListDropped)="onColumnDrop($event)"
|
|
1878
|
-
>
|
|
1879
|
-
@for (vm of columnVMs(); track vm.column.id) {
|
|
1880
|
-
<header
|
|
1881
|
-
class="mkb-grid-col-header"
|
|
1882
|
-
cdkDrag
|
|
1883
|
-
[cdkDragData]="{ kind: 'column', id: vm.column.id }"
|
|
1884
|
-
[cdkDragDisabled]="!columnsReorderable() || readOnly()"
|
|
1885
|
-
(cdkDragStarted)="onLifecycle({ phase: 'start', kind: 'column', id: vm.column.id })"
|
|
1886
|
-
(cdkDragEnded)="onLifecycle({ phase: 'end', kind: 'column', id: vm.column.id })"
|
|
1887
|
-
[class.mkb-col-accented]="!!colColor(vm.column)"
|
|
1888
|
-
[style.--mkb-col-accent]="colColor(vm.column)"
|
|
1889
|
-
[attr.tabindex]="columnsReorderable() ? 0 : null"
|
|
1890
|
-
[attr.data-column-header]="vm.column.id"
|
|
1891
|
-
[attr.aria-keyshortcuts]="columnsReorderable() ? 'Control+ArrowLeft Control+ArrowRight' : null"
|
|
1892
|
-
(keydown)="onColumnHeaderKeydown(vm.column.id, $event)"
|
|
1893
|
-
>
|
|
1894
|
-
@if (columnsReorderable()) {
|
|
1895
|
-
<span class="mkb-col-grip" cdkDragHandle aria-hidden="true">⠿</span>
|
|
1896
|
-
}
|
|
1897
|
-
<span class="mkb-col-title">{{ vm.column.title ?? vm.column.id }}</span>
|
|
1898
|
-
<span class="mkb-col-count" [class.is-full]="isFull(vm.column)">
|
|
1899
|
-
{{ vm.column.count }}{{ vm.column.limit !== undefined ? ' / ' + vm.column.limit : '' }}
|
|
1900
|
-
</span>
|
|
1901
|
-
|
|
1902
|
-
<!-- preview = a COLUNA inteira (fatia vertical da grade
|
|
1903
|
-
não é um elemento DOM único; representação
|
|
1904
|
-
equivalente: header + pilha de cartões-fantasma) -->
|
|
1905
|
-
<div class="mkb-col-slice-preview" *cdkDragPreview>
|
|
1906
|
-
<div class="mkb-col-slice-head">
|
|
1907
|
-
<span class="mkb-col-title">{{ vm.column.title ?? vm.column.id }}</span>
|
|
1908
|
-
<span class="mkb-col-count">{{ vm.column.count }}</span>
|
|
1909
|
-
</div>
|
|
1910
|
-
@for (g of ghostRows(vm.column.count); track $index) {
|
|
1911
|
-
<div class="mkb-col-slice-card"></div>
|
|
1912
|
-
}
|
|
1913
|
-
</div>
|
|
1914
|
-
</header>
|
|
1915
|
-
}
|
|
1916
|
-
</div>
|
|
1917
|
-
</div>
|
|
1918
|
-
|
|
1919
|
-
<div
|
|
1920
|
-
class="mkb-lanes"
|
|
1921
|
-
cdkDropList
|
|
1922
|
-
[cdkDropListDisabled]="!lanesReorderable() || readOnly()"
|
|
1923
|
-
(cdkDropListDropped)="onLaneDrop($event)"
|
|
1924
|
-
>
|
|
1925
|
-
@for (laneVM of lanes; track laneVM.lane.id) {
|
|
1926
|
-
<div
|
|
1927
|
-
class="mkb-lane-row"
|
|
1928
|
-
cdkDrag
|
|
1929
|
-
[cdkDragData]="{ kind: 'lane', id: laneVM.lane.id }"
|
|
1930
|
-
[cdkDragDisabled]="!lanesReorderable() || readOnly()"
|
|
1931
|
-
(cdkDragStarted)="onLifecycle({ phase: 'start', kind: 'lane', id: laneVM.lane.id })"
|
|
1932
|
-
(cdkDragEnded)="onLifecycle({ phase: 'end', kind: 'lane', id: laneVM.lane.id })"
|
|
1933
|
-
>
|
|
1934
|
-
<div
|
|
1935
|
-
class="mkb-lane-header"
|
|
1936
|
-
[attr.tabindex]="lanesReorderable() ? 0 : null"
|
|
1937
|
-
[attr.data-lane-header]="laneVM.lane.id"
|
|
1938
|
-
[attr.aria-keyshortcuts]="lanesReorderable() ? 'Control+ArrowUp Control+ArrowDown' : null"
|
|
1939
|
-
(keydown)="onLaneHeaderKeydown(laneVM.lane.id, $event)"
|
|
1940
|
-
>
|
|
1941
|
-
@if (lanesReorderable()) {
|
|
1942
|
-
<span class="mkb-col-grip" cdkDragHandle aria-hidden="true">⠿</span>
|
|
1943
|
-
}
|
|
1944
|
-
<span class="mkb-col-title">{{ laneVM.lane.title ?? laneVM.lane.id }}</span>
|
|
1945
|
-
<span class="mkb-col-count" [class.is-full]="isFull(laneVM.lane)">
|
|
1946
|
-
{{ laneVM.lane.count }}{{ laneVM.lane.limit !== undefined ? ' / ' + laneVM.lane.limit : '' }}
|
|
1947
|
-
</span>
|
|
1948
|
-
</div>
|
|
1949
|
-
<div class="mkb-lane-cells">
|
|
1950
|
-
@for (cell of laneVM.cells; track cell.column.id) {
|
|
1951
|
-
<mos-kanban-cell
|
|
1952
|
-
class="mkb-grid-cell"
|
|
1953
|
-
[board]="board()!"
|
|
1954
|
-
[columnId]="cell.column.id"
|
|
1955
|
-
[laneId]="laneVM.lane.id"
|
|
1956
|
-
[connectedTo]="connectedFor(cell.column.id, laneVM.lane.id)"
|
|
1957
|
-
[items]="cell.items"
|
|
1958
|
-
[cardTemplate]="cardDef()?.template ?? null"
|
|
1959
|
-
[cardConfig]="cardConfig()"
|
|
1960
|
-
[readOnly]="readOnly()"
|
|
1961
|
-
[selection]="selection()"
|
|
1962
|
-
[allCardIds]="allCardIds()"
|
|
1963
|
-
(cardActivate)="onActivate($event)"
|
|
1964
|
-
(cardContext)="onCardContext($event)"
|
|
1965
|
-
(cardKey)="onCardKey($event)"
|
|
1966
|
-
(cardAction)="itemAction.emit($event)"
|
|
1967
|
-
(entryCheck)="onEntryCheck($event)"
|
|
1968
|
-
(entryAction)="entryAction.emit($event)"
|
|
1969
|
-
(entryMove)="onEntryMove($event)"
|
|
1970
|
-
(lifecycle)="onLifecycle($event)"
|
|
1971
|
-
(dropRejected)="onDropRejected($event)"
|
|
1972
|
-
/>
|
|
1973
|
-
}
|
|
1974
|
-
</div>
|
|
1975
|
-
</div>
|
|
1976
|
-
}
|
|
1977
|
-
</div>
|
|
1978
|
-
</div>
|
|
1979
|
-
</div>
|
|
1980
|
-
} @else {
|
|
1981
|
-
<div
|
|
1982
|
-
class="mkb-columns"
|
|
1983
|
-
cdkDropList
|
|
1984
|
-
cdkDropListOrientation="horizontal"
|
|
1985
|
-
[cdkDropListDisabled]="!columnsReorderable() || readOnly()"
|
|
1986
|
-
(cdkDropListDropped)="onColumnDrop($event)"
|
|
1987
|
-
>
|
|
1988
|
-
@for (vm of columnVMs(); track vm.column.id) {
|
|
1989
|
-
<mos-kanban-column
|
|
1990
|
-
cdkDrag
|
|
1991
|
-
[cdkDragData]="{ kind: 'column', id: vm.column.id }"
|
|
1992
|
-
[cdkDragDisabled]="!columnsReorderable() || readOnly()"
|
|
1993
|
-
[board]="board()!"
|
|
1994
|
-
[column]="vm.column"
|
|
1995
|
-
[items]="vm.items"
|
|
1996
|
-
[cardTemplate]="cardDef()?.template ?? null"
|
|
1997
|
-
[cardConfig]="cardConfig()"
|
|
1998
|
-
[readOnly]="readOnly()"
|
|
1999
|
-
[reorderable]="columnsReorderable() && !readOnly()"
|
|
2000
|
-
[selection]="selection()"
|
|
2001
|
-
[connectedTo]="connectedFor(vm.column.id)"
|
|
2002
|
-
[allCardIds]="allCardIds()"
|
|
2003
|
-
(cardActivate)="onActivate($event)"
|
|
2004
|
-
(cardContext)="onCardContext($event)"
|
|
2005
|
-
(cardKey)="onCardKey($event)"
|
|
2006
|
-
(cardAction)="itemAction.emit($event)"
|
|
2007
|
-
(entryCheck)="onEntryCheck($event)"
|
|
2008
|
-
(entryAction)="entryAction.emit($event)"
|
|
2009
|
-
(entryMove)="onEntryMove($event)"
|
|
2010
|
-
(lifecycle)="onLifecycle($event)"
|
|
2011
|
-
(reorderKey)="onColumnReorderKey(vm.column.id, $event)"
|
|
2012
|
-
(dropRejected)="onDropRejected($event)"
|
|
2013
|
-
(cdkDragStarted)="onLifecycle({ phase: 'start', kind: 'column', id: vm.column.id })"
|
|
2014
|
-
(cdkDragEnded)="onLifecycle({ phase: 'end', kind: 'column', id: vm.column.id })"
|
|
2015
|
-
>
|
|
2016
|
-
@if (columnsReorderable() && !readOnly()) {
|
|
2017
|
-
<span mkbColHandle cdkDragHandle class="mkb-col-grip" aria-hidden="true">⠿</span>
|
|
2018
|
-
}
|
|
2019
|
-
</mos-kanban-column>
|
|
2020
|
-
}
|
|
2021
|
-
</div>
|
|
2022
|
-
}
|
|
2023
|
-
|
|
2024
|
-
@if (menu(); as m) {
|
|
2025
|
-
<div
|
|
2026
|
-
class="mkb-menu"
|
|
2027
|
-
role="menu"
|
|
2028
|
-
[style.left.px]="m.x"
|
|
2029
|
-
[style.top.px]="m.y"
|
|
2030
|
-
(click)="$event.stopPropagation()"
|
|
2031
|
-
>
|
|
2032
|
-
@for (action of itemActions(); track action.id) {
|
|
2033
|
-
<button
|
|
2034
|
-
type="button"
|
|
2035
|
-
role="menuitem"
|
|
2036
|
-
[disabled]="action.disabled"
|
|
2037
|
-
(click)="invoke(m.item, action.id)"
|
|
2038
|
-
>
|
|
2039
|
-
{{ action.label }}
|
|
2040
|
-
</button>
|
|
2041
|
-
}
|
|
2042
|
-
</div>
|
|
2043
|
-
}
|
|
2044
|
-
</div>
|
|
2045
|
-
}
|
|
1823
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.18", type: MosKanbanBoard, isStandalone: true, selector: "mos-kanban-board", inputs: { board: { classPropertyName: "board", publicName: "board", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, showSearch: { classPropertyName: "showSearch", publicName: "showSearch", isSignal: true, isRequired: false, transformFunction: null }, itemActions: { classPropertyName: "itemActions", publicName: "itemActions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", itemMove: "itemMove", moveRejected: "moveRejected", itemAction: "itemAction", entryAction: "entryAction", dragStarted: "dragStarted", dragEnded: "dragEnded", dragCanceled: "dragCanceled" }, host: { listeners: { "document:click": "closeMenu()", "document:keydown.escape": "onEscape()" } }, providers: [DragCancelFlag], queries: [{ propertyName: "cardDef", first: true, predicate: MosKanbanCardDef, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1824
|
+
@if (error(); as message) {
|
|
1825
|
+
<div class="mkb-state mkb-error" role="alert">
|
|
1826
|
+
<span class="mkb-state-title">Não foi possível carregar o board</span>
|
|
1827
|
+
<span class="mkb-state-hint">{{ message }}</span>
|
|
1828
|
+
</div>
|
|
1829
|
+
} @else if (loading()) {
|
|
1830
|
+
<div class="mkb-state" aria-label="Carregando board" aria-busy="true">
|
|
1831
|
+
<div class="mkb-skeleton">
|
|
1832
|
+
@for (i of [0, 1, 2]; track i) {
|
|
1833
|
+
<div class="mkb-skeleton-col"></div>
|
|
1834
|
+
}
|
|
1835
|
+
</div>
|
|
1836
|
+
</div>
|
|
1837
|
+
} @else if (!board()) {
|
|
1838
|
+
<div class="mkb-state">
|
|
1839
|
+
<span class="mkb-state-title">Nenhum board configurado</span>
|
|
1840
|
+
<span class="mkb-state-hint">mos-kanban-board · v{{ version }}</span>
|
|
1841
|
+
</div>
|
|
1842
|
+
} @else {
|
|
1843
|
+
<div
|
|
1844
|
+
class="mkb-board"
|
|
1845
|
+
[class.mkb-readonly]="readOnly()"
|
|
1846
|
+
role="region"
|
|
1847
|
+
aria-label="Kanban board"
|
|
1848
|
+
>
|
|
1849
|
+
@if (readOnly()) {
|
|
1850
|
+
<span class="mkb-readonly-pill">somente leitura</span>
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
<div class="mkb-sr-only" aria-live="polite">{{ announcement() }}</div>
|
|
1854
|
+
|
|
1855
|
+
@if (showSearch()) {
|
|
1856
|
+
<div class="mkb-search">
|
|
1857
|
+
<input
|
|
1858
|
+
type="search"
|
|
1859
|
+
placeholder="Pesquisar…"
|
|
1860
|
+
aria-label="Pesquisar itens do board"
|
|
1861
|
+
#search
|
|
1862
|
+
(input)="onSearch(search.value)"
|
|
1863
|
+
/>
|
|
1864
|
+
</div>
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
@if (laneVMs(); as lanes) {
|
|
1868
|
+
<div class="mkb-grid" cdkScrollable>
|
|
1869
|
+
<div class="mkb-grid-inner">
|
|
1870
|
+
<div class="mkb-grid-head">
|
|
1871
|
+
<div class="mkb-grid-corner"></div>
|
|
1872
|
+
<div
|
|
1873
|
+
class="mkb-grid-head-cols"
|
|
1874
|
+
cdkDropList
|
|
1875
|
+
cdkDropListOrientation="horizontal"
|
|
1876
|
+
[cdkDropListDisabled]="!columnsReorderable() || readOnly()"
|
|
1877
|
+
(cdkDropListDropped)="onColumnDrop($event)"
|
|
1878
|
+
>
|
|
1879
|
+
@for (vm of columnVMs(); track vm.column.id) {
|
|
1880
|
+
<header
|
|
1881
|
+
class="mkb-grid-col-header"
|
|
1882
|
+
cdkDrag
|
|
1883
|
+
[cdkDragData]="{ kind: 'column', id: vm.column.id }"
|
|
1884
|
+
[cdkDragDisabled]="!columnsReorderable() || readOnly()"
|
|
1885
|
+
(cdkDragStarted)="onLifecycle({ phase: 'start', kind: 'column', id: vm.column.id })"
|
|
1886
|
+
(cdkDragEnded)="onLifecycle({ phase: 'end', kind: 'column', id: vm.column.id })"
|
|
1887
|
+
[class.mkb-col-accented]="!!colColor(vm.column)"
|
|
1888
|
+
[style.--mkb-col-accent]="colColor(vm.column)"
|
|
1889
|
+
[attr.tabindex]="columnsReorderable() ? 0 : null"
|
|
1890
|
+
[attr.data-column-header]="vm.column.id"
|
|
1891
|
+
[attr.aria-keyshortcuts]="columnsReorderable() ? 'Control+ArrowLeft Control+ArrowRight' : null"
|
|
1892
|
+
(keydown)="onColumnHeaderKeydown(vm.column.id, $event)"
|
|
1893
|
+
>
|
|
1894
|
+
@if (columnsReorderable()) {
|
|
1895
|
+
<span class="mkb-col-grip" cdkDragHandle aria-hidden="true">⠿</span>
|
|
1896
|
+
}
|
|
1897
|
+
<span class="mkb-col-title">{{ vm.column.title ?? vm.column.id }}</span>
|
|
1898
|
+
<span class="mkb-col-count" [class.is-full]="isFull(vm.column)">
|
|
1899
|
+
{{ vm.column.count }}{{ vm.column.limit !== undefined ? ' / ' + vm.column.limit : '' }}
|
|
1900
|
+
</span>
|
|
1901
|
+
|
|
1902
|
+
<!-- preview = a COLUNA inteira (fatia vertical da grade
|
|
1903
|
+
não é um elemento DOM único; representação
|
|
1904
|
+
equivalente: header + pilha de cartões-fantasma) -->
|
|
1905
|
+
<div class="mkb-col-slice-preview" *cdkDragPreview>
|
|
1906
|
+
<div class="mkb-col-slice-head">
|
|
1907
|
+
<span class="mkb-col-title">{{ vm.column.title ?? vm.column.id }}</span>
|
|
1908
|
+
<span class="mkb-col-count">{{ vm.column.count }}</span>
|
|
1909
|
+
</div>
|
|
1910
|
+
@for (g of ghostRows(vm.column.count); track $index) {
|
|
1911
|
+
<div class="mkb-col-slice-card"></div>
|
|
1912
|
+
}
|
|
1913
|
+
</div>
|
|
1914
|
+
</header>
|
|
1915
|
+
}
|
|
1916
|
+
</div>
|
|
1917
|
+
</div>
|
|
1918
|
+
|
|
1919
|
+
<div
|
|
1920
|
+
class="mkb-lanes"
|
|
1921
|
+
cdkDropList
|
|
1922
|
+
[cdkDropListDisabled]="!lanesReorderable() || readOnly()"
|
|
1923
|
+
(cdkDropListDropped)="onLaneDrop($event)"
|
|
1924
|
+
>
|
|
1925
|
+
@for (laneVM of lanes; track laneVM.lane.id) {
|
|
1926
|
+
<div
|
|
1927
|
+
class="mkb-lane-row"
|
|
1928
|
+
cdkDrag
|
|
1929
|
+
[cdkDragData]="{ kind: 'lane', id: laneVM.lane.id }"
|
|
1930
|
+
[cdkDragDisabled]="!lanesReorderable() || readOnly()"
|
|
1931
|
+
(cdkDragStarted)="onLifecycle({ phase: 'start', kind: 'lane', id: laneVM.lane.id })"
|
|
1932
|
+
(cdkDragEnded)="onLifecycle({ phase: 'end', kind: 'lane', id: laneVM.lane.id })"
|
|
1933
|
+
>
|
|
1934
|
+
<div
|
|
1935
|
+
class="mkb-lane-header"
|
|
1936
|
+
[attr.tabindex]="lanesReorderable() ? 0 : null"
|
|
1937
|
+
[attr.data-lane-header]="laneVM.lane.id"
|
|
1938
|
+
[attr.aria-keyshortcuts]="lanesReorderable() ? 'Control+ArrowUp Control+ArrowDown' : null"
|
|
1939
|
+
(keydown)="onLaneHeaderKeydown(laneVM.lane.id, $event)"
|
|
1940
|
+
>
|
|
1941
|
+
@if (lanesReorderable()) {
|
|
1942
|
+
<span class="mkb-col-grip" cdkDragHandle aria-hidden="true">⠿</span>
|
|
1943
|
+
}
|
|
1944
|
+
<span class="mkb-col-title">{{ laneVM.lane.title ?? laneVM.lane.id }}</span>
|
|
1945
|
+
<span class="mkb-col-count" [class.is-full]="isFull(laneVM.lane)">
|
|
1946
|
+
{{ laneVM.lane.count }}{{ laneVM.lane.limit !== undefined ? ' / ' + laneVM.lane.limit : '' }}
|
|
1947
|
+
</span>
|
|
1948
|
+
</div>
|
|
1949
|
+
<div class="mkb-lane-cells">
|
|
1950
|
+
@for (cell of laneVM.cells; track cell.column.id) {
|
|
1951
|
+
<mos-kanban-cell
|
|
1952
|
+
class="mkb-grid-cell"
|
|
1953
|
+
[board]="board()!"
|
|
1954
|
+
[columnId]="cell.column.id"
|
|
1955
|
+
[laneId]="laneVM.lane.id"
|
|
1956
|
+
[connectedTo]="connectedFor(cell.column.id, laneVM.lane.id)"
|
|
1957
|
+
[items]="cell.items"
|
|
1958
|
+
[cardTemplate]="cardDef()?.template ?? null"
|
|
1959
|
+
[cardConfig]="cardConfig()"
|
|
1960
|
+
[readOnly]="readOnly()"
|
|
1961
|
+
[selection]="selection()"
|
|
1962
|
+
[allCardIds]="allCardIds()"
|
|
1963
|
+
(cardActivate)="onActivate($event)"
|
|
1964
|
+
(cardContext)="onCardContext($event)"
|
|
1965
|
+
(cardKey)="onCardKey($event)"
|
|
1966
|
+
(cardAction)="itemAction.emit($event)"
|
|
1967
|
+
(entryCheck)="onEntryCheck($event)"
|
|
1968
|
+
(entryAction)="entryAction.emit($event)"
|
|
1969
|
+
(entryMove)="onEntryMove($event)"
|
|
1970
|
+
(lifecycle)="onLifecycle($event)"
|
|
1971
|
+
(dropRejected)="onDropRejected($event)"
|
|
1972
|
+
/>
|
|
1973
|
+
}
|
|
1974
|
+
</div>
|
|
1975
|
+
</div>
|
|
1976
|
+
}
|
|
1977
|
+
</div>
|
|
1978
|
+
</div>
|
|
1979
|
+
</div>
|
|
1980
|
+
} @else {
|
|
1981
|
+
<div
|
|
1982
|
+
class="mkb-columns"
|
|
1983
|
+
cdkDropList
|
|
1984
|
+
cdkDropListOrientation="horizontal"
|
|
1985
|
+
[cdkDropListDisabled]="!columnsReorderable() || readOnly()"
|
|
1986
|
+
(cdkDropListDropped)="onColumnDrop($event)"
|
|
1987
|
+
>
|
|
1988
|
+
@for (vm of columnVMs(); track vm.column.id) {
|
|
1989
|
+
<mos-kanban-column
|
|
1990
|
+
cdkDrag
|
|
1991
|
+
[cdkDragData]="{ kind: 'column', id: vm.column.id }"
|
|
1992
|
+
[cdkDragDisabled]="!columnsReorderable() || readOnly()"
|
|
1993
|
+
[board]="board()!"
|
|
1994
|
+
[column]="vm.column"
|
|
1995
|
+
[items]="vm.items"
|
|
1996
|
+
[cardTemplate]="cardDef()?.template ?? null"
|
|
1997
|
+
[cardConfig]="cardConfig()"
|
|
1998
|
+
[readOnly]="readOnly()"
|
|
1999
|
+
[reorderable]="columnsReorderable() && !readOnly()"
|
|
2000
|
+
[selection]="selection()"
|
|
2001
|
+
[connectedTo]="connectedFor(vm.column.id)"
|
|
2002
|
+
[allCardIds]="allCardIds()"
|
|
2003
|
+
(cardActivate)="onActivate($event)"
|
|
2004
|
+
(cardContext)="onCardContext($event)"
|
|
2005
|
+
(cardKey)="onCardKey($event)"
|
|
2006
|
+
(cardAction)="itemAction.emit($event)"
|
|
2007
|
+
(entryCheck)="onEntryCheck($event)"
|
|
2008
|
+
(entryAction)="entryAction.emit($event)"
|
|
2009
|
+
(entryMove)="onEntryMove($event)"
|
|
2010
|
+
(lifecycle)="onLifecycle($event)"
|
|
2011
|
+
(reorderKey)="onColumnReorderKey(vm.column.id, $event)"
|
|
2012
|
+
(dropRejected)="onDropRejected($event)"
|
|
2013
|
+
(cdkDragStarted)="onLifecycle({ phase: 'start', kind: 'column', id: vm.column.id })"
|
|
2014
|
+
(cdkDragEnded)="onLifecycle({ phase: 'end', kind: 'column', id: vm.column.id })"
|
|
2015
|
+
>
|
|
2016
|
+
@if (columnsReorderable() && !readOnly()) {
|
|
2017
|
+
<span mkbColHandle cdkDragHandle class="mkb-col-grip" aria-hidden="true">⠿</span>
|
|
2018
|
+
}
|
|
2019
|
+
</mos-kanban-column>
|
|
2020
|
+
}
|
|
2021
|
+
</div>
|
|
2022
|
+
}
|
|
2023
|
+
|
|
2024
|
+
@if (menu(); as m) {
|
|
2025
|
+
<div
|
|
2026
|
+
class="mkb-menu"
|
|
2027
|
+
role="menu"
|
|
2028
|
+
[style.left.px]="m.x"
|
|
2029
|
+
[style.top.px]="m.y"
|
|
2030
|
+
(click)="$event.stopPropagation()"
|
|
2031
|
+
>
|
|
2032
|
+
@for (action of itemActions(); track action.id) {
|
|
2033
|
+
<button
|
|
2034
|
+
type="button"
|
|
2035
|
+
role="menuitem"
|
|
2036
|
+
[disabled]="action.disabled"
|
|
2037
|
+
(click)="invoke(m.item, action.id)"
|
|
2038
|
+
>
|
|
2039
|
+
{{ action.label }}
|
|
2040
|
+
</button>
|
|
2041
|
+
}
|
|
2042
|
+
</div>
|
|
2043
|
+
}
|
|
2044
|
+
</div>
|
|
2045
|
+
}
|
|
2046
2046
|
`, isInline: true, styles: [":host{display:block;height:100%;font-family:var(--mkb-font, var(--font-sans, system-ui, sans-serif))}.mkb-board{position:relative;display:flex;flex-direction:column;height:100%;background:var(--mkb-surface, var(--color-background, #f6f5f8));border-radius:var(--mkb-radius, var(--radius-md, 10px))}.mkb-search{padding:2px 2px 10px}.mkb-search input{width:min(320px,100%);padding:7px 10px;border:1px solid var(--mkb-border-strong, #c9c4d4);border-radius:var(--mkb-radius-sm, 6px);font:inherit;font-size:13px;background:var(--mkb-card-bg, #fff);color:var(--mkb-foreground, #241f33)}.mkb-search input:focus-visible{outline:none;border-color:var(--mkb-accent, #5e35b1);box-shadow:var(--mkb-focus-ring, 0 0 0 3px rgba(94, 53, 177, .35))}.mkb-columns{display:flex;gap:var(--mkb-column-gap, var(--mkb-gap, 12px));flex:1;min-height:0;overflow-x:auto;padding:2px;align-items:start}.mkb-columns>mos-kanban-column{flex:0 0 var(--mkb-column-width, clamp(220px, 26vw, 320px));max-height:100%}.mkb-grid{flex:1;min-height:0;overflow:auto;padding:2px}.mkb-grid-inner{display:flex;flex-direction:column;gap:var(--mkb-lane-gap, var(--mkb-gap, 12px));width:max-content;min-width:100%}.mkb-lanes{display:flex;flex-direction:column;gap:var(--mkb-lane-gap, var(--mkb-gap, 12px))}.mkb-grid-head,.mkb-lane-row{display:flex;gap:var(--mkb-column-gap, var(--mkb-gap, 12px));align-items:stretch}.mkb-grid-head{position:sticky;top:0;z-index:2}.mkb-grid-head-cols,.mkb-lane-cells{display:flex;gap:var(--mkb-column-gap, var(--mkb-gap, 12px))}.mkb-grid-corner,.mkb-lane-header{flex:0 0 var(--mkb-lane-label-width, 140px)}.mkb-grid-col-header,.mkb-grid-cell{flex:0 0 var(--mkb-grid-column-width, var(--mkb-column-width, clamp(220px, 26vw, 320px)));box-sizing:border-box}.mkb-grid-corner{background:var(--mkb-surface, #f6f5f8)}.mkb-grid-col-header{display:flex;align-items:center;gap:8px;padding:var(--mkb-header-padding, 8px 12px);background:var(--mkb-column-bg, #efedf3);border:1px solid var(--mkb-border, #e3e0ea);border-radius:var(--mkb-radius-sm, 6px)}.mkb-grid-col-header .mkb-col-title{flex:1}.mkb-grid-col-header[tabindex]:focus-visible,.mkb-lane-header[tabindex]:focus-visible{outline:none;box-shadow:var(--mkb-focus-ring, 0 0 0 3px rgba(94, 53, 177, .35))}.mkb-grid-col-header.mkb-col-accented{background:color-mix(in srgb,var(--mkb-col-accent) 16%,transparent);border-top:3px solid var(--mkb-col-accent)}.mkb-lane-header{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:10px;background:var(--mkb-column-bg, #efedf3);border:1px solid var(--mkb-border, #e3e0ea);border-radius:var(--mkb-radius-sm, 6px)}.mkb-col-grip{cursor:grab;color:var(--mkb-muted, #6f6a7c);font-size:12px;line-height:1;-webkit-user-select:none;user-select:none}.mkb-col-grip:active{cursor:grabbing}.mkb-col-title{font-size:12.5px;font-weight:600;letter-spacing:.2px;color:var(--mkb-foreground, #241f33);overflow-wrap:anywhere}.mkb-col-count{font-size:11px;font-weight:500;padding:1px 8px;border-radius:999px;background:var(--mkb-card-bg, #fff);color:var(--mkb-muted, #6f6a7c)}.mkb-col-count.is-full{color:var(--mkb-danger, #b3261e)}.mkb-grid-cell{background:var(--mkb-column-bg, #efedf3);border:1px solid var(--mkb-border, #e3e0ea);border-radius:var(--mkb-radius, 10px);min-height:84px}.cdk-drag-placeholder{opacity:.35}.cdk-drop-list-dragging .cdk-drag:not(.cdk-drag-placeholder){transition:transform var(--mkb-dur-move, .18s) var(--mkb-ease, ease)}@media(prefers-reduced-motion:reduce){.cdk-drop-list-dragging .cdk-drag:not(.cdk-drag-placeholder){transition:none}mos-kanban-column.cdk-drag-preview,.mkb-lane-row.cdk-drag-preview{rotate:none}}mos-kanban-column.cdk-drag-preview,.mkb-lane-row.cdk-drag-preview{box-shadow:0 12px 32px #0000003d;opacity:.95}.mkb-col-slice-preview{display:flex;flex-direction:column;gap:var(--mkb-card-gap, 8px);width:var(--mkb-grid-column-width, var(--mkb-column-width, clamp(220px, 26vw, 320px)));padding:0 0 10px;background:var(--mkb-column-bg, #efedf3);border:1px solid var(--mkb-border, #e3e0ea);border-radius:var(--mkb-radius, 10px);box-shadow:0 12px 32px #0000003d}.mkb-col-slice-head{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid var(--mkb-border, #e3e0ea)}.mkb-col-slice-card{height:44px;margin:0 8px;background:var(--mkb-card-bg, #fff);border:1px solid var(--mkb-border, #e3e0ea);border-radius:var(--mkb-radius-sm, 6px)}@media(prefers-reduced-motion:reduce){.cdk-drop-list-dragging .cdk-drag:not(.cdk-drag-placeholder){transition:none}}.mkb-readonly-pill{position:absolute;top:-6px;right:8px;z-index:3;font-size:10px;font-weight:600;letter-spacing:.4px;text-transform:uppercase;padding:2px 8px;border-radius:999px;background:var(--mkb-warning, #9a6b00);color:#fff}.mkb-menu{position:fixed;z-index:10;display:flex;flex-direction:column;min-width:160px;padding:4px;background:var(--mkb-card-bg, #fff);border:1px solid var(--mkb-border, #e3e0ea);border-radius:var(--mkb-radius-sm, 6px);box-shadow:0 8px 24px #00000024}.mkb-menu button{padding:7px 10px;border:0;border-radius:4px;background:transparent;color:var(--mkb-foreground, #241f33);font:inherit;font-size:12.5px;text-align:left;cursor:pointer}.mkb-menu button:hover:not(:disabled){background:color-mix(in srgb,var(--mkb-accent, #5e35b1) 10%,transparent)}.mkb-menu button:disabled{opacity:.45;cursor:default}.mkb-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:240px;height:100%;background:var(--mkb-surface, var(--color-background, #f6f5f8));border:1px solid var(--mkb-border, var(--color-border, #e3e0ea));border-radius:var(--mkb-radius, var(--radius-md, 10px));color:var(--mkb-muted, var(--color-muted, #6f6a7c))}.mkb-state-title{font-size:14px;font-weight:500}.mkb-error .mkb-state-title{color:var(--mkb-danger, #b3261e)}.mkb-state-hint{font-size:11px;opacity:.8}.mkb-skeleton{display:flex;gap:var(--mkb-gap, 12px)}.mkb-skeleton-col{width:220px;height:180px;border-radius:var(--mkb-radius, 10px);background:var(--mkb-column-bg, #efedf3);animation:mkb-pulse 1.2s ease-in-out infinite}@keyframes mkb-pulse{50%{opacity:.55}}.mkb-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}@media(prefers-reduced-motion:reduce){.mkb-skeleton-col{animation:none}}@media(max-width:540px){.mkb-columns>mos-kanban-column{flex:0 0 78vw}.mkb-search input{width:100%}}\n"], dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: CdkDragPreview, selector: "ng-template[cdkDragPreview]", inputs: ["data", "matchSize"] }, { kind: "directive", type: CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "component", type: MosKanbanColumn, selector: "mos-kanban-column", inputs: ["board", "column", "items", "cardTemplate", "cardConfig", "readOnly", "reorderable", "selection", "connectedTo", "allCardIds"], outputs: ["cardActivate", "cardContext", "cardKey", "cardAction", "entryCheck", "entryAction", "entryMove", "lifecycle", "dropRejected", "reorderKey"] }, { kind: "component", type: MosKanbanCell, selector: "mos-kanban-cell", inputs: ["board", "columnId", "laneId", "items", "cardTemplate", "cardConfig", "readOnly", "selection", "connectedTo", "allCardIds"], outputs: ["cardActivate", "cardContext", "cardKey", "cardAction", "entryCheck", "entryAction", "entryMove", "lifecycle", "dropRejected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2047
2047
|
}
|
|
2048
2048
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: MosKanbanBoard, decorators: [{
|
|
@@ -2058,229 +2058,229 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImpo
|
|
|
2058
2058
|
], providers: [DragCancelFlag], host: {
|
|
2059
2059
|
'(document:click)': 'closeMenu()',
|
|
2060
2060
|
'(document:keydown.escape)': 'onEscape()',
|
|
2061
|
-
}, template: `
|
|
2062
|
-
@if (error(); as message) {
|
|
2063
|
-
<div class="mkb-state mkb-error" role="alert">
|
|
2064
|
-
<span class="mkb-state-title">Não foi possível carregar o board</span>
|
|
2065
|
-
<span class="mkb-state-hint">{{ message }}</span>
|
|
2066
|
-
</div>
|
|
2067
|
-
} @else if (loading()) {
|
|
2068
|
-
<div class="mkb-state" aria-label="Carregando board" aria-busy="true">
|
|
2069
|
-
<div class="mkb-skeleton">
|
|
2070
|
-
@for (i of [0, 1, 2]; track i) {
|
|
2071
|
-
<div class="mkb-skeleton-col"></div>
|
|
2072
|
-
}
|
|
2073
|
-
</div>
|
|
2074
|
-
</div>
|
|
2075
|
-
} @else if (!board()) {
|
|
2076
|
-
<div class="mkb-state">
|
|
2077
|
-
<span class="mkb-state-title">Nenhum board configurado</span>
|
|
2078
|
-
<span class="mkb-state-hint">mos-kanban-board · v{{ version }}</span>
|
|
2079
|
-
</div>
|
|
2080
|
-
} @else {
|
|
2081
|
-
<div
|
|
2082
|
-
class="mkb-board"
|
|
2083
|
-
[class.mkb-readonly]="readOnly()"
|
|
2084
|
-
role="region"
|
|
2085
|
-
aria-label="Kanban board"
|
|
2086
|
-
>
|
|
2087
|
-
@if (readOnly()) {
|
|
2088
|
-
<span class="mkb-readonly-pill">somente leitura</span>
|
|
2089
|
-
}
|
|
2090
|
-
|
|
2091
|
-
<div class="mkb-sr-only" aria-live="polite">{{ announcement() }}</div>
|
|
2092
|
-
|
|
2093
|
-
@if (showSearch()) {
|
|
2094
|
-
<div class="mkb-search">
|
|
2095
|
-
<input
|
|
2096
|
-
type="search"
|
|
2097
|
-
placeholder="Pesquisar…"
|
|
2098
|
-
aria-label="Pesquisar itens do board"
|
|
2099
|
-
#search
|
|
2100
|
-
(input)="onSearch(search.value)"
|
|
2101
|
-
/>
|
|
2102
|
-
</div>
|
|
2103
|
-
}
|
|
2104
|
-
|
|
2105
|
-
@if (laneVMs(); as lanes) {
|
|
2106
|
-
<div class="mkb-grid" cdkScrollable>
|
|
2107
|
-
<div class="mkb-grid-inner">
|
|
2108
|
-
<div class="mkb-grid-head">
|
|
2109
|
-
<div class="mkb-grid-corner"></div>
|
|
2110
|
-
<div
|
|
2111
|
-
class="mkb-grid-head-cols"
|
|
2112
|
-
cdkDropList
|
|
2113
|
-
cdkDropListOrientation="horizontal"
|
|
2114
|
-
[cdkDropListDisabled]="!columnsReorderable() || readOnly()"
|
|
2115
|
-
(cdkDropListDropped)="onColumnDrop($event)"
|
|
2116
|
-
>
|
|
2117
|
-
@for (vm of columnVMs(); track vm.column.id) {
|
|
2118
|
-
<header
|
|
2119
|
-
class="mkb-grid-col-header"
|
|
2120
|
-
cdkDrag
|
|
2121
|
-
[cdkDragData]="{ kind: 'column', id: vm.column.id }"
|
|
2122
|
-
[cdkDragDisabled]="!columnsReorderable() || readOnly()"
|
|
2123
|
-
(cdkDragStarted)="onLifecycle({ phase: 'start', kind: 'column', id: vm.column.id })"
|
|
2124
|
-
(cdkDragEnded)="onLifecycle({ phase: 'end', kind: 'column', id: vm.column.id })"
|
|
2125
|
-
[class.mkb-col-accented]="!!colColor(vm.column)"
|
|
2126
|
-
[style.--mkb-col-accent]="colColor(vm.column)"
|
|
2127
|
-
[attr.tabindex]="columnsReorderable() ? 0 : null"
|
|
2128
|
-
[attr.data-column-header]="vm.column.id"
|
|
2129
|
-
[attr.aria-keyshortcuts]="columnsReorderable() ? 'Control+ArrowLeft Control+ArrowRight' : null"
|
|
2130
|
-
(keydown)="onColumnHeaderKeydown(vm.column.id, $event)"
|
|
2131
|
-
>
|
|
2132
|
-
@if (columnsReorderable()) {
|
|
2133
|
-
<span class="mkb-col-grip" cdkDragHandle aria-hidden="true">⠿</span>
|
|
2134
|
-
}
|
|
2135
|
-
<span class="mkb-col-title">{{ vm.column.title ?? vm.column.id }}</span>
|
|
2136
|
-
<span class="mkb-col-count" [class.is-full]="isFull(vm.column)">
|
|
2137
|
-
{{ vm.column.count }}{{ vm.column.limit !== undefined ? ' / ' + vm.column.limit : '' }}
|
|
2138
|
-
</span>
|
|
2139
|
-
|
|
2140
|
-
<!-- preview = a COLUNA inteira (fatia vertical da grade
|
|
2141
|
-
não é um elemento DOM único; representação
|
|
2142
|
-
equivalente: header + pilha de cartões-fantasma) -->
|
|
2143
|
-
<div class="mkb-col-slice-preview" *cdkDragPreview>
|
|
2144
|
-
<div class="mkb-col-slice-head">
|
|
2145
|
-
<span class="mkb-col-title">{{ vm.column.title ?? vm.column.id }}</span>
|
|
2146
|
-
<span class="mkb-col-count">{{ vm.column.count }}</span>
|
|
2147
|
-
</div>
|
|
2148
|
-
@for (g of ghostRows(vm.column.count); track $index) {
|
|
2149
|
-
<div class="mkb-col-slice-card"></div>
|
|
2150
|
-
}
|
|
2151
|
-
</div>
|
|
2152
|
-
</header>
|
|
2153
|
-
}
|
|
2154
|
-
</div>
|
|
2155
|
-
</div>
|
|
2156
|
-
|
|
2157
|
-
<div
|
|
2158
|
-
class="mkb-lanes"
|
|
2159
|
-
cdkDropList
|
|
2160
|
-
[cdkDropListDisabled]="!lanesReorderable() || readOnly()"
|
|
2161
|
-
(cdkDropListDropped)="onLaneDrop($event)"
|
|
2162
|
-
>
|
|
2163
|
-
@for (laneVM of lanes; track laneVM.lane.id) {
|
|
2164
|
-
<div
|
|
2165
|
-
class="mkb-lane-row"
|
|
2166
|
-
cdkDrag
|
|
2167
|
-
[cdkDragData]="{ kind: 'lane', id: laneVM.lane.id }"
|
|
2168
|
-
[cdkDragDisabled]="!lanesReorderable() || readOnly()"
|
|
2169
|
-
(cdkDragStarted)="onLifecycle({ phase: 'start', kind: 'lane', id: laneVM.lane.id })"
|
|
2170
|
-
(cdkDragEnded)="onLifecycle({ phase: 'end', kind: 'lane', id: laneVM.lane.id })"
|
|
2171
|
-
>
|
|
2172
|
-
<div
|
|
2173
|
-
class="mkb-lane-header"
|
|
2174
|
-
[attr.tabindex]="lanesReorderable() ? 0 : null"
|
|
2175
|
-
[attr.data-lane-header]="laneVM.lane.id"
|
|
2176
|
-
[attr.aria-keyshortcuts]="lanesReorderable() ? 'Control+ArrowUp Control+ArrowDown' : null"
|
|
2177
|
-
(keydown)="onLaneHeaderKeydown(laneVM.lane.id, $event)"
|
|
2178
|
-
>
|
|
2179
|
-
@if (lanesReorderable()) {
|
|
2180
|
-
<span class="mkb-col-grip" cdkDragHandle aria-hidden="true">⠿</span>
|
|
2181
|
-
}
|
|
2182
|
-
<span class="mkb-col-title">{{ laneVM.lane.title ?? laneVM.lane.id }}</span>
|
|
2183
|
-
<span class="mkb-col-count" [class.is-full]="isFull(laneVM.lane)">
|
|
2184
|
-
{{ laneVM.lane.count }}{{ laneVM.lane.limit !== undefined ? ' / ' + laneVM.lane.limit : '' }}
|
|
2185
|
-
</span>
|
|
2186
|
-
</div>
|
|
2187
|
-
<div class="mkb-lane-cells">
|
|
2188
|
-
@for (cell of laneVM.cells; track cell.column.id) {
|
|
2189
|
-
<mos-kanban-cell
|
|
2190
|
-
class="mkb-grid-cell"
|
|
2191
|
-
[board]="board()!"
|
|
2192
|
-
[columnId]="cell.column.id"
|
|
2193
|
-
[laneId]="laneVM.lane.id"
|
|
2194
|
-
[connectedTo]="connectedFor(cell.column.id, laneVM.lane.id)"
|
|
2195
|
-
[items]="cell.items"
|
|
2196
|
-
[cardTemplate]="cardDef()?.template ?? null"
|
|
2197
|
-
[cardConfig]="cardConfig()"
|
|
2198
|
-
[readOnly]="readOnly()"
|
|
2199
|
-
[selection]="selection()"
|
|
2200
|
-
[allCardIds]="allCardIds()"
|
|
2201
|
-
(cardActivate)="onActivate($event)"
|
|
2202
|
-
(cardContext)="onCardContext($event)"
|
|
2203
|
-
(cardKey)="onCardKey($event)"
|
|
2204
|
-
(cardAction)="itemAction.emit($event)"
|
|
2205
|
-
(entryCheck)="onEntryCheck($event)"
|
|
2206
|
-
(entryAction)="entryAction.emit($event)"
|
|
2207
|
-
(entryMove)="onEntryMove($event)"
|
|
2208
|
-
(lifecycle)="onLifecycle($event)"
|
|
2209
|
-
(dropRejected)="onDropRejected($event)"
|
|
2210
|
-
/>
|
|
2211
|
-
}
|
|
2212
|
-
</div>
|
|
2213
|
-
</div>
|
|
2214
|
-
}
|
|
2215
|
-
</div>
|
|
2216
|
-
</div>
|
|
2217
|
-
</div>
|
|
2218
|
-
} @else {
|
|
2219
|
-
<div
|
|
2220
|
-
class="mkb-columns"
|
|
2221
|
-
cdkDropList
|
|
2222
|
-
cdkDropListOrientation="horizontal"
|
|
2223
|
-
[cdkDropListDisabled]="!columnsReorderable() || readOnly()"
|
|
2224
|
-
(cdkDropListDropped)="onColumnDrop($event)"
|
|
2225
|
-
>
|
|
2226
|
-
@for (vm of columnVMs(); track vm.column.id) {
|
|
2227
|
-
<mos-kanban-column
|
|
2228
|
-
cdkDrag
|
|
2229
|
-
[cdkDragData]="{ kind: 'column', id: vm.column.id }"
|
|
2230
|
-
[cdkDragDisabled]="!columnsReorderable() || readOnly()"
|
|
2231
|
-
[board]="board()!"
|
|
2232
|
-
[column]="vm.column"
|
|
2233
|
-
[items]="vm.items"
|
|
2234
|
-
[cardTemplate]="cardDef()?.template ?? null"
|
|
2235
|
-
[cardConfig]="cardConfig()"
|
|
2236
|
-
[readOnly]="readOnly()"
|
|
2237
|
-
[reorderable]="columnsReorderable() && !readOnly()"
|
|
2238
|
-
[selection]="selection()"
|
|
2239
|
-
[connectedTo]="connectedFor(vm.column.id)"
|
|
2240
|
-
[allCardIds]="allCardIds()"
|
|
2241
|
-
(cardActivate)="onActivate($event)"
|
|
2242
|
-
(cardContext)="onCardContext($event)"
|
|
2243
|
-
(cardKey)="onCardKey($event)"
|
|
2244
|
-
(cardAction)="itemAction.emit($event)"
|
|
2245
|
-
(entryCheck)="onEntryCheck($event)"
|
|
2246
|
-
(entryAction)="entryAction.emit($event)"
|
|
2247
|
-
(entryMove)="onEntryMove($event)"
|
|
2248
|
-
(lifecycle)="onLifecycle($event)"
|
|
2249
|
-
(reorderKey)="onColumnReorderKey(vm.column.id, $event)"
|
|
2250
|
-
(dropRejected)="onDropRejected($event)"
|
|
2251
|
-
(cdkDragStarted)="onLifecycle({ phase: 'start', kind: 'column', id: vm.column.id })"
|
|
2252
|
-
(cdkDragEnded)="onLifecycle({ phase: 'end', kind: 'column', id: vm.column.id })"
|
|
2253
|
-
>
|
|
2254
|
-
@if (columnsReorderable() && !readOnly()) {
|
|
2255
|
-
<span mkbColHandle cdkDragHandle class="mkb-col-grip" aria-hidden="true">⠿</span>
|
|
2256
|
-
}
|
|
2257
|
-
</mos-kanban-column>
|
|
2258
|
-
}
|
|
2259
|
-
</div>
|
|
2260
|
-
}
|
|
2261
|
-
|
|
2262
|
-
@if (menu(); as m) {
|
|
2263
|
-
<div
|
|
2264
|
-
class="mkb-menu"
|
|
2265
|
-
role="menu"
|
|
2266
|
-
[style.left.px]="m.x"
|
|
2267
|
-
[style.top.px]="m.y"
|
|
2268
|
-
(click)="$event.stopPropagation()"
|
|
2269
|
-
>
|
|
2270
|
-
@for (action of itemActions(); track action.id) {
|
|
2271
|
-
<button
|
|
2272
|
-
type="button"
|
|
2273
|
-
role="menuitem"
|
|
2274
|
-
[disabled]="action.disabled"
|
|
2275
|
-
(click)="invoke(m.item, action.id)"
|
|
2276
|
-
>
|
|
2277
|
-
{{ action.label }}
|
|
2278
|
-
</button>
|
|
2279
|
-
}
|
|
2280
|
-
</div>
|
|
2281
|
-
}
|
|
2282
|
-
</div>
|
|
2283
|
-
}
|
|
2061
|
+
}, template: `
|
|
2062
|
+
@if (error(); as message) {
|
|
2063
|
+
<div class="mkb-state mkb-error" role="alert">
|
|
2064
|
+
<span class="mkb-state-title">Não foi possível carregar o board</span>
|
|
2065
|
+
<span class="mkb-state-hint">{{ message }}</span>
|
|
2066
|
+
</div>
|
|
2067
|
+
} @else if (loading()) {
|
|
2068
|
+
<div class="mkb-state" aria-label="Carregando board" aria-busy="true">
|
|
2069
|
+
<div class="mkb-skeleton">
|
|
2070
|
+
@for (i of [0, 1, 2]; track i) {
|
|
2071
|
+
<div class="mkb-skeleton-col"></div>
|
|
2072
|
+
}
|
|
2073
|
+
</div>
|
|
2074
|
+
</div>
|
|
2075
|
+
} @else if (!board()) {
|
|
2076
|
+
<div class="mkb-state">
|
|
2077
|
+
<span class="mkb-state-title">Nenhum board configurado</span>
|
|
2078
|
+
<span class="mkb-state-hint">mos-kanban-board · v{{ version }}</span>
|
|
2079
|
+
</div>
|
|
2080
|
+
} @else {
|
|
2081
|
+
<div
|
|
2082
|
+
class="mkb-board"
|
|
2083
|
+
[class.mkb-readonly]="readOnly()"
|
|
2084
|
+
role="region"
|
|
2085
|
+
aria-label="Kanban board"
|
|
2086
|
+
>
|
|
2087
|
+
@if (readOnly()) {
|
|
2088
|
+
<span class="mkb-readonly-pill">somente leitura</span>
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2091
|
+
<div class="mkb-sr-only" aria-live="polite">{{ announcement() }}</div>
|
|
2092
|
+
|
|
2093
|
+
@if (showSearch()) {
|
|
2094
|
+
<div class="mkb-search">
|
|
2095
|
+
<input
|
|
2096
|
+
type="search"
|
|
2097
|
+
placeholder="Pesquisar…"
|
|
2098
|
+
aria-label="Pesquisar itens do board"
|
|
2099
|
+
#search
|
|
2100
|
+
(input)="onSearch(search.value)"
|
|
2101
|
+
/>
|
|
2102
|
+
</div>
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
@if (laneVMs(); as lanes) {
|
|
2106
|
+
<div class="mkb-grid" cdkScrollable>
|
|
2107
|
+
<div class="mkb-grid-inner">
|
|
2108
|
+
<div class="mkb-grid-head">
|
|
2109
|
+
<div class="mkb-grid-corner"></div>
|
|
2110
|
+
<div
|
|
2111
|
+
class="mkb-grid-head-cols"
|
|
2112
|
+
cdkDropList
|
|
2113
|
+
cdkDropListOrientation="horizontal"
|
|
2114
|
+
[cdkDropListDisabled]="!columnsReorderable() || readOnly()"
|
|
2115
|
+
(cdkDropListDropped)="onColumnDrop($event)"
|
|
2116
|
+
>
|
|
2117
|
+
@for (vm of columnVMs(); track vm.column.id) {
|
|
2118
|
+
<header
|
|
2119
|
+
class="mkb-grid-col-header"
|
|
2120
|
+
cdkDrag
|
|
2121
|
+
[cdkDragData]="{ kind: 'column', id: vm.column.id }"
|
|
2122
|
+
[cdkDragDisabled]="!columnsReorderable() || readOnly()"
|
|
2123
|
+
(cdkDragStarted)="onLifecycle({ phase: 'start', kind: 'column', id: vm.column.id })"
|
|
2124
|
+
(cdkDragEnded)="onLifecycle({ phase: 'end', kind: 'column', id: vm.column.id })"
|
|
2125
|
+
[class.mkb-col-accented]="!!colColor(vm.column)"
|
|
2126
|
+
[style.--mkb-col-accent]="colColor(vm.column)"
|
|
2127
|
+
[attr.tabindex]="columnsReorderable() ? 0 : null"
|
|
2128
|
+
[attr.data-column-header]="vm.column.id"
|
|
2129
|
+
[attr.aria-keyshortcuts]="columnsReorderable() ? 'Control+ArrowLeft Control+ArrowRight' : null"
|
|
2130
|
+
(keydown)="onColumnHeaderKeydown(vm.column.id, $event)"
|
|
2131
|
+
>
|
|
2132
|
+
@if (columnsReorderable()) {
|
|
2133
|
+
<span class="mkb-col-grip" cdkDragHandle aria-hidden="true">⠿</span>
|
|
2134
|
+
}
|
|
2135
|
+
<span class="mkb-col-title">{{ vm.column.title ?? vm.column.id }}</span>
|
|
2136
|
+
<span class="mkb-col-count" [class.is-full]="isFull(vm.column)">
|
|
2137
|
+
{{ vm.column.count }}{{ vm.column.limit !== undefined ? ' / ' + vm.column.limit : '' }}
|
|
2138
|
+
</span>
|
|
2139
|
+
|
|
2140
|
+
<!-- preview = a COLUNA inteira (fatia vertical da grade
|
|
2141
|
+
não é um elemento DOM único; representação
|
|
2142
|
+
equivalente: header + pilha de cartões-fantasma) -->
|
|
2143
|
+
<div class="mkb-col-slice-preview" *cdkDragPreview>
|
|
2144
|
+
<div class="mkb-col-slice-head">
|
|
2145
|
+
<span class="mkb-col-title">{{ vm.column.title ?? vm.column.id }}</span>
|
|
2146
|
+
<span class="mkb-col-count">{{ vm.column.count }}</span>
|
|
2147
|
+
</div>
|
|
2148
|
+
@for (g of ghostRows(vm.column.count); track $index) {
|
|
2149
|
+
<div class="mkb-col-slice-card"></div>
|
|
2150
|
+
}
|
|
2151
|
+
</div>
|
|
2152
|
+
</header>
|
|
2153
|
+
}
|
|
2154
|
+
</div>
|
|
2155
|
+
</div>
|
|
2156
|
+
|
|
2157
|
+
<div
|
|
2158
|
+
class="mkb-lanes"
|
|
2159
|
+
cdkDropList
|
|
2160
|
+
[cdkDropListDisabled]="!lanesReorderable() || readOnly()"
|
|
2161
|
+
(cdkDropListDropped)="onLaneDrop($event)"
|
|
2162
|
+
>
|
|
2163
|
+
@for (laneVM of lanes; track laneVM.lane.id) {
|
|
2164
|
+
<div
|
|
2165
|
+
class="mkb-lane-row"
|
|
2166
|
+
cdkDrag
|
|
2167
|
+
[cdkDragData]="{ kind: 'lane', id: laneVM.lane.id }"
|
|
2168
|
+
[cdkDragDisabled]="!lanesReorderable() || readOnly()"
|
|
2169
|
+
(cdkDragStarted)="onLifecycle({ phase: 'start', kind: 'lane', id: laneVM.lane.id })"
|
|
2170
|
+
(cdkDragEnded)="onLifecycle({ phase: 'end', kind: 'lane', id: laneVM.lane.id })"
|
|
2171
|
+
>
|
|
2172
|
+
<div
|
|
2173
|
+
class="mkb-lane-header"
|
|
2174
|
+
[attr.tabindex]="lanesReorderable() ? 0 : null"
|
|
2175
|
+
[attr.data-lane-header]="laneVM.lane.id"
|
|
2176
|
+
[attr.aria-keyshortcuts]="lanesReorderable() ? 'Control+ArrowUp Control+ArrowDown' : null"
|
|
2177
|
+
(keydown)="onLaneHeaderKeydown(laneVM.lane.id, $event)"
|
|
2178
|
+
>
|
|
2179
|
+
@if (lanesReorderable()) {
|
|
2180
|
+
<span class="mkb-col-grip" cdkDragHandle aria-hidden="true">⠿</span>
|
|
2181
|
+
}
|
|
2182
|
+
<span class="mkb-col-title">{{ laneVM.lane.title ?? laneVM.lane.id }}</span>
|
|
2183
|
+
<span class="mkb-col-count" [class.is-full]="isFull(laneVM.lane)">
|
|
2184
|
+
{{ laneVM.lane.count }}{{ laneVM.lane.limit !== undefined ? ' / ' + laneVM.lane.limit : '' }}
|
|
2185
|
+
</span>
|
|
2186
|
+
</div>
|
|
2187
|
+
<div class="mkb-lane-cells">
|
|
2188
|
+
@for (cell of laneVM.cells; track cell.column.id) {
|
|
2189
|
+
<mos-kanban-cell
|
|
2190
|
+
class="mkb-grid-cell"
|
|
2191
|
+
[board]="board()!"
|
|
2192
|
+
[columnId]="cell.column.id"
|
|
2193
|
+
[laneId]="laneVM.lane.id"
|
|
2194
|
+
[connectedTo]="connectedFor(cell.column.id, laneVM.lane.id)"
|
|
2195
|
+
[items]="cell.items"
|
|
2196
|
+
[cardTemplate]="cardDef()?.template ?? null"
|
|
2197
|
+
[cardConfig]="cardConfig()"
|
|
2198
|
+
[readOnly]="readOnly()"
|
|
2199
|
+
[selection]="selection()"
|
|
2200
|
+
[allCardIds]="allCardIds()"
|
|
2201
|
+
(cardActivate)="onActivate($event)"
|
|
2202
|
+
(cardContext)="onCardContext($event)"
|
|
2203
|
+
(cardKey)="onCardKey($event)"
|
|
2204
|
+
(cardAction)="itemAction.emit($event)"
|
|
2205
|
+
(entryCheck)="onEntryCheck($event)"
|
|
2206
|
+
(entryAction)="entryAction.emit($event)"
|
|
2207
|
+
(entryMove)="onEntryMove($event)"
|
|
2208
|
+
(lifecycle)="onLifecycle($event)"
|
|
2209
|
+
(dropRejected)="onDropRejected($event)"
|
|
2210
|
+
/>
|
|
2211
|
+
}
|
|
2212
|
+
</div>
|
|
2213
|
+
</div>
|
|
2214
|
+
}
|
|
2215
|
+
</div>
|
|
2216
|
+
</div>
|
|
2217
|
+
</div>
|
|
2218
|
+
} @else {
|
|
2219
|
+
<div
|
|
2220
|
+
class="mkb-columns"
|
|
2221
|
+
cdkDropList
|
|
2222
|
+
cdkDropListOrientation="horizontal"
|
|
2223
|
+
[cdkDropListDisabled]="!columnsReorderable() || readOnly()"
|
|
2224
|
+
(cdkDropListDropped)="onColumnDrop($event)"
|
|
2225
|
+
>
|
|
2226
|
+
@for (vm of columnVMs(); track vm.column.id) {
|
|
2227
|
+
<mos-kanban-column
|
|
2228
|
+
cdkDrag
|
|
2229
|
+
[cdkDragData]="{ kind: 'column', id: vm.column.id }"
|
|
2230
|
+
[cdkDragDisabled]="!columnsReorderable() || readOnly()"
|
|
2231
|
+
[board]="board()!"
|
|
2232
|
+
[column]="vm.column"
|
|
2233
|
+
[items]="vm.items"
|
|
2234
|
+
[cardTemplate]="cardDef()?.template ?? null"
|
|
2235
|
+
[cardConfig]="cardConfig()"
|
|
2236
|
+
[readOnly]="readOnly()"
|
|
2237
|
+
[reorderable]="columnsReorderable() && !readOnly()"
|
|
2238
|
+
[selection]="selection()"
|
|
2239
|
+
[connectedTo]="connectedFor(vm.column.id)"
|
|
2240
|
+
[allCardIds]="allCardIds()"
|
|
2241
|
+
(cardActivate)="onActivate($event)"
|
|
2242
|
+
(cardContext)="onCardContext($event)"
|
|
2243
|
+
(cardKey)="onCardKey($event)"
|
|
2244
|
+
(cardAction)="itemAction.emit($event)"
|
|
2245
|
+
(entryCheck)="onEntryCheck($event)"
|
|
2246
|
+
(entryAction)="entryAction.emit($event)"
|
|
2247
|
+
(entryMove)="onEntryMove($event)"
|
|
2248
|
+
(lifecycle)="onLifecycle($event)"
|
|
2249
|
+
(reorderKey)="onColumnReorderKey(vm.column.id, $event)"
|
|
2250
|
+
(dropRejected)="onDropRejected($event)"
|
|
2251
|
+
(cdkDragStarted)="onLifecycle({ phase: 'start', kind: 'column', id: vm.column.id })"
|
|
2252
|
+
(cdkDragEnded)="onLifecycle({ phase: 'end', kind: 'column', id: vm.column.id })"
|
|
2253
|
+
>
|
|
2254
|
+
@if (columnsReorderable() && !readOnly()) {
|
|
2255
|
+
<span mkbColHandle cdkDragHandle class="mkb-col-grip" aria-hidden="true">⠿</span>
|
|
2256
|
+
}
|
|
2257
|
+
</mos-kanban-column>
|
|
2258
|
+
}
|
|
2259
|
+
</div>
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
@if (menu(); as m) {
|
|
2263
|
+
<div
|
|
2264
|
+
class="mkb-menu"
|
|
2265
|
+
role="menu"
|
|
2266
|
+
[style.left.px]="m.x"
|
|
2267
|
+
[style.top.px]="m.y"
|
|
2268
|
+
(click)="$event.stopPropagation()"
|
|
2269
|
+
>
|
|
2270
|
+
@for (action of itemActions(); track action.id) {
|
|
2271
|
+
<button
|
|
2272
|
+
type="button"
|
|
2273
|
+
role="menuitem"
|
|
2274
|
+
[disabled]="action.disabled"
|
|
2275
|
+
(click)="invoke(m.item, action.id)"
|
|
2276
|
+
>
|
|
2277
|
+
{{ action.label }}
|
|
2278
|
+
</button>
|
|
2279
|
+
}
|
|
2280
|
+
</div>
|
|
2281
|
+
}
|
|
2282
|
+
</div>
|
|
2283
|
+
}
|
|
2284
2284
|
`, styles: [":host{display:block;height:100%;font-family:var(--mkb-font, var(--font-sans, system-ui, sans-serif))}.mkb-board{position:relative;display:flex;flex-direction:column;height:100%;background:var(--mkb-surface, var(--color-background, #f6f5f8));border-radius:var(--mkb-radius, var(--radius-md, 10px))}.mkb-search{padding:2px 2px 10px}.mkb-search input{width:min(320px,100%);padding:7px 10px;border:1px solid var(--mkb-border-strong, #c9c4d4);border-radius:var(--mkb-radius-sm, 6px);font:inherit;font-size:13px;background:var(--mkb-card-bg, #fff);color:var(--mkb-foreground, #241f33)}.mkb-search input:focus-visible{outline:none;border-color:var(--mkb-accent, #5e35b1);box-shadow:var(--mkb-focus-ring, 0 0 0 3px rgba(94, 53, 177, .35))}.mkb-columns{display:flex;gap:var(--mkb-column-gap, var(--mkb-gap, 12px));flex:1;min-height:0;overflow-x:auto;padding:2px;align-items:start}.mkb-columns>mos-kanban-column{flex:0 0 var(--mkb-column-width, clamp(220px, 26vw, 320px));max-height:100%}.mkb-grid{flex:1;min-height:0;overflow:auto;padding:2px}.mkb-grid-inner{display:flex;flex-direction:column;gap:var(--mkb-lane-gap, var(--mkb-gap, 12px));width:max-content;min-width:100%}.mkb-lanes{display:flex;flex-direction:column;gap:var(--mkb-lane-gap, var(--mkb-gap, 12px))}.mkb-grid-head,.mkb-lane-row{display:flex;gap:var(--mkb-column-gap, var(--mkb-gap, 12px));align-items:stretch}.mkb-grid-head{position:sticky;top:0;z-index:2}.mkb-grid-head-cols,.mkb-lane-cells{display:flex;gap:var(--mkb-column-gap, var(--mkb-gap, 12px))}.mkb-grid-corner,.mkb-lane-header{flex:0 0 var(--mkb-lane-label-width, 140px)}.mkb-grid-col-header,.mkb-grid-cell{flex:0 0 var(--mkb-grid-column-width, var(--mkb-column-width, clamp(220px, 26vw, 320px)));box-sizing:border-box}.mkb-grid-corner{background:var(--mkb-surface, #f6f5f8)}.mkb-grid-col-header{display:flex;align-items:center;gap:8px;padding:var(--mkb-header-padding, 8px 12px);background:var(--mkb-column-bg, #efedf3);border:1px solid var(--mkb-border, #e3e0ea);border-radius:var(--mkb-radius-sm, 6px)}.mkb-grid-col-header .mkb-col-title{flex:1}.mkb-grid-col-header[tabindex]:focus-visible,.mkb-lane-header[tabindex]:focus-visible{outline:none;box-shadow:var(--mkb-focus-ring, 0 0 0 3px rgba(94, 53, 177, .35))}.mkb-grid-col-header.mkb-col-accented{background:color-mix(in srgb,var(--mkb-col-accent) 16%,transparent);border-top:3px solid var(--mkb-col-accent)}.mkb-lane-header{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:10px;background:var(--mkb-column-bg, #efedf3);border:1px solid var(--mkb-border, #e3e0ea);border-radius:var(--mkb-radius-sm, 6px)}.mkb-col-grip{cursor:grab;color:var(--mkb-muted, #6f6a7c);font-size:12px;line-height:1;-webkit-user-select:none;user-select:none}.mkb-col-grip:active{cursor:grabbing}.mkb-col-title{font-size:12.5px;font-weight:600;letter-spacing:.2px;color:var(--mkb-foreground, #241f33);overflow-wrap:anywhere}.mkb-col-count{font-size:11px;font-weight:500;padding:1px 8px;border-radius:999px;background:var(--mkb-card-bg, #fff);color:var(--mkb-muted, #6f6a7c)}.mkb-col-count.is-full{color:var(--mkb-danger, #b3261e)}.mkb-grid-cell{background:var(--mkb-column-bg, #efedf3);border:1px solid var(--mkb-border, #e3e0ea);border-radius:var(--mkb-radius, 10px);min-height:84px}.cdk-drag-placeholder{opacity:.35}.cdk-drop-list-dragging .cdk-drag:not(.cdk-drag-placeholder){transition:transform var(--mkb-dur-move, .18s) var(--mkb-ease, ease)}@media(prefers-reduced-motion:reduce){.cdk-drop-list-dragging .cdk-drag:not(.cdk-drag-placeholder){transition:none}mos-kanban-column.cdk-drag-preview,.mkb-lane-row.cdk-drag-preview{rotate:none}}mos-kanban-column.cdk-drag-preview,.mkb-lane-row.cdk-drag-preview{box-shadow:0 12px 32px #0000003d;opacity:.95}.mkb-col-slice-preview{display:flex;flex-direction:column;gap:var(--mkb-card-gap, 8px);width:var(--mkb-grid-column-width, var(--mkb-column-width, clamp(220px, 26vw, 320px)));padding:0 0 10px;background:var(--mkb-column-bg, #efedf3);border:1px solid var(--mkb-border, #e3e0ea);border-radius:var(--mkb-radius, 10px);box-shadow:0 12px 32px #0000003d}.mkb-col-slice-head{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid var(--mkb-border, #e3e0ea)}.mkb-col-slice-card{height:44px;margin:0 8px;background:var(--mkb-card-bg, #fff);border:1px solid var(--mkb-border, #e3e0ea);border-radius:var(--mkb-radius-sm, 6px)}@media(prefers-reduced-motion:reduce){.cdk-drop-list-dragging .cdk-drag:not(.cdk-drag-placeholder){transition:none}}.mkb-readonly-pill{position:absolute;top:-6px;right:8px;z-index:3;font-size:10px;font-weight:600;letter-spacing:.4px;text-transform:uppercase;padding:2px 8px;border-radius:999px;background:var(--mkb-warning, #9a6b00);color:#fff}.mkb-menu{position:fixed;z-index:10;display:flex;flex-direction:column;min-width:160px;padding:4px;background:var(--mkb-card-bg, #fff);border:1px solid var(--mkb-border, #e3e0ea);border-radius:var(--mkb-radius-sm, 6px);box-shadow:0 8px 24px #00000024}.mkb-menu button{padding:7px 10px;border:0;border-radius:4px;background:transparent;color:var(--mkb-foreground, #241f33);font:inherit;font-size:12.5px;text-align:left;cursor:pointer}.mkb-menu button:hover:not(:disabled){background:color-mix(in srgb,var(--mkb-accent, #5e35b1) 10%,transparent)}.mkb-menu button:disabled{opacity:.45;cursor:default}.mkb-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:240px;height:100%;background:var(--mkb-surface, var(--color-background, #f6f5f8));border:1px solid var(--mkb-border, var(--color-border, #e3e0ea));border-radius:var(--mkb-radius, var(--radius-md, 10px));color:var(--mkb-muted, var(--color-muted, #6f6a7c))}.mkb-state-title{font-size:14px;font-weight:500}.mkb-error .mkb-state-title{color:var(--mkb-danger, #b3261e)}.mkb-state-hint{font-size:11px;opacity:.8}.mkb-skeleton{display:flex;gap:var(--mkb-gap, 12px)}.mkb-skeleton-col{width:220px;height:180px;border-radius:var(--mkb-radius, 10px);background:var(--mkb-column-bg, #efedf3);animation:mkb-pulse 1.2s ease-in-out infinite}@keyframes mkb-pulse{50%{opacity:.55}}.mkb-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}@media(prefers-reduced-motion:reduce){.mkb-skeleton-col{animation:none}}@media(max-width:540px){.mkb-columns>mos-kanban-column{flex:0 0 78vw}.mkb-search input{width:100%}}\n"] }]
|
|
2285
2285
|
}], ctorParameters: () => [], propDecorators: { board: [{ type: i0.Input, args: [{ isSignal: true, alias: "board", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], showSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSearch", required: false }] }], itemActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemActions", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], itemMove: [{ type: i0.Output, args: ["itemMove"] }], moveRejected: [{ type: i0.Output, args: ["moveRejected"] }], itemAction: [{ type: i0.Output, args: ["itemAction"] }], entryAction: [{ type: i0.Output, args: ["entryAction"] }], dragStarted: [{ type: i0.Output, args: ["dragStarted"] }], dragEnded: [{ type: i0.Output, args: ["dragEnded"] }], dragCanceled: [{ type: i0.Output, args: ["dragCanceled"] }], cardDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => MosKanbanCardDef), { isSignal: true }] }] } });
|
|
2286
2286
|
|