BLUE
PHP 7.4.33
Path:
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/react-dnd-html5-backend/src/NativeDragSources
Run
Logout
Edit File
Size: 1.54 KB
Close
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/react-dnd-html5-backend/src/NativeDragSources/NativeDragSource.ts
Text
Base64
import type { DragDropMonitor } from 'dnd-core' import type { NativeItemConfig } from './nativeTypesConfig.js' export class NativeDragSource { public item: any private config: NativeItemConfig public constructor(config: NativeItemConfig) { this.config = config this.item = {} this.initializeExposedProperties() } private initializeExposedProperties() { Object.keys(this.config.exposeProperties).forEach((property) => { Object.defineProperty(this.item, property, { configurable: true, // This is needed to allow redefining it later enumerable: true, get() { // eslint-disable-next-line no-console console.warn( `Browser doesn't allow reading "${property}" until the drop event.`, ) return null }, }) }) } public loadDataTransfer(dataTransfer: DataTransfer | null | undefined): void { if (dataTransfer) { const newProperties: PropertyDescriptorMap = {} Object.keys(this.config.exposeProperties).forEach((property) => { const propertyFn = this.config.exposeProperties[property] if (propertyFn != null) { newProperties[property] = { value: propertyFn(dataTransfer, this.config.matchesTypes), configurable: true, enumerable: true, } } }) Object.defineProperties(this.item, newProperties) } } public canDrag(): boolean { return true } public beginDrag(): any { return this.item } public isDragging(monitor: DragDropMonitor, handle: string): boolean { return handle === monitor.getSourceId() } public endDrag(): void { // empty } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 4
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
getDataFromDataTransfer.ts
300 B
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.ts
957 B
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
NativeDragSource.ts
1.54 KB
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
nativeTypesConfig.ts
1.69 KB
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).