@industry-theme/backlogmd-kanban-panel 1.0.9 → 1.0.10
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KanbanPanel.d.ts","sourceRoot":"","sources":["../../src/panels/KanbanPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"KanbanPanel.d.ts","sourceRoot":"","sources":["../../src/panels/KanbanPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAG9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAyWpD;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAMrD,CAAC"}
|
|
@@ -12,6 +12,8 @@ interface KanbanColumnProps {
|
|
|
12
12
|
/** Callback to load more tasks */
|
|
13
13
|
onLoadMore?: () => void;
|
|
14
14
|
onTaskClick?: (task: Task) => void;
|
|
15
|
+
/** Whether column should take full width (for narrow/mobile views) */
|
|
16
|
+
fullWidth?: boolean;
|
|
15
17
|
}
|
|
16
18
|
export declare const KanbanColumn: React.FC<KanbanColumnProps>;
|
|
17
19
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KanbanColumn.d.ts","sourceRoot":"","sources":["../../../../src/panels/kanban/components/KanbanColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,UAAU,iBAAiB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oDAAoD;IACpD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"KanbanColumn.d.ts","sourceRoot":"","sources":["../../../../src/panels/kanban/components/KanbanColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,UAAU,iBAAiB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oDAAoD;IACpD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,sEAAsE;IACtE,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAsRpD,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -3,7 +3,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
5
5
|
import * as React2 from "react";
|
|
6
|
-
import React2__default, { forwardRef, createElement, createContext, useState, useEffect, useContext, useRef, useCallback, useImperativeHandle, useMemo
|
|
6
|
+
import React2__default, { forwardRef, createElement, createContext, useState, useEffect, useContext, useRef, useCallback, useLayoutEffect, useImperativeHandle, useMemo } from "react";
|
|
7
7
|
import { createPortal } from "react-dom";
|
|
8
8
|
/**
|
|
9
9
|
* @license lucide-react v0.552.0 - ISC
|
|
@@ -1818,7 +1818,8 @@ const KanbanColumn = ({
|
|
|
1818
1818
|
hasMore = false,
|
|
1819
1819
|
isLoadingMore = false,
|
|
1820
1820
|
onLoadMore,
|
|
1821
|
-
onTaskClick
|
|
1821
|
+
onTaskClick,
|
|
1822
|
+
fullWidth = false
|
|
1822
1823
|
}) => {
|
|
1823
1824
|
const { theme: theme2 } = useTheme();
|
|
1824
1825
|
const getPriorityColor = (priority) => {
|
|
@@ -1840,8 +1841,8 @@ const KanbanColumn = ({
|
|
|
1840
1841
|
style: {
|
|
1841
1842
|
flex: "1 1 0",
|
|
1842
1843
|
// Grow to fill available width equally
|
|
1843
|
-
minWidth: "280px",
|
|
1844
|
-
maxWidth: "500px",
|
|
1844
|
+
minWidth: fullWidth ? void 0 : "280px",
|
|
1845
|
+
maxWidth: fullWidth ? void 0 : "500px",
|
|
1845
1846
|
// Cap max width for readability
|
|
1846
1847
|
height: "100%",
|
|
1847
1848
|
// Fill parent height
|
|
@@ -1905,7 +1906,11 @@ const KanbanColumn = ({
|
|
|
1905
1906
|
flexDirection: "column",
|
|
1906
1907
|
gap: "8px",
|
|
1907
1908
|
overflowY: "auto",
|
|
1908
|
-
|
|
1909
|
+
overflowX: "hidden",
|
|
1910
|
+
WebkitOverflowScrolling: "touch",
|
|
1911
|
+
// Add padding for scroll content, use margin trick to prevent clipping
|
|
1912
|
+
paddingRight: "4px",
|
|
1913
|
+
marginRight: "-4px"
|
|
1909
1914
|
},
|
|
1910
1915
|
children: [
|
|
1911
1916
|
tasks.map((task) => /* @__PURE__ */ jsxs(
|
|
@@ -2084,7 +2089,8 @@ const KanbanColumn = ({
|
|
|
2084
2089
|
"Loading..."
|
|
2085
2090
|
] }) : `Load more (${remaining} remaining)`
|
|
2086
2091
|
}
|
|
2087
|
-
)
|
|
2092
|
+
),
|
|
2093
|
+
/* @__PURE__ */ jsx("div", { style: { flexShrink: 0, height: "4px" } })
|
|
2088
2094
|
]
|
|
2089
2095
|
}
|
|
2090
2096
|
),
|
|
@@ -2354,6 +2360,20 @@ const KanbanPanelContent = ({
|
|
|
2354
2360
|
var _a, _b;
|
|
2355
2361
|
const { theme: theme2 } = useTheme();
|
|
2356
2362
|
const [_selectedTask, setSelectedTask] = useState(null);
|
|
2363
|
+
const [selectedTab, setSelectedTab] = useState("todo");
|
|
2364
|
+
const [isNarrowView, setIsNarrowView] = useState(false);
|
|
2365
|
+
const containerRef = useRef(null);
|
|
2366
|
+
useLayoutEffect(() => {
|
|
2367
|
+
const container = containerRef.current;
|
|
2368
|
+
if (!container) return;
|
|
2369
|
+
const observer = new ResizeObserver((entries) => {
|
|
2370
|
+
for (const entry of entries) {
|
|
2371
|
+
setIsNarrowView(entry.contentRect.width < 768);
|
|
2372
|
+
}
|
|
2373
|
+
});
|
|
2374
|
+
observer.observe(container);
|
|
2375
|
+
return () => observer.disconnect();
|
|
2376
|
+
}, []);
|
|
2357
2377
|
const {
|
|
2358
2378
|
statusColumns,
|
|
2359
2379
|
tasksByStatus,
|
|
@@ -2444,6 +2464,7 @@ const KanbanPanelContent = ({
|
|
|
2444
2464
|
return /* @__PURE__ */ jsxs(
|
|
2445
2465
|
"div",
|
|
2446
2466
|
{
|
|
2467
|
+
ref: containerRef,
|
|
2447
2468
|
style: {
|
|
2448
2469
|
padding: "clamp(12px, 3vw, 20px)",
|
|
2449
2470
|
// Responsive padding for mobile
|
|
@@ -2565,44 +2586,103 @@ const KanbanPanelContent = ({
|
|
|
2565
2586
|
canInitialize,
|
|
2566
2587
|
onInitialize: handleInitialize
|
|
2567
2588
|
}
|
|
2568
|
-
) : /* @__PURE__ */
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2589
|
+
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2590
|
+
isNarrowView && /* @__PURE__ */ jsx(
|
|
2591
|
+
"div",
|
|
2592
|
+
{
|
|
2593
|
+
style: {
|
|
2594
|
+
flexShrink: 0,
|
|
2595
|
+
display: "flex",
|
|
2596
|
+
gap: "4px",
|
|
2597
|
+
background: theme2.colors.backgroundSecondary,
|
|
2598
|
+
borderRadius: theme2.radii[2],
|
|
2599
|
+
padding: "4px"
|
|
2600
|
+
},
|
|
2601
|
+
children: statusColumns.map((status) => {
|
|
2602
|
+
const isSelected = status === selectedTab;
|
|
2603
|
+
const statusState = tasksByStatus.get(status);
|
|
2604
|
+
const count = (statusState == null ? void 0 : statusState.count) || 0;
|
|
2605
|
+
return /* @__PURE__ */ jsxs(
|
|
2606
|
+
"button",
|
|
2607
|
+
{
|
|
2608
|
+
onClick: () => setSelectedTab(status),
|
|
2609
|
+
style: {
|
|
2610
|
+
flex: 1,
|
|
2611
|
+
padding: "10px 12px",
|
|
2612
|
+
border: "none",
|
|
2613
|
+
borderRadius: theme2.radii[1],
|
|
2614
|
+
background: isSelected ? theme2.colors.primary : "transparent",
|
|
2615
|
+
color: isSelected ? theme2.colors.background : theme2.colors.textSecondary,
|
|
2616
|
+
fontSize: theme2.fontSizes[1],
|
|
2617
|
+
fontWeight: theme2.fontWeights.medium,
|
|
2618
|
+
cursor: "pointer",
|
|
2619
|
+
transition: "all 0.2s ease",
|
|
2620
|
+
display: "flex",
|
|
2621
|
+
alignItems: "center",
|
|
2622
|
+
justifyContent: "center",
|
|
2623
|
+
gap: "6px"
|
|
2624
|
+
},
|
|
2625
|
+
children: [
|
|
2626
|
+
STATUS_DISPLAY_LABELS[status],
|
|
2627
|
+
/* @__PURE__ */ jsx(
|
|
2628
|
+
"span",
|
|
2629
|
+
{
|
|
2630
|
+
style: {
|
|
2631
|
+
background: isSelected ? "rgba(255,255,255,0.2)" : theme2.colors.background,
|
|
2632
|
+
padding: "2px 6px",
|
|
2633
|
+
borderRadius: theme2.radii[1],
|
|
2634
|
+
fontSize: theme2.fontSizes[0]
|
|
2635
|
+
},
|
|
2636
|
+
children: count
|
|
2637
|
+
}
|
|
2638
|
+
)
|
|
2639
|
+
]
|
|
2640
|
+
},
|
|
2641
|
+
status
|
|
2642
|
+
);
|
|
2643
|
+
})
|
|
2644
|
+
}
|
|
2645
|
+
),
|
|
2646
|
+
/* @__PURE__ */ jsx(
|
|
2647
|
+
"div",
|
|
2648
|
+
{
|
|
2649
|
+
style: {
|
|
2650
|
+
flex: 1,
|
|
2651
|
+
display: "flex",
|
|
2652
|
+
gap: "16px",
|
|
2653
|
+
justifyContent: "center",
|
|
2654
|
+
// Center columns when they hit max-width
|
|
2655
|
+
overflowX: isNarrowView ? "hidden" : "auto",
|
|
2656
|
+
overflowY: "hidden",
|
|
2657
|
+
paddingBottom: "8px",
|
|
2658
|
+
minHeight: 0,
|
|
2659
|
+
// Allow flex child to shrink below content size
|
|
2660
|
+
WebkitOverflowScrolling: "touch"
|
|
2661
|
+
// Smooth scrolling on iOS
|
|
2662
|
+
},
|
|
2663
|
+
children: statusColumns.filter((status) => !isNarrowView || status === selectedTab).map((status) => {
|
|
2664
|
+
const statusState = tasksByStatus.get(status);
|
|
2665
|
+
const columnTasks = (statusState == null ? void 0 : statusState.tasks) || [];
|
|
2666
|
+
const isCompleted = status === "completed";
|
|
2667
|
+
const completedState = columnStates.get("completed");
|
|
2668
|
+
return /* @__PURE__ */ jsx(
|
|
2669
|
+
KanbanColumn,
|
|
2670
|
+
{
|
|
2671
|
+
status: STATUS_DISPLAY_LABELS[status],
|
|
2672
|
+
tasks: columnTasks,
|
|
2673
|
+
total: isCompleted ? completedState == null ? void 0 : completedState.total : void 0,
|
|
2674
|
+
hasMore: isCompleted ? completedState == null ? void 0 : completedState.hasMore : false,
|
|
2675
|
+
isLoadingMore: isCompleted ? completedState == null ? void 0 : completedState.isLoadingMore : false,
|
|
2676
|
+
onLoadMore: isCompleted ? () => loadMore("completed") : void 0,
|
|
2677
|
+
onTaskClick: handleTaskClick,
|
|
2678
|
+
fullWidth: isNarrowView
|
|
2679
|
+
},
|
|
2680
|
+
status
|
|
2681
|
+
);
|
|
2682
|
+
})
|
|
2683
|
+
}
|
|
2684
|
+
)
|
|
2685
|
+
] })
|
|
2606
2686
|
]
|
|
2607
2687
|
}
|
|
2608
2688
|
);
|