Skip to content

Commit 8dbf115

Browse files
Merge pull request #43 from DHTMLX/next
[update] docs version to 3.6.2
2 parents 5e649e3 + 19366bd commit 8dbf115

22 files changed

+2227
-440
lines changed

docs/api/config/js_kanban_cards_config.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,10 @@ cards?: [
4545
cardId: string | number,
4646
text?: string,
4747
date?: Date,
48-
},{...}
48+
}, {...}
4949
],
5050
[custom_key: string]?: any
51-
},
52-
{...} // other cards data
51+
}, {...} // other cards data
5352
];
5453
~~~
5554

@@ -125,7 +124,7 @@ const cards = [
125124
cardId: 1,
126125
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. ",
127126
date: new Date(),
128-
}, {...}
127+
}, {...} // other comments
129128
],
130129
priority: 1,
131130
// custom field to place the card into the "feature" row
@@ -135,7 +134,7 @@ const cards = [
135134
// the columnKey config needs to be set to the "stage" value
136135
stage: "backlog",
137136
css: "red",
138-
},{...} // other cards data
137+
}, {...} // other cards data
139138
];
140139

141140
new kanban.Kanban("#root", {
@@ -151,4 +150,4 @@ new kanban.Kanban("#root", {
151150
- [Working with data](../../../guides/working_with_data)
152151
- [updateCard()](api/methods/js_kanban_updatecard_method.md)
153152

154-
**Related sample:** [Kanban. Styling cards](https://snippet.dhtmlx.com/qu6rpktk?tag=kanban)
153+
**Related sample:** [Kanban. Styling cards](https://snippet.dhtmlx.com/qu6rpktk?tag=kanban)

docs/api/config/js_kanban_cardshape_config.md

+28-32
Original file line numberDiff line numberDiff line change
@@ -200,51 +200,47 @@ Unless you specify the cards settings via the **cardShape** property, the widget
200200

201201
~~~jsx {}
202202
const defaultPriorities = [
203-
{ id: 1, color: "#FF5252", label: "high" },
204-
{ id: 2, color: "#FFC975", label: "medium" },
205-
{ id: 3, color: "#0AB169", label: "low" }
203+
{ id: 1, color: "#FE6158", label: "High" },
204+
{ id: 2, color: "#F1B941", label: "Medium" },
205+
{ id: 3, color: "#77D257", label: "Low" }
206206
];
207207

208-
const defaultColors = ["#65D3B3", "#FFC975", "#58C3FE"];
208+
const defaultColors = ["#33B0B4", "#0096FA", "#F1B941"];
209+
210+
export const getDefaultCardMenuItems = ({ store }: { store: DataStore }) => {
211+
const { readonly } = store.getState();
212+
const baseItems = [
213+
{ id: "duplicate-card", icon: "wxi-content-copy", text: "Duplicate" },
214+
{ id: "delete-card", icon: "wxi-delete-outline", text: "Delete" }
215+
];
209216

210-
const getDefaultCardMenuItems = ({ card, store }) => {
211-
const readonly = store.getState();
212217
if (!readonly?.select && readonly?.edit) {
213218
return [
214-
{ id: "set-edit", icon: "wxi-edit", text: "Edit" },
215-
{ id: "delete-card", icon: "wxi-delete", text: "Delete" },
219+
{ id: "set-edit", icon: "wxi-edit-outline", text: "Edit" },
220+
...baseItems,
216221
];
217222
}
218-
return [{ id: "delete-card", icon: "wxi-delete", text: "Delete" }];
223+
return baseItems;
219224
};
220225

221226
const defaultCardShape = {
222-
label: true,
223-
description: false,
224-
progress: false,
225-
start_date: false,
226-
end_date: false,
227-
menu: {
228-
show: true,
229-
items: getDefaultCardMenuItems
230-
},
231-
attached: false,
232-
cover: false,
233-
comments: false,
234-
color: {
227+
label: { show: true },
228+
description: { show: false },
229+
progress: { show: false },
230+
start_date: { show: false },
231+
end_date: { show: false },
232+
users: { show: false },
233+
priority: {
235234
show: false,
236-
values: defaultColors
235+
values: defaultPriorities
237236
},
238-
users: {
237+
color: {
239238
show: false,
240-
maxCount: 2
241-
},
242-
priority: {
243-
show: false,
244-
values: defaultPriorities
239+
values: defaultColors
245240
},
246-
comments: false,
247-
votes: false
241+
cover: { show: false },
242+
attached: { show: false },
243+
menu: { show: true }
248244
};
249245
~~~
250246

@@ -293,7 +289,7 @@ const cardShape = { // card settings
293289
},
294290
css: (card) => card.type == "feature" ? "green" : "red",
295291
headerFields: [
296-
{ // custom field
292+
{ // custom field
297293
key: "sprint",
298294
css: "custom_style",
299295
label: "Sprint"

docs/api/config/js_kanban_cardtemplate_config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ new kanban.Kanban("#root", {
7070

7171
**Related articles:** [Customization](../../../guides/customization#custom-cards)
7272

73-
**Related sample:** [Kanban. Custom card](https://snippet.dhtmlx.com/8rhdq81d?tag=kanban)
73+
**Related sample:** [Kanban. Custom card](https://snippet.dhtmlx.com/8rhdq81d?tag=kanban)

docs/api/config/js_kanban_columns_config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,4 @@ new kanban.Kanban("#root", {
106106
**Related samples:**
107107
- [Kanban. Limits for columns and swimlanes](https://snippet.dhtmlx.com/2blo6hx8?tag=kanban)
108108
- [Kanban. Changing color of column via custom menu](https://snippet.dhtmlx.com/fnlvd2g5?tag=kanban)
109-
- [Kanban. Disabling drag and drop to specific columns](https://snippet.dhtmlx.com/nfv59yif?tag=kanban)
109+
- [Kanban. Disabling drag and drop to specific columns](https://snippet.dhtmlx.com/nfv59yif?tag=kanban)

docs/api/config/js_kanban_currentuser_config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ new kanban.Kanban("#root", {
3333

3434
**Change log:** The property was added in v1.4
3535

36-
**Related sample:** [Kanban. Swimlanes, comments, votes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)
36+
**Related sample:** [Kanban. Swimlanes, comments, votes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)

docs/api/config/js_kanban_editor_config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ editor?: {
3232

3333
~~~jsx {}
3434
editor: {
35+
debounce: 100,
3536
autoSave: true,
36-
debounce: 100
3737
placement: "sidebar"
3838
}
3939
~~~

docs/api/config/js_kanban_editorshape_config.md

+55-15
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ editorShape?: [
2727
},
2828
config?: {
2929
align?: "start" | "center" | "end",
30+
editable?: boolean | function,
3031
buttons?: boolean,
3132
css?: string,
3233
disabled?: boolean,
@@ -42,6 +43,7 @@ editorShape?: [
4243
// for the "date" type only
4344
config?: {
4445
align?: "start" | "center" | "end",
46+
editable?: boolean | function,
4547
buttons?: boolean,
4648
css?: string,
4749
disabled?: boolean,
@@ -187,6 +189,7 @@ The values of these keys used in the [`cardShape`](../js_kanban_cardshape_config
187189

188190
- `config` - (optional) a configuration object of the **"dateRange"** field. Here you can specify the following parameters:
189191
- `align` - (optional) specifies the alignment of a popup with calendars relative to the Date Range control
192+
- `editable` - (optional) defines whether a date picker is editable and, optionally, sets a custom format for editing a date
190193
- `buttons` - (optional) shows/hides the Today and Clear buttons in the lower part of the popup with calendars
191194
- `css` - (optional) changes the position of the icon in the Date Range control
192195
- `disabled` - (optional) defines whether the Date Range control is disabled
@@ -202,6 +205,7 @@ The values of these keys used in the [`cardShape`](../js_kanban_cardshape_config
202205

203206
- `config` - (optional) a configuration object of the **"date"** field. Here you can specify the following parameters:
204207
- `align` - (optional) specifies the alignment of a popup with calendars relative to the Date control
208+
- `editable` - (optional) defines whether a date picker is editable and, optionally, sets a custom format for editing a date
205209
- `buttons` - (optional) shows/hides the Today and Clear buttons in the lower part of the popup with calendars
206210
- `css` - (optional) changes the position of the icon in the Date control
207211
- `disabled` - (optional) defines whether the Date control is disabled
@@ -316,10 +320,10 @@ where `rec` is the only parameter of the function and is an extended `PointerEve
316320

317321
~~~jsx {}
318322
interface UploadEvent extends PointerEvent {
319-
id: number;
320-
status: "client" | "server" | "error"; // which means in plain English "not sent yet", "sent successfully", "something went wrong, so not sent"
321-
name: string; // the name of the file
322-
file: string | Blob; // the file
323+
id: number;
324+
status: "client" | "server" | "error"; // which means in plain English "not sent yet", "sent successfully", "something went wrong, so not sent"
325+
name: string; // the name of the file
326+
file: string | Blob; // the file
323327
}
324328
~~~
325329

@@ -348,21 +352,57 @@ Unless you specify the editor settings via the `editorShape` property, the widge
348352

349353
~~~jsx {}
350354
const defaultPriorities = [
351-
{ id: 1, color: "#FF5252", label: "high" },
352-
{ id: 2, color: "#FFC975", label: "medium" },
353-
{ id: 3, color: "#0AB169", label: "low" }
355+
{ id: 1, color: "#FE6158", label: "High" },
356+
{ id: 2, color: "#F1B941", label: "Medium" },
357+
{ id: 3, color: "#77D257", label: "Low" }
354358
];
355359

356-
const defaultColors = [ "#65D3B3", "#FFC975", "#58C3FE" ];
360+
const defaultColors = ["#33B0B4", "#0096FA", "#F1B941"];
357361

358362
const defaultEditorShape = [
359-
{ key: "label", type: "text", label: "Label" },
360-
{ key: "description", type: "textarea", label: "Description" },
361-
{ key: "priority", type: "combo", label: "Priority", values: defaultPriorities },
362-
{ key: "color", type: "color", label: "Color", values: defaultColors },
363-
{ key: "progress", type: "progress", label: "Progress" },
364-
{ key: "start_date", type: "date", label: "Start date" },
365-
{ key: "end_date", type: "date", label: "End date" }
363+
{
364+
key: "label",
365+
type: "text",
366+
label: "Label"
367+
},
368+
{
369+
key: "description",
370+
type: "textarea",
371+
label: "Description"
372+
},
373+
{
374+
type: "combo",
375+
label: "Priority",
376+
key: "priority",
377+
config: {
378+
clearButton: true
379+
}
380+
},
381+
{
382+
type: "color",
383+
label: "Color",
384+
key: "color"
385+
},
386+
{
387+
type: "progress",
388+
key: "progress",
389+
label: "Progress"
390+
},
391+
{
392+
type: "date",
393+
key: "start_date",
394+
label: "Start date"
395+
},
396+
{
397+
type: "date",
398+
key: "end_date",
399+
label: "End date"
400+
},
401+
{
402+
type: "multiselect",
403+
key: "users",
404+
label: "Users"
405+
}
366406
];
367407
~~~
368408

docs/api/config/js_kanban_history_config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ new kanban.Kanban("#root", {
4343

4444
**Change log:** The property was added in v1.3
4545

46-
**Related articles:** [`undo()`](api/methods/js_kanban_undo_method.md) and [`redo()`](api/methods/js_kanban_redo_method.md)
46+
**Related articles:** [`undo()`](api/methods/js_kanban_undo_method.md) and [`redo()`](api/methods/js_kanban_redo_method.md)

docs/api/config/js_kanban_links_config.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ links?: [
1818
id: string | number,
1919
masterId: string | number,
2020
slaveId: string | number,
21-
relation: "relatesTo" | "requiredFor" | "duplicate" | "parent",
22-
},
23-
{...} // other links data
21+
relation: "relatesTo" | "requiredFor" | "duplicate" | "parent"
22+
}, {...} // other links data
2423
];
2524
~~~
2625

@@ -50,8 +49,7 @@ const links = [
5049
masterId: 2,
5150
slaveId: 5,
5251
relation: "relatesTo",
53-
},
54-
{...}
52+
}, {...} // other link data
5553
];
5654

5755
new kanban.Kanban("#root", {

docs/api/config/js_kanban_locale_config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ const board = new kanban.Kanban("#root", {
4242

4343
**Related articles:** [Localization](../../../guides/localization)
4444

45-
**Related sample:** [Kanban. Localization](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban)
45+
**Related sample:** [Kanban. Localization](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban)

docs/api/config/js_kanban_rendertype_config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ new kanban.Kanban("#root", {
4646

4747
**Related articles:** [Configuration](../../../guides/configuration#cards)
4848

49-
**Related sample:** [Kanban. Fixed headers, lazy rendering and column scroll](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban)
49+
**Related sample:** [Kanban. Fixed headers, lazy rendering and column scroll](https://snippet.dhtmlx.com/xez9ghqq?tag=kanban)

docs/api/config/js_kanban_rowkey_config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ new kanban.Kanban("#root", {
4343
});
4444
~~~
4545

46-
**Related sample:** [Kanban. Swimlanes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)
46+
**Related sample:** [Kanban. Swimlanes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)

docs/api/config/js_kanban_rows_config.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ rows?: [
1919
label?: string,
2020
collapsed?: boolean,
2121
css?: string,
22-
},
23-
{...} // other rows data
22+
}, {...} // other row data
2423
];
2524
~~~
2625

@@ -63,4 +62,4 @@ new kanban.Kanban("#root", {
6362
- [Working with data](../../../guides/working_with_data)
6463
- [updateRow()](api/methods/js_kanban_updaterow_method.md)
6564

66-
**Related sample:** [Kanban. Swimlanes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)
65+
**Related sample:** [Kanban. Swimlanes](https://snippet.dhtmlx.com/5hcx01h4?tag=kanban)

docs/api/config/js_kanban_rowshape_config.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ rowShape?: {
2323
text?: string,
2424
disabled? boolean,
2525
onClick?: ({ id, item, row }) => void
26-
},
27-
{...}
26+
}, {...} // other item data
2827
] | ({ row, rowIndex, rows, store }) => array | boolean
2928
},
3029
css?: (row, cards) => string
@@ -70,12 +69,12 @@ To configure the rows appearance, in the **rowShape** object you can specify the
7069
{
7170
id: "custom-delete-row",
7271
icon: "wxi-delete",
73-
text: "Remove row",
72+
text: "Remove row"
7473
},
7574
{
7675
id: "custom-move-row:up",
7776
icon: "wxi-arrow-up",
78-
text: "Move up",
77+
text: "Move up"
7978
}
8079
]
8180
}

docs/api/config/js_kanban_theme_config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,4 @@ const board = new kanban.Kanban("#root", {
9898
**Related sample:**
9999
- [Kanban. Using themes](https://snippet.dhtmlx.com/jnw54xif?tag=kanban)
100100
- [Kanban. Including a theme as a stylesheet](https://snippet.dhtmlx.com/k3iw6ti0?tag=kanban)
101-
- [Kanban. Changing a theme via the CSS class](https://snippet.dhtmlx.com/7qzp561m?tag=kanban)
101+
- [Kanban. Changing a theme via the CSS class](https://snippet.dhtmlx.com/7qzp561m?tag=kanban)

docs/api/config/toolbar_api_config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ new kanban.Toolbar("#toolbar", {
3535

3636
**Related articles:** [Configuration](../../../guides/configuration#toolbar)
3737

38-
**Related sample:** [Kanban. Custom toolbar](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban)
38+
**Related sample:** [Kanban. Custom toolbar](https://snippet.dhtmlx.com/s5r5h4ju?tag=kanban)

docs/api/config/toolbar_items_config.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,7 @@ items: [
136136
dir: "desc"
137137
}
138138
]
139-
},
140-
// other controls
139+
}, {...} // other controls
141140
]
142141
~~~
143142
:::

docs/api/config/toolbar_locale_config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ new kanban.Toolbar("#toolbar", {
4444

4545
**Related articles:** [Localization](../../../guides/localization)
4646

47-
**Related sample:** [Kanban. Localization](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban)
47+
**Related sample:** [Kanban. Localization](https://snippet.dhtmlx.com/hrblf1mm?tag=kanban)

0 commit comments

Comments
 (0)