@osdk/react-components 0.34.0 → 0.34.1-main-e39a72892d538f3130e2cd51cee05d83d11fa493
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/build/browser/action-form/ActionForm.js.map +1 -1
- package/build/browser/action-form/ActionFormApi.js.map +1 -1
- package/build/browser/action-form/BaseForm.js +3 -3
- package/build/browser/action-form/BaseForm.js.map +1 -1
- package/build/browser/action-form/FormField.js.map +1 -1
- package/build/browser/action-form/FormFieldApi.js.map +1 -1
- package/build/browser/action-form/FormHeader.js.map +1 -1
- package/build/browser/action-form/FormSection.js.map +1 -1
- package/build/browser/action-form/fields/AsyncDropdownField.js +1 -1
- package/build/browser/action-form/fields/AsyncDropdownField.js.map +1 -1
- package/build/browser/action-form/fields/CustomField.js.map +1 -1
- package/build/browser/action-form/fields/DropdownField.js +2 -2
- package/build/browser/action-form/fields/DropdownField.js.map +1 -1
- package/build/browser/action-form/fields/FieldBridge.js.map +1 -1
- package/build/browser/action-form/fields/FilePickerField.js.map +1 -1
- package/build/browser/action-form/fields/FormFieldRenderer.js.map +1 -1
- package/build/browser/action-form/fields/NumberInputField.js.map +1 -1
- package/build/browser/action-form/fields/ObjectSelectField.js.map +1 -1
- package/build/browser/action-form/fields/ObjectSetField.js.map +1 -1
- package/build/browser/action-form/fields/RadioButtonsField.js.map +1 -1
- package/build/browser/action-form/fields/SwitchField.js.map +1 -1
- package/build/browser/action-form/fields/TextAreaField.js.map +1 -1
- package/build/browser/action-form/fields/TextInputField.js.map +1 -1
- package/build/browser/action-form/utils/coerceFieldValue.js.map +1 -1
- package/build/browser/action-form/utils/extractValidationRules.js.map +1 -1
- package/build/browser/action-form/utils/getDefaultFieldDefinitions.js.map +1 -1
- package/build/browser/aip-agent-chat/AipAgentChat.js.map +1 -1
- package/build/browser/aip-agent-chat/BaseAipAgentChat.js +1 -1
- package/build/browser/aip-agent-chat/BaseAipAgentChat.js.map +1 -1
- package/build/browser/aip-agent-chat/components/AipAgentChatComposer.js.map +1 -1
- package/build/browser/aip-agent-chat/components/AipAgentChatLoader.js.map +1 -1
- package/build/browser/aip-agent-chat/components/AipAgentChatMessage.js.map +1 -1
- package/build/browser/aip-agent-chat/components/AipAgentChatMessageList.js +1 -1
- package/build/browser/aip-agent-chat/components/AipAgentChatMessageList.js.map +1 -1
- package/build/browser/aip-agent-chat/components/AipAgentChatModelPicker.js.map +1 -1
- package/build/browser/aip-agent-chat/hooks/useChatAutoScroll.js.map +1 -1
- package/build/browser/base-components/action-button/ActionButton.js.map +1 -1
- package/build/browser/base-components/callout/Callout.js.map +1 -1
- package/build/browser/base-components/checkbox/Checkbox.js.map +1 -1
- package/build/browser/base-components/combobox/Combobox.js.map +1 -1
- package/build/browser/base-components/dialog/Dialog.js.map +1 -1
- package/build/browser/base-components/draggable-list/DraggableList.js +1 -1
- package/build/browser/base-components/draggable-list/DraggableList.js.map +1 -1
- package/build/browser/base-components/icon/BlueprintIcon.js.map +1 -1
- package/build/browser/base-components/search-bar/SearchBar.js.map +1 -1
- package/build/browser/base-components/searchable-menu/SearchableMenu.js.map +1 -1
- package/build/browser/base-components/select/Select.js.map +1 -1
- package/build/browser/base-components/skeleton/SkeletonBar.js.map +1 -1
- package/build/browser/base-components/switch/Switch.js.map +1 -1
- package/build/browser/base-components/tooltip/Tooltip.js.map +1 -1
- package/build/browser/cbac-picker/CbacBanner.js.map +1 -1
- package/build/browser/cbac-picker/CbacBannerPopover.js.map +1 -1
- package/build/browser/cbac-picker/CbacPicker.js.map +1 -1
- package/build/browser/cbac-picker/CbacPickerDialog.js.map +1 -1
- package/build/browser/cbac-picker/base/BaseCbacBanner.js.map +1 -1
- package/build/browser/cbac-picker/base/BaseCbacBannerPopover.js.map +1 -1
- package/build/browser/cbac-picker/base/BaseCbacPicker.js +1 -1
- package/build/browser/cbac-picker/base/BaseCbacPicker.js.map +1 -1
- package/build/browser/cbac-picker/base/BaseCbacPickerDialog.js.map +1 -1
- package/build/browser/cbac-picker/base/CategoryMarkingGroup.js +1 -1
- package/build/browser/cbac-picker/base/CategoryMarkingGroup.js.map +1 -1
- package/build/browser/cbac-picker/base/CbacPickerDialogFooter.js.map +1 -1
- package/build/browser/cbac-picker/base/InfoBanner.js.map +1 -1
- package/build/browser/cbac-picker/base/MarkingButton.js +1 -1
- package/build/browser/cbac-picker/base/MarkingButton.js.map +1 -1
- package/build/browser/cbac-picker/base/MaxClassificationField.js.map +1 -1
- package/build/browser/cbac-picker/base/OverflowButton.js +1 -1
- package/build/browser/cbac-picker/base/OverflowButton.js.map +1 -1
- package/build/browser/cbac-picker/base/OverflowItem.js +1 -1
- package/build/browser/cbac-picker/base/OverflowItem.js.map +1 -1
- package/build/browser/cbac-picker/base/ValidationWarning.js.map +1 -1
- package/build/browser/cbac-picker/base/selectionStateHelpers.js.map +1 -1
- package/build/browser/cbac-picker/useCbacPickerState.js.map +1 -1
- package/build/browser/cbac-picker/useCbacSelection.js.map +1 -1
- package/build/browser/cbac-picker/useConstraintCallout.js.map +1 -1
- package/build/browser/cbac-picker/utils/cbacPickerUtils.js.map +1 -1
- package/build/browser/cbac-picker/utils/errorMessages.js.map +1 -1
- package/build/browser/cbac-picker/utils/selectionLogic.js.map +1 -1
- package/build/browser/cbac-picker/utils/validationMessages.js.map +1 -1
- package/build/browser/document-viewer/DocumentViewer.js +1 -1
- package/build/browser/document-viewer/DocumentViewer.js.map +1 -1
- package/build/browser/document-viewer/DocumentViewerApi.js.map +1 -1
- package/build/browser/document-viewer/TiffDocumentViewer.js +1 -1
- package/build/browser/document-viewer/TiffDocumentViewer.js.map +1 -1
- package/build/browser/document-viewer/hooks/useTiffToPdf.js.map +1 -1
- package/build/browser/email-viewer/BaseEmailViewer.js.map +1 -1
- package/build/browser/email-viewer/EmailViewer.js +1 -1
- package/build/browser/email-viewer/EmailViewer.js.map +1 -1
- package/build/browser/email-viewer/EmailViewerApi.js.map +1 -1
- package/build/browser/email-viewer/parseEmail.js.map +1 -1
- package/build/browser/excel-viewer/BaseExcelViewer.js +1 -0
- package/build/browser/excel-viewer/BaseExcelViewer.js.map +1 -1
- package/build/browser/excel-viewer/ExcelViewer.js +1 -1
- package/build/browser/excel-viewer/ExcelViewer.js.map +1 -1
- package/build/browser/excel-viewer/ExcelViewerApi.js.map +1 -1
- package/build/browser/excel-viewer/parseSpreadsheet.js.map +1 -1
- package/build/browser/filter-list/FilterInput.js.map +1 -1
- package/build/browser/filter-list/FilterList.js.map +1 -1
- package/build/browser/filter-list/FilterListApi.js.map +1 -1
- package/build/browser/filter-list/FilterListItemApi.js.map +1 -1
- package/build/browser/filter-list/base/AddFilterPopover.js +1 -1
- package/build/browser/filter-list/base/AddFilterPopover.js.map +1 -1
- package/build/browser/filter-list/base/BaseFilterList.js +1 -1
- package/build/browser/filter-list/base/BaseFilterList.js.map +1 -1
- package/build/browser/filter-list/base/BaseFilterListApi.js.map +1 -1
- package/build/browser/filter-list/base/ExcludeDropdown.js +1 -1
- package/build/browser/filter-list/base/ExcludeDropdown.js.map +1 -1
- package/build/browser/filter-list/base/FilterInputExcludeRow.js.map +1 -1
- package/build/browser/filter-list/base/FilterListContent.js +1 -1
- package/build/browser/filter-list/base/FilterListContent.js.map +1 -1
- package/build/browser/filter-list/base/FilterListHeader.js.map +1 -1
- package/build/browser/filter-list/base/FilterListItem.js.map +1 -1
- package/build/browser/filter-list/base/FilterPopover.js.map +1 -1
- package/build/browser/filter-list/base/SortableFilterListItem.js.map +1 -1
- package/build/browser/filter-list/base/inputs/ContainsTextInput.js.map +1 -1
- package/build/browser/filter-list/base/inputs/DateRangeHistogramInput.js.map +1 -1
- package/build/browser/filter-list/base/inputs/EmptyStringLabel.js +1 -0
- package/build/browser/filter-list/base/inputs/EmptyStringLabel.js.map +1 -1
- package/build/browser/filter-list/base/inputs/HistogramTooltip.js.map +1 -1
- package/build/browser/filter-list/base/inputs/ListogramInput.js +2 -2
- package/build/browser/filter-list/base/inputs/ListogramInput.js.map +1 -1
- package/build/browser/filter-list/base/inputs/ListogramSkeleton.js.map +1 -1
- package/build/browser/filter-list/base/inputs/MultiDateInput.js.map +1 -1
- package/build/browser/filter-list/base/inputs/MultiSelectDropdownLayout.js.map +1 -1
- package/build/browser/filter-list/base/inputs/MultiSelectInlineLayout.js.map +1 -1
- package/build/browser/filter-list/base/inputs/MultiSelectInput.js +2 -2
- package/build/browser/filter-list/base/inputs/MultiSelectInput.js.map +1 -1
- package/build/browser/filter-list/base/inputs/NoValueLabel.js.map +1 -1
- package/build/browser/filter-list/base/inputs/NullValueWrapper.js.map +1 -1
- package/build/browser/filter-list/base/inputs/NumberRangeInput.js.map +1 -1
- package/build/browser/filter-list/base/inputs/OptionLabel.js.map +1 -1
- package/build/browser/filter-list/base/inputs/RangeInput.js +1 -1
- package/build/browser/filter-list/base/inputs/RangeInput.js.map +1 -1
- package/build/browser/filter-list/base/inputs/SelectInputSkeleton.js.map +1 -1
- package/build/browser/filter-list/base/inputs/SingleDateInput.js.map +1 -1
- package/build/browser/filter-list/base/inputs/SingleSelectInput.js +1 -1
- package/build/browser/filter-list/base/inputs/SingleSelectInput.js.map +1 -1
- package/build/browser/filter-list/base/inputs/TextTagsInput.js.map +1 -1
- package/build/browser/filter-list/base/inputs/TimelineInput.js.map +1 -1
- package/build/browser/filter-list/base/inputs/ToggleInput.js.map +1 -1
- package/build/browser/filter-list/base/inputs/comboboxFilter.js.map +1 -1
- package/build/browser/filter-list/base/inputs/createDateHistogramBuckets.js.map +1 -1
- package/build/browser/filter-list/base/inputs/createHistogramBuckets.js.map +1 -1
- package/build/browser/filter-list/hooks/useDualScopeAggregation.js.map +1 -1
- package/build/browser/filter-list/hooks/useFilterListState.js.map +1 -1
- package/build/browser/filter-list/hooks/useFilterPropertyAggregation.js.map +1 -1
- package/build/browser/filter-list/hooks/useFilterVisibility.js.map +1 -1
- package/build/browser/filter-list/hooks/usePropertyAggregation.js.map +1 -1
- package/build/browser/filter-list/inputs/ContainsTextFilterInput.js.map +1 -1
- package/build/browser/filter-list/inputs/DateRangeFilterInput.js.map +1 -1
- package/build/browser/filter-list/inputs/LinkedPropertyInput.js +1 -1
- package/build/browser/filter-list/inputs/LinkedPropertyInput.js.map +1 -1
- package/build/browser/filter-list/inputs/ListogramFilterInput.js.map +1 -1
- package/build/browser/filter-list/inputs/MultiDateFilterInput.js.map +1 -1
- package/build/browser/filter-list/inputs/MultiSelectFilterInput.js.map +1 -1
- package/build/browser/filter-list/inputs/NumberRangeFilterInput.js.map +1 -1
- package/build/browser/filter-list/inputs/PropertyFilterInput.js.map +1 -1
- package/build/browser/filter-list/inputs/SingleDateFilterInput.js.map +1 -1
- package/build/browser/filter-list/inputs/SingleSelectFilterInput.js.map +1 -1
- package/build/browser/filter-list/inputs/StaticValuesFilterInput.js.map +1 -1
- package/build/browser/filter-list/inputs/TextTagsFilterInput.js.map +1 -1
- package/build/browser/filter-list/inputs/TimelineFilterInput.js.map +1 -1
- package/build/browser/filter-list/inputs/ToggleFilterInput.js.map +1 -1
- package/build/browser/filter-list/types/CustomRendererTypes.js.map +1 -1
- package/build/browser/filter-list/types/KeywordSearchTypes.js.map +1 -1
- package/build/browser/filter-list/types/LinkedFilterTypes.js.map +1 -1
- package/build/browser/filter-list/types/StaticValuesTypes.js.map +1 -1
- package/build/browser/filter-list/utils/aggregationHelpers.js.map +1 -1
- package/build/browser/filter-list/utils/coerceFilterValue.js.map +1 -1
- package/build/browser/filter-list/utils/emptyFilterDisplayState.js.map +1 -1
- package/build/browser/filter-list/utils/filterStateSerialization.js.map +1 -1
- package/build/browser/filter-list/utils/filterStateToWhereClause.js.map +1 -1
- package/build/browser/filter-list/utils/filterValues.js.map +1 -1
- package/build/browser/filter-list/utils/getFilterKey.js.map +1 -1
- package/build/browser/filter-list/utils/getFilterLabel.js.map +1 -1
- package/build/browser/filter-list/utils/narrowObjectSet.js.map +1 -1
- package/build/browser/filter-list/utils/summarizeFilterValue.js.map +1 -1
- package/build/browser/images/image-viewer/BaseImageViewer.js.map +1 -1
- package/build/browser/images/image-viewer/ImageViewer.js.map +1 -1
- package/build/browser/images/image-viewer/ImageViewerApi.js.map +1 -1
- package/build/browser/images/tiff-renderer/TiffRenderer.js +1 -0
- package/build/browser/images/tiff-renderer/TiffRenderer.js.map +1 -1
- package/build/browser/images/tiff-renderer/TiffViewerMedia.js.map +1 -1
- package/build/browser/markdown-renderer/MarkdownRenderer.js.map +1 -1
- package/build/browser/markdown-renderer/MarkdownViewerMedia.js.map +1 -1
- package/build/browser/object-table/CellContextMenu.js.map +1 -1
- package/build/browser/object-table/ColumnConfigDialog.js.map +1 -1
- package/build/browser/object-table/DefaultCellRenderer.js +4 -3
- package/build/browser/object-table/DefaultCellRenderer.js.map +1 -1
- package/build/browser/object-table/EditableCell.js +1 -1
- package/build/browser/object-table/EditableCell.js.map +1 -1
- package/build/browser/object-table/LoadingCell.js.map +1 -1
- package/build/browser/object-table/LoadingRow.js +1 -1
- package/build/browser/object-table/LoadingRow.js.map +1 -1
- package/build/browser/object-table/LoadingStateTable.js +3 -3
- package/build/browser/object-table/LoadingStateTable.js.map +1 -1
- package/build/browser/object-table/MultiColumnSortDialog.js +1 -1
- package/build/browser/object-table/MultiColumnSortDialog.js.map +1 -1
- package/build/browser/object-table/NonIdealState.js.map +1 -1
- package/build/browser/object-table/ObjectTable.js.map +1 -1
- package/build/browser/object-table/ObjectTableApi.js.map +1 -1
- package/build/browser/object-table/SelectionCells.js.map +1 -1
- package/build/browser/object-table/SortableItemsList.js.map +1 -1
- package/build/browser/object-table/Table.js +1 -1
- package/build/browser/object-table/Table.js.map +1 -1
- package/build/browser/object-table/TableBody.js +1 -1
- package/build/browser/object-table/TableBody.js.map +1 -1
- package/build/browser/object-table/TableCell.js +1 -1
- package/build/browser/object-table/TableCell.js.map +1 -1
- package/build/browser/object-table/TableEditContainer.js.map +1 -1
- package/build/browser/object-table/TableHeader.js +1 -1
- package/build/browser/object-table/TableHeader.js.map +1 -1
- package/build/browser/object-table/TableHeaderContent.js.map +1 -1
- package/build/browser/object-table/TableHeaderWithPopover.js.map +1 -1
- package/build/browser/object-table/TableRow.js.map +1 -1
- package/build/browser/object-table/components/AsyncValueCell.js.map +1 -1
- package/build/browser/object-table/components/CbacMarkingCell.js.map +1 -1
- package/build/browser/object-table/components/DatePickerCellField.js +1 -1
- package/build/browser/object-table/components/DatePickerCellField.js.map +1 -1
- package/build/browser/object-table/components/DropdownCellField.js +1 -1
- package/build/browser/object-table/components/DropdownCellField.js.map +1 -1
- package/build/browser/object-table/components/MandatoryMarkingCell.js.map +1 -1
- package/build/browser/object-table/components/ReadonlyDisplayCell.js.map +1 -1
- package/build/browser/object-table/components/TextInputCellField.js.map +1 -1
- package/build/browser/object-table/hooks/useCellContextMenu.js.map +1 -1
- package/build/browser/object-table/hooks/useColumnDefs.js.map +1 -1
- package/build/browser/object-table/hooks/useColumnPinning.js.map +1 -1
- package/build/browser/object-table/hooks/useColumnResize.js.map +1 -1
- package/build/browser/object-table/hooks/useColumnVisibility.js.map +1 -1
- package/build/browser/object-table/hooks/useEditableTable.js.map +1 -1
- package/build/browser/object-table/hooks/useFocusedRow.js.map +1 -1
- package/build/browser/object-table/hooks/useFunctionColumnsData.js.map +1 -1
- package/build/browser/object-table/hooks/useObjectTableData.js.map +1 -1
- package/build/browser/object-table/hooks/useObjectTableSnapshot.js.map +1 -1
- package/build/browser/object-table/hooks/useRowSelection.js.map +1 -1
- package/build/browser/object-table/hooks/useSelectionColumn.js.map +1 -1
- package/build/browser/object-table/hooks/useTableSorting.js.map +1 -1
- package/build/browser/object-table/utils/AsyncCellData.js.map +1 -1
- package/build/browser/object-table/utils/PortalTracker.js.map +1 -1
- package/build/browser/object-table/utils/deriveSelectionObjectSet.js.map +1 -1
- package/build/browser/object-table/utils/editableUtils.js.map +1 -1
- package/build/browser/object-table/utils/functionColumns.js.map +1 -1
- package/build/browser/object-table/utils/getColumnPinningStyles.js.map +1 -1
- package/build/browser/object-table/utils/getRowId.js.map +1 -1
- package/build/browser/object-table/utils/objectTableSnapshot.js.map +1 -1
- package/build/browser/object-table/utils/shouldShowEditableCell.js.map +1 -1
- package/build/browser/object-table/utils/types.js.map +1 -1
- package/build/browser/pdf-viewer/PdfRenderer.js.map +1 -1
- package/build/browser/pdf-viewer/PdfViewer.js.map +1 -1
- package/build/browser/pdf-viewer/PdfViewerContext.js.map +1 -1
- package/build/browser/pdf-viewer/components/PdfAnnotationOverlay.js.map +1 -1
- package/build/browser/pdf-viewer/components/PdfViewerAnnotationLayer.js.map +1 -1
- package/build/browser/pdf-viewer/components/PdfViewerContent.js +1 -1
- package/build/browser/pdf-viewer/components/PdfViewerContent.js.map +1 -1
- package/build/browser/pdf-viewer/components/PdfViewerOutlineSidebar.js +1 -1
- package/build/browser/pdf-viewer/components/PdfViewerOutlineSidebar.js.map +1 -1
- package/build/browser/pdf-viewer/components/PdfViewerSearchBar.js.map +1 -1
- package/build/browser/pdf-viewer/components/PdfViewerSidebar.js +1 -1
- package/build/browser/pdf-viewer/components/PdfViewerSidebar.js.map +1 -1
- package/build/browser/pdf-viewer/components/PdfViewerSidebarHeader.js.map +1 -1
- package/build/browser/pdf-viewer/components/PdfViewerThumbnail.js.map +1 -1
- package/build/browser/pdf-viewer/components/PdfViewerToolbar.js.map +1 -1
- package/build/browser/pdf-viewer/constants.js.map +1 -1
- package/build/browser/pdf-viewer/hooks/usePdfAnnotationPortals.js.map +1 -1
- package/build/browser/pdf-viewer/hooks/usePdfAnnotationsByPage.js.map +1 -1
- package/build/browser/pdf-viewer/hooks/usePdfDocument.js.map +1 -1
- package/build/browser/pdf-viewer/hooks/usePdfFormFields.js.map +1 -1
- package/build/browser/pdf-viewer/hooks/usePdfHighlightMode.js.map +1 -1
- package/build/browser/pdf-viewer/hooks/usePdfOutline.js.map +1 -1
- package/build/browser/pdf-viewer/hooks/usePdfViewer.js.map +1 -1
- package/build/browser/pdf-viewer/hooks/usePdfViewerCore.js.map +1 -1
- package/build/browser/pdf-viewer/hooks/usePdfViewerSearch.js.map +1 -1
- package/build/browser/pdf-viewer/hooks/usePdfViewerState.js.map +1 -1
- package/build/browser/pdf-viewer/hooks/usePdfViewerSync.js.map +1 -1
- package/build/browser/public/experimental/action-form.js.map +1 -1
- package/build/browser/public/experimental/cbac-picker.js.map +1 -1
- package/build/browser/public/experimental/document-viewer.js.map +1 -1
- package/build/browser/public/experimental/email-viewer.js.map +1 -1
- package/build/browser/public/experimental/excel-viewer.js.map +1 -1
- package/build/browser/public/experimental/filter-list.js.map +1 -1
- package/build/browser/public/experimental/image-viewer.js.map +1 -1
- package/build/browser/public/experimental/markdown-renderer.js.map +1 -1
- package/build/browser/public/experimental/object-table.js.map +1 -1
- package/build/browser/public/experimental/pdf-viewer.js.map +1 -1
- package/build/browser/public/experimental/tiff-renderer.js.map +1 -1
- package/build/browser/public/experimental/video-viewer.js.map +1 -1
- package/build/browser/public/experimental/xml-viewer.js.map +1 -1
- package/build/browser/shared/ErrorBoundary.js.map +1 -1
- package/build/browser/shared/PortalContainerContext.js.map +1 -1
- package/build/browser/shared/PortalDismissLayer.js.map +1 -1
- package/build/browser/shared/calendar/DateCalendar.js +1 -1
- package/build/browser/shared/calendar/DateCalendar.js.map +1 -1
- package/build/browser/shared/calendar/DatePicker.js +2 -2
- package/build/browser/shared/calendar/DatePicker.js.map +1 -1
- package/build/browser/shared/calendar/DateRangeCalendar.js.map +1 -1
- package/build/browser/shared/calendar/DateRangePicker.js +2 -2
- package/build/browser/shared/calendar/DateRangePicker.js.map +1 -1
- package/build/browser/shared/calendar/LazyDateCalendar.js.map +1 -1
- package/build/browser/shared/calendar/LazyDateRangeCalendar.js.map +1 -1
- package/build/browser/shared/calendar/TimePicker.js.map +1 -1
- package/build/browser/shared/calendar/calendarShared.js.map +1 -1
- package/build/browser/shared/calendar/useDateEditState.js.map +1 -1
- package/build/browser/shared/dateUtils.js.map +1 -1
- package/build/browser/shared/hooks/useAsyncAction.js.map +1 -1
- package/build/browser/shared/hooks/useDebouncedValue.js.map +1 -1
- package/build/browser/shared/hooks/useEventCallback.js.map +1 -1
- package/build/browser/shared/hooks/useInfiniteScroll.js.map +1 -1
- package/build/browser/shared/hooks/useMediaContents.js.map +1 -1
- package/build/browser/theme/OsdkThemeContext.js.map +1 -1
- package/build/browser/theme/OsdkThemeProvider.js.map +1 -1
- package/build/browser/theme/useOsdkTheme.js.map +1 -1
- package/build/browser/theme/useSystemTheme.js.map +1 -1
- package/build/browser/util/UserAgent.js +1 -1
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/browser/util/withOsdkMetrics.js.map +1 -1
- package/build/browser/video-viewer/BaseVideoViewer.js.map +1 -1
- package/build/browser/video-viewer/VideoViewer.js.map +1 -1
- package/build/browser/video-viewer/VideoViewerApi.js.map +1 -1
- package/build/browser/xml-viewer/BaseXmlViewer.js.map +1 -1
- package/build/browser/xml-viewer/XmlViewer.js.map +1 -1
- package/build/browser/xml-viewer/XmlViewerApi.js.map +1 -1
- package/build/cjs/{DateCalendar-OCDSESQR.cjs → DateCalendar-FCZXD24P.cjs} +6 -6
- package/build/cjs/{DateCalendar-OCDSESQR.cjs.map → DateCalendar-FCZXD24P.cjs.map} +1 -1
- package/build/cjs/{DateCalendar-FTW3OIEP.css → DateCalendar-VBZGPZ5P.css} +39 -39
- package/build/cjs/DateCalendar-VBZGPZ5P.css.map +1 -0
- package/build/cjs/{DateRangeCalendar-I4JHCZAK.css → DateRangeCalendar-2M2I5Q3Z.css} +39 -39
- package/build/cjs/DateRangeCalendar-2M2I5Q3Z.css.map +1 -0
- package/build/cjs/DateRangeCalendar-XN2ZWAFK.cjs +12 -0
- package/build/cjs/{DateRangeCalendar-PHC3VPW3.cjs.map → DateRangeCalendar-XN2ZWAFK.cjs.map} +1 -1
- package/build/cjs/{chunk-DA22W6ZO.cjs → chunk-BE226IHU.cjs} +8 -8
- package/build/cjs/chunk-BE226IHU.cjs.map +1 -0
- package/build/cjs/{chunk-XWT6S3FL.cjs → chunk-BFRUHBWM.cjs} +12 -12
- package/build/cjs/{chunk-XWT6S3FL.cjs.map → chunk-BFRUHBWM.cjs.map} +1 -1
- package/build/cjs/chunk-CXMIRPQU.cjs +11 -0
- package/build/cjs/{chunk-PYOEFNQH.cjs.map → chunk-CXMIRPQU.cjs.map} +1 -1
- package/build/cjs/{chunk-CASYBF4M.cjs → chunk-ENE2RWIL.cjs} +25 -23
- package/build/cjs/chunk-ENE2RWIL.cjs.map +1 -0
- package/build/cjs/{chunk-IHVPE5CD.cjs → chunk-G6AOIKDH.cjs} +66 -66
- package/build/cjs/chunk-G6AOIKDH.cjs.map +1 -0
- package/build/cjs/{chunk-U74WOMFV.cjs → chunk-GJ2KJKWI.cjs} +17 -17
- package/build/cjs/{chunk-U74WOMFV.cjs.map → chunk-GJ2KJKWI.cjs.map} +1 -1
- package/build/cjs/chunk-HBU5ZLVP.cjs +11 -0
- package/build/cjs/{chunk-F4JELV7M.cjs.map → chunk-HBU5ZLVP.cjs.map} +1 -1
- package/build/cjs/{chunk-KNZXFIIH.cjs → chunk-HWWTZKC5.cjs} +24 -24
- package/build/cjs/{chunk-KNZXFIIH.cjs.map → chunk-HWWTZKC5.cjs.map} +1 -1
- package/build/cjs/{chunk-YTDSW5OV.cjs → chunk-IHTYJU2F.cjs} +29 -28
- package/build/cjs/chunk-IHTYJU2F.cjs.map +1 -0
- package/build/cjs/{chunk-5KTGUKJT.cjs → chunk-JCN6P3YW.cjs} +4 -4
- package/build/cjs/{chunk-5KTGUKJT.cjs.map → chunk-JCN6P3YW.cjs.map} +1 -1
- package/build/cjs/{chunk-XK4H7EHE.cjs → chunk-KQ4B2XDH.cjs} +5 -5
- package/build/cjs/chunk-KQ4B2XDH.cjs.map +1 -0
- package/build/cjs/{chunk-IISDOJPR.cjs → chunk-LB3IHFAB.cjs} +2 -2
- package/build/cjs/{chunk-IISDOJPR.cjs.map → chunk-LB3IHFAB.cjs.map} +1 -1
- package/build/cjs/{chunk-PUQBJVFU.cjs → chunk-MUDJXY6I.cjs} +22 -22
- package/build/cjs/{chunk-PUQBJVFU.cjs.map → chunk-MUDJXY6I.cjs.map} +1 -1
- package/build/cjs/chunk-NN5IHTYW.cjs +11 -0
- package/build/cjs/{chunk-W6DWGABB.cjs.map → chunk-NN5IHTYW.cjs.map} +1 -1
- package/build/cjs/{chunk-PKJFOG2Z.cjs → chunk-OISZU73V.cjs} +2 -2
- package/build/cjs/{chunk-PKJFOG2Z.cjs.map → chunk-OISZU73V.cjs.map} +1 -1
- package/build/cjs/chunk-PPVWOEYX.cjs +11 -0
- package/build/cjs/{chunk-VRTFHF24.cjs.map → chunk-PPVWOEYX.cjs.map} +1 -1
- package/build/cjs/{chunk-3SJODG6U.cjs → chunk-S2FQCZAB.cjs} +2 -2
- package/build/cjs/{chunk-3SJODG6U.cjs.map → chunk-S2FQCZAB.cjs.map} +1 -1
- package/build/cjs/{chunk-4VNWCW75.cjs → chunk-V3ZJM4N2.cjs} +16 -16
- package/build/cjs/chunk-V3ZJM4N2.cjs.map +1 -0
- package/build/cjs/{chunk-MMPVBH5H.cjs → chunk-VT7TNOMD.cjs} +24 -21
- package/build/cjs/chunk-VT7TNOMD.cjs.map +1 -0
- package/build/cjs/chunk-WKKN2KJU.cjs +11 -0
- package/build/cjs/{chunk-Q5H4KPSL.cjs.map → chunk-WKKN2KJU.cjs.map} +1 -1
- package/build/cjs/{chunk-WE4REEMW.cjs → chunk-YIBSLDUU.cjs} +3 -3
- package/build/cjs/chunk-YIBSLDUU.cjs.map +1 -0
- package/build/cjs/chunk-YK3PUDSD.cjs +11 -0
- package/build/cjs/{chunk-LGGRMQCE.cjs.map → chunk-YK3PUDSD.cjs.map} +1 -1
- package/build/cjs/public/experimental/action-form.cjs +8 -8
- package/build/cjs/public/experimental/action-form.css +98 -98
- package/build/cjs/public/experimental/action-form.css.map +1 -1
- package/build/cjs/public/experimental/aip-agent-chat.cjs +2 -0
- package/build/cjs/public/experimental/aip-agent-chat.cjs.map +1 -1
- package/build/cjs/public/experimental/cbac-picker.cjs +11 -11
- package/build/cjs/public/experimental/cbac-picker.css +110 -110
- package/build/cjs/public/experimental/cbac-picker.css.map +1 -1
- package/build/cjs/public/experimental/document-viewer.cjs +8 -8
- package/build/cjs/public/experimental/document-viewer.css +72 -72
- package/build/cjs/public/experimental/document-viewer.css.map +1 -1
- package/build/cjs/public/experimental/email-viewer.cjs +5 -5
- package/build/cjs/public/experimental/excel-viewer.cjs +5 -5
- package/build/cjs/public/experimental/filter-list.cjs +18 -18
- package/build/cjs/public/experimental/filter-list.css +225 -225
- package/build/cjs/public/experimental/filter-list.css.map +1 -1
- package/build/cjs/public/experimental/image-viewer.cjs +3 -3
- package/build/cjs/public/experimental/markdown-renderer.cjs +3 -3
- package/build/cjs/public/experimental/object-table.cjs +12 -12
- package/build/cjs/public/experimental/object-table.css +151 -151
- package/build/cjs/public/experimental/object-table.css.map +1 -1
- package/build/cjs/public/experimental/pdf-viewer.cjs +25 -25
- package/build/cjs/public/experimental/pdf-viewer.css +72 -72
- package/build/cjs/public/experimental/pdf-viewer.css.map +1 -1
- package/build/cjs/public/experimental/pdf-viewer.d.cts +1 -1
- package/build/cjs/public/experimental/tiff-renderer.cjs +5 -5
- package/build/cjs/public/experimental/video-viewer.cjs +3 -3
- package/build/cjs/public/experimental/xml-viewer.cjs +3 -3
- package/build/cjs/public/experimental.cjs +86 -86
- package/build/cjs/public/experimental.css +632 -632
- package/build/cjs/public/experimental.css.map +1 -1
- package/build/esm/action-form/ActionForm.js.map +1 -1
- package/build/esm/action-form/ActionFormApi.js.map +1 -1
- package/build/esm/action-form/BaseForm.js +3 -3
- package/build/esm/action-form/BaseForm.js.map +1 -1
- package/build/esm/action-form/FormField.js.map +1 -1
- package/build/esm/action-form/FormFieldApi.js.map +1 -1
- package/build/esm/action-form/FormHeader.js.map +1 -1
- package/build/esm/action-form/FormSection.js.map +1 -1
- package/build/esm/action-form/fields/AsyncDropdownField.js +1 -1
- package/build/esm/action-form/fields/AsyncDropdownField.js.map +1 -1
- package/build/esm/action-form/fields/CustomField.js.map +1 -1
- package/build/esm/action-form/fields/DropdownField.js +2 -2
- package/build/esm/action-form/fields/DropdownField.js.map +1 -1
- package/build/esm/action-form/fields/FieldBridge.js.map +1 -1
- package/build/esm/action-form/fields/FilePickerField.js.map +1 -1
- package/build/esm/action-form/fields/FormFieldRenderer.js.map +1 -1
- package/build/esm/action-form/fields/NumberInputField.js.map +1 -1
- package/build/esm/action-form/fields/ObjectSelectField.js.map +1 -1
- package/build/esm/action-form/fields/ObjectSetField.js.map +1 -1
- package/build/esm/action-form/fields/RadioButtonsField.js.map +1 -1
- package/build/esm/action-form/fields/SwitchField.js.map +1 -1
- package/build/esm/action-form/fields/TextAreaField.js.map +1 -1
- package/build/esm/action-form/fields/TextInputField.js.map +1 -1
- package/build/esm/action-form/utils/coerceFieldValue.js.map +1 -1
- package/build/esm/action-form/utils/extractValidationRules.js.map +1 -1
- package/build/esm/action-form/utils/getDefaultFieldDefinitions.js.map +1 -1
- package/build/esm/aip-agent-chat/AipAgentChat.js.map +1 -1
- package/build/esm/aip-agent-chat/BaseAipAgentChat.js +1 -1
- package/build/esm/aip-agent-chat/BaseAipAgentChat.js.map +1 -1
- package/build/esm/aip-agent-chat/components/AipAgentChatComposer.js.map +1 -1
- package/build/esm/aip-agent-chat/components/AipAgentChatLoader.js.map +1 -1
- package/build/esm/aip-agent-chat/components/AipAgentChatMessage.js.map +1 -1
- package/build/esm/aip-agent-chat/components/AipAgentChatMessageList.js +1 -1
- package/build/esm/aip-agent-chat/components/AipAgentChatMessageList.js.map +1 -1
- package/build/esm/aip-agent-chat/components/AipAgentChatModelPicker.js.map +1 -1
- package/build/esm/aip-agent-chat/hooks/useChatAutoScroll.js.map +1 -1
- package/build/esm/base-components/action-button/ActionButton.js.map +1 -1
- package/build/esm/base-components/callout/Callout.js.map +1 -1
- package/build/esm/base-components/checkbox/Checkbox.js.map +1 -1
- package/build/esm/base-components/combobox/Combobox.js.map +1 -1
- package/build/esm/base-components/dialog/Dialog.js.map +1 -1
- package/build/esm/base-components/draggable-list/DraggableList.js +1 -1
- package/build/esm/base-components/draggable-list/DraggableList.js.map +1 -1
- package/build/esm/base-components/icon/BlueprintIcon.js.map +1 -1
- package/build/esm/base-components/search-bar/SearchBar.js.map +1 -1
- package/build/esm/base-components/searchable-menu/SearchableMenu.js.map +1 -1
- package/build/esm/base-components/select/Select.js.map +1 -1
- package/build/esm/base-components/skeleton/SkeletonBar.js.map +1 -1
- package/build/esm/base-components/switch/Switch.js.map +1 -1
- package/build/esm/base-components/tooltip/Tooltip.js.map +1 -1
- package/build/esm/cbac-picker/CbacBanner.js.map +1 -1
- package/build/esm/cbac-picker/CbacBannerPopover.js.map +1 -1
- package/build/esm/cbac-picker/CbacPicker.js.map +1 -1
- package/build/esm/cbac-picker/CbacPickerDialog.js.map +1 -1
- package/build/esm/cbac-picker/base/BaseCbacBanner.js.map +1 -1
- package/build/esm/cbac-picker/base/BaseCbacBannerPopover.js.map +1 -1
- package/build/esm/cbac-picker/base/BaseCbacPicker.js +1 -1
- package/build/esm/cbac-picker/base/BaseCbacPicker.js.map +1 -1
- package/build/esm/cbac-picker/base/BaseCbacPickerDialog.js.map +1 -1
- package/build/esm/cbac-picker/base/CategoryMarkingGroup.js +1 -1
- package/build/esm/cbac-picker/base/CategoryMarkingGroup.js.map +1 -1
- package/build/esm/cbac-picker/base/CbacPickerDialogFooter.js.map +1 -1
- package/build/esm/cbac-picker/base/InfoBanner.js.map +1 -1
- package/build/esm/cbac-picker/base/MarkingButton.js +1 -1
- package/build/esm/cbac-picker/base/MarkingButton.js.map +1 -1
- package/build/esm/cbac-picker/base/MaxClassificationField.js.map +1 -1
- package/build/esm/cbac-picker/base/OverflowButton.js +1 -1
- package/build/esm/cbac-picker/base/OverflowButton.js.map +1 -1
- package/build/esm/cbac-picker/base/OverflowItem.js +1 -1
- package/build/esm/cbac-picker/base/OverflowItem.js.map +1 -1
- package/build/esm/cbac-picker/base/ValidationWarning.js.map +1 -1
- package/build/esm/cbac-picker/base/selectionStateHelpers.js.map +1 -1
- package/build/esm/cbac-picker/useCbacPickerState.js.map +1 -1
- package/build/esm/cbac-picker/useCbacSelection.js.map +1 -1
- package/build/esm/cbac-picker/useConstraintCallout.js.map +1 -1
- package/build/esm/cbac-picker/utils/cbacPickerUtils.js.map +1 -1
- package/build/esm/cbac-picker/utils/errorMessages.js.map +1 -1
- package/build/esm/cbac-picker/utils/selectionLogic.js.map +1 -1
- package/build/esm/cbac-picker/utils/validationMessages.js.map +1 -1
- package/build/esm/document-viewer/DocumentViewer.js +1 -1
- package/build/esm/document-viewer/DocumentViewer.js.map +1 -1
- package/build/esm/document-viewer/DocumentViewerApi.js.map +1 -1
- package/build/esm/document-viewer/TiffDocumentViewer.js +1 -1
- package/build/esm/document-viewer/TiffDocumentViewer.js.map +1 -1
- package/build/esm/document-viewer/hooks/useTiffToPdf.js.map +1 -1
- package/build/esm/email-viewer/BaseEmailViewer.js.map +1 -1
- package/build/esm/email-viewer/EmailViewer.js +1 -1
- package/build/esm/email-viewer/EmailViewer.js.map +1 -1
- package/build/esm/email-viewer/EmailViewerApi.js.map +1 -1
- package/build/esm/email-viewer/parseEmail.js.map +1 -1
- package/build/esm/excel-viewer/BaseExcelViewer.js +1 -0
- package/build/esm/excel-viewer/BaseExcelViewer.js.map +1 -1
- package/build/esm/excel-viewer/ExcelViewer.js +1 -1
- package/build/esm/excel-viewer/ExcelViewer.js.map +1 -1
- package/build/esm/excel-viewer/ExcelViewerApi.js.map +1 -1
- package/build/esm/excel-viewer/parseSpreadsheet.js.map +1 -1
- package/build/esm/filter-list/FilterInput.js.map +1 -1
- package/build/esm/filter-list/FilterList.js.map +1 -1
- package/build/esm/filter-list/FilterListApi.js.map +1 -1
- package/build/esm/filter-list/FilterListItemApi.js.map +1 -1
- package/build/esm/filter-list/base/AddFilterPopover.js +1 -1
- package/build/esm/filter-list/base/AddFilterPopover.js.map +1 -1
- package/build/esm/filter-list/base/BaseFilterList.js +1 -1
- package/build/esm/filter-list/base/BaseFilterList.js.map +1 -1
- package/build/esm/filter-list/base/BaseFilterListApi.js.map +1 -1
- package/build/esm/filter-list/base/ExcludeDropdown.js +1 -1
- package/build/esm/filter-list/base/ExcludeDropdown.js.map +1 -1
- package/build/esm/filter-list/base/FilterInputExcludeRow.js.map +1 -1
- package/build/esm/filter-list/base/FilterListContent.js +1 -1
- package/build/esm/filter-list/base/FilterListContent.js.map +1 -1
- package/build/esm/filter-list/base/FilterListHeader.js.map +1 -1
- package/build/esm/filter-list/base/FilterListItem.js.map +1 -1
- package/build/esm/filter-list/base/FilterPopover.js.map +1 -1
- package/build/esm/filter-list/base/SortableFilterListItem.js.map +1 -1
- package/build/esm/filter-list/base/inputs/ContainsTextInput.js.map +1 -1
- package/build/esm/filter-list/base/inputs/DateRangeHistogramInput.js.map +1 -1
- package/build/esm/filter-list/base/inputs/EmptyStringLabel.js +1 -0
- package/build/esm/filter-list/base/inputs/EmptyStringLabel.js.map +1 -1
- package/build/esm/filter-list/base/inputs/HistogramTooltip.js.map +1 -1
- package/build/esm/filter-list/base/inputs/ListogramInput.js +2 -2
- package/build/esm/filter-list/base/inputs/ListogramInput.js.map +1 -1
- package/build/esm/filter-list/base/inputs/ListogramSkeleton.js.map +1 -1
- package/build/esm/filter-list/base/inputs/MultiDateInput.js.map +1 -1
- package/build/esm/filter-list/base/inputs/MultiSelectDropdownLayout.js.map +1 -1
- package/build/esm/filter-list/base/inputs/MultiSelectInlineLayout.js.map +1 -1
- package/build/esm/filter-list/base/inputs/MultiSelectInput.js +2 -2
- package/build/esm/filter-list/base/inputs/MultiSelectInput.js.map +1 -1
- package/build/esm/filter-list/base/inputs/NoValueLabel.js.map +1 -1
- package/build/esm/filter-list/base/inputs/NullValueWrapper.js.map +1 -1
- package/build/esm/filter-list/base/inputs/NumberRangeInput.js.map +1 -1
- package/build/esm/filter-list/base/inputs/OptionLabel.js.map +1 -1
- package/build/esm/filter-list/base/inputs/RangeInput.js +1 -1
- package/build/esm/filter-list/base/inputs/RangeInput.js.map +1 -1
- package/build/esm/filter-list/base/inputs/SelectInputSkeleton.js.map +1 -1
- package/build/esm/filter-list/base/inputs/SingleDateInput.js.map +1 -1
- package/build/esm/filter-list/base/inputs/SingleSelectInput.js +1 -1
- package/build/esm/filter-list/base/inputs/SingleSelectInput.js.map +1 -1
- package/build/esm/filter-list/base/inputs/TextTagsInput.js.map +1 -1
- package/build/esm/filter-list/base/inputs/TimelineInput.js.map +1 -1
- package/build/esm/filter-list/base/inputs/ToggleInput.js.map +1 -1
- package/build/esm/filter-list/base/inputs/comboboxFilter.js.map +1 -1
- package/build/esm/filter-list/base/inputs/createDateHistogramBuckets.js.map +1 -1
- package/build/esm/filter-list/base/inputs/createHistogramBuckets.js.map +1 -1
- package/build/esm/filter-list/hooks/useDualScopeAggregation.js.map +1 -1
- package/build/esm/filter-list/hooks/useFilterListState.js.map +1 -1
- package/build/esm/filter-list/hooks/useFilterPropertyAggregation.js.map +1 -1
- package/build/esm/filter-list/hooks/useFilterVisibility.js.map +1 -1
- package/build/esm/filter-list/hooks/usePropertyAggregation.js.map +1 -1
- package/build/esm/filter-list/inputs/ContainsTextFilterInput.js.map +1 -1
- package/build/esm/filter-list/inputs/DateRangeFilterInput.js.map +1 -1
- package/build/esm/filter-list/inputs/LinkedPropertyInput.js +1 -1
- package/build/esm/filter-list/inputs/LinkedPropertyInput.js.map +1 -1
- package/build/esm/filter-list/inputs/ListogramFilterInput.js.map +1 -1
- package/build/esm/filter-list/inputs/MultiDateFilterInput.js.map +1 -1
- package/build/esm/filter-list/inputs/MultiSelectFilterInput.js.map +1 -1
- package/build/esm/filter-list/inputs/NumberRangeFilterInput.js.map +1 -1
- package/build/esm/filter-list/inputs/PropertyFilterInput.js.map +1 -1
- package/build/esm/filter-list/inputs/SingleDateFilterInput.js.map +1 -1
- package/build/esm/filter-list/inputs/SingleSelectFilterInput.js.map +1 -1
- package/build/esm/filter-list/inputs/StaticValuesFilterInput.js.map +1 -1
- package/build/esm/filter-list/inputs/TextTagsFilterInput.js.map +1 -1
- package/build/esm/filter-list/inputs/TimelineFilterInput.js.map +1 -1
- package/build/esm/filter-list/inputs/ToggleFilterInput.js.map +1 -1
- package/build/esm/filter-list/types/CustomRendererTypes.js.map +1 -1
- package/build/esm/filter-list/types/KeywordSearchTypes.js.map +1 -1
- package/build/esm/filter-list/types/LinkedFilterTypes.js.map +1 -1
- package/build/esm/filter-list/types/StaticValuesTypes.js.map +1 -1
- package/build/esm/filter-list/utils/aggregationHelpers.js.map +1 -1
- package/build/esm/filter-list/utils/coerceFilterValue.js.map +1 -1
- package/build/esm/filter-list/utils/emptyFilterDisplayState.js.map +1 -1
- package/build/esm/filter-list/utils/filterStateSerialization.js.map +1 -1
- package/build/esm/filter-list/utils/filterStateToWhereClause.js.map +1 -1
- package/build/esm/filter-list/utils/filterValues.js.map +1 -1
- package/build/esm/filter-list/utils/getFilterKey.js.map +1 -1
- package/build/esm/filter-list/utils/getFilterLabel.js.map +1 -1
- package/build/esm/filter-list/utils/narrowObjectSet.js.map +1 -1
- package/build/esm/filter-list/utils/summarizeFilterValue.js.map +1 -1
- package/build/esm/images/image-viewer/BaseImageViewer.js.map +1 -1
- package/build/esm/images/image-viewer/ImageViewer.js.map +1 -1
- package/build/esm/images/image-viewer/ImageViewerApi.js.map +1 -1
- package/build/esm/images/tiff-renderer/TiffRenderer.js +1 -0
- package/build/esm/images/tiff-renderer/TiffRenderer.js.map +1 -1
- package/build/esm/images/tiff-renderer/TiffViewerMedia.js.map +1 -1
- package/build/esm/markdown-renderer/MarkdownRenderer.js.map +1 -1
- package/build/esm/markdown-renderer/MarkdownViewerMedia.js.map +1 -1
- package/build/esm/object-table/CellContextMenu.js.map +1 -1
- package/build/esm/object-table/ColumnConfigDialog.js.map +1 -1
- package/build/esm/object-table/DefaultCellRenderer.js +4 -3
- package/build/esm/object-table/DefaultCellRenderer.js.map +1 -1
- package/build/esm/object-table/EditableCell.js +1 -1
- package/build/esm/object-table/EditableCell.js.map +1 -1
- package/build/esm/object-table/LoadingCell.js.map +1 -1
- package/build/esm/object-table/LoadingRow.js +1 -1
- package/build/esm/object-table/LoadingRow.js.map +1 -1
- package/build/esm/object-table/LoadingStateTable.js +3 -3
- package/build/esm/object-table/LoadingStateTable.js.map +1 -1
- package/build/esm/object-table/MultiColumnSortDialog.js +1 -1
- package/build/esm/object-table/MultiColumnSortDialog.js.map +1 -1
- package/build/esm/object-table/NonIdealState.js.map +1 -1
- package/build/esm/object-table/ObjectTable.js.map +1 -1
- package/build/esm/object-table/ObjectTableApi.js.map +1 -1
- package/build/esm/object-table/SelectionCells.js.map +1 -1
- package/build/esm/object-table/SortableItemsList.js.map +1 -1
- package/build/esm/object-table/Table.js +1 -1
- package/build/esm/object-table/Table.js.map +1 -1
- package/build/esm/object-table/TableBody.js +1 -1
- package/build/esm/object-table/TableBody.js.map +1 -1
- package/build/esm/object-table/TableCell.js +1 -1
- package/build/esm/object-table/TableCell.js.map +1 -1
- package/build/esm/object-table/TableEditContainer.js.map +1 -1
- package/build/esm/object-table/TableHeader.js +1 -1
- package/build/esm/object-table/TableHeader.js.map +1 -1
- package/build/esm/object-table/TableHeaderContent.js.map +1 -1
- package/build/esm/object-table/TableHeaderWithPopover.js.map +1 -1
- package/build/esm/object-table/TableRow.js.map +1 -1
- package/build/esm/object-table/components/AsyncValueCell.js.map +1 -1
- package/build/esm/object-table/components/CbacMarkingCell.js.map +1 -1
- package/build/esm/object-table/components/DatePickerCellField.js +1 -1
- package/build/esm/object-table/components/DatePickerCellField.js.map +1 -1
- package/build/esm/object-table/components/DropdownCellField.js +1 -1
- package/build/esm/object-table/components/DropdownCellField.js.map +1 -1
- package/build/esm/object-table/components/MandatoryMarkingCell.js.map +1 -1
- package/build/esm/object-table/components/ReadonlyDisplayCell.js.map +1 -1
- package/build/esm/object-table/components/TextInputCellField.js.map +1 -1
- package/build/esm/object-table/hooks/useCellContextMenu.js.map +1 -1
- package/build/esm/object-table/hooks/useColumnDefs.js.map +1 -1
- package/build/esm/object-table/hooks/useColumnPinning.js.map +1 -1
- package/build/esm/object-table/hooks/useColumnResize.js.map +1 -1
- package/build/esm/object-table/hooks/useColumnVisibility.js.map +1 -1
- package/build/esm/object-table/hooks/useEditableTable.js.map +1 -1
- package/build/esm/object-table/hooks/useFocusedRow.js.map +1 -1
- package/build/esm/object-table/hooks/useFunctionColumnsData.js.map +1 -1
- package/build/esm/object-table/hooks/useObjectTableData.js.map +1 -1
- package/build/esm/object-table/hooks/useObjectTableSnapshot.js.map +1 -1
- package/build/esm/object-table/hooks/useRowSelection.js.map +1 -1
- package/build/esm/object-table/hooks/useSelectionColumn.js.map +1 -1
- package/build/esm/object-table/hooks/useTableSorting.js.map +1 -1
- package/build/esm/object-table/utils/AsyncCellData.js.map +1 -1
- package/build/esm/object-table/utils/PortalTracker.js.map +1 -1
- package/build/esm/object-table/utils/deriveSelectionObjectSet.js.map +1 -1
- package/build/esm/object-table/utils/editableUtils.js.map +1 -1
- package/build/esm/object-table/utils/functionColumns.js.map +1 -1
- package/build/esm/object-table/utils/getColumnPinningStyles.js.map +1 -1
- package/build/esm/object-table/utils/getRowId.js.map +1 -1
- package/build/esm/object-table/utils/objectTableSnapshot.js.map +1 -1
- package/build/esm/object-table/utils/shouldShowEditableCell.js.map +1 -1
- package/build/esm/object-table/utils/types.js.map +1 -1
- package/build/esm/pdf-viewer/PdfRenderer.js.map +1 -1
- package/build/esm/pdf-viewer/PdfViewer.js.map +1 -1
- package/build/esm/pdf-viewer/PdfViewerContext.js.map +1 -1
- package/build/esm/pdf-viewer/components/PdfAnnotationOverlay.js.map +1 -1
- package/build/esm/pdf-viewer/components/PdfViewerAnnotationLayer.js.map +1 -1
- package/build/esm/pdf-viewer/components/PdfViewerContent.js +1 -1
- package/build/esm/pdf-viewer/components/PdfViewerContent.js.map +1 -1
- package/build/esm/pdf-viewer/components/PdfViewerOutlineSidebar.js +1 -1
- package/build/esm/pdf-viewer/components/PdfViewerOutlineSidebar.js.map +1 -1
- package/build/esm/pdf-viewer/components/PdfViewerSearchBar.js.map +1 -1
- package/build/esm/pdf-viewer/components/PdfViewerSidebar.js +1 -1
- package/build/esm/pdf-viewer/components/PdfViewerSidebar.js.map +1 -1
- package/build/esm/pdf-viewer/components/PdfViewerSidebarHeader.js.map +1 -1
- package/build/esm/pdf-viewer/components/PdfViewerThumbnail.js.map +1 -1
- package/build/esm/pdf-viewer/components/PdfViewerToolbar.js.map +1 -1
- package/build/esm/pdf-viewer/constants.js.map +1 -1
- package/build/esm/pdf-viewer/hooks/usePdfAnnotationPortals.js.map +1 -1
- package/build/esm/pdf-viewer/hooks/usePdfAnnotationsByPage.js.map +1 -1
- package/build/esm/pdf-viewer/hooks/usePdfDocument.js.map +1 -1
- package/build/esm/pdf-viewer/hooks/usePdfFormFields.js.map +1 -1
- package/build/esm/pdf-viewer/hooks/usePdfHighlightMode.js.map +1 -1
- package/build/esm/pdf-viewer/hooks/usePdfOutline.js.map +1 -1
- package/build/esm/pdf-viewer/hooks/usePdfViewer.js.map +1 -1
- package/build/esm/pdf-viewer/hooks/usePdfViewerCore.js.map +1 -1
- package/build/esm/pdf-viewer/hooks/usePdfViewerSearch.js.map +1 -1
- package/build/esm/pdf-viewer/hooks/usePdfViewerState.js.map +1 -1
- package/build/esm/pdf-viewer/hooks/usePdfViewerSync.js.map +1 -1
- package/build/esm/public/experimental/action-form.js.map +1 -1
- package/build/esm/public/experimental/cbac-picker.js.map +1 -1
- package/build/esm/public/experimental/document-viewer.js.map +1 -1
- package/build/esm/public/experimental/email-viewer.js.map +1 -1
- package/build/esm/public/experimental/excel-viewer.js.map +1 -1
- package/build/esm/public/experimental/filter-list.js.map +1 -1
- package/build/esm/public/experimental/image-viewer.js.map +1 -1
- package/build/esm/public/experimental/markdown-renderer.js.map +1 -1
- package/build/esm/public/experimental/object-table.js.map +1 -1
- package/build/esm/public/experimental/pdf-viewer.js.map +1 -1
- package/build/esm/public/experimental/tiff-renderer.js.map +1 -1
- package/build/esm/public/experimental/video-viewer.js.map +1 -1
- package/build/esm/public/experimental/xml-viewer.js.map +1 -1
- package/build/esm/shared/ErrorBoundary.js.map +1 -1
- package/build/esm/shared/PortalContainerContext.js.map +1 -1
- package/build/esm/shared/PortalDismissLayer.js.map +1 -1
- package/build/esm/shared/calendar/DateCalendar.js +1 -1
- package/build/esm/shared/calendar/DateCalendar.js.map +1 -1
- package/build/esm/shared/calendar/DatePicker.js +2 -2
- package/build/esm/shared/calendar/DatePicker.js.map +1 -1
- package/build/esm/shared/calendar/DateRangeCalendar.js.map +1 -1
- package/build/esm/shared/calendar/DateRangePicker.js +2 -2
- package/build/esm/shared/calendar/DateRangePicker.js.map +1 -1
- package/build/esm/shared/calendar/LazyDateCalendar.js.map +1 -1
- package/build/esm/shared/calendar/LazyDateRangeCalendar.js.map +1 -1
- package/build/esm/shared/calendar/TimePicker.js.map +1 -1
- package/build/esm/shared/calendar/calendarShared.js.map +1 -1
- package/build/esm/shared/calendar/useDateEditState.js.map +1 -1
- package/build/esm/shared/dateUtils.js.map +1 -1
- package/build/esm/shared/hooks/useAsyncAction.js.map +1 -1
- package/build/esm/shared/hooks/useDebouncedValue.js.map +1 -1
- package/build/esm/shared/hooks/useEventCallback.js.map +1 -1
- package/build/esm/shared/hooks/useInfiniteScroll.js.map +1 -1
- package/build/esm/shared/hooks/useMediaContents.js.map +1 -1
- package/build/esm/theme/OsdkThemeContext.js.map +1 -1
- package/build/esm/theme/OsdkThemeProvider.js.map +1 -1
- package/build/esm/theme/useOsdkTheme.js.map +1 -1
- package/build/esm/theme/useSystemTheme.js.map +1 -1
- package/build/esm/util/UserAgent.js +1 -1
- package/build/esm/util/UserAgent.js.map +1 -1
- package/build/esm/util/withOsdkMetrics.js.map +1 -1
- package/build/esm/video-viewer/BaseVideoViewer.js.map +1 -1
- package/build/esm/video-viewer/VideoViewer.js.map +1 -1
- package/build/esm/video-viewer/VideoViewerApi.js.map +1 -1
- package/build/esm/xml-viewer/BaseXmlViewer.js.map +1 -1
- package/build/esm/xml-viewer/XmlViewer.js.map +1 -1
- package/build/esm/xml-viewer/XmlViewerApi.js.map +1 -1
- package/build/types/action-form/ActionForm.d.ts.map +1 -1
- package/build/types/action-form/ActionFormApi.d.ts.map +1 -1
- package/build/types/action-form/BaseForm.d.ts.map +1 -1
- package/build/types/action-form/FormField.d.ts.map +1 -1
- package/build/types/action-form/FormFieldApi.d.ts.map +1 -1
- package/build/types/action-form/FormHeader.d.ts.map +1 -1
- package/build/types/action-form/FormSection.d.ts.map +1 -1
- package/build/types/action-form/fields/AsyncDropdownField.d.ts.map +1 -1
- package/build/types/action-form/fields/CustomField.d.ts.map +1 -1
- package/build/types/action-form/fields/DropdownField.d.ts.map +1 -1
- package/build/types/action-form/fields/FieldBridge.d.ts.map +1 -1
- package/build/types/action-form/fields/FilePickerField.d.ts.map +1 -1
- package/build/types/action-form/fields/FormFieldRenderer.d.ts.map +1 -1
- package/build/types/action-form/fields/NumberInputField.d.ts.map +1 -1
- package/build/types/action-form/fields/ObjectSelectField.d.ts.map +1 -1
- package/build/types/action-form/fields/ObjectSetField.d.ts.map +1 -1
- package/build/types/action-form/fields/RadioButtonsField.d.ts.map +1 -1
- package/build/types/action-form/fields/SwitchField.d.ts.map +1 -1
- package/build/types/action-form/fields/TextAreaField.d.ts.map +1 -1
- package/build/types/action-form/fields/TextInputField.d.ts.map +1 -1
- package/build/types/action-form/utils/extractValidationRules.d.ts.map +1 -1
- package/build/types/action-form/utils/getDefaultFieldDefinitions.d.ts.map +1 -1
- package/build/types/aip-agent-chat/AipAgentChat.d.ts.map +1 -1
- package/build/types/aip-agent-chat/BaseAipAgentChat.d.ts.map +1 -1
- package/build/types/aip-agent-chat/components/AipAgentChatComposer.d.ts.map +1 -1
- package/build/types/aip-agent-chat/components/AipAgentChatLoader.d.ts.map +1 -1
- package/build/types/aip-agent-chat/components/AipAgentChatMessage.d.ts.map +1 -1
- package/build/types/aip-agent-chat/components/AipAgentChatMessageList.d.ts.map +1 -1
- package/build/types/aip-agent-chat/components/AipAgentChatModelPicker.d.ts.map +1 -1
- package/build/types/base-components/action-button/ActionButton.d.ts.map +1 -1
- package/build/types/base-components/callout/Callout.d.ts.map +1 -1
- package/build/types/base-components/checkbox/Checkbox.d.ts.map +1 -1
- package/build/types/base-components/combobox/Combobox.d.ts.map +1 -1
- package/build/types/base-components/dialog/Dialog.d.ts.map +1 -1
- package/build/types/base-components/draggable-list/DraggableList.d.ts.map +1 -1
- package/build/types/base-components/search-bar/SearchBar.d.ts.map +1 -1
- package/build/types/base-components/searchable-menu/SearchableMenu.d.ts.map +1 -1
- package/build/types/base-components/select/Select.d.ts.map +1 -1
- package/build/types/base-components/skeleton/SkeletonBar.d.ts.map +1 -1
- package/build/types/base-components/switch/Switch.d.ts.map +1 -1
- package/build/types/base-components/tooltip/Tooltip.d.ts.map +1 -1
- package/build/types/cbac-picker/CbacBanner.d.ts.map +1 -1
- package/build/types/cbac-picker/CbacBannerPopover.d.ts.map +1 -1
- package/build/types/cbac-picker/CbacPicker.d.ts.map +1 -1
- package/build/types/cbac-picker/CbacPickerDialog.d.ts.map +1 -1
- package/build/types/cbac-picker/base/BaseCbacBanner.d.ts.map +1 -1
- package/build/types/cbac-picker/base/BaseCbacBannerPopover.d.ts.map +1 -1
- package/build/types/cbac-picker/base/BaseCbacPicker.d.ts.map +1 -1
- package/build/types/cbac-picker/base/BaseCbacPickerDialog.d.ts.map +1 -1
- package/build/types/cbac-picker/base/CategoryMarkingGroup.d.ts.map +1 -1
- package/build/types/cbac-picker/base/CbacPickerDialogFooter.d.ts.map +1 -1
- package/build/types/cbac-picker/base/InfoBanner.d.ts.map +1 -1
- package/build/types/cbac-picker/base/MarkingButton.d.ts.map +1 -1
- package/build/types/cbac-picker/base/MaxClassificationField.d.ts.map +1 -1
- package/build/types/cbac-picker/base/OverflowButton.d.ts.map +1 -1
- package/build/types/cbac-picker/base/OverflowItem.d.ts.map +1 -1
- package/build/types/cbac-picker/base/ValidationWarning.d.ts.map +1 -1
- package/build/types/cbac-picker/useCbacPickerState.d.ts.map +1 -1
- package/build/types/cbac-picker/useCbacSelection.d.ts.map +1 -1
- package/build/types/cbac-picker/useConstraintCallout.d.ts.map +1 -1
- package/build/types/cbac-picker/utils/errorMessages.d.ts.map +1 -1
- package/build/types/document-viewer/DocumentViewer.d.ts.map +1 -1
- package/build/types/document-viewer/DocumentViewerApi.d.ts.map +1 -1
- package/build/types/document-viewer/TiffDocumentViewer.d.ts.map +1 -1
- package/build/types/document-viewer/hooks/useTiffToPdf.d.ts.map +1 -1
- package/build/types/email-viewer/BaseEmailViewer.d.ts.map +1 -1
- package/build/types/email-viewer/EmailViewer.d.ts.map +1 -1
- package/build/types/email-viewer/EmailViewerApi.d.ts.map +1 -1
- package/build/types/email-viewer/parseEmail.d.ts.map +1 -1
- package/build/types/excel-viewer/BaseExcelViewer.d.ts.map +1 -1
- package/build/types/excel-viewer/ExcelViewer.d.ts.map +1 -1
- package/build/types/excel-viewer/ExcelViewerApi.d.ts.map +1 -1
- package/build/types/excel-viewer/parseSpreadsheet.d.ts.map +1 -1
- package/build/types/filter-list/FilterInput.d.ts.map +1 -1
- package/build/types/filter-list/FilterList.d.ts.map +1 -1
- package/build/types/filter-list/FilterListApi.d.ts.map +1 -1
- package/build/types/filter-list/FilterListItemApi.d.ts.map +1 -1
- package/build/types/filter-list/base/AddFilterPopover.d.ts.map +1 -1
- package/build/types/filter-list/base/BaseFilterList.d.ts.map +1 -1
- package/build/types/filter-list/base/BaseFilterListApi.d.ts.map +1 -1
- package/build/types/filter-list/base/ExcludeDropdown.d.ts.map +1 -1
- package/build/types/filter-list/base/FilterInputExcludeRow.d.ts.map +1 -1
- package/build/types/filter-list/base/FilterListContent.d.ts.map +1 -1
- package/build/types/filter-list/base/FilterListHeader.d.ts.map +1 -1
- package/build/types/filter-list/base/FilterListItem.d.ts.map +1 -1
- package/build/types/filter-list/base/FilterPopover.d.ts.map +1 -1
- package/build/types/filter-list/base/SortableFilterListItem.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/ContainsTextInput.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/DateRangeHistogramInput.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/EmptyStringLabel.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/HistogramTooltip.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/ListogramInput.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/ListogramSkeleton.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/MultiDateInput.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/MultiSelectDropdownLayout.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/MultiSelectInlineLayout.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/MultiSelectInput.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/NoValueLabel.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/NullValueWrapper.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/NumberRangeInput.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/OptionLabel.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/RangeInput.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/SelectInputSkeleton.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/SingleDateInput.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/SingleSelectInput.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/TextTagsInput.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/TimelineInput.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/ToggleInput.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/createDateHistogramBuckets.d.ts.map +1 -1
- package/build/types/filter-list/base/inputs/createHistogramBuckets.d.ts.map +1 -1
- package/build/types/filter-list/hooks/useDualScopeAggregation.d.ts.map +1 -1
- package/build/types/filter-list/hooks/useFilterListState.d.ts.map +1 -1
- package/build/types/filter-list/hooks/useFilterPropertyAggregation.d.ts.map +1 -1
- package/build/types/filter-list/hooks/useFilterVisibility.d.ts.map +1 -1
- package/build/types/filter-list/hooks/usePropertyAggregation.d.ts.map +1 -1
- package/build/types/filter-list/inputs/ContainsTextFilterInput.d.ts.map +1 -1
- package/build/types/filter-list/inputs/DateRangeFilterInput.d.ts.map +1 -1
- package/build/types/filter-list/inputs/LinkedPropertyInput.d.ts.map +1 -1
- package/build/types/filter-list/inputs/ListogramFilterInput.d.ts.map +1 -1
- package/build/types/filter-list/inputs/MultiDateFilterInput.d.ts.map +1 -1
- package/build/types/filter-list/inputs/MultiSelectFilterInput.d.ts.map +1 -1
- package/build/types/filter-list/inputs/NumberRangeFilterInput.d.ts.map +1 -1
- package/build/types/filter-list/inputs/PropertyFilterInput.d.ts.map +1 -1
- package/build/types/filter-list/inputs/SingleDateFilterInput.d.ts.map +1 -1
- package/build/types/filter-list/inputs/SingleSelectFilterInput.d.ts.map +1 -1
- package/build/types/filter-list/inputs/StaticValuesFilterInput.d.ts.map +1 -1
- package/build/types/filter-list/inputs/TextTagsFilterInput.d.ts.map +1 -1
- package/build/types/filter-list/inputs/TimelineFilterInput.d.ts.map +1 -1
- package/build/types/filter-list/inputs/ToggleFilterInput.d.ts.map +1 -1
- package/build/types/filter-list/types/CustomRendererTypes.d.ts.map +1 -1
- package/build/types/filter-list/types/KeywordSearchTypes.d.ts.map +1 -1
- package/build/types/filter-list/types/LinkedFilterTypes.d.ts.map +1 -1
- package/build/types/filter-list/types/StaticValuesTypes.d.ts.map +1 -1
- package/build/types/filter-list/utils/aggregationHelpers.d.ts.map +1 -1
- package/build/types/filter-list/utils/emptyFilterDisplayState.d.ts.map +1 -1
- package/build/types/filter-list/utils/filterStateToWhereClause.d.ts.map +1 -1
- package/build/types/filter-list/utils/filterValues.d.ts.map +1 -1
- package/build/types/filter-list/utils/getFilterKey.d.ts.map +1 -1
- package/build/types/filter-list/utils/getFilterLabel.d.ts.map +1 -1
- package/build/types/filter-list/utils/narrowObjectSet.d.ts.map +1 -1
- package/build/types/filter-list/utils/summarizeFilterValue.d.ts.map +1 -1
- package/build/types/images/image-viewer/BaseImageViewer.d.ts.map +1 -1
- package/build/types/images/image-viewer/ImageViewer.d.ts.map +1 -1
- package/build/types/images/image-viewer/ImageViewerApi.d.ts.map +1 -1
- package/build/types/images/tiff-renderer/TiffRenderer.d.ts.map +1 -1
- package/build/types/images/tiff-renderer/TiffViewerMedia.d.ts.map +1 -1
- package/build/types/markdown-renderer/MarkdownRenderer.d.ts.map +1 -1
- package/build/types/markdown-renderer/MarkdownViewerMedia.d.ts.map +1 -1
- package/build/types/object-table/CellContextMenu.d.ts.map +1 -1
- package/build/types/object-table/ColumnConfigDialog.d.ts.map +1 -1
- package/build/types/object-table/DefaultCellRenderer.d.ts.map +1 -1
- package/build/types/object-table/EditableCell.d.ts.map +1 -1
- package/build/types/object-table/LoadingCell.d.ts.map +1 -1
- package/build/types/object-table/LoadingRow.d.ts.map +1 -1
- package/build/types/object-table/LoadingStateTable.d.ts.map +1 -1
- package/build/types/object-table/MultiColumnSortDialog.d.ts.map +1 -1
- package/build/types/object-table/NonIdealState.d.ts.map +1 -1
- package/build/types/object-table/ObjectTable.d.ts.map +1 -1
- package/build/types/object-table/ObjectTableApi.d.ts.map +1 -1
- package/build/types/object-table/SelectionCells.d.ts.map +1 -1
- package/build/types/object-table/SortableItemsList.d.ts.map +1 -1
- package/build/types/object-table/Table.d.ts.map +1 -1
- package/build/types/object-table/TableBody.d.ts.map +1 -1
- package/build/types/object-table/TableCell.d.ts.map +1 -1
- package/build/types/object-table/TableEditContainer.d.ts.map +1 -1
- package/build/types/object-table/TableHeader.d.ts.map +1 -1
- package/build/types/object-table/TableHeaderContent.d.ts.map +1 -1
- package/build/types/object-table/TableHeaderWithPopover.d.ts.map +1 -1
- package/build/types/object-table/TableRow.d.ts.map +1 -1
- package/build/types/object-table/components/AsyncValueCell.d.ts.map +1 -1
- package/build/types/object-table/components/CbacMarkingCell.d.ts.map +1 -1
- package/build/types/object-table/components/DatePickerCellField.d.ts.map +1 -1
- package/build/types/object-table/components/DropdownCellField.d.ts.map +1 -1
- package/build/types/object-table/components/MandatoryMarkingCell.d.ts.map +1 -1
- package/build/types/object-table/components/ReadonlyDisplayCell.d.ts.map +1 -1
- package/build/types/object-table/components/TextInputCellField.d.ts.map +1 -1
- package/build/types/object-table/hooks/useColumnDefs.d.ts.map +1 -1
- package/build/types/object-table/hooks/useColumnPinning.d.ts.map +1 -1
- package/build/types/object-table/hooks/useColumnVisibility.d.ts.map +1 -1
- package/build/types/object-table/hooks/useEditableTable.d.ts.map +1 -1
- package/build/types/object-table/hooks/useFocusedRow.d.ts.map +1 -1
- package/build/types/object-table/hooks/useFunctionColumnsData.d.ts.map +1 -1
- package/build/types/object-table/hooks/useObjectTableData.d.ts.map +1 -1
- package/build/types/object-table/hooks/useObjectTableSnapshot.d.ts.map +1 -1
- package/build/types/object-table/hooks/useRowSelection.d.ts.map +1 -1
- package/build/types/object-table/hooks/useSelectionColumn.d.ts.map +1 -1
- package/build/types/object-table/hooks/useTableSorting.d.ts.map +1 -1
- package/build/types/object-table/utils/AsyncCellData.d.ts.map +1 -1
- package/build/types/object-table/utils/PortalTracker.d.ts.map +1 -1
- package/build/types/object-table/utils/deriveSelectionObjectSet.d.ts.map +1 -1
- package/build/types/object-table/utils/functionColumns.d.ts.map +1 -1
- package/build/types/object-table/utils/getRowId.d.ts.map +1 -1
- package/build/types/object-table/utils/objectTableSnapshot.d.ts.map +1 -1
- package/build/types/object-table/utils/types.d.ts.map +1 -1
- package/build/types/pdf-viewer/PdfRenderer.d.ts.map +1 -1
- package/build/types/pdf-viewer/PdfViewer.d.ts.map +1 -1
- package/build/types/pdf-viewer/PdfViewerContext.d.ts.map +1 -1
- package/build/types/pdf-viewer/components/PdfAnnotationOverlay.d.ts.map +1 -1
- package/build/types/pdf-viewer/components/PdfViewerAnnotationLayer.d.ts.map +1 -1
- package/build/types/pdf-viewer/components/PdfViewerContent.d.ts.map +1 -1
- package/build/types/pdf-viewer/components/PdfViewerOutlineSidebar.d.ts.map +1 -1
- package/build/types/pdf-viewer/components/PdfViewerSearchBar.d.ts.map +1 -1
- package/build/types/pdf-viewer/components/PdfViewerSidebar.d.ts.map +1 -1
- package/build/types/pdf-viewer/components/PdfViewerSidebarHeader.d.ts.map +1 -1
- package/build/types/pdf-viewer/components/PdfViewerThumbnail.d.ts.map +1 -1
- package/build/types/pdf-viewer/components/PdfViewerToolbar.d.ts.map +1 -1
- package/build/types/pdf-viewer/constants.d.ts.map +1 -1
- package/build/types/pdf-viewer/hooks/usePdfAnnotationPortals.d.ts.map +1 -1
- package/build/types/pdf-viewer/hooks/usePdfAnnotationsByPage.d.ts.map +1 -1
- package/build/types/pdf-viewer/hooks/usePdfFormFields.d.ts.map +1 -1
- package/build/types/pdf-viewer/hooks/usePdfHighlightMode.d.ts.map +1 -1
- package/build/types/pdf-viewer/hooks/usePdfOutline.d.ts.map +1 -1
- package/build/types/pdf-viewer/hooks/usePdfViewer.d.ts.map +1 -1
- package/build/types/pdf-viewer/hooks/usePdfViewerCore.d.ts.map +1 -1
- package/build/types/pdf-viewer/hooks/usePdfViewerSearch.d.ts.map +1 -1
- package/build/types/pdf-viewer/hooks/usePdfViewerState.d.ts.map +1 -1
- package/build/types/pdf-viewer/hooks/usePdfViewerSync.d.ts.map +1 -1
- package/build/types/shared/ErrorBoundary.d.ts.map +1 -1
- package/build/types/shared/PortalContainerContext.d.ts.map +1 -1
- package/build/types/shared/PortalDismissLayer.d.ts.map +1 -1
- package/build/types/shared/calendar/DateCalendar.d.ts.map +1 -1
- package/build/types/shared/calendar/DatePicker.d.ts.map +1 -1
- package/build/types/shared/calendar/DateRangeCalendar.d.ts.map +1 -1
- package/build/types/shared/calendar/DateRangePicker.d.ts.map +1 -1
- package/build/types/shared/calendar/LazyDateCalendar.d.ts.map +1 -1
- package/build/types/shared/calendar/LazyDateRangeCalendar.d.ts.map +1 -1
- package/build/types/shared/calendar/TimePicker.d.ts.map +1 -1
- package/build/types/shared/calendar/useDateEditState.d.ts.map +1 -1
- package/build/types/shared/dateUtils.d.ts.map +1 -1
- package/build/types/shared/hooks/useAsyncAction.d.ts.map +1 -1
- package/build/types/shared/hooks/useInfiniteScroll.d.ts.map +1 -1
- package/build/types/theme/OsdkThemeContext.d.ts.map +1 -1
- package/build/types/theme/OsdkThemeProvider.d.ts.map +1 -1
- package/build/types/theme/useOsdkTheme.d.ts.map +1 -1
- package/build/types/theme/useSystemTheme.d.ts.map +1 -1
- package/build/types/util/UserAgent.d.ts.map +1 -1
- package/build/types/util/withOsdkMetrics.d.ts.map +1 -1
- package/build/types/video-viewer/BaseVideoViewer.d.ts.map +1 -1
- package/build/types/video-viewer/VideoViewer.d.ts.map +1 -1
- package/build/types/video-viewer/VideoViewerApi.d.ts.map +1 -1
- package/build/types/xml-viewer/BaseXmlViewer.d.ts.map +1 -1
- package/build/types/xml-viewer/XmlViewer.d.ts.map +1 -1
- package/build/types/xml-viewer/XmlViewerApi.d.ts.map +1 -1
- package/package.json +9 -10
- package/build/cjs/DateCalendar-FTW3OIEP.css.map +0 -1
- package/build/cjs/DateRangeCalendar-I4JHCZAK.css.map +0 -1
- package/build/cjs/DateRangeCalendar-PHC3VPW3.cjs +0 -12
- package/build/cjs/chunk-4VNWCW75.cjs.map +0 -1
- package/build/cjs/chunk-CASYBF4M.cjs.map +0 -1
- package/build/cjs/chunk-DA22W6ZO.cjs.map +0 -1
- package/build/cjs/chunk-F4JELV7M.cjs +0 -11
- package/build/cjs/chunk-IHVPE5CD.cjs.map +0 -1
- package/build/cjs/chunk-LGGRMQCE.cjs +0 -11
- package/build/cjs/chunk-MMPVBH5H.cjs.map +0 -1
- package/build/cjs/chunk-PYOEFNQH.cjs +0 -11
- package/build/cjs/chunk-Q5H4KPSL.cjs +0 -11
- package/build/cjs/chunk-VRTFHF24.cjs +0 -11
- package/build/cjs/chunk-W6DWGABB.cjs +0 -11
- package/build/cjs/chunk-WE4REEMW.cjs.map +0 -1
- package/build/cjs/chunk-XK4H7EHE.cjs.map +0 -1
- package/build/cjs/chunk-YTDSW5OV.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PortalTracker.js","names":["React","createContext","useCallback","useContext","useRef","PortalTrackerContext","undefined","PortalTrackerProvider","children","portalsRef","Set","register","element","current","add","delete","containsElement","node","portal","contains","value","createElement","Provider","usePortalTracker","useRegisterPortal","tracker","cleanupRef"],"sources":["PortalTracker.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { createContext, useCallback, useContext, useRef } from \"react\";\n\ninterface PortalTrackerContextValue {\n register: (element: HTMLElement) => () => void;\n containsElement: (element: Node) => boolean;\n}\n\nconst PortalTrackerContext = createContext<\n PortalTrackerContextValue | undefined\n>(
|
|
1
|
+
{"version":3,"file":"PortalTracker.js","names":["React","createContext","useCallback","useContext","useRef","PortalTrackerContext","undefined","PortalTrackerProvider","children","portalsRef","Set","register","element","current","add","delete","containsElement","node","portal","contains","value","createElement","Provider","usePortalTracker","useRegisterPortal","tracker","cleanupRef"],"sources":["PortalTracker.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { createContext, useCallback, useContext, useRef } from \"react\";\n\ninterface PortalTrackerContextValue {\n register: (element: HTMLElement) => () => void;\n containsElement: (element: Node) => boolean;\n}\n\nconst PortalTrackerContext = createContext<\n PortalTrackerContextValue | undefined\n>(undefined);\n\nexport function PortalTrackerProvider({\n children,\n}: {\n children: React.ReactNode;\n}): React.ReactElement {\n const portalsRef = useRef<Set<HTMLElement>>(new Set());\n\n const register = useCallback((element: HTMLElement) => {\n portalsRef.current.add(element);\n return () => {\n portalsRef.current.delete(element);\n };\n }, []);\n\n const containsElement = useCallback((node: Node) => {\n for (const portal of portalsRef.current) {\n if (portal.contains(node)) {\n return true;\n }\n }\n return false;\n }, []);\n\n const value = useRef<PortalTrackerContextValue>({\n register,\n containsElement,\n });\n\n return (\n <PortalTrackerContext.Provider value={value.current}>\n {children}\n </PortalTrackerContext.Provider>\n );\n}\n\nexport function usePortalTracker(): PortalTrackerContextValue | undefined {\n return useContext(PortalTrackerContext);\n}\n\n/**\n * Registers a DOM element as a tracked portal container.\n * Call with the portal's root element once it mounts.\n * The element is automatically unregistered on unmount.\n *\n * Usage in a component that renders a portaled dropdown:\n * ```tsx\n * const registerPortal = useRegisterPortal();\n * <Select.Portal ref={registerPortal}>...</Select.Portal>\n * ```\n */\nexport function useRegisterPortal(): (element: HTMLElement | null) => void {\n const tracker = useContext(PortalTrackerContext);\n const cleanupRef = useRef<(() => void) | null>(null);\n\n return useCallback(\n (element: HTMLElement | null) => {\n cleanupRef.current?.();\n cleanupRef.current = null;\n\n if (element && tracker) {\n cleanupRef.current = tracker.register(element);\n }\n },\n [tracker]\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,WAAW,EAAEC,UAAU,EAAEC,MAAM,QAAQ,OAAO;AAO7E,MAAMC,oBAAoB,gBAAGJ,aAAa,CAExCK,SAAS,CAAC;AAEZ,OAAO,SAASC,qBA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ACtBC,UAAU,CAACb,OAAO,GAAGY,OAAO,CAACd,QAAQ,CAACC,OAAO,CAAC;IAChD;EACF,CAAC,EACD,CAACa,OAAO,CACV,CAAC;AACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deriveSelectionObjectSet.js","names":["deriveSelectionObjectSet","resultingObjectSet","change","undefined","isSelectAll","selectedRows","length","whereClause","$primaryKey","$in","map","r","where"],"sources":["deriveSelectionObjectSet.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectOrInterfaceDefinition,\n ObjectSet,\n PrimaryKeyType,\n SimplePropertyDef,\n WhereClause,\n} from \"@osdk/api\";\nimport type { UseRowSelectionChange } from \"../hooks/useRowSelection.js\";\n\n/**\n * Derives the object set representing the current row selection.\n *\n * The selection is filtered down to the selected primary keys via the\n * `$primaryKey` special property, so this works for both object and interface\n * types without resolving the underlying primary key property name. When every\n * row is selected, the full `resultingObjectSet` is returned unchanged.\n *\n * Returns `undefined` when there is no resulting object set to derive from.\n */\nexport function deriveSelectionObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n>(\n resultingObjectSet: ObjectSet<Q, RDPs> | undefined,\n change: UseRowSelectionChange<Q, RDPs
|
|
1
|
+
{"version":3,"file":"deriveSelectionObjectSet.js","names":["deriveSelectionObjectSet","resultingObjectSet","change","undefined","isSelectAll","selectedRows","length","whereClause","$primaryKey","$in","map","r","where"],"sources":["deriveSelectionObjectSet.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectOrInterfaceDefinition,\n ObjectSet,\n PrimaryKeyType,\n SimplePropertyDef,\n WhereClause,\n} from \"@osdk/api\";\n\nimport type { UseRowSelectionChange } from \"../hooks/useRowSelection.js\";\n\n/**\n * Derives the object set representing the current row selection.\n *\n * The selection is filtered down to the selected primary keys via the\n * `$primaryKey` special property, so this works for both object and interface\n * types without resolving the underlying primary key property name. When every\n * row is selected, the full `resultingObjectSet` is returned unchanged.\n *\n * Returns `undefined` when there is no resulting object set to derive from.\n */\nexport function deriveSelectionObjectSet<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n>(\n resultingObjectSet: ObjectSet<Q, RDPs> | undefined,\n change: UseRowSelectionChange<Q, RDPs>\n): ObjectSet<Q, RDPs> | undefined {\n if (!resultingObjectSet) {\n return undefined;\n }\n if (change.isSelectAll && change.selectedRows.length > 0) {\n return resultingObjectSet;\n }\n const whereClause: Record<string, { $in: Array<PrimaryKeyType<Q>> }> = {\n $primaryKey: { $in: change.selectedRows.map((r) => r.$primaryKey) },\n };\n return resultingObjectSet.where(whereClause as WhereClause<Q, RDPs>);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,wBAAwBA,CAItCC,kBAAkD,EAClDC,MAAsC,EACN;EAChC,IAAI,CAACD,kBAAkB,EAAE;IACvB,OAAOE,SAAS;EAClB;EACA,IAAID,MAAM,CAACE,WAAW,IAAIF,MAAM,CAACG,YAAY,CAACC,MAAM,GAAG,CAAC,EAAE;IACxD,OAAOL,kBAAkB;EAC3B;EACA,MAAMM,WAA8D,GAAG;IACrEC,WAAW,EAAE;MAAEC,GAAG,EAAEP,MAAM,CAACG,YAAY,CAACK,GAAG,CAAEC,CAAC,IAAKA,CAAC,CAACH,WAAW;IAAE;EACpE,CAAC;EACD,OAAOP,kBAAkB,CAACW,KAAK,CAACL,WAAmC,CAAC;AACtE","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editableUtils.js","names":["isColumnDeclaredEditable","editable","isCellEditable","object","cellValuesEqual","a","b"],"sources":["editableUtils.ts"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { RowData } from \"@tanstack/react-table\";\n\nexport type EditablePredicate<TData extends RowData = RowData> =\n | boolean\n | ((object: TData) => boolean);\n\n/**\n * Whether a column declares any editing behavior.\n *\n * Returns `true` when `editable` is `true` or a predicate function. The\n * predicate may still return `false` for individual rows — that decision is\n * made per-cell via {@link isCellEditable}. This function answers the\n * column-level question used to drive table-wide UI like the bottom edit bar.\n */\nexport function isColumnDeclaredEditable<TData extends RowData>(\n editable: EditablePredicate<TData> | undefined
|
|
1
|
+
{"version":3,"file":"editableUtils.js","names":["isColumnDeclaredEditable","editable","isCellEditable","object","cellValuesEqual","a","b"],"sources":["editableUtils.ts"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { RowData } from \"@tanstack/react-table\";\n\nexport type EditablePredicate<TData extends RowData = RowData> =\n | boolean\n | ((object: TData) => boolean);\n\n/**\n * Whether a column declares any editing behavior.\n *\n * Returns `true` when `editable` is `true` or a predicate function. The\n * predicate may still return `false` for individual rows — that decision is\n * made per-cell via {@link isCellEditable}. This function answers the\n * column-level question used to drive table-wide UI like the bottom edit bar.\n */\nexport function isColumnDeclaredEditable<TData extends RowData>(\n editable: EditablePredicate<TData> | undefined\n): boolean {\n return editable === true || typeof editable === \"function\";\n}\n\n/**\n * Whether a specific cell is editable, given the column's `editable` value\n * and the row's object. Used at render time per cell.\n */\nexport function isCellEditable<TData extends RowData>(\n editable: EditablePredicate<TData> | undefined,\n object: TData\n): boolean {\n if (typeof editable === \"function\") {\n return editable(object);\n }\n return editable === true;\n}\n\n/**\n * Whether two cell values are equivalent for the purpose of detecting \"no\n * actual edit\". Treats `null` and `undefined` as the same \"empty\" state so\n * clearing a never-set cell doesn't register as an edit. `\"\"` is kept\n * distinct because an empty string can be meaningful data (e.g. a data\n * quality signal) and clearing it to null IS an edit.\n */\nexport function cellValuesEqual(a: unknown, b: unknown): boolean {\n return (a ?? null) === (b ?? null);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,wBAAwBA,CACtCC,QAA8C,EACrC;EACT,OAAOA,QAAQ,KAAK,IAAI,IAAI,OAAOA,QAAQ,KAAK,UAAU;AAC5D;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAC5BD,QAA8C,EAC9CE,MAAa,EACJ;EACT,IAAI,OAAOF,QAAQ,KAAK,UAAU,EAAE;IAClC,OAAOA,QAAQ,CAACE,MAAM,CAAC;EACzB;EACA,OAAOF,QAAQ,KAAK,IAAI;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,eAAeA,CAACC,CAAU,EAAEC,CAAU,EAAW;EAC/D,OAAO,CAACD,CAAC,IAAI,IAAI,OAAOC,CAAC,IAAI,IAAI,CAAC;AACpC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functionColumns.js","names":["chunk","extractFunctionLocators","columnDefinitions","filter","colDef","locator","type","map","buildPagedObjectSets","client","objectOrInterfaceType","objects","pageSize","isObjectType","baseObjectSet","undefined","page","whereClause","$primaryKey","$in","obj","objectSet","where"],"sources":["functionColumns.ts"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectOrInterfaceDefinition,\n ObjectSet,\n Osdk,\n PropertyKeys,\n QueryDefinition,\n SimplePropertyDef,\n WhereClause,\n} from \"@osdk/api\";\nimport type { Client } from \"@osdk/client\";\nimport { chunk } from \"lodash-es\";\nimport type {\n ColumnDefinition,\n FunctionColumnLocator,\n} from \"../ObjectTableApi.js\";\n\n/** A page's filtered ObjectSet paired with the row objects it covers. */\nexport interface PagedObjects<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n> {\n objectSet: ObjectSet<Q, RDPs>;\n objects: Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>[];\n}\n\n/** Filters columnDefinitions down to only function-backed locators. */\nexport function extractFunctionLocators<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<\n string,\n never\n >,\n>(\n columnDefinitions:\n | Array<ColumnDefinition<Q, RDPs, FunctionColumns>>\n | undefined
|
|
1
|
+
{"version":3,"file":"functionColumns.js","names":["chunk","extractFunctionLocators","columnDefinitions","filter","colDef","locator","type","map","buildPagedObjectSets","client","objectOrInterfaceType","objects","pageSize","isObjectType","baseObjectSet","undefined","page","whereClause","$primaryKey","$in","obj","objectSet","where"],"sources":["functionColumns.ts"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectOrInterfaceDefinition,\n ObjectSet,\n Osdk,\n PropertyKeys,\n QueryDefinition,\n SimplePropertyDef,\n WhereClause,\n} from \"@osdk/api\";\nimport type { Client } from \"@osdk/client\";\nimport { chunk } from \"lodash-es\";\n\nimport type {\n ColumnDefinition,\n FunctionColumnLocator,\n} from \"../ObjectTableApi.js\";\n\n/** A page's filtered ObjectSet paired with the row objects it covers. */\nexport interface PagedObjects<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n> {\n objectSet: ObjectSet<Q, RDPs>;\n objects: Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>[];\n}\n\n/** Filters columnDefinitions down to only function-backed locators. */\nexport function extractFunctionLocators<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<\n string,\n never\n >,\n>(\n columnDefinitions:\n | Array<ColumnDefinition<Q, RDPs, FunctionColumns>>\n | undefined\n): FunctionColumnLocator<Q, RDPs, FunctionColumns>[] {\n if (!columnDefinitions) return [];\n\n return columnDefinitions\n .filter((colDef) => colDef.locator.type === \"function\")\n .map(\n (colDef) =>\n colDef.locator as FunctionColumnLocator<Q, RDPs, FunctionColumns>\n );\n}\n\n/**\n * Constructs the per-page object sets used to fetch function-backed column\n * values for `objects`. Builds an unfiltered base set from\n * `objectOrInterfaceType` (so pages are scoped purely by primary key) and\n * narrows each page via `{ $primaryKey: { $in: pageKeys } }`.\n *\n * Returns `[]` when the type is an interface (no base set can be built) or\n * when no primary-key apiName is available and the input is empty.\n */\nexport function buildPagedObjectSets<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n>(\n client: Client,\n objectOrInterfaceType: Q,\n objects: Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>[],\n pageSize: number\n): PagedObjects<Q, RDPs>[] {\n const isObjectType = objectOrInterfaceType.type === \"object\";\n\n const baseObjectSet = isObjectType\n ? (client(objectOrInterfaceType) as ObjectSet<Q, RDPs>)\n : undefined;\n\n if (!baseObjectSet) {\n return [];\n }\n\n return chunk(objects, pageSize).map((page) => {\n const whereClause = {\n $primaryKey: {\n $in: page.map((obj) => obj.$primaryKey),\n },\n } as unknown as WhereClause<Q, RDPs>;\n\n return { objectSet: baseObjectSet.where(whereClause), objects: page };\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA,SAASA,KAAK,QAAQ,WAAW;;AAOjC;;AASA;AACA,OAAO,SAASC,uBAAuBA,CAQrCC,iBAEa,EACsC;EACnD,IAAI,CAACA,iBAAiB,EAAE,OAAO,EAAE;EAEjC,OAAOA,iBAAiB,CACrBC,MAAM,CAAEC,MAAM,IAAKA,MAAM,CAACC,OAAO,CAACC,IAAI,KAAK,UAAU,CAAC,CACtDC,GAAG,CACDH,MAAM,IACLA,MAAM,CAACC,OACX,CAAC;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,oBAAoBA,CAIlCC,MAAc,EACdC,qBAAwB,EACxBC,OAAwE,EACxEC,QAAgB,EACS;EACzB,MAAMC,YAAY,GAAGH,qBAAqB,CAACJ,IAAI,KAAK,QAAQ;EAE5D,MAAMQ,aAAa,GAAGD,YAAY,GAC7BJ,MAAM,CAACC,qBAAqB,CAAC,GAC9BK,SAAS;EAEb,IAAI,CAACD,aAAa,EAAE;IAClB,OAAO,EAAE;EACX;EAEA,OAAOd,KAAK,CAACW,OAAO,EAAEC,QAAQ,CAAC,CAACL,GAAG,CAAES,IAAI,IAAK;IAC5C,MAAMC,WAAW,GAAG;MAClBC,WAAW,EAAE;QACXC,GAAG,EAAEH,IAAI,CAACT,GAAG,CAAEa,GAAG,IAAKA,GAAG,CAACF,WAAW;MACxC;IACF,CAAoC;IAEpC,OAAO;MAAEG,SAAS,EAAEP,aAAa,CAACQ,KAAK,CAACL,WAAW,CAAC;MAAEN,OAAO,EAAEK;IAAK,CAAC;EACvE,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getColumnPinningStyles.js","names":["getColumnPinningStyles","column","isPinned","getIsPinned","columnStyles","left","getStart","undefined","right","getAfter","width","getSize"],"sources":["getColumnPinningStyles.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Column } from \"@tanstack/react-table\";\nimport type React from \"react\";\n\ninterface PinningStyles {\n columnStyles: React.CSSProperties;\n}\n\nexport function getColumnPinningStyles<TData>(\n column: Column<TData, unknown
|
|
1
|
+
{"version":3,"file":"getColumnPinningStyles.js","names":["getColumnPinningStyles","column","isPinned","getIsPinned","columnStyles","left","getStart","undefined","right","getAfter","width","getSize"],"sources":["getColumnPinningStyles.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Column } from \"@tanstack/react-table\";\nimport type React from \"react\";\n\ninterface PinningStyles {\n columnStyles: React.CSSProperties;\n}\n\nexport function getColumnPinningStyles<TData>(\n column: Column<TData, unknown>\n): PinningStyles {\n const isPinned = column.getIsPinned();\n\n return {\n columnStyles: {\n left: isPinned === \"left\" ? `${column.getStart(\"left\")}px` : undefined,\n right: isPinned === \"right\" ? `${column.getAfter(\"right\")}px` : undefined,\n width: column.getSize(),\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,OAAO,SAASA,sBAAsBA,CACpCC,MAA8B,EACf;EACf,MAAMC,QAAQ,GAAGD,MAAM,CAACE,WAAW,CAAC,CAAC;EAErC,OAAO;IACLC,YAAY,EAAE;MACZC,IAAI,EAAEH,QAAQ,KAAK,MAAM,GAAG,GAAGD,MAAM,CAACK,QAAQ,CAAC,MAAM,CAAC,IAAI,GAAGC,SAAS;MACtEC,KAAK,EAAEN,QAAQ,KAAK,OAAO,GAAG,GAAGD,MAAM,CAACQ,QAAQ,CAAC,OAAO,CAAC,IAAI,GAAGF,SAAS;MACzEG,KAAK,EAAET,MAAM,CAACU,OAAO,CAAC;IACxB;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRowId.js","names":["getRowId","row","getRowIdFromPrimaryKey","$primaryKey","primaryKey","toString"],"sources":["getRowId.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectOrInterfaceDefinition,\n Osdk,\n PrimaryKeyType,\n PropertyKeys,\n SimplePropertyDef,\n} from \"@osdk/api\";\n\nexport const getRowId = <\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record
|
|
1
|
+
{"version":3,"file":"getRowId.js","names":["getRowId","row","getRowIdFromPrimaryKey","$primaryKey","primaryKey","toString"],"sources":["getRowId.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectOrInterfaceDefinition,\n Osdk,\n PrimaryKeyType,\n PropertyKeys,\n SimplePropertyDef,\n} from \"@osdk/api\";\n\nexport const getRowId = <\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n>(\n row: Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>\n): string => {\n return getRowIdFromPrimaryKey(row.$primaryKey);\n};\n\nexport const getRowIdFromPrimaryKey = <Q extends ObjectOrInterfaceDefinition>(\n primaryKey: PrimaryKeyType<Q>\n): string => primaryKey.toString();\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,OAAO,MAAMA,QAAQ,GAInBC,GAAkE,IACvD;EACX,OAAOC,sBAAsB,CAACD,GAAG,CAACE,WAAW,CAAC;AAChD,CAAC;AAED,OAAO,MAAMD,sBAAsB,GACjCE,UAA6B,IAClBA,UAAU,CAACC,QAAQ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectTableSnapshot.js","names":["DEFAULT_MAX_CONCURRENT_REQUESTS","DEFAULT_SNAPSHOT_ROW_LIMIT","buildSnapshotRow","object","columnIds","functionLocators","functionColumnValues","cells","Map","locator","columnId","String","id","set","get","getKey","has","$primaryKey","getValue","fetchFunctionColumnPage","executeFunction","page","cellsByKey","params","getFunctionParams","objectSet","rawResult","obj","objects","objectKey","rawCell","cause","error","Error","fetchFunctionColumnValues","locators","pages","maxConcurrent","valuesByColumnId","tasks","flatMap","map","pageMaps","mapWithConcurrency","task","queryDefinition","forEach","pageMap","index","merged","key","value","execute","results","Array","length","poolSize","Math","max","min","pointer","Promise","all","from"],"sources":["objectTableSnapshot.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectOrInterfaceDefinition,\n Osdk,\n PropertyKeys,\n QueryDefinition,\n SimplePropertyDef,\n} from \"@osdk/api\";\nimport type {\n FunctionColumnLocator,\n ObjectTableDataRow,\n} from \"../ObjectTableApi.js\";\nimport { DEFAULT_MAX_CONCURRENT_REQUESTS } from \"./constants.js\";\nimport type { PagedObjects } from \"./functionColumns.js\";\n\n/**\n * Default value for `getSnapshot`'s `rowLimit`. When the object set's total\n * row count exceeds this value, {@link ObjectTableHandle.getSnapshot} rejects,\n * guarding against runaway loads over very large object sets.\n */\nexport const DEFAULT_SNAPSHOT_ROW_LIMIT = 10_000;\n\n/**\n * Builds a single {@link ObjectTableDataRow} for a loaded object. Property and\n * derived-property cells read straight off the object; function-backed cells\n * are looked up in the pre-resolved per-locator values map (whose values are\n * either the raw cell or, for failed pages, an `Error` instance).\n */\nexport function buildSnapshotRow<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n FunctionColumns extends Record<string, QueryDefinition<{}>>,\n>(\n object: Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>,\n columnIds: ReadonlyArray<string>,\n functionLocators: ReadonlyArray<\n FunctionColumnLocator<Q, RDPs, FunctionColumns>\n >,\n functionColumnValues: Map<string, Map<string, unknown>> | undefined,\n): ObjectTableDataRow<Q, RDPs> {\n const cells = new Map<string, unknown>();\n\n // Resolve function-backed cells first so a same-named property doesn't\n // overwrite them.\n for (const locator of functionLocators) {\n const columnId = String(locator.id);\n cells.set(\n columnId,\n functionColumnValues?.get(columnId)?.get(locator.getKey(object)),\n );\n }\n\n const source = object as unknown as Record<string, unknown>;\n for (const columnId of columnIds) {\n if (cells.has(columnId)) continue;\n cells.set(columnId, source[columnId]);\n }\n\n return {\n id: String(object.$primaryKey),\n object,\n getValue: (columnId: string) => cells.get(columnId),\n };\n}\n\n/**\n * Executes a function-backed column for one page, applies `getValue`, and\n * returns a map keyed by `locator.getKey(obj)` so callers can merge values\n * back onto each row.\n *\n * On query failure, every object in the page maps to the thrown `Error`,\n * so the caller surfaces a per-cell error rather than dropping the column.\n */\nexport async function fetchFunctionColumnPage<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n FunctionColumns extends Record<string, QueryDefinition<{}>>,\n>(\n executeFunction: (params: unknown) => Promise<unknown>,\n locator: FunctionColumnLocator<Q, RDPs, FunctionColumns>,\n page: PagedObjects<Q, RDPs>,\n): Promise<Map<string, unknown>> {\n const cellsByKey = new Map<string, unknown>();\n try {\n const params = locator.getFunctionParams(page.objectSet);\n const rawResult = await executeFunction(params) as\n | Record<string, unknown>\n | undefined;\n\n for (const obj of page.objects) {\n const objectKey = locator.getKey(obj);\n const rawCell = rawResult?.[objectKey];\n cellsByKey.set(\n objectKey,\n locator.getValue ? locator.getValue(rawCell) : rawCell,\n );\n }\n } catch (cause) {\n const error = cause instanceof Error ? cause : new Error(String(cause));\n for (const obj of page.objects) {\n cellsByKey.set(locator.getKey(obj), error);\n }\n }\n return cellsByKey;\n}\n\n/**\n * Resolves async column values for all loaded rows by paginating each function\n * locator across the rows. Returns the per-locator map of `getKey(obj)` →\n * cell value (already `getValue`-unwrapped, or an `Error` for failed pages).\n *\n * Each (locator, page) pair is one function call. They run concurrently but no\n * more than `maxConcurrent` are in flight at once, so a wide table over many\n * pages doesn't fire hundreds of requests at the server simultaneously. This\n * mirrors the live function-column path (`useFunctionColumnsData`), which caps\n * concurrency the same way via `useOsdkFunctions`.\n */\nexport async function fetchFunctionColumnValues<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n FunctionColumns extends Record<string, QueryDefinition<{}>>,\n>(\n locators: ReadonlyArray<FunctionColumnLocator<Q, RDPs, FunctionColumns>>,\n pages: ReadonlyArray<PagedObjects<Q, RDPs>>,\n executeFunction: (\n queryDefinition: QueryDefinition<{}>,\n params: unknown,\n ) => Promise<unknown>,\n maxConcurrent: number = DEFAULT_MAX_CONCURRENT_REQUESTS,\n): Promise<Map<string, Map<string, unknown>>> {\n const valuesByColumnId = new Map<string, Map<string, unknown>>();\n for (const locator of locators) {\n valuesByColumnId.set(String(locator.id), new Map());\n }\n\n // Flatten to one task per (locator, page) so concurrency is bounded across\n // every request, not just within a single locator.\n const tasks = locators.flatMap((locator) =>\n pages.map((page) => ({ columnId: String(locator.id), locator, page }))\n );\n\n // One entry per task (same index as `tasks`). Each entry is a\n // `Map<objectKey, cellValue>` for that (locator, page) pair, where\n // `objectKey` is `locator.getKey(obj)` and `cellValue` is the unwrapped\n // result — or an `Error` if the page's function call threw.\n const pageMaps = await mapWithConcurrency(\n tasks,\n maxConcurrent,\n (task) =>\n fetchFunctionColumnPage(\n (params) => executeFunction(task.locator.queryDefinition, params),\n task.locator,\n task.page,\n ),\n );\n\n pageMaps.forEach((pageMap, index) => {\n const merged = valuesByColumnId.get(tasks[index].columnId);\n if (merged == null) return;\n for (const [key, value] of pageMap) {\n merged.set(key, value);\n }\n });\n\n return valuesByColumnId;\n}\n\n/**\n * Runs `execute` over `tasks` with at most `maxConcurrent` invocations in flight at a\n * time, preserving input order in the returned results. A small fixed pool of\n * workers pulls from a shared cursor until the tasks are exhausted.\n */\nasync function mapWithConcurrency<T, R>(\n tasks: ReadonlyArray<T>,\n maxConcurrent: number,\n execute: (task: T, index: number) => Promise<R>,\n): Promise<R[]> {\n // Pre-sized so workers write at their claimed index so input order is preserved.\n const results = new Array<R>(tasks.length);\n\n // Cap pool at maxConcurrent, but never more workers than tasks (and at least 1).\n const poolSize = Math.max(1, Math.min(maxConcurrent, tasks.length));\n\n let pointer = 0;\n\n const runExecute = async (): Promise<void> => {\n while (pointer < tasks.length) {\n const index = pointer;\n pointer++;\n results[index] = await execute(tasks[index], index);\n }\n };\n\n /**\n * Let's say we have maxConcurrent = 2, and 3 tasks\n * Pool = [_, _], each pool calls runExecute\n * Within each runExecute, there's a loop synchronously execute tasks.\n *\n * So at the beginning, we will have at most 2 concurrent requests, one execute in each pool.\n * The first execute to finish would enter the next loop, and start the next task.\n * The second execute will finish and find that pointer >= tasks.length and exit.\n */\n await Promise.all(Array.from({ length: poolSize }, runExecute));\n\n return results;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA,SAASA,+BAA+B,QAAQ,gBAAgB;AAGhE;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,0BAA0B,GAAG,MAAM;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAK9BC,MAAqE,EACrEC,SAAgC,EAChCC,gBAEC,EACDC,oBAAmE,EACtC;EAC7B,MAAMC,KAAK,GAAG,IAAIC,GAAG,CAAkB,CAAC;;EAExC;EACA;EACA,KAAK,MAAMC,OAAO,IAAIJ,gBAAgB,EAAE;IACtC,MAAMK,QAAQ,GAAGC,MAAM,CAACF,OAAO,CAACG,EAAE,CAAC;IACnCL,KAAK,CAACM,GAAG,CACPH,QAAQ,EACRJ,oBAAoB,EAAEQ,GAAG,CAACJ,QAAQ,CAAC,EAAEI,GAAG,CAACL,OAAO,CAACM,MAAM,CAACZ,MAAM,CAAC,CACjE,CAAC;EACH;EAGA,KAAK,MAAMO,QAAQ,IAA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AG,CAACqC,GAAG,EAAEC,KAAK,CAAC;IACxB;EACF,CAAC,CAAC;EAEF,OAAOb,gBAAgB;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAeK,kBAAkBA,CAC/BJ,KAAuB,EACvBF,aAAqB,EACrBe,OAA+C,EACjC;EACd;EACA,MAAMC,OAAO,GAAG,IAAIC,KAAK,CAAIf,KAAK,CAACgB,MAAM,CAAC;;EAE1C;EACA,MAAMC,QAAQ,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAED,IAAI,CAACE,GAAG,CAACtB,aAAa,EAAEE,KAAK,CAACgB,MAAM,CAAC,CAAC;EAEnE,IAAIK,OAAO,GAAG,CAAC;EAUf;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,MAAMC,OAAO,CAACC,GAAG,CAACR,KAAK,CAACS,IAAI,CAAC;IAAER,MAAM,EAAEC;EAAS,CAAC,EAjB9B,YAA2B;IAC5C,OAAOI,OAAO,GAAGrB,KAAK,CAACgB,MAAM,EAAE;MAC7B,MAAMP,KAAK,GAAGY,OAAO;MACrBA,OAAO,EAAE;MACTP,OAAO,CAACL,KAAK,CAAC,GAAG,MAAMI,OAAO,CAACb,KAAK,CAACS,KAAK,CAAC,EAAEA,KAAK,CAAC;IACrD;EACF,CAW6D,CAAC,CAAC;EAE/D,OAAOK,OAAO;AAChB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"objectTableSnapshot.js","names":["DEFAULT_MAX_CONCURRENT_REQUESTS","DEFAULT_SNAPSHOT_ROW_LIMIT","buildSnapshotRow","object","columnIds","functionLocators","functionColumnValues","cells","Map","locator","columnId","String","id","set","get","getKey","has","$primaryKey","getValue","fetchFunctionColumnPage","executeFunction","page","cellsByKey","params","getFunctionParams","objectSet","rawResult","obj","objects","objectKey","rawCell","cause","error","Error","fetchFunctionColumnValues","locators","pages","maxConcurrent","valuesByColumnId","tasks","flatMap","map","pageMaps","mapWithConcurrency","task","queryDefinition","forEach","pageMap","index","merged","key","value","execute","results","Array","length","poolSize","Math","max","min","pointer","Promise","all","from"],"sources":["objectTableSnapshot.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectOrInterfaceDefinition,\n Osdk,\n PropertyKeys,\n QueryDefinition,\n SimplePropertyDef,\n} from \"@osdk/api\";\n\nimport type {\n FunctionColumnLocator,\n ObjectTableDataRow,\n} from \"../ObjectTableApi.js\";\nimport { DEFAULT_MAX_CONCURRENT_REQUESTS } from \"./constants.js\";\nimport type { PagedObjects } from \"./functionColumns.js\";\n\n/**\n * Default value for `getSnapshot`'s `rowLimit`. When the object set's total\n * row count exceeds this value, {@link ObjectTableHandle.getSnapshot} rejects,\n * guarding against runaway loads over very large object sets.\n */\nexport const DEFAULT_SNAPSHOT_ROW_LIMIT = 10_000;\n\n/**\n * Builds a single {@link ObjectTableDataRow} for a loaded object. Property and\n * derived-property cells read straight off the object; function-backed cells\n * are looked up in the pre-resolved per-locator values map (whose values are\n * either the raw cell or, for failed pages, an `Error` instance).\n */\nexport function buildSnapshotRow<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n FunctionColumns extends Record<string, QueryDefinition<{}>>,\n>(\n object: Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>,\n columnIds: ReadonlyArray<string>,\n functionLocators: ReadonlyArray<\n FunctionColumnLocator<Q, RDPs, FunctionColumns>\n >,\n functionColumnValues: Map<string, Map<string, unknown>> | undefined\n): ObjectTableDataRow<Q, RDPs> {\n const cells = new Map<string, unknown>();\n\n // Resolve function-backed cells first so a same-named property doesn't\n // overwrite them.\n for (const locator of functionLocators) {\n const columnId = String(locator.id);\n cells.set(\n columnId,\n functionColumnValues?.get(columnId)?.get(locator.getKey(object))\n );\n }\n\n const source = object as unknown as Record<string, unknown>;\n for (const columnId of columnIds) {\n if (cells.has(columnId)) continue;\n cells.set(columnId, source[columnId]);\n }\n\n return {\n id: String(object.$primaryKey),\n object,\n getValue: (columnId: string) => cells.get(columnId),\n };\n}\n\n/**\n * Executes a function-backed column for one page, applies `getValue`, and\n * returns a map keyed by `locator.getKey(obj)` so callers can merge values\n * back onto each row.\n *\n * On query failure, every object in the page maps to the thrown `Error`,\n * so the caller surfaces a per-cell error rather than dropping the column.\n */\nexport async function fetchFunctionColumnPage<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n FunctionColumns extends Record<string, QueryDefinition<{}>>,\n>(\n executeFunction: (params: unknown) => Promise<unknown>,\n locator: FunctionColumnLocator<Q, RDPs, FunctionColumns>,\n page: PagedObjects<Q, RDPs>\n): Promise<Map<string, unknown>> {\n const cellsByKey = new Map<string, unknown>();\n try {\n const params = locator.getFunctionParams(page.objectSet);\n const rawResult = (await executeFunction(params)) as\n | Record<string, unknown>\n | undefined;\n\n for (const obj of page.objects) {\n const objectKey = locator.getKey(obj);\n const rawCell = rawResult?.[objectKey];\n cellsByKey.set(\n objectKey,\n locator.getValue ? locator.getValue(rawCell) : rawCell\n );\n }\n } catch (cause) {\n const error = cause instanceof Error ? cause : new Error(String(cause));\n for (const obj of page.objects) {\n cellsByKey.set(locator.getKey(obj), error);\n }\n }\n return cellsByKey;\n}\n\n/**\n * Resolves async column values for all loaded rows by paginating each function\n * locator across the rows. Returns the per-locator map of `getKey(obj)` →\n * cell value (already `getValue`-unwrapped, or an `Error` for failed pages).\n *\n * Each (locator, page) pair is one function call. They run concurrently but no\n * more than `maxConcurrent` are in flight at once, so a wide table over many\n * pages doesn't fire hundreds of requests at the server simultaneously. This\n * mirrors the live function-column path (`useFunctionColumnsData`), which caps\n * concurrency the same way via `useOsdkFunctions`.\n */\nexport async function fetchFunctionColumnValues<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n FunctionColumns extends Record<string, QueryDefinition<{}>>,\n>(\n locators: ReadonlyArray<FunctionColumnLocator<Q, RDPs, FunctionColumns>>,\n pages: ReadonlyArray<PagedObjects<Q, RDPs>>,\n executeFunction: (\n queryDefinition: QueryDefinition<{}>,\n params: unknown\n ) => Promise<unknown>,\n maxConcurrent: number = DEFAULT_MAX_CONCURRENT_REQUESTS\n): Promise<Map<string, Map<string, unknown>>> {\n const valuesByColumnId = new Map<string, Map<string, unknown>>();\n for (const locator of locators) {\n valuesByColumnId.set(String(locator.id), new Map());\n }\n\n // Flatten to one task per (locator, page) so concurrency is bounded across\n // every request, not just within a single locator.\n const tasks = locators.flatMap((locator) =>\n pages.map((page) => ({ columnId: String(locator.id), locator, page }))\n );\n\n // One entry per task (same index as `tasks`). Each entry is a\n // `Map<objectKey, cellValue>` for that (locator, page) pair, where\n // `objectKey` is `locator.getKey(obj)` and `cellValue` is the unwrapped\n // result — or an `Error` if the page's function call threw.\n const pageMaps = await mapWithConcurrency(tasks, maxConcurrent, (task) =>\n fetchFunctionColumnPage(\n (params) => executeFunction(task.locator.queryDefinition, params),\n task.locator,\n task.page\n )\n );\n\n pageMaps.forEach((pageMap, index) => {\n const merged = valuesByColumnId.get(tasks[index].columnId);\n if (merged == null) return;\n for (const [key, value] of pageMap) {\n merged.set(key, value);\n }\n });\n\n return valuesByColumnId;\n}\n\n/**\n * Runs `execute` over `tasks` with at most `maxConcurrent` invocations in flight at a\n * time, preserving input order in the returned results. A small fixed pool of\n * workers pulls from a shared cursor until the tasks are exhausted.\n */\nasync function mapWithConcurrency<T, R>(\n tasks: ReadonlyArray<T>,\n maxConcurrent: number,\n execute: (task: T, index: number) => Promise<R>\n): Promise<R[]> {\n // Pre-sized so workers write at their claimed index so input order is preserved.\n const results = new Array<R>(tasks.length);\n\n // Cap pool at maxConcurrent, but never more workers than tasks (and at least 1).\n const poolSize = Math.max(1, Math.min(maxConcurrent, tasks.length));\n\n let pointer = 0;\n\n const runExecute = async (): Promise<void> => {\n while (pointer < tasks.length) {\n const index = pointer;\n pointer++;\n results[index] = await execute(tasks[index], index);\n }\n };\n\n /**\n * Let's say we have maxConcurrent = 2, and 3 tasks\n * Pool = [_, _], each pool calls runExecute\n * Within each runExecute, there's a loop synchronously execute tasks.\n *\n * So at the beginning, we will have at most 2 concurrent requests, one execute in each pool.\n * The first execute to finish would enter the next loop, and start the next task.\n * The second execute will finish and find that pointer >= tasks.length and exit.\n */\n await Promise.all(Array.from({ length: poolSize }, runExecute));\n\n return results;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcA,SAASA,+BAA+B,QAAQ,gBAAgB;AAGhE;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,0BAA0B,GAAG,MAAM;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAK9BC,MAAqE,EACrEC,SAAgC,EAChCC,gBAEC,EACDC,oBAAmE,EACtC;EAC7B,MAAMC,KAAK,GAAG,IAAIC,GAAG,CAAkB,CAAC;;EAExC;EACA;EACA,KAAK,MAAMC,OAAO,IAAIJ,gBAAgB,EAAE;IACtC,MAAMK,QAAQ,GAAGC,MAAM,CAACF,OAAO,CAACG,EAAE,CAAC;IACnCL,KAAK,CAACM,GAAG,CACPH,QAAQ,EACRJ,oBAAoB,EAAEQ,GAAG,CAACJ,QAAQ,CAAC,EAAEI,GAAG,CAACL,OAAO,CAACM,MAAM,CAACZ,MAAM,CAAC,CACjE,CAAC;EACH;EAGA,KAAK,MAAMO,QAAQ,IAAIN,SAAS,EAAE;IAChC,IAAIG,KAAK,CAACS,GAAG,CAACN,QAAQ,CA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F,OAAOb,gBAAgB;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAeK,kBAAkBA,CAC/BJ,KAAuB,EACvBF,aAAqB,EACrBe,OAA+C,EACjC;EACd;EACA,MAAMC,OAAO,GAAG,IAAIC,KAAK,CAAIf,KAAK,CAACgB,MAAM,CAAC;;EAE1C;EACA,MAAMC,QAAQ,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAED,IAAI,CAACE,GAAG,CAACtB,aAAa,EAAEE,KAAK,CAACgB,MAAM,CAAC,CAAC;EAEnE,IAAIK,OAAO,GAAG,CAAC;EAUf;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,MAAMC,OAAO,CAACC,GAAG,CAACR,KAAK,CAACS,IAAI,CAAC;IAAER,MAAM,EAAEC;EAAS,CAAC,EAjB9B,YAA2B;IAC5C,OAAOI,OAAO,GAAGrB,KAAK,CAACgB,MAAM,EAAE;MAC7B,MAAMP,KAAK,GAAGY,OAAO;MACrBA,OAAO,EAAE;MACTP,OAAO,CAACL,KAAK,CAAC,GAAG,MAAMI,OAAO,CAACb,KAAK,CAACS,KAAK,CAAC,EAAEA,KAAK,CAAC;IACrD;EACF,CAW6D,CAAC,CAAC;EAE/D,OAAOK,OAAO;AAChB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shouldShowEditableCell.js","names":["shouldShowEditableCell","editable","onCellEdit","isInEditMode"],"sources":["shouldShowEditableCell.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { EditablePredicate } from \"./editableUtils.js\";\n\n/**\n * Determines if a cell should be rendered as editable\n *\n * @param editable - Whether the column is marked as editable\n * @param onCellEdit - The onCellEdit callback from table meta (indicates edit handlers exist)\n * @param isInEditMode - Whether the table is currently in edit mode\n * @returns true if the cell should be rendered with edit controls\n */\nexport function shouldShowEditableCell<TData>(\n editable: EditablePredicate<TData> | undefined,\n onCellEdit: unknown,\n isInEditMode: boolean | undefined
|
|
1
|
+
{"version":3,"file":"shouldShowEditableCell.js","names":["shouldShowEditableCell","editable","onCellEdit","isInEditMode"],"sources":["shouldShowEditableCell.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { EditablePredicate } from \"./editableUtils.js\";\n\n/**\n * Determines if a cell should be rendered as editable\n *\n * @param editable - Whether the column is marked as editable\n * @param onCellEdit - The onCellEdit callback from table meta (indicates edit handlers exist)\n * @param isInEditMode - Whether the table is currently in edit mode\n * @returns true if the cell should be rendered with edit controls\n */\nexport function shouldShowEditableCell<TData>(\n editable: EditablePredicate<TData> | undefined,\n onCellEdit: unknown,\n isInEditMode: boolean | undefined\n): boolean {\n return (\n editable != null &&\n editable !== false &&\n onCellEdit != null &&\n isInEditMode === true\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,sBAAsBA,CACpCC,QAA8C,EAC9CC,UAAmB,EACnBC,YAAiC,EACxB;EACT,OACEF,QAAQ,IAAI,IAAI,IAChBA,QAAQ,KAAK,KAAK,IAClBC,UAAU,IAAI,IAAI,IAClBC,YAAY,KAAK,IAAI;AAEzB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["types.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n SimplePropertyDef,\n} from \"@osdk/api\";\nimport type { RowData } from \"@tanstack/react-table\";\n\nexport interface ColumnOption {\n id: string;\n name: string;\n canSort: boolean;\n}\n\nexport interface CellIdentifier {\n rowId: string;\n columnId: string;\n}\n\nexport interface CellEditInfo<\n TData extends RowData = unknown,\n CellValue = unknown,\n> extends CellIdentifier {\n newValue: CellValue | null;\n oldValue: CellValue | null;\n originalRowData: TData;\n}\n\nexport type EditModeState =\n | { type: \"always\"; isActive: true }\n | { type: \"manual\"; isActive: boolean; setActive: (value: boolean) => void };\n\nexport interface EditableConfig<\n TData extends RowData = unknown,\n CellValue = unknown,\n> {\n cellEdits: Record<string, CellEditInfo<TData, CellValue>>;\n onCellEdit: (
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["types.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectOrInterfaceDefinition,\n PropertyKeys,\n SimplePropertyDef,\n} from \"@osdk/api\";\nimport type { RowData } from \"@tanstack/react-table\";\n\nexport interface ColumnOption {\n id: string;\n name: string;\n canSort: boolean;\n}\n\nexport interface CellIdentifier {\n rowId: string;\n columnId: string;\n}\n\nexport interface CellEditInfo<\n TData extends RowData = unknown,\n CellValue = unknown,\n> extends CellIdentifier {\n newValue: CellValue | null;\n oldValue: CellValue | null;\n originalRowData: TData;\n}\n\nexport type EditModeState =\n | { type: \"always\"; isActive: true }\n | { type: \"manual\"; isActive: boolean; setActive: (value: boolean) => void };\n\nexport interface EditableConfig<\n TData extends RowData = unknown,\n CellValue = unknown,\n> {\n cellEdits: Record<string, CellEditInfo<TData, CellValue>>;\n onCellEdit: (cellId: string, info: CellEditInfo<TData, CellValue>) => void;\n onSubmitEdits?: () => Promise<boolean>;\n clearEdits: () => void;\n editModeState: EditModeState;\n onCellValidationError: (cellId: string, error: string) => void;\n validationErrors: Map<string, string>;\n clearCellValidationError: (cellId: string) => void;\n}\n\n/**\n * User-facing configuration for a dropdown editor in a table cell.\n *\n * This is intentionally a standalone interface rather than re-exporting\n * `DropdownFieldProps` from ActionForm, so the table API doesn't break\n * when ActionForm's prop shape changes (e.g. adding form-specific fields).\n */\nexport interface DropdownEditConfig<V = unknown> {\n /**\n * Available items for the dropdown.\n */\n items: V[];\n\n /**\n * Converts an item to a display string. Defaults to `String()`.\n *\n * `item` may be `undefined` when the cell has no value yet — the formatter\n * is responsible for producing a sensible label in that case.\n */\n itemToStringLabel?(item: V | undefined): string;\n\n /**\n * Returns a unique string key for a list item. Used as the React `key`.\n * Falls back to the item's index when not provided.\n */\n itemToKey?: (item: V) => string;\n\n /**\n * Custom equality check for item values. Defaults to `Object.is`.\n * Required when items are objects to ensure correct selection matching.\n */\n isItemEqual?: (a: V, b: V) => boolean;\n\n /**\n * Whether the dropdown allows searching/filtering.\n * When true, renders a Combobox with a search input.\n * When false (default), renders a Select dropdown.\n */\n isSearchable?: boolean;\n\n /**\n * Placeholder text shown when no value is selected.\n */\n placeholder?: string;\n\n /**\n * Whether multiple values can be selected.\n */\n isMultiple?: boolean;\n}\n\n/**\n * User-facing configuration for a date picker editor in a table cell.\n *\n * Standalone by design rather than re-exporting `DatePickerProps` so the\n * table API doesn't break when the picker's prop shape changes.\n */\nexport interface DatePickerEditConfig {\n /**\n * The earliest date the user can select.\n */\n min?: Date;\n\n /**\n * The latest date the user can select.\n */\n max?: Date;\n\n /**\n * Whether to show a time picker alongside the calendar.\n */\n showTime?: boolean;\n\n /**\n * Whether to close the popover after selecting a date.\n * @default true when `showTime` is false, false when `showTime` is true\n */\n closeOnSelection?: boolean;\n\n /**\n * Placeholder text shown when no value is selected.\n */\n placeholder?: string;\n\n /**\n * Formats a Date for display in the input field when not editing.\n * Provide a matching `parseDate` if using a custom format.\n */\n formatDate?: (date: Date) => string;\n\n /**\n * Parses a user-typed string back into a Date.\n * Must be the inverse of `formatDate`.\n */\n parseDate?: (text: string) => Date | undefined;\n}\n\n/**\n * Maps each supported editable field component to its user-facing config.\n */\ninterface EditFieldPropsByType {\n DROPDOWN: DropdownEditConfig;\n DATE_PICKER: DatePickerEditConfig;\n}\n\ntype EditFieldComponent = keyof EditFieldPropsByType;\n\n/**\n * Configuration for an editable cell's field component.\n *\n * `getFieldComponentProps` is called with the row's object and a map of any\n * pending cell edits for the same row, keyed by `columnId`. This lets the\n * configuration depend on row state or on other in-progress edits within the\n * row (e.g. dropdown items that change once another column is edited).\n */\nexport type EditFieldConfig<TData = unknown> = {\n [K in EditFieldComponent]: {\n fieldComponent: K;\n getFieldComponentProps: (\n object: TData,\n edits?: Record<string, CellEditInfo<TData, unknown>>\n ) => EditFieldPropsByType[K];\n };\n}[EditFieldComponent];\n\nexport type OrderBy<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = {},\n> = {\n [K in PropertyKeys<Q> | keyof RDPs]?: \"asc\" | \"desc\";\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PdfRenderer.js","names":["Error","ErrorIcon","Spin","classnames","React","useEffect","useState","BasePdfViewer","styles","fetchMediaContents","media","result","fetchContents","arrayBuffer","PdfViewer","className","pdfViewerProps","src","setSrc","undefined","loading","setLoading","error","setError","cancelled","then","buffer","catch","err","String","rootClassName","pdfViewer","createElement","loadingContainer","spinnerIcon","errorContainer","errorIcon","message","_extends"],"sources":["PdfRenderer.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Error as ErrorIcon, Spin } from \"@blueprintjs/icons\";\nimport type { Media } from \"@osdk/api\";\nimport classnames from \"classnames\";\nimport React, { useEffect, useState } from \"react\";\nimport { BasePdfViewer } from \"./PdfViewer.js\";\nimport
|
|
1
|
+
{"version":3,"file":"PdfRenderer.js","names":["Error","ErrorIcon","Spin","classnames","React","useEffect","useState","BasePdfViewer","styles","fetchMediaContents","media","result","fetchContents","arrayBuffer","PdfViewer","className","pdfViewerProps","src","setSrc","undefined","loading","setLoading","error","setError","cancelled","then","buffer","catch","err","String","rootClassName","pdfViewer","createElement","loadingContainer","spinnerIcon","errorContainer","errorIcon","message","_extends"],"sources":["PdfRenderer.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Error as ErrorIcon, Spin } from \"@blueprintjs/icons\";\nimport type { Media } from \"@osdk/api\";\nimport classnames from \"classnames\";\nimport React, { useEffect, useState } from \"react\";\n\nimport { BasePdfViewer } from \"./PdfViewer.js\";\nimport type { PdfViewerProps } from \"./types.js\";\n\nimport styles from \"./PdfViewer.module.css\";\n\nasync function fetchMediaContents(media: Media): Promise<ArrayBuffer> {\n const result = await media.fetchContents();\n return result.arrayBuffer();\n}\n\nexport interface PdfViewerMediaProps extends Omit<PdfViewerProps, \"src\"> {\n /** The Media object to fetch PDF contents from */\n media: Media;\n}\n\nexport function PdfViewer({\n media,\n className,\n ...pdfViewerProps\n}: PdfViewerMediaProps): React.ReactElement {\n const [src, setSrc] = useState<ArrayBuffer | undefined>(undefined);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState<Error | undefined>(undefined);\n\n // This is required until we either support React 19+ or a data fetching hook\n useEffect(\n function fetchMediaSource() {\n let cancelled = false;\n setLoading(true);\n setError(undefined);\n setSrc(undefined);\n\n fetchMediaContents(media)\n .then((buffer) => {\n if (!cancelled) {\n setSrc(buffer);\n setLoading(false);\n }\n })\n .catch((err: unknown) => {\n if (!cancelled) {\n setError(err instanceof Error ? err : new Error(String(err)));\n setLoading(false);\n }\n });\n\n return () => {\n cancelled = true;\n };\n },\n [media]\n );\n\n const rootClassName = classnames(styles.pdfViewer, className);\n\n if (loading) {\n return (\n <div className={rootClassName}>\n <div className={styles.loadingContainer}>\n <Spin className={styles.spinnerIcon} />\n Loading…\n </div>\n </div>\n );\n }\n\n if (error != null) {\n return (\n <div className={rootClassName}>\n <div className={styles.errorContainer}>\n <ErrorIcon className={styles.errorIcon} />\n Failed to load PDF: {error.message}\n </div>\n </div>\n );\n }\n\n if (src == null) {\n return (\n <div className={rootClassName}>\n <div className={styles.loadingContainer}>No document</div>\n </div>\n );\n }\n\n return <BasePdfViewer src={src} className={className} {...pdfViewerProps} />;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,KAAK,IAAIC,SAAS,EAAEC,IAAI,QAAQ,oBAAoB;AAE7D,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAElD,SAASC,aAAa,QAAQ,gBAAgB;AAG9C,OAAOC,MAAM,MAAM,wBAAwB;AAE3C,eAAeC,kBAAkBA,CAACC,KAAY,EAAwB;EACpE,MAAMC,MAAM,GAAG,MAAMD,KAAK,CAACE,aAAa,CAAC,CAAC;EAC1C,OAAOD,MAAM,CAACE,WAAW,CAAC,CAAC;AAC7B;AAOA,OAAO,SAASC,SAASA,CAAC;EACxBJ,KAAK;EACLK,SAAS;EACT,GAAGC;AACgB,CAAC,EAAsB;EAC1C,MAAM,CAACC,GAAG,EAAEC,MAAM,CAAC,GAAGZ,QAAQ,CAA0Ba,SAAS,CAAC;EAClE,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGf,QAAQ,CAAC,IAAI,CAAC;EAC5C,MAAM,CAACgB,KAAK,EAAEC,QAAQ,CAAC,GAAGjB,QAAQ,CAAoBa,SAAS,CAAC;;EAEhE;EACAd,SAAS,CACP,YAA4B;IAC1B,IAAImB,SAAS,GAAG,KAAK;IACrBH,UAAU,CAAC,IAAI,CAAC;IAChBE,QAAQ,CAACJ,SAAS,CAAC;IACnBD,MAAM,CAACC,SAAS,CAAC;IAEjBV,kBAAkB,CAACC,KAAK,CAAC,CACtBe,IAAI,CA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e;IAAc,gBAC5B1B,KAAA,CAAA4B,aAAA;MAAKjB,SAAS,EAAEP,MAAM,CAACyB;IAAiB,GAAC,aAAgB,CACtD,CAAC;EAEV;EAEA,oBAAO7B,KAAA,CAAA4B,aAAA,CAACzB,aAAa,EAAA+B,QAAA;IAACrB,GAAG,EAAEA,GAAI;IAACF,SAAS,EAAEA;EAAU,GAAKC,cAAc,CAAG,CAAC;AAC9E","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PdfViewer.js","names":["Error","ErrorIcon","Spin","classnames","React","forwardRef","useCallback","useImperativeHandle","PdfAnnotationOverlay","PdfViewerOutlineSidebar","PdfViewerSearchBar","PdfViewerSidebar","PdfViewerToolbar","EMPTY_ANNOTATION_ARRAY","usePdfAnnotationsByPage","usePdfFormFields","usePdfHighlightMode","usePdfViewerState","styles","BasePdfViewer","src","annotations","onAnnotationClick","onDownload","enableHighlight","onTextHighlight","onHighlightDelete","formData","onFormSubmit","onFormChange","initialPage","initialScale","initialAutoSize","initialSidebarOpen","enableDownload","downloadFileName","sidebarMode","sidebarModeProp","outlineIcons","className","ref","viewer","highlightModeActive","toggleHighlightMode","deleteHighlight","pdfViewerRef","document","enabled","scrollToPage","hasFormFields","submitFormData","eventBusRef","annotationsByPage","handleDownload","download","rootClassName","pdfViewer","loading","createElement","loadingContainer","spinnerIcon","error","errorContainer","errorIcon","message","currentPage","numPages","scale","autoSize","sidebarOpen","onPageChange","onZoomIn","zoomIn","onZoomOut","zoomOut","onAutoSizeToggle","toggleAutoSize","onSearchOpen","search","openSearch","onSidebarToggle","toggleSidebar","onRotateLeft","rotateLeft","onRotateRight","rotateRight","onHighlightToggle","enableFormSave","onFormSave","isSearchOpen","query","totalMatches","currentMatchIndex","onQueryChange","setQuery","onNext","nextMatch","onPrev","prevMatch","onClose","closeSearch","contentArea","onPageClick","onSidebarModeChange","setSidebarMode","outlineItems","onItemClick","scrollContainerWrapper","containerRef","scrollContainer","viewerRef","portalTargets","map","target","pageAnnotations","pageNumber","length","key"],"sources":["PdfViewer.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Error as ErrorIcon, Spin } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport \"pdfjs-dist/web/pdf_viewer.css\";\nimport React, { forwardRef, useCallback, useImperativeHandle } from \"react\";\nimport { PdfAnnotationOverlay } from \"./components/PdfAnnotationOverlay.js\";\nimport { PdfViewerOutlineSidebar } from \"./components/PdfViewerOutlineSidebar.js\";\nimport { PdfViewerSearchBar } from \"./components/PdfViewerSearchBar.js\";\nimport { PdfViewerSidebar } from \"./components/PdfViewerSidebar.js\";\nimport { PdfViewerToolbar } from \"./components/PdfViewerToolbar.js\";\nimport { EMPTY_ANNOTATION_ARRAY } from \"./constants.js\";\nimport { usePdfAnnotationsByPage } from \"./hooks/usePdfAnnotationsByPage.js\";\nimport { usePdfFormFields } from \"./hooks/usePdfFormFields.js\";\nimport { usePdfHighlightMode } from \"./hooks/usePdfHighlightMode.js\";\nimport { usePdfViewerState } from \"./hooks/usePdfViewerState.js\";\nimport styles from \"./PdfViewer.module.css\";\nimport type { PdfViewerHandle, PdfViewerProps } from \"./types.js\";\n\nexport const BasePdfViewer: React.ForwardRefExoticComponent<\n PdfViewerProps & React.RefAttributes<PdfViewerHandle>\n> = forwardRef<PdfViewerHandle, PdfViewerProps>(\n function BasePdfViewer({\n src,\n annotations = EMPTY_ANNOTATION_ARRAY,\n onAnnotationClick,\n onDownload,\n enableHighlight = false,\n onTextHighlight,\n onHighlightDelete,\n formData,\n onFormSubmit,\n onFormChange,\n initialPage = 1,\n initialScale = 1.0,\n initialAutoSize = false,\n initialSidebarOpen = false,\n enableDownload = false,\n downloadFileName,\n sidebarMode: sidebarModeProp = \"thumbnails\",\n outlineIcons,\n className,\n }, ref) {\n const viewer = usePdfViewerState({\n src,\n initialPage,\n initialScale,\n initialAutoSize,\n initialSidebarOpen,\n sidebarMode: sidebarModeProp,\n onDownload,\n });\n\n const { highlightModeActive, toggleHighlightMode, deleteHighlight } =\n usePdfHighlightMode({\n pdfViewerRef: viewer.pdfViewerRef,\n document: viewer.document,\n enabled: enableHighlight,\n onTextHighlight,\n onHighlightDelete,\n });\n\n useImperativeHandle(ref, () => ({\n scrollToPage: viewer.scrollToPage,\n deleteHighlight,\n }), [viewer.scrollToPage, deleteHighlight]);\n\n const { hasFormFields, submitFormData } = usePdfFormFields({\n pdfViewerRef: viewer.pdfViewerRef,\n eventBusRef: viewer.eventBusRef,\n document: viewer.document,\n formData,\n onFormSubmit,\n onFormChange,\n });\n\n const annotationsByPage = usePdfAnnotationsByPage(annotations);\n\n const handleDownload = useCallback(() => {\n viewer.download(downloadFileName);\n }, [viewer, downloadFileName]);\n\n const rootClassName = classnames(styles.pdfViewer, className);\n\n if (viewer.loading) {\n return (\n <div className={rootClassName}>\n <div className={styles.loadingContainer}>\n <Spin className={styles.spinnerIcon} />\n Loading…\n </div>\n </div>\n );\n }\n\n if (viewer.error != null) {\n return (\n <div className={rootClassName}>\n <div className={styles.errorContainer}>\n <ErrorIcon className={styles.errorIcon} />\n Failed to load PDF: {viewer.error.message}\n </div>\n </div>\n );\n }\n\n if (viewer.document == null) {\n return (\n <div className={rootClassName}>\n <div className={styles.loadingContainer}>No document</div>\n </div>\n );\n }\n\n return (\n <div className={rootClassName}>\n <PdfViewerToolbar\n currentPage={viewer.currentPage}\n numPages={viewer.numPages}\n scale={viewer.scale}\n autoSize={viewer.autoSize}\n sidebarOpen={viewer.sidebarOpen}\n onPageChange={viewer.scrollToPage}\n onZoomIn={viewer.zoomIn}\n onZoomOut={viewer.zoomOut}\n onAutoSizeToggle={viewer.toggleAutoSize}\n onSearchOpen={viewer.search.openSearch}\n onSidebarToggle={viewer.toggleSidebar}\n onDownload={handleDownload}\n enableDownload={enableDownload}\n onRotateLeft={viewer.rotateLeft}\n onRotateRight={viewer.rotateRight}\n enableHighlight={enableHighlight}\n highlightModeActive={highlightModeActive}\n onHighlightToggle={toggleHighlightMode}\n enableFormSave={onFormSubmit != null && hasFormFields}\n onFormSave={submitFormData}\n />\n {viewer.search.isSearchOpen && (\n <PdfViewerSearchBar\n query={viewer.search.query}\n totalMatches={viewer.search.totalMatches}\n currentMatchIndex={viewer.search.currentMatchIndex}\n onQueryChange={viewer.search.setQuery}\n onNext={viewer.search.nextMatch}\n onPrev={viewer.search.prevMatch}\n onClose={viewer.search.closeSearch}\n />\n )}\n <div className={styles.contentArea}>\n {viewer.sidebarOpen && viewer.sidebarMode === \"thumbnails\" && (\n <PdfViewerSidebar\n document={viewer.document}\n numPages={viewer.numPages}\n currentPage={viewer.currentPage}\n onPageClick={viewer.scrollToPage}\n sidebarMode={viewer.sidebarMode}\n onSidebarModeChange={viewer.setSidebarMode}\n />\n )}\n {viewer.sidebarOpen && viewer.sidebarMode === \"outline\" && (\n <PdfViewerOutlineSidebar\n outlineItems={viewer.outlineItems}\n currentPage={viewer.currentPage}\n onItemClick={viewer.scrollToPage}\n sidebarMode={viewer.sidebarMode}\n onSidebarModeChange={viewer.setSidebarMode}\n outlineIcons={outlineIcons}\n />\n )}\n <div className={styles.scrollContainerWrapper}>\n <div ref={viewer.containerRef} className={styles.scrollContainer}>\n <div ref={viewer.viewerRef} className=\"pdfViewer\" />\n {viewer.portalTargets.map((target) => {\n const pageAnnotations = annotationsByPage[target.pageNumber]\n ?? EMPTY_ANNOTATION_ARRAY;\n if (pageAnnotations.length === 0) {\n return null;\n }\n return (\n <PdfAnnotationOverlay\n key={target.pageNumber}\n target={target}\n annotations={pageAnnot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js","names":["Error","ErrorIcon","Spin","classnames","React","forwardRef","useCallback","useImperativeHandle","PdfAnnotationOverlay","PdfViewerOutlineSidebar","PdfViewerSearchBar","PdfViewerSidebar","PdfViewerToolbar","EMPTY_ANNOTATION_ARRAY","usePdfAnnotationsByPage","usePdfFormFields","usePdfHighlightMode","usePdfViewerState","styles","BasePdfViewer","src","annotations","onAnnotationClick","onDownload","enableHighlight","onTextHighlight","onHighlightDelete","formData","onFormSubmit","onFormChange","initialPage","initialScale","initialAutoSize","initialSidebarOpen","enableDownload","downloadFileName","sidebarMode","sidebarModeProp","outlineIcons","className","ref","viewer","highlightModeActive","toggleHighlightMode","deleteHighlight","pdfViewerRef","document","enabled","scrollToPage","hasFormFields","submitFormData","eventBusRef","annotationsByPage","handleDownload","download","rootClassName","pdfViewer","loading","createElement","loadingContainer","spinnerIcon","error","errorContainer","errorIcon","message","currentPage","numPages","scale","autoSize","sidebarOpen","onPageChange","onZoomIn","zoomIn","onZoomOut","zoomOut","onAutoSizeToggle","toggleAutoSize","onSearchOpen","search","openSearch","onSidebarToggle","toggleSidebar","onRotateLeft","rotateLeft","onRotateRight","rotateRight","onHighlightToggle","enableFormSave","onFormSave","isSearchOpen","query","totalMatches","currentMatchIndex","onQueryChange","setQuery","onNext","nextMatch","onPrev","prevMatch","onClose","closeSearch","contentArea","onPageClick","onSidebarModeChange","setSidebarMode","outlineItems","onItemClick","scrollContainerWrapper","containerRef","scrollContainer","viewerRef","portalTargets","map","target","pageAnnotations","pageNumber","length","key"],"sources":["PdfViewer.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Error as ErrorIcon, Spin } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\n\nimport \"pdfjs-dist/web/pdf_viewer.css\";\nimport React, { forwardRef, useCallback, useImperativeHandle } from \"react\";\n\nimport { PdfAnnotationOverlay } from \"./components/PdfAnnotationOverlay.js\";\nimport { PdfViewerOutlineSidebar } from \"./components/PdfViewerOutlineSidebar.js\";\nimport { PdfViewerSearchBar } from \"./components/PdfViewerSearchBar.js\";\nimport { PdfViewerSidebar } from \"./components/PdfViewerSidebar.js\";\nimport { PdfViewerToolbar } from \"./components/PdfViewerToolbar.js\";\nimport { EMPTY_ANNOTATION_ARRAY } from \"./constants.js\";\nimport { usePdfAnnotationsByPage } from \"./hooks/usePdfAnnotationsByPage.js\";\nimport { usePdfFormFields } from \"./hooks/usePdfFormFields.js\";\nimport { usePdfHighlightMode } from \"./hooks/usePdfHighlightMode.js\";\nimport { usePdfViewerState } from \"./hooks/usePdfViewerState.js\";\nimport type { PdfViewerHandle, PdfViewerProps } from \"./types.js\";\n\nimport styles from \"./PdfViewer.module.css\";\n\nexport const BasePdfViewer: React.ForwardRefExoticComponent<\n PdfViewerProps & React.RefAttributes<PdfViewerHandle>\n> = forwardRef<PdfViewerHandle, PdfViewerProps>(function BasePdfViewer(\n {\n src,\n annotations = EMPTY_ANNOTATION_ARRAY,\n onAnnotationClick,\n onDownload,\n enableHighlight = false,\n onTextHighlight,\n onHighlightDelete,\n formData,\n onFormSubmit,\n onFormChange,\n initialPage = 1,\n initialScale = 1.0,\n initialAutoSize = false,\n initialSidebarOpen = false,\n enableDownload = false,\n downloadFileName,\n sidebarMode: sidebarModeProp = \"thumbnails\",\n outlineIcons,\n className,\n },\n ref\n) {\n const viewer = usePdfViewerState({\n src,\n initialPage,\n initialScale,\n initialAutoSize,\n initialSidebarOpen,\n sidebarMode: sidebarModeProp,\n onDownload,\n });\n\n const { highlightModeActive, toggleHighlightMode, deleteHighlight } =\n usePdfHighlightMode({\n pdfViewerRef: viewer.pdfViewerRef,\n document: viewer.document,\n enabled: enableHighlight,\n onTextHighlight,\n onHighlightDelete,\n });\n\n useImperativeHandle(\n ref,\n () => ({\n scrollToPage: viewer.scrollToPage,\n deleteHighlight,\n }),\n [viewer.scrollToPage, deleteHighlight]\n );\n\n const { hasFormFields, submitFormData } = usePdfFormFields({\n pdfViewerRef: viewer.pdfViewerRef,\n eventBusRef: viewer.eventBusRef,\n document: viewer.document,\n formData,\n onFormSubmit,\n onFormChange,\n });\n\n const annotationsByPage = usePdfAnnotationsByPage(annotations);\n\n const handleDownload = useCallback(() => {\n viewer.download(downloadFileName);\n }, [viewer, downloadFileName]);\n\n const rootClassName = classnames(styles.pdfViewer, className);\n\n if (viewer.loading) {\n return (\n <div className={rootClassName}>\n <div className={styles.loadingContainer}>\n <Spin className={styles.spinnerIcon} />\n Loading…\n </div>\n </div>\n );\n }\n\n if (viewer.error != null) {\n return (\n <div className={rootClassName}>\n <div className={styles.errorContainer}>\n <ErrorIcon className={styles.errorIcon} />\n Failed to load PDF: {viewer.error.message}\n </div>\n </div>\n );\n }\n\n if (viewer.document == null) {\n return (\n <div className={rootClassName}>\n <div className={styles.loadingContainer}>No document</div>\n </div>\n );\n }\n\n return (\n <div className={rootClassName}>\n <PdfViewerToolbar\n currentPage={viewer.currentPage}\n numPages={viewer.numPages}\n scale={viewer.scale}\n autoSize={viewer.autoSize}\n sidebarOpen={viewer.sidebarOpen}\n onPageChange={viewer.scrollToPage}\n onZoomIn={viewer.zoomIn}\n onZoomOut={viewer.zoomOut}\n onAutoSizeToggle={viewer.toggleAutoSize}\n onSearchOpen={viewer.search.openSearch}\n onSidebarToggle={viewer.toggleSidebar}\n onDownload={handleDownload}\n enableDownload={enableDownload}\n onRotateLeft={viewer.rotateLeft}\n onRotateRight={viewer.rotateRight}\n enableHighlight={enableHighlight}\n highlightModeActive={highlightModeActive}\n onHighlightToggle={toggleHighlightMode}\n enableFormSave={onFormSubmit != null && hasFormFields}\n onFormSave={submitFormData}\n />\n {viewer.search.isSearchOpen && (\n <PdfViewerSearchBar\n query={viewer.search.query}\n totalMatches={viewer.search.totalMatches}\n currentMatchIndex={viewer.search.currentMatchIndex}\n onQueryChange={viewer.search.setQuery}\n onNext={viewer.search.nextMatch}\n onPrev={viewer.search.prevMatch}\n onClose={viewer.search.closeSearch}\n />\n )}\n <div className={styles.contentArea}>\n {viewer.sidebarOpen && viewer.sidebarMode === \"thumbnails\" && (\n <PdfViewerSidebar\n document={viewer.document}\n numPages={viewer.numPages}\n currentPage={viewer.currentPage}\n onPageClick={viewer.scrollToPage}\n sidebarMode={viewer.sidebarMode}\n onSidebarModeChange={viewer.setSidebarMode}\n />\n )}\n {viewer.sidebarOpen && viewer.sidebarMode === \"outline\" && (\n <PdfViewerOutlineSidebar\n outlineItems={viewer.outlineItems}\n currentPage={viewer.currentPage}\n onItemClick={viewer.scrollToPage}\n sidebarMode={viewer.sidebarMode}\n onSidebarModeChange={viewer.setSidebarMode}\n outlineIcons={outlineIcons}\n />\n )}\n <div className={styles.scrollContainerWrapper}>\n <div ref={viewer.containerRef} className={styles.scrollContainer}>\n <div ref={viewer.viewerRef} className=\"pdfViewer\" />\n {viewer.portalTargets.map((target) => {\n const pageAnnotations =\n annotationsByPage[target.pageNumber] ?? EMPTY_ANNOTATION_ARRAY;\n if (pageAnnotations.length === 0) {\n return null;\n }\n return (\n <PdfAnnotationOverlay\n key={target.pageNumber}\n target={target}\n annotations={pageAnnotations}\n onAnnotationClick={onAnnotationClick}\n />\n );\n })}\n </div>\n </div>\n </div>\n </div>\n );\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,KAAK,IAAIC,SAAS,EAAEC,IAAI,QAAQ,oBAAoB;AAC7D,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAO,+BAA+B;AACtC,OAAOC,KAAK,IAAIC,UAAU,EA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AAW,EAAEK,MAAM,CAACL,WAAY;IAChCmE,mBAAmB,EAAE9D,MAAM,CAAC+D,cAAe;IAC3ClE,YAAY,EAAEA;EAAa,CAC5B,CACF,eACDlC,KAAA,CAAAsD,aAAA;IAAKnB,SAAS,EAAErB,MAAM,CAACyF;EAAuB,gBAC5CvG,KAAA,CAAAsD,aAAA;IAAKlB,GAAG,EAAEC,MAAM,CAACmE,YAAa;IAACrE,SAAS,EAAErB,MAAM,CAAC2F;EAAgB,gBAC/DzG,KAAA,CAAAsD,aAAA;IAAKlB,GAAG,EAAEC,MAAM,CAACqE,SAAU;IAACvE,SAAS,EAAC;EAAW,CAAE,CAAC,EACnDE,MAAM,CAACsE,aAAa,CAACC,GAAG,CAAEC,MAAM,IAAK;IACpC,MAAMC,eAAe,GACnB9D,iBAAiB,CAAC6D,MAAM,CAACE,UAAU,CAAC,IAAItG,sBAAsB;IAChE,IAAIqG,eAAe,CAACE,MAAM,KAAK,CAAC,EAAE;MAChC,OAAO,IAAI;IACb;IACA,oBACEhH,KAAA,CAAAsD,aAAA,CAAClD,oBAAoB;MACnB6G,GAAG,EAAEJ,MAAM,CAACE,UAAW;MACvBF,MAAM,EAAEA,MAAO;MACf5F,WAAW,EAAE6F,eAAgB;MAC7B5F,iBAAiB,EAAEA;IAAkB,CACtC,CAAC;EAEN,CAAC,CACE,CACF,CACF,CACF,CAAC;AAEV,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PdfViewerContext.js","names":["React","createContext","useContext","useMemo","EMPTY_ANNOTATION_ARRAY","usePdfAnnotationsByPage","usePdfFormFields","usePdfHighlightMode","usePdfViewerState","PdfViewerContext","PdfViewerProvider","value","children","createElement","Provider","usePdfViewerContext","ctx","Error","usePdfViewerInstance","options","viewer","src","initialPage","initialScale","initialAutoSize","initialSidebarOpen","sidebarMode","onDownload","highlightModeActive","toggleHighlightMode","pdfViewerRef","document","enabled","highlightEnabled","onTextHighlight","onHighlightDelete","hasFormFields","submitFormData","eventBusRef","formData","onFormSubmit","onFormChange","annotations","annotationsByPage","enableDownload","enableFormSave","onAnnotationClick","outlineIcons"],"sources":["PdfViewerContext.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { PDFDocumentProxy } from \"pdfjs-dist\";\nimport type {\n EventBus,\n PDFFindController,\n PDFViewer,\n} from \"pdfjs-dist/web/pdf_viewer.mjs\";\nimport React, { createContext, useContext, useMemo } from \"react\";\nimport type { RefObject } from \"react\";\nimport { EMPTY_ANNOTATION_ARRAY } from \"./constants.js\";\nimport type {
|
|
1
|
+
{"version":3,"file":"PdfViewerContext.js","names":["React","createContext","useContext","useMemo","EMPTY_ANNOTATION_ARRAY","usePdfAnnotationsByPage","usePdfFormFields","usePdfHighlightMode","usePdfViewerState","PdfViewerContext","PdfViewerProvider","value","children","createElement","Provider","usePdfViewerContext","ctx","Error","usePdfViewerInstance","options","viewer","src","initialPage","initialScale","initialAutoSize","initialSidebarOpen","sidebarMode","onDownload","highlightModeActive","toggleHighlightMode","pdfViewerRef","document","enabled","highlightEnabled","onTextHighlight","onHighlightDelete","hasFormFields","submitFormData","eventBusRef","formData","onFormSubmit","onFormChange","annotations","annotationsByPage","enableDownload","enableFormSave","onAnnotationClick","outlineIcons"],"sources":["PdfViewerContext.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { PDFDocumentProxy } from \"pdfjs-dist\";\nimport type {\n EventBus,\n PDFFindController,\n PDFViewer,\n} from \"pdfjs-dist/web/pdf_viewer.mjs\";\nimport React, { createContext, useContext, useMemo } from \"react\";\nimport type { RefObject } from \"react\";\n\nimport { EMPTY_ANNOTATION_ARRAY } from \"./constants.js\";\nimport type { AnnotationPortalTarget } from \"./hooks/usePdfAnnotationPortals.js\";\nimport { usePdfAnnotationsByPage } from \"./hooks/usePdfAnnotationsByPage.js\";\nimport { usePdfFormFields } from \"./hooks/usePdfFormFields.js\";\nimport { usePdfHighlightMode } from \"./hooks/usePdfHighlightMode.js\";\nimport type { UsePdfViewerSearchResult } from \"./hooks/usePdfViewerSearch.js\";\nimport { usePdfViewerState } from \"./hooks/usePdfViewerState.js\";\nimport type {\n OutlineItem,\n PdfAnnotation,\n PdfViewerInstanceOptions,\n SidebarMode,\n} from \"./types.js\";\n\n/** The shape of the value provided by {@link PdfViewerProvider}. */\nexport interface PdfViewerContextValue {\n // From UsePdfViewerStateResult (core + state)\n document: PDFDocumentProxy | undefined;\n numPages: number;\n loading: boolean;\n error: Error | undefined;\n containerRef: RefObject<HTMLDivElement>;\n viewerRef: RefObject<HTMLDivElement>;\n currentPage: number;\n scrollToPage: (page: number) => void;\n scale: number;\n setScale: (scale: number) => void;\n autoSize: boolean;\n setAutoSize: (autoSize: boolean) => void;\n zoomIn: () => void;\n zoomOut: () => void;\n toggleAutoSize: () => void;\n rotation: number;\n rotateLeft: () => void;\n rotateRight: () => void;\n sidebarOpen: boolean;\n sidebarMode: SidebarMode;\n setSidebarMode: (mode: SidebarMode) => void;\n toggleSidebar: () => void;\n search: UsePdfViewerSearchResult;\n outlineItems: OutlineItem[];\n download: (filename?: string) => void;\n portalTargets: AnnotationPortalTarget[];\n\n // From UsePdfHighlightModeResult\n highlightEnabled: boolean;\n highlightModeActive: boolean;\n toggleHighlightMode: () => void;\n\n // From UsePdfFormFieldsResult\n hasFormFields: boolean;\n submitFormData: () => void;\n\n // Annotations\n annotations: PdfAnnotation[];\n annotationsByPage: Record<number, PdfAnnotation[]>;\n onAnnotationClick: ((annotation: PdfAnnotation) => void) | undefined;\n\n // Config props passed through\n enableDownload: boolean;\n enableFormSave: boolean;\n outlineIcons: Partial<Record<number, React.ComponentType>> | undefined;\n\n // Internal refs (for advanced consumers)\n pdfViewerRef: RefObject<PDFViewer | null>;\n eventBusRef: RefObject<EventBus | null>;\n findControllerRef: RefObject<PDFFindController | null>;\n}\n\nconst PdfViewerContext = createContext<PdfViewerContextValue | null>(null);\n\nexport interface PdfViewerProviderProps {\n value: PdfViewerContextValue;\n children: React.ReactNode;\n}\n\n/** Provides {@link PdfViewerContextValue} to descendant components. */\nexport function PdfViewerProvider({\n value,\n children,\n}: PdfViewerProviderProps): React.ReactElement {\n return (\n <PdfViewerContext.Provider value={value}>\n {children}\n </PdfViewerContext.Provider>\n );\n}\n\n/**\n * Returns the nearest {@link PdfViewerContextValue} from a {@link PdfViewerProvider}.\n * Throws if called outside a provider.\n */\nexport function usePdfViewerContext(): PdfViewerContextValue {\n const ctx = useContext(PdfViewerContext);\n if (ctx == null) {\n throw new Error(\n \"usePdfViewerContext must be used within a PdfViewerProvider\"\n );\n }\n return ctx;\n}\n\n/**\n * Consumer-facing setup hook analogous to react-hook-form's `useForm()`.\n * Accepts viewer options and returns a {@link PdfViewerContextValue} suitable\n * for passing to {@link PdfViewerProvider}.\n */\nexport function usePdfViewerInstance(\n options: PdfViewerInstanceOptions\n): PdfViewerContextValue {\n const viewer = usePdfViewerState({\n src: options.src,\n initialPage: options.initialPage,\n initialScale: options.initialScale,\n initialAutoSize: options.initialAutoSize,\n initialSidebarOpen: options.initialSidebarOpen,\n sidebarMode: options.sidebarMode,\n onDownload: options.onDownload,\n });\n\n const { highlightModeActive, toggleHighlightMode } = usePdfHighlightMode({\n pdfViewerRef: viewer.pdfViewerRef,\n document: viewer.document,\n enabled: options.highlightEnabled ?? false,\n onTextHighlight: options.onTextHighlight,\n onHighlightDelete: options.onHighlightDelete,\n });\n\n const { hasFormFields, submitFormData } = usePdfFormFields({\n pdfViewerRef: viewer.pdfViewerRef,\n eventBusRef: viewer.eventBusRef,\n document: viewer.document,\n formData: options.formData,\n onFormSubmit: options.onFormSubmit,\n onFormChange: options.onFormChange,\n });\n\n const annotations = options.annotations ?? EMPTY_ANNOTATION_ARRAY;\n const annotationsByPage = usePdfAnnotationsByPage(annotations);\n\n const highlightEnabled = options.highlightEnabled ?? false;\n const enableDownload = options.enableDownload ?? false;\n const enableFormSave = options.onFormSubmit != null && hasFormFields;\n const { onAnnotationClick, outlineIcons } = options;\n\n return useMemo(\n () => ({\n ...viewer,\n highlightEnabled,\n highlightModeActive,\n toggleHighlightMode,\n hasFormFields,\n submitFormData,\n annotations,\n annotationsByPage,\n onAnnotationClick,\n enableDownload,\n enableFormSave,\n outlineIcons,\n }),\n [\n viewer,\n highlightEnabled,\n highlightModeActive,\n toggleHighlightMode,\n hasFormFields,\n submitFormData,\n annotations,\n annotationsByPage,\n onAnnotationClick,\n enableDownload,\n enableFormSave,\n outlineIcons,\n ]\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAGjE,SAASC,sBAAsB,QAAQ,gBAAgB;AAEvD,SAASC,uBAAuB,QAAQ,oCAAoC;AAC5E,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,mBAAmB,QAAQ,gCAAgC;AAEpE,SAASC,iBAAiB,QAAQ,8BAA8B;;AAQhE;;AAuDA,MAAMC,g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ACzDwB,YAAY,EAAEV,MAAM,CAACU,YAAY;IACjCQ,WAAW,EAAElB,MAAM,CAACkB,WAAW;IAC/BP,QAAQ,EAAEX,MAAM,CAACW,QAAQ;IACzBQ,QAAQ,EAAEpB,OAAO,CAACoB,QAAQ;IAC1BC,YAAY,EAAErB,OAAO,CAACqB,YAAY;IAClCC,YAAY,EAAEtB,OAAO,CAACsB;EACxB,CAAC,CAAC;EAEF,MAAMC,WAAW,GAAGvB,OAAO,CAACuB,WAAW,IAAItC,sBAAsB;EACjE,MAAMuC,iBAAiB,GAAGtC,uBAAuB,CAACqC,WAAW,CAAC;EAE9D,MAAMT,gBAAgB,GAAGd,OAAO,CAACc,gBAAgB,IAAI,KAAK;EAC1D,MAAMW,cAAc,GAAGzB,OAAO,CAACyB,cAAc,IAAI,KAAK;EACtD,MAAMC,cAAc,GAAG1B,OAAO,CAACqB,YAAY,IAAI,IAAI,IAAIJ,aAAa;EACpE,MAAM;IAAEU,iBAAiB;IAAEC;EAAa,CAAC,GAAG5B,OAAO;EAEnD,OAAOhB,OAAO,CACZ,OAAO;IACL,GAAGiB,MAAM;IACTa,gBAAgB;IAChBL,mBAAmB;IACnBC,mBAAmB;IACnBO,aAAa;IACbC,cAAc;IACdK,WAAW;IACXC,iBAAiB;IACjBG,iBAAiB;IACjBF,cAAc;IACdC,cAAc;IACdE;EACF,CAAC,CAAC,EACF,CACE3B,MAAM,EACNa,gBAAgB,EAChBL,mBAAmB,EACnBC,mBAAmB,EACnBO,aAAa,EACbC,cAAc,EACdK,WAAW,EACXC,iBAAiB,EACjBG,iBAAiB,EACjBF,cAAc,EACdC,cAAc,EACdE,YAAY,CAEhB,CAAC;AACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PdfAnnotationOverlay.js","names":["React","useMemo","PdfViewerAnnotationLayer","PdfAnnotationOverlay","target","annotations","onAnnotationClick","style","position","left","top","width","height","pointerEvents","zIndex","createElement","pageHeight","scale","transform"],"sources":["PdfAnnotationOverlay.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useMemo } from \"react\";\nimport type { AnnotationPortalTarget } from \"../hooks/usePdfAnnotationPortals.js\";\nimport type { PdfAnnotation } from \"../types.js\";\nimport { PdfViewerAnnotationLayer } from \"./PdfViewerAnnotationLayer.js\";\n\nexport interface PdfAnnotationOverlayProps {\n target: AnnotationPortalTarget;\n annotations: PdfAnnotation[];\n onAnnotationClick?: (annotation: PdfAnnotation) => void;\n}\n\nexport const PdfAnnotationOverlay: React.FC<PdfAnnotationOverlayProps> = ({\n target,\n annotations,\n onAnnotationClick,\n}) => {\n const style = useMemo<React.CSSProperties>(() => ({\n
|
|
1
|
+
{"version":3,"file":"PdfAnnotationOverlay.js","names":["React","useMemo","PdfViewerAnnotationLayer","PdfAnnotationOverlay","target","annotations","onAnnotationClick","style","position","left","top","width","height","pointerEvents","zIndex","createElement","pageHeight","scale","transform"],"sources":["PdfAnnotationOverlay.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useMemo } from \"react\";\n\nimport type { AnnotationPortalTarget } from \"../hooks/usePdfAnnotationPortals.js\";\nimport type { PdfAnnotation } from \"../types.js\";\nimport { PdfViewerAnnotationLayer } from \"./PdfViewerAnnotationLayer.js\";\n\nexport interface PdfAnnotationOverlayProps {\n target: AnnotationPortalTarget;\n annotations: PdfAnnotation[];\n onAnnotationClick?: (annotation: PdfAnnotation) => void;\n}\n\nexport const PdfAnnotationOverlay: React.FC<PdfAnnotationOverlayProps> = ({\n target,\n annotations,\n onAnnotationClick,\n}) => {\n const style = useMemo<React.CSSProperties>(\n () => ({\n position: \"absolute\",\n left: target.left,\n top: target.top,\n width: target.width,\n height: target.height,\n pointerEvents: \"none\",\n zIndex: 1,\n }),\n [target.left, target.top, target.width, target.height]\n );\n\n return (\n <div style={style}>\n <PdfViewerAnnotationLayer\n annotations={annotations}\n pageHeight={target.pageHeight}\n scale={target.scale}\n transform={target.transform}\n onAnnotationClick={onAnnotationClick}\n />\n </div>\n );\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AAItC,SAASC,wBAAwB,QAAQ,+BAA+B;AAQxE,OAAO,MAAMC,oBAAyD,GAAGA,CAAC;EACxEC,MAAM;EACNC,WAAW;EACXC;AACF,CAAC,KAAK;EACJ,MAAMC,KAAK,GAAGN,OAAO,CACnB,OAAO;IACLO,QAAQ,EAAE,UAAU;IACpBC,IAAI,EAAEL,MAAM,CAACK,IAAI;IACjBC,GAAG,EAAEN,MAAM,CAACM,GAAG;IACfC,KAAK,EAAEP,MAAM,CAACO,KAAK;IACnBC,MAAM,EAAER,MAAM,CAACQ,MAAM;IACrBC,aAAa,EAAE,MAAM;IACrBC,MAAM,EAAE;EACV,CAAC,CAAC,EACF,CAACV,MAAM,CAACK,IAAI,EAAEL,MAAM,CAACM,GAAG,EAAEN,MAAM,CAACO,KAAK,EAAEP,MAAM,CAACQ,MAAM,CACvD,CAAC;EAED,oBACEZ,KAAA,CAAAe,aAAA;IAAKR,KAAK,EAAEA;EAAM,gBAChBP,KAAA,CAAAe,aAAA,CAACb,wBAAwB;IACvBG,WAAW,EAAEA,WAAY;IACzBW,UAAU,EAAEZ,MAAM,CAACY,UAAW;IAC9BC,KAAK,EAAEb,MAAM,CAACa,KAAM;IACpBC,SAAS,EAAEd,MAAM,CAACc,SAAU;IAC5BZ,iBAAiB,EAAEA;EAAkB,CACtC,CACE,CAAC;AAEV,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PdfViewerAnnotationLayer.js","names":["classnames","React","useCallback","useMemo","styles","applyTransform","point","m","computeRectStyle","rect","transform","color","x1","y1","x","y","x2","y2","width","height","left","Math","min","top","abs","useAnnotationHandlers","annotation","onClick","handleClick","handleKeyDown","e","key","preventDefault","AnnotationItem","className","type","multiRects","rects","hasMultipleRects","length","style","createElement","annotationGroup","onKeyDown","role","tabIndex","title","label","id","map","i","CustomAnnotationItem","pageHeight","scale","undefined","renderProps","render","PdfViewerAnnotationLayer","annotations","onAnnotationClick","annotationLayer"],"sources":["PdfViewerAnnotationLayer.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport classnames from \"classnames\";\nimport React, { useCallback, useMemo } from \"react\";\nimport type { PdfAnnotation, PdfCustomAnnotation, PdfRect } from \"../types.js\";\nimport styles from \"./PdfViewerAnnotationLayer.module.css\";\n\nexport interface PdfViewerAnnotationLayerProps {\n annotations: PdfAnnotation[];\n pageHeight: number;\n scale: number;\n transform: number[];\n onAnnotationClick?: (annotation: PdfAnnotation) => void;\n}\n\ninterface AnnotationItemProps {\n annotation: PdfAnnotation;\n transform: number[];\n onClick?: (annotation: PdfAnnotation) => void;\n}\n\ninterface CustomAnnotationItemProps extends AnnotationItemProps {\n annotation: PdfCustomAnnotation;\n pageHeight: number;\n scale: number;\n}\n\nfunction applyTransform(\n point: readonly [number, number],\n m: readonly number[],\n): [number, number] {\n return [\n m[0] * point[0] + m[2] * point[1] + m[4],\n m[1] * point[0] + m[3] * point[1] + m[5],\n ];\n}\n\n/** Convert a single PDF rect (bottom-left origin) to CSS positioning (top-left origin). */\nfunction computeRectStyle(\n rect: PdfRect,\n transform: readonly number[],\n color: string | undefined,\n): React.CSSProperties {\n const [x1, y1] = applyTransform([rect.x, rect.y], transform);\n const [x2, y2] = applyTransform(\n [rect.x + rect.width, rect.y + rect.height],\n transform,\n );\n return {\n left: Math.min(x1, x2),\n top: Math.min(y1, y2),\n width: Math.abs(x2 - x1),\n height: Math.abs(y2 - y1),\n ...(color != null\n ? { \"--osdk-pdf-annotation-color\": color } as React.CSSProperties\n : {}),\n };\n}\n\nfunction useAnnotationHandlers(\n annotation: PdfAnnotation,\n onClick?: (annotation: PdfAnnotation) => void,\n) {\n const handleClick = useCallback(() => {\n onClick?.(annotation);\n }, [onClick, annotation]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\") {\n e.preventDefault();\n onClick?.(annotation);\n }\n },\n [onClick, annotation],\n );\n\n return { handleClick, handleKeyDown };\n}\n\nfunction AnnotationItem({\n annotation,\n transform,\n onClick,\n}: AnnotationItemProps): React.ReactElement {\n const { handleClick, handleKeyDown } = useAnnotationHandlers(\n annotation,\n onClick,\n );\n\n const className = classnames(\n styles.annotation,\n styles[annotation.type],\n );\n\n const multiRects = annotation.rects;\n const hasMultipleRects = multiRects != null && multiRects.length > 1;\n\n const style = useMemo(\n () => computeRectStyle(annotation.rect, transform, annotation.color),\n [annotation, transform],\n );\n\n // Multi-rect: render a group wrapper with one div per rect\n if (hasMultipleRects) {\n return (\n <div\n className={styles.annotationGroup}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n role=\"button\"\n tabIndex={0}\n title={annotation.label}\n data-annotation-id={annotation.id}\n >\n {multiRects.map((rect, i) => (\n <div\n key={i}\n className={className}\n style={computeRectStyle(rect, transform, annotation.color)}\n />\n ))}\n </div>\n );\n }\n\n // Single rect: existing behavior\n\n return (\n <div\n className={className}\n style={style}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n role=\"button\"\n tabIndex={0}\n title={annotation.label}\n data-annotation-id={annotation.id}\n />\n );\n}\n\nfunction CustomAnnotationItem({\n annotation,\n pageHeight,\n scale,\n transform,\n onClick,\n}: CustomAnnotationItemProps): React.ReactElement {\n const { handleClick, handleKeyDown } = useAnnotationHandlers(\n annotation,\n onClick,\n );\n\n const style = useMemo(\n () => computeRectStyle(annotation.rect, transform, undefined),\n [annotation, transform],\n );\n\n const renderProps = useMemo(\n () => ({ annotation, scale, pageHeight, transform }),\n [annotation, scale, pageHeight, transform],\n );\n\n return (\n <div\n className={styles.annotation}\n style={style}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n role=\"button\"\n tabIndex={0}\n title={annotation.label}\n data-annotation-id={annotation.id}\n >\n {annotation.render(renderProps)}\n </div>\n );\n}\n\nexport function PdfViewerAnnotationLayer({\n annotations,\n pageHeight,\n scale,\n transform,\n onAnnotationClick,\n}: PdfViewerAnnotationLayerProps): React.ReactElement {\n return (\n <div className={styles.annotationLayer}>\n {annotations.map((annotation) =>\n annotation.type === \"custom\"\n ? (\n <CustomAnnotationItem\n key={annotation.id}\n annotation={annotation}\n pageHeight={pageHeight}\n scale={scale}\n transform={transform}\n onClick={onAnnotationClick}\n />\n )\n : (\n <AnnotationItem\n key={annotation.id}\n annotation={annotation}\n transform={transform}\n onClick={onAnnotationClick}\n />\n )\n )}\n </div>\n );\n}\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PdfViewerAnnotationLayer.js","names":["classnames","React","useCallback","useMemo","styles","applyTransform","point","m","computeRectStyle","rect","transform","color","x1","y1","x","y","x2","y2","width","height","left","Math","min","top","abs","useAnnotationHandlers","annotation","onClick","handleClick","handleKeyDown","e","key","preventDefault","AnnotationItem","className","type","multiRects","rects","hasMultipleRects","length","style","createElement","annotationGroup","onKeyDown","role","tabIndex","title","label","id","map","i","CustomAnnotationItem","pageHeight","scale","undefined","renderProps","render","PdfViewerAnnotationLayer","annotations","onAnnotationClick","annotationLayer"],"sources":["PdfViewerAnnotationLayer.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport classnames from \"classnames\";\nimport React, { useCallback, useMemo } from \"react\";\n\nimport type { PdfAnnotation, PdfCustomAnnotation, PdfRect } from \"../types.js\";\n\nimport styles from \"./PdfViewerAnnotationLayer.module.css\";\n\nexport interface PdfViewerAnnotationLayerProps {\n annotations: PdfAnnotation[];\n pageHeight: number;\n scale: number;\n transform: number[];\n onAnnotationClick?: (annotation: PdfAnnotation) => void;\n}\n\ninterface AnnotationItemProps {\n annotation: PdfAnnotation;\n transform: number[];\n onClick?: (annotation: PdfAnnotation) => void;\n}\n\ninterface CustomAnnotationItemProps extends AnnotationItemProps {\n annotation: PdfCustomAnnotation;\n pageHeight: number;\n scale: number;\n}\n\nfunction applyTransform(\n point: readonly [number, number],\n m: readonly number[]\n): [number, number] {\n return [\n m[0] * point[0] + m[2] * point[1] + m[4],\n m[1] * point[0] + m[3] * point[1] + m[5],\n ];\n}\n\n/** Convert a single PDF rect (bottom-left origin) to CSS positioning (top-left origin). */\nfunction computeRectStyle(\n rect: PdfRect,\n transform: readonly number[],\n color: string | undefined\n): React.CSSProperties {\n const [x1, y1] = applyTransform([rect.x, rect.y], transform);\n const [x2, y2] = applyTransform(\n [rect.x + rect.width, rect.y + rect.height],\n transform\n );\n return {\n left: Math.min(x1, x2),\n top: Math.min(y1, y2),\n width: Math.abs(x2 - x1),\n height: Math.abs(y2 - y1),\n ...(color != null\n ? ({ \"--osdk-pdf-annotation-color\": color } as React.CSSProperties)\n : {}),\n };\n}\n\nfunction useAnnotationHandlers(\n annotation: PdfAnnotation,\n onClick?: (annotation: PdfAnnotation) => void\n) {\n const handleClick = useCallback(() => {\n onClick?.(annotation);\n }, [onClick, annotation]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\") {\n e.preventDefault();\n onClick?.(annotation);\n }\n },\n [onClick, annotation]\n );\n\n return { handleClick, handleKeyDown };\n}\n\nfunction AnnotationItem({\n annotation,\n transform,\n onClick,\n}: AnnotationItemProps): React.ReactElement {\n const { handleClick, handleKeyDown } = useAnnotationHandlers(\n annotation,\n onClick\n );\n\n const className = classnames(styles.annotation, styles[annotation.type]);\n\n const multiRects = annotation.rects;\n const hasMultipleRects = multiRects != null && multiRects.length > 1;\n\n const style = useMemo(\n () => computeRectStyle(annotation.rect, transform, annotation.color),\n [annotation, transform]\n );\n\n // Multi-rect: render a group wrapper with one div per rect\n if (hasMultipleRects) {\n return (\n <div\n className={styles.annotationGroup}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n role=\"button\"\n tabIndex={0}\n title={annotation.label}\n data-annotation-id={annotation.id}\n >\n {multiRects.map((rect, i) => (\n <div\n key={i}\n className={className}\n style={computeRectStyle(rect, transform, annotation.color)}\n />\n ))}\n </div>\n );\n }\n\n // Single rect: existing behavior\n\n return (\n <div\n className={className}\n style={style}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n role=\"button\"\n tabIndex={0}\n title={annotation.label}\n data-annotation-id={annotation.id}\n />\n );\n}\n\nfunction CustomAnnotationItem({\n annotation,\n pageHeight,\n scale,\n transform,\n onClick,\n}: CustomAnnotationItemProps): React.ReactElement {\n const { handleClick, handleKeyDown } = useAnnotationHandlers(\n annotation,\n onClick\n );\n\n const style = useMemo(\n () => computeRectStyle(annotation.rect, transform, undefined),\n [annotation, transform]\n );\n\n const renderProps = useMemo(\n () => ({ annotation, scale, pageHeight, transform }),\n [annotation, scale, pageHeight, transform]\n );\n\n return (\n <div\n className={styles.annotation}\n style={style}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n role=\"button\"\n tabIndex={0}\n title={annotation.label}\n data-annotation-id={annotation.id}\n >\n {annotation.render(renderProps)}\n </div>\n );\n}\n\nexport function PdfViewerAnnotationLayer({\n annotations,\n pageHeight,\n scale,\n transform,\n onAnnotationClick,\n}: PdfViewerAnnotationLayerProps): React.ReactElement {\n return (\n <div className={styles.annotationLayer}>\n {annotations.map((annotation) =>\n annotation.type === \"custom\" ? (\n <CustomAnnotationItem\n key={annotation.id}\n annotation={annotation}\n pageHeight={pageHeight}\n scale={scale}\n transform={transform}\n onClick={onAnnotationClick}\n />\n ) : (\n <AnnotationItem\n key={annotation.id}\n annotation={annotation}\n transform={transform}\n onClick={onAnnotationClick}\n />\n )\n )}\n </div>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAInD,OAAOC,MAAM,MAAM,uCAAuC;AAsB1D,SAASC,cAAcA,CACrBC,KAAgC,EAChCC,CAAoB,EACF;EAClB,OAAO,CACLA,CAAC,CAAC,CAAC,CAAC,GAAGD,KAAK,CAAC,CAAC,CAAC,GAAGC,CAAC,CAAC,CAAC,CAAC,GAAGD,KAAK,CAAC,CAAC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M;IACxB,sBAAoBrB,UAAU,CAACsB;EAAG,GAEjCtB,UAAU,CAAC8B,MAAM,CAACD,WAAW,CAC3B,CAAC;AAEV;AAEA,OAAO,SAASE,wBAAwBA,CAAC;EACvCC,WAAW;EACXN,UAAU;EACVC,KAAK;EACL3C,SAAS;EACTiD;AAC6B,CAAC,EAAsB;EACpD,oBACE1D,KAAA,CAAAwC,aAAA;IAAKP,SAAS,EAAE9B,MAAM,CAACwD;EAAgB,GACpCF,WAAW,CAACT,GAAG,CAAEvB,UAAU,IAC1BA,UAAU,CAACS,IAAI,KAAK,QAAQ,gBAC1BlC,KAAA,CAAAwC,aAAA,CAACU,oBAAoB;IACnBpB,GAAG,EAAEL,UAAU,CAACsB,EAAG;IACnBtB,UAAU,EAAEA,UAAW;IACvB0B,UAAU,EAAEA,UAAW;IACvBC,KAAK,EAAEA,KAAM;IACb3C,SAAS,EAAEA,SAAU;IACrBiB,OAAO,EAAEgC;EAAkB,CAC5B,CAAC,gBAEF1D,KAAA,CAAAwC,aAAA,CAACR,cAAc;IACbF,GAAG,EAAEL,UAAU,CAACsB,EAAG;IACnBtB,UAAU,EAAEA,UAAW;IACvBhB,SAAS,EAAEA,SAAU;IACrBiB,OAAO,EAAEgC;EAAkB,CAC5B,CAEL,CACG,CAAC;AAEV","ignoreList":[]}
|
|
@@ -22,8 +22,8 @@ import { EMPTY_ANNOTATION_ARRAY } from "../constants.js";
|
|
|
22
22
|
import { usePdfAnnotationsByPage } from "../hooks/usePdfAnnotationsByPage.js";
|
|
23
23
|
import { usePdfFormFields } from "../hooks/usePdfFormFields.js";
|
|
24
24
|
import { usePdfViewerCore } from "../hooks/usePdfViewerCore.js";
|
|
25
|
-
import styles from "../PdfViewer.module.css";
|
|
26
25
|
import { PdfAnnotationOverlay } from "./PdfAnnotationOverlay.js";
|
|
26
|
+
import styles from "../PdfViewer.module.css";
|
|
27
27
|
export function PdfViewerContent({
|
|
28
28
|
src,
|
|
29
29
|
annotations = EMPTY_ANNOTATION_ARRAY,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PdfViewerContent.js","names":["Error","ErrorIcon","Spin","classnames","React","useEffect","useRef","EMPTY_ANNOTATION_ARRAY","usePdfAnnotationsByPage","usePdfFormFields","usePdfViewerCore","
|
|
1
|
+
{"version":3,"file":"PdfViewerContent.js","names":["Error","ErrorIcon","Spin","classnames","React","useEffect","useRef","EMPTY_ANNOTATION_ARRAY","usePdfAnnotationsByPage","usePdfFormFields","usePdfViewerCore","PdfAnnotationOverlay","styles","PdfViewerContent","src","annotations","onAnnotationClick","initialPage","initialScale","onPageChange","onPageChangeProp","onScaleChange","onScaleChangeProp","formData","onFormChange","className","viewer","annotationsByPage","pdfViewerRef","eventBusRef","document","onPageChangeRef","current","onScaleChangeRef","isInitialMountRef","currentPage","scale","rootClassName","pdfViewer","loading","createElement","loadingContainer","spinnerIcon","error","errorContainer","errorIcon","message","scrollContainerWrapper","ref","containerRef","scrollContainer","viewerRef","portalTargets","map","target","pageAnnotations","pageNumber","length","key"],"sources":["PdfViewerContent.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Error as ErrorIcon, Spin } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\n\nimport \"pdfjs-dist/web/pdf_viewer.css\";\nimport React, { useEffect, useRef } from \"react\";\n\nimport { EMPTY_ANNOTATION_ARRAY } from \"../constants.js\";\nimport { usePdfAnnotationsByPage } from \"../hooks/usePdfAnnotationsByPage.js\";\nimport { usePdfFormFields } from \"../hooks/usePdfFormFields.js\";\nimport { usePdfViewerCore } from \"../hooks/usePdfViewerCore.js\";\nimport type { PdfAnnotation, PdfFormFieldValue } from \"../types.js\";\nimport { PdfAnnotationOverlay } from \"./PdfAnnotationOverlay.js\";\n\nimport styles from \"../PdfViewer.module.css\";\n\nexport interface PdfViewerContentProps {\n /** PDF source — URL string or ArrayBuffer */\n src: string | ArrayBuffer;\n /** Annotations to overlay on the PDF */\n annotations?: PdfAnnotation[];\n /** Callback fired when an annotation is clicked */\n onAnnotationClick?: (annotation: PdfAnnotation) => void;\n /** Initial page number (1-indexed, default 1) */\n initialPage?: number;\n /** Initial zoom scale (default 1.0) */\n initialScale?: number;\n /** Callback fired when the current page changes during scrolling */\n onPageChange?: (page: number) => void;\n /** Callback fired when the zoom scale changes */\n onScaleChange?: (scale: number) => void;\n /** Initial form field values keyed by field name. Applied when the document loads. */\n formData?: Record<string, PdfFormFieldValue>;\n /** Callback fired when any form field value changes. */\n onFormChange?: (fieldName: string, value: PdfFormFieldValue) => void;\n /** Additional CSS class name for the root element */\n className?: string;\n}\n\nexport function PdfViewerContent({\n src,\n annotations = EMPTY_ANNOTATION_ARRAY,\n onAnnotationClick,\n initialPage = 1,\n initialScale = 1.0,\n onPageChange: onPageChangeProp,\n onScaleChange: onScaleChangeProp,\n formData,\n onFormChange,\n className,\n}: PdfViewerContentProps): React.ReactElement {\n const viewer = usePdfViewerCore({ src, initialPage, initialScale });\n const annotationsByPage = usePdfAnnotationsByPage(annotations);\n\n usePdfFormFields({\n pdfViewerRef: viewer.pdfViewerRef,\n eventBusRef: viewer.eventBusRef,\n document: viewer.document,\n formData,\n onFormChange,\n });\n\n // Use refs for callbacks to avoid firing on initial mount\n const onPageChangeRef = useRef(onPageChangeProp);\n onPageChangeRef.current = onPageChangeProp;\n const onScaleChangeRef = useRef(onScaleChangeProp);\n onScaleChangeRef.current = onScaleChangeProp;\n const isInitialMountRef = useRef(true);\n\n useEffect(\n function notifyPageChange() {\n if (isInitialMountRef.current) {\n return;\n }\n onPageChangeRef.current?.(viewer.currentPage);\n },\n [viewer.currentPage]\n );\n\n useEffect(\n function notifyScaleChange() {\n if (isInitialMountRef.current) {\n return;\n }\n onScaleChangeRef.current?.(viewer.scale);\n },\n [viewer.scale]\n );\n\n useEffect(function clearInitialMount() {\n isInitialMountRef.current = false;\n }, []);\n\n const rootClassName = classnames(styles.pdfViewer, className);\n\n if (viewer.loading) {\n return (\n <div className={rootClassName}>\n <div className={styles.loadingContainer}>\n <Spin className={styles.spinnerIcon} />\n Loading…\n </div>\n </div>\n );\n }\n\n if (viewer.error != null) {\n return (\n <div className={rootClassName}>\n <div className={styles.errorContainer}>\n <ErrorIcon className={styles.errorIcon} />\n Failed to load PDF: {viewer.error.message}\n </div>\n </div>\n );\n }\n\n if (viewer.document == null) {\n return (\n <div className={rootClassName}>\n <div className={styles.loadingContainer}>No document</div>\n </div>\n );\n }\n\n return (\n <div className={rootClassName}>\n <div className={styles.scrollContainerWrapper}>\n <div ref={viewer.containerRef} className={styles.scrollContainer}>\n <div ref={viewer.viewerRef} className=\"pdfViewer\" />\n {viewer.portalTargets.map((target) => {\n const pageAnnotations =\n annotationsByPage[target.pageNumber] ?? EMPTY_ANNOTATION_ARRAY;\n if (pageAnnotations.length === 0) {\n return null;\n }\n return (\n <PdfAnnotationOverlay\n key={target.pageNumber}\n target={target}\n annotations={pageAnnotations}\n onAnnotationClick={onAnnotationClick}\n />\n );\n })}\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,KAAK,IAAIC,SAAS,EAAEC,IAAI,QAAQ,oBAAoB;AAC7D,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAO,+BAA+B;AACtC,OAAOC,KAAK,IAAIC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEhD,SAASC,sBAAsB,QAAQ,iBAAiB;AACxD,SAASC,uBAAuB,QAAQ,qC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Y;EAAc,gBAC5BjC,KAAA,CAAAoC,aAAA;IAAKf,SAAS,EAAEb,MAAM,CAACmC;EAAuB,gBAC5C3C,KAAA,CAAAoC,aAAA;IAAKQ,GAAG,EAAEtB,MAAM,CAACuB,YAAa;IAACxB,SAAS,EAAEb,MAAM,CAACsC;EAAgB,gBAC/D9C,KAAA,CAAAoC,aAAA;IAAKQ,GAAG,EAAEtB,MAAM,CAACyB,SAAU;IAAC1B,SAAS,EAAC;EAAW,CAAE,CAAC,EACnDC,MAAM,CAAC0B,aAAa,CAACC,GAAG,CAAEC,MAAM,IAAK;IACpC,MAAMC,eAAe,GACnB5B,iBAAiB,CAAC2B,MAAM,CAACE,UAAU,CAAC,IAAIjD,sBAAsB;IAChE,IAAIgD,eAAe,CAACE,MAAM,KAAK,CAAC,EAAE;MAChC,OAAO,IAAI;IACb;IACA,oBACErD,KAAA,CAAAoC,aAAA,CAAC7B,oBAAoB;MACnB+C,GAAG,EAAEJ,MAAM,CAACE,UAAW;MACvBF,MAAM,EAAEA,MAAO;MACfvC,WAAW,EAAEwC,eAAgB;MAC7BvC,iBAAiB,EAAEA;IAAkB,CACtC,CAAC;EAEN,CAAC,CACE,CACF,CACF,CAAC;AAEV","ignoreList":[]}
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
import classnames from "classnames";
|
|
18
18
|
import React, { useCallback, useMemo } from "react";
|
|
19
|
-
import styles from "./PdfViewerOutlineSidebar.module.css";
|
|
20
19
|
import { PdfViewerSidebarHeader } from "./PdfViewerSidebarHeader.js";
|
|
20
|
+
import styles from "./PdfViewerOutlineSidebar.module.css";
|
|
21
21
|
const INDENT_PER_DEPTH = 16;
|
|
22
22
|
export function PdfViewerOutlineSidebar({
|
|
23
23
|
outlineItems,
|