Comparing version 0.4.0 to 0.4.1
@@ -0,1 +1,2 @@ | ||
import { CdkDrag } from '@angular/cdk/drag-drop'; | ||
import { BoardCard } from './board-card'; | ||
@@ -14,3 +15,3 @@ export interface BoardColumn<T = any> { | ||
data?: any; | ||
predicate?: () => boolean; | ||
predicate?: (item?: CdkDrag<T>) => boolean; | ||
} |
{ | ||
"name": "ngx-board", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"peerDependencies": { | ||
@@ -5,0 +5,0 @@ "@angular/common": ">=14.0.0", |
@@ -41,53 +41,43 @@ # ngx-board | ||
```typescript | ||
interface Board<T = any> { | ||
title: string; | ||
columns: Array<BoardColumn<T>>; | ||
} | ||
``` | ||
## Interfaces | ||
### Interfaz Board | ||
### Board Interface | ||
La interfaz `Board` representa un tablero completo. | ||
The `Board` interface represents a complete board. Its properties are: | ||
Sus propiedades son: | ||
- **id** (optional): unique number that identifies the board. | ||
- **title**: title of the board (required). | ||
- **description** (optional): description of the board. | ||
- **color** (optional): background color of the board. | ||
- **columns** (optional): array of columns (typed as `BoardColumn[]`) on the board. | ||
- **classlist** (optional): array of CSS classes for the board. | ||
- **style** (optional): CSS styles object for the board. | ||
- **id** (opcional): número unique que identifica el tablero. | ||
- **title**: título del tablero (requerido). | ||
- **description** (opcional): descripción del tablero. | ||
- **color** (opcional): color de fondo del tablero. | ||
- **columns** (opcional): arreglo de columnas (tipado como `BoardColumn[]`) en el tablero. | ||
- **classlist** (opcional): arreglo de clases CSS para el tablero. | ||
- **style** (opcional): objeto de estilos CSS para el tablero. | ||
### BoardColumn Interface | ||
### Interfaz BoardColumn | ||
The `BoardColumn` interface represents a column on a board. Its properties are: | ||
La interfaz `BoardColumn` representa una columna en un tablero. | ||
- **id** (optional): unique number that identifies the column. | ||
- **index** (optional): position of the column on the board. | ||
- **boardId** (optional): id of the board the column belongs to. | ||
- **title**: title of the column (required). | ||
- **description** (optional): description of the column. | ||
- **color** (optional): background color of the column. | ||
- **cards**: array of cards (typed as `BoardCard[]`) in the column (required). | ||
- **style** (optional): CSS styles object for the column. | ||
- **classlist** (optional): array or string of CSS classes for the column. | ||
- **disabled** (optional): boolean indicating if the column is disabled. | ||
- **data** (optional): any additional data to associate with the column. | ||
- **predicate** (optional): function that returns a boolean to control if an item can be moved into the column. | ||
Sus propiedades son: | ||
### BoardCard Interface | ||
- **id** (opcional): número unique que identifica la columna. | ||
- **index** (opcional): posición de la columna en el tablero. | ||
- **boardId** (opcional): id del tablero al que pertenece la columna. | ||
- **title**: título de la columna (requerido). | ||
- **description** (opcional): descripción de la columna. | ||
- **color** (opcional): color de fondo de la columna. | ||
- **cards**: arreglo de tarjetas (tipado como `BoardCard[]`) en la columna (requerido). | ||
- **style** (opcional): objeto de estilos CSS para la columna. | ||
- **classlist** (opcional): arreglo o string de clases CSS para la columna. | ||
- **disabled** (opcional): booleano que indica si la columna está deshabilitada. | ||
- **data** (opcional): cualquier dato adicional para asociar a la columna. | ||
- **predicate** (opcional): función que devuelve un booleano para controlar visibilidad de la columna. | ||
- **id** (optional): unique number that identifies the card. | ||
- **title**: title of the card (required). | ||
- **description** (optional): description of the card. | ||
- **data** (optional): any custom data to associate with the card. | ||
- **classlist** (optional): array of CSS classes for the card. | ||
- **style** (optional): CSS styles object for the card. | ||
Aquí un ejemplo para documentar la interfaz BoardCard en el README: | ||
### Interfaz BoardCard | ||
- **id** (opcional): número único que identifica la tarjeta. | ||
- **title**: título de la tarjeta (requerido). | ||
- **description** (opcional): descripción de la tarjeta. | ||
- **data** (opcional): cualquier dato custom para asociar a la tarjeta. | ||
- **classlist** (opcional): arreglo de clases CSS para la tarjeta. | ||
- **style** (opcional): objeto de estilos CSS para la tarjeta. | ||
## Inputs | ||
@@ -94,0 +84,0 @@ | Input | Description | |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
905
157567
193