최신 버전으로의 마이그레이션
1.6.5 -> 1.7.0
Api
Properties
editorShape속성이 업데이트되었습니다.clearButton파라미터가clear로 교체되었습니다:
new kanban.Kanban("#root", {
editorShape: [
{
type: "combo",
label: "Priority",
key: "priority",
config: {
clearButton: true // legacy
}
}, { /* ... */ }
]
// 기타 파라미터
});
new kanban.Kanban("#root", {
editorShape: [
{
type: "combo",
label: "Priority",
key: "priority",
config: {
clear: true // new
}
}, { /* ... */ }
]
// 기타 파라미터
});
cardShape.menu.items함수가 업데이트되었습니다. store 파라미터가 readonly로 교체되었습니다:
menu: {
show: true,
items: ({ card, store }) => {
const defaultMenuItems = getDefaultCardMenuItems({ card, store }); // "store" 파라미터는 legacy
...
}
}
menu: {
show: true,
items: ({ card, readonly }) => {
const defaultMenuItems = getDefaultCardMenuItems({ card, readonly }); // "readonly" 파라미터는 신규
...
}
}
columnShape.menu.items함수가 업데이트되었습니다. store 파라미터가 readonly로 교체되었습니다:
menu: {
show: true,
items: ({ column, columnIndex, columns, store }) => {
const defaultMenuItems = getDefaultColumnMenuItems({ column, columnIndex, columns, store }); // "store" 파라미터는 legacy
...
}
}
menu: {
show: true,
items: ({ column, columnIndex, columns, readonly }) => {
const defaultMenuItems = getDefaultColumnMenuItems({ column, columnIndex, columns, readonly }); // "readonly" 파라미터는 신규
...
}
}
rowShape.menu.items함수가 업데이트되었습니 다. store 파라미터가 readonly로 교체되었습니다:
menu: {
show: true,
items: ({ row, rowIndex, rows, store }) => {
const defaultMenuItems = getDefaultRowMenuItems({ row, rowIndex, rows, store }); // "store" 파라미터는 legacy
...
}
}
menu: {
show: true,
items: ({ row, rowIndex, rows, readonly }) => {
const defaultMenuItems = getDefaultRowMenuItems({ row, rowIndex, rows, readonly }); // "readonly" 파라미터는 신규
...
}
}
-
v1.7에서
cardShape.menu.items,columnShape.menu.items,rowShape.menu.items속성의 menu.items[0].label 및 menu.items[0].items 파라미터가 제거되었습니다. -
v1.7에서
editorAutoSave속성이 제거되었습니다. 대신editor.autoSave속성을 사용하세요:
new kanban.Kanban("#root", {
editorAutoSave: true, // legacy
// 기타 파라미터
});
new kanban.Kanban("#root", {
editor: {
autoSave: true // new
}
// 기타 파라미터
});
links속성이 다음과 같이 변경되었습니다:- masterId 파라미터가 source로 교체됨
- slaveId 파라미터가 target으로 교체됨
const links = [
{
id: 1,
// legacy
masterId: 2,
slaveId: 5
}, {...} // 기타 링크 데이터
];
new kanban.Kanban("#root", {
links,
// 기타 파라미터
});
const links = [
{
id: 1,
// new
source: 2,
target: 5
}, {...} // 기타 링크 데이터
];
new kanban.Kanban("#root", {
links,
// 기타 파라미터
});
Methods
- store 메서드에서
undo및redo메서드가 제거되었습니다:
kanban.api.getStores().data.undo() // legacy
kanban.undo();
// 또는
kanban.api.exec("undo");
-
api.getState()및api.getReactiveState()메서드가 다음과 같이 변경되었습니다:- v1.7.0에서 다음 파라미터가 제거되었습니다:
fromAreaMeta,
dropAreaItemsCoords,
dropAreasCoords,
overAreaMeta,
before,
dragItemId,
dragItemsCoords,
overAreaId- v1.7.0에서 다음 파라미터가 private로 변경되었습니다:
edit -> _edit: object,
layout -> _layout: string,
cardsMap -> _cardsMap: object,
cardsMeta -> _cardsMeta: object,
areasMeta -> _areasMeta: object,
scroll -> _scroll: object
Events
start-drag-card이벤트에서dragItemsCoords및dropAreasCoords파라미터가 제거되었습니다.
1.5.13 -> 1.6.0
메뉴와 관련된 CSS 클래스가 다음과 같이 변경되었습니다:
.menu -> .wx-menu
.item -> .wx-item
.icon -> .wx-icon
.value -> .wx-value
1.5.12 -> 1.5.13
에디터와 관련된 CSS 클래스가 다음과 같이 변경되었습니다:
.modal -> .wx-modal
.window -> .wx-window
.modal .window .buttons -> .wx-modal .wx-window .wx-buttons
.combo -> .wx-combo
.combo -> .wx-multicombo
.item -> .wx-item
.color-picker -> .wx-colorselect
.colors -> .wx-colors
.slider -> .wx-slider
.datepicker -> .wx-datepicker
.calendar -> .wx-calendar
.calendar .days .day.out -> .wx-calendar .wx-days .wx-day.wx-out
.combo .tag -> .multicombo .wx-tag
.dropdown -> .wx-dropdown
.dropdown .item -> .wx-dropdown .wx-item
.clear -> .wx-clear
1.5.6 -> 1.5.7
Api
Methods
- Kanban 툴바의
setLocale메서드가 다음과 같이 변경되었습니다:
// Kanban 생성
const board = new kanban.Kanban("#root", {...});
// Toolbar 생성
const toolbar = new kanban.Toolbar("#toolbar", { api: board.api });
// Toolbar에 "de" 로케일 적용
toolbar.setLocale(de); // 또는 null로 초기 로케일(en)로 리셋
// Kanban 생성
const board = new kanban.Kanban("#root", {...});
// Toolbar 생성
const toolbar = new kanban.Toolbar("#toolbar", { api: board.api });
// Toolbar에 "de" 로케일 적용
toolbar.setLocale(de, board.api);
1.4 -> 1.5
Api
Properties
-
Kanban의
columnShape속성이 다음과 같이 변경되었습니다:v1.5 이전{
menu: {
show: true,
items: [
{
label: "Update", ...
}
]
// 기타 파라미터
}
}v1.5부터{
menu: {
show: true,
items: [
{
text: "Update", ...
}
]
// 기타 파라미터
},
fixedHeaders: true
}
1.3 -> 1.4
Api
Properties
-
Kanban의
editorShape속성이 다음과 같이 변경되었습니다:v1.4 이전{
type: "date",
key: "start_date",
label: "Start date"
},
// 기타 파라미터v1.4부터{
type: "date", // 또는 "dateRange" 타입도 사용 가능
key: "start_date",
label: "Date Range"
format: "%d/%m/%y"
},
{
type: "comments",
key: "comments",
label: "Comments",
config: {
format: "%M %d",
placement: "page", // 또는 "editor"
html: true,
},
},
{
type: "links",
key: "links",
label: "Links",
},
// 기타 파라미터 -
Kanban의
cardShape속성이 다음과 같이 변경되었습니다:v1.4 이전{
label: true,
description: true,
menu: {
items: [
{
label: "Delete", ...
}
]
}
// 기타 파라미터
}v1.4부터{
label: true,
description: true,
menu: {
items: [
{
text: "Delete", ...
}
]
},
votes: true,
comments: true,
css: (card) => card.type == "feature" ? "green" : "red",
// 기타 파라미터
} -
Kanban의
columnShape속성이 다음과 같이 변경되었습니다:v1.4 이전{
menu: {
show: true,
items: [
{
label: "Delete", ...
}
]
// 기타 파라미터
}
}v1.4부터{
menu: {
show: true,
items: [
{
text: "Delete", ...
}
]
// 기타 파라미터
},
css: (column, cards) => column.id == "feature" && cards.length < 5 ? "green" : "red"
} -
Kanban의
rowShape속성이 다음과 같이 변경되었습니다:v1.4 이전{
menu: {
show: true,
items: [
{
label: "Delete", ...
}
]
// 기타 파라미터
}
}v1.4부터{
menu: {
show: true,
items: [
{
text: "Delete", ...
}
]
// 기타 파라미터
},
css: (row, cards) => row.id == "task" && cards.length < 5 ? "green" : "red",
} -
Kanban의
cards속성이 다음과 같이 변경되었습니다:v1.4 이전[
{
id: 1,
label: "Integration with React",
description: "Some description",
// 기타 파라미터
}, ...
]v1.4부터[
{
id: 1,
label: "Integration with React",
description: "Some description",
css: "red",
votes: [4,6,9],
comments: [
{
id: 1,
userId: 9,
cardId: 6,
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(),
},{...}
]
// 기타 파라미터
}, ...
] -
Kanban의
columns속성이 다음과 같이 변경되었습니다:v1.4 이전[
{
id: "inprogress",
label: "In progress",
// 기타 파라미터
}, ...
]v1.4부터[
{
id: "inprogress",
label: "In progress",
css: "red",
overlay: template(`
<div className="blockOverlay disable-drop">
<span className="disable-drop-header">Drop is not allowed</span>
<span className="disable-drop-description">Only testers can move cards to this
column</span>
</div>`)
// 기타 파라미터
}, ...
] -
Kanban의
rows속성이 다음과 같이 변경되었습니다:v1.4 이전[
{
id: "features",
label: "Features",
// 기타 파라미터
}, ...
]v1.4부터[
{
id: "features",
label: "Features",
css: "green"
// 기타 파라미터
}, ...
] -
Kanban의
cardTemplate속성이 다음과 같이 변경되었습니다:v1.4 이전const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => {
if (selected) {
return `
<div className="custom-card" style={{padding: '20px'}}>
<div className="status-color" style={{background: '${cardFields.color}'}}></div>
Selected:${cardFields.label}
</div>
`;
}
}
new kanban.Kanban("#root", {
cards,
columns,
cardTemplate
});v1.4부터const cardTemplate = ({ cardFields, selected, dragging, cardShape }) => {
if (selected) {
return `
<div className="custom-card" style={{padding: '20px'}}>
<div className="status-color" style={{background: '${cardFields.color}'}}></div>
<div data-menu-id=${cardFields.id} >
<i className="wxi-dots-v"></i>
</div>
Selected:${cardFields.label}
</div>
`;
}
}
new kanban.Kanban("#root", {
cards,
columns,
cardTemplate: kanban.template(card => cardTemplate(card)),
// 기타 파라미터
}); -
items속성의 sort 컨트롤이 다음과 같이 변경되었습니다:v1.4 이전[
{ // 커스텀 sort 컨트롤
type: "sort",
options: [
{
label: "Sort by label",
by: "label",
dir: "asc"
},
{
label: "Sort by description",
by: "description",
dir: "desc"
}
]
},
]v1.4부터[
{ // 커스텀 sort 컨트롤
type: "sort",
options: [
{
text: "Sort by label",
by: "label",
dir: "asc"
},
{
text: "Sort by description",
by: "description",
dir: "desc"
}
]
},
]
Methods
- Kanban의
api.getState()메서드가 변경되었습니다:
api.getState();
// 메서드는 다음 속성들을 포함한 객체를 반환합니다
/*{
areasMeta: object,
before: string | number,
cardShape: object,
cards: array,
cardsMap: object,
cardsMeta: object,
columnKey: string,
columns: array,
dragItemId: string | number,
dragItemsCoords: array,
edit: object,
editorShape: array,
fromAreaMeta: object,
overAreaId: string | number,
readonly: object,
rowKey: string,
rows: array,
scroll: object,
search: object,
selected: array,
sort: object,
dropAreaItemsCoords: array,
dropAreasCoords: array,
overAreaMeta: object,
}*/
api.getState();
// 메서드는 다음 속성들을 포함한 객체를 반환합니다
/*{
areasMeta: object,
before: string | number,
cardShape: object,
cards: array,
cardsMap: object,
cardsMeta: object,
columnKey: string,
columns: array,
dragItemId: string | number,
dragItemsCoords: array,
edit: object,
editorShape: array,
fromAreaMeta: object,
overAreaId: string | number,
readonly: object,
rowKey: string,
rows: array,
scroll: object,
search: object,
selected: array,
sort: object,
}*/
1.2 -> 1.3
Api
Properties
-
Kanban의
editorShape속성이 다음과 같이 변경되었습니다:- dateRange 파라미터
v1.3 이전{
type: "date",
key: "start_date",
label: "Start date"
},
// 기타 파라미터v1.3부터{
type: "dateRange", // 또는 "date" 타입도 사용 가능
key: {
start: "start_date",
end: "end_date"
},
label: "Date Range"
},
// 기타 파라미터 -
Toolbar의
items속성이 다음과 같이 변경되었습니다:
items: [
"search",
"spacer",
"sort",
"addColumn",
"addRow"
]
items: [
"search",
"spacer",
"undo",
"redo",
"sort",
"addColumn",
"addRow"
]
Methods
- Kanban의
updateCard()메서드가 변경되었습니다:
updateCard({
id: 1,
card: {
label: "New Label",
row: "feature",
column: "inprogress",
/*기타 파라미터*/
}
});
updateCard({
id: 1,
card: {
label: "New Label",
row: "feature",
column: "inprogress",
/*기타 파라미터*/
},
replace: true
});
- Kanban의
updateColumn()메서드가 변경되었습니다:
updateColumn({
id: "backlog",
column: {
label: "Updated column",
limit: 3,
strictLimit: 3,
collapsed: true
}
});
updateColumn({
id: "backlog",
column: {
label: "Updated column",
limit: 3,
strictLimit: 3,
collapsed: true
},
replace: true
});
- Kanban의
updateRow()메서드가 변경되었습니다:
updateRow({
id: "feature",
row: {
label: "Updated row",
collapsed: true
},
});
updateColumn({
id: "feature",
row: {
label: "Updated row",
collapsed: true
},
replace: true
});
1.1 -> 1.2
Api
Properties
-
Kanban의
cardShape속성이 다음과 같이 변경되었습니다:- menu 파라미터
v1.2 이전menu: true,
//또는
menu: { show: true }
// 기타 파라미터v1.2부터menu: true,
// 또는
menu: {
show: true,
items: ({ card, store }) => {
if(card.id === 1){
return false;
} else {
return [
{ id: "set-edit", icon: "wxi-edit", label: "Edit" },
{ id: "delete-card", icon: "wxi-delete", label: "Delete" }
];
}
}
},
// 기타 파라미터- users 파라미터
v1.2 이전users: {
show: true,
values: [
{
id: 1,
label: "John Smith",
path: "../assets/user.jpg"
},
]
},
// 기타 파라미터v1.2부터users: {
show: true,
values: [
{
id: 1,
label: "John Smith",
avatar: "../assets/user.jpg"
},
]
},
// 기타 파라미터- start_date 및 end_date 파라미터
v1.2 이전start_date: true,
end_date: true,
// 기타 파라미터v1.2부터start_date: {
show: true,
format: "%d.%m.%Y"
},
end_date: {
show: true,
format: "%d.%m.%Y"
},
// 기타 파라미터 -
Kanban의
editorShape속성이 다음과 같이 변경되었습니다:
{
type: "multiselect",
key: "users",
label: "Users",
values: [
{
id: 1, label: "Alan",
path: "preview_image_path_1.png"
},
]
},
// 기타 필드 설정
{
type: "multiselect",
key: "users",
label: "Users",
values: [
{
id: 1, label: "Alan",
avatar: "preview_image_path_1.png"
},
]
},
// 기타 필드 설정
- Toolbar의
items속성이 다음과 같이 변경되었습니다:
items: [
"search",
"controls"
]
items: [
{ // 또는 "search",
type: "search",
options: [
{
id: "label",
label: "By label"
},
{
id: "start_date",
label: "By date",
searchRule: (card, value, by) => {
const date = card[by];
return date?.toString().includes(value);
}
}
]
},
"spacer",
{ // 또는 "sort",
type: "sort",
options: [
{
label: "Sort by label",
by: "label",
dir: "asc"
},
{
label: "Sort by description",
by: "description",
dir: "desc"
}
]
},
"addColumn",
"addRow"
]
Methods
- Kanban의
setLocale()및 Toolbar의setLocale()메서드가 변경되었습니다:
setLocale(kanban.en); // 기본 로케일로 리셋
setLocale(null); // 기본 로케일로 리셋
- Kanban의
api.getReactiveState()메서드가 변경되었습니다:
api.getReactiveState();
// 메서드는 다음 속성들을 포함한 객체를 반환합니다
/*{
dragItemId: {
subscribe: any,
update: any,
set: any
},
before: {...},
overAreaId: {...},
overAreaMeta: {...},
dropAreaItemsCoords: {...},
dropAreasCoords: {...},
dragItemsCoords: {...},
selected: {...}
}*/
api.getReactiveState();
// 메서드는 다음 속성들을 포함한 객체를 반환합니다
/*{
areasMeta: {
subscribe: any,
update: any,
set: any
},
before: {...},
cardShape: {...},
cards: {...},
cardsMap: {...},
cardsMeta: {...},
columnKey: {...},
columns: {...},
dragItemId: {...},
dragItemsCoords: {...},
dropAreaItemsCoords: {...},
dropAreasCoords: {...},
edit: {...},
editorShape: {...},
fromAreaMeta: {...},
overAreaId: {...},
overAreaMeta: {...},
readonly: {...},
rowKey: {...},
rows: {...},
scroll: {...},
search: {...},
selected: {...},
sort: {...}
}*/
- Kanban의
api.getState()메서드가 변경되었습니다:
api.getState();
// 메서드는 다음 속성들을 포함한 객체를 반환합니다
/*{
dragItemId: string | number,
before: string | number,
overAreaId: string | number,
overAreaMeta: object,
dropAreaItemsCoords: array,
dropAreasCoords: array,
dragItemsCoords: array,
selected: array
}*/
api.getState();
// 메서드는 다음 속성들을 포함한 객체를 반환합니다
/*{
areasMeta: object,
before: string | number,
cardShape: object,
cards: array,
cardsMap: object,
cardsMeta: object,
columnKey: string,
columns: array,
dragItemId: string | number,
dragItemsCoords: array,
dropAreaItemsCoords: array,
dropAreasCoords: array,
edit: object,
editorShape: array,
fromAreaMeta: object,
overAreaId: string | number,
overAreaMeta: object,
readonly: object,
rowKey: string,
rows: array,
scroll: object,
search: object,
selected: array,
sort: object
}*/
- Kanban의
api.getStores()메서드가 변경되었습니다:
api.getStores();
// 메서드는 다음 스토어 객체를 반환합니다
/*{
state: StateStore, // ( object )
data: DataStore // ( object )
}*/
api.getStores();
// 메서드는 다음 속성들을 포함한 객체를 반환합니다
/*{
state: StateStore, // ( object )
}*/
Localization
v1.2 이전
const days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
const months = [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
];
const monthsShort = [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
];
const wx = {
Today: "Today",
Clear: "Clear",
Close: "Close"
};
const en = {
lang: "en",
__dates: {
months,
monthsShort,
days
},
wx,
kanban: {
Save: "Save",
Close: "Close",
Delete: "Delete",
Name: "Name",
Description: "Description",
Type: "Type",
"Start date": "Start date",
"End date": "End date",
Result: "Result",
"No results": "No results",
Search: "Search",
"Search in": "Search in",
"Add new row": "Add new row",
"Add new column": "Add new column",
"Add new card": "Add new card",
"Edit card": "Edit card",
Edit: "Edit",
Everywhere: "Everywhere",
Label: "Label",
Status: "Status",
Color: "Color",
Date: "Date",
Untitled: "Untitled",
Rename: "Rename"
}
};
v1.2부터
const en = {
kanban: { // Kanban 라벨 번역
"Save": "Save",
"Close": "Close",
"Delete": "Delete",
"Name": "Name",
"Description": "Description",
"Type": "Type",
"Start date": "Start date",
"End date": "End date",
"Result": "Result",
"No results": "No results",
"Search": "Search",
"Search in": "Search in",
"Add new row": "Add new row",
"Add new column": "Add new column",
"Add new card": "Add new card",
"Edit card": "Edit card",
"Edit": "Edit",
"Everywhere": "Everywhere",
"Label": "Label",
"Status": "Status",
"Color": "Color",
"Date": "Date",
"Untitled": "Untitled",
"Rename": "Rename",
"Move up": "Move up",
"Move down": "Move down",
"Move left": "Move left",
"Move right": "Move right",
"Sort": "Sort",
"Label (a-z)": "Label (a-z)",
"Label (z-a)": "Label (z-a)",
"Description (a-z)": "Description (a-z)",
"Description (z-a)": "Description (z-a)"
},
calendar: { // 캘린더 번역 및 설정
monthFull: [
"January", "February", "March", "April",
"May", "June", "July", "August",
"September", "October", "November", "December"
],
monthShort: [
"Jan", "Feb", "Mar", "Apr",
"May", "Jun", "Jul", "Aug",
"Sep", "Oct", "Nov", "Dec"
],
dayFull: [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
dayShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
hours: "Hours",
minutes: "Minutes",
done: "Done",
clear: "Clear",
today: "Today",
am: ["am", "AM"],
pm: ["pm", "PM"],
weekStart: 7,
timeFormat: 24
},
core: { // 코어 요소 번역
ok: "OK",
cancel: "Cancel"
}
};
1.0 -> 1.1
Api
Properties
columns속성이 신규 파라미터로 확장되었습니다. v1.1부터 collapsed, limit, strictLimit 설정을 사용할 수 있습니다.
const columns = [
{
label: "Backlog",
id: "backlog"
}, ...
];
const columns = [
{
label: "Backlog",
id: "backlog",
collapsed: true,
limit: 3,
strictLimit: true
}, ...
];
new kanban.Kanban("#root", {
columns,
// 기타 파라미터
});
cardShape속성의 color 파라미터가 변경되었습니다.
const cardShape = {
color: {
show: true,
values: [
{ id: 1, color: "#65D3B3", label: "red" },
{ id: 2, color: "#FFC975", label: "green" }
]
}
};
const cardShape = {
color: {
show: true,
values: ["#65D3B3", "#FFC975", "#58C3FE"]
}
};
new kanban.Kanban("#root", {
cardShape
// 기타 파라미터
});
Methods
addColumn메서드(및add-column이벤트)가 변경되었습니다:
addColumn(column_data_object);
addColumn({
id: "backlog",
column: {
label: "Backlog",
collapsed: false,
...
}
});
addRow(row_data_object);
addRow({
id: "feature",
row: {
label: "Feature",
collapsed: false,
...
}
});
updateColumn메서드(및update-column이벤트)가 변경되었습니다:
updateColumn(column_data_object);
updateColumn({
id: "backlog",
column: {
label: "Backlog",
collapsed: true,
...
}
});
updateRow메서드(및update-row이벤트)가 변경되었습니다:
updateRow(row_data_object);
updateRow({
id: "feature",
row: {
label: "Feature",
collapsed: true,
...
}
});
updateCard메서드(및update-card이벤트)가 변경되었습니다:
updateCard(card_data_object);
updateCard({
id: 1,
card: {
label: "Volvo XC 70",
progress: 26
...
}
});
parse메서드가 변경되었습니다:
// 새로운 데이터를 파싱하기 전에 초기 데이터를 리셋해야 합니다
const board = new kanban.Kanban("#root", {
columns: [],
cards: [],
rows: []
});
board.parse({
columns,
cards,
rows
});
// 새로운 데이터를 파싱하기 전에 초기 데이터를 리셋할 필요가 없습니다
const board = new kanban.Kanban("#root", {});
board.parse({
columns,
cards,
rows
});