@expcat/tigercat-vue 1.0.4 → 1.0.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/dist/{chunk-XA5QMUZX.mjs → chunk-J7VTGSHX.mjs} +78 -17
- package/dist/{chunk-BDMWFNTC.js → chunk-O2Q4UYDA.js} +77 -16
- package/dist/chunk-PLGYRHPX.mjs +87 -0
- package/dist/chunk-WBY2ILFK.js +90 -0
- package/dist/components/ActivityFeed.d.mts +5 -5
- package/dist/components/ActivityFeed.d.ts +5 -5
- package/dist/components/Affix.d.mts +1 -1
- package/dist/components/Affix.d.ts +1 -1
- package/dist/components/Alert.d.mts +3 -3
- package/dist/components/Alert.d.ts +3 -3
- package/dist/components/Anchor.d.mts +1 -1
- package/dist/components/Anchor.d.ts +1 -1
- package/dist/components/AnchorLink.d.mts +1 -1
- package/dist/components/AnchorLink.d.ts +1 -1
- package/dist/components/AreaChart.d.mts +1 -1
- package/dist/components/AreaChart.d.ts +1 -1
- package/dist/components/AutoComplete.d.mts +2 -2
- package/dist/components/AutoComplete.d.ts +2 -2
- package/dist/components/Avatar.d.mts +2 -2
- package/dist/components/Avatar.d.ts +2 -2
- package/dist/components/BackTop.d.mts +1 -1
- package/dist/components/BackTop.d.ts +1 -1
- package/dist/components/Badge.d.mts +5 -5
- package/dist/components/Badge.d.ts +5 -5
- package/dist/components/BarChart.d.mts +1 -1
- package/dist/components/BarChart.d.ts +1 -1
- package/dist/components/Breadcrumb.d.mts +1 -1
- package/dist/components/Breadcrumb.d.ts +1 -1
- package/dist/components/BreadcrumbItem.d.mts +3 -3
- package/dist/components/BreadcrumbItem.d.ts +3 -3
- package/dist/components/Button.d.mts +5 -5
- package/dist/components/Button.d.ts +5 -5
- package/dist/components/Calendar.d.mts +1 -1
- package/dist/components/Calendar.d.ts +1 -1
- package/dist/components/Card.d.mts +3 -3
- package/dist/components/Card.d.ts +3 -3
- package/dist/components/Carousel.d.mts +2 -2
- package/dist/components/Carousel.d.ts +2 -2
- package/dist/components/ChatWindow.d.mts +4 -4
- package/dist/components/ChatWindow.d.ts +4 -4
- package/dist/components/Code.d.mts +1 -1
- package/dist/components/Code.d.ts +1 -1
- package/dist/components/CodeEditor.d.mts +3 -3
- package/dist/components/CodeEditor.d.ts +3 -3
- package/dist/components/Collapse.d.mts +2 -2
- package/dist/components/Collapse.d.ts +2 -2
- package/dist/components/CollapsePanel.d.mts +2 -2
- package/dist/components/CollapsePanel.d.ts +2 -2
- package/dist/components/CommentThread.d.mts +4 -4
- package/dist/components/CommentThread.d.ts +4 -4
- package/dist/components/Content.d.mts +1 -1
- package/dist/components/Content.d.ts +1 -1
- package/dist/components/CropUpload.d.mts +1 -1
- package/dist/components/CropUpload.d.ts +1 -1
- package/dist/components/DataTableWithToolbar.d.mts +8 -8
- package/dist/components/DataTableWithToolbar.d.ts +8 -8
- package/dist/components/DatePicker.d.mts +3 -3
- package/dist/components/DatePicker.d.ts +3 -3
- package/dist/components/Descriptions.d.mts +4 -4
- package/dist/components/Descriptions.d.ts +4 -4
- package/dist/components/DonutChart.d.mts +2 -2
- package/dist/components/DonutChart.d.ts +2 -2
- package/dist/components/Drawer.d.mts +5 -5
- package/dist/components/Drawer.d.ts +5 -5
- package/dist/components/Dropdown.d.mts +1 -1
- package/dist/components/Dropdown.d.ts +1 -1
- package/dist/components/DropdownItem.d.mts +1 -1
- package/dist/components/DropdownItem.d.ts +1 -1
- package/dist/components/DropdownMenu.d.mts +1 -1
- package/dist/components/DropdownMenu.d.ts +1 -1
- package/dist/components/Empty.d.mts +1 -1
- package/dist/components/Empty.d.ts +1 -1
- package/dist/components/FileManager.d.mts +1 -1
- package/dist/components/FileManager.d.ts +1 -1
- package/dist/components/FloatButton.d.mts +6 -6
- package/dist/components/FloatButton.d.ts +6 -6
- package/dist/components/Footer.d.mts +1 -1
- package/dist/components/Footer.d.ts +1 -1
- package/dist/components/Form.d.mts +1 -1
- package/dist/components/Form.d.ts +1 -1
- package/dist/components/FormWizard.d.mts +2 -2
- package/dist/components/FormWizard.d.ts +2 -2
- package/dist/components/FunnelChart.d.mts +2 -2
- package/dist/components/FunnelChart.d.ts +2 -2
- package/dist/components/GaugeChart.d.mts +1 -1
- package/dist/components/GaugeChart.d.ts +1 -1
- package/dist/components/Header.d.mts +1 -1
- package/dist/components/Header.d.ts +1 -1
- package/dist/components/HeatmapChart.d.mts +1 -1
- package/dist/components/HeatmapChart.d.ts +1 -1
- package/dist/components/Image.d.mts +3 -3
- package/dist/components/Image.d.ts +3 -3
- package/dist/components/ImageCropper.d.mts +1 -1
- package/dist/components/ImageCropper.d.ts +1 -1
- package/dist/components/InfiniteScroll.d.mts +2 -2
- package/dist/components/InfiniteScroll.d.ts +2 -2
- package/dist/components/Input.d.mts +4 -4
- package/dist/components/Input.d.ts +4 -4
- package/dist/components/InputGroup.d.mts +1 -1
- package/dist/components/InputGroup.d.ts +1 -1
- package/dist/components/InputNumber.d.mts +1 -1
- package/dist/components/InputNumber.d.ts +1 -1
- package/dist/components/Kanban.d.mts +4 -4
- package/dist/components/Kanban.d.ts +4 -4
- package/dist/components/Kanban.js +4 -3
- package/dist/components/Kanban.mjs +2 -1
- package/dist/components/Layout.d.mts +1 -1
- package/dist/components/Layout.d.ts +1 -1
- package/dist/components/LineChart.d.mts +1 -1
- package/dist/components/LineChart.d.ts +1 -1
- package/dist/components/Link.d.mts +1 -1
- package/dist/components/Link.d.ts +1 -1
- package/dist/components/List.d.mts +5 -5
- package/dist/components/List.d.ts +5 -5
- package/dist/components/Loading.d.mts +3 -3
- package/dist/components/Loading.d.ts +3 -3
- package/dist/components/Mentions.d.mts +2 -2
- package/dist/components/Mentions.d.ts +2 -2
- package/dist/components/Menu.d.mts +2 -2
- package/dist/components/Menu.d.ts +2 -2
- package/dist/components/MenuItem.d.mts +1 -1
- package/dist/components/MenuItem.d.ts +1 -1
- package/dist/components/MenuItemGroup.d.mts +1 -1
- package/dist/components/MenuItemGroup.d.ts +1 -1
- package/dist/components/Modal.d.mts +5 -5
- package/dist/components/Modal.d.ts +5 -5
- package/dist/components/NotificationCenter.d.mts +6 -6
- package/dist/components/NotificationCenter.d.ts +6 -6
- package/dist/components/Pagination.d.mts +3 -3
- package/dist/components/Pagination.d.ts +3 -3
- package/dist/components/PieChart.d.mts +2 -2
- package/dist/components/PieChart.d.ts +2 -2
- package/dist/components/Popconfirm.d.mts +1 -1
- package/dist/components/Popconfirm.d.ts +1 -1
- package/dist/components/Popover.d.mts +2 -2
- package/dist/components/Popover.d.ts +2 -2
- package/dist/components/Progress.d.mts +3 -3
- package/dist/components/Progress.d.ts +3 -3
- package/dist/components/QRCode.d.mts +2 -2
- package/dist/components/QRCode.d.ts +2 -2
- package/dist/components/RadarChart.d.mts +1 -1
- package/dist/components/RadarChart.d.ts +1 -1
- package/dist/components/Resizable.d.mts +1 -1
- package/dist/components/Resizable.d.ts +1 -1
- package/dist/components/Result.d.mts +1 -1
- package/dist/components/Result.d.ts +1 -1
- package/dist/components/RichTextEditor.d.mts +1 -1
- package/dist/components/RichTextEditor.d.ts +1 -1
- package/dist/components/Row.d.mts +1 -1
- package/dist/components/Row.d.ts +1 -1
- package/dist/components/ScatterChart.d.mts +1 -1
- package/dist/components/ScatterChart.d.ts +1 -1
- package/dist/components/Select.d.mts +1 -1
- package/dist/components/Select.d.ts +1 -1
- package/dist/components/Sidebar.d.mts +1 -1
- package/dist/components/Sidebar.d.ts +1 -1
- package/dist/components/Skeleton.d.mts +2 -2
- package/dist/components/Skeleton.d.ts +2 -2
- package/dist/components/Slider.d.mts +2 -2
- package/dist/components/Slider.d.ts +2 -2
- package/dist/components/Splitter.d.mts +2 -2
- package/dist/components/Splitter.d.ts +2 -2
- package/dist/components/Statistic.d.mts +1 -1
- package/dist/components/Statistic.d.ts +1 -1
- package/dist/components/Steps.d.mts +2 -2
- package/dist/components/Steps.d.ts +2 -2
- package/dist/components/StepsItem.d.mts +2 -2
- package/dist/components/StepsItem.d.ts +2 -2
- package/dist/components/SubMenu.d.mts +1 -1
- package/dist/components/SubMenu.d.ts +1 -1
- package/dist/components/SunburstChart.d.mts +1 -1
- package/dist/components/SunburstChart.d.ts +1 -1
- package/dist/components/TabPane.d.mts +2 -2
- package/dist/components/TabPane.d.ts +2 -2
- package/dist/components/Table.d.mts +5 -5
- package/dist/components/Table.d.ts +5 -5
- package/dist/components/Tabs.d.mts +2 -2
- package/dist/components/Tabs.d.ts +2 -2
- package/dist/components/Tag.d.mts +2 -2
- package/dist/components/Tag.d.ts +2 -2
- package/dist/components/TaskBoard.d.mts +54 -3
- package/dist/components/TaskBoard.d.ts +54 -3
- package/dist/components/TaskBoard.js +3 -3
- package/dist/components/TaskBoard.mjs +1 -1
- package/dist/components/Text.d.mts +2 -2
- package/dist/components/Text.d.ts +2 -2
- package/dist/components/Textarea.d.mts +1 -1
- package/dist/components/Textarea.d.ts +1 -1
- package/dist/components/TimePicker.d.mts +4 -4
- package/dist/components/TimePicker.d.ts +4 -4
- package/dist/components/Timeline.d.mts +3 -3
- package/dist/components/Timeline.d.ts +3 -3
- package/dist/components/Tooltip.d.mts +2 -2
- package/dist/components/Tooltip.d.ts +2 -2
- package/dist/components/Tour.d.mts +1 -1
- package/dist/components/Tour.d.ts +1 -1
- package/dist/components/Tree.d.mts +3 -3
- package/dist/components/Tree.d.ts +3 -3
- package/dist/components/TreeMapChart.d.mts +1 -1
- package/dist/components/TreeMapChart.d.ts +1 -1
- package/dist/components/Upload.d.mts +4 -4
- package/dist/components/Upload.d.ts +4 -4
- package/dist/components/VirtualTable.d.mts +3 -3
- package/dist/components/VirtualTable.d.ts +3 -3
- package/dist/components/Watermark.d.mts +2 -2
- package/dist/components/Watermark.d.ts +2 -2
- package/dist/index.js +7 -7
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
- package/dist/chunk-33C5E3AQ.mjs +0 -328
- package/dist/chunk-CXJUEG75.js +0 -331
package/dist/chunk-CXJUEG75.js
DELETED
|
@@ -1,331 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkV4PBWEAU_js = require('./chunk-V4PBWEAU.js');
|
|
4
|
-
var vue = require('vue');
|
|
5
|
-
var tigercatCore = require('@expcat/tigercat-core');
|
|
6
|
-
|
|
7
|
-
var Kanban = vue.defineComponent({
|
|
8
|
-
name: "TigerKanban",
|
|
9
|
-
inheritAttrs: false,
|
|
10
|
-
props: {
|
|
11
|
-
columns: {
|
|
12
|
-
type: Array,
|
|
13
|
-
default: void 0
|
|
14
|
-
},
|
|
15
|
-
defaultColumns: {
|
|
16
|
-
type: Array,
|
|
17
|
-
default: () => []
|
|
18
|
-
},
|
|
19
|
-
draggable: { type: Boolean, default: true },
|
|
20
|
-
columnDraggable: { type: Boolean, default: true },
|
|
21
|
-
enforceWipLimit: { type: Boolean, default: false },
|
|
22
|
-
beforeCardMove: {
|
|
23
|
-
type: Function,
|
|
24
|
-
default: void 0
|
|
25
|
-
},
|
|
26
|
-
beforeColumnMove: {
|
|
27
|
-
type: Function,
|
|
28
|
-
default: void 0
|
|
29
|
-
},
|
|
30
|
-
onCardAdd: {
|
|
31
|
-
type: Function,
|
|
32
|
-
default: void 0
|
|
33
|
-
},
|
|
34
|
-
filterText: { type: String, default: "" },
|
|
35
|
-
hiddenColumns: {
|
|
36
|
-
type: Array,
|
|
37
|
-
default: () => []
|
|
38
|
-
},
|
|
39
|
-
showCardCount: { type: Boolean, default: true },
|
|
40
|
-
allowAddCard: { type: Boolean, default: true },
|
|
41
|
-
allowAddColumn: { type: Boolean, default: false },
|
|
42
|
-
locale: {
|
|
43
|
-
type: Object,
|
|
44
|
-
default: void 0
|
|
45
|
-
},
|
|
46
|
-
className: { type: String, default: void 0 },
|
|
47
|
-
style: {
|
|
48
|
-
type: Object,
|
|
49
|
-
default: void 0
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
emits: ["card-move", "column-move", "update:columns", "card-add", "column-add"],
|
|
53
|
-
setup(props, { emit, attrs, slots }) {
|
|
54
|
-
const config = chunkV4PBWEAU_js.useTigerConfig();
|
|
55
|
-
const boardRef = vue.ref(null);
|
|
56
|
-
const internalColumns = vue.ref(props.defaultColumns ?? []);
|
|
57
|
-
const isControlled = vue.computed(() => props.columns !== void 0);
|
|
58
|
-
const rawColumns = vue.computed(() => isControlled.value ? props.columns : internalColumns.value);
|
|
59
|
-
const visibleColumns = vue.computed(
|
|
60
|
-
() => tigercatCore.filterColumns(rawColumns.value, props.filterText || "", props.hiddenColumns)
|
|
61
|
-
);
|
|
62
|
-
vue.watch(
|
|
63
|
-
() => props.columns,
|
|
64
|
-
(v) => {
|
|
65
|
-
if (v) internalColumns.value = v;
|
|
66
|
-
}
|
|
67
|
-
);
|
|
68
|
-
function updateColumns(cols) {
|
|
69
|
-
if (!isControlled.value) internalColumns.value = cols;
|
|
70
|
-
emit("update:columns", cols);
|
|
71
|
-
}
|
|
72
|
-
const merged = vue.computed(() => tigercatCore.mergeTigerLocale(config.value.locale, props.locale));
|
|
73
|
-
const labels = vue.computed(() => tigercatCore.getTaskBoardLabels(merged.value));
|
|
74
|
-
const dragState = vue.ref(null);
|
|
75
|
-
const dropTargetCol = vue.ref(null);
|
|
76
|
-
const dropTargetIdx = vue.ref(-1);
|
|
77
|
-
const dragType = vue.computed(() => dragState.value?.type ?? null);
|
|
78
|
-
function onCardDragStart(e, card, colId, idx) {
|
|
79
|
-
if (!props.draggable || !e.dataTransfer) return;
|
|
80
|
-
tigercatCore.setDragData(e.dataTransfer, tigercatCore.createCardDragData(card.id, colId, idx));
|
|
81
|
-
dragState.value = { type: "card", id: card.id, fromColumnId: colId, fromIndex: idx };
|
|
82
|
-
}
|
|
83
|
-
function onColumnDragStart(e, colId, idx) {
|
|
84
|
-
if (!props.columnDraggable || !e.dataTransfer) return;
|
|
85
|
-
tigercatCore.setDragData(e.dataTransfer, tigercatCore.createColumnDragData(colId, idx));
|
|
86
|
-
dragState.value = { type: "column", id: colId, fromIndex: idx };
|
|
87
|
-
}
|
|
88
|
-
function onDragOver(e, colId) {
|
|
89
|
-
e.preventDefault();
|
|
90
|
-
if (!dragState.value) return;
|
|
91
|
-
dropTargetCol.value = colId;
|
|
92
|
-
if (dragState.value.type === "card") {
|
|
93
|
-
const colEl = e.currentTarget.querySelector("[data-kanban-body]");
|
|
94
|
-
if (colEl) {
|
|
95
|
-
const cards = Array.from(colEl.querySelectorAll("[data-kanban-card]"));
|
|
96
|
-
const rects = cards.map((c) => c.getBoundingClientRect());
|
|
97
|
-
dropTargetIdx.value = tigercatCore.getDropIndex(e.clientY, rects);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
function onColumnDragOver(e) {
|
|
102
|
-
e.preventDefault();
|
|
103
|
-
if (!dragState.value || dragState.value.type !== "column") return;
|
|
104
|
-
const boardEl = boardRef.value;
|
|
105
|
-
if (!boardEl) return;
|
|
106
|
-
const cols = Array.from(boardEl.querySelectorAll("[data-kanban-column]"));
|
|
107
|
-
const rects = cols.map((c) => c.getBoundingClientRect());
|
|
108
|
-
dropTargetIdx.value = tigercatCore.getColumnDropIndex(e.clientX, rects);
|
|
109
|
-
}
|
|
110
|
-
async function onDrop(e) {
|
|
111
|
-
e.preventDefault();
|
|
112
|
-
if (!dragState.value || !e.dataTransfer) return;
|
|
113
|
-
const data = tigercatCore.parseDragData(e.dataTransfer);
|
|
114
|
-
if (!data) return;
|
|
115
|
-
const cols = rawColumns.value;
|
|
116
|
-
if (data.type === "card" && dropTargetCol.value != null) {
|
|
117
|
-
if (props.beforeCardMove) {
|
|
118
|
-
const evt = {
|
|
119
|
-
cardId: data.cardId,
|
|
120
|
-
fromColumnId: data.columnId,
|
|
121
|
-
toColumnId: dropTargetCol.value,
|
|
122
|
-
fromIndex: data.index,
|
|
123
|
-
toIndex: dropTargetIdx.value
|
|
124
|
-
};
|
|
125
|
-
const ok = await props.beforeCardMove(evt);
|
|
126
|
-
if (!ok) {
|
|
127
|
-
resetDrag();
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
const result = tigercatCore.moveCard(
|
|
132
|
-
cols,
|
|
133
|
-
data.cardId,
|
|
134
|
-
data.columnId,
|
|
135
|
-
dropTargetCol.value,
|
|
136
|
-
dropTargetIdx.value,
|
|
137
|
-
{ enforceWipLimit: props.enforceWipLimit }
|
|
138
|
-
);
|
|
139
|
-
if (result) {
|
|
140
|
-
updateColumns(result.columns);
|
|
141
|
-
emit("card-move", result.event);
|
|
142
|
-
}
|
|
143
|
-
} else if (data.type === "column") {
|
|
144
|
-
if (props.beforeColumnMove) {
|
|
145
|
-
const evt = {
|
|
146
|
-
columnId: data.columnId,
|
|
147
|
-
fromIndex: data.index,
|
|
148
|
-
toIndex: dropTargetIdx.value
|
|
149
|
-
};
|
|
150
|
-
const ok = await props.beforeColumnMove(evt);
|
|
151
|
-
if (!ok) {
|
|
152
|
-
resetDrag();
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
const result = tigercatCore.reorderColumns(cols, data.index, dropTargetIdx.value);
|
|
157
|
-
if (result) {
|
|
158
|
-
updateColumns(result.columns);
|
|
159
|
-
emit("column-move", result.event);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
resetDrag();
|
|
163
|
-
}
|
|
164
|
-
function onDragEnd() {
|
|
165
|
-
resetDrag();
|
|
166
|
-
}
|
|
167
|
-
function resetDrag() {
|
|
168
|
-
dragState.value = null;
|
|
169
|
-
dropTargetCol.value = null;
|
|
170
|
-
dropTargetIdx.value = -1;
|
|
171
|
-
}
|
|
172
|
-
const containerClasses = vue.computed(
|
|
173
|
-
() => tigercatCore.classNames(tigercatCore.getKanbanContainerClasses(props.className), tigercatCore.coerceClassValue(attrs.class))
|
|
174
|
-
);
|
|
175
|
-
const containerStyle = vue.computed(() => tigercatCore.mergeStyleValues(attrs.style, props.style));
|
|
176
|
-
return () => {
|
|
177
|
-
const children = visibleColumns.value.map((col, colIdx) => {
|
|
178
|
-
const wipExceeded = tigercatCore.isWipExceeded(col);
|
|
179
|
-
const cardCount = tigercatCore.getColumnCardCount(col);
|
|
180
|
-
const isDragOverCol = dropTargetCol.value === col.id;
|
|
181
|
-
const isColDragging = dragState.value?.type === "column" && dragState.value.id === col.id;
|
|
182
|
-
const headerContent = [
|
|
183
|
-
slots["column-header"] ? slots["column-header"]({ column: col }) : vue.h("span", {}, tigercatCore.resolveLocaleText(col.title)),
|
|
184
|
-
props.showCardCount ? vue.h(
|
|
185
|
-
"span",
|
|
186
|
-
{
|
|
187
|
-
class: tigercatCore.classNames(
|
|
188
|
-
tigercatCore.kanbanCardCountClasses,
|
|
189
|
-
wipExceeded && tigercatCore.taskBoardWipExceededClasses
|
|
190
|
-
)
|
|
191
|
-
},
|
|
192
|
-
cardCount.limit ? `${cardCount.count}/${cardCount.limit}` : `${cardCount.count}`
|
|
193
|
-
) : null
|
|
194
|
-
];
|
|
195
|
-
const header = vue.h(
|
|
196
|
-
"div",
|
|
197
|
-
{
|
|
198
|
-
class: tigercatCore.classNames(
|
|
199
|
-
tigercatCore.taskBoardColumnHeaderClasses,
|
|
200
|
-
wipExceeded && tigercatCore.taskBoardWipExceededClasses
|
|
201
|
-
)
|
|
202
|
-
},
|
|
203
|
-
headerContent
|
|
204
|
-
);
|
|
205
|
-
const cardEls = col.cards.map((card, cardIdx) => {
|
|
206
|
-
const isCardDragging = dragState.value?.type === "card" && dragState.value.id === card.id;
|
|
207
|
-
return vue.h(
|
|
208
|
-
"div",
|
|
209
|
-
{
|
|
210
|
-
key: card.id,
|
|
211
|
-
class: tigercatCore.classNames(
|
|
212
|
-
tigercatCore.taskBoardCardClasses,
|
|
213
|
-
isCardDragging && tigercatCore.taskBoardCardDraggingClasses
|
|
214
|
-
),
|
|
215
|
-
draggable: props.draggable,
|
|
216
|
-
"data-kanban-card": "",
|
|
217
|
-
onDragstart: (e) => onCardDragStart(e, card, col.id, cardIdx)
|
|
218
|
-
},
|
|
219
|
-
slots.card ? slots.card({ card, columnId: col.id }) : [
|
|
220
|
-
vue.h("div", { class: "font-medium text-sm" }, tigercatCore.resolveLocaleText(card.title)),
|
|
221
|
-
card.description ? vue.h(
|
|
222
|
-
"div",
|
|
223
|
-
{ class: "text-xs text-[var(--tiger-text-muted,#6b7280)] mt-1" },
|
|
224
|
-
card.description
|
|
225
|
-
) : null
|
|
226
|
-
]
|
|
227
|
-
);
|
|
228
|
-
});
|
|
229
|
-
if (isDragOverCol && dragType.value === "card" && dropTargetIdx.value >= 0) {
|
|
230
|
-
cardEls.splice(
|
|
231
|
-
dropTargetIdx.value,
|
|
232
|
-
0,
|
|
233
|
-
vue.h("div", {
|
|
234
|
-
key: "__drop-indicator",
|
|
235
|
-
class: tigercatCore.taskBoardDropIndicatorClasses
|
|
236
|
-
})
|
|
237
|
-
);
|
|
238
|
-
}
|
|
239
|
-
const body = vue.h(
|
|
240
|
-
"div",
|
|
241
|
-
{
|
|
242
|
-
class: tigercatCore.taskBoardColumnBodyClasses,
|
|
243
|
-
"data-kanban-body": ""
|
|
244
|
-
},
|
|
245
|
-
cardEls.length > 0 ? cardEls : [
|
|
246
|
-
vue.h(
|
|
247
|
-
"div",
|
|
248
|
-
{ class: tigercatCore.taskBoardEmptyClasses },
|
|
249
|
-
tigercatCore.resolveLocaleText(labels.value.emptyColumnText)
|
|
250
|
-
)
|
|
251
|
-
]
|
|
252
|
-
);
|
|
253
|
-
const addBtn = props.allowAddCard ? vue.h(
|
|
254
|
-
"div",
|
|
255
|
-
{
|
|
256
|
-
class: tigercatCore.kanbanAddCardClasses,
|
|
257
|
-
role: "button",
|
|
258
|
-
tabindex: 0,
|
|
259
|
-
onClick: () => {
|
|
260
|
-
props.onCardAdd?.(col.id);
|
|
261
|
-
emit("card-add", col.id);
|
|
262
|
-
},
|
|
263
|
-
onKeydown: (e) => {
|
|
264
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
265
|
-
e.preventDefault();
|
|
266
|
-
props.onCardAdd?.(col.id);
|
|
267
|
-
emit("card-add", col.id);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
},
|
|
271
|
-
"+ " + tigercatCore.resolveLocaleText(labels.value.addCardText)
|
|
272
|
-
) : null;
|
|
273
|
-
return vue.h(
|
|
274
|
-
"div",
|
|
275
|
-
{
|
|
276
|
-
key: col.id,
|
|
277
|
-
class: tigercatCore.classNames(
|
|
278
|
-
tigercatCore.taskBoardColumnClasses,
|
|
279
|
-
isDragOverCol && dragType.value === "card" && tigercatCore.taskBoardColumnDropTargetClasses,
|
|
280
|
-
isColDragging && tigercatCore.taskBoardColumnDraggingClasses
|
|
281
|
-
),
|
|
282
|
-
"data-kanban-column": "",
|
|
283
|
-
draggable: props.columnDraggable,
|
|
284
|
-
onDragstart: (e) => onColumnDragStart(e, col.id, colIdx),
|
|
285
|
-
onDragover: (e) => onDragOver(e, col.id),
|
|
286
|
-
onDrop,
|
|
287
|
-
onDragend: onDragEnd
|
|
288
|
-
},
|
|
289
|
-
[header, body, addBtn]
|
|
290
|
-
);
|
|
291
|
-
});
|
|
292
|
-
if (props.allowAddColumn) {
|
|
293
|
-
children.push(
|
|
294
|
-
vue.h(
|
|
295
|
-
"div",
|
|
296
|
-
{
|
|
297
|
-
key: "__add-column",
|
|
298
|
-
class: tigercatCore.kanbanAddColumnClasses,
|
|
299
|
-
role: "button",
|
|
300
|
-
tabindex: 0,
|
|
301
|
-
onClick: () => emit("column-add"),
|
|
302
|
-
onKeydown: (e) => {
|
|
303
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
304
|
-
e.preventDefault();
|
|
305
|
-
emit("column-add");
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
|
-
"+ " + tigercatCore.resolveLocaleText(labels.value.addCardText)
|
|
310
|
-
)
|
|
311
|
-
);
|
|
312
|
-
}
|
|
313
|
-
return vue.h(
|
|
314
|
-
"div",
|
|
315
|
-
{
|
|
316
|
-
ref: boardRef,
|
|
317
|
-
class: containerClasses.value,
|
|
318
|
-
style: containerStyle.value,
|
|
319
|
-
role: "region",
|
|
320
|
-
"aria-label": "Kanban board",
|
|
321
|
-
onDragover: onColumnDragOver
|
|
322
|
-
},
|
|
323
|
-
children
|
|
324
|
-
);
|
|
325
|
-
};
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
var Kanban_default = Kanban;
|
|
329
|
-
|
|
330
|
-
exports.Kanban = Kanban;
|
|
331
|
-
exports.Kanban_default = Kanban_default;
|