MCPcopy Create free account
hub / github.com/danielstocks/react-sortable / recomputePluginOrdering

Function recomputePluginOrdering

bundle.js:5446–5447  ·  view source on GitHub ↗

* Recomputes the plugin list using the injected plugins and plugin ordering. * * @private

()

Source from the content-addressed store, hash-verified

5444 *
5445 * @private
5446 */function recomputePluginOrdering(){if(!eventPluginOrder){// Wait until an `eventPluginOrder` is injected.
5447return;}for(var pluginName in namesToPlugins){var pluginModule=namesToPlugins[pluginName];var pluginIndex=eventPluginOrder.indexOf(pluginName);!(pluginIndex>-1)?invariant(false,'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.',pluginName):void 0;if(EventPluginRegistry.plugins[pluginIndex]){continue;}!pluginModule.extractEvents?invariant(false,'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.',pluginName):void 0;EventPluginRegistry.plugins[pluginIndex]=pluginModule;var publishedEvents=pluginModule.eventTypes;for(var eventName in publishedEvents){!publishEventForPlugin(publishedEvents[eventName],pluginModule,eventName)?invariant(false,'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.',eventName,pluginName):void 0;}}}/**
5448 * Publishes an event so that it can be dispatched by the supplied plugin.
5449 *
5450 * @param {object} dispatchConfig Dispatch configuration for the event.

Callers 1

bundle.jsFile · 0.85

Calls 2

publishEventForPluginFunction · 0.85
invariantFunction · 0.70

Tested by

no test coverage detected