Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const getDndContext = () => {
if (defaultManager) return defaultManager
defaultManager = new DragDropManager(HTML5Backend)
return defaultManager
}
var createChildContext = exports.createChildContext = function createChildContext(backend, context) {
return {
dragDropManager: new _dndCore.DragDropManager(backend, context)
};
};
Object.keys(backendFactories).forEach(function (key) {
childContextTypes[key] = _React$Component$PropTypes.PropTypes.object.isRequired;
childContext[key] = new _DragDropManager.DragDropManager(backendFactories[key]);
});
return zone.runOutsideAngular(() => new DragDropManager(unpackBackendForEs5Users(backend), context))
}
provide () {
return {
dragDropManager: new DragDropManager(this.getBackend(), {
window: this.getWindow()
})
}
},
methods: {
export default (): DragDropManager => {
if (defaultManager) {
return defaultManager
}
defaultManager = new DragDropManager(HTML5Backend)
return defaultManager
}
export default function DragDropContext (backendOrModule, context = {}) {
let backend = backendOrModule
if (typeof backend === 'object' && typeof backend.default === 'function') {
backend = backend.default
}
return {
provide: {
dragDropManager: new DragDropManager(backend, context)
}
}
}
export default function getDragDropManager() {
if (!defaultManager) {
defaultManager = new DragDropManager(HTML5Backend);
}
return defaultManager;
}