pixelize-design-library 2.2.129 → 2.2.130
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.
|
@@ -172,11 +172,11 @@ var KanbanBoard = function (_a) {
|
|
|
172
172
|
};
|
|
173
173
|
var NoItemsTemplate = function (_a) {
|
|
174
174
|
var _b;
|
|
175
|
-
var
|
|
175
|
+
var column = _a.column;
|
|
176
176
|
return (react_1.default.createElement(react_2.Box, null,
|
|
177
177
|
react_1.default.createElement(react_2.Flex, { flexDirection: "column", alignItems: "center", justifyContent: "center", gap: 2 },
|
|
178
178
|
react_1.default.createElement(react_2.Text, { fontSize: "sm", color: (_b = colors === null || colors === void 0 ? void 0 : colors.text) === null || _b === void 0 ? void 0 : _b[600], textAlign: "center", mt: 4 }, (noItems === null || noItems === void 0 ? void 0 : noItems.text) || "No items in this column"),
|
|
179
|
-
react_1.default.createElement(Button_1.default, { onClick: function () { var _a; return (_a = noItems === null || noItems === void 0 ? void 0 : noItems.onClick) === null || _a === void 0 ? void 0 : _a.call(noItems,
|
|
179
|
+
react_1.default.createElement(Button_1.default, { onClick: function () { var _a; return (_a = noItems === null || noItems === void 0 ? void 0 : noItems.onClick) === null || _a === void 0 ? void 0 : _a.call(noItems, column); }, size: "xs" }, (noItems === null || noItems === void 0 ? void 0 : noItems.buttonText) || "Add Item"))));
|
|
180
180
|
};
|
|
181
181
|
if (!canView)
|
|
182
182
|
return null;
|
|
@@ -233,7 +233,6 @@ var KanbanBoard = function (_a) {
|
|
|
233
233
|
react_1.default.createElement(OverflowTooltipText_1.default, { placement: "top" }, column.title)),
|
|
234
234
|
canDelete && hoveredColumn === colId && column.items.length > 0 && (react_1.default.createElement(react_2.Box, { as: lucide_react_1.Trash2, size: 16, cursor: "pointer", color: (_j = colors === null || colors === void 0 ? void 0 : colors.text) === null || _j === void 0 ? void 0 : _j[600], _hover: { color: (_k = colors === null || colors === void 0 ? void 0 : colors.red) === null || _k === void 0 ? void 0 : _k[600] }, onClick: function () { return handleColumnDelete(colId); }, transition: "color 0.2s ease" })),
|
|
235
235
|
!(canDelete && hoveredColumn === colId && column.items.length > 0) && (react_1.default.createElement(react_2.Box, { width: "16px", height: "16px" }))),
|
|
236
|
-
(noItems === null || noItems === void 0 ? void 0 : noItems.isVisible) && column.items.length === 0 && react_1.default.createElement(NoItemsTemplate, { colId: colId }),
|
|
237
236
|
react_1.default.createElement(react_2.Box, { px: 2,
|
|
238
237
|
// pb={2}
|
|
239
238
|
flex: "1", overflowY: "auto", width: "100%",
|
|
@@ -270,20 +269,22 @@ var KanbanBoard = function (_a) {
|
|
|
270
269
|
scrollbarGutter: "stable both-edges",
|
|
271
270
|
},
|
|
272
271
|
cursor: canDrag ? "grab" : "not-allowed",
|
|
273
|
-
} },
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
272
|
+
} },
|
|
273
|
+
(noItems === null || noItems === void 0 ? void 0 : noItems.isVisible) && column.items.length === 0 && react_1.default.createElement(NoItemsTemplate, { column: column }),
|
|
274
|
+
virtualization ? (react_1.default.createElement(react_window_1.VariableSizeList, { ref: function (el) {
|
|
275
|
+
if (el)
|
|
276
|
+
listRefs.current[colId] = el;
|
|
277
|
+
}, height: containerHeight - 150, itemCount: column.items.length, itemSize: function (index) { return getItemSize(index, column.items, colId); }, width: "100%", itemData: {
|
|
278
|
+
items: column.items,
|
|
279
|
+
colId: colId,
|
|
280
|
+
placeholder: provided.placeholder,
|
|
281
|
+
} }, Row)) : (react_1.default.createElement(react_2.Box, null,
|
|
282
|
+
column.items.map(function (account, index) { return (react_1.default.createElement("div", { key: account.id, style: { marginBottom: 12 } },
|
|
283
|
+
react_1.default.createElement(dnd_1.Draggable, { draggableId: account.id.toString(), index: index, key: account.id, isDragDisabled: !canDrag }, function (provided) { return (react_1.default.createElement("div", __assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { style: provided.draggableProps.style }),
|
|
284
|
+
react_1.default.createElement(AccountCard_1.default, { account: account, index: index, onDelete: onDelete, onOpen: onOpen, isExpanded: expanded[account.id], onToggleExpand: function () {
|
|
285
|
+
return toggleExpand(account.id, colId, index);
|
|
286
|
+
}, isDeletable: canDelete }))); }))); }),
|
|
287
|
+
provided.placeholder)))));
|
|
287
288
|
}));
|
|
288
289
|
}))))));
|
|
289
290
|
};
|