ng-hub-ui-board 19.3.6 → 19.3.7

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/.npmignore CHANGED
@@ -1,2 +1 @@
1
- # Nested package.json's are only needed for development.
2
- **/package.json
1
+ node_modules
package/CHANGELOG.md ADDED
@@ -0,0 +1,69 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [19.3.7] - 2026-01-16
9
+
10
+ ### Fixed
11
+
12
+ - Removed incorrect `!src/**/*` exclusion from `package.json` that was preventing CSS files from being included in the published package.
13
+
14
+ ## [19.3.6] - 2026-01-16
15
+
16
+ ### Fixed
17
+
18
+ - Added `styles` export configuration in package.json to properly expose SCSS files.
19
+
20
+ ## [19.3.5] - 2026-01-15
21
+
22
+ ### Changed
23
+
24
+ - Complete refactoring of board styling to use CSS variables for enhanced customization.
25
+ - Documented all available CSS variables in README.
26
+ - Added `StylingBoardExampleComponent` to showcase custom styling capabilities.
27
+
28
+ ## [19.3.4] - 2026-01-15
29
+
30
+ ### Changed
31
+
32
+ - Complete refactoring of board styling to use CSS variables for enhanced customization.
33
+ - Documented all available CSS variables in README.
34
+ - Added `StylingBoardExampleComponent` to showcase custom styling capabilities.
35
+
36
+ ## [19.3.3] - 2026-01-15
37
+
38
+ ### Changed
39
+
40
+ - Complete refactoring of board styling to use CSS variables for enhanced customization.
41
+ - Documented all available CSS variables in README.
42
+ - Added `StylingBoardExampleComponent` to showcase custom styling capabilities.
43
+
44
+ ## [19.3.2] - 2025-01-15
45
+
46
+ ### Changed
47
+
48
+ - Improved `reachedEnd` event documentation in README with correct usage examples showing `event.data` as the complete `BoardColumn` object
49
+ - Updated `reachedEnd` event example to include proper container with fixed height requirement for scroll detection
50
+ - Enhanced license section in README with detailed explanation of CC BY 4.0 permissions, requirements, and attribution example
51
+
52
+ ### Fixed
53
+
54
+ - Corrected misleading `reachedEnd` event documentation that incorrectly showed direct access to `event.data.title` instead of extracting the column first
55
+
56
+ ## [19.3.1] - 2024-10-05
57
+
58
+ ### Added
59
+
60
+ - Comprehensive JSDoc coverage across public models, directives, pipes, and the `HubBoardComponent` for improved API discoverability.
61
+ - New unit test ensuring the `reachedEnd` event is not emitted when column data is unavailable.
62
+
63
+ ### Changed
64
+
65
+ - Refined infinite-scroll detection tolerance to ensure `reachedEnd` fires reliably at the bottom of each column.
66
+ - Hardened the document example logic to avoid duplicate lazy-load requests while columns are already loading.
67
+ - Typed the `invertColor` pipe output and improved error handling for invalid HEX values.
68
+
69
+ [19.3.1]: https://github.com/carlos-morcillo/ng-hub-ui-board/compare/19.3.0...19.3.1
@@ -0,0 +1,23 @@
1
+ # Functionalities of Board Library
2
+
3
+ This table details the functionalities of the `ng-hub-ui-board` library and indicates which ones are covered by interactive examples.
4
+
5
+ ## Kanban Board (`hub-ui-board`)
6
+
7
+ | Category | Functionality | Example Covered |
8
+ | :--- | :--- | :---: |
9
+ | **Basic Usage** | Board Display (Columns & Cards) | ✅ |
10
+ | | Responsive Layout | ✅ |
11
+ | **Interactions** | Card Drag & Drop (Same Column) | ✅ |
12
+ | | Card Drag & Drop (Cross Column) | ✅ |
13
+ | | Column Reordering | ✅ |
14
+ | | Card Click Handling | ✅ |
15
+ | | Infinite Scroll (Column Reach End) | ✅ |
16
+ | **Templates** | Custom Card Template (`*cardTpt`) | ✅ |
17
+ | | Custom Column Header Template (`*columnHeaderTpt`) | ✅ |
18
+ | | Custom Column Footer Template (`*columnFooterTpt`) | ✅ |
19
+ | **Configuration** | Disable Column Sorting | ✅ |
20
+ | | Custom Scroll Detection Padding | ✅ |
21
+
22
+ ---
23
+ *Note: ✅ indicates an active interactive example is available in the documentation.*
package/karma.conf.js ADDED
@@ -0,0 +1,44 @@
1
+ // Karma configuration file, see link for more information
2
+ // https://karma-runner.github.io/1.0/config/configuration-file.html
3
+
4
+ module.exports = function (config) {
5
+ config.set({
6
+ basePath: '',
7
+ frameworks: ['jasmine', '@angular-devkit/build-angular'],
8
+ plugins: [
9
+ require('karma-jasmine'),
10
+ require('karma-chrome-launcher'),
11
+ require('karma-jasmine-html-reporter'),
12
+ require('karma-coverage'),
13
+ require('@angular-devkit/build-angular/plugins/karma')
14
+ ],
15
+ client: {
16
+ jasmine: {
17
+ // you can add configuration options for Jasmine here
18
+ // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19
+ // for example, you can disable the random execution with `random: false`
20
+ // or set a specific seed with `seed: 4321`
21
+ },
22
+ clearContext: false // leave Jasmine Spec Runner output visible in browser
23
+ },
24
+ jasmineHtmlReporter: {
25
+ suppressAll: true // removes the duplicated traces
26
+ },
27
+ coverageReporter: {
28
+ dir: require('path').join(__dirname, '../../coverage/board'),
29
+ subdir: '.',
30
+ reporters: [
31
+ { type: 'html' },
32
+ { type: 'text-summary' }
33
+ ]
34
+ },
35
+ reporters: ['progress', 'kjhtml'],
36
+ port: 9876,
37
+ colors: true,
38
+ logLevel: config.LOG_INFO,
39
+ autoWatch: true,
40
+ browsers: ['Chrome'],
41
+ singleRun: false,
42
+ restartOnFileChange: true
43
+ });
44
+ };
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "dest": "../../dist/board",
4
+ "lib": {
5
+ "entryFile": "src/public-api.ts",
6
+ "styleIncludePaths": ["src/lib/styles"]
7
+ },
8
+ "assets": ["src/lib/styles"]
9
+ }
package/package.json CHANGED
@@ -1,105 +1,114 @@
1
1
  {
2
- "name": "ng-hub-ui-board",
3
- "version": "19.3.6",
4
- "description": "An Angular-based Kanban board component with Trello-like drag-and-drop, customizable columns, and straightforward event handling.",
5
- "main": "bundles/ng-hub-ui-board.umd.js",
6
- "module": "fesm2022/ng-hub-ui-board.mjs",
7
- "typings": "index.d.ts",
8
- "exports": {
9
- "./package.json": {
10
- "default": "./package.json"
11
- },
12
- ".": {
13
- "types": "./index.d.ts",
14
- "default": "./fesm2022/ng-hub-ui-board.mjs"
15
- },
16
- "./styles/*": {
17
- "sass": "./src/lib/styles/*",
18
- "default": "./src/lib/styles/*"
19
- }
20
- },
21
- "peerDependencies": {
22
- "@angular/common": ">=18.0.0",
23
- "@angular/core": ">=18.0.0",
24
- "@angular/cdk": ">=18.0.0"
25
- },
26
- "dependencies": {
27
- "tslib": "^2.3.0"
28
- },
29
- "sideEffects": false,
30
- "files": [
31
- "**/*",
32
- "!**/*.spec.ts",
33
- "!**/*.spec.js",
34
- "!**/*.test.ts",
35
- "!**/*.test.js",
36
- "!src/**/*"
37
- ],
38
- "keywords": [
39
- "angular",
40
- "kanban",
41
- "board",
42
- "trello",
43
- "drag-drop",
44
- "dnd",
45
- "columns",
46
- "cards",
47
- "tasks",
48
- "todo",
49
- "productivity",
50
- "collaboration",
51
- "organization",
52
- "project-management",
53
- "workflow",
54
- "agile",
55
- "scrum",
56
- "component",
57
- "reusable",
58
- "open-source",
59
- "typescript",
60
- "standalone",
61
- "cdk",
62
- "ui-library",
63
- "ng-hub-ui"
64
- ],
65
- "author": {
66
- "name": "Carlos Morcillo Fernández",
67
- "email": "carlos.morcillo@me.com",
68
- "url": "https://www.carlosmorcillo.com"
69
- },
70
- "maintainers": [
71
- {
72
- "name": "Carlos Morcillo Fernández",
73
- "email": "carlos.morcillo@me.com",
74
- "url": "https://www.carlosmorcillo.com"
75
- }
76
- ],
77
- "homepage": "https://github.com/carlos-morcillo/ng-hub-ui-board#readme",
78
- "repository": {
79
- "type": "git",
80
- "url": "git+https://github.com/carlos-morcillo/ng-hub-ui-board.git"
81
- },
82
- "bugs": {
83
- "url": "https://github.com/carlos-morcillo/ng-hub-ui-board/issues",
84
- "email": "carlos.morcillo@me.com"
85
- },
86
- "funding": {
87
- "type": "buymeacoffee",
88
- "url": "https://buymeacoffee.com/carlosmorcillo"
89
- },
90
- "license": "CC-BY-4.0",
91
- "engines": {
92
- "node": ">=18.13.0",
93
- "npm": ">=9.0.0"
94
- },
95
- "publishConfig": {
96
- "access": "public",
97
- "registry": "https://registry.npmjs.org/"
98
- },
99
- "ng-add": {
100
- "save": "dependencies"
101
- },
102
- "contributors": [
103
- "Carlos Morcillo Fernández <carlos.morcillo@me.com>"
104
- ]
105
- }
2
+ "name": "ng-hub-ui-board",
3
+ "version": "19.3.7",
4
+ "description": "An Angular-based Kanban board component with Trello-like drag-and-drop, customizable columns, and straightforward event handling.",
5
+ "main": "bundles/ng-hub-ui-board.umd.js",
6
+ "module": "fesm2022/ng-hub-ui-board.mjs",
7
+ "typings": "index.d.ts",
8
+ "exports": {
9
+ "./package.json": {
10
+ "default": "./package.json"
11
+ },
12
+ ".": {
13
+ "types": "./index.d.ts",
14
+ "default": "./bundles/ng-hub-ui-board.umd.js"
15
+ },
16
+ "./styles/*": {
17
+ "sass": "./src/lib/styles/*",
18
+ "default": "./src/lib/styles/*"
19
+ }
20
+ },
21
+ "peerDependencies": {
22
+ "@angular/common": ">=18.0.0",
23
+ "@angular/core": ">=18.0.0",
24
+ "@angular/cdk": ">=18.0.0"
25
+ },
26
+ "dependencies": {
27
+ "tslib": "^2.3.0"
28
+ },
29
+ "sideEffects": false,
30
+ "scripts": {
31
+ "build": "ng build board",
32
+ "build:prod": "ng build board --configuration production",
33
+ "test": "ng test board",
34
+ "test:watch": "ng test board --watch",
35
+ "test:coverage": "ng test board --code-coverage",
36
+ "lint": "ng lint board",
37
+ "pack": "npm pack",
38
+ "publish:npm": "npm publish"
39
+ },
40
+ "files": [
41
+ "**/*",
42
+ "!**/*.spec.ts",
43
+ "!**/*.spec.js",
44
+ "!**/*.test.ts",
45
+ "!**/*.test.js"
46
+ ],
47
+ "keywords": [
48
+ "angular",
49
+ "kanban",
50
+ "board",
51
+ "trello",
52
+ "drag-drop",
53
+ "dnd",
54
+ "columns",
55
+ "cards",
56
+ "tasks",
57
+ "todo",
58
+ "productivity",
59
+ "collaboration",
60
+ "organization",
61
+ "project-management",
62
+ "workflow",
63
+ "agile",
64
+ "scrum",
65
+ "component",
66
+ "reusable",
67
+ "open-source",
68
+ "typescript",
69
+ "standalone",
70
+ "cdk",
71
+ "ui-library",
72
+ "ng-hub-ui"
73
+ ],
74
+ "author": {
75
+ "name": "Carlos Morcillo Fernández",
76
+ "email": "carlos.morcillo@me.com",
77
+ "url": "https://www.carlosmorcillo.com"
78
+ },
79
+ "maintainers": [
80
+ {
81
+ "name": "Carlos Morcillo Fernández",
82
+ "email": "carlos.morcillo@me.com",
83
+ "url": "https://www.carlosmorcillo.com"
84
+ }
85
+ ],
86
+ "homepage": "https://github.com/carlos-morcillo/ng-hub-ui-board#readme",
87
+ "repository": {
88
+ "type": "git",
89
+ "url": "git+https://github.com/carlos-morcillo/ng-hub-ui-board.git"
90
+ },
91
+ "bugs": {
92
+ "url": "https://github.com/carlos-morcillo/ng-hub-ui-board/issues",
93
+ "email": "carlos.morcillo@me.com"
94
+ },
95
+ "funding": {
96
+ "type": "buymeacoffee",
97
+ "url": "https://buymeacoffee.com/carlosmorcillo"
98
+ },
99
+ "license": "CC-BY-4.0",
100
+ "engines": {
101
+ "node": ">=18.13.0",
102
+ "npm": ">=9.0.0"
103
+ },
104
+ "publishConfig": {
105
+ "access": "public",
106
+ "registry": "https://registry.npmjs.org/"
107
+ },
108
+ "ng-add": {
109
+ "save": "dependencies"
110
+ },
111
+ "contributors": [
112
+ "Carlos Morcillo Fernández <carlos.morcillo@me.com>"
113
+ ]
114
+ }
@@ -0,0 +1,51 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { HubBoardComponent } from './components/board/board.component';
3
+ import { BoardColumnFooterDirective } from './directives/board-column-footer.directive';
4
+ import { BoardColumnHeaderDirective } from './directives/board-column-header.directive';
5
+ import { CardTemplateDirective } from './directives/card-template.directive';
6
+
7
+ /**
8
+ * Angular module that provides board functionality with drag-and-drop support.
9
+ *
10
+ * This module includes all the necessary components and directives for creating
11
+ * Kanban-style boards with customizable columns, cards, and templates.
12
+ *
13
+ * @deprecated Use standalone components instead. Import individual components and directives directly.
14
+ * @publicApi
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * // Legacy module approach (not recommended)
19
+ * import { BoardModule } from 'ng-hub-ui-board';
20
+ *
21
+ * @NgModule({
22
+ * imports: [BoardModule]
23
+ * })
24
+ * export class AppModule {}
25
+ *
26
+ * // Recommended standalone approach
27
+ * import { HubBoardComponent, CardTemplateDirective } from 'ng-hub-ui-board';
28
+ *
29
+ * @Component({
30
+ * standalone: true,
31
+ * imports: [HubBoardComponent, CardTemplateDirective]
32
+ * })
33
+ * export class MyComponent {}
34
+ * ```
35
+ */
36
+ @NgModule({
37
+ declarations: [],
38
+ imports: [
39
+ HubBoardComponent,
40
+ CardTemplateDirective,
41
+ BoardColumnHeaderDirective,
42
+ BoardColumnFooterDirective
43
+ ],
44
+ exports: [
45
+ HubBoardComponent,
46
+ CardTemplateDirective,
47
+ BoardColumnHeaderDirective,
48
+ BoardColumnFooterDirective
49
+ ]
50
+ })
51
+ export class BoardModule {}
@@ -0,0 +1,88 @@
1
+ @if (columns().length) {
2
+ <div
3
+ class="hub-board__drop-list"
4
+ cdkDropList
5
+ cdkDropListOrientation="horizontal"
6
+ [cdkDropListData]="columns()"
7
+ (cdkDropListDropped)="dropColumn($event)"
8
+ [cdkDropListSortingDisabled]="columnSortingDisabled()"
9
+ >
10
+ <div cdkDropListGroup class="hub-board__columns">
11
+ @for (column of columns(); let index = $index; track column) {
12
+ <div class="hub-board__column-container" cdkDrag [cdkDragData]="column" [cdkDragDisabled]="column.disabled">
13
+ <div class="hub-board__column" [ngClass]="column.classlist" [ngStyle]="column.style">
14
+ <div class="hub-board__column-header">
15
+ <ng-container
16
+ [ngTemplateOutlet]="columnHeaderTpt() || defaultColumnHeaderTpt"
17
+ [ngTemplateOutletContext]="{ column: column }"
18
+ >
19
+ </ng-container>
20
+ </div>
21
+ <div
22
+ class="hub-board__column-body"
23
+ cdkDropList
24
+ [cdkDropListData]="column"
25
+ (cdkDropListDropped)="dropCard($event)"
26
+ (scroll)="onScroll(index, $event)"
27
+ [cdkDropListEnterPredicate]="column.predicate ?? defaultEnterPredicateFn"
28
+ [cdkDropListSortingDisabled]="column.cardSortingDisabled"
29
+ >
30
+ @for ( card of column.cards; let index = $index; track card ) {
31
+ <div
32
+ class="hub-board__card"
33
+ [class.hub-board__card--disabled]="card.disabled"
34
+ cdkDrag
35
+ [cdkDragData]="card"
36
+ [cdkDragDisabled]="card.disabled"
37
+ (click)="cardClick(card)"
38
+ (mousedown)="card.disabled && $event.stopPropagation()"
39
+ [ngClass]="card.classlist"
40
+ [ngStyle]="card.style"
41
+ >
42
+ <div class="hub-board__card-body">
43
+ <ng-container
44
+ [ngTemplateOutlet]="cardTpt() || defaultCardTpt"
45
+ [ngTemplateOutletContext]="{
46
+ item: card,
47
+ column
48
+ }"
49
+ >
50
+ </ng-container>
51
+ </div>
52
+ </div>
53
+ }
54
+ </div>
55
+
56
+ @if (columnFooterTpt()) {
57
+ <div class="hub-board__column-footer">
58
+ <ng-container
59
+ [ngTemplateOutlet]="columnFooterTpt() ?? null"
60
+ [ngTemplateOutletContext]="{
61
+ column: column
62
+ }"
63
+ >
64
+ </ng-container>
65
+ </div>
66
+ }
67
+ </div>
68
+ </div>
69
+ }
70
+ </div>
71
+ </div>
72
+ }
73
+
74
+ <ng-template #defaultCardTpt let-item="item">
75
+ <h6 class="hub-board__card-title">{{ item.title }}</h6>
76
+ <p class="hub-board__card-subtitle">{{ item.description }}</p>
77
+ </ng-template>
78
+
79
+ <ng-template #defaultColumnHeaderTpt let-column="column">
80
+ <div class="d-flex flex-column">
81
+ <h5 class="hub-board__column-header-title">
82
+ {{ column.title }}
83
+ </h5>
84
+ <h6 class="hub-board__column-header-subtitle">
85
+ {{ column.description }}
86
+ </h6>
87
+ </div>
88
+ </ng-template>