@osdk/react-components 0.56.0 → 0.57.0-main-9c5a7b17bd0a71c88bf2d3ed29847e6f87975bbf
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +19 -14
- package/CHANGELOG.md +55 -0
- package/README.md +3 -3
- package/action-form.d.ts +17 -0
- package/build/browser/pdf-viewer/BasePdfViewer.js +12 -8
- package/build/browser/pdf-viewer/BasePdfViewer.js.map +1 -1
- package/build/browser/pdf-viewer/PdfViewerApi.js.map +1 -1
- package/build/browser/pdf-viewer/PdfViewerContext.js +4 -0
- package/build/browser/pdf-viewer/PdfViewerContext.js.map +1 -1
- package/build/browser/pdf-viewer/components/PdfViewerContent.js +6 -2
- package/build/browser/pdf-viewer/components/PdfViewerContent.js.map +1 -1
- package/build/browser/pdf-viewer/hooks/usePdfViewerCore.js +10 -4
- package/build/browser/pdf-viewer/hooks/usePdfViewerCore.js.map +1 -1
- package/build/browser/pdf-viewer/hooks/usePdfViewerState.js +9 -1
- package/build/browser/pdf-viewer/hooks/usePdfViewerState.js.map +1 -1
- package/build/browser/public/action-form.js +21 -0
- package/build/browser/public/action-form.js.map +1 -0
- package/build/browser/public/document-viewer.js +22 -0
- package/build/browser/public/document-viewer.js.map +1 -0
- package/build/browser/public/email-viewer.js +23 -0
- package/build/browser/public/email-viewer.js.map +1 -0
- package/build/browser/public/experimental/action-form.js +60 -5
- package/build/browser/public/experimental/action-form.js.map +1 -1
- package/build/browser/public/experimental/document-viewer.js +11 -5
- package/build/browser/public/experimental/document-viewer.js.map +1 -1
- package/build/browser/public/experimental/email-viewer.js +15 -6
- package/build/browser/public/experimental/email-viewer.js.map +1 -1
- package/build/browser/public/experimental/filter-list.js +71 -14
- package/build/browser/public/experimental/filter-list.js.map +1 -1
- package/build/browser/public/experimental/image-viewer.js +11 -6
- package/build/browser/public/experimental/image-viewer.js.map +1 -1
- package/build/browser/public/experimental/markdown-renderer.js +11 -17
- package/build/browser/public/experimental/markdown-renderer.js.map +1 -1
- package/build/browser/public/experimental/object-table.js +152 -37
- package/build/browser/public/experimental/object-table.js.map +1 -1
- package/build/browser/public/experimental/pdf-viewer.js +134 -34
- package/build/browser/public/experimental/pdf-viewer.js.map +1 -1
- package/build/browser/public/experimental/spreadsheet-viewer.js +15 -6
- package/build/browser/public/experimental/spreadsheet-viewer.js.map +1 -1
- package/build/browser/public/experimental/tiff-renderer.js +11 -17
- package/build/browser/public/experimental/tiff-renderer.js.map +1 -1
- package/build/browser/public/experimental/video-viewer.js +11 -6
- package/build/browser/public/experimental/video-viewer.js.map +1 -1
- package/build/browser/public/experimental/xml-viewer.js +11 -6
- package/build/browser/public/experimental/xml-viewer.js.map +1 -1
- package/build/browser/public/filter-list.js +30 -0
- package/build/browser/public/filter-list.js.map +1 -0
- package/build/browser/public/image-viewer.js +23 -0
- package/build/browser/public/image-viewer.js.map +1 -0
- package/build/browser/public/markdown-viewer.js +24 -0
- package/build/browser/public/markdown-viewer.js.map +1 -0
- package/build/browser/public/object-table.js +65 -0
- package/build/browser/public/object-table.js.map +1 -0
- package/build/browser/public/pdf-viewer.js +50 -0
- package/build/browser/public/pdf-viewer.js.map +1 -0
- package/build/browser/public/spreadsheet-viewer.js +23 -0
- package/build/browser/public/spreadsheet-viewer.js.map +1 -0
- package/build/browser/public/tiff-viewer.js +24 -0
- package/build/browser/public/tiff-viewer.js.map +1 -0
- package/build/browser/public/video-viewer.js +23 -0
- package/build/browser/public/video-viewer.js.map +1 -0
- package/build/browser/public/xml-viewer.js +23 -0
- package/build/browser/public/xml-viewer.js.map +1 -0
- package/build/browser/util/UserAgent.js +1 -1
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/cjs/{PdfViewerApi-CQJlwPUl.d.cts → PdfViewerApi-CIpvxxUo.d.cts} +9 -1
- package/build/cjs/action-form-4OvVNZ6i.d.cts +791 -0
- package/build/cjs/chunk-36QJAKOY.cjs +13 -0
- package/build/cjs/chunk-36QJAKOY.cjs.map +1 -0
- package/build/cjs/{chunk-HVJTECCC.cjs → chunk-4KHF42ZL.cjs} +34 -15
- package/build/cjs/chunk-4KHF42ZL.cjs.map +1 -0
- package/build/cjs/chunk-5KVF4DSH.cjs +53 -0
- package/build/cjs/chunk-5KVF4DSH.cjs.map +1 -0
- package/build/cjs/{chunk-L2FCT7HW.cjs → chunk-6YNO7HDC.cjs} +4 -4
- package/build/cjs/{chunk-L2FCT7HW.cjs.map → chunk-6YNO7HDC.cjs.map} +1 -1
- package/build/cjs/{chunk-JHKAQXRZ.cjs → chunk-7IP4YOC6.cjs} +5 -5
- package/build/cjs/chunk-7IP4YOC6.cjs.map +1 -0
- package/build/cjs/chunk-A3GEXM7R.cjs +48 -0
- package/build/cjs/chunk-A3GEXM7R.cjs.map +1 -0
- package/build/cjs/chunk-AWSDHTVF.cjs +11 -0
- package/build/cjs/chunk-AWSDHTVF.cjs.map +1 -0
- package/build/cjs/chunk-BPRRM7TQ.cjs +12 -0
- package/build/cjs/chunk-BPRRM7TQ.cjs.map +1 -0
- package/build/cjs/chunk-DZLFOD3V.cjs +12 -0
- package/build/cjs/chunk-DZLFOD3V.cjs.map +1 -0
- package/build/cjs/{chunk-DJNKQI5C.cjs → chunk-GCAQEFD6.cjs} +35 -27
- package/build/cjs/chunk-GCAQEFD6.cjs.map +1 -0
- package/build/cjs/chunk-IBDBFMEQ.cjs +13 -0
- package/build/cjs/chunk-IBDBFMEQ.cjs.map +1 -0
- package/build/cjs/chunk-IFBNWYYC.cjs +11 -0
- package/build/cjs/chunk-IFBNWYYC.cjs.map +1 -0
- package/build/cjs/chunk-JCCZWVY3.cjs +13 -0
- package/build/cjs/chunk-JCCZWVY3.cjs.map +1 -0
- package/build/cjs/{chunk-BBXX42YT.cjs → chunk-L4PLQPV2.cjs} +12 -12
- package/build/cjs/chunk-L4PLQPV2.cjs.map +1 -0
- package/build/cjs/chunk-MDVEVGFJ.cjs +11 -0
- package/build/cjs/chunk-MDVEVGFJ.cjs.map +1 -0
- package/build/cjs/chunk-OJTBEZKG.cjs +11 -0
- package/build/cjs/chunk-OJTBEZKG.cjs.map +1 -0
- package/build/cjs/{chunk-ABT6IGXN.cjs → chunk-RPEXVMQG.cjs} +7 -7
- package/build/cjs/chunk-RPEXVMQG.cjs.map +1 -0
- package/build/cjs/{chunk-RDJK72SG.cjs → chunk-RZOLA2GI.cjs} +10 -10
- package/build/cjs/chunk-RZOLA2GI.cjs.map +1 -0
- package/build/cjs/{chunk-6RCVPIW5.cjs → chunk-U7FYMS5T.cjs} +3 -3
- package/build/cjs/chunk-U7FYMS5T.cjs.map +1 -0
- package/build/cjs/chunk-UAKUGVQW.cjs +17 -0
- package/build/cjs/chunk-UAKUGVQW.cjs.map +1 -0
- package/build/cjs/chunk-UQGEGHHQ.cjs +34 -0
- package/build/cjs/chunk-UQGEGHHQ.cjs.map +1 -0
- package/build/cjs/chunk-VLADVYGE.cjs +13 -0
- package/build/cjs/chunk-VLADVYGE.cjs.map +1 -0
- package/build/cjs/chunk-VYLMJUGV.cjs +17 -0
- package/build/cjs/chunk-VYLMJUGV.cjs.map +1 -0
- package/build/cjs/chunk-VZ2OSX6A.cjs +11 -0
- package/build/cjs/chunk-VZ2OSX6A.cjs.map +1 -0
- package/build/cjs/chunk-XE7JD6LH.cjs +13 -0
- package/build/cjs/chunk-XE7JD6LH.cjs.map +1 -0
- package/build/cjs/chunk-XQHT3TQO.cjs +11 -0
- package/build/cjs/chunk-XQHT3TQO.cjs.map +1 -0
- package/build/cjs/chunk-YE6XEEAZ.cjs +11 -0
- package/build/cjs/chunk-YE6XEEAZ.cjs.map +1 -0
- package/build/cjs/filter-list-CraygbR8.d.cts +976 -0
- package/build/cjs/public/action-form.cjs +27 -0
- package/build/cjs/public/action-form.cjs.map +1 -0
- package/build/cjs/public/action-form.css +1668 -0
- package/build/cjs/public/action-form.css.map +1 -0
- package/build/cjs/public/action-form.d.cts +3 -0
- package/build/cjs/public/document-viewer.cjs +28 -0
- package/build/cjs/public/document-viewer.cjs.map +1 -0
- package/build/cjs/public/document-viewer.css +914 -0
- package/build/cjs/public/document-viewer.css.map +1 -0
- package/build/cjs/public/document-viewer.d.cts +57 -0
- package/build/cjs/public/email-viewer.cjs +20 -0
- package/build/cjs/public/email-viewer.cjs.map +1 -0
- package/build/cjs/public/email-viewer.css +81 -0
- package/build/cjs/public/email-viewer.css.map +1 -0
- package/build/cjs/public/email-viewer.d.cts +37 -0
- package/build/cjs/public/experimental/action-form.cjs +7 -6
- package/build/cjs/public/experimental/action-form.d.cts +58 -787
- package/build/cjs/public/experimental/cbac-picker.cjs +12 -12
- package/build/cjs/public/experimental/document-viewer.cjs +10 -9
- package/build/cjs/public/experimental/document-viewer.d.cts +14 -53
- package/build/cjs/public/experimental/email-viewer.cjs +8 -7
- package/build/cjs/public/experimental/email-viewer.d.cts +14 -33
- package/build/cjs/public/experimental/filter-list.cjs +17 -16
- package/build/cjs/public/experimental/filter-list.d.cts +59 -973
- package/build/cjs/public/experimental/image-viewer.cjs +8 -7
- package/build/cjs/public/experimental/image-viewer.d.cts +11 -7
- package/build/cjs/public/experimental/markdown-renderer.cjs +11 -10
- package/build/cjs/public/experimental/markdown-renderer.d.cts +13 -20
- package/build/cjs/public/experimental/object-table.cjs +28 -27
- package/build/cjs/public/experimental/object-table.d.cts +148 -1228
- package/build/cjs/public/experimental/pdf-viewer.cjs +38 -37
- package/build/cjs/public/experimental/pdf-viewer.d.cts +115 -344
- package/build/cjs/public/experimental/spreadsheet-viewer.cjs +8 -7
- package/build/cjs/public/experimental/spreadsheet-viewer.d.cts +14 -30
- package/build/cjs/public/experimental/tiff-renderer.cjs +11 -10
- package/build/cjs/public/experimental/tiff-renderer.d.cts +14 -10
- package/build/cjs/public/experimental/video-viewer.cjs +8 -7
- package/build/cjs/public/experimental/video-viewer.d.cts +11 -7
- package/build/cjs/public/experimental/xml-viewer.cjs +8 -7
- package/build/cjs/public/experimental/xml-viewer.d.cts +11 -19
- package/build/cjs/public/experimental.cjs +221 -209
- package/build/cjs/public/experimental.d.cts +21 -9
- package/build/cjs/public/filter-list.cjs +71 -0
- package/build/cjs/public/filter-list.cjs.map +1 -0
- package/build/cjs/public/filter-list.css +2414 -0
- package/build/cjs/public/filter-list.css.map +1 -0
- package/build/cjs/public/filter-list.d.cts +3 -0
- package/build/cjs/public/image-viewer.cjs +20 -0
- package/build/cjs/public/image-viewer.cjs.map +1 -0
- package/build/cjs/public/image-viewer.css +30 -0
- package/build/cjs/public/image-viewer.css.map +1 -0
- package/build/cjs/public/image-viewer.d.cts +11 -0
- package/build/cjs/public/markdown-viewer.cjs +20 -0
- package/build/cjs/public/markdown-viewer.cjs.map +1 -0
- package/build/cjs/public/markdown-viewer.css +117 -0
- package/build/cjs/public/markdown-viewer.css.map +1 -0
- package/build/cjs/public/markdown-viewer.d.cts +21 -0
- package/build/cjs/public/object-table.cjs +101 -0
- package/build/cjs/public/object-table.cjs.map +1 -0
- package/build/cjs/public/object-table.css +2201 -0
- package/build/cjs/public/object-table.css.map +1 -0
- package/build/cjs/public/object-table.d.cts +1231 -0
- package/build/cjs/public/pdf-viewer.cjs +99 -0
- package/build/cjs/public/pdf-viewer.cjs.map +1 -0
- package/build/cjs/public/pdf-viewer.css +442 -0
- package/build/cjs/public/pdf-viewer.css.map +1 -0
- package/build/cjs/public/pdf-viewer.d.cts +360 -0
- package/build/cjs/public/primitives.cjs +1 -1
- package/build/cjs/public/spreadsheet-viewer.cjs +20 -0
- package/build/cjs/public/spreadsheet-viewer.cjs.map +1 -0
- package/build/cjs/public/spreadsheet-viewer.css +122 -0
- package/build/cjs/public/spreadsheet-viewer.css.map +1 -0
- package/build/cjs/public/spreadsheet-viewer.d.cts +34 -0
- package/build/cjs/public/tiff-viewer.cjs +20 -0
- package/build/cjs/public/tiff-viewer.cjs.map +1 -0
- package/build/cjs/public/tiff-viewer.css +23 -0
- package/build/cjs/public/tiff-viewer.css.map +1 -0
- package/build/cjs/public/tiff-viewer.d.cts +11 -0
- package/build/cjs/public/video-viewer.cjs +20 -0
- package/build/cjs/public/video-viewer.cjs.map +1 -0
- package/build/cjs/public/video-viewer.css +29 -0
- package/build/cjs/public/video-viewer.css.map +1 -0
- package/build/cjs/public/video-viewer.d.cts +11 -0
- package/build/cjs/public/xml-viewer.cjs +20 -0
- package/build/cjs/public/xml-viewer.cjs.map +1 -0
- package/build/cjs/public/xml-viewer.css +38 -0
- package/build/cjs/public/xml-viewer.css.map +1 -0
- package/build/cjs/public/xml-viewer.d.cts +22 -0
- package/build/esm/pdf-viewer/BasePdfViewer.js +12 -8
- package/build/esm/pdf-viewer/BasePdfViewer.js.map +1 -1
- package/build/esm/pdf-viewer/PdfViewerApi.js.map +1 -1
- package/build/esm/pdf-viewer/PdfViewerContext.js +4 -0
- package/build/esm/pdf-viewer/PdfViewerContext.js.map +1 -1
- package/build/esm/pdf-viewer/components/PdfViewerContent.js +6 -2
- package/build/esm/pdf-viewer/components/PdfViewerContent.js.map +1 -1
- package/build/esm/pdf-viewer/hooks/usePdfViewerCore.js +10 -4
- package/build/esm/pdf-viewer/hooks/usePdfViewerCore.js.map +1 -1
- package/build/esm/pdf-viewer/hooks/usePdfViewerState.js +9 -1
- package/build/esm/pdf-viewer/hooks/usePdfViewerState.js.map +1 -1
- package/build/esm/public/action-form.js +21 -0
- package/build/esm/public/action-form.js.map +1 -0
- package/build/esm/public/document-viewer.js +22 -0
- package/build/esm/public/document-viewer.js.map +1 -0
- package/build/esm/public/email-viewer.js +23 -0
- package/build/esm/public/email-viewer.js.map +1 -0
- package/build/esm/public/experimental/action-form.js +60 -5
- package/build/esm/public/experimental/action-form.js.map +1 -1
- package/build/esm/public/experimental/document-viewer.js +11 -5
- package/build/esm/public/experimental/document-viewer.js.map +1 -1
- package/build/esm/public/experimental/email-viewer.js +15 -6
- package/build/esm/public/experimental/email-viewer.js.map +1 -1
- package/build/esm/public/experimental/filter-list.js +71 -14
- package/build/esm/public/experimental/filter-list.js.map +1 -1
- package/build/esm/public/experimental/image-viewer.js +11 -6
- package/build/esm/public/experimental/image-viewer.js.map +1 -1
- package/build/esm/public/experimental/markdown-renderer.js +11 -17
- package/build/esm/public/experimental/markdown-renderer.js.map +1 -1
- package/build/esm/public/experimental/object-table.js +152 -37
- package/build/esm/public/experimental/object-table.js.map +1 -1
- package/build/esm/public/experimental/pdf-viewer.js +134 -34
- package/build/esm/public/experimental/pdf-viewer.js.map +1 -1
- package/build/esm/public/experimental/spreadsheet-viewer.js +15 -6
- package/build/esm/public/experimental/spreadsheet-viewer.js.map +1 -1
- package/build/esm/public/experimental/tiff-renderer.js +11 -17
- package/build/esm/public/experimental/tiff-renderer.js.map +1 -1
- package/build/esm/public/experimental/video-viewer.js +11 -6
- package/build/esm/public/experimental/video-viewer.js.map +1 -1
- package/build/esm/public/experimental/xml-viewer.js +11 -6
- package/build/esm/public/experimental/xml-viewer.js.map +1 -1
- package/build/esm/public/filter-list.js +30 -0
- package/build/esm/public/filter-list.js.map +1 -0
- package/build/esm/public/image-viewer.js +23 -0
- package/build/esm/public/image-viewer.js.map +1 -0
- package/build/esm/public/markdown-viewer.js +24 -0
- package/build/esm/public/markdown-viewer.js.map +1 -0
- package/build/esm/public/object-table.js +65 -0
- package/build/esm/public/object-table.js.map +1 -0
- package/build/esm/public/pdf-viewer.js +50 -0
- package/build/esm/public/pdf-viewer.js.map +1 -0
- package/build/esm/public/spreadsheet-viewer.js +23 -0
- package/build/esm/public/spreadsheet-viewer.js.map +1 -0
- package/build/esm/public/tiff-viewer.js +24 -0
- package/build/esm/public/tiff-viewer.js.map +1 -0
- package/build/esm/public/video-viewer.js +23 -0
- package/build/esm/public/video-viewer.js.map +1 -0
- package/build/esm/public/xml-viewer.js +23 -0
- package/build/esm/public/xml-viewer.js.map +1 -0
- package/build/esm/util/UserAgent.js +1 -1
- package/build/esm/util/UserAgent.js.map +1 -1
- package/build/types/pdf-viewer/PdfViewerApi.d.ts +9 -1
- package/build/types/pdf-viewer/PdfViewerApi.d.ts.map +1 -1
- package/build/types/pdf-viewer/components/PdfViewerContent.d.ts +5 -1
- package/build/types/pdf-viewer/components/PdfViewerContent.d.ts.map +1 -1
- package/build/types/pdf-viewer/hooks/usePdfViewerCore.d.ts +7 -1
- package/build/types/pdf-viewer/hooks/usePdfViewerCore.d.ts.map +1 -1
- package/build/types/pdf-viewer/hooks/usePdfViewerState.d.ts +3 -1
- package/build/types/pdf-viewer/hooks/usePdfViewerState.d.ts.map +1 -1
- package/build/types/public/action-form.d.ts +5 -0
- package/build/types/public/action-form.d.ts.map +1 -0
- package/build/types/public/document-viewer.d.ts +4 -0
- package/build/types/public/document-viewer.d.ts.map +1 -0
- package/build/types/public/email-viewer.d.ts +4 -0
- package/build/types/public/email-viewer.d.ts.map +1 -0
- package/build/types/public/experimental/action-form.d.ts +68 -5
- package/build/types/public/experimental/action-form.d.ts.map +1 -1
- package/build/types/public/experimental/document-viewer.d.ts +9 -4
- package/build/types/public/experimental/document-viewer.d.ts.map +1 -1
- package/build/types/public/experimental/email-viewer.d.ts +13 -4
- package/build/types/public/experimental/email-viewer.d.ts.map +1 -1
- package/build/types/public/experimental/filter-list.d.ts +63 -19
- package/build/types/public/experimental/filter-list.d.ts.map +1 -1
- package/build/types/public/experimental/image-viewer.d.ts +9 -4
- package/build/types/public/experimental/image-viewer.d.ts.map +1 -1
- package/build/types/public/experimental/markdown-renderer.d.ts +12 -9
- package/build/types/public/experimental/markdown-renderer.d.ts.map +1 -1
- package/build/types/public/experimental/object-table.d.ts +235 -29
- package/build/types/public/experimental/object-table.d.ts.map +1 -1
- package/build/types/public/experimental/pdf-viewer.d.ts +111 -25
- package/build/types/public/experimental/pdf-viewer.d.ts.map +1 -1
- package/build/types/public/experimental/spreadsheet-viewer.d.ts +13 -4
- package/build/types/public/experimental/spreadsheet-viewer.d.ts.map +1 -1
- package/build/types/public/experimental/tiff-renderer.d.ts +12 -9
- package/build/types/public/experimental/tiff-renderer.d.ts.map +1 -1
- package/build/types/public/experimental/video-viewer.d.ts +9 -4
- package/build/types/public/experimental/video-viewer.d.ts.map +1 -1
- package/build/types/public/experimental/xml-viewer.d.ts +9 -4
- package/build/types/public/experimental/xml-viewer.d.ts.map +1 -1
- package/build/types/public/filter-list.d.ts +19 -0
- package/build/types/public/filter-list.d.ts.map +1 -0
- package/build/types/public/image-viewer.d.ts +4 -0
- package/build/types/public/image-viewer.d.ts.map +1 -0
- package/build/types/public/markdown-viewer.d.ts +4 -0
- package/build/types/public/markdown-viewer.d.ts.map +1 -0
- package/build/types/public/object-table.d.ts +29 -0
- package/build/types/public/object-table.d.ts.map +1 -0
- package/build/types/public/pdf-viewer.d.ts +25 -0
- package/build/types/public/pdf-viewer.d.ts.map +1 -0
- package/build/types/public/spreadsheet-viewer.d.ts +4 -0
- package/build/types/public/spreadsheet-viewer.d.ts.map +1 -0
- package/build/types/public/tiff-viewer.d.ts +4 -0
- package/build/types/public/tiff-viewer.d.ts.map +1 -0
- package/build/types/public/video-viewer.d.ts +4 -0
- package/build/types/public/video-viewer.d.ts.map +1 -0
- package/build/types/public/xml-viewer.d.ts +4 -0
- package/build/types/public/xml-viewer.d.ts.map +1 -0
- package/docs/ActionForm.md +3 -3
- package/docs/ActionFormOverview.md +3 -3
- package/docs/DocumentViewer.md +3 -3
- package/docs/DocumentViewerOverview.md +8 -8
- package/docs/EmailViewer.md +3 -3
- package/docs/FilterList.md +6 -6
- package/docs/FilterListOverview.md +3 -3
- package/docs/GettingStarted.md +1 -1
- package/docs/ImageViewer.md +3 -3
- package/docs/MarkdownViewer.md +3 -3
- package/docs/ObjectTable.md +23 -23
- package/docs/ObjectTableOverview.md +3 -3
- package/docs/PdfViewer.md +16 -19
- package/docs/SpreadsheetViewer.md +3 -3
- package/docs/TiffViewer.md +3 -6
- package/docs/VideoViewer.md +3 -3
- package/docs/Welcome.md +2 -2
- package/docs/XmlViewer.md +3 -6
- package/document-viewer.d.ts +17 -0
- package/email-viewer.d.ts +17 -0
- package/filter-list.d.ts +17 -0
- package/image-viewer.d.ts +17 -0
- package/markdown-viewer.d.ts +17 -0
- package/object-table.d.ts +17 -0
- package/package.json +116 -8
- package/pdf-viewer.d.ts +17 -0
- package/spreadsheet-viewer.d.ts +17 -0
- package/tiff-viewer.d.ts +17 -0
- package/video-viewer.d.ts +17 -0
- package/xml-viewer.d.ts +17 -0
- package/build/cjs/chunk-2UJNMXVL.cjs +0 -15
- package/build/cjs/chunk-2UJNMXVL.cjs.map +0 -1
- package/build/cjs/chunk-4F5VJN66.cjs +0 -11
- package/build/cjs/chunk-4F5VJN66.cjs.map +0 -1
- package/build/cjs/chunk-6RCVPIW5.cjs.map +0 -1
- package/build/cjs/chunk-A5ZKDZH4.cjs +0 -11
- package/build/cjs/chunk-A5ZKDZH4.cjs.map +0 -1
- package/build/cjs/chunk-ABT6IGXN.cjs.map +0 -1
- package/build/cjs/chunk-BBXX42YT.cjs.map +0 -1
- package/build/cjs/chunk-CR5S7BJM.cjs +0 -11
- package/build/cjs/chunk-CR5S7BJM.cjs.map +0 -1
- package/build/cjs/chunk-DJNKQI5C.cjs.map +0 -1
- package/build/cjs/chunk-HVJTECCC.cjs.map +0 -1
- package/build/cjs/chunk-JDKKKXMF.cjs +0 -15
- package/build/cjs/chunk-JDKKKXMF.cjs.map +0 -1
- package/build/cjs/chunk-JHKAQXRZ.cjs.map +0 -1
- package/build/cjs/chunk-RDJK72SG.cjs.map +0 -1
- package/build/cjs/chunk-S4DLEUUJ.cjs +0 -11
- package/build/cjs/chunk-S4DLEUUJ.cjs.map +0 -1
- package/build/cjs/chunk-ULVTAKJF.cjs +0 -11
- package/build/cjs/chunk-ULVTAKJF.cjs.map +0 -1
|
@@ -1,1231 +1,151 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
canSort: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* The column's underlying property type, i.e. an OSDK `WirePropertyTypes` value
|
|
14
|
-
*/
|
|
15
|
-
dataType?: string;
|
|
16
|
-
}
|
|
17
|
-
interface CellIdentifier {
|
|
18
|
-
rowId: string;
|
|
19
|
-
columnId: string;
|
|
20
|
-
}
|
|
21
|
-
interface CellEditInfo<TData extends RowData = unknown, CellValue = unknown> extends CellIdentifier {
|
|
22
|
-
newValue: CellValue | null;
|
|
23
|
-
oldValue: CellValue | null;
|
|
24
|
-
originalRowData: TData;
|
|
25
|
-
}
|
|
26
|
-
type EditModeState = {
|
|
27
|
-
type: "always";
|
|
28
|
-
isActive: true;
|
|
29
|
-
} | {
|
|
30
|
-
type: "manual";
|
|
31
|
-
isActive: boolean;
|
|
32
|
-
setActive: (value: boolean) => void;
|
|
33
|
-
};
|
|
34
|
-
interface EditableConfig<TData extends RowData = unknown, CellValue = unknown> {
|
|
35
|
-
cellEdits: Record<string, CellEditInfo<TData, CellValue>>;
|
|
36
|
-
onCellEdit: (cellId: string, info: CellEditInfo<TData, CellValue>) => void;
|
|
37
|
-
onSubmitEdits?: () => Promise<boolean>;
|
|
38
|
-
clearEdits: () => void;
|
|
39
|
-
editModeState: EditModeState;
|
|
40
|
-
onCellValidationError: (cellId: string, error: string) => void;
|
|
41
|
-
validationErrors: Map<string, string>;
|
|
42
|
-
clearCellValidationError: (cellId: string) => void;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* User-facing configuration for a dropdown editor in a table cell.
|
|
46
|
-
*
|
|
47
|
-
* This is intentionally a standalone interface rather than re-exporting
|
|
48
|
-
* `DropdownFieldProps` from ActionForm, so the table API doesn't break
|
|
49
|
-
* when ActionForm's prop shape changes (e.g. adding form-specific fields).
|
|
50
|
-
*/
|
|
51
|
-
interface DropdownEditConfig<V = unknown> {
|
|
52
|
-
/**
|
|
53
|
-
* Available items for the dropdown.
|
|
54
|
-
*/
|
|
55
|
-
items: V[];
|
|
56
|
-
/**
|
|
57
|
-
* Converts an item to a display string. Defaults to `String()`.
|
|
58
|
-
*
|
|
59
|
-
* `item` may be `undefined` when the cell has no value yet — the formatter
|
|
60
|
-
* is responsible for producing a sensible label in that case.
|
|
61
|
-
*/
|
|
62
|
-
itemToStringLabel?(item: V | undefined): string;
|
|
63
|
-
/**
|
|
64
|
-
* Returns a unique string key for a list item. Used as the React `key`.
|
|
65
|
-
* Falls back to the item's index when not provided.
|
|
66
|
-
*/
|
|
67
|
-
itemToKey?: (item: V) => string;
|
|
68
|
-
/**
|
|
69
|
-
* Custom equality check for item values. Defaults to `Object.is`.
|
|
70
|
-
* Required when items are objects to ensure correct selection matching.
|
|
71
|
-
*/
|
|
72
|
-
isItemEqual?: (a: V, b: V) => boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Whether the dropdown allows searching/filtering.
|
|
75
|
-
* When true, renders a Combobox with a search input.
|
|
76
|
-
* When false (default), renders a Select dropdown.
|
|
77
|
-
*/
|
|
78
|
-
isSearchable?: boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Placeholder text shown when no value is selected.
|
|
81
|
-
*/
|
|
82
|
-
placeholder?: string;
|
|
83
|
-
/**
|
|
84
|
-
* Whether multiple values can be selected.
|
|
85
|
-
*/
|
|
86
|
-
isMultiple?: boolean;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* User-facing configuration for a date picker editor in a table cell.
|
|
90
|
-
*
|
|
91
|
-
* Standalone by design rather than re-exporting `DatePickerProps` so the
|
|
92
|
-
* table API doesn't break when the picker's prop shape changes.
|
|
93
|
-
*/
|
|
94
|
-
interface DatePickerEditConfig {
|
|
95
|
-
/**
|
|
96
|
-
* The earliest date the user can select.
|
|
97
|
-
*/
|
|
98
|
-
min?: Date;
|
|
99
|
-
/**
|
|
100
|
-
* The latest date the user can select.
|
|
101
|
-
*/
|
|
102
|
-
max?: Date;
|
|
103
|
-
/**
|
|
104
|
-
* Whether to show a time picker alongside the calendar.
|
|
105
|
-
*/
|
|
106
|
-
showTime?: boolean;
|
|
107
|
-
/**
|
|
108
|
-
* Whether to close the popover after selecting a date.
|
|
109
|
-
* @default true when `showTime` is false, false when `showTime` is true
|
|
110
|
-
*/
|
|
111
|
-
closeOnSelection?: boolean;
|
|
112
|
-
/**
|
|
113
|
-
* Placeholder text shown when no value is selected.
|
|
114
|
-
*/
|
|
115
|
-
placeholder?: string;
|
|
116
|
-
/**
|
|
117
|
-
* Formats a Date for display in the input field when not editing.
|
|
118
|
-
* Provide a matching `parseDate` if using a custom format.
|
|
119
|
-
*/
|
|
120
|
-
formatDate?: (date: Date) => string;
|
|
121
|
-
/**
|
|
122
|
-
* Parses a user-typed string back into a Date.
|
|
123
|
-
* Must be the inverse of `formatDate`.
|
|
124
|
-
*/
|
|
125
|
-
parseDate?: (text: string) => Date | undefined;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Maps each supported editable field component to its user-facing config.
|
|
129
|
-
*/
|
|
130
|
-
interface EditFieldPropsByType {
|
|
131
|
-
DROPDOWN: DropdownEditConfig;
|
|
132
|
-
DATE_PICKER: DatePickerEditConfig;
|
|
133
|
-
}
|
|
134
|
-
type EditFieldComponent = keyof EditFieldPropsByType;
|
|
135
|
-
/**
|
|
136
|
-
* Configuration for an editable cell's field component.
|
|
137
|
-
*
|
|
138
|
-
* `getFieldComponentProps` is called with the row's object and a map of any
|
|
139
|
-
* pending cell edits for the same row, keyed by `columnId`. This lets the
|
|
140
|
-
* configuration depend on row state or on other in-progress edits within the
|
|
141
|
-
* row (e.g. dropdown items that change once another column is edited).
|
|
142
|
-
*/
|
|
143
|
-
type EditFieldConfig<TData = unknown> = {
|
|
144
|
-
[K in EditFieldComponent]: {
|
|
145
|
-
fieldComponent: K;
|
|
146
|
-
getFieldComponentProps: (object: TData, edits?: Record<string, CellEditInfo<TData, unknown>>) => EditFieldPropsByType[K];
|
|
147
|
-
};
|
|
148
|
-
}[EditFieldComponent];
|
|
149
|
-
type OrderBy<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> = {
|
|
150
|
-
[K in PropertyKeys<Q> | keyof RDPs]?: "asc" | "desc";
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
type ColumnDefinition<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>> = EditableColumnDefinition<Q, RDPs, FunctionColumns> | EditableFunctionColumnDefinition<Q, RDPs, FunctionColumns> | ReadonlyColumnDefinition<Q, RDPs, FunctionColumns> | ReadonlyFunctionColumnDefinition<Q, RDPs, FunctionColumns>;
|
|
154
|
-
/** A column whose value comes from the row's object. */
|
|
155
|
-
type DerivableValueColumn<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>> = {
|
|
156
|
-
/**
|
|
157
|
-
* What the column shows — a property, a linked object property (derived
|
|
158
|
-
* property), or a custom column — and that locator's configuration.
|
|
159
|
-
*/
|
|
160
|
-
locator: PropertyColumnLocator<Q> | RdpColumnLocator<Q, RDPs> | CustomColumnLocator;
|
|
161
|
-
} & CellValueOverride<Q, RDPs, FunctionColumns>;
|
|
162
|
-
/**
|
|
163
|
-
* The cell's value and the type it's declared to have.
|
|
164
|
-
*
|
|
165
|
-
* `cellValueType` is required whenever `getCellValue` is provided — declaring
|
|
166
|
-
* the type constrains what `getCellValue` may return, so a column can't
|
|
167
|
-
* advertise one type and hand the cell a value of another. `cellValueType` may
|
|
168
|
-
* also be declared on its own to pick the editor without transforming the
|
|
169
|
-
* value.
|
|
170
|
-
*/
|
|
171
|
-
type CellValueOverride<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>> = {
|
|
172
|
-
[T in BaseWirePropertyTypes]: {
|
|
173
|
-
/**
|
|
174
|
-
* The cell value's data type. Constrains what `getCellValue` may
|
|
175
|
-
* return, and selects the editor for an `editable` column.
|
|
176
|
-
*/
|
|
177
|
-
cellValueType: T;
|
|
178
|
-
/**
|
|
179
|
-
* Derives the cell's value from the row's object. Without it the column
|
|
180
|
-
* reads the property named by `locator.id`.
|
|
181
|
-
*
|
|
182
|
-
* Use this to change what the cell's value *is* — what it returns is
|
|
183
|
-
* the value the table renders, edits, and passes on to `renderCell`.
|
|
184
|
-
* Use `renderCell` to change only how that value is displayed. The two
|
|
185
|
-
* can be combined.
|
|
186
|
-
*/
|
|
187
|
-
getCellValue: (object: Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>, locator: ColumnDefinitionLocator<Q, RDPs, FunctionColumns>) => PropertyValueWireToClient[T] | null | undefined;
|
|
188
|
-
};
|
|
189
|
-
}[BaseWirePropertyTypes] | {
|
|
190
|
-
[T in BaseWirePropertyTypes]: {
|
|
191
|
-
cellValueType: T;
|
|
192
|
-
getCellValue?: never;
|
|
193
|
-
};
|
|
194
|
-
}[BaseWirePropertyTypes] | {
|
|
195
|
-
cellValueType?: undefined;
|
|
196
|
-
getCellValue?: never;
|
|
197
|
-
};
|
|
198
|
-
/** A column whose value comes from a function query rather than the row. */
|
|
199
|
-
interface FunctionValueColumn<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>> {
|
|
200
|
-
/** What the column shows, and that locator's configuration. */
|
|
201
|
-
locator: FunctionColumnLocator<Q, RDPs, FunctionColumns>;
|
|
202
|
-
/** The cell value's data type. */
|
|
203
|
-
cellValueType?: BaseWirePropertyTypes;
|
|
204
|
-
/**
|
|
205
|
-
* Use {@link FunctionColumnLocator}'s own `getValue` instead.
|
|
206
|
-
*/
|
|
207
|
-
getCellValue?: never;
|
|
208
|
-
}
|
|
209
|
-
interface SharedColumnDefinition<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>> {
|
|
210
|
-
/**
|
|
211
|
-
* @default true
|
|
212
|
-
*/
|
|
213
|
-
isVisible?: boolean;
|
|
214
|
-
/**
|
|
215
|
-
* @default none
|
|
216
|
-
*/
|
|
217
|
-
pinned?: "left" | "right" | "none";
|
|
218
|
-
width?: number;
|
|
219
|
-
minWidth?: number;
|
|
220
|
-
maxWidth?: number;
|
|
221
|
-
resizable?: boolean;
|
|
222
|
-
orderable?: boolean;
|
|
223
|
-
/**
|
|
224
|
-
* Custom renderer for the cell value.
|
|
225
|
-
*
|
|
226
|
-
* This changes only how the cell's value is displayed; the value itself is
|
|
227
|
-
* unchanged. To change the value, use `getCellValue` (and declare its
|
|
228
|
-
* `cellValueType`) — `renderCell` then receives that value as its third
|
|
229
|
-
* argument. The two can be combined.
|
|
230
|
-
*
|
|
231
|
-
* `renderCell` is used only when the cell is read-only.
|
|
232
|
-
* When cells are actually editable, the in-built edit component takes over.
|
|
233
|
-
*
|
|
234
|
-
* @param object - The row's object instance.
|
|
235
|
-
* @param locator - The column locator of this cell.
|
|
236
|
-
* @param value - The cell's value computed by the given `getCellValue` or the default property lookup.
|
|
237
|
-
* @returns custom cell renderer component
|
|
238
|
-
*/
|
|
239
|
-
renderCell?: (object: Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>, locator: ColumnDefinitionLocator<Q, RDPs, FunctionColumns>, value: unknown) => React.ReactNode;
|
|
240
|
-
/**
|
|
241
|
-
* If provided, this will be used in the column header.
|
|
242
|
-
* If both columnName and renderHeader are provided, renderHeader will take precedence in the table header.
|
|
243
|
-
* columnName will still be used in other parts where the column name is displayed.
|
|
244
|
-
*
|
|
245
|
-
* If not provided,
|
|
246
|
-
* for a property column, the property displayName will be used
|
|
247
|
-
* for other columns, the id will be used.
|
|
248
|
-
*/
|
|
249
|
-
columnName?: string;
|
|
250
|
-
/**
|
|
251
|
-
* If provided, this will be used to render the header component.
|
|
252
|
-
* When both columnName and renderHeader are provided, renderHeader will take precedence in the table header.
|
|
253
|
-
*/
|
|
254
|
-
renderHeader?: () => React.ReactNode;
|
|
255
|
-
}
|
|
256
|
-
interface EditableColumnOptions<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
257
|
-
/**
|
|
258
|
-
* `editable` can be a boolean or a predicate that receives the row's object
|
|
259
|
-
* and returns whether the cell is editable
|
|
260
|
-
*/
|
|
261
|
-
editable: true | ((object: Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>) => boolean);
|
|
262
|
-
/**
|
|
263
|
-
* Configuration for the cell editor component.
|
|
264
|
-
*
|
|
265
|
-
* When provided, the column uses the specified field component
|
|
266
|
-
* (e.g. dropdown) instead of the default auto-detected text/number input.
|
|
267
|
-
*
|
|
268
|
-
* `getFieldComponentProps` receives the row's object and a map of any
|
|
269
|
-
* pending edits for that row (keyed by column id), and returns the props to
|
|
270
|
-
* pass to the field component. Editor configuration can depend on the
|
|
271
|
-
* current row or on other in-progress edits within the row.
|
|
272
|
-
*/
|
|
273
|
-
editFieldConfig?: EditFieldConfig<Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>>;
|
|
274
|
-
/**
|
|
275
|
-
* Additional function to validate the cell value during edit.
|
|
276
|
-
*
|
|
277
|
-
* @param value the current cell value
|
|
278
|
-
* @returns a promise that resolves to an error message string if validation fails, or undefined if validation succeeds
|
|
279
|
-
*/
|
|
280
|
-
validateEdit?: (value: unknown) => Promise<string | undefined>;
|
|
281
|
-
}
|
|
282
|
-
type EditableColumnDefinition<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>> = SharedColumnDefinition<Q, RDPs, FunctionColumns> & EditableColumnOptions<Q, RDPs> & DerivableValueColumn<Q, RDPs, FunctionColumns>;
|
|
283
|
-
/** Editable column backed by a function query. */
|
|
284
|
-
interface EditableFunctionColumnDefinition<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>> extends SharedColumnDefinition<Q, RDPs, FunctionColumns>, EditableColumnOptions<Q, RDPs>, FunctionValueColumn<Q, RDPs, FunctionColumns> {
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Column definition for a read-only column (default).
|
|
288
|
-
* `editFieldConfig` and `validateEdit` are not available.
|
|
289
|
-
*/
|
|
290
|
-
type ReadonlyColumnDefinition<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>> = SharedColumnDefinition<Q, RDPs, FunctionColumns> & DerivableValueColumn<Q, RDPs, FunctionColumns> & {
|
|
291
|
-
editable?: false;
|
|
292
|
-
};
|
|
293
|
-
/** Read-only column backed by a function query. */
|
|
294
|
-
interface ReadonlyFunctionColumnDefinition<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>> extends SharedColumnDefinition<Q, RDPs, FunctionColumns>, FunctionValueColumn<Q, RDPs, FunctionColumns> {
|
|
295
|
-
editable?: false;
|
|
296
|
-
}
|
|
297
|
-
type ExtractQueryParameters<Q extends QueryDefinition> = CompileTimeMetadata<Q>["parameters"] extends Record<string, never> ? undefined : QueryParameterType<CompileTimeMetadata<Q>["parameters"]>;
|
|
298
|
-
interface PropertyColumnLocator<Q extends ObjectOrInterfaceDefinition> {
|
|
299
|
-
type: "property";
|
|
300
|
-
id: PropertyKeys<Q>;
|
|
301
|
-
}
|
|
302
|
-
/**
|
|
303
|
-
* Concrete function column locator for a single key K.
|
|
304
|
-
* Correlates the id, queryDefinition, and getFunctionParams types.
|
|
305
|
-
*/
|
|
306
|
-
interface FunctionColumnLocatorForKey<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef>, FunctionColumns extends Record<string, QueryDefinition<{}>>, K extends keyof FunctionColumns> {
|
|
307
|
-
/**
|
|
308
|
-
* This is equivalent to workshop's function-backed columns.
|
|
309
|
-
* The function needs to meet the specifications stated in https://www.palantir.com/docs/foundry/workshop/widgets-object-table/#function-backed-columns
|
|
310
|
-
*/
|
|
311
|
-
type: "function";
|
|
312
|
-
id: K;
|
|
313
|
-
queryDefinition: FunctionColumns[K];
|
|
314
|
-
/**
|
|
315
|
-
* The function will be called with the current object set to get the input parameters for the function query.
|
|
316
|
-
* @param objectSet - The current object set.
|
|
317
|
-
* @returns - The function's input parameters including the object set.
|
|
318
|
-
*/
|
|
319
|
-
getFunctionParams: (objectSet: ObjectSet<Q, RDPs>) => ExtractQueryParameters<FunctionColumns[K]>;
|
|
320
|
-
/**
|
|
321
|
-
* Function to generate keys for looking up results in the FunctionsMap.
|
|
322
|
-
* @param object - The object instance
|
|
323
|
-
* @returns - The key to use for looking up this object's result in the FunctionsMap
|
|
324
|
-
*/
|
|
325
|
-
getKey: (object: Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>) => string;
|
|
326
|
-
/**
|
|
327
|
-
* Function to extract the cell value from the raw cell data returned by the function.
|
|
328
|
-
* This is useful when functions return custom types with multiple properties.
|
|
329
|
-
* @param cellData - The raw data returned by the function for this object
|
|
330
|
-
* @returns - The value to display in the cell
|
|
331
|
-
*/
|
|
332
|
-
getValue?: (cellData?: unknown) => unknown;
|
|
333
|
-
/**
|
|
334
|
-
* Minimum time between re-fetches of the same function with the same parameters, in milliseconds.
|
|
335
|
-
* Defaults to 5 minutes as it is expensive to fetch function columns for a large object set
|
|
336
|
-
* and they are expected to be relatively static in the context of an object table
|
|
337
|
-
*
|
|
338
|
-
* @default 300_000 (5 minutes)
|
|
339
|
-
*/
|
|
340
|
-
dedupeIntervalMs?: number;
|
|
341
|
-
/**
|
|
342
|
-
* Object type apiNames the function reads but doesn't take as a parameter (e.g.
|
|
343
|
-
* linked object types the function traverses internally). The column auto-revalidates
|
|
344
|
-
* when an action edits an object of any of these types. Param-derived types are
|
|
345
|
-
* tracked automatically and don't need to be listed here.
|
|
346
|
-
*/
|
|
347
|
-
dependsOn?: string[];
|
|
348
|
-
}
|
|
349
|
-
/**
|
|
350
|
-
* Distributes over each key in FunctionColumns so that id, queryDefinition,
|
|
351
|
-
* and getFunctionParams are correlated per key.
|
|
352
|
-
*/
|
|
353
|
-
type FunctionColumnLocator<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>> = keyof FunctionColumns extends infer K ? K extends keyof FunctionColumns ? FunctionColumnLocatorForKey<Q, RDPs, FunctionColumns, K> : never : never;
|
|
354
|
-
interface RdpColumnLocator<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
355
|
-
type: "rdp";
|
|
356
|
-
id: keyof RDPs;
|
|
357
|
-
creator: DerivedProperty.Creator<Q, RDPs[keyof RDPs]>;
|
|
358
|
-
}
|
|
359
|
-
interface CustomColumnLocator {
|
|
360
|
-
type: "custom";
|
|
361
|
-
id: string;
|
|
362
|
-
}
|
|
363
|
-
type ColumnDefinitionLocator<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>> = PropertyColumnLocator<Q> | FunctionColumnLocator<Q, RDPs, FunctionColumns> | RdpColumnLocator<Q, RDPs> | CustomColumnLocator;
|
|
364
|
-
interface ObjectTableProps<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>> {
|
|
365
|
-
/**
|
|
366
|
-
* The object or interface type of the object
|
|
367
|
-
* If objectSet is not provided, objects will be fetched based on this type.
|
|
368
|
-
*/
|
|
369
|
-
objectType: Q;
|
|
370
|
-
/**
|
|
371
|
-
* The set of objects to show in the table.
|
|
372
|
-
* If provided, the table fetches through this object set instead of fetching based on
|
|
373
|
-
* objectType. Supported for both object and interface types.
|
|
374
|
-
*
|
|
375
|
-
* For an interface object set, rows expose the interface's declared properties;
|
|
376
|
-
* the underlying concrete object's non-interface properties are not loaded.
|
|
377
|
-
* Use objectType-based fetching if you need those.
|
|
378
|
-
*/
|
|
379
|
-
objectSet?: ObjectSet<Q>;
|
|
380
|
-
/**
|
|
381
|
-
* Ordered list of column definitions to show in the table
|
|
382
|
-
*
|
|
383
|
-
* If not provided, all of the properties of the object type will be shown in default order.
|
|
384
|
-
*/
|
|
385
|
-
columnDefinitions?: Array<ColumnDefinition<Q, RDPs, FunctionColumns>>;
|
|
386
|
-
objectSetOptions?: ObjectSetOptions<Q>;
|
|
387
|
-
/**
|
|
388
|
-
* Minimum time between fetch requests in milliseconds.
|
|
389
|
-
* Increasing this value reduces redundant network calls when the same data
|
|
390
|
-
* is requested multiple times in quick succession.
|
|
391
|
-
*
|
|
392
|
-
* @default 60_000 1 minute
|
|
393
|
-
*/
|
|
394
|
-
dedupeIntervalMs?: number;
|
|
395
|
-
/**
|
|
396
|
-
* Enable streaming updates via websocket subscription.
|
|
397
|
-
* When true, the table will automatically update when matching
|
|
398
|
-
* objects are added, updated, or removed in Foundry.
|
|
399
|
-
*
|
|
400
|
-
* Limitations: `streamUpdates` cannot be used together with `pivotTo` or
|
|
401
|
-
* `withProperties`. The server does not support websocket subscriptions
|
|
402
|
-
* for link-traversal or derived-property queries. Those queries still
|
|
403
|
-
* fetch data normally but won't receive real-time updates.
|
|
404
|
-
*
|
|
405
|
-
* @default false
|
|
406
|
-
*/
|
|
407
|
-
streamUpdates?: boolean;
|
|
408
|
-
/**
|
|
409
|
-
* Number of objects to fetch per page.
|
|
410
|
-
*
|
|
411
|
-
* @default 50
|
|
412
|
-
*/
|
|
413
|
-
pageSize?: number;
|
|
414
|
-
/**
|
|
415
|
-
* The current where clause to filter the objects in the table.
|
|
416
|
-
*/
|
|
417
|
-
filter?: WhereClause<Q, RDPs>;
|
|
418
|
-
/**
|
|
419
|
-
* Whether the column configuration dialog for column visibility and ordering is available to the user.
|
|
420
|
-
*
|
|
421
|
-
* @default true
|
|
422
|
-
*/
|
|
423
|
-
enableColumnConfig?: boolean;
|
|
424
|
-
/**
|
|
425
|
-
* Whether columns can be pinned by the user.
|
|
426
|
-
*
|
|
427
|
-
* @default true
|
|
428
|
-
*/
|
|
429
|
-
enableColumnPinning?: boolean;
|
|
430
|
-
/**
|
|
431
|
-
* Whether columns can be resized by the user.
|
|
432
|
-
*
|
|
433
|
-
* @default true
|
|
434
|
-
*/
|
|
435
|
-
enableColumnResizing?: boolean;
|
|
436
|
-
/**
|
|
437
|
-
* Called when the column visibility or ordering changed.
|
|
438
|
-
*
|
|
439
|
-
* If provided, the table will allow the user to show/hide columns.
|
|
440
|
-
*
|
|
441
|
-
* @param newStates The columns sorted in their display order in the table and their visibility state.
|
|
442
|
-
*/
|
|
443
|
-
onColumnVisibilityChanged?: (newStates: Array<{
|
|
444
|
-
columnId: PropertyKeys<Q> | keyof RDPs | keyof FunctionColumns;
|
|
445
|
-
isVisible: boolean;
|
|
446
|
-
}>) => void;
|
|
447
|
-
/**
|
|
448
|
-
* Called when the pinned columns change.
|
|
449
|
-
*
|
|
450
|
-
* If provided, the table will allow the user to pin/unpin columns.
|
|
451
|
-
*
|
|
452
|
-
* @param newStates The new list of column pin states
|
|
453
|
-
*/
|
|
454
|
-
onColumnsPinnedChanged?: (newStates: Array<{
|
|
455
|
-
columnId: PropertyKeys<Q> | keyof RDPs | keyof FunctionColumns;
|
|
456
|
-
pinned: "left" | "right" | "none";
|
|
457
|
-
}>) => void;
|
|
458
|
-
/**
|
|
459
|
-
* Called when a column is resized.
|
|
460
|
-
*
|
|
461
|
-
* @param columnId The ID of the resized column
|
|
462
|
-
* @param newWidth The new width of the column. When newWidth = null, the column size is reset.
|
|
463
|
-
*/
|
|
464
|
-
onColumnResize?: (columnId: PropertyKeys<Q> | keyof RDPs | keyof FunctionColumns, newWidth: number | null) => void;
|
|
465
|
-
/**
|
|
466
|
-
* Called when a column header is clicked.
|
|
467
|
-
*
|
|
468
|
-
* The columnId matches the `locator.id` configured on the column definition.
|
|
469
|
-
* The dropdown menu trigger is excluded — clicking the chevron opens the
|
|
470
|
-
* header menu instead of firing this callback.
|
|
471
|
-
*
|
|
472
|
-
* @param columnId The id of the clicked column
|
|
473
|
-
*/
|
|
474
|
-
onColumnHeaderClick?: (columnId: PropertyKeys<Q> | keyof RDPs | keyof FunctionColumns) => void;
|
|
475
|
-
/**
|
|
476
|
-
* Whether the table is sortable by the user.
|
|
477
|
-
*
|
|
478
|
-
* @default true
|
|
479
|
-
*/
|
|
480
|
-
enableOrdering?: boolean;
|
|
481
|
-
/**
|
|
482
|
-
* The default order by clause to sort the objects in the table.
|
|
483
|
-
* If provided without orderBy prop, the sorting is uncontrolled.
|
|
484
|
-
* If both orderBy and defaultOrderBy are provided, orderBy takes precedence.
|
|
485
|
-
*/
|
|
486
|
-
defaultOrderBy?: Array<{
|
|
487
|
-
property: PropertyKeys<Q> | keyof RDPs;
|
|
488
|
-
direction: "asc" | "desc";
|
|
489
|
-
}>;
|
|
490
|
-
/**
|
|
491
|
-
* The current order by clause to sort the objects in the table.
|
|
492
|
-
* If provided, the sorting is controlled.
|
|
493
|
-
* If both orderBy and defaultOrderBy are provided, orderBy takes precedence.
|
|
494
|
-
*/
|
|
495
|
-
orderBy?: Array<{
|
|
496
|
-
property: PropertyKeys<Q> | keyof RDPs;
|
|
497
|
-
direction: "asc" | "desc";
|
|
498
|
-
}>;
|
|
499
|
-
/**
|
|
500
|
-
* Called when the order by clause is changed.
|
|
501
|
-
* Required when sorting is controlled.
|
|
502
|
-
*
|
|
503
|
-
* @param newOrderBy The new order by clause
|
|
504
|
-
*/
|
|
505
|
-
onOrderByChanged?: (newOrderBy: Array<{
|
|
506
|
-
property: PropertyKeys<Q> | keyof RDPs;
|
|
507
|
-
direction: "asc" | "desc";
|
|
508
|
-
}>) => void;
|
|
509
|
-
/**
|
|
510
|
-
* Selection mode for the table rows.
|
|
511
|
-
*
|
|
512
|
-
* If multiple, a checkbox will be shown for each row to allow selecting multiple rows
|
|
513
|
-
* as well as a top-level checkbox in the header to select all rows.
|
|
514
|
-
*
|
|
515
|
-
* @default "none"
|
|
516
|
-
*/
|
|
517
|
-
selectionMode?: "single" | "multiple" | "none";
|
|
518
|
-
/**
|
|
519
|
-
* The currently selected rows in the table.
|
|
520
|
-
* If provided, the row selection is controlled.
|
|
521
|
-
*/
|
|
522
|
-
selectedRows?: PrimaryKeyType<Q>[];
|
|
523
|
-
/**
|
|
524
|
-
* Indicates whether all rows are selected in controlled mode.
|
|
525
|
-
* When true, the table will show all rows as selected regardless of the selectedRows array.
|
|
526
|
-
*/
|
|
527
|
-
isAllSelected?: boolean;
|
|
528
|
-
/**
|
|
529
|
-
* Called when the row selection changes, with a {@link RowSelectionChange}
|
|
530
|
-
* payload describing the new state.
|
|
531
|
-
*
|
|
532
|
-
* @param change The new selection state. See {@link RowSelectionChange}.
|
|
533
|
-
*/
|
|
534
|
-
onRowSelectionChanged?: (change: RowSelectionChange<Q, RDPs>) => void;
|
|
535
|
-
/**
|
|
536
|
-
* Called when the set of loaded rows changes — as pages are fetched, when
|
|
537
|
-
* streamed updates arrive, and after a refetch — with a
|
|
538
|
-
* {@link LoadedObjectsChange} payload.
|
|
539
|
-
*
|
|
540
|
-
* @param change The loaded rows and the total count. See
|
|
541
|
-
* {@link LoadedObjectsChange}.
|
|
542
|
-
*/
|
|
543
|
-
onLoadedObjectsChanged?: (change: LoadedObjectsChange<Q, RDPs>) => void;
|
|
544
|
-
/**
|
|
545
|
-
* The primary key of the row to render as visually focused (the
|
|
546
|
-
* "last interacted" row). When provided, focus state is controlled by
|
|
547
|
-
* the caller.
|
|
548
|
-
*
|
|
549
|
-
* Stored as a primary key rather than a full object so the focus does
|
|
550
|
-
* not go stale when the underlying row data changes.
|
|
551
|
-
*
|
|
552
|
-
* Pass `null` to render no row as focused.
|
|
553
|
-
*/
|
|
554
|
-
focusedRow?: PrimaryKeyType<Q> | null;
|
|
555
|
-
/**
|
|
556
|
-
* Called when the focused row changes — fires in both controlled and
|
|
557
|
-
* uncontrolled modes so callers can observe focus without taking it
|
|
558
|
-
* over.
|
|
559
|
-
*
|
|
560
|
-
* @param row The newly-focused row object, or `null` if focus was
|
|
561
|
-
* cleared
|
|
562
|
-
*/
|
|
563
|
-
onFocusedRowChanged?: (row: Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs> | null) => void;
|
|
564
|
-
/**
|
|
565
|
-
* Controls the edit mode behavior of the table.
|
|
566
|
-
* - "always": Editable cells are immediately in edit mode on row clicked.
|
|
567
|
-
* - "manual": User can toggle edit mode on/off via the Edit Table button.
|
|
568
|
-
*
|
|
569
|
-
* @default "manual"
|
|
570
|
-
*/
|
|
571
|
-
editMode?: "always" | "manual";
|
|
572
|
-
/**
|
|
573
|
-
* Whether to render the bottom edit footer that hosts the
|
|
574
|
-
* "Edit Table" / "Cancel" / "Submit Edits" buttons and the edit-state
|
|
575
|
-
* indicators (modification count, validation errors).
|
|
576
|
-
*
|
|
577
|
-
* @default true whenever the table has at least one column declared
|
|
578
|
-
* editable (i.e. any column with `editable: true` or `editable: (object) => boolean`).
|
|
579
|
-
* When `false`, the "Edit Table" and "Submit Edits" buttons will not be shown.
|
|
580
|
-
*/
|
|
581
|
-
showEditFooter?: boolean;
|
|
582
|
-
/**
|
|
583
|
-
* Called after the value of a cell is edited and committed by the user.
|
|
584
|
-
*
|
|
585
|
-
* @param info An object containing details about the cell that was edited,
|
|
586
|
-
* including the rowId, columnId, new and old values, and the row data before the edit
|
|
587
|
-
*/
|
|
588
|
-
onCellValueChanged?: (info: CellEditInfo<Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>, unknown>) => void;
|
|
589
|
-
/**
|
|
590
|
-
* If provided, the "Submit Edits" button will be shown in the edit footer.
|
|
591
|
-
*
|
|
592
|
-
* @param edits an array of edit info containing details about the edited cells
|
|
593
|
-
* including the rowId, columnId, new and old values, and the row data before the edit
|
|
594
|
-
* @return a promise that resolves to true if the edits were successfully submitted
|
|
595
|
-
*/
|
|
596
|
-
onSubmitEdits?: (edits: CellEditInfo<Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>, unknown>[]) => Promise<boolean>;
|
|
597
|
-
/**
|
|
598
|
-
* Called when a row is clicked.
|
|
599
|
-
*
|
|
600
|
-
* @param object The object representing the clicked row
|
|
601
|
-
*/
|
|
602
|
-
onRowClick?: (object: Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>) => void;
|
|
603
|
-
/**
|
|
604
|
-
* If provided, will render this context menu when right clicking on a cell
|
|
605
|
-
*/
|
|
606
|
-
renderCellContextMenu?: (row: Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>, cellValue: unknown) => React.ReactNode;
|
|
607
|
-
/**
|
|
608
|
-
* The height of each row in pixels.
|
|
609
|
-
*
|
|
610
|
-
* @default 40
|
|
611
|
-
*/
|
|
612
|
-
rowHeight?: number;
|
|
613
|
-
/**
|
|
614
|
-
* Render override for the empty state. Called when the table has no
|
|
615
|
-
* rows and no error. When omitted, a default "No Data" indicator is
|
|
616
|
-
* rendered.
|
|
617
|
-
*/
|
|
618
|
-
renderEmptyState?: () => React.ReactNode;
|
|
619
|
-
/**
|
|
620
|
-
* Returns extra HTML attributes (typically `data-*`) to apply to each
|
|
621
|
-
* row element. Use this to drive conditional row styling
|
|
622
|
-
*/
|
|
623
|
-
getRowAttributes?: (object: Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>) => Record<string, string | undefined>;
|
|
624
|
-
/**
|
|
625
|
-
* Imperative handle for programmatic table actions. Pass a ref
|
|
626
|
-
* (`useRef<ObjectTableHandle<Q, RDPs>>(null)`) to call
|
|
627
|
-
* {@link ObjectTableHandle} methods such as
|
|
628
|
-
* {@link ObjectTableHandle.getSnapshot}.
|
|
629
|
-
*/
|
|
630
|
-
tableRef?: React.Ref<ObjectTableHandle<Q, RDPs>>;
|
|
631
|
-
className?: string;
|
|
632
|
-
}
|
|
633
|
-
/**
|
|
634
|
-
* Imperative handle exposing programmatic actions on an {@link ObjectTable}.
|
|
635
|
-
* Obtain it by passing {@link ObjectTableProps.tableRef}.
|
|
636
|
-
*/
|
|
637
|
-
interface ObjectTableHandle<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
638
|
-
/**
|
|
639
|
-
* Loads every row matching the object set and returns a format-agnostic
|
|
640
|
-
* snapshot of the table's columns, row values, and total count. The caller
|
|
641
|
-
* is responsible for turning the snapshot into a downloadable artifact
|
|
642
|
-
* (CSV, Spreadsheet, JSON, clipboard, …).
|
|
643
|
-
*
|
|
644
|
-
* Property, derived-property, and function-backed columns are included.
|
|
645
|
-
* Function-backed cells are fetched per page during snapshot collection;
|
|
646
|
-
* when a page's fetch fails, `row.getValue(columnId)` returns the thrown
|
|
647
|
-
* `Error` instance for the affected cells while the rest of the snapshot
|
|
648
|
-
* resolves normally.
|
|
649
|
-
* Columns defined with `locator.type === "custom"` are omitted because
|
|
650
|
-
* they have no underlying value to export.
|
|
651
|
-
*
|
|
652
|
-
* The returned promise rejects up front when the object set's `totalCount`
|
|
653
|
-
* exceeds `rowLimit`. When `totalCount` is unavailable, it instead rejects
|
|
654
|
-
* mid-load once more than `rowLimit` rows have been pulled, so an unknown
|
|
655
|
-
* count can't drain an unbounded set into the client. Otherwise every
|
|
656
|
-
* matching row is loaded.
|
|
657
|
-
*
|
|
658
|
-
* @param options See {@link ObjectTableSnapshotOptions}.
|
|
659
|
-
*/
|
|
660
|
-
getSnapshot: (options?: ObjectTableSnapshotOptions) => Promise<ObjectTableSnapshot<Q, RDPs>>;
|
|
661
|
-
}
|
|
662
|
-
/**
|
|
663
|
-
* Options for {@link ObjectTableHandle["getSnapshot"]}.
|
|
664
|
-
*/
|
|
665
|
-
interface ObjectTableSnapshotOptions {
|
|
666
|
-
/**
|
|
667
|
-
* Upper bound on how many rows the snapshot may contain. When the object
|
|
668
|
-
* set's total row count exceeds this value, `getSnapshot` rejects;
|
|
669
|
-
* otherwise every matching row is loaded.
|
|
670
|
-
*
|
|
671
|
-
* @default 10_000
|
|
672
|
-
*/
|
|
673
|
-
rowLimit?: number;
|
|
674
|
-
}
|
|
675
|
-
/**
|
|
676
|
-
* A point-in-time capture of an {@link ObjectTable}'s columns and row values,
|
|
677
|
-
* returned by {@link ObjectTableHandle.getSnapshot}.
|
|
678
|
-
*/
|
|
679
|
-
interface ObjectTableSnapshot<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
680
|
-
columns: ObjectTableDataColumn[];
|
|
681
|
-
rows: ObjectTableDataRow<Q, RDPs>[];
|
|
682
|
-
/**
|
|
683
|
-
* Total number of objects matching the underlying object set, as reported
|
|
684
|
-
* by the API. `undefined` when the API did not provide a count. Encoded as
|
|
685
|
-
* a string to match the underlying list-payload representation.
|
|
686
|
-
*/
|
|
687
|
-
totalCount: string | undefined;
|
|
688
|
-
}
|
|
689
|
-
/**
|
|
690
|
-
* A single column in an {@link ObjectTableSnapshot}.
|
|
691
|
-
*/
|
|
692
|
-
interface ObjectTableDataColumn {
|
|
693
|
-
/** Column id, matching the `locator.id` of the column definition. */
|
|
694
|
-
id: string;
|
|
695
|
-
/** Display name shown in the table header. */
|
|
696
|
-
name: string;
|
|
697
|
-
}
|
|
698
|
-
/**
|
|
699
|
-
* A single row in an {@link ObjectTableSnapshot}.
|
|
700
|
-
*/
|
|
701
|
-
interface ObjectTableDataRow<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
702
|
-
/** Row id (the underlying object's `$primaryKey` rendered as a string). */
|
|
703
|
-
id: string;
|
|
704
|
-
/** The underlying loaded object. */
|
|
705
|
-
object: Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>;
|
|
706
|
-
/**
|
|
707
|
-
* Returns the cell value for a given column id, or `undefined` when the
|
|
708
|
-
* column is not part of the snapshot. Function-backed cells whose query
|
|
709
|
-
* failed surface the thrown `Error` instance as their value.
|
|
710
|
-
*/
|
|
711
|
-
getValue: (columnId: string) => unknown;
|
|
712
|
-
}
|
|
713
|
-
/**
|
|
714
|
-
* Payload for {@link ObjectTableProps.onLoadedObjectsChanged}.
|
|
715
|
-
*/
|
|
716
|
-
interface LoadedObjectsChange<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
717
|
-
/**
|
|
718
|
-
* The rows loaded into the table so far, in display order. Rows on pages
|
|
719
|
-
* the user hasn't scrolled to yet are absent — compare `loadedObjects.length`
|
|
720
|
-
* against `totalCount` to tell whether more remain.
|
|
721
|
-
*
|
|
722
|
-
* Each row carries the values of its function-backed columns alongside its
|
|
723
|
-
* properties, so those cells are readable from the payload.
|
|
724
|
-
*/
|
|
725
|
-
loadedObjects: Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>[];
|
|
726
|
-
/**
|
|
727
|
-
* Total number of objects matching the underlying object set, as reported
|
|
728
|
-
* by the API. `undefined` when the API did not provide a count. Encoded as
|
|
729
|
-
* a string to match the underlying list-payload representation.
|
|
730
|
-
*/
|
|
731
|
-
totalCount: string | undefined;
|
|
732
|
-
}
|
|
733
|
-
/**
|
|
734
|
-
* Payload for {@link ObjectTableProps.onRowSelectionChanged}. Consolidates
|
|
735
|
-
* the loaded row instances, the `isSelectAll` semantic intent, and an
|
|
736
|
-
* `ObjectSet` covering the selection.
|
|
737
|
-
*/
|
|
738
|
-
interface RowSelectionChange<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
739
|
-
/**
|
|
740
|
-
* Loaded row instances currently selected. When `isSelectAll` is true,
|
|
741
|
-
* this reflects only the rows currently in the table — pages not yet
|
|
742
|
-
* fetched are absent. Use `objectSet` for the cross-page view, and
|
|
743
|
-
* `selectedRows.map(r => r.$primaryKey)` if you need the primary keys.
|
|
744
|
-
*/
|
|
745
|
-
selectedRows: Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>[];
|
|
746
|
-
/**
|
|
747
|
-
* True when the user invoked "select all" (header checkbox) or when
|
|
748
|
-
* controlled mode supplies `isAllSelected={true}`. Distinct from "every
|
|
749
|
-
* loaded row happens to be selected" — that condition is reflected by
|
|
750
|
-
* `selectedRows.length` matching the visible row count but does not set
|
|
751
|
-
* this flag.
|
|
752
|
-
*/
|
|
753
|
-
isSelectAll: boolean;
|
|
754
|
-
/**
|
|
755
|
-
* An `ObjectSet` representing the selection.
|
|
756
|
-
*
|
|
757
|
-
* - "Select all" → the underlying `ObjectSet` (`objectSet` prop if
|
|
758
|
-
* provided, otherwise derived from `objectType` via `client(...)`).
|
|
759
|
-
* This includes rows not yet loaded into the table.
|
|
760
|
-
* - Partial selection → the underlying `ObjectSet` narrowed to
|
|
761
|
-
* `{ $primaryKey: { $in: selectedRows.map(r => r.$primaryKey) } }`.
|
|
762
|
-
* - "Deselect all" → an empty `ObjectSet` (`$in: []`).
|
|
763
|
-
*
|
|
764
|
-
* Works for both object and interface types, since the `$primaryKey`
|
|
765
|
-
* special property does not require resolving the underlying primary key
|
|
766
|
-
* property name. `undefined` only when there is no underlying `ObjectSet`
|
|
767
|
-
* to derive from.
|
|
768
|
-
*/
|
|
769
|
-
objectSet: ObjectSet<Q, RDPs> | undefined;
|
|
770
|
-
}
|
|
771
|
-
interface ObjectSetOptions<Q extends ObjectOrInterfaceDefinition> {
|
|
772
|
-
/**
|
|
773
|
-
* Object sets to union with
|
|
774
|
-
*/
|
|
775
|
-
union?: ObjectSet<Q>[];
|
|
776
|
-
/**
|
|
777
|
-
* Object sets to intersect with
|
|
778
|
-
*/
|
|
779
|
-
intersect?: ObjectSet<Q>[];
|
|
780
|
-
/**
|
|
781
|
-
* Object sets to subtract from
|
|
782
|
-
*/
|
|
783
|
-
subtract?: ObjectSet<Q>[];
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
declare function ObjectTable$1<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>>({ objectType, objectSet, columnDefinitions, filter, objectSetOptions, dedupeIntervalMs, pageSize, streamUpdates, orderBy, defaultOrderBy, onOrderByChanged, onColumnsPinnedChanged, onColumnResize, onRowSelectionChanged, onLoadedObjectsChanged, onColumnHeaderClick, renderCellContextMenu, selectionMode, selectedRows, isAllSelected: isAllSelectedProp, onColumnVisibilityChanged, onCellValueChanged, onSubmitEdits, enableOrdering, enableColumnPinning, enableColumnResizing, enableColumnConfig, editMode, focusedRow, onFocusedRowChanged, tableRef, ...props }: ObjectTableProps<Q, RDPs, FunctionColumns>): React__default.ReactElement;
|
|
787
|
-
|
|
788
|
-
interface HeaderMenuFeatureFlags {
|
|
789
|
-
/**
|
|
790
|
-
* Whether sorting menu items should be shown.
|
|
791
|
-
* When false, hides "Sort ascending", "Sort descending", "Sort on multiple columns", and "Clear all sorts".
|
|
792
|
-
*/
|
|
793
|
-
showSortingItems?: boolean;
|
|
794
|
-
/**
|
|
795
|
-
* Whether pinning menu items should be shown.
|
|
796
|
-
* When false, hides "Pin column" and "Unpin Column".
|
|
797
|
-
*/
|
|
798
|
-
showPinningItems?: boolean;
|
|
799
|
-
/**
|
|
800
|
-
* Whether resize menu item should be shown.
|
|
801
|
-
* When false, hides "Reset Column Size".
|
|
802
|
-
*/
|
|
803
|
-
showResizeItem?: boolean;
|
|
804
|
-
/**
|
|
805
|
-
* Whether column config menu item should be shown.
|
|
806
|
-
* When false, hides "Configure Columns".
|
|
807
|
-
*/
|
|
808
|
-
showConfigItem?: boolean;
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
declare module "@tanstack/react-table" {
|
|
812
|
-
interface ColumnMeta<TData extends RowData = unknown, TValue = unknown> {
|
|
813
|
-
columnName?: string;
|
|
814
|
-
isAsyncColumn?: boolean;
|
|
815
|
-
isVisible?: boolean;
|
|
816
|
-
editable?: boolean | ((object: TData) => boolean);
|
|
817
|
-
dataType?: string;
|
|
818
|
-
/**
|
|
819
|
-
* For columns backed by a `"marking"` property, the marking subtype as
|
|
820
|
-
* surfaced by the platform: `"CBAC"` for classification-based access
|
|
821
|
-
* control or `"MANDATORY"` for mandatory markings. Absent for
|
|
822
|
-
* non-marking columns and for marking columns whose subtype isn't
|
|
823
|
-
* exposed.
|
|
824
|
-
*/
|
|
825
|
-
markingType?: "CBAC" | "MANDATORY";
|
|
826
|
-
editFieldConfig?: EditFieldConfig<TData>;
|
|
827
|
-
validateEdit?: (value: unknown) => Promise<string | undefined>;
|
|
828
|
-
}
|
|
829
|
-
interface TableMeta<TData extends RowData = unknown> {
|
|
830
|
-
onCellEdit?: (cellId: string, info: CellEditInfo<TData, unknown>) => void;
|
|
831
|
-
onCellValidationError?: (cellId: string, error: string) => void;
|
|
832
|
-
clearCellValidationError?: (cellId: string) => void;
|
|
833
|
-
cellEdits?: Record<string, CellEditInfo<TData, unknown>>;
|
|
834
|
-
isInEditMode?: boolean;
|
|
835
|
-
validationErrors?: Map<string, string>;
|
|
836
|
-
focusedRowId?: string | null;
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
interface BaseTableProps<TData extends RowData> {
|
|
840
|
-
/**
|
|
841
|
-
* The TanStack React Table instance backing the table. Build it with
|
|
842
|
-
* `useReactTable` (see the `useColumnDefs` / `useObjectTableData` hooks for
|
|
843
|
-
* the pieces `ObjectTable` itself feeds in).
|
|
844
|
-
*/
|
|
845
|
-
table: Table<TData>;
|
|
846
|
-
/**
|
|
847
|
-
* Whether a fetch is in flight. While loading with no rows yet, a skeleton
|
|
848
|
-
* table is rendered in place of the header and body; while loading with rows
|
|
849
|
-
* already present, an extra skeleton row is appended and further
|
|
850
|
-
* `fetchNextPage` calls are suppressed.
|
|
851
|
-
*/
|
|
852
|
-
isLoading?: boolean;
|
|
853
|
-
/**
|
|
854
|
-
* Loads the next page of rows. Called when the user scrolls near the bottom
|
|
855
|
-
* of the table. Omit it to disable infinite scrolling.
|
|
856
|
-
*/
|
|
857
|
-
fetchNextPage?: () => Promise<void>;
|
|
858
|
-
/**
|
|
859
|
-
* Called when a row is clicked.
|
|
860
|
-
*
|
|
861
|
-
* @param row The row data of the clicked row
|
|
862
|
-
*/
|
|
863
|
-
onRowClick?: (row: TData) => void;
|
|
864
|
-
/**
|
|
865
|
-
* Called when a column header is clicked.
|
|
866
|
-
*
|
|
867
|
-
* The dropdown menu trigger is excluded — clicking the chevron opens the
|
|
868
|
-
* header menu instead of firing this callback.
|
|
869
|
-
*
|
|
870
|
-
* @param columnId The id of the clicked column
|
|
871
|
-
*/
|
|
872
|
-
onColumnHeaderClick?: (columnId: string) => void;
|
|
873
|
-
/**
|
|
874
|
-
* The height of each row in pixels. Also drives row virtualization, so an
|
|
875
|
-
* accurate value keeps scrolling smooth.
|
|
876
|
-
*
|
|
877
|
-
* @default 40
|
|
878
|
-
*/
|
|
879
|
-
rowHeight?: number;
|
|
880
|
-
/**
|
|
881
|
-
* If provided, will render this context menu when right clicking on a cell
|
|
882
|
-
*/
|
|
883
|
-
renderCellContextMenu?: (row: TData, cell: Cell<TData, unknown>) => React__default.ReactNode;
|
|
884
|
-
/**
|
|
885
|
-
* Toggles which items appear in the column header menu (sorting, pinning,
|
|
886
|
-
* resizing, and so on). Every flag defaults to shown. See
|
|
887
|
-
* {@link HeaderMenuFeatureFlags}.
|
|
888
|
-
*/
|
|
889
|
-
headerMenuFeatureFlags?: HeaderMenuFeatureFlags;
|
|
890
|
-
/**
|
|
891
|
-
* Wiring for inline cell editing — pending edits, edit-mode state, and the
|
|
892
|
-
* submit/clear/validation callbacks. Omit it to render a read-only table.
|
|
893
|
-
* `useEditableTable` produces this shape. See {@link EditableConfig}.
|
|
894
|
-
*/
|
|
895
|
-
editableConfig?: EditableConfig<TData, unknown>;
|
|
896
|
-
/**
|
|
897
|
-
* Whether to render the bottom edit footer. Defaults to `true`; the
|
|
898
|
-
* footer is only rendered when the table has at least one editable
|
|
899
|
-
* column (`hasEditableColumns`).
|
|
900
|
-
*/
|
|
901
|
-
showEditFooter?: boolean;
|
|
902
|
-
/**
|
|
903
|
-
* The row ID of the row to render as visually focused. When provided, focus state is controlled by the caller.
|
|
904
|
-
*/
|
|
905
|
-
focusedRowId?: string | null;
|
|
906
|
-
/**
|
|
907
|
-
* Fires whenever the focused row changes, in both controlled and
|
|
908
|
-
* uncontrolled modes.
|
|
909
|
-
*/
|
|
910
|
-
onFocusedRowChanged?: (row: TData | null) => void;
|
|
911
|
-
/**
|
|
912
|
-
* Render override for the empty state. Called when the table has no
|
|
913
|
-
* rows and no error. When omitted, a default "No Data" indicator is
|
|
914
|
-
* rendered.
|
|
915
|
-
*/
|
|
916
|
-
renderEmptyState?: () => React__default.ReactNode;
|
|
917
|
-
/**
|
|
918
|
-
* A fetch error to surface. When set, an error message is rendered in place
|
|
919
|
-
* of the empty state.
|
|
920
|
-
*/
|
|
921
|
-
error?: Error;
|
|
922
|
-
/**
|
|
923
|
-
* Returns extra HTML attributes (typically `data-*`) to apply to each
|
|
924
|
-
* row element. Use this to drive conditional row styling
|
|
925
|
-
*/
|
|
926
|
-
getRowAttributes?: (object: TData) => Record<string, string | undefined>;
|
|
927
|
-
/**
|
|
928
|
-
* Class name applied to the table's outermost wrapper element.
|
|
929
|
-
*/
|
|
930
|
-
className?: string;
|
|
931
|
-
}
|
|
932
|
-
declare function BaseTable<TData extends RowData>(props: BaseTableProps<TData>): ReactElement;
|
|
933
|
-
|
|
934
|
-
interface ColumnConfig {
|
|
935
|
-
columnId: string;
|
|
936
|
-
isVisible: boolean;
|
|
937
|
-
}
|
|
938
|
-
type ColumnConfigOptions = Array<Pick<ColumnOption, "id" | "name">>;
|
|
939
|
-
interface ColumnConfigDialogProps {
|
|
940
|
-
isOpen: boolean;
|
|
941
|
-
onClose: () => void;
|
|
942
|
-
columnOptions: ColumnConfigOptions;
|
|
943
|
-
currentVisibility?: VisibilityState;
|
|
944
|
-
currentColumnOrder?: ColumnOrderState;
|
|
945
|
-
onApply: (columns: ColumnConfig[]) => void;
|
|
946
|
-
isValidConfig?: (columns: ColumnConfig[]) => boolean;
|
|
947
|
-
}
|
|
948
|
-
declare function ColumnConfigDialog({ isOpen, onClose, columnOptions, currentVisibility, currentColumnOrder, onApply, isValidConfig, }: ColumnConfigDialogProps): React__default.ReactElement | null;
|
|
949
|
-
|
|
950
|
-
interface SortColumnItem extends ColumnOption {
|
|
951
|
-
direction: "asc" | "desc";
|
|
952
|
-
}
|
|
953
|
-
interface MultiColumnSortDialogProps {
|
|
954
|
-
isOpen: boolean;
|
|
955
|
-
onClose: () => void;
|
|
956
|
-
onApply: (sortColumns: SortingState) => void;
|
|
957
|
-
currentSorting: SortingState;
|
|
958
|
-
columnOptions: ColumnOption[];
|
|
959
|
-
}
|
|
960
|
-
declare function MultiColumnSortDialog({ isOpen, onClose, onApply, currentSorting, columnOptions, }: MultiColumnSortDialogProps): React__default.ReactElement;
|
|
961
|
-
|
|
962
|
-
declare function LoadingCellContent(): React__default.ReactElement;
|
|
963
|
-
declare function LoadingCell({ width }: {
|
|
964
|
-
width: number;
|
|
965
|
-
}): React__default.ReactElement;
|
|
966
|
-
|
|
967
|
-
interface AsyncCellData {
|
|
968
|
-
readonly __asyncCell: true;
|
|
969
|
-
data?: unknown;
|
|
970
|
-
isLoading: boolean;
|
|
971
|
-
error?: unknown;
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
interface FunctionColumnData {
|
|
975
|
-
[columnId: string]: {
|
|
976
|
-
[objectPrimaryKey: string]: AsyncCellData;
|
|
977
|
-
};
|
|
978
|
-
}
|
|
979
|
-
interface UseFunctionColumnsDataProps<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>> {
|
|
980
|
-
objectOrInterfaceType: Q;
|
|
981
|
-
objects: Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>[] | undefined;
|
|
982
|
-
columnDefinitions?: Array<ColumnDefinition<Q, RDPs, FunctionColumns>>;
|
|
983
|
-
pageSize?: number;
|
|
984
|
-
}
|
|
985
|
-
declare function useFunctionColumnsData<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>>({ objectOrInterfaceType, objects, columnDefinitions, pageSize, }: UseFunctionColumnsDataProps<Q, RDPs, FunctionColumns>): FunctionColumnData;
|
|
986
|
-
|
|
987
|
-
interface UseObjectTableDataProps<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>> {
|
|
988
|
-
/** The object or interface type to load rows for. */
|
|
989
|
-
objectOrInterfaceType: Q;
|
|
990
|
-
/**
|
|
991
|
-
* Column definitions. Used to extract derived-property (`rdp`) and
|
|
992
|
-
* function-column locators so the correct `withProperties` / function data
|
|
993
|
-
* is fetched. Optional — omit to load the type's base properties only.
|
|
994
|
-
*/
|
|
995
|
-
columnDefinitions?: Array<ColumnDefinition<Q, RDPs, FunctionColumns>>;
|
|
996
|
-
/** Server-side `where` clause applied to the query. */
|
|
997
|
-
filter?: WhereClause<Q, RDPs>;
|
|
998
|
-
/** TanStack sorting state, converted to an OSDK `orderBy` internally. */
|
|
999
|
-
sorting?: SortingState;
|
|
1000
|
-
/**
|
|
1001
|
-
* A pre-built object set to page through instead of fetching by type. When
|
|
1002
|
-
* provided, rows come from this set (filter / ordering still applied).
|
|
1003
|
-
*/
|
|
1004
|
-
objectSet?: ObjectSet<Q>;
|
|
1005
|
-
/** Extra options forwarded to `useObjectSet` when `objectSet` is provided. */
|
|
1006
|
-
objectSetOptions?: ObjectSetOptions<Q>;
|
|
1007
|
-
/**
|
|
1008
|
-
* Minimum interval between duplicate requests, in milliseconds.
|
|
1009
|
-
* @default 60000
|
|
1010
|
-
*/
|
|
1011
|
-
dedupeIntervalMs?: number;
|
|
1012
|
-
/**
|
|
1013
|
-
* Number of rows to request per page.
|
|
1014
|
-
* @default 50
|
|
1015
|
-
*/
|
|
1016
|
-
pageSize?: number;
|
|
1017
|
-
/** Whether to subscribe to live updates for the loaded objects. */
|
|
1018
|
-
streamUpdates?: boolean;
|
|
1019
|
-
}
|
|
1020
|
-
interface UseObjectTableDataResult<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> extends Omit<UseOsdkListResult<Q, RDPs>, "isOptimistic"> {
|
|
1021
|
-
}
|
|
1022
|
-
/**
|
|
1023
|
-
* This hook is a wrapper that conditionally uses either useObjectSet or useOsdkObjects
|
|
1024
|
-
* based on whether an objectSet prop is provided.
|
|
1025
|
-
* It extracts RDP locators from columnDefinitions and applies withProperties
|
|
1026
|
-
* to return data containing the derived properties.
|
|
1027
|
-
*/
|
|
1028
|
-
declare function useObjectTableData<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>>({ objectOrInterfaceType, columnDefinitions, filter, sorting, objectSet, objectSetOptions, dedupeIntervalMs, pageSize, streamUpdates, }: UseObjectTableDataProps<Q, RDPs, FunctionColumns>): UseObjectTableDataResult<Q, RDPs>;
|
|
1029
|
-
|
|
1030
|
-
interface UseColumnDefsResult<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1031
|
-
columns: AccessorColumnDef<Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>>[];
|
|
1032
|
-
loading: boolean;
|
|
1033
|
-
error: string | undefined;
|
|
1034
|
-
}
|
|
1035
|
-
/**
|
|
1036
|
-
* Hook which builds column definitions for tanstack-table given the objectSet
|
|
1037
|
-
*/
|
|
1038
|
-
declare function useColumnDefs<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>>(objectType: Q, columnDefinitions?: Array<ColumnDefinition<Q, RDPs, FunctionColumns>>): UseColumnDefsResult<Q, RDPs>;
|
|
1039
|
-
|
|
1040
|
-
interface UseSelectionColumnProps {
|
|
1041
|
-
selectionMode?: "single" | "multiple" | "none";
|
|
1042
|
-
isAllSelected: boolean;
|
|
1043
|
-
hasSelection: boolean;
|
|
1044
|
-
onToggleAll: () => void;
|
|
1045
|
-
onToggleRow: (id: string, rowIndex: number, isShiftClick: boolean) => void;
|
|
1046
|
-
}
|
|
1047
|
-
declare const useSelectionColumn: <Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}>({ selectionMode, isAllSelected, hasSelection, onToggleAll, onToggleRow, }: UseSelectionColumnProps) => ColumnDef<Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>> | null;
|
|
1048
|
-
|
|
1049
|
-
interface UseColumnPinningProps<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>> {
|
|
1050
|
-
columnDefinitions: ObjectTableProps<Q, RDPs, FunctionColumns>["columnDefinitions"];
|
|
1051
|
-
hasSelectionColumn?: boolean;
|
|
1052
|
-
onColumnsPinnedChanged?: ObjectTableProps<Q, RDPs, FunctionColumns>["onColumnsPinnedChanged"];
|
|
1053
|
-
}
|
|
1054
|
-
interface UseColumnPinningResult {
|
|
1055
|
-
columnPinning: ColumnPinningState;
|
|
1056
|
-
onColumnPinningChange: OnChangeFn<ColumnPinningState>;
|
|
1057
|
-
}
|
|
1058
|
-
declare const useColumnPinning: <Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>>({ columnDefinitions, hasSelectionColumn, onColumnsPinnedChanged, }: UseColumnPinningProps<Q, RDPs, FunctionColumns>) => UseColumnPinningResult;
|
|
1059
|
-
|
|
1060
|
-
interface UseColumnResizeProps {
|
|
1061
|
-
onColumnResize?: (columnId: string, newWidth: number | null) => void;
|
|
1062
|
-
}
|
|
1063
|
-
interface UseColumnResizeResult {
|
|
1064
|
-
columnSizing: ColumnSizingState;
|
|
1065
|
-
onColumnSizingChange: OnChangeFn<ColumnSizingState>;
|
|
1066
|
-
}
|
|
1067
|
-
declare const useColumnResize: ({ onColumnResize, }: UseColumnResizeProps) => UseColumnResizeResult;
|
|
1068
|
-
|
|
1069
|
-
interface UseColumnVisibilityProps<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>, TData = unknown> {
|
|
1070
|
-
allColumns: ColumnDef<TData>[];
|
|
1071
|
-
onColumnVisibilityChanged?: (newStates: Array<{
|
|
1072
|
-
columnId: PropertyKeys<Q> | keyof RDPs | keyof FunctionColumns;
|
|
1073
|
-
isVisible: boolean;
|
|
1074
|
-
}>) => void;
|
|
1075
|
-
}
|
|
1076
|
-
interface UseColumnVisibilityResult {
|
|
1077
|
-
columnVisibility: VisibilityState;
|
|
1078
|
-
onColumnVisibilityChange: OnChangeFn<VisibilityState>;
|
|
1079
|
-
columnOrder: ColumnOrderState;
|
|
1080
|
-
onColumnOrderChange: OnChangeFn<ColumnOrderState>;
|
|
1081
|
-
}
|
|
1082
|
-
declare const useColumnVisibility: <Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>, TData = unknown>({ allColumns, onColumnVisibilityChanged, }: UseColumnVisibilityProps<Q, RDPs, FunctionColumns, TData>) => UseColumnVisibilityResult;
|
|
1083
|
-
|
|
1084
|
-
interface UseFocusedRowProps<TData> {
|
|
1085
|
-
/**
|
|
1086
|
-
* Controlled focused row id. `undefined` enables uncontrolled mode
|
|
1087
|
-
* (internal state). `null` means "no row focused" under controlled
|
|
1088
|
-
* mode.
|
|
1089
|
-
*/
|
|
1090
|
-
focusedRowId?: string | null;
|
|
1091
|
-
onFocusedRowChanged?: (row: TData | null) => void;
|
|
1092
|
-
/**
|
|
1093
|
-
* Resolves a row id back to the row. Used to look up the full row
|
|
1094
|
-
* when firing `onFocusedRowChanged` so callers receive row data even
|
|
1095
|
-
* though the hook only stores the id. Return `null` when the id no
|
|
1096
|
-
* longer matches a known row (e.g. it was removed).
|
|
1097
|
-
*/
|
|
1098
|
-
getRowById: (id: string) => TData | null;
|
|
1099
|
-
}
|
|
1100
|
-
interface UseFocusedRowResult<TData> {
|
|
1101
|
-
/**
|
|
1102
|
-
* Effective focused row id — derived from the controlled value or
|
|
1103
|
-
* internal state. Children consume the id (not the row) so they can
|
|
1104
|
-
* compare against TanStack row ids without holding row references.
|
|
1105
|
-
*/
|
|
1106
|
-
focusedRowId: string | null;
|
|
1107
|
-
/**
|
|
1108
|
-
* Request a focus change by id. In uncontrolled mode this mutates
|
|
1109
|
-
* internal state; the change callback fires in both modes so callers
|
|
1110
|
-
* can observe. The callback receives the full row resolved via
|
|
1111
|
-
* `getRowById` (or `null`).
|
|
1112
|
-
*/
|
|
1113
|
-
setFocusedRowId: (id: string | null) => void;
|
|
1114
|
-
/**
|
|
1115
|
-
* True when the caller passed `focusedRow` (including `null`).
|
|
1116
|
-
*/
|
|
1117
|
-
isControlled: boolean;
|
|
1118
|
-
}
|
|
1119
|
-
declare function useFocusedRow<TData>({ focusedRowId, onFocusedRowChanged, getRowById, }: UseFocusedRowProps<TData>): UseFocusedRowResult<TData>;
|
|
1120
|
-
|
|
1121
|
-
interface UseLoadedObjectsChangedProps<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1122
|
-
/**
|
|
1123
|
-
* The rows loaded so far, or `undefined` while the first page is still in
|
|
1124
|
-
* flight.
|
|
1125
|
-
*/
|
|
1126
|
-
loadedObjects: Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>[] | undefined;
|
|
1127
|
-
/** Total objects matching the object set, if the API reported one. */
|
|
1128
|
-
totalCount: string | undefined;
|
|
1129
|
-
/** Whether the underlying query is currently fetching. */
|
|
1130
|
-
isLoading: boolean;
|
|
1131
|
-
onLoadedObjectsChanged?: (change: LoadedObjectsChange<Q, RDPs>) => void;
|
|
1132
|
-
}
|
|
1133
|
-
declare function useLoadedObjectsChanged<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}>({ loadedObjects, totalCount, isLoading, onLoadedObjectsChanged, }: UseLoadedObjectsChangedProps<Q, RDPs>): void;
|
|
1134
|
-
|
|
1135
|
-
/**
|
|
1136
|
-
* Payload delivered by {@link UseRowSelectionProps.onRowSelectionChanged}.
|
|
1137
|
-
* Mirrors the OSDK-level `RowSelectionChange` but without the `objectSet`
|
|
1138
|
-
* field, which requires OSDK context and is composed in `ObjectTable`.
|
|
1139
|
-
*/
|
|
1140
|
-
interface UseRowSelectionChange<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1141
|
-
selectedRows: Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>[];
|
|
1142
|
-
isSelectAll: boolean;
|
|
1143
|
-
}
|
|
1144
|
-
interface UseRowSelectionProps<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1145
|
-
selectionMode?: "single" | "multiple" | "none";
|
|
1146
|
-
selectedRows?: PrimaryKeyType<Q>[];
|
|
1147
|
-
isAllSelected?: boolean;
|
|
1148
|
-
onRowSelectionChanged?: (change: UseRowSelectionChange<Q, RDPs>) => void;
|
|
1149
|
-
data: Array<Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>> | undefined;
|
|
1150
|
-
}
|
|
1151
|
-
interface UseRowSelectionResult {
|
|
1152
|
-
rowSelection: RowSelectionState;
|
|
1153
|
-
isAllSelected: boolean;
|
|
1154
|
-
hasSelection: boolean;
|
|
1155
|
-
enableRowSelection: boolean;
|
|
1156
|
-
onToggleAll: () => void;
|
|
1157
|
-
onToggleRow: (rowId: string, rowIndex: number, isShiftClick?: boolean) => void;
|
|
1158
|
-
}
|
|
1159
|
-
declare function useRowSelection<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}>({ selectionMode, selectedRows, isAllSelected: isAllSelectedProp, onRowSelectionChanged, data, }: UseRowSelectionProps<Q, RDPs>): UseRowSelectionResult;
|
|
1160
|
-
|
|
1161
|
-
interface UseTableSortingProps<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>> {
|
|
1162
|
-
orderBy?: ObjectTableProps<Q, RDPs, FunctionColumns>["orderBy"];
|
|
1163
|
-
defaultOrderBy?: ObjectTableProps<Q, RDPs, FunctionColumns>["defaultOrderBy"];
|
|
1164
|
-
onOrderByChanged?: ObjectTableProps<Q, RDPs, FunctionColumns>["onOrderByChanged"];
|
|
1165
|
-
}
|
|
1166
|
-
interface UseTableSortingResult<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}> {
|
|
1167
|
-
sorting: SortingState;
|
|
1168
|
-
onSortingChange: OnChangeFn<SortingState>;
|
|
1169
|
-
orderByState: OrderBy<Q, RDPs>;
|
|
1170
|
-
}
|
|
1171
|
-
declare const useTableSorting: <Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>>({ orderBy, defaultOrderBy, onOrderByChanged, }: UseTableSortingProps<Q, RDPs, FunctionColumns>) => UseTableSortingResult<Q, RDPs>;
|
|
1172
|
-
|
|
1173
|
-
interface UseEditableTableProps<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>> {
|
|
1174
|
-
editMode?: "always" | "manual";
|
|
1175
|
-
onCellValueChanged?: ObjectTableProps<Q, RDPs, FunctionColumns>["onCellValueChanged"];
|
|
1176
|
-
onSubmitEdits?: ObjectTableProps<Q, RDPs, FunctionColumns>["onSubmitEdits"];
|
|
1177
|
-
}
|
|
1178
|
-
declare function useEditableTable<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef> = {}, FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<string, never>>({ editMode, onCellValueChanged, onSubmitEdits, }: UseEditableTableProps<Q, RDPs, FunctionColumns>): EditableConfig<Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>, unknown>;
|
|
1179
|
-
|
|
1180
|
-
interface UseObjectTableSnapshotProps<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef>, FunctionColumns extends Record<string, QueryDefinition<{}>>> {
|
|
1181
|
-
/**
|
|
1182
|
-
* The object or interface type the table is rendering. Used to construct a
|
|
1183
|
-
* base object set for chunking function-column queries by primary key.
|
|
1184
|
-
*/
|
|
1185
|
-
objectOrInterfaceType: Q;
|
|
1186
|
-
table: Table<Osdk.Instance<Q, "$allBaseProperties", PropertyKeys<Q>, RDPs>>;
|
|
1187
|
-
columnDefinitions?: Array<ColumnDefinition<Q, RDPs, FunctionColumns>>;
|
|
1188
|
-
/**
|
|
1189
|
-
* The object set the table resolved to (filter / ordering / unions applied,
|
|
1190
|
-
* derived properties included). Rows are loaded by paginating this set.
|
|
1191
|
-
*/
|
|
1192
|
-
objectSet: ObjectSet<Q, RDPs> | undefined;
|
|
1193
|
-
/** Page size for chunking function-column queries across loaded rows. */
|
|
1194
|
-
pageSize?: number;
|
|
1195
|
-
/**
|
|
1196
|
-
* Total number of objects in the object set, as reported by the
|
|
1197
|
-
* underlying list payload. Used to fail fast when `getSnapshot` is called
|
|
1198
|
-
* with a `rowLimit` lower than the row count.
|
|
1199
|
-
*/
|
|
1200
|
-
totalCount: string | undefined;
|
|
1201
|
-
orderBy: OrderBy<Q> | undefined;
|
|
1202
|
-
}
|
|
1203
|
-
/**
|
|
1204
|
-
* Builds the {@link ObjectTableHandle} exposed via `ObjectTable`'s `tableRef`.
|
|
1205
|
-
*
|
|
1206
|
-
* `getSnapshot` reads the table's currently visible columns to decide what to
|
|
1207
|
-
* export, rejects up front when the set's `totalCount` exceeds `rowLimit`,
|
|
1208
|
-
* otherwise paginates the entire resolved object set, and resolves
|
|
1209
|
-
* function-backed column values for the loaded rows.
|
|
1210
|
-
*/
|
|
1211
|
-
declare function useObjectTableSnapshot<Q extends ObjectOrInterfaceDefinition, RDPs extends Record<string, SimplePropertyDef>, FunctionColumns extends Record<string, QueryDefinition<{}>>>({ objectOrInterfaceType, table, columnDefinitions, objectSet, pageSize, totalCount, orderBy, }: UseObjectTableSnapshotProps<Q, RDPs, FunctionColumns>): ObjectTableHandle<Q, RDPs>;
|
|
1212
|
-
|
|
1213
|
-
interface PopoverPosition {
|
|
1214
|
-
left: number;
|
|
1215
|
-
top: number;
|
|
1216
|
-
width: number;
|
|
1217
|
-
}
|
|
1218
|
-
interface UseCellContextMenuProps {
|
|
1219
|
-
tdRef: RefObject<HTMLTableCellElement>;
|
|
1220
|
-
}
|
|
1221
|
-
interface UseCellContextMenuResult {
|
|
1222
|
-
isContextMenuOpen: boolean;
|
|
1223
|
-
handleOpenContextMenu: MouseEventHandler<HTMLTableCellElement>;
|
|
1224
|
-
handleCloseContextMenu: () => void;
|
|
1225
|
-
popoverPosition: PopoverPosition | null;
|
|
1226
|
-
}
|
|
1227
|
-
declare const useCellContextMenu: ({ tdRef, }: UseCellContextMenuProps) => UseCellContextMenuResult;
|
|
1228
|
-
|
|
1
|
+
import * as Api from '@osdk/api';
|
|
2
|
+
import * as Table from '@tanstack/react-table';
|
|
3
|
+
import { AsyncCellData as AsyncCellData$1, BaseTable as BaseTable$1, BaseTableProps as BaseTableProps$1, CellEditInfo as CellEditInfo$1, ColumnConfigDialog as ColumnConfigDialog$1, ColumnConfigDialogProps as ColumnConfigDialogProps$1, ColumnConfigOptions as ColumnConfigOptions$1, ColumnDefinition as ColumnDefinition$1, ColumnDefinitionLocator as ColumnDefinitionLocator$1, CustomColumnLocator as CustomColumnLocator$1, EditFieldConfig as EditFieldConfig$1, EditModeState as EditModeState$1, EditableConfig as EditableConfig$1, FunctionColumnData as FunctionColumnData$1, FunctionColumnLocator as FunctionColumnLocator$1, LoadedObjectsChange as LoadedObjectsChange$1, LoadingCell as LoadingCell$1, LoadingCellContent as LoadingCellContent$1, MultiColumnSortDialog as MultiColumnSortDialog$1, MultiColumnSortDialogProps as MultiColumnSortDialogProps$1, ObjectSetOptions as ObjectSetOptions$1, ObjectTable as ObjectTable$1, ObjectTableDataColumn as ObjectTableDataColumn$1, ObjectTableDataRow as ObjectTableDataRow$1, ObjectTableHandle as ObjectTableHandle$1, ObjectTableProps as ObjectTableProps$1, ObjectTableSnapshot as ObjectTableSnapshot$1, ObjectTableSnapshotOptions as ObjectTableSnapshotOptions$1, OrderBy as OrderBy$1, PopoverPosition as PopoverPosition$1, PropertyColumnLocator as PropertyColumnLocator$1, RdpColumnLocator as RdpColumnLocator$1, RowSelectionChange as RowSelectionChange$1, SortColumnItem as SortColumnItem$1, UseCellContextMenuProps as UseCellContextMenuProps$1, UseCellContextMenuResult as UseCellContextMenuResult$1, UseColumnDefsResult as UseColumnDefsResult$1, UseColumnPinningProps as UseColumnPinningProps$1, UseColumnPinningResult as UseColumnPinningResult$1, UseColumnResizeProps as UseColumnResizeProps$1, UseColumnResizeResult as UseColumnResizeResult$1, UseColumnVisibilityProps as UseColumnVisibilityProps$1, UseColumnVisibilityResult as UseColumnVisibilityResult$1, UseEditableTableProps as UseEditableTableProps$1, UseFocusedRowProps as UseFocusedRowProps$1, UseFocusedRowResult as UseFocusedRowResult$1, UseFunctionColumnsDataProps as UseFunctionColumnsDataProps$1, UseLoadedObjectsChangedProps as UseLoadedObjectsChangedProps$1, UseObjectTableDataProps as UseObjectTableDataProps$1, UseObjectTableDataResult as UseObjectTableDataResult$1, UseObjectTableSnapshotProps as UseObjectTableSnapshotProps$1, UseRowSelectionChange as UseRowSelectionChange$1, UseRowSelectionProps as UseRowSelectionProps$1, UseRowSelectionResult as UseRowSelectionResult$1, UseSelectionColumnProps as UseSelectionColumnProps$1, UseTableSortingProps as UseTableSortingProps$1, UseTableSortingResult as UseTableSortingResult$1, useCellContextMenu as useCellContextMenu$1, useColumnDefs as useColumnDefs$1, useColumnPinning as useColumnPinning$1, useColumnResize as useColumnResize$1, useColumnVisibility as useColumnVisibility$1, useEditableTable as useEditableTable$1, useFocusedRow as useFocusedRow$1, useFunctionColumnsData as useFunctionColumnsData$1, useLoadedObjectsChanged as useLoadedObjectsChanged$1, useObjectTableData as useObjectTableData$1, useObjectTableSnapshot as useObjectTableSnapshot$1, useRowSelection as useRowSelection$1, useSelectionColumn as useSelectionColumn$1, useTableSorting as useTableSorting$1 } from '../object-table.cjs';
|
|
4
|
+
import 'react';
|
|
5
|
+
import '@osdk/client/observable';
|
|
6
|
+
import '@osdk/react';
|
|
7
|
+
|
|
8
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
1229
9
|
declare const ObjectTable: typeof ObjectTable$1;
|
|
10
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
11
|
+
type ColumnDefinition<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}, FunctionColumns extends Record<string, Api.QueryDefinition<{}>> = Record<string, never>> = ColumnDefinition$1<Q, RDPs, FunctionColumns>;
|
|
12
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
13
|
+
type ColumnDefinitionLocator<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}, FunctionColumns extends Record<string, Api.QueryDefinition<{}>> = Record<string, never>> = ColumnDefinitionLocator$1<Q, RDPs, FunctionColumns>;
|
|
14
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
15
|
+
type CustomColumnLocator = CustomColumnLocator$1;
|
|
16
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
17
|
+
type EditFieldConfig<TData = unknown> = EditFieldConfig$1<TData>;
|
|
18
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
19
|
+
type FunctionColumnLocator<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}, FunctionColumns extends Record<string, Api.QueryDefinition<{}>> = Record<string, never>> = FunctionColumnLocator$1<Q, RDPs, FunctionColumns>;
|
|
20
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
21
|
+
type LoadedObjectsChange<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}> = LoadedObjectsChange$1<Q, RDPs>;
|
|
22
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
23
|
+
type ObjectTableDataColumn = ObjectTableDataColumn$1;
|
|
24
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
25
|
+
type ObjectTableDataRow<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}> = ObjectTableDataRow$1<Q, RDPs>;
|
|
26
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
27
|
+
type ObjectTableHandle<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}> = ObjectTableHandle$1<Q, RDPs>;
|
|
28
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
29
|
+
type ObjectTableProps<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}, FunctionColumns extends Record<string, Api.QueryDefinition<{}>> = Record<string, never>> = ObjectTableProps$1<Q, RDPs, FunctionColumns>;
|
|
30
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
31
|
+
type ObjectTableSnapshot<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}> = ObjectTableSnapshot$1<Q, RDPs>;
|
|
32
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
33
|
+
type ObjectTableSnapshotOptions = ObjectTableSnapshotOptions$1;
|
|
34
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
35
|
+
type PropertyColumnLocator<Q extends Api.ObjectOrInterfaceDefinition> = PropertyColumnLocator$1<Q>;
|
|
36
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
37
|
+
type RdpColumnLocator<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}> = RdpColumnLocator$1<Q, RDPs>;
|
|
38
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
39
|
+
type CellEditInfo<TData extends Table.RowData = unknown, CellValue = unknown> = CellEditInfo$1<TData, CellValue>;
|
|
40
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
41
|
+
type BaseTableProps<TData extends Table.RowData> = BaseTableProps$1<TData>;
|
|
42
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
43
|
+
declare const BaseTable: typeof BaseTable$1;
|
|
44
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
45
|
+
declare const ColumnConfigDialog: typeof ColumnConfigDialog$1;
|
|
46
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
47
|
+
type ColumnConfigDialogProps = ColumnConfigDialogProps$1;
|
|
48
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
49
|
+
type ColumnConfigOptions = ColumnConfigOptions$1;
|
|
50
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
51
|
+
declare const MultiColumnSortDialog: typeof MultiColumnSortDialog$1;
|
|
52
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
53
|
+
type MultiColumnSortDialogProps = MultiColumnSortDialogProps$1;
|
|
54
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
55
|
+
type SortColumnItem = SortColumnItem$1;
|
|
56
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
57
|
+
declare const LoadingCell: typeof LoadingCell$1;
|
|
58
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
59
|
+
declare const LoadingCellContent: typeof LoadingCellContent$1;
|
|
60
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
61
|
+
type FunctionColumnData = FunctionColumnData$1;
|
|
62
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
63
|
+
declare const useFunctionColumnsData: typeof useFunctionColumnsData$1;
|
|
64
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
65
|
+
type UseFunctionColumnsDataProps<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}, FunctionColumns extends Record<string, Api.QueryDefinition<{}>> = Record<string, never>> = UseFunctionColumnsDataProps$1<Q, RDPs, FunctionColumns>;
|
|
66
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
67
|
+
declare const useObjectTableData: typeof useObjectTableData$1;
|
|
68
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
69
|
+
type UseObjectTableDataProps<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}, FunctionColumns extends Record<string, Api.QueryDefinition<{}>> = Record<string, never>> = UseObjectTableDataProps$1<Q, RDPs, FunctionColumns>;
|
|
70
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
71
|
+
type UseObjectTableDataResult<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}> = UseObjectTableDataResult$1<Q, RDPs>;
|
|
72
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
73
|
+
declare const useColumnDefs: typeof useColumnDefs$1;
|
|
74
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
75
|
+
type UseColumnDefsResult<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}> = UseColumnDefsResult$1<Q, RDPs>;
|
|
76
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
77
|
+
declare const useSelectionColumn: typeof useSelectionColumn$1;
|
|
78
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
79
|
+
type UseSelectionColumnProps = UseSelectionColumnProps$1;
|
|
80
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
81
|
+
declare const useColumnPinning: typeof useColumnPinning$1;
|
|
82
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
83
|
+
type UseColumnPinningProps<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}, FunctionColumns extends Record<string, Api.QueryDefinition<{}>> = Record<string, never>> = UseColumnPinningProps$1<Q, RDPs, FunctionColumns>;
|
|
84
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
85
|
+
type UseColumnPinningResult = UseColumnPinningResult$1;
|
|
86
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
87
|
+
declare const useColumnResize: typeof useColumnResize$1;
|
|
88
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
89
|
+
type UseColumnResizeProps = UseColumnResizeProps$1;
|
|
90
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
91
|
+
type UseColumnResizeResult = UseColumnResizeResult$1;
|
|
92
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
93
|
+
declare const useColumnVisibility: typeof useColumnVisibility$1;
|
|
94
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
95
|
+
type UseColumnVisibilityProps<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}, FunctionColumns extends Record<string, Api.QueryDefinition<{}>> = Record<string, never>, TData = unknown> = UseColumnVisibilityProps$1<Q, RDPs, FunctionColumns, TData>;
|
|
96
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
97
|
+
type UseColumnVisibilityResult = UseColumnVisibilityResult$1;
|
|
98
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
99
|
+
declare const useFocusedRow: typeof useFocusedRow$1;
|
|
100
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
101
|
+
type UseFocusedRowProps<TData> = UseFocusedRowProps$1<TData>;
|
|
102
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
103
|
+
type UseFocusedRowResult<TData> = UseFocusedRowResult$1<TData>;
|
|
104
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
105
|
+
declare const useLoadedObjectsChanged: typeof useLoadedObjectsChanged$1;
|
|
106
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
107
|
+
type UseLoadedObjectsChangedProps<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}> = UseLoadedObjectsChangedProps$1<Q, RDPs>;
|
|
108
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
109
|
+
declare const useRowSelection: typeof useRowSelection$1;
|
|
110
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
111
|
+
type UseRowSelectionChange<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}> = UseRowSelectionChange$1<Q, RDPs>;
|
|
112
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
113
|
+
type UseRowSelectionProps<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}> = UseRowSelectionProps$1<Q, RDPs>;
|
|
114
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
115
|
+
type UseRowSelectionResult = UseRowSelectionResult$1;
|
|
116
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
117
|
+
declare const useTableSorting: typeof useTableSorting$1;
|
|
118
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
119
|
+
type UseTableSortingProps<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}, FunctionColumns extends Record<string, Api.QueryDefinition<{}>> = Record<string, never>> = UseTableSortingProps$1<Q, RDPs, FunctionColumns>;
|
|
120
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
121
|
+
type UseTableSortingResult<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}> = UseTableSortingResult$1<Q, RDPs>;
|
|
122
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
123
|
+
declare const useEditableTable: typeof useEditableTable$1;
|
|
124
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
125
|
+
type UseEditableTableProps<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}, FunctionColumns extends Record<string, Api.QueryDefinition<{}>> = Record<string, never>> = UseEditableTableProps$1<Q, RDPs, FunctionColumns>;
|
|
126
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
127
|
+
declare const useObjectTableSnapshot: typeof useObjectTableSnapshot$1;
|
|
128
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
129
|
+
type UseObjectTableSnapshotProps<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef>, FunctionColumns extends Record<string, Api.QueryDefinition<{}>>> = UseObjectTableSnapshotProps$1<Q, RDPs, FunctionColumns>;
|
|
130
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
131
|
+
declare const useCellContextMenu: typeof useCellContextMenu$1;
|
|
132
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
133
|
+
type UseCellContextMenuProps = UseCellContextMenuProps$1;
|
|
134
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
135
|
+
type UseCellContextMenuResult = UseCellContextMenuResult$1;
|
|
136
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
137
|
+
type PopoverPosition = PopoverPosition$1;
|
|
138
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
139
|
+
type ObjectSetOptions<Q extends Api.ObjectOrInterfaceDefinition> = ObjectSetOptions$1<Q>;
|
|
140
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
141
|
+
type RowSelectionChange<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}> = RowSelectionChange$1<Q, RDPs>;
|
|
142
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
143
|
+
type AsyncCellData = AsyncCellData$1;
|
|
144
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
145
|
+
type EditableConfig<TData extends Table.RowData = unknown, CellValue = unknown> = EditableConfig$1<TData, CellValue>;
|
|
146
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
147
|
+
type EditModeState = EditModeState$1;
|
|
148
|
+
/** @deprecated Import from `@osdk/react-components/object-table` instead. */
|
|
149
|
+
type OrderBy<Q extends Api.ObjectOrInterfaceDefinition, RDPs extends Record<string, Api.SimplePropertyDef> = {}> = OrderBy$1<Q, RDPs>;
|
|
1230
150
|
|
|
1231
151
|
export { type AsyncCellData, BaseTable, type BaseTableProps, type CellEditInfo, ColumnConfigDialog, type ColumnConfigDialogProps, type ColumnConfigOptions, type ColumnDefinition, type ColumnDefinitionLocator, type CustomColumnLocator, type EditFieldConfig, type EditModeState, type EditableConfig, type FunctionColumnData, type FunctionColumnLocator, type LoadedObjectsChange, LoadingCell, LoadingCellContent, MultiColumnSortDialog, type MultiColumnSortDialogProps, type ObjectSetOptions, ObjectTable, type ObjectTableDataColumn, type ObjectTableDataRow, type ObjectTableHandle, type ObjectTableProps, type ObjectTableSnapshot, type ObjectTableSnapshotOptions, type OrderBy, type PopoverPosition, type PropertyColumnLocator, type RdpColumnLocator, type RowSelectionChange, type SortColumnItem, type UseCellContextMenuProps, type UseCellContextMenuResult, type UseColumnDefsResult, type UseColumnPinningProps, type UseColumnPinningResult, type UseColumnResizeProps, type UseColumnResizeResult, type UseColumnVisibilityProps, type UseColumnVisibilityResult, type UseEditableTableProps, type UseFocusedRowProps, type UseFocusedRowResult, type UseFunctionColumnsDataProps, type UseLoadedObjectsChangedProps, type UseObjectTableDataProps, type UseObjectTableDataResult, type UseObjectTableSnapshotProps, type UseRowSelectionChange, type UseRowSelectionProps, type UseRowSelectionResult, type UseSelectionColumnProps, type UseTableSortingProps, type UseTableSortingResult, useCellContextMenu, useColumnDefs, useColumnPinning, useColumnResize, useColumnVisibility, useEditableTable, useFocusedRow, useFunctionColumnsData, useLoadedObjectsChanged, useObjectTableData, useObjectTableSnapshot, useRowSelection, useSelectionColumn, useTableSorting };
|