Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[update] tabs to spaces #12

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/api/common/js_kanban_meta_parameter.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The `$meta` object includes an extra set of parameters used for configuring meth

~~~jsx {}
$meta?: {
skipHistory?: boolean
skipHistory?: boolean
};
~~~

Expand All @@ -33,17 +33,17 @@ The `$meta` object includs the following parameter:
~~~jsx {11-13}
// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
columns,
cards
});
// add new card and skip this action in history of Kanban
board.addCard({
id: 1,
columnId: "backlog",
card: { label: "New card" },
$meta: {
skipHistory: true
}
id: 1,
columnId: "backlog",
card: { label: "New card" },
$meta: {
skipHistory: true
}
});
~~~

Expand Down
8 changes: 4 additions & 4 deletions docs/api/config/js_kanban_cardheight_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ If you combine the [`renderType: "lazy"`](api/config/js_kanban_rendertype_config

~~~jsx {4}
new kanban.Kanban("#root", {
cards,
columns,
cardHeight: 150, // px
// other parameters
cards,
columns,
cardHeight: 150, // px
// other parameters
});
~~~

Expand Down
174 changes: 87 additions & 87 deletions docs/api/config/js_kanban_cards_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,42 +14,42 @@ description: You can learn about the cards config in the documentation of the DH

~~~jsx {}
cards?: [
{
id?: string | number,
label?: string,
description?: string,
progress?: number,
start_date?: Date,
end_date?: Date,
attached?: [
{
id: string | number,
url?: string,
previewURL?: string,
coverURL?: string,
name?: string,
isCover?: boolean
}, {...}
],
color?: string,
users?: array | string | number,
// users?: array - for multiple users, if you use the "multiselect" editor type to assign users
// users?: string | number - for a single user, if you use the "combo" or "select" editor type to assign a user
priority?: string | number,
css?: string,
votes?: array,
comments?: [
{
id: string | number,
userId: string | number,
cardId: string | number,
text?: string,
date?: Date,
},{...}
],
[custom_key: string]?: any
},
{...} // other cards data
{
id?: string | number,
label?: string,
description?: string,
progress?: number,
start_date?: Date,
end_date?: Date,
attached?: [
{
id: string | number,
url?: string,
previewURL?: string,
coverURL?: string,
name?: string,
isCover?: boolean
}, {...}
],
color?: string,
users?: array | string | number,
// users?: array - for multiple users, if you use the "multiselect" editor type to assign users
// users?: string | number - for a single user, if you use the "combo" or "select" editor type to assign a user
priority?: string | number,
css?: string,
votes?: array,
comments?: [
{
id: string | number,
userId: string | number,
cardId: string | number,
text?: string,
date?: Date,
},{...}
],
[custom_key: string]?: any
},
{...} // other cards data
];
~~~

Expand All @@ -65,11 +65,11 @@ For each card you can specify the following parameters (data):
- `end_date` - (optional) an end Date object (do not specify a string date). It is displayed in the **End date** field
- `attached` - (optional) an array of objects with data of the attached file(s). It is displayed in the **Attachment** field. For each object you can specify the following parameters:
- `id` - (required) an **ID** of the attached file
- `url` - (optional) a path to the file to be attached
- `previewURL` - (optional) a path to the preview image
- `coverURL` - (optional) a path to the image to be set as a cover
- `name` - (optional) a file name
- `isCover` - (optional) enables a cover image. If **true**, the cover image will be downloaded via the "coverURL" url
- `url` - (optional) a path to the file to be attached
- `previewURL` - (optional) a path to the preview image
- `coverURL` - (optional) a path to the image to be set as a cover
- `name` - (optional) a file name
- `isCover` - (optional) enables a cover image. If **true**, the cover image will be downloaded via the "coverURL" url
- `color` - (optional) a valid HEX color code. It is the color of the card top line
- `users` - (optional) an **array** with **ID**s for multiple assigned users or **string | number** for a single assigned user. To specify the assigned users, you need to define an array with users data in the [cardShape.users](../js_kanban_cardshape_config) property. The users are displayed in the **Users** field

Expand All @@ -83,11 +83,11 @@ For each card you can specify the following parameters (data):
- `css` - (optional) defines css styles for a separate card
- `votes` - (optional) an array of user IDs
- `comments` - (optional) an array of objects with data of comments. For each comment's object you can specify the following parameters:
- `id` - (required) an **ID** of the comment
- `userId` - (required) an **ID** of a user that posted the comment
- `cardId` - (required) an **ID** of the card that the comment belongs to
- `text` - (optional) a text of the comment. It also can contain html markup
- `date` - (optional) a Date object (do not specify a string date). The date when the comment was posted. It is not updated after editing
- `id` - (required) an **ID** of the comment
- `userId` - (required) an **ID** of a user that posted the comment
- `cardId` - (required) an **ID** of the card that the comment belongs to
- `text` - (optional) a text of the comment. It also can contain html markup
- `date` - (optional) a Date object (do not specify a string date). The date when the comment was posted. It is not updated after editing
- `custom_key` - (optional) a custom key of the card. You can specify the custom keys to place the card into column and row. See the [columnKey](../js_kanban_columnkey_config) and [rowKey](../js_kanban_rowkey_config) properties

:::info
Expand All @@ -98,50 +98,50 @@ If you want to load new data for cards dynamically, you can use the [**parse()**

~~~jsx {1-40,44}
const cards = [
{
id: 1,
label: "Integration with React",
description: "Some description",
progress: 25,
start_date: new Date("02/24/2022"),
end_date: new Date("02/24/2023"),
attached: [
{
id: 234,
url: "../assets/img-1.jpg",
previewURL: "../assets/img-1.jpg",
coverURL: "../assets/img-1.jpg",
name: "img-1.jpg",
isCover: true
}, {...} // other attached files data
],
color: "#65D3B3",
users: [1,2],
votes: [3,6,8],
comments: [
{
id: 1,
userId: 1,
cardId: 1,
text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays. ",
date: new Date(),
}, {...}
],
priority: 1,
// custom field to place the card into the "feature" row
// the rowKey config needs to be set to the "type" value
type: "feature",
// custom field to place the card into the "backlog" column
// the columnKey config needs to be set to the "stage" value
stage: "backlog",
css: "red",
},{...} // other cards data
{
id: 1,
label: "Integration with React",
description: "Some description",
progress: 25,
start_date: new Date("02/24/2022"),
end_date: new Date("02/24/2023"),
attached: [
{
id: 234,
url: "../assets/img-1.jpg",
previewURL: "../assets/img-1.jpg",
coverURL: "../assets/img-1.jpg",
name: "img-1.jpg",
isCover: true
}, {...} // other attached files data
],
color: "#65D3B3",
users: [1,2],
votes: [3,6,8],
comments: [
{
id: 1,
userId: 1,
cardId: 1,
text: "Greetings, fellow colleagues. I would like to share my insights on this task. I reckon we should deal with at least half of the points in the plan without further delays. ",
date: new Date(),
}, {...}
],
priority: 1,
// custom field to place the card into the "feature" row
// the rowKey config needs to be set to the "type" value
type: "feature",
// custom field to place the card into the "backlog" column
// the columnKey config needs to be set to the "stage" value
stage: "backlog",
css: "red",
},{...} // other cards data
];

new kanban.Kanban("#root", {
columns,
cards,
// other parameters
columns,
cards,
// other parameters
});
~~~

Expand Down
Loading
Loading