@osdk/react-components 0.1.0-beta.3 → 0.1.0-beta.4
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 +13 -0
- package/build/browser/base-components/checkbox/Checkbox.module.css +10 -8
- package/build/browser/object-table/CellContextMenu.js +2 -2
- package/build/browser/object-table/CellContextMenu.js.map +1 -1
- package/build/browser/object-table/CellContextMenu.module.css +20 -0
- package/build/browser/object-table/ObjectTable.js +2 -1
- 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 +6 -15
- package/build/browser/object-table/Table.js.map +1 -1
- package/build/browser/object-table/Table.module.css +21 -0
- package/build/browser/object-table/TableBody.js +2 -2
- package/build/browser/object-table/TableBody.js.map +1 -1
- package/build/browser/object-table/TableBody.module.css +20 -0
- package/build/browser/object-table/TableCell.js +5 -3
- package/build/browser/object-table/TableCell.js.map +1 -1
- package/build/browser/object-table/TableCell.module.css +46 -0
- package/build/browser/object-table/TableHeader.js +12 -30
- package/build/browser/object-table/TableHeader.js.map +1 -1
- package/build/browser/object-table/TableHeader.module.css +78 -0
- package/build/browser/object-table/TableRow.js +4 -3
- package/build/browser/object-table/TableRow.js.map +1 -1
- package/build/browser/object-table/TableRow.module.css +60 -0
- package/build/cjs/public/experimental.cjs +98 -108
- package/build/cjs/public/experimental.cjs.map +1 -1
- package/build/cjs/public/experimental.css +136 -4
- package/build/cjs/public/experimental.css.map +1 -1
- package/build/cjs/public/experimental.d.cts +1 -0
- package/build/esm/base-components/checkbox/Checkbox.module.css +10 -8
- package/build/esm/object-table/CellContextMenu.js +2 -2
- package/build/esm/object-table/CellContextMenu.js.map +1 -1
- package/build/esm/object-table/CellContextMenu.module.css +20 -0
- package/build/esm/object-table/ObjectTable.js +2 -1
- 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 +6 -15
- package/build/esm/object-table/Table.js.map +1 -1
- package/build/esm/object-table/Table.module.css +21 -0
- package/build/esm/object-table/TableBody.js +2 -2
- package/build/esm/object-table/TableBody.js.map +1 -1
- package/build/esm/object-table/TableBody.module.css +20 -0
- package/build/esm/object-table/TableCell.js +5 -3
- package/build/esm/object-table/TableCell.js.map +1 -1
- package/build/esm/object-table/TableCell.module.css +46 -0
- package/build/esm/object-table/TableHeader.js +12 -30
- package/build/esm/object-table/TableHeader.js.map +1 -1
- package/build/esm/object-table/TableHeader.module.css +78 -0
- package/build/esm/object-table/TableRow.js +4 -3
- package/build/esm/object-table/TableRow.js.map +1 -1
- package/build/esm/object-table/TableRow.module.css +60 -0
- package/build/types/object-table/CellContextMenu.d.ts.map +1 -1
- package/build/types/object-table/ObjectTableApi.d.ts +1 -0
- 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.map +1 -1
- package/build/types/object-table/TableCell.d.ts.map +1 -1
- package/build/types/object-table/TableHeader.d.ts.map +1 -1
- package/build/types/object-table/TableRow.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/object-table/hooks/useColumnDefs.ts","../../../src/object-table/hooks/useDefaultTableStates.ts","../../../src/object-table/hooks/useObjectTableData.ts","../../../src/object-table/utils/getRowId.ts","../../../src/object-table/hooks/useRowSelection.ts","../../../src/base-components/checkbox/Checkbox.module.css","../../../src/base-components/checkbox/Checkbox.tsx","../../../src/object-table/SelectionCells.tsx","../../../src/object-table/hooks/useSelectionColumn.tsx","../../../src/object-table/CellContextMenu.tsx","../../../src/object-table/hooks/useCellContextMenu.ts","../../../src/object-table/TableCell.tsx","../../../src/object-table/TableRow.tsx","../../../src/object-table/TableBody.tsx","../../../src/object-table/TableHeader.tsx","../../../src/object-table/Table.tsx","../../../src/object-table/ObjectTable.tsx"],"names":["useOsdkMetadata","useMemo","useObjectSet","useState","useCallback","React","BaseUICheckbox","classnames","Minus","Tick","useRef","useEffect","createPortal","flexRender","useVirtualizer","useLayoutEffect","useReactTable","getCoreRowModel"],"mappings":";;;;;;;;;;;;;;;;;;AAqBO,SAAS,aAAA,CAAc,YAAY,iBAAmB,EAAA;AAC3D,EAAM,MAAA;AAAA,IACJ,QAAA;AAAA,IACA,OAAA;AAAA,IACA;AAAA,GACF,GAAIA,sBAAgB,UAAU,CAAA;AAC9B,EAAM,MAAA,OAAA,GAAUC,cAAQ,MAAM;AAC5B,IAAA,MAAM,mBAAmB,QAAU,EAAA,UAAA;AAEnC,IAAA,IAAI,iBAAmB,EAAA;AACrB,MAAO,OAAA,+BAAA,CAAgC,mBAAmB,gBAAgB,CAAA;AAAA;AAI5E,IAAA,OAAO,kBAAkB,gBAAgB,CAAA;AAAA,GACxC,EAAA,CAAC,iBAAmB,EAAA,QAAA,EAAU,UAAU,CAAC,CAAA;AAC5C,EAAO,OAAA;AAAA,IACL,OAAA;AAAA,IACA,OAAA;AAAA,IACA;AAAA,GACF;AACF;AACA,SAAS,+BAAA,CAAgC,mBAAmB,gBAAkB,EAAA;AAC5E,EAAO,OAAA,iBAAA,CAAkB,IAAI,CAAO,GAAA,KAAA;AAClC,IAAM,MAAA;AAAA,MACJ,OAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,SAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,UAAA;AAAA,MACA;AAAA,KACE,GAAA,GAAA;AACJ,IAAA,MAAM,mBAAmB,OAAQ,CAAA,IAAA,KAAS,aAAa,gBAAmB,GAAA,OAAA,CAAQ,EAAE,CAAI,GAAA,MAAA;AACxF,IAAA,MAAM,SAAS,OAAQ,CAAA,EAAA;AACvB,IAAA,MAAM,MAAS,GAAA;AAAA,MACb,EAAI,EAAA,MAAA;AAAA,MACJ,WAA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;AAAA,IACf,OAAS,EAAA,UAAA;AAAA,IACT,iBAAiBC,0BAAgB,EAAA;AAAA,IACjC,KAAO,EAAA;AAAA,MACL,gBAAA;AAAA,MACA,YAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,oBAAsB,EAAA,eAAA;AAAA,IACtB,oBAAoB,aAAkB,KAAA,MAAA;AAAA,IACtC,gBAAkB,EAAA,UAAA;AAAA,IAClB,qBAAuB,EAAA,KAAA;AAAA,IACvB,aAAe,EAAA;AAAA,MACb,OAAS,EAAA;AAAA,KACX;AAAA,IACA;AAAA,GACD,CAAA;AACD,EAAA,MAAM,uBAA0Bb,GAAAA,iBAAAA,CAAY,CAAC,GAAA,EAAK,IAAS,KAAA;AACzD,IAAA,OAAO,qBAAwB,GAAA,GAAA,EAAK,IAAK,CAAA,QAAA,EAAU,CAAA;AAAA,GACrD,EAAG,CAAC,qBAAqB,CAAC,CAAA;AAC1B,EAAA,MAAM,iBAAiB,SAAa,IAAA,gBAAA;AACpC,EAAoB,uBAAAC,sBAAM,CAAA,aAAA,CAAc,KAAO,EAAA;AAAA,IAC7C,KAAA;AAAA,IACA,SAAW,EAAA,cAAA;AAAA,IACX,aAAe,EAAA,SAAA;AAAA,IACf,YAAY,KAAM,CAAA,UAAA;AAAA,IAClB,WAAW,KAAM,CAAA,SAAA;AAAA,IACjB,qBAAuB,EAAA;AAAA,GACxB,CAAA;AACH","file":"experimental.cjs","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 { useOsdkMetadata } from \"@osdk/react\";\nimport { useMemo } from \"react\";\n/**\n * Hook which builds column definitions for tanstack-table given the objectSet\n */\nexport function useColumnDefs(objectType, columnDefinitions) {\n const {\n metadata,\n loading,\n error\n } = useOsdkMetadata(objectType);\n const columns = useMemo(() => {\n const objectProperties = metadata?.properties;\n // If columnDefinitions is provided, construct colDefs with it\n if (columnDefinitions) {\n return getColumnsFromColumnDefinitions(columnDefinitions, objectProperties);\n }\n\n // If not, return the default columns from the object properties\n return getDefaultColumns(objectProperties);\n }, [columnDefinitions, metadata?.properties]);\n return {\n columns,\n loading,\n error\n };\n}\nfunction getColumnsFromColumnDefinitions(columnDefinitions, objectProperties) {\n return columnDefinitions.map(col => {\n const {\n locator,\n width,\n minWidth,\n maxWidth,\n resizable,\n orderable,\n filterable,\n renderCell,\n renderHeader\n } = col;\n const propertyMetadata = locator.type === \"property\" ? objectProperties?.[locator.id] : undefined;\n const colKey = locator.id;\n const colDef = {\n id: colKey,\n accessorKey: colKey,\n header: renderHeader ?? propertyMetadata?.displayName,\n size: width,\n minSize: minWidth,\n maxSize: maxWidth,\n enableResizing: resizable,\n enableSorting: orderable,\n enableColumnFilter: filterable,\n cell: cellContext => {\n const object = cellContext.row.original;\n return renderCell ? renderCell(object, locator) : cellContext.getValue();\n }\n };\n return colDef;\n });\n}\nfunction getDefaultColumns(objectProperties) {\n if (!objectProperties) return [];\n return Object.entries(objectProperties).map(([key, property]) => {\n const colDef = {\n accessorKey: key,\n header: property.displayName ?? key\n };\n return colDef;\n });\n}","/*\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 { useMemo } from \"react\";\nexport const useDefaultTableStates = ({\n columnDefinitions\n}) => {\n const columnVisibility = useMemo(() => {\n if (columnDefinitions) {\n const colVisibility = columnDefinitions.reduce((acc, colDef) => {\n if (colDef.isVisible !== undefined) {\n const {\n locator\n } = colDef;\n const colKey = locator.id;\n return {\n ...acc,\n [colKey]: colDef.isVisible\n };\n }\n return acc;\n }, {});\n return colVisibility;\n }\n }, [columnDefinitions]);\n return {\n columnVisibility\n };\n};","/*\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 { useObjectSet } from \"@osdk/react/experimental\";\nimport { useMemo } from \"react\";\nconst PAGE_SIZE = 50;\n\n/**\n * This hook is a wrapper around useObjectSet\n * It extracts RDP locators from columnDefinitions and calls useObjectSet + withProperties\n * to return data containing the derived properties.\n */\n\nexport function useObjectTableData(objectSet, columnDefinitions, filter) {\n // Extract derived properties definition to be passed to useObjectSet hook\n const withProperties = useMemo(() => {\n if (!columnDefinitions) {\n return;\n }\n const rdpColumns = columnDefinitions.map(colDef => colDef.locator).filter(colLocator => {\n return colLocator.type === \"rdp\";\n });\n return rdpColumns.reduce((acc, cur) => {\n return {\n ...acc,\n [cur.id]: cur.creator\n };\n }, {});\n }, [columnDefinitions]);\n return useObjectSet(objectSet, {\n withProperties,\n pageSize: PAGE_SIZE,\n where: filter\n });\n}","/*\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\nexport const getRowId = row => {\n return getRowIdFromPrimaryKey(row.$primaryKey);\n};\nexport const getRowIdFromPrimaryKey = primaryKey => primaryKey.toString();","/*\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 { useCallback, useMemo, useState } from \"react\";\nimport { getRowId, getRowIdFromPrimaryKey } from \"../utils/getRowId.js\";\nexport function useRowSelection({\n selectionMode = \"none\",\n selectedRows,\n onRowSelection,\n data\n}) {\n // The rowSelectionState in uncontrolled mode\n const [internalRowSelection, setInternalRowSelection] = useState({});\n\n // Used for shift-click behavior in \"multiple\" mode\n const [lastSelectedRowIndex, setLastSelectedRowIndex] = useState(null);\n const isControlled = selectedRows !== undefined;\n const isSelectionEnabled = selectionMode !== \"none\";\n\n // Row selection state\n // If controlled mode, return the state from selectedRows prop\n // If uncontrolled, return the internalRowSelection state\n const rowSelectionState = useMemo(() => {\n if (!isSelectionEnabled) return {};\n if (isControlled && selectedRows) {\n return getRowSelectionState(selectedRows);\n }\n return internalRowSelection;\n }, [isSelectionEnabled, isControlled, selectedRows, internalRowSelection]);\n const selectedCount = Object.values(rowSelectionState).filter(Boolean).length;\n const totalCount = data?.length ?? 0;\n const isAllSelected = totalCount > 0 && selectedCount === totalCount;\n const hasSelection = selectedCount > 0;\n const onToggleAll = useCallback(() => {\n if (!isSelectionEnabled || !data) return;\n const newSelectedRows = isAllSelected ? [] : data.map(item => item.$primaryKey);\n if (!isControlled) {\n setInternalRowSelection(getRowSelectionState(newSelectedRows));\n }\n onRowSelection?.(newSelectedRows);\n }, [isSelectionEnabled, data, isAllSelected, isControlled, onRowSelection]);\n const onToggleRow = useCallback((rowId, rowIndex, isShiftClick = false) => {\n if (!isSelectionEnabled || !data) return;\n let newSelectedRows = [];\n if (selectionMode === \"single\") {\n newSelectedRows = getSingleSelectionRows({\n rowId,\n rowIndex,\n data,\n rowSelectionState\n });\n setLastSelectedRowIndex(rowIndex);\n } else {\n // Multiple selection mode\n\n // When user does shiftClick but lastSelectedRowIndex is null,\n // it is treated as a normal click in multiple selection\n if (isShiftClick && lastSelectedRowIndex != null) {\n newSelectedRows = getRangeSelectionRows({\n rowId,\n rowIndex,\n data,\n lastSelectedRowIndex,\n rowSelectionState\n });\n } else {\n newSelectedRows = getMultipleSelectionRows({\n rowId,\n rowIndex,\n data,\n rowSelectionState\n });\n }\n setLastSelectedRowIndex(rowIndex);\n }\n if (!isControlled) {\n setInternalRowSelection(getRowSelectionState(newSelectedRows));\n }\n onRowSelection?.(newSelectedRows);\n }, [isSelectionEnabled, data, selectionMode, lastSelectedRowIndex, isControlled, rowSelectionState, onRowSelection]);\n return {\n rowSelection: rowSelectionState,\n isAllSelected,\n hasSelection,\n onToggleAll,\n onToggleRow\n };\n}\nfunction getSingleSelectionRows({\n rowId,\n rowIndex,\n data,\n rowSelectionState\n}) {\n const primaryKey = data[rowIndex].$primaryKey;\n // Toggle row selection in single selection mode\n const newSelectedRows = rowSelectionState[rowId] ? [] : [primaryKey];\n return newSelectedRows;\n}\nfunction getRangeSelectionRows({\n lastSelectedRowIndex,\n rowIndex,\n data,\n rowSelectionState\n}) {\n // This function is only called if lastSelectedRowIndex is not null\n // This condition is added for typechecks only\n if (lastSelectedRowIndex != null) {\n const rowsInRange = getRowsInRange(data, lastSelectedRowIndex, rowIndex);\n const primaryKeysInRange = rowsInRange.map(item => item.$primaryKey);\n const currentlySelected = getSelectedPrimaryKeys(rowSelectionState, data);\n\n // Add all rows in range to selectedRows if not yet selected\n const newSelectedRows = [...currentlySelected];\n primaryKeysInRange.forEach(item => {\n if (!newSelectedRows.includes(item)) {\n newSelectedRows.push(item);\n }\n });\n return newSelectedRows;\n }\n return [];\n}\nfunction getMultipleSelectionRows({\n rowIndex,\n data,\n rowSelectionState\n}) {\n const primaryKey = data[rowIndex].$primaryKey;\n const currentlySelected = getSelectedPrimaryKeys(rowSelectionState, data);\n // Handles single row toggle in multiple selection mode\n const newSelectedRows = currentlySelected.includes(primaryKey) ? currentlySelected.filter(i => i !== primaryKey) : [...currentlySelected, primaryKey];\n return newSelectedRows;\n}\n\n/**\n * Builds a range of rows from startIndex to endIndex\n */\nfunction getRowsInRange(data, startIndex, endIndex) {\n const start = Math.min(startIndex, endIndex);\n const end = Math.max(startIndex, endIndex);\n const rows = [];\n for (let i = start; i <= end; i++) {\n const item = data[i];\n if (item) {\n rows.push(item);\n }\n }\n return rows;\n}\n\n/**\n * Converts an array of primary keys to a RowSelectionState object\n */\nfunction getRowSelectionState(primaryKeys) {\n return primaryKeys.reduce((acc, primaryKey) => {\n acc[getRowIdFromPrimaryKey(primaryKey)] = true;\n return acc;\n }, {});\n}\n\n/**\n * Converts from a RowSelectionState object back to an array of primary keys\n */\nfunction getSelectedPrimaryKeys(selectionState, data) {\n return data.filter(item => selectionState[getRowId(item)]).map(item => item.$primaryKey);\n}","/*\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.osdkCheckboxRoot{\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: calc(var(--osdk-checkbox-icon-size) + var(--osdk-checkbox-padding) * 2);\n min-height: calc(var(--osdk-checkbox-icon-size) + var(--osdk-checkbox-padding) * 2);\n padding: var(--osdk-checkbox-padding);\n box-sizing: border-box;\n cursor: pointer;\n border-radius: var(--bp-surface-borderRadius);\n\n &[data-unchecked] {\n background-color: var(--osdk-checkbox-bg);\n border: var(--osdk-checkbox-border);\n\n &:hover {\n background-color: var(--osdk-checkbox-bg-hover);\n }\n\n &:active {\n background-color: var(--osdk-checkbox-bg-active);\n }\n }\n\n &[data-checked], &[data-indeterminate] {\n background-color: var(--osdk-checkbox-bg-checked);\n\n &:hover {\n background-color: var(--osdk-checkbox-bg-checked-hover);\n }\n\n &:active {\n background-color: var(--osdk-checkbox-bg-checked-active);\n }\n }\n\n &:focus-visible {\n outline: var(--bp-emphasis-focusWidth) solid var(--bp-emphasis-focusColor);\n outline-offset: var(--bp-emphasis-focusOffset);\n }\n}\n\n.osdkCheckboxIndicator {\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--osdk-checkbox-checked-foreground);\n width: var(--osdk-checkbox-icon-size);\n height: var(--osdk-checkbox-icon-size);\n\n\n &[data-unchecked] {\n display: none;\n }\n}","function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\n/*\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 { Checkbox as BaseUICheckbox } from \"@base-ui/react/checkbox\";\nimport { Minus, Tick } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport React from \"react\";\nimport styles from \"./Checkbox.module.css\";\nexport function Checkbox({\n indeterminate,\n className,\n indicatorProps,\n ...rest\n}) {\n return /*#__PURE__*/React.createElement(BaseUICheckbox.Root, _extends({\n className: classnames(styles.osdkCheckboxRoot, className),\n indeterminate: indeterminate\n }, rest), /*#__PURE__*/React.createElement(BaseUICheckbox.Indicator, _extends({}, indicatorProps, {\n className: classnames(styles.osdkCheckboxIndicator, indicatorProps?.className)\n }), indeterminate ? /*#__PURE__*/React.createElement(Minus, {\n color: \"currentColor\"\n }) : /*#__PURE__*/React.createElement(Tick, {\n color: \"currentColor\"\n })));\n}","/*\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 React, { useCallback } from \"react\";\nimport { Checkbox } from \"../base-components/checkbox/Checkbox.js\";\nexport function SelectionHeaderCell({\n isAllSelected,\n hasSelection,\n onToggleAll\n}) {\n return /*#__PURE__*/React.createElement(Checkbox, {\n indeterminate: hasSelection && !isAllSelected,\n checked: isAllSelected,\n onCheckedChange: onToggleAll,\n \"aria-label\": \"Select all rows\"\n });\n}\nexport function SelectionCell({\n row,\n onToggleRow\n}) {\n const handleClick = useCallback(event => {\n const isShiftClick = event.shiftKey;\n onToggleRow(row.id, row.index, isShiftClick);\n }, [row, onToggleRow]);\n return /*#__PURE__*/React.createElement(Checkbox, {\n checked: row.getIsSelected(),\n onClick: handleClick,\n \"aria-label\": `Select row ${row.index + 1}`\n });\n}","/*\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 React, { useMemo } from \"react\";\nimport { SelectionCell, SelectionHeaderCell } from \"../SelectionCells.js\";\nexport const SELECTION_COLUMN_ID = \"__selection__\";\nexport const useSelectionColumn = ({\n selectionMode,\n isAllSelected,\n hasSelection,\n onToggleAll,\n onToggleRow\n}) => {\n const selectionColumn = useMemo(() => {\n if (selectionMode === \"none\") return null;\n return {\n id: SELECTION_COLUMN_ID,\n header: () => selectionMode === \"multiple\" ? /*#__PURE__*/React.createElement(SelectionHeaderCell, {\n isAllSelected: isAllSelected,\n hasSelection: hasSelection,\n onToggleAll: onToggleAll\n }) : null,\n cell: ({\n row\n }) => /*#__PURE__*/React.createElement(SelectionCell, {\n row: row,\n onToggleRow: onToggleRow\n }),\n size: 50,\n minSize: 50,\n maxSize: 50,\n enableSorting: false,\n enableResizing: false\n };\n }, [selectionMode, isAllSelected, hasSelection, onToggleAll, onToggleRow]);\n return selectionColumn;\n};","/*\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 React, { useEffect, useRef } from \"react\";\nimport { createPortal } from \"react-dom\";\nexport function CellContextMenu({\n cell,\n position,\n onClose,\n renderContent\n}) {\n const ref = useRef(null);\n useEffect(() => {\n const handleClickOutside = event => {\n if (ref.current && !ref.current.contains(event.target)) {\n onClose();\n }\n };\n document.addEventListener(\"mousedown\", handleClickOutside);\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [onClose]);\n return /*#__PURE__*/createPortal(/*#__PURE__*/React.createElement(\"div\", {\n ref: ref,\n style: {\n position: \"fixed\",\n zIndex: 9999,\n left: position.left,\n top: position.top,\n minWidth: position.width\n }\n }, renderContent(cell.row.original, cell)), document.body);\n}","/*\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 { useCallback, useState } from \"react\";\nexport const useCellContextMenu = ({\n tdRef\n}) => {\n const [popoverPosition, setPopoverPosition] = useState(null);\n const [isContextMenuOpen, setIsContextMenuOpen] = useState(false);\n const handleOpenContextMenu = useCallback(event => {\n event.preventDefault();\n event.stopPropagation();\n if (tdRef.current) {\n const rect = tdRef.current.getBoundingClientRect();\n const position = {\n left: rect.left,\n top: rect.bottom,\n width: rect.width\n };\n setPopoverPosition(position);\n setIsContextMenuOpen(true);\n }\n }, [tdRef]);\n const handleCloseContextMenu = useCallback(() => {\n setIsContextMenuOpen(false);\n setPopoverPosition(null);\n }, []);\n return {\n isContextMenuOpen,\n handleOpenContextMenu,\n handleCloseContextMenu,\n popoverPosition\n };\n};","/*\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 { flexRender } from \"@tanstack/react-table\";\nimport React, { useRef } from \"react\";\nimport { CellContextMenu } from \"./CellContextMenu.js\";\nimport { useCellContextMenu } from \"./hooks/useCellContextMenu.js\";\nimport { SELECTION_COLUMN_ID } from \"./hooks/useSelectionColumn.js\";\nexport function TableCell({\n cell,\n renderCellContextMenu\n}) {\n const tdRef = useRef(null);\n const isSelectColumn = cell.column.id === SELECTION_COLUMN_ID;\n const {\n isContextMenuOpen,\n handleOpenContextMenu,\n handleCloseContextMenu,\n popoverPosition\n } = useCellContextMenu({\n tdRef\n });\n const shouldRenderContextMenu = !isSelectColumn && isContextMenuOpen && !!popoverPosition && !!renderCellContextMenu;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"td\", {\n ref: tdRef,\n style: {\n display: \"flex\",\n alignItems: \"center\",\n width: cell.column.getSize()\n },\n onContextMenu: handleOpenContextMenu\n }, flexRender(cell.column.columnDef.cell, cell.getContext())), shouldRenderContextMenu && /*#__PURE__*/React.createElement(CellContextMenu, {\n cell: cell,\n position: popoverPosition,\n onClose: handleCloseContextMenu,\n renderContent: renderCellContextMenu\n }));\n}","/*\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 React, { useCallback } from \"react\";\nimport { TableCell } from \"./TableCell.js\";\nexport function TableRow({\n row,\n virtualRow,\n onRowClick,\n renderCellContextMenu\n}) {\n const handleClick = useCallback(() => {\n onRowClick?.(row.original);\n }, [onRowClick, row.original]);\n return /*#__PURE__*/React.createElement(\"tr\", {\n style: {\n position: \"absolute\",\n height: `${virtualRow.size}px`,\n transform: `translateY(${virtualRow.start}px)`,\n display: \"flex\"\n },\n onClick: handleClick\n }, row.getVisibleCells().map(cell => /*#__PURE__*/React.createElement(TableCell, {\n key: cell.id,\n cell: cell,\n renderCellContextMenu: renderCellContextMenu\n })));\n}","/*\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 { useVirtualizer } from \"@tanstack/react-virtual\";\nimport React, { useLayoutEffect } from \"react\";\nimport { TableRow } from \"./TableRow.js\";\nexport function TableBody({\n rows,\n tableContainerRef,\n onRowClick,\n renderCellContextMenu,\n rowHeight = 40\n}) {\n // Important: Keep the row virtualizer in the lowest component possible to avoid unnecessary re-renders.\n const rowVirtualizer = useVirtualizer({\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 return /*#__PURE__*/React.createElement(\"tbody\", {\n style: {\n display: \"grid\",\n position: \"relative\",\n height: `${rowVirtualizer.getTotalSize()}px`\n }\n }, rowVirtualizer.getVirtualItems().map(virtualRow => {\n const row = rows[virtualRow.index];\n return /*#__PURE__*/React.createElement(TableRow, {\n key: row.id,\n row: row,\n virtualRow: virtualRow,\n onRowClick: onRowClick,\n renderCellContextMenu: renderCellContextMenu\n });\n }));\n}","/*\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 { flexRender } from \"@tanstack/react-table\";\nimport React from \"react\";\nexport function TableHeader({\n table\n}) {\n return /*#__PURE__*/React.createElement(\"thead\", {\n style: {\n display: \"grid\",\n position: \"sticky\",\n top: 0,\n zIndex: 1\n }\n }, table.getHeaderGroups().map(headerGroup => /*#__PURE__*/React.createElement(\"tr\", {\n key: headerGroup.id,\n style: {\n display: \"flex\"\n }\n }, headerGroup.headers.map(header =>\n /*#__PURE__*/\n // TODO: Move inline styling to CSS file\n React.createElement(\"th\", {\n key: header.id,\n style: {\n display: \"flex\",\n width: header.getSize(),\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n position: \"relative\"\n }\n }, header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()), header.column.getCanResize() && /*#__PURE__*/React.createElement(\"div\", {\n onDoubleClick: () => header.column.resetSize(),\n onMouseDown: header.getResizeHandler(),\n onTouchStart: header.getResizeHandler(),\n style: {\n position: \"absolute\",\n right: 0,\n top: 0,\n height: \"100%\",\n width: \"3px\",\n cursor: \"col-resize\",\n touchAction: \"none\",\n zIndex: 11,\n transform: header.column.getIsResizing() ? `translateX(${table.getState().columnSizingInfo.deltaOffset ?? 0}px)` : \"\"\n }\n }))))));\n}","/*\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 React, { useCallback, useRef } from \"react\";\nimport { TableBody } from \"./TableBody.js\";\nimport { TableHeader } from \"./TableHeader.js\";\nexport function Table({\n table,\n isLoading,\n fetchNextPage,\n onRowClick,\n rowHeight,\n renderCellContextMenu\n}) {\n const tableContainerRef = useRef(null);\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 const fetchMoreOnEndReached = useCallback(async containerRefElement => {\n if (containerRefElement && !fetchingRef.current) {\n const {\n scrollHeight,\n scrollTop,\n clientHeight\n } = containerRefElement;\n if (scrollHeight - scrollTop - clientHeight < 100 && !isLoading) {\n fetchingRef.current = true;\n try {\n await fetchNextPage?.();\n } finally {\n fetchingRef.current = false;\n }\n }\n }\n }, [fetchNextPage, isLoading]);\n const handleScroll = useCallback(async e => {\n await fetchMoreOnEndReached(e.currentTarget);\n }, [fetchMoreOnEndReached]);\n\n // TODO: Handle error, loading and empty states\n\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: tableContainerRef,\n style: {\n position: \"relative\",\n // needed for sticky header\n height: \"100%\",\n // needed for scrolling\n overflow: \"auto\",\n cursor: table.getState().columnSizingInfo?.isResizingColumn ? \"col-resize\" : \"default\",\n userSelect: table.getState().columnSizingInfo?.isResizingColumn ? \"none\" : \"auto\"\n },\n onScroll: handleScroll\n }, /*#__PURE__*/React.createElement(\"table\", {\n style: {\n display: \"grid\"\n }\n }, /*#__PURE__*/React.createElement(TableHeader, {\n table: table\n }), /*#__PURE__*/React.createElement(TableBody, {\n rows: table.getRowModel().rows,\n tableContainerRef: tableContainerRef,\n onRowClick: onRowClick,\n rowHeight: rowHeight,\n renderCellContextMenu: renderCellContextMenu\n })));\n}","/*\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 { getCoreRowModel, useReactTable } from \"@tanstack/react-table\";\nimport React, { useCallback, useMemo, useState } from \"react\";\nimport { useColumnDefs } from \"./hooks/useColumnDefs.js\";\nimport { useDefaultTableStates } from \"./hooks/useDefaultTableStates.js\";\nimport { useObjectTableData } from \"./hooks/useObjectTableData.js\";\nimport { useRowSelection } from \"./hooks/useRowSelection.js\";\nimport { useSelectionColumn } from \"./hooks/useSelectionColumn.js\";\nimport { Table } from \"./Table.js\";\nimport { getRowId } from \"./utils/getRowId.js\";\n\n/**\n * ObjectTable - A headless table component for displaying OSDK object sets\n *\n * @example\n * ```tsx\n * <ObjectTable objectSet={myObjectSet} objectType={MyObjectType} />\n * ```\n */\n\nexport function ObjectTable({\n objectSet,\n objectType,\n columnDefinitions,\n filter,\n onRowSelection,\n renderCellContextMenu,\n selectionMode = \"none\",\n selectedRows,\n ...props\n}) {\n const {\n data,\n fetchMore,\n isLoading\n } = useObjectTableData(objectSet, columnDefinitions, filter);\n const {\n columns,\n loading: isColumnsLoading\n } = useColumnDefs(objectType, columnDefinitions);\n const {\n columnVisibility\n } = useDefaultTableStates({\n columnDefinitions\n });\n const [columnSizing, setColumnSizing] = useState({});\n const {\n rowSelection,\n isAllSelected,\n hasSelection,\n onToggleAll,\n onToggleRow\n } = useRowSelection({\n selectionMode,\n selectedRows,\n onRowSelection,\n data\n });\n const selectionColumn = useSelectionColumn({\n selectionMode,\n isAllSelected,\n hasSelection,\n onToggleAll,\n onToggleRow\n });\n const allColumns = useMemo(() => {\n return selectionColumn ? [selectionColumn, ...columns] : columns;\n }, [selectionColumn, columns]);\n const table = useReactTable({\n data: data ?? [],\n columns: allColumns,\n getCoreRowModel: getCoreRowModel(),\n state: {\n columnVisibility,\n rowSelection,\n columnSizing\n },\n onColumnSizingChange: setColumnSizing,\n enableRowSelection: selectionMode !== \"none\",\n columnResizeMode: \"onChange\",\n columnResizeDirection: \"ltr\",\n defaultColumn: {\n minSize: 80\n },\n getRowId\n });\n const onRenderCellContextMenu = useCallback((row, cell) => {\n return renderCellContextMenu?.(row, cell.getValue());\n }, [renderCellContextMenu]);\n const isTableLoading = isLoading || isColumnsLoading;\n return /*#__PURE__*/React.createElement(Table, {\n table: table,\n isLoading: isTableLoading,\n fetchNextPage: fetchMore,\n onRowClick: props.onRowClick,\n rowHeight: props.rowHeight,\n renderCellContextMenu: onRenderCellContextMenu\n });\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/object-table/hooks/useColumnDefs.ts","../../../src/object-table/hooks/useDefaultTableStates.ts","../../../src/object-table/hooks/useObjectTableData.ts","../../../src/object-table/utils/getRowId.ts","../../../src/object-table/hooks/useRowSelection.ts","../../../src/base-components/checkbox/Checkbox.module.css","../../../src/base-components/checkbox/Checkbox.tsx","../../../src/object-table/SelectionCells.tsx","../../../src/object-table/hooks/useSelectionColumn.tsx","../../../src/object-table/Table.module.css","../../../src/object-table/TableBody.module.css","../../../src/object-table/CellContextMenu.module.css","../../../src/object-table/CellContextMenu.tsx","../../../src/object-table/hooks/useCellContextMenu.ts","../../../src/object-table/TableCell.module.css","../../../src/object-table/TableCell.tsx","../../../src/object-table/TableRow.module.css","../../../src/object-table/TableRow.tsx","../../../src/object-table/TableBody.tsx","../../../src/object-table/TableHeader.module.css","../../../src/object-table/TableHeader.tsx","../../../src/object-table/Table.tsx","../../../src/object-table/ObjectTable.tsx"],"names":["useOsdkMetadata","useMemo","useObjectSet","useState","useCallback","React","BaseUICheckbox","classnames","Minus","Tick","useRef","useEffect","createPortal","flexRender","useVirtualizer","useLayoutEffect","classNames","useReactTable","getCoreRowModel"],"mappings":";;;;;;;;;;;;;;;;;;AAqBO,SAAS,aAAA,CAAc,YAAY,iBAAmB,EAAA;AAC3D,EAAM,MAAA;AAAA,IACJ,QAAA;AAAA,IACA,OAAA;AAAA,IACA;AAAA,GACF,GAAIA,sBAAgB,UAAU,CAAA;AAC9B,EAAM,MAAA,OAAA,GAAUC,eAAQ,MAAM;AAC5B,IAAA,MAAM,mBAAmB,QAAU,EAAA,UAAA;AAEnC,IAAA,IAAI,iBAAmB,EAAA;AACrB,MAAO,OAAA,+BAAA,CAAgC,mBAAmB,gBAAgB,CAAA;AAAA;AAI5E,IAAA,OAAO,kBAAkB,gBAAgB,CAAA;AAAA,GACxC,EAAA,CAAC,iBAAmB,EAAA,QAAA,EAAU,UAAU,CAAC,CAAA;AAC5C,EAAO,OAAA;AAAA,IACL,OAAA;AAAA,IACA,OAAA;AAAA,IACA;AAAA,GACF;AACF;AACA,SAAS,+BAAA,CAAgC,mBAAmB,gBAAkB,EAAA;AAC5E,EAAO,OAAA,iBAAA,CAAkB,IAAI,CAAO,GAAA,KAAA;AAClC,IAAM,MAAA;AAAA,MACJ,OAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,SAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,UAAA;AAAA,MACA;AAAA,KACE,GAAA,GAAA;AACJ,IAAA,MAAM,mBAAmB,OAAQ,CAAA,IAAA,KAAS,aAAa,gBAAmB,GAAA,OAAA,CAAQ,EAAE,CAAI,GAAA,MAAA;AACxF,IAAA,MAAM,SAAS,OAAQ,CAAA,EAAA;AACvB,IAAA,MAAM,MAAS,GAAA;AAAA,MACb,EAAI,EAAA,MAAA;AAAA,MACJ,WAAa,EAAA,MAAA;AAAA,MACb,MAAA,EAAQ,gBAAgB,g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B,SAAa,IAAA,gBAAA;AACpC,EAAoB,uBAAAC,uBAAM,CAAA,aAAA,CAAc,KAAO,EAAA;AAAA,IAC7C,KAAA;AAAA,IACA,SAAW,EAAA,cAAA;AAAA,IACX,aAAe,EAAA,SAAA;AAAA,IACf,YAAY,KAAM,CAAA,UAAA;AAAA,IAClB,WAAW,KAAM,CAAA,SAAA;AAAA,IACjB,qBAAuB,EAAA,uBAAA;AAAA,IACvB,WAAW,KAAM,CAAA;AAAA,GAClB,CAAA;AACH","file":"experimental.cjs","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 { useOsdkMetadata } from \"@osdk/react\";\nimport { useMemo } from \"react\";\n/**\n * Hook which builds column definitions for tanstack-table given the objectSet\n */\nexport function useColumnDefs(objectType, columnDefinitions) {\n const {\n metadata,\n loading,\n error\n } = useOsdkMetadata(objectType);\n const columns = useMemo(() => {\n const objectProperties = metadata?.properties;\n // If columnDefinitions is provided, construct colDefs with it\n if (columnDefinitions) {\n return getColumnsFromColumnDefinitions(columnDefinitions, objectProperties);\n }\n\n // If not, return the default columns from the object properties\n return getDefaultColumns(objectProperties);\n }, [columnDefinitions, metadata?.properties]);\n return {\n columns,\n loading,\n error\n };\n}\nfunction getColumnsFromColumnDefinitions(columnDefinitions, objectProperties) {\n return columnDefinitions.map(col => {\n const {\n locator,\n width,\n minWidth,\n maxWidth,\n resizable,\n orderable,\n filterable,\n renderCell,\n renderHeader\n } = col;\n const propertyMetadata = locator.type === \"property\" ? objectProperties?.[locator.id] : undefined;\n const colKey = locator.id;\n const colDef = {\n id: colKey,\n accessorKey: colKey,\n header: renderHeader ?? propertyMetadata?.displayName,\n size: width,\n minSize: minWidth,\n maxSize: maxWidth,\n enableResizing: resizable,\n enableSorting: orderable,\n enableColumnFilter: filterable,\n cell: cellContext => {\n const object = cellContext.row.original;\n return renderCell ? renderCell(object, locator) : cellContext.getValue();\n }\n };\n return colDef;\n });\n}\nfunction getDefaultColumns(objectProperties) {\n if (!objectProperties) return [];\n return Object.entries(objectProperties).map(([key, property]) => {\n const colDef = {\n accessorKey: key,\n header: property.displayName ?? key\n };\n return colDef;\n });\n}","/*\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 { useMemo } from \"react\";\nexport const useDefaultTableStates = ({\n columnDefinitions\n}) => {\n const columnVisibility = useMemo(() => {\n if (columnDefinitions) {\n const colVisibility = columnDefinitions.reduce((acc, colDef) => {\n if (colDef.isVisible !== undefined) {\n const {\n locator\n } = colDef;\n const colKey = locator.id;\n return {\n ...acc,\n [colKey]: colDef.isVisible\n };\n }\n return acc;\n }, {});\n return colVisibility;\n }\n }, [columnDefinitions]);\n return {\n columnVisibility\n };\n};","/*\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 { useObjectSet } from \"@osdk/react/experimental\";\nimport { useMemo } from \"react\";\nconst PAGE_SIZE = 50;\n\n/**\n * This hook is a wrapper around useObjectSet\n * It extracts RDP locators from columnDefinitions and calls useObjectSet + withProperties\n * to return data containing the derived properties.\n */\n\nexport function useObjectTableData(objectSet, columnDefinitions, filter) {\n // Extract derived properties definition to be passed to useObjectSet hook\n const withProperties = useMemo(() => {\n if (!columnDefinitions) {\n return;\n }\n const rdpColumns = columnDefinitions.map(colDef => colDef.locator).filter(colLocator => {\n return colLocator.type === \"rdp\";\n });\n return rdpColumns.reduce((acc, cur) => {\n return {\n ...acc,\n [cur.id]: cur.creator\n };\n }, {});\n }, [columnDefinitions]);\n return useObjectSet(objectSet, {\n withProperties,\n pageSize: PAGE_SIZE,\n where: filter\n });\n}","/*\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\nexport const getRowId = row => {\n return getRowIdFromPrimaryKey(row.$primaryKey);\n};\nexport const getRowIdFromPrimaryKey = primaryKey => primaryKey.toString();","/*\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 { useCallback, useMemo, useState } from \"react\";\nimport { getRowId, getRowIdFromPrimaryKey } from \"../utils/getRowId.js\";\nexport function useRowSelection({\n selectionMode = \"none\",\n selectedRows,\n onRowSelection,\n data\n}) {\n // The rowSelectionState in uncontrolled mode\n const [internalRowSelection, setInternalRowSelection] = useState({});\n\n // Used for shift-click behavior in \"multiple\" mode\n const [lastSelectedRowIndex, setLastSelectedRowIndex] = useState(null);\n const isControlled = selectedRows !== undefined;\n const isSelectionEnabled = selectionMode !== \"none\";\n\n // Row selection state\n // If controlled mode, return the state from selectedRows prop\n // If uncontrolled, return the internalRowSelection state\n const rowSelectionState = useMemo(() => {\n if (!isSelectionEnabled) return {};\n if (isControlled && selectedRows) {\n return getRowSelectionState(selectedRows);\n }\n return internalRowSelection;\n }, [isSelectionEnabled, isControlled, selectedRows, internalRowSelection]);\n const selectedCount = Object.values(rowSelectionState).filter(Boolean).length;\n const totalCount = data?.length ?? 0;\n const isAllSelected = totalCount > 0 && selectedCount === totalCount;\n const hasSelection = selectedCount > 0;\n const onToggleAll = useCallback(() => {\n if (!isSelectionEnabled || !data) return;\n const newSelectedRows = isAllSelected ? [] : data.map(item => item.$primaryKey);\n if (!isControlled) {\n setInternalRowSelection(getRowSelectionState(newSelectedRows));\n }\n onRowSelection?.(newSelectedRows);\n }, [isSelectionEnabled, data, isAllSelected, isControlled, onRowSelection]);\n const onToggleRow = useCallback((rowId, rowIndex, isShiftClick = false) => {\n if (!isSelectionEnabled || !data) return;\n let newSelectedRows = [];\n if (selectionMode === \"single\") {\n newSelectedRows = getSingleSelectionRows({\n rowId,\n rowIndex,\n data,\n rowSelectionState\n });\n setLastSelectedRowIndex(rowIndex);\n } else {\n // Multiple selection mode\n\n // When user does shiftClick but lastSelectedRowIndex is null,\n // it is treated as a normal click in multiple selection\n if (isShiftClick && lastSelectedRowIndex != null) {\n newSelectedRows = getRangeSelectionRows({\n rowId,\n rowIndex,\n data,\n lastSelectedRowIndex,\n rowSelectionState\n });\n } else {\n newSelectedRows = getMultipleSelectionRows({\n rowId,\n rowIndex,\n data,\n rowSelectionState\n });\n }\n setLastSelectedRowIndex(rowIndex);\n }\n if (!isControlled) {\n setInternalRowSelection(getRowSelectionState(newSelectedRows));\n }\n onRowSelection?.(newSelectedRows);\n }, [isSelectionEnabled, data, selectionMode, lastSelectedRowIndex, isControlled, rowSelectionState, onRowSelection]);\n return {\n rowSelection: rowSelectionState,\n isAllSelected,\n hasSelection,\n onToggleAll,\n onToggleRow\n };\n}\nfunction getSingleSelectionRows({\n rowId,\n rowIndex,\n data,\n rowSelectionState\n}) {\n const primaryKey = data[rowIndex].$primaryKey;\n // Toggle row selection in single selection mode\n const newSelectedRows = rowSelectionState[rowId] ? [] : [primaryKey];\n return newSelectedRows;\n}\nfunction getRangeSelectionRows({\n lastSelectedRowIndex,\n rowIndex,\n data,\n rowSelectionState\n}) {\n // This function is only called if lastSelectedRowIndex is not null\n // This condition is added for typechecks only\n if (lastSelectedRowIndex != null) {\n const rowsInRange = getRowsInRange(data, lastSelectedRowIndex, rowIndex);\n const primaryKeysInRange = rowsInRange.map(item => item.$primaryKey);\n const currentlySelected = getSelectedPrimaryKeys(rowSelectionState, data);\n\n // Add all rows in range to selectedRows if not yet selected\n const newSelectedRows = [...currentlySelected];\n primaryKeysInRange.forEach(item => {\n if (!newSelectedRows.includes(item)) {\n newSelectedRows.push(item);\n }\n });\n return newSelectedRows;\n }\n return [];\n}\nfunction getMultipleSelectionRows({\n rowIndex,\n data,\n rowSelectionState\n}) {\n const primaryKey = data[rowIndex].$primaryKey;\n const currentlySelected = getSelectedPrimaryKeys(rowSelectionState, data);\n // Handles single row toggle in multiple selection mode\n const newSelectedRows = currentlySelected.includes(primaryKey) ? currentlySelected.filter(i => i !== primaryKey) : [...currentlySelected, primaryKey];\n return newSelectedRows;\n}\n\n/**\n * Builds a range of rows from startIndex to endIndex\n */\nfunction getRowsInRange(data, startIndex, endIndex) {\n const start = Math.min(startIndex, endIndex);\n const end = Math.max(startIndex, endIndex);\n const rows = [];\n for (let i = start; i <= end; i++) {\n const item = data[i];\n if (item) {\n rows.push(item);\n }\n }\n return rows;\n}\n\n/**\n * Converts an array of primary keys to a RowSelectionState object\n */\nfunction getRowSelectionState(primaryKeys) {\n return primaryKeys.reduce((acc, primaryKey) => {\n acc[getRowIdFromPrimaryKey(primaryKey)] = true;\n return acc;\n }, {});\n}\n\n/**\n * Converts from a RowSelectionState object back to an array of primary keys\n */\nfunction getSelectedPrimaryKeys(selectionState, data) {\n return data.filter(item => selectionState[getRowId(item)]).map(item => item.$primaryKey);\n}","/*\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.osdkCheckboxRoot {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: calc(\n var(--osdk-checkbox-icon-size) + var(--osdk-checkbox-padding) * 2\n );\n min-height: calc(\n var(--osdk-checkbox-icon-size) + var(--osdk-checkbox-padding) * 2\n );\n padding: var(--osdk-checkbox-padding);\n box-sizing: border-box;\n cursor: pointer;\n border-radius: var(--bp-surface-borderRadius);\n border: var(--osdk-checkbox-border);\n\n &[data-unchecked] {\n background-color: var(--osdk-checkbox-bg);\n\n &:hover {\n background-color: var(--osdk-checkbox-bg-hover);\n }\n\n &:active {\n background-color: var(--osdk-checkbox-bg-active);\n }\n }\n\n &[data-checked],\n &[data-indeterminate] {\n background-color: var(--osdk-checkbox-bg-checked);\n\n &:hover {\n background-color: var(--osdk-checkbox-bg-checked-hover);\n }\n\n &:active {\n background-color: var(--osdk-checkbox-bg-checked-active);\n }\n }\n\n &:focus-visible {\n outline: var(--bp-emphasis-focusWidth) solid var(--bp-emphasis-focusColor);\n outline-offset: var(--bp-emphasis-focusOffset);\n }\n}\n\n.osdkCheckboxIndicator {\n color: var(--osdk-checkbox-checked-foreground);\n width: var(--osdk-checkbox-icon-size);\n height: var(--osdk-checkbox-icon-size);\n\n\n &[data-unchecked] {\n display: none;\n }\n}","function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\n/*\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 { Checkbox as BaseUICheckbox } from \"@base-ui/react/checkbox\";\nimport { Minus, Tick } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport React from \"react\";\nimport styles from \"./Checkbox.module.css\";\nexport function Checkbox({\n indeterminate,\n className,\n indicatorProps,\n ...rest\n}) {\n return /*#__PURE__*/React.createElement(BaseUICheckbox.Root, _extends({\n className: classnames(styles.osdkCheckboxRoot, className),\n indeterminate: indeterminate\n }, rest), /*#__PURE__*/React.createElement(BaseUICheckbox.Indicator, _extends({}, indicatorProps, {\n className: classnames(styles.osdkCheckboxIndicator, indicatorProps?.className)\n }), indeterminate ? /*#__PURE__*/React.createElement(Minus, {\n color: \"currentColor\"\n }) : /*#__PURE__*/React.createElement(Tick, {\n color: \"currentColor\"\n })));\n}","/*\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 React, { useCallback } from \"react\";\nimport { Checkbox } from \"../base-components/checkbox/Checkbox.js\";\nexport function SelectionHeaderCell({\n isAllSelected,\n hasSelection,\n onToggleAll\n}) {\n return /*#__PURE__*/React.createElement(Checkbox, {\n indeterminate: hasSelection && !isAllSelected,\n checked: isAllSelected,\n onCheckedChange: onToggleAll,\n \"aria-label\": \"Select all rows\"\n });\n}\nexport function SelectionCell({\n row,\n onToggleRow\n}) {\n const handleClick = useCallback(event => {\n const isShiftClick = event.shiftKey;\n onToggleRow(row.id, row.index, isShiftClick);\n }, [row, onToggleRow]);\n return /*#__PURE__*/React.createElement(Checkbox, {\n checked: row.getIsSelected(),\n onClick: handleClick,\n \"aria-label\": `Select row ${row.index + 1}`\n });\n}","/*\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 React, { useMemo } from \"react\";\nimport { SelectionCell, SelectionHeaderCell } from \"../SelectionCells.js\";\nexport const SELECTION_COLUMN_ID = \"__selection__\";\nexport const useSelectionColumn = ({\n selectionMode,\n isAllSelected,\n hasSelection,\n onToggleAll,\n onToggleRow\n}) => {\n const selectionColumn = useMemo(() => {\n if (selectionMode === \"none\") return null;\n return {\n id: SELECTION_COLUMN_ID,\n header: () => selectionMode === \"multiple\" ? /*#__PURE__*/React.createElement(SelectionHeaderCell, {\n isAllSelected: isAllSelected,\n hasSelection: hasSelection,\n onToggleAll: onToggleAll\n }) : null,\n cell: ({\n row\n }) => /*#__PURE__*/React.createElement(SelectionCell, {\n row: row,\n onToggleRow: onToggleRow\n }),\n size: 50,\n minSize: 50,\n maxSize: 50,\n enableSorting: false,\n enableResizing: false\n };\n }, [selectionMode, isAllSelected, hasSelection, onToggleAll, onToggleRow]);\n return selectionColumn;\n};","/*\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.osdkTableContainer {\n position: relative; /* needed for sticky header */\n height: 100%; /* needed for scrolling */\n overflow: auto;\n}\n","/*\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","/*\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(--bp-surface-zIndex-2);\n}\n","/*\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 React, { useEffect, useRef } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport styles from \"./CellContextMenu.module.css\";\nexport function CellContextMenu({\n cell,\n position,\n onClose,\n renderContent\n}) {\n const ref = useRef(null);\n useEffect(() => {\n const handleClickOutside = event => {\n if (ref.current && !ref.current.contains(event.target)) {\n onClose();\n }\n };\n document.addEventListener(\"mousedown\", handleClickOutside);\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [onClose]);\n return /*#__PURE__*/createPortal(/*#__PURE__*/React.createElement(\"div\", {\n ref: ref,\n className: styles.osdkCellContextMenu,\n style: {\n left: position.left,\n top: position.top,\n minWidth: position.width\n }\n }, renderContent(cell.row.original, cell)), document.body);\n}","/*\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 { useCallback, useState } from \"react\";\nexport const useCellContextMenu = ({\n tdRef\n}) => {\n const [popoverPosition, setPopoverPosition] = useState(null);\n const [isContextMenuOpen, setIsContextMenuOpen] = useState(false);\n const handleOpenContextMenu = useCallback(event => {\n event.preventDefault();\n event.stopPropagation();\n if (tdRef.current) {\n const rect = tdRef.current.getBoundingClientRect();\n const position = {\n left: rect.left,\n top: rect.bottom,\n width: rect.width\n };\n setPopoverPosition(position);\n setIsContextMenuOpen(true);\n }\n }, [tdRef]);\n const handleCloseContextMenu = useCallback(() => {\n setIsContextMenuOpen(false);\n setPopoverPosition(null);\n }, []);\n return {\n isContextMenuOpen,\n handleOpenContextMenu,\n handleCloseContextMenu,\n popoverPosition\n };\n};","/*\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:has([role=\"checkbox\"]) {\n justify-content: center;\n}\n\n.osdkTableCellContent {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n}\n","/*\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 { flexRender } from \"@tanstack/react-table\";\nimport React, { useRef } from \"react\";\nimport { CellContextMenu } from \"./CellContextMenu.js\";\nimport { useCellContextMenu } from \"./hooks/useCellContextMenu.js\";\nimport { SELECTION_COLUMN_ID } from \"./hooks/useSelectionColumn.js\";\nimport styles from \"./TableCell.module.css\";\nexport function TableCell({\n cell,\n renderCellContextMenu\n}) {\n const tdRef = useRef(null);\n const isSelectColumn = cell.column.id === SELECTION_COLUMN_ID;\n const {\n isContextMenuOpen,\n handleOpenContextMenu,\n handleCloseContextMenu,\n popoverPosition\n } = useCellContextMenu({\n tdRef\n });\n const shouldRenderContextMenu = !isSelectColumn && isContextMenuOpen && !!popoverPosition && !!renderCellContextMenu;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"td\", {\n ref: tdRef,\n className: styles.osdkTableCell,\n style: {\n width: cell.column.getSize()\n },\n onContextMenu: handleOpenContextMenu\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.osdkTableCellContent\n }, flexRender(cell.column.columnDef.cell, cell.getContext()))), shouldRenderContextMenu && /*#__PURE__*/React.createElement(CellContextMenu, {\n cell: cell,\n position: popoverPosition,\n onClose: handleCloseContextMenu,\n renderContent: renderCellContextMenu\n }));\n}","/*\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(--bp-surface-colorHover-default)\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","/*\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 React, { useCallback } from \"react\";\nimport { TableCell } from \"./TableCell.js\";\nimport styles from \"./TableRow.module.css\";\nexport function TableRow({\n row,\n virtualRow,\n onRowClick,\n renderCellContextMenu\n}) {\n const handleClick = useCallback(() => {\n onRowClick?.(row.original);\n }, [onRowClick, row.original]);\n return /*#__PURE__*/React.createElement(\"tr\", {\n \"data-selected\": row.getIsSelected(),\n className: styles.osdkTableRow,\n style: {\n height: `${virtualRow.size}px`,\n transform: `translateY(${virtualRow.start}px)`\n },\n onClick: handleClick\n }, row.getVisibleCells().map(cell => /*#__PURE__*/React.createElement(TableCell, {\n key: cell.id,\n cell: cell,\n renderCellContextMenu: renderCellContextMenu\n })));\n}","/*\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 { useVirtualizer } from \"@tanstack/react-virtual\";\nimport React, { useLayoutEffect } from \"react\";\nimport styles from \"./TableBody.module.css\";\nimport { TableRow } from \"./TableRow.js\";\nexport function TableBody({\n rows,\n tableContainerRef,\n onRowClick,\n renderCellContextMenu,\n rowHeight = 40\n}) {\n // Important: Keep the row virtualizer in the lowest component possible to avoid unnecessary re-renders.\n const rowVirtualizer = useVirtualizer({\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 return /*#__PURE__*/React.createElement(\"tbody\", {\n className: styles.osdkTableBody,\n style: {\n height: `${rowVirtualizer.getTotalSize()}px`\n }\n }, rowVirtualizer.getVirtualItems().map(virtualRow => {\n const row = rows[virtualRow.index];\n return /*#__PURE__*/React.createElement(TableRow, {\n key: row.id,\n row: row,\n virtualRow: virtualRow,\n onRowClick: onRowClick,\n renderCellContextMenu: renderCellContextMenu\n });\n }));\n}","/*\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.osdkTableHeader {\n display: grid;\n position: sticky;\n top: 0;\n z-index: var(--bp-surface-zIndex-1);\n background-color: var(--osdk-table-header-bg);\n}\n\n.osdkTableHeader[data-resizing=\"true\"] {\n cursor: col-resize;\n user-select: none;\n}\n\n.osdkTableHeaderRow {\n display: flex;\n}\n\n.osdkTableHeaderCell {\n display: flex;\n align-items: center;\n text-align: left;\n position: relative;\n padding: var(--osdk-table-cell-padding);\n font-weight: var(--osdk-table-header-fontWeight);\n font-size: var(--osdk-table-header-fontSize);\n color: var(--osdk-table-header-color);\n border-top: var(--osdk-table-border);\n border-right: var(--osdk-table-header-divider);\n background-color: inherit;\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.osdkTableHeaderCell:has([role=\"checkbox\"]) {\n justify-content: center;\n}\n\n.osdkTableHeaderResizer {\n background: none;\n cursor: col-resize;\n height: 100%;\n position: absolute;\n right: calc(-1 * var(--osdk-table-border-width));\n top: 0;\n touch-action: none;\n width: 3px;\n z-index: var(--bp-surface-zIndex-2);\n\n &:hover {\n background: var(--bp-intent-primary-hover);\n }\n\n &:active {\n background: var(--bp-intent-primary-active);\n }\n}\n","/*\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 { flexRender } from \"@tanstack/react-table\";\nimport React from \"react\";\nimport styles from \"./TableHeader.module.css\";\nexport function TableHeader({\n table\n}) {\n // TODO: If value is number type, right align header\n\n const isResizing = !!table.getState().columnSizingInfo?.isResizingColumn;\n return /*#__PURE__*/React.createElement(\"thead\", {\n className: styles.osdkTableHeader,\n \"data-resizing\": isResizing\n }, table.getHeaderGroups().map(headerGroup => /*#__PURE__*/React.createElement(\"tr\", {\n key: headerGroup.id,\n className: styles.osdkTableHeaderRow\n }, headerGroup.headers.map(header => /*#__PURE__*/React.createElement(\"th\", {\n key: header.id,\n className: styles.osdkTableHeaderCell,\n style: {\n width: header.getSize()\n }\n }, header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()), header.column.getCanResize() && /*#__PURE__*/React.createElement(\"div\", {\n className: styles.osdkTableHeaderResizer,\n onDoubleClick: () => header.column.resetSize(),\n onMouseDown: header.getResizeHandler(),\n onTouchStart: header.getResizeHandler()\n }))))));\n}","/*\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 classNames from \"classnames\";\nimport React, { useCallback, useRef } from \"react\";\nimport styles from \"./Table.module.css\";\nimport { TableBody } from \"./TableBody.js\";\nimport { TableHeader } from \"./TableHeader.js\";\nexport function Table({\n table,\n isLoading,\n fetchNextPage,\n onRowClick,\n rowHeight,\n renderCellContextMenu,\n className\n}) {\n const tableContainerRef = useRef(null);\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 const fetchMoreOnEndReached = useCallback(async containerRefElement => {\n if (containerRefElement && !fetchingRef.current) {\n const {\n scrollHeight,\n scrollTop,\n clientHeight\n } = containerRefElement;\n if (scrollHeight - scrollTop - clientHeight < 100 && !isLoading) {\n fetchingRef.current = true;\n try {\n await fetchNextPage?.();\n } finally {\n fetchingRef.current = false;\n }\n }\n }\n }, [fetchNextPage, isLoading]);\n const handleScroll = useCallback(async e => {\n await fetchMoreOnEndReached(e.currentTarget);\n }, [fetchMoreOnEndReached]);\n\n // TODO: Handle error, loading and empty states\n\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: tableContainerRef,\n className: classNames(styles.osdkTableContainer, className),\n onScroll: handleScroll\n }, /*#__PURE__*/React.createElement(\"table\", null, /*#__PURE__*/React.createElement(TableHeader, {\n table: table\n }), /*#__PURE__*/React.createElement(TableBody, {\n rows: table.getRowModel().rows,\n tableContainerRef: tableContainerRef,\n onRowClick: onRowClick,\n rowHeight: rowHeight,\n renderCellContextMenu: renderCellContextMenu\n })));\n}","/*\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 { getCoreRowModel, useReactTable } from \"@tanstack/react-table\";\nimport React, { useCallback, useMemo, useState } from \"react\";\nimport { useColumnDefs } from \"./hooks/useColumnDefs.js\";\nimport { useDefaultTableStates } from \"./hooks/useDefaultTableStates.js\";\nimport { useObjectTableData } from \"./hooks/useObjectTableData.js\";\nimport { useRowSelection } from \"./hooks/useRowSelection.js\";\nimport { useSelectionColumn } from \"./hooks/useSelectionColumn.js\";\nimport { Table } from \"./Table.js\";\nimport { getRowId } from \"./utils/getRowId.js\";\n\n/**\n * ObjectTable - A headless table component for displaying OSDK object sets\n *\n * @example\n * ```tsx\n * <ObjectTable objectSet={myObjectSet} objectType={MyObjectType} />\n * ```\n */\n\nexport function ObjectTable({\n objectSet,\n objectType,\n columnDefinitions,\n filter,\n onRowSelection,\n renderCellContextMenu,\n selectionMode = \"none\",\n selectedRows,\n ...props\n}) {\n const {\n data,\n fetchMore,\n isLoading\n } = useObjectTableData(objectSet, columnDefinitions, filter);\n const {\n columns,\n loading: isColumnsLoading\n } = useColumnDefs(objectType, columnDefinitions);\n const {\n columnVisibility\n } = useDefaultTableStates({\n columnDefinitions\n });\n const [columnSizing, setColumnSizing] = useState({});\n const {\n rowSelection,\n isAllSelected,\n hasSelection,\n onToggleAll,\n onToggleRow\n } = useRowSelection({\n selectionMode,\n selectedRows,\n onRowSelection,\n data\n });\n const selectionColumn = useSelectionColumn({\n selectionMode,\n isAllSelected,\n hasSelection,\n onToggleAll,\n onToggleRow\n });\n const allColumns = useMemo(() => {\n return selectionColumn ? [selectionColumn, ...columns] : columns;\n }, [selectionColumn, columns]);\n const table = useReactTable({\n data: data ?? [],\n columns: allColumns,\n getCoreRowModel: getCoreRowModel(),\n state: {\n columnVisibility,\n rowSelection,\n columnSizing\n },\n onColumnSizingChange: setColumnSizing,\n enableRowSelection: selectionMode !== \"none\",\n columnResizeMode: \"onChange\",\n columnResizeDirection: \"ltr\",\n defaultColumn: {\n minSize: 80\n },\n getRowId\n });\n const onRenderCellContextMenu = useCallback((row, cell) => {\n return renderCellContextMenu?.(row, cell.getValue());\n }, [renderCellContextMenu]);\n const isTableLoading = isLoading || isColumnsLoading;\n return /*#__PURE__*/React.createElement(Table, {\n table: table,\n isLoading: isTableLoading,\n fetchNextPage: fetchMore,\n onRowClick: props.onRowClick,\n rowHeight: props.rowHeight,\n renderCellContextMenu: onRenderCellContextMenu,\n className: props.className\n });\n}"]}
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
box-sizing: border-box;
|
|
10
10
|
cursor: pointer;
|
|
11
11
|
border-radius: var(--bp-surface-borderRadius);
|
|
12
|
+
border: var(--osdk-checkbox-border);
|
|
12
13
|
&[data-unchecked] {
|
|
13
14
|
background-color: var(--osdk-checkbox-bg);
|
|
14
|
-
border: var(--osdk-checkbox-border);
|
|
15
15
|
&:hover {
|
|
16
16
|
background-color: var(--osdk-checkbox-bg-hover);
|
|
17
17
|
}
|
|
@@ -35,9 +35,6 @@
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
.osdkCheckboxIndicator {
|
|
38
|
-
display: flex;
|
|
39
|
-
align-items: center;
|
|
40
|
-
justify-content: center;
|
|
41
38
|
color: var(--osdk-checkbox-checked-foreground);
|
|
42
39
|
width: var(--osdk-checkbox-icon-size);
|
|
43
40
|
height: var(--osdk-checkbox-icon-size);
|
|
@@ -45,4 +42,139 @@
|
|
|
45
42
|
display: none;
|
|
46
43
|
}
|
|
47
44
|
}
|
|
45
|
+
|
|
46
|
+
/* src/object-table/Table.module.css */
|
|
47
|
+
.osdkTableContainer {
|
|
48
|
+
position: relative;
|
|
49
|
+
height: 100%;
|
|
50
|
+
overflow: auto;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* src/object-table/TableBody.module.css */
|
|
54
|
+
.osdkTableBody {
|
|
55
|
+
display: grid;
|
|
56
|
+
position: relative;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* src/object-table/CellContextMenu.module.css */
|
|
60
|
+
.osdkCellContextMenu {
|
|
61
|
+
position: fixed;
|
|
62
|
+
z-index: var(--bp-surface-zIndex-2);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* src/object-table/TableCell.module.css */
|
|
66
|
+
.osdkTableCell {
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
text-align: left;
|
|
70
|
+
position: relative;
|
|
71
|
+
padding: var(--osdk-table-cell-padding);
|
|
72
|
+
font-size: var(--osdk-table-cell-fontSize);
|
|
73
|
+
color: var(--osdk-table-cell-color);
|
|
74
|
+
background-color: inherit;
|
|
75
|
+
border-right: var(--osdk-table-cell-divider);
|
|
76
|
+
&:first-child {
|
|
77
|
+
border-left: var(--osdk-table-border);
|
|
78
|
+
}
|
|
79
|
+
&:last-child {
|
|
80
|
+
border-right: var(--osdk-table-border);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
.osdkTableCell:has([role=checkbox]) {
|
|
84
|
+
justify-content: center;
|
|
85
|
+
}
|
|
86
|
+
.osdkTableCellContent {
|
|
87
|
+
overflow: hidden;
|
|
88
|
+
text-overflow: ellipsis;
|
|
89
|
+
white-space: nowrap;
|
|
90
|
+
text-align: left;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* src/object-table/TableRow.module.css */
|
|
94
|
+
.osdkTableRow {
|
|
95
|
+
position: absolute;
|
|
96
|
+
display: flex;
|
|
97
|
+
background-color: var(--osdk-table-row-bg-default);
|
|
98
|
+
border-top: var(--osdk-table-row-divider);
|
|
99
|
+
border-bottom: var(--osdk-table-border-width) solid transparent;
|
|
100
|
+
&:last-child {
|
|
101
|
+
border-bottom: var(--osdk-table-border);
|
|
102
|
+
}
|
|
103
|
+
&:nth-child(even) {
|
|
104
|
+
background-color: var( --osdk-table-row-bg-alternate, var(--osdk-table-row-bg-default) );
|
|
105
|
+
}
|
|
106
|
+
&:hover {
|
|
107
|
+
z-index: 1;
|
|
108
|
+
background-color: var( --osdk-table-row-bg-hover, var(--bp-surface-colorHover-default) );
|
|
109
|
+
border-top-color: var(--osdk-table-row-border-color-hover);
|
|
110
|
+
border-bottom-color: var(--osdk-table-row-border-color-hover);
|
|
111
|
+
}
|
|
112
|
+
&[data-selected=true] {
|
|
113
|
+
z-index: 2;
|
|
114
|
+
background-color: var(--osdk-table-row-bg-active);
|
|
115
|
+
border-top-color: var(--osdk-table-row-border-color-active);
|
|
116
|
+
border-bottom-color: var(--osdk-table-row-border-color-active);
|
|
117
|
+
}
|
|
118
|
+
&[data-selected=true] + &[data-selected=true] {
|
|
119
|
+
border-top-color: transparent;
|
|
120
|
+
}
|
|
121
|
+
&[data-selected=true]:has(+ &[data-selected=true]) {
|
|
122
|
+
border-bottom-color: transparent;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* src/object-table/TableHeader.module.css */
|
|
127
|
+
.osdkTableHeader {
|
|
128
|
+
display: grid;
|
|
129
|
+
position: sticky;
|
|
130
|
+
top: 0;
|
|
131
|
+
z-index: var(--bp-surface-zIndex-1);
|
|
132
|
+
background-color: var(--osdk-table-header-bg);
|
|
133
|
+
}
|
|
134
|
+
.osdkTableHeader[data-resizing=true] {
|
|
135
|
+
cursor: col-resize;
|
|
136
|
+
user-select: none;
|
|
137
|
+
}
|
|
138
|
+
.osdkTableHeaderRow {
|
|
139
|
+
display: flex;
|
|
140
|
+
}
|
|
141
|
+
.osdkTableHeaderCell {
|
|
142
|
+
display: flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
text-align: left;
|
|
145
|
+
position: relative;
|
|
146
|
+
padding: var(--osdk-table-cell-padding);
|
|
147
|
+
font-weight: var(--osdk-table-header-fontWeight);
|
|
148
|
+
font-size: var(--osdk-table-header-fontSize);
|
|
149
|
+
color: var(--osdk-table-header-color);
|
|
150
|
+
border-top: var(--osdk-table-border);
|
|
151
|
+
border-right: var(--osdk-table-header-divider);
|
|
152
|
+
background-color: inherit;
|
|
153
|
+
&:first-child {
|
|
154
|
+
border-left: var(--osdk-table-border);
|
|
155
|
+
}
|
|
156
|
+
&:last-child {
|
|
157
|
+
border-right: var(--osdk-table-border);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
.osdkTableHeaderCell:has([role=checkbox]) {
|
|
161
|
+
justify-content: center;
|
|
162
|
+
}
|
|
163
|
+
.osdkTableHeaderResizer {
|
|
164
|
+
background: none;
|
|
165
|
+
cursor: col-resize;
|
|
166
|
+
height: 100%;
|
|
167
|
+
position: absolute;
|
|
168
|
+
right: calc(-1 * var(--osdk-table-border-width));
|
|
169
|
+
top: 0;
|
|
170
|
+
touch-action: none;
|
|
171
|
+
width: 3px;
|
|
172
|
+
z-index: var(--bp-surface-zIndex-2);
|
|
173
|
+
&:hover {
|
|
174
|
+
background: var(--bp-intent-primary-hover);
|
|
175
|
+
}
|
|
176
|
+
&:active {
|
|
177
|
+
background: var(--bp-intent-primary-active);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
48
180
|
/*# sourceMappingURL=experimental.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/base-components/checkbox/Checkbox.module.css"],"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\n.osdkCheckboxRoot{\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: calc(var(--osdk-checkbox-icon-size) + var(--osdk-checkbox-padding) * 2);\n min-height: calc(var(--osdk-checkbox-icon-size) + var(--osdk-checkbox-padding) * 2);\n padding: var(--osdk-checkbox-padding);\n box-sizing: border-box;\n cursor: pointer;\n border-radius: var(--bp-surface-borderRadius);\n\n &[data-unchecked] {\n background-color: var(--osdk-checkbox-bg);\n border: var(--osdk-checkbox-border);\n\n &:hover {\n background-color: var(--osdk-checkbox-bg-hover);\n }\n\n &:active {\n background-color: var(--osdk-checkbox-bg-active);\n }\n }\n\n &[data-checked], &[data-indeterminate] {\n background-color: var(--osdk-checkbox-bg-checked);\n\n &:hover {\n background-color: var(--osdk-checkbox-bg-checked-hover);\n }\n\n &:active {\n background-color: var(--osdk-checkbox-bg-checked-active);\n }\n }\n\n &:focus-visible {\n outline: var(--bp-emphasis-focusWidth) solid var(--bp-emphasis-focusColor);\n outline-offset: var(--bp-emphasis-focusOffset);\n }\n}\n\n.osdkCheckboxIndicator {\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--osdk-checkbox-checked-foreground);\n width: var(--osdk-checkbox-icon-size);\n height: var(--osdk-checkbox-icon-size);\n\n\n &[data-unchecked] {\n display: none;\n }\n}"],"mappings":";AAgBA,CAAC;AACC,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,aAAW,KAAK,IAAI,2BAA2B,EAAE,IAAI,yBAAyB,EAAE;AAChF,cAAY,KAAK,IAAI,2BAA2B,EAAE,IAAI,yBAAyB,EAAE;AACjF,WAAS,IAAI;AACb,cAAY;AACZ,UAAQ;AACR,iBAAe,IAAI;AAEnB,GAAC,CAAC;AACA,sBAAkB,IAAI;AACtB,YAAQ,IAAI;AAEZ,KAAC;AACC,wBAAkB,IAAI;AACxB;AAEA,KAAC;AACC,wBAAkB,IAAI;AACxB;AACF;AAEA,GAAC,CAAC;AAAA,EAAe,CAAC,CAAC;AACjB,sBAAkB,IAAI;AAEtB,KAAC;AACC,wBAAkB,IAAI;AACxB;AAEA,KAAC;AACC,wBAAkB,IAAI;AACxB;AACF;AAEA,GAAC;AACC,aAAS,IAAI,0BAA0B,MAAM,IAAI;AACjD,oBAAgB,IAAI;AACtB;AACF;AAEA,CAAC;AACC,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,SAAO,IAAI;AACX,SAAO,IAAI;AACX,UAAQ,IAAI;AAGZ,GAAC,CAAC;AACA,aAAS;AACX;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/base-components/checkbox/Checkbox.module.css","../../../src/object-table/Table.module.css","../../../src/object-table/TableBody.module.css","../../../src/object-table/CellContextMenu.module.css","../../../src/object-table/TableCell.module.css","../../../src/object-table/TableRow.module.css","../../../src/object-table/TableHeader.module.css"],"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\n.osdkCheckboxRoot {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: calc(\n var(--osdk-checkbox-icon-size) + var(--osdk-checkbox-padding) * 2\n );\n min-height: calc(\n var(--osdk-checkbox-icon-size) + var(--osdk-checkbox-padding) * 2\n );\n padding: var(--osdk-checkbox-padding);\n box-sizing: border-box;\n cursor: pointer;\n border-radius: var(--bp-surface-borderRadius);\n border: var(--osdk-checkbox-border);\n\n &[data-unchecked] {\n background-color: var(--osdk-checkbox-bg);\n\n &:hover {\n background-color: var(--osdk-checkbox-bg-hover);\n }\n\n &:active {\n background-color: var(--osdk-checkbox-bg-active);\n }\n }\n\n &[data-checked],\n &[data-indeterminate] {\n background-color: var(--osdk-checkbox-bg-checked);\n\n &:hover {\n background-color: var(--osdk-checkbox-bg-checked-hover);\n }\n\n &:active {\n background-color: var(--osdk-checkbox-bg-checked-active);\n }\n }\n\n &:focus-visible {\n outline: var(--bp-emphasis-focusWidth) solid var(--bp-emphasis-focusColor);\n outline-offset: var(--bp-emphasis-focusOffset);\n }\n}\n\n.osdkCheckboxIndicator {\n color: var(--osdk-checkbox-checked-foreground);\n width: var(--osdk-checkbox-icon-size);\n height: var(--osdk-checkbox-icon-size);\n\n\n &[data-unchecked] {\n display: none;\n }\n}","/*\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.osdkTableContainer {\n position: relative; /* needed for sticky header */\n height: 100%; /* needed for scrolling */\n overflow: auto;\n}\n","/*\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","/*\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(--bp-surface-zIndex-2);\n}\n","/*\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:has([role=\"checkbox\"]) {\n justify-content: center;\n}\n\n.osdkTableCellContent {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n}\n","/*\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(--bp-surface-colorHover-default)\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","/*\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.osdkTableHeader {\n display: grid;\n position: sticky;\n top: 0;\n z-index: var(--bp-surface-zIndex-1);\n background-color: var(--osdk-table-header-bg);\n}\n\n.osdkTableHeader[data-resizing=\"true\"] {\n cursor: col-resize;\n user-select: none;\n}\n\n.osdkTableHeaderRow {\n display: flex;\n}\n\n.osdkTableHeaderCell {\n display: flex;\n align-items: center;\n text-align: left;\n position: relative;\n padding: var(--osdk-table-cell-padding);\n font-weight: var(--osdk-table-header-fontWeight);\n font-size: var(--osdk-table-header-fontSize);\n color: var(--osdk-table-header-color);\n border-top: var(--osdk-table-border);\n border-right: var(--osdk-table-header-divider);\n background-color: inherit;\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.osdkTableHeaderCell:has([role=\"checkbox\"]) {\n justify-content: center;\n}\n\n.osdkTableHeaderResizer {\n background: none;\n cursor: col-resize;\n height: 100%;\n position: absolute;\n right: calc(-1 * var(--osdk-table-border-width));\n top: 0;\n touch-action: none;\n width: 3px;\n z-index: var(--bp-surface-zIndex-2);\n\n &:hover {\n background: var(--bp-intent-primary-hover);\n }\n\n &:active {\n background: var(--bp-intent-primary-active);\n }\n}\n"],"mappings":";AAgBA,CAAC;AACC,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,aAAW,KACT,IAAI,2BAA2B,EAAE,IAAI,yBAAyB,EAAE;AAElE,cAAY,KAC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7B,IAAI;AAER;AAEA,GAAC;AACC,aAAS;AACT,sBAAkB,KAChB,yBAAyB,EACzB,IAAI;AAEN,sBAAkB,IAAI;AACtB,yBAAqB,IAAI;AAC3B;AAEA,GAAC,CAAC;AACA,aAAS;AACT,sBAAkB,IAAI;AACtB,sBAAkB,IAAI;AACtB,yBAAqB,IAAI;AAC3B;AAEA,GAAC,CAAC,oBAAsB,EAAE,CAAC,CAAC;AAC1B,sBAAkB;AACpB;AAEA,GAAC,CAAC,mBAAqB,KAAK,EAAE,CAAC,CAAC;AAC9B,yBAAqB;AACvB;AACF;;;AC3CA,CAAC;AACC,WAAS;AACT,YAAU;AACV,OAAK;AACL,WAAS,IAAI;AACb,oBAAkB,IAAI;AACxB;AAEA,CARC,eAQe,CAAC;AACf,UAAQ;AACR,eAAa;AACf;AAEA,CAAC;AACC,WAAS;AACX;AAEA,CAAC;AACC,WAAS;AACT,eAAa;AACb,cAAY;AACZ,YAAU;AACV,WAAS,IAAI;AACb,eAAa,IAAI;AACjB,aAAW,IAAI;AACf,SAAO,IAAI;AACX,cAAY,IAAI;AAChB,gBAAc,IAAI;AAClB,oBAAkB;AAElB,GAAC;AACC,iBAAa,IAAI;AACnB;AAEA,GAAC;AACC,kBAAc,IAAI;AACpB;AACF;AAEA,CAtBC,mBAsBmB,KAAK,CAAC;AACxB,mBAAiB;AACnB;AAEA,CAAC;AACC,cAAY;AACZ,UAAQ;AACR,UAAQ;AACR,YAAU;AACV,SAAO,KAAK,GAAG,EAAE,IAAI;AACrB,OAAK;AACL,gBAAc;AACd,SAAO;AACP,WAAS,IAAI;AAEb,GAAC;AACC,gBAAY,IAAI;AAClB;AAEA,GAAC;AACC,gBAAY,IAAI;AAClB;AACF;","names":[]}
|
|
@@ -14,20 +14,24 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
.osdkCheckboxRoot{
|
|
17
|
+
.osdkCheckboxRoot {
|
|
18
18
|
display: flex;
|
|
19
19
|
align-items: center;
|
|
20
20
|
justify-content: center;
|
|
21
|
-
min-width: calc(
|
|
22
|
-
|
|
21
|
+
min-width: calc(
|
|
22
|
+
var(--osdk-checkbox-icon-size) + var(--osdk-checkbox-padding) * 2
|
|
23
|
+
);
|
|
24
|
+
min-height: calc(
|
|
25
|
+
var(--osdk-checkbox-icon-size) + var(--osdk-checkbox-padding) * 2
|
|
26
|
+
);
|
|
23
27
|
padding: var(--osdk-checkbox-padding);
|
|
24
28
|
box-sizing: border-box;
|
|
25
29
|
cursor: pointer;
|
|
26
30
|
border-radius: var(--bp-surface-borderRadius);
|
|
31
|
+
border: var(--osdk-checkbox-border);
|
|
27
32
|
|
|
28
33
|
&[data-unchecked] {
|
|
29
34
|
background-color: var(--osdk-checkbox-bg);
|
|
30
|
-
border: var(--osdk-checkbox-border);
|
|
31
35
|
|
|
32
36
|
&:hover {
|
|
33
37
|
background-color: var(--osdk-checkbox-bg-hover);
|
|
@@ -38,7 +42,8 @@
|
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
|
|
41
|
-
&[data-checked],
|
|
45
|
+
&[data-checked],
|
|
46
|
+
&[data-indeterminate] {
|
|
42
47
|
background-color: var(--osdk-checkbox-bg-checked);
|
|
43
48
|
|
|
44
49
|
&:hover {
|
|
@@ -57,9 +62,6 @@
|
|
|
57
62
|
}
|
|
58
63
|
|
|
59
64
|
.osdkCheckboxIndicator {
|
|
60
|
-
display: flex;
|
|
61
|
-
align-items: center;
|
|
62
|
-
justify-content: center;
|
|
63
65
|
color: var(--osdk-checkbox-checked-foreground);
|
|
64
66
|
width: var(--osdk-checkbox-icon-size);
|
|
65
67
|
height: var(--osdk-checkbox-icon-size);
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import React, { useEffect, useRef } from "react";
|
|
18
18
|
import { createPortal } from "react-dom";
|
|
19
|
+
import styles from "./CellContextMenu.module.css";
|
|
19
20
|
export function CellContextMenu({
|
|
20
21
|
cell,
|
|
21
22
|
position,
|
|
@@ -36,9 +37,8 @@ export function CellContextMenu({
|
|
|
36
37
|
}, [onClose]);
|
|
37
38
|
return /*#__PURE__*/createPortal(/*#__PURE__*/React.createElement("div", {
|
|
38
39
|
ref: ref,
|
|
40
|
+
className: styles.osdkCellContextMenu,
|
|
39
41
|
style: {
|
|
40
|
-
position: "fixed",
|
|
41
|
-
zIndex: 9999,
|
|
42
42
|
left: position.left,
|
|
43
43
|
top: position.top,
|
|
44
44
|
minWidth: position.width
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CellContextMenu.js","names":["React","useEffect","useRef","createPortal","CellContextMenu","cell","position","onClose","renderContent","ref","handleClickOutside","event","current","contains","target","document","addEventListener","removeEventListener","createElement","
|
|
1
|
+
{"version":3,"file":"CellContextMenu.js","names":["React","useEffect","useRef","createPortal","styles","CellContextMenu","cell","position","onClose","renderContent","ref","handleClickOutside","event","current","contains","target","document","addEventListener","removeEventListener","createElement","className","osdkCellContextMenu","style","left","top","minWidth","width","row","original","body"],"sources":["CellContextMenu.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 React, { useEffect, useRef } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport styles from \"./CellContextMenu.module.css\";\nimport type { PopoverPosition } from \"./hooks/useCellContextMenu.js\";\n\ninterface CellContextMenuProps<TData extends RowData> {\n cell: Cell<TData, unknown>;\n position: PopoverPosition;\n onClose: () => void;\n renderContent: (row: TData, cell: Cell<TData, unknown>) => React.ReactNode;\n}\n\nexport function CellContextMenu<TData extends RowData>({\n cell,\n position,\n onClose,\n renderContent,\n}: CellContextMenuProps<TData>): React.ReactElement {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (ref.current && !ref.current.contains(event.target as Node)) {\n onClose();\n }\n };\n\n document.addEventListener(\"mousedown\", handleClickOutside);\n\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [onClose]);\n\n return createPortal(\n <div\n ref={ref}\n className={styles.osdkCellContextMenu}\n style={{\n left: position.left,\n top: position.top,\n minWidth: position.width,\n }}\n >\n {renderContent(cell.row.original, cell)}\n </div>,\n document.body,\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAChD,SAASC,YAAY,QAAQ,WAAW;AACxC,OAAOC,MAAM,MAAM,8BAA8B;AAUjD,OAAO,SAASC,eAAeA,CAAwB;EACrDC,IAAI;EACJC,QAAQ;EACRC,OAAO;EACPC;AAC2B,CAAC,EAAsB;EAClD,MAAMC,GAAG,GAAGR,MAAM,CAAiB,IAAI,CAAC;EAExCD,SAAS,CAAC,MAAM;IACd,MAAMU,kBAAkB,GAAIC,KAAiB,IAAK;MAChD,IAAIF,GAAG,CAACG,OAAO,IAAI,CAACH,GAAG,CAACG,OAAO,CAACC,QAAQ,CAACF,KAAK,CAACG,MAAc,CAAC,EAAE;QAC9DP,OAAO,CAAC,CAAC;MACX;IACF,CAAC;IAEDQ,QAAQ,CAACC,gBAAgB,CAAC,WAAW,EAAEN,kBAAkB,CAAC;IAE1D,OAAO,MAAM;MACXK,QAAQ,CAACE,mBAAmB,CAAC,WAAW,EAAEP,kBAAkB,CAAC;IAC/D,CAAC;EACH,CAAC,EAAE,CAACH,OAAO,CAAC,CAAC;EAEb,oBAAOL,YAAY,cACjBH,KAAA,CAAAmB,aAAA;IACET,GAAG,EAAEA,GAAI;IACTU,SAAS,EAAEhB,MAAM,CAACiB,mBAAoB;IACtCC,KAAK,EAAE;MACLC,IAAI,EAAEhB,QAAQ,CAACgB,IAAI;MACnBC,GAAG,EAAEjB,QAAQ,CAACiB,GAAG;MACjBC,QAAQ,EAAElB,QAAQ,CAACmB;IACrB;EAAE,GAEDjB,aAAa,CAACH,IAAI,CAACqB,GAAG,CAACC,QAAQ,EAAEtB,IAAI,CACnC,CAAC,EACNU,QAAQ,CAACa,IACX,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
|
|
17
|
+
.osdkCellContextMenu {
|
|
18
|
+
position: fixed;
|
|
19
|
+
z-index: var(--bp-surface-zIndex-2);
|
|
20
|
+
}
|
|
@@ -108,7 +108,8 @@ export function ObjectTable({
|
|
|
108
108
|
fetchNextPage: fetchMore,
|
|
109
109
|
onRowClick: props.onRowClick,
|
|
110
110
|
rowHeight: props.rowHeight,
|
|
111
|
-
renderCellContextMenu: onRenderCellContextMenu
|
|
111
|
+
renderCellContextMenu: onRenderCellContextMenu,
|
|
112
|
+
className: props.className
|
|
112
113
|
});
|
|
113
114
|
}
|
|
114
115
|
//# sourceMappingURL=ObjectTable.js.map
|