@osdk/react-components 0.1.0-beta.6 → 0.1.0
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/CHANGELOG.md +33 -0
- package/README.md +2 -5
- package/build/browser/base-components/checkbox/Checkbox.js +32 -27
- package/build/browser/object-table/CellContextMenu.js +20 -23
- package/build/browser/object-table/LoadingCell.js +38 -0
- package/build/browser/object-table/LoadingCell.js.map +1 -0
- package/build/browser/object-table/LoadingRow.js +69 -0
- package/build/browser/object-table/LoadingRow.js.map +1 -0
- package/build/browser/object-table/LoadingStateTable.js +395 -0
- package/build/browser/object-table/LoadingStateTable.js.map +1 -0
- package/build/browser/object-table/NonIdealState.js +25 -0
- package/build/browser/object-table/NonIdealState.js.map +1 -0
- package/build/browser/object-table/ObjectTable.js +6 -5
- package/build/browser/object-table/ObjectTable.js.map +1 -1
- package/build/browser/object-table/ObjectTableApi.js.map +1 -1
- package/build/browser/object-table/Table.js +948 -45
- package/build/browser/object-table/Table.js.map +1 -1
- package/build/browser/object-table/TableBody.js +269 -34
- package/build/browser/object-table/TableBody.js.map +1 -1
- package/build/browser/object-table/TableCell.js +111 -31
- package/build/browser/object-table/TableCell.js.map +1 -1
- package/build/browser/object-table/TableHeader.js +215 -38
- package/build/browser/object-table/TableHeaderContent.js +18 -21
- package/build/browser/object-table/TableHeaderContent.js.map +1 -1
- package/build/browser/object-table/TableHeaderWithPopover.js +80 -66
- package/build/browser/object-table/TableRow.js +144 -26
- package/build/browser/object-table/hooks/__tests__/useObjectTableData.test.js +18 -20
- package/build/browser/object-table/hooks/__tests__/useObjectTableData.test.js.map +1 -1
- package/build/browser/object-table/hooks/useColumnDefs.js +6 -2
- package/build/browser/object-table/hooks/useColumnDefs.js.map +1 -1
- package/build/browser/object-table/hooks/useColumnPinning.js.map +1 -1
- package/build/browser/object-table/hooks/useColumnVisibility.js.map +1 -1
- package/build/browser/object-table/hooks/useObjectTableData.js +7 -6
- package/build/browser/object-table/hooks/useObjectTableData.js.map +1 -1
- package/build/browser/object-table/hooks/useRowSelection.js.map +1 -1
- package/build/browser/object-table/hooks/useSelectionColumn.js.map +1 -1
- package/build/browser/object-table/hooks/useTableSorting.js.map +1 -1
- package/build/browser/object-table/utils/getRowId.js.map +1 -1
- package/build/cjs/public/experimental.cjs +435 -264
- package/build/cjs/public/experimental.cjs.map +1 -1
- package/build/cjs/public/experimental.css +114 -56
- package/build/cjs/public/experimental.css.map +1 -1
- package/build/cjs/public/experimental.d.cts +8 -11
- package/build/esm/base-components/checkbox/Checkbox.module.css +10 -3
- package/build/esm/object-table/CellContextMenu.module.css +1 -1
- package/build/{browser/object-table/CellContextMenu.module.css → esm/object-table/LoadingCell.js} +16 -3
- package/build/esm/object-table/LoadingCell.js.map +1 -0
- package/build/esm/object-table/LoadingCell.module.css +48 -0
- package/build/esm/object-table/LoadingRow.js +43 -0
- package/build/esm/object-table/LoadingRow.js.map +1 -0
- package/build/esm/object-table/LoadingStateTable.js +101 -0
- package/build/esm/object-table/LoadingStateTable.js.map +1 -0
- package/build/{browser/object-table/TableHeaderContent.module.css → esm/object-table/NonIdealState.js} +11 -13
- package/build/esm/object-table/NonIdealState.js.map +1 -0
- package/build/{browser/object-table/Table.module.css → esm/object-table/NonIdealState.module.css} +10 -4
- package/build/esm/object-table/ObjectTable.js +6 -5
- package/build/esm/object-table/ObjectTable.js.map +1 -1
- package/build/esm/object-table/ObjectTableApi.js.map +1 -1
- package/build/esm/object-table/Table.js +34 -13
- package/build/esm/object-table/Table.js.map +1 -1
- package/build/esm/object-table/Table.module.css +2 -2
- package/build/esm/object-table/TableBody.js +13 -2
- package/build/esm/object-table/TableBody.js.map +1 -1
- package/build/esm/object-table/TableCell.js.map +1 -1
- package/build/esm/object-table/TableCell.module.css +7 -8
- package/build/esm/object-table/TableHeader.module.css +15 -9
- package/build/esm/object-table/TableHeaderContent.js.map +1 -1
- package/build/esm/object-table/TableHeaderWithPopover.module.css +31 -26
- package/build/esm/object-table/TableRow.module.css +1 -1
- package/build/esm/object-table/hooks/__tests__/useObjectTableData.test.js +18 -20
- package/build/esm/object-table/hooks/__tests__/useObjectTableData.test.js.map +1 -1
- package/build/esm/object-table/hooks/useColumnDefs.js +6 -2
- package/build/esm/object-table/hooks/useColumnDefs.js.map +1 -1
- package/build/esm/object-table/hooks/useColumnPinning.js.map +1 -1
- package/build/esm/object-table/hooks/useColumnVisibility.js.map +1 -1
- package/build/esm/object-table/hooks/useObjectTableData.js +7 -6
- package/build/esm/object-table/hooks/useObjectTableData.js.map +1 -1
- package/build/esm/object-table/hooks/useRowSelection.js.map +1 -1
- package/build/esm/object-table/hooks/useSelectionColumn.js.map +1 -1
- package/build/esm/object-table/hooks/useTableSorting.js.map +1 -1
- package/build/esm/object-table/utils/getRowId.js.map +1 -1
- package/build/types/object-table/LoadingCell.d.ts +4 -0
- package/build/types/object-table/LoadingCell.d.ts.map +1 -0
- package/build/types/object-table/LoadingRow.d.ts +11 -0
- package/build/types/object-table/LoadingRow.d.ts.map +1 -0
- package/build/types/object-table/LoadingStateTable.d.ts +11 -0
- package/build/types/object-table/LoadingStateTable.d.ts.map +1 -0
- package/build/types/object-table/NonIdealState.d.ts +6 -0
- package/build/types/object-table/NonIdealState.d.ts.map +1 -0
- package/build/types/object-table/ObjectTable.d.ts +4 -4
- package/build/types/object-table/ObjectTable.d.ts.map +1 -1
- package/build/types/object-table/ObjectTableApi.d.ts +4 -8
- package/build/types/object-table/ObjectTableApi.d.ts.map +1 -1
- package/build/types/object-table/Table.d.ts +2 -1
- package/build/types/object-table/Table.d.ts.map +1 -1
- package/build/types/object-table/TableBody.d.ts +4 -2
- package/build/types/object-table/TableBody.d.ts.map +1 -1
- package/build/types/object-table/TableHeaderContent.d.ts.map +1 -1
- package/build/types/object-table/hooks/useColumnDefs.d.ts +3 -3
- package/build/types/object-table/hooks/useColumnDefs.d.ts.map +1 -1
- package/build/types/object-table/hooks/useColumnPinning.d.ts +3 -3
- package/build/types/object-table/hooks/useColumnPinning.d.ts.map +1 -1
- package/build/types/object-table/hooks/useColumnVisibility.d.ts +3 -3
- package/build/types/object-table/hooks/useColumnVisibility.d.ts.map +1 -1
- package/build/types/object-table/hooks/useObjectTableData.d.ts +6 -6
- package/build/types/object-table/hooks/useObjectTableData.d.ts.map +1 -1
- package/build/types/object-table/hooks/useRowSelection.d.ts +3 -3
- package/build/types/object-table/hooks/useRowSelection.d.ts.map +1 -1
- package/build/types/object-table/hooks/useSelectionColumn.d.ts +2 -2
- package/build/types/object-table/hooks/useSelectionColumn.d.ts.map +1 -1
- package/build/types/object-table/hooks/useTableSorting.d.ts +3 -3
- package/build/types/object-table/hooks/useTableSorting.d.ts.map +1 -1
- package/build/types/object-table/utils/getRowId.d.ts +3 -3
- package/build/types/object-table/utils/getRowId.d.ts.map +1 -1
- package/package.json +6 -6
- package/build/browser/base-components/checkbox/Checkbox.module.css +0 -72
- package/build/browser/object-table/TableBody.module.css +0 -20
- package/build/browser/object-table/TableCell.module.css +0 -63
- package/build/browser/object-table/TableHeader.module.css +0 -95
- package/build/browser/object-table/TableHeaderWithPopover.module.css +0 -105
- package/build/browser/object-table/TableRow.module.css +0 -60
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","names":["classNames","React","useCallback","useRef","styles","TableBody","TableHeader","BaseTable","table","isLoading","fetchNextPage","onRowClick","rowHeight","renderCellContextMenu","className","tableContainerRef","fetchingRef","fetchMoreOnEndReached","containerRefElement","current","scrollHeight","scrollTop","clientHeight","handleScroll","e","currentTarget","createElement","ref","osdkTableContainer","onScroll","
|
|
1
|
+
{"version":3,"file":"Table.js","names":["classNames","React","useCallback","useEffect","useRef","useState","LoadingStateTable","NonIdealState","styles","TableBody","TableHeader","BaseTable","table","isLoading","fetchNextPage","onRowClick","rowHeight","renderCellContextMenu","className","error","tableContainerRef","isLoadingMore","setIsLoadingMore","fetchingRef","fetchMoreOnEndReached","containerRefElement","current","scrollHeight","scrollTop","clientHeight","handleScroll","e","currentTarget","rows","getRowModel","headerGroups","getHeaderGroups","hasData","length","createElement","ref","osdkTableContainer","onScroll","Fragment","message"],"sources":["Table.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Cell, RowData, Table } from \"@tanstack/react-table\";\nimport classNames from \"classnames\";\nimport React, {\n type ReactElement,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport { LoadingStateTable } from \"./LoadingStateTable.js\";\nimport { NonIdealState } from \"./NonIdealState.js\";\nimport styles from \"./Table.module.css\";\nimport { TableBody } from \"./TableBody.js\";\nimport { TableHeader } from \"./TableHeader.js\";\n\nexport interface BaseTableProps<TData extends RowData> {\n table: Table<TData>;\n isLoading?: boolean;\n fetchNextPage?: () => Promise<void>;\n onRowClick?: (row: TData) => void;\n rowHeight?: number;\n renderCellContextMenu?: (\n row: TData,\n cell: Cell<TData, unknown>,\n ) => React.ReactNode;\n className?: string;\n error?: Error;\n}\n\nexport function BaseTable<TData extends RowData>(\n {\n table,\n isLoading,\n fetchNextPage,\n onRowClick,\n rowHeight,\n renderCellContextMenu,\n className,\n error,\n }: BaseTableProps<TData>,\n): ReactElement {\n const tableContainerRef = useRef<HTMLDivElement>(null);\n const [isLoadingMore, setIsLoadingMore] = useState(false);\n\n // Using a ref to prevent duplicate fetches from rapid scroll events while a fetch is in-flight\n const fetchingRef = useRef(false);\n\n useEffect(() => {\n if (!isLoading || fetchNextPage == null) {\n setIsLoadingMore(false);\n }\n }, [isLoading, fetchNextPage]);\n\n const fetchMoreOnEndReached = useCallback(\n async (containerRefElement?: HTMLDivElement | null) => {\n if (containerRefElement && !fetchingRef.current && !isLoadingMore) {\n const { scrollHeight, scrollTop, clientHeight } = containerRefElement;\n if (\n scrollHeight - scrollTop - clientHeight < 100\n && !isLoading && fetchNextPage != null\n ) {\n fetchingRef.current = true;\n setIsLoadingMore(true);\n try {\n await fetchNextPage();\n } finally {\n fetchingRef.current = false;\n }\n }\n }\n },\n [fetchNextPage, isLoading, isLoadingMore],\n );\n\n const handleScroll = useCallback(\n async (e: React.UIEvent<HTMLDivElement>) => {\n await fetchMoreOnEndReached(e.currentTarget);\n },\n [fetchMoreOnEndReached],\n );\n\n const rows = table.getRowModel().rows;\n const headerGroups = table.getHeaderGroups();\n const hasData = rows.length > 0;\n\n return (\n <div\n ref={tableContainerRef}\n className={classNames(styles.osdkTableContainer, className)}\n onScroll={handleScroll}\n >\n <table>\n {isLoading && !hasData\n ? (\n <LoadingStateTable\n table={table}\n headerGroups={headerGroups}\n rowHeight={rowHeight}\n tableContainerRef={tableContainerRef}\n />\n )\n : (\n <>\n <TableHeader table={table} />\n {!hasData && error == null\n ? <NonIdealState message={\"No Data\"} />\n : (\n <TableBody\n rows={rows}\n tableContainerRef={tableContainerRef}\n onRowClick={onRowClick}\n rowHeight={rowHeight}\n renderCellContextMenu={renderCellContextMenu}\n isLoadingMore={isLoadingMore}\n headerGroups={headerGroups}\n />\n )}\n </>\n )}\n {error != null && (\n <NonIdealState message={`Error Loading Data: ${error.message}`} />\n )}\n </table>\n </div>\n );\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,56 +1,291 @@
|
|
|
1
|
-
|
|
2
|
-
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
1
|
+
// build/browser/object-table/TableBody.js
|
|
17
2
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
import React6, { useLayoutEffect } from "react";
|
|
4
|
+
|
|
5
|
+
// build/browser/object-table/LoadingRow.js
|
|
6
|
+
import React2 from "react";
|
|
7
|
+
import classNames from "classnames";
|
|
8
|
+
import React from "react";
|
|
9
|
+
var css = '/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.osdkLoadingCell {\n height: var(--osdk-table-cell-fontSize);\n border-radius: calc(var(--osdk-surface-border-radius) * 0.5);\n flex: 1;\n}\n\n/* Blueprint skeleton animation keyframes */\n@keyframes skeleton-glow {\n from {\n background: var(--osdk-table-skeleton-color-from);\n border-color: var(--osdk-table-skeleton-color-from);\n }\n\n to {\n background: var(--osdk-table-skeleton-color-to);\n border-color: var(--osdk-table-skeleton-color-to);\n }\n}\n\n.osdkCellSkeleton {\n animation: 1000ms linear infinite alternate skeleton-glow;\n background: var(--osdk-table-skeleton-color-from);\n background-clip: padding-box;\n border-color: var(--osdk-table-skeleton-color-from);\n border-radius: calc(var(--osdk-surface-border-radius) * 0.5);\n border: 1px solid var(--osdk-table-skeleton-border-color);\n box-shadow: none;\n color: transparent;\n cursor: default;\n pointer-events: none;\n user-select: none;\n}\n';
|
|
10
|
+
if (typeof document !== "undefined") {
|
|
11
|
+
const style = document.createElement("style");
|
|
12
|
+
style.textContent = css;
|
|
13
|
+
document.head.appendChild(style);
|
|
14
|
+
}
|
|
15
|
+
var LoadingCell_default = { "osdkLoadingCell": "osdkLoadingCell", "osdkCellSkeleton": "osdkCellSkeleton" };
|
|
16
|
+
var css2 = '/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.osdkTableCell {\n display: flex;\n align-items: center;\n text-align: left;\n position: relative;\n padding: var(--osdk-table-cell-padding);\n font-size: var(--osdk-table-cell-fontSize);\n color: var(--osdk-table-cell-color);\n background-color: inherit;\n border-right: var(--osdk-table-cell-divider);\n\n &:first-child {\n border-left: var(--osdk-table-border);\n }\n\n &:last-child {\n border-right: var(--osdk-table-border);\n }\n}\n\n.osdkTableCell[data-pinned="left"],\n.osdkTableCell[data-pinned="right"] {\n position: sticky;\n z-index: var(--osdk-surface-z-index-1);\n}\n\n/* Last left-pinned column - no left-pinned siblings after it */\n.osdkTableCell[data-pinned="left"]:not(:has(~ [data-pinned="left"])) {\n border-right: var(--osdk-table-pinned-column-border);\n}\n\n/* First right-pinned column - no right-pinned siblings before it */\n.osdkTableCell[data-pinned="right"]:not(:has(~ [data-pinned="right"]):nth-child(n+2)) {\n border-left: var(--osdk-table-pinned-column-border);\n}\n\n.osdkTableCell:has([role="checkbox"]) {\n justify-content: center;\n}\n\n.osdkTableCellContent:not(:has([role="checkbox"])) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n}\n';
|
|
17
|
+
if (typeof document !== "undefined") {
|
|
18
|
+
const style = document.createElement("style");
|
|
19
|
+
style.textContent = css2;
|
|
20
|
+
document.head.appendChild(style);
|
|
21
|
+
}
|
|
22
|
+
var TableCell_default = { "osdkTableCell": "osdkTableCell", "osdkTableCellContent": "osdkTableCellContent" };
|
|
23
|
+
function LoadingCell({
|
|
24
|
+
width
|
|
25
|
+
}) {
|
|
26
|
+
return /* @__PURE__ */ React.createElement("td", {
|
|
27
|
+
className: TableCell_default.osdkTableCell,
|
|
28
|
+
style: {
|
|
29
|
+
width
|
|
30
|
+
}
|
|
31
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
32
|
+
className: classNames(LoadingCell_default.osdkLoadingCell, LoadingCell_default.osdkCellSkeleton)
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
var css3 = '/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.osdkTableRow {\n position: absolute;\n display: flex;\n background-color: var(--osdk-table-row-bg-default);\n border-top: var(--osdk-table-row-divider);\n border-bottom: var(--osdk-table-border-width) solid transparent;\n\n &:last-child {\n border-bottom: var(--osdk-table-border);\n }\n\n /* Zebra rows */\n &:nth-child(even) {\n background-color: var(\n --osdk-table-row-bg-alternate,\n var(--osdk-table-row-bg-default)\n );\n }\n\n &:hover {\n z-index: 1;\n background-color: var(\n --osdk-table-row-bg-hover,\n var(--osdk-surface-background-color-default-hover)\n );\n border-top-color: var(--osdk-table-row-border-color-hover);\n border-bottom-color: var(--osdk-table-row-border-color-hover);\n }\n\n &[data-selected="true"] {\n z-index: 2;\n background-color: var(--osdk-table-row-bg-active);\n border-top-color: var(--osdk-table-row-border-color-active);\n border-bottom-color: var(--osdk-table-row-border-color-active);\n }\n\n &[data-selected="true"] + &[data-selected="true"] {\n border-top-color: transparent;\n }\n\n &[data-selected="true"]:has(+ &[data-selected="true"]) {\n border-bottom-color: transparent;\n }\n}\n';
|
|
36
|
+
if (typeof document !== "undefined") {
|
|
37
|
+
const style = document.createElement("style");
|
|
38
|
+
style.textContent = css3;
|
|
39
|
+
document.head.appendChild(style);
|
|
40
|
+
}
|
|
41
|
+
var TableRow_default = { "osdkTableRow": "osdkTableRow" };
|
|
42
|
+
function LoadingRow({
|
|
43
|
+
headers,
|
|
44
|
+
columnCount,
|
|
45
|
+
translateY,
|
|
46
|
+
rowHeight = 40,
|
|
47
|
+
columnWidth = 80
|
|
48
|
+
}) {
|
|
49
|
+
return /* @__PURE__ */ React2.createElement("tr", {
|
|
50
|
+
className: TableRow_default.osdkTableRow,
|
|
51
|
+
style: {
|
|
52
|
+
height: `${rowHeight}px`,
|
|
53
|
+
transform: `translateY(${translateY}px)`
|
|
54
|
+
}
|
|
55
|
+
}, /* @__PURE__ */ React2.createElement(React2.Fragment, null, Array.from({
|
|
56
|
+
length: columnCount
|
|
57
|
+
}).map((_, index) => {
|
|
58
|
+
const width = headers.length > index ? headers[index].getSize() : columnWidth;
|
|
59
|
+
return /* @__PURE__ */ React2.createElement(LoadingCell, {
|
|
60
|
+
key: `loading-cell-${index}`,
|
|
61
|
+
width
|
|
62
|
+
});
|
|
63
|
+
})));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// build/browser/object-table/TableBody.module.css
|
|
67
|
+
var css4 = '/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.osdkTableBody {\n display: grid;\n position: relative;\n}\n';
|
|
68
|
+
if (typeof document !== "undefined") {
|
|
69
|
+
const style = document.createElement("style");
|
|
70
|
+
style.textContent = css4;
|
|
71
|
+
document.head.appendChild(style);
|
|
72
|
+
}
|
|
73
|
+
var TableBody_default = { "osdkTableBody": "osdkTableBody" };
|
|
74
|
+
|
|
75
|
+
// build/browser/object-table/TableRow.js
|
|
76
|
+
import React5, { useCallback as useCallback2 } from "react";
|
|
77
|
+
|
|
78
|
+
// build/browser/object-table/TableCell.js
|
|
79
|
+
import { flexRender } from "@tanstack/react-table";
|
|
80
|
+
import React4, { useRef as useRef2 } from "react";
|
|
81
|
+
|
|
82
|
+
// build/browser/object-table/CellContextMenu.js
|
|
83
|
+
import React3, { useEffect, useRef } from "react";
|
|
84
|
+
import { createPortal } from "react-dom";
|
|
85
|
+
var css5 = '/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.osdkCellContextMenu {\n position: fixed;\n z-index: var(--osdk-surface-z-index-2);\n}\n';
|
|
86
|
+
if (typeof document !== "undefined") {
|
|
87
|
+
const style = document.createElement("style");
|
|
88
|
+
style.textContent = css5;
|
|
89
|
+
document.head.appendChild(style);
|
|
90
|
+
}
|
|
91
|
+
var CellContextMenu_default = { "osdkCellContextMenu": "osdkCellContextMenu" };
|
|
92
|
+
function CellContextMenu({
|
|
93
|
+
cell,
|
|
94
|
+
position,
|
|
95
|
+
onClose,
|
|
96
|
+
renderContent
|
|
97
|
+
}) {
|
|
98
|
+
const ref = useRef(null);
|
|
99
|
+
useEffect(() => {
|
|
100
|
+
const handleClickOutside = (event) => {
|
|
101
|
+
if (ref.current && !ref.current.contains(event.target)) {
|
|
102
|
+
onClose();
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
106
|
+
return () => {
|
|
107
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
108
|
+
};
|
|
109
|
+
}, [onClose]);
|
|
110
|
+
return /* @__PURE__ */ createPortal(/* @__PURE__ */ React3.createElement("div", {
|
|
111
|
+
ref,
|
|
112
|
+
className: CellContextMenu_default.osdkCellContextMenu,
|
|
113
|
+
style: {
|
|
114
|
+
left: position.left,
|
|
115
|
+
top: position.top,
|
|
116
|
+
minWidth: position.width
|
|
117
|
+
}
|
|
118
|
+
}, renderContent(cell.row.original, cell)), document.body);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// build/browser/object-table/hooks/useCellContextMenu.js
|
|
122
|
+
import { useCallback, useState } from "react";
|
|
123
|
+
var useCellContextMenu = ({
|
|
124
|
+
tdRef
|
|
125
|
+
}) => {
|
|
126
|
+
const [popoverPosition, setPopoverPosition] = useState(null);
|
|
127
|
+
const [isContextMenuOpen, setIsContextMenuOpen] = useState(false);
|
|
128
|
+
const handleOpenContextMenu = useCallback((event) => {
|
|
129
|
+
event.preventDefault();
|
|
130
|
+
event.stopPropagation();
|
|
131
|
+
if (tdRef.current) {
|
|
132
|
+
const rect = tdRef.current.getBoundingClientRect();
|
|
133
|
+
const position = {
|
|
134
|
+
left: rect.left,
|
|
135
|
+
top: rect.bottom,
|
|
136
|
+
width: rect.width
|
|
137
|
+
};
|
|
138
|
+
setPopoverPosition(position);
|
|
139
|
+
setIsContextMenuOpen(true);
|
|
140
|
+
}
|
|
141
|
+
}, [tdRef]);
|
|
142
|
+
const handleCloseContextMenu = useCallback(() => {
|
|
143
|
+
setIsContextMenuOpen(false);
|
|
144
|
+
setPopoverPosition(null);
|
|
145
|
+
}, []);
|
|
146
|
+
return {
|
|
147
|
+
isContextMenuOpen,
|
|
148
|
+
handleOpenContextMenu,
|
|
149
|
+
handleCloseContextMenu,
|
|
150
|
+
popoverPosition
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
// build/browser/object-table/TableCell.module.css
|
|
155
|
+
var css6 = '/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.osdkTableCell {\n display: flex;\n align-items: center;\n text-align: left;\n position: relative;\n padding: var(--osdk-table-cell-padding);\n font-size: var(--osdk-table-cell-fontSize);\n color: var(--osdk-table-cell-color);\n background-color: inherit;\n border-right: var(--osdk-table-cell-divider);\n\n &:first-child {\n border-left: var(--osdk-table-border);\n }\n\n &:last-child {\n border-right: var(--osdk-table-border);\n }\n}\n\n.osdkTableCell[data-pinned="left"],\n.osdkTableCell[data-pinned="right"] {\n position: sticky;\n z-index: var(--osdk-surface-z-index-1);\n}\n\n/* Last left-pinned column - no left-pinned siblings after it */\n.osdkTableCell[data-pinned="left"]:not(:has(~ [data-pinned="left"])) {\n border-right: var(--osdk-table-pinned-column-border);\n}\n\n/* First right-pinned column - no right-pinned siblings before it */\n.osdkTableCell[data-pinned="right"]:not(:has(~ [data-pinned="right"]):nth-child(n+2)) {\n border-left: var(--osdk-table-pinned-column-border);\n}\n\n.osdkTableCell:has([role="checkbox"]) {\n justify-content: center;\n}\n\n.osdkTableCellContent:not(:has([role="checkbox"])) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n}\n';
|
|
156
|
+
if (typeof document !== "undefined") {
|
|
157
|
+
const style = document.createElement("style");
|
|
158
|
+
style.textContent = css6;
|
|
159
|
+
document.head.appendChild(style);
|
|
160
|
+
}
|
|
161
|
+
var TableCell_default2 = { "osdkTableCell": "osdkTableCell", "osdkTableCellContent": "osdkTableCellContent" };
|
|
162
|
+
|
|
163
|
+
// build/browser/object-table/utils/constants.js
|
|
164
|
+
var SELECTION_COLUMN_ID = "__selection__";
|
|
165
|
+
|
|
166
|
+
// build/browser/object-table/utils/getColumnPinningStyles.js
|
|
167
|
+
function getColumnPinningStyles(column) {
|
|
168
|
+
const isPinned = column.getIsPinned();
|
|
169
|
+
return {
|
|
170
|
+
columnStyles: {
|
|
171
|
+
left: isPinned === "left" ? `${column.getStart("left")}px` : void 0,
|
|
172
|
+
right: isPinned === "right" ? `${column.getAfter("right")}px` : void 0,
|
|
173
|
+
width: column.getSize()
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// build/browser/object-table/TableCell.js
|
|
179
|
+
function TableCell({
|
|
180
|
+
cell,
|
|
181
|
+
renderCellContextMenu
|
|
182
|
+
}) {
|
|
183
|
+
const tdRef = useRef2(null);
|
|
184
|
+
const isSelectColumn = cell.column.id === SELECTION_COLUMN_ID;
|
|
185
|
+
const {
|
|
186
|
+
isContextMenuOpen,
|
|
187
|
+
handleOpenContextMenu,
|
|
188
|
+
handleCloseContextMenu,
|
|
189
|
+
popoverPosition
|
|
190
|
+
} = useCellContextMenu({
|
|
191
|
+
tdRef
|
|
192
|
+
});
|
|
193
|
+
const {
|
|
194
|
+
columnStyles
|
|
195
|
+
} = getColumnPinningStyles(cell.column);
|
|
196
|
+
return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement("td", {
|
|
197
|
+
ref: tdRef,
|
|
198
|
+
"data-pinned": cell.column.getIsPinned(),
|
|
199
|
+
className: TableCell_default2.osdkTableCell,
|
|
200
|
+
style: columnStyles,
|
|
201
|
+
onContextMenu: handleOpenContextMenu
|
|
202
|
+
}, /* @__PURE__ */ React4.createElement("div", {
|
|
203
|
+
className: TableCell_default2.osdkTableCellContent
|
|
204
|
+
}, flexRender(cell.column.columnDef.cell, cell.getContext()))), !isSelectColumn && isContextMenuOpen && !!popoverPosition && !!renderCellContextMenu && /* @__PURE__ */ React4.createElement(CellContextMenu, {
|
|
205
|
+
cell,
|
|
206
|
+
position: popoverPosition,
|
|
207
|
+
onClose: handleCloseContextMenu,
|
|
208
|
+
renderContent: renderCellContextMenu
|
|
209
|
+
}));
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// build/browser/object-table/TableRow.module.css
|
|
213
|
+
var css7 = '/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.osdkTableRow {\n position: absolute;\n display: flex;\n background-color: var(--osdk-table-row-bg-default);\n border-top: var(--osdk-table-row-divider);\n border-bottom: var(--osdk-table-border-width) solid transparent;\n\n &:last-child {\n border-bottom: var(--osdk-table-border);\n }\n\n /* Zebra rows */\n &:nth-child(even) {\n background-color: var(\n --osdk-table-row-bg-alternate,\n var(--osdk-table-row-bg-default)\n );\n }\n\n &:hover {\n z-index: 1;\n background-color: var(\n --osdk-table-row-bg-hover,\n var(--osdk-surface-background-color-default-hover)\n );\n border-top-color: var(--osdk-table-row-border-color-hover);\n border-bottom-color: var(--osdk-table-row-border-color-hover);\n }\n\n &[data-selected="true"] {\n z-index: 2;\n background-color: var(--osdk-table-row-bg-active);\n border-top-color: var(--osdk-table-row-border-color-active);\n border-bottom-color: var(--osdk-table-row-border-color-active);\n }\n\n &[data-selected="true"] + &[data-selected="true"] {\n border-top-color: transparent;\n }\n\n &[data-selected="true"]:has(+ &[data-selected="true"]) {\n border-bottom-color: transparent;\n }\n}\n';
|
|
214
|
+
if (typeof document !== "undefined") {
|
|
215
|
+
const style = document.createElement("style");
|
|
216
|
+
style.textContent = css7;
|
|
217
|
+
document.head.appendChild(style);
|
|
218
|
+
}
|
|
219
|
+
var TableRow_default2 = { "osdkTableRow": "osdkTableRow" };
|
|
220
|
+
|
|
221
|
+
// build/browser/object-table/TableRow.js
|
|
222
|
+
function TableRow({
|
|
223
|
+
row,
|
|
224
|
+
virtualRow,
|
|
225
|
+
onRowClick,
|
|
226
|
+
renderCellContextMenu
|
|
227
|
+
}) {
|
|
228
|
+
const handleClick = useCallback2(() => {
|
|
229
|
+
onRowClick?.(row.original);
|
|
230
|
+
}, [onRowClick, row.original]);
|
|
231
|
+
return /* @__PURE__ */ React5.createElement("tr", {
|
|
232
|
+
"data-selected": row.getIsSelected(),
|
|
233
|
+
className: TableRow_default2.osdkTableRow,
|
|
234
|
+
style: {
|
|
235
|
+
height: `${virtualRow.size}px`,
|
|
236
|
+
transform: `translateY(${virtualRow.start}px)`
|
|
237
|
+
},
|
|
238
|
+
onClick: handleClick
|
|
239
|
+
}, row.getVisibleCells().map((cell) => /* @__PURE__ */ React5.createElement(TableCell, {
|
|
240
|
+
key: cell.id,
|
|
241
|
+
cell,
|
|
242
|
+
renderCellContextMenu
|
|
243
|
+
})));
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// build/browser/object-table/TableBody.js
|
|
247
|
+
function TableBody({
|
|
22
248
|
rows,
|
|
23
249
|
tableContainerRef,
|
|
24
250
|
onRowClick,
|
|
25
251
|
renderCellContextMenu,
|
|
26
|
-
rowHeight = 40
|
|
252
|
+
rowHeight = 40,
|
|
253
|
+
isLoadingMore = false,
|
|
254
|
+
headerGroups = []
|
|
27
255
|
}) {
|
|
28
|
-
// Important: Keep the row virtualizer in the lowest component possible to avoid unnecessary re-renders.
|
|
29
256
|
const rowVirtualizer = useVirtualizer({
|
|
30
257
|
count: rows.length,
|
|
31
258
|
estimateSize: () => rowHeight,
|
|
32
259
|
getScrollElement: () => tableContainerRef.current,
|
|
33
260
|
overscan: 5
|
|
34
261
|
});
|
|
35
|
-
|
|
36
|
-
// Measure the virtualizer after the DOM has been laid out to ensure proper dimensions
|
|
37
262
|
useLayoutEffect(() => {
|
|
38
263
|
rowVirtualizer.measure();
|
|
39
264
|
}, [rowVirtualizer, rows.length]);
|
|
40
|
-
|
|
41
|
-
|
|
265
|
+
const totalSize = rowVirtualizer.getTotalSize();
|
|
266
|
+
const bodyHeight = isLoadingMore ? totalSize + rowHeight : totalSize;
|
|
267
|
+
const headers = headerGroups[0]?.headers ?? [];
|
|
268
|
+
return /* @__PURE__ */ React6.createElement("tbody", {
|
|
269
|
+
className: TableBody_default.osdkTableBody,
|
|
42
270
|
style: {
|
|
43
|
-
height: `${
|
|
271
|
+
height: `${bodyHeight}px`
|
|
44
272
|
}
|
|
45
|
-
}, rowVirtualizer.getVirtualItems().map(virtualRow => {
|
|
273
|
+
}, rowVirtualizer.getVirtualItems().map((virtualRow) => {
|
|
46
274
|
const row = rows[virtualRow.index];
|
|
47
|
-
return
|
|
275
|
+
return /* @__PURE__ */ React6.createElement(TableRow, {
|
|
48
276
|
key: row.id,
|
|
49
|
-
row
|
|
50
|
-
virtualRow
|
|
51
|
-
onRowClick
|
|
52
|
-
renderCellContextMenu
|
|
277
|
+
row,
|
|
278
|
+
virtualRow,
|
|
279
|
+
onRowClick,
|
|
280
|
+
renderCellContextMenu
|
|
53
281
|
});
|
|
282
|
+
}), isLoadingMore && /* @__PURE__ */ React6.createElement(LoadingRow, {
|
|
283
|
+
headers,
|
|
284
|
+
translateY: totalSize,
|
|
285
|
+
rowHeight,
|
|
286
|
+
columnCount: headers.length
|
|
54
287
|
}));
|
|
55
288
|
}
|
|
56
|
-
|
|
289
|
+
export {
|
|
290
|
+
TableBody
|
|
291
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableBody.js","names":["useVirtualizer","React","useLayoutEffect","styles","TableRow","TableBody","rows","tableContainerRef","onRowClick","renderCellContextMenu","rowHeight","rowVirtualizer","count","length","estimateSize","getScrollElement","current","overscan","measure","createElement","className","osdkTableBody","style","height","
|
|
1
|
+
{"version":3,"file":"TableBody.js","names":["useVirtualizer","React","useLayoutEffect","LoadingRow","styles","TableRow","TableBody","rows","tableContainerRef","onRowClick","renderCellContextMenu","rowHeight","isLoadingMore","headerGroups","rowVirtualizer","count","length","estimateSize","getScrollElement","current","overscan","measure","totalSize","getTotalSize","bodyHeight","headers","createElement","className","osdkTableBody","style","height","getVirtualItems","map","virtualRow","row","index","key","id","translateY","columnCount"],"sources":["TableBody.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Cell, HeaderGroup, Row, RowData } from \"@tanstack/react-table\";\nimport { useVirtualizer } from \"@tanstack/react-virtual\";\nimport React, { useLayoutEffect } from \"react\";\nimport { LoadingRow } from \"./LoadingRow.js\";\nimport styles from \"./TableBody.module.css\";\nimport { TableRow } from \"./TableRow.js\";\n\ninterface TableBodyProps<TData extends RowData> {\n rows: Array<Row<TData>>;\n tableContainerRef: React.RefObject<HTMLDivElement>;\n onRowClick?: (row: TData) => void;\n rowHeight?: number;\n renderCellContextMenu?: (\n row: TData,\n cell: Cell<TData, unknown>,\n ) => React.ReactNode;\n isLoadingMore?: boolean;\n headerGroups?: Array<HeaderGroup<TData>>;\n}\n\nexport function TableBody<TData extends RowData>({\n rows,\n tableContainerRef,\n onRowClick,\n renderCellContextMenu,\n rowHeight = 40,\n isLoadingMore = false,\n headerGroups = [],\n}: TableBodyProps<TData>): React.ReactElement {\n // Important: Keep the row virtualizer in the lowest component possible to avoid unnecessary re-renders.\n const rowVirtualizer = useVirtualizer<HTMLDivElement, HTMLTableRowElement>({\n count: rows.length,\n estimateSize: () => rowHeight,\n getScrollElement: () => tableContainerRef.current,\n overscan: 5,\n });\n\n // Measure the virtualizer after the DOM has been laid out to ensure proper dimensions\n useLayoutEffect(() => {\n rowVirtualizer.measure();\n }, [rowVirtualizer, rows.length]);\n\n const totalSize = rowVirtualizer.getTotalSize();\n const bodyHeight = isLoadingMore\n ? totalSize + rowHeight\n : totalSize;\n\n const headers = headerGroups[0]?.headers ?? [];\n\n return (\n <tbody\n className={styles.osdkTableBody}\n style={{\n height: `${bodyHeight}px`,\n }}\n >\n {rowVirtualizer.getVirtualItems().map((virtualRow) => {\n const row = rows[virtualRow.index];\n\n return (\n <TableRow\n key={row.id}\n row={row}\n virtualRow={virtualRow}\n onRowClick={onRowClick}\n renderCellContextMenu={renderCellContextMenu}\n />\n );\n })}\n {isLoadingMore && (\n <LoadingRow\n headers={headers}\n translateY={totalSize}\n rowHeight={rowHeight}\n columnCount={headers.length}\n />\n )}\n </tbody>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,cAAc,QAAQ,yBAAyB;AACxD,OAAOC,KAAK,IAAIC,eAAe,QAAQ,OAAO;AAC9C,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,OAAOC,MAAM,MAAM,wBAAwB;AAC3C,SAASC,QAAQ,QAAQ,eAAe;AAexC,OAAO,SAASC,SAASA,CAAwB;EAC/CC,IAAI;EACJC,iBAAiB;EACjBC,UAAU;EACVC,qBAAqB;EACrBC,SAAS,GAAG,EAAE;EACdC,aAAa,GAAG,KAAK;EACrBC,YAAY,GAAG;AACM,CAAC,EAAsB;EAC5C;EACA,MAAMC,cAAc,GAAGd,cAAc,CAAsC;IACzEe,KAAK,EAAER,IAAI,CAACS,MAAM;IAClBC,YAAY,EAAEA,CAAA,KAAMN,SAAS;IAC7BO,gBAAgB,EAAEA,CAAA,KAAMV,iBAAiB,CAACW,OAAO;IACjDC,QAAQ,EAAE;EACZ,CAAC,CAAC;;EAEF;EACAlB,eAAe,CAAC,MAAM;IACpBY,cAAc,CAACO,OAAO,CAAC,CAAC;EAC1B,CAAC,EAAE,CAACP,cAAc,EAAEP,IAAI,CAACS,MAAM,CAAC,CAAC;EAEjC,MAAMM,SAAS,GAAGR,cAAc,CAACS,YAAY,CAAC,CAAC;EAC/C,MAAMC,UAAU,GAAGZ,aAAa,GAC5BU,SAAS,GAAGX,SAAS,GACrBW,SAAS;EAEb,MAAMG,OAAO,GAAGZ,YAAY,CAAC,CAAC,CAAC,EAAEY,OAAO,IAAI,EAAE;EAE9C,oBACExB,KAAA,CAAAyB,aAAA;IACEC,SAAS,EAAEvB,MAAM,CAACwB,aAAc;IAChCC,KAAK,EAAE;MACLC,MAAM,EAAE,GAAGN,UAAU;IACvB;EAAE,GAEDV,cAAc,CAACiB,eAAe,CAAC,CAAC,CAACC,GAAG,CAAEC,UAAU,IAAK;IACpD,MAAMC,GAAG,GAAG3B,IAAI,CAAC0B,UAAU,CAACE,KAAK,CAAC;IAElC,oBACElC,KAAA,CAAAyB,aAAA,CAACrB,QAAQ;MACP+B,GAAG,EAAEF,GAAG,CAACG,EAAG;MACZH,GAAG,EAAEA,GAAI;MACTD,UAAU,EAAEA,UAAW;MACvBxB,UAAU,EAAEA,UAAW;MACvBC,qBAAqB,EAAEA;IAAsB,CAC9C,CAAC;EAEN,CAAC,CAAC,EACDE,aAAa,iBACZX,KAAA,CAAAyB,aAAA,CAACvB,UAAU;IACTsB,OAAO,EAAEA,OAAQ;IACjBa,UAAU,EAAEhB,SAAU;IACtBX,SAAS,EAAEA,SAAU;IACrB4B,WAAW,EAAEd,OAAO,CAACT;EAAO,CAC7B,CAEE,CAAC;AAEZ","ignoreList":[]}
|
|
@@ -1,31 +1,109 @@
|
|
|
1
|
-
|
|
2
|
-
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
1
|
+
// build/browser/object-table/TableCell.js
|
|
17
2
|
import { flexRender } from "@tanstack/react-table";
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
|
|
3
|
+
import React2, { useRef as useRef2 } from "react";
|
|
4
|
+
|
|
5
|
+
// build/browser/object-table/CellContextMenu.js
|
|
6
|
+
import React, { useEffect, useRef } from "react";
|
|
7
|
+
import { createPortal } from "react-dom";
|
|
8
|
+
var css = '/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.osdkCellContextMenu {\n position: fixed;\n z-index: var(--osdk-surface-z-index-2);\n}\n';
|
|
9
|
+
if (typeof document !== "undefined") {
|
|
10
|
+
const style = document.createElement("style");
|
|
11
|
+
style.textContent = css;
|
|
12
|
+
document.head.appendChild(style);
|
|
13
|
+
}
|
|
14
|
+
var CellContextMenu_default = { "osdkCellContextMenu": "osdkCellContextMenu" };
|
|
15
|
+
function CellContextMenu({
|
|
16
|
+
cell,
|
|
17
|
+
position,
|
|
18
|
+
onClose,
|
|
19
|
+
renderContent
|
|
20
|
+
}) {
|
|
21
|
+
const ref = useRef(null);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
const handleClickOutside = (event) => {
|
|
24
|
+
if (ref.current && !ref.current.contains(event.target)) {
|
|
25
|
+
onClose();
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
29
|
+
return () => {
|
|
30
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
31
|
+
};
|
|
32
|
+
}, [onClose]);
|
|
33
|
+
return /* @__PURE__ */ createPortal(/* @__PURE__ */ React.createElement("div", {
|
|
34
|
+
ref,
|
|
35
|
+
className: CellContextMenu_default.osdkCellContextMenu,
|
|
36
|
+
style: {
|
|
37
|
+
left: position.left,
|
|
38
|
+
top: position.top,
|
|
39
|
+
minWidth: position.width
|
|
40
|
+
}
|
|
41
|
+
}, renderContent(cell.row.original, cell)), document.body);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// build/browser/object-table/hooks/useCellContextMenu.js
|
|
45
|
+
import { useCallback, useState } from "react";
|
|
46
|
+
var useCellContextMenu = ({
|
|
47
|
+
tdRef
|
|
48
|
+
}) => {
|
|
49
|
+
const [popoverPosition, setPopoverPosition] = useState(null);
|
|
50
|
+
const [isContextMenuOpen, setIsContextMenuOpen] = useState(false);
|
|
51
|
+
const handleOpenContextMenu = useCallback((event) => {
|
|
52
|
+
event.preventDefault();
|
|
53
|
+
event.stopPropagation();
|
|
54
|
+
if (tdRef.current) {
|
|
55
|
+
const rect = tdRef.current.getBoundingClientRect();
|
|
56
|
+
const position = {
|
|
57
|
+
left: rect.left,
|
|
58
|
+
top: rect.bottom,
|
|
59
|
+
width: rect.width
|
|
60
|
+
};
|
|
61
|
+
setPopoverPosition(position);
|
|
62
|
+
setIsContextMenuOpen(true);
|
|
63
|
+
}
|
|
64
|
+
}, [tdRef]);
|
|
65
|
+
const handleCloseContextMenu = useCallback(() => {
|
|
66
|
+
setIsContextMenuOpen(false);
|
|
67
|
+
setPopoverPosition(null);
|
|
68
|
+
}, []);
|
|
69
|
+
return {
|
|
70
|
+
isContextMenuOpen,
|
|
71
|
+
handleOpenContextMenu,
|
|
72
|
+
handleCloseContextMenu,
|
|
73
|
+
popoverPosition
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
// build/browser/object-table/TableCell.module.css
|
|
78
|
+
var css2 = '/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.osdkTableCell {\n display: flex;\n align-items: center;\n text-align: left;\n position: relative;\n padding: var(--osdk-table-cell-padding);\n font-size: var(--osdk-table-cell-fontSize);\n color: var(--osdk-table-cell-color);\n background-color: inherit;\n border-right: var(--osdk-table-cell-divider);\n\n &:first-child {\n border-left: var(--osdk-table-border);\n }\n\n &:last-child {\n border-right: var(--osdk-table-border);\n }\n}\n\n.osdkTableCell[data-pinned="left"],\n.osdkTableCell[data-pinned="right"] {\n position: sticky;\n z-index: var(--osdk-surface-z-index-1);\n}\n\n/* Last left-pinned column - no left-pinned siblings after it */\n.osdkTableCell[data-pinned="left"]:not(:has(~ [data-pinned="left"])) {\n border-right: var(--osdk-table-pinned-column-border);\n}\n\n/* First right-pinned column - no right-pinned siblings before it */\n.osdkTableCell[data-pinned="right"]:not(:has(~ [data-pinned="right"]):nth-child(n+2)) {\n border-left: var(--osdk-table-pinned-column-border);\n}\n\n.osdkTableCell:has([role="checkbox"]) {\n justify-content: center;\n}\n\n.osdkTableCellContent:not(:has([role="checkbox"])) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n}\n';
|
|
79
|
+
if (typeof document !== "undefined") {
|
|
80
|
+
const style = document.createElement("style");
|
|
81
|
+
style.textContent = css2;
|
|
82
|
+
document.head.appendChild(style);
|
|
83
|
+
}
|
|
84
|
+
var TableCell_default = { "osdkTableCell": "osdkTableCell", "osdkTableCellContent": "osdkTableCellContent" };
|
|
85
|
+
|
|
86
|
+
// build/browser/object-table/utils/constants.js
|
|
87
|
+
var SELECTION_COLUMN_ID = "__selection__";
|
|
88
|
+
|
|
89
|
+
// build/browser/object-table/utils/getColumnPinningStyles.js
|
|
90
|
+
function getColumnPinningStyles(column) {
|
|
91
|
+
const isPinned = column.getIsPinned();
|
|
92
|
+
return {
|
|
93
|
+
columnStyles: {
|
|
94
|
+
left: isPinned === "left" ? `${column.getStart("left")}px` : void 0,
|
|
95
|
+
right: isPinned === "right" ? `${column.getAfter("right")}px` : void 0,
|
|
96
|
+
width: column.getSize()
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// build/browser/object-table/TableCell.js
|
|
102
|
+
function TableCell({
|
|
25
103
|
cell,
|
|
26
104
|
renderCellContextMenu
|
|
27
105
|
}) {
|
|
28
|
-
const tdRef =
|
|
106
|
+
const tdRef = useRef2(null);
|
|
29
107
|
const isSelectColumn = cell.column.id === SELECTION_COLUMN_ID;
|
|
30
108
|
const {
|
|
31
109
|
isContextMenuOpen,
|
|
@@ -38,19 +116,21 @@ export function TableCell({
|
|
|
38
116
|
const {
|
|
39
117
|
columnStyles
|
|
40
118
|
} = getColumnPinningStyles(cell.column);
|
|
41
|
-
return
|
|
119
|
+
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("td", {
|
|
42
120
|
ref: tdRef,
|
|
43
121
|
"data-pinned": cell.column.getIsPinned(),
|
|
44
|
-
className:
|
|
122
|
+
className: TableCell_default.osdkTableCell,
|
|
45
123
|
style: columnStyles,
|
|
46
124
|
onContextMenu: handleOpenContextMenu
|
|
47
|
-
},
|
|
48
|
-
className:
|
|
49
|
-
}, flexRender(cell.column.columnDef.cell, cell.getContext()))), !isSelectColumn && isContextMenuOpen && !!popoverPosition && !!renderCellContextMenu &&
|
|
50
|
-
cell
|
|
125
|
+
}, /* @__PURE__ */ React2.createElement("div", {
|
|
126
|
+
className: TableCell_default.osdkTableCellContent
|
|
127
|
+
}, flexRender(cell.column.columnDef.cell, cell.getContext()))), !isSelectColumn && isContextMenuOpen && !!popoverPosition && !!renderCellContextMenu && /* @__PURE__ */ React2.createElement(CellContextMenu, {
|
|
128
|
+
cell,
|
|
51
129
|
position: popoverPosition,
|
|
52
130
|
onClose: handleCloseContextMenu,
|
|
53
131
|
renderContent: renderCellContextMenu
|
|
54
132
|
}));
|
|
55
133
|
}
|
|
56
|
-
|
|
134
|
+
export {
|
|
135
|
+
TableCell
|
|
136
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableCell.js","names":["flexRender","React","useRef","CellContextMenu","useCellContextMenu","styles","SELECTION_COLUMN_ID","getColumnPinningStyles","TableCell","cell","renderCellContextMenu","tdRef","isSelectColumn","column","id","isContextMenuOpen","handleOpenContextMenu","handleCloseContextMenu","popoverPosition","columnStyles","createElement","Fragment","ref","getIsPinned","className","osdkTableCell","style","onContextMenu","osdkTableCellContent","columnDef","getContext","position","onClose","renderContent"],"sources":["TableCell.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Cell, RowData } from \"@tanstack/react-table\";\nimport { flexRender } from \"@tanstack/react-table\";\nimport type { ReactNode } from \"react\";\nimport React, { useRef } from \"react\";\nimport { CellContextMenu } from \"./CellContextMenu.js\";\nimport { useCellContextMenu } from \"./hooks/useCellContextMenu.js\";\nimport styles from \"./TableCell.module.css\";\nimport { SELECTION_COLUMN_ID } from \"./utils/constants.js\";\nimport { getColumnPinningStyles } from \"./utils/getColumnPinningStyles.js\";\n\ninterface TableCellProps<TData extends RowData> {\n cell: Cell<TData, unknown>;\n renderCellContextMenu?: (\n row: TData,\n cell: Cell<TData, unknown>,\n ) => React.ReactNode;\n}\n\nexport function TableCell<TData extends RowData>(\n { cell, renderCellContextMenu }: TableCellProps<TData>,\n): React.ReactElement {\n const tdRef = useRef<HTMLTableCellElement>(null);\n const isSelectColumn = cell.column.id === SELECTION_COLUMN_ID;\n\n const {\n isContextMenuOpen,\n handleOpenContextMenu,\n handleCloseContextMenu,\n popoverPosition,\n } = useCellContextMenu({\n tdRef,\n });\n\n const shouldRenderContextMenu = !isSelectColumn && isContextMenuOpen\n && !!popoverPosition\n && !!renderCellContextMenu;\n\n const { columnStyles } = getColumnPinningStyles(cell.column);\n\n return (\n <>\n <td\n ref={tdRef}\n data-pinned={cell.column.getIsPinned()}\n className={styles.osdkTableCell}\n style={columnStyles}\n onContextMenu={handleOpenContextMenu}\n >\n <div className={styles.osdkTableCellContent}>\n {flexRender(cell.column.columnDef.cell
|
|
1
|
+
{"version":3,"file":"TableCell.js","names":["flexRender","React","useRef","CellContextMenu","useCellContextMenu","styles","SELECTION_COLUMN_ID","getColumnPinningStyles","TableCell","cell","renderCellContextMenu","tdRef","isSelectColumn","column","id","isContextMenuOpen","handleOpenContextMenu","handleCloseContextMenu","popoverPosition","columnStyles","createElement","Fragment","ref","getIsPinned","className","osdkTableCell","style","onContextMenu","osdkTableCellContent","columnDef","getContext","position","onClose","renderContent"],"sources":["TableCell.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Cell, RowData } from \"@tanstack/react-table\";\nimport { flexRender } from \"@tanstack/react-table\";\nimport type { ReactNode } from \"react\";\nimport React, { useRef } from \"react\";\nimport { CellContextMenu } from \"./CellContextMenu.js\";\nimport { useCellContextMenu } from \"./hooks/useCellContextMenu.js\";\nimport styles from \"./TableCell.module.css\";\nimport { SELECTION_COLUMN_ID } from \"./utils/constants.js\";\nimport { getColumnPinningStyles } from \"./utils/getColumnPinningStyles.js\";\n\ninterface TableCellProps<TData extends RowData> {\n cell: Cell<TData, unknown>;\n renderCellContextMenu?: (\n row: TData,\n cell: Cell<TData, unknown>,\n ) => React.ReactNode;\n}\n\nexport function TableCell<TData extends RowData>(\n { cell, renderCellContextMenu }: TableCellProps<TData>,\n): React.ReactElement {\n const tdRef = useRef<HTMLTableCellElement>(null);\n const isSelectColumn = cell.column.id === SELECTION_COLUMN_ID;\n\n const {\n isContextMenuOpen,\n handleOpenContextMenu,\n handleCloseContextMenu,\n popoverPosition,\n } = useCellContextMenu({\n tdRef,\n });\n\n const shouldRenderContextMenu = !isSelectColumn && isContextMenuOpen\n && !!popoverPosition\n && !!renderCellContextMenu;\n\n const { columnStyles } = getColumnPinningStyles(cell.column);\n\n return (\n <>\n <td\n ref={tdRef}\n data-pinned={cell.column.getIsPinned()}\n className={styles.osdkTableCell}\n style={columnStyles}\n onContextMenu={handleOpenContextMenu}\n >\n <div className={styles.osdkTableCellContent}>\n {flexRender(\n cell.column.columnDef.cell,\n cell.getContext(),\n ) as ReactNode}\n </div>\n </td>\n {shouldRenderContextMenu\n && (\n <CellContextMenu\n cell={cell}\n position={popoverPosition}\n onClose={handleCloseContextMenu}\n renderContent={renderCellContextMenu}\n />\n )}\n </>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,UAAU,QAAQ,uBAAuB;AAElD,OAAOC,KAAK,IAAIC,MAAM,QAAQ,OAAO;AACrC,SAASC,eAAe,QAAQ,sBAAsB;AACtD,SAASC,kBAAkB,QAAQ,+BAA+B;AAClE,OAAOC,MAAM,MAAM,wBAAwB;AAC3C,SAASC,mBAAmB,QAAQ,sBAAsB;AAC1D,SAASC,sBAAsB,QAAQ,mCAAmC;AAU1E,OAAO,SAASC,SAASA,CACvB;EAAEC,IAAI;EAAEC;AAA6C,CAAC,EAClC;EACpB,MAAMC,KAAK,GAAGT,MAAM,CAAuB,IAAI,CAAC;EAChD,MAAMU,cAAc,GAAGH,IAAI,CAACI,MAAM,CAACC,EAAE,KAAKR,mBAAmB;EAE7D,MAAM;IACJS,iBAAiB;IACjBC,qBAAqB;IACrBC,sBAAsB;IACtBC;EACF,CAAC,GAAGd,kBAAkB,CAAC;IACrBO;EACF,CAAC,CAAC;EAMF,MAAM;IAAEQ;EAAa,CAAC,GAAGZ,sBAAsB,CAACE,IAAI,CAACI,MAAM,CAAC;EAE5D,oBACEZ,KAAA,CAAAmB,aAAA,CAAAnB,KAAA,CAAAoB,QAAA,qBACEpB,KAAA,CAAAmB,aAAA;IACEE,GAAG,EAAEX,KAAM;IACX,eAAaF,IAAI,CAACI,MAAM,CAACU,WAAW,CAAC,CAAE;IACvCC,SAAS,EAAEnB,MAAM,CAACoB,aAAc;IAChCC,KAAK,EAAEP,YAAa;IACpBQ,aAAa,EAAEX;EAAsB,gBAErCf,KAAA,CAAAmB,aAAA;IAAKI,SAAS,EAAEnB,MAAM,CAACuB;EAAqB,GACzC5B,UAAU,CACTS,IAAI,CAACI,MAAM,CAACgB,SAAS,CAACpB,IAAI,EAC1BA,IAAI,CAACqB,UAAU,CAAC,CAClB,CACG,CACH,CAAC,EArBuB,CAAClB,cAAc,IAAIG,iBAAiB,IAC/D,CAAC,CAACG,eAAe,IACjB,CAAC,CAACR,qBAAqB,iBAsBpBT,KAAA,CAAAmB,aAAA,CAACjB,eAAe;IACdM,IAAI,EAAEA,IAAK;IACXsB,QAAQ,EAAEb,eAAgB;IAC1Bc,OAAO,EAAEf,sBAAuB;IAChCgB,aAAa,EAAEvB;EAAsB,CACtC,CAEL,CAAC;AAEP","ignoreList":[]}
|