@industry-theme/backlogmd-kanban-panel 1.0.5 → 1.0.6

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,KAAgC,MAAM,OAAO,CAAC;AAGrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AA6LpD;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAMrD,CAAC"}
1
+ {"version":3,"file":"KanbanPanel.d.ts","sourceRoot":"","sources":["../../src/panels/KanbanPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAGrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAmMpD;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAMrD,CAAC"}
@@ -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;CACpC;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAyQpD,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;CACpC;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA8QpD,CAAC"}
@@ -7,6 +7,7 @@
7
7
  import type { Task } from '@backlog-md/core';
8
8
  /**
9
9
  * Generate mock tasks for testing the kanban board
10
+ * Creates 25 active tasks and 10 completed tasks to test pagination
10
11
  */
11
12
  export declare function generateMockTasks(): Task[];
12
13
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"mockData.d.ts","sourceRoot":"","sources":["../../../../src/panels/kanban/mocks/mockData.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,EAAE,CAuJ1C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAE7C;AAED;;GAEG;AACH,wBAAgB,kBAAkB;;;;;;;;;;;;EAcjC"}
1
+ {"version":3,"file":"mockData.d.ts","sourceRoot":"","sources":["../../../../src/panels/kanban/mocks/mockData.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAsE7C;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,EAAE,CAqD1C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAE7C;AAED;;GAEG;AACH,wBAAgB,kBAAkB;;;;;;;;;;;;EAcjC"}
@@ -954,25 +954,18 @@ class Core {
954
954
  const tasksLimit = (options == null ? void 0 : options.tasksLimit) ?? 10;
955
955
  const completedLimit = (options == null ? void 0 : options.completedLimit) ?? 10;
956
956
  const offset = (options == null ? void 0 : options.offset) ?? 0;
957
- const tasksSortDirection = (options == null ? void 0 : options.tasksSortDirection) ?? "asc";
957
+ (options == null ? void 0 : options.tasksSortDirection) ?? "asc";
958
958
  const completedSortByIdDesc = (options == null ? void 0 : options.completedSortByIdDesc) ?? true;
959
959
  const sources = ["tasks", "completed"];
960
960
  const bySource = /* @__PURE__ */ new Map();
961
961
  for (const source of sources) {
962
962
  let entries = Array.from(this.taskIndex.values()).filter((e) => e.source === source);
963
963
  const limit = source === "tasks" ? tasksLimit : completedLimit;
964
- if (source === "completed" && completedSortByIdDesc) {
965
- entries = entries.sort((a, b) => {
966
- const aNum = parseInt(a.id.replace(/\D/g, ""), 10) || 0;
967
- const bNum = parseInt(b.id.replace(/\D/g, ""), 10) || 0;
968
- return bNum - aNum;
969
- });
970
- } else {
971
- entries = entries.sort((a, b) => {
972
- const cmp = a.title.localeCompare(b.title);
973
- return tasksSortDirection === "asc" ? cmp : -cmp;
974
- });
975
- }
964
+ entries = entries.sort((a, b) => {
965
+ const aNum = parseInt(a.id.replace(/\D/g, ""), 10) || 0;
966
+ const bNum = parseInt(b.id.replace(/\D/g, ""), 10) || 0;
967
+ return source === "completed" && completedSortByIdDesc ? bNum - aNum : aNum - bNum;
968
+ });
976
969
  const total = entries.length;
977
970
  const pageEntries = entries.slice(offset, offset + limit);
978
971
  const items = await this.loadTasks(pageEntries.map((e) => e.id));
@@ -1002,21 +995,14 @@ class Core {
1002
995
  throw new Error("Core not lazy initialized. Call initializeLazy() first.");
1003
996
  }
1004
997
  const limit = (options == null ? void 0 : options.limit) ?? 10;
1005
- const sortDirection = (options == null ? void 0 : options.sortDirection) ?? "asc";
998
+ (options == null ? void 0 : options.sortDirection) ?? "asc";
1006
999
  const completedSortByIdDesc = (options == null ? void 0 : options.completedSortByIdDesc) ?? true;
1007
1000
  let entries = Array.from(this.taskIndex.values()).filter((e) => e.source === source);
1008
- if (source === "completed" && completedSortByIdDesc) {
1009
- entries = entries.sort((a, b) => {
1010
- const aNum = parseInt(a.id.replace(/\D/g, ""), 10) || 0;
1011
- const bNum = parseInt(b.id.replace(/\D/g, ""), 10) || 0;
1012
- return bNum - aNum;
1013
- });
1014
- } else {
1015
- entries = entries.sort((a, b) => {
1016
- const cmp = a.title.localeCompare(b.title);
1017
- return sortDirection === "asc" ? cmp : -cmp;
1018
- });
1019
- }
1001
+ entries = entries.sort((a, b) => {
1002
+ const aNum = parseInt(a.id.replace(/\D/g, ""), 10) || 0;
1003
+ const bNum = parseInt(b.id.replace(/\D/g, ""), 10) || 0;
1004
+ return source === "completed" && completedSortByIdDesc ? bNum - aNum : aNum - bNum;
1005
+ });
1020
1006
  const total = entries.length;
1021
1007
  const pageEntries = entries.slice(currentOffset, currentOffset + limit);
1022
1008
  const items = await this.loadTasks(pageEntries.map((e) => e.id));
@@ -1645,9 +1631,15 @@ const KanbanColumn = ({
1645
1631
  "div",
1646
1632
  {
1647
1633
  style: {
1648
- flex: "1",
1649
- minWidth: "min(280px, 85vw)",
1650
- // Responsive width for mobile
1634
+ flex: "1 1 0",
1635
+ // Grow to fill available width equally
1636
+ minWidth: "280px",
1637
+ maxWidth: "500px",
1638
+ // Cap max width for readability
1639
+ height: "100%",
1640
+ // Fill parent height
1641
+ minHeight: 0,
1642
+ // Allow shrinking
1651
1643
  display: "flex",
1652
1644
  flexDirection: "column",
1653
1645
  gap: "12px",
@@ -1700,6 +1692,8 @@ const KanbanColumn = ({
1700
1692
  {
1701
1693
  style: {
1702
1694
  flex: 1,
1695
+ minHeight: 0,
1696
+ // Critical: allows flex child to shrink and scroll
1703
1697
  display: "flex",
1704
1698
  flexDirection: "column",
1705
1699
  gap: "8px",
@@ -1712,6 +1706,8 @@ const KanbanColumn = ({
1712
1706
  {
1713
1707
  onClick: () => onTaskClick == null ? void 0 : onTaskClick(task),
1714
1708
  style: {
1709
+ flexShrink: 0,
1710
+ // Prevent card from shrinking
1715
1711
  background: theme2.colors.surface,
1716
1712
  borderRadius: theme2.radii[2],
1717
1713
  padding: "12px",
@@ -2227,9 +2223,13 @@ const KanbanPanelContent = ({
2227
2223
  // Responsive padding for mobile
2228
2224
  fontFamily: theme2.fonts.body,
2229
2225
  height: "100%",
2226
+ boxSizing: "border-box",
2227
+ // Include padding in height calculation
2230
2228
  display: "flex",
2231
2229
  flexDirection: "column",
2232
2230
  gap: "16px",
2231
+ overflow: "hidden",
2232
+ // Prevent outer scrolling
2233
2233
  backgroundColor: theme2.colors.background,
2234
2234
  color: theme2.colors.text
2235
2235
  },
@@ -2238,6 +2238,8 @@ const KanbanPanelContent = ({
2238
2238
  "div",
2239
2239
  {
2240
2240
  style: {
2241
+ flexShrink: 0,
2242
+ // Don't shrink header
2241
2243
  display: "flex",
2242
2244
  alignItems: "center",
2243
2245
  gap: "12px",
@@ -2263,6 +2265,8 @@ const KanbanPanelContent = ({
2263
2265
  "div",
2264
2266
  {
2265
2267
  style: {
2268
+ flexShrink: 0,
2269
+ // Don't shrink error message
2266
2270
  padding: "12px",
2267
2271
  background: `${theme2.colors.error}20`,
2268
2272
  border: `1px solid ${theme2.colors.error}`,
@@ -2292,9 +2296,13 @@ const KanbanPanelContent = ({
2292
2296
  flex: 1,
2293
2297
  display: "flex",
2294
2298
  gap: "16px",
2299
+ justifyContent: "center",
2300
+ // Center columns when they hit max-width
2295
2301
  overflowX: "auto",
2296
2302
  overflowY: "hidden",
2297
2303
  paddingBottom: "8px",
2304
+ minHeight: 0,
2305
+ // Allow flex child to shrink below content size
2298
2306
  WebkitOverflowScrolling: "touch"
2299
2307
  // Smooth scrolling on iOS
2300
2308
  },