@osdk/react-components 0.33.0 → 0.34.0-main-d24cc61b1e7fde7722d8229ed2b6821f5ce1bf8a

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.
Files changed (145) hide show
  1. package/AGENTS.md +3 -0
  2. package/CHANGELOG.md +19 -0
  3. package/README.md +14 -13
  4. package/build/browser/aip-agent-chat/AipAgentChat.js +113 -0
  5. package/build/browser/aip-agent-chat/AipAgentChat.js.map +1 -0
  6. package/build/browser/aip-agent-chat/AipAgentChat.module.css +231 -0
  7. package/build/browser/aip-agent-chat/AipAgentChat.module.css.js +29 -0
  8. package/build/browser/aip-agent-chat/AipAgentChatApi.js +2 -0
  9. package/build/browser/aip-agent-chat/AipAgentChatApi.js.map +1 -0
  10. package/build/browser/aip-agent-chat/BaseAipAgentChat.js +67 -0
  11. package/build/browser/aip-agent-chat/BaseAipAgentChat.js.map +1 -0
  12. package/build/browser/aip-agent-chat/components/AipAgentChatComposer.js +96 -0
  13. package/build/browser/aip-agent-chat/components/AipAgentChatComposer.js.map +1 -0
  14. package/build/browser/aip-agent-chat/components/AipAgentChatLoader.js +43 -0
  15. package/build/browser/aip-agent-chat/components/AipAgentChatLoader.js.map +1 -0
  16. package/build/browser/aip-agent-chat/components/AipAgentChatMessage.js +60 -0
  17. package/build/browser/aip-agent-chat/components/AipAgentChatMessage.js.map +1 -0
  18. package/build/browser/aip-agent-chat/components/AipAgentChatMessageList.js +60 -0
  19. package/build/browser/aip-agent-chat/components/AipAgentChatMessageList.js.map +1 -0
  20. package/build/browser/aip-agent-chat/components/AipAgentChatModelPicker.js +56 -0
  21. package/build/browser/aip-agent-chat/components/AipAgentChatModelPicker.js.map +1 -0
  22. package/build/browser/aip-agent-chat/hooks/useChatAutoScroll.js +61 -0
  23. package/build/browser/aip-agent-chat/hooks/useChatAutoScroll.js.map +1 -0
  24. package/build/browser/base-components/callout/Callout.js +65 -0
  25. package/build/browser/base-components/callout/Callout.js.map +1 -0
  26. package/build/browser/base-components/callout/Callout.module.css +59 -0
  27. package/build/browser/base-components/callout/Callout.module.css.js +15 -0
  28. package/build/browser/public/experimental/aip-agent-chat.js +22 -0
  29. package/build/browser/public/experimental/aip-agent-chat.js.map +1 -0
  30. package/build/browser/styles.css +402 -0
  31. package/build/browser/tokens/base-tokens/dark.css +10 -0
  32. package/build/browser/tokens/component-tokens/aip-agent-chat.css +56 -0
  33. package/build/browser/tokens/component-tokens/callout.css +40 -0
  34. package/build/browser/tokens.css +2 -0
  35. package/build/browser/util/UserAgent.js +1 -1
  36. package/build/browser/util/UserAgent.js.map +1 -1
  37. package/build/cjs/{chunk-N5NOB4G4.cjs → chunk-4SBWDLNA.cjs} +4 -4
  38. package/build/cjs/{chunk-N5NOB4G4.cjs.map → chunk-4SBWDLNA.cjs.map} +1 -1
  39. package/build/cjs/{chunk-PFGIO77A.cjs → chunk-5JPP5IKU.cjs} +4 -4
  40. package/build/cjs/{chunk-PFGIO77A.cjs.map → chunk-5JPP5IKU.cjs.map} +1 -1
  41. package/build/cjs/{chunk-56CFJTXV.cjs → chunk-73EYJP6Z.cjs} +6 -6
  42. package/build/cjs/{chunk-56CFJTXV.cjs.map → chunk-73EYJP6Z.cjs.map} +1 -1
  43. package/build/cjs/{chunk-XCZD54BD.cjs → chunk-ABKLMCWO.cjs} +4 -4
  44. package/build/cjs/{chunk-XCZD54BD.cjs.map → chunk-ABKLMCWO.cjs.map} +1 -1
  45. package/build/cjs/{chunk-QWFT3G4W.cjs → chunk-EOXGPHI7.cjs} +4 -4
  46. package/build/cjs/{chunk-QWFT3G4W.cjs.map → chunk-EOXGPHI7.cjs.map} +1 -1
  47. package/build/cjs/chunk-HM6F2PSA.cjs +11 -0
  48. package/build/cjs/{chunk-N7TOWLUY.cjs.map → chunk-HM6F2PSA.cjs.map} +1 -1
  49. package/build/cjs/chunk-ILBAVINW.cjs +11 -0
  50. package/build/cjs/{chunk-SUEZQS7M.cjs.map → chunk-ILBAVINW.cjs.map} +1 -1
  51. package/build/cjs/chunk-MSUA3D5M.cjs +11 -0
  52. package/build/cjs/{chunk-AEFCONAY.cjs.map → chunk-MSUA3D5M.cjs.map} +1 -1
  53. package/build/cjs/{chunk-4AGEVOFW.cjs → chunk-MV4WJDCS.cjs} +4 -4
  54. package/build/cjs/{chunk-4AGEVOFW.cjs.map → chunk-MV4WJDCS.cjs.map} +1 -1
  55. package/build/cjs/{chunk-LYAAHEAS.cjs → chunk-PSXAPQB3.cjs} +4 -4
  56. package/build/cjs/{chunk-LYAAHEAS.cjs.map → chunk-PSXAPQB3.cjs.map} +1 -1
  57. package/build/cjs/chunk-RCL5R3P4.cjs +11 -0
  58. package/build/cjs/{chunk-D6RQIMMX.cjs.map → chunk-RCL5R3P4.cjs.map} +1 -1
  59. package/build/cjs/{chunk-OTAWBR27.cjs → chunk-S7Z4MCUS.cjs} +4 -4
  60. package/build/cjs/{chunk-OTAWBR27.cjs.map → chunk-S7Z4MCUS.cjs.map} +1 -1
  61. package/build/cjs/{chunk-364UCCB2.cjs → chunk-WVRYCKJY.cjs} +3 -3
  62. package/build/cjs/chunk-WVRYCKJY.cjs.map +1 -0
  63. package/build/cjs/chunk-YNECVUTQ.cjs +11 -0
  64. package/build/cjs/{chunk-3MDT2TJK.cjs.map → chunk-YNECVUTQ.cjs.map} +1 -1
  65. package/build/cjs/public/experimental/action-form.cjs +4 -4
  66. package/build/cjs/public/experimental/aip-agent-chat.cjs +434 -0
  67. package/build/cjs/public/experimental/aip-agent-chat.cjs.map +1 -0
  68. package/build/cjs/public/experimental/aip-agent-chat.css +304 -0
  69. package/build/cjs/public/experimental/aip-agent-chat.css.map +1 -0
  70. package/build/cjs/public/experimental/aip-agent-chat.d.cts +202 -0
  71. package/build/cjs/public/experimental/cbac-picker.cjs +11 -11
  72. package/build/cjs/public/experimental/document-viewer.cjs +6 -6
  73. package/build/cjs/public/experimental/email-viewer.cjs +3 -3
  74. package/build/cjs/public/experimental/excel-viewer.cjs +3 -3
  75. package/build/cjs/public/experimental/filter-list.cjs +15 -15
  76. package/build/cjs/public/experimental/image-viewer.cjs +3 -3
  77. package/build/cjs/public/experimental/markdown-renderer.cjs +3 -3
  78. package/build/cjs/public/experimental/object-table.cjs +8 -8
  79. package/build/cjs/public/experimental/pdf-viewer.cjs +7 -7
  80. package/build/cjs/public/experimental/tiff-renderer.cjs +3 -3
  81. package/build/cjs/public/experimental/video-viewer.cjs +3 -3
  82. package/build/cjs/public/experimental/xml-viewer.cjs +3 -3
  83. package/build/cjs/public/experimental.cjs +74 -74
  84. package/build/esm/aip-agent-chat/AipAgentChat.js +113 -0
  85. package/build/esm/aip-agent-chat/AipAgentChat.js.map +1 -0
  86. package/build/esm/aip-agent-chat/AipAgentChat.module.css +231 -0
  87. package/build/esm/aip-agent-chat/AipAgentChatApi.js +2 -0
  88. package/build/esm/aip-agent-chat/AipAgentChatApi.js.map +1 -0
  89. package/build/esm/aip-agent-chat/BaseAipAgentChat.js +67 -0
  90. package/build/esm/aip-agent-chat/BaseAipAgentChat.js.map +1 -0
  91. package/build/esm/aip-agent-chat/components/AipAgentChatComposer.js +96 -0
  92. package/build/esm/aip-agent-chat/components/AipAgentChatComposer.js.map +1 -0
  93. package/build/esm/aip-agent-chat/components/AipAgentChatLoader.js +43 -0
  94. package/build/esm/aip-agent-chat/components/AipAgentChatLoader.js.map +1 -0
  95. package/build/esm/aip-agent-chat/components/AipAgentChatMessage.js +60 -0
  96. package/build/esm/aip-agent-chat/components/AipAgentChatMessage.js.map +1 -0
  97. package/build/esm/aip-agent-chat/components/AipAgentChatMessageList.js +60 -0
  98. package/build/esm/aip-agent-chat/components/AipAgentChatMessageList.js.map +1 -0
  99. package/build/esm/aip-agent-chat/components/AipAgentChatModelPicker.js +56 -0
  100. package/build/esm/aip-agent-chat/components/AipAgentChatModelPicker.js.map +1 -0
  101. package/build/esm/aip-agent-chat/hooks/useChatAutoScroll.js +61 -0
  102. package/build/esm/aip-agent-chat/hooks/useChatAutoScroll.js.map +1 -0
  103. package/build/esm/base-components/callout/Callout.js +65 -0
  104. package/build/esm/base-components/callout/Callout.js.map +1 -0
  105. package/build/esm/base-components/callout/Callout.module.css +59 -0
  106. package/build/esm/public/experimental/aip-agent-chat.js +22 -0
  107. package/build/esm/public/experimental/aip-agent-chat.js.map +1 -0
  108. package/build/esm/tokens/base-tokens/dark.css +10 -0
  109. package/build/esm/tokens/component-tokens/aip-agent-chat.css +56 -0
  110. package/build/esm/tokens/component-tokens/callout.css +40 -0
  111. package/build/esm/tokens.css +2 -0
  112. package/build/esm/util/UserAgent.js +1 -1
  113. package/build/esm/util/UserAgent.js.map +1 -1
  114. package/build/types/aip-agent-chat/AipAgentChat.d.ts +10 -0
  115. package/build/types/aip-agent-chat/AipAgentChat.d.ts.map +1 -0
  116. package/build/types/aip-agent-chat/AipAgentChatApi.d.ts +135 -0
  117. package/build/types/aip-agent-chat/AipAgentChatApi.d.ts.map +1 -0
  118. package/build/types/aip-agent-chat/BaseAipAgentChat.d.ts +55 -0
  119. package/build/types/aip-agent-chat/BaseAipAgentChat.d.ts.map +1 -0
  120. package/build/types/aip-agent-chat/components/AipAgentChatComposer.d.ts +19 -0
  121. package/build/types/aip-agent-chat/components/AipAgentChatComposer.d.ts.map +1 -0
  122. package/build/types/aip-agent-chat/components/AipAgentChatLoader.d.ts +9 -0
  123. package/build/types/aip-agent-chat/components/AipAgentChatLoader.d.ts.map +1 -0
  124. package/build/types/aip-agent-chat/components/AipAgentChatMessage.d.ts +12 -0
  125. package/build/types/aip-agent-chat/components/AipAgentChatMessage.d.ts.map +1 -0
  126. package/build/types/aip-agent-chat/components/AipAgentChatMessageList.d.ts +11 -0
  127. package/build/types/aip-agent-chat/components/AipAgentChatMessageList.d.ts.map +1 -0
  128. package/build/types/aip-agent-chat/components/AipAgentChatModelPicker.d.ts +16 -0
  129. package/build/types/aip-agent-chat/components/AipAgentChatModelPicker.d.ts.map +1 -0
  130. package/build/types/aip-agent-chat/hooks/useChatAutoScroll.d.ts +11 -0
  131. package/build/types/aip-agent-chat/hooks/useChatAutoScroll.d.ts.map +1 -0
  132. package/build/types/base-components/callout/Callout.d.ts +33 -0
  133. package/build/types/base-components/callout/Callout.d.ts.map +1 -0
  134. package/build/types/public/experimental/aip-agent-chat.d.ts +7 -0
  135. package/build/types/public/experimental/aip-agent-chat.d.ts.map +1 -0
  136. package/docs/AipAgentChat.md +207 -0
  137. package/docs/CSSVariables.md +52 -0
  138. package/docs/Welcome.md +1 -0
  139. package/package.json +24 -8
  140. package/build/cjs/chunk-364UCCB2.cjs.map +0 -1
  141. package/build/cjs/chunk-3MDT2TJK.cjs +0 -11
  142. package/build/cjs/chunk-AEFCONAY.cjs +0 -11
  143. package/build/cjs/chunk-D6RQIMMX.cjs +0 -11
  144. package/build/cjs/chunk-N7TOWLUY.cjs +0 -11
  145. package/build/cjs/chunk-SUEZQS7M.cjs +0 -11
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/object-table/LoadingCell.module.css","../../src/object-table/TableCell.module.css","../../src/object-table/LoadingCell.tsx","../../src/object-table/components/AsyncValueCell.tsx","../../src/object-table/utils/markingValue.ts","../../src/object-table/components/CbacMarkingCell.tsx","../../src/object-table/components/MandatoryMarkingCell.module.css","../../src/object-table/components/MandatoryMarkingCell.tsx","../../src/object-table/EditableCell.module.css","../../src/object-table/utils/PortalTracker.tsx","../../src/object-table/components/DatePickerCellField.tsx","../../src/object-table/components/ReadonlyDisplayCell.tsx","../../src/object-table/components/DropdownCellField.tsx","../../src/object-table/components/TextInputCellField.tsx","../../src/object-table/utils/editableUtils.ts","../../src/object-table/EditableCell.tsx","../../src/object-table/utils/AsyncCellData.ts","../../src/object-table/utils/getCellId.ts","../../src/object-table/utils/shouldShowEditableCell.ts","../../src/object-table/DefaultCellRenderer.tsx","../../src/object-table/hooks/useColumnDefs.ts","../../src/object-table/utils/constants.ts","../../src/object-table/hooks/useColumnPinning.ts","../../src/object-table/hooks/useColumnResize.ts","../../src/object-table/hooks/useColumnVisibility.ts","../../src/object-table/hooks/useEditableTable.ts","../../src/object-table/utils/functionColumns.ts","../../src/object-table/hooks/useFunctionColumnsData.ts","../../src/object-table/hooks/useObjectTableData.ts","../../src/object-table/utils/objectTableSnapshot.ts","../../src/object-table/hooks/useObjectTableSnapshot.ts","../../src/object-table/utils/getRowId.ts","../../src/object-table/hooks/useRowSelection.ts","../../src/object-table/SelectionCells.tsx","../../src/object-table/hooks/useSelectionColumn.tsx","../../src/object-table/hooks/useTableSorting.ts","../../src/object-table/hooks/useFocusedRow.ts","../../src/object-table/TableRow.module.css","../../src/object-table/LoadingRow.tsx","../../src/object-table/TableBody.module.css","../../src/base-components/draggable-list/DraggableList.module.css","../../src/base-components/draggable-list/DraggableList.tsx","../../src/object-table/ColumnConfigDialog.module.css","../../src/object-table/ColumnConfigDialog.tsx","../../src/object-table/MultiColumnSortDialog.module.css","../../src/object-table/SortableItemsList.tsx","../../src/object-table/MultiColumnSortDialog.tsx","../../src/object-table/TableHeader.module.css","../../src/object-table/TableHeaderContent.module.css","../../src/object-table/TableHeaderContent.tsx","../../src/object-table/TableHeaderWithPopover.module.css","../../src/object-table/TableHeaderWithPopover.tsx","../../src/object-table/utils/getColumnPinningStyles.ts","../../src/object-table/TableHeader.tsx","../../src/object-table/LoadingStateTable.tsx","../../src/object-table/NonIdealState.module.css","../../src/object-table/NonIdealState.tsx","../../src/object-table/Table.module.css","../../src/object-table/CellContextMenu.module.css","../../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/TableEditContainer.module.css","../../src/object-table/TableEditContainer.tsx","../../src/object-table/Table.tsx","../../src/object-table/utils/deriveSelectionObjectSet.ts","../../src/object-table/ObjectTable.tsx","../../src/public/experimental/object-table.ts"],"names":["React","SkeletonBar","classNames","CbacBanner","useRef","useCallback","useContext","useMemo","formatDateForInput","DatePicker","Error","_extends","DropdownField","Input","useState","useEffect","Tooltip","useOsdkMetadata","chunk","useOsdkClient","useOsdkFunctions","useObjectSet","useOsdkObjects","useEventCallback","Checkbox","useSortable","CSS","Trash","SmallCross","DragHandleVertical","Button","useSensors","useSensor","PointerSensor","KeyboardSensor","sortableKeyboardCoordinates","BaseDndContext","closestCenter","SortableContext","verticalListSortingStrategy","arrayMove","ActionButton","Dialog","Cog","SearchBar","Collapsible","CaretDown","SmallInfoSign","SortAlphabetical","SortAlphabeticalDesc","DialogTitle","SearchableMenu","Add","flexRender","Menu","usePortalContainer","Pin","ChevronDown","Unpin","Sort","Remove","VerticalDistribution","Settings","header","createPortal","useVirtualizer","useLayoutEffect","PortalContainerProvider","useReactTable","getCoreRowModel","useImperativeHandle","ObjectTable","withOsdkMetrics"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,mBAAA,GAAA,EAAA;;;ACAA,IAAA,iBAAA,GAAA,EAAA;;;ACqBO,SAAS,kBAAA,GAAqB;AACnC,EAAA,uBAAoBA,wBAAA,CAAM,cAAcC,6BAAA,EAAa;AAAA,IACnD,SAAA,EAAWC,4BAAA,CAAW,mBAAA,CAAO,eAAA,EAAiB,oBAAO,gBAAgB;AAAA,GACtE,CAAA;AACH;AACO,SAAS,WAAA,CAAY;AAAA,EAC1B;AACF,CAAA,EAAG;AACD,EAAA,uBAAoBF,wBAAA,CAAM,cAAc,IAAA,EAAM;AAAA,IAC5C,WAAW,iBAAA,CAAW,aAAA;AAAA,IACtB,KAAA,EAAO;AAAA,MACL;AAAA;AACF,GACF,kBAAgBA,wBAAA,CAAM,aAAA,CAAc,kBAAA,EAAoB,IAAI,CAAC,CAAA;AAC/D;;;ACjBO,SAAS,cAAA,CAAe;AAAA,EAC7B,IAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA,EAAG;AACD,EAAA,IAAI,SAAS,IAAA,EAAM;AACjB,IAAA,OAAO,OAAA;AAAA,EACT;AACA,EAAA,IAAI,QAAQ,IAAA,EAA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AAHEAS.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\n.osdkLoadingCell {\n height: var(--osdk-table-cell-fontSize);\n border-radius: calc(var(--osdk-surface-border-radius) * 0.5);\n flex: 1;\n}\n\n.osdkCellSkeleton.osdkCellSkeleton {\n --osdk-background-skeleton-from: var(--osdk-table-skeleton-color-from);\n --osdk-background-skeleton-to: var(--osdk-table-skeleton-color-to);\n border-radius: calc(var(--osdk-surface-border-radius) * 0.5);\n box-shadow: none;\n color: transparent;\n cursor: default;\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 height: 100%;\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: var(--osdk-table-cell-bg, 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: none;\n }\n}\n\n.osdkTableCell[data-pinned=\"left\"],\n.osdkTableCell[data-pinned=\"right\"] {\n position: sticky;\n z-index: var(--osdk-surface-z-index-1);\n background-color: var(--osdk-table-cell-bg, inherit);\n}\n\n/* Last left-pinned column - no left-pinned siblings after it */\n.osdkTableCell[data-pinned=\"left\"]:not(:has(~ [data-pinned=\"left\"])) {\n border-right: var(--osdk-table-pinned-column-border);\n}\n\n/* First right-pinned column - no right-pinned siblings before it */\n.osdkTableCell[data-pinned=\"right\"]:not(\n :has(~ [data-pinned=\"right\"]):nth-child(n + 2)\n ) {\n border-left: var(--osdk-table-pinned-column-border);\n}\n\n.osdkTableCell:has([role=\"checkbox\"]) {\n justify-content: center;\n padding: 0;\n}\n\n.osdkTableCellContent:not(:has([role=\"checkbox\"])) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n flex: 1;\n}\n\n.osdkCheckboxContainer {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\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 from \"react\";\nimport { SkeletonBar } from \"../base-components/skeleton/SkeletonBar.js\";\nimport styles from \"./LoadingCell.module.css\";\nimport cellStyles from \"./TableCell.module.css\";\nexport function LoadingCellContent() {\n return /*#__PURE__*/React.createElement(SkeletonBar, {\n className: classNames(styles.osdkLoadingCell, styles.osdkCellSkeleton)\n });\n}\nexport function LoadingCell({\n width\n}) {\n return /*#__PURE__*/React.createElement(\"td\", {\n className: cellStyles.osdkTableCell,\n style: {\n width\n }\n }, /*#__PURE__*/React.createElement(LoadingCellContent, null));\n}","/*\n * Copyright 2026 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 from \"react\";\nimport { LoadingCellContent } from \"../LoadingCell.js\";\nexport function AsyncValueCell({\n data,\n isLoading,\n error\n}) {\n if (error != null) {\n return \"Error\";\n }\n if (data != null) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, data);\n }\n if (isLoading) {\n return /*#__PURE__*/React.createElement(LoadingCellContent, null);\n }\n return \"No value\";\n}","/*\n * Copyright 2026 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/**\n * Normalize a marking property's cell value into a string[] of marking ids.\n * Marking properties may arrive as a single string (single-valued) or\n * string[] (multi-valued); null/undefined become an empty array.\n *\n * Duplicates are removed so callers (e.g. per-marking pill renderers) can\n * safely use the marking id as a React key.\n */\nexport function toMarkingIdArray(value) {\n if (value == null) {\n return [];\n }\n if (typeof value === \"string\") {\n return [value];\n }\n if (Array.isArray(value)) {\n const ids = value.filter(v => typeof v === \"string\");\n return Array.from(new Set(ids));\n }\n return [];\n}","/*\n * Copyright 2026 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 from \"react\";\nimport { CbacBanner } from \"../../cbac-picker/CbacBanner.js\";\nimport { toMarkingIdArray } from \"../utils/markingValue.js\";\nexport function CbacMarkingCell({\n value\n}) {\n const markingIds = toMarkingIdArray(value);\n if (markingIds.length === 0) {\n return null;\n }\n return /*#__PURE__*/React.createElement(CbacBanner, {\n markingIds: markingIds\n });\n}",".container {\n display: flex;\n flex-wrap: wrap;\n gap: var(--osdk-surface-spacing);\n align-items: center;\n}\n\n.pill {\n max-width: 100%;\n}\n","/*\n * Copyright 2026 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 from \"react\";\nimport { CbacBanner } from \"../../cbac-picker/CbacBanner.js\";\nimport { toMarkingIdArray } from \"../utils/markingValue.js\";\nimport styles from \"./MandatoryMarkingCell.module.css\";\n/**\n * Renders one CBAC-resolved banner per marking on the row. MANDATORY marking\n * columns render per-marking (rather than via a single combined banner) so\n * each individual marking on the object is visible at a glance.\n */\nexport function MandatoryMarkingCell({\n value\n}) {\n const markingIds = toMarkingIdArray(value);\n if (markingIds.length === 0) {\n return null;\n }\n return /*#__PURE__*/React.createElement(\"span\", {\n className: styles.container\n }, markingIds.map(id => /*#__PURE__*/React.createElement(CbacBanner, {\n key: id,\n markingIds: [id],\n className: styles.pill\n })));\n}",".osdkEditableCell {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: var(--osdk-surface-spacing);\n\n padding: var(--osdk-surface-spacing) calc(var(--osdk-surface-spacing) * 3);\n border-radius: var(--osdk-surface-border-radius);\n border: var(--osdk-surface-border-width) solid transparent;\n background: inherit;\n\n tr[data-focused=\"true\"] & {\n border: var(--osdk-table-cell-editable-border);\n background: var(--osdk-table-cell-input-bg);\n\n &.osdkEditedInput {\n border: var(--osdk-table-cell-edited-border);\n }\n\n &:focus-within,\n &.osdkEditedInput:focus-within {\n border: var(--osdk-emphasis-focus-width) solid\n var(--osdk-emphasis-focus-color);\n }\n\n &.error {\n border: var(--osdk-table-cell-edited-border-error);\n\n &:focus-within {\n border: var(--osdk-emphasis-focus-width) solid\n var(--osdk-intent-danger-rest);\n }\n }\n }\n\n &.error {\n background: var(--osdk-table-cell-input-bg);\n border: var(--osdk-table-cell-edited-border-error);\n }\n}\n\n.osdkEditableCellTrigger {\n width: 100%;\n}\n\n.osdkEditableCellDropdown {\n /* Override the default borders in dropdown */\n --osdk-select-border-color: transparent;\n --osdk-combobox-border-color: transparent;\n --osdk-combobox-focus-border-color: transparent;\n\n /* Match the text-input editable cell background so the row reads as a\n single field strip instead of mixed surface colors. */\n --osdk-select-trigger-bg: var(--osdk-table-cell-input-bg);\n --osdk-combobox-trigger-bg: var(--osdk-table-cell-input-bg);\n\n --osdk-combobox-input-padding: var(--osdk-surface-spacing)\n calc(var(--osdk-surface-spacing) * 3);\n\n --osdk-select-trigger-padding: var(--osdk-surface-spacing)\n calc(var(--osdk-surface-spacing) * 3);\n\n border-radius: var(--osdk-surface-border-radius);\n\n tr[data-focused=\"true\"] & {\n border: var(--osdk-table-cell-editable-border);\n background: var(--osdk-table-cell-input-bg);\n\n &.osdkEditedInput {\n border: var(--osdk-table-cell-edited-border);\n }\n\n &:focus-within,\n &.osdkEditedInput:focus-within {\n border: var(--osdk-emphasis-focus-width) solid\n var(--osdk-emphasis-focus-color);\n }\n\n &.error {\n border: var(--osdk-table-cell-edited-border-error);\n\n &:focus-within {\n border: var(--osdk-emphasis-focus-width) solid\n var(--osdk-intent-danger-rest);\n }\n }\n }\n\n &.error {\n background: var(--osdk-table-cell-input-bg);\n border: var(--osdk-table-cell-edited-border-error);\n }\n}\n\n.osdkEditableCellDatePicker {\n /* Override the default borders/shadow in date picker so the cell wrapper\n is the only thing painting a border on focus. Without these overrides\n the date picker's own input-wrapper draws a box-shadow on top of the\n cell border, masking the cell's :focus-within outline. */\n --osdk-datetime-input-bg: transparent;\n --osdk-datetime-input-bg-hover: transparent;\n --osdk-datetime-input-shadow: none;\n --osdk-datetime-input-shadow-error: none;\n --osdk-datetime-input-focus-shadow: none;\n --osdk-datetime-input-focus-shadow-error: none;\n\n --osdk-datetime-input-padding: var(--osdk-surface-spacing)\n calc(var(--osdk-surface-spacing) * 3);\n\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-radius: var(--osdk-surface-border-radius);\n /* Reserve space for the focus border so layout doesn't shift on focus,\n matching .osdkEditableCell. */\n border: var(--osdk-surface-border-width) solid transparent;\n\n tr[data-focused=\"true\"] & {\n border: var(--osdk-table-cell-editable-border);\n background: var(--osdk-table-cell-input-bg);\n\n &.osdkEditedInput {\n border: var(--osdk-table-cell-edited-border);\n }\n\n &:focus-within,\n &.osdkEditedInput:focus-within {\n border: var(--osdk-emphasis-focus-width) solid\n var(--osdk-emphasis-focus-color);\n }\n\n &.error {\n border: var(--osdk-table-cell-edited-border-error);\n\n &:focus-within {\n border: var(--osdk-emphasis-focus-width) solid\n var(--osdk-intent-danger-rest);\n }\n }\n }\n\n &.error {\n background: var(--osdk-table-cell-input-bg);\n border: var(--osdk-table-cell-edited-border-error);\n }\n}\n\n.readonlyDisplayCell {\n padding: calc(var(--osdk-surface-spacing) * 0.5) 0;\n min-height: 1lh;\n}\n\n.nonEditableCellInEditMode {\n padding-left: calc(var(--osdk-surface-spacing) * 3);\n}\n\n.osdkEditableInput {\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n background: inherit;\n color: var(--osdk-typography-color-default-rest);\n border: none;\n\n &:focus {\n outline: none;\n }\n}\n\n.osdkEditedInput {\n border-radius: var(--osdk-surface-border-radius);\n border: var(--osdk-table-cell-edited-border);\n background: var(--osdk-table-cell-input-bg);\n}\n\n.validationError {\n display: flex;\n align-items: center;\n gap: var(--osdk-surface-spacing);\n}\n\n.errorIcon {\n color: var(--osdk-intent-danger-rest);\n}\n\n.errorIconWrapper {\n margin-right: calc(var(--osdk-surface-spacing) * 3);\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, { createContext, useCallback, useContext, useRef } from \"react\";\nconst PortalTrackerContext = /*#__PURE__*/createContext(undefined);\nexport function PortalTrackerProvider({\n children\n}) {\n const portalsRef = useRef(new Set());\n const register = useCallback(element => {\n portalsRef.current.add(element);\n return () => {\n portalsRef.current.delete(element);\n };\n }, []);\n const containsElement = useCallback(node => {\n for (const portal of portalsRef.current) {\n if (portal.contains(node)) {\n return true;\n }\n }\n return false;\n }, []);\n const value = useRef({\n register,\n containsElement\n });\n return /*#__PURE__*/React.createElement(PortalTrackerContext.Provider, {\n value: value.current\n }, children);\n}\nexport function usePortalTracker() {\n return useContext(PortalTrackerContext);\n}\n\n/**\n * Registers a DOM element as a tracked portal container.\n * Call with the portal's root element once it mounts.\n * The element is automatically unregistered on unmount.\n *\n * Usage in a component that renders a portaled dropdown:\n * ```tsx\n * const registerPortal = useRegisterPortal();\n * <Select.Portal ref={registerPortal}>...</Select.Portal>\n * ```\n */\nexport function useRegisterPortal() {\n const tracker = useContext(PortalTrackerContext);\n const cleanupRef = useRef(null);\n return useCallback(element => {\n cleanupRef.current?.();\n cleanupRef.current = null;\n if (element && tracker) {\n cleanupRef.current = tracker.register(element);\n }\n }, [tracker]);\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 { Error } from \"@blueprintjs/icons\";\nimport classNames from \"classnames\";\nimport React, { useCallback, useMemo } from \"react\";\nimport { DatePicker } from \"../../shared/calendar/index.js\";\nimport { formatDateForInput } from \"../../shared/dateUtils.js\";\nimport styles from \"../EditableCell.module.css\";\nimport { useRegisterPortal } from \"../utils/PortalTracker.js\";\nfunction parseDateValue(input) {\n if (input === \"\") {\n return null;\n }\n const date = new Date(input);\n if (isNaN(date.getTime())) {\n return null;\n }\n return date;\n}\nfunction DatePickerCellFieldInner({\n fieldComponentProps,\n inputValue,\n hasValidationError,\n isEdited,\n onChange,\n dataType\n}) {\n const portalRef = useRegisterPortal();\n const dateValue = useMemo(() => parseDateValue(inputValue), [inputValue]);\n const showTime = fieldComponentProps?.showTime ?? dataType === \"timestamp\";\n const handleChange = useCallback(newValue => {\n if (newValue == null) {\n onChange(null);\n return;\n }\n onChange(showTime ? newValue.toISOString() : formatDateForInput(newValue));\n }, [onChange, showTime]);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(styles.osdkEditableCellDatePicker, {\n [styles.error]: hasValidationError,\n [styles.osdkEditedInput]: isEdited\n })\n }, /*#__PURE__*/React.createElement(DatePicker, _extends({}, fieldComponentProps, {\n showTime: showTime,\n value: dateValue,\n onChange: handleChange,\n portalRef: portalRef,\n modal: false\n })), hasValidationError && /*#__PURE__*/React.createElement(\"span\", {\n className: styles.errorIconWrapper\n }, /*#__PURE__*/React.createElement(Error, {\n className: styles.errorIcon\n })));\n}\nexport const DatePickerCellField = /*#__PURE__*/React.memo(DatePickerCellFieldInner);","/*\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 { Error } from \"@blueprintjs/icons\";\nimport classNames from \"classnames\";\nimport React from \"react\";\nimport styles from \"../EditableCell.module.css\";\nfunction ReadonlyDisplayCellInner({\n inputValue,\n hasValidationError,\n isEdited\n}) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(styles.osdkEditableCell, {\n [styles.error]: hasValidationError,\n [styles.osdkEditedInput]: isEdited\n })\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(styles.osdkEditableInput, styles.readonlyDisplayCell)\n }, inputValue), hasValidationError && /*#__PURE__*/React.createElement(Error, {\n className: styles.errorIcon\n }));\n}\nexport const ReadonlyDisplayCell = /*#__PURE__*/React.memo(ReadonlyDisplayCellInner);","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 classNames from \"classnames\";\nimport React from \"react\";\nimport { DropdownField } from \"../../action-form/fields/DropdownField.js\";\nimport styles from \"../EditableCell.module.css\";\nimport { useRegisterPortal } from \"../utils/PortalTracker.js\";\nimport { ReadonlyDisplayCell } from \"./ReadonlyDisplayCell.js\";\nfunction DropdownCellFieldInner({\n fieldComponentProps,\n isRowFocused,\n inputValue,\n value,\n hasValidationError,\n isEdited,\n onChange\n}) {\n const portalRef = useRegisterPortal();\n const {\n itemToStringLabel\n } = fieldComponentProps;\n if (!isRowFocused) {\n return /*#__PURE__*/React.createElement(ReadonlyDisplayCell, {\n inputValue: itemToStringLabel ? itemToStringLabel(value) : inputValue,\n hasValidationError: hasValidationError,\n isEdited: isEdited\n });\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(styles.osdkEditableCellDropdown, {\n [styles.error]: hasValidationError,\n [styles.osdkEditedInput]: isEdited\n })\n }, /*#__PURE__*/React.createElement(DropdownField, _extends({}, fieldComponentProps, {\n portalRef: portalRef,\n value: value,\n onChange: onChange,\n modal: false\n })));\n}\nexport const DropdownCellField = /*#__PURE__*/React.memo(DropdownCellFieldInner);","/*\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 { Input } from \"@base-ui/react/input\";\nimport { Error } from \"@blueprintjs/icons\";\nimport classNames from \"classnames\";\nimport React from \"react\";\nimport styles from \"../EditableCell.module.css\";\nfunction TextInputCellFieldInner({\n inputType,\n inputValue,\n hasValidationError,\n isEdited,\n onValueChange,\n onBlur,\n onKeyDown\n}) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(styles.osdkEditableCell, {\n [styles.error]: hasValidationError,\n [styles.osdkEditedInput]: isEdited\n })\n }, /*#__PURE__*/React.createElement(Input, {\n type: inputType,\n value: inputValue,\n className: styles.osdkEditableInput,\n onValueChange: onValueChange,\n onBlur: onBlur,\n onKeyDown: onKeyDown,\n \"aria-invalid\": hasValidationError\n }), hasValidationError && /*#__PURE__*/React.createElement(Error, {\n className: styles.errorIcon\n }));\n}\nexport const TextInputCellField = /*#__PURE__*/React.memo(TextInputCellFieldInner);","/*\n * Copyright 2026 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/**\n * Whether a column declares any editing behavior.\n *\n * Returns `true` when `editable` is `true` or a predicate function. The\n * predicate may still return `false` for individual rows — that decision is\n * made per-cell via {@link isCellEditable}. This function answers the\n * column-level question used to drive table-wide UI like the bottom edit bar.\n */\nexport function isColumnDeclaredEditable(editable) {\n return editable === true || typeof editable === \"function\";\n}\n\n/**\n * Whether a specific cell is editable, given the column's `editable` value\n * and the row's object. Used at render time per cell.\n */\nexport function isCellEditable(editable, object) {\n if (typeof editable === \"function\") {\n return editable(object);\n }\n return editable === true;\n}\n\n/**\n * Whether two cell values are equivalent for the purpose of detecting \"no\n * actual edit\". Treats `null` and `undefined` as the same \"empty\" state so\n * clearing a never-set cell doesn't register as an edit. `\"\"` is kept\n * distinct because an empty string can be meaningful data (e.g. a data\n * quality signal) and clearing it to null IS an edit.\n */\nexport function cellValuesEqual(a, b) {\n return (a ?? null) === (b ?? null);\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 { Error } from \"@blueprintjs/icons\";\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { Tooltip } from \"../base-components/tooltip/Tooltip.js\";\nimport { DatePickerCellField } from \"./components/DatePickerCellField.js\";\nimport { DropdownCellField } from \"./components/DropdownCellField.js\";\nimport { TextInputCellField } from \"./components/TextInputCellField.js\";\nimport styles from \"./EditableCell.module.css\";\nimport { cellValuesEqual } from \"./utils/editableUtils.js\";\nconst NUMBER_TYPES = [\"double\", \"integer\", \"long\", \"float\", \"decimal\", \"byte\", \"short\"];\nconst DATE_TYPES = [\"datetime\", \"timestamp\"];\nconst VALIDATION_ERROR_MESSAGE = \"Validation error\";\nfunction valueToString(value) {\n if (value == null) {\n return \"\";\n }\n if (typeof value === \"object\") {\n return JSON.stringify(value);\n }\n // At this point, value is a primitive (string, number, boolean, symbol, bigint)\n return String(value);\n}\nfunction parseValueByType(value, dataType) {\n if (!dataType || !NUMBER_TYPES.includes(dataType)) {\n return value;\n }\n if (value === \"\") {\n return null;\n }\n const parsedNumber = Number(value);\n if (isNaN(parsedNumber)) {\n return value;\n }\n return parsedNumber;\n}\nfunction EditableCellInner({\n initialValue,\n currentValue,\n cellId,\n dataType,\n onCellEdit,\n onCellValidationError,\n clearCellValidationError,\n originalRowData,\n rowId,\n columnId,\n validateEdit,\n validationError,\n editFieldConfig,\n rowCellEdits,\n isRowFocused = false\n}) {\n const [inputValue, setInputValue] = useState(valueToString(currentValue));\n const isCancelled = useRef(false);\n const validationAbortControllerRef = useRef(null);\n const abortValidation = useCallback(() => {\n if (validationAbortControllerRef.current) {\n validationAbortControllerRef.current.abort();\n validationAbortControllerRef.current = null;\n }\n }, []);\n const hasValidationError = validationError != null;\n const isEdited = !cellValuesEqual(currentValue, initialValue);\n useEffect(() => {\n setInputValue(valueToString(currentValue));\n }, [currentValue]);\n useEffect(() => {\n return () => {\n abortValidation();\n };\n }, [abortValidation]);\n const runValidation = useCallback(parsedValue => {\n if (!validateEdit) {\n return;\n }\n const controller = new AbortController();\n validationAbortControllerRef.current = controller;\n const validationPromise = validateEdit(parsedValue);\n\n // Race between validation and abort\n Promise.race([validationPromise, new Promise((_, reject) => {\n controller.signal.addEventListener(\"abort\", () => {\n reject(new DOMException(\"Aborted\", \"AbortError\"));\n });\n })]).then(errorMessage => {\n if (controller.signal.aborted) {\n return;\n }\n if (errorMessage) {\n onCellValidationError?.(cellId, errorMessage);\n } else {\n clearCellValidationError?.(cellId);\n }\n }, error => {\n if (!controller.signal.aborted && error.name !== \"AbortError\") {\n onCellValidationError?.(cellId, VALIDATION_ERROR_MESSAGE);\n }\n });\n }, [validateEdit, onCellValidationError, clearCellValidationError, cellId]);\n const commitEdit = useCallback(newValue => {\n abortValidation();\n onCellEdit(cellId, {\n rowId,\n columnId,\n newValue,\n oldValue: initialValue,\n originalRowData\n });\n runValidation(newValue);\n }, [abortValidation, onCellEdit, cellId, rowId, columnId, initialValue, originalRowData, runValidation]);\n\n // Text/number input: commit on blur\n const handleBlur = useCallback(() => {\n if (isCancelled.current) {\n isCancelled.current = false;\n return;\n }\n\n // No-op when the input wasn't actually changed by the user\n if (inputValue === valueToString(currentValue)) {\n return;\n }\n const parsedValue = parseValueByType(inputValue, dataType);\n commitEdit(parsedValue);\n }, [inputValue, currentValue, dataType, commitEdit]);\n const handleInputChange = useCallback(value => {\n // Cancel any in-flight validation\n abortValidation();\n setInputValue(value);\n }, [abortValidation]);\n const handleKeyDown = useCallback(e => {\n if (e.key === \"Enter\") {\n e.currentTarget.blur();\n }\n if (e.key === \"Escape\") {\n isCancelled.current = true;\n setInputValue(valueToString(currentValue));\n e.currentTarget.blur();\n }\n }, [currentValue]);\n const handleCommit = useCallback(newValue => {\n // No-op if the value hasn't actually moved from what the cell already\n // displays. null and undefined are treated as the same empty state so\n // a dropdown that clears a never-set cell doesn't fire; \"\" stays\n // distinct since an empty string can be meaningful data.\n if (cellValuesEqual(newValue, currentValue)) return;\n commitEdit(newValue);\n }, [commitEdit, currentValue]);\n const inputType = dataType && NUMBER_TYPES.includes(dataType) ? \"number\" : \"text\";\n\n // Compute field-component props once per (editFieldConfig, originalRowData, rowCellEdits).\n // The narrowed return type is preserved in each useMemo\n const dropdownFieldProps = useMemo(() => editFieldConfig?.fieldComponent === \"DROPDOWN\" ? editFieldConfig.getFieldComponentProps(originalRowData, rowCellEdits) : undefined, [editFieldConfig, originalRowData, rowCellEdits]);\n const datePickerFieldProps = useMemo(() => editFieldConfig?.fieldComponent === \"DATE_PICKER\" ? editFieldConfig.getFieldComponentProps(originalRowData, rowCellEdits) : undefined, [editFieldConfig, originalRowData, rowCellEdits]);\n const renderFieldInput = () => {\n switch (editFieldConfig?.fieldComponent) {\n case \"DROPDOWN\":\n return /*#__PURE__*/React.createElement(DropdownCellField, {\n fieldComponentProps: dropdownFieldProps,\n isRowFocused: isRowFocused,\n inputValue: inputValue,\n value: currentValue,\n hasValidationError: hasValidationError,\n isEdited: isEdited,\n onChange: handleCommit\n });\n case \"DATE_PICKER\":\n return /*#__PURE__*/React.createElement(DatePickerCellField, {\n fieldComponentProps: datePickerFieldProps,\n inputValue: inputValue,\n hasValidationError: hasValidationError,\n isEdited: isEdited,\n onChange: handleCommit\n });\n default:\n if (dataType != null && DATE_TYPES.includes(dataType)) {\n return /*#__PURE__*/React.createElement(DatePickerCellField, {\n inputValue: inputValue,\n hasValidationError: hasValidationError,\n isEdited: isEdited,\n onChange: handleCommit,\n dataType: dataType\n });\n }\n return /*#__PURE__*/React.createElement(TextInputCellField, {\n inputType: inputType,\n inputValue: inputValue,\n hasValidationError: hasValidationError,\n isEdited: isEdited,\n onValueChange: handleInputChange,\n onBlur: handleBlur,\n onKeyDown: handleKeyDown\n });\n }\n };\n return /*#__PURE__*/React.createElement(Tooltip.Provider, null, /*#__PURE__*/React.createElement(Tooltip.Root, {\n disabled: !hasValidationError\n }, /*#__PURE__*/React.createElement(Tooltip.Trigger, {\n className: styles.osdkEditableCellTrigger,\n render: /*#__PURE__*/React.createElement(\"span\", {\n className: styles.osdkTooltipTriggerWrapper\n })\n }, renderFieldInput()), /*#__PURE__*/React.createElement(Tooltip.Portal, null, /*#__PURE__*/React.createElement(Tooltip.Positioner, {\n sideOffset: 4,\n side: \"bottom\"\n }, /*#__PURE__*/React.createElement(Tooltip.Popup, null, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.validationError\n }, /*#__PURE__*/React.createElement(Error, {\n className: styles.errorIcon\n }), validationError), /*#__PURE__*/React.createElement(Tooltip.Arrow, null))))));\n}\nexport const EditableCell = /*#__PURE__*/React.memo(EditableCellInner);\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 isAsyncCellData = value => {\n return value != null && typeof value === \"object\" && \"__asyncCell\" in value && value.__asyncCell === true;\n};\nexport const createAsyncCellData = ({\n data,\n isLoading,\n error\n}) => ({\n __asyncCell: true,\n data,\n isLoading,\n error\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 function getCellId(cellIdentifier) {\n return JSON.stringify(cellIdentifier);\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/**\n * Determines if a cell should be rendered as editable\n *\n * @param editable - Whether the column is marked as editable\n * @param onCellEdit - The onCellEdit callback from table meta (indicates edit handlers exist)\n * @param isInEditMode - Whether the table is currently in edit mode\n * @returns true if the cell should be rendered with edit controls\n */\nexport function shouldShowEditableCell(editable, onCellEdit, isInEditMode) {\n return editable != null && editable !== false && onCellEdit != null && isInEditMode === true;\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 from \"react\";\nimport { AsyncValueCell } from \"./components/AsyncValueCell.js\";\nimport { CbacMarkingCell } from \"./components/CbacMarkingCell.js\";\nimport { MandatoryMarkingCell } from \"./components/MandatoryMarkingCell.js\";\nimport { EditableCell } from \"./EditableCell.js\";\nimport styles from \"./EditableCell.module.css\";\nimport { isAsyncCellData } from \"./utils/AsyncCellData.js\";\nimport { isCellEditable } from \"./utils/editableUtils.js\";\nimport { getCellId } from \"./utils/getCellId.js\";\nimport { shouldShowEditableCell } from \"./utils/shouldShowEditableCell.js\";\nfunction toDisplayValue(value) {\n if (typeof value === \"boolean\") {\n return String(value);\n }\n return value;\n}\n\n// Returns the subset of `cellEdits` belonging to `rowId`, re-keyed by columnId.\n// Returns `undefined` (stable reference) when the row has no pending edits, so\n// that `React.memo` on `EditableCell` can skip re-renders of unedited rows when\n// edits change elsewhere in the table.\nfunction filterCellEditsToRow(cellEdits, rowId) {\n if (!cellEdits) return undefined;\n let result;\n for (const edit of Object.values(cellEdits)) {\n if (edit.rowId === rowId) {\n result ??= {};\n result[edit.columnId] = edit;\n }\n }\n return result;\n}\nexport function renderDefaultCell(cellContext) {\n const meta = cellContext.table.options.meta;\n const columnMeta = cellContext.column.columnDef.meta;\n const cellValue = cellContext.getValue();\n const asyncCellData = isAsyncCellData(cellValue) ? cellValue : undefined;\n\n // Function-backed columns are read-only: the value is server-computed\n // and cannot be edited in the table. Return the async cell directly.\n if (columnMeta?.isAsyncColumn && asyncCellData) {\n return /*#__PURE__*/React.createElement(AsyncValueCell, asyncCellData);\n }\n if (columnMeta?.markingType === \"CBAC\") {\n return /*#__PURE__*/React.createElement(CbacMarkingCell, {\n value: cellValue\n });\n }\n if (columnMeta?.markingType === \"MANDATORY\") {\n return /*#__PURE__*/React.createElement(MandatoryMarkingCell, {\n value: cellValue\n });\n }\n const rowData = cellContext.row.original;\n const isEditable = isCellEditable(columnMeta?.editable, rowData);\n if (!meta?.onCellEdit // Type guard\n || !shouldShowEditableCell(isEditable, meta?.onCellEdit, meta?.isInEditMode)) {\n // Align non editable cells with the editable cells\n if (meta?.isInEditMode) {\n return /*#__PURE__*/React.createElement(\"span\", {\n className: styles.nonEditableCellInEditMode\n }, toDisplayValue(cellValue));\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, toDisplayValue(cellValue));\n }\n const rowId = cellContext.row.id;\n const columnId = cellContext.column.id;\n const cellId = getCellId({\n rowId,\n columnId\n });\n const cellEdits = meta.cellEdits;\n const editedValue = cellEdits?.[cellId];\n // If newValue is explicitly set to null, treat it as null. Otherwise, fall back to the original cell value.\n const currentValue = editedValue?.newValue === undefined ? cellValue : editedValue?.newValue;\n const validationError = meta.validationErrors?.get(cellId);\n const isRowFocused = meta.focusedRowId === rowId;\n const rowCellEdits = filterCellEditsToRow(cellEdits, rowId);\n return /*#__PURE__*/React.createElement(EditableCell, {\n initialValue: cellValue,\n currentValue: currentValue,\n cellId: cellId,\n dataType: columnMeta?.dataType,\n editFieldConfig: columnMeta?.editFieldConfig,\n rowCellEdits: rowCellEdits,\n onCellEdit: meta.onCellEdit,\n onCellValidationError: meta.onCellValidationError,\n clearCellValidationError: meta.clearCellValidationError,\n originalRowData: rowData,\n rowId: rowId,\n columnId: columnId,\n validateEdit: columnMeta?.validateEdit,\n validationError: validationError,\n isRowFocused: isRowFocused\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 { useOsdkMetadata } from \"@osdk/react\";\nimport { useMemo } from \"react\";\nimport { renderDefaultCell } from \"../DefaultCellRenderer.js\";\nimport { shouldShowEditableCell } from \"../utils/shouldShowEditableCell.js\";\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 editable,\n renderCell,\n renderHeader,\n columnName\n } = col;\n const editFieldConfig = col.editable ? col.editFieldConfig : undefined;\n const validateEdit = col.editable ? col.validateEdit : undefined;\n const propertyMetadata = locator.type === \"property\" ? objectProperties?.[locator.id] : undefined;\n const colKey = locator.id;\n const dataType = propertyMetadata?.type && typeof propertyMetadata.type === \"string\" ? propertyMetadata.type : undefined;\n const markingType = propertyMetadata?.typeMetadata?.type === \"marking\" ? propertyMetadata.typeMetadata.markingType : undefined;\n const colDef = {\n id: colKey,\n accessorKey: colKey,\n header: renderHeader ?? (columnName || propertyMetadata?.displayName),\n meta: {\n columnName: columnName || propertyMetadata?.displayName,\n isAsyncColumn: locator.type === \"function\",\n isVisible: col.isVisible !== false,\n editable,\n editFieldConfig,\n dataType,\n markingType,\n validateEdit\n },\n size: width,\n ...(minWidth ? {\n minSize: minWidth\n } : {}),\n ...(maxWidth ? {\n maxSize: maxWidth\n } : {}),\n enableResizing: resizable,\n // Function-backed columns must be sorted on the frontend, so disable sorting for now\n enableSorting: locator.type === \"function\" ? false : orderable,\n enableColumnFilter: filterable,\n cell: cellContext => {\n const object = cellContext.row.original;\n const meta = cellContext.table.options.meta;\n const isEditable = shouldShowEditableCell(editable, meta?.onCellEdit, meta?.isInEditMode);\n if (renderCell && !isEditable) {\n return renderCell(object, locator);\n }\n return renderDefaultCell(cellContext);\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\nexport const SELECTION_COLUMN_ID = \"__selection__\";\nexport const DEFAULT_COLUMN_WIDTH = 80;\nexport const DEFAULT_ROW_HEIGHT = 40;\nexport const DEFAULT_LOADING_COLUMN_WIDTH = 120;\nexport const MIN_LOADING_ROWS = 5;\nexport const SCROLL_FETCH_THRESHOLD = 100;\nexport const VIRTUALIZER_OVERSCAN = 5;\nexport const DEFAULT_PAGE_SIZE = 50;\nexport const DEFAULT_OBJECT_TABLE_DEDUPE_INTERVAL_MS = 60_000;\nexport const DEFAULT_FUNCTION_COLUMN_DEDUPE_INTERVAL_MS = 300_000;\n\n// The main goal here is to split function executions into smaller pieces.\n// The executor should be happy to run several smaller pieces at once, so run\n// up to 10 at a time to improve performance.\nexport const DEFAULT_MAX_CONCURRENT_REQUESTS = 10;\nexport const SELECTION_COLUMN_WIDTH = 50;","/*\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, useEffect, useState } from \"react\";\nimport { SELECTION_COLUMN_ID } from \"../utils/constants.js\";\nexport const useColumnPinning = ({\n columnDefinitions,\n hasSelectionColumn,\n onColumnsPinnedChanged\n}) => {\n const [columnPinning, setColumnPinning] = useState({\n left: [],\n right: []\n });\n\n // Update column pinning when columnDefinitions change\n useEffect(() => {\n const defaultState = getColumnPinningStateFromColumnDefs(columnDefinitions);\n const selectionCol = hasSelectionColumn ? [SELECTION_COLUMN_ID] : [];\n setColumnPinning({\n left: [...selectionCol, ...(defaultState.left ?? [])],\n right: [...(defaultState.right ?? [])]\n });\n }, [columnDefinitions, hasSelectionColumn]);\n const onColumnPinningChange = useCallback(updater => {\n setColumnPinning(prev => {\n const newPinning = typeof updater === \"function\" ? updater(prev) : updater;\n if (onColumnsPinnedChanged) {\n const newStates = convertColumnPinningStateToArray(newPinning);\n const stateWithoutSelectionCol = newStates.filter(state => state.columnId !== SELECTION_COLUMN_ID);\n onColumnsPinnedChanged(stateWithoutSelectionCol);\n }\n return newPinning;\n });\n }, [onColumnsPinnedChanged]);\n return {\n columnPinning,\n onColumnPinningChange\n };\n};\nconst getColumnPinningStateFromColumnDefs = columnDefinitions => {\n if (!columnDefinitions) {\n return {};\n }\n const columnPinningState = columnDefinitions.reduce((acc, {\n locator,\n pinned\n }) => {\n const colKey = locator.id.toString();\n const isPinned = pinned != null && pinned !== \"none\";\n if (!isPinned) {\n return acc;\n }\n if (pinned === \"left\") {\n return {\n ...acc,\n left: [...(acc.left ?? []), colKey]\n };\n }\n return {\n ...acc,\n right: [...(acc.right ?? []), colKey]\n };\n }, {\n left: [],\n right: []\n });\n return columnPinningState;\n};\n\n/**\n * Converts ColumnPinningState to array format for the callback\n */\nfunction convertColumnPinningStateToArray(pinningState) {\n return [...(pinningState.left ?? []).map(columnId => ({\n columnId,\n pinned: \"left\"\n })), ...(pinningState.right ?? []).map(columnId => ({\n columnId,\n pinned: \"right\"\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 { useCallback, useState } from \"react\";\nexport const useColumnResize = ({\n onColumnResize\n}) => {\n const [columnSizing, setColumnSizing] = useState({});\n const onColumnSizingChange = useCallback(updater => {\n setColumnSizing(prev => {\n const newState = typeof updater === \"function\" ? updater(prev) : updater;\n if (onColumnResize) {\n for (const columnId of Object.keys(newState)) {\n if (newState[columnId] !== prev[columnId]) {\n onColumnResize(columnId, newState[columnId]);\n }\n }\n for (const columnId of Object.keys(prev)) {\n if (!(columnId in newState)) {\n onColumnResize(columnId, null);\n }\n }\n }\n return newState;\n });\n }, [onColumnResize]);\n return {\n columnSizing,\n onColumnSizingChange\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 { useCallback, useEffect, useState } from \"react\";\nexport const useColumnVisibility = ({\n allColumns,\n onColumnVisibilityChanged\n}) => {\n const [columnVisibility, setColumnVisibility] = useState(() => getColumnVisibilityState(allColumns));\n const [columnOrder, setColumnOrder] = useState(() => getColumnOrder(allColumns));\n\n // TODO: Explore other ways to respond to props changes for controlled mode\n useEffect(() => {\n setColumnVisibility(getColumnVisibilityState(allColumns));\n }, [allColumns]);\n useEffect(() => {\n setColumnOrder(getColumnOrder(allColumns));\n }, [allColumns]);\n const onColumnVisibilityChange = useCallback(updaterOrValue => {\n setColumnVisibility(prev => {\n const newState = typeof updaterOrValue === \"function\" ? updaterOrValue(prev) : updaterOrValue;\n if (onColumnVisibilityChanged) {\n const changes = Object.entries(newState).map(([columnId, isVisible]) => ({\n columnId,\n isVisible\n }));\n onColumnVisibilityChanged(changes);\n }\n return newState;\n });\n }, [onColumnVisibilityChanged]);\n const onColumnOrderChange = useCallback(updaterOrValue => {\n setColumnOrder(prev => {\n const newState = typeof updaterOrValue === \"function\" ? updaterOrValue(prev) : updaterOrValue;\n return newState;\n });\n }, []);\n return {\n columnVisibility,\n onColumnVisibilityChange,\n columnOrder,\n onColumnOrderChange\n };\n};\nconst getColumnVisibilityState = allColumns => {\n return allColumns.reduce((acc, col) => {\n const colId = col.id ?? col.accessorKey;\n if (colId) {\n return {\n ...acc,\n [colId]: col.meta?.isVisible !== false\n };\n }\n return acc;\n }, {});\n};\nconst getColumnOrder = allColumns => {\n return allColumns.map(col => col.id ?? col.accessorKey).filter(id => id != null);\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\";\nimport { cellValuesEqual } from \"../utils/editableUtils.js\";\nexport function useEditableTable({\n editMode = \"manual\",\n onCellValueChanged,\n onSubmitEdits\n}) {\n const [isActive, setActive] = useState(editMode === \"always\");\n const [cellEdits, setCellEdits] = useState({});\n const [validationErrors, setValidationErrors] = useState(new Map());\n const clearCellValidationError = useCallback(cellId => {\n setValidationErrors(prev => {\n const newErrors = new Map(prev);\n newErrors.delete(cellId);\n return newErrors;\n });\n }, []);\n const handleCellEdit = useCallback((cellId, info) => {\n // If value is changed back to original, remove it from edits. null\n // and undefined are treated as the same empty state so clearing a\n // never-set cell doesn't leave a phantom \"edited\" indicator. \"\" stays\n // a distinct value.\n if (cellValuesEqual(info.newValue, info.oldValue)) {\n setCellEdits(prev => {\n const {\n [cellId]: _,\n ...rest\n } = prev;\n return rest;\n });\n } else {\n setCellEdits(prev => ({\n ...prev,\n [cellId]: info\n }));\n }\n onCellValueChanged?.(info);\n }, [onCellValueChanged]);\n const clearEdits = useCallback(() => {\n setCellEdits({});\n setValidationErrors(new Map());\n }, []);\n const handleSubmitEdits = useCallback(async () => {\n const edits = Object.values(cellEdits);\n return onSubmitEdits ? onSubmitEdits(edits) : false;\n }, [cellEdits, onSubmitEdits]);\n const onCellValidationError = useCallback((cellId, error) => {\n setValidationErrors(prev => {\n const newErrors = new Map(prev);\n newErrors.set(cellId, error);\n return newErrors;\n });\n }, []);\n const editModeState = editMode === \"always\" ? {\n type: \"always\",\n isActive: true\n } : {\n type: \"manual\",\n isActive,\n setActive\n };\n return {\n cellEdits,\n onCellEdit: handleCellEdit,\n onSubmitEdits: onSubmitEdits ? handleSubmitEdits : undefined,\n clearEdits,\n editModeState,\n onCellValidationError,\n validationErrors,\n clearCellValidationError\n };\n}","/*\n * Copyright 2026 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 { chunk } from \"lodash-es\";\n\n/** A page's filtered ObjectSet paired with the row objects it covers. */\n\n/** Filters columnDefinitions down to only function-backed locators. */\nexport function extractFunctionLocators(columnDefinitions) {\n if (!columnDefinitions) return [];\n return columnDefinitions.filter(colDef => colDef.locator.type === \"function\").map(colDef => colDef.locator);\n}\n\n/**\n * Constructs the per-page object sets used to fetch function-backed column\n * values for `objects`. Builds an unfiltered base set from\n * `objectOrInterfaceType` (so pages are scoped purely by primary key) and\n * narrows each page via `{ $primaryKey: { $in: pageKeys } }`.\n *\n * Returns `[]` when the type is an interface (no base set can be built) or\n * when no primary-key apiName is available and the input is empty.\n */\nexport function buildPagedObjectSets(client, objectOrInterfaceType, objects, pageSize) {\n const isObjectType = objectOrInterfaceType.type === \"object\";\n const baseObjectSet = isObjectType ? client(objectOrInterfaceType) : undefined;\n if (!baseObjectSet) {\n return [];\n }\n return chunk(objects, pageSize).map(page => {\n const whereClause = {\n $primaryKey: {\n $in: page.map(obj => obj.$primaryKey)\n }\n };\n return {\n objectSet: baseObjectSet.where(whereClause),\n objects: page\n };\n });\n}","/*\n * Copyright 2026 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 { useOsdkClient, useOsdkFunctions } from \"@osdk/react\";\nimport { useMemo, useRef } from \"react\";\nimport { createAsyncCellData } from \"../utils/AsyncCellData.js\";\nimport { DEFAULT_FUNCTION_COLUMN_DEDUPE_INTERVAL_MS, DEFAULT_MAX_CONCURRENT_REQUESTS, DEFAULT_PAGE_SIZE } from \"../utils/constants.js\";\nimport { buildPagedObjectSets, extractFunctionLocators } from \"../utils/functionColumns.js\";\nexport function useFunctionColumnsData({\n objectOrInterfaceType,\n objects,\n columnDefinitions,\n pageSize = DEFAULT_PAGE_SIZE\n}) {\n const client = useOsdkClient();\n const prevDataRef = useRef({});\n const stableObjects = useStableObjects(objects);\n const functionColDefs = useMemo(() => extractFunctionLocators(columnDefinitions), [columnDefinitions]);\n\n // Construct an object set per page (base set filtered to each page's\n // primary keys). `buildPagedObjectSets` returns `[]` for interfaces and\n // when there's no work to do, which short-circuits the downstream queries.\n //\n // When a new page loads, only that page's queries fire — old pages hit the\n // dedupeIntervalMs cache since their params are unchanged.\n const pagedObjectSets = useMemo(() => {\n if (!stableObjects?.length) return [];\n return buildPagedObjectSets(client, objectOrInterfaceType, stableObjects, pageSize);\n }, [client, objectOrInterfaceType, stableObjects, pageSize]);\n const disabled = pagedObjectSets.length === 0 || functionColDefs.length === 0;\n const queryGrid = useMemo(() => {\n if (pagedObjectSets.length === 0 || functionColDefs.length === 0) {\n return EMPTY_QUERY_GRID;\n }\n return buildQueryGrid(pagedObjectSets, functionColDefs);\n }, [pagedObjectSets, functionColDefs]);\n const results = useOsdkFunctions({\n queries: queryGrid.queries,\n enabled: !disabled,\n maxConcurrent: DEFAULT_MAX_CONCURRENT_REQUESTS\n });\n const mergedResults = useMemo(() => mergePagedResults(results, queryGrid.numColumns), [results, queryGrid.numColumns]);\n const data = useMemo(() => {\n const columnData = buildFunctionColumnData(mergedResults, functionColDefs, stableObjects, disabled, prevDataRef.current);\n prevDataRef.current = columnData;\n return columnData;\n }, [mergedResults, functionColDefs, stableObjects, disabled]);\n return data;\n}\n\n/**\n * Pairs a flat queries array with the layout metadata needed to recover per-column\n * results back into per-column groups. The numColumns value is produced by\n * the same function that builds the queries, so the two are always in sync.\n */\n\nconst EMPTY_QUERY_GRID = {\n queries: [],\n numColumns: 0\n};\n\n/**\n * Builds a flat query array and the layout metadata needed to recover per-column results.\n *\n * Layout: [page0_col0, page0_col1, ..., page1_col0, page1_col1, ...]\n * Page-first ordering ensures first concurrent queries prioritizes the first page,\n * so visible rows get all their columns populated before later pages.\n *\n * Each query carries `dependsOnObjects` (the page's row instances) so that\n * editing any of those rows fans out to invalidate this function query, and\n * `dependsOn` from the locator so that linked-type edits also invalidate.\n */\nfunction buildQueryGrid(pagedObjects, functionColDefs) {\n const queries = [];\n for (const {\n objectSet: pagedObjectSet,\n objects: pageObjects\n } of pagedObjects) {\n for (const locator of functionColDefs) {\n queries.push({\n queryDefinition: locator.queryDefinition,\n options: {\n params: locator.getFunctionParams(pagedObjectSet),\n dedupeIntervalMs: locator.dedupeIntervalMs ?? DEFAULT_FUNCTION_COLUMN_DEDUPE_INTERVAL_MS,\n dependsOn: locator.dependsOn,\n dependsOnObjects: pageObjects\n }\n });\n }\n }\n return {\n queries,\n numColumns: functionColDefs.length\n };\n}\n\n/**\n * Merges paged results into one merged result per column.\n * Each column has results spread across pages — this combines their\n * functionsMaps so buildFunctionColumnData can look up any object by key.\n *\n * Relies on QueryGrid layout: results[i] belongs to column (i % numColumns).\n * i.e. the first N results are the first page of each column, the next N results are the second page, etc.\n */\nfunction mergePagedResults(results, numColumns) {\n if (numColumns === 0) return [];\n const merged = Array.from({\n length: numColumns\n }, () => ({\n isLoading: false,\n error: undefined,\n functionsMap: {}\n }));\n results.forEach((result, index) => {\n const columnIndex = index % numColumns;\n const entry = merged[columnIndex];\n if (result.isLoading) {\n entry.isLoading = true;\n }\n if (result.error) {\n entry.error = result.error;\n }\n const pageData = result.data;\n if (pageData) {\n Object.assign(entry.functionsMap, pageData);\n }\n });\n return merged;\n}\nfunction buildFunctionColumnData(results, functionColDefs, objects, disabled, prevColumnData) {\n const columnData = {};\n if (disabled || !objects) return columnData;\n results.forEach((result, index) => {\n const locator = functionColDefs[index];\n if (!locator) return;\n const columnId = String(locator.id);\n columnData[columnId] = {};\n objects.forEach(obj => {\n const key = String(obj.$primaryKey);\n const prevData = prevColumnData[columnId]?.[key]?.data;\n columnData[columnId][key] = createAsyncCellData(resolveCell(result, locator.getKey(obj), locator.getValue, prevData));\n });\n });\n return columnData;\n}\n\n/** Resolves the cell state: error, loaded, or loading with previous data. */\nfunction resolveCell(result, objectKey, getValue, prevData) {\n if (result.error) {\n return {\n isLoading: false,\n error: result.error\n };\n }\n if (objectKey in result.functionsMap) {\n const rawData = result.functionsMap[objectKey];\n return {\n isLoading: false,\n data: getValue ? getValue(rawData) : rawData\n };\n }\n // Key not in results. While the query is still loading, keep showing the\n // previous data so the cell doesn't flash empty during a refetch. Once the\n // query has resolved without an entry for this object, its value is gone —\n // clear the cell instead of retaining the stale previous value (otherwise a\n // cell whose derived value became null keeps displaying the old value).\n return {\n isLoading: result.isLoading,\n data: result.isLoading ? prevData : undefined\n };\n}\nconst useStableObjects = objects => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return useMemo(() => objects, [\n // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify((objects ?? []).map(item => ({\n $apiName: item.$apiName,\n $primaryKey: item.$primaryKey\n })).sort((a, b) => {\n if (a.$apiName !== b.$apiName) {\n return a.$apiName.localeCompare(b.$apiName);\n }\n return String(a.$primaryKey).localeCompare(String(b.$primaryKey));\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, useOsdkObjects } from \"@osdk/react\";\nimport { useMemo } from \"react\";\nimport { DEFAULT_OBJECT_TABLE_DEDUPE_INTERVAL_MS, DEFAULT_PAGE_SIZE } from \"../utils/constants.js\";\nimport { useFunctionColumnsData } from \"./useFunctionColumnsData.js\";\n/**\n * This hook is a wrapper that conditionally uses either useObjectSet or useOsdkObjects\n * based on whether an objectSet prop is provided.\n * It extracts RDP locators from columnDefinitions and applies withProperties\n * to return data containing the derived properties.\n */\nexport function useObjectTableData(objectOrInterfaceType, columnDefinitions, filter, sorting, objectSet, objectSetOptions, dedupeIntervalMs = DEFAULT_OBJECT_TABLE_DEDUPE_INTERVAL_MS, pageSize = DEFAULT_PAGE_SIZE, streamUpdates) {\n const orderBy = useMemo(() => {\n if (!sorting || sorting.length === 0) {\n return undefined;\n }\n return sorting.reduce((acc, sort) => {\n acc[sort.id] = sort.desc ? \"desc\" : \"asc\";\n return acc;\n }, {});\n }, [sorting]);\n\n // Extract derived properties definition\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 if (!rdpColumns.length) {\n return;\n }\n return rdpColumns.reduce((acc, cur) => {\n return {\n ...acc,\n [cur.id]: cur.creator\n };\n }, {});\n }, [columnDefinitions]);\n\n // Use the caller's objectSet whenever provided (object or interface types), else fetch\n // by type. For an interface objectSet, rows carry interface-declared props (+ withProperties)\n // only, not the full underlying object — see the objectSet prop docs.\n const shouldUseObjectSet = !!objectSet;\n const objectSetResult = useObjectSet(shouldUseObjectSet ? objectSet : undefined, {\n ...objectSetOptions,\n withProperties: withProperties,\n where: filter,\n orderBy,\n pageSize,\n enabled: shouldUseObjectSet,\n dedupeIntervalMs,\n streamUpdates\n });\n const osdkObjectsResult = useOsdkObjects(objectOrInterfaceType, {\n withProperties,\n pageSize,\n where: filter,\n orderBy,\n enabled: !shouldUseObjectSet,\n dedupeIntervalMs,\n streamUpdates\n });\n\n // Get the result from the appropriate hook\n const baseResult = shouldUseObjectSet ? objectSetResult : osdkObjectsResult;\n\n // Call useFunctionColumnsData to get function column data\n const functionColumnData = useFunctionColumnsData({\n objectOrInterfaceType,\n objects: baseResult.data,\n columnDefinitions,\n pageSize\n });\n\n // Merge function column data into each object\n const mergedData = useMemo(() => {\n if (!baseResult.data) return baseResult.data;\n return baseResult.data.map(obj => {\n const objKey = String(obj.$primaryKey);\n const functionData = {};\n\n // Collect all function column data for this object\n Object.entries(functionColumnData).forEach(([columnId, columnData]) => {\n if (columnData[objKey]) {\n functionData[columnId] = columnData[objKey];\n }\n });\n\n // Return object with function data merged in\n return {\n ...obj,\n ...functionData\n };\n });\n }, [baseResult.data, functionColumnData]);\n\n // Return the result with merged data\n return {\n ...baseResult,\n data: mergedData\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 { DEFAULT_MAX_CONCURRENT_REQUESTS } from \"./constants.js\";\n/**\n * Default value for `getSnapshot`'s `rowLimit`. When the object set's total\n * row count exceeds this value, {@link ObjectTableHandle.getSnapshot} rejects,\n * guarding against runaway loads over very large object sets.\n */\nexport const DEFAULT_SNAPSHOT_ROW_LIMIT = 10_000;\n\n/**\n * Builds a single {@link ObjectTableDataRow} for a loaded object. Property and\n * derived-property cells read straight off the object; function-backed cells\n * are looked up in the pre-resolved per-locator values map (whose values are\n * either the raw cell or, for failed pages, an `Error` instance).\n */\nexport function buildSnapshotRow(object, columnIds, functionLocators, functionColumnValues) {\n const cells = new Map();\n\n // Resolve function-backed cells first so a same-named property doesn't\n // overwrite them.\n for (const locator of functionLocators) {\n const columnId = String(locator.id);\n cells.set(columnId, functionColumnValues?.get(columnId)?.get(locator.getKey(object)));\n }\n const source = object;\n for (const columnId of columnIds) {\n if (cells.has(columnId)) continue;\n cells.set(columnId, source[columnId]);\n }\n return {\n id: String(object.$primaryKey),\n object,\n getValue: columnId => cells.get(columnId)\n };\n}\n\n/**\n * Executes a function-backed column for one page, applies `getValue`, and\n * returns a map keyed by `locator.getKey(obj)` so callers can merge values\n * back onto each row.\n *\n * On query failure, every object in the page maps to the thrown `Error`,\n * so the caller surfaces a per-cell error rather than dropping the column.\n */\nexport async function fetchFunctionColumnPage(executeFunction, locator, page) {\n const cellsByKey = new Map();\n try {\n const params = locator.getFunctionParams(page.objectSet);\n const rawResult = await executeFunction(params);\n for (const obj of page.objects) {\n const objectKey = locator.getKey(obj);\n const rawCell = rawResult?.[objectKey];\n cellsByKey.set(objectKey, locator.getValue ? locator.getValue(rawCell) : rawCell);\n }\n } catch (cause) {\n const error = cause instanceof Error ? cause : new Error(String(cause));\n for (const obj of page.objects) {\n cellsByKey.set(locator.getKey(obj), error);\n }\n }\n return cellsByKey;\n}\n\n/**\n * Resolves async column values for all loaded rows by paginating each function\n * locator across the rows. Returns the per-locator map of `getKey(obj)` →\n * cell value (already `getValue`-unwrapped, or an `Error` for failed pages).\n *\n * Each (locator, page) pair is one function call. They run concurrently but no\n * more than `maxConcurrent` are in flight at once, so a wide table over many\n * pages doesn't fire hundreds of requests at the server simultaneously. This\n * mirrors the live function-column path (`useFunctionColumnsData`), which caps\n * concurrency the same way via `useOsdkFunctions`.\n */\nexport async function fetchFunctionColumnValues(locators, pages, executeFunction, maxConcurrent = DEFAULT_MAX_CONCURRENT_REQUESTS) {\n const valuesByColumnId = new Map();\n for (const locator of locators) {\n valuesByColumnId.set(String(locator.id), new Map());\n }\n\n // Flatten to one task per (locator, page) so concurrency is bounded across\n // every request, not just within a single locator.\n const tasks = locators.flatMap(locator => pages.map(page => ({\n columnId: String(locator.id),\n locator,\n page\n })));\n\n // One entry per task (same index as `tasks`). Each entry is a\n // `Map<objectKey, cellValue>` for that (locator, page) pair, where\n // `objectKey` is `locator.getKey(obj)` and `cellValue` is the unwrapped\n // result — or an `Error` if the page's function call threw.\n const pageMaps = await mapWithConcurrency(tasks, maxConcurrent, task => fetchFunctionColumnPage(params => executeFunction(task.locator.queryDefinition, params), task.locator, task.page));\n pageMaps.forEach((pageMap, index) => {\n const merged = valuesByColumnId.get(tasks[index].columnId);\n if (merged == null) return;\n for (const [key, value] of pageMap) {\n merged.set(key, value);\n }\n });\n return valuesByColumnId;\n}\n\n/**\n * Runs `execute` over `tasks` with at most `maxConcurrent` invocations in flight at a\n * time, preserving input order in the returned results. A small fixed pool of\n * workers pulls from a shared cursor until the tasks are exhausted.\n */\nasync function mapWithConcurrency(tasks, maxConcurrent, execute) {\n // Pre-sized so workers write at their claimed index so input order is preserved.\n const results = new Array(tasks.length);\n\n // Cap pool at maxConcurrent, but never more workers than tasks (and at least 1).\n const poolSize = Math.max(1, Math.min(maxConcurrent, tasks.length));\n let pointer = 0;\n const runExecute = async () => {\n while (pointer < tasks.length) {\n const index = pointer;\n pointer++;\n results[index] = await execute(tasks[index], index);\n }\n };\n\n /**\n * Let's say we have maxConcurrent = 2, and 3 tasks\n * Pool = [_, _], each pool calls runExecute\n * Within each runExecute, there's a loop synchronously execute tasks.\n *\n * So at the beginning, we will have at most 2 concurrent requests, one execute in each pool.\n * The first execute to finish would enter the next loop, and start the next task.\n * The second execute will finish and find that pointer >= tasks.length and exit.\n */\n await Promise.all(Array.from({\n length: poolSize\n }, runExecute));\n return results;\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 { useOsdkClient } from \"@osdk/react\";\nimport { useCallback, useMemo } from \"react\";\nimport { DEFAULT_PAGE_SIZE, SELECTION_COLUMN_ID } from \"../utils/constants.js\";\nimport { buildPagedObjectSets, extractFunctionLocators } from \"../utils/functionColumns.js\";\nimport { buildSnapshotRow, DEFAULT_SNAPSHOT_ROW_LIMIT, fetchFunctionColumnValues } from \"../utils/objectTableSnapshot.js\";\n/**\n * Builds the {@link ObjectTableHandle} exposed via `ObjectTable`'s `tableRef`.\n *\n * `getSnapshot` reads the table's currently visible columns to decide what to\n * export, rejects up front when the set's `totalCount` exceeds `rowLimit`,\n * otherwise paginates the entire resolved object set, and resolves\n * function-backed column values for the loaded rows.\n */\nexport function useObjectTableSnapshot({\n objectOrInterfaceType,\n table,\n columnDefinitions,\n objectSet,\n pageSize = DEFAULT_PAGE_SIZE,\n totalCount,\n orderBy\n}) {\n const client = useOsdkClient();\n const functionLocators = useMemo(() => extractFunctionLocators(columnDefinitions), [columnDefinitions]);\n const customColumnIds = useMemo(() => new Set(columnDefinitions?.filter(definition => definition.locator.type === \"custom\").map(definition => String(definition.locator.id)) ?? []), [columnDefinitions]);\n const getSnapshot = useCallback(async options => {\n const rowLimit = options?.rowLimit ?? DEFAULT_SNAPSHOT_ROW_LIMIT;\n const rowLimitExceededError = `Error in getSnapshot: total row count exceeds row limit of ${rowLimit}.`;\n\n // Fail fast when the caller's row cap is smaller than the matching set.\n // `totalCount` is only available once the list payload has resolved; we\n // skip the check otherwise rather than guess.\n if (totalCount != null) {\n const total = Number(totalCount);\n if (Number.isFinite(total) && total > rowLimit) {\n return Promise.reject(rowLimitExceededError);\n }\n }\n const columns = table.getVisibleLeafColumns().filter(column => column.id !== SELECTION_COLUMN_ID && !customColumnIds.has(column.id)).map(column => {\n const meta = column.columnDef.meta;\n const header = column.columnDef.header;\n const name = typeof header === \"string\" ? header : meta?.columnName ?? column.id;\n return {\n id: column.id,\n name\n };\n });\n const columnIds = columns.map(column => column.id);\n const columnIdsSet = new Set(columnIds);\n const loadedObjects = [];\n if (objectSet != null && columnIds.length > 0 && rowLimit > 0) {\n for await (const object of objectSet.asyncIter({\n $orderBy: orderBy\n })) {\n loadedObjects.push(object);\n // Bound the in-memory load even when `totalCount` was unavailable for\n // the fail-fast check above: once we've pulled more rows than the\n // caller allows, stop and reject rather than draining the whole set.\n if (loadedObjects.length > rowLimit) {\n return Promise.reject(rowLimitExceededError);\n }\n }\n }\n const visibleFunctionLocators = functionLocators.filter(locator => columnIdsSet.has(String(locator.id)));\n let functionColumnValues;\n if (visibleFunctionLocators.length > 0 && loadedObjects.length > 0) {\n const pages = buildPagedObjectSets(client, objectOrInterfaceType, loadedObjects, pageSize);\n if (pages.length > 0) {\n functionColumnValues = await fetchFunctionColumnValues(visibleFunctionLocators, pages, (queryDefinition, params) => client(queryDefinition).executeFunction(params));\n }\n }\n const rows = loadedObjects.map(object => buildSnapshotRow(object, columnIds, visibleFunctionLocators, functionColumnValues));\n return {\n columns,\n rows,\n totalCount\n };\n }, [table, objectSet, objectOrInterfaceType, functionLocators, customColumnIds, client, pageSize, totalCount, orderBy]);\n return useMemo(() => ({\n getSnapshot\n }), [getSnapshot]);\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, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useEventCallback } from \"../../shared/hooks/useEventCallback.js\";\nimport { getRowId, getRowIdFromPrimaryKey } from \"../utils/getRowId.js\";\n\n/**\n * Payload delivered by {@link UseRowSelectionProps.onRowSelectionChanged}.\n * Mirrors the OSDK-level `RowSelectionChange` but without the `objectSet`\n * field, which requires OSDK context and is composed in `ObjectTable`.\n */\n\nexport function useRowSelection({\n selectionMode = \"none\",\n selectedRows,\n isAllSelected: isAllSelectedProp,\n // eslint-disable-next-line @typescript-eslint/no-deprecated -- intentional pass-through to fire alongside onRowSelectionChanged for backwards compatibility\n onRowSelection,\n onRowSelectionChanged,\n data\n}) {\n const [internalRowSelection, setInternalRowSelection] = useState({});\n\n // When true, newly fetched rows are auto-selected (uncontrolled mode only).\n const [internalIsAllSelected, setInternalIsAllSelected] = useState(false);\n const [lastSelectedRowIndex, setLastSelectedRowIndex] = useState(null);\n const isControlled = selectedRows !== undefined;\n const enableRowSelection = selectionMode !== \"none\";\n const rowSelectionState = useMemo(() => {\n if (!enableRowSelection) return {};\n if (isControlled) {\n const selectedRowIds = isAllSelectedProp ? (data ?? []).map(item => item.$primaryKey) : selectedRows;\n return getRowSelectionState(selectedRowIds);\n }\n if (internalIsAllSelected) {\n return getRowSelectionState((data ?? []).map(item => item.$primaryKey));\n }\n return internalRowSelection;\n }, [enableRowSelection, isControlled, selectedRows, isAllSelectedProp, internalIsAllSelected, internalRowSelection, data]);\n const selectedCount = useMemo(() => Object.values(rowSelectionState).filter(Boolean).length, [rowSelectionState]);\n const totalCount = data?.length ?? 0;\n const isAllSelected = deriveIsAllSelected(isControlled, isAllSelectedProp, internalIsAllSelected, selectedCount, totalCount);\n const hasSelection = isAllSelected || selectedCount > 0;\n\n // Dedupes refires when \"select all\" is active and data grows.\n const lastFiredAllSelectedIdsRef = useRef(null);\n const fireSelectionCallbacks = useEventCallback((ids, isSelectAll) => {\n onRowSelection?.(ids, isSelectAll);\n if (onRowSelectionChanged) {\n const currentData = data ?? [];\n const selectedKeySet = new Set(ids.map(id => String(id)));\n const instances = currentData.filter(item => selectedKeySet.has(String(item.$primaryKey)));\n onRowSelectionChanged({\n selectedRows: instances,\n isSelectAll\n });\n }\n });\n const onToggleAll = useCallback(() => {\n if (!enableRowSelection || !data) return;\n\n // Any existing selection (full or partial/indeterminate) clears on click;\n // only an empty selection promotes to \"select all\".\n const newIsAllSelected = !hasSelection;\n const newSelectedRows = newIsAllSelected ? data.map(item => item.$primaryKey) : [];\n if (!isControlled) {\n setInternalIsAllSelected(newIsAllSelected);\n setInternalRowSelection(getRowSelectionState(newSelectedRows));\n }\n lastFiredAllSelectedIdsRef.current = newIsAllSelected ? JSON.stringify(newSelectedRows) : null;\n fireSelectionCallbacks(newSelectedRows, newIsAllSelected);\n }, [enableRowSelection, data, hasSelection, isControlled, fireSelectionCallbacks]);\n const onToggleRow = useCallback((rowId, rowIndex, isShiftClick = false) => {\n if (!enableRowSelection || !data) return;\n let newSelectedRows;\n if (selectionMode === \"single\") {\n newSelectedRows = getSingleSelectionRows({\n rowId,\n rowIndex,\n data,\n rowSelectionState\n });\n } else {\n if (isShiftClick && lastSelectedRowIndex != null) {\n newSelectedRows = getRangeSelectionRows({\n rowId,\n rowIndex,\n data,\n lastSelectedRowIndex,\n rowSelectionState\n });\n setLastSelectedRowIndex(rowIndex);\n } else {\n newSelectedRows = getMultipleSelectionRows({\n rowId,\n rowIndex,\n data,\n rowSelectionState\n });\n if (!isCurrentlySelected({\n rowIndex,\n data,\n rowSelectionState\n })) {\n setLastSelectedRowIndex(rowIndex);\n }\n }\n }\n if (!isControlled) {\n setInternalIsAllSelected(false);\n setInternalRowSelection(getRowSelectionState(newSelectedRows));\n }\n lastFiredAllSelectedIdsRef.current = null;\n fireSelectionCallbacks(newSelectedRows, false);\n }, [enableRowSelection, data, selectionMode, isControlled, fireSelectionCallbacks, rowSelectionState, lastSelectedRowIndex]);\n\n // Refire callbacks when uncontrolled \"select all\" is active and new rows arrive.\n useEffect(function syncSelectAllOnDataChange() {\n if (isControlled || !internalIsAllSelected || !data) {\n if (!internalIsAllSelected) {\n lastFiredAllSelectedIdsRef.current = null;\n }\n return;\n }\n const ids = data.map(item => item.$primaryKey);\n const serializedIds = JSON.stringify(ids);\n if (lastFiredAllSelectedIdsRef.current === serializedIds) return;\n lastFiredAllSelectedIdsRef.current = serializedIds;\n fireSelectionCallbacks(ids, true);\n }, [isControlled, internalIsAllSelected, data, fireSelectionCallbacks]);\n return {\n rowSelection: rowSelectionState,\n isAllSelected,\n enableRowSelection,\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 return rowSelectionState[rowId] ? [] : [primaryKey];\n}\nfunction getRangeSelectionRows({\n lastSelectedRowIndex,\n rowIndex,\n data,\n rowSelectionState\n}) {\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 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 isCurrentlySelected({\n rowIndex,\n data,\n rowSelectionState\n}) {\n const primaryKey = data[rowIndex].$primaryKey;\n const currentlySelected = getSelectedPrimaryKeys(rowSelectionState, data);\n return currentlySelected.includes(primaryKey);\n}\nfunction getMultipleSelectionRows({\n rowIndex,\n data,\n rowSelectionState\n}) {\n const primaryKey = data[rowIndex].$primaryKey;\n const currentlySelected = getSelectedPrimaryKeys(rowSelectionState, data);\n return isCurrentlySelected({\n rowIndex,\n data,\n rowSelectionState\n }) ? currentlySelected.filter(i => i !== primaryKey) : [...currentlySelected, primaryKey];\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}\nfunction deriveIsAllSelected(isControlled, isAllSelectedProp, internalIsAllSelected, selectedCount, totalCount) {\n if (isControlled && isAllSelectedProp !== undefined) return isAllSelectedProp;\n if (!isControlled && internalIsAllSelected) return true;\n return totalCount > 0 && selectedCount === totalCount;\n}\nfunction getRowSelectionState(primaryKeys) {\n return primaryKeys.reduce((acc, primaryKey) => {\n acc[getRowIdFromPrimaryKey(primaryKey)] = true;\n return acc;\n }, {});\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\nimport React, { useCallback } from \"react\";\nimport { Checkbox } from \"../base-components/checkbox/Checkbox.js\";\nexport function SelectionHeaderCell({\n isAllSelected,\n hasSelection,\n onToggleAll\n}) {\n const checkboxLabel = hasSelection ? \"Deselect all rows\" : \"Select all rows\";\n return /*#__PURE__*/React.createElement(Checkbox, {\n indeterminate: hasSelection && !isAllSelected,\n checked: isAllSelected,\n onCheckedChange: onToggleAll,\n \"aria-label\": checkboxLabel\n });\n}\nexport function SelectionCell({\n row,\n onToggleRow\n}) {\n const handleClick = useCallback(event => {\n // TODO: Create ActionBoundary component\n event.stopPropagation();\n const isShiftClick = event.shiftKey;\n onToggleRow(row.id, row.index, isShiftClick);\n }, [onToggleRow, row.id, row.index]);\n const handleKeyDown = useCallback(event => {\n // TODO: support shift + space\n // It looks like when we handle shift key here, the checkbox gets toggled twice\n if (event.key === \"Enter\") {\n const isShiftClick = event.shiftKey;\n onToggleRow(row.id, row.index, isShiftClick);\n }\n }, [onToggleRow, row.id, row.index]);\n return /*#__PURE__*/React.createElement(\"div\", {\n onClick: handleClick,\n onKeyDown: handleKeyDown\n }, /*#__PURE__*/React.createElement(Checkbox, {\n checked: row.getIsSelected(),\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, useRef } from \"react\";\nimport { SelectionCell, SelectionHeaderCell } from \"../SelectionCells.js\";\nimport { SELECTION_COLUMN_ID, SELECTION_COLUMN_WIDTH } from \"../utils/constants.js\";\nexport const useSelectionColumn = ({\n selectionMode,\n isAllSelected,\n hasSelection,\n onToggleAll,\n onToggleRow\n}) => {\n // TODO: Replace with useLatestRef\n const isAllSelectedRef = useRef(isAllSelected);\n isAllSelectedRef.current = isAllSelected;\n const hasSelectionRef = useRef(hasSelection);\n hasSelectionRef.current = hasSelection;\n const onToggleAllRef = useRef(onToggleAll);\n onToggleAllRef.current = onToggleAll;\n const onToggleRowRef = useRef(onToggleRow);\n onToggleRowRef.current = onToggleRow;\n const selectionColumn = useMemo(() => {\n if (selectionMode === \"none\") return null;\n const colDef = {\n id: SELECTION_COLUMN_ID,\n header: () => selectionMode === \"multiple\" ? /*#__PURE__*/React.createElement(SelectionHeaderCell, {\n isAllSelected: isAllSelectedRef.current,\n hasSelection: hasSelectionRef.current,\n onToggleAll: onToggleAllRef.current\n }) : null,\n cell: ({\n row\n }) => /*#__PURE__*/React.createElement(SelectionCell, {\n row: row,\n onToggleRow: onToggleRowRef.current\n }),\n size: SELECTION_COLUMN_WIDTH,\n minSize: SELECTION_COLUMN_WIDTH,\n maxSize: SELECTION_COLUMN_WIDTH,\n enableSorting: false,\n enableResizing: false,\n enablePinning: false\n };\n return colDef;\n }, [selectionMode]);\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 { useCallback, useMemo, useState } from \"react\";\nexport const useTableSorting = ({\n orderBy,\n defaultOrderBy,\n onOrderByChanged\n}) => {\n // The sorting state in uncontrolled mode\n const [internalSorting, setInternalSorting] = useState(() => defaultOrderBy ? convertOrderByToSortingState(defaultOrderBy) : []);\n const isControlled = orderBy !== undefined;\n\n // Sorting state\n // If controlled mode, return the state from orderBy prop\n // If uncontrolled, return the internalSorting state\n const sortingState = useMemo(() => orderBy ? convertOrderByToSortingState(orderBy) : internalSorting, [orderBy, internalSorting]);\n const orderByState = useMemo(() => {\n const currentOrderBy = orderBy ? orderBy : convertSortingStateToOrderBy(internalSorting);\n return Object.fromEntries(currentOrderBy.map(({\n property,\n direction\n }) => [property, direction]));\n }, [orderBy, internalSorting]);\n const onSortingChange = useCallback(updater => {\n const newSorting = typeof updater === \"function\" ? updater(sortingState) : updater;\n\n // Update internal state if uncontrolled\n if (!isControlled) {\n setInternalSorting(newSorting);\n }\n if (onOrderByChanged) {\n const newOrderBy = convertSortingStateToOrderBy(newSorting);\n onOrderByChanged(newOrderBy);\n }\n }, [isControlled, sortingState, onOrderByChanged]);\n return {\n sorting: sortingState,\n orderByState,\n onSortingChange\n };\n};\nfunction convertOrderByToSortingState(orderBy) {\n return orderBy.map(({\n property,\n direction\n }) => ({\n id: property,\n desc: direction === \"desc\"\n }));\n}\nfunction convertSortingStateToOrderBy(sorting) {\n return sorting.map(({\n id,\n desc\n }) => ({\n property: id,\n direction: desc ? \"desc\" : \"asc\"\n }));\n}","/*\n * Copyright 2026 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\";\nimport { useEventCallback } from \"../../shared/hooks/useEventCallback.js\";\nexport function useFocusedRow({\n focusedRowId,\n onFocusedRowChanged,\n getRowById\n}) {\n // Explicit check for undefined instead of != null\n // because null is a valid value to clear a focused row\n const isControlled = focusedRowId !== undefined;\n const [internalFocusedRowId, setInternalFocusedRowId] = useState(null);\n const effectiveId = isControlled ? focusedRowId ?? null : internalFocusedRowId;\n const fireChanged = useEventCallback(id => {\n const row = id != null ? getRowById(id) : null;\n onFocusedRowChanged?.(row);\n });\n const setFocusedRowId = useCallback(id => {\n if (effectiveId === id) return;\n if (!isControlled) {\n setInternalFocusedRowId(id);\n }\n fireChanged(id);\n }, [effectiveId, isControlled, fireChanged]);\n return {\n focusedRowId: effectiveId,\n setFocusedRowId,\n isControlled\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 width: max-content;\n min-width: 100%;\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 — keyed off data index, not DOM position, because rows are virtualized */\n &[data-row-parity=\"odd\"] {\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: 3;\n background-color: var(--osdk-table-row-bg-hover);\n border-top: var(--osdk-table-border-width) solid var(--osdk-table-row-border-color-hover);\n border-bottom: var(--osdk-table-border-width) solid var(--osdk-table-row-border-color-hover);\n }\n\n &[data-selected=\"true\"],\n &[data-focused=\"true\"] {\n z-index: 2;\n background-color: var(--osdk-table-row-bg-active);\n border-top: var(--osdk-table-border-width) solid var(--osdk-table-row-border-color-active);\n border-bottom: var(--osdk-table-border-width) solid 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 from \"react\";\nimport { LoadingCell } from \"./LoadingCell.js\";\nimport rowStyles from \"./TableRow.module.css\";\nimport { DEFAULT_COLUMN_WIDTH, DEFAULT_ROW_HEIGHT } from \"./utils/constants.js\";\nexport function LoadingRow({\n headers,\n columnCount,\n translateY,\n rowHeight = DEFAULT_ROW_HEIGHT,\n columnWidth = DEFAULT_COLUMN_WIDTH\n}) {\n return /*#__PURE__*/React.createElement(\"tr\", {\n className: rowStyles.osdkTableRow,\n style: {\n height: `${rowHeight}px`,\n transform: `translateY(${translateY}px)`\n }\n }, /*#__PURE__*/React.createElement(React.Fragment, null, Array.from({\n length: columnCount\n }).map((_, index) => {\n const width = headers.length > index ? headers[index].getSize() : columnWidth;\n return /*#__PURE__*/React.createElement(LoadingCell, {\n key: `loading-cell-${index}`,\n width: width\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.osdkTableBody {\n display: grid;\n position: relative;\n width: max-content;\n min-width: 100%;\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.draggableListContainer {\n display: flex;\n flex-direction: column;\n gap: var(--osdk-draggable-item-gap);\n overflow-y: auto;\n}\n\n.draggableItem {\n display: flex;\n align-items: center;\n gap: var(--osdk-draggable-item-gap);\n padding: var(--osdk-draggable-item-padding);\n background-color: var(--osdk-draggable-item-bg);\n border: var(--osdk-draggable-item-border);\n border-radius: var(--osdk-draggable-item-border-radius);\n width: 100%;\n touch-action: none;\n user-select: none;\n}\n\n.draggableItem[data-dragging=\"true\"] {\n opacity: 0.5;\n}\n\n.dragHandle {\n display: flex;\n cursor: var(--osdk-drag-handle-cursor);\n color: var(--osdk-draggable-item-drag-icon-color);\n\n &:hover {\n color: var(--osdk-draggable-item-drag-icon-color-hover);\n }\n\n &:active {\n cursor: var(--osdk-drag-handle-cursor-active);\n }\n\n &:focus-visible {\n outline: var(--osdk-focus-outline);\n outline-offset: var(--osdk-focus-visible-outline-offset);\n }\n}\n\n.itemContent {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--osdk-typography-color-default-rest);\n}\n\n.removeButton {\n background: none;\n border: none;\n padding: var(--osdk-surface-spacing);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--osdk-draggable-item-drag-icon-color);\n border-radius: var(--osdk-surface-border-radius);\n\n &:hover {\n color: var(--osdk-typography-color-danger-rest);\n }\n\n &:active {\n color: var(--osdk-typography-color-danger-rest);\n background: oklch(\n from var(--osdk-surface-background-color-danger-hover) l c h / 0.2\n );\n }\n\n &:focus-visible {\n outline: var(--osdk-focus-outline);\n outline-offset: var(--osdk-focus-visible-outline-offset);\n }\n}\n\n.emptyState {\n padding: calc(var(--osdk-surface-spacing) * 5);\n text-align: center;\n color: var(--osdk-typography-color-muted);\n font-style: italic;\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 { Button } from \"@base-ui/react/button\";\nimport { DragHandleVertical, SmallCross, Trash } from \"@blueprintjs/icons\";\nimport { closestCenter, DndContext as BaseDndContext, KeyboardSensor, PointerSensor, useSensor, useSensors } from \"@dnd-kit/core\";\nimport { SortableContext, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy } from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport classNames from \"classnames\";\nimport React, { useCallback, useEffect, useMemo, useRef } from \"react\";\nimport styles from \"./DraggableList.module.css\";\nfunction DraggableListItem({\n item,\n onRemove,\n removeIconVariant = \"trash\",\n renderContent\n}) {\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isDragging\n } = useSortable({\n id: item.id\n });\n const style = {\n transform: CSS.Transform.toString(transform),\n transition\n };\n const handleRemove = useCallback(() => {\n onRemove?.(item.id);\n }, [item.id, onRemove]);\n const RemoveIcon = removeIconVariant === \"trash\" ? Trash : SmallCross;\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: setNodeRef,\n style: style,\n className: styles.draggableItem,\n \"data-dragging\": isDragging\n }, /*#__PURE__*/React.createElement(\"div\", _extends({\n className: styles.dragHandle,\n \"aria-label\": `Reorder ${item.label}`\n }, attributes, listeners), /*#__PURE__*/React.createElement(DragHandleVertical, {\n className: styles.icon\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: styles.itemContent\n }, renderContent ? renderContent(item) : item.label), onRemove && /*#__PURE__*/React.createElement(Button, {\n className: styles.removeButton,\n onClick: handleRemove,\n \"aria-label\": `Remove ${item.label}`\n }, /*#__PURE__*/React.createElement(RemoveIcon, {\n className: styles.icon\n })));\n}\nexport function DraggableList({\n items,\n onReorder,\n onRemove,\n removeIconVariant = \"cross\",\n renderContent,\n emptyMessage,\n className\n}) {\n const itemIds = useMemo(() => items.map(item => item.id), [items]);\n const sensors = useSensors(useSensor(PointerSensor, {\n activationConstraint: {\n distance: 5\n }\n }), useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates\n }));\n const handleDragEnd = useCallback(event => {\n const {\n active,\n over\n } = event;\n if (over && active.id !== over.id) {\n const oldIndex = items.findIndex(item => item.id === active.id);\n const newIndex = items.findIndex(item => item.id === over.id);\n onReorder(oldIndex, newIndex);\n }\n }, [items, onReorder]);\n const containerRef = useRef(null);\n useKeyboardEvents(containerRef);\n\n // TODO: Revert when @types/react is fixed\n const DndContext = BaseDndContext;\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: containerRef,\n className: classNames(styles.draggableListContainer, className)\n }, /*#__PURE__*/React.createElement(DndContext, {\n sensors: sensors,\n collisionDetection: closestCenter,\n onDragEnd: handleDragEnd\n }, /*#__PURE__*/React.createElement(SortableContext, {\n items: itemIds,\n strategy: verticalListSortingStrategy\n }, items.map(item => /*#__PURE__*/React.createElement(DraggableListItem, {\n key: item.id,\n item: item,\n onRemove: onRemove,\n removeIconVariant: removeIconVariant,\n renderContent: renderContent\n })))), items.length === 0 && emptyMessage && /*#__PURE__*/React.createElement(\"div\", {\n className: styles.emptyState\n }, emptyMessage));\n}\nconst useKeyboardEvents = containerRef => {\n // Base UI's DialogPopup calls stopPropagation on arrow key events, which\n // prevents them from reaching @dnd-kit's document-level KeyboardSensor\n // listener. We use a native capture-phase listener to intercept arrow keys\n // before the dialog can swallow them, and re-dispatch them on the document\n // so @dnd-kit can process keyboard-driven reordering.\n useEffect(() => {\n const el = containerRef.current;\n if (el == null) {\n return;\n }\n const ARROW_KEYS = new Set([\"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\"]);\n function handleCapture(event) {\n if (!ARROW_KEYS.has(event.key)) {\n return;\n }\n\n // Only intercept when a drag is active (an item has [data-dragging=\"true\"])\n if (el.querySelector(\"[data-dragging=\\\"true\\\"]\") == null) {\n return;\n }\n event.stopPropagation();\n document.dispatchEvent(new KeyboardEvent(\"keydown\", {\n key: event.key,\n code: event.code,\n bubbles: true\n }));\n }\n el.addEventListener(\"keydown\", handleCapture, true);\n return () => el.removeEventListener(\"keydown\", handleCapture, true);\n }, [containerRef]);\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.title {\n display: flex;\n align-items: center;\n gap: var(--osdk-surface-spacing);\n}\n\n/* Override dialog styling */\n.columnConfigDialog {\n --osdk-dialog-min-width: var(--osdk-table-column-config-dialog-min-width);\n --osdk-dialog-min-height: var(--osdk-table-column-config-dialog-min-height);\n --osdk-dialog-body-padding: 0;\n}\n\n.dialogLayout {\n display: flex;\n flex-direction: row;\n gap: 0;\n flex: 1;\n min-height: 0;\n overflow: hidden;\n}\n\n.visibleColumnsContainer {\n flex: 1.5;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: calc(var(--osdk-surface-spacing) * 5);\n background: var(--osdk-table-column-config-visible-columns-bg);\n border-right: 1px solid var(--osdk-surface-border-color-default);\n}\n\n.availableColumnsContainer {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: calc(var(--osdk-surface-spacing) * 5)\n calc(var(--osdk-surface-spacing) * 3);\n}\n\n.sectionHeader {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: calc(var(--osdk-surface-spacing) * 5);\n}\n\n.sectionTitle {\n display: flex;\n justify-content: flex-start;\n align-items: flex-start;\n font-size: var(--osdk-typography-size-body-medium);\n font-weight: var(--osdk-typography-weight-bold);\n color: var(--osdk-typography-color-muted);\n flex-shrink: 0;\n gap: var(--osdk-surface-spacing);\n}\n\n.countTag {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background: var(--osdk-custom-color-gray-3);\n padding: calc(var(--osdk-surface-spacing) / 2)\n calc(var(--osdk-surface-spacing) * 1.5);\n border-radius: var(--osdk-surface-border-radius);\n font-size: var(--osdk-typography-size-body-small);\n font-weight: var(--osdk-typography-weight-default);\n color: var(--osdk-typography-color-default-rest);\n}\n\n.sectionHint {\n font-size: var(--osdk-typography-size-body-small);\n color: var(--osdk-typography-color-muted);\n}\n\n.columnList {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n}\n\n.searchContainer {\n margin-bottom: calc(var(--osdk-surface-spacing) * 2);\n flex-shrink: 0;\n}\n\n.propertiesList {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.categoryHeader {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: calc(var(--osdk-surface-spacing) * 2)\n calc(var(--osdk-surface-spacing) * 3);\n background: none;\n border: none;\n margin: 0;\n gap: calc(var(--osdk-surface-spacing) * 3);\n flex-shrink: 0;\n}\n\n.categoryTrigger {\n display: flex;\n align-items: center;\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n\n &:focus-visible {\n outline: var(--osdk-focus-outline);\n outline-offset: var(--osdk-focus-visible-outline-offset);\n }\n}\n\n.categoryTitle {\n flex: 1;\n color: var(--osdk-typography-color-muted);\n font-size: var(--osdk-typography-size-body-small);\n font-weight: var(--osdk-typography-weight-bold);\n text-align: left;\n}\n\n.categoryCount {\n color: var(--osdk-typography-color-muted);\n font-size: var(--osdk-typography-size-body-small);\n margin-left: var(--osdk-surface-spacing);\n}\n\n.caretIcon {\n color: var(--osdk-typography-color-muted);\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.categoryTrigger[data-panel-open] .caretIcon {\n transform: rotate(180deg);\n}\n\n.checkbox {\n flex-shrink: 0;\n}\n\n.propertyList {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n}\n\n.propertyItem {\n display: flex;\n align-items: center;\n flex-direction: row;\n width: 100%;\n gap: calc(var(--osdk-surface-spacing) * 3);\n padding: calc(var(--osdk-surface-spacing) * 2)\n calc(var(--osdk-surface-spacing) * 3);\n background: none;\n border: none;\n cursor: pointer;\n text-align: left;\n border-radius: var(--osdk-surface-border-radius);\n\n &:hover {\n background-color: var(--osdk-surface-background-color-default-hover);\n }\n}\n\n.checkboxIndicator {\n color: var(--osdk-intent-primary-foreground);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.selectAllLabel {\n display: flex;\n align-items: center;\n gap: calc(var(--osdk-surface-spacing) * 3);\n cursor: pointer;\n color: var(--osdk-typography-color-muted);\n font-size: var(--osdk-typography-size-body-small);\n font-weight: var(--osdk-typography-weight-bold);\n}\n\n.propertyLabel {\n display: flex;\n align-items: center;\n gap: calc(var(--osdk-surface-spacing) * 3);\n cursor: pointer;\n flex: 1;\n min-width: 0;\n}\n\n.propertyName {\n text-align: left;\n flex: 1;\n font-size: var(--osdk-typography-size-body-medium);\n font-weight: 400;\n color: var(--osdk-typography-color-default-rest);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.infoIcon {\n color: var(--osdk-typography-color-muted);\n flex-shrink: 0;\n width: calc(var(--osdk-checkbox-icon-size) * 0.75);\n height: calc(var(--osdk-checkbox-icon-size) * 0.75);\n}\n\n.emptyState {\n padding: calc(var(--osdk-surface-spacing) * 5);\n text-align: center;\n color: var(--osdk-typography-color-muted);\n font-style: italic;\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 { Collapsible } from \"@base-ui/react/collapsible\";\nimport { CaretDown, Cog, SmallInfoSign } from \"@blueprintjs/icons\";\nimport { arrayMove } from \"@dnd-kit/sortable\";\nimport classNames from \"classnames\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { ActionButton } from \"../base-components/action-button/ActionButton.js\";\nimport { Checkbox } from \"../base-components/checkbox/Checkbox.js\";\nimport { Dialog } from \"../base-components/dialog/Dialog.js\";\nimport { DraggableList } from \"../base-components/draggable-list/DraggableList.js\";\nimport { SearchBar } from \"../base-components/search-bar/SearchBar.js\";\nimport styles from \"./ColumnConfigDialog.module.css\";\nexport function ColumnConfigDialog({\n isOpen,\n onClose,\n columnOptions,\n currentVisibility,\n currentColumnOrder,\n onApply,\n isValidConfig\n}) {\n const [visibleColumns, setVisibleColumns] = useState([]);\n const [searchQuery, setSearchQuery] = useState(\"\");\n const allColumns = useMemo(() => {\n return columnOptions.map(opt => {\n const isVisible = currentVisibility ? currentVisibility[opt.id] : false;\n return {\n id: opt.id,\n label: opt.name,\n isVisible\n };\n });\n }, [columnOptions, currentVisibility]);\n\n // Sync local state with prop when dialog is opened\n useEffect(() => {\n if (isOpen) {\n const visibleCols = allColumns.filter(col => col.isVisible);\n\n // Sort by current column order if available\n if (!!currentColumnOrder?.length) {\n visibleCols.sort((a, b) => {\n const indexA = currentColumnOrder.indexOf(a.id);\n const indexB = currentColumnOrder.indexOf(b.id);\n // If not in order array, put at end\n const orderA = indexA === -1 ? Infinity : indexA;\n const orderB = indexB === -1 ? Infinity : indexB;\n return orderA - orderB;\n });\n }\n setVisibleColumns(visibleCols);\n setSearchQuery(\"\");\n }\n }, [isOpen, allColumns, currentColumnOrder]);\n const handleApply = useCallback(() => {\n onApply(getColumnConfig(allColumns, visibleColumns));\n onClose();\n }, [allColumns, visibleColumns, onApply, onClose]);\n\n // If no condition provided, default to valid\n const isValid = isValidConfig ? isValidConfig(getColumnConfig(allColumns, visibleColumns)) : true;\n const isApplyDisabled = visibleColumns.length === 0 || !isValid;\n const handleReorderColumns = useCallback((fromIndex, toIndex) => {\n setVisibleColumns(items => arrayMove(items, fromIndex, toIndex));\n }, []);\n const handleRemoveColumn = useCallback(columnId => {\n setVisibleColumns(prev => prev.filter(col => col.id !== columnId));\n }, []);\n const handleToggleColumn = useCallback(column => {\n setVisibleColumns(prev => {\n const isCurrentlyVisible = prev.some(col => col.id === column.id);\n if (isCurrentlyVisible) {\n return prev.filter(col => col.id !== column.id);\n } else {\n return [...prev, column];\n }\n });\n }, []);\n const handleSearchChange = useCallback(event => {\n setSearchQuery(event.target.value);\n }, []);\n const handleSelectAll = useCallback(columns => {\n setVisibleColumns(prev => {\n const allSelected = columns.every(col => prev.some(v => v.id === col.id));\n if (allSelected) {\n // Deselect all filtered columns\n return prev.filter(v => !columns.some(col => col.id === v.id));\n } else {\n // Select all filtered columns that aren't already selected\n const newColumns = columns.filter(col => !prev.some(v => v.id === col.id));\n return [...prev, ...newColumns];\n }\n });\n }, []);\n const filteredAvailableColumns = useMemo(() => {\n const query = searchQuery.toLowerCase().trim();\n if (!query) {\n return allColumns;\n }\n return allColumns.filter(col => (col.label?.toLowerCase().includes(query) ?? false) || col.id.toLowerCase().includes(query));\n }, [allColumns, searchQuery]);\n const footer = useMemo(() => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ActionButton, {\n onClick: onClose\n }, \"Cancel\"), /*#__PURE__*/React.createElement(ActionButton, {\n variant: \"primary\",\n onClick: handleApply,\n disabled: isApplyDisabled\n }, \"Apply\")), [onClose, handleApply, isApplyDisabled]);\n return /*#__PURE__*/React.createElement(Dialog, {\n isOpen: isOpen,\n onOpenChange: onClose,\n title: DialogTitle,\n footer: footer,\n className: styles.columnConfigDialog\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.dialogLayout\n }, /*#__PURE__*/React.createElement(VisibleColumnsList, {\n columns: visibleColumns,\n onReorder: handleReorderColumns,\n onRemove: handleRemoveColumn\n }), /*#__PURE__*/React.createElement(AvailableColumnsList, {\n visibleColumns: visibleColumns,\n searchQuery: searchQuery,\n onSearchChange: handleSearchChange,\n onToggleColumn: handleToggleColumn,\n onSelectAll: handleSelectAll,\n filteredColumns: filteredAvailableColumns\n })));\n}\nconst DialogTitle = /*#__PURE__*/React.createElement(\"div\", {\n className: styles.title\n}, /*#__PURE__*/React.createElement(Cog, null), \"Configure Table Columns\");\nconst getColumnConfig = (allColumns, visibleColumns) => {\n const hiddenColumns = allColumns.filter(col => !visibleColumns.some(v => v.id === col.id));\n return [...visibleColumns.map(col => ({\n columnId: col.id,\n isVisible: true\n })), ...hiddenColumns.map(col => ({\n columnId: col.id,\n isVisible: false\n }))];\n};\nfunction VisibleColumnsList({\n columns,\n onReorder,\n onRemove\n}) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: styles.visibleColumnsContainer\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.sectionHeader\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.sectionTitle\n }, /*#__PURE__*/React.createElement(\"span\", null, \"Visible Columns\"), /*#__PURE__*/React.createElement(\"span\", {\n className: styles.countTag\n }, columns.length)), /*#__PURE__*/React.createElement(\"div\", {\n className: styles.sectionHint\n }, \"Drag to reorder\")), /*#__PURE__*/React.createElement(DraggableList, {\n items: columns,\n onReorder: onReorder,\n onRemove: onRemove,\n removeIconVariant: \"trash\",\n emptyMessage: \"No visible columns\",\n className: styles.columnList\n }));\n}\nfunction AvailableColumnsList({\n visibleColumns,\n searchQuery,\n onSearchChange,\n onToggleColumn,\n onSelectAll,\n filteredColumns\n}) {\n const selectedCount = visibleColumns.length;\n const totalCount = filteredColumns.length;\n const allFilteredSelected = filteredColumns.every(col => visibleColumns.some(v => v.id === col.id));\n const someFilteredSelected = filteredColumns.some(col => visibleColumns.some(v => v.id === col.id));\n const handleSelectAllClick = useCallback(() => {\n onSelectAll(filteredColumns);\n }, [filteredColumns, onSelectAll]);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: styles.availableColumnsContainer\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(styles.sectionHeader, styles.sectionTitle)\n }, \"Add or Remove Columns\"), /*#__PURE__*/React.createElement(SearchBar, {\n value: searchQuery,\n onChange: onSearchChange,\n placeholder: \"Search...\",\n \"aria-label\": \"Search available columns\",\n className: styles.searchContainer\n }), /*#__PURE__*/React.createElement(Collapsible.Root, {\n defaultOpen: true,\n className: styles.propertiesList\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.categoryHeader\n }, /*#__PURE__*/React.createElement(\"label\", {\n className: styles.selectAllLabel\n }, /*#__PURE__*/React.createElement(Checkbox, {\n checked: allFilteredSelected,\n indeterminate: someFilteredSelected && !allFilteredSelected,\n onCheckedChange: handleSelectAllClick,\n className: styles.checkbox\n }), \"All Columns\"), /*#__PURE__*/React.createElement(Collapsible.Trigger, {\n className: styles.categoryTrigger\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: styles.categoryCount\n }, selectedCount, \"/\", totalCount), /*#__PURE__*/React.createElement(CaretDown, {\n className: styles.caretIcon\n }))), /*#__PURE__*/React.createElement(Collapsible.Panel, {\n className: styles.propertyList\n }, filteredColumns.length === 0 ? /*#__PURE__*/React.createElement(\"div\", {\n className: styles.emptyState\n }, \"No matching columns found\") : filteredColumns.map(column => /*#__PURE__*/React.createElement(PropertyItem, {\n key: column.id,\n column: column,\n isSelected: visibleColumns.some(v => v.id === column.id),\n onToggle: onToggleColumn\n })))));\n}\nfunction PropertyItem({\n column,\n isSelected,\n onToggle,\n showInfoIcon = false\n}) {\n const handleClick = useCallback(() => {\n onToggle(column);\n }, [onToggle, column]);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: styles.propertyItem\n }, /*#__PURE__*/React.createElement(\"label\", {\n className: styles.propertyLabel\n }, /*#__PURE__*/React.createElement(Checkbox, {\n checked: isSelected,\n onCheckedChange: handleClick,\n className: styles.checkbox\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: styles.propertyName\n }, column.label)), showInfoIcon && /*#__PURE__*/React.createElement(SmallInfoSign, {\n className: styles.infoIcon\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.title {\n display: flex;\n align-items: center;\n gap: var(--osdk-surface-spacing);\n}\n\n.sortColumnsList {\n display: flex;\n flex-direction: column;\n gap: var(--osdk-surface-spacing);\n flex: 1;\n justify-content: space-between;\n overflow-x: hidden;\n}\n\n.sortableList {\n flex: 1;\n}\n\n.selectedColumnsContainer {\n margin-bottom: calc(var(--osdk-surface-spacing) * 2);\n}\n\n.sortColumnItem {\n display: flex;\n align-items: center;\n justify-content: space-between;\n min-width: 0;\n width: 100%;\n}\n\n.sortColumnName {\n min-width: 0;\n flex-shrink: 1;\n}\n\n.sortDirectionButton {\n flex-shrink: 0;\n background: none;\n border: none;\n padding: var(--osdk-surface-spacing);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--osdk-surface-border-radius);\n\n &:hover {\n background-color: var(--osdk-button-secondary-bg-hover);\n }\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: var(--osdk-focus-outline);\n outline-offset: calc(-1 * var(--osdk-focus-visible-outline-offset));\n }\n}\n\n.sortIcon {\n color: var(--osdk-typography-color-muted);\n}\n\n.addColumnButton {\n display: flex;\n align-items: center;\n gap: calc(var(--osdk-surface-spacing) * 2);\n width: 100%;\n padding: calc(var(--osdk-surface-spacing) * 2)\n calc(var(--osdk-surface-spacing) * 3);\n background-color: var(--osdk-button-secondary-bg);\n border: var(--osdk-surface-border);\n border-radius: var(--osdk-surface-border-radius);\n cursor: pointer;\n color: var(--osdk-button-secondary-color);\n margin-top: calc(var(--osdk-surface-spacing) * 2);\n\n &:hover:not(:disabled) {\n background-color: var(--osdk-button-secondary-bg-hover);\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n &:focus-visible {\n outline: var(--osdk-focus-outline);\n outline-offset: calc(-1 * var(--osdk-focus-visible-outline-offset));\n }\n}\n\n.addIcon {\n width: var(--osdk-iconography-size-small);\n height: var(--osdk-iconography-size-small);\n}\n\n.addColumnText {\n flex: 1;\n text-align: left;\n}\n\n\n.truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\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 { DraggableList } from \"../base-components/draggable-list/DraggableList.js\";\nexport function SortableItemsList({\n items,\n onReorder,\n onRemove,\n className\n}) {\n const renderContent = useCallback(item => item.content, []);\n return /*#__PURE__*/React.createElement(DraggableList, {\n items: items,\n onReorder: onReorder,\n onRemove: onRemove,\n removeIconVariant: \"cross\",\n renderContent: renderContent,\n className: className\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 { Button } from \"@base-ui/react/button\";\nimport { Add, CaretDown, Cog, SortAlphabetical, SortAlphabeticalDesc } from \"@blueprintjs/icons\";\nimport { arrayMove } from \"@dnd-kit/sortable\";\nimport classNames from \"classnames\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { ActionButton } from \"../base-components/action-button/ActionButton.js\";\nimport { Dialog } from \"../base-components/dialog/Dialog.js\";\nimport { SearchableMenu } from \"../base-components/searchable-menu/SearchableMenu.js\";\nimport styles from \"./MultiColumnSortDialog.module.css\";\nimport { SortableItemsList } from \"./SortableItemsList.js\";\nexport function MultiColumnSortDialog({\n isOpen,\n onClose,\n onApply,\n currentSorting,\n columnOptions\n}) {\n const [selectedSortColumns, setSelectedSortColumns] = useState([]);\n // Initialize selected sort columns from current sorting\n useEffect(() => {\n if (isOpen) {\n const selectedColumns = [];\n for (const sort of currentSorting) {\n const column = columnOptions.find(col => col.id === sort.id);\n if (column) {\n selectedColumns.push({\n ...column,\n direction: sort.desc ? \"desc\" : \"asc\"\n });\n }\n }\n setSelectedSortColumns(selectedColumns);\n }\n }, [isOpen, currentSorting, columnOptions]);\n const handleAddColumn = useCallback(column => {\n setSelectedSortColumns(prev => [...prev, {\n ...column,\n direction: \"asc\"\n }]);\n }, []);\n const handleRemoveSortColumn = useCallback(id => {\n setSelectedSortColumns(prev => prev.filter(item => item.id !== id));\n }, []);\n const handleReorderSortColumns = useCallback((fromIndex, toIndex) => {\n setSelectedSortColumns(items => arrayMove(items, fromIndex, toIndex));\n }, []);\n const handleToggleSortDirection = useCallback(id => {\n setSelectedSortColumns(prev => prev.map(item => item.id === id ? {\n ...item,\n direction: item.direction === \"asc\" ? \"desc\" : \"asc\"\n } : item));\n }, []);\n const handleApply = useCallback(() => {\n const sortingState = selectedSortColumns.map(col => ({\n id: col.id,\n desc: col.direction === \"desc\"\n }));\n onApply(sortingState);\n onClose();\n }, [selectedSortColumns, onApply, onClose]);\n const availableColumns = useMemo(() => columnOptions.filter(col => col.canSort && !selectedSortColumns.some(selected => selected.id === col.id)), [columnOptions, selectedSortColumns]);\n const searchableMenuItems = useMemo(() => availableColumns.map(col => ({\n key: col.id,\n label: col.name\n })), [availableColumns]);\n const handleMenuItemSelected = useCallback(key => {\n const column = availableColumns.find(col => col.id === key);\n if (column) {\n handleAddColumn(column);\n }\n }, [availableColumns, handleAddColumn]);\n const sortableItems = useMemo(() => {\n return selectedSortColumns.map(item => ({\n id: item.id,\n label: item.name,\n content: /*#__PURE__*/React.createElement(\"div\", {\n className: styles.sortColumnItem\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: classNames(styles.sortColumnName, styles.truncate)\n }, item.name), /*#__PURE__*/React.createElement(Button, {\n className: styles.sortDirectionButton,\n onClick: () => handleToggleSortDirection(item.id),\n \"aria-label\": `Toggle sort direction for ${item.name}`\n }, item.direction === \"asc\" ? /*#__PURE__*/React.createElement(SortAlphabetical, {\n className: styles.sortIcon\n }) : /*#__PURE__*/React.createElement(SortAlphabeticalDesc, {\n className: styles.sortIcon\n })))\n }));\n }, [selectedSortColumns, handleToggleSortDirection]);\n const footer = useMemo(() => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ActionButton, {\n onClick: onClose\n }, \"Cancel\"), /*#__PURE__*/React.createElement(ActionButton, {\n variant: \"primary\",\n onClick: handleApply\n }, \"Apply\")), [handleApply, onClose]);\n return /*#__PURE__*/React.createElement(Dialog, {\n isOpen: isOpen,\n onOpenChange: onClose,\n title: DialogTitle,\n footer: footer\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.sortColumnsList\n }, /*#__PURE__*/React.createElement(SortableItemsList, {\n items: sortableItems,\n onReorder: handleReorderSortColumns,\n onRemove: handleRemoveSortColumn,\n className: styles.sortableList\n }), /*#__PURE__*/React.createElement(SearchableMenu, {\n items: searchableMenuItems,\n onItemSelected: handleMenuItemSelected,\n trigger: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Add, {\n className: styles.addIcon\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: styles.addColumnText\n }, \"Add Column to Sort\"), /*#__PURE__*/React.createElement(CaretDown, null)),\n triggerClassName: styles.addColumnButton,\n disabled: availableColumns.length === 0,\n searchPlaceholder: \"Search columns\",\n emptyMessage: \"No matching columns\"\n })));\n}\nconst DialogTitle = /*#__PURE__*/React.createElement(\"div\", {\n className: styles.title\n}, /*#__PURE__*/React.createElement(Cog, null), \"Sort on Multiple Columns\");","/*\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 width: max-content;\n min-width: 100%;\n height: var(--osdk-table-header-height);\n z-index: var(--osdk-surface-z-index-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 width: max-content;\n min-width: 100%;\n border-top: var(--osdk-table-border);\n border-bottom: var(--osdk-table-border);\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-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: none;\n }\n}\n\n.osdkTableHeaderCell[data-pinned=\"left\"],\n.osdkTableHeaderCell[data-pinned=\"right\"] {\n position: sticky;\n z-index: var(--osdk-surface-z-index-2);\n background-color: var(--osdk-table-header-bg);\n}\n\n/* Last left-pinned column - no left-pinned siblings after it */\n.osdkTableHeaderCell[data-pinned=\"left\"]:not(:has(~ [data-pinned=\"left\"])) {\n border-right: var(--osdk-table-pinned-column-border);\n}\n\n/* First right-pinned column - no right-pinned siblings before it */\n.osdkTableHeaderCell[data-pinned=\"right\"]:not(\n :has(~ [data-pinned=\"right\"]):nth-child(n + 2)\n ) {\n border-left: var(--osdk-table-pinned-column-border);\n}\n\n.osdkTableSelectionHeaderCell {\n justify-content: center;\n padding: 0;\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(--osdk-surface-z-index-2);\n\n &:hover {\n background: var(--osdk-table-resizer-color-hover);\n }\n\n &:active {\n background: var(--osdk-table-resizer-color-active);\n }\n}\n\n.osdkLoadingHeaderCell {\n height: var(--osdk-table-header-fontSize);\n flex: 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\n.osdkHeaderContent {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n line-clamp: 2;\n text-align: left;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.osdkHeaderContent:has([role=\"checkbox\"]) {\n display: flex;\n justify-content: center;\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 \"./TableHeaderContent.module.css\";\nexport function TableHeaderContent({\n header\n}) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: styles.osdkHeaderContent\n }, flexRender(header.column.columnDef.header, header.getContext()));\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.osdkCenterContainer {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.osdkContentGap {\n display: flex;\n gap: calc(var(--osdk-surface-spacing) * 2);\n}\n\n.osdkHeaderContainer {\n justify-content: space-between;\n flex: 1;\n min-width: 0;\n align-self: stretch;\n}\n\n.osdkHeaderContentLeft {\n min-width: 0;\n flex-shrink: 1;\n}\n\n.osdkHeaderContentLeftClickable {\n cursor: pointer;\n}\n\n.osdkHeaderContentRight {\n flex-shrink: 0;\n}\n\n.osdkHeaderText {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 3;\n line-clamp: 3;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-grow: 1;\n}\n\n.osdkHeaderPopoverTrigger {\n padding: var(--osdk-table-header-menu-padding);\n flex-shrink: 0;\n flex-grow: 0;\n background-color: var(--osdk-table-header-menu-bg);\n border: var(--osdk-table-header-menu-border);\n border-radius: var(--osdk-surface-border-radius);\n color: var(--osdk-table-header-menu-color);\n cursor: pointer;\n user-select: none;\n\n &:hover {\n background-color: var(--osdk-table-header-menu-bg-hover);\n }\n\n &[data-popup-open] {\n background-color: var(--osdk-table-header-menu-bg-active);\n color: var(--osdk-table-header-menu-color-active);\n }\n\n &:focus-visible {\n outline: var(--osdk-focus-outline);\n outline-offset: var(--osdk-focus-visible-outline-offset);\n }\n}\n\n.osdkHeaderIcon {\n width: var(--osdk-iconography-size-small);\n height: var(--osdk-iconography-size-small);\n color: var(--osdk-table-header-menu-icon-color);\n}\n\n.osdkHeaderPopup {\n box-sizing: border-box;\n padding: var(--osdk-surface-spacing);\n border-radius: var(--osdk-surface-border-radius);\n border: var(--osdk-surface-border);\n background-color: var(--osdk-surface-background-color-default-rest);\n color: var(--osdk-typography-color-default-rest);\n box-shadow: var(--osdk-surface-shadow-2);\n font-size: var(--osdk-typography-size-body-medium);\n}\n\n.osdkHeaderMenuItem {\n justify-content: flex-start;\n padding: var(--osdk-surface-spacing) calc(var(--osdk-surface-spacing) * 2);\n cursor: pointer;\n\n &:hover {\n background-color: var(--osdk-surface-background-color-default-hover);\n border-radius: var(--osdk-surface-border-radius);\n }\n\n &:focus-visible {\n outline: var(--osdk-focus-outline);\n outline-offset: var(--osdk-focus-visible-outline-offset);\n }\n}\n\n.osdkHeaderMenuItem .osdkHeaderActiveMenuItem {\n background-color: var(--osdk-intent-primary-rest);\n color: var(--osdk-intent-primary-foreground);\n\n &:hover {\n background-color: var(--osdk-intent-primary-hover);\n }\n\n &:active {\n background-color: var(--osdk-intent-primary-active);\n }\n}\n\n.sortIndex {\n font-size: var(--osdk-typography-size-body-x-small);\n margin-left: var(--osdk-surface-spacing);\n color: var(--osdk-typography-color-muted);\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 { Menu } from \"@base-ui/react/menu\";\nimport { ChevronDown, Pin, Remove, Settings, Sort, SortAlphabetical, SortAlphabeticalDesc, Unpin, VerticalDistribution } from \"@blueprintjs/icons\";\nimport classNames from \"classnames\";\nimport React, { useCallback, useState } from \"react\";\nimport { usePortalContainer } from \"../shared/PortalContainerContext.js\";\nimport { TableHeaderContent } from \"./TableHeaderContent.js\";\nimport styles from \"./TableHeaderWithPopover.module.css\";\nfunction HeaderMenuItem({\n onClick,\n icon: Icon,\n label,\n active = false\n}) {\n return /*#__PURE__*/React.createElement(Menu.Item, {\n closeOnClick: true,\n className: classNames(styles.osdkCenterContainer, styles.osdkContentGap, styles.osdkHeaderMenuItem, active && styles.osdkHeaderActiveMenuItem),\n onClick: onClick\n }, /*#__PURE__*/React.createElement(Icon, {\n className: styles.osdkHeaderIcon\n }), /*#__PURE__*/React.createElement(\"span\", null, label));\n}\nexport function TableHeaderWithPopover({\n header,\n table,\n isColumnPinned,\n onResetSize,\n columnOptions,\n featureFlags,\n onOpenColumnConfig,\n onOpenMultiSort,\n onColumnHeaderClick\n}) {\n const portalContainer = usePortalContainer();\n const {\n showSortingItems = false,\n showPinningItems = false,\n showResizeItem = false,\n showConfigItem = false\n } = featureFlags ?? {};\n const {\n setColumnPinning,\n setSorting\n } = table;\n const currentSorting = table.getState().sorting;\n const [isOpen, setIsOpen] = useState(false);\n const handlePinLeft = useCallback(() => {\n setColumnPinning(prev => {\n return {\n left: [...(prev.left || []), header.column.id],\n right: prev.right?.filter(id => id !== header.column.id) || []\n };\n });\n }, [header.column.id, setColumnPinning]);\n const handleUnpin = useCallback(() => {\n setColumnPinning(prev => {\n return {\n left: prev.left?.filter(id => id !== header.column.id) || [],\n right: prev.right?.filter(id => id !== header.column.id) || []\n };\n });\n }, [header.column.id, setColumnPinning]);\n const handleSortAscending = useCallback(() => {\n header.column.toggleSorting(false);\n setSorting?.([{\n id: header.column.id,\n desc: false\n }]);\n }, [header.column, setSorting]);\n const handleSortDescending = useCallback(() => {\n header.column.toggleSorting(true);\n setSorting?.([{\n id: header.column.id,\n desc: true\n }]);\n }, [header.column, setSorting]);\n const handleClearAllSorts = useCallback(() => {\n header.column.clearSorting();\n setSorting?.([]);\n }, [header.column, setSorting]);\n const handleResetSize = useCallback(() => {\n header.column.resetSize();\n if (onResetSize) {\n onResetSize();\n }\n }, [header.column, onResetSize]);\n const handleInteraction = useCallback(e => {\n e.preventDefault();\n setIsOpen(prev => !prev);\n }, []);\n const handleHeaderClick = useCallback(() => {\n onColumnHeaderClick?.(header.column.id);\n }, [header.column.id, onColumnHeaderClick]);\n const handleOpenColumnConfig = useCallback(() => {\n onOpenColumnConfig?.();\n setIsOpen(false);\n }, [onOpenColumnConfig]);\n const handleOpenMultiSort = useCallback(() => {\n onOpenMultiSort?.();\n setIsOpen(false);\n }, [onOpenMultiSort]);\n const isSorted = header.column.getIsSorted();\n const isSortable = header.column.getCanSort();\n const sortIndex = currentSorting?.findIndex(s => s.id === header.column.id) ?? -1;\n const hasAnyMenuItems = showPinningItems || showSortingItems && isSortable || showResizeItem || showConfigItem;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Menu.Root, {\n open: isOpen,\n onOpenChange: setIsOpen,\n modal: false\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(styles.osdkCenterContainer, styles.osdkContentGap, styles.osdkHeaderContainer),\n onContextMenu: handleInteraction\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(styles.osdkCenterContainer, styles.osdkContentGap, styles.osdkHeaderContentLeft, onColumnHeaderClick && styles.osdkHeaderContentLeftClickable),\n onClick: onColumnHeaderClick ? handleHeaderClick : undefined\n }, isColumnPinned && /*#__PURE__*/React.createElement(Pin, {\n className: styles.osdkHeaderIcon\n }), /*#__PURE__*/React.createElement(TableHeaderContent, {\n header: header\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(styles.osdkCenterContainer, styles.osdkContentGap, styles.osdkHeaderContentRight)\n }, isSorted && /*#__PURE__*/React.createElement(\"div\", {\n className: styles.osdkCenterContainer\n }, isSorted === \"asc\" ? /*#__PURE__*/React.createElement(SortAlphabetical, {\n className: styles.osdkHeaderIcon\n }) : /*#__PURE__*/React.createElement(SortAlphabeticalDesc, {\n className: styles.osdkHeaderIcon\n }), currentSorting.length > 1 && sortIndex >= 0 && /*#__PURE__*/React.createElement(\"span\", {\n className: styles.sortIndex\n }, sortIndex + 1)), hasAnyMenuItems && /*#__PURE__*/React.createElement(Menu.Trigger, {\n \"aria-label\": `Open header menu for column with id=${header.column.id}`,\n className: classNames(styles.osdkCenterContainer, styles.osdkHeaderPopoverTrigger)\n }, /*#__PURE__*/React.createElement(ChevronDown, {\n className: styles.osdkHeaderIcon\n }))), /*#__PURE__*/React.createElement(Menu.Portal, {\n container: portalContainer\n }, /*#__PURE__*/React.createElement(Menu.Positioner, {\n sideOffset: 4\n }, /*#__PURE__*/React.createElement(Menu.Popup, {\n className: styles.osdkHeaderPopup\n }, showPinningItems && !isColumnPinned && /*#__PURE__*/React.createElement(HeaderMenuItem, {\n onClick: handlePinLeft,\n icon: Pin,\n label: \"Pin column\"\n }), showPinningItems && isColumnPinned && /*#__PURE__*/React.createElement(HeaderMenuItem, {\n onClick: handleUnpin,\n icon: Unpin,\n label: \"Unpin Column\",\n active: true\n }), showSortingItems && isSortable && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(HeaderMenuItem, {\n onClick: handleSortAscending,\n icon: SortAlphabetical,\n label: \"Sort ascending\",\n active: isSorted === \"asc\"\n }), /*#__PURE__*/React.createElement(HeaderMenuItem, {\n onClick: handleSortDescending,\n icon: SortAlphabeticalDesc,\n label: \"Sort descending\",\n active: isSorted === \"desc\"\n }), columnOptions?.some(col => col.canSort) && /*#__PURE__*/React.createElement(HeaderMenuItem, {\n onClick: handleOpenMultiSort,\n icon: Sort,\n label: \"Sort on multiple columns\"\n })), showSortingItems && !!currentSorting?.length && /*#__PURE__*/React.createElement(HeaderMenuItem, {\n onClick: handleClearAllSorts,\n icon: Remove,\n label: \"Clear all sorts\"\n }), showResizeItem && /*#__PURE__*/React.createElement(HeaderMenuItem, {\n onClick: handleResetSize,\n icon: VerticalDistribution,\n label: \"Reset Column Size\"\n }), showConfigItem && /*#__PURE__*/React.createElement(HeaderMenuItem, {\n onClick: handleOpenColumnConfig,\n icon: Settings,\n label: \"Configure Columns\"\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 function getColumnPinningStyles(column) {\n const isPinned = column.getIsPinned();\n return {\n columnStyles: {\n left: isPinned === \"left\" ? `${column.getStart(\"left\")}px` : undefined,\n right: isPinned === \"right\" ? `${column.getAfter(\"right\")}px` : undefined,\n width: column.getSize()\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 classNames from \"classnames\";\nimport React, { useCallback, useMemo, useState } from \"react\";\nimport { ColumnConfigDialog } from \"./ColumnConfigDialog.js\";\nimport { MultiColumnSortDialog } from \"./MultiColumnSortDialog.js\";\nimport styles from \"./TableHeader.module.css\";\nimport { TableHeaderContent } from \"./TableHeaderContent.js\";\nimport { TableHeaderWithPopover } from \"./TableHeaderWithPopover.js\";\nimport { SELECTION_COLUMN_ID } from \"./utils/constants.js\";\nimport { getColumnPinningStyles } from \"./utils/getColumnPinningStyles.js\";\nconst getHeaderName = (column, allHeaders) => {\n const {\n id,\n columnDef\n } = column;\n const header = allHeaders.find(header => header.id === id);\n const headerDef = columnDef.header;\n if (headerDef) {\n if (typeof headerDef === \"string\") {\n return headerDef;\n }\n // Try to get header name from the renderHeader function\n if (header) {\n const displayedHeader = headerDef(header.getContext());\n if (typeof displayedHeader === \"string\") return displayedHeader;\n }\n }\n // Fallback to use the columnName provided by user or id\n const {\n meta\n } = columnDef;\n return meta?.columnName ?? id;\n};\nexport function TableHeader({\n table,\n headerMenuFeatureFlags,\n onColumnHeaderClick\n}) {\n // TODO: If value is number type, right align header\n\n const {\n setColumnOrder,\n setColumnVisibility,\n setSorting\n } = table;\n const currentSorting = table.getState().sorting;\n const currentVisibility = table.getState().columnVisibility;\n const currentColumnOrder = table.getState().columnOrder;\n const isResizing = !!table.getState().columnSizingInfo?.isResizingColumn;\n const [configDialogOpen, setConfigDialogOpen] = useState(false);\n const [multiSortDialogOpen, setMultiSortDialogOpen] = useState(false);\n const handleOpenColumnConfig = useCallback(() => {\n setConfigDialogOpen(true);\n }, []);\n const handleCloseColumnConfig = useCallback(() => {\n setConfigDialogOpen(false);\n }, []);\n const handleOpenMultiSort = useCallback(() => {\n setMultiSortDialogOpen(true);\n }, []);\n const handleCloseMultiSort = useCallback(() => {\n setMultiSortDialogOpen(false);\n }, []);\n const handleApplyMultiSort = useCallback(sortColumns => {\n setMultiSortDialogOpen(false);\n setSorting?.(sortColumns);\n }, [setSorting]);\n const handleApplyColumnConfig = useCallback(updates => {\n const newVisibilityState = {};\n for (const update of updates) {\n newVisibilityState[update.columnId] = update.isVisible;\n }\n setColumnOrder(updates.map(col => col.columnId));\n setColumnVisibility(newVisibilityState);\n }, [setColumnOrder, setColumnVisibility]);\n const columnOptions = useMemo(() => {\n const allHeaders = table.getHeaderGroups().flatMap(headerGroup => headerGroup.headers);\n return table.getAllColumns().filter(column => column.id !== SELECTION_COLUMN_ID).map(column => {\n return {\n id: column.id,\n name: getHeaderName(column, allHeaders),\n canSort: column.getCanSort()\n };\n });\n }, [table]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__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 => {\n const {\n columnStyles\n } = getColumnPinningStyles(header.column);\n const isColumnPinned = header.column.getIsPinned();\n const isSelectColumn = header.id === SELECTION_COLUMN_ID;\n return /*#__PURE__*/React.createElement(\"th\", {\n key: header.id,\n \"data-pinned\": header.column.getIsPinned(),\n className: classNames(styles.osdkTableHeaderCell, {\n [styles.osdkTableSelectionHeaderCell]: isSelectColumn\n }),\n style: columnStyles\n }, header.isPlaceholder ? null : isSelectColumn ? /*#__PURE__*/React.createElement(TableHeaderContent, {\n header: header\n }) : /*#__PURE__*/React.createElement(TableHeaderWithPopover, {\n table: table,\n header: header,\n isColumnPinned: isColumnPinned,\n columnOptions: columnOptions,\n featureFlags: headerMenuFeatureFlags,\n onOpenColumnConfig: handleOpenColumnConfig,\n onOpenMultiSort: handleOpenMultiSort,\n onColumnHeaderClick: onColumnHeaderClick\n }), header.column.getCanResize() && headerMenuFeatureFlags?.showResizeItem !== false && /*#__PURE__*/React.createElement(\"div\", {\n className: styles.osdkTableHeaderResizer,\n onDoubleClick: () => header.column.resetSize(),\n onMouseDown: header.getResizeHandler(),\n onTouchStart: header.getResizeHandler()\n }));\n })))), !!columnOptions?.length && /*#__PURE__*/React.createElement(ColumnConfigDialog, {\n isOpen: configDialogOpen,\n onClose: handleCloseColumnConfig,\n columnOptions: columnOptions,\n currentVisibility: currentVisibility,\n currentColumnOrder: currentColumnOrder,\n onApply: handleApplyColumnConfig\n }), columnOptions?.some(col => col.canSort) && /*#__PURE__*/React.createElement(MultiColumnSortDialog, {\n isOpen: multiSortDialogOpen,\n onClose: handleCloseMultiSort,\n columnOptions: columnOptions,\n currentSorting: currentSorting,\n onApply: handleApplyMultiSort\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, { useEffect, useMemo, useRef, useState } from \"react\";\nimport { SkeletonBar } from \"../base-components/skeleton/SkeletonBar.js\";\nimport loadingStyles from \"./LoadingCell.module.css\";\nimport { LoadingRow } from \"./LoadingRow.js\";\nimport bodyStyles from \"./TableBody.module.css\";\nimport { TableHeader } from \"./TableHeader.js\";\nimport headerStyles from \"./TableHeader.module.css\";\nimport { DEFAULT_LOADING_COLUMN_WIDTH, DEFAULT_ROW_HEIGHT, MIN_LOADING_ROWS } from \"./utils/constants.js\";\nexport function LoadingStateTable({\n table,\n tableContainerRef,\n headerGroups,\n rowHeight = DEFAULT_ROW_HEIGHT,\n columnWidth = DEFAULT_LOADING_COLUMN_WIDTH\n}) {\n // If selection enabled, there will be a header for the selection column\n const enableRowSelection = table.options.enableRowSelection;\n const minHeaderCount = enableRowSelection ? 1 : 0;\n const headers = useMemo(() => headerGroups.length > 0 ? headerGroups[0].headers : [], [headerGroups]);\n const hasHeadersLoaded = headers.length > minHeaderCount;\n const headerRef = useRef(null);\n const bodyRef = useRef(null);\n const [loadingRowCount, setLoadingRowCount] = useState(MIN_LOADING_ROWS);\n const [loadingColumnCount, setLoadingColumnCount] = useState(headers.length);\n // Calculate number of columns needed to fill container width\n useEffect(() => {\n if (hasHeadersLoaded) {\n setLoadingColumnCount(headers.length);\n } else {\n if (tableContainerRef.current) {\n const tableWidth = tableContainerRef.current.clientWidth;\n if (tableWidth > 0) {\n const columnsNeeded = Math.ceil(tableWidth / columnWidth);\n setLoadingColumnCount(columnsNeeded);\n }\n }\n }\n }, [columnWidth, hasHeadersLoaded, headers, tableContainerRef]);\n\n // Calculate number of rows needed to fill container height\n useEffect(() => {\n if (tableContainerRef.current) {\n const containerHeight = tableContainerRef.current.clientHeight;\n const availableHeight = containerHeight - rowHeight;\n if (availableHeight > 0) {\n const rowsNeeded = Math.ceil(availableHeight / rowHeight);\n setLoadingRowCount(Math.max(rowsNeeded, MIN_LOADING_ROWS));\n }\n }\n }, [tableContainerRef, rowHeight]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, hasHeadersLoaded ? /*#__PURE__*/React.createElement(TableHeader, {\n table: table\n }) : /*#__PURE__*/React.createElement(\"thead\", {\n className: headerStyles.osdkTableHeader,\n ref: headerRef\n }, /*#__PURE__*/React.createElement(\"tr\", {\n className: headerStyles.osdkTableHeaderRow\n }, Array.from({\n length: loadingColumnCount\n }).map((_, index) => {\n const width = headers.length > index ? headers[index].getSize() : columnWidth;\n return /*#__PURE__*/React.createElement(\"th\", {\n key: `loading-header-${index}`,\n className: headerStyles.osdkTableHeaderCell,\n style: {\n width\n }\n }, /*#__PURE__*/React.createElement(SkeletonBar, {\n className: classNames(headerStyles.osdkLoadingHeaderCell, loadingStyles.osdkCellSkeleton)\n }));\n }))), /*#__PURE__*/React.createElement(\"tbody\", {\n className: bodyStyles.osdkTableBody,\n ref: bodyRef\n }, Array.from({\n length: loadingRowCount\n }).map((_, index) => /*#__PURE__*/React.createElement(LoadingRow, {\n key: `skeleton-${index}`,\n columnCount: loadingColumnCount,\n headers: headers,\n translateY: rowHeight * index,\n rowHeight: rowHeight,\n columnWidth: columnWidth\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.container {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.message {\n padding: calc(var(--osdk-surface-spacing) * 5);\n color: var(--osdk-typography-color-muted);\n font-style: italic;\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 from \"react\";\nimport styles from \"./NonIdealState.module.css\";\nexport function NonIdealState({\n message\n}) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: styles.container\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.message\n }, message));\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.osdkTableWrapper {\n display: flex;\n flex-direction: column;\n height: 100%;\n position: relative;\n}\n\n.osdkTableContainer {\n flex: 1;\n min-height: 0;\n overflow: auto;\n position: relative;\n /* Sticky headers, pinned columns, and resize handles use z-index only within\n the scroll container. Isolating that stacking context lets the sibling\n header-menu portal paint above them by DOM order instead of competing with\n table internals on z-index values. */\n isolation: isolate;\n background-color: var(--osdk-background-primary);\n}\n\n.osdkTableContainer table {\n border-collapse: collapse;\n display: grid;\n table-layout: fixed;\n width: max-content;\n min-width: 100%;\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(--osdk-surface-z-index-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\nimport { flexRender } from \"@tanstack/react-table\";\nimport React, { useRef } from \"react\";\nimport { CellContextMenu } from \"./CellContextMenu.js\";\nimport { useCellContextMenu } from \"./hooks/useCellContextMenu.js\";\nimport styles from \"./TableCell.module.css\";\nimport { SELECTION_COLUMN_ID } from \"./utils/constants.js\";\nimport { isCellEditable } from \"./utils/editableUtils.js\";\nimport { getColumnPinningStyles } from \"./utils/getColumnPinningStyles.js\";\nimport { shouldShowEditableCell } from \"./utils/shouldShowEditableCell.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 const {\n columnStyles\n } = getColumnPinningStyles(cell.column);\n const tableMeta = cell.getContext().table.options.meta;\n const columnMeta = cell.column.columnDef.meta;\n const isEditable = shouldShowEditableCell(isCellEditable(columnMeta?.editable, cell.row.original), tableMeta?.onCellEdit, tableMeta?.isInEditMode);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"td\", {\n ref: tdRef,\n \"data-pinned\": cell.column.getIsPinned(),\n \"data-editable\": isEditable ? \"true\" : undefined,\n className: styles.osdkTableCell,\n style: columnStyles,\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}","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 React, { useCallback, useMemo } 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 isFocused,\n setFocusedRowId,\n isInEditMode,\n getRowAttributes\n}) {\n // Use the capture phase so row focus is set even when children call\n // stopPropagation on the click event (e.g. DatePicker's input).\n const handleClickCapture = useCallback(() => {\n setFocusedRowId?.(row.id);\n }, [row.id, setFocusedRowId]);\n const handleClick = useCallback(() => {\n if (!isInEditMode) {\n onRowClick?.(row.original);\n }\n }, [isInEditMode, onRowClick, row.original]);\n const customRowAttributes = useMemo(() => {\n if (!getRowAttributes) {\n return;\n }\n return Object.fromEntries(Object.entries(getRowAttributes(row.original)).filter(entry => entry[1] != null));\n }, [getRowAttributes, row.original]);\n return /*#__PURE__*/React.createElement(\"tr\", _extends({}, customRowAttributes, {\n \"data-selected\": row.getIsSelected(),\n \"data-focused\": isFocused,\n \"data-row-parity\": virtualRow.index % 2 === 0 ? \"even\" : \"odd\",\n className: styles.osdkTableRow,\n style: {\n height: `${virtualRow.size}px`,\n transform: `translateY(${virtualRow.start}px)`\n },\n onClickCapture: handleClickCapture,\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 { LoadingRow } from \"./LoadingRow.js\";\nimport styles from \"./TableBody.module.css\";\nimport { TableRow } from \"./TableRow.js\";\nimport { DEFAULT_ROW_HEIGHT, VIRTUALIZER_OVERSCAN } from \"./utils/constants.js\";\nexport function TableBody({\n rows,\n tableContainerRef,\n onRowClick,\n renderCellContextMenu,\n rowHeight = DEFAULT_ROW_HEIGHT,\n isLoadingMore = false,\n headerGroups = [],\n focusedRowId,\n setFocusedRowId,\n isInEditMode,\n getRowAttributes\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: VIRTUALIZER_OVERSCAN\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 const totalSize = rowVirtualizer.getTotalSize();\n const bodyHeight = isLoadingMore ? totalSize + rowHeight : totalSize;\n const headers = headerGroups[0]?.headers ?? [];\n return /*#__PURE__*/React.createElement(\"tbody\", {\n className: styles.osdkTableBody,\n style: {\n height: `${bodyHeight}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 isFocused: focusedRowId === row.id,\n setFocusedRowId: setFocusedRowId,\n isInEditMode: isInEditMode,\n getRowAttributes: getRowAttributes\n });\n }), isLoadingMore && /*#__PURE__*/React.createElement(LoadingRow, {\n headers: headers,\n translateY: totalSize,\n rowHeight: rowHeight,\n columnCount: headers.length\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.tableEditContainer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: var(--osdk-surface-background-color-default-rest);\n border-top: var(--osdk-table-border);\n padding: var(--osdk-table-edit-container-padding);\n min-height: var(--osdk-table-edit-container-min-height);\n}\n\n.placeholder {\n color: var(--osdk-typography-color-muted);\n font-size: var(--osdk-typography-size-body-small);\n padding: calc(var(--osdk-surface-spacing) * 2) 0;\n}\n\n.editsInfoContainer {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: row;\n gap: calc(var(--osdk-surface-spacing) * 3);\n font-size: var(--osdk-typography-size-body-small);\n}\n\n.modificationCount {\n color: var(--osdk-intent-primary-rest);\n font-size: var(--osdk-typography-size-body-small);\n padding: calc(var(--osdk-surface-spacing) * 2) 0;\n}\n\n.editButtons {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n flex: 1;\n}\n\n.validationError {\n display: flex;\n align-items: center;\n gap: calc(var(--osdk-surface-spacing) * 2);\n color: var(--osdk-intent-danger-rest);\n}\n\n.errorIcon {\n color: var(--osdk-intent-danger-rest);\n}\n\n.divider {\n width: 1px;\n height: 8px;\n background-color: var(--osdk-surface-border-color-default);\n align-self: center;\n}\n","/*\n * Copyright 2026 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 { Error } from \"@blueprintjs/icons\";\nimport React, { useCallback, useState } from \"react\";\nimport { ActionButton } from \"../base-components/action-button/ActionButton.js\";\nimport styles from \"./TableEditContainer.module.css\";\nexport function TableEditContainer({\n editableConfig,\n hasFocusedRow\n}) {\n const {\n cellEdits,\n onSubmitEdits,\n clearEdits,\n editModeState,\n validationErrors\n } = editableConfig;\n const hasEdits = Object.keys(cellEdits ?? {}).length > 0;\n const hasValidationError = (validationErrors?.size ?? 0) > 0;\n const [isSubmitting, setIsSubmitting] = useState(false);\n const isInEditMode = editModeState.isActive;\n const canToggleEditMode = editModeState.type === \"manual\";\n const handleSubmitEdits = useCallback(async () => {\n setIsSubmitting(true);\n try {\n const success = await onSubmitEdits?.();\n if (success) {\n clearEdits?.();\n if (editModeState?.type === \"manual\") {\n editModeState.setActive(false);\n }\n }\n } finally {\n setIsSubmitting(false);\n }\n }, [editModeState, onSubmitEdits, clearEdits]);\n const handleCancelEdits = useCallback(() => {\n clearEdits?.();\n if (editModeState?.type === \"manual\") {\n editModeState.setActive(false);\n }\n }, [clearEdits, editModeState]);\n const handleEnterEditMode = useCallback(() => {\n if (editModeState?.type === \"manual\") {\n editModeState.setActive(true);\n }\n }, [editModeState]);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: styles.tableEditContainer\n }, hasEdits || hasValidationError ? /*#__PURE__*/React.createElement(\"div\", {\n className: styles.editsInfoContainer\n }, hasEdits && /*#__PURE__*/React.createElement(\"div\", {\n className: styles.modificationCount\n }, `${cellEdits ? Object.keys(cellEdits).length : 0} modifications`), hasEdits && hasValidationError && /*#__PURE__*/React.createElement(\"div\", {\n className: styles.divider\n }), hasValidationError && /*#__PURE__*/React.createElement(\"div\", {\n className: styles.validationError\n }, /*#__PURE__*/React.createElement(Error, {\n className: styles.errorIcon\n }), \"Validation error\")) : isInEditMode && !hasFocusedRow && /*#__PURE__*/React.createElement(\"div\", {\n className: styles.placeholder\n }, \"Select a row to edit data\\u2026\"), /*#__PURE__*/React.createElement(\"div\", {\n className: styles.editButtons\n }, !isInEditMode && canToggleEditMode && /*#__PURE__*/React.createElement(ActionButton, {\n variant: \"primary\",\n onClick: handleEnterEditMode\n }, \"Edit Table\"), isInEditMode && canToggleEditMode && /*#__PURE__*/React.createElement(ActionButton, {\n variant: \"secondary\",\n onClick: handleCancelEdits\n }, \"Cancel\"), isInEditMode && !!onSubmitEdits && /*#__PURE__*/React.createElement(ActionButton, {\n variant: \"primary\",\n onClick: handleSubmitEdits,\n disabled: !hasEdits || isSubmitting || hasValidationError\n }, \"Submit Edits\")));\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, useEffect, useRef, useState } from \"react\";\nimport { PortalContainerProvider } from \"../shared/PortalContainerContext.js\";\nimport { useFocusedRow } from \"./hooks/useFocusedRow.js\";\nimport { LoadingStateTable } from \"./LoadingStateTable.js\";\nimport { NonIdealState } from \"./NonIdealState.js\";\nimport styles from \"./Table.module.css\";\nimport { TableBody } from \"./TableBody.js\";\nimport { TableEditContainer } from \"./TableEditContainer.js\";\nimport { TableHeader } from \"./TableHeader.js\";\nimport { SCROLL_FETCH_THRESHOLD } from \"./utils/constants.js\";\nimport { isColumnDeclaredEditable } from \"./utils/editableUtils.js\";\nimport { PortalTrackerProvider, usePortalTracker } from \"./utils/PortalTracker.js\";\nexport function BaseTable(props) {\n return /*#__PURE__*/React.createElement(PortalTrackerProvider, null, /*#__PURE__*/React.createElement(BaseTableInner, props));\n}\nfunction BaseTableInner({\n table,\n isLoading,\n fetchNextPage,\n onRowClick,\n onColumnHeaderClick,\n rowHeight,\n renderCellContextMenu,\n className,\n error,\n headerMenuFeatureFlags,\n editableConfig,\n getRowAttributes,\n showEditFooter = true,\n renderEmptyState,\n focusedRowId: focusedRowIdProp,\n onFocusedRowChanged\n}) {\n const tableContainerRef = useRef(null);\n const objectTablePortalRef = useRef(null);\n const [isLoadingMore, setIsLoadingMore] = useState(false);\n const getRowById = useCallback(id => {\n try {\n return table.getRow(id, true)?.original ?? null;\n } catch {\n // table.getRow throws when the id no longer matches a row\n // (e.g. the row was removed or has not loaded yet). Treat a\n // missing row as \"no focus\" rather than crashing.\n return null;\n }\n }, [table]);\n const {\n focusedRowId,\n setFocusedRowId\n } = useFocusedRow({\n focusedRowId: focusedRowIdProp,\n onFocusedRowChanged,\n getRowById\n });\n const portalTracker = usePortalTracker();\n\n // Sync focusedRowId into table meta so cell renderers (which only\n // receive `table`) can read it without extra prop drilling.\n // Assigned synchronously so children see the current value in the\n // same render pass. This is safe because meta is a mutable bag that\n // TanStack Table never snapshots or shallow-compares.\n if (table.options.meta) {\n table.options.meta.focusedRowId = focusedRowId;\n }\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 useEffect(() => {\n if (!isLoading || fetchNextPage == null) {\n setIsLoadingMore(false);\n }\n }, [isLoading, fetchNextPage]);\n const fetchMoreOnEndReached = useCallback(async containerRefElement => {\n if (containerRefElement && !fetchingRef.current && !isLoadingMore) {\n const {\n scrollHeight,\n scrollTop,\n clientHeight\n } = containerRefElement;\n if (scrollHeight - scrollTop - clientHeight < SCROLL_FETCH_THRESHOLD && !isLoading && fetchNextPage != null) {\n fetchingRef.current = true;\n setIsLoadingMore(true);\n try {\n await fetchNextPage();\n } finally {\n fetchingRef.current = false;\n }\n }\n }\n }, [fetchNextPage, isLoading, isLoadingMore]);\n const handleScroll = useCallback(async e => {\n await fetchMoreOnEndReached(e.currentTarget);\n }, [fetchMoreOnEndReached]);\n const rows = table.getRowModel().rows;\n const headerGroups = table.getHeaderGroups();\n const hasData = rows.length > 0;\n const hasEditableColumns = table.getAllColumns().some(column => isColumnDeclaredEditable(column.columnDef.meta?.editable));\n\n // Use pointerdown instead of click to detect outside interactions.\n // base-ui's Select renders a full-screen backdrop that intercepts\n // pointerdown to close the popup. By the time the click event fires,\n // the backdrop is unmounted and event.target falls through to <body>,\n // which would incorrectly trigger the outside-click handler.\n // At pointerdown time the backdrop is still in the DOM, so\n // portalTracker.containsElement correctly identifies it.\n useEffect(() => {\n const handleClickOutside = event => {\n const target = event.target;\n if (tableContainerRef.current && !tableContainerRef.current.contains(target) && !portalTracker?.containsElement(target)) {\n setFocusedRowId(null);\n }\n };\n document.addEventListener(\"pointerdown\", handleClickOutside);\n return () => {\n document.removeEventListener(\"pointerdown\", handleClickOutside);\n };\n }, [portalTracker, setFocusedRowId]);\n return /*#__PURE__*/React.createElement(PortalContainerProvider, {\n container: objectTablePortalRef\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: objectTablePortalRef,\n className: classNames(styles.osdkTableWrapper, className)\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: tableContainerRef,\n className: styles.osdkTableContainer,\n onScroll: handleScroll\n }, /*#__PURE__*/React.createElement(\"table\", null, isLoading && !hasData ? /*#__PURE__*/React.createElement(LoadingStateTable, {\n table: table,\n headerGroups: headerGroups,\n rowHeight: rowHeight,\n tableContainerRef: tableContainerRef\n }) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TableHeader, {\n table: table,\n headerMenuFeatureFlags: headerMenuFeatureFlags,\n onColumnHeaderClick: onColumnHeaderClick\n }), /*#__PURE__*/React.createElement(TableBody, {\n rows: rows,\n tableContainerRef: tableContainerRef,\n onRowClick: onRowClick,\n rowHeight: rowHeight,\n renderCellContextMenu: renderCellContextMenu,\n isLoadingMore: isLoadingMore,\n headerGroups: headerGroups,\n focusedRowId: focusedRowId,\n setFocusedRowId: setFocusedRowId,\n isInEditMode: editableConfig?.editModeState.isActive,\n getRowAttributes: getRowAttributes\n }))), !hasData && error == null && (renderEmptyState != null ? renderEmptyState() : /*#__PURE__*/React.createElement(NonIdealState, {\n message: \"No Data\"\n })), error != null && /*#__PURE__*/React.createElement(NonIdealState, {\n message: `Error Loading Data: ${error.message}`\n })), showEditFooter && hasEditableColumns && editableConfig && /*#__PURE__*/React.createElement(TableEditContainer, {\n editableConfig: editableConfig,\n hasFocusedRow: focusedRowId != null\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/**\n * Derives the object set representing the current row selection.\n *\n * The selection is filtered down to the selected primary keys via the\n * `$primaryKey` special property, so this works for both object and interface\n * types without resolving the underlying primary key property name. When every\n * row is selected, the full `resultingObjectSet` is returned unchanged.\n *\n * Returns `undefined` when there is no resulting object set to derive from.\n */\nexport function deriveSelectionObjectSet(resultingObjectSet, change) {\n if (!resultingObjectSet) {\n return undefined;\n }\n if (change.isSelectAll && change.selectedRows.length > 0) {\n return resultingObjectSet;\n }\n const whereClause = {\n $primaryKey: {\n $in: change.selectedRows.map(r => r.$primaryKey)\n }\n };\n return resultingObjectSet.where(whereClause);\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, useImperativeHandle, useMemo } from \"react\";\nimport { useColumnDefs } from \"./hooks/useColumnDefs.js\";\nimport { useColumnPinning } from \"./hooks/useColumnPinning.js\";\nimport { useColumnResize } from \"./hooks/useColumnResize.js\";\nimport { useColumnVisibility } from \"./hooks/useColumnVisibility.js\";\nimport { useEditableTable } from \"./hooks/useEditableTable.js\";\nimport { useObjectTableData } from \"./hooks/useObjectTableData.js\";\nimport { useObjectTableSnapshot } from \"./hooks/useObjectTableSnapshot.js\";\nimport { useRowSelection } from \"./hooks/useRowSelection.js\";\nimport { useSelectionColumn } from \"./hooks/useSelectionColumn.js\";\nimport { useTableSorting } from \"./hooks/useTableSorting.js\";\nimport { BaseTable } from \"./Table.js\";\nimport { deriveSelectionObjectSet } from \"./utils/deriveSelectionObjectSet.js\";\nimport { getRowId, getRowIdFromPrimaryKey } from \"./utils/getRowId.js\";\nconst EMPTY_ARRAY = [];\n\n/**\n * ObjectTable - A headless table component for displaying OSDK object sets\n *\n * @example\n * ```tsx\n * <ObjectTable objectType={MyObjectType} />\n * ```\n */\n\nexport function ObjectTable({\n objectType,\n objectSet,\n columnDefinitions,\n filter,\n objectSetOptions,\n dedupeIntervalMs,\n pageSize,\n streamUpdates,\n orderBy,\n defaultOrderBy,\n onOrderByChanged,\n onColumnsPinnedChanged,\n onColumnResize,\n // eslint-disable-next-line @typescript-eslint/no-deprecated -- intentional pass-through to fire alongside onRowSelectionChanged for backwards compatibility\n onRowSelection,\n onRowSelectionChanged,\n onColumnHeaderClick,\n renderCellContextMenu,\n selectionMode = \"none\",\n selectedRows,\n isAllSelected: isAllSelectedProp,\n onColumnVisibilityChanged,\n onCellValueChanged,\n onSubmitEdits,\n enableOrdering = true,\n enableColumnPinning = true,\n enableColumnResizing = true,\n enableColumnConfig = true,\n editMode = \"manual\",\n focusedRow,\n onFocusedRowChanged,\n tableRef,\n ...props\n}) {\n const {\n columnSizing,\n onColumnSizingChange\n } = useColumnResize({\n onColumnResize\n });\n const {\n sorting,\n onSortingChange,\n orderByState\n } = useTableSorting({\n orderBy,\n defaultOrderBy,\n onOrderByChanged\n });\n const {\n data,\n fetchMore,\n isLoading,\n error,\n totalCount,\n objectSet: resultingObjectSet\n } = useObjectTableData(objectType, columnDefinitions, filter, sorting, objectSet, objectSetOptions, dedupeIntervalMs, pageSize, streamUpdates);\n const {\n columns,\n loading: isColumnsLoading\n } = useColumnDefs(objectType, columnDefinitions);\n const handleRowSelectionChanged = useCallback(change => {\n if (!onRowSelectionChanged) return;\n onRowSelectionChanged({\n selectedRows: change.selectedRows,\n isSelectAll: change.isSelectAll,\n objectSet: deriveSelectionObjectSet(resultingObjectSet, change)\n });\n }, [onRowSelectionChanged, resultingObjectSet]);\n const {\n rowSelection,\n isAllSelected,\n hasSelection,\n onToggleAll,\n onToggleRow,\n enableRowSelection\n } = useRowSelection({\n selectionMode,\n selectedRows,\n isAllSelected: isAllSelectedProp,\n onRowSelection,\n onRowSelectionChanged: handleRowSelectionChanged,\n data\n });\n const selectionColumn = useSelectionColumn({\n selectionMode,\n isAllSelected,\n hasSelection,\n onToggleAll,\n onToggleRow\n });\n const {\n columnVisibility,\n onColumnVisibilityChange,\n columnOrder,\n onColumnOrderChange\n } = useColumnVisibility({\n allColumns: columns,\n onColumnVisibilityChanged\n });\n const {\n columnPinning,\n onColumnPinningChange\n } = useColumnPinning({\n columnDefinitions,\n hasSelectionColumn: enableRowSelection,\n onColumnsPinnedChanged\n });\n const allColumns = useMemo(() => {\n return selectionColumn ? [selectionColumn, ...columns] : columns;\n }, [selectionColumn, columns]);\n const editableConfig = useEditableTable({\n editMode,\n onCellValueChanged,\n onSubmitEdits\n });\n const table = useReactTable({\n data: data ?? EMPTY_ARRAY,\n columns: allColumns,\n getCoreRowModel: getCoreRowModel(),\n state: {\n columnVisibility,\n columnOrder,\n rowSelection,\n sorting,\n columnSizing,\n columnPinning\n },\n onSortingChange,\n onColumnSizingChange,\n onColumnPinningChange,\n onColumnVisibilityChange,\n onColumnOrderChange,\n enableRowSelection,\n enableSorting: enableOrdering,\n columnResizeMode: \"onChange\",\n columnResizeDirection: \"ltr\",\n manualSorting: true,\n // Enable manual sorting to indicate server-side sorting\n defaultColumn: {\n minSize: 80\n },\n getRowId,\n meta: {\n onCellEdit: editableConfig.onCellEdit,\n onCellValidationError: editableConfig.onCellValidationError,\n clearCellValidationError: editableConfig.clearCellValidationError,\n cellEdits: editableConfig.cellEdits,\n isInEditMode: editableConfig.editModeState.isActive,\n validationErrors: editableConfig.validationErrors\n }\n });\n const {\n getSnapshot\n } = useObjectTableSnapshot({\n objectOrInterfaceType: objectType,\n table,\n columnDefinitions,\n objectSet: resultingObjectSet,\n pageSize,\n totalCount,\n orderBy: orderByState\n });\n useImperativeHandle(tableRef, () => ({\n getSnapshot\n }), [getSnapshot]);\n const onRenderCellContextMenu = useCallback((row, cell) => {\n return renderCellContextMenu?.(row, cell.getValue());\n }, [renderCellContextMenu]);\n const handleColumnHeaderClick = useMemo(() => onColumnHeaderClick ? columnId => onColumnHeaderClick(columnId) : undefined, [onColumnHeaderClick]);\n const isTableLoading = isLoading || isColumnsLoading;\n const headerMenuFeatureFlags = useMemo(() => ({\n showSortingItems: enableOrdering,\n showPinningItems: enableColumnPinning,\n showResizeItem: enableColumnResizing,\n showConfigItem: enableColumnConfig\n }), [enableOrdering, enableColumnPinning, enableColumnResizing, enableColumnConfig]);\n return /*#__PURE__*/React.createElement(BaseTable, {\n table: table,\n isLoading: isTableLoading,\n fetchNextPage: fetchMore,\n onRowClick: props.onRowClick,\n onColumnHeaderClick: handleColumnHeaderClick,\n rowHeight: props.rowHeight,\n renderCellContextMenu: onRenderCellContextMenu,\n renderEmptyState: props.renderEmptyState,\n className: props.className,\n error: error,\n headerMenuFeatureFlags: headerMenuFeatureFlags,\n editableConfig: editableConfig,\n getRowAttributes: props.getRowAttributes,\n showEditFooter: props.showEditFooter,\n focusedRowId: focusedRow == null ? focusedRow : getRowIdFromPrimaryKey(focusedRow),\n onFocusedRowChanged: onFocusedRowChanged\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// ObjectTable that loads and displays data for a given objectSet\nimport { ObjectTable as _ObjectTable } from \"../../object-table/ObjectTable.js\";\nimport { withOsdkMetrics } from \"../../util/withOsdkMetrics.js\";\nexport const ObjectTable = withOsdkMetrics(_ObjectTable, \"ObjectTable\");\n\n// BaseTable that does not handle data fetching\n\nexport { BaseTable } from \"../../object-table/Table.js\";\nexport { ColumnConfigDialog } from \"../../object-table/ColumnConfigDialog.js\";\nexport { MultiColumnSortDialog } from \"../../object-table/MultiColumnSortDialog.js\";\n// Loading cell components for custom column renderers.\n// Use `LoadingCell` when rendering a full `<td>` element (e.g. in a custom row renderer).\n// Use `LoadingCellContent` when rendering just the skeleton content inside an existing cell.\nexport { LoadingCell, LoadingCellContent } from \"../../object-table/LoadingCell.js\";"]}
1
+ {"version":3,"sources":["../../src/object-table/LoadingCell.module.css","../../src/object-table/TableCell.module.css","../../src/object-table/LoadingCell.tsx","../../src/object-table/components/AsyncValueCell.tsx","../../src/object-table/utils/markingValue.ts","../../src/object-table/components/CbacMarkingCell.tsx","../../src/object-table/components/MandatoryMarkingCell.module.css","../../src/object-table/components/MandatoryMarkingCell.tsx","../../src/object-table/EditableCell.module.css","../../src/object-table/utils/PortalTracker.tsx","../../src/object-table/components/DatePickerCellField.tsx","../../src/object-table/components/ReadonlyDisplayCell.tsx","../../src/object-table/components/DropdownCellField.tsx","../../src/object-table/components/TextInputCellField.tsx","../../src/object-table/utils/editableUtils.ts","../../src/object-table/EditableCell.tsx","../../src/object-table/utils/AsyncCellData.ts","../../src/object-table/utils/getCellId.ts","../../src/object-table/utils/shouldShowEditableCell.ts","../../src/object-table/DefaultCellRenderer.tsx","../../src/object-table/hooks/useColumnDefs.ts","../../src/object-table/utils/constants.ts","../../src/object-table/hooks/useColumnPinning.ts","../../src/object-table/hooks/useColumnResize.ts","../../src/object-table/hooks/useColumnVisibility.ts","../../src/object-table/hooks/useEditableTable.ts","../../src/object-table/utils/functionColumns.ts","../../src/object-table/hooks/useFunctionColumnsData.ts","../../src/object-table/hooks/useObjectTableData.ts","../../src/object-table/utils/objectTableSnapshot.ts","../../src/object-table/hooks/useObjectTableSnapshot.ts","../../src/object-table/utils/getRowId.ts","../../src/object-table/hooks/useRowSelection.ts","../../src/object-table/SelectionCells.tsx","../../src/object-table/hooks/useSelectionColumn.tsx","../../src/object-table/hooks/useTableSorting.ts","../../src/object-table/hooks/useFocusedRow.ts","../../src/object-table/TableRow.module.css","../../src/object-table/LoadingRow.tsx","../../src/object-table/TableBody.module.css","../../src/base-components/draggable-list/DraggableList.module.css","../../src/base-components/draggable-list/DraggableList.tsx","../../src/object-table/ColumnConfigDialog.module.css","../../src/object-table/ColumnConfigDialog.tsx","../../src/object-table/MultiColumnSortDialog.module.css","../../src/object-table/SortableItemsList.tsx","../../src/object-table/MultiColumnSortDialog.tsx","../../src/object-table/TableHeader.module.css","../../src/object-table/TableHeaderContent.module.css","../../src/object-table/TableHeaderContent.tsx","../../src/object-table/TableHeaderWithPopover.module.css","../../src/object-table/TableHeaderWithPopover.tsx","../../src/object-table/utils/getColumnPinningStyles.ts","../../src/object-table/TableHeader.tsx","../../src/object-table/LoadingStateTable.tsx","../../src/object-table/NonIdealState.module.css","../../src/object-table/NonIdealState.tsx","../../src/object-table/Table.module.css","../../src/object-table/CellContextMenu.module.css","../../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/TableEditContainer.module.css","../../src/object-table/TableEditContainer.tsx","../../src/object-table/Table.tsx","../../src/object-table/utils/deriveSelectionObjectSet.ts","../../src/object-table/ObjectTable.tsx","../../src/public/experimental/object-table.ts"],"names":["React","SkeletonBar","classNames","CbacBanner","useRef","useCallback","useContext","useMemo","formatDateForInput","DatePicker","Error","_extends","DropdownField","Input","useState","useEffect","Tooltip","useOsdkMetadata","chunk","useOsdkClient","useOsdkFunctions","useObjectSet","useOsdkObjects","useEventCallback","Checkbox","useSortable","CSS","Trash","SmallCross","DragHandleVertical","Button","useSensors","useSensor","PointerSensor","KeyboardSensor","sortableKeyboardCoordinates","BaseDndContext","closestCenter","SortableContext","verticalListSortingStrategy","arrayMove","ActionButton","Dialog","Cog","SearchBar","Collapsible","CaretDown","SmallInfoSign","SortAlphabetical","SortAlphabeticalDesc","DialogTitle","SearchableMenu","Add","flexRender","Menu","usePortalContainer","Pin","ChevronDown","Unpin","Sort","Remove","VerticalDistribution","Settings","header","createPortal","useVirtualizer","useLayoutEffect","PortalContainerProvider","useReactTable","getCoreRowModel","useImperativeHandle","ObjectTable","withOsdkMetrics"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,mBAAA,GAAA,EAAA;;;ACAA,IAAA,iBAAA,GAAA,EAAA;;;ACqBO,SAAS,kBAAA,GAAqB;AACnC,EAAA,uBAAoBA,wBAAA,CAAM,cAAcC,6BAAA,EAAa;AAAA,IACnD,SAAA,EAAWC,4BAAA,CAAW,mBAAA,CAAO,eAAA,EAAiB,oBAAO,gBAAgB;AAAA,GACtE,CAAA;AACH;AACO,SAAS,WAAA,CAAY;AAAA,EAC1B;AACF,CAAA,EAAG;AACD,EAAA,uBAAoBF,wBAAA,CAAM,cAAc,IAAA,EAAM;AAAA,IAC5C,WAAW,iBAAA,CAAW,aAAA;AAAA,IACtB,KAAA,EAAO;AAAA,MACL;AAAA;AACF,GACF,kBAAgBA,wBAAA,CAAM,aAAA,CAAc,kBAAA,EAAoB,IAAI,CAAC,CAAA;AAC/D;;;ACjBO,SAAS,cAAA,CAAe;AA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AAA,IAAc,IAAA,GAAO,UAAA,GAAa,uBAAuB,UAAU,CAAA;AAAA,IACjF;AAAA,GACD,CAAA;AACH;;;AC3NO,IAAMuE,YAAAA,GAAcC,iCAAA,CAAgB,WAAA,EAAc,aAAa","file":"chunk-PSXAPQB3.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\n.osdkLoadingCell {\n height: var(--osdk-table-cell-fontSize);\n border-radius: calc(var(--osdk-surface-border-radius) * 0.5);\n flex: 1;\n}\n\n.osdkCellSkeleton.osdkCellSkeleton {\n --osdk-background-skeleton-from: var(--osdk-table-skeleton-color-from);\n --osdk-background-skeleton-to: var(--osdk-table-skeleton-color-to);\n border-radius: calc(var(--osdk-surface-border-radius) * 0.5);\n box-shadow: none;\n color: transparent;\n cursor: default;\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 height: 100%;\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: var(--osdk-table-cell-bg, 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: none;\n }\n}\n\n.osdkTableCell[data-pinned=\"left\"],\n.osdkTableCell[data-pinned=\"right\"] {\n position: sticky;\n z-index: var(--osdk-surface-z-index-1);\n background-color: var(--osdk-table-cell-bg, inherit);\n}\n\n/* Last left-pinned column - no left-pinned siblings after it */\n.osdkTableCell[data-pinned=\"left\"]:not(:has(~ [data-pinned=\"left\"])) {\n border-right: var(--osdk-table-pinned-column-border);\n}\n\n/* First right-pinned column - no right-pinned siblings before it */\n.osdkTableCell[data-pinned=\"right\"]:not(\n :has(~ [data-pinned=\"right\"]):nth-child(n + 2)\n ) {\n border-left: var(--osdk-table-pinned-column-border);\n}\n\n.osdkTableCell:has([role=\"checkbox\"]) {\n justify-content: center;\n padding: 0;\n}\n\n.osdkTableCellContent:not(:has([role=\"checkbox\"])) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n flex: 1;\n}\n\n.osdkCheckboxContainer {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\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 from \"react\";\nimport { SkeletonBar } from \"../base-components/skeleton/SkeletonBar.js\";\nimport styles from \"./LoadingCell.module.css\";\nimport cellStyles from \"./TableCell.module.css\";\nexport function LoadingCellContent() {\n return /*#__PURE__*/React.createElement(SkeletonBar, {\n className: classNames(styles.osdkLoadingCell, styles.osdkCellSkeleton)\n });\n}\nexport function LoadingCell({\n width\n}) {\n return /*#__PURE__*/React.createElement(\"td\", {\n className: cellStyles.osdkTableCell,\n style: {\n width\n }\n }, /*#__PURE__*/React.createElement(LoadingCellContent, null));\n}","/*\n * Copyright 2026 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 from \"react\";\nimport { LoadingCellContent } from \"../LoadingCell.js\";\nexport function AsyncValueCell({\n data,\n isLoading,\n error\n}) {\n if (error != null) {\n return \"Error\";\n }\n if (data != null) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, data);\n }\n if (isLoading) {\n return /*#__PURE__*/React.createElement(LoadingCellContent, null);\n }\n return \"No value\";\n}","/*\n * Copyright 2026 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/**\n * Normalize a marking property's cell value into a string[] of marking ids.\n * Marking properties may arrive as a single string (single-valued) or\n * string[] (multi-valued); null/undefined become an empty array.\n *\n * Duplicates are removed so callers (e.g. per-marking pill renderers) can\n * safely use the marking id as a React key.\n */\nexport function toMarkingIdArray(value) {\n if (value == null) {\n return [];\n }\n if (typeof value === \"string\") {\n return [value];\n }\n if (Array.isArray(value)) {\n const ids = value.filter(v => typeof v === \"string\");\n return Array.from(new Set(ids));\n }\n return [];\n}","/*\n * Copyright 2026 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 from \"react\";\nimport { CbacBanner } from \"../../cbac-picker/CbacBanner.js\";\nimport { toMarkingIdArray } from \"../utils/markingValue.js\";\nexport function CbacMarkingCell({\n value\n}) {\n const markingIds = toMarkingIdArray(value);\n if (markingIds.length === 0) {\n return null;\n }\n return /*#__PURE__*/React.createElement(CbacBanner, {\n markingIds: markingIds\n });\n}",".container {\n display: flex;\n flex-wrap: wrap;\n gap: var(--osdk-surface-spacing);\n align-items: center;\n}\n\n.pill {\n max-width: 100%;\n}\n","/*\n * Copyright 2026 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 from \"react\";\nimport { CbacBanner } from \"../../cbac-picker/CbacBanner.js\";\nimport { toMarkingIdArray } from \"../utils/markingValue.js\";\nimport styles from \"./MandatoryMarkingCell.module.css\";\n/**\n * Renders one CBAC-resolved banner per marking on the row. MANDATORY marking\n * columns render per-marking (rather than via a single combined banner) so\n * each individual marking on the object is visible at a glance.\n */\nexport function MandatoryMarkingCell({\n value\n}) {\n const markingIds = toMarkingIdArray(value);\n if (markingIds.length === 0) {\n return null;\n }\n return /*#__PURE__*/React.createElement(\"span\", {\n className: styles.container\n }, markingIds.map(id => /*#__PURE__*/React.createElement(CbacBanner, {\n key: id,\n markingIds: [id],\n className: styles.pill\n })));\n}",".osdkEditableCell {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: var(--osdk-surface-spacing);\n\n padding: var(--osdk-surface-spacing) calc(var(--osdk-surface-spacing) * 3);\n border-radius: var(--osdk-surface-border-radius);\n border: var(--osdk-surface-border-width) solid transparent;\n background: inherit;\n\n tr[data-focused=\"true\"] & {\n border: var(--osdk-table-cell-editable-border);\n background: var(--osdk-table-cell-input-bg);\n\n &.osdkEditedInput {\n border: var(--osdk-table-cell-edited-border);\n }\n\n &:focus-within,\n &.osdkEditedInput:focus-within {\n border: var(--osdk-emphasis-focus-width) solid\n var(--osdk-emphasis-focus-color);\n }\n\n &.error {\n border: var(--osdk-table-cell-edited-border-error);\n\n &:focus-within {\n border: var(--osdk-emphasis-focus-width) solid\n var(--osdk-intent-danger-rest);\n }\n }\n }\n\n &.error {\n background: var(--osdk-table-cell-input-bg);\n border: var(--osdk-table-cell-edited-border-error);\n }\n}\n\n.osdkEditableCellTrigger {\n width: 100%;\n}\n\n.osdkEditableCellDropdown {\n /* Override the default borders in dropdown */\n --osdk-select-border-color: transparent;\n --osdk-combobox-border-color: transparent;\n --osdk-combobox-focus-border-color: transparent;\n\n /* Match the text-input editable cell background so the row reads as a\n single field strip instead of mixed surface colors. */\n --osdk-select-trigger-bg: var(--osdk-table-cell-input-bg);\n --osdk-combobox-trigger-bg: var(--osdk-table-cell-input-bg);\n\n --osdk-combobox-input-padding: var(--osdk-surface-spacing)\n calc(var(--osdk-surface-spacing) * 3);\n\n --osdk-select-trigger-padding: var(--osdk-surface-spacing)\n calc(var(--osdk-surface-spacing) * 3);\n\n border-radius: var(--osdk-surface-border-radius);\n\n tr[data-focused=\"true\"] & {\n border: var(--osdk-table-cell-editable-border);\n background: var(--osdk-table-cell-input-bg);\n\n &.osdkEditedInput {\n border: var(--osdk-table-cell-edited-border);\n }\n\n &:focus-within,\n &.osdkEditedInput:focus-within {\n border: var(--osdk-emphasis-focus-width) solid\n var(--osdk-emphasis-focus-color);\n }\n\n &.error {\n border: var(--osdk-table-cell-edited-border-error);\n\n &:focus-within {\n border: var(--osdk-emphasis-focus-width) solid\n var(--osdk-intent-danger-rest);\n }\n }\n }\n\n &.error {\n background: var(--osdk-table-cell-input-bg);\n border: var(--osdk-table-cell-edited-border-error);\n }\n}\n\n.osdkEditableCellDatePicker {\n /* Override the default borders/shadow in date picker so the cell wrapper\n is the only thing painting a border on focus. Without these overrides\n the date picker's own input-wrapper draws a box-shadow on top of the\n cell border, masking the cell's :focus-within outline. */\n --osdk-datetime-input-bg: transparent;\n --osdk-datetime-input-bg-hover: transparent;\n --osdk-datetime-input-shadow: none;\n --osdk-datetime-input-shadow-error: none;\n --osdk-datetime-input-focus-shadow: none;\n --osdk-datetime-input-focus-shadow-error: none;\n\n --osdk-datetime-input-padding: var(--osdk-surface-spacing)\n calc(var(--osdk-surface-spacing) * 3);\n\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-radius: var(--osdk-surface-border-radius);\n /* Reserve space for the focus border so layout doesn't shift on focus,\n matching .osdkEditableCell. */\n border: var(--osdk-surface-border-width) solid transparent;\n\n tr[data-focused=\"true\"] & {\n border: var(--osdk-table-cell-editable-border);\n background: var(--osdk-table-cell-input-bg);\n\n &.osdkEditedInput {\n border: var(--osdk-table-cell-edited-border);\n }\n\n &:focus-within,\n &.osdkEditedInput:focus-within {\n border: var(--osdk-emphasis-focus-width) solid\n var(--osdk-emphasis-focus-color);\n }\n\n &.error {\n border: var(--osdk-table-cell-edited-border-error);\n\n &:focus-within {\n border: var(--osdk-emphasis-focus-width) solid\n var(--osdk-intent-danger-rest);\n }\n }\n }\n\n &.error {\n background: var(--osdk-table-cell-input-bg);\n border: var(--osdk-table-cell-edited-border-error);\n }\n}\n\n.readonlyDisplayCell {\n padding: calc(var(--osdk-surface-spacing) * 0.5) 0;\n min-height: 1lh;\n}\n\n.nonEditableCellInEditMode {\n padding-left: calc(var(--osdk-surface-spacing) * 3);\n}\n\n.osdkEditableInput {\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n background: inherit;\n color: var(--osdk-typography-color-default-rest);\n border: none;\n\n &:focus {\n outline: none;\n }\n}\n\n.osdkEditedInput {\n border-radius: var(--osdk-surface-border-radius);\n border: var(--osdk-table-cell-edited-border);\n background: var(--osdk-table-cell-input-bg);\n}\n\n.validationError {\n display: flex;\n align-items: center;\n gap: var(--osdk-surface-spacing);\n}\n\n.errorIcon {\n color: var(--osdk-intent-danger-rest);\n}\n\n.errorIconWrapper {\n margin-right: calc(var(--osdk-surface-spacing) * 3);\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, { createContext, useCallback, useContext, useRef } from \"react\";\nconst PortalTrackerContext = /*#__PURE__*/createContext(undefined);\nexport function PortalTrackerProvider({\n children\n}) {\n const portalsRef = useRef(new Set());\n const register = useCallback(element => {\n portalsRef.current.add(element);\n return () => {\n portalsRef.current.delete(element);\n };\n }, []);\n const containsElement = useCallback(node => {\n for (const portal of portalsRef.current) {\n if (portal.contains(node)) {\n return true;\n }\n }\n return false;\n }, []);\n const value = useRef({\n register,\n containsElement\n });\n return /*#__PURE__*/React.createElement(PortalTrackerContext.Provider, {\n value: value.current\n }, children);\n}\nexport function usePortalTracker() {\n return useContext(PortalTrackerContext);\n}\n\n/**\n * Registers a DOM element as a tracked portal container.\n * Call with the portal's root element once it mounts.\n * The element is automatically unregistered on unmount.\n *\n * Usage in a component that renders a portaled dropdown:\n * ```tsx\n * const registerPortal = useRegisterPortal();\n * <Select.Portal ref={registerPortal}>...</Select.Portal>\n * ```\n */\nexport function useRegisterPortal() {\n const tracker = useContext(PortalTrackerContext);\n const cleanupRef = useRef(null);\n return useCallback(element => {\n cleanupRef.current?.();\n cleanupRef.current = null;\n if (element && tracker) {\n cleanupRef.current = tracker.register(element);\n }\n }, [tracker]);\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 { Error } from \"@blueprintjs/icons\";\nimport classNames from \"classnames\";\nimport React, { useCallback, useMemo } from \"react\";\nimport { DatePicker } from \"../../shared/calendar/index.js\";\nimport { formatDateForInput } from \"../../shared/dateUtils.js\";\nimport styles from \"../EditableCell.module.css\";\nimport { useRegisterPortal } from \"../utils/PortalTracker.js\";\nfunction parseDateValue(input) {\n if (input === \"\") {\n return null;\n }\n const date = new Date(input);\n if (isNaN(date.getTime())) {\n return null;\n }\n return date;\n}\nfunction DatePickerCellFieldInner({\n fieldComponentProps,\n inputValue,\n hasValidationError,\n isEdited,\n onChange,\n dataType\n}) {\n const portalRef = useRegisterPortal();\n const dateValue = useMemo(() => parseDateValue(inputValue), [inputValue]);\n const showTime = fieldComponentProps?.showTime ?? dataType === \"timestamp\";\n const handleChange = useCallback(newValue => {\n if (newValue == null) {\n onChange(null);\n return;\n }\n onChange(showTime ? newValue.toISOString() : formatDateForInput(newValue));\n }, [onChange, showTime]);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(styles.osdkEditableCellDatePicker, {\n [styles.error]: hasValidationError,\n [styles.osdkEditedInput]: isEdited\n })\n }, /*#__PURE__*/React.createElement(DatePicker, _extends({}, fieldComponentProps, {\n showTime: showTime,\n value: dateValue,\n onChange: handleChange,\n portalRef: portalRef,\n modal: false\n })), hasValidationError && /*#__PURE__*/React.createElement(\"span\", {\n className: styles.errorIconWrapper\n }, /*#__PURE__*/React.createElement(Error, {\n className: styles.errorIcon\n })));\n}\nexport const DatePickerCellField = /*#__PURE__*/React.memo(DatePickerCellFieldInner);","/*\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 { Error } from \"@blueprintjs/icons\";\nimport classNames from \"classnames\";\nimport React from \"react\";\nimport styles from \"../EditableCell.module.css\";\nfunction ReadonlyDisplayCellInner({\n inputValue,\n hasValidationError,\n isEdited\n}) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(styles.osdkEditableCell, {\n [styles.error]: hasValidationError,\n [styles.osdkEditedInput]: isEdited\n })\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(styles.osdkEditableInput, styles.readonlyDisplayCell)\n }, inputValue), hasValidationError && /*#__PURE__*/React.createElement(Error, {\n className: styles.errorIcon\n }));\n}\nexport const ReadonlyDisplayCell = /*#__PURE__*/React.memo(ReadonlyDisplayCellInner);","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 classNames from \"classnames\";\nimport React from \"react\";\nimport { DropdownField } from \"../../action-form/fields/DropdownField.js\";\nimport styles from \"../EditableCell.module.css\";\nimport { useRegisterPortal } from \"../utils/PortalTracker.js\";\nimport { ReadonlyDisplayCell } from \"./ReadonlyDisplayCell.js\";\nfunction DropdownCellFieldInner({\n fieldComponentProps,\n isRowFocused,\n inputValue,\n value,\n hasValidationError,\n isEdited,\n onChange\n}) {\n const portalRef = useRegisterPortal();\n const {\n itemToStringLabel\n } = fieldComponentProps;\n if (!isRowFocused) {\n return /*#__PURE__*/React.createElement(ReadonlyDisplayCell, {\n inputValue: itemToStringLabel ? itemToStringLabel(value) : inputValue,\n hasValidationError: hasValidationError,\n isEdited: isEdited\n });\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(styles.osdkEditableCellDropdown, {\n [styles.error]: hasValidationError,\n [styles.osdkEditedInput]: isEdited\n })\n }, /*#__PURE__*/React.createElement(DropdownField, _extends({}, fieldComponentProps, {\n portalRef: portalRef,\n value: value,\n onChange: onChange,\n modal: false\n })));\n}\nexport const DropdownCellField = /*#__PURE__*/React.memo(DropdownCellFieldInner);","/*\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 { Input } from \"@base-ui/react/input\";\nimport { Error } from \"@blueprintjs/icons\";\nimport classNames from \"classnames\";\nimport React from \"react\";\nimport styles from \"../EditableCell.module.css\";\nfunction TextInputCellFieldInner({\n inputType,\n inputValue,\n hasValidationError,\n isEdited,\n onValueChange,\n onBlur,\n onKeyDown\n}) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(styles.osdkEditableCell, {\n [styles.error]: hasValidationError,\n [styles.osdkEditedInput]: isEdited\n })\n }, /*#__PURE__*/React.createElement(Input, {\n type: inputType,\n value: inputValue,\n className: styles.osdkEditableInput,\n onValueChange: onValueChange,\n onBlur: onBlur,\n onKeyDown: onKeyDown,\n \"aria-invalid\": hasValidationError\n }), hasValidationError && /*#__PURE__*/React.createElement(Error, {\n className: styles.errorIcon\n }));\n}\nexport const TextInputCellField = /*#__PURE__*/React.memo(TextInputCellFieldInner);","/*\n * Copyright 2026 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/**\n * Whether a column declares any editing behavior.\n *\n * Returns `true` when `editable` is `true` or a predicate function. The\n * predicate may still return `false` for individual rows — that decision is\n * made per-cell via {@link isCellEditable}. This function answers the\n * column-level question used to drive table-wide UI like the bottom edit bar.\n */\nexport function isColumnDeclaredEditable(editable) {\n return editable === true || typeof editable === \"function\";\n}\n\n/**\n * Whether a specific cell is editable, given the column's `editable` value\n * and the row's object. Used at render time per cell.\n */\nexport function isCellEditable(editable, object) {\n if (typeof editable === \"function\") {\n return editable(object);\n }\n return editable === true;\n}\n\n/**\n * Whether two cell values are equivalent for the purpose of detecting \"no\n * actual edit\". Treats `null` and `undefined` as the same \"empty\" state so\n * clearing a never-set cell doesn't register as an edit. `\"\"` is kept\n * distinct because an empty string can be meaningful data (e.g. a data\n * quality signal) and clearing it to null IS an edit.\n */\nexport function cellValuesEqual(a, b) {\n return (a ?? null) === (b ?? null);\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 { Error } from \"@blueprintjs/icons\";\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { Tooltip } from \"../base-components/tooltip/Tooltip.js\";\nimport { DatePickerCellField } from \"./components/DatePickerCellField.js\";\nimport { DropdownCellField } from \"./components/DropdownCellField.js\";\nimport { TextInputCellField } from \"./components/TextInputCellField.js\";\nimport styles from \"./EditableCell.module.css\";\nimport { cellValuesEqual } from \"./utils/editableUtils.js\";\nconst NUMBER_TYPES = [\"double\", \"integer\", \"long\", \"float\", \"decimal\", \"byte\", \"short\"];\nconst DATE_TYPES = [\"datetime\", \"timestamp\"];\nconst VALIDATION_ERROR_MESSAGE = \"Validation error\";\nfunction valueToString(value) {\n if (value == null) {\n return \"\";\n }\n if (typeof value === \"object\") {\n return JSON.stringify(value);\n }\n // At this point, value is a primitive (string, number, boolean, symbol, bigint)\n return String(value);\n}\nfunction parseValueByType(value, dataType) {\n if (!dataType || !NUMBER_TYPES.includes(dataType)) {\n return value;\n }\n if (value === \"\") {\n return null;\n }\n const parsedNumber = Number(value);\n if (isNaN(parsedNumber)) {\n return value;\n }\n return parsedNumber;\n}\nfunction EditableCellInner({\n initialValue,\n currentValue,\n cellId,\n dataType,\n onCellEdit,\n onCellValidationError,\n clearCellValidationError,\n originalRowData,\n rowId,\n columnId,\n validateEdit,\n validationError,\n editFieldConfig,\n rowCellEdits,\n isRowFocused = false\n}) {\n const [inputValue, setInputValue] = useState(valueToString(currentValue));\n const isCancelled = useRef(false);\n const validationAbortControllerRef = useRef(null);\n const abortValidation = useCallback(() => {\n if (validationAbortControllerRef.current) {\n validationAbortControllerRef.current.abort();\n validationAbortControllerRef.current = null;\n }\n }, []);\n const hasValidationError = validationError != null;\n const isEdited = !cellValuesEqual(currentValue, initialValue);\n useEffect(() => {\n setInputValue(valueToString(currentValue));\n }, [currentValue]);\n useEffect(() => {\n return () => {\n abortValidation();\n };\n }, [abortValidation]);\n const runValidation = useCallback(parsedValue => {\n if (!validateEdit) {\n return;\n }\n const controller = new AbortController();\n validationAbortControllerRef.current = controller;\n const validationPromise = validateEdit(parsedValue);\n\n // Race between validation and abort\n Promise.race([validationPromise, new Promise((_, reject) => {\n controller.signal.addEventListener(\"abort\", () => {\n reject(new DOMException(\"Aborted\", \"AbortError\"));\n });\n })]).then(errorMessage => {\n if (controller.signal.aborted) {\n return;\n }\n if (errorMessage) {\n onCellValidationError?.(cellId, errorMessage);\n } else {\n clearCellValidationError?.(cellId);\n }\n }, error => {\n if (!controller.signal.aborted && error.name !== \"AbortError\") {\n onCellValidationError?.(cellId, VALIDATION_ERROR_MESSAGE);\n }\n });\n }, [validateEdit, onCellValidationError, clearCellValidationError, cellId]);\n const commitEdit = useCallback(newValue => {\n abortValidation();\n onCellEdit(cellId, {\n rowId,\n columnId,\n newValue,\n oldValue: initialValue,\n originalRowData\n });\n runValidation(newValue);\n }, [abortValidation, onCellEdit, cellId, rowId, columnId, initialValue, originalRowData, runValidation]);\n\n // Text/number input: commit on blur\n const handleBlur = useCallback(() => {\n if (isCancelled.current) {\n isCancelled.current = false;\n return;\n }\n\n // No-op when the input wasn't actually changed by the user\n if (inputValue === valueToString(currentValue)) {\n return;\n }\n const parsedValue = parseValueByType(inputValue, dataType);\n commitEdit(parsedValue);\n }, [inputValue, currentValue, dataType, commitEdit]);\n const handleInputChange = useCallback(value => {\n // Cancel any in-flight validation\n abortValidation();\n setInputValue(value);\n }, [abortValidation]);\n const handleKeyDown = useCallback(e => {\n if (e.key === \"Enter\") {\n e.currentTarget.blur();\n }\n if (e.key === \"Escape\") {\n isCancelled.current = true;\n setInputValue(valueToString(currentValue));\n e.currentTarget.blur();\n }\n }, [currentValue]);\n const handleCommit = useCallback(newValue => {\n // No-op if the value hasn't actually moved from what the cell already\n // displays. null and undefined are treated as the same empty state so\n // a dropdown that clears a never-set cell doesn't fire; \"\" stays\n // distinct since an empty string can be meaningful data.\n if (cellValuesEqual(newValue, currentValue)) return;\n commitEdit(newValue);\n }, [commitEdit, currentValue]);\n const inputType = dataType && NUMBER_TYPES.includes(dataType) ? \"number\" : \"text\";\n\n // Compute field-component props once per (editFieldConfig, originalRowData, rowCellEdits).\n // The narrowed return type is preserved in each useMemo\n const dropdownFieldProps = useMemo(() => editFieldConfig?.fieldComponent === \"DROPDOWN\" ? editFieldConfig.getFieldComponentProps(originalRowData, rowCellEdits) : undefined, [editFieldConfig, originalRowData, rowCellEdits]);\n const datePickerFieldProps = useMemo(() => editFieldConfig?.fieldComponent === \"DATE_PICKER\" ? editFieldConfig.getFieldComponentProps(originalRowData, rowCellEdits) : undefined, [editFieldConfig, originalRowData, rowCellEdits]);\n const renderFieldInput = () => {\n switch (editFieldConfig?.fieldComponent) {\n case \"DROPDOWN\":\n return /*#__PURE__*/React.createElement(DropdownCellField, {\n fieldComponentProps: dropdownFieldProps,\n isRowFocused: isRowFocused,\n inputValue: inputValue,\n value: currentValue,\n hasValidationError: hasValidationError,\n isEdited: isEdited,\n onChange: handleCommit\n });\n case \"DATE_PICKER\":\n return /*#__PURE__*/React.createElement(DatePickerCellField, {\n fieldComponentProps: datePickerFieldProps,\n inputValue: inputValue,\n hasValidationError: hasValidationError,\n isEdited: isEdited,\n onChange: handleCommit\n });\n default:\n if (dataType != null && DATE_TYPES.includes(dataType)) {\n return /*#__PURE__*/React.createElement(DatePickerCellField, {\n inputValue: inputValue,\n hasValidationError: hasValidationError,\n isEdited: isEdited,\n onChange: handleCommit,\n dataType: dataType\n });\n }\n return /*#__PURE__*/React.createElement(TextInputCellField, {\n inputType: inputType,\n inputValue: inputValue,\n hasValidationError: hasValidationError,\n isEdited: isEdited,\n onValueChange: handleInputChange,\n onBlur: handleBlur,\n onKeyDown: handleKeyDown\n });\n }\n };\n return /*#__PURE__*/React.createElement(Tooltip.Provider, null, /*#__PURE__*/React.createElement(Tooltip.Root, {\n disabled: !hasValidationError\n }, /*#__PURE__*/React.createElement(Tooltip.Trigger, {\n className: styles.osdkEditableCellTrigger,\n render: /*#__PURE__*/React.createElement(\"span\", {\n className: styles.osdkTooltipTriggerWrapper\n })\n }, renderFieldInput()), /*#__PURE__*/React.createElement(Tooltip.Portal, null, /*#__PURE__*/React.createElement(Tooltip.Positioner, {\n sideOffset: 4,\n side: \"bottom\"\n }, /*#__PURE__*/React.createElement(Tooltip.Popup, null, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.validationError\n }, /*#__PURE__*/React.createElement(Error, {\n className: styles.errorIcon\n }), validationError), /*#__PURE__*/React.createElement(Tooltip.Arrow, null))))));\n}\nexport const EditableCell = /*#__PURE__*/React.memo(EditableCellInner);\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 isAsyncCellData = value => {\n return value != null && typeof value === \"object\" && \"__asyncCell\" in value && value.__asyncCell === true;\n};\nexport const createAsyncCellData = ({\n data,\n isLoading,\n error\n}) => ({\n __asyncCell: true,\n data,\n isLoading,\n error\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 function getCellId(cellIdentifier) {\n return JSON.stringify(cellIdentifier);\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/**\n * Determines if a cell should be rendered as editable\n *\n * @param editable - Whether the column is marked as editable\n * @param onCellEdit - The onCellEdit callback from table meta (indicates edit handlers exist)\n * @param isInEditMode - Whether the table is currently in edit mode\n * @returns true if the cell should be rendered with edit controls\n */\nexport function shouldShowEditableCell(editable, onCellEdit, isInEditMode) {\n return editable != null && editable !== false && onCellEdit != null && isInEditMode === true;\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 from \"react\";\nimport { AsyncValueCell } from \"./components/AsyncValueCell.js\";\nimport { CbacMarkingCell } from \"./components/CbacMarkingCell.js\";\nimport { MandatoryMarkingCell } from \"./components/MandatoryMarkingCell.js\";\nimport { EditableCell } from \"./EditableCell.js\";\nimport styles from \"./EditableCell.module.css\";\nimport { isAsyncCellData } from \"./utils/AsyncCellData.js\";\nimport { isCellEditable } from \"./utils/editableUtils.js\";\nimport { getCellId } from \"./utils/getCellId.js\";\nimport { shouldShowEditableCell } from \"./utils/shouldShowEditableCell.js\";\nfunction toDisplayValue(value) {\n if (typeof value === \"boolean\") {\n return String(value);\n }\n return value;\n}\n\n// Returns the subset of `cellEdits` belonging to `rowId`, re-keyed by columnId.\n// Returns `undefined` (stable reference) when the row has no pending edits, so\n// that `React.memo` on `EditableCell` can skip re-renders of unedited rows when\n// edits change elsewhere in the table.\nfunction filterCellEditsToRow(cellEdits, rowId) {\n if (!cellEdits) return undefined;\n let result;\n for (const edit of Object.values(cellEdits)) {\n if (edit.rowId === rowId) {\n result ??= {};\n result[edit.columnId] = edit;\n }\n }\n return result;\n}\nexport function renderDefaultCell(cellContext) {\n const meta = cellContext.table.options.meta;\n const columnMeta = cellContext.column.columnDef.meta;\n const cellValue = cellContext.getValue();\n const asyncCellData = isAsyncCellData(cellValue) ? cellValue : undefined;\n\n // Function-backed columns are read-only: the value is server-computed\n // and cannot be edited in the table. Return the async cell directly.\n if (columnMeta?.isAsyncColumn && asyncCellData) {\n return /*#__PURE__*/React.createElement(AsyncValueCell, asyncCellData);\n }\n if (columnMeta?.markingType === \"CBAC\") {\n return /*#__PURE__*/React.createElement(CbacMarkingCell, {\n value: cellValue\n });\n }\n if (columnMeta?.markingType === \"MANDATORY\") {\n return /*#__PURE__*/React.createElement(MandatoryMarkingCell, {\n value: cellValue\n });\n }\n const rowData = cellContext.row.original;\n const isEditable = isCellEditable(columnMeta?.editable, rowData);\n if (!meta?.onCellEdit // Type guard\n || !shouldShowEditableCell(isEditable, meta?.onCellEdit, meta?.isInEditMode)) {\n // Align non editable cells with the editable cells\n if (meta?.isInEditMode) {\n return /*#__PURE__*/React.createElement(\"span\", {\n className: styles.nonEditableCellInEditMode\n }, toDisplayValue(cellValue));\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, toDisplayValue(cellValue));\n }\n const rowId = cellContext.row.id;\n const columnId = cellContext.column.id;\n const cellId = getCellId({\n rowId,\n columnId\n });\n const cellEdits = meta.cellEdits;\n const editedValue = cellEdits?.[cellId];\n // If newValue is explicitly set to null, treat it as null. Otherwise, fall back to the original cell value.\n const currentValue = editedValue?.newValue === undefined ? cellValue : editedValue?.newValue;\n const validationError = meta.validationErrors?.get(cellId);\n const isRowFocused = meta.focusedRowId === rowId;\n const rowCellEdits = filterCellEditsToRow(cellEdits, rowId);\n return /*#__PURE__*/React.createElement(EditableCell, {\n initialValue: cellValue,\n currentValue: currentValue,\n cellId: cellId,\n dataType: columnMeta?.dataType,\n editFieldConfig: columnMeta?.editFieldConfig,\n rowCellEdits: rowCellEdits,\n onCellEdit: meta.onCellEdit,\n onCellValidationError: meta.onCellValidationError,\n clearCellValidationError: meta.clearCellValidationError,\n originalRowData: rowData,\n rowId: rowId,\n columnId: columnId,\n validateEdit: columnMeta?.validateEdit,\n validationError: validationError,\n isRowFocused: isRowFocused\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 { useOsdkMetadata } from \"@osdk/react\";\nimport { useMemo } from \"react\";\nimport { renderDefaultCell } from \"../DefaultCellRenderer.js\";\nimport { shouldShowEditableCell } from \"../utils/shouldShowEditableCell.js\";\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 editable,\n renderCell,\n renderHeader,\n columnName\n } = col;\n const editFieldConfig = col.editable ? col.editFieldConfig : undefined;\n const validateEdit = col.editable ? col.validateEdit : undefined;\n const propertyMetadata = locator.type === \"property\" ? objectProperties?.[locator.id] : undefined;\n const colKey = locator.id;\n const dataType = propertyMetadata?.type && typeof propertyMetadata.type === \"string\" ? propertyMetadata.type : undefined;\n const markingType = propertyMetadata?.typeMetadata?.type === \"marking\" ? propertyMetadata.typeMetadata.markingType : undefined;\n const colDef = {\n id: colKey,\n accessorKey: colKey,\n header: renderHeader ?? (columnName || propertyMetadata?.displayName),\n meta: {\n columnName: columnName || propertyMetadata?.displayName,\n isAsyncColumn: locator.type === \"function\",\n isVisible: col.isVisible !== false,\n editable,\n editFieldConfig,\n dataType,\n markingType,\n validateEdit\n },\n size: width,\n ...(minWidth ? {\n minSize: minWidth\n } : {}),\n ...(maxWidth ? {\n maxSize: maxWidth\n } : {}),\n enableResizing: resizable,\n // Function-backed columns must be sorted on the frontend, so disable sorting for now\n enableSorting: locator.type === \"function\" ? false : orderable,\n enableColumnFilter: filterable,\n cell: cellContext => {\n const object = cellContext.row.original;\n const meta = cellContext.table.options.meta;\n const isEditable = shouldShowEditableCell(editable, meta?.onCellEdit, meta?.isInEditMode);\n if (renderCell && !isEditable) {\n return renderCell(object, locator);\n }\n return renderDefaultCell(cellContext);\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\nexport const SELECTION_COLUMN_ID = \"__selection__\";\nexport const DEFAULT_COLUMN_WIDTH = 80;\nexport const DEFAULT_ROW_HEIGHT = 40;\nexport const DEFAULT_LOADING_COLUMN_WIDTH = 120;\nexport const MIN_LOADING_ROWS = 5;\nexport const SCROLL_FETCH_THRESHOLD = 100;\nexport const VIRTUALIZER_OVERSCAN = 5;\nexport const DEFAULT_PAGE_SIZE = 50;\nexport const DEFAULT_OBJECT_TABLE_DEDUPE_INTERVAL_MS = 60_000;\nexport const DEFAULT_FUNCTION_COLUMN_DEDUPE_INTERVAL_MS = 300_000;\n\n// The main goal here is to split function executions into smaller pieces.\n// The executor should be happy to run several smaller pieces at once, so run\n// up to 10 at a time to improve performance.\nexport const DEFAULT_MAX_CONCURRENT_REQUESTS = 10;\nexport const SELECTION_COLUMN_WIDTH = 50;","/*\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, useEffect, useState } from \"react\";\nimport { SELECTION_COLUMN_ID } from \"../utils/constants.js\";\nexport const useColumnPinning = ({\n columnDefinitions,\n hasSelectionColumn,\n onColumnsPinnedChanged\n}) => {\n const [columnPinning, setColumnPinning] = useState({\n left: [],\n right: []\n });\n\n // Update column pinning when columnDefinitions change\n useEffect(() => {\n const defaultState = getColumnPinningStateFromColumnDefs(columnDefinitions);\n const selectionCol = hasSelectionColumn ? [SELECTION_COLUMN_ID] : [];\n setColumnPinning({\n left: [...selectionCol, ...(defaultState.left ?? [])],\n right: [...(defaultState.right ?? [])]\n });\n }, [columnDefinitions, hasSelectionColumn]);\n const onColumnPinningChange = useCallback(updater => {\n setColumnPinning(prev => {\n const newPinning = typeof updater === \"function\" ? updater(prev) : updater;\n if (onColumnsPinnedChanged) {\n const newStates = convertColumnPinningStateToArray(newPinning);\n const stateWithoutSelectionCol = newStates.filter(state => state.columnId !== SELECTION_COLUMN_ID);\n onColumnsPinnedChanged(stateWithoutSelectionCol);\n }\n return newPinning;\n });\n }, [onColumnsPinnedChanged]);\n return {\n columnPinning,\n onColumnPinningChange\n };\n};\nconst getColumnPinningStateFromColumnDefs = columnDefinitions => {\n if (!columnDefinitions) {\n return {};\n }\n const columnPinningState = columnDefinitions.reduce((acc, {\n locator,\n pinned\n }) => {\n const colKey = locator.id.toString();\n const isPinned = pinned != null && pinned !== \"none\";\n if (!isPinned) {\n return acc;\n }\n if (pinned === \"left\") {\n return {\n ...acc,\n left: [...(acc.left ?? []), colKey]\n };\n }\n return {\n ...acc,\n right: [...(acc.right ?? []), colKey]\n };\n }, {\n left: [],\n right: []\n });\n return columnPinningState;\n};\n\n/**\n * Converts ColumnPinningState to array format for the callback\n */\nfunction convertColumnPinningStateToArray(pinningState) {\n return [...(pinningState.left ?? []).map(columnId => ({\n columnId,\n pinned: \"left\"\n })), ...(pinningState.right ?? []).map(columnId => ({\n columnId,\n pinned: \"right\"\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 { useCallback, useState } from \"react\";\nexport const useColumnResize = ({\n onColumnResize\n}) => {\n const [columnSizing, setColumnSizing] = useState({});\n const onColumnSizingChange = useCallback(updater => {\n setColumnSizing(prev => {\n const newState = typeof updater === \"function\" ? updater(prev) : updater;\n if (onColumnResize) {\n for (const columnId of Object.keys(newState)) {\n if (newState[columnId] !== prev[columnId]) {\n onColumnResize(columnId, newState[columnId]);\n }\n }\n for (const columnId of Object.keys(prev)) {\n if (!(columnId in newState)) {\n onColumnResize(columnId, null);\n }\n }\n }\n return newState;\n });\n }, [onColumnResize]);\n return {\n columnSizing,\n onColumnSizingChange\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 { useCallback, useEffect, useState } from \"react\";\nexport const useColumnVisibility = ({\n allColumns,\n onColumnVisibilityChanged\n}) => {\n const [columnVisibility, setColumnVisibility] = useState(() => getColumnVisibilityState(allColumns));\n const [columnOrder, setColumnOrder] = useState(() => getColumnOrder(allColumns));\n\n // TODO: Explore other ways to respond to props changes for controlled mode\n useEffect(() => {\n setColumnVisibility(getColumnVisibilityState(allColumns));\n }, [allColumns]);\n useEffect(() => {\n setColumnOrder(getColumnOrder(allColumns));\n }, [allColumns]);\n const onColumnVisibilityChange = useCallback(updaterOrValue => {\n setColumnVisibility(prev => {\n const newState = typeof updaterOrValue === \"function\" ? updaterOrValue(prev) : updaterOrValue;\n if (onColumnVisibilityChanged) {\n const changes = Object.entries(newState).map(([columnId, isVisible]) => ({\n columnId,\n isVisible\n }));\n onColumnVisibilityChanged(changes);\n }\n return newState;\n });\n }, [onColumnVisibilityChanged]);\n const onColumnOrderChange = useCallback(updaterOrValue => {\n setColumnOrder(prev => {\n const newState = typeof updaterOrValue === \"function\" ? updaterOrValue(prev) : updaterOrValue;\n return newState;\n });\n }, []);\n return {\n columnVisibility,\n onColumnVisibilityChange,\n columnOrder,\n onColumnOrderChange\n };\n};\nconst getColumnVisibilityState = allColumns => {\n return allColumns.reduce((acc, col) => {\n const colId = col.id ?? col.accessorKey;\n if (colId) {\n return {\n ...acc,\n [colId]: col.meta?.isVisible !== false\n };\n }\n return acc;\n }, {});\n};\nconst getColumnOrder = allColumns => {\n return allColumns.map(col => col.id ?? col.accessorKey).filter(id => id != null);\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\";\nimport { cellValuesEqual } from \"../utils/editableUtils.js\";\nexport function useEditableTable({\n editMode = \"manual\",\n onCellValueChanged,\n onSubmitEdits\n}) {\n const [isActive, setActive] = useState(editMode === \"always\");\n const [cellEdits, setCellEdits] = useState({});\n const [validationErrors, setValidationErrors] = useState(new Map());\n const clearCellValidationError = useCallback(cellId => {\n setValidationErrors(prev => {\n const newErrors = new Map(prev);\n newErrors.delete(cellId);\n return newErrors;\n });\n }, []);\n const handleCellEdit = useCallback((cellId, info) => {\n // If value is changed back to original, remove it from edits. null\n // and undefined are treated as the same empty state so clearing a\n // never-set cell doesn't leave a phantom \"edited\" indicator. \"\" stays\n // a distinct value.\n if (cellValuesEqual(info.newValue, info.oldValue)) {\n setCellEdits(prev => {\n const {\n [cellId]: _,\n ...rest\n } = prev;\n return rest;\n });\n } else {\n setCellEdits(prev => ({\n ...prev,\n [cellId]: info\n }));\n }\n onCellValueChanged?.(info);\n }, [onCellValueChanged]);\n const clearEdits = useCallback(() => {\n setCellEdits({});\n setValidationErrors(new Map());\n }, []);\n const handleSubmitEdits = useCallback(async () => {\n const edits = Object.values(cellEdits);\n return onSubmitEdits ? onSubmitEdits(edits) : false;\n }, [cellEdits, onSubmitEdits]);\n const onCellValidationError = useCallback((cellId, error) => {\n setValidationErrors(prev => {\n const newErrors = new Map(prev);\n newErrors.set(cellId, error);\n return newErrors;\n });\n }, []);\n const editModeState = editMode === \"always\" ? {\n type: \"always\",\n isActive: true\n } : {\n type: \"manual\",\n isActive,\n setActive\n };\n return {\n cellEdits,\n onCellEdit: handleCellEdit,\n onSubmitEdits: onSubmitEdits ? handleSubmitEdits : undefined,\n clearEdits,\n editModeState,\n onCellValidationError,\n validationErrors,\n clearCellValidationError\n };\n}","/*\n * Copyright 2026 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 { chunk } from \"lodash-es\";\n\n/** A page's filtered ObjectSet paired with the row objects it covers. */\n\n/** Filters columnDefinitions down to only function-backed locators. */\nexport function extractFunctionLocators(columnDefinitions) {\n if (!columnDefinitions) return [];\n return columnDefinitions.filter(colDef => colDef.locator.type === \"function\").map(colDef => colDef.locator);\n}\n\n/**\n * Constructs the per-page object sets used to fetch function-backed column\n * values for `objects`. Builds an unfiltered base set from\n * `objectOrInterfaceType` (so pages are scoped purely by primary key) and\n * narrows each page via `{ $primaryKey: { $in: pageKeys } }`.\n *\n * Returns `[]` when the type is an interface (no base set can be built) or\n * when no primary-key apiName is available and the input is empty.\n */\nexport function buildPagedObjectSets(client, objectOrInterfaceType, objects, pageSize) {\n const isObjectType = objectOrInterfaceType.type === \"object\";\n const baseObjectSet = isObjectType ? client(objectOrInterfaceType) : undefined;\n if (!baseObjectSet) {\n return [];\n }\n return chunk(objects, pageSize).map(page => {\n const whereClause = {\n $primaryKey: {\n $in: page.map(obj => obj.$primaryKey)\n }\n };\n return {\n objectSet: baseObjectSet.where(whereClause),\n objects: page\n };\n });\n}","/*\n * Copyright 2026 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 { useOsdkClient, useOsdkFunctions } from \"@osdk/react\";\nimport { useMemo, useRef } from \"react\";\nimport { createAsyncCellData } from \"../utils/AsyncCellData.js\";\nimport { DEFAULT_FUNCTION_COLUMN_DEDUPE_INTERVAL_MS, DEFAULT_MAX_CONCURRENT_REQUESTS, DEFAULT_PAGE_SIZE } from \"../utils/constants.js\";\nimport { buildPagedObjectSets, extractFunctionLocators } from \"../utils/functionColumns.js\";\nexport function useFunctionColumnsData({\n objectOrInterfaceType,\n objects,\n columnDefinitions,\n pageSize = DEFAULT_PAGE_SIZE\n}) {\n const client = useOsdkClient();\n const prevDataRef = useRef({});\n const stableObjects = useStableObjects(objects);\n const functionColDefs = useMemo(() => extractFunctionLocators(columnDefinitions), [columnDefinitions]);\n\n // Construct an object set per page (base set filtered to each page's\n // primary keys). `buildPagedObjectSets` returns `[]` for interfaces and\n // when there's no work to do, which short-circuits the downstream queries.\n //\n // When a new page loads, only that page's queries fire — old pages hit the\n // dedupeIntervalMs cache since their params are unchanged.\n const pagedObjectSets = useMemo(() => {\n if (!stableObjects?.length) return [];\n return buildPagedObjectSets(client, objectOrInterfaceType, stableObjects, pageSize);\n }, [client, objectOrInterfaceType, stableObjects, pageSize]);\n const disabled = pagedObjectSets.length === 0 || functionColDefs.length === 0;\n const queryGrid = useMemo(() => {\n if (pagedObjectSets.length === 0 || functionColDefs.length === 0) {\n return EMPTY_QUERY_GRID;\n }\n return buildQueryGrid(pagedObjectSets, functionColDefs);\n }, [pagedObjectSets, functionColDefs]);\n const results = useOsdkFunctions({\n queries: queryGrid.queries,\n enabled: !disabled,\n maxConcurrent: DEFAULT_MAX_CONCURRENT_REQUESTS\n });\n const mergedResults = useMemo(() => mergePagedResults(results, queryGrid.numColumns), [results, queryGrid.numColumns]);\n const data = useMemo(() => {\n const columnData = buildFunctionColumnData(mergedResults, functionColDefs, stableObjects, disabled, prevDataRef.current);\n prevDataRef.current = columnData;\n return columnData;\n }, [mergedResults, functionColDefs, stableObjects, disabled]);\n return data;\n}\n\n/**\n * Pairs a flat queries array with the layout metadata needed to recover per-column\n * results back into per-column groups. The numColumns value is produced by\n * the same function that builds the queries, so the two are always in sync.\n */\n\nconst EMPTY_QUERY_GRID = {\n queries: [],\n numColumns: 0\n};\n\n/**\n * Builds a flat query array and the layout metadata needed to recover per-column results.\n *\n * Layout: [page0_col0, page0_col1, ..., page1_col0, page1_col1, ...]\n * Page-first ordering ensures first concurrent queries prioritizes the first page,\n * so visible rows get all their columns populated before later pages.\n *\n * Each query carries `dependsOnObjects` (the page's row instances) so that\n * editing any of those rows fans out to invalidate this function query, and\n * `dependsOn` from the locator so that linked-type edits also invalidate.\n */\nfunction buildQueryGrid(pagedObjects, functionColDefs) {\n const queries = [];\n for (const {\n objectSet: pagedObjectSet,\n objects: pageObjects\n } of pagedObjects) {\n for (const locator of functionColDefs) {\n queries.push({\n queryDefinition: locator.queryDefinition,\n options: {\n params: locator.getFunctionParams(pagedObjectSet),\n dedupeIntervalMs: locator.dedupeIntervalMs ?? DEFAULT_FUNCTION_COLUMN_DEDUPE_INTERVAL_MS,\n dependsOn: locator.dependsOn,\n dependsOnObjects: pageObjects\n }\n });\n }\n }\n return {\n queries,\n numColumns: functionColDefs.length\n };\n}\n\n/**\n * Merges paged results into one merged result per column.\n * Each column has results spread across pages — this combines their\n * functionsMaps so buildFunctionColumnData can look up any object by key.\n *\n * Relies on QueryGrid layout: results[i] belongs to column (i % numColumns).\n * i.e. the first N results are the first page of each column, the next N results are the second page, etc.\n */\nfunction mergePagedResults(results, numColumns) {\n if (numColumns === 0) return [];\n const merged = Array.from({\n length: numColumns\n }, () => ({\n isLoading: false,\n error: undefined,\n functionsMap: {}\n }));\n results.forEach((result, index) => {\n const columnIndex = index % numColumns;\n const entry = merged[columnIndex];\n if (result.isLoading) {\n entry.isLoading = true;\n }\n if (result.error) {\n entry.error = result.error;\n }\n const pageData = result.data;\n if (pageData) {\n Object.assign(entry.functionsMap, pageData);\n }\n });\n return merged;\n}\nfunction buildFunctionColumnData(results, functionColDefs, objects, disabled, prevColumnData) {\n const columnData = {};\n if (disabled || !objects) return columnData;\n results.forEach((result, index) => {\n const locator = functionColDefs[index];\n if (!locator) return;\n const columnId = String(locator.id);\n columnData[columnId] = {};\n objects.forEach(obj => {\n const key = String(obj.$primaryKey);\n const prevData = prevColumnData[columnId]?.[key]?.data;\n columnData[columnId][key] = createAsyncCellData(resolveCell(result, locator.getKey(obj), locator.getValue, prevData));\n });\n });\n return columnData;\n}\n\n/** Resolves the cell state: error, loaded, or loading with previous data. */\nfunction resolveCell(result, objectKey, getValue, prevData) {\n if (result.error) {\n return {\n isLoading: false,\n error: result.error\n };\n }\n if (objectKey in result.functionsMap) {\n const rawData = result.functionsMap[objectKey];\n return {\n isLoading: false,\n data: getValue ? getValue(rawData) : rawData\n };\n }\n // Key not in results. While the query is still loading, keep showing the\n // previous data so the cell doesn't flash empty during a refetch. Once the\n // query has resolved without an entry for this object, its value is gone —\n // clear the cell instead of retaining the stale previous value (otherwise a\n // cell whose derived value became null keeps displaying the old value).\n return {\n isLoading: result.isLoading,\n data: result.isLoading ? prevData : undefined\n };\n}\nconst useStableObjects = objects => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return useMemo(() => objects, [\n // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify((objects ?? []).map(item => ({\n $apiName: item.$apiName,\n $primaryKey: item.$primaryKey\n })).sort((a, b) => {\n if (a.$apiName !== b.$apiName) {\n return a.$apiName.localeCompare(b.$apiName);\n }\n return String(a.$primaryKey).localeCompare(String(b.$primaryKey));\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, useOsdkObjects } from \"@osdk/react\";\nimport { useMemo } from \"react\";\nimport { DEFAULT_OBJECT_TABLE_DEDUPE_INTERVAL_MS, DEFAULT_PAGE_SIZE } from \"../utils/constants.js\";\nimport { useFunctionColumnsData } from \"./useFunctionColumnsData.js\";\n/**\n * This hook is a wrapper that conditionally uses either useObjectSet or useOsdkObjects\n * based on whether an objectSet prop is provided.\n * It extracts RDP locators from columnDefinitions and applies withProperties\n * to return data containing the derived properties.\n */\nexport function useObjectTableData(objectOrInterfaceType, columnDefinitions, filter, sorting, objectSet, objectSetOptions, dedupeIntervalMs = DEFAULT_OBJECT_TABLE_DEDUPE_INTERVAL_MS, pageSize = DEFAULT_PAGE_SIZE, streamUpdates) {\n const orderBy = useMemo(() => {\n if (!sorting || sorting.length === 0) {\n return undefined;\n }\n return sorting.reduce((acc, sort) => {\n acc[sort.id] = sort.desc ? \"desc\" : \"asc\";\n return acc;\n }, {});\n }, [sorting]);\n\n // Extract derived properties definition\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 if (!rdpColumns.length) {\n return;\n }\n return rdpColumns.reduce((acc, cur) => {\n return {\n ...acc,\n [cur.id]: cur.creator\n };\n }, {});\n }, [columnDefinitions]);\n\n // Use the caller's objectSet whenever provided (object or interface types), else fetch\n // by type. For an interface objectSet, rows carry interface-declared props (+ withProperties)\n // only, not the full underlying object — see the objectSet prop docs.\n const shouldUseObjectSet = !!objectSet;\n const objectSetResult = useObjectSet(shouldUseObjectSet ? objectSet : undefined, {\n ...objectSetOptions,\n withProperties: withProperties,\n where: filter,\n orderBy,\n pageSize,\n enabled: shouldUseObjectSet,\n dedupeIntervalMs,\n streamUpdates\n });\n const osdkObjectsResult = useOsdkObjects(objectOrInterfaceType, {\n withProperties,\n pageSize,\n where: filter,\n orderBy,\n enabled: !shouldUseObjectSet,\n dedupeIntervalMs,\n streamUpdates\n });\n\n // Get the result from the appropriate hook\n const baseResult = shouldUseObjectSet ? objectSetResult : osdkObjectsResult;\n\n // Call useFunctionColumnsData to get function column data\n const functionColumnData = useFunctionColumnsData({\n objectOrInterfaceType,\n objects: baseResult.data,\n columnDefinitions,\n pageSize\n });\n\n // Merge function column data into each object\n const mergedData = useMemo(() => {\n if (!baseResult.data) return baseResult.data;\n return baseResult.data.map(obj => {\n const objKey = String(obj.$primaryKey);\n const functionData = {};\n\n // Collect all function column data for this object\n Object.entries(functionColumnData).forEach(([columnId, columnData]) => {\n if (columnData[objKey]) {\n functionData[columnId] = columnData[objKey];\n }\n });\n\n // Return object with function data merged in\n return {\n ...obj,\n ...functionData\n };\n });\n }, [baseResult.data, functionColumnData]);\n\n // Return the result with merged data\n return {\n ...baseResult,\n data: mergedData\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 { DEFAULT_MAX_CONCURRENT_REQUESTS } from \"./constants.js\";\n/**\n * Default value for `getSnapshot`'s `rowLimit`. When the object set's total\n * row count exceeds this value, {@link ObjectTableHandle.getSnapshot} rejects,\n * guarding against runaway loads over very large object sets.\n */\nexport const DEFAULT_SNAPSHOT_ROW_LIMIT = 10_000;\n\n/**\n * Builds a single {@link ObjectTableDataRow} for a loaded object. Property and\n * derived-property cells read straight off the object; function-backed cells\n * are looked up in the pre-resolved per-locator values map (whose values are\n * either the raw cell or, for failed pages, an `Error` instance).\n */\nexport function buildSnapshotRow(object, columnIds, functionLocators, functionColumnValues) {\n const cells = new Map();\n\n // Resolve function-backed cells first so a same-named property doesn't\n // overwrite them.\n for (const locator of functionLocators) {\n const columnId = String(locator.id);\n cells.set(columnId, functionColumnValues?.get(columnId)?.get(locator.getKey(object)));\n }\n const source = object;\n for (const columnId of columnIds) {\n if (cells.has(columnId)) continue;\n cells.set(columnId, source[columnId]);\n }\n return {\n id: String(object.$primaryKey),\n object,\n getValue: columnId => cells.get(columnId)\n };\n}\n\n/**\n * Executes a function-backed column for one page, applies `getValue`, and\n * returns a map keyed by `locator.getKey(obj)` so callers can merge values\n * back onto each row.\n *\n * On query failure, every object in the page maps to the thrown `Error`,\n * so the caller surfaces a per-cell error rather than dropping the column.\n */\nexport async function fetchFunctionColumnPage(executeFunction, locator, page) {\n const cellsByKey = new Map();\n try {\n const params = locator.getFunctionParams(page.objectSet);\n const rawResult = await executeFunction(params);\n for (const obj of page.objects) {\n const objectKey = locator.getKey(obj);\n const rawCell = rawResult?.[objectKey];\n cellsByKey.set(objectKey, locator.getValue ? locator.getValue(rawCell) : rawCell);\n }\n } catch (cause) {\n const error = cause instanceof Error ? cause : new Error(String(cause));\n for (const obj of page.objects) {\n cellsByKey.set(locator.getKey(obj), error);\n }\n }\n return cellsByKey;\n}\n\n/**\n * Resolves async column values for all loaded rows by paginating each function\n * locator across the rows. Returns the per-locator map of `getKey(obj)` →\n * cell value (already `getValue`-unwrapped, or an `Error` for failed pages).\n *\n * Each (locator, page) pair is one function call. They run concurrently but no\n * more than `maxConcurrent` are in flight at once, so a wide table over many\n * pages doesn't fire hundreds of requests at the server simultaneously. This\n * mirrors the live function-column path (`useFunctionColumnsData`), which caps\n * concurrency the same way via `useOsdkFunctions`.\n */\nexport async function fetchFunctionColumnValues(locators, pages, executeFunction, maxConcurrent = DEFAULT_MAX_CONCURRENT_REQUESTS) {\n const valuesByColumnId = new Map();\n for (const locator of locators) {\n valuesByColumnId.set(String(locator.id), new Map());\n }\n\n // Flatten to one task per (locator, page) so concurrency is bounded across\n // every request, not just within a single locator.\n const tasks = locators.flatMap(locator => pages.map(page => ({\n columnId: String(locator.id),\n locator,\n page\n })));\n\n // One entry per task (same index as `tasks`). Each entry is a\n // `Map<objectKey, cellValue>` for that (locator, page) pair, where\n // `objectKey` is `locator.getKey(obj)` and `cellValue` is the unwrapped\n // result — or an `Error` if the page's function call threw.\n const pageMaps = await mapWithConcurrency(tasks, maxConcurrent, task => fetchFunctionColumnPage(params => executeFunction(task.locator.queryDefinition, params), task.locator, task.page));\n pageMaps.forEach((pageMap, index) => {\n const merged = valuesByColumnId.get(tasks[index].columnId);\n if (merged == null) return;\n for (const [key, value] of pageMap) {\n merged.set(key, value);\n }\n });\n return valuesByColumnId;\n}\n\n/**\n * Runs `execute` over `tasks` with at most `maxConcurrent` invocations in flight at a\n * time, preserving input order in the returned results. A small fixed pool of\n * workers pulls from a shared cursor until the tasks are exhausted.\n */\nasync function mapWithConcurrency(tasks, maxConcurrent, execute) {\n // Pre-sized so workers write at their claimed index so input order is preserved.\n const results = new Array(tasks.length);\n\n // Cap pool at maxConcurrent, but never more workers than tasks (and at least 1).\n const poolSize = Math.max(1, Math.min(maxConcurrent, tasks.length));\n let pointer = 0;\n const runExecute = async () => {\n while (pointer < tasks.length) {\n const index = pointer;\n pointer++;\n results[index] = await execute(tasks[index], index);\n }\n };\n\n /**\n * Let's say we have maxConcurrent = 2, and 3 tasks\n * Pool = [_, _], each pool calls runExecute\n * Within each runExecute, there's a loop synchronously execute tasks.\n *\n * So at the beginning, we will have at most 2 concurrent requests, one execute in each pool.\n * The first execute to finish would enter the next loop, and start the next task.\n * The second execute will finish and find that pointer >= tasks.length and exit.\n */\n await Promise.all(Array.from({\n length: poolSize\n }, runExecute));\n return results;\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 { useOsdkClient } from \"@osdk/react\";\nimport { useCallback, useMemo } from \"react\";\nimport { DEFAULT_PAGE_SIZE, SELECTION_COLUMN_ID } from \"../utils/constants.js\";\nimport { buildPagedObjectSets, extractFunctionLocators } from \"../utils/functionColumns.js\";\nimport { buildSnapshotRow, DEFAULT_SNAPSHOT_ROW_LIMIT, fetchFunctionColumnValues } from \"../utils/objectTableSnapshot.js\";\n/**\n * Builds the {@link ObjectTableHandle} exposed via `ObjectTable`'s `tableRef`.\n *\n * `getSnapshot` reads the table's currently visible columns to decide what to\n * export, rejects up front when the set's `totalCount` exceeds `rowLimit`,\n * otherwise paginates the entire resolved object set, and resolves\n * function-backed column values for the loaded rows.\n */\nexport function useObjectTableSnapshot({\n objectOrInterfaceType,\n table,\n columnDefinitions,\n objectSet,\n pageSize = DEFAULT_PAGE_SIZE,\n totalCount,\n orderBy\n}) {\n const client = useOsdkClient();\n const functionLocators = useMemo(() => extractFunctionLocators(columnDefinitions), [columnDefinitions]);\n const customColumnIds = useMemo(() => new Set(columnDefinitions?.filter(definition => definition.locator.type === \"custom\").map(definition => String(definition.locator.id)) ?? []), [columnDefinitions]);\n const getSnapshot = useCallback(async options => {\n const rowLimit = options?.rowLimit ?? DEFAULT_SNAPSHOT_ROW_LIMIT;\n const rowLimitExceededError = `Error in getSnapshot: total row count exceeds row limit of ${rowLimit}.`;\n\n // Fail fast when the caller's row cap is smaller than the matching set.\n // `totalCount` is only available once the list payload has resolved; we\n // skip the check otherwise rather than guess.\n if (totalCount != null) {\n const total = Number(totalCount);\n if (Number.isFinite(total) && total > rowLimit) {\n return Promise.reject(rowLimitExceededError);\n }\n }\n const columns = table.getVisibleLeafColumns().filter(column => column.id !== SELECTION_COLUMN_ID && !customColumnIds.has(column.id)).map(column => {\n const meta = column.columnDef.meta;\n const header = column.columnDef.header;\n const name = typeof header === \"string\" ? header : meta?.columnName ?? column.id;\n return {\n id: column.id,\n name\n };\n });\n const columnIds = columns.map(column => column.id);\n const columnIdsSet = new Set(columnIds);\n const loadedObjects = [];\n if (objectSet != null && columnIds.length > 0 && rowLimit > 0) {\n for await (const object of objectSet.asyncIter({\n $orderBy: orderBy\n })) {\n loadedObjects.push(object);\n // Bound the in-memory load even when `totalCount` was unavailable for\n // the fail-fast check above: once we've pulled more rows than the\n // caller allows, stop and reject rather than draining the whole set.\n if (loadedObjects.length > rowLimit) {\n return Promise.reject(rowLimitExceededError);\n }\n }\n }\n const visibleFunctionLocators = functionLocators.filter(locator => columnIdsSet.has(String(locator.id)));\n let functionColumnValues;\n if (visibleFunctionLocators.length > 0 && loadedObjects.length > 0) {\n const pages = buildPagedObjectSets(client, objectOrInterfaceType, loadedObjects, pageSize);\n if (pages.length > 0) {\n functionColumnValues = await fetchFunctionColumnValues(visibleFunctionLocators, pages, (queryDefinition, params) => client(queryDefinition).executeFunction(params));\n }\n }\n const rows = loadedObjects.map(object => buildSnapshotRow(object, columnIds, visibleFunctionLocators, functionColumnValues));\n return {\n columns,\n rows,\n totalCount\n };\n }, [table, objectSet, objectOrInterfaceType, functionLocators, customColumnIds, client, pageSize, totalCount, orderBy]);\n return useMemo(() => ({\n getSnapshot\n }), [getSnapshot]);\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, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useEventCallback } from \"../../shared/hooks/useEventCallback.js\";\nimport { getRowId, getRowIdFromPrimaryKey } from \"../utils/getRowId.js\";\n\n/**\n * Payload delivered by {@link UseRowSelectionProps.onRowSelectionChanged}.\n * Mirrors the OSDK-level `RowSelectionChange` but without the `objectSet`\n * field, which requires OSDK context and is composed in `ObjectTable`.\n */\n\nexport function useRowSelection({\n selectionMode = \"none\",\n selectedRows,\n isAllSelected: isAllSelectedProp,\n // eslint-disable-next-line @typescript-eslint/no-deprecated -- intentional pass-through to fire alongside onRowSelectionChanged for backwards compatibility\n onRowSelection,\n onRowSelectionChanged,\n data\n}) {\n const [internalRowSelection, setInternalRowSelection] = useState({});\n\n // When true, newly fetched rows are auto-selected (uncontrolled mode only).\n const [internalIsAllSelected, setInternalIsAllSelected] = useState(false);\n const [lastSelectedRowIndex, setLastSelectedRowIndex] = useState(null);\n const isControlled = selectedRows !== undefined;\n const enableRowSelection = selectionMode !== \"none\";\n const rowSelectionState = useMemo(() => {\n if (!enableRowSelection) return {};\n if (isControlled) {\n const selectedRowIds = isAllSelectedProp ? (data ?? []).map(item => item.$primaryKey) : selectedRows;\n return getRowSelectionState(selectedRowIds);\n }\n if (internalIsAllSelected) {\n return getRowSelectionState((data ?? []).map(item => item.$primaryKey));\n }\n return internalRowSelection;\n }, [enableRowSelection, isControlled, selectedRows, isAllSelectedProp, internalIsAllSelected, internalRowSelection, data]);\n const selectedCount = useMemo(() => Object.values(rowSelectionState).filter(Boolean).length, [rowSelectionState]);\n const totalCount = data?.length ?? 0;\n const isAllSelected = deriveIsAllSelected(isControlled, isAllSelectedProp, internalIsAllSelected, selectedCount, totalCount);\n const hasSelection = isAllSelected || selectedCount > 0;\n\n // Dedupes refires when \"select all\" is active and data grows.\n const lastFiredAllSelectedIdsRef = useRef(null);\n const fireSelectionCallbacks = useEventCallback((ids, isSelectAll) => {\n onRowSelection?.(ids, isSelectAll);\n if (onRowSelectionChanged) {\n const currentData = data ?? [];\n const selectedKeySet = new Set(ids.map(id => String(id)));\n const instances = currentData.filter(item => selectedKeySet.has(String(item.$primaryKey)));\n onRowSelectionChanged({\n selectedRows: instances,\n isSelectAll\n });\n }\n });\n const onToggleAll = useCallback(() => {\n if (!enableRowSelection || !data) return;\n\n // Any existing selection (full or partial/indeterminate) clears on click;\n // only an empty selection promotes to \"select all\".\n const newIsAllSelected = !hasSelection;\n const newSelectedRows = newIsAllSelected ? data.map(item => item.$primaryKey) : [];\n if (!isControlled) {\n setInternalIsAllSelected(newIsAllSelected);\n setInternalRowSelection(getRowSelectionState(newSelectedRows));\n }\n lastFiredAllSelectedIdsRef.current = newIsAllSelected ? JSON.stringify(newSelectedRows) : null;\n fireSelectionCallbacks(newSelectedRows, newIsAllSelected);\n }, [enableRowSelection, data, hasSelection, isControlled, fireSelectionCallbacks]);\n const onToggleRow = useCallback((rowId, rowIndex, isShiftClick = false) => {\n if (!enableRowSelection || !data) return;\n let newSelectedRows;\n if (selectionMode === \"single\") {\n newSelectedRows = getSingleSelectionRows({\n rowId,\n rowIndex,\n data,\n rowSelectionState\n });\n } else {\n if (isShiftClick && lastSelectedRowIndex != null) {\n newSelectedRows = getRangeSelectionRows({\n rowId,\n rowIndex,\n data,\n lastSelectedRowIndex,\n rowSelectionState\n });\n setLastSelectedRowIndex(rowIndex);\n } else {\n newSelectedRows = getMultipleSelectionRows({\n rowId,\n rowIndex,\n data,\n rowSelectionState\n });\n if (!isCurrentlySelected({\n rowIndex,\n data,\n rowSelectionState\n })) {\n setLastSelectedRowIndex(rowIndex);\n }\n }\n }\n if (!isControlled) {\n setInternalIsAllSelected(false);\n setInternalRowSelection(getRowSelectionState(newSelectedRows));\n }\n lastFiredAllSelectedIdsRef.current = null;\n fireSelectionCallbacks(newSelectedRows, false);\n }, [enableRowSelection, data, selectionMode, isControlled, fireSelectionCallbacks, rowSelectionState, lastSelectedRowIndex]);\n\n // Refire callbacks when uncontrolled \"select all\" is active and new rows arrive.\n useEffect(function syncSelectAllOnDataChange() {\n if (isControlled || !internalIsAllSelected || !data) {\n if (!internalIsAllSelected) {\n lastFiredAllSelectedIdsRef.current = null;\n }\n return;\n }\n const ids = data.map(item => item.$primaryKey);\n const serializedIds = JSON.stringify(ids);\n if (lastFiredAllSelectedIdsRef.current === serializedIds) return;\n lastFiredAllSelectedIdsRef.current = serializedIds;\n fireSelectionCallbacks(ids, true);\n }, [isControlled, internalIsAllSelected, data, fireSelectionCallbacks]);\n return {\n rowSelection: rowSelectionState,\n isAllSelected,\n enableRowSelection,\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 return rowSelectionState[rowId] ? [] : [primaryKey];\n}\nfunction getRangeSelectionRows({\n lastSelectedRowIndex,\n rowIndex,\n data,\n rowSelectionState\n}) {\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 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 isCurrentlySelected({\n rowIndex,\n data,\n rowSelectionState\n}) {\n const primaryKey = data[rowIndex].$primaryKey;\n const currentlySelected = getSelectedPrimaryKeys(rowSelectionState, data);\n return currentlySelected.includes(primaryKey);\n}\nfunction getMultipleSelectionRows({\n rowIndex,\n data,\n rowSelectionState\n}) {\n const primaryKey = data[rowIndex].$primaryKey;\n const currentlySelected = getSelectedPrimaryKeys(rowSelectionState, data);\n return isCurrentlySelected({\n rowIndex,\n data,\n rowSelectionState\n }) ? currentlySelected.filter(i => i !== primaryKey) : [...currentlySelected, primaryKey];\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}\nfunction deriveIsAllSelected(isControlled, isAllSelectedProp, internalIsAllSelected, selectedCount, totalCount) {\n if (isControlled && isAllSelectedProp !== undefined) return isAllSelectedProp;\n if (!isControlled && internalIsAllSelected) return true;\n return totalCount > 0 && selectedCount === totalCount;\n}\nfunction getRowSelectionState(primaryKeys) {\n return primaryKeys.reduce((acc, primaryKey) => {\n acc[getRowIdFromPrimaryKey(primaryKey)] = true;\n return acc;\n }, {});\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\nimport React, { useCallback } from \"react\";\nimport { Checkbox } from \"../base-components/checkbox/Checkbox.js\";\nexport function SelectionHeaderCell({\n isAllSelected,\n hasSelection,\n onToggleAll\n}) {\n const checkboxLabel = hasSelection ? \"Deselect all rows\" : \"Select all rows\";\n return /*#__PURE__*/React.createElement(Checkbox, {\n indeterminate: hasSelection && !isAllSelected,\n checked: isAllSelected,\n onCheckedChange: onToggleAll,\n \"aria-label\": checkboxLabel\n });\n}\nexport function SelectionCell({\n row,\n onToggleRow\n}) {\n const handleClick = useCallback(event => {\n // TODO: Create ActionBoundary component\n event.stopPropagation();\n const isShiftClick = event.shiftKey;\n onToggleRow(row.id, row.index, isShiftClick);\n }, [onToggleRow, row.id, row.index]);\n const handleKeyDown = useCallback(event => {\n // TODO: support shift + space\n // It looks like when we handle shift key here, the checkbox gets toggled twice\n if (event.key === \"Enter\") {\n const isShiftClick = event.shiftKey;\n onToggleRow(row.id, row.index, isShiftClick);\n }\n }, [onToggleRow, row.id, row.index]);\n return /*#__PURE__*/React.createElement(\"div\", {\n onClick: handleClick,\n onKeyDown: handleKeyDown\n }, /*#__PURE__*/React.createElement(Checkbox, {\n checked: row.getIsSelected(),\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, useRef } from \"react\";\nimport { SelectionCell, SelectionHeaderCell } from \"../SelectionCells.js\";\nimport { SELECTION_COLUMN_ID, SELECTION_COLUMN_WIDTH } from \"../utils/constants.js\";\nexport const useSelectionColumn = ({\n selectionMode,\n isAllSelected,\n hasSelection,\n onToggleAll,\n onToggleRow\n}) => {\n // TODO: Replace with useLatestRef\n const isAllSelectedRef = useRef(isAllSelected);\n isAllSelectedRef.current = isAllSelected;\n const hasSelectionRef = useRef(hasSelection);\n hasSelectionRef.current = hasSelection;\n const onToggleAllRef = useRef(onToggleAll);\n onToggleAllRef.current = onToggleAll;\n const onToggleRowRef = useRef(onToggleRow);\n onToggleRowRef.current = onToggleRow;\n const selectionColumn = useMemo(() => {\n if (selectionMode === \"none\") return null;\n const colDef = {\n id: SELECTION_COLUMN_ID,\n header: () => selectionMode === \"multiple\" ? /*#__PURE__*/React.createElement(SelectionHeaderCell, {\n isAllSelected: isAllSelectedRef.current,\n hasSelection: hasSelectionRef.current,\n onToggleAll: onToggleAllRef.current\n }) : null,\n cell: ({\n row\n }) => /*#__PURE__*/React.createElement(SelectionCell, {\n row: row,\n onToggleRow: onToggleRowRef.current\n }),\n size: SELECTION_COLUMN_WIDTH,\n minSize: SELECTION_COLUMN_WIDTH,\n maxSize: SELECTION_COLUMN_WIDTH,\n enableSorting: false,\n enableResizing: false,\n enablePinning: false\n };\n return colDef;\n }, [selectionMode]);\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 { useCallback, useMemo, useState } from \"react\";\nexport const useTableSorting = ({\n orderBy,\n defaultOrderBy,\n onOrderByChanged\n}) => {\n // The sorting state in uncontrolled mode\n const [internalSorting, setInternalSorting] = useState(() => defaultOrderBy ? convertOrderByToSortingState(defaultOrderBy) : []);\n const isControlled = orderBy !== undefined;\n\n // Sorting state\n // If controlled mode, return the state from orderBy prop\n // If uncontrolled, return the internalSorting state\n const sortingState = useMemo(() => orderBy ? convertOrderByToSortingState(orderBy) : internalSorting, [orderBy, internalSorting]);\n const orderByState = useMemo(() => {\n const currentOrderBy = orderBy ? orderBy : convertSortingStateToOrderBy(internalSorting);\n return Object.fromEntries(currentOrderBy.map(({\n property,\n direction\n }) => [property, direction]));\n }, [orderBy, internalSorting]);\n const onSortingChange = useCallback(updater => {\n const newSorting = typeof updater === \"function\" ? updater(sortingState) : updater;\n\n // Update internal state if uncontrolled\n if (!isControlled) {\n setInternalSorting(newSorting);\n }\n if (onOrderByChanged) {\n const newOrderBy = convertSortingStateToOrderBy(newSorting);\n onOrderByChanged(newOrderBy);\n }\n }, [isControlled, sortingState, onOrderByChanged]);\n return {\n sorting: sortingState,\n orderByState,\n onSortingChange\n };\n};\nfunction convertOrderByToSortingState(orderBy) {\n return orderBy.map(({\n property,\n direction\n }) => ({\n id: property,\n desc: direction === \"desc\"\n }));\n}\nfunction convertSortingStateToOrderBy(sorting) {\n return sorting.map(({\n id,\n desc\n }) => ({\n property: id,\n direction: desc ? \"desc\" : \"asc\"\n }));\n}","/*\n * Copyright 2026 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\";\nimport { useEventCallback } from \"../../shared/hooks/useEventCallback.js\";\nexport function useFocusedRow({\n focusedRowId,\n onFocusedRowChanged,\n getRowById\n}) {\n // Explicit check for undefined instead of != null\n // because null is a valid value to clear a focused row\n const isControlled = focusedRowId !== undefined;\n const [internalFocusedRowId, setInternalFocusedRowId] = useState(null);\n const effectiveId = isControlled ? focusedRowId ?? null : internalFocusedRowId;\n const fireChanged = useEventCallback(id => {\n const row = id != null ? getRowById(id) : null;\n onFocusedRowChanged?.(row);\n });\n const setFocusedRowId = useCallback(id => {\n if (effectiveId === id) return;\n if (!isControlled) {\n setInternalFocusedRowId(id);\n }\n fireChanged(id);\n }, [effectiveId, isControlled, fireChanged]);\n return {\n focusedRowId: effectiveId,\n setFocusedRowId,\n isControlled\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 width: max-content;\n min-width: 100%;\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 — keyed off data index, not DOM position, because rows are virtualized */\n &[data-row-parity=\"odd\"] {\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: 3;\n background-color: var(--osdk-table-row-bg-hover);\n border-top: var(--osdk-table-border-width) solid var(--osdk-table-row-border-color-hover);\n border-bottom: var(--osdk-table-border-width) solid var(--osdk-table-row-border-color-hover);\n }\n\n &[data-selected=\"true\"],\n &[data-focused=\"true\"] {\n z-index: 2;\n background-color: var(--osdk-table-row-bg-active);\n border-top: var(--osdk-table-border-width) solid var(--osdk-table-row-border-color-active);\n border-bottom: var(--osdk-table-border-width) solid 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 from \"react\";\nimport { LoadingCell } from \"./LoadingCell.js\";\nimport rowStyles from \"./TableRow.module.css\";\nimport { DEFAULT_COLUMN_WIDTH, DEFAULT_ROW_HEIGHT } from \"./utils/constants.js\";\nexport function LoadingRow({\n headers,\n columnCount,\n translateY,\n rowHeight = DEFAULT_ROW_HEIGHT,\n columnWidth = DEFAULT_COLUMN_WIDTH\n}) {\n return /*#__PURE__*/React.createElement(\"tr\", {\n className: rowStyles.osdkTableRow,\n style: {\n height: `${rowHeight}px`,\n transform: `translateY(${translateY}px)`\n }\n }, /*#__PURE__*/React.createElement(React.Fragment, null, Array.from({\n length: columnCount\n }).map((_, index) => {\n const width = headers.length > index ? headers[index].getSize() : columnWidth;\n return /*#__PURE__*/React.createElement(LoadingCell, {\n key: `loading-cell-${index}`,\n width: width\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.osdkTableBody {\n display: grid;\n position: relative;\n width: max-content;\n min-width: 100%;\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.draggableListContainer {\n display: flex;\n flex-direction: column;\n gap: var(--osdk-draggable-item-gap);\n overflow-y: auto;\n}\n\n.draggableItem {\n display: flex;\n align-items: center;\n gap: var(--osdk-draggable-item-gap);\n padding: var(--osdk-draggable-item-padding);\n background-color: var(--osdk-draggable-item-bg);\n border: var(--osdk-draggable-item-border);\n border-radius: var(--osdk-draggable-item-border-radius);\n width: 100%;\n touch-action: none;\n user-select: none;\n}\n\n.draggableItem[data-dragging=\"true\"] {\n opacity: 0.5;\n}\n\n.dragHandle {\n display: flex;\n cursor: var(--osdk-drag-handle-cursor);\n color: var(--osdk-draggable-item-drag-icon-color);\n\n &:hover {\n color: var(--osdk-draggable-item-drag-icon-color-hover);\n }\n\n &:active {\n cursor: var(--osdk-drag-handle-cursor-active);\n }\n\n &:focus-visible {\n outline: var(--osdk-focus-outline);\n outline-offset: var(--osdk-focus-visible-outline-offset);\n }\n}\n\n.itemContent {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--osdk-typography-color-default-rest);\n}\n\n.removeButton {\n background: none;\n border: none;\n padding: var(--osdk-surface-spacing);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--osdk-draggable-item-drag-icon-color);\n border-radius: var(--osdk-surface-border-radius);\n\n &:hover {\n color: var(--osdk-typography-color-danger-rest);\n }\n\n &:active {\n color: var(--osdk-typography-color-danger-rest);\n background: oklch(\n from var(--osdk-surface-background-color-danger-hover) l c h / 0.2\n );\n }\n\n &:focus-visible {\n outline: var(--osdk-focus-outline);\n outline-offset: var(--osdk-focus-visible-outline-offset);\n }\n}\n\n.emptyState {\n padding: calc(var(--osdk-surface-spacing) * 5);\n text-align: center;\n color: var(--osdk-typography-color-muted);\n font-style: italic;\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 { Button } from \"@base-ui/react/button\";\nimport { DragHandleVertical, SmallCross, Trash } from \"@blueprintjs/icons\";\nimport { closestCenter, DndContext as BaseDndContext, KeyboardSensor, PointerSensor, useSensor, useSensors } from \"@dnd-kit/core\";\nimport { SortableContext, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy } from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport classNames from \"classnames\";\nimport React, { useCallback, useEffect, useMemo, useRef } from \"react\";\nimport styles from \"./DraggableList.module.css\";\nfunction DraggableListItem({\n item,\n onRemove,\n removeIconVariant = \"trash\",\n renderContent\n}) {\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isDragging\n } = useSortable({\n id: item.id\n });\n const style = {\n transform: CSS.Transform.toString(transform),\n transition\n };\n const handleRemove = useCallback(() => {\n onRemove?.(item.id);\n }, [item.id, onRemove]);\n const RemoveIcon = removeIconVariant === \"trash\" ? Trash : SmallCross;\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: setNodeRef,\n style: style,\n className: styles.draggableItem,\n \"data-dragging\": isDragging\n }, /*#__PURE__*/React.createElement(\"div\", _extends({\n className: styles.dragHandle,\n \"aria-label\": `Reorder ${item.label}`\n }, attributes, listeners), /*#__PURE__*/React.createElement(DragHandleVertical, {\n className: styles.icon\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: styles.itemContent\n }, renderContent ? renderContent(item) : item.label), onRemove && /*#__PURE__*/React.createElement(Button, {\n className: styles.removeButton,\n onClick: handleRemove,\n \"aria-label\": `Remove ${item.label}`\n }, /*#__PURE__*/React.createElement(RemoveIcon, {\n className: styles.icon\n })));\n}\nexport function DraggableList({\n items,\n onReorder,\n onRemove,\n removeIconVariant = \"cross\",\n renderContent,\n emptyMessage,\n className\n}) {\n const itemIds = useMemo(() => items.map(item => item.id), [items]);\n const sensors = useSensors(useSensor(PointerSensor, {\n activationConstraint: {\n distance: 5\n }\n }), useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates\n }));\n const handleDragEnd = useCallback(event => {\n const {\n active,\n over\n } = event;\n if (over && active.id !== over.id) {\n const oldIndex = items.findIndex(item => item.id === active.id);\n const newIndex = items.findIndex(item => item.id === over.id);\n onReorder(oldIndex, newIndex);\n }\n }, [items, onReorder]);\n const containerRef = useRef(null);\n useKeyboardEvents(containerRef);\n\n // TODO: Revert when @types/react is fixed\n const DndContext = BaseDndContext;\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: containerRef,\n className: classNames(styles.draggableListContainer, className)\n }, /*#__PURE__*/React.createElement(DndContext, {\n sensors: sensors,\n collisionDetection: closestCenter,\n onDragEnd: handleDragEnd\n }, /*#__PURE__*/React.createElement(SortableContext, {\n items: itemIds,\n strategy: verticalListSortingStrategy\n }, items.map(item => /*#__PURE__*/React.createElement(DraggableListItem, {\n key: item.id,\n item: item,\n onRemove: onRemove,\n removeIconVariant: removeIconVariant,\n renderContent: renderContent\n })))), items.length === 0 && emptyMessage && /*#__PURE__*/React.createElement(\"div\", {\n className: styles.emptyState\n }, emptyMessage));\n}\nconst useKeyboardEvents = containerRef => {\n // Base UI's DialogPopup calls stopPropagation on arrow key events, which\n // prevents them from reaching @dnd-kit's document-level KeyboardSensor\n // listener. We use a native capture-phase listener to intercept arrow keys\n // before the dialog can swallow them, and re-dispatch them on the document\n // so @dnd-kit can process keyboard-driven reordering.\n useEffect(() => {\n const el = containerRef.current;\n if (el == null) {\n return;\n }\n const ARROW_KEYS = new Set([\"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\"]);\n function handleCapture(event) {\n if (!ARROW_KEYS.has(event.key)) {\n return;\n }\n\n // Only intercept when a drag is active (an item has [data-dragging=\"true\"])\n if (el.querySelector(\"[data-dragging=\\\"true\\\"]\") == null) {\n return;\n }\n event.stopPropagation();\n document.dispatchEvent(new KeyboardEvent(\"keydown\", {\n key: event.key,\n code: event.code,\n bubbles: true\n }));\n }\n el.addEventListener(\"keydown\", handleCapture, true);\n return () => el.removeEventListener(\"keydown\", handleCapture, true);\n }, [containerRef]);\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.title {\n display: flex;\n align-items: center;\n gap: var(--osdk-surface-spacing);\n}\n\n/* Override dialog styling */\n.columnConfigDialog {\n --osdk-dialog-min-width: var(--osdk-table-column-config-dialog-min-width);\n --osdk-dialog-min-height: var(--osdk-table-column-config-dialog-min-height);\n --osdk-dialog-body-padding: 0;\n}\n\n.dialogLayout {\n display: flex;\n flex-direction: row;\n gap: 0;\n flex: 1;\n min-height: 0;\n overflow: hidden;\n}\n\n.visibleColumnsContainer {\n flex: 1.5;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: calc(var(--osdk-surface-spacing) * 5);\n background: var(--osdk-table-column-config-visible-columns-bg);\n border-right: 1px solid var(--osdk-surface-border-color-default);\n}\n\n.availableColumnsContainer {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: calc(var(--osdk-surface-spacing) * 5)\n calc(var(--osdk-surface-spacing) * 3);\n}\n\n.sectionHeader {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: calc(var(--osdk-surface-spacing) * 5);\n}\n\n.sectionTitle {\n display: flex;\n justify-content: flex-start;\n align-items: flex-start;\n font-size: var(--osdk-typography-size-body-medium);\n font-weight: var(--osdk-typography-weight-bold);\n color: var(--osdk-typography-color-muted);\n flex-shrink: 0;\n gap: var(--osdk-surface-spacing);\n}\n\n.countTag {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background: var(--osdk-custom-color-gray-3);\n padding: calc(var(--osdk-surface-spacing) / 2)\n calc(var(--osdk-surface-spacing) * 1.5);\n border-radius: var(--osdk-surface-border-radius);\n font-size: var(--osdk-typography-size-body-small);\n font-weight: var(--osdk-typography-weight-default);\n color: var(--osdk-typography-color-default-rest);\n}\n\n.sectionHint {\n font-size: var(--osdk-typography-size-body-small);\n color: var(--osdk-typography-color-muted);\n}\n\n.columnList {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n}\n\n.searchContainer {\n margin-bottom: calc(var(--osdk-surface-spacing) * 2);\n flex-shrink: 0;\n}\n\n.propertiesList {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.categoryHeader {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: calc(var(--osdk-surface-spacing) * 2)\n calc(var(--osdk-surface-spacing) * 3);\n background: none;\n border: none;\n margin: 0;\n gap: calc(var(--osdk-surface-spacing) * 3);\n flex-shrink: 0;\n}\n\n.categoryTrigger {\n display: flex;\n align-items: center;\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n\n &:focus-visible {\n outline: var(--osdk-focus-outline);\n outline-offset: var(--osdk-focus-visible-outline-offset);\n }\n}\n\n.categoryTitle {\n flex: 1;\n color: var(--osdk-typography-color-muted);\n font-size: var(--osdk-typography-size-body-small);\n font-weight: var(--osdk-typography-weight-bold);\n text-align: left;\n}\n\n.categoryCount {\n color: var(--osdk-typography-color-muted);\n font-size: var(--osdk-typography-size-body-small);\n margin-left: var(--osdk-surface-spacing);\n}\n\n.caretIcon {\n color: var(--osdk-typography-color-muted);\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.categoryTrigger[data-panel-open] .caretIcon {\n transform: rotate(180deg);\n}\n\n.checkbox {\n flex-shrink: 0;\n}\n\n.propertyList {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n}\n\n.propertyItem {\n display: flex;\n align-items: center;\n flex-direction: row;\n width: 100%;\n gap: calc(var(--osdk-surface-spacing) * 3);\n padding: calc(var(--osdk-surface-spacing) * 2)\n calc(var(--osdk-surface-spacing) * 3);\n background: none;\n border: none;\n cursor: pointer;\n text-align: left;\n border-radius: var(--osdk-surface-border-radius);\n\n &:hover {\n background-color: var(--osdk-surface-background-color-default-hover);\n }\n}\n\n.checkboxIndicator {\n color: var(--osdk-intent-primary-foreground);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.selectAllLabel {\n display: flex;\n align-items: center;\n gap: calc(var(--osdk-surface-spacing) * 3);\n cursor: pointer;\n color: var(--osdk-typography-color-muted);\n font-size: var(--osdk-typography-size-body-small);\n font-weight: var(--osdk-typography-weight-bold);\n}\n\n.propertyLabel {\n display: flex;\n align-items: center;\n gap: calc(var(--osdk-surface-spacing) * 3);\n cursor: pointer;\n flex: 1;\n min-width: 0;\n}\n\n.propertyName {\n text-align: left;\n flex: 1;\n font-size: var(--osdk-typography-size-body-medium);\n font-weight: 400;\n color: var(--osdk-typography-color-default-rest);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.infoIcon {\n color: var(--osdk-typography-color-muted);\n flex-shrink: 0;\n width: calc(var(--osdk-checkbox-icon-size) * 0.75);\n height: calc(var(--osdk-checkbox-icon-size) * 0.75);\n}\n\n.emptyState {\n padding: calc(var(--osdk-surface-spacing) * 5);\n text-align: center;\n color: var(--osdk-typography-color-muted);\n font-style: italic;\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 { Collapsible } from \"@base-ui/react/collapsible\";\nimport { CaretDown, Cog, SmallInfoSign } from \"@blueprintjs/icons\";\nimport { arrayMove } from \"@dnd-kit/sortable\";\nimport classNames from \"classnames\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { ActionButton } from \"../base-components/action-button/ActionButton.js\";\nimport { Checkbox } from \"../base-components/checkbox/Checkbox.js\";\nimport { Dialog } from \"../base-components/dialog/Dialog.js\";\nimport { DraggableList } from \"../base-components/draggable-list/DraggableList.js\";\nimport { SearchBar } from \"../base-components/search-bar/SearchBar.js\";\nimport styles from \"./ColumnConfigDialog.module.css\";\nexport function ColumnConfigDialog({\n isOpen,\n onClose,\n columnOptions,\n currentVisibility,\n currentColumnOrder,\n onApply,\n isValidConfig\n}) {\n const [visibleColumns, setVisibleColumns] = useState([]);\n const [searchQuery, setSearchQuery] = useState(\"\");\n const allColumns = useMemo(() => {\n return columnOptions.map(opt => {\n const isVisible = currentVisibility ? currentVisibility[opt.id] : false;\n return {\n id: opt.id,\n label: opt.name,\n isVisible\n };\n });\n }, [columnOptions, currentVisibility]);\n\n // Sync local state with prop when dialog is opened\n useEffect(() => {\n if (isOpen) {\n const visibleCols = allColumns.filter(col => col.isVisible);\n\n // Sort by current column order if available\n if (!!currentColumnOrder?.length) {\n visibleCols.sort((a, b) => {\n const indexA = currentColumnOrder.indexOf(a.id);\n const indexB = currentColumnOrder.indexOf(b.id);\n // If not in order array, put at end\n const orderA = indexA === -1 ? Infinity : indexA;\n const orderB = indexB === -1 ? Infinity : indexB;\n return orderA - orderB;\n });\n }\n setVisibleColumns(visibleCols);\n setSearchQuery(\"\");\n }\n }, [isOpen, allColumns, currentColumnOrder]);\n const handleApply = useCallback(() => {\n onApply(getColumnConfig(allColumns, visibleColumns));\n onClose();\n }, [allColumns, visibleColumns, onApply, onClose]);\n\n // If no condition provided, default to valid\n const isValid = isValidConfig ? isValidConfig(getColumnConfig(allColumns, visibleColumns)) : true;\n const isApplyDisabled = visibleColumns.length === 0 || !isValid;\n const handleReorderColumns = useCallback((fromIndex, toIndex) => {\n setVisibleColumns(items => arrayMove(items, fromIndex, toIndex));\n }, []);\n const handleRemoveColumn = useCallback(columnId => {\n setVisibleColumns(prev => prev.filter(col => col.id !== columnId));\n }, []);\n const handleToggleColumn = useCallback(column => {\n setVisibleColumns(prev => {\n const isCurrentlyVisible = prev.some(col => col.id === column.id);\n if (isCurrentlyVisible) {\n return prev.filter(col => col.id !== column.id);\n } else {\n return [...prev, column];\n }\n });\n }, []);\n const handleSearchChange = useCallback(event => {\n setSearchQuery(event.target.value);\n }, []);\n const handleSelectAll = useCallback(columns => {\n setVisibleColumns(prev => {\n const allSelected = columns.every(col => prev.some(v => v.id === col.id));\n if (allSelected) {\n // Deselect all filtered columns\n return prev.filter(v => !columns.some(col => col.id === v.id));\n } else {\n // Select all filtered columns that aren't already selected\n const newColumns = columns.filter(col => !prev.some(v => v.id === col.id));\n return [...prev, ...newColumns];\n }\n });\n }, []);\n const filteredAvailableColumns = useMemo(() => {\n const query = searchQuery.toLowerCase().trim();\n if (!query) {\n return allColumns;\n }\n return allColumns.filter(col => (col.label?.toLowerCase().includes(query) ?? false) || col.id.toLowerCase().includes(query));\n }, [allColumns, searchQuery]);\n const footer = useMemo(() => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ActionButton, {\n onClick: onClose\n }, \"Cancel\"), /*#__PURE__*/React.createElement(ActionButton, {\n variant: \"primary\",\n onClick: handleApply,\n disabled: isApplyDisabled\n }, \"Apply\")), [onClose, handleApply, isApplyDisabled]);\n return /*#__PURE__*/React.createElement(Dialog, {\n isOpen: isOpen,\n onOpenChange: onClose,\n title: DialogTitle,\n footer: footer,\n className: styles.columnConfigDialog\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.dialogLayout\n }, /*#__PURE__*/React.createElement(VisibleColumnsList, {\n columns: visibleColumns,\n onReorder: handleReorderColumns,\n onRemove: handleRemoveColumn\n }), /*#__PURE__*/React.createElement(AvailableColumnsList, {\n visibleColumns: visibleColumns,\n searchQuery: searchQuery,\n onSearchChange: handleSearchChange,\n onToggleColumn: handleToggleColumn,\n onSelectAll: handleSelectAll,\n filteredColumns: filteredAvailableColumns\n })));\n}\nconst DialogTitle = /*#__PURE__*/React.createElement(\"div\", {\n className: styles.title\n}, /*#__PURE__*/React.createElement(Cog, null), \"Configure Table Columns\");\nconst getColumnConfig = (allColumns, visibleColumns) => {\n const hiddenColumns = allColumns.filter(col => !visibleColumns.some(v => v.id === col.id));\n return [...visibleColumns.map(col => ({\n columnId: col.id,\n isVisible: true\n })), ...hiddenColumns.map(col => ({\n columnId: col.id,\n isVisible: false\n }))];\n};\nfunction VisibleColumnsList({\n columns,\n onReorder,\n onRemove\n}) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: styles.visibleColumnsContainer\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.sectionHeader\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.sectionTitle\n }, /*#__PURE__*/React.createElement(\"span\", null, \"Visible Columns\"), /*#__PURE__*/React.createElement(\"span\", {\n className: styles.countTag\n }, columns.length)), /*#__PURE__*/React.createElement(\"div\", {\n className: styles.sectionHint\n }, \"Drag to reorder\")), /*#__PURE__*/React.createElement(DraggableList, {\n items: columns,\n onReorder: onReorder,\n onRemove: onRemove,\n removeIconVariant: \"trash\",\n emptyMessage: \"No visible columns\",\n className: styles.columnList\n }));\n}\nfunction AvailableColumnsList({\n visibleColumns,\n searchQuery,\n onSearchChange,\n onToggleColumn,\n onSelectAll,\n filteredColumns\n}) {\n const selectedCount = visibleColumns.length;\n const totalCount = filteredColumns.length;\n const allFilteredSelected = filteredColumns.every(col => visibleColumns.some(v => v.id === col.id));\n const someFilteredSelected = filteredColumns.some(col => visibleColumns.some(v => v.id === col.id));\n const handleSelectAllClick = useCallback(() => {\n onSelectAll(filteredColumns);\n }, [filteredColumns, onSelectAll]);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: styles.availableColumnsContainer\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(styles.sectionHeader, styles.sectionTitle)\n }, \"Add or Remove Columns\"), /*#__PURE__*/React.createElement(SearchBar, {\n value: searchQuery,\n onChange: onSearchChange,\n placeholder: \"Search...\",\n \"aria-label\": \"Search available columns\",\n className: styles.searchContainer\n }), /*#__PURE__*/React.createElement(Collapsible.Root, {\n defaultOpen: true,\n className: styles.propertiesList\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.categoryHeader\n }, /*#__PURE__*/React.createElement(\"label\", {\n className: styles.selectAllLabel\n }, /*#__PURE__*/React.createElement(Checkbox, {\n checked: allFilteredSelected,\n indeterminate: someFilteredSelected && !allFilteredSelected,\n onCheckedChange: handleSelectAllClick,\n className: styles.checkbox\n }), \"All Columns\"), /*#__PURE__*/React.createElement(Collapsible.Trigger, {\n className: styles.categoryTrigger\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: styles.categoryCount\n }, selectedCount, \"/\", totalCount), /*#__PURE__*/React.createElement(CaretDown, {\n className: styles.caretIcon\n }))), /*#__PURE__*/React.createElement(Collapsible.Panel, {\n className: styles.propertyList\n }, filteredColumns.length === 0 ? /*#__PURE__*/React.createElement(\"div\", {\n className: styles.emptyState\n }, \"No matching columns found\") : filteredColumns.map(column => /*#__PURE__*/React.createElement(PropertyItem, {\n key: column.id,\n column: column,\n isSelected: visibleColumns.some(v => v.id === column.id),\n onToggle: onToggleColumn\n })))));\n}\nfunction PropertyItem({\n column,\n isSelected,\n onToggle,\n showInfoIcon = false\n}) {\n const handleClick = useCallback(() => {\n onToggle(column);\n }, [onToggle, column]);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: styles.propertyItem\n }, /*#__PURE__*/React.createElement(\"label\", {\n className: styles.propertyLabel\n }, /*#__PURE__*/React.createElement(Checkbox, {\n checked: isSelected,\n onCheckedChange: handleClick,\n className: styles.checkbox\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: styles.propertyName\n }, column.label)), showInfoIcon && /*#__PURE__*/React.createElement(SmallInfoSign, {\n className: styles.infoIcon\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.title {\n display: flex;\n align-items: center;\n gap: var(--osdk-surface-spacing);\n}\n\n.sortColumnsList {\n display: flex;\n flex-direction: column;\n gap: var(--osdk-surface-spacing);\n flex: 1;\n justify-content: space-between;\n overflow-x: hidden;\n}\n\n.sortableList {\n flex: 1;\n}\n\n.selectedColumnsContainer {\n margin-bottom: calc(var(--osdk-surface-spacing) * 2);\n}\n\n.sortColumnItem {\n display: flex;\n align-items: center;\n justify-content: space-between;\n min-width: 0;\n width: 100%;\n}\n\n.sortColumnName {\n min-width: 0;\n flex-shrink: 1;\n}\n\n.sortDirectionButton {\n flex-shrink: 0;\n background: none;\n border: none;\n padding: var(--osdk-surface-spacing);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--osdk-surface-border-radius);\n\n &:hover {\n background-color: var(--osdk-button-secondary-bg-hover);\n }\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: var(--osdk-focus-outline);\n outline-offset: calc(-1 * var(--osdk-focus-visible-outline-offset));\n }\n}\n\n.sortIcon {\n color: var(--osdk-typography-color-muted);\n}\n\n.addColumnButton {\n display: flex;\n align-items: center;\n gap: calc(var(--osdk-surface-spacing) * 2);\n width: 100%;\n padding: calc(var(--osdk-surface-spacing) * 2)\n calc(var(--osdk-surface-spacing) * 3);\n background-color: var(--osdk-button-secondary-bg);\n border: var(--osdk-surface-border);\n border-radius: var(--osdk-surface-border-radius);\n cursor: pointer;\n color: var(--osdk-button-secondary-color);\n margin-top: calc(var(--osdk-surface-spacing) * 2);\n\n &:hover:not(:disabled) {\n background-color: var(--osdk-button-secondary-bg-hover);\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n &:focus-visible {\n outline: var(--osdk-focus-outline);\n outline-offset: calc(-1 * var(--osdk-focus-visible-outline-offset));\n }\n}\n\n.addIcon {\n width: var(--osdk-iconography-size-small);\n height: var(--osdk-iconography-size-small);\n}\n\n.addColumnText {\n flex: 1;\n text-align: left;\n}\n\n\n.truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\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 { DraggableList } from \"../base-components/draggable-list/DraggableList.js\";\nexport function SortableItemsList({\n items,\n onReorder,\n onRemove,\n className\n}) {\n const renderContent = useCallback(item => item.content, []);\n return /*#__PURE__*/React.createElement(DraggableList, {\n items: items,\n onReorder: onReorder,\n onRemove: onRemove,\n removeIconVariant: \"cross\",\n renderContent: renderContent,\n className: className\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 { Button } from \"@base-ui/react/button\";\nimport { Add, CaretDown, Cog, SortAlphabetical, SortAlphabeticalDesc } from \"@blueprintjs/icons\";\nimport { arrayMove } from \"@dnd-kit/sortable\";\nimport classNames from \"classnames\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { ActionButton } from \"../base-components/action-button/ActionButton.js\";\nimport { Dialog } from \"../base-components/dialog/Dialog.js\";\nimport { SearchableMenu } from \"../base-components/searchable-menu/SearchableMenu.js\";\nimport styles from \"./MultiColumnSortDialog.module.css\";\nimport { SortableItemsList } from \"./SortableItemsList.js\";\nexport function MultiColumnSortDialog({\n isOpen,\n onClose,\n onApply,\n currentSorting,\n columnOptions\n}) {\n const [selectedSortColumns, setSelectedSortColumns] = useState([]);\n // Initialize selected sort columns from current sorting\n useEffect(() => {\n if (isOpen) {\n const selectedColumns = [];\n for (const sort of currentSorting) {\n const column = columnOptions.find(col => col.id === sort.id);\n if (column) {\n selectedColumns.push({\n ...column,\n direction: sort.desc ? \"desc\" : \"asc\"\n });\n }\n }\n setSelectedSortColumns(selectedColumns);\n }\n }, [isOpen, currentSorting, columnOptions]);\n const handleAddColumn = useCallback(column => {\n setSelectedSortColumns(prev => [...prev, {\n ...column,\n direction: \"asc\"\n }]);\n }, []);\n const handleRemoveSortColumn = useCallback(id => {\n setSelectedSortColumns(prev => prev.filter(item => item.id !== id));\n }, []);\n const handleReorderSortColumns = useCallback((fromIndex, toIndex) => {\n setSelectedSortColumns(items => arrayMove(items, fromIndex, toIndex));\n }, []);\n const handleToggleSortDirection = useCallback(id => {\n setSelectedSortColumns(prev => prev.map(item => item.id === id ? {\n ...item,\n direction: item.direction === \"asc\" ? \"desc\" : \"asc\"\n } : item));\n }, []);\n const handleApply = useCallback(() => {\n const sortingState = selectedSortColumns.map(col => ({\n id: col.id,\n desc: col.direction === \"desc\"\n }));\n onApply(sortingState);\n onClose();\n }, [selectedSortColumns, onApply, onClose]);\n const availableColumns = useMemo(() => columnOptions.filter(col => col.canSort && !selectedSortColumns.some(selected => selected.id === col.id)), [columnOptions, selectedSortColumns]);\n const searchableMenuItems = useMemo(() => availableColumns.map(col => ({\n key: col.id,\n label: col.name\n })), [availableColumns]);\n const handleMenuItemSelected = useCallback(key => {\n const column = availableColumns.find(col => col.id === key);\n if (column) {\n handleAddColumn(column);\n }\n }, [availableColumns, handleAddColumn]);\n const sortableItems = useMemo(() => {\n return selectedSortColumns.map(item => ({\n id: item.id,\n label: item.name,\n content: /*#__PURE__*/React.createElement(\"div\", {\n className: styles.sortColumnItem\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: classNames(styles.sortColumnName, styles.truncate)\n }, item.name), /*#__PURE__*/React.createElement(Button, {\n className: styles.sortDirectionButton,\n onClick: () => handleToggleSortDirection(item.id),\n \"aria-label\": `Toggle sort direction for ${item.name}`\n }, item.direction === \"asc\" ? /*#__PURE__*/React.createElement(SortAlphabetical, {\n className: styles.sortIcon\n }) : /*#__PURE__*/React.createElement(SortAlphabeticalDesc, {\n className: styles.sortIcon\n })))\n }));\n }, [selectedSortColumns, handleToggleSortDirection]);\n const footer = useMemo(() => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ActionButton, {\n onClick: onClose\n }, \"Cancel\"), /*#__PURE__*/React.createElement(ActionButton, {\n variant: \"primary\",\n onClick: handleApply\n }, \"Apply\")), [handleApply, onClose]);\n return /*#__PURE__*/React.createElement(Dialog, {\n isOpen: isOpen,\n onOpenChange: onClose,\n title: DialogTitle,\n footer: footer\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.sortColumnsList\n }, /*#__PURE__*/React.createElement(SortableItemsList, {\n items: sortableItems,\n onReorder: handleReorderSortColumns,\n onRemove: handleRemoveSortColumn,\n className: styles.sortableList\n }), /*#__PURE__*/React.createElement(SearchableMenu, {\n items: searchableMenuItems,\n onItemSelected: handleMenuItemSelected,\n trigger: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Add, {\n className: styles.addIcon\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: styles.addColumnText\n }, \"Add Column to Sort\"), /*#__PURE__*/React.createElement(CaretDown, null)),\n triggerClassName: styles.addColumnButton,\n disabled: availableColumns.length === 0,\n searchPlaceholder: \"Search columns\",\n emptyMessage: \"No matching columns\"\n })));\n}\nconst DialogTitle = /*#__PURE__*/React.createElement(\"div\", {\n className: styles.title\n}, /*#__PURE__*/React.createElement(Cog, null), \"Sort on Multiple Columns\");","/*\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 width: max-content;\n min-width: 100%;\n height: var(--osdk-table-header-height);\n z-index: var(--osdk-surface-z-index-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 width: max-content;\n min-width: 100%;\n border-top: var(--osdk-table-border);\n border-bottom: var(--osdk-table-border);\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-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: none;\n }\n}\n\n.osdkTableHeaderCell[data-pinned=\"left\"],\n.osdkTableHeaderCell[data-pinned=\"right\"] {\n position: sticky;\n z-index: var(--osdk-surface-z-index-2);\n background-color: var(--osdk-table-header-bg);\n}\n\n/* Last left-pinned column - no left-pinned siblings after it */\n.osdkTableHeaderCell[data-pinned=\"left\"]:not(:has(~ [data-pinned=\"left\"])) {\n border-right: var(--osdk-table-pinned-column-border);\n}\n\n/* First right-pinned column - no right-pinned siblings before it */\n.osdkTableHeaderCell[data-pinned=\"right\"]:not(\n :has(~ [data-pinned=\"right\"]):nth-child(n + 2)\n ) {\n border-left: var(--osdk-table-pinned-column-border);\n}\n\n.osdkTableSelectionHeaderCell {\n justify-content: center;\n padding: 0;\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(--osdk-surface-z-index-2);\n\n &:hover {\n background: var(--osdk-table-resizer-color-hover);\n }\n\n &:active {\n background: var(--osdk-table-resizer-color-active);\n }\n}\n\n.osdkLoadingHeaderCell {\n height: var(--osdk-table-header-fontSize);\n flex: 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\n.osdkHeaderContent {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n line-clamp: 2;\n text-align: left;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.osdkHeaderContent:has([role=\"checkbox\"]) {\n display: flex;\n justify-content: center;\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 \"./TableHeaderContent.module.css\";\nexport function TableHeaderContent({\n header\n}) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: styles.osdkHeaderContent\n }, flexRender(header.column.columnDef.header, header.getContext()));\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.osdkCenterContainer {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.osdkContentGap {\n display: flex;\n gap: calc(var(--osdk-surface-spacing) * 2);\n}\n\n.osdkHeaderContainer {\n justify-content: space-between;\n flex: 1;\n min-width: 0;\n align-self: stretch;\n}\n\n.osdkHeaderContentLeft {\n min-width: 0;\n flex-shrink: 1;\n}\n\n.osdkHeaderContentLeftClickable {\n cursor: pointer;\n}\n\n.osdkHeaderContentRight {\n flex-shrink: 0;\n}\n\n.osdkHeaderText {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 3;\n line-clamp: 3;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-grow: 1;\n}\n\n.osdkHeaderPopoverTrigger {\n padding: var(--osdk-table-header-menu-padding);\n flex-shrink: 0;\n flex-grow: 0;\n background-color: var(--osdk-table-header-menu-bg);\n border: var(--osdk-table-header-menu-border);\n border-radius: var(--osdk-surface-border-radius);\n color: var(--osdk-table-header-menu-color);\n cursor: pointer;\n user-select: none;\n\n &:hover {\n background-color: var(--osdk-table-header-menu-bg-hover);\n }\n\n &[data-popup-open] {\n background-color: var(--osdk-table-header-menu-bg-active);\n color: var(--osdk-table-header-menu-color-active);\n }\n\n &:focus-visible {\n outline: var(--osdk-focus-outline);\n outline-offset: var(--osdk-focus-visible-outline-offset);\n }\n}\n\n.osdkHeaderIcon {\n width: var(--osdk-iconography-size-small);\n height: var(--osdk-iconography-size-small);\n color: var(--osdk-table-header-menu-icon-color);\n}\n\n.osdkHeaderPopup {\n box-sizing: border-box;\n padding: var(--osdk-surface-spacing);\n border-radius: var(--osdk-surface-border-radius);\n border: var(--osdk-surface-border);\n background-color: var(--osdk-surface-background-color-default-rest);\n color: var(--osdk-typography-color-default-rest);\n box-shadow: var(--osdk-surface-shadow-2);\n font-size: var(--osdk-typography-size-body-medium);\n}\n\n.osdkHeaderMenuItem {\n justify-content: flex-start;\n padding: var(--osdk-surface-spacing) calc(var(--osdk-surface-spacing) * 2);\n cursor: pointer;\n\n &:hover {\n background-color: var(--osdk-surface-background-color-default-hover);\n border-radius: var(--osdk-surface-border-radius);\n }\n\n &:focus-visible {\n outline: var(--osdk-focus-outline);\n outline-offset: var(--osdk-focus-visible-outline-offset);\n }\n}\n\n.osdkHeaderMenuItem .osdkHeaderActiveMenuItem {\n background-color: var(--osdk-intent-primary-rest);\n color: var(--osdk-intent-primary-foreground);\n\n &:hover {\n background-color: var(--osdk-intent-primary-hover);\n }\n\n &:active {\n background-color: var(--osdk-intent-primary-active);\n }\n}\n\n.sortIndex {\n font-size: var(--osdk-typography-size-body-x-small);\n margin-left: var(--osdk-surface-spacing);\n color: var(--osdk-typography-color-muted);\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 { Menu } from \"@base-ui/react/menu\";\nimport { ChevronDown, Pin, Remove, Settings, Sort, SortAlphabetical, SortAlphabeticalDesc, Unpin, VerticalDistribution } from \"@blueprintjs/icons\";\nimport classNames from \"classnames\";\nimport React, { useCallback, useState } from \"react\";\nimport { usePortalContainer } from \"../shared/PortalContainerContext.js\";\nimport { TableHeaderContent } from \"./TableHeaderContent.js\";\nimport styles from \"./TableHeaderWithPopover.module.css\";\nfunction HeaderMenuItem({\n onClick,\n icon: Icon,\n label,\n active = false\n}) {\n return /*#__PURE__*/React.createElement(Menu.Item, {\n closeOnClick: true,\n className: classNames(styles.osdkCenterContainer, styles.osdkContentGap, styles.osdkHeaderMenuItem, active && styles.osdkHeaderActiveMenuItem),\n onClick: onClick\n }, /*#__PURE__*/React.createElement(Icon, {\n className: styles.osdkHeaderIcon\n }), /*#__PURE__*/React.createElement(\"span\", null, label));\n}\nexport function TableHeaderWithPopover({\n header,\n table,\n isColumnPinned,\n onResetSize,\n columnOptions,\n featureFlags,\n onOpenColumnConfig,\n onOpenMultiSort,\n onColumnHeaderClick\n}) {\n const portalContainer = usePortalContainer();\n const {\n showSortingItems = false,\n showPinningItems = false,\n showResizeItem = false,\n showConfigItem = false\n } = featureFlags ?? {};\n const {\n setColumnPinning,\n setSorting\n } = table;\n const currentSorting = table.getState().sorting;\n const [isOpen, setIsOpen] = useState(false);\n const handlePinLeft = useCallback(() => {\n setColumnPinning(prev => {\n return {\n left: [...(prev.left || []), header.column.id],\n right: prev.right?.filter(id => id !== header.column.id) || []\n };\n });\n }, [header.column.id, setColumnPinning]);\n const handleUnpin = useCallback(() => {\n setColumnPinning(prev => {\n return {\n left: prev.left?.filter(id => id !== header.column.id) || [],\n right: prev.right?.filter(id => id !== header.column.id) || []\n };\n });\n }, [header.column.id, setColumnPinning]);\n const handleSortAscending = useCallback(() => {\n header.column.toggleSorting(false);\n setSorting?.([{\n id: header.column.id,\n desc: false\n }]);\n }, [header.column, setSorting]);\n const handleSortDescending = useCallback(() => {\n header.column.toggleSorting(true);\n setSorting?.([{\n id: header.column.id,\n desc: true\n }]);\n }, [header.column, setSorting]);\n const handleClearAllSorts = useCallback(() => {\n header.column.clearSorting();\n setSorting?.([]);\n }, [header.column, setSorting]);\n const handleResetSize = useCallback(() => {\n header.column.resetSize();\n if (onResetSize) {\n onResetSize();\n }\n }, [header.column, onResetSize]);\n const handleInteraction = useCallback(e => {\n e.preventDefault();\n setIsOpen(prev => !prev);\n }, []);\n const handleHeaderClick = useCallback(() => {\n onColumnHeaderClick?.(header.column.id);\n }, [header.column.id, onColumnHeaderClick]);\n const handleOpenColumnConfig = useCallback(() => {\n onOpenColumnConfig?.();\n setIsOpen(false);\n }, [onOpenColumnConfig]);\n const handleOpenMultiSort = useCallback(() => {\n onOpenMultiSort?.();\n setIsOpen(false);\n }, [onOpenMultiSort]);\n const isSorted = header.column.getIsSorted();\n const isSortable = header.column.getCanSort();\n const sortIndex = currentSorting?.findIndex(s => s.id === header.column.id) ?? -1;\n const hasAnyMenuItems = showPinningItems || showSortingItems && isSortable || showResizeItem || showConfigItem;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Menu.Root, {\n open: isOpen,\n onOpenChange: setIsOpen,\n modal: false\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(styles.osdkCenterContainer, styles.osdkContentGap, styles.osdkHeaderContainer),\n onContextMenu: handleInteraction\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(styles.osdkCenterContainer, styles.osdkContentGap, styles.osdkHeaderContentLeft, onColumnHeaderClick && styles.osdkHeaderContentLeftClickable),\n onClick: onColumnHeaderClick ? handleHeaderClick : undefined\n }, isColumnPinned && /*#__PURE__*/React.createElement(Pin, {\n className: styles.osdkHeaderIcon\n }), /*#__PURE__*/React.createElement(TableHeaderContent, {\n header: header\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(styles.osdkCenterContainer, styles.osdkContentGap, styles.osdkHeaderContentRight)\n }, isSorted && /*#__PURE__*/React.createElement(\"div\", {\n className: styles.osdkCenterContainer\n }, isSorted === \"asc\" ? /*#__PURE__*/React.createElement(SortAlphabetical, {\n className: styles.osdkHeaderIcon\n }) : /*#__PURE__*/React.createElement(SortAlphabeticalDesc, {\n className: styles.osdkHeaderIcon\n }), currentSorting.length > 1 && sortIndex >= 0 && /*#__PURE__*/React.createElement(\"span\", {\n className: styles.sortIndex\n }, sortIndex + 1)), hasAnyMenuItems && /*#__PURE__*/React.createElement(Menu.Trigger, {\n \"aria-label\": `Open header menu for column with id=${header.column.id}`,\n className: classNames(styles.osdkCenterContainer, styles.osdkHeaderPopoverTrigger)\n }, /*#__PURE__*/React.createElement(ChevronDown, {\n className: styles.osdkHeaderIcon\n }))), /*#__PURE__*/React.createElement(Menu.Portal, {\n container: portalContainer\n }, /*#__PURE__*/React.createElement(Menu.Positioner, {\n sideOffset: 4\n }, /*#__PURE__*/React.createElement(Menu.Popup, {\n className: styles.osdkHeaderPopup\n }, showPinningItems && !isColumnPinned && /*#__PURE__*/React.createElement(HeaderMenuItem, {\n onClick: handlePinLeft,\n icon: Pin,\n label: \"Pin column\"\n }), showPinningItems && isColumnPinned && /*#__PURE__*/React.createElement(HeaderMenuItem, {\n onClick: handleUnpin,\n icon: Unpin,\n label: \"Unpin Column\",\n active: true\n }), showSortingItems && isSortable && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(HeaderMenuItem, {\n onClick: handleSortAscending,\n icon: SortAlphabetical,\n label: \"Sort ascending\",\n active: isSorted === \"asc\"\n }), /*#__PURE__*/React.createElement(HeaderMenuItem, {\n onClick: handleSortDescending,\n icon: SortAlphabeticalDesc,\n label: \"Sort descending\",\n active: isSorted === \"desc\"\n }), columnOptions?.some(col => col.canSort) && /*#__PURE__*/React.createElement(HeaderMenuItem, {\n onClick: handleOpenMultiSort,\n icon: Sort,\n label: \"Sort on multiple columns\"\n })), showSortingItems && !!currentSorting?.length && /*#__PURE__*/React.createElement(HeaderMenuItem, {\n onClick: handleClearAllSorts,\n icon: Remove,\n label: \"Clear all sorts\"\n }), showResizeItem && /*#__PURE__*/React.createElement(HeaderMenuItem, {\n onClick: handleResetSize,\n icon: VerticalDistribution,\n label: \"Reset Column Size\"\n }), showConfigItem && /*#__PURE__*/React.createElement(HeaderMenuItem, {\n onClick: handleOpenColumnConfig,\n icon: Settings,\n label: \"Configure Columns\"\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 function getColumnPinningStyles(column) {\n const isPinned = column.getIsPinned();\n return {\n columnStyles: {\n left: isPinned === \"left\" ? `${column.getStart(\"left\")}px` : undefined,\n right: isPinned === \"right\" ? `${column.getAfter(\"right\")}px` : undefined,\n width: column.getSize()\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 classNames from \"classnames\";\nimport React, { useCallback, useMemo, useState } from \"react\";\nimport { ColumnConfigDialog } from \"./ColumnConfigDialog.js\";\nimport { MultiColumnSortDialog } from \"./MultiColumnSortDialog.js\";\nimport styles from \"./TableHeader.module.css\";\nimport { TableHeaderContent } from \"./TableHeaderContent.js\";\nimport { TableHeaderWithPopover } from \"./TableHeaderWithPopover.js\";\nimport { SELECTION_COLUMN_ID } from \"./utils/constants.js\";\nimport { getColumnPinningStyles } from \"./utils/getColumnPinningStyles.js\";\nconst getHeaderName = (column, allHeaders) => {\n const {\n id,\n columnDef\n } = column;\n const header = allHeaders.find(header => header.id === id);\n const headerDef = columnDef.header;\n if (headerDef) {\n if (typeof headerDef === \"string\") {\n return headerDef;\n }\n // Try to get header name from the renderHeader function\n if (header) {\n const displayedHeader = headerDef(header.getContext());\n if (typeof displayedHeader === \"string\") return displayedHeader;\n }\n }\n // Fallback to use the columnName provided by user or id\n const {\n meta\n } = columnDef;\n return meta?.columnName ?? id;\n};\nexport function TableHeader({\n table,\n headerMenuFeatureFlags,\n onColumnHeaderClick\n}) {\n // TODO: If value is number type, right align header\n\n const {\n setColumnOrder,\n setColumnVisibility,\n setSorting\n } = table;\n const currentSorting = table.getState().sorting;\n const currentVisibility = table.getState().columnVisibility;\n const currentColumnOrder = table.getState().columnOrder;\n const isResizing = !!table.getState().columnSizingInfo?.isResizingColumn;\n const [configDialogOpen, setConfigDialogOpen] = useState(false);\n const [multiSortDialogOpen, setMultiSortDialogOpen] = useState(false);\n const handleOpenColumnConfig = useCallback(() => {\n setConfigDialogOpen(true);\n }, []);\n const handleCloseColumnConfig = useCallback(() => {\n setConfigDialogOpen(false);\n }, []);\n const handleOpenMultiSort = useCallback(() => {\n setMultiSortDialogOpen(true);\n }, []);\n const handleCloseMultiSort = useCallback(() => {\n setMultiSortDialogOpen(false);\n }, []);\n const handleApplyMultiSort = useCallback(sortColumns => {\n setMultiSortDialogOpen(false);\n setSorting?.(sortColumns);\n }, [setSorting]);\n const handleApplyColumnConfig = useCallback(updates => {\n const newVisibilityState = {};\n for (const update of updates) {\n newVisibilityState[update.columnId] = update.isVisible;\n }\n setColumnOrder(updates.map(col => col.columnId));\n setColumnVisibility(newVisibilityState);\n }, [setColumnOrder, setColumnVisibility]);\n const columnOptions = useMemo(() => {\n const allHeaders = table.getHeaderGroups().flatMap(headerGroup => headerGroup.headers);\n return table.getAllColumns().filter(column => column.id !== SELECTION_COLUMN_ID).map(column => {\n return {\n id: column.id,\n name: getHeaderName(column, allHeaders),\n canSort: column.getCanSort()\n };\n });\n }, [table]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__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 => {\n const {\n columnStyles\n } = getColumnPinningStyles(header.column);\n const isColumnPinned = header.column.getIsPinned();\n const isSelectColumn = header.id === SELECTION_COLUMN_ID;\n return /*#__PURE__*/React.createElement(\"th\", {\n key: header.id,\n \"data-pinned\": header.column.getIsPinned(),\n className: classNames(styles.osdkTableHeaderCell, {\n [styles.osdkTableSelectionHeaderCell]: isSelectColumn\n }),\n style: columnStyles\n }, header.isPlaceholder ? null : isSelectColumn ? /*#__PURE__*/React.createElement(TableHeaderContent, {\n header: header\n }) : /*#__PURE__*/React.createElement(TableHeaderWithPopover, {\n table: table,\n header: header,\n isColumnPinned: isColumnPinned,\n columnOptions: columnOptions,\n featureFlags: headerMenuFeatureFlags,\n onOpenColumnConfig: handleOpenColumnConfig,\n onOpenMultiSort: handleOpenMultiSort,\n onColumnHeaderClick: onColumnHeaderClick\n }), header.column.getCanResize() && headerMenuFeatureFlags?.showResizeItem !== false && /*#__PURE__*/React.createElement(\"div\", {\n className: styles.osdkTableHeaderResizer,\n onDoubleClick: () => header.column.resetSize(),\n onMouseDown: header.getResizeHandler(),\n onTouchStart: header.getResizeHandler()\n }));\n })))), !!columnOptions?.length && /*#__PURE__*/React.createElement(ColumnConfigDialog, {\n isOpen: configDialogOpen,\n onClose: handleCloseColumnConfig,\n columnOptions: columnOptions,\n currentVisibility: currentVisibility,\n currentColumnOrder: currentColumnOrder,\n onApply: handleApplyColumnConfig\n }), columnOptions?.some(col => col.canSort) && /*#__PURE__*/React.createElement(MultiColumnSortDialog, {\n isOpen: multiSortDialogOpen,\n onClose: handleCloseMultiSort,\n columnOptions: columnOptions,\n currentSorting: currentSorting,\n onApply: handleApplyMultiSort\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, { useEffect, useMemo, useRef, useState } from \"react\";\nimport { SkeletonBar } from \"../base-components/skeleton/SkeletonBar.js\";\nimport loadingStyles from \"./LoadingCell.module.css\";\nimport { LoadingRow } from \"./LoadingRow.js\";\nimport bodyStyles from \"./TableBody.module.css\";\nimport { TableHeader } from \"./TableHeader.js\";\nimport headerStyles from \"./TableHeader.module.css\";\nimport { DEFAULT_LOADING_COLUMN_WIDTH, DEFAULT_ROW_HEIGHT, MIN_LOADING_ROWS } from \"./utils/constants.js\";\nexport function LoadingStateTable({\n table,\n tableContainerRef,\n headerGroups,\n rowHeight = DEFAULT_ROW_HEIGHT,\n columnWidth = DEFAULT_LOADING_COLUMN_WIDTH\n}) {\n // If selection enabled, there will be a header for the selection column\n const enableRowSelection = table.options.enableRowSelection;\n const minHeaderCount = enableRowSelection ? 1 : 0;\n const headers = useMemo(() => headerGroups.length > 0 ? headerGroups[0].headers : [], [headerGroups]);\n const hasHeadersLoaded = headers.length > minHeaderCount;\n const headerRef = useRef(null);\n const bodyRef = useRef(null);\n const [loadingRowCount, setLoadingRowCount] = useState(MIN_LOADING_ROWS);\n const [loadingColumnCount, setLoadingColumnCount] = useState(headers.length);\n // Calculate number of columns needed to fill container width\n useEffect(() => {\n if (hasHeadersLoaded) {\n setLoadingColumnCount(headers.length);\n } else {\n if (tableContainerRef.current) {\n const tableWidth = tableContainerRef.current.clientWidth;\n if (tableWidth > 0) {\n const columnsNeeded = Math.ceil(tableWidth / columnWidth);\n setLoadingColumnCount(columnsNeeded);\n }\n }\n }\n }, [columnWidth, hasHeadersLoaded, headers, tableContainerRef]);\n\n // Calculate number of rows needed to fill container height\n useEffect(() => {\n if (tableContainerRef.current) {\n const containerHeight = tableContainerRef.current.clientHeight;\n const availableHeight = containerHeight - rowHeight;\n if (availableHeight > 0) {\n const rowsNeeded = Math.ceil(availableHeight / rowHeight);\n setLoadingRowCount(Math.max(rowsNeeded, MIN_LOADING_ROWS));\n }\n }\n }, [tableContainerRef, rowHeight]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, hasHeadersLoaded ? /*#__PURE__*/React.createElement(TableHeader, {\n table: table\n }) : /*#__PURE__*/React.createElement(\"thead\", {\n className: headerStyles.osdkTableHeader,\n ref: headerRef\n }, /*#__PURE__*/React.createElement(\"tr\", {\n className: headerStyles.osdkTableHeaderRow\n }, Array.from({\n length: loadingColumnCount\n }).map((_, index) => {\n const width = headers.length > index ? headers[index].getSize() : columnWidth;\n return /*#__PURE__*/React.createElement(\"th\", {\n key: `loading-header-${index}`,\n className: headerStyles.osdkTableHeaderCell,\n style: {\n width\n }\n }, /*#__PURE__*/React.createElement(SkeletonBar, {\n className: classNames(headerStyles.osdkLoadingHeaderCell, loadingStyles.osdkCellSkeleton)\n }));\n }))), /*#__PURE__*/React.createElement(\"tbody\", {\n className: bodyStyles.osdkTableBody,\n ref: bodyRef\n }, Array.from({\n length: loadingRowCount\n }).map((_, index) => /*#__PURE__*/React.createElement(LoadingRow, {\n key: `skeleton-${index}`,\n columnCount: loadingColumnCount,\n headers: headers,\n translateY: rowHeight * index,\n rowHeight: rowHeight,\n columnWidth: columnWidth\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.container {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.message {\n padding: calc(var(--osdk-surface-spacing) * 5);\n color: var(--osdk-typography-color-muted);\n font-style: italic;\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 from \"react\";\nimport styles from \"./NonIdealState.module.css\";\nexport function NonIdealState({\n message\n}) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: styles.container\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.message\n }, message));\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.osdkTableWrapper {\n display: flex;\n flex-direction: column;\n height: 100%;\n position: relative;\n}\n\n.osdkTableContainer {\n flex: 1;\n min-height: 0;\n overflow: auto;\n position: relative;\n /* Sticky headers, pinned columns, and resize handles use z-index only within\n the scroll container. Isolating that stacking context lets the sibling\n header-menu portal paint above them by DOM order instead of competing with\n table internals on z-index values. */\n isolation: isolate;\n background-color: var(--osdk-background-primary);\n}\n\n.osdkTableContainer table {\n border-collapse: collapse;\n display: grid;\n table-layout: fixed;\n width: max-content;\n min-width: 100%;\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(--osdk-surface-z-index-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\nimport { flexRender } from \"@tanstack/react-table\";\nimport React, { useRef } from \"react\";\nimport { CellContextMenu } from \"./CellContextMenu.js\";\nimport { useCellContextMenu } from \"./hooks/useCellContextMenu.js\";\nimport styles from \"./TableCell.module.css\";\nimport { SELECTION_COLUMN_ID } from \"./utils/constants.js\";\nimport { isCellEditable } from \"./utils/editableUtils.js\";\nimport { getColumnPinningStyles } from \"./utils/getColumnPinningStyles.js\";\nimport { shouldShowEditableCell } from \"./utils/shouldShowEditableCell.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 const {\n columnStyles\n } = getColumnPinningStyles(cell.column);\n const tableMeta = cell.getContext().table.options.meta;\n const columnMeta = cell.column.columnDef.meta;\n const isEditable = shouldShowEditableCell(isCellEditable(columnMeta?.editable, cell.row.original), tableMeta?.onCellEdit, tableMeta?.isInEditMode);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"td\", {\n ref: tdRef,\n \"data-pinned\": cell.column.getIsPinned(),\n \"data-editable\": isEditable ? \"true\" : undefined,\n className: styles.osdkTableCell,\n style: columnStyles,\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}","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 React, { useCallback, useMemo } 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 isFocused,\n setFocusedRowId,\n isInEditMode,\n getRowAttributes\n}) {\n // Use the capture phase so row focus is set even when children call\n // stopPropagation on the click event (e.g. DatePicker's input).\n const handleClickCapture = useCallback(() => {\n setFocusedRowId?.(row.id);\n }, [row.id, setFocusedRowId]);\n const handleClick = useCallback(() => {\n if (!isInEditMode) {\n onRowClick?.(row.original);\n }\n }, [isInEditMode, onRowClick, row.original]);\n const customRowAttributes = useMemo(() => {\n if (!getRowAttributes) {\n return;\n }\n return Object.fromEntries(Object.entries(getRowAttributes(row.original)).filter(entry => entry[1] != null));\n }, [getRowAttributes, row.original]);\n return /*#__PURE__*/React.createElement(\"tr\", _extends({}, customRowAttributes, {\n \"data-selected\": row.getIsSelected(),\n \"data-focused\": isFocused,\n \"data-row-parity\": virtualRow.index % 2 === 0 ? \"even\" : \"odd\",\n className: styles.osdkTableRow,\n style: {\n height: `${virtualRow.size}px`,\n transform: `translateY(${virtualRow.start}px)`\n },\n onClickCapture: handleClickCapture,\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 { LoadingRow } from \"./LoadingRow.js\";\nimport styles from \"./TableBody.module.css\";\nimport { TableRow } from \"./TableRow.js\";\nimport { DEFAULT_ROW_HEIGHT, VIRTUALIZER_OVERSCAN } from \"./utils/constants.js\";\nexport function TableBody({\n rows,\n tableContainerRef,\n onRowClick,\n renderCellContextMenu,\n rowHeight = DEFAULT_ROW_HEIGHT,\n isLoadingMore = false,\n headerGroups = [],\n focusedRowId,\n setFocusedRowId,\n isInEditMode,\n getRowAttributes\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: VIRTUALIZER_OVERSCAN\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 const totalSize = rowVirtualizer.getTotalSize();\n const bodyHeight = isLoadingMore ? totalSize + rowHeight : totalSize;\n const headers = headerGroups[0]?.headers ?? [];\n return /*#__PURE__*/React.createElement(\"tbody\", {\n className: styles.osdkTableBody,\n style: {\n height: `${bodyHeight}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 isFocused: focusedRowId === row.id,\n setFocusedRowId: setFocusedRowId,\n isInEditMode: isInEditMode,\n getRowAttributes: getRowAttributes\n });\n }), isLoadingMore && /*#__PURE__*/React.createElement(LoadingRow, {\n headers: headers,\n translateY: totalSize,\n rowHeight: rowHeight,\n columnCount: headers.length\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.tableEditContainer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: var(--osdk-surface-background-color-default-rest);\n border-top: var(--osdk-table-border);\n padding: var(--osdk-table-edit-container-padding);\n min-height: var(--osdk-table-edit-container-min-height);\n}\n\n.placeholder {\n color: var(--osdk-typography-color-muted);\n font-size: var(--osdk-typography-size-body-small);\n padding: calc(var(--osdk-surface-spacing) * 2) 0;\n}\n\n.editsInfoContainer {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: row;\n gap: calc(var(--osdk-surface-spacing) * 3);\n font-size: var(--osdk-typography-size-body-small);\n}\n\n.modificationCount {\n color: var(--osdk-intent-primary-rest);\n font-size: var(--osdk-typography-size-body-small);\n padding: calc(var(--osdk-surface-spacing) * 2) 0;\n}\n\n.editButtons {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n flex: 1;\n}\n\n.validationError {\n display: flex;\n align-items: center;\n gap: calc(var(--osdk-surface-spacing) * 2);\n color: var(--osdk-intent-danger-rest);\n}\n\n.errorIcon {\n color: var(--osdk-intent-danger-rest);\n}\n\n.divider {\n width: 1px;\n height: 8px;\n background-color: var(--osdk-surface-border-color-default);\n align-self: center;\n}\n","/*\n * Copyright 2026 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 { Error } from \"@blueprintjs/icons\";\nimport React, { useCallback, useState } from \"react\";\nimport { ActionButton } from \"../base-components/action-button/ActionButton.js\";\nimport styles from \"./TableEditContainer.module.css\";\nexport function TableEditContainer({\n editableConfig,\n hasFocusedRow\n}) {\n const {\n cellEdits,\n onSubmitEdits,\n clearEdits,\n editModeState,\n validationErrors\n } = editableConfig;\n const hasEdits = Object.keys(cellEdits ?? {}).length > 0;\n const hasValidationError = (validationErrors?.size ?? 0) > 0;\n const [isSubmitting, setIsSubmitting] = useState(false);\n const isInEditMode = editModeState.isActive;\n const canToggleEditMode = editModeState.type === \"manual\";\n const handleSubmitEdits = useCallback(async () => {\n setIsSubmitting(true);\n try {\n const success = await onSubmitEdits?.();\n if (success) {\n clearEdits?.();\n if (editModeState?.type === \"manual\") {\n editModeState.setActive(false);\n }\n }\n } finally {\n setIsSubmitting(false);\n }\n }, [editModeState, onSubmitEdits, clearEdits]);\n const handleCancelEdits = useCallback(() => {\n clearEdits?.();\n if (editModeState?.type === \"manual\") {\n editModeState.setActive(false);\n }\n }, [clearEdits, editModeState]);\n const handleEnterEditMode = useCallback(() => {\n if (editModeState?.type === \"manual\") {\n editModeState.setActive(true);\n }\n }, [editModeState]);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: styles.tableEditContainer\n }, hasEdits || hasValidationError ? /*#__PURE__*/React.createElement(\"div\", {\n className: styles.editsInfoContainer\n }, hasEdits && /*#__PURE__*/React.createElement(\"div\", {\n className: styles.modificationCount\n }, `${cellEdits ? Object.keys(cellEdits).length : 0} modifications`), hasEdits && hasValidationError && /*#__PURE__*/React.createElement(\"div\", {\n className: styles.divider\n }), hasValidationError && /*#__PURE__*/React.createElement(\"div\", {\n className: styles.validationError\n }, /*#__PURE__*/React.createElement(Error, {\n className: styles.errorIcon\n }), \"Validation error\")) : isInEditMode && !hasFocusedRow && /*#__PURE__*/React.createElement(\"div\", {\n className: styles.placeholder\n }, \"Select a row to edit data\\u2026\"), /*#__PURE__*/React.createElement(\"div\", {\n className: styles.editButtons\n }, !isInEditMode && canToggleEditMode && /*#__PURE__*/React.createElement(ActionButton, {\n variant: \"primary\",\n onClick: handleEnterEditMode\n }, \"Edit Table\"), isInEditMode && canToggleEditMode && /*#__PURE__*/React.createElement(ActionButton, {\n variant: \"secondary\",\n onClick: handleCancelEdits\n }, \"Cancel\"), isInEditMode && !!onSubmitEdits && /*#__PURE__*/React.createElement(ActionButton, {\n variant: \"primary\",\n onClick: handleSubmitEdits,\n disabled: !hasEdits || isSubmitting || hasValidationError\n }, \"Submit Edits\")));\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, useEffect, useRef, useState } from \"react\";\nimport { PortalContainerProvider } from \"../shared/PortalContainerContext.js\";\nimport { useFocusedRow } from \"./hooks/useFocusedRow.js\";\nimport { LoadingStateTable } from \"./LoadingStateTable.js\";\nimport { NonIdealState } from \"./NonIdealState.js\";\nimport styles from \"./Table.module.css\";\nimport { TableBody } from \"./TableBody.js\";\nimport { TableEditContainer } from \"./TableEditContainer.js\";\nimport { TableHeader } from \"./TableHeader.js\";\nimport { SCROLL_FETCH_THRESHOLD } from \"./utils/constants.js\";\nimport { isColumnDeclaredEditable } from \"./utils/editableUtils.js\";\nimport { PortalTrackerProvider, usePortalTracker } from \"./utils/PortalTracker.js\";\nexport function BaseTable(props) {\n return /*#__PURE__*/React.createElement(PortalTrackerProvider, null, /*#__PURE__*/React.createElement(BaseTableInner, props));\n}\nfunction BaseTableInner({\n table,\n isLoading,\n fetchNextPage,\n onRowClick,\n onColumnHeaderClick,\n rowHeight,\n renderCellContextMenu,\n className,\n error,\n headerMenuFeatureFlags,\n editableConfig,\n getRowAttributes,\n showEditFooter = true,\n renderEmptyState,\n focusedRowId: focusedRowIdProp,\n onFocusedRowChanged\n}) {\n const tableContainerRef = useRef(null);\n const objectTablePortalRef = useRef(null);\n const [isLoadingMore, setIsLoadingMore] = useState(false);\n const getRowById = useCallback(id => {\n try {\n return table.getRow(id, true)?.original ?? null;\n } catch {\n // table.getRow throws when the id no longer matches a row\n // (e.g. the row was removed or has not loaded yet). Treat a\n // missing row as \"no focus\" rather than crashing.\n return null;\n }\n }, [table]);\n const {\n focusedRowId,\n setFocusedRowId\n } = useFocusedRow({\n focusedRowId: focusedRowIdProp,\n onFocusedRowChanged,\n getRowById\n });\n const portalTracker = usePortalTracker();\n\n // Sync focusedRowId into table meta so cell renderers (which only\n // receive `table`) can read it without extra prop drilling.\n // Assigned synchronously so children see the current value in the\n // same render pass. This is safe because meta is a mutable bag that\n // TanStack Table never snapshots or shallow-compares.\n if (table.options.meta) {\n table.options.meta.focusedRowId = focusedRowId;\n }\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 useEffect(() => {\n if (!isLoading || fetchNextPage == null) {\n setIsLoadingMore(false);\n }\n }, [isLoading, fetchNextPage]);\n const fetchMoreOnEndReached = useCallback(async containerRefElement => {\n if (containerRefElement && !fetchingRef.current && !isLoadingMore) {\n const {\n scrollHeight,\n scrollTop,\n clientHeight\n } = containerRefElement;\n if (scrollHeight - scrollTop - clientHeight < SCROLL_FETCH_THRESHOLD && !isLoading && fetchNextPage != null) {\n fetchingRef.current = true;\n setIsLoadingMore(true);\n try {\n await fetchNextPage();\n } finally {\n fetchingRef.current = false;\n }\n }\n }\n }, [fetchNextPage, isLoading, isLoadingMore]);\n const handleScroll = useCallback(async e => {\n await fetchMoreOnEndReached(e.currentTarget);\n }, [fetchMoreOnEndReached]);\n const rows = table.getRowModel().rows;\n const headerGroups = table.getHeaderGroups();\n const hasData = rows.length > 0;\n const hasEditableColumns = table.getAllColumns().some(column => isColumnDeclaredEditable(column.columnDef.meta?.editable));\n\n // Use pointerdown instead of click to detect outside interactions.\n // base-ui's Select renders a full-screen backdrop that intercepts\n // pointerdown to close the popup. By the time the click event fires,\n // the backdrop is unmounted and event.target falls through to <body>,\n // which would incorrectly trigger the outside-click handler.\n // At pointerdown time the backdrop is still in the DOM, so\n // portalTracker.containsElement correctly identifies it.\n useEffect(() => {\n const handleClickOutside = event => {\n const target = event.target;\n if (tableContainerRef.current && !tableContainerRef.current.contains(target) && !portalTracker?.containsElement(target)) {\n setFocusedRowId(null);\n }\n };\n document.addEventListener(\"pointerdown\", handleClickOutside);\n return () => {\n document.removeEventListener(\"pointerdown\", handleClickOutside);\n };\n }, [portalTracker, setFocusedRowId]);\n return /*#__PURE__*/React.createElement(PortalContainerProvider, {\n container: objectTablePortalRef\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: objectTablePortalRef,\n className: classNames(styles.osdkTableWrapper, className)\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: tableContainerRef,\n className: styles.osdkTableContainer,\n onScroll: handleScroll\n }, /*#__PURE__*/React.createElement(\"table\", null, isLoading && !hasData ? /*#__PURE__*/React.createElement(LoadingStateTable, {\n table: table,\n headerGroups: headerGroups,\n rowHeight: rowHeight,\n tableContainerRef: tableContainerRef\n }) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TableHeader, {\n table: table,\n headerMenuFeatureFlags: headerMenuFeatureFlags,\n onColumnHeaderClick: onColumnHeaderClick\n }), /*#__PURE__*/React.createElement(TableBody, {\n rows: rows,\n tableContainerRef: tableContainerRef,\n onRowClick: onRowClick,\n rowHeight: rowHeight,\n renderCellContextMenu: renderCellContextMenu,\n isLoadingMore: isLoadingMore,\n headerGroups: headerGroups,\n focusedRowId: focusedRowId,\n setFocusedRowId: setFocusedRowId,\n isInEditMode: editableConfig?.editModeState.isActive,\n getRowAttributes: getRowAttributes\n }))), !hasData && error == null && (renderEmptyState != null ? renderEmptyState() : /*#__PURE__*/React.createElement(NonIdealState, {\n message: \"No Data\"\n })), error != null && /*#__PURE__*/React.createElement(NonIdealState, {\n message: `Error Loading Data: ${error.message}`\n })), showEditFooter && hasEditableColumns && editableConfig && /*#__PURE__*/React.createElement(TableEditContainer, {\n editableConfig: editableConfig,\n hasFocusedRow: focusedRowId != null\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/**\n * Derives the object set representing the current row selection.\n *\n * The selection is filtered down to the selected primary keys via the\n * `$primaryKey` special property, so this works for both object and interface\n * types without resolving the underlying primary key property name. When every\n * row is selected, the full `resultingObjectSet` is returned unchanged.\n *\n * Returns `undefined` when there is no resulting object set to derive from.\n */\nexport function deriveSelectionObjectSet(resultingObjectSet, change) {\n if (!resultingObjectSet) {\n return undefined;\n }\n if (change.isSelectAll && change.selectedRows.length > 0) {\n return resultingObjectSet;\n }\n const whereClause = {\n $primaryKey: {\n $in: change.selectedRows.map(r => r.$primaryKey)\n }\n };\n return resultingObjectSet.where(whereClause);\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, useImperativeHandle, useMemo } from \"react\";\nimport { useColumnDefs } from \"./hooks/useColumnDefs.js\";\nimport { useColumnPinning } from \"./hooks/useColumnPinning.js\";\nimport { useColumnResize } from \"./hooks/useColumnResize.js\";\nimport { useColumnVisibility } from \"./hooks/useColumnVisibility.js\";\nimport { useEditableTable } from \"./hooks/useEditableTable.js\";\nimport { useObjectTableData } from \"./hooks/useObjectTableData.js\";\nimport { useObjectTableSnapshot } from \"./hooks/useObjectTableSnapshot.js\";\nimport { useRowSelection } from \"./hooks/useRowSelection.js\";\nimport { useSelectionColumn } from \"./hooks/useSelectionColumn.js\";\nimport { useTableSorting } from \"./hooks/useTableSorting.js\";\nimport { BaseTable } from \"./Table.js\";\nimport { deriveSelectionObjectSet } from \"./utils/deriveSelectionObjectSet.js\";\nimport { getRowId, getRowIdFromPrimaryKey } from \"./utils/getRowId.js\";\nconst EMPTY_ARRAY = [];\n\n/**\n * ObjectTable - A headless table component for displaying OSDK object sets\n *\n * @example\n * ```tsx\n * <ObjectTable objectType={MyObjectType} />\n * ```\n */\n\nexport function ObjectTable({\n objectType,\n objectSet,\n columnDefinitions,\n filter,\n objectSetOptions,\n dedupeIntervalMs,\n pageSize,\n streamUpdates,\n orderBy,\n defaultOrderBy,\n onOrderByChanged,\n onColumnsPinnedChanged,\n onColumnResize,\n // eslint-disable-next-line @typescript-eslint/no-deprecated -- intentional pass-through to fire alongside onRowSelectionChanged for backwards compatibility\n onRowSelection,\n onRowSelectionChanged,\n onColumnHeaderClick,\n renderCellContextMenu,\n selectionMode = \"none\",\n selectedRows,\n isAllSelected: isAllSelectedProp,\n onColumnVisibilityChanged,\n onCellValueChanged,\n onSubmitEdits,\n enableOrdering = true,\n enableColumnPinning = true,\n enableColumnResizing = true,\n enableColumnConfig = true,\n editMode = \"manual\",\n focusedRow,\n onFocusedRowChanged,\n tableRef,\n ...props\n}) {\n const {\n columnSizing,\n onColumnSizingChange\n } = useColumnResize({\n onColumnResize\n });\n const {\n sorting,\n onSortingChange,\n orderByState\n } = useTableSorting({\n orderBy,\n defaultOrderBy,\n onOrderByChanged\n });\n const {\n data,\n fetchMore,\n isLoading,\n error,\n totalCount,\n objectSet: resultingObjectSet\n } = useObjectTableData(objectType, columnDefinitions, filter, sorting, objectSet, objectSetOptions, dedupeIntervalMs, pageSize, streamUpdates);\n const {\n columns,\n loading: isColumnsLoading\n } = useColumnDefs(objectType, columnDefinitions);\n const handleRowSelectionChanged = useCallback(change => {\n if (!onRowSelectionChanged) return;\n onRowSelectionChanged({\n selectedRows: change.selectedRows,\n isSelectAll: change.isSelectAll,\n objectSet: deriveSelectionObjectSet(resultingObjectSet, change)\n });\n }, [onRowSelectionChanged, resultingObjectSet]);\n const {\n rowSelection,\n isAllSelected,\n hasSelection,\n onToggleAll,\n onToggleRow,\n enableRowSelection\n } = useRowSelection({\n selectionMode,\n selectedRows,\n isAllSelected: isAllSelectedProp,\n onRowSelection,\n onRowSelectionChanged: handleRowSelectionChanged,\n data\n });\n const selectionColumn = useSelectionColumn({\n selectionMode,\n isAllSelected,\n hasSelection,\n onToggleAll,\n onToggleRow\n });\n const {\n columnVisibility,\n onColumnVisibilityChange,\n columnOrder,\n onColumnOrderChange\n } = useColumnVisibility({\n allColumns: columns,\n onColumnVisibilityChanged\n });\n const {\n columnPinning,\n onColumnPinningChange\n } = useColumnPinning({\n columnDefinitions,\n hasSelectionColumn: enableRowSelection,\n onColumnsPinnedChanged\n });\n const allColumns = useMemo(() => {\n return selectionColumn ? [selectionColumn, ...columns] : columns;\n }, [selectionColumn, columns]);\n const editableConfig = useEditableTable({\n editMode,\n onCellValueChanged,\n onSubmitEdits\n });\n const table = useReactTable({\n data: data ?? EMPTY_ARRAY,\n columns: allColumns,\n getCoreRowModel: getCoreRowModel(),\n state: {\n columnVisibility,\n columnOrder,\n rowSelection,\n sorting,\n columnSizing,\n columnPinning\n },\n onSortingChange,\n onColumnSizingChange,\n onColumnPinningChange,\n onColumnVisibilityChange,\n onColumnOrderChange,\n enableRowSelection,\n enableSorting: enableOrdering,\n columnResizeMode: \"onChange\",\n columnResizeDirection: \"ltr\",\n manualSorting: true,\n // Enable manual sorting to indicate server-side sorting\n defaultColumn: {\n minSize: 80\n },\n getRowId,\n meta: {\n onCellEdit: editableConfig.onCellEdit,\n onCellValidationError: editableConfig.onCellValidationError,\n clearCellValidationError: editableConfig.clearCellValidationError,\n cellEdits: editableConfig.cellEdits,\n isInEditMode: editableConfig.editModeState.isActive,\n validationErrors: editableConfig.validationErrors\n }\n });\n const {\n getSnapshot\n } = useObjectTableSnapshot({\n objectOrInterfaceType: objectType,\n table,\n columnDefinitions,\n objectSet: resultingObjectSet,\n pageSize,\n totalCount,\n orderBy: orderByState\n });\n useImperativeHandle(tableRef, () => ({\n getSnapshot\n }), [getSnapshot]);\n const onRenderCellContextMenu = useCallback((row, cell) => {\n return renderCellContextMenu?.(row, cell.getValue());\n }, [renderCellContextMenu]);\n const handleColumnHeaderClick = useMemo(() => onColumnHeaderClick ? columnId => onColumnHeaderClick(columnId) : undefined, [onColumnHeaderClick]);\n const isTableLoading = isLoading || isColumnsLoading;\n const headerMenuFeatureFlags = useMemo(() => ({\n showSortingItems: enableOrdering,\n showPinningItems: enableColumnPinning,\n showResizeItem: enableColumnResizing,\n showConfigItem: enableColumnConfig\n }), [enableOrdering, enableColumnPinning, enableColumnResizing, enableColumnConfig]);\n return /*#__PURE__*/React.createElement(BaseTable, {\n table: table,\n isLoading: isTableLoading,\n fetchNextPage: fetchMore,\n onRowClick: props.onRowClick,\n onColumnHeaderClick: handleColumnHeaderClick,\n rowHeight: props.rowHeight,\n renderCellContextMenu: onRenderCellContextMenu,\n renderEmptyState: props.renderEmptyState,\n className: props.className,\n error: error,\n headerMenuFeatureFlags: headerMenuFeatureFlags,\n editableConfig: editableConfig,\n getRowAttributes: props.getRowAttributes,\n showEditFooter: props.showEditFooter,\n focusedRowId: focusedRow == null ? focusedRow : getRowIdFromPrimaryKey(focusedRow),\n onFocusedRowChanged: onFocusedRowChanged\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// ObjectTable that loads and displays data for a given objectSet\nimport { ObjectTable as _ObjectTable } from \"../../object-table/ObjectTable.js\";\nimport { withOsdkMetrics } from \"../../util/withOsdkMetrics.js\";\nexport const ObjectTable = withOsdkMetrics(_ObjectTable, \"ObjectTable\");\n\n// BaseTable that does not handle data fetching\n\nexport { BaseTable } from \"../../object-table/Table.js\";\nexport { ColumnConfigDialog } from \"../../object-table/ColumnConfigDialog.js\";\nexport { MultiColumnSortDialog } from \"../../object-table/MultiColumnSortDialog.js\";\n// Loading cell components for custom column renderers.\n// Use `LoadingCell` when rendering a full `<td>` element (e.g. in a custom row renderer).\n// Use `LoadingCellContent` when rendering just the skeleton content inside an existing cell.\nexport { LoadingCell, LoadingCellContent } from \"../../object-table/LoadingCell.js\";"]}