@osdk/react-components 0.2.0-beta.2 → 0.2.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +105 -0
- package/CHANGELOG.md +245 -0
- package/README.md +129 -24
- package/build/browser/action-form/ActionForm.js +113 -0
- package/build/browser/action-form/ActionForm.js.map +1 -0
- package/build/browser/action-form/ActionFormApi.js.map +1 -1
- package/build/browser/action-form/BaseForm.js +70 -0
- package/build/browser/action-form/BaseForm.js.map +1 -0
- package/build/browser/action-form/FormFieldApi.js.map +1 -1
- package/build/browser/action-form/fields/DropdownField.js +104 -0
- package/build/browser/action-form/fields/DropdownField.js.map +1 -0
- package/build/browser/action-form/fields/FieldBridge.js +45 -0
- package/build/browser/action-form/fields/FieldBridge.js.map +1 -0
- package/build/browser/action-form/fields/FormFieldRenderer.js +79 -0
- package/build/browser/action-form/fields/FormFieldRenderer.js.map +1 -0
- package/build/browser/action-form/fields/TextInputField.js +37 -0
- package/build/browser/action-form/fields/TextInputField.js.map +1 -0
- package/build/browser/action-form/utils/coerceFieldValue.js +93 -0
- package/build/browser/action-form/utils/coerceFieldValue.js.map +1 -0
- package/build/browser/action-form/utils/getDefaultFieldComponent.js +56 -0
- package/build/browser/action-form/utils/getDefaultFieldComponent.js.map +1 -0
- package/build/browser/action-form/utils/getDefaultFieldDefinitions.js +33 -0
- package/build/browser/action-form/utils/getDefaultFieldDefinitions.js.map +1 -0
- package/build/browser/base-components/action-button/ActionButton.js +31 -0
- package/build/browser/base-components/action-button/ActionButton.js.map +1 -0
- package/build/browser/base-components/action-button/ActionButton.module.css +66 -0
- package/build/browser/base-components/action-button/ActionButton.module.css.js +8 -0
- package/build/browser/base-components/checkbox/Checkbox.module.css +1 -5
- package/build/browser/base-components/combobox/Combobox.js +146 -0
- package/build/browser/base-components/combobox/Combobox.js.map +1 -0
- package/build/browser/base-components/combobox/Combobox.module.css +357 -0
- package/build/browser/base-components/combobox/Combobox.module.css.js +17 -0
- package/build/browser/base-components/dialog/Dialog.js +52 -0
- package/build/browser/base-components/dialog/Dialog.js.map +1 -0
- package/build/browser/base-components/dialog/Dialog.module.css +93 -0
- package/build/browser/base-components/dialog/Dialog.module.css.js +13 -0
- package/build/browser/base-components/draggable-list/DraggableList.js +157 -0
- package/build/browser/base-components/draggable-list/DraggableList.js.map +1 -0
- package/build/browser/base-components/draggable-list/DraggableList.module.css +100 -0
- package/build/browser/base-components/draggable-list/DraggableList.module.css.js +11 -0
- package/build/browser/base-components/search-bar/SearchBar.js +44 -0
- package/build/browser/base-components/search-bar/SearchBar.js.map +1 -0
- package/build/browser/base-components/search-bar/SearchBar.module.css +53 -0
- package/build/browser/base-components/search-bar/SearchBar.module.css.js +8 -0
- package/build/browser/base-components/select/Select.js +95 -0
- package/build/browser/base-components/select/Select.js.map +1 -0
- package/build/browser/base-components/select/Select.module.css +235 -0
- package/build/browser/base-components/select/Select.module.css.js +13 -0
- package/build/browser/base-components/skeleton/SkeletonBar.js +36 -0
- package/build/browser/base-components/skeleton/SkeletonBar.js.map +1 -0
- package/build/browser/base-components/skeleton/SkeletonBar.module.css +39 -0
- package/build/browser/base-components/skeleton/SkeletonBar.module.css.js +7 -0
- package/build/browser/base-components/switch/Switch.js +33 -0
- package/build/browser/base-components/switch/Switch.js.map +1 -0
- package/build/browser/base-components/switch/Switch.module.css +91 -0
- package/build/browser/base-components/switch/Switch.module.css.js +7 -0
- package/build/browser/base-components/tooltip/Tooltip.js +91 -0
- package/build/browser/base-components/tooltip/Tooltip.js.map +1 -0
- package/build/browser/base-components/tooltip/Tooltip.module.css +70 -0
- package/build/browser/base-components/tooltip/Tooltip.module.css.js +11 -0
- package/build/browser/base-components/tooltip/index.js +18 -0
- package/build/browser/base-components/tooltip/index.js.map +1 -0
- package/build/browser/filter-list/FilterInput.js +132 -0
- package/build/browser/filter-list/FilterInput.js.map +1 -0
- package/build/browser/filter-list/FilterList.js +128 -0
- package/build/browser/filter-list/FilterList.js.map +1 -0
- 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 +45 -0
- package/build/browser/filter-list/base/AddFilterPopover.js.map +1 -0
- package/build/browser/filter-list/base/AddFilterPopover.module.css +83 -0
- package/build/browser/filter-list/base/AddFilterPopover.module.css.js +9 -0
- package/build/browser/filter-list/base/BaseFilterList.js +90 -0
- package/build/browser/filter-list/base/BaseFilterList.js.map +1 -0
- package/build/browser/filter-list/base/BaseFilterListApi.js +2 -0
- package/build/browser/filter-list/base/BaseFilterListApi.js.map +1 -0
- package/build/browser/filter-list/base/DragHandleIcon.js +51 -0
- package/build/browser/filter-list/base/DragHandleIcon.js.map +1 -0
- package/build/browser/filter-list/base/FilterIcons.js +98 -0
- package/build/browser/filter-list/base/FilterIcons.js.map +1 -0
- package/build/browser/filter-list/base/FilterList.module.css +132 -0
- package/build/browser/filter-list/base/FilterList.module.css.js +13 -0
- package/build/browser/filter-list/base/FilterListContent.js +198 -0
- package/build/browser/filter-list/base/FilterListContent.js.map +1 -0
- package/build/browser/filter-list/base/FilterListContent.module.css +33 -0
- package/build/browser/filter-list/base/FilterListContent.module.css.js +8 -0
- package/build/browser/filter-list/base/FilterListHeader.js +58 -0
- package/build/browser/filter-list/base/FilterListHeader.js.map +1 -0
- package/build/browser/filter-list/base/FilterListHeader.module.css +123 -0
- package/build/browser/filter-list/base/FilterListHeader.module.css.js +13 -0
- package/build/browser/filter-list/base/FilterListItem.js +87 -0
- package/build/browser/filter-list/base/FilterListItem.js.map +1 -0
- package/build/browser/filter-list/base/FilterListItem.module.css +126 -0
- package/build/browser/filter-list/base/FilterListItem.module.css.js +13 -0
- package/build/browser/filter-list/base/SortableFilterListItem.js +63 -0
- package/build/browser/filter-list/base/SortableFilterListItem.js.map +1 -0
- package/build/browser/filter-list/base/index.js +21 -0
- package/build/browser/filter-list/base/index.js.map +1 -0
- package/build/browser/filter-list/base/inputs/CheckboxListInput.js +83 -0
- package/build/browser/filter-list/base/inputs/CheckboxListInput.js.map +1 -0
- package/build/browser/filter-list/base/inputs/CheckboxListInput.module.css +65 -0
- package/build/browser/filter-list/base/inputs/CheckboxListInput.module.css.js +10 -0
- package/build/browser/filter-list/base/inputs/CheckboxListSkeleton.js +46 -0
- package/build/browser/filter-list/base/inputs/CheckboxListSkeleton.js.map +1 -0
- package/build/browser/filter-list/base/inputs/CheckboxListSkeleton.module.css +32 -0
- package/build/browser/filter-list/base/inputs/CheckboxListSkeleton.module.css.js +8 -0
- package/build/browser/filter-list/base/inputs/ContainsTextInput.js +85 -0
- package/build/browser/filter-list/base/inputs/ContainsTextInput.js.map +1 -0
- package/build/browser/filter-list/base/inputs/ContainsTextInput.module.css +91 -0
- package/build/browser/filter-list/base/inputs/ContainsTextInput.module.css.js +10 -0
- package/build/browser/filter-list/base/inputs/DateRangeInput.js +37 -0
- package/build/browser/filter-list/base/inputs/DateRangeInput.js.map +1 -0
- package/build/browser/filter-list/base/inputs/LinkedPropertyInput.module.css +20 -0
- package/build/browser/filter-list/base/inputs/LinkedPropertyInput.module.css.js +6 -0
- package/build/browser/filter-list/base/inputs/ListogramInput.js +103 -0
- package/build/browser/filter-list/base/inputs/ListogramInput.js.map +1 -0
- package/build/browser/filter-list/base/inputs/ListogramInput.module.css +106 -0
- package/build/browser/filter-list/base/inputs/ListogramInput.module.css.js +12 -0
- package/build/browser/filter-list/base/inputs/ListogramSkeleton.js +45 -0
- package/build/browser/filter-list/base/inputs/ListogramSkeleton.js.map +1 -0
- package/build/browser/filter-list/base/inputs/ListogramSkeleton.module.css +32 -0
- package/build/browser/filter-list/base/inputs/ListogramSkeleton.module.css.js +8 -0
- package/build/browser/filter-list/base/inputs/MultiDateInput.js +82 -0
- package/build/browser/filter-list/base/inputs/MultiDateInput.js.map +1 -0
- package/build/browser/filter-list/base/inputs/MultiDateInput.module.css +56 -0
- package/build/browser/filter-list/base/inputs/MultiDateInput.module.css.js +9 -0
- package/build/browser/filter-list/base/inputs/MultiSelectInput.js +93 -0
- package/build/browser/filter-list/base/inputs/MultiSelectInput.js.map +1 -0
- package/build/browser/filter-list/base/inputs/MultiSelectInput.module.css +38 -0
- package/build/browser/filter-list/base/inputs/MultiSelectInput.module.css.js +9 -0
- package/build/browser/filter-list/base/inputs/NullValueWrapper.js +57 -0
- package/build/browser/filter-list/base/inputs/NullValueWrapper.js.map +1 -0
- package/build/browser/filter-list/base/inputs/NullValueWrapper.module.css +50 -0
- package/build/browser/filter-list/base/inputs/NullValueWrapper.module.css.js +10 -0
- package/build/browser/filter-list/base/inputs/NumberRangeInput.js +48 -0
- package/build/browser/filter-list/base/inputs/NumberRangeInput.js.map +1 -0
- package/build/browser/filter-list/base/inputs/RangeInput.js +157 -0
- package/build/browser/filter-list/base/inputs/RangeInput.js.map +1 -0
- package/build/browser/filter-list/base/inputs/RangeInput.module.css +106 -0
- package/build/browser/filter-list/base/inputs/RangeInput.module.css.js +13 -0
- package/build/browser/filter-list/base/inputs/SingleDateInput.js +61 -0
- package/build/browser/filter-list/base/inputs/SingleDateInput.js.map +1 -0
- package/build/browser/filter-list/base/inputs/SingleDateInput.module.css +64 -0
- package/build/browser/filter-list/base/inputs/SingleDateInput.module.css.js +9 -0
- package/build/browser/filter-list/base/inputs/SingleSelectInput.js +88 -0
- package/build/browser/filter-list/base/inputs/SingleSelectInput.js.map +1 -0
- package/build/browser/filter-list/base/inputs/SingleSelectInput.module.css +55 -0
- package/build/browser/filter-list/base/inputs/SingleSelectInput.module.css.js +8 -0
- package/build/browser/filter-list/base/inputs/TextTagsInput.js +133 -0
- package/build/browser/filter-list/base/inputs/TextTagsInput.js.map +1 -0
- package/build/browser/filter-list/base/inputs/TextTagsInput.module.css +25 -0
- package/build/browser/filter-list/base/inputs/TextTagsInput.module.css.js +7 -0
- package/build/browser/filter-list/base/inputs/TimelineInput.js +74 -0
- package/build/browser/filter-list/base/inputs/TimelineInput.js.map +1 -0
- package/build/browser/filter-list/base/inputs/TimelineInput.module.css +75 -0
- package/build/browser/filter-list/base/inputs/TimelineInput.module.css.js +10 -0
- package/build/browser/filter-list/base/inputs/ToggleInput.js +43 -0
- package/build/browser/filter-list/base/inputs/ToggleInput.js.map +1 -0
- package/build/browser/filter-list/base/inputs/ToggleInput.module.css +34 -0
- package/build/browser/filter-list/base/inputs/ToggleInput.module.css.js +8 -0
- package/build/browser/filter-list/base/inputs/createHistogramBuckets.js +53 -0
- package/build/browser/filter-list/base/inputs/createHistogramBuckets.js.map +1 -0
- package/build/browser/filter-list/base/inputs/dateUtils.js +57 -0
- package/build/browser/filter-list/base/inputs/dateUtils.js.map +1 -0
- package/build/browser/filter-list/base/inputs/index.js +25 -0
- package/build/browser/filter-list/base/inputs/index.js.map +1 -0
- package/build/browser/filter-list/base/inputs/shared.module.css +80 -0
- package/build/browser/filter-list/base/inputs/shared.module.css.js +11 -0
- package/build/browser/filter-list/base/inputs/useStaleData.js +29 -0
- package/build/browser/filter-list/base/inputs/useStaleData.js.map +1 -0
- package/build/browser/filter-list/hooks/useFilterListState.js +158 -0
- package/build/browser/filter-list/hooks/useFilterListState.js.map +1 -0
- package/build/browser/filter-list/hooks/useFilterVisibility.js +68 -0
- package/build/browser/filter-list/hooks/useFilterVisibility.js.map +1 -0
- package/build/browser/filter-list/hooks/usePropertyAggregation.js +92 -0
- package/build/browser/filter-list/hooks/usePropertyAggregation.js.map +1 -0
- package/build/browser/filter-list/inputs/CheckboxListFilterInput.js +56 -0
- package/build/browser/filter-list/inputs/CheckboxListFilterInput.js.map +1 -0
- package/build/browser/filter-list/inputs/ContainsTextFilterInput.js +38 -0
- package/build/browser/filter-list/inputs/ContainsTextFilterInput.js.map +1 -0
- package/build/browser/filter-list/inputs/DateRangeFilterInput.js +105 -0
- package/build/browser/filter-list/inputs/DateRangeFilterInput.js.map +1 -0
- package/build/browser/filter-list/inputs/LinkedPropertyInput.js +508 -0
- package/build/browser/filter-list/inputs/LinkedPropertyInput.js.map +1 -0
- package/build/browser/filter-list/inputs/ListogramFilterInput.js +62 -0
- package/build/browser/filter-list/inputs/ListogramFilterInput.js.map +1 -0
- package/build/browser/filter-list/inputs/MultiDateFilterInput.js +38 -0
- package/build/browser/filter-list/inputs/MultiDateFilterInput.js.map +1 -0
- package/build/browser/filter-list/inputs/MultiSelectFilterInput.js +55 -0
- package/build/browser/filter-list/inputs/MultiSelectFilterInput.js.map +1 -0
- package/build/browser/filter-list/inputs/NumberRangeFilterInput.js +105 -0
- package/build/browser/filter-list/inputs/NumberRangeFilterInput.js.map +1 -0
- package/build/browser/filter-list/inputs/PropertyFilterInput.js +129 -0
- package/build/browser/filter-list/inputs/PropertyFilterInput.js.map +1 -0
- package/build/browser/filter-list/inputs/SingleDateFilterInput.js +38 -0
- package/build/browser/filter-list/inputs/SingleDateFilterInput.js.map +1 -0
- package/build/browser/filter-list/inputs/SingleSelectFilterInput.js +55 -0
- package/build/browser/filter-list/inputs/SingleSelectFilterInput.js.map +1 -0
- package/build/browser/filter-list/inputs/TextTagsFilterInput.js +54 -0
- package/build/browser/filter-list/inputs/TextTagsFilterInput.js.map +1 -0
- package/build/browser/filter-list/inputs/TimelineFilterInput.js +49 -0
- package/build/browser/filter-list/inputs/TimelineFilterInput.js.map +1 -0
- package/build/browser/filter-list/inputs/ToggleFilterInput.js +36 -0
- package/build/browser/filter-list/inputs/ToggleFilterInput.js.map +1 -0
- package/build/browser/filter-list/types/AggregationTypes.js +2 -0
- package/build/browser/filter-list/types/AggregationTypes.js.map +1 -0
- package/build/browser/filter-list/types/CustomRendererTypes.js +2 -0
- package/build/browser/filter-list/types/CustomRendererTypes.js.map +1 -0
- package/build/browser/filter-list/types/KeywordSearchTypes.js +2 -0
- package/build/browser/filter-list/types/KeywordSearchTypes.js.map +1 -0
- package/build/browser/filter-list/types/LinkedFilterTypes.js +2 -0
- package/build/browser/filter-list/types/LinkedFilterTypes.js.map +1 -0
- package/build/browser/filter-list/types/index.js +20 -0
- package/build/browser/filter-list/types/index.js.map +1 -0
- package/build/browser/filter-list/utils/aggregationHelpers.js +44 -0
- package/build/browser/filter-list/utils/aggregationHelpers.js.map +1 -0
- package/build/browser/filter-list/utils/coerceFilterValue.js +33 -0
- package/build/browser/filter-list/utils/coerceFilterValue.js.map +1 -0
- package/build/browser/filter-list/utils/filterStateSerialization.js +42 -0
- package/build/browser/filter-list/utils/filterStateSerialization.js.map +1 -0
- package/build/browser/filter-list/utils/filterStateToWhereClause.js +375 -0
- package/build/browser/filter-list/utils/filterStateToWhereClause.js.map +1 -0
- package/build/browser/filter-list/utils/filterValues.js +81 -0
- package/build/browser/filter-list/utils/filterValues.js.map +1 -0
- package/build/browser/filter-list/utils/getFilterKey.js +34 -0
- package/build/browser/filter-list/utils/getFilterKey.js.map +1 -0
- package/build/browser/filter-list/utils/getFilterLabel.js +36 -0
- package/build/browser/filter-list/utils/getFilterLabel.js.map +1 -0
- package/build/browser/object-table/ColumnConfigDialog.js +259 -0
- package/build/browser/object-table/ColumnConfigDialog.js.map +1 -0
- package/build/browser/object-table/ColumnConfigDialog.module.css +238 -0
- package/build/browser/object-table/ColumnConfigDialog.module.css.js +29 -0
- package/build/browser/object-table/DefaultCellRenderer.js +61 -0
- package/build/browser/object-table/DefaultCellRenderer.js.map +1 -0
- package/build/browser/object-table/EditableCell.js +168 -0
- package/build/browser/object-table/EditableCell.js.map +1 -0
- package/build/browser/object-table/EditableCell.module.css +70 -0
- package/build/browser/object-table/EditableCell.module.css.js +11 -0
- package/build/browser/object-table/LoadingCell.js +6 -3
- package/build/browser/object-table/LoadingCell.js.map +1 -1
- package/build/browser/object-table/LoadingRow.js +2 -1
- package/build/browser/object-table/LoadingRow.js.map +1 -1
- package/build/browser/object-table/LoadingStateTable.js +4 -4
- package/build/browser/object-table/LoadingStateTable.js.map +1 -1
- package/build/browser/object-table/MultiColumnSortDialog.js +181 -0
- package/build/browser/object-table/MultiColumnSortDialog.js.map +1 -0
- package/build/browser/object-table/MultiColumnSortDialog.module.css +191 -0
- package/build/browser/object-table/MultiColumnSortDialog.module.css.js +22 -0
- package/build/browser/object-table/NonIdealState.module.css +2 -3
- package/build/browser/object-table/ObjectTable.js +69 -17
- 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 +16 -4
- package/build/browser/object-table/SelectionCells.js.map +1 -1
- package/build/browser/object-table/SortableItemsList.js +35 -0
- package/build/browser/object-table/SortableItemsList.js.map +1 -0
- package/build/browser/object-table/Table.js +29 -4
- package/build/browser/object-table/Table.js.map +1 -1
- package/build/browser/object-table/Table.module.css +18 -3
- package/build/browser/object-table/Table.module.css.js +1 -0
- package/build/browser/object-table/TableBody.js +8 -2
- package/build/browser/object-table/TableBody.js.map +1 -1
- package/build/browser/object-table/TableBody.module.css +2 -0
- package/build/browser/object-table/TableCell.module.css +15 -1
- package/build/browser/object-table/TableCell.module.css.js +2 -1
- package/build/browser/object-table/TableEditContainer.js +90 -0
- package/build/browser/object-table/TableEditContainer.js.map +1 -0
- package/build/browser/object-table/TableEditContainer.module.css +71 -0
- package/build/browser/object-table/TableEditContainer.module.css.js +13 -0
- package/build/browser/object-table/TableHeader.js +97 -7
- package/build/browser/object-table/TableHeader.js.map +1 -1
- package/build/browser/object-table/TableHeader.module.css +11 -3
- package/build/browser/object-table/TableHeader.module.css.js +1 -0
- package/build/browser/object-table/TableHeaderWithPopover.js +53 -22
- package/build/browser/object-table/TableHeaderWithPopover.js.map +1 -1
- package/build/browser/object-table/TableHeaderWithPopover.module.css +44 -25
- package/build/browser/object-table/TableHeaderWithPopover.module.css.js +3 -1
- package/build/browser/object-table/TableRow.js +10 -3
- package/build/browser/object-table/TableRow.js.map +1 -1
- package/build/browser/object-table/TableRow.module.css +4 -1
- package/build/browser/object-table/components/AsyncValueCell.js +35 -0
- package/build/browser/object-table/components/AsyncValueCell.js.map +1 -0
- package/build/browser/object-table/hooks/useColumnDefs.js +20 -4
- package/build/browser/object-table/hooks/useColumnDefs.js.map +1 -1
- package/build/browser/object-table/hooks/useColumnResize.js +45 -0
- package/build/browser/object-table/hooks/useColumnResize.js.map +1 -0
- package/build/browser/object-table/hooks/useColumnVisibility.js +52 -20
- package/build/browser/object-table/hooks/useColumnVisibility.js.map +1 -1
- package/build/browser/object-table/hooks/useEditableTable.js +85 -0
- package/build/browser/object-table/hooks/useEditableTable.js.map +1 -0
- package/build/browser/object-table/hooks/useFunctionColumnsData.js +270 -0
- package/build/browser/object-table/hooks/useFunctionColumnsData.js.map +1 -0
- package/build/browser/object-table/hooks/useObjectTableData.js +58 -7
- package/build/browser/object-table/hooks/useObjectTableData.js.map +1 -1
- package/build/browser/object-table/hooks/useRowSelection.js +40 -16
- package/build/browser/object-table/hooks/useRowSelection.js.map +1 -1
- package/build/browser/object-table/hooks/useSelectionColumn.js +15 -6
- package/build/browser/object-table/hooks/useSelectionColumn.js.map +1 -1
- package/build/browser/object-table/utils/AsyncCellData.js +30 -0
- package/build/browser/object-table/utils/AsyncCellData.js.map +1 -0
- package/build/browser/object-table/utils/constants.js +1 -0
- package/build/browser/object-table/utils/constants.js.map +1 -1
- package/build/browser/object-table/utils/getCellId.js +20 -0
- package/build/browser/object-table/utils/getCellId.js.map +1 -0
- package/build/browser/object-table/utils/types.js +2 -0
- package/build/browser/object-table/utils/types.js.map +1 -0
- package/build/browser/pdf-viewer/PdfRenderer.js +88 -0
- package/build/browser/pdf-viewer/PdfRenderer.js.map +1 -0
- package/build/browser/pdf-viewer/PdfViewer.js +197 -0
- package/build/browser/pdf-viewer/PdfViewer.js.map +1 -0
- package/build/browser/pdf-viewer/PdfViewer.module.css +95 -0
- package/build/browser/pdf-viewer/PdfViewer.module.css.js +16 -0
- package/build/browser/pdf-viewer/PdfViewerAnnotationLayer.js +74 -0
- package/build/browser/pdf-viewer/PdfViewerAnnotationLayer.js.map +1 -0
- package/build/browser/pdf-viewer/PdfViewerAnnotationLayer.module.css +65 -0
- package/build/browser/pdf-viewer/PdfViewerAnnotationLayer.module.css.js +11 -0
- package/build/browser/pdf-viewer/PdfViewerSearchBar.js +84 -0
- package/build/browser/pdf-viewer/PdfViewerSearchBar.js.map +1 -0
- package/build/browser/pdf-viewer/PdfViewerSearchBar.module.css +65 -0
- package/build/browser/pdf-viewer/PdfViewerSearchBar.module.css.js +10 -0
- package/build/browser/pdf-viewer/PdfViewerSidebar.js +74 -0
- package/build/browser/pdf-viewer/PdfViewerSidebar.js.map +1 -0
- package/build/browser/pdf-viewer/PdfViewerSidebar.module.css +46 -0
- package/build/browser/pdf-viewer/PdfViewerSidebar.module.css.js +11 -0
- package/build/browser/pdf-viewer/PdfViewerThumbnail.js +100 -0
- package/build/browser/pdf-viewer/PdfViewerThumbnail.js.map +1 -0
- package/build/browser/pdf-viewer/PdfViewerThumbnail.module.css +26 -0
- package/build/browser/pdf-viewer/PdfViewerThumbnail.module.css.js +8 -0
- package/build/browser/pdf-viewer/PdfViewerToolbar.js +167 -0
- package/build/browser/pdf-viewer/PdfViewerToolbar.js.map +1 -0
- package/build/browser/pdf-viewer/PdfViewerToolbar.module.css +86 -0
- package/build/browser/pdf-viewer/PdfViewerToolbar.module.css.js +12 -0
- package/build/browser/pdf-viewer/constants.js +43 -0
- package/build/browser/pdf-viewer/constants.js.map +1 -0
- package/build/browser/pdf-viewer/hooks/usePdfAnnotationPortals.js +54 -0
- package/build/browser/pdf-viewer/hooks/usePdfAnnotationPortals.js.map +1 -0
- package/build/browser/pdf-viewer/hooks/usePdfDocument.js +67 -0
- package/build/browser/pdf-viewer/hooks/usePdfDocument.js.map +1 -0
- package/build/browser/pdf-viewer/hooks/usePdfViewer.js +69 -0
- package/build/browser/pdf-viewer/hooks/usePdfViewer.js.map +1 -0
- package/build/browser/pdf-viewer/hooks/usePdfViewerSearch.js +106 -0
- package/build/browser/pdf-viewer/hooks/usePdfViewerSearch.js.map +1 -0
- package/build/browser/pdf-viewer/hooks/usePdfViewerSync.js +71 -0
- package/build/browser/pdf-viewer/hooks/usePdfViewerSync.js.map +1 -0
- package/build/browser/pdf-viewer/types.js +2 -0
- package/build/browser/pdf-viewer/types.js.map +1 -0
- package/build/browser/public/experimental.js +9 -0
- package/build/browser/public/experimental.js.map +1 -1
- package/build/browser/shared/ErrorBoundary.js +62 -0
- package/build/browser/shared/ErrorBoundary.js.map +1 -0
- package/build/browser/shared/ErrorBoundary.module.css +55 -0
- package/build/browser/shared/ErrorBoundary.module.css.js +8 -0
- package/build/browser/shared/assertUnreachable.js +25 -0
- package/build/browser/shared/assertUnreachable.js.map +1 -0
- package/build/browser/shared/typedMemo.js +25 -0
- package/build/browser/shared/typedMemo.js.map +1 -0
- package/build/browser/styles.css +3936 -220
- package/build/cjs/public/experimental.cjs +6675 -312
- package/build/cjs/public/experimental.cjs.map +1 -1
- package/build/cjs/public/experimental.css +2573 -107
- package/build/cjs/public/experimental.css.map +1 -1
- package/build/cjs/public/experimental.d.cts +673 -68
- package/build/esm/action-form/ActionForm.js +113 -0
- package/build/esm/action-form/ActionForm.js.map +1 -0
- package/build/esm/action-form/ActionFormApi.js.map +1 -1
- package/build/esm/action-form/BaseForm.js +70 -0
- package/build/esm/action-form/BaseForm.js.map +1 -0
- package/build/esm/action-form/FormFieldApi.js.map +1 -1
- package/build/esm/action-form/fields/DropdownField.js +104 -0
- package/build/esm/action-form/fields/DropdownField.js.map +1 -0
- package/build/esm/action-form/fields/FieldBridge.js +45 -0
- package/build/esm/action-form/fields/FieldBridge.js.map +1 -0
- package/build/esm/action-form/fields/FormFieldRenderer.js +79 -0
- package/build/esm/action-form/fields/FormFieldRenderer.js.map +1 -0
- package/build/esm/action-form/fields/TextInputField.js +37 -0
- package/build/esm/action-form/fields/TextInputField.js.map +1 -0
- package/build/esm/action-form/utils/coerceFieldValue.js +93 -0
- package/build/esm/action-form/utils/coerceFieldValue.js.map +1 -0
- package/build/esm/action-form/utils/getDefaultFieldComponent.js +56 -0
- package/build/esm/action-form/utils/getDefaultFieldComponent.js.map +1 -0
- package/build/esm/action-form/utils/getDefaultFieldDefinitions.js +33 -0
- package/build/esm/action-form/utils/getDefaultFieldDefinitions.js.map +1 -0
- package/build/esm/base-components/action-button/ActionButton.js +31 -0
- package/build/esm/base-components/action-button/ActionButton.js.map +1 -0
- package/build/esm/base-components/action-button/ActionButton.module.css +66 -0
- package/build/esm/base-components/checkbox/Checkbox.module.css +1 -5
- package/build/esm/base-components/combobox/Combobox.js +146 -0
- package/build/esm/base-components/combobox/Combobox.js.map +1 -0
- package/build/esm/base-components/combobox/Combobox.module.css +357 -0
- package/build/esm/base-components/dialog/Dialog.js +52 -0
- package/build/esm/base-components/dialog/Dialog.js.map +1 -0
- package/build/esm/base-components/dialog/Dialog.module.css +93 -0
- package/build/esm/base-components/draggable-list/DraggableList.js +157 -0
- package/build/esm/base-components/draggable-list/DraggableList.js.map +1 -0
- package/build/esm/base-components/draggable-list/DraggableList.module.css +100 -0
- package/build/esm/base-components/search-bar/SearchBar.js +44 -0
- package/build/esm/base-components/search-bar/SearchBar.js.map +1 -0
- package/build/esm/base-components/search-bar/SearchBar.module.css +53 -0
- package/build/esm/base-components/select/Select.js +95 -0
- package/build/esm/base-components/select/Select.js.map +1 -0
- package/build/esm/base-components/select/Select.module.css +235 -0
- package/build/esm/base-components/skeleton/SkeletonBar.js +36 -0
- package/build/esm/base-components/skeleton/SkeletonBar.js.map +1 -0
- package/build/esm/base-components/skeleton/SkeletonBar.module.css +39 -0
- package/build/esm/base-components/switch/Switch.js +33 -0
- package/build/esm/base-components/switch/Switch.js.map +1 -0
- package/build/esm/base-components/switch/Switch.module.css +91 -0
- package/build/esm/base-components/tooltip/Tooltip.js +91 -0
- package/build/esm/base-components/tooltip/Tooltip.js.map +1 -0
- package/build/esm/base-components/tooltip/Tooltip.module.css +70 -0
- package/build/esm/base-components/tooltip/index.js +18 -0
- package/build/esm/base-components/tooltip/index.js.map +1 -0
- package/build/esm/filter-list/FilterInput.js +132 -0
- package/build/esm/filter-list/FilterInput.js.map +1 -0
- package/build/esm/filter-list/FilterList.js +128 -0
- package/build/esm/filter-list/FilterList.js.map +1 -0
- 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 +45 -0
- package/build/esm/filter-list/base/AddFilterPopover.js.map +1 -0
- package/build/esm/filter-list/base/AddFilterPopover.module.css +83 -0
- package/build/esm/filter-list/base/BaseFilterList.js +90 -0
- package/build/esm/filter-list/base/BaseFilterList.js.map +1 -0
- package/build/esm/filter-list/base/BaseFilterListApi.js +2 -0
- package/build/esm/filter-list/base/BaseFilterListApi.js.map +1 -0
- package/build/esm/filter-list/base/DragHandleIcon.js +51 -0
- package/build/esm/filter-list/base/DragHandleIcon.js.map +1 -0
- package/build/esm/filter-list/base/FilterIcons.js +98 -0
- package/build/esm/filter-list/base/FilterIcons.js.map +1 -0
- package/build/esm/filter-list/base/FilterList.module.css +132 -0
- package/build/esm/filter-list/base/FilterListContent.js +198 -0
- package/build/esm/filter-list/base/FilterListContent.js.map +1 -0
- package/build/esm/filter-list/base/FilterListContent.module.css +33 -0
- package/build/esm/filter-list/base/FilterListHeader.js +58 -0
- package/build/esm/filter-list/base/FilterListHeader.js.map +1 -0
- package/build/esm/filter-list/base/FilterListHeader.module.css +123 -0
- package/build/esm/filter-list/base/FilterListItem.js +87 -0
- package/build/esm/filter-list/base/FilterListItem.js.map +1 -0
- package/build/esm/filter-list/base/FilterListItem.module.css +126 -0
- package/build/esm/filter-list/base/SortableFilterListItem.js +63 -0
- package/build/esm/filter-list/base/SortableFilterListItem.js.map +1 -0
- package/build/esm/filter-list/base/index.js +21 -0
- package/build/esm/filter-list/base/index.js.map +1 -0
- package/build/esm/filter-list/base/inputs/CheckboxListInput.js +83 -0
- package/build/esm/filter-list/base/inputs/CheckboxListInput.js.map +1 -0
- package/build/esm/filter-list/base/inputs/CheckboxListInput.module.css +65 -0
- package/build/esm/filter-list/base/inputs/CheckboxListSkeleton.js +46 -0
- package/build/esm/filter-list/base/inputs/CheckboxListSkeleton.js.map +1 -0
- package/build/esm/filter-list/base/inputs/CheckboxListSkeleton.module.css +32 -0
- package/build/esm/filter-list/base/inputs/ContainsTextInput.js +85 -0
- package/build/esm/filter-list/base/inputs/ContainsTextInput.js.map +1 -0
- package/build/esm/filter-list/base/inputs/ContainsTextInput.module.css +91 -0
- package/build/esm/filter-list/base/inputs/DateRangeInput.js +37 -0
- package/build/esm/filter-list/base/inputs/DateRangeInput.js.map +1 -0
- package/build/esm/filter-list/base/inputs/LinkedPropertyInput.module.css +20 -0
- package/build/esm/filter-list/base/inputs/ListogramInput.js +103 -0
- package/build/esm/filter-list/base/inputs/ListogramInput.js.map +1 -0
- package/build/esm/filter-list/base/inputs/ListogramInput.module.css +106 -0
- package/build/esm/filter-list/base/inputs/ListogramSkeleton.js +45 -0
- package/build/esm/filter-list/base/inputs/ListogramSkeleton.js.map +1 -0
- package/build/esm/filter-list/base/inputs/ListogramSkeleton.module.css +32 -0
- package/build/esm/filter-list/base/inputs/MultiDateInput.js +82 -0
- package/build/esm/filter-list/base/inputs/MultiDateInput.js.map +1 -0
- package/build/esm/filter-list/base/inputs/MultiDateInput.module.css +56 -0
- package/build/esm/filter-list/base/inputs/MultiSelectInput.js +93 -0
- package/build/esm/filter-list/base/inputs/MultiSelectInput.js.map +1 -0
- package/build/esm/filter-list/base/inputs/MultiSelectInput.module.css +38 -0
- package/build/esm/filter-list/base/inputs/NullValueWrapper.js +57 -0
- package/build/esm/filter-list/base/inputs/NullValueWrapper.js.map +1 -0
- package/build/esm/filter-list/base/inputs/NullValueWrapper.module.css +50 -0
- package/build/esm/filter-list/base/inputs/NumberRangeInput.js +48 -0
- package/build/esm/filter-list/base/inputs/NumberRangeInput.js.map +1 -0
- package/build/esm/filter-list/base/inputs/RangeInput.js +157 -0
- package/build/esm/filter-list/base/inputs/RangeInput.js.map +1 -0
- package/build/esm/filter-list/base/inputs/RangeInput.module.css +106 -0
- package/build/esm/filter-list/base/inputs/SingleDateInput.js +61 -0
- package/build/esm/filter-list/base/inputs/SingleDateInput.js.map +1 -0
- package/build/esm/filter-list/base/inputs/SingleDateInput.module.css +64 -0
- package/build/esm/filter-list/base/inputs/SingleSelectInput.js +88 -0
- package/build/esm/filter-list/base/inputs/SingleSelectInput.js.map +1 -0
- package/build/esm/filter-list/base/inputs/SingleSelectInput.module.css +55 -0
- package/build/esm/filter-list/base/inputs/TextTagsInput.js +133 -0
- package/build/esm/filter-list/base/inputs/TextTagsInput.js.map +1 -0
- package/build/esm/filter-list/base/inputs/TextTagsInput.module.css +25 -0
- package/build/esm/filter-list/base/inputs/TimelineInput.js +74 -0
- package/build/esm/filter-list/base/inputs/TimelineInput.js.map +1 -0
- package/build/esm/filter-list/base/inputs/TimelineInput.module.css +75 -0
- package/build/esm/filter-list/base/inputs/ToggleInput.js +43 -0
- package/build/esm/filter-list/base/inputs/ToggleInput.js.map +1 -0
- package/build/esm/filter-list/base/inputs/ToggleInput.module.css +34 -0
- package/build/esm/filter-list/base/inputs/createHistogramBuckets.js +53 -0
- package/build/esm/filter-list/base/inputs/createHistogramBuckets.js.map +1 -0
- package/build/esm/filter-list/base/inputs/dateUtils.js +57 -0
- package/build/esm/filter-list/base/inputs/dateUtils.js.map +1 -0
- package/build/esm/filter-list/base/inputs/index.js +25 -0
- package/build/esm/filter-list/base/inputs/index.js.map +1 -0
- package/build/esm/filter-list/base/inputs/shared.module.css +80 -0
- package/build/esm/filter-list/base/inputs/useStaleData.js +29 -0
- package/build/esm/filter-list/base/inputs/useStaleData.js.map +1 -0
- package/build/esm/filter-list/hooks/useFilterListState.js +158 -0
- package/build/esm/filter-list/hooks/useFilterListState.js.map +1 -0
- package/build/esm/filter-list/hooks/useFilterVisibility.js +68 -0
- package/build/esm/filter-list/hooks/useFilterVisibility.js.map +1 -0
- package/build/esm/filter-list/hooks/usePropertyAggregation.js +92 -0
- package/build/esm/filter-list/hooks/usePropertyAggregation.js.map +1 -0
- package/build/esm/filter-list/inputs/CheckboxListFilterInput.js +56 -0
- package/build/esm/filter-list/inputs/CheckboxListFilterInput.js.map +1 -0
- package/build/esm/filter-list/inputs/ContainsTextFilterInput.js +38 -0
- package/build/esm/filter-list/inputs/ContainsTextFilterInput.js.map +1 -0
- package/build/esm/filter-list/inputs/DateRangeFilterInput.js +105 -0
- package/build/esm/filter-list/inputs/DateRangeFilterInput.js.map +1 -0
- package/build/esm/filter-list/inputs/LinkedPropertyInput.js +508 -0
- package/build/esm/filter-list/inputs/LinkedPropertyInput.js.map +1 -0
- package/build/esm/filter-list/inputs/ListogramFilterInput.js +62 -0
- package/build/esm/filter-list/inputs/ListogramFilterInput.js.map +1 -0
- package/build/esm/filter-list/inputs/MultiDateFilterInput.js +38 -0
- package/build/esm/filter-list/inputs/MultiDateFilterInput.js.map +1 -0
- package/build/esm/filter-list/inputs/MultiSelectFilterInput.js +55 -0
- package/build/esm/filter-list/inputs/MultiSelectFilterInput.js.map +1 -0
- package/build/esm/filter-list/inputs/NumberRangeFilterInput.js +105 -0
- package/build/esm/filter-list/inputs/NumberRangeFilterInput.js.map +1 -0
- package/build/esm/filter-list/inputs/PropertyFilterInput.js +129 -0
- package/build/esm/filter-list/inputs/PropertyFilterInput.js.map +1 -0
- package/build/esm/filter-list/inputs/SingleDateFilterInput.js +38 -0
- package/build/esm/filter-list/inputs/SingleDateFilterInput.js.map +1 -0
- package/build/esm/filter-list/inputs/SingleSelectFilterInput.js +55 -0
- package/build/esm/filter-list/inputs/SingleSelectFilterInput.js.map +1 -0
- package/build/esm/filter-list/inputs/TextTagsFilterInput.js +54 -0
- package/build/esm/filter-list/inputs/TextTagsFilterInput.js.map +1 -0
- package/build/esm/filter-list/inputs/TimelineFilterInput.js +49 -0
- package/build/esm/filter-list/inputs/TimelineFilterInput.js.map +1 -0
- package/build/esm/filter-list/inputs/ToggleFilterInput.js +36 -0
- package/build/esm/filter-list/inputs/ToggleFilterInput.js.map +1 -0
- package/build/esm/filter-list/types/AggregationTypes.js +2 -0
- package/build/esm/filter-list/types/AggregationTypes.js.map +1 -0
- package/build/esm/filter-list/types/CustomRendererTypes.js +2 -0
- package/build/esm/filter-list/types/CustomRendererTypes.js.map +1 -0
- package/build/esm/filter-list/types/KeywordSearchTypes.js +2 -0
- package/build/esm/filter-list/types/KeywordSearchTypes.js.map +1 -0
- package/build/esm/filter-list/types/LinkedFilterTypes.js +2 -0
- package/build/esm/filter-list/types/LinkedFilterTypes.js.map +1 -0
- package/build/esm/filter-list/types/index.js +20 -0
- package/build/esm/filter-list/types/index.js.map +1 -0
- package/build/esm/filter-list/utils/aggregationHelpers.js +44 -0
- package/build/esm/filter-list/utils/aggregationHelpers.js.map +1 -0
- package/build/esm/filter-list/utils/coerceFilterValue.js +33 -0
- package/build/esm/filter-list/utils/coerceFilterValue.js.map +1 -0
- package/build/esm/filter-list/utils/filterStateSerialization.js +42 -0
- package/build/esm/filter-list/utils/filterStateSerialization.js.map +1 -0
- package/build/esm/filter-list/utils/filterStateToWhereClause.js +375 -0
- package/build/esm/filter-list/utils/filterStateToWhereClause.js.map +1 -0
- package/build/esm/filter-list/utils/filterValues.js +81 -0
- package/build/esm/filter-list/utils/filterValues.js.map +1 -0
- package/build/esm/filter-list/utils/getFilterKey.js +34 -0
- package/build/esm/filter-list/utils/getFilterKey.js.map +1 -0
- package/build/esm/filter-list/utils/getFilterLabel.js +36 -0
- package/build/esm/filter-list/utils/getFilterLabel.js.map +1 -0
- package/build/esm/object-table/ColumnConfigDialog.js +259 -0
- package/build/esm/object-table/ColumnConfigDialog.js.map +1 -0
- package/build/esm/object-table/ColumnConfigDialog.module.css +238 -0
- package/build/esm/object-table/DefaultCellRenderer.js +61 -0
- package/build/esm/object-table/DefaultCellRenderer.js.map +1 -0
- package/build/esm/object-table/EditableCell.js +168 -0
- package/build/esm/object-table/EditableCell.js.map +1 -0
- package/build/esm/object-table/EditableCell.module.css +70 -0
- package/build/esm/object-table/LoadingCell.js +6 -3
- package/build/esm/object-table/LoadingCell.js.map +1 -1
- package/build/esm/object-table/LoadingRow.js +2 -1
- package/build/esm/object-table/LoadingRow.js.map +1 -1
- package/build/esm/object-table/LoadingStateTable.js +4 -4
- package/build/esm/object-table/LoadingStateTable.js.map +1 -1
- package/build/esm/object-table/MultiColumnSortDialog.js +181 -0
- package/build/esm/object-table/MultiColumnSortDialog.js.map +1 -0
- package/build/esm/object-table/MultiColumnSortDialog.module.css +191 -0
- package/build/esm/object-table/NonIdealState.module.css +2 -3
- package/build/esm/object-table/ObjectTable.js +69 -17
- 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 +16 -4
- package/build/esm/object-table/SelectionCells.js.map +1 -1
- package/build/esm/object-table/SortableItemsList.js +35 -0
- package/build/esm/object-table/SortableItemsList.js.map +1 -0
- package/build/esm/object-table/Table.js +29 -4
- package/build/esm/object-table/Table.js.map +1 -1
- package/build/esm/object-table/Table.module.css +18 -3
- package/build/esm/object-table/TableBody.js +8 -2
- package/build/esm/object-table/TableBody.js.map +1 -1
- package/build/esm/object-table/TableBody.module.css +2 -0
- package/build/esm/object-table/TableCell.module.css +15 -1
- package/build/esm/object-table/TableEditContainer.js +90 -0
- package/build/esm/object-table/TableEditContainer.js.map +1 -0
- package/build/esm/object-table/TableEditContainer.module.css +71 -0
- package/build/esm/object-table/TableHeader.js +97 -7
- package/build/esm/object-table/TableHeader.js.map +1 -1
- package/build/esm/object-table/TableHeader.module.css +11 -3
- package/build/esm/object-table/TableHeaderWithPopover.js +53 -22
- package/build/esm/object-table/TableHeaderWithPopover.js.map +1 -1
- package/build/esm/object-table/TableHeaderWithPopover.module.css +44 -25
- package/build/esm/object-table/TableRow.js +10 -3
- package/build/esm/object-table/TableRow.js.map +1 -1
- package/build/esm/object-table/TableRow.module.css +4 -1
- package/build/esm/object-table/components/AsyncValueCell.js +35 -0
- package/build/esm/object-table/components/AsyncValueCell.js.map +1 -0
- package/build/esm/object-table/hooks/useColumnDefs.js +20 -4
- package/build/esm/object-table/hooks/useColumnDefs.js.map +1 -1
- package/build/esm/object-table/hooks/useColumnResize.js +45 -0
- package/build/esm/object-table/hooks/useColumnResize.js.map +1 -0
- package/build/esm/object-table/hooks/useColumnVisibility.js +52 -20
- package/build/esm/object-table/hooks/useColumnVisibility.js.map +1 -1
- package/build/esm/object-table/hooks/useEditableTable.js +85 -0
- package/build/esm/object-table/hooks/useEditableTable.js.map +1 -0
- package/build/esm/object-table/hooks/useFunctionColumnsData.js +270 -0
- package/build/esm/object-table/hooks/useFunctionColumnsData.js.map +1 -0
- package/build/esm/object-table/hooks/useObjectTableData.js +58 -7
- package/build/esm/object-table/hooks/useObjectTableData.js.map +1 -1
- package/build/esm/object-table/hooks/useRowSelection.js +40 -16
- package/build/esm/object-table/hooks/useRowSelection.js.map +1 -1
- package/build/esm/object-table/hooks/useSelectionColumn.js +15 -6
- package/build/esm/object-table/hooks/useSelectionColumn.js.map +1 -1
- package/build/esm/object-table/utils/AsyncCellData.js +30 -0
- package/build/esm/object-table/utils/AsyncCellData.js.map +1 -0
- package/build/esm/object-table/utils/constants.js +1 -0
- package/build/esm/object-table/utils/constants.js.map +1 -1
- package/build/esm/object-table/utils/getCellId.js +20 -0
- package/build/esm/object-table/utils/getCellId.js.map +1 -0
- package/build/esm/object-table/utils/types.js +2 -0
- package/build/esm/object-table/utils/types.js.map +1 -0
- package/build/esm/pdf-viewer/PdfRenderer.js +88 -0
- package/build/esm/pdf-viewer/PdfRenderer.js.map +1 -0
- package/build/esm/pdf-viewer/PdfViewer.js +197 -0
- package/build/esm/pdf-viewer/PdfViewer.js.map +1 -0
- package/build/esm/pdf-viewer/PdfViewer.module.css +95 -0
- package/build/esm/pdf-viewer/PdfViewerAnnotationLayer.js +74 -0
- package/build/esm/pdf-viewer/PdfViewerAnnotationLayer.js.map +1 -0
- package/build/esm/pdf-viewer/PdfViewerAnnotationLayer.module.css +65 -0
- package/build/esm/pdf-viewer/PdfViewerSearchBar.js +84 -0
- package/build/esm/pdf-viewer/PdfViewerSearchBar.js.map +1 -0
- package/build/esm/pdf-viewer/PdfViewerSearchBar.module.css +65 -0
- package/build/esm/pdf-viewer/PdfViewerSidebar.js +74 -0
- package/build/esm/pdf-viewer/PdfViewerSidebar.js.map +1 -0
- package/build/esm/pdf-viewer/PdfViewerSidebar.module.css +46 -0
- package/build/esm/pdf-viewer/PdfViewerThumbnail.js +100 -0
- package/build/esm/pdf-viewer/PdfViewerThumbnail.js.map +1 -0
- package/build/esm/pdf-viewer/PdfViewerThumbnail.module.css +26 -0
- package/build/esm/pdf-viewer/PdfViewerToolbar.js +167 -0
- package/build/esm/pdf-viewer/PdfViewerToolbar.js.map +1 -0
- package/build/esm/pdf-viewer/PdfViewerToolbar.module.css +86 -0
- package/build/esm/pdf-viewer/constants.js +43 -0
- package/build/esm/pdf-viewer/constants.js.map +1 -0
- package/build/esm/pdf-viewer/hooks/usePdfAnnotationPortals.js +54 -0
- package/build/esm/pdf-viewer/hooks/usePdfAnnotationPortals.js.map +1 -0
- package/build/esm/pdf-viewer/hooks/usePdfDocument.js +67 -0
- package/build/esm/pdf-viewer/hooks/usePdfDocument.js.map +1 -0
- package/build/esm/pdf-viewer/hooks/usePdfViewer.js +69 -0
- package/build/esm/pdf-viewer/hooks/usePdfViewer.js.map +1 -0
- package/build/esm/pdf-viewer/hooks/usePdfViewerSearch.js +106 -0
- package/build/esm/pdf-viewer/hooks/usePdfViewerSearch.js.map +1 -0
- package/build/esm/pdf-viewer/hooks/usePdfViewerSync.js +71 -0
- package/build/esm/pdf-viewer/hooks/usePdfViewerSync.js.map +1 -0
- package/build/esm/pdf-viewer/types.js +2 -0
- package/build/esm/pdf-viewer/types.js.map +1 -0
- package/build/esm/public/experimental.js +9 -0
- package/build/esm/public/experimental.js.map +1 -1
- package/build/esm/shared/ErrorBoundary.js +62 -0
- package/build/esm/shared/ErrorBoundary.js.map +1 -0
- package/build/esm/shared/ErrorBoundary.module.css +55 -0
- package/build/esm/shared/assertUnreachable.js +25 -0
- package/build/esm/shared/assertUnreachable.js.map +1 -0
- package/build/esm/shared/typedMemo.js +25 -0
- package/build/esm/shared/typedMemo.js.map +1 -0
- package/build/types/action-form/ActionForm.d.ts +4 -0
- package/build/types/action-form/ActionForm.d.ts.map +1 -0
- package/build/types/action-form/ActionFormApi.d.ts +48 -32
- package/build/types/action-form/ActionFormApi.d.ts.map +1 -1
- package/build/types/action-form/BaseForm.d.ts +3 -0
- package/build/types/action-form/BaseForm.d.ts.map +1 -0
- package/build/types/action-form/FormFieldApi.d.ts +93 -42
- package/build/types/action-form/FormFieldApi.d.ts.map +1 -1
- package/build/types/action-form/fields/DropdownField.d.ts +6 -0
- package/build/types/action-form/fields/DropdownField.d.ts.map +1 -0
- package/build/types/action-form/fields/FieldBridge.d.ts +9 -0
- package/build/types/action-form/fields/FieldBridge.d.ts.map +1 -0
- package/build/types/action-form/fields/FormFieldRenderer.d.ts +8 -0
- package/build/types/action-form/fields/FormFieldRenderer.d.ts.map +1 -0
- package/build/types/action-form/fields/TextInputField.d.ts +5 -0
- package/build/types/action-form/fields/TextInputField.d.ts.map +1 -0
- package/build/types/action-form/utils/coerceFieldValue.d.ts +10 -0
- package/build/types/action-form/utils/coerceFieldValue.d.ts.map +1 -0
- package/build/types/action-form/utils/getDefaultFieldComponent.d.ts +6 -0
- package/build/types/action-form/utils/getDefaultFieldComponent.d.ts.map +1 -0
- package/build/types/action-form/utils/getDefaultFieldDefinitions.d.ts +6 -0
- package/build/types/action-form/utils/getDefaultFieldDefinitions.d.ts.map +1 -0
- package/build/types/base-components/action-button/ActionButton.d.ts +5 -0
- package/build/types/base-components/action-button/ActionButton.d.ts.map +1 -0
- package/build/types/base-components/combobox/Combobox.d.ts +60 -0
- package/build/types/base-components/combobox/Combobox.d.ts.map +1 -0
- package/build/types/base-components/dialog/Dialog.d.ts +10 -0
- package/build/types/base-components/dialog/Dialog.d.ts.map +1 -0
- package/build/types/base-components/draggable-list/DraggableList.d.ts +17 -0
- package/build/types/base-components/draggable-list/DraggableList.d.ts.map +1 -0
- package/build/types/base-components/search-bar/SearchBar.d.ts +11 -0
- package/build/types/base-components/search-bar/SearchBar.d.ts.map +1 -0
- package/build/types/base-components/select/Select.d.ts +40 -0
- package/build/types/base-components/select/Select.d.ts.map +1 -0
- package/build/types/base-components/skeleton/SkeletonBar.d.ts +9 -0
- package/build/types/base-components/skeleton/SkeletonBar.d.ts.map +1 -0
- package/build/types/base-components/switch/Switch.d.ts +10 -0
- package/build/types/base-components/switch/Switch.d.ts.map +1 -0
- package/build/types/base-components/tooltip/Tooltip.d.ts +31 -0
- package/build/types/base-components/tooltip/Tooltip.d.ts.map +1 -0
- package/build/types/base-components/tooltip/index.d.ts +1 -0
- package/build/types/base-components/tooltip/index.d.ts.map +1 -0
- package/build/types/filter-list/FilterInput.d.ts +15 -0
- package/build/types/filter-list/FilterInput.d.ts.map +1 -0
- package/build/types/filter-list/FilterList.d.ts +4 -0
- package/build/types/filter-list/FilterList.d.ts.map +1 -0
- package/build/types/filter-list/FilterListApi.d.ts +106 -22
- package/build/types/filter-list/FilterListApi.d.ts.map +1 -1
- package/build/types/filter-list/FilterListItemApi.d.ts +114 -53
- package/build/types/filter-list/FilterListItemApi.d.ts.map +1 -1
- package/build/types/filter-list/base/AddFilterPopover.d.ts +12 -0
- package/build/types/filter-list/base/AddFilterPopover.d.ts.map +1 -0
- package/build/types/filter-list/base/BaseFilterList.d.ts +3 -0
- package/build/types/filter-list/base/BaseFilterList.d.ts.map +1 -0
- package/build/types/filter-list/base/BaseFilterListApi.d.ts +29 -0
- package/build/types/filter-list/base/BaseFilterListApi.d.ts.map +1 -0
- package/build/types/filter-list/base/DragHandleIcon.d.ts +2 -0
- package/build/types/filter-list/base/DragHandleIcon.d.ts.map +1 -0
- package/build/types/filter-list/base/FilterIcons.d.ts +11 -0
- package/build/types/filter-list/base/FilterIcons.d.ts.map +1 -0
- package/build/types/filter-list/base/FilterListContent.d.ts +17 -0
- package/build/types/filter-list/base/FilterListContent.d.ts.map +1 -0
- package/build/types/filter-list/base/FilterListHeader.d.ts +14 -0
- package/build/types/filter-list/base/FilterListHeader.d.ts.map +1 -0
- package/build/types/filter-list/base/FilterListItem.d.ts +20 -0
- package/build/types/filter-list/base/FilterListItem.d.ts.map +1 -0
- package/build/types/filter-list/base/SortableFilterListItem.d.ts +15 -0
- package/build/types/filter-list/base/SortableFilterListItem.d.ts.map +1 -0
- package/build/types/filter-list/base/index.d.ts +5 -0
- package/build/types/filter-list/base/index.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/CheckboxListInput.d.ts +16 -0
- package/build/types/filter-list/base/inputs/CheckboxListInput.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/CheckboxListSkeleton.d.ts +2 -0
- package/build/types/filter-list/base/inputs/CheckboxListSkeleton.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/ContainsTextInput.d.ts +13 -0
- package/build/types/filter-list/base/inputs/ContainsTextInput.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/DateRangeInput.d.ts +17 -0
- package/build/types/filter-list/base/inputs/DateRangeInput.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/ListogramInput.d.ts +20 -0
- package/build/types/filter-list/base/inputs/ListogramInput.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/ListogramSkeleton.d.ts +2 -0
- package/build/types/filter-list/base/inputs/ListogramSkeleton.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/MultiDateInput.d.ts +12 -0
- package/build/types/filter-list/base/inputs/MultiDateInput.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/MultiSelectInput.d.ts +18 -0
- package/build/types/filter-list/base/inputs/MultiSelectInput.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/NullValueWrapper.d.ts +15 -0
- package/build/types/filter-list/base/inputs/NullValueWrapper.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/NumberRangeInput.d.ts +17 -0
- package/build/types/filter-list/base/inputs/NumberRangeInput.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/RangeInput.d.ts +30 -0
- package/build/types/filter-list/base/inputs/RangeInput.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/SingleDateInput.d.ts +13 -0
- package/build/types/filter-list/base/inputs/SingleDateInput.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/SingleSelectInput.d.ts +18 -0
- package/build/types/filter-list/base/inputs/SingleSelectInput.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/TextTagsInput.d.ts +18 -0
- package/build/types/filter-list/base/inputs/TextTagsInput.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/TimelineInput.d.ts +11 -0
- package/build/types/filter-list/base/inputs/TimelineInput.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/ToggleInput.d.ts +10 -0
- package/build/types/filter-list/base/inputs/ToggleInput.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/createHistogramBuckets.d.ts +16 -0
- package/build/types/filter-list/base/inputs/createHistogramBuckets.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/dateUtils.d.ts +17 -0
- package/build/types/filter-list/base/inputs/dateUtils.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/index.d.ts +8 -0
- package/build/types/filter-list/base/inputs/index.d.ts.map +1 -0
- package/build/types/filter-list/base/inputs/useStaleData.d.ts +1 -0
- package/build/types/filter-list/base/inputs/useStaleData.d.ts.map +1 -0
- package/build/types/filter-list/hooks/useFilterListState.d.ts +12 -0
- package/build/types/filter-list/hooks/useFilterListState.d.ts.map +1 -0
- package/build/types/filter-list/hooks/useFilterVisibility.d.ts +8 -0
- package/build/types/filter-list/hooks/useFilterVisibility.d.ts.map +1 -0
- package/build/types/filter-list/hooks/usePropertyAggregation.d.ts +17 -0
- package/build/types/filter-list/hooks/usePropertyAggregation.d.ts.map +1 -0
- package/build/types/filter-list/inputs/CheckboxListFilterInput.d.ts +14 -0
- package/build/types/filter-list/inputs/CheckboxListFilterInput.d.ts.map +1 -0
- package/build/types/filter-list/inputs/ContainsTextFilterInput.d.ts +10 -0
- package/build/types/filter-list/inputs/ContainsTextFilterInput.d.ts.map +1 -0
- package/build/types/filter-list/inputs/DateRangeFilterInput.d.ts +12 -0
- package/build/types/filter-list/inputs/DateRangeFilterInput.d.ts.map +1 -0
- package/build/types/filter-list/inputs/LinkedPropertyInput.d.ts +21 -0
- package/build/types/filter-list/inputs/LinkedPropertyInput.d.ts.map +1 -0
- package/build/types/filter-list/inputs/ListogramFilterInput.d.ts +16 -0
- package/build/types/filter-list/inputs/ListogramFilterInput.d.ts.map +1 -0
- package/build/types/filter-list/inputs/MultiDateFilterInput.d.ts +9 -0
- package/build/types/filter-list/inputs/MultiDateFilterInput.d.ts.map +1 -0
- package/build/types/filter-list/inputs/MultiSelectFilterInput.d.ts +13 -0
- package/build/types/filter-list/inputs/MultiSelectFilterInput.d.ts.map +1 -0
- package/build/types/filter-list/inputs/NumberRangeFilterInput.d.ts +12 -0
- package/build/types/filter-list/inputs/NumberRangeFilterInput.d.ts.map +1 -0
- package/build/types/filter-list/inputs/PropertyFilterInput.d.ts +17 -0
- package/build/types/filter-list/inputs/PropertyFilterInput.d.ts.map +1 -0
- package/build/types/filter-list/inputs/SingleDateFilterInput.d.ts +9 -0
- package/build/types/filter-list/inputs/SingleDateFilterInput.d.ts.map +1 -0
- package/build/types/filter-list/inputs/SingleSelectFilterInput.d.ts +13 -0
- package/build/types/filter-list/inputs/SingleSelectFilterInput.d.ts.map +1 -0
- package/build/types/filter-list/inputs/TextTagsFilterInput.d.ts +13 -0
- package/build/types/filter-list/inputs/TextTagsFilterInput.d.ts.map +1 -0
- package/build/types/filter-list/inputs/TimelineFilterInput.d.ts +9 -0
- package/build/types/filter-list/inputs/TimelineFilterInput.d.ts.map +1 -0
- package/build/types/filter-list/inputs/ToggleFilterInput.d.ts +9 -0
- package/build/types/filter-list/inputs/ToggleFilterInput.d.ts.map +1 -0
- package/build/types/filter-list/types/AggregationTypes.d.ts +5 -0
- package/build/types/filter-list/types/AggregationTypes.d.ts.map +1 -0
- package/build/types/filter-list/types/CustomRendererTypes.d.ts +76 -0
- package/build/types/filter-list/types/CustomRendererTypes.d.ts.map +1 -0
- package/build/types/filter-list/types/KeywordSearchTypes.d.ts +56 -0
- package/build/types/filter-list/types/KeywordSearchTypes.d.ts.map +1 -0
- package/build/types/filter-list/types/LinkedFilterTypes.d.ts +70 -0
- package/build/types/filter-list/types/LinkedFilterTypes.d.ts.map +1 -0
- package/build/types/filter-list/types/index.d.ts +3 -0
- package/build/types/filter-list/types/index.d.ts.map +1 -0
- package/build/types/filter-list/utils/aggregationHelpers.d.ts +9 -0
- package/build/types/filter-list/utils/aggregationHelpers.d.ts.map +1 -0
- package/build/types/filter-list/utils/coerceFilterValue.d.ts +11 -0
- package/build/types/filter-list/utils/coerceFilterValue.d.ts.map +1 -0
- package/build/types/filter-list/utils/filterStateSerialization.d.ts +3 -0
- package/build/types/filter-list/utils/filterStateSerialization.d.ts.map +1 -0
- package/build/types/filter-list/utils/filterStateToWhereClause.d.ts +20 -0
- package/build/types/filter-list/utils/filterStateToWhereClause.d.ts.map +1 -0
- package/build/types/filter-list/utils/filterValues.d.ts +7 -0
- package/build/types/filter-list/utils/filterValues.d.ts.map +1 -0
- package/build/types/filter-list/utils/getFilterKey.d.ts +3 -0
- package/build/types/filter-list/utils/getFilterKey.d.ts.map +1 -0
- package/build/types/filter-list/utils/getFilterLabel.d.ts +3 -0
- package/build/types/filter-list/utils/getFilterLabel.d.ts.map +1 -0
- package/build/types/object-table/ColumnConfigDialog.d.ts +18 -0
- package/build/types/object-table/ColumnConfigDialog.d.ts.map +1 -0
- package/build/types/object-table/DefaultCellRenderer.d.ts +3 -0
- package/build/types/object-table/DefaultCellRenderer.d.ts.map +1 -0
- package/build/types/object-table/EditableCell.d.ts +26 -0
- package/build/types/object-table/EditableCell.d.ts.map +1 -0
- package/build/types/object-table/LoadingCell.d.ts +1 -0
- 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 +15 -0
- package/build/types/object-table/MultiColumnSortDialog.d.ts.map +1 -0
- package/build/types/object-table/ObjectTable.d.ts +1 -9
- package/build/types/object-table/ObjectTable.d.ts.map +1 -1
- package/build/types/object-table/ObjectTableApi.d.ts +150 -20
- package/build/types/object-table/ObjectTableApi.d.ts.map +1 -1
- package/build/types/object-table/SortableItemsList.d.ts +13 -0
- package/build/types/object-table/SortableItemsList.d.ts.map +1 -0
- package/build/types/object-table/Table.d.ts +26 -1
- package/build/types/object-table/Table.d.ts.map +1 -1
- package/build/types/object-table/TableBody.d.ts +4 -1
- package/build/types/object-table/TableBody.d.ts.map +1 -1
- package/build/types/object-table/TableEditContainer.d.ts +9 -0
- package/build/types/object-table/TableEditContainer.d.ts.map +1 -0
- package/build/types/object-table/TableHeader.d.ts +3 -1
- package/build/types/object-table/TableHeader.d.ts.map +1 -1
- package/build/types/object-table/TableHeaderWithPopover.d.ts +30 -6
- package/build/types/object-table/TableHeaderWithPopover.d.ts.map +1 -1
- package/build/types/object-table/TableRow.d.ts +4 -1
- package/build/types/object-table/TableRow.d.ts.map +1 -1
- package/build/types/object-table/components/AsyncValueCell.d.ts +5 -0
- package/build/types/object-table/components/AsyncValueCell.d.ts.map +1 -0
- package/build/types/object-table/hooks/useColumnDefs.d.ts.map +1 -1
- package/build/types/object-table/hooks/useColumnResize.d.ts +10 -0
- package/build/types/object-table/hooks/useColumnResize.d.ts.map +1 -0
- package/build/types/object-table/hooks/useColumnVisibility.d.ts +18 -7
- package/build/types/object-table/hooks/useColumnVisibility.d.ts.map +1 -1
- package/build/types/object-table/hooks/useEditableTable.d.ts +17 -0
- package/build/types/object-table/hooks/useEditableTable.d.ts.map +1 -0
- package/build/types/object-table/hooks/useFunctionColumnsData.d.ts +13 -0
- package/build/types/object-table/hooks/useFunctionColumnsData.d.ts.map +1 -0
- package/build/types/object-table/hooks/useObjectTableData.d.ts +13 -5
- package/build/types/object-table/hooks/useObjectTableData.d.ts.map +1 -1
- package/build/types/object-table/hooks/useRowSelection.d.ts +8 -6
- package/build/types/object-table/hooks/useRowSelection.d.ts.map +1 -1
- package/build/types/object-table/utils/AsyncCellData.d.ts +8 -0
- package/build/types/object-table/utils/AsyncCellData.d.ts.map +1 -0
- package/build/types/object-table/utils/constants.d.ts +1 -0
- package/build/types/object-table/utils/constants.d.ts.map +1 -1
- package/build/types/object-table/utils/getCellId.d.ts +2 -0
- package/build/types/object-table/utils/getCellId.d.ts.map +1 -0
- package/build/types/object-table/utils/types.d.ts +39 -0
- package/build/types/object-table/utils/types.d.ts.map +1 -0
- package/build/types/pdf-viewer/PdfRenderer.d.ts +8 -0
- package/build/types/pdf-viewer/PdfRenderer.d.ts.map +1 -0
- package/build/types/pdf-viewer/PdfViewer.d.ts +4 -0
- package/build/types/pdf-viewer/PdfViewer.d.ts.map +1 -0
- package/build/types/pdf-viewer/PdfViewerAnnotationLayer.d.ts +10 -0
- package/build/types/pdf-viewer/PdfViewerAnnotationLayer.d.ts.map +1 -0
- package/build/types/pdf-viewer/PdfViewerSearchBar.d.ts +12 -0
- package/build/types/pdf-viewer/PdfViewerSearchBar.d.ts.map +1 -0
- package/build/types/pdf-viewer/PdfViewerSidebar.d.ts +10 -0
- package/build/types/pdf-viewer/PdfViewerSidebar.d.ts.map +1 -0
- package/build/types/pdf-viewer/PdfViewerThumbnail.d.ts +10 -0
- package/build/types/pdf-viewer/PdfViewerThumbnail.d.ts.map +1 -0
- package/build/types/pdf-viewer/PdfViewerToolbar.d.ts +14 -0
- package/build/types/pdf-viewer/PdfViewerToolbar.d.ts.map +1 -0
- package/build/types/pdf-viewer/constants.d.ts +17 -0
- package/build/types/pdf-viewer/constants.d.ts.map +1 -0
- package/build/types/pdf-viewer/hooks/usePdfAnnotationPortals.d.ts +10 -0
- package/build/types/pdf-viewer/hooks/usePdfAnnotationPortals.d.ts.map +1 -0
- package/build/types/pdf-viewer/hooks/usePdfDocument.d.ts +9 -0
- package/build/types/pdf-viewer/hooks/usePdfDocument.d.ts.map +1 -0
- package/build/types/pdf-viewer/hooks/usePdfViewer.d.ts +9 -0
- package/build/types/pdf-viewer/hooks/usePdfViewer.d.ts.map +1 -0
- package/build/types/pdf-viewer/hooks/usePdfViewerSearch.d.ts +15 -0
- package/build/types/pdf-viewer/hooks/usePdfViewerSearch.d.ts.map +1 -0
- package/build/types/pdf-viewer/hooks/usePdfViewerSync.d.ts +15 -0
- package/build/types/pdf-viewer/hooks/usePdfViewerSync.d.ts.map +1 -0
- package/build/types/pdf-viewer/types.d.ts +44 -0
- package/build/types/pdf-viewer/types.d.ts.map +1 -0
- package/build/types/public/experimental.d.ts +13 -3
- package/build/types/public/experimental.d.ts.map +1 -1
- package/build/types/shared/ErrorBoundary.d.ts +19 -0
- package/build/types/shared/ErrorBoundary.d.ts.map +1 -0
- package/build/types/shared/assertUnreachable.d.ts +6 -0
- package/build/types/shared/assertUnreachable.d.ts.map +1 -0
- package/build/types/shared/typedMemo.d.ts +6 -0
- package/build/types/shared/typedMemo.d.ts.map +1 -0
- package/package.json +13 -5
- package/build/browser/object-table/hooks/__tests__/useCellContextMenu.test.js +0 -147
- package/build/browser/object-table/hooks/__tests__/useCellContextMenu.test.js.map +0 -1
- package/build/browser/object-table/hooks/__tests__/useColumnDefs.test.js +0 -508
- package/build/browser/object-table/hooks/__tests__/useColumnDefs.test.js.map +0 -1
- package/build/browser/object-table/hooks/__tests__/useColumnPinning.test.js +0 -266
- package/build/browser/object-table/hooks/__tests__/useColumnPinning.test.js.map +0 -1
- package/build/browser/object-table/hooks/__tests__/useColumnVisibility.test.js +0 -178
- package/build/browser/object-table/hooks/__tests__/useColumnVisibility.test.js.map +0 -1
- package/build/browser/object-table/hooks/__tests__/useObjectTableData.test.js +0 -227
- package/build/browser/object-table/hooks/__tests__/useObjectTableData.test.js.map +0 -1
- package/build/browser/object-table/hooks/__tests__/useRowSelection.test.js +0 -548
- package/build/browser/object-table/hooks/__tests__/useRowSelection.test.js.map +0 -1
- package/build/browser/object-table/hooks/__tests__/useSelectionColumn.test.js +0 -275
- package/build/browser/object-table/hooks/__tests__/useSelectionColumn.test.js.map +0 -1
- package/build/browser/object-table/hooks/__tests__/useTableSorting.test.js +0 -211
- package/build/browser/object-table/hooks/__tests__/useTableSorting.test.js.map +0 -1
- package/build/esm/object-table/hooks/__tests__/useCellContextMenu.test.js +0 -147
- package/build/esm/object-table/hooks/__tests__/useCellContextMenu.test.js.map +0 -1
- package/build/esm/object-table/hooks/__tests__/useColumnDefs.test.js +0 -508
- package/build/esm/object-table/hooks/__tests__/useColumnDefs.test.js.map +0 -1
- package/build/esm/object-table/hooks/__tests__/useColumnPinning.test.js +0 -266
- package/build/esm/object-table/hooks/__tests__/useColumnPinning.test.js.map +0 -1
- package/build/esm/object-table/hooks/__tests__/useColumnVisibility.test.js +0 -178
- package/build/esm/object-table/hooks/__tests__/useColumnVisibility.test.js.map +0 -1
- package/build/esm/object-table/hooks/__tests__/useObjectTableData.test.js +0 -227
- package/build/esm/object-table/hooks/__tests__/useObjectTableData.test.js.map +0 -1
- package/build/esm/object-table/hooks/__tests__/useRowSelection.test.js +0 -548
- package/build/esm/object-table/hooks/__tests__/useRowSelection.test.js.map +0 -1
- package/build/esm/object-table/hooks/__tests__/useSelectionColumn.test.js +0 -275
- package/build/esm/object-table/hooks/__tests__/useSelectionColumn.test.js.map +0 -1
- package/build/esm/object-table/hooks/__tests__/useTableSorting.test.js +0 -211
- package/build/esm/object-table/hooks/__tests__/useTableSorting.test.js.map +0 -1
- package/build/types/object-table/hooks/__tests__/useCellContextMenu.test.d.ts +0 -1
- package/build/types/object-table/hooks/__tests__/useCellContextMenu.test.d.ts.map +0 -1
- package/build/types/object-table/hooks/__tests__/useColumnDefs.test.d.ts +0 -1
- package/build/types/object-table/hooks/__tests__/useColumnDefs.test.d.ts.map +0 -1
- package/build/types/object-table/hooks/__tests__/useColumnPinning.test.d.ts +0 -1
- package/build/types/object-table/hooks/__tests__/useColumnPinning.test.d.ts.map +0 -1
- package/build/types/object-table/hooks/__tests__/useColumnVisibility.test.d.ts +0 -1
- package/build/types/object-table/hooks/__tests__/useColumnVisibility.test.d.ts.map +0 -1
- package/build/types/object-table/hooks/__tests__/useObjectTableData.test.d.ts +0 -1
- package/build/types/object-table/hooks/__tests__/useObjectTableData.test.d.ts.map +0 -1
- package/build/types/object-table/hooks/__tests__/useRowSelection.test.d.ts +0 -1
- package/build/types/object-table/hooks/__tests__/useRowSelection.test.d.ts.map +0 -1
- package/build/types/object-table/hooks/__tests__/useSelectionColumn.test.d.ts +0 -1
- package/build/types/object-table/hooks/__tests__/useSelectionColumn.test.d.ts.map +0 -1
- package/build/types/object-table/hooks/__tests__/useTableSorting.test.d.ts +0 -1
- package/build/types/object-table/hooks/__tests__/useTableSorting.test.d.ts.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// CSS Module proxy for PdfViewerToolbar.module.css
|
|
2
|
+
const styles = {
|
|
3
|
+
"toolbar": "PdfViewerToolbar-module__toolbar___mMEUJkpy",
|
|
4
|
+
"toolbarGroup": "PdfViewerToolbar-module__toolbarGroup___JQ8lhuSw",
|
|
5
|
+
"separator": "PdfViewerToolbar-module__separator___B7J-o2nO",
|
|
6
|
+
"toolbarButton": "PdfViewerToolbar-module__toolbarButton___VPja8Zmi",
|
|
7
|
+
"pageInput": "PdfViewerToolbar-module__pageInput___TOvquG6P",
|
|
8
|
+
"pageCount": "PdfViewerToolbar-module__pageCount___koZz4nUT",
|
|
9
|
+
"scaleDisplay": "PdfViewerToolbar-module__scaleDisplay___JpCw8z-e"
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default styles;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
// Default empty values (stable references to avoid re-renders)
|
|
18
|
+
export const EMPTY_ANNOTATIONS = {};
|
|
19
|
+
export const EMPTY_ANNOTATION_ARRAY = [];
|
|
20
|
+
export const EMPTY_STRING = "";
|
|
21
|
+
|
|
22
|
+
// Scale and dimension configuration
|
|
23
|
+
export const SCALE_STEP = 0.25;
|
|
24
|
+
export const MIN_SCALE = 0.25;
|
|
25
|
+
export const MAX_SCALE = 5.0;
|
|
26
|
+
export const DEFAULT_PAGE_HEIGHT = 792;
|
|
27
|
+
export const THUMBNAIL_GAP = 12;
|
|
28
|
+
export const THUMBNAIL_SCALE = 0.2;
|
|
29
|
+
export const DEVICE_PIXEL_RATIO = typeof window !== "undefined" ? window.devicePixelRatio || 1 : 1;
|
|
30
|
+
|
|
31
|
+
// pdfjs EventBus event names
|
|
32
|
+
export const FIND_EVENT = "find";
|
|
33
|
+
// cspell:disable-next-line -- pdfjs EventBus event name
|
|
34
|
+
export const UPDATE_FIND_CONTROL_STATE_EVENT = "updatefindcontrolstate";
|
|
35
|
+
// cspell:disable-next-line -- pdfjs EventBus event name
|
|
36
|
+
export const UPDATE_FIND_MATCHES_COUNT_EVENT = "updatefindmatchescount";
|
|
37
|
+
// cspell:disable-next-line -- pdfjs EventBus event name
|
|
38
|
+
export const PAGE_CHANGING_EVENT = "pagechanging";
|
|
39
|
+
// cspell:disable-next-line -- pdfjs EventBus event name
|
|
40
|
+
export const SCALE_CHANGING_EVENT = "scalechanging";
|
|
41
|
+
// cspell:disable-next-line -- pdfjs EventBus event name
|
|
42
|
+
export const PAGE_RENDERED_EVENT = "pagerendered";
|
|
43
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","names":["EMPTY_ANNOTATIONS","EMPTY_ANNOTATION_ARRAY","EMPTY_STRING","SCALE_STEP","MIN_SCALE","MAX_SCALE","DEFAULT_PAGE_HEIGHT","THUMBNAIL_GAP","THUMBNAIL_SCALE","DEVICE_PIXEL_RATIO","window","devicePixelRatio","FIND_EVENT","UPDATE_FIND_CONTROL_STATE_EVENT","UPDATE_FIND_MATCHES_COUNT_EVENT","PAGE_CHANGING_EVENT","SCALE_CHANGING_EVENT","PAGE_RENDERED_EVENT"],"sources":["constants.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 { PdfAnnotation } from \"./types.js\";\n\n// Default empty values (stable references to avoid re-renders)\nexport const EMPTY_ANNOTATIONS: Record<number, PdfAnnotation[]> = {};\nexport const EMPTY_ANNOTATION_ARRAY: PdfAnnotation[] = [];\nexport const EMPTY_STRING = \"\";\n\n// Scale and dimension configuration\nexport const SCALE_STEP = 0.25;\nexport const MIN_SCALE = 0.25;\nexport const MAX_SCALE = 5.0;\nexport const DEFAULT_PAGE_HEIGHT = 792;\nexport const THUMBNAIL_GAP = 12;\nexport const THUMBNAIL_SCALE = 0.2;\nexport const DEVICE_PIXEL_RATIO: number = typeof window !== \"undefined\"\n ? window.devicePixelRatio || 1\n : 1;\n\n// pdfjs EventBus event names\nexport const FIND_EVENT = \"find\";\n// cspell:disable-next-line -- pdfjs EventBus event name\nexport const UPDATE_FIND_CONTROL_STATE_EVENT = \"updatefindcontrolstate\";\n// cspell:disable-next-line -- pdfjs EventBus event name\nexport const UPDATE_FIND_MATCHES_COUNT_EVENT = \"updatefindmatchescount\";\n// cspell:disable-next-line -- pdfjs EventBus event name\nexport const PAGE_CHANGING_EVENT = \"pagechanging\";\n// cspell:disable-next-line -- pdfjs EventBus event name\nexport const SCALE_CHANGING_EVENT = \"scalechanging\";\n// cspell:disable-next-line -- pdfjs EventBus event name\nexport const PAGE_RENDERED_EVENT = \"pagerendered\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA,OAAO,MAAMA,iBAAkD,GAAG,CAAC,CAAC;AACpE,OAAO,MAAMC,sBAAuC,GAAG,EAAE;AACzD,OAAO,MAAMC,YAAY,GAAG,EAAE;;AAE9B;AACA,OAAO,MAAMC,UAAU,GAAG,IAAI;AAC9B,OAAO,MAAMC,SAAS,GAAG,IAAI;AAC7B,OAAO,MAAMC,SAAS,GAAG,GAAG;AAC5B,OAAO,MAAMC,mBAAmB,GAAG,GAAG;AACtC,OAAO,MAAMC,aAAa,GAAG,EAAE;AAC/B,OAAO,MAAMC,eAAe,GAAG,GAAG;AAClC,OAAO,MAAMC,kBAA0B,GAAG,OAAOC,MAAM,KAAK,WAAW,GACnEA,MAAM,CAACC,gBAAgB,IAAI,CAAC,GAC5B,CAAC;;AAEL;AACA,OAAO,MAAMC,UAAU,GAAG,MAAM;AAChC;AACA,OAAO,MAAMC,+BAA+B,GAAG,wBAAwB;AACvE;AACA,OAAO,MAAMC,+BAA+B,GAAG,wBAAwB;AACvE;AACA,OAAO,MAAMC,mBAAmB,GAAG,cAAc;AACjD;AACA,OAAO,MAAMC,oBAAoB,GAAG,eAAe;AACnD;AACA,OAAO,MAAMC,mBAAmB,GAAG,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { useEffect, useState } from "react";
|
|
18
|
+
import { PAGE_RENDERED_EVENT } from "../constants.js";
|
|
19
|
+
export function usePdfAnnotationPortals(pdfViewerRef, eventBusRef, document) {
|
|
20
|
+
const [portalTargets, setPortalTargets] = useState([]);
|
|
21
|
+
useEffect(function () {
|
|
22
|
+
const eventBus = eventBusRef.current;
|
|
23
|
+
const pdfViewer = pdfViewerRef.current;
|
|
24
|
+
if (eventBus == null || pdfViewer == null) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const handlePageRendered = evt => {
|
|
28
|
+
const pageIndex = evt.pageNumber - 1;
|
|
29
|
+
const pageView = pdfViewer.getPageView(pageIndex);
|
|
30
|
+
if (pageView?.div == null || pageView?.viewport == null) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const viewport = pageView.viewport;
|
|
34
|
+
setPortalTargets(prev => {
|
|
35
|
+
// Replace existing entry for this page or add new one
|
|
36
|
+
const filtered = prev.filter(t => t.pageNumber !== evt.pageNumber);
|
|
37
|
+
return [...filtered, {
|
|
38
|
+
pageNumber: evt.pageNumber,
|
|
39
|
+
container: pageView.div,
|
|
40
|
+
pageHeight: viewport.viewBox[3],
|
|
41
|
+
// viewBox is [xMin, yMin, width, height] and we need the original height before scaling
|
|
42
|
+
scale: viewport.scale
|
|
43
|
+
}].sort((a, b) => a.pageNumber - b.pageNumber);
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
eventBus.on(PAGE_RENDERED_EVENT, handlePageRendered);
|
|
47
|
+
return () => {
|
|
48
|
+
eventBus.off(PAGE_RENDERED_EVENT, handlePageRendered);
|
|
49
|
+
setPortalTargets([]);
|
|
50
|
+
};
|
|
51
|
+
}, [eventBusRef, pdfViewerRef, document]);
|
|
52
|
+
return portalTargets;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=usePdfAnnotationPortals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePdfAnnotationPortals.js","names":["useEffect","useState","PAGE_RENDERED_EVENT","usePdfAnnotationPortals","pdfViewerRef","eventBusRef","document","portalTargets","setPortalTargets","eventBus","current","pdfViewer","handlePageRendered","evt","pageIndex","pageNumber","pageView","getPageView","div","viewport","prev","filtered","filter","t","container","pageHeight","viewBox","scale","sort","a","b","on","off"],"sources":["usePdfAnnotationPortals.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 { PDFDocumentProxy } from \"pdfjs-dist\";\nimport type { EventBus, PDFViewer } from \"pdfjs-dist/web/pdf_viewer.mjs\";\nimport type { RefObject } from \"react\";\nimport { useEffect, useState } from \"react\";\nimport { PAGE_RENDERED_EVENT } from \"../constants.js\";\n\nexport interface AnnotationPortalTarget {\n pageNumber: number;\n container: HTMLDivElement;\n pageHeight: number;\n scale: number;\n}\n\nexport function usePdfAnnotationPortals(\n pdfViewerRef: RefObject<PDFViewer | null>,\n eventBusRef: RefObject<EventBus | null>,\n document: PDFDocumentProxy | undefined,\n): AnnotationPortalTarget[] {\n const [portalTargets, setPortalTargets] = useState<AnnotationPortalTarget[]>(\n [],\n );\n\n useEffect(function subscribePageRendered() {\n const eventBus = eventBusRef.current;\n const pdfViewer = pdfViewerRef.current;\n if (eventBus == null || pdfViewer == null) {\n return;\n }\n\n const handlePageRendered = (evt: { pageNumber: number }) => {\n const pageIndex = evt.pageNumber - 1;\n const pageView = pdfViewer.getPageView(pageIndex);\n if (pageView?.div == null || pageView?.viewport == null) {\n return;\n }\n\n const viewport = pageView.viewport;\n\n setPortalTargets((prev) => {\n // Replace existing entry for this page or add new one\n const filtered = prev.filter((t) => t.pageNumber !== evt.pageNumber);\n return [...filtered, {\n pageNumber: evt.pageNumber,\n container: pageView.div as HTMLDivElement,\n pageHeight: viewport.viewBox[3], // viewBox is [xMin, yMin, width, height] and we need the original height before scaling\n scale: viewport.scale,\n }].sort((a, b) => a.pageNumber - b.pageNumber);\n });\n };\n\n eventBus.on(PAGE_RENDERED_EVENT, handlePageRendered);\n\n return () => {\n eventBus.off(PAGE_RENDERED_EVENT, handlePageRendered);\n setPortalTargets([]);\n };\n }, [eventBusRef, pdfViewerRef, document]);\n\n return portalTargets;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,mBAAmB,QAAQ,iBAAiB;AASrD,OAAO,SAASC,uBAAuBA,CACrCC,YAAyC,EACzCC,WAAuC,EACvCC,QAAsC,EACZ;EAC1B,MAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAGP,QAAQ,CAChD,EACF,CAAC;EAEDD,SAAS,CAAC,YAAiC;IACzC,MAAMS,QAAQ,GAAGJ,WAAW,CAACK,OAAO;IACpC,MAAMC,SAAS,GAAGP,YAAY,CAACM,OAAO;IACtC,IAAID,QAAQ,IAAI,IAAI,IAAIE,SAAS,IAAI,IAAI,EAAE;MACzC;IACF;IAEA,MAAMC,kBAAkB,GAAIC,GAA2B,IAAK;MAC1D,MAAMC,SAAS,GAAGD,GAAG,CAACE,UAAU,GAAG,CAAC;MACpC,MAAMC,QAAQ,GAAGL,SAAS,CAACM,WAAW,CAACH,SAAS,CAAC;MACjD,IAAIE,QAAQ,EAAEE,GAAG,IAAI,IAAI,IAAIF,QAAQ,EAAEG,QAAQ,IAAI,IAAI,EAAE;QACvD;MACF;MAEA,MAAMA,QAAQ,GAAGH,QAAQ,CAACG,QAAQ;MAElCX,gBAAgB,CAAEY,IAAI,IAAK;QACzB;QACA,MAAMC,QAAQ,GAAGD,IAAI,CAACE,MAAM,CAAEC,CAAC,IAAKA,CAAC,CAACR,UAAU,KAAKF,GAAG,CAACE,UAAU,CAAC;QACpE,OAAO,CAAC,GAAGM,QAAQ,EAAE;UACnBN,UAAU,EAAEF,GAAG,CAACE,UAAU;UAC1BS,SAAS,EAAER,QAAQ,CAACE,GAAqB;UACzCO,UAAU,EAAEN,QAAQ,CAACO,OAAO,CAAC,CAAC,CAAC;UAAE;UACjCC,KAAK,EAAER,QAAQ,CAACQ;QAClB,CAAC,CAAC,CAACC,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,CAACd,UAAU,GAAGe,CAAC,CAACf,UAAU,CAAC;MAChD,CAAC,CAAC;IACJ,CAAC;IAEDN,QAAQ,CAACsB,EAAE,CAAC7B,mBAAmB,EAAEU,kBAAkB,CAAC;IAEpD,OAAO,MAAM;MACXH,QAAQ,CAACuB,GAAG,CAAC9B,mBAAmB,EAAEU,kBAAkB,CAAC;MACrDJ,gBAAgB,CAAC,EAAE,CAAC;IACtB,CAAC;EACH,CAAC,EAAE,CAACH,WAAW,EAAED,YAAY,EAAEE,QAAQ,CAAC,CAAC;EAEzC,OAAOC,aAAa;AACtB","ignoreList":[]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { getDocument, GlobalWorkerOptions } from "pdfjs-dist";
|
|
18
|
+
// @ts-expect-error -- Vite ?url import resolves to a string path at build time
|
|
19
|
+
import pdfWorkerUrl from "pdfjs-dist/build/pdf.worker.min.mjs?url";
|
|
20
|
+
import { useEffect, useState } from "react";
|
|
21
|
+
const pdfWorker = {
|
|
22
|
+
workerInitialized: false,
|
|
23
|
+
ensureWorker() {
|
|
24
|
+
GlobalWorkerOptions.workerSrc = pdfWorkerUrl;
|
|
25
|
+
this.workerInitialized = true;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
export function usePdfDocument(src) {
|
|
29
|
+
const [document, setDocument] = useState(undefined);
|
|
30
|
+
const [numPages, setNumPages] = useState(0);
|
|
31
|
+
const [loading, setLoading] = useState(true);
|
|
32
|
+
const [error, setError] = useState(undefined);
|
|
33
|
+
useEffect(function () {
|
|
34
|
+
pdfWorker.ensureWorker();
|
|
35
|
+
setLoading(true);
|
|
36
|
+
setError(undefined);
|
|
37
|
+
const loadingTask = getDocument(typeof src === "string" ? {
|
|
38
|
+
url: src
|
|
39
|
+
} : {
|
|
40
|
+
data: src
|
|
41
|
+
});
|
|
42
|
+
let cancelled = false;
|
|
43
|
+
loadingTask.promise.then(pdf => {
|
|
44
|
+
if (!cancelled) {
|
|
45
|
+
setDocument(pdf);
|
|
46
|
+
setNumPages(pdf.numPages);
|
|
47
|
+
setLoading(false);
|
|
48
|
+
}
|
|
49
|
+
}, err => {
|
|
50
|
+
if (!cancelled) {
|
|
51
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
52
|
+
setLoading(false);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
return () => {
|
|
56
|
+
cancelled = true;
|
|
57
|
+
void loadingTask.destroy();
|
|
58
|
+
};
|
|
59
|
+
}, [src]);
|
|
60
|
+
return {
|
|
61
|
+
document,
|
|
62
|
+
numPages,
|
|
63
|
+
loading,
|
|
64
|
+
error
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=usePdfDocument.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePdfDocument.js","names":["getDocument","GlobalWorkerOptions","pdfWorkerUrl","useEffect","useState","pdfWorker","workerInitialized","ensureWorker","workerSrc","usePdfDocument","src","document","setDocument","undefined","numPages","setNumPages","loading","setLoading","error","setError","loadingTask","url","data","cancelled","promise","then","pdf","err","Error","String","destroy"],"sources":["usePdfDocument.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 { PDFDocumentProxy } from \"pdfjs-dist\";\nimport { getDocument, GlobalWorkerOptions } from \"pdfjs-dist\";\n// @ts-expect-error -- Vite ?url import resolves to a string path at build time\nimport pdfWorkerUrl from \"pdfjs-dist/build/pdf.worker.min.mjs?url\";\nimport { useEffect, useState } from \"react\";\n\nconst pdfWorker = {\n workerInitialized: false,\n ensureWorker() {\n GlobalWorkerOptions.workerSrc = pdfWorkerUrl as string;\n this.workerInitialized = true;\n },\n};\n\ninterface UsePdfDocumentResult {\n document: PDFDocumentProxy | undefined;\n numPages: number;\n loading: boolean;\n error: Error | undefined;\n}\n\nexport function usePdfDocument(\n src: string | ArrayBuffer,\n): UsePdfDocumentResult {\n const [document, setDocument] = useState<PDFDocumentProxy | undefined>(\n undefined,\n );\n const [numPages, setNumPages] = useState(0);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState<Error | undefined>(undefined);\n\n useEffect(function loadPdfDocument() {\n pdfWorker.ensureWorker();\n setLoading(true);\n setError(undefined);\n\n const loadingTask = getDocument(\n typeof src === \"string\" ? { url: src } : { data: src },\n );\n\n let cancelled = false;\n\n loadingTask.promise.then(\n (pdf) => {\n if (!cancelled) {\n setDocument(pdf);\n setNumPages(pdf.numPages);\n setLoading(false);\n }\n },\n (err: unknown) => {\n if (!cancelled) {\n setError(\n err instanceof Error ? err : new Error(String(err)),\n );\n setLoading(false);\n }\n },\n );\n\n return () => {\n cancelled = true;\n void loadingTask.destroy();\n };\n }, [src]);\n\n return { document, numPages, loading, error };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,WAAW,EAAEC,mBAAmB,QAAQ,YAAY;AAC7D;AACA,OAAOC,YAAY,MAAM,yCAAyC;AAClE,SAASC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAE3C,MAAMC,SAAS,GAAG;EAChBC,iBAAiB,EAAE,KAAK;EACxBC,YAAYA,CAAA,EAAG;IACbN,mBAAmB,CAACO,SAAS,GAAGN,YAAsB;IACtD,IAAI,CAACI,iBAAiB,GAAG,IAAI;EAC/B;AACF,CAAC;AASD,OAAO,SAASG,cAAcA,CAC5BC,GAAyB,EACH;EACtB,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAGR,QAAQ,CACtCS,SACF,CAAC;EACD,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAGX,QAAQ,CAAC,CAAC,CAAC;EAC3C,MAAM,CAACY,OAAO,EAAEC,UAAU,CAAC,GAAGb,QAAQ,CAAC,IAAI,CAAC;EAC5C,MAAM,CAACc,KAAK,EAAEC,QAAQ,CAAC,GAAGf,QAAQ,CAAoBS,SAAS,CAAC;EAEhEV,SAAS,CAAC,YAA2B;IACnCE,SAAS,CAACE,YAAY,CAAC,CAAC;IACxBU,UAAU,CAAC,IAAI,CAAC;IAChBE,QAAQ,CAACN,SAAS,CAAC;IAEnB,MAAMO,WAAW,GAAGpB,WAAW,CAC7B,OAAOU,GAAG,KAAK,QAAQ,GAAG;MAAEW,GAAG,EAAEX;IAAI,CAAC,GAAG;MAAEY,IAAI,EAAEZ;IAAI,CACvD,CAAC;IAED,IAAIa,SAAS,GAAG,KAAK;IAErBH,WAAW,CAACI,OAAO,CAACC,IAAI,CACrBC,GAAG,IAAK;MACP,IAAI,CAACH,SAAS,EAAE;QACdX,WAAW,CAACc,GAAG,CAAC;QAChBX,WAAW,CAACW,GAAG,CAACZ,QAAQ,CAAC;QACzBG,UAAU,CAAC,KAAK,CAAC;MACnB;IACF,CAAC,EACAU,GAAY,IAAK;MAChB,IAAI,CAACJ,SAAS,EAAE;QACdJ,QAAQ,CACNQ,GAAG,YAAYC,KAAK,GAAGD,GAAG,GAAG,IAAIC,KAAK,CAACC,MAAM,CAACF,GAAG,CAAC,CACpD,CAAC;QACDV,UAAU,CAAC,KAAK,CAAC;MACnB;IACF,CACF,CAAC;IAED,OAAO,MAAM;MACXM,SAAS,GAAG,IAAI;MAChB,KAAKH,WAAW,CAACU,OAAO,CAAC,CAAC;IAC5B,CAAC;EACH,CAAC,EAAE,CAACpB,GAAG,CAAC,CAAC;EAET,OAAO;IAAEC,QAAQ;IAAEG,QAAQ;IAAEE,OAAO;IAAEE;EAAM,CAAC;AAC/C","ignoreList":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { EventBus, PDFFindController, PDFLinkService, PDFViewer } from "pdfjs-dist/web/pdf_viewer.mjs";
|
|
18
|
+
import { useEffect, useRef } from "react";
|
|
19
|
+
export function usePdfViewer(containerRef, viewerRef, document, initialScale) {
|
|
20
|
+
const pdfViewerRef = useRef(null);
|
|
21
|
+
const eventBusRef = useRef(null);
|
|
22
|
+
const findControllerRef = useRef(null);
|
|
23
|
+
useEffect(function () {
|
|
24
|
+
const container = containerRef.current;
|
|
25
|
+
const viewer = viewerRef.current;
|
|
26
|
+
if (container == null || viewer == null || document == null) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const eventBus = new EventBus();
|
|
30
|
+
const linkService = new PDFLinkService({
|
|
31
|
+
eventBus
|
|
32
|
+
});
|
|
33
|
+
const findController = new PDFFindController({
|
|
34
|
+
linkService,
|
|
35
|
+
eventBus,
|
|
36
|
+
updateMatchesCountOnProgress: true
|
|
37
|
+
});
|
|
38
|
+
const pdfViewer = new PDFViewer({
|
|
39
|
+
container,
|
|
40
|
+
viewer,
|
|
41
|
+
eventBus,
|
|
42
|
+
linkService,
|
|
43
|
+
findController,
|
|
44
|
+
removePageBorders: true
|
|
45
|
+
});
|
|
46
|
+
linkService.setViewer(pdfViewer);
|
|
47
|
+
linkService.setDocument(document);
|
|
48
|
+
findController.setDocument(document);
|
|
49
|
+
pdfViewer.setDocument(document);
|
|
50
|
+
if (initialScale != null) {
|
|
51
|
+
pdfViewer.currentScale = initialScale;
|
|
52
|
+
}
|
|
53
|
+
eventBusRef.current = eventBus;
|
|
54
|
+
findControllerRef.current = findController;
|
|
55
|
+
pdfViewerRef.current = pdfViewer;
|
|
56
|
+
return () => {
|
|
57
|
+
pdfViewerRef.current = null;
|
|
58
|
+
eventBusRef.current = null;
|
|
59
|
+
findControllerRef.current = null;
|
|
60
|
+
pdfViewer.cleanup();
|
|
61
|
+
};
|
|
62
|
+
}, [containerRef, viewerRef, document]);
|
|
63
|
+
return {
|
|
64
|
+
pdfViewerRef,
|
|
65
|
+
eventBusRef,
|
|
66
|
+
findControllerRef
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=usePdfViewer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePdfViewer.js","names":["EventBus","PDFFindController","PDFLinkService","PDFViewer","useEffect","useRef","usePdfViewer","containerRef","viewerRef","document","initialScale","pdfViewerRef","eventBusRef","findControllerRef","container","current","viewer","eventBus","linkService","findController","updateMatchesCountOnProgress","pdfViewer","removePageBorders","setViewer","setDocument","currentScale","cleanup"],"sources":["usePdfViewer.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 { PDFDocumentProxy } from \"pdfjs-dist\";\nimport {\n EventBus,\n PDFFindController,\n PDFLinkService,\n PDFViewer,\n} from \"pdfjs-dist/web/pdf_viewer.mjs\";\nimport type { RefObject } from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport interface UsePdfViewerResult {\n pdfViewerRef: RefObject<PDFViewer | null>;\n eventBusRef: RefObject<EventBus | null>;\n findControllerRef: RefObject<PDFFindController | null>;\n}\n\nexport function usePdfViewer(\n containerRef: RefObject<HTMLDivElement | null>,\n viewerRef: RefObject<HTMLDivElement | null>,\n document: PDFDocumentProxy | undefined,\n initialScale?: number,\n): UsePdfViewerResult {\n const pdfViewerRef = useRef<PDFViewer | null>(null);\n const eventBusRef = useRef<EventBus | null>(null);\n const findControllerRef = useRef<PDFFindController | null>(null);\n\n useEffect(function initializePdfViewer() {\n const container = containerRef.current;\n const viewer = viewerRef.current;\n if (container == null || viewer == null || document == null) {\n return;\n }\n\n const eventBus = new EventBus();\n const linkService = new PDFLinkService({ eventBus });\n const findController = new PDFFindController({\n linkService,\n eventBus,\n updateMatchesCountOnProgress: true,\n });\n\n const pdfViewer = new PDFViewer({\n container,\n viewer,\n eventBus,\n linkService,\n findController,\n removePageBorders: true,\n });\n\n linkService.setViewer(pdfViewer);\n linkService.setDocument(document);\n findController.setDocument(document);\n pdfViewer.setDocument(document);\n\n if (initialScale != null) {\n pdfViewer.currentScale = initialScale;\n }\n\n eventBusRef.current = eventBus;\n findControllerRef.current = findController;\n pdfViewerRef.current = pdfViewer;\n\n return () => {\n pdfViewerRef.current = null;\n eventBusRef.current = null;\n findControllerRef.current = null;\n pdfViewer.cleanup();\n };\n }, [containerRef, viewerRef, document]);\n\n return { pdfViewerRef, eventBusRef, findControllerRef };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SACEA,QAAQ,EACRC,iBAAiB,EACjBC,cAAc,EACdC,SAAS,QACJ,+BAA+B;AAEtC,SAASC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAQzC,OAAO,SAASC,YAAYA,CAC1BC,YAA8C,EAC9CC,SAA2C,EAC3CC,QAAsC,EACtCC,YAAqB,EACD;EACpB,MAAMC,YAAY,GAAGN,MAAM,CAAmB,IAAI,CAAC;EACnD,MAAMO,WAAW,GAAGP,MAAM,CAAkB,IAAI,CAAC;EACjD,MAAMQ,iBAAiB,GAAGR,MAAM,CAA2B,IAAI,CAAC;EAEhED,SAAS,CAAC,YAA+B;IACvC,MAAMU,SAAS,GAAGP,YAAY,CAACQ,OAAO;IACtC,MAAMC,MAAM,GAAGR,SAAS,CAACO,OAAO;IAChC,IAAID,SAAS,IAAI,IAAI,IAAIE,MAAM,IAAI,IAAI,IAAIP,QAAQ,IAAI,IAAI,EAAE;MAC3D;IACF;IAEA,MAAMQ,QAAQ,GAAG,IAAIjB,QAAQ,CAAC,CAAC;IAC/B,MAAMkB,WAAW,GAAG,IAAIhB,cAAc,CAAC;MAAEe;IAAS,CAAC,CAAC;IACpD,MAAME,cAAc,GAAG,IAAIlB,iBAAiB,CAAC;MAC3CiB,WAAW;MACXD,QAAQ;MACRG,4BAA4B,EAAE;IAChC,CAAC,CAAC;IAEF,MAAMC,SAAS,GAAG,IAAIlB,SAAS,CAAC;MAC9BW,SAAS;MACTE,MAAM;MACNC,QAAQ;MACRC,WAAW;MACXC,cAAc;MACdG,iBAAiB,EAAE;IACrB,CAAC,CAAC;IAEFJ,WAAW,CAACK,SAAS,CAACF,SAAS,CAAC;IAChCH,WAAW,CAACM,WAAW,CAACf,QAAQ,CAAC;IACjCU,cAAc,CAACK,WAAW,CAACf,QAAQ,CAAC;IACpCY,SAAS,CAACG,WAAW,CAACf,QAAQ,CAAC;IAE/B,IAAIC,YAAY,IAAI,IAAI,EAAE;MACxBW,SAAS,CAACI,YAAY,GAAGf,YAAY;IACvC;IAEAE,WAAW,CAACG,OAAO,GAAGE,QAAQ;IAC9BJ,iBAAiB,CAACE,OAAO,GAAGI,cAAc;IAC1CR,YAAY,CAACI,OAAO,GAAGM,SAAS;IAEhC,OAAO,MAAM;MACXV,YAAY,CAACI,OAAO,GAAG,IAAI;MAC3BH,WAAW,CAACG,OAAO,GAAG,IAAI;MAC1BF,iBAAiB,CAACE,OAAO,GAAG,IAAI;MAChCM,SAAS,CAACK,OAAO,CAAC,CAAC;IACrB,CAAC;EACH,CAAC,EAAE,CAACnB,YAAY,EAAEC,SAAS,EAAEC,QAAQ,CAAC,CAAC;EAEvC,OAAO;IAAEE,YAAY;IAAEC,WAAW;IAAEC;EAAkB,CAAC;AACzD","ignoreList":[]}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { useCallback, useEffect, useState } from "react";
|
|
18
|
+
import { EMPTY_STRING, FIND_EVENT, UPDATE_FIND_CONTROL_STATE_EVENT, UPDATE_FIND_MATCHES_COUNT_EVENT } from "../constants.js";
|
|
19
|
+
export function usePdfViewerSearch(eventBusRef, findControllerRef, document) {
|
|
20
|
+
const [query, setQueryState] = useState(EMPTY_STRING);
|
|
21
|
+
const [totalMatches, setTotalMatches] = useState(0);
|
|
22
|
+
const [currentMatchIndex, setCurrentMatchIndex] = useState(0);
|
|
23
|
+
const [isSearchOpen, setIsSearchOpen] = useState(false);
|
|
24
|
+
const dispatchFind = useCallback((queryString, findPrevious) => {
|
|
25
|
+
eventBusRef.current?.dispatch(FIND_EVENT, {
|
|
26
|
+
source: undefined,
|
|
27
|
+
type: "",
|
|
28
|
+
query: queryString,
|
|
29
|
+
caseSensitive: false,
|
|
30
|
+
highlightAll: true,
|
|
31
|
+
phraseSearch: true,
|
|
32
|
+
findPrevious
|
|
33
|
+
});
|
|
34
|
+
}, [eventBusRef]);
|
|
35
|
+
const dispatchFindAgain = useCallback(findPrevious => {
|
|
36
|
+
eventBusRef.current?.dispatch(FIND_EVENT, {
|
|
37
|
+
source: undefined,
|
|
38
|
+
type: "again",
|
|
39
|
+
query,
|
|
40
|
+
caseSensitive: false,
|
|
41
|
+
highlightAll: true,
|
|
42
|
+
phraseSearch: true,
|
|
43
|
+
findPrevious
|
|
44
|
+
});
|
|
45
|
+
}, [eventBusRef, query]);
|
|
46
|
+
const setQuery = useCallback(input => {
|
|
47
|
+
setQueryState(input);
|
|
48
|
+
if (input === EMPTY_STRING) {
|
|
49
|
+
setTotalMatches(0);
|
|
50
|
+
setCurrentMatchIndex(0);
|
|
51
|
+
// Dispatch empty query to clear highlights
|
|
52
|
+
dispatchFind(EMPTY_STRING, false);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
dispatchFind(input, false);
|
|
56
|
+
}, [dispatchFind]);
|
|
57
|
+
const nextMatch = useCallback(() => {
|
|
58
|
+
dispatchFindAgain(false);
|
|
59
|
+
}, [dispatchFindAgain]);
|
|
60
|
+
const prevMatch = useCallback(() => {
|
|
61
|
+
dispatchFindAgain(true);
|
|
62
|
+
}, [dispatchFindAgain]);
|
|
63
|
+
const openSearch = useCallback(() => {
|
|
64
|
+
setIsSearchOpen(true);
|
|
65
|
+
}, []);
|
|
66
|
+
const closeSearch = useCallback(() => {
|
|
67
|
+
setIsSearchOpen(false);
|
|
68
|
+
setQueryState(EMPTY_STRING);
|
|
69
|
+
setTotalMatches(0);
|
|
70
|
+
setCurrentMatchIndex(0);
|
|
71
|
+
// Clear highlights
|
|
72
|
+
dispatchFind(EMPTY_STRING, false);
|
|
73
|
+
}, [dispatchFind]);
|
|
74
|
+
useEffect(function () {
|
|
75
|
+
const eventBus = eventBusRef.current;
|
|
76
|
+
if (eventBus == null) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const handleMatchesCount = evt => {
|
|
80
|
+
setTotalMatches(evt.matchesCount.total);
|
|
81
|
+
setCurrentMatchIndex(evt.matchesCount.current > 0 ? evt.matchesCount.current - 1 : 0);
|
|
82
|
+
};
|
|
83
|
+
const handleControlState = evt => {
|
|
84
|
+
setTotalMatches(evt.matchesCount.total);
|
|
85
|
+
setCurrentMatchIndex(evt.matchesCount.current > 0 ? evt.matchesCount.current - 1 : 0);
|
|
86
|
+
};
|
|
87
|
+
eventBus.on(UPDATE_FIND_MATCHES_COUNT_EVENT, handleMatchesCount);
|
|
88
|
+
eventBus.on(UPDATE_FIND_CONTROL_STATE_EVENT, handleControlState);
|
|
89
|
+
return () => {
|
|
90
|
+
eventBus.off(UPDATE_FIND_MATCHES_COUNT_EVENT, handleMatchesCount);
|
|
91
|
+
eventBus.off(UPDATE_FIND_CONTROL_STATE_EVENT, handleControlState);
|
|
92
|
+
};
|
|
93
|
+
}, [eventBusRef, findControllerRef, document]);
|
|
94
|
+
return {
|
|
95
|
+
query,
|
|
96
|
+
totalMatches,
|
|
97
|
+
currentMatchIndex,
|
|
98
|
+
isSearchOpen,
|
|
99
|
+
setQuery,
|
|
100
|
+
nextMatch,
|
|
101
|
+
prevMatch,
|
|
102
|
+
openSearch,
|
|
103
|
+
closeSearch
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=usePdfViewerSearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePdfViewerSearch.js","names":["useCallback","useEffect","useState","EMPTY_STRING","FIND_EVENT","UPDATE_FIND_CONTROL_STATE_EVENT","UPDATE_FIND_MATCHES_COUNT_EVENT","usePdfViewerSearch","eventBusRef","findControllerRef","document","query","setQueryState","totalMatches","setTotalMatches","currentMatchIndex","setCurrentMatchIndex","isSearchOpen","setIsSearchOpen","dispatchFind","queryString","findPrevious","current","dispatch","source","undefined","type","caseSensitive","highlightAll","phraseSearch","dispatchFindAgain","setQuery","input","nextMatch","prevMatch","openSearch","closeSearch","eventBus","handleMatchesCount","evt","matchesCount","total","handleControlState","on","off"],"sources":["usePdfViewerSearch.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 { PDFDocumentProxy } from \"pdfjs-dist\";\nimport type {\n EventBus,\n PDFFindController,\n} from \"pdfjs-dist/web/pdf_viewer.mjs\";\nimport type { RefObject } from \"react\";\nimport { useCallback, useEffect, useState } from \"react\";\nimport {\n EMPTY_STRING,\n FIND_EVENT,\n UPDATE_FIND_CONTROL_STATE_EVENT,\n UPDATE_FIND_MATCHES_COUNT_EVENT,\n} from \"../constants.js\";\n\nexport interface UsePdfViewerSearchResult {\n query: string;\n totalMatches: number;\n currentMatchIndex: number;\n isSearchOpen: boolean;\n setQuery: (query: string) => void;\n nextMatch: () => void;\n prevMatch: () => void;\n openSearch: () => void;\n closeSearch: () => void;\n}\n\nexport function usePdfViewerSearch(\n eventBusRef: RefObject<EventBus | null>,\n findControllerRef: RefObject<PDFFindController | null>,\n document: PDFDocumentProxy | undefined,\n): UsePdfViewerSearchResult {\n const [query, setQueryState] = useState(EMPTY_STRING);\n const [totalMatches, setTotalMatches] = useState(0);\n const [currentMatchIndex, setCurrentMatchIndex] = useState(0);\n const [isSearchOpen, setIsSearchOpen] = useState(false);\n\n const dispatchFind = useCallback(\n (queryString: string, findPrevious: boolean) => {\n eventBusRef.current?.dispatch(FIND_EVENT, {\n source: undefined,\n type: \"\",\n query: queryString,\n caseSensitive: false,\n highlightAll: true,\n phraseSearch: true,\n findPrevious,\n });\n },\n [eventBusRef],\n );\n\n const dispatchFindAgain = useCallback(\n (findPrevious: boolean) => {\n eventBusRef.current?.dispatch(FIND_EVENT, {\n source: undefined,\n type: \"again\",\n query,\n caseSensitive: false,\n highlightAll: true,\n phraseSearch: true,\n findPrevious,\n });\n },\n [eventBusRef, query],\n );\n\n const setQuery = useCallback(\n (input: string) => {\n setQueryState(input);\n\n if (input === EMPTY_STRING) {\n setTotalMatches(0);\n setCurrentMatchIndex(0);\n // Dispatch empty query to clear highlights\n dispatchFind(EMPTY_STRING, false);\n return;\n }\n\n dispatchFind(input, false);\n },\n [dispatchFind],\n );\n\n const nextMatch = useCallback(() => {\n dispatchFindAgain(false);\n }, [dispatchFindAgain]);\n\n const prevMatch = useCallback(() => {\n dispatchFindAgain(true);\n }, [dispatchFindAgain]);\n\n const openSearch = useCallback(() => {\n setIsSearchOpen(true);\n }, []);\n\n const closeSearch = useCallback(() => {\n setIsSearchOpen(false);\n setQueryState(EMPTY_STRING);\n setTotalMatches(0);\n setCurrentMatchIndex(0);\n // Clear highlights\n dispatchFind(EMPTY_STRING, false);\n }, [dispatchFind]);\n\n useEffect(function subscribeSearchEvents() {\n const eventBus = eventBusRef.current;\n if (eventBus == null) {\n return;\n }\n\n const handleMatchesCount = (evt: {\n matchesCount: { current: number; total: number };\n }) => {\n setTotalMatches(evt.matchesCount.total);\n setCurrentMatchIndex(\n evt.matchesCount.current > 0 ? evt.matchesCount.current - 1 : 0,\n );\n };\n\n const handleControlState = (evt: {\n state: number;\n matchesCount: { current: number; total: number };\n }) => {\n setTotalMatches(evt.matchesCount.total);\n setCurrentMatchIndex(\n evt.matchesCount.current > 0 ? evt.matchesCount.current - 1 : 0,\n );\n };\n\n eventBus.on(UPDATE_FIND_MATCHES_COUNT_EVENT, handleMatchesCount);\n eventBus.on(UPDATE_FIND_CONTROL_STATE_EVENT, handleControlState);\n\n return () => {\n eventBus.off(UPDATE_FIND_MATCHES_COUNT_EVENT, handleMatchesCount);\n eventBus.off(UPDATE_FIND_CONTROL_STATE_EVENT, handleControlState);\n };\n }, [eventBusRef, findControllerRef, document]);\n\n return {\n query,\n totalMatches,\n currentMatchIndex,\n isSearchOpen,\n setQuery,\n nextMatch,\n prevMatch,\n openSearch,\n closeSearch,\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SAASA,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACxD,SACEC,YAAY,EACZC,UAAU,EACVC,+BAA+B,EAC/BC,+BAA+B,QAC1B,iBAAiB;AAcxB,OAAO,SAASC,kBAAkBA,CAChCC,WAAuC,EACvCC,iBAAsD,EACtDC,QAAsC,EACZ;EAC1B,MAAM,CAACC,KAAK,EAAEC,aAAa,CAAC,GAAGV,QAAQ,CAACC,YAAY,CAAC;EACrD,MAAM,CAACU,YAAY,EAAEC,eAAe,CAAC,GAAGZ,QAAQ,CAAC,CAAC,CAAC;EACnD,MAAM,CAACa,iBAAiB,EAAEC,oBAAoB,CAAC,GAAGd,QAAQ,CAAC,CAAC,CAAC;EAC7D,MAAM,CAACe,YAAY,EAAEC,eAAe,CAAC,GAAGhB,QAAQ,CAAC,KAAK,CAAC;EAEvD,MAAMiB,YAAY,GAAGnB,WAAW,CAC9B,CAACoB,WAAmB,EAAEC,YAAqB,KAAK;IAC9Cb,WAAW,CAACc,OAAO,EAAEC,QAAQ,CAACnB,UAAU,EAAE;MACxCoB,MAAM,EAAEC,SAAS;MACjBC,IAAI,EAAE,EAAE;MACRf,KAAK,EAAES,WAAW;MAClBO,aAAa,EAAE,KAAK;MACpBC,YAAY,EAAE,IAAI;MAClBC,YAAY,EAAE,IAAI;MAClBR;IACF,CAAC,CAAC;EACJ,CAAC,EACD,CAACb,WAAW,CACd,CAAC;EAED,MAAMsB,iBAAiB,GAAG9B,WAAW,CAClCqB,YAAqB,IAAK;IACzBb,WAAW,CAACc,OAAO,EAAEC,QAAQ,CAACnB,UAAU,EAAE;MACxCoB,MAAM,EAAEC,SAAS;MACjBC,IAAI,EAAE,OAAO;MACbf,KAAK;MACLgB,aAAa,EAAE,KAAK;MACpBC,YAAY,EAAE,IAAI;MAClBC,YAAY,EAAE,IAAI;MAClBR;IACF,CAAC,CAAC;EACJ,CAAC,EACD,CAACb,WAAW,EAAEG,KAAK,CACrB,CAAC;EAED,MAAMoB,QAAQ,GAAG/B,WAAW,CACzBgC,KAAa,IAAK;IACjBpB,aAAa,CAACoB,KAAK,CAAC;IAEpB,IAAIA,KAAK,KAAK7B,YAAY,EAAE;MAC1BW,eAAe,CAAC,CAAC,CAAC;MAClBE,oBAAoB,CAAC,CAAC,CAAC;MACvB;MACAG,YAAY,CAAChB,YAAY,EAAE,KAAK,CAAC;MACjC;IACF;IAEAgB,YAAY,CAACa,KAAK,EAAE,KAAK,CAAC;EAC5B,CAAC,EACD,CAACb,YAAY,CACf,CAAC;EAED,MAAMc,SAAS,GAAGjC,WAAW,CAAC,MAAM;IAClC8B,iBAAiB,CAAC,KAAK,CAAC;EAC1B,CAAC,EAAE,CAACA,iBAAiB,CAAC,CAAC;EAEvB,MAAMI,SAAS,GAAGlC,WAAW,CAAC,MAAM;IAClC8B,iBAAiB,CAAC,IAAI,CAAC;EACzB,CAAC,EAAE,CAACA,iBAAiB,CAAC,CAAC;EAEvB,MAAMK,UAAU,GAAGnC,WAAW,CAAC,MAAM;IACnCkB,eAAe,CAAC,IAAI,CAAC;EACvB,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMkB,WAAW,GAAGpC,WAAW,CAAC,MAAM;IACpCkB,eAAe,CAAC,KAAK,CAAC;IACtBN,aAAa,CAACT,YAAY,CAAC;IAC3BW,eAAe,CAAC,CAAC,CAAC;IAClBE,oBAAoB,CAAC,CAAC,CAAC;IACvB;IACAG,YAAY,CAAChB,YAAY,EAAE,KAAK,CAAC;EACnC,CAAC,EAAE,CAACgB,YAAY,CAAC,CAAC;EAElBlB,SAAS,CAAC,YAAiC;IACzC,MAAMoC,QAAQ,GAAG7B,WAAW,CAACc,OAAO;IACpC,IAAIe,QAAQ,IAAI,IAAI,EAAE;MACpB;IACF;IAEA,MAAMC,kBAAkB,GAAIC,GAE3B,IAAK;MACJzB,eAAe,CAACyB,GAAG,CAACC,YAAY,CAACC,KAAK,CAAC;MACvCzB,oBAAoB,CAClBuB,GAAG,CAACC,YAAY,CAAClB,OAAO,GAAG,CAAC,GAAGiB,GAAG,CAACC,YAAY,CAAClB,OAAO,GAAG,CAAC,GAAG,CAChE,CAAC;IACH,CAAC;IAED,MAAMoB,kBAAkB,GAAIH,GAG3B,IAAK;MACJzB,eAAe,CAACyB,GAAG,CAACC,YAAY,CAACC,KAAK,CAAC;MACvCzB,oBAAoB,CAClBuB,GAAG,CAACC,YAAY,CAAClB,OAAO,GAAG,CAAC,GAAGiB,GAAG,CAACC,YAAY,CAAClB,OAAO,GAAG,CAAC,GAAG,CAChE,CAAC;IACH,CAAC;IAEDe,QAAQ,CAACM,EAAE,CAACrC,+BAA+B,EAAEgC,kBAAkB,CAAC;IAChED,QAAQ,CAACM,EAAE,CAACtC,+BAA+B,EAAEqC,kBAAkB,CAAC;IAEhE,OAAO,MAAM;MACXL,QAAQ,CAACO,GAAG,CAACtC,+BAA+B,EAAEgC,kBAAkB,CAAC;MACjED,QAAQ,CAACO,GAAG,CAACvC,+BAA+B,EAAEqC,kBAAkB,CAAC;IACnE,CAAC;EACH,CAAC,EAAE,CAAClC,WAAW,EAAEC,iBAAiB,EAAEC,QAAQ,CAAC,CAAC;EAE9C,OAAO;IACLC,KAAK;IACLE,YAAY;IACZE,iBAAiB;IACjBE,YAAY;IACZc,QAAQ;IACRE,SAAS;IACTC,SAAS;IACTC,UAAU;IACVC;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { useCallback, useEffect, useRef } from "react";
|
|
18
|
+
import { PAGE_CHANGING_EVENT, SCALE_CHANGING_EVENT } from "../constants.js";
|
|
19
|
+
export function usePdfViewerSync({
|
|
20
|
+
pdfViewerRef,
|
|
21
|
+
eventBusRef,
|
|
22
|
+
document,
|
|
23
|
+
scale,
|
|
24
|
+
onScaleChange,
|
|
25
|
+
onPageChange
|
|
26
|
+
}) {
|
|
27
|
+
const lastScaleRef = useRef(scale);
|
|
28
|
+
|
|
29
|
+
// Sync React scale → PDFViewer
|
|
30
|
+
useEffect(function () {
|
|
31
|
+
const pdfViewer = pdfViewerRef.current;
|
|
32
|
+
if (pdfViewer == null) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (Math.abs(lastScaleRef.current - scale) > 0.001) {
|
|
36
|
+
lastScaleRef.current = scale;
|
|
37
|
+
pdfViewer.currentScale = scale;
|
|
38
|
+
}
|
|
39
|
+
}, [pdfViewerRef, scale]);
|
|
40
|
+
|
|
41
|
+
// Listen to PDFViewer events → React state
|
|
42
|
+
useEffect(function () {
|
|
43
|
+
const eventBus = eventBusRef.current;
|
|
44
|
+
if (eventBus == null) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const handlePageChanging = evt => {
|
|
48
|
+
onPageChange(evt.pageNumber);
|
|
49
|
+
};
|
|
50
|
+
const handleScaleChanging = evt => {
|
|
51
|
+
lastScaleRef.current = evt.scale;
|
|
52
|
+
onScaleChange(evt.scale);
|
|
53
|
+
};
|
|
54
|
+
eventBus.on(PAGE_CHANGING_EVENT, handlePageChanging);
|
|
55
|
+
eventBus.on(SCALE_CHANGING_EVENT, handleScaleChanging);
|
|
56
|
+
return () => {
|
|
57
|
+
eventBus.off(PAGE_CHANGING_EVENT, handlePageChanging);
|
|
58
|
+
eventBus.off(SCALE_CHANGING_EVENT, handleScaleChanging);
|
|
59
|
+
};
|
|
60
|
+
}, [eventBusRef, document, onPageChange, onScaleChange]);
|
|
61
|
+
const scrollToPage = useCallback(page => {
|
|
62
|
+
const pdfViewer = pdfViewerRef.current;
|
|
63
|
+
if (pdfViewer != null) {
|
|
64
|
+
pdfViewer.currentPageNumber = page;
|
|
65
|
+
}
|
|
66
|
+
}, [pdfViewerRef]);
|
|
67
|
+
return {
|
|
68
|
+
scrollToPage
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=usePdfViewerSync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePdfViewerSync.js","names":["useCallback","useEffect","useRef","PAGE_CHANGING_EVENT","SCALE_CHANGING_EVENT","usePdfViewerSync","pdfViewerRef","eventBusRef","document","scale","onScaleChange","onPageChange","lastScaleRef","pdfViewer","current","Math","abs","currentScale","eventBus","handlePageChanging","evt","pageNumber","handleScaleChanging","on","off","scrollToPage","page","currentPageNumber"],"sources":["usePdfViewerSync.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 { PDFDocumentProxy } from \"pdfjs-dist\";\nimport type { EventBus, PDFViewer } from \"pdfjs-dist/web/pdf_viewer.mjs\";\nimport type { RefObject } from \"react\";\nimport { useCallback, useEffect, useRef } from \"react\";\nimport { PAGE_CHANGING_EVENT, SCALE_CHANGING_EVENT } from \"../constants.js\";\n\ninterface UsePdfViewerSyncOptions {\n pdfViewerRef: RefObject<PDFViewer | null>;\n eventBusRef: RefObject<EventBus | null>;\n document: PDFDocumentProxy | undefined;\n scale: number;\n onScaleChange: (scale: number) => void;\n onPageChange: (page: number) => void;\n}\n\nexport function usePdfViewerSync({\n pdfViewerRef,\n eventBusRef,\n document,\n scale,\n onScaleChange,\n onPageChange,\n}: UsePdfViewerSyncOptions): {\n scrollToPage: (page: number) => void;\n} {\n const lastScaleRef = useRef(scale);\n\n // Sync React scale → PDFViewer\n useEffect(function syncScaleToViewer() {\n const pdfViewer = pdfViewerRef.current;\n if (pdfViewer == null) {\n return;\n }\n if (Math.abs(lastScaleRef.current - scale) > 0.001) {\n lastScaleRef.current = scale;\n pdfViewer.currentScale = scale;\n }\n }, [pdfViewerRef, scale]);\n\n // Listen to PDFViewer events → React state\n useEffect(function subscribeViewerEvents() {\n const eventBus = eventBusRef.current;\n if (eventBus == null) {\n return;\n }\n\n const handlePageChanging = (evt: { pageNumber: number }) => {\n onPageChange(evt.pageNumber);\n };\n\n const handleScaleChanging = (evt: { scale: number }) => {\n lastScaleRef.current = evt.scale;\n onScaleChange(evt.scale);\n };\n\n eventBus.on(PAGE_CHANGING_EVENT, handlePageChanging);\n eventBus.on(SCALE_CHANGING_EVENT, handleScaleChanging);\n\n return () => {\n eventBus.off(PAGE_CHANGING_EVENT, handlePageChanging);\n eventBus.off(SCALE_CHANGING_EVENT, handleScaleChanging);\n };\n }, [eventBusRef, document, onPageChange, onScaleChange]);\n\n const scrollToPage = useCallback(\n (page: number) => {\n const pdfViewer = pdfViewerRef.current;\n if (pdfViewer != null) {\n pdfViewer.currentPageNumber = page;\n }\n },\n [pdfViewerRef],\n );\n\n return { scrollToPage };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,SAASA,WAAW,EAAEC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACtD,SAASC,mBAAmB,EAAEC,oBAAoB,QAAQ,iBAAiB;AAW3E,OAAO,SAASC,gBAAgBA,CAAC;EAC/BC,YAAY;EACZC,WAAW;EACXC,QAAQ;EACRC,KAAK;EACLC,aAAa;EACbC;AACuB,CAAC,EAExB;EACA,MAAMC,YAAY,GAAGV,MAAM,CAACO,KAAK,CAAC;;EAElC;EACAR,SAAS,CAAC,YAA6B;IACrC,MAAMY,SAAS,GAAGP,YAAY,CAACQ,OAAO;IACtC,IAAID,SAAS,IAAI,IAAI,EAAE;MACrB;IACF;IACA,IAAIE,IAAI,CAACC,GAAG,CAACJ,YAAY,CAACE,OAAO,GAAGL,KAAK,CAAC,GAAG,KAAK,EAAE;MAClDG,YAAY,CAACE,OAAO,GAAGL,KAAK;MAC5BI,SAAS,CAACI,YAAY,GAAGR,KAAK;IAChC;EACF,CAAC,EAAE,CAACH,YAAY,EAAEG,KAAK,CAAC,CAAC;;EAEzB;EACAR,SAAS,CAAC,YAAiC;IACzC,MAAMiB,QAAQ,GAAGX,WAAW,CAACO,OAAO;IACpC,IAAII,QAAQ,IAAI,IAAI,EAAE;MACpB;IACF;IAEA,MAAMC,kBAAkB,GAAIC,GAA2B,IAAK;MAC1DT,YAAY,CAACS,GAAG,CAACC,UAAU,CAAC;IAC9B,CAAC;IAED,MAAMC,mBAAmB,GAAIF,GAAsB,IAAK;MACtDR,YAAY,CAACE,OAAO,GAAGM,GAAG,CAACX,KAAK;MAChCC,aAAa,CAACU,GAAG,CAACX,KAAK,CAAC;IAC1B,CAAC;IAEDS,QAAQ,CAACK,EAAE,CAACpB,mBAAmB,EAAEgB,kBAAkB,CAAC;IACpDD,QAAQ,CAACK,EAAE,CAACnB,oBAAoB,EAAEkB,mBAAmB,CAAC;IAEtD,OAAO,MAAM;MACXJ,QAAQ,CAACM,GAAG,CAACrB,mBAAmB,EAAEgB,kBAAkB,CAAC;MACrDD,QAAQ,CAACM,GAAG,CAACpB,oBAAoB,EAAEkB,mBAAmB,CAAC;IACzD,CAAC;EACH,CAAC,EAAE,CAACf,WAAW,EAAEC,QAAQ,EAAEG,YAAY,EAAED,aAAa,CAAC,CAAC;EAExD,MAAMe,YAAY,GAAGzB,WAAW,CAC7B0B,IAAY,IAAK;IAChB,MAAMb,SAAS,GAAGP,YAAY,CAACQ,OAAO;IACtC,IAAID,SAAS,IAAI,IAAI,EAAE;MACrBA,SAAS,CAACc,iBAAiB,GAAGD,IAAI;IACpC;EACF,CAAC,EACD,CAACpB,YAAY,CACf,CAAC;EAED,OAAO;IAAEmB;EAAa,CAAC;AACzB","ignoreList":[]}
|
|
@@ -0,0 +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\n/** The visual style of an annotation rendered on the PDF. */\nexport type AnnotationType = \"highlight\" | \"underline\" | \"comment\" | \"pin\";\n\n/** A single annotation positioned on a specific page of the PDF. */\nexport interface PdfAnnotation {\n /** Unique identifier for this annotation */\n id: string;\n /** The type of annotation to render */\n type: AnnotationType;\n /** Page number (1-indexed) */\n page: number;\n /** Coordinates in PDF points (origin: bottom-left of page) */\n rect: { x: number; y: number; width: number; height: number };\n /** Optional label or tooltip text */\n label?: string;\n /** Optional color override (CSS color string) */\n color?: string;\n}\n\n/** Props for the {@link PdfViewer} component. */\nexport interface PdfViewerProps {\n /** PDF source — URL string or ArrayBuffer */\n src: string | ArrayBuffer;\n /** Annotations to overlay on the PDF, keyed by page number (1-indexed) */\n annotations?: Record<number, PdfAnnotation[]>;\n /**\n * Callback fired when an annotation is clicked.\n *\n * @param annotation - The annotation that was clicked\n * @returns void\n */\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 /** Whether the sidebar is initially open (default false) */\n initialSidebarOpen?: boolean;\n /** Additional CSS class name for the root element */\n className?: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -14,10 +14,19 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
export { BaseFilterList } from "../filter-list/base/BaseFilterList.js";
|
|
18
|
+
export { FilterList } from "../filter-list/FilterList.js";
|
|
19
|
+
export { deserializeFilterStates, serializeFilterStates } from "../filter-list/utils/filterStateSerialization.js";
|
|
20
|
+
|
|
17
21
|
// ObjectTable that loads and displays data for a given objectSet
|
|
18
22
|
export { ObjectTable } from "../object-table/ObjectTable.js";
|
|
19
23
|
|
|
20
24
|
// BaseTable that does not handle data fetching
|
|
21
25
|
|
|
22
26
|
export { BaseTable } from "../object-table/Table.js";
|
|
27
|
+
export { ColumnConfigDialog } from "../object-table/ColumnConfigDialog.js";
|
|
28
|
+
// PdfViewer
|
|
29
|
+
export { BasePdfViewer } from "../pdf-viewer/PdfViewer.js";
|
|
30
|
+
// PdfRenderer
|
|
31
|
+
export { PdfRenderer } from "../pdf-viewer/PdfRenderer.js";
|
|
23
32
|
//# sourceMappingURL=experimental.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experimental.js","names":["ObjectTable","BaseTable"],"sources":["experimental.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\nexport type {
|
|
1
|
+
{"version":3,"file":"experimental.js","names":["BaseFilterList","FilterList","deserializeFilterStates","serializeFilterStates","ObjectTable","BaseTable","ColumnConfigDialog","BasePdfViewer","PdfRenderer"],"sources":["experimental.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\nexport { BaseFilterList } from \"../filter-list/base/BaseFilterList.js\";\nexport type {\n BaseFilterListProps,\n RenderFilterInput,\n} from \"../filter-list/base/BaseFilterListApi.js\";\nexport { FilterList } from \"../filter-list/FilterList.js\";\n\nexport type {\n FilterDefinitionUnion,\n FilterListProps,\n} from \"../filter-list/FilterListApi.js\";\nexport type {\n FilterComponentType,\n FilterListItemProps,\n FilterState,\n PropertyFilterDefinition,\n} from \"../filter-list/FilterListItemApi.js\";\nexport {\n deserializeFilterStates,\n serializeFilterStates,\n} from \"../filter-list/utils/filterStateSerialization.js\";\n\n// ObjectTable that loads and displays data for a given objectSet\nexport { ObjectTable } from \"../object-table/ObjectTable.js\";\nexport type {\n ColumnDefinition,\n ColumnDefinitionLocator,\n CustomColumnLocator,\n FunctionColumnLocator,\n ObjectTableProps,\n PropertyColumnLocator,\n RdpColumnLocator,\n} from \"../object-table/ObjectTableApi.js\";\nexport type { CellEditInfo } from \"../object-table/utils/types.js\";\n\n// BaseTable that does not handle data fetching\nexport type { BaseTableProps } from \"../object-table/Table.js\";\nexport { BaseTable } from \"../object-table/Table.js\";\n\nexport { ColumnConfigDialog } from \"../object-table/ColumnConfigDialog.js\";\nexport type {\n ColumnConfigDialogProps,\n ColumnConfigOptions,\n} from \"../object-table/ColumnConfigDialog.js\";\n\n// PdfViewer\nexport { BasePdfViewer } from \"../pdf-viewer/PdfViewer.js\";\nexport type {\n AnnotationType,\n PdfAnnotation,\n PdfViewerProps,\n} from \"../pdf-viewer/types.js\";\n\n// PdfRenderer\nexport {\n PdfRenderer,\n type PdfRendererProps,\n} from \"../pdf-viewer/PdfRenderer.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,cAAc,QAAQ,uCAAuC;AAKtE,SAASC,UAAU,QAAQ,8BAA8B;AAYzD,SACEC,uBAAuB,EACvBC,qBAAqB,QAChB,kDAAkD;;AAEzD;AACA,SAASC,WAAW,QAAQ,gCAAgC;;AAY5D;;AAEA,SAASC,SAAS,QAAQ,0BAA0B;AAEpD,SAASC,kBAAkB,QAAQ,uCAAuC;AAM1E;AACA,SAASC,aAAa,QAAQ,4BAA4B;AAO1D;AACA,SACEC,WAAW,QAEN,8BAA8B","ignoreList":[]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { Button } from "@base-ui/react/button";
|
|
18
|
+
import React, { Component } from "react";
|
|
19
|
+
import styles from "./ErrorBoundary.module.css.js";
|
|
20
|
+
export class ErrorBoundary extends Component {
|
|
21
|
+
state = {
|
|
22
|
+
hasError: false,
|
|
23
|
+
error: null
|
|
24
|
+
};
|
|
25
|
+
static getDerivedStateFromError(error) {
|
|
26
|
+
return {
|
|
27
|
+
hasError: true,
|
|
28
|
+
error
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
componentDidCatch(error, errorInfo) {
|
|
32
|
+
// eslint-disable-next-line no-console
|
|
33
|
+
console.error("[ErrorBoundary]", error);
|
|
34
|
+
// eslint-disable-next-line no-console
|
|
35
|
+
console.error("[ErrorBoundary] Component stack:", errorInfo.componentStack);
|
|
36
|
+
this.props.onError?.(error);
|
|
37
|
+
}
|
|
38
|
+
handleRetry = () => {
|
|
39
|
+
this.setState({
|
|
40
|
+
hasError: false,
|
|
41
|
+
error: null
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
render() {
|
|
45
|
+
if (this.state.hasError) {
|
|
46
|
+
if (this.props.fallback) {
|
|
47
|
+
return this.props.fallback;
|
|
48
|
+
}
|
|
49
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: styles.errorContainer
|
|
51
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
52
|
+
className: styles.errorMessage
|
|
53
|
+
}, this.props.errorMessage ?? "Something went wrong"), /*#__PURE__*/React.createElement(Button, {
|
|
54
|
+
className: styles.retryButton,
|
|
55
|
+
onClick: this.handleRetry,
|
|
56
|
+
"aria-label": "Retry"
|
|
57
|
+
}, "Retry"));
|
|
58
|
+
}
|
|
59
|
+
return this.props.children;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=ErrorBoundary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","names":["Button","React","Component","styles","ErrorBoundary","state","hasError","error","getDerivedStateFromError","componentDidCatch","errorInfo","console","componentStack","props","onError","handleRetry","setState","render","fallback","createElement","className","errorContainer","errorMessage","retryButton","onClick","children"],"sources":["ErrorBoundary.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 { Button } from \"@base-ui/react/button\";\nimport React, { Component, type ReactNode } from \"react\";\nimport styles from \"./ErrorBoundary.module.css\";\n\ninterface ErrorBoundaryProps {\n children: ReactNode;\n errorMessage?: string;\n fallback?: ReactNode;\n onError?: (error: Error) => void;\n}\n\ninterface ErrorBoundaryState {\n hasError: boolean;\n error: Error | null;\n}\n\nexport class ErrorBoundary extends Component<\n ErrorBoundaryProps,\n ErrorBoundaryState\n> {\n state: ErrorBoundaryState = { hasError: false, error: null };\n\n static getDerivedStateFromError(error: Error): ErrorBoundaryState {\n return { hasError: true, error };\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void {\n // eslint-disable-next-line no-console\n console.error(\"[ErrorBoundary]\", error);\n // eslint-disable-next-line no-console\n console.error(\n \"[ErrorBoundary] Component stack:\",\n errorInfo.componentStack,\n );\n this.props.onError?.(error);\n }\n\n handleRetry = (): void => {\n this.setState({ hasError: false, error: null });\n };\n\n render(): ReactNode {\n if (this.state.hasError) {\n if (this.props.fallback) {\n return this.props.fallback;\n }\n\n return (\n <div className={styles.errorContainer}>\n <p className={styles.errorMessage}>\n {this.props.errorMessage ?? \"Something went wrong\"}\n </p>\n <Button\n className={styles.retryButton}\n onClick={this.handleRetry}\n aria-label=\"Retry\"\n >\n Retry\n </Button>\n </div>\n );\n }\n return this.props.children;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,uBAAuB;AAC9C,OAAOC,KAAK,IAAIC,SAAS,QAAwB,OAAO;AACxD,OAAOC,MAAM,MAAM,4BAA4B;AAc/C,OAAO,MAAMC,aAAa,SAASF,SAAS,CAG1C;EACAG,KAAK,GAAuB;IAAEC,QAAQ,EAAE,KAAK;IAAEC,KAAK,EAAE;EAAK,CAAC;EAE5D,OAAOC,wBAAwBA,CAACD,KAAY,EAAsB;IAChE,OAAO;MAAED,QAAQ,EAAE,IAAI;MAAEC;IAAM,CAAC;EAClC;EAEAE,iBAAiBA,CAACF,KAAY,EAAEG,SAA0B,EAAQ;IAChE;IACAC,OAAO,CAACJ,KAAK,CAAC,iBAAiB,EAAEA,KAAK,CAAC;IACvC;IACAI,OAAO,CAACJ,KAAK,CACX,kCAAkC,EAClCG,SAAS,CAACE,cACZ,CAAC;IACD,IAAI,CAACC,KAAK,CAACC,OAAO,GAAGP,KAAK,CAAC;EAC7B;EAEAQ,WAAW,GAAGA,CAAA,KAAY;IACxB,IAAI,CAACC,QAAQ,CAAC;MAAEV,QAAQ,EAAE,KAAK;MAAEC,KAAK,EAAE;IAAK,CAAC,CAAC;EACjD,CAAC;EAEDU,MAAMA,CAAA,EAAc;IAClB,IAAI,IAAI,CAACZ,KAAK,CAACC,QAAQ,EAAE;MACvB,IAAI,IAAI,CAACO,KAAK,CAACK,QAAQ,EAAE;QACvB,OAAO,IAAI,CAACL,KAAK,CAACK,QAAQ;MAC5B;MAEA,oBACEjB,KAAA,CAAAkB,aAAA;QAAKC,SAAS,EAAEjB,MAAM,CAACkB;MAAe,gBACpCpB,KAAA,CAAAkB,aAAA;QAAGC,SAAS,EAAEjB,MAAM,CAACmB;MAAa,GAC/B,IAAI,CAACT,KAAK,CAACS,YAAY,IAAI,sBAC3B,CAAC,eACJrB,KAAA,CAAAkB,aAAA,CAACnB,MAAM;QACLoB,SAAS,EAAEjB,MAAM,CAACoB,WAAY;QAC9BC,OAAO,EAAE,IAAI,CAACT,WAAY;QAC1B,cAAW;MAAO,GACnB,OAEO,CACL,CAAC;IAEV;IACA,OAAO,IAAI,CAACF,KAAK,CAACY,QAAQ;EAC5B;AACF","ignoreList":[]}
|