ngx-core-components 0.3.31 → 0.3.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +988 -601
- package/barcodes/barcode/barcode-encoding.d.ts +1 -0
- package/barcodes/barcode/barcode.component.d.ts +4 -4
- package/barcodes/public-api.d.ts +1 -0
- package/charts/bar-chart/bar-chart.component.d.ts +5 -1
- package/charts/box-plot-chart/box-plot-chart.component.d.ts +6 -0
- package/charts/bubble-chart/bubble-chart.component.d.ts +4 -0
- package/charts/bullet-chart/bullet-chart.component.d.ts +3 -0
- package/charts/column-range-chart/column-range-chart.component.d.ts +5 -1
- package/charts/dumbbell-chart/dumbbell-chart.component.d.ts +5 -1
- package/charts/funnel-chart/funnel-chart.component.d.ts +4 -0
- package/charts/heatmap-chart/heatmap-chart.component.d.ts +4 -0
- package/charts/line-chart/line-chart.component.d.ts +2 -0
- package/charts/lollipop-chart/lollipop-chart.component.d.ts +5 -1
- package/charts/marimekko-chart/marimekko-chart.component.d.ts +25 -1
- package/charts/pie-chart/pie-chart.component.d.ts +9 -0
- package/charts/pyramid-chart/pyramid-chart.component.d.ts +5 -0
- package/charts/radial-bar-chart/radial-bar-chart.component.d.ts +4 -0
- package/charts/range-bar-chart/range-bar-chart.component.d.ts +4 -0
- package/charts/scatter-plot/scatter-plot.component.d.ts +4 -0
- package/charts/shared/chart-accessible-mark.directive.d.ts +9 -0
- package/charts/shared/chart-export-menu.component.d.ts +7 -0
- package/charts/shared/chart-skeleton.component.d.ts +1 -1
- package/charts/sunburst-chart/sunburst-chart.component.d.ts +6 -3
- package/charts/treemap-chart/treemap-chart.component.d.ts +6 -4
- package/charts/waterfall-chart/waterfall-chart.component.d.ts +8 -0
- package/fesm2022/ngx-core-components-barcodes.mjs +196 -42
- package/fesm2022/ngx-core-components-barcodes.mjs.map +1 -1
- package/fesm2022/ngx-core-components-charts.mjs +1399 -875
- package/fesm2022/ngx-core-components-charts.mjs.map +1 -1
- package/fesm2022/ngx-core-components-grid.mjs +2075 -545
- package/fesm2022/ngx-core-components-grid.mjs.map +1 -1
- package/fesm2022/ngx-core-components-i18n.mjs +129 -35
- package/fesm2022/ngx-core-components-i18n.mjs.map +1 -1
- package/fesm2022/ngx-core-components-inputs.mjs +297 -39
- package/fesm2022/ngx-core-components-inputs.mjs.map +1 -1
- package/fesm2022/ngx-core-components-layout.mjs +71 -53
- package/fesm2022/ngx-core-components-layout.mjs.map +1 -1
- package/fesm2022/ngx-core-components-testing.mjs +30 -0
- package/fesm2022/ngx-core-components-testing.mjs.map +1 -0
- package/fesm2022/ngx-core-components-views.mjs +69 -29
- package/fesm2022/ngx-core-components-views.mjs.map +1 -1
- package/fesm2022/ngx-core-components.mjs +2 -2
- package/fesm2022/ngx-core-components.mjs.map +1 -1
- package/grid/data-grid/components/grid-filter-builder/grid-filter-builder.component.d.ts +6 -1
- package/grid/data-grid/data-grid.component.d.ts +19 -1
- package/grid/data-grid/grid-data-source.d.ts +22 -0
- package/grid/data-grid/services/grid-state.service.d.ts +7 -0
- package/grid/public-api.d.ts +6 -3
- package/i18n/ngx-core-i18n.d.ts +94 -1
- package/i18n/public-api.d.ts +1 -1
- package/inputs/form-builder/form-builder.component.d.ts +17 -1
- package/package.json +6 -2
- package/public-api.d.ts +8 -7
- package/testing/component-test-harness.d.ts +10 -0
- package/testing/index.d.ts +5 -0
- package/testing/public-api.d.ts +1 -0
- package/views/kanban/kanban.component.d.ts +1 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
class NgxComponentTestHarness {
|
|
2
|
+
fixture;
|
|
3
|
+
constructor(fixture) {
|
|
4
|
+
this.fixture = fixture;
|
|
5
|
+
}
|
|
6
|
+
get instance() {
|
|
7
|
+
return this.fixture.componentInstance;
|
|
8
|
+
}
|
|
9
|
+
setInput(name, value) {
|
|
10
|
+
this.fixture.componentRef.setInput(name, value);
|
|
11
|
+
}
|
|
12
|
+
detectChanges() {
|
|
13
|
+
this.fixture.detectChanges();
|
|
14
|
+
}
|
|
15
|
+
query(selector) {
|
|
16
|
+
const root = this.fixture.nativeElement;
|
|
17
|
+
return root.querySelector(selector);
|
|
18
|
+
}
|
|
19
|
+
queryAll(selector) {
|
|
20
|
+
const root = this.fixture.nativeElement;
|
|
21
|
+
return Array.from(root.querySelectorAll(selector));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Generated bundle index. Do not edit.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
export { NgxComponentTestHarness };
|
|
30
|
+
//# sourceMappingURL=ngx-core-components-testing.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-core-components-testing.mjs","sources":["../../../projects/ngx-core-components/testing/component-test-harness.ts","../../../projects/ngx-core-components/testing/ngx-core-components-testing.ts"],"sourcesContent":["import type { ComponentFixture } from '@angular/core/testing';\n\nexport class NgxComponentTestHarness<T> {\n constructor(readonly fixture: ComponentFixture<T>) {}\n\n get instance(): T {\n return this.fixture.componentInstance;\n }\n\n setInput(name: string, value: unknown): void {\n this.fixture.componentRef.setInput(name, value);\n }\n\n detectChanges(): void {\n this.fixture.detectChanges();\n }\n\n query<TElement extends Element = HTMLElement>(selector: string): TElement | null {\n const root = this.fixture.nativeElement as ParentNode;\n return root.querySelector<TElement>(selector);\n }\n\n queryAll<TElement extends Element = HTMLElement>(selector: string): TElement[] {\n const root = this.fixture.nativeElement as ParentNode;\n return Array.from(root.querySelectorAll<TElement>(selector));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"MAEa,uBAAuB,CAAA;AACb,IAAA,OAAA;AAArB,IAAA,WAAA,CAAqB,OAA4B,EAAA;QAA5B,IAAA,CAAA,OAAO,GAAP,OAAO;IAAwB;AAEpD,IAAA,IAAI,QAAQ,GAAA;AACV,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB;IACvC;IAEA,QAAQ,CAAC,IAAY,EAAE,KAAc,EAAA;QACnC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IACjD;IAEA,aAAa,GAAA;AACX,QAAA,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;IAC9B;AAEA,IAAA,KAAK,CAAyC,QAAgB,EAAA;AAC5D,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,aAA2B;AACrD,QAAA,OAAO,IAAI,CAAC,aAAa,CAAW,QAAQ,CAAC;IAC/C;AAEA,IAAA,QAAQ,CAAyC,QAAgB,EAAA;AAC/D,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,aAA2B;QACrD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAW,QAAQ,CAAC,CAAC;IAC9D;AACD;;AC1BD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, output, signal, computed, ChangeDetectionStrategy, Component, inject, effect, ContentChild, ViewChildren, Directive, contentChild, TemplateRef, HostListener, ViewChild, model } from '@angular/core';
|
|
2
|
+
import { input, output, signal, computed, ChangeDetectionStrategy, Component, inject, effect, ContentChild, ElementRef, ViewChildren, Directive, contentChild, TemplateRef, HostListener, ViewChild, model } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule, NgTemplateOutlet } from '@angular/common';
|
|
5
5
|
import { NGX_CORE_I18N } from 'ngx-core-components/i18n';
|
|
@@ -635,6 +635,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
635
635
|
|
|
636
636
|
const DEFAULT_LANE_ID = '__default__';
|
|
637
637
|
class KanbanComponent {
|
|
638
|
+
elementRef = inject((ElementRef));
|
|
638
639
|
columns = input([]);
|
|
639
640
|
cards = input([]);
|
|
640
641
|
swimlanes = input([]);
|
|
@@ -695,15 +696,12 @@ class KanbanComponent {
|
|
|
695
696
|
const colIndex = this.columns().findIndex(c => c.id === currentColumnId);
|
|
696
697
|
let targetColumnId = currentColumnId;
|
|
697
698
|
let targetIndex = currentIndex;
|
|
698
|
-
if (event.key === 'ArrowLeft') {
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
else if (event.key === 'ArrowRight') {
|
|
705
|
-
if (colIndex < this.columns().length - 1) {
|
|
706
|
-
targetColumnId = this.columns()[colIndex + 1].id;
|
|
699
|
+
if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') {
|
|
700
|
+
const isRtl = this.elementRef.nativeElement.closest('[dir="rtl"]') !== null;
|
|
701
|
+
const visualDirection = event.key === 'ArrowRight' ? 1 : -1;
|
|
702
|
+
const nextColumnIndex = colIndex + visualDirection * (isRtl ? -1 : 1);
|
|
703
|
+
if (nextColumnIndex >= 0 && nextColumnIndex < this.columns().length) {
|
|
704
|
+
targetColumnId = this.columns()[nextColumnIndex].id;
|
|
707
705
|
targetIndex = 0;
|
|
708
706
|
}
|
|
709
707
|
}
|
|
@@ -722,7 +720,7 @@ class KanbanComponent {
|
|
|
722
720
|
this.moveCard(card.id, targetColumnId, laneId, targetIndex);
|
|
723
721
|
setTimeout(() => {
|
|
724
722
|
const elementId = this.dragHandleOnly() ? `k-handle-${card.id}` : `k-card-${card.id}`;
|
|
725
|
-
|
|
723
|
+
this.elementRef.nativeElement.ownerDocument.getElementById(elementId)?.focus();
|
|
726
724
|
}, 0);
|
|
727
725
|
}
|
|
728
726
|
}
|
|
@@ -888,7 +886,9 @@ class KanbanComponent {
|
|
|
888
886
|
<header class="swimlane-header">
|
|
889
887
|
<div>
|
|
890
888
|
<h3>{{ lane.title }}</h3>
|
|
891
|
-
@if (lane.description) {
|
|
889
|
+
@if (lane.description) {
|
|
890
|
+
<p>{{ lane.description }}</p>
|
|
891
|
+
}
|
|
892
892
|
</div>
|
|
893
893
|
</header>
|
|
894
894
|
}
|
|
@@ -906,10 +906,16 @@ class KanbanComponent {
|
|
|
906
906
|
>
|
|
907
907
|
<div class="column-header" [style.border-top-color]="col.color || 'var(--primary-color)'">
|
|
908
908
|
<div class="column-title-section">
|
|
909
|
-
<span
|
|
909
|
+
<span
|
|
910
|
+
class="column-indicator"
|
|
911
|
+
[style.background-color]="col.color || 'var(--primary-color)'"
|
|
912
|
+
></span>
|
|
910
913
|
<h4 class="column-title">{{ col.title }}</h4>
|
|
911
914
|
<span class="card-count-badge" [class.limit-reached]="isWipReached(col.id, lane.id)">
|
|
912
|
-
{{ getCardsForColumn(col.id, lane.id).length }}
|
|
915
|
+
{{ getCardsForColumn(col.id, lane.id).length }}
|
|
916
|
+
@if (col.wipLimit) {
|
|
917
|
+
/{{ col.wipLimit }}
|
|
918
|
+
}
|
|
913
919
|
</span>
|
|
914
920
|
</div>
|
|
915
921
|
|
|
@@ -933,13 +939,19 @@ class KanbanComponent {
|
|
|
933
939
|
(keydown.escape)="toggleAddInput(col.id, lane.id)"
|
|
934
940
|
/>
|
|
935
941
|
<div class="creator-actions">
|
|
936
|
-
<button class="creator-btn btn-add" type="button" (click)="addCard(col.id, lane.id)">
|
|
937
|
-
|
|
942
|
+
<button class="creator-btn btn-add" type="button" (click)="addCard(col.id, lane.id)">
|
|
943
|
+
Add Card
|
|
944
|
+
</button>
|
|
945
|
+
<button class="creator-btn btn-cancel" type="button" (click)="toggleAddInput(col.id, lane.id)">
|
|
946
|
+
Cancel
|
|
947
|
+
</button>
|
|
938
948
|
</div>
|
|
939
949
|
</div>
|
|
940
950
|
}
|
|
941
951
|
|
|
942
|
-
@if (
|
|
952
|
+
@if (
|
|
953
|
+
getCardsForColumn(col.id, lane.id).length === 0 && !columnAddStates()[dropKey(col.id, lane.id)]
|
|
954
|
+
) {
|
|
943
955
|
<div class="column-empty-state">No cards here.</div>
|
|
944
956
|
}
|
|
945
957
|
|
|
@@ -970,7 +982,9 @@ class KanbanComponent {
|
|
|
970
982
|
(dragstart)="onDragStart($event, card)"
|
|
971
983
|
(dragend)="onDragEnd()"
|
|
972
984
|
(keydown)="onCardKeyDown($event, card, col.id, lane.id, cardIndex)"
|
|
973
|
-
|
|
985
|
+
>
|
|
986
|
+
::
|
|
987
|
+
</button>
|
|
974
988
|
|
|
975
989
|
@if (card.priority || (card.tags && card.tags.length > 0)) {
|
|
976
990
|
<div class="card-meta-header">
|
|
@@ -1010,7 +1024,12 @@ class KanbanComponent {
|
|
|
1010
1024
|
}
|
|
1011
1025
|
|
|
1012
1026
|
<div class="card-actions">
|
|
1013
|
-
<button
|
|
1027
|
+
<button
|
|
1028
|
+
class="card-delete-action"
|
|
1029
|
+
type="button"
|
|
1030
|
+
(click)="deleteCard($event, card.id)"
|
|
1031
|
+
title="Delete card"
|
|
1032
|
+
>
|
|
1014
1033
|
x
|
|
1015
1034
|
</button>
|
|
1016
1035
|
@if (card.assignee) {
|
|
@@ -1033,7 +1052,7 @@ class KanbanComponent {
|
|
|
1033
1052
|
</section>
|
|
1034
1053
|
}
|
|
1035
1054
|
</div>
|
|
1036
|
-
`, isInline: true, styles: [":host{display:block;width:100%;height:100%}.ngx-kanban-board{display:flex;flex-direction:column;gap:16px;overflow:auto;height:100%;padding:4px}.kanban-swimlane{display:flex;flex-direction:column;gap:10px;min-width:min-content}.swimlane-header{position:sticky;left:0;z-index:2;display:flex;justify-content:space-between;align-items:center;padding:4px 2px;color:var(--text-primary, #212529)}.swimlane-header h3{margin:0;font-size:13px;font-weight:800}.swimlane-header p{margin:3px 0 0;font-size:11px;color:var(--text-secondary, #6c757d)}.kanban-columns{display:flex;align-items:flex-start;gap:20px;min-width:min-content}.kanban-column{flex:0 0 290px;width:290px;max-height:100%;display:flex;flex-direction:column;background:var(--bg-secondary, #ffffff);border:1px solid var(--border-color, #dee2e6);border-radius:12px;box-shadow:var(--shadow-sm, 0 1px 3px rgba(0,0,0
|
|
1055
|
+
`, isInline: true, styles: [":host{display:block;width:100%;height:100%}.ngx-kanban-board{display:flex;flex-direction:column;gap:16px;overflow:auto;height:100%;padding:4px}.kanban-swimlane{display:flex;flex-direction:column;gap:10px;min-width:min-content}.swimlane-header{position:sticky;left:0;z-index:2;display:flex;justify-content:space-between;align-items:center;padding:4px 2px;color:var(--text-primary, #212529)}.swimlane-header h3{margin:0;font-size:13px;font-weight:800}.swimlane-header p{margin:3px 0 0;font-size:11px;color:var(--text-secondary, #6c757d)}.kanban-columns{display:flex;align-items:flex-start;gap:20px;min-width:min-content}.kanban-column{flex:0 0 290px;width:290px;max-height:100%;display:flex;flex-direction:column;background:var(--bg-secondary, #ffffff);border:1px solid var(--border-color, #dee2e6);border-radius:12px;box-shadow:var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, .05));transition:all .2s cubic-bezier(.4,0,.2,1);overflow:hidden}.kanban-column.drag-over{border-color:var(--primary-color, #6366f1);box-shadow:0 0 0 3px var(--primary-glow, rgba(99, 102, 241, .15));background:var(--border-light, #fafafa)}.kanban-column.wip-reached:not(.drag-over){border-color:var(--ngx-kanban-limit, #f59e0b)}.column-header{padding:14px 16px 10px;border-top:3px solid var(--primary-color, #6366f1);display:flex;justify-content:space-between;align-items:center;background:var(--border-light, #fafafa);border-bottom:1px solid var(--border-color, #dee2e6)}.column-title-section{display:flex;align-items:center;gap:8px;min-width:0}.column-indicator{width:8px;height:8px;border-radius:50%;flex-shrink:0}.column-title{margin:0;font-size:14px;font-weight:700;color:var(--text-primary, #212529);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card-count-badge{font-size:11px;font-weight:700;color:var(--text-secondary, #6c757d);background:var(--border-color, #e9ecef);padding:2px 7px;border-radius:99px}.card-count-badge.limit-reached{color:#92400e;background:#fef3c7}.add-card-btn{background:none;border:none;cursor:pointer;color:var(--text-secondary, #6c757d);font-size:16px;width:24px;height:24px;border-radius:4px;transition:all .15s;display:flex;align-items:center;justify-content:center}.add-card-btn:hover,.add-card-btn:focus-visible{background:var(--border-color, #e9ecef);color:var(--text-primary, #212529);outline:none}.column-cards-list{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:12px;min-height:100px}.column-empty-state{padding:24px 16px;text-align:center;font-size:12px;color:var(--text-secondary, #888);font-style:italic;border:1px dashed var(--border-color, #e2e8f0);border-radius:8px}.kanban-card{background:var(--bg-secondary, #ffffff);border:1px solid var(--border-color, #dee2e6);border-radius:10px;padding:12px;cursor:grab;box-shadow:0 1px 2px #0000000a;transition:all .2s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column;gap:10px;-webkit-user-select:none;user-select:none}.kanban-card:hover{border-color:var(--primary-color, #6366f1);box-shadow:var(--shadow-md, 0 4px 6px rgba(0, 0, 0, .08));transform:translateY(-1px)}.kanban-card:hover .card-delete-action{opacity:1}.kanban-card.dragging{opacity:.35;border-style:dashed;border-color:var(--primary-color, #6366f1);background:var(--border-light, #f8f9fa)}.card-topline{display:flex;align-items:flex-start;gap:8px}.drag-handle{flex:0 0 auto;width:22px;height:22px;border:1px solid var(--border-color, #dee2e6);border-radius:5px;background:var(--border-light, #f8f9fa);color:var(--text-secondary, #6c757d);cursor:grab;font-size:10px;line-height:1}.card-meta-header{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}.priority-badge{font-size:9px;font-weight:700;text-transform:uppercase;padding:2px 6px;border-radius:4px;letter-spacing:.5px}.priority-badge.priority-low{background:#e6f4e9;color:#1e7e34}.priority-badge.priority-medium{background:#fff3cd;color:#856404}.priority-badge.priority-high{background:#fce8e6;color:#c53929}.card-tag-pills{display:flex;gap:4px;flex-wrap:wrap}.card-tag{font-size:9px;font-weight:600;color:var(--text-secondary, #6c757d);background:var(--border-light, #f1f3f5);border:1px solid var(--border-color, #e9ecef);padding:1px 6px;border-radius:4px}.card-content{display:flex;flex-direction:column;gap:4px}.card-title{margin:0;font-size:13px;font-weight:650;color:var(--text-primary, #212529);line-height:1.4}.card-desc{margin:0;font-size:12px;color:var(--text-secondary, #6c757d);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.card-footer{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--border-light, #f1f3f5);padding-top:8px;font-size:11px}.spacer{flex:1}.card-due-date{color:var(--text-secondary, #6c757d);font-weight:500}.card-due-date.overdue{color:#dc3545;font-weight:650}.card-actions{display:flex;align-items:center;gap:8px}.card-delete-action{background:none;border:none;cursor:pointer;color:#adb5bd;width:22px;height:22px;border-radius:4px;opacity:0;transition:all .15s;font-size:13px;display:flex;align-items:center;justify-content:center}.card-delete-action:hover,.card-delete-action:focus-visible{opacity:1;color:#dc3545;background:#fce8e6;outline:none}.assignee-avatar{width:24px;height:24px;border-radius:50%;background:var(--primary-color, #6366f1);color:#fff;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;overflow:hidden;border:1px solid var(--bg-secondary, #fff)}.assignee-avatar img{width:100%;height:100%;object-fit:cover}.card-creator-box{background:var(--bg-secondary, #ffffff);border:1px solid var(--primary-color, #6366f1);border-radius:8px;padding:10px;box-shadow:0 2px 8px #6366f126;display:flex;flex-direction:column;gap:8px}.creator-input{width:100%;border:1px solid var(--border-color, #dee2e6);border-radius:6px;padding:6px 10px;font-size:12px;background:var(--bg-secondary, #fff);color:var(--text-primary, #212529);outline:none}.creator-input:focus{border-color:var(--primary-color, #6366f1)}.creator-actions{display:flex;justify-content:flex-end;gap:6px}.creator-btn{border:none;border-radius:4px;padding:4px 10px;font-size:11px;font-weight:650;cursor:pointer;font-family:inherit}.creator-btn.btn-add{background:var(--primary-color, #6366f1);color:#fff}.creator-btn.btn-add:hover{background:var(--primary-hover, #4f46e5)}.creator-btn.btn-cancel{background:var(--border-light, #f8f9fa);color:var(--text-secondary, #495057);border:1px solid var(--border-color, #dee2e6)}.creator-btn.btn-cancel:hover{background:var(--border-color, #e9ecef)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1037
1056
|
}
|
|
1038
1057
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KanbanComponent, decorators: [{
|
|
1039
1058
|
type: Component,
|
|
@@ -1045,7 +1064,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1045
1064
|
<header class="swimlane-header">
|
|
1046
1065
|
<div>
|
|
1047
1066
|
<h3>{{ lane.title }}</h3>
|
|
1048
|
-
@if (lane.description) {
|
|
1067
|
+
@if (lane.description) {
|
|
1068
|
+
<p>{{ lane.description }}</p>
|
|
1069
|
+
}
|
|
1049
1070
|
</div>
|
|
1050
1071
|
</header>
|
|
1051
1072
|
}
|
|
@@ -1063,10 +1084,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1063
1084
|
>
|
|
1064
1085
|
<div class="column-header" [style.border-top-color]="col.color || 'var(--primary-color)'">
|
|
1065
1086
|
<div class="column-title-section">
|
|
1066
|
-
<span
|
|
1087
|
+
<span
|
|
1088
|
+
class="column-indicator"
|
|
1089
|
+
[style.background-color]="col.color || 'var(--primary-color)'"
|
|
1090
|
+
></span>
|
|
1067
1091
|
<h4 class="column-title">{{ col.title }}</h4>
|
|
1068
1092
|
<span class="card-count-badge" [class.limit-reached]="isWipReached(col.id, lane.id)">
|
|
1069
|
-
{{ getCardsForColumn(col.id, lane.id).length }}
|
|
1093
|
+
{{ getCardsForColumn(col.id, lane.id).length }}
|
|
1094
|
+
@if (col.wipLimit) {
|
|
1095
|
+
/{{ col.wipLimit }}
|
|
1096
|
+
}
|
|
1070
1097
|
</span>
|
|
1071
1098
|
</div>
|
|
1072
1099
|
|
|
@@ -1090,13 +1117,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1090
1117
|
(keydown.escape)="toggleAddInput(col.id, lane.id)"
|
|
1091
1118
|
/>
|
|
1092
1119
|
<div class="creator-actions">
|
|
1093
|
-
<button class="creator-btn btn-add" type="button" (click)="addCard(col.id, lane.id)">
|
|
1094
|
-
|
|
1120
|
+
<button class="creator-btn btn-add" type="button" (click)="addCard(col.id, lane.id)">
|
|
1121
|
+
Add Card
|
|
1122
|
+
</button>
|
|
1123
|
+
<button class="creator-btn btn-cancel" type="button" (click)="toggleAddInput(col.id, lane.id)">
|
|
1124
|
+
Cancel
|
|
1125
|
+
</button>
|
|
1095
1126
|
</div>
|
|
1096
1127
|
</div>
|
|
1097
1128
|
}
|
|
1098
1129
|
|
|
1099
|
-
@if (
|
|
1130
|
+
@if (
|
|
1131
|
+
getCardsForColumn(col.id, lane.id).length === 0 && !columnAddStates()[dropKey(col.id, lane.id)]
|
|
1132
|
+
) {
|
|
1100
1133
|
<div class="column-empty-state">No cards here.</div>
|
|
1101
1134
|
}
|
|
1102
1135
|
|
|
@@ -1127,7 +1160,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1127
1160
|
(dragstart)="onDragStart($event, card)"
|
|
1128
1161
|
(dragend)="onDragEnd()"
|
|
1129
1162
|
(keydown)="onCardKeyDown($event, card, col.id, lane.id, cardIndex)"
|
|
1130
|
-
|
|
1163
|
+
>
|
|
1164
|
+
::
|
|
1165
|
+
</button>
|
|
1131
1166
|
|
|
1132
1167
|
@if (card.priority || (card.tags && card.tags.length > 0)) {
|
|
1133
1168
|
<div class="card-meta-header">
|
|
@@ -1167,7 +1202,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1167
1202
|
}
|
|
1168
1203
|
|
|
1169
1204
|
<div class="card-actions">
|
|
1170
|
-
<button
|
|
1205
|
+
<button
|
|
1206
|
+
class="card-delete-action"
|
|
1207
|
+
type="button"
|
|
1208
|
+
(click)="deleteCard($event, card.id)"
|
|
1209
|
+
title="Delete card"
|
|
1210
|
+
>
|
|
1171
1211
|
x
|
|
1172
1212
|
</button>
|
|
1173
1213
|
@if (card.assignee) {
|
|
@@ -1190,7 +1230,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1190
1230
|
</section>
|
|
1191
1231
|
}
|
|
1192
1232
|
</div>
|
|
1193
|
-
`, styles: [":host{display:block;width:100%;height:100%}.ngx-kanban-board{display:flex;flex-direction:column;gap:16px;overflow:auto;height:100%;padding:4px}.kanban-swimlane{display:flex;flex-direction:column;gap:10px;min-width:min-content}.swimlane-header{position:sticky;left:0;z-index:2;display:flex;justify-content:space-between;align-items:center;padding:4px 2px;color:var(--text-primary, #212529)}.swimlane-header h3{margin:0;font-size:13px;font-weight:800}.swimlane-header p{margin:3px 0 0;font-size:11px;color:var(--text-secondary, #6c757d)}.kanban-columns{display:flex;align-items:flex-start;gap:20px;min-width:min-content}.kanban-column{flex:0 0 290px;width:290px;max-height:100%;display:flex;flex-direction:column;background:var(--bg-secondary, #ffffff);border:1px solid var(--border-color, #dee2e6);border-radius:12px;box-shadow:var(--shadow-sm, 0 1px 3px rgba(0,0,0
|
|
1233
|
+
`, styles: [":host{display:block;width:100%;height:100%}.ngx-kanban-board{display:flex;flex-direction:column;gap:16px;overflow:auto;height:100%;padding:4px}.kanban-swimlane{display:flex;flex-direction:column;gap:10px;min-width:min-content}.swimlane-header{position:sticky;left:0;z-index:2;display:flex;justify-content:space-between;align-items:center;padding:4px 2px;color:var(--text-primary, #212529)}.swimlane-header h3{margin:0;font-size:13px;font-weight:800}.swimlane-header p{margin:3px 0 0;font-size:11px;color:var(--text-secondary, #6c757d)}.kanban-columns{display:flex;align-items:flex-start;gap:20px;min-width:min-content}.kanban-column{flex:0 0 290px;width:290px;max-height:100%;display:flex;flex-direction:column;background:var(--bg-secondary, #ffffff);border:1px solid var(--border-color, #dee2e6);border-radius:12px;box-shadow:var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, .05));transition:all .2s cubic-bezier(.4,0,.2,1);overflow:hidden}.kanban-column.drag-over{border-color:var(--primary-color, #6366f1);box-shadow:0 0 0 3px var(--primary-glow, rgba(99, 102, 241, .15));background:var(--border-light, #fafafa)}.kanban-column.wip-reached:not(.drag-over){border-color:var(--ngx-kanban-limit, #f59e0b)}.column-header{padding:14px 16px 10px;border-top:3px solid var(--primary-color, #6366f1);display:flex;justify-content:space-between;align-items:center;background:var(--border-light, #fafafa);border-bottom:1px solid var(--border-color, #dee2e6)}.column-title-section{display:flex;align-items:center;gap:8px;min-width:0}.column-indicator{width:8px;height:8px;border-radius:50%;flex-shrink:0}.column-title{margin:0;font-size:14px;font-weight:700;color:var(--text-primary, #212529);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card-count-badge{font-size:11px;font-weight:700;color:var(--text-secondary, #6c757d);background:var(--border-color, #e9ecef);padding:2px 7px;border-radius:99px}.card-count-badge.limit-reached{color:#92400e;background:#fef3c7}.add-card-btn{background:none;border:none;cursor:pointer;color:var(--text-secondary, #6c757d);font-size:16px;width:24px;height:24px;border-radius:4px;transition:all .15s;display:flex;align-items:center;justify-content:center}.add-card-btn:hover,.add-card-btn:focus-visible{background:var(--border-color, #e9ecef);color:var(--text-primary, #212529);outline:none}.column-cards-list{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:12px;min-height:100px}.column-empty-state{padding:24px 16px;text-align:center;font-size:12px;color:var(--text-secondary, #888);font-style:italic;border:1px dashed var(--border-color, #e2e8f0);border-radius:8px}.kanban-card{background:var(--bg-secondary, #ffffff);border:1px solid var(--border-color, #dee2e6);border-radius:10px;padding:12px;cursor:grab;box-shadow:0 1px 2px #0000000a;transition:all .2s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column;gap:10px;-webkit-user-select:none;user-select:none}.kanban-card:hover{border-color:var(--primary-color, #6366f1);box-shadow:var(--shadow-md, 0 4px 6px rgba(0, 0, 0, .08));transform:translateY(-1px)}.kanban-card:hover .card-delete-action{opacity:1}.kanban-card.dragging{opacity:.35;border-style:dashed;border-color:var(--primary-color, #6366f1);background:var(--border-light, #f8f9fa)}.card-topline{display:flex;align-items:flex-start;gap:8px}.drag-handle{flex:0 0 auto;width:22px;height:22px;border:1px solid var(--border-color, #dee2e6);border-radius:5px;background:var(--border-light, #f8f9fa);color:var(--text-secondary, #6c757d);cursor:grab;font-size:10px;line-height:1}.card-meta-header{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}.priority-badge{font-size:9px;font-weight:700;text-transform:uppercase;padding:2px 6px;border-radius:4px;letter-spacing:.5px}.priority-badge.priority-low{background:#e6f4e9;color:#1e7e34}.priority-badge.priority-medium{background:#fff3cd;color:#856404}.priority-badge.priority-high{background:#fce8e6;color:#c53929}.card-tag-pills{display:flex;gap:4px;flex-wrap:wrap}.card-tag{font-size:9px;font-weight:600;color:var(--text-secondary, #6c757d);background:var(--border-light, #f1f3f5);border:1px solid var(--border-color, #e9ecef);padding:1px 6px;border-radius:4px}.card-content{display:flex;flex-direction:column;gap:4px}.card-title{margin:0;font-size:13px;font-weight:650;color:var(--text-primary, #212529);line-height:1.4}.card-desc{margin:0;font-size:12px;color:var(--text-secondary, #6c757d);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.card-footer{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--border-light, #f1f3f5);padding-top:8px;font-size:11px}.spacer{flex:1}.card-due-date{color:var(--text-secondary, #6c757d);font-weight:500}.card-due-date.overdue{color:#dc3545;font-weight:650}.card-actions{display:flex;align-items:center;gap:8px}.card-delete-action{background:none;border:none;cursor:pointer;color:#adb5bd;width:22px;height:22px;border-radius:4px;opacity:0;transition:all .15s;font-size:13px;display:flex;align-items:center;justify-content:center}.card-delete-action:hover,.card-delete-action:focus-visible{opacity:1;color:#dc3545;background:#fce8e6;outline:none}.assignee-avatar{width:24px;height:24px;border-radius:50%;background:var(--primary-color, #6366f1);color:#fff;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;overflow:hidden;border:1px solid var(--bg-secondary, #fff)}.assignee-avatar img{width:100%;height:100%;object-fit:cover}.card-creator-box{background:var(--bg-secondary, #ffffff);border:1px solid var(--primary-color, #6366f1);border-radius:8px;padding:10px;box-shadow:0 2px 8px #6366f126;display:flex;flex-direction:column;gap:8px}.creator-input{width:100%;border:1px solid var(--border-color, #dee2e6);border-radius:6px;padding:6px 10px;font-size:12px;background:var(--bg-secondary, #fff);color:var(--text-primary, #212529);outline:none}.creator-input:focus{border-color:var(--primary-color, #6366f1)}.creator-actions{display:flex;justify-content:flex-end;gap:6px}.creator-btn{border:none;border-radius:4px;padding:4px 10px;font-size:11px;font-weight:650;cursor:pointer;font-family:inherit}.creator-btn.btn-add{background:var(--primary-color, #6366f1);color:#fff}.creator-btn.btn-add:hover{background:var(--primary-hover, #4f46e5)}.creator-btn.btn-cancel{background:var(--border-light, #f8f9fa);color:var(--text-secondary, #495057);border:1px solid var(--border-color, #dee2e6)}.creator-btn.btn-cancel:hover{background:var(--border-color, #e9ecef)}\n"] }]
|
|
1194
1234
|
}], ctorParameters: () => [], propDecorators: { titleInputs: [{
|
|
1195
1235
|
type: ViewChildren,
|
|
1196
1236
|
args: ['titleInput']
|