@epam/ai-dial-ui-kit 0.14.0-dev.9 → 0.14.1
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/README.md +32 -3
- package/dist/CHANGELOG.md +17 -2
- package/dist/DateCellRenderer-BVM-Q8yx.cjs +63 -0
- package/dist/DateCellRenderer-ssp7eaZY.cjs +1 -0
- package/dist/IconButton-DWqoaBWf.cjs +1 -0
- package/dist/JsonEditor-qv1Z0dLX.cjs +1 -0
- package/dist/MarkdownEditor-DHn2pYOJ.cjs +1 -0
- package/dist/MarkdownEditor-jQ8nDJfx.cjs +1 -0
- package/dist/MarkdownEditorContainer-Bzcnoemw.cjs +1 -0
- package/dist/Switch-CUKClcEz.cjs +1 -0
- package/dist/_virtual/___vite-browser-external.js +6 -0
- package/dist/_virtual/__vite-browser-external.js +4 -0
- package/dist/_virtual/_commonjsHelpers.js +31 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/_virtual/index3.js +7 -0
- package/dist/assets/icons/add-child.svg.js +5 -0
- package/dist/assets/icons/add-sibling.svg.js +5 -0
- package/dist/assets/icons/copy-to.svg.js +5 -0
- package/dist/assets/icons/file/c.svg.js +5 -0
- package/dist/assets/icons/file/cpp.svg.js +5 -0
- package/dist/assets/icons/file/cs.svg.js +5 -0
- package/dist/assets/icons/file/ini.svg.js +5 -0
- package/dist/assets/icons/file/json.svg.js +5 -0
- package/dist/assets/icons/file/md.svg.js +5 -0
- package/dist/assets/icons/file/py.svg.js +5 -0
- package/dist/assets/icons/loader.svg.js +5 -0
- package/dist/assets/icons/move-to.svg.js +5 -0
- package/dist/assets/icons/no-data.svg.js +5 -0
- package/dist/assets/icons/open-popup.svg.js +5 -0
- package/dist/assets/icons/unshare.svg.js +5 -0
- package/dist/components/Accordion/Accordion.js +70 -0
- package/dist/components/Analytics/Bar/Bar.js +80 -0
- package/dist/components/Analytics/Bar/utils.js +24 -0
- package/dist/components/Analytics/BarGroup/BarGroup.js +142 -0
- package/dist/components/Analytics/Card/Card.js +87 -0
- package/dist/components/Analytics/ErrorTag/ErrorTag.js +19 -0
- package/dist/components/Analytics/Histogram/Histogram.js +200 -0
- package/dist/components/Analytics/Histogram/utils.js +45 -0
- package/dist/components/AutocompleteInput/AutocompleteInputValue.js +21 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +126 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.js +83 -0
- package/dist/components/Breadcrumb/constants.js +20 -0
- package/dist/components/Button/Button.js +53 -0
- package/dist/components/Button/ButtonWrappers.js +40 -0
- package/dist/components/Button/constants.js +29 -0
- package/dist/components/Button/utils.js +11 -0
- package/dist/components/ButtonDropdown/ButtonDropdown.js +33 -0
- package/dist/components/ButtonDropdown/constants.js +8 -0
- package/dist/components/CaptionText/CaptionText.js +27 -0
- package/dist/components/Checkbox/Checkbox.js +64 -0
- package/dist/components/Checkbox/constants.js +4 -0
- package/dist/components/CloseButton/CloseButton.js +27 -0
- package/dist/components/CollapsibleSidebar/CollapsibleSidebar.js +84 -0
- package/dist/components/ConfirmationPopup/ConfirmationPopup.js +75 -0
- package/dist/components/ConfirmationPopup/constants.js +32 -0
- package/dist/components/DraggableItem/DraggableItem.js +61 -0
- package/dist/components/DraggableItem/constants.js +6 -0
- package/dist/components/Dropdown/Dropdown.js +293 -0
- package/dist/components/Dropdown/DropdownSubMenuItem.js +121 -0
- package/dist/components/Dropdown/constants.js +24 -0
- package/dist/components/DropdownIcon/DropdownIcon.js +92 -0
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +75 -0
- package/dist/components/EllipsisTooltip/constants.js +4 -0
- package/dist/components/FabButton/FabButton.js +35 -0
- package/dist/components/FileIcon/FileIcon.js +37 -0
- package/dist/components/FileIcon/constants.js +60 -0
- package/dist/components/FileManager/FileManager.js +887 -0
- package/dist/components/FileManager/FileManagerContext.js +5 -0
- package/dist/components/FileManager/FileManagerProvider.js +770 -0
- package/dist/components/FileManager/FileManagerTooltip.js +92 -0
- package/dist/components/FileManager/components/ConflictResolutionPopup/ConflictResolutionPopup.js +293 -0
- package/dist/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.js +201 -0
- package/dist/components/FileManager/components/DialFileManagerItemSummaryCell/DialFileManagerItemSummaryCell.js +52 -0
- package/dist/components/FileManager/components/FileManagerBulkActionsToolbar/FileManagerBulkActionsToolbar.js +103 -0
- package/dist/components/FileManager/components/FileManagerBulkActionsToolbar/constants.js +5 -0
- package/dist/components/FileManager/components/FileManagerDeleteConfirmationPopup/FileManagerDeleteConfirmationPopup.js +56 -0
- package/dist/components/FileManager/components/FileManagerItemIcon/FileManagerItemIcon.js +69 -0
- package/dist/components/FileManager/components/FileManagerItemName/FileManagerItemName.js +100 -0
- package/dist/components/FileManager/components/FileManagerItemNameInput/FileManagerItemNameInput.js +93 -0
- package/dist/components/FileManager/components/FileManagerNavigationPanel/FileManagerNavigationPanel.js +165 -0
- package/dist/components/FileManager/components/FileManagerNavigationPanel/constants.js +6 -0
- package/dist/components/FileManager/components/FileManagerToolbar/DialFileManagerToolbar.js +120 -0
- package/dist/components/FileManager/components/FileMetadataPopup/FileMetadataPopup.js +119 -0
- package/dist/components/FileManager/components/FileMetadataPopup/constants.js +9 -0
- package/dist/components/FileManager/components/FoldersTree/FoldersTree.js +180 -0
- package/dist/components/FileManager/components/FoldersTree/constants.js +9 -0
- package/dist/components/FileManager/components/FoldersTree/hooks/use-expanded-paths.js +51 -0
- package/dist/components/FileManager/constants.js +28 -0
- package/dist/components/FileManager/errors.js +10 -0
- package/dist/components/FileManager/hooks/use-bulk-actions.js +143 -0
- package/dist/components/FileManager/hooks/use-collapse-tree.js +22 -0
- package/dist/components/FileManager/hooks/use-conflict-resolution.js +158 -0
- package/dist/components/FileManager/hooks/use-current-path.js +29 -0
- package/dist/components/FileManager/hooks/use-file-clipboard.js +154 -0
- package/dist/components/FileManager/hooks/use-file-delete.js +39 -0
- package/dist/components/FileManager/hooks/use-file-download.js +16 -0
- package/dist/components/FileManager/hooks/use-file-manager-columns.js +106 -0
- package/dist/components/FileManager/hooks/use-file-manager-context.js +13 -0
- package/dist/components/FileManager/hooks/use-file-manager-tabs.js +23 -0
- package/dist/components/FileManager/hooks/use-file-metadata.js +20 -0
- package/dist/components/FileManager/hooks/use-file-search.js +90 -0
- package/dist/components/FileManager/hooks/use-file-upload.js +338 -0
- package/dist/components/FileManager/hooks/use-folder-creation.js +151 -0
- package/dist/components/FileManager/hooks/use-grid-actions-column.js +65 -0
- package/dist/components/FileManager/hooks/use-grid-context-menu.js +188 -0
- package/dist/components/FileManager/hooks/use-item-renaming.js +124 -0
- package/dist/components/FileManager/hooks/use-new-actions.js +67 -0
- package/dist/components/FileManager/hooks/use-paths-selection.js +28 -0
- package/dist/components/FileManager/hooks/use-show-hidden-files.js +20 -0
- package/dist/components/FileManager/hooks/use-tree-additional-buttons.js +39 -0
- package/dist/components/FileManager/hooks/use-trigger-view-create-folder.js +42 -0
- package/dist/components/FileManager/hooks/use-trigger-view-rename.js +25 -0
- package/dist/components/FileManager/utils.js +129 -0
- package/dist/components/FileName/FileName.js +68 -0
- package/dist/components/FolderName/FolderName.js +57 -0
- package/dist/components/FormItem/FormItem.js +90 -0
- package/dist/components/FormItem/constants.js +9 -0
- package/dist/components/FormPopup/FormPopup.js +59 -0
- package/dist/components/FormPopup/constants.js +6 -0
- package/dist/components/Grid/Grid.js +333 -0
- package/dist/components/Grid/constants.js +33 -0
- package/dist/components/Grid/renderers/DateCellRenderer.js +27 -0
- package/dist/components/Grid/renderers/constants.js +25 -0
- package/dist/components/Icon/Icon.js +6 -0
- package/dist/components/IconButton/IconButton.js +40 -0
- package/dist/components/IconButton/IconButtonWrappers.js +48 -0
- package/dist/components/InfoButton/InfoButton.js +32 -0
- package/dist/components/InfoButton/constants.js +4 -0
- package/dist/components/Input/Button/InputButton.js +37 -0
- package/dist/components/Input/Button/constants.js +4 -0
- package/dist/components/Input/Input.js +120 -0
- package/dist/components/Input/utils.js +37 -0
- package/dist/components/InputPopup/InputPopup.js +174 -0
- package/dist/components/JsonEditor/JsonEditor.js +65 -0
- package/dist/components/JsonEditor/lazy.js +4 -0
- package/dist/components/Label/Label.js +27 -0
- package/dist/components/LabelledText/LabelledText.js +37 -0
- package/dist/components/LoadFileArea/EmptyFileArea.js +130 -0
- package/dist/components/LoadFileArea/FilledDropZone.js +80 -0
- package/dist/components/LoadFileArea/FilledInput.js +29 -0
- package/dist/components/LoadFileArea/LoadFileArea.js +70 -0
- package/dist/components/LoadFileArea/LoadFileAreaField.js +128 -0
- package/dist/components/Loader/Loader.js +40 -0
- package/dist/components/Loader/constants.js +5 -0
- package/dist/components/MarkdownEditor/MarkdownEditor.js +37 -0
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +80 -0
- package/dist/components/MarkdownEditor/lazy.js +4 -0
- package/dist/components/New/Accordion/Accordion.js +103 -0
- package/dist/components/New/Button/Button.js +76 -0
- package/dist/components/New/Button/ButtonWrappers.js +44 -0
- package/dist/components/New/Button/constants.js +27 -0
- package/dist/components/New/Button/utils.js +11 -0
- package/dist/components/New/ButtonDropdown/ButtonDropdown.js +28 -0
- package/dist/components/New/ButtonDropdown/constants.js +17 -0
- package/dist/components/New/Calendar/Calendar.js +343 -0
- package/dist/components/New/Calendar/constants.js +57 -0
- package/dist/components/New/Calendar/utils.js +77 -0
- package/dist/components/New/CaptionText/CaptionText.js +27 -0
- package/dist/components/New/CardShell/CardShell.js +22 -0
- package/dist/components/New/Checkbox/Checkbox.js +92 -0
- package/dist/components/New/Checkbox/CheckboxBox.js +34 -0
- package/dist/components/New/Checkbox/constants.js +8 -0
- package/dist/components/New/CloseButton/CloseButton.js +33 -0
- package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +108 -0
- package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +78 -0
- package/dist/components/New/ConfirmationPopup/constants.js +27 -0
- package/dist/components/New/Dropdown/Dropdown.js +316 -0
- package/dist/components/New/Dropdown/DropdownSubMenuItem.js +105 -0
- package/dist/components/New/Dropdown/constants.js +28 -0
- package/dist/components/New/Dropdown/item-mark.js +6 -0
- package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +45 -0
- package/dist/components/New/EllipsisTooltip/use-truncation.js +18 -0
- package/dist/components/New/FileDropzone/FileDropzone.js +135 -0
- package/dist/components/New/FolderPath/FolderPath.js +64 -0
- package/dist/components/New/Grid/Grid.js +301 -0
- package/dist/components/New/Grid/components/SelectionCell.js +50 -0
- package/dist/components/New/Grid/components/SelectionHeader.js +46 -0
- package/dist/components/New/Grid/constants.js +44 -0
- package/dist/components/New/Grid/renderers/DateCellRenderer.js +27 -0
- package/dist/components/New/Grid/renderers/constants.js +25 -0
- package/dist/components/New/Highlight/Highlight.js +50 -0
- package/dist/components/New/IconButton/IconButton.js +46 -0
- package/dist/components/New/IconButton/IconButtonWrappers.js +40 -0
- package/dist/components/New/InfoButton/InfoButton.js +39 -0
- package/dist/components/New/InlineSelect/InlineSelect.js +96 -0
- package/dist/components/New/Input/Button/InputButton.js +38 -0
- package/dist/components/New/Input/Button/constants.js +4 -0
- package/dist/components/New/Input/Input.js +169 -0
- package/dist/components/New/Input/utils.js +37 -0
- package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +104 -0
- package/dist/components/New/InteractiveTooltip/constants.js +6 -0
- package/dist/components/New/Label/Label.js +42 -0
- package/dist/components/New/MarkdownEditor/MarkdownEditor.js +41 -0
- package/dist/components/New/MarkdownEditor/constants.js +64 -0
- package/dist/components/New/MarkdownEditor/lazy.js +4 -0
- package/dist/components/New/MenuItem/MenuItem.js +108 -0
- package/dist/components/New/MenuItem/constants.js +16 -0
- package/dist/components/New/NoDataContent/NoDataContent.js +54 -0
- package/dist/components/New/Notification/Notification.js +67 -0
- package/dist/components/New/Notification/NotificationWrapper.js +61 -0
- package/dist/components/New/Notification/constants.js +32 -0
- package/dist/components/New/NumberInput/NumberInput.js +41 -0
- package/dist/components/New/PasswordInput/PasswordInput.js +54 -0
- package/dist/components/New/Popup/Popup.js +164 -0
- package/dist/components/New/Popup/constants.js +17 -0
- package/dist/components/New/Radio/Radio.js +100 -0
- package/dist/components/New/RadioGroup/RadioGroup.js +81 -0
- package/dist/components/New/RadioGroup/constants.js +11 -0
- package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +138 -0
- package/dist/components/New/RadioGroupPopupField/constants.js +11 -0
- package/dist/components/New/ResizableContainer/ConditionalResizableContainer.js +6 -0
- package/dist/components/New/ResizableContainer/ResizableContainer.js +106 -0
- package/dist/components/New/ResizableContainer/components/ResizeHandle.js +85 -0
- package/dist/components/New/Search/Search.js +74 -0
- package/dist/components/New/SegmentedControl/SegmentedControl.js +92 -0
- package/dist/components/New/SegmentedControl/constants.js +19 -0
- package/dist/components/New/Select/MultiSelectTags.js +23 -0
- package/dist/components/New/Select/Select.js +379 -0
- package/dist/components/New/Select/SelectSubMenuItem.js +103 -0
- package/dist/components/New/Select/constants.js +50 -0
- package/dist/components/New/Slider/Slider.js +112 -0
- package/dist/components/New/Switch/Switch.js +95 -0
- package/dist/components/New/Tabs/Tabs.js +95 -0
- package/dist/components/New/Tag/Tag.js +76 -0
- package/dist/components/New/Tag/constants.js +17 -0
- package/dist/components/New/TagInput/TagInput.js +197 -0
- package/dist/components/New/TagInput/utils.js +21 -0
- package/dist/components/New/Textarea/Textarea.js +55 -0
- package/dist/components/New/ThemeScope/ThemeScope.js +14 -0
- package/dist/components/New/ToggleIconButton/ToggleIconButton.js +54 -0
- package/dist/components/New/Tooltip/Tooltip.js +19 -0
- package/dist/components/New/Tooltip/TooltipContainer.js +12 -0
- package/dist/components/New/Tooltip/TooltipContent.js +45 -0
- package/dist/components/New/Tooltip/TooltipContext.js +67 -0
- package/dist/components/New/Tooltip/TooltipTrigger.js +45 -0
- package/dist/components/New/Tooltip/constants.js +8 -0
- package/dist/components/New/constants/icon.js +4 -0
- package/dist/components/New/constants/overlay.js +27 -0
- package/dist/components/NoDataContent/NoDataContent.js +45 -0
- package/dist/components/Notification/Notification.js +67 -0
- package/dist/components/Notification/constants.js +24 -0
- package/dist/components/NumberInput/NumberInput.js +41 -0
- package/dist/components/Pagination/Pagination.js +80 -0
- package/dist/components/Pagination/utils.js +10 -0
- package/dist/components/PasswordInput/Icons/HideIcon.js +16 -0
- package/dist/components/PasswordInput/Icons/ShowIcon.js +16 -0
- package/dist/components/PasswordInput/PasswordInput.js +21 -0
- package/dist/components/Popup/Popup.js +110 -0
- package/dist/components/Popup/constants.js +12 -0
- package/dist/components/ProgressBar/ProgressBar.js +58 -0
- package/dist/components/RadioButton/RadioButton.js +103 -0
- package/dist/components/RadioGroup/RadioGroup.js +92 -0
- package/dist/components/RadioGroup/constants.js +10 -0
- package/dist/components/RadioGroupPopupField/RadioGroupPopupField.js +101 -0
- package/dist/components/RemoveButton/RemoveButton.js +30 -0
- package/dist/components/ResizableContainer/ConditionalResizableContainer.js +6 -0
- package/dist/components/ResizableContainer/ResizableContainer.js +79 -0
- package/dist/components/ResizableContainer/components/ResizeHandle.js +20 -0
- package/dist/components/ResizableContainer/components/ResizeIcon.js +11 -0
- package/dist/components/SchemaRenderer/SchemaRenderer.js +150 -0
- package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +41 -0
- package/dist/components/SchemaRenderer/components/SchemaAnyOfEditor.js +74 -0
- package/dist/components/SchemaRenderer/components/SchemaArrayEditor.js +118 -0
- package/dist/components/SchemaRenderer/components/SchemaField.js +78 -0
- package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +114 -0
- package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +184 -0
- package/dist/components/SchemaRenderer/components/SchemaObjectEditor.js +36 -0
- package/dist/components/SchemaRenderer/components/SchemaOneOfEditor.js +192 -0
- package/dist/components/SchemaRenderer/components/SchemaPrimitiveField.js +161 -0
- package/dist/components/SchemaRenderer/components/SchemaSection.js +81 -0
- package/dist/components/SchemaRenderer/context.js +12 -0
- package/dist/components/SchemaRenderer/types.js +27 -0
- package/dist/components/SchemaRenderer/utils.js +258 -0
- package/dist/components/Search/Search.js +63 -0
- package/dist/components/Search/constants.js +27 -0
- package/dist/components/SegmentedControl/SegmentedControl.js +87 -0
- package/dist/components/SegmentedControl/constants.js +8 -0
- package/dist/components/Select/MultiSelectTags.js +23 -0
- package/dist/components/Select/Select.js +435 -0
- package/dist/components/Select/SelectSubMenuItem.js +90 -0
- package/dist/components/Select/constants.js +15 -0
- package/dist/components/SelectField/SelectField.js +66 -0
- package/dist/components/SharedEntityIndicator/SharedEntityIndicator.js +34 -0
- package/dist/components/Skeleton/Skeleton.js +90 -0
- package/dist/components/Skeleton/utils.js +16 -0
- package/dist/components/Slider/Slider.js +158 -0
- package/dist/components/Spinner/Spinner.js +30 -0
- package/dist/components/Steps/Step.js +34 -0
- package/dist/components/Steps/Steps.js +27 -0
- package/dist/components/Steps/utils.js +42 -0
- package/dist/components/Switch/Switch.js +70 -0
- package/dist/components/Tab/Tab.js +65 -0
- package/dist/components/Tabs/Tabs.js +213 -0
- package/dist/components/Tabs/constants.js +4 -0
- package/dist/components/Tag/Tag.js +37 -0
- package/dist/components/TagInput/TagInput.js +179 -0
- package/dist/components/Textarea/Textarea.js +43 -0
- package/dist/components/Tooltip/Tooltip.js +30 -0
- package/dist/components/Tooltip/TooltipContainer.js +12 -0
- package/dist/components/Tooltip/TooltipContent.js +40 -0
- package/dist/components/Tooltip/TooltipContext.js +66 -0
- package/dist/components/Tooltip/TooltipTrigger.js +33 -0
- package/dist/components-manifest.json +1009 -161
- package/dist/{JsonEditor-CwnP07GH.js → constants/editor.js} +5 -63
- package/dist/constants/file-grid-columns.js +176 -0
- package/dist/constants/icon.js +10 -0
- package/dist/constants/validation.js +11 -0
- package/dist/dial-ui-kit.cjs +2 -0
- package/dist/dial-ui-kit.js +416 -0
- package/dist/editors.cjs +1 -0
- package/dist/editors.js +12 -0
- package/dist/file-manager.cjs +1 -0
- package/dist/file-manager.js +22 -0
- package/dist/grid.cjs +1 -0
- package/dist/grid.js +30 -0
- package/dist/hooks/use-editable-item.js +94 -0
- package/dist/hooks/use-flexible-actions.js +72 -0
- package/dist/hooks/use-has-hover.js +17 -0
- package/dist/hooks/use-is-mobile-screen.js +12 -0
- package/dist/hooks/use-is-tablet-screen.js +12 -0
- package/dist/hooks/use-screen-type.js +14 -0
- package/dist/hooks/use-width-breakpoint.js +15 -0
- package/dist/icon-CrGVkVpG.cjs +1 -0
- package/dist/icon-DhjrDQ8I.cjs +1 -0
- package/dist/index.css +2 -2
- package/dist/lazy-tfN4sKhq.cjs +1 -0
- package/dist/merge-classes-Dipy1Ih1.cjs +1 -0
- package/dist/migration-guides/0.14.0/button-tooltip-2-0.md +1 -1
- package/dist/migration-guides/0.14.0/shadow-token-per-step-rename.md +64 -29
- package/dist/migration-guides/README.md +1 -1
- package/dist/models/file.js +6 -0
- package/dist/models/selection-mode.js +4 -0
- package/dist/models/step.js +4 -0
- package/dist/node_modules/@react-dnd/asap/dist/AsapQueue.js +39 -0
- package/dist/node_modules/@react-dnd/asap/dist/RawTask.js +17 -0
- package/dist/node_modules/@react-dnd/asap/dist/TaskFactory.js +16 -0
- package/dist/node_modules/@react-dnd/asap/dist/asap.js +9 -0
- package/dist/node_modules/@react-dnd/asap/dist/makeRequestCall.js +62 -0
- package/dist/node_modules/@react-dnd/invariant/dist/index.js +22 -0
- package/dist/node_modules/@react-dnd/shallowequal/dist/index.js +25 -0
- package/dist/node_modules/ag-grid-community/dist/package/main.esm.js +39799 -0
- package/dist/node_modules/ag-grid-react/dist/package/index.esm.js +1989 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/beginDrag.js +70 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/drop.js +54 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/endDrag.js +18 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/hover.js +42 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/index.js +17 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/local/setClientOffset.js +13 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/publishDragSource.js +12 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/types.js +9 -0
- package/dist/node_modules/dnd-core/dist/actions/registry.js +43 -0
- package/dist/node_modules/dnd-core/dist/classes/DragDropManagerImpl.js +41 -0
- package/dist/node_modules/dnd-core/dist/classes/DragDropMonitorImpl.js +115 -0
- package/dist/node_modules/dnd-core/dist/classes/HandlerRegistryImpl.js +96 -0
- package/dist/node_modules/dnd-core/dist/contracts.js +21 -0
- package/dist/node_modules/dnd-core/dist/createDragDropManager.js +19 -0
- package/dist/node_modules/dnd-core/dist/interfaces.js +7 -0
- package/dist/node_modules/dnd-core/dist/reducers/dirtyHandlerIds.js +30 -0
- package/dist/node_modules/dnd-core/dist/reducers/dragOffset.js +50 -0
- package/dist/node_modules/dnd-core/dist/reducers/dragOperation.js +78 -0
- package/dist/node_modules/dnd-core/dist/reducers/index.js +42 -0
- package/dist/node_modules/dnd-core/dist/reducers/refCount.js +16 -0
- package/dist/node_modules/dnd-core/dist/reducers/stateId.js +6 -0
- package/dist/node_modules/dnd-core/dist/utils/coords.js +26 -0
- package/dist/node_modules/dnd-core/dist/utils/dirtiness.js +12 -0
- package/dist/node_modules/dnd-core/dist/utils/equality.js +17 -0
- package/dist/node_modules/dnd-core/dist/utils/getNextUniqueId.js +7 -0
- package/dist/node_modules/dnd-core/dist/utils/js_utils.js +36 -0
- package/dist/node_modules/dnd-core/dist/utils/matchesType.js +8 -0
- package/dist/node_modules/fast-deep-equal/index.js +31 -0
- package/dist/node_modules/mime-db/db.json.js +2527 -0
- package/dist/node_modules/mime-db/index.js +8 -0
- package/dist/node_modules/mime-types/index.js +70 -0
- package/dist/node_modules/mime-types/mimeScore.js +38 -0
- package/dist/node_modules/re-resizable/lib/index.js +424 -0
- package/dist/node_modules/re-resizable/lib/resizer.js +49 -0
- package/dist/node_modules/react-dnd/dist/core/DndContext.js +7 -0
- package/dist/node_modules/react-dnd/dist/core/DndProvider.js +66 -0
- package/dist/node_modules/react-dnd/dist/hooks/useCollectedProps.js +11 -0
- package/dist/node_modules/react-dnd/dist/hooks/useCollector.js +22 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/DragSourceImpl.js +25 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/connectors.js +21 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDrag.js +20 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js +19 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js +22 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceMonitor.js +15 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragType.js +13 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useRegisteredDragSource.js +23 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDragDropManager.js +10 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/DropTargetImpl.js +21 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/connectors.js +12 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useAccept.js +13 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDrop.js +16 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTarget.js +18 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetConnector.js +18 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetMonitor.js +15 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useRegisteredDropTarget.js +23 -0
- package/dist/node_modules/react-dnd/dist/hooks/useIsomorphicLayoutEffect.js +5 -0
- package/dist/node_modules/react-dnd/dist/hooks/useMonitorOutput.js +20 -0
- package/dist/node_modules/react-dnd/dist/hooks/useOptionalFactory.js +10 -0
- package/dist/node_modules/react-dnd/dist/internals/DragSourceMonitorImpl.js +88 -0
- package/dist/node_modules/react-dnd/dist/internals/DropTargetMonitorImpl.js +59 -0
- package/dist/node_modules/react-dnd/dist/internals/SourceConnector.js +87 -0
- package/dist/node_modules/react-dnd/dist/internals/TargetConnector.js +57 -0
- package/dist/node_modules/react-dnd/dist/internals/isRef.js +9 -0
- package/dist/node_modules/react-dnd/dist/internals/registration.js +18 -0
- package/dist/node_modules/react-dnd/dist/internals/wrapConnectorHooks.js +46 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/BrowserDetector.js +10 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/EnterLeaveCounter.js +22 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/HTML5BackendImpl.js +274 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/MonotonicInterpolant.js +59 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/NativeDragSource.js +43 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/getDataFromDataTransfer.js +10 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/index.js +24 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/nativeTypesConfig.js +48 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeTypes.js +7 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/OffsetUtils.js +70 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/OptionsReader.js +22 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/index.js +7 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/utils/js_utils.js +22 -0
- package/dist/node_modules/redux/es/redux.js +158 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2924 -0
- package/dist/src/components/Analytics/BarGroup/BarGroup.d.ts +9 -2
- package/dist/src/components/FileManager/FileManager.d.ts +2 -1
- package/dist/src/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.d.ts +2 -0
- package/dist/src/components/FileManager/hooks/use-file-upload.d.ts +4 -2
- package/dist/src/components/FileManager/utils.d.ts +11 -0
- package/dist/src/components/Grid/comparators/base-column-comparator.d.ts +1 -4
- package/dist/src/components/Grid/renderers/utils.d.ts +1 -2
- package/dist/src/components/JsonEditor/lazy.d.ts +14 -0
- package/dist/src/components/MarkdownEditor/lazy.d.ts +7 -0
- package/dist/src/components/New/CollapsibleSidebar/CollapsibleSidebar.d.ts +82 -0
- package/dist/src/components/New/Dropdown/Dropdown.d.ts +20 -0
- package/dist/src/components/New/Dropdown/constants.d.ts +5 -4
- package/dist/src/components/New/Dropdown/item-mark.d.ts +15 -0
- package/dist/src/components/New/EllipsisTooltip/EllipsisTooltip.d.ts +1 -1
- package/dist/src/components/New/EllipsisTooltip/use-truncation.d.ts +5 -0
- package/dist/src/components/New/Grid/Grid.d.ts +124 -0
- package/dist/src/components/New/Grid/components/SelectionCell.d.ts +21 -0
- package/dist/src/components/New/Grid/components/SelectionHeader.d.ts +14 -0
- package/dist/src/components/New/Grid/constants.d.ts +61 -0
- package/dist/src/components/New/Grid/renderers/DateCellRenderer.d.ts +48 -0
- package/dist/src/components/New/Grid/renderers/constants.d.ts +5 -0
- package/dist/src/components/New/InteractiveTooltip/InteractiveTooltip.d.ts +74 -0
- package/dist/src/components/New/InteractiveTooltip/constants.d.ts +26 -0
- package/dist/src/components/New/MarkdownEditor/MarkdownEditor.d.ts +6 -0
- package/dist/src/components/New/MarkdownEditor/lazy.d.ts +7 -0
- package/dist/src/components/New/MenuItem/MenuItem.d.ts +68 -0
- package/dist/src/components/New/MenuItem/constants.d.ts +5 -0
- package/dist/src/components/New/NoDataContent/NoDataContent.d.ts +48 -0
- package/dist/src/components/New/ResizableContainer/ConditionalResizableContainer.d.ts +34 -0
- package/dist/src/components/New/ResizableContainer/ResizableContainer.d.ts +77 -0
- package/dist/src/components/New/ResizableContainer/components/ResizeHandle.d.ts +21 -0
- package/dist/src/components/New/SegmentedControl/constants.d.ts +2 -2
- package/dist/src/components/New/Select/Select.d.ts +14 -2
- package/dist/src/components/New/Select/SelectSubMenuItem.d.ts +3 -0
- package/dist/src/components/New/Select/constants.d.ts +12 -5
- package/dist/src/components/New/Textarea/Textarea.d.ts +8 -2
- package/dist/src/components/New/ThemeScope/ThemeScope.d.ts +46 -0
- package/dist/src/components/New/Tooltip/Tooltip.d.ts +1 -1
- package/dist/src/components/New/Tooltip/TooltipContent.d.ts +4 -3
- package/dist/src/components/New/Tooltip/constants.d.ts +10 -1
- package/dist/src/components/New/constants/icon.d.ts +22 -0
- package/dist/src/components/New/constants/overlay.d.ts +7 -0
- package/dist/src/components/Tooltip/TooltipContent.d.ts +4 -0
- package/dist/src/hooks/use-has-hover.d.ts +20 -0
- package/dist/src/index.d.ts +28 -4
- package/dist/src/models/dropdown.d.ts +40 -1
- package/dist/src/models/select.d.ts +30 -0
- package/dist/src/subpaths/editors.d.ts +22 -0
- package/dist/src/subpaths/file-manager.d.ts +21 -0
- package/dist/src/subpaths/grid.d.ts +25 -0
- package/dist/src/types/menu-item.d.ts +21 -0
- package/dist/src/utils/__tests__/element-size-observer.spec.d.ts +1 -0
- package/dist/src/utils/__tests__/pointer.spec.d.ts +1 -0
- package/dist/src/utils/element-size-observer.d.ts +26 -0
- package/dist/src/utils/grid-comparators.d.ts +4 -0
- package/dist/src/utils/grid-date.d.ts +7 -0
- package/dist/src/utils/grid-registration.d.ts +16 -0
- package/dist/src/utils/grid-registration.spec.d.ts +1 -0
- package/dist/src/utils/pointer.d.ts +29 -0
- package/dist/src/utils/sub-menu-floating.d.ts +1 -0
- package/dist/types/analytics.js +4 -0
- package/dist/types/button.js +5 -0
- package/dist/types/calendar.js +4 -0
- package/dist/types/caption.js +4 -0
- package/dist/types/confirmation-popup.js +4 -0
- package/dist/types/dropdown.js +6 -0
- package/dist/types/editor.js +4 -0
- package/dist/types/file-manager.js +12 -0
- package/dist/types/flexible-actions.js +4 -0
- package/dist/types/form-item.js +4 -0
- package/dist/types/item.js +4 -0
- package/dist/types/menu-item.js +4 -0
- package/dist/types/notification.js +5 -0
- package/dist/types/popup.js +4 -0
- package/dist/types/radio-group.js +4 -0
- package/dist/types/resizable-container.js +4 -0
- package/dist/types/screen.js +4 -0
- package/dist/types/select.js +5 -0
- package/dist/types/size.js +4 -0
- package/dist/types/skeleton.js +6 -0
- package/dist/types/tab.js +6 -0
- package/dist/types/tag.js +4 -0
- package/dist/types/tooltip.js +4 -0
- package/dist/use-file-manager-tabs-DjdR_mYM.cjs +3 -0
- package/dist/utils/accessible-name.js +6 -0
- package/dist/utils/debounce.js +9 -0
- package/dist/utils/element-size-observer.js +24 -0
- package/dist/utils/file-accept.js +16 -0
- package/dist/utils/flat-to-hierarchy-convertor.js +86 -0
- package/dist/utils/grid-comparators.js +17 -0
- package/dist/utils/grid-date.js +20 -0
- package/dist/utils/grid-registration.js +8 -0
- package/dist/utils/merge-classes.js +8 -0
- package/dist/utils/mobile.js +11 -0
- package/dist/utils/path.js +4 -0
- package/dist/utils/pointer.js +5 -0
- package/dist/utils/sub-menu-floating.js +85 -0
- package/package.json +37 -12
- package/dist/JsonEditor-D3v6vYDX.cjs +0 -1
- package/dist/MarkdownEditor-CfaHfp2e.js +0 -75
- package/dist/MarkdownEditor-D9M8LvKZ.cjs +0 -1
- package/dist/MarkdownEditor-HO5rwRn7.cjs +0 -1
- package/dist/MarkdownEditor-K1ldlz5M.js +0 -35
- package/dist/dial-ui-kit.cjs.js +0 -1
- package/dist/dial-ui-kit.es.js +0 -221
- package/dist/index-DD0A-MXM.cjs +0 -71
- package/dist/index-Dg0iEirR.js +0 -66908
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { shallowEqual as n } from "../../../@react-dnd/shallowequal/dist/index.js";
|
|
2
|
+
import { isRef as s } from "./isRef.js";
|
|
3
|
+
import { wrapConnectorHooks as o } from "./wrapConnectorHooks.js";
|
|
4
|
+
class p {
|
|
5
|
+
get connectTarget() {
|
|
6
|
+
return this.dropTarget;
|
|
7
|
+
}
|
|
8
|
+
reconnect() {
|
|
9
|
+
const t = this.didHandlerIdChange() || this.didDropTargetChange() || this.didOptionsChange();
|
|
10
|
+
t && this.disconnectDropTarget();
|
|
11
|
+
const r = this.dropTarget;
|
|
12
|
+
if (this.handlerId) {
|
|
13
|
+
if (!r) {
|
|
14
|
+
this.lastConnectedDropTarget = r;
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
t && (this.lastConnectedHandlerId = this.handlerId, this.lastConnectedDropTarget = r, this.lastConnectedDropTargetOptions = this.dropTargetOptions, this.unsubscribeDropTarget = this.backend.connectDropTarget(this.handlerId, r, this.dropTargetOptions));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
receiveHandlerId(t) {
|
|
21
|
+
t !== this.handlerId && (this.handlerId = t, this.reconnect());
|
|
22
|
+
}
|
|
23
|
+
get dropTargetOptions() {
|
|
24
|
+
return this.dropTargetOptionsInternal;
|
|
25
|
+
}
|
|
26
|
+
set dropTargetOptions(t) {
|
|
27
|
+
this.dropTargetOptionsInternal = t;
|
|
28
|
+
}
|
|
29
|
+
didHandlerIdChange() {
|
|
30
|
+
return this.lastConnectedHandlerId !== this.handlerId;
|
|
31
|
+
}
|
|
32
|
+
didDropTargetChange() {
|
|
33
|
+
return this.lastConnectedDropTarget !== this.dropTarget;
|
|
34
|
+
}
|
|
35
|
+
didOptionsChange() {
|
|
36
|
+
return !n(this.lastConnectedDropTargetOptions, this.dropTargetOptions);
|
|
37
|
+
}
|
|
38
|
+
disconnectDropTarget() {
|
|
39
|
+
this.unsubscribeDropTarget && (this.unsubscribeDropTarget(), this.unsubscribeDropTarget = void 0);
|
|
40
|
+
}
|
|
41
|
+
get dropTarget() {
|
|
42
|
+
return this.dropTargetNode || this.dropTargetRef && this.dropTargetRef.current;
|
|
43
|
+
}
|
|
44
|
+
clearDropTarget() {
|
|
45
|
+
this.dropTargetRef = null, this.dropTargetNode = null;
|
|
46
|
+
}
|
|
47
|
+
constructor(t) {
|
|
48
|
+
this.hooks = o({
|
|
49
|
+
dropTarget: (r, e) => {
|
|
50
|
+
this.clearDropTarget(), this.dropTargetOptions = e, s(r) ? this.dropTargetRef = r : this.dropTargetNode = r, this.reconnect();
|
|
51
|
+
}
|
|
52
|
+
}), this.handlerId = null, this.dropTargetRef = null, this.dropTargetOptionsInternal = null, this.lastConnectedHandlerId = null, this.lastConnectedDropTarget = null, this.lastConnectedDropTargetOptions = null, this.backend = t;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
p as TargetConnector
|
|
57
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function s(t, o, g) {
|
|
2
|
+
const e = g.getRegistry(), r = e.addTarget(t, o);
|
|
3
|
+
return [
|
|
4
|
+
r,
|
|
5
|
+
() => e.removeTarget(r)
|
|
6
|
+
];
|
|
7
|
+
}
|
|
8
|
+
function c(t, o, g) {
|
|
9
|
+
const e = g.getRegistry(), r = e.addSource(t, o);
|
|
10
|
+
return [
|
|
11
|
+
r,
|
|
12
|
+
() => e.removeSource(r)
|
|
13
|
+
];
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
c as registerSource,
|
|
17
|
+
s as registerTarget
|
|
18
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { invariant as s } from "../../../@react-dnd/invariant/dist/index.js";
|
|
2
|
+
import { isValidElement as f, cloneElement as i } from "react";
|
|
3
|
+
function p(t) {
|
|
4
|
+
if (typeof t.type == "string")
|
|
5
|
+
return;
|
|
6
|
+
const n = t.type.displayName || t.type.name || "the component";
|
|
7
|
+
throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${n} into a <div>, or turn it into a drag source or a drop target itself.`);
|
|
8
|
+
}
|
|
9
|
+
function l(t) {
|
|
10
|
+
return (n = null, e = null) => {
|
|
11
|
+
if (!f(n)) {
|
|
12
|
+
const o = n;
|
|
13
|
+
return t(o, e), o;
|
|
14
|
+
}
|
|
15
|
+
const r = n;
|
|
16
|
+
return p(r), u(r, e ? (o) => t(o, e) : t);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function w(t) {
|
|
20
|
+
const n = {};
|
|
21
|
+
return Object.keys(t).forEach((e) => {
|
|
22
|
+
const r = t[e];
|
|
23
|
+
if (e.endsWith("Ref"))
|
|
24
|
+
n[e] = t[e];
|
|
25
|
+
else {
|
|
26
|
+
const a = l(r);
|
|
27
|
+
n[e] = () => a;
|
|
28
|
+
}
|
|
29
|
+
}), n;
|
|
30
|
+
}
|
|
31
|
+
function c(t, n) {
|
|
32
|
+
typeof t == "function" ? t(n) : t.current = n;
|
|
33
|
+
}
|
|
34
|
+
function u(t, n) {
|
|
35
|
+
const e = t.ref;
|
|
36
|
+
return s(typeof e != "string", "Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"), e ? i(t, {
|
|
37
|
+
ref: (r) => {
|
|
38
|
+
c(e, r), c(n, r);
|
|
39
|
+
}
|
|
40
|
+
}) : i(t, {
|
|
41
|
+
ref: n
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
w as wrapConnectorHooks
|
|
46
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { union as r, without as i } from "./utils/js_utils.js";
|
|
2
|
+
class d {
|
|
3
|
+
enter(e) {
|
|
4
|
+
const t = this.entered.length, s = (n) => this.isNodeInDocument(n) && (!n.contains || n.contains(e));
|
|
5
|
+
return this.entered = r(this.entered.filter(s), [
|
|
6
|
+
e
|
|
7
|
+
]), t === 0 && this.entered.length > 0;
|
|
8
|
+
}
|
|
9
|
+
leave(e) {
|
|
10
|
+
const t = this.entered.length;
|
|
11
|
+
return this.entered = i(this.entered.filter(this.isNodeInDocument), e), t > 0 && this.entered.length === 0;
|
|
12
|
+
}
|
|
13
|
+
reset() {
|
|
14
|
+
this.entered = [];
|
|
15
|
+
}
|
|
16
|
+
constructor(e) {
|
|
17
|
+
this.entered = [], this.isNodeInDocument = e;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
d as EnterLeaveCounter
|
|
22
|
+
};
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { EnterLeaveCounter as S } from "./EnterLeaveCounter.js";
|
|
2
|
+
import { createNativeDragSource as O, matchNativeItemType as g } from "./NativeDragSources/index.js";
|
|
3
|
+
import * as f from "./NativeTypes.js";
|
|
4
|
+
import { getNodeClientOffset as I, getEventClientOffset as h, getDragPreviewOffset as L } from "./OffsetUtils.js";
|
|
5
|
+
import { OptionsReader as C } from "./OptionsReader.js";
|
|
6
|
+
function w(o, e, r) {
|
|
7
|
+
return e in o ? Object.defineProperty(o, e, {
|
|
8
|
+
value: r,
|
|
9
|
+
enumerable: !0,
|
|
10
|
+
configurable: !0,
|
|
11
|
+
writable: !0
|
|
12
|
+
}) : o[e] = r, o;
|
|
13
|
+
}
|
|
14
|
+
function p(o) {
|
|
15
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
16
|
+
var r = arguments[e] != null ? arguments[e] : {}, s = Object.keys(r);
|
|
17
|
+
typeof Object.getOwnPropertySymbols == "function" && (s = s.concat(Object.getOwnPropertySymbols(r).filter(function(t) {
|
|
18
|
+
return Object.getOwnPropertyDescriptor(r, t).enumerable;
|
|
19
|
+
}))), s.forEach(function(t) {
|
|
20
|
+
w(o, t, r[t]);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return o;
|
|
24
|
+
}
|
|
25
|
+
class F {
|
|
26
|
+
/**
|
|
27
|
+
* Generate profiling statistics for the HTML5Backend.
|
|
28
|
+
*/
|
|
29
|
+
profile() {
|
|
30
|
+
var e, r;
|
|
31
|
+
return {
|
|
32
|
+
sourcePreviewNodes: this.sourcePreviewNodes.size,
|
|
33
|
+
sourcePreviewNodeOptions: this.sourcePreviewNodeOptions.size,
|
|
34
|
+
sourceNodeOptions: this.sourceNodeOptions.size,
|
|
35
|
+
sourceNodes: this.sourceNodes.size,
|
|
36
|
+
dragStartSourceIds: ((e = this.dragStartSourceIds) === null || e === void 0 ? void 0 : e.length) || 0,
|
|
37
|
+
dropTargetIds: this.dropTargetIds.length,
|
|
38
|
+
dragEnterTargetIds: this.dragEnterTargetIds.length,
|
|
39
|
+
dragOverTargetIds: ((r = this.dragOverTargetIds) === null || r === void 0 ? void 0 : r.length) || 0
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
// public for test
|
|
43
|
+
get window() {
|
|
44
|
+
return this.options.window;
|
|
45
|
+
}
|
|
46
|
+
get document() {
|
|
47
|
+
return this.options.document;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Get the root element to use for event subscriptions
|
|
51
|
+
*/
|
|
52
|
+
get rootElement() {
|
|
53
|
+
return this.options.rootElement;
|
|
54
|
+
}
|
|
55
|
+
setup() {
|
|
56
|
+
const e = this.rootElement;
|
|
57
|
+
if (e !== void 0) {
|
|
58
|
+
if (e.__isReactDndBackendSetUp)
|
|
59
|
+
throw new Error("Cannot have two HTML5 backends at the same time.");
|
|
60
|
+
e.__isReactDndBackendSetUp = !0, this.addEventListeners(e);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
teardown() {
|
|
64
|
+
const e = this.rootElement;
|
|
65
|
+
if (e !== void 0 && (e.__isReactDndBackendSetUp = !1, this.removeEventListeners(this.rootElement), this.clearCurrentDragSourceNode(), this.asyncEndDragFrameId)) {
|
|
66
|
+
var r;
|
|
67
|
+
(r = this.window) === null || r === void 0 || r.cancelAnimationFrame(this.asyncEndDragFrameId);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
connectDragPreview(e, r, s) {
|
|
71
|
+
return this.sourcePreviewNodeOptions.set(e, s), this.sourcePreviewNodes.set(e, r), () => {
|
|
72
|
+
this.sourcePreviewNodes.delete(e), this.sourcePreviewNodeOptions.delete(e);
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
connectDragSource(e, r, s) {
|
|
76
|
+
this.sourceNodes.set(e, r), this.sourceNodeOptions.set(e, s);
|
|
77
|
+
const t = (a) => this.handleDragStart(a, e), i = (a) => this.handleSelectStart(a);
|
|
78
|
+
return r.setAttribute("draggable", "true"), r.addEventListener("dragstart", t), r.addEventListener("selectstart", i), () => {
|
|
79
|
+
this.sourceNodes.delete(e), this.sourceNodeOptions.delete(e), r.removeEventListener("dragstart", t), r.removeEventListener("selectstart", i), r.setAttribute("draggable", "false");
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
connectDropTarget(e, r) {
|
|
83
|
+
const s = (a) => this.handleDragEnter(a, e), t = (a) => this.handleDragOver(a, e), i = (a) => this.handleDrop(a, e);
|
|
84
|
+
return r.addEventListener("dragenter", s), r.addEventListener("dragover", t), r.addEventListener("drop", i), () => {
|
|
85
|
+
r.removeEventListener("dragenter", s), r.removeEventListener("dragover", t), r.removeEventListener("drop", i);
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
addEventListeners(e) {
|
|
89
|
+
e.addEventListener && (e.addEventListener("dragstart", this.handleTopDragStart), e.addEventListener("dragstart", this.handleTopDragStartCapture, !0), e.addEventListener("dragend", this.handleTopDragEndCapture, !0), e.addEventListener("dragenter", this.handleTopDragEnter), e.addEventListener("dragenter", this.handleTopDragEnterCapture, !0), e.addEventListener("dragleave", this.handleTopDragLeaveCapture, !0), e.addEventListener("dragover", this.handleTopDragOver), e.addEventListener("dragover", this.handleTopDragOverCapture, !0), e.addEventListener("drop", this.handleTopDrop), e.addEventListener("drop", this.handleTopDropCapture, !0));
|
|
90
|
+
}
|
|
91
|
+
removeEventListeners(e) {
|
|
92
|
+
e.removeEventListener && (e.removeEventListener("dragstart", this.handleTopDragStart), e.removeEventListener("dragstart", this.handleTopDragStartCapture, !0), e.removeEventListener("dragend", this.handleTopDragEndCapture, !0), e.removeEventListener("dragenter", this.handleTopDragEnter), e.removeEventListener("dragenter", this.handleTopDragEnterCapture, !0), e.removeEventListener("dragleave", this.handleTopDragLeaveCapture, !0), e.removeEventListener("dragover", this.handleTopDragOver), e.removeEventListener("dragover", this.handleTopDragOverCapture, !0), e.removeEventListener("drop", this.handleTopDrop), e.removeEventListener("drop", this.handleTopDropCapture, !0));
|
|
93
|
+
}
|
|
94
|
+
getCurrentSourceNodeOptions() {
|
|
95
|
+
const e = this.monitor.getSourceId(), r = this.sourceNodeOptions.get(e);
|
|
96
|
+
return p({
|
|
97
|
+
dropEffect: this.altKeyPressed ? "copy" : "move"
|
|
98
|
+
}, r || {});
|
|
99
|
+
}
|
|
100
|
+
getCurrentDropEffect() {
|
|
101
|
+
return this.isDraggingNativeItem() ? "copy" : this.getCurrentSourceNodeOptions().dropEffect;
|
|
102
|
+
}
|
|
103
|
+
getCurrentSourcePreviewNodeOptions() {
|
|
104
|
+
const e = this.monitor.getSourceId(), r = this.sourcePreviewNodeOptions.get(e);
|
|
105
|
+
return p({
|
|
106
|
+
anchorX: 0.5,
|
|
107
|
+
anchorY: 0.5,
|
|
108
|
+
captureDraggingState: !1
|
|
109
|
+
}, r || {});
|
|
110
|
+
}
|
|
111
|
+
isDraggingNativeItem() {
|
|
112
|
+
const e = this.monitor.getItemType();
|
|
113
|
+
return Object.keys(f).some(
|
|
114
|
+
(r) => f[r] === e
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
beginDragNativeItem(e, r) {
|
|
118
|
+
this.clearCurrentDragSourceNode(), this.currentNativeSource = O(e, r), this.currentNativeHandle = this.registry.addSource(e, this.currentNativeSource), this.actions.beginDrag([
|
|
119
|
+
this.currentNativeHandle
|
|
120
|
+
]);
|
|
121
|
+
}
|
|
122
|
+
setCurrentDragSourceNode(e) {
|
|
123
|
+
this.clearCurrentDragSourceNode(), this.currentDragSourceNode = e;
|
|
124
|
+
const r = 1e3;
|
|
125
|
+
this.mouseMoveTimeoutTimer = setTimeout(() => {
|
|
126
|
+
var s;
|
|
127
|
+
return (s = this.rootElement) === null || s === void 0 ? void 0 : s.addEventListener("mousemove", this.endDragIfSourceWasRemovedFromDOM, !0);
|
|
128
|
+
}, r);
|
|
129
|
+
}
|
|
130
|
+
clearCurrentDragSourceNode() {
|
|
131
|
+
if (this.currentDragSourceNode) {
|
|
132
|
+
if (this.currentDragSourceNode = null, this.rootElement) {
|
|
133
|
+
var e;
|
|
134
|
+
(e = this.window) === null || e === void 0 || e.clearTimeout(this.mouseMoveTimeoutTimer || void 0), this.rootElement.removeEventListener("mousemove", this.endDragIfSourceWasRemovedFromDOM, !0);
|
|
135
|
+
}
|
|
136
|
+
return this.mouseMoveTimeoutTimer = null, !0;
|
|
137
|
+
}
|
|
138
|
+
return !1;
|
|
139
|
+
}
|
|
140
|
+
handleDragStart(e, r) {
|
|
141
|
+
e.defaultPrevented || (this.dragStartSourceIds || (this.dragStartSourceIds = []), this.dragStartSourceIds.unshift(r));
|
|
142
|
+
}
|
|
143
|
+
handleDragEnter(e, r) {
|
|
144
|
+
this.dragEnterTargetIds.unshift(r);
|
|
145
|
+
}
|
|
146
|
+
handleDragOver(e, r) {
|
|
147
|
+
this.dragOverTargetIds === null && (this.dragOverTargetIds = []), this.dragOverTargetIds.unshift(r);
|
|
148
|
+
}
|
|
149
|
+
handleDrop(e, r) {
|
|
150
|
+
this.dropTargetIds.unshift(r);
|
|
151
|
+
}
|
|
152
|
+
constructor(e, r, s) {
|
|
153
|
+
this.sourcePreviewNodes = /* @__PURE__ */ new Map(), this.sourcePreviewNodeOptions = /* @__PURE__ */ new Map(), this.sourceNodes = /* @__PURE__ */ new Map(), this.sourceNodeOptions = /* @__PURE__ */ new Map(), this.dragStartSourceIds = null, this.dropTargetIds = [], this.dragEnterTargetIds = [], this.currentNativeSource = null, this.currentNativeHandle = null, this.currentDragSourceNode = null, this.altKeyPressed = !1, this.mouseMoveTimeoutTimer = null, this.asyncEndDragFrameId = null, this.dragOverTargetIds = null, this.lastClientOffset = null, this.hoverRafId = null, this.getSourceClientOffset = (t) => {
|
|
154
|
+
const i = this.sourceNodes.get(t);
|
|
155
|
+
return i && I(i) || null;
|
|
156
|
+
}, this.endDragNativeItem = () => {
|
|
157
|
+
this.isDraggingNativeItem() && (this.actions.endDrag(), this.currentNativeHandle && this.registry.removeSource(this.currentNativeHandle), this.currentNativeHandle = null, this.currentNativeSource = null);
|
|
158
|
+
}, this.isNodeInDocument = (t) => !!(t && this.document && this.document.body && this.document.body.contains(t)), this.endDragIfSourceWasRemovedFromDOM = () => {
|
|
159
|
+
const t = this.currentDragSourceNode;
|
|
160
|
+
t == null || this.isNodeInDocument(t) || (this.clearCurrentDragSourceNode() && this.monitor.isDragging() && this.actions.endDrag(), this.cancelHover());
|
|
161
|
+
}, this.scheduleHover = (t) => {
|
|
162
|
+
this.hoverRafId === null && typeof requestAnimationFrame < "u" && (this.hoverRafId = requestAnimationFrame(() => {
|
|
163
|
+
this.monitor.isDragging() && this.actions.hover(t || [], {
|
|
164
|
+
clientOffset: this.lastClientOffset
|
|
165
|
+
}), this.hoverRafId = null;
|
|
166
|
+
}));
|
|
167
|
+
}, this.cancelHover = () => {
|
|
168
|
+
this.hoverRafId !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(this.hoverRafId), this.hoverRafId = null);
|
|
169
|
+
}, this.handleTopDragStartCapture = () => {
|
|
170
|
+
this.clearCurrentDragSourceNode(), this.dragStartSourceIds = [];
|
|
171
|
+
}, this.handleTopDragStart = (t) => {
|
|
172
|
+
if (t.defaultPrevented)
|
|
173
|
+
return;
|
|
174
|
+
const { dragStartSourceIds: i } = this;
|
|
175
|
+
this.dragStartSourceIds = null;
|
|
176
|
+
const a = h(t);
|
|
177
|
+
this.monitor.isDragging() && (this.actions.endDrag(), this.cancelHover()), this.actions.beginDrag(i || [], {
|
|
178
|
+
publishSource: !1,
|
|
179
|
+
getSourceClientOffset: this.getSourceClientOffset,
|
|
180
|
+
clientOffset: a
|
|
181
|
+
});
|
|
182
|
+
const { dataTransfer: n } = t, d = g(n);
|
|
183
|
+
if (this.monitor.isDragging()) {
|
|
184
|
+
if (n && typeof n.setDragImage == "function") {
|
|
185
|
+
const u = this.monitor.getSourceId(), l = this.sourceNodes.get(u), c = this.sourcePreviewNodes.get(u) || l;
|
|
186
|
+
if (c) {
|
|
187
|
+
const { anchorX: m, anchorY: T, offsetX: E, offsetY: N } = this.getCurrentSourcePreviewNodeOptions(), v = L(l, c, a, {
|
|
188
|
+
anchorX: m,
|
|
189
|
+
anchorY: T
|
|
190
|
+
}, {
|
|
191
|
+
offsetX: E,
|
|
192
|
+
offsetY: N
|
|
193
|
+
});
|
|
194
|
+
n.setDragImage(c, v.x, v.y);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
try {
|
|
198
|
+
n?.setData("application/json", {});
|
|
199
|
+
} catch {
|
|
200
|
+
}
|
|
201
|
+
this.setCurrentDragSourceNode(t.target);
|
|
202
|
+
const { captureDraggingState: D } = this.getCurrentSourcePreviewNodeOptions();
|
|
203
|
+
D ? this.actions.publishDragSource() : setTimeout(
|
|
204
|
+
() => this.actions.publishDragSource(),
|
|
205
|
+
0
|
|
206
|
+
);
|
|
207
|
+
} else if (d)
|
|
208
|
+
this.beginDragNativeItem(d);
|
|
209
|
+
else {
|
|
210
|
+
if (n && !n.types && (t.target && !t.target.hasAttribute || !t.target.hasAttribute("draggable")))
|
|
211
|
+
return;
|
|
212
|
+
t.preventDefault();
|
|
213
|
+
}
|
|
214
|
+
}, this.handleTopDragEndCapture = () => {
|
|
215
|
+
this.clearCurrentDragSourceNode() && this.monitor.isDragging() && this.actions.endDrag(), this.cancelHover();
|
|
216
|
+
}, this.handleTopDragEnterCapture = (t) => {
|
|
217
|
+
if (this.dragEnterTargetIds = [], this.isDraggingNativeItem()) {
|
|
218
|
+
var i;
|
|
219
|
+
(i = this.currentNativeSource) === null || i === void 0 || i.loadDataTransfer(t.dataTransfer);
|
|
220
|
+
}
|
|
221
|
+
if (!this.enterLeaveCounter.enter(t.target) || this.monitor.isDragging())
|
|
222
|
+
return;
|
|
223
|
+
const { dataTransfer: n } = t, d = g(n);
|
|
224
|
+
d && this.beginDragNativeItem(d, n);
|
|
225
|
+
}, this.handleTopDragEnter = (t) => {
|
|
226
|
+
const { dragEnterTargetIds: i } = this;
|
|
227
|
+
if (this.dragEnterTargetIds = [], !this.monitor.isDragging())
|
|
228
|
+
return;
|
|
229
|
+
this.altKeyPressed = t.altKey, i.length > 0 && this.actions.hover(i, {
|
|
230
|
+
clientOffset: h(t)
|
|
231
|
+
}), i.some(
|
|
232
|
+
(n) => this.monitor.canDropOnTarget(n)
|
|
233
|
+
) && (t.preventDefault(), t.dataTransfer && (t.dataTransfer.dropEffect = this.getCurrentDropEffect()));
|
|
234
|
+
}, this.handleTopDragOverCapture = (t) => {
|
|
235
|
+
if (this.dragOverTargetIds = [], this.isDraggingNativeItem()) {
|
|
236
|
+
var i;
|
|
237
|
+
(i = this.currentNativeSource) === null || i === void 0 || i.loadDataTransfer(t.dataTransfer);
|
|
238
|
+
}
|
|
239
|
+
}, this.handleTopDragOver = (t) => {
|
|
240
|
+
const { dragOverTargetIds: i } = this;
|
|
241
|
+
if (this.dragOverTargetIds = [], !this.monitor.isDragging()) {
|
|
242
|
+
t.preventDefault(), t.dataTransfer && (t.dataTransfer.dropEffect = "none");
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
this.altKeyPressed = t.altKey, this.lastClientOffset = h(t), this.scheduleHover(i), (i || []).some(
|
|
246
|
+
(n) => this.monitor.canDropOnTarget(n)
|
|
247
|
+
) ? (t.preventDefault(), t.dataTransfer && (t.dataTransfer.dropEffect = this.getCurrentDropEffect())) : this.isDraggingNativeItem() ? t.preventDefault() : (t.preventDefault(), t.dataTransfer && (t.dataTransfer.dropEffect = "none"));
|
|
248
|
+
}, this.handleTopDragLeaveCapture = (t) => {
|
|
249
|
+
this.isDraggingNativeItem() && t.preventDefault(), this.enterLeaveCounter.leave(t.target) && (this.isDraggingNativeItem() && setTimeout(
|
|
250
|
+
() => this.endDragNativeItem(),
|
|
251
|
+
0
|
|
252
|
+
), this.cancelHover());
|
|
253
|
+
}, this.handleTopDropCapture = (t) => {
|
|
254
|
+
if (this.dropTargetIds = [], this.isDraggingNativeItem()) {
|
|
255
|
+
var i;
|
|
256
|
+
t.preventDefault(), (i = this.currentNativeSource) === null || i === void 0 || i.loadDataTransfer(t.dataTransfer);
|
|
257
|
+
} else g(t.dataTransfer) && t.preventDefault();
|
|
258
|
+
this.enterLeaveCounter.reset();
|
|
259
|
+
}, this.handleTopDrop = (t) => {
|
|
260
|
+
const { dropTargetIds: i } = this;
|
|
261
|
+
this.dropTargetIds = [], this.actions.hover(i, {
|
|
262
|
+
clientOffset: h(t)
|
|
263
|
+
}), this.actions.drop({
|
|
264
|
+
dropEffect: this.getCurrentDropEffect()
|
|
265
|
+
}), this.isDraggingNativeItem() ? this.endDragNativeItem() : this.monitor.isDragging() && this.actions.endDrag(), this.cancelHover();
|
|
266
|
+
}, this.handleSelectStart = (t) => {
|
|
267
|
+
const i = t.target;
|
|
268
|
+
typeof i.dragDrop == "function" && (i.tagName === "INPUT" || i.tagName === "SELECT" || i.tagName === "TEXTAREA" || i.isContentEditable || (t.preventDefault(), i.dragDrop()));
|
|
269
|
+
}, this.options = new C(r, s), this.actions = e.getActions(), this.monitor = e.getMonitor(), this.registry = e.getRegistry(), this.enterLeaveCounter = new S(this.isNodeInDocument);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
export {
|
|
273
|
+
F as HTML5BackendImpl
|
|
274
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
class M {
|
|
2
|
+
interpolate(e) {
|
|
3
|
+
const { xs: c, ys: u, c1s: g, c2s: h, c3s: n } = this;
|
|
4
|
+
let s = c.length - 1;
|
|
5
|
+
if (e === c[s])
|
|
6
|
+
return u[s];
|
|
7
|
+
let p = 0, o = n.length - 1, l;
|
|
8
|
+
for (; p <= o; ) {
|
|
9
|
+
l = Math.floor(0.5 * (p + o));
|
|
10
|
+
const t = c[l];
|
|
11
|
+
if (t < e)
|
|
12
|
+
p = l + 1;
|
|
13
|
+
else if (t > e)
|
|
14
|
+
o = l - 1;
|
|
15
|
+
else
|
|
16
|
+
return u[l];
|
|
17
|
+
}
|
|
18
|
+
s = Math.max(0, o);
|
|
19
|
+
const i = e - c[s], r = i * i;
|
|
20
|
+
return u[s] + g[s] * i + h[s] * r + n[s] * i * r;
|
|
21
|
+
}
|
|
22
|
+
constructor(e, c) {
|
|
23
|
+
const { length: u } = e, g = [];
|
|
24
|
+
for (let t = 0; t < u; t++)
|
|
25
|
+
g.push(t);
|
|
26
|
+
g.sort(
|
|
27
|
+
(t, f) => e[t] < e[f] ? -1 : 1
|
|
28
|
+
);
|
|
29
|
+
const h = [], n = [];
|
|
30
|
+
let s, p;
|
|
31
|
+
for (let t = 0; t < u - 1; t++)
|
|
32
|
+
s = e[t + 1] - e[t], p = c[t + 1] - c[t], h.push(s), n.push(p / s);
|
|
33
|
+
const o = [
|
|
34
|
+
n[0]
|
|
35
|
+
];
|
|
36
|
+
for (let t = 0; t < h.length - 1; t++) {
|
|
37
|
+
const f = n[t], m = n[t + 1];
|
|
38
|
+
if (f * m <= 0)
|
|
39
|
+
o.push(0);
|
|
40
|
+
else {
|
|
41
|
+
s = h[t];
|
|
42
|
+
const d = h[t + 1], a = s + d;
|
|
43
|
+
o.push(3 * a / ((a + d) / f + (a + s) / m));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
o.push(n[n.length - 1]);
|
|
47
|
+
const l = [], i = [];
|
|
48
|
+
let r;
|
|
49
|
+
for (let t = 0; t < o.length - 1; t++) {
|
|
50
|
+
r = n[t];
|
|
51
|
+
const f = o[t], m = 1 / h[t], d = f + o[t + 1] - r - r;
|
|
52
|
+
l.push((r - f - d) * m), i.push(d * m * m);
|
|
53
|
+
}
|
|
54
|
+
this.xs = e, this.ys = c, this.c1s = o, this.c2s = l, this.c3s = i;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
M as MonotonicInterpolant
|
|
59
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
class s {
|
|
2
|
+
initializeExposedProperties() {
|
|
3
|
+
Object.keys(this.config.exposeProperties).forEach((e) => {
|
|
4
|
+
Object.defineProperty(this.item, e, {
|
|
5
|
+
configurable: !0,
|
|
6
|
+
enumerable: !0,
|
|
7
|
+
get() {
|
|
8
|
+
return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`), null;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
loadDataTransfer(e) {
|
|
14
|
+
if (e) {
|
|
15
|
+
const t = {};
|
|
16
|
+
Object.keys(this.config.exposeProperties).forEach((r) => {
|
|
17
|
+
const i = this.config.exposeProperties[r];
|
|
18
|
+
i != null && (t[r] = {
|
|
19
|
+
value: i(e, this.config.matchesTypes),
|
|
20
|
+
configurable: !0,
|
|
21
|
+
enumerable: !0
|
|
22
|
+
});
|
|
23
|
+
}), Object.defineProperties(this.item, t);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
canDrag() {
|
|
27
|
+
return !0;
|
|
28
|
+
}
|
|
29
|
+
beginDrag() {
|
|
30
|
+
return this.item;
|
|
31
|
+
}
|
|
32
|
+
isDragging(e, t) {
|
|
33
|
+
return t === e.getSourceId();
|
|
34
|
+
}
|
|
35
|
+
endDrag() {
|
|
36
|
+
}
|
|
37
|
+
constructor(e) {
|
|
38
|
+
this.config = e, this.item = {}, this.initializeExposedProperties();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
s as NativeDragSource
|
|
43
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { NativeDragSource as a } from "./NativeDragSource.js";
|
|
2
|
+
import { nativeTypesConfig as o } from "./nativeTypesConfig.js";
|
|
3
|
+
function f(t, n) {
|
|
4
|
+
const r = o[t];
|
|
5
|
+
if (!r)
|
|
6
|
+
throw new Error(`native type ${t} has no configuration`);
|
|
7
|
+
const e = new a(r);
|
|
8
|
+
return e.loadDataTransfer(n), e;
|
|
9
|
+
}
|
|
10
|
+
function u(t) {
|
|
11
|
+
if (!t)
|
|
12
|
+
return null;
|
|
13
|
+
const n = Array.prototype.slice.call(t.types || []);
|
|
14
|
+
return Object.keys(o).filter((r) => {
|
|
15
|
+
const e = o[r];
|
|
16
|
+
return e?.matchesTypes ? e.matchesTypes.some(
|
|
17
|
+
(i) => n.indexOf(i) > -1
|
|
18
|
+
) : !1;
|
|
19
|
+
})[0] || null;
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
f as createNativeDragSource,
|
|
23
|
+
u as matchNativeItemType
|
|
24
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { TEXT as r, URL as a, HTML as p, FILE as i } from "../NativeTypes.js";
|
|
2
|
+
import { getDataFromDataTransfer as s } from "./getDataFromDataTransfer.js";
|
|
3
|
+
const m = {
|
|
4
|
+
[i]: {
|
|
5
|
+
exposeProperties: {
|
|
6
|
+
files: (e) => Array.prototype.slice.call(e.files),
|
|
7
|
+
items: (e) => e.items,
|
|
8
|
+
dataTransfer: (e) => e
|
|
9
|
+
},
|
|
10
|
+
matchesTypes: [
|
|
11
|
+
"Files"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
[p]: {
|
|
15
|
+
exposeProperties: {
|
|
16
|
+
html: (e, t) => s(e, t, ""),
|
|
17
|
+
dataTransfer: (e) => e
|
|
18
|
+
},
|
|
19
|
+
matchesTypes: [
|
|
20
|
+
"Html",
|
|
21
|
+
"text/html"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
[a]: {
|
|
25
|
+
exposeProperties: {
|
|
26
|
+
urls: (e, t) => s(e, t, "").split(`
|
|
27
|
+
`),
|
|
28
|
+
dataTransfer: (e) => e
|
|
29
|
+
},
|
|
30
|
+
matchesTypes: [
|
|
31
|
+
"Url",
|
|
32
|
+
"text/uri-list"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
[r]: {
|
|
36
|
+
exposeProperties: {
|
|
37
|
+
text: (e, t) => s(e, t, ""),
|
|
38
|
+
dataTransfer: (e) => e
|
|
39
|
+
},
|
|
40
|
+
matchesTypes: [
|
|
41
|
+
"Text",
|
|
42
|
+
"text/plain"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
m as nativeTypesConfig
|
|
48
|
+
};
|