UNPKG

ng-hub-ui-board

Version:

An Angular-based Kanban board component with Trello-like drag-and-drop, customizable columns, and straightforward event handling.

1 lines 26.1 kB
{"version":3,"file":"ng-hub-ui-board.mjs","sources":["../../../projects/board/src/lib/directives/board-column-footer.directive.ts","../../../projects/board/src/lib/directives/board-column-header.directive.ts","../../../projects/board/src/lib/directives/card-template.directive.ts","../../../projects/board/src/lib/components/board/board.component.ts","../../../projects/board/src/lib/components/board/board.component.html","../../../projects/board/src/lib/board.module.ts","../../../projects/board/src/lib/pipes/invert-color.pipe.ts","../../../projects/board/src/public-api.ts","../../../projects/board/src/ng-hub-ui-board.ts"],"sourcesContent":["import { Directive, TemplateRef } from '@angular/core';\n\n/**\n * Directive that allows customization of column footer templates within board columns.\n * \n * This directive enables developers to define custom templates for column footers,\n * perfect for displaying summary information, quick actions, statistics,\n * or any column-specific controls at the bottom of each column.\n * \n * @publicApi\n * \n * @example\n * ```html\n * <ng-template columnFooterTpt let-column=\"column\">\n * <div class=\"custom-footer\">\n * <div class=\"column-summary\">\n * <span>Total: {{ column.cards.length }}</span>\n * <span>Priority Items: {{ getPriorityItems(column) }}</span>\n * </div>\n * <button (click)=\"quickAddCard(column)\">Quick Add</button>\n * </div>\n * </ng-template>\n * ```\n */\n@Directive({\n\tselector: '[columnFooterTpt]',\n\tstandalone: true\n})\nexport class BoardColumnFooterDirective {\n\t/**\n\t * Creates a new BoardColumnFooterDirective instance.\n\t * \n\t * @param templateRef - The template reference that contains the custom column footer layout\n\t */\n\tconstructor(public templateRef: TemplateRef<unknown>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n/**\n * Directive that allows customization of column header templates within board columns.\n * \n * This directive provides the ability to define custom templates for rendering column headers,\n * giving developers full control over the appearance and functionality of column headers\n * including titles, descriptions, actions, and metadata display.\n * \n * @publicApi\n * \n * @example\n * ```html\n * <ng-template columnHeaderTpt let-column=\"column\">\n * <div class=\"custom-header\">\n * <h2>{{ column.title }}</h2>\n * <span class=\"card-count\">{{ column.cards.length }} items</span>\n * <button (click)=\"addCard(column)\">Add Card</button>\n * </div>\n * </ng-template>\n * ```\n */\n@Directive({\n\tselector: '[columnHeaderTpt]',\n\tstandalone: true\n})\nexport class BoardColumnHeaderDirective {\n\t/**\n\t * Creates a new BoardColumnHeaderDirective instance.\n\t * \n\t * @param templateRef - The template reference that contains the custom column header layout\n\t */\n\tconstructor(public templateRef: TemplateRef<unknown>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n/**\n * Directive that allows customization of card templates within board columns.\n * \n * This directive is used to define custom templates for rendering board cards.\n * It provides access to the template reference that can be used by the board component\n * to render cards with custom layouts and styling.\n * \n * @publicApi\n * \n * @example\n * ```html\n * <ng-template cardTpt let-card=\"item\" let-column=\"column\">\n * <div class=\"custom-card\">\n * <h3>{{ card.title }}</h3>\n * <p>{{ card.description }}</p>\n * </div>\n * </ng-template>\n * ```\n */\n@Directive({\n\tselector: '[cardTpt]',\n\tstandalone: true\n})\nexport class CardTemplateDirective {\n\t/**\n\t * Creates a new CardTemplateDirective instance.\n\t * \n\t * @param templateRef - The template reference that contains the custom card layout\n\t */\n\tconstructor(public templateRef: TemplateRef<unknown>) {}\n}\n","import {\n\tCdkDragDrop,\n\tDragDropModule,\n\tmoveItemInArray,\n\ttransferArrayItem\n} from '@angular/cdk/drag-drop';\nimport { NgClass, NgStyle, NgTemplateOutlet } from '@angular/common';\nimport {\n\tComponent,\n\tSignal,\n\tTemplateRef,\n\tcomputed,\n\tcontentChild,\n\tinput,\n\toutput\n} from '@angular/core';\nimport { BoardColumnFooterDirective } from '../../directives/board-column-footer.directive';\nimport { BoardColumnHeaderDirective } from '../../directives/board-column-header.directive';\nimport { CardTemplateDirective } from '../../directives/card-template.directive';\nimport { Board } from '../../models/board';\nimport { BoardCard } from '../../models/board-card';\nimport { BoardColumn } from '../../models/board-column';\nimport { ReachedEndEvent } from '../../models/reached-end-event';\n\n/**\n * Standalone Kanban-style board component that provides column-based drag-and-drop,\n * custom templates and infinite-scroll detection.\n *\n * @publicApi\n */\n@Component({\n\tselector: 'hub-board, hub-ui-board',\n\ttemplateUrl: './board.component.html',\n\tstyleUrls: ['./board.component.scss'],\n\tstandalone: true,\n\timports: [NgClass, NgStyle, NgTemplateOutlet, DragDropModule]\n})\nexport class HubBoardComponent {\n\t/**\n\t * Reactive input containing the full board definition (columns and cards).\n\t */\n\treadonly board = input<Board>();\n\n\t/**\n\t * Pixel threshold used when determining whether a column has reached scroll end.\n\t * Allows for fractional scroll values across different browsers.\n\t */\n\tprivate readonly scrollDetectionPadding = 1;\n\n\t/**\n\t * Derived list of board columns exposed as a signal to the template.\n\t */\n\tcolumns: Signal<Array<BoardColumn>> = computed(() => {\n\t\treturn this.board()?.columns ?? [];\n\t});\n\n\t/**\n\t * When true, column reordering via drag-and-drop is disabled.\n\t */\n\treadonly columnSortingDisabled = input<boolean>(false);\n\n\t/**\n\t * Custom card template supplied via the `cardTpt` structural directive.\n\t */\n\treadonly cardTpt = contentChild(CardTemplateDirective, {\n\t\tread: TemplateRef<unknown>\n\t});\n\n\t/**\n\t * Custom column header template supplied via the `columnHeaderTpt` structural directive.\n\t */\n\treadonly columnHeaderTpt = contentChild(BoardColumnHeaderDirective, {\n\t\tread: TemplateRef<unknown>\n\t});\n\n\t/**\n\t * Custom column footer template supplied via the `columnFooterTpt` structural directive.\n\t */\n\treadonly columnFooterTpt = contentChild(BoardColumnFooterDirective, {\n\t\tread: TemplateRef<unknown>\n\t});\n\n\t/**\n\t * Emits each time a card is clicked within the board.\n\t */\n\treadonly onCardClick = output<BoardCard>();\n\n\t/**\n\t * Emits when a card has been repositioned, either within the same column or into another column.\n\t */\n\treadonly onCardMoved = output<CdkDragDrop<BoardColumn, BoardColumn, BoardCard<any>>>();\n\n\t/**\n\t * Emits when columns are reordered through drag-and-drop.\n\t */\n\treadonly onColumnMoved = output<CdkDragDrop<BoardColumn[]>>();\n\n\t/**\n\t * Emits when a column body is scrolled to its end, enabling infinite-scroll behaviour.\n\t */\n\treadonly reachedEnd = output<ReachedEndEvent>();\n\n\t/**\n\t * Default predicate that allows any card to be dropped into any column.\n\t *\n\t * @returns Always `true`, indicating that drop operations are permitted.\n\t */\n\tdefaultEnterPredicateFn = () => true;\n\n\t/**\n\t * Emits the clicked card through {@link onCardClick}.\n\t *\n\t * @param item - The card that triggered the click event.\n\t */\n\tcardClick(item: BoardCard) {\n\t\tthis.onCardClick.emit(item);\n\t}\n\n\t/**\n\t * Updates column order when a drag-and-drop operation completes and emits the resulting event.\n\t *\n\t * @param event - Drag-and-drop metadata describing the column movement.\n\t */\n\tdropColumn(event: CdkDragDrop<BoardColumn[]>) {\n\t\tmoveItemInArray(\n\t\t\tevent.container.data,\n\t\t\tevent.previousIndex,\n\t\t\tevent.currentIndex\n\t\t);\n\t\tthis.onColumnMoved.emit(event);\n\t}\n\n\t/**\n\t * Applies card reordering or transfer logic depending on the drag-drop target,\n\t * then emits the corresponding drag event metadata.\n\t *\n\t * @param event - Drag-and-drop metadata describing the card movement.\n\t */\n\tdropCard(event: CdkDragDrop<BoardColumn, BoardColumn, BoardCard<any>>) {\n\t\tif (event.previousContainer === event.container) {\n\t\t\t// Reorder the card within the same column\n\t\t\tmoveItemInArray(\n\t\t\t\tevent.container.data.cards,\n\t\t\t\tevent.previousIndex,\n\t\t\t\tevent.currentIndex\n\t\t\t);\n\t\t} else {\n\t\t\t// Transfer the card from one column to another\n\t\t\ttransferArrayItem(\n\t\t\t\tevent.previousContainer.data.cards,\n\t\t\t\tevent.container.data.cards,\n\t\t\t\tevent.previousIndex,\n\t\t\t\tevent.currentIndex\n\t\t\t);\n\t\t}\n\t\tthis.onCardMoved.emit(event);\n\t}\n\n\t/**\n\t * Emits {@link reachedEnd} once a column body is scrolled to its bottom.\n\t *\n\t * @param index - Index of the scrolled column within the board.\n\t * @param event - Browser scroll event originating from the column body element.\n\t */\n\tonScroll(index: number, event: Event) {\n\t\tconst el = event.target as HTMLElement | null;\n\t\tif (!el) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst scrolledToBottom =\n\t\t\tel.scrollTop + el.clientHeight >= el.scrollHeight - this.scrollDetectionPadding;\n\n\t\tif (!scrolledToBottom) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst column = this.board()?.columns?.[index];\n\t\tif (!column) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.reachedEnd.emit({\n\t\t\tindex,\n\t\t\tdata: column\n\t\t});\n\t}\n}\n","@if (columns().length) {\n\t<div\n\t\tclass=\"hub-board\"\n\t\tcdkDropList\n\t\tcdkDropListOrientation=\"horizontal\"\n\t\t[cdkDropListData]=\"columns()\"\n\t\t(cdkDropListDropped)=\"dropColumn($event)\"\n\t\t[cdkDropListSortingDisabled]=\"columnSortingDisabled()\"\n\t>\n\t\t<div cdkDropListGroup class=\"hub-board__columns\">\n\t\t\t@for (column of columns(); let index = $index; track column) {\n\t\t\t\t<div\n\t\t\t\t\tclass=\"hub-board__column-container\"\n\t\t\t\t\tcdkDrag\n\t\t\t\t\t[cdkDragData]=\"column\"\n\t\t\t\t\t[cdkDragDisabled]=\"column.disabled\"\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"hub-board__column\"\n\t\t\t\t\t\t[ngClass]=\"column.classlist\"\n\t\t\t\t\t\t[ngStyle]=\"column.style\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div class=\"hub-board__column-header\">\n\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t[ngTemplateOutlet]=\"\n\t\t\t\t\t\t\t\t\tcolumnHeaderTpt() || defaultColumnHeaderTpt\n\t\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ column: column }\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"hub-board__column-body\"\n\t\t\t\t\t\t\tcdkDropList\n\t\t\t\t\t\t\t[cdkDropListData]=\"column\"\n\t\t\t\t\t\t\t(cdkDropListDropped)=\"dropCard($event)\"\n\t\t\t\t\t\t\t(scroll)=\"onScroll(index, $event)\"\n\t\t\t\t\t\t\t[cdkDropListEnterPredicate]=\"\n\t\t\t\t\t\t\t\tcolumn.predicate ?? defaultEnterPredicateFn\n\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\t[cdkDropListSortingDisabled]=\"\n\t\t\t\t\t\t\t\tcolumn.cardSortingDisabled\n\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t@for (\n\t\t\t\t\t\t\t\tcard of column.cards;\n\t\t\t\t\t\t\t\tlet index = $index;\n\t\t\t\t\t\t\t\ttrack card\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclass=\"hub-board__card\"\n\t\t\t\t\t\t\t\t\t[class.hub-board__card--disabled]=\"\n\t\t\t\t\t\t\t\t\t\tcard.disabled\n\t\t\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\t\t\tcdkDrag\n\t\t\t\t\t\t\t\t\t[cdkDragData]=\"card\"\n\t\t\t\t\t\t\t\t\t[cdkDragDisabled]=\"card.disabled\"\n\t\t\t\t\t\t\t\t\t(click)=\"cardClick(card)\"\n\t\t\t\t\t\t\t\t\t(mousedown)=\"\n\t\t\t\t\t\t\t\t\t\tcard.disabled &&\n\t\t\t\t\t\t\t\t\t\t\t$event.stopPropagation()\n\t\t\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\t\t\t[ngClass]=\"card.classlist\"\n\t\t\t\t\t\t\t\t\t[ngStyle]=\"card.style\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div class=\"hub-board__card-body\">\n\t\t\t\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t\t\t\t[ngTemplateOutlet]=\"\n\t\t\t\t\t\t\t\t\t\t\t\tcardTpt() || defaultCardTpt\n\t\t\t\t\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\t\t\t\t\t[ngTemplateOutletContext]=\"{\n\t\t\t\t\t\t\t\t\t\t\t\titem: card,\n\t\t\t\t\t\t\t\t\t\t\t\tcolumn\n\t\t\t\t\t\t\t\t\t\t\t}\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t@if (columnFooterTpt()) {\n\t\t\t\t\t\t\t<div class=\"hub-board__column-footer\">\n\t\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t\t[ngTemplateOutlet]=\"\n\t\t\t\t\t\t\t\t\t\tcolumnFooterTpt() ?? null\n\t\t\t\t\t\t\t\t\t\"\n\t\t\t\t\t\t\t\t\t[ngTemplateOutletContext]=\"{\n\t\t\t\t\t\t\t\t\t\tcolumn: column\n\t\t\t\t\t\t\t\t\t}\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</div>\n\t</div>\n}\n\n<ng-template #defaultCardTpt let-item=\"item\">\n\t<h6>{{ item.title }}</h6>\n\t<p class=\"card-text\">{{ item.description }}</p>\n</ng-template>\n\n<ng-template #defaultColumnHeaderTpt let-column=\"column\">\n\t<div class=\"d-flex flex-column\">\n\t\t<h5 class=\"hub-board__column-header-title\">\n\t\t\t{{ column.title }}\n\t\t</h5>\n\t\t<h6 class=\"hub-board__column-header-subtitle\">\n\t\t\t{{ column.description }}\n\t\t</h6>\n\t</div>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { HubBoardComponent } from './components/board/board.component';\nimport { BoardColumnFooterDirective } from './directives/board-column-footer.directive';\nimport { BoardColumnHeaderDirective } from './directives/board-column-header.directive';\nimport { CardTemplateDirective } from './directives/card-template.directive';\n\n/**\n * Angular module that provides board functionality with drag-and-drop support.\n * \n * This module includes all the necessary components and directives for creating\n * Kanban-style boards with customizable columns, cards, and templates.\n * \n * @deprecated Use standalone components instead. Import individual components and directives directly.\n * @publicApi\n * \n * @example\n * ```typescript\n * // Legacy module approach (not recommended)\n * import { BoardModule } from 'ng-hub-ui-board';\n * \n * @NgModule({\n * imports: [BoardModule]\n * })\n * export class AppModule {}\n * \n * // Recommended standalone approach\n * import { HubBoardComponent, CardTemplateDirective } from 'ng-hub-ui-board';\n * \n * @Component({\n * standalone: true,\n * imports: [HubBoardComponent, CardTemplateDirective]\n * })\n * export class MyComponent {}\n * ```\n */\n@NgModule({\n\tdeclarations: [],\n\timports: [\n\t\tHubBoardComponent,\n\t\tCardTemplateDirective,\n\t\tBoardColumnHeaderDirective,\n\t\tBoardColumnFooterDirective\n\t],\n\texports: [\n\t\tHubBoardComponent,\n\t\tCardTemplateDirective,\n\t\tBoardColumnHeaderDirective,\n\t\tBoardColumnFooterDirective\n\t]\n})\nexport class BoardModule {}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Converts a hexadecimal color string into its inverted counterpart, offering both\n * high-contrast black/white and full-spectrum inversion modes.\n *\n * @publicApi\n */\n@Pipe({\n\tname: 'invertColor',\n\tstandalone: true\n})\nexport class InvertColorPipe implements PipeTransform {\n\t/**\n\t * Inverts a HEX color value.\n\t *\n\t * @param hex - Color expressed as a 3- or 6-digit HEX string with or without a hash prefix.\n\t * @param bw - When `true`, returns either black or white based on perceived brightness to maximise contrast.\n\t * @returns The inverted color represented as a 6-digit HEX string (always prefixed with `#`).\n\t * @throws Error if the provided value cannot be parsed as a valid HEX color.\n\t */\n\ttransform(hex: string, bw: boolean): string {\n\t\tif (!hex) {\n\t\t\treturn '#000000';\n\t\t}\n\n\t\tlet normalizedHex = hex;\n\t\tif (normalizedHex.indexOf('#') === 0) {\n\t\t\tnormalizedHex = normalizedHex.slice(1);\n\t\t}\n\n\t\tif (normalizedHex.length === 3) {\n\t\t\t// Convert shorthand notation (e.g., #abc) to full length (#aabbcc)\n\t\t\tnormalizedHex =\n\t\t\t\tnormalizedHex[0] +\n\t\t\t\tnormalizedHex[0] +\n\t\t\t\tnormalizedHex[1] +\n\t\t\t\tnormalizedHex[1] +\n\t\t\t\tnormalizedHex[2] +\n\t\t\t\tnormalizedHex[2];\n\t\t}\n\n\t\tif (normalizedHex.length !== 6) {\n\t\t\tthrow new Error('Invalid HEX color.');\n\t\t}\n\n\t\tconst r = parseInt(normalizedHex.slice(0, 2), 16);\n\t\tconst g = parseInt(normalizedHex.slice(2, 4), 16);\n\t\tconst b = parseInt(normalizedHex.slice(4, 6), 16);\n\n\t\tif (bw) {\n\t\t\t// http://stackoverflow.com/a/3943023/112731\n\t\t\treturn r * 0.299 + g * 0.587 + b * 0.114 > 186 ? '#000000' : '#FFFFFF';\n\t\t}\n\n\t\tconst invertedR = (255 - r).toString(16).padStart(2, '0');\n\t\tconst invertedG = (255 - g).toString(16).padStart(2, '0');\n\t\tconst invertedB = (255 - b).toString(16).padStart(2, '0');\n\n\t\treturn `#${invertedR}${invertedG}${invertedB}`;\n\t}\n}\n","/*\n * Public API Surface of board\n */\n\n// module\nexport * from './lib/board.module';\n\n// directives\nexport * from './lib/directives/board-column-footer.directive';\nexport * from './lib/directives/board-column-header.directive';\nexport * from './lib/directives/card-template.directive';\n\n// components\nexport * from './lib/components/board/board.component';\n\n// pipes\nexport * from './lib/pipes/invert-color.pipe';\n\n// models\nexport * from './lib/models/board';\nexport * from './lib/models/board-card';\nexport * from './lib/models/board-column';\nexport * from './lib/models/reached-end-event';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAEA;;;;;;;;;;;;;;;;;;;;;AAqBG;MAKU,0BAA0B,CAAA;AAMnB,IAAA,WAAA;AALnB;;;;AAIG;AACH,IAAA,WAAA,CAAmB,WAAiC,EAAA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