Skip to content

Commit cf2ba83

Browse files
committed
ugly fix for ct-kanban: use any instead of unknown. really this should get a proper schema
1 parent 1eea678 commit cf2ba83

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

packages/ui/src/v2/components/ct-kanban/ct-kanban.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export interface KanbanItemAction {
5353
* Drag and drop state tracking
5454
*/
5555
interface DragState {
56-
draggedItem: Cell<unknown> | null;
56+
draggedItem: Cell<any> | null;
5757
draggedFromColumn: string | null;
5858
dragOverColumn: string | null;
5959
isDragging: boolean;
@@ -89,7 +89,7 @@ interface DragState {
8989
*/
9090
export class CTKanban extends BaseElement {
9191
@property()
92-
value: Cell<unknown[]> | null = null;
92+
value: Cell<any[]> | null = null;
9393

9494
@property()
9595
override title: string = "";
@@ -113,7 +113,7 @@ export class CTKanban extends BaseElement {
113113
itemAction: KanbanItemAction | null = { type: "remove" };
114114

115115
// The main cell containing the array of charms
116-
private charmsCell: Cell<unknown[]> | null = null;
116+
private charmsCell: Cell<any[]> | null = null;
117117
private cellSubscription: (() => void) | null = null;
118118

119119
// Drag and drop state
@@ -451,7 +451,7 @@ export class CTKanban extends BaseElement {
451451
}
452452
}
453453

454-
private getCharmCells(): Cell<unknown>[] {
454+
private getCharmCells(): Cell<any>[] {
455455
if (!this.charmsCell) {
456456
console.log("[ct-kanban] No charmsCell");
457457
return [];
@@ -475,7 +475,7 @@ export class CTKanban extends BaseElement {
475475
return charmCells;
476476
}
477477

478-
private setValue(newValue: unknown[]): void {
478+
private setValue(newValue: any[]): void {
479479
if (this.charmsCell) {
480480
this.charmsCell.set(newValue);
481481
}
@@ -485,7 +485,7 @@ export class CTKanban extends BaseElement {
485485
* Get items for a specific column by status
486486
* Special case: status === 'no-status' returns items with no status
487487
*/
488-
getColumnItems(status: string): Cell<unknown>[] {
488+
getColumnItems(status: string): Cell<any>[] {
489489
console.log(`[ct-kanban] Getting items for status: ${status}`);
490490
const charmCells = this.getCharmCells();
491491
console.log(`[ct-kanban] Have ${charmCells.length} charm cells to filter`);
@@ -590,7 +590,7 @@ export class CTKanban extends BaseElement {
590590
/**
591591
* Move an item to a different column (status)
592592
*/
593-
moveItem(charmCell: Cell<unknown>, toStatus: string): void {
593+
moveItem(charmCell: Cell<any>, toStatus: string): void {
594594
const charm = charmCell.get();
595595
if (!charm) return;
596596

@@ -629,11 +629,11 @@ export class CTKanban extends BaseElement {
629629
/**
630630
* Update an item's status
631631
*/
632-
updateItemStatus(charmCell: Cell<unknown>, newStatus: string): void {
632+
updateItemStatus(charmCell: Cell<any>, newStatus: string): void {
633633
this.moveItem(charmCell, newStatus);
634634
}
635635

636-
private removeItem(charmCellToRemove: Cell<unknown>): void {
636+
private removeItem(charmCellToRemove: Cell<any>): void {
637637
if (!this.charmsCell) return;
638638

639639
const charms = this.charmsCell.get();
@@ -642,7 +642,7 @@ export class CTKanban extends BaseElement {
642642
this.charmsCell.set(newCharms);
643643
}
644644

645-
private handleItemAction(charmCell: Cell<unknown>, event: MouseEvent) {
645+
private handleItemAction(charmCell: Cell<any>, event: MouseEvent) {
646646
event.stopPropagation();
647647

648648
if (!this.itemAction) return;
@@ -664,7 +664,7 @@ export class CTKanban extends BaseElement {
664664
}
665665

666666
// Drag and Drop Implementation
667-
private handleMouseDown(charmCell: Cell<unknown>, event: MouseEvent) {
667+
private handleMouseDown(charmCell: Cell<any>, event: MouseEvent) {
668668
if (this.readonly || event.button !== 0) return;
669669

670670
event.preventDefault();
@@ -758,7 +758,7 @@ export class CTKanban extends BaseElement {
758758
this.dragState.dragOverColumn !== this.dragState.draggedFromColumn
759759
) {
760760
this.moveItem(
761-
this.dragState.draggedItem as Cell<unknown>,
761+
this.dragState.draggedItem as Cell<any>,
762762
this.dragState.dragOverColumn,
763763
);
764764
}
@@ -851,7 +851,7 @@ export class CTKanban extends BaseElement {
851851
`;
852852
}
853853

854-
private renderColumn(column: KanbanColumn, allItems: Cell<unknown>[]) {
854+
private renderColumn(column: KanbanColumn, allItems: Cell<any>[]) {
855855
const columnItems = this.getColumnItems(column.status);
856856
const isDragOver = this.dragState.dragOverColumn === column.status;
857857
const isMaxReached = column.maxItems &&
@@ -905,7 +905,7 @@ export class CTKanban extends BaseElement {
905905
`;
906906
}
907907

908-
private renderItem(charmCell: Cell<unknown>) {
908+
private renderItem(charmCell: Cell<any>) {
909909
const isDragging = this.dragState.draggedItem === charmCell;
910910

911911
return html`
@@ -939,7 +939,7 @@ export class CTKanban extends BaseElement {
939939
`;
940940
}
941941

942-
private renderItemMetadata(charmCell: Cell<unknown>) {
942+
private renderItemMetadata(charmCell: Cell<any>) {
943943
const charm = charmCell.get();
944944
const hasStatusBadge = charm.statusBadge || charm.status;
945945
const hasSubtasks = charm.subtaskCount ||
@@ -956,7 +956,7 @@ export class CTKanban extends BaseElement {
956956
`;
957957
}
958958

959-
private renderStatusBadge(charmCell: Cell<unknown>) {
959+
private renderStatusBadge(charmCell: Cell<any>) {
960960
const charm = charmCell.get();
961961
const status = charm.status || "no-status";
962962
const badge = charm.statusBadge || {
@@ -976,7 +976,7 @@ export class CTKanban extends BaseElement {
976976
`;
977977
}
978978

979-
private renderSubtaskBadge(charmCell: Cell<unknown>) {
979+
private renderSubtaskBadge(charmCell: Cell<any>) {
980980
const charm = charmCell.get();
981981
const subtaskCount = charm.subtaskCount ||
982982
(charm.items ? charm.items.length : 0);

0 commit comments

Comments
 (0)