diff --git a/library/src/components/timetable/timeTableUtils.ts b/library/src/components/timetable/timeTableUtils.ts index 0c2058ed..478cec66 100644 --- a/library/src/components/timetable/timeTableUtils.ts +++ b/library/src/components/timetable/timeTableUtils.ts @@ -561,7 +561,7 @@ export function getStartAndEndSlot( } } if (startSlot === -1) { - startSlot = 0 + startSlot = slotsArray.length - 1 } let endSlot = slotsArray.findIndex((slot) => slot.isAfter(item.endDate)) diff --git a/package-lock.json b/package-lock.json index ae4fed79..ac409c8a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,13 +50,13 @@ "@atlaskit/code": "^15.6.6", "@atlaskit/css-reset": "^6.11.2", "@atlaskit/lozenge": "^11.12.2", - "@atlaskit/pagination": "^14.9.5", + "@atlaskit/pagination": "^14.10.0", "@atlaskit/side-navigation": "^3.6.3", "@atlaskit/table-tree": "^10.0.6", "@atlaskit/tag": "^12.6.6", "@atlaskit/tag-group": "^10.6.1", "@atlaskit/textarea": "^5.6.4", - "@atlaskit/textfield": "^6.5.5", + "@atlaskit/textfield": "^6.6.0", "@atlaskit/theme": "^14.0.1", "@babel/generator": "^7.26.2", "@babel/parser": "^7.26.2", @@ -92,7 +92,7 @@ "tailwindcss": "^3.4.15", "typescript": "^5.7.2", "typescript-plugin-css-modules": "^5.1.0", - "vite": "^6.0.0", + "vite": "^6.0.1", "vite-plugin-dts": "^4.3.0", "vitest": "^2.1.6" }, @@ -440,9 +440,9 @@ } }, "node_modules/@atlaskit/menu": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/@atlaskit/menu/-/menu-2.13.3.tgz", - "integrity": "sha512-JFbNGHc9fSsh3YkrqqutRrHfjdJfELOi1oFCf5ks15RO+rDcwD8qmkH9lovy3vR0uwFaX+xsAK8qkGMd2aMRnQ==", + "version": "2.13.4", + "resolved": "https://registry.npmjs.org/@atlaskit/menu/-/menu-2.13.4.tgz", + "integrity": "sha512-WBBK3leJfvBRFeY9rgPQ8IYb/bX0ee8xSsBaq24z5Gaqpj9VAnYfiacsVkoW0CfITtlBIAEVYHLcJczsAwypbQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -453,7 +453,7 @@ "@atlaskit/platform-feature-flags": "^0.3.0", "@atlaskit/primitives": "^13.2.0", "@atlaskit/theme": "^14.0.0", - "@atlaskit/tokens": "^2.2.0", + "@atlaskit/tokens": "^2.3.0", "@babel/runtime": "^7.0.0", "@emotion/react": "^11.7.1" }, @@ -478,9 +478,9 @@ } }, "node_modules/@atlaskit/pagination": { - "version": "14.9.5", - "resolved": "https://registry.npmjs.org/@atlaskit/pagination/-/pagination-14.9.5.tgz", - "integrity": "sha512-tg72UQcN+5vq67Y40Wb8tyQyQAmxRbLVkHDioXfAIysOrV5lFeRVmFmNqyT0HV7CJ39vklKgBXMADP99Z2G0Sg==", + "version": "14.10.0", + "resolved": "https://registry.npmjs.org/@atlaskit/pagination/-/pagination-14.10.0.tgz", + "integrity": "sha512-KhZeAaYTlpBqLoLQCiIxaHMmp8gwyQxp+jP+nWZ1mwlznvM5ckayyNKWytWskEFMJ75+HtGsUxvNRIedNZu3KA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -488,9 +488,9 @@ "@atlaskit/button": "^20.3.0", "@atlaskit/codemod-utils": "^4.2.0", "@atlaskit/ds-lib": "^3.2.0", - "@atlaskit/icon": "^22.24.0", + "@atlaskit/icon": "^22.26.0", "@atlaskit/primitives": "^13.2.0", - "@atlaskit/tokens": "^2.2.0", + "@atlaskit/tokens": "^2.3.0", "@atlaskit/visually-hidden": "^1.5.0", "@babel/runtime": "^7.0.0", "memoize-one": "^6.0.0" @@ -705,15 +705,17 @@ } }, "node_modules/@atlaskit/textfield": { - "version": "6.5.5", - "resolved": "https://registry.npmjs.org/@atlaskit/textfield/-/textfield-6.5.5.tgz", - "integrity": "sha512-oJcdjZFjA+XVJpB1yxbA53lhSBkovoAI4nx2ahATDjdAbdDXJk3IXcBxZkrgSTOuDMtes1Ic2nk58XExvViqOw==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@atlaskit/textfield/-/textfield-6.6.0.tgz", + "integrity": "sha512-WZ0Q+cNnpBc5xnc5Ni3KWHEyJSmDj9hFa586JlEpJ1sDjkcZQ5jbdWaQBxsBW/2oSlkJ71r2ZdUWLOHHJYSiMw==", "dev": true, "license": "Apache-2.0", "dependencies": { "@atlaskit/analytics-next": "^10.1.0", + "@atlaskit/platform-feature-flags": "^0.3.0", + "@atlaskit/primitives": "^13.0.0", "@atlaskit/theme": "^14.0.0", - "@atlaskit/tokens": "^2.2.0", + "@atlaskit/tokens": "^2.3.0", "@babel/runtime": "^7.0.0", "@emotion/react": "^11.7.1" }, @@ -11488,9 +11490,9 @@ } }, "node_modules/vite": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.0.0.tgz", - "integrity": "sha512-Q2+5yQV79EdnpbNxjD3/QHVMCBaQ3Kpd4/uL51UGuh38bIIM+s4o3FqyCzRvTRwFb+cWIUeZvaWwS9y2LD2qeQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.0.1.tgz", + "integrity": "sha512-Ldn6gorLGr4mCdFnmeAOLweJxZ34HjKnDm4HGo6P66IEqTxQb36VEdFJQENKxWjupNfoIjvRUnswjn1hpYEpjQ==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 1207d9f8..b9dd837f 100644 --- a/package.json +++ b/package.json @@ -117,13 +117,13 @@ "@atlaskit/code": "^15.6.6", "@atlaskit/css-reset": "^6.11.2", "@atlaskit/lozenge": "^11.12.2", - "@atlaskit/pagination": "^14.9.5", + "@atlaskit/pagination": "^14.10.0", "@atlaskit/side-navigation": "^3.6.3", "@atlaskit/table-tree": "^10.0.6", "@atlaskit/tag": "^12.6.6", "@atlaskit/tag-group": "^10.6.1", "@atlaskit/textarea": "^5.6.4", - "@atlaskit/textfield": "^6.5.5", + "@atlaskit/textfield": "^6.6.0", "@atlaskit/theme": "^14.0.1", "@babel/generator": "^7.26.2", "@babel/parser": "^7.26.2", @@ -159,7 +159,7 @@ "tailwindcss": "^3.4.15", "typescript": "^5.7.2", "typescript-plugin-css-modules": "^5.1.0", - "vite": "^6.0.0", + "vite": "^6.0.1", "vite-plugin-dts": "^4.3.0", "vitest": "^2.1.6" }, diff --git a/showcase/public/showcase-sources.txt b/showcase/public/showcase-sources.txt index d1a1d496..7b807556 100644 --- a/showcase/public/showcase-sources.txt +++ b/showcase/public/showcase-sources.txt @@ -9717,7 +9717,7 @@ export default function UtilsShowCase(props: ShowcaseProps) { ) } -import React, { useState } from "react" +import { useState } from "react" import { AppLayout, Checkbox, PageLayout } from "@linked-planet/ui-kit-ts" import "@atlaskit/css-reset" // sets base styles of AK @@ -9735,7 +9735,7 @@ export default function AppLayoutExample() { const [mainFixedHeight, setMainFixedHeight] = useState(true) return ( - + ) { - const groupItems = entries[1].items + const groupItems = entries[0].items + if (!groupItems.length) { + return null + } const groupItemsOfCell: I[] = [] - const startAndEndInSlow: { + const startAndEndInSlot: { status: "in" | "before" | "after" startSlot: number endSlot: number @@ -454,12 +457,15 @@ function TestCustomHeaderRowTimeSlot< ) if (slotsArray[startAndEnd.startSlot] === timeSlot) { groupItemsOfCell.push(item) - startAndEndInSlow.push(startAndEnd) + startAndEndInSlot.push(startAndEnd) } } + if (!groupItemsOfCell.length) { + return null + } const leftAndWidths = groupItemsOfCell.map((it, i) => { - const startAndEnd = startAndEndInSlow[i] + const startAndEnd = startAndEndInSlot[i] if (startAndEnd.status === "before" || startAndEnd.status === "after") { return null } @@ -474,6 +480,10 @@ function TestCustomHeaderRowTimeSlot< ) }) + if (entries[0].items.length) { + console.log("LEFT", entries[0].items, leftAndWidths, startAndEndInSlot) + } + const cellWidth = tableCellRef.current?.offsetWidth ?? 70 const ret = leftAndWidths.map((it, i) => @@ -506,7 +516,7 @@ function CustomHeaderRowHeader< }: TimeTableTypes.CustomHeaderRowHeaderProps) { return (
- {entries[1].group.title} has {entries.length} entries + {entries[0].group.title} has {entries.length} entries
) } @@ -647,6 +657,7 @@ function Example() { ) useEffect(() => { + /*requestMoreEntriesCB() requestMoreEntriesCB() requestMoreEntriesCB() requestMoreEntriesCB() @@ -658,8 +669,7 @@ function Example() { requestMoreEntriesCB() requestMoreEntriesCB() requestMoreEntriesCB() - requestMoreEntriesCB() - requestMoreEntriesCB() + requestMoreEntriesCB()*/ /*requestMoreEntriesCB() requestMoreEntriesCB() requestMoreEntriesCB()