[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/dist/ -> compose.js (summary)

(no description)

File Size: 3952 lines (127 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 101 functions

  __webpack_require__()
  getDefault()
  getModuleExports()
  _iterableToArrayLimit()
  _slicedToArray()
  areInputsEqual()
  useMemoOne()
  useCallbackOne()
  _assertThisInitialized()
  _arrayWithoutHoles()
  _nonIterableSpread()
  _toConsumableArray()
  _getPrototypeOf()
  _classCallCheck()
  _defineProperties()
  _createClass()
  _setPrototypeOf()
  _inherits()
  _possibleConstructorReturn()
  _arrayLikeToArray()
  __webpack_require__()
  getDefault()
  getModuleExports()
  select()
  E()
  listener()
  listen()
  listenNode()
  listenNodeList()
  listenSelector()
  _delegate()
  delegate()
  listener()
  closest()
  _classCallCheck()
  ClipboardAction()
  clipboard_classCallCheck()
  _possibleConstructorReturn()
  _inherits()
  Clipboard()
  getAttributeValue()
  _addEvent()
  _characterFromEvent()
  _modifiersMatch()
  _eventModifiers()
  _preventDefault()
  _stopPropagation()
  _isModifier()
  _getReverseMap()
  _pickBestAction()
  _keysFromString()
  _getKeyInfo()
  _belongsTo()
  Mousetrap()
  _resetSequences()
  _getMatches()
  _fireCallback()
  _handleKeyEvent()
  _resetSequenceTimer()
  _bindSequence()
  _increaseSequence()
  _callbackAndReset()
  _bindSingle()
  _unsupportedIterableToArray()
  _iterableToArray()
  _arrayWithHoles()
  _nonIterableRest()
  _typeof()
  createHigherOrderComponent()
  _createSuper()
  _isNativeReflectConstruct()
  _class()
  _class2()
  Listener()
  with_global_events_createSuper()
  with_global_events_isNativeReflectConstruct()
  withGlobalEvents()
  Wrapper()
  createId()
  useInstanceId()
  with_safe_timeout_createSuper()
  with_safe_timeout_isNativeReflectConstruct()
  WrappedComponent()
  setTimeout()
  clearTimeout()
  with_state_createSuper()
  with_state_isNativeReflectConstruct()
  withState()
  WrappedComponent()
  useCopyOnClick()
  useDragging()
  isAppleOS()
  useKeyboardShortcut()
  useMediaQuery()
  usePrevious()
  getFirstItemsPresentInState()
  listReducer()
  useAsyncList()
  useWarnOnChange()
  useDebounce()
  _extends()

Functions
Functions that are not part of a class:

__webpack_require__(moduleId)   X-Ref
No description

getDefault()   X-Ref
No description

getModuleExports()   X-Ref
No description

_iterableToArrayLimit(arr, i)   X-Ref
No description

_slicedToArray(arr, i)   X-Ref
No description

areInputsEqual(newInputs, lastInputs)   X-Ref
No description

useMemoOne(getResult, inputs)   X-Ref
No description

useCallbackOne(callback, inputs)   X-Ref
No description

_assertThisInitialized(self)   X-Ref
No description

_arrayWithoutHoles(arr)   X-Ref
No description

_nonIterableSpread()   X-Ref
No description

_toConsumableArray(arr)   X-Ref
No description

_getPrototypeOf(o)   X-Ref
No description

_classCallCheck(instance, Constructor)   X-Ref
No description

_defineProperties(target, props)   X-Ref
No description

_createClass(Constructor, protoProps, staticProps)   X-Ref
No description

_setPrototypeOf(o, p)   X-Ref
No description

_inherits(subClass, superClass)   X-Ref
No description

_possibleConstructorReturn(self, call)   X-Ref
No description

_arrayLikeToArray(arr, len)   X-Ref
No description

__webpack_require__(moduleId)   X-Ref
No description

getDefault()   X-Ref
No description

getModuleExports()   X-Ref
No description

select(element)   X-Ref
No description

E()   X-Ref
No description

listener()   X-Ref
No description

listen(target, type, callback)   X-Ref
Validates all params and calls the right
listener function based on its target type.

param: {String|HTMLElement|HTMLCollection|NodeList} target
param: {String} type
param: {Function} callback
return: {Object}

listenNode(node, type, callback)   X-Ref
Adds an event listener to a HTML element
and returns a remove listener function.

param: {HTMLElement} node
param: {String} type
param: {Function} callback
return: {Object}

listenNodeList(nodeList, type, callback)   X-Ref
Add an event listener to a list of HTML elements
and returns a remove listener function.

param: {NodeList|HTMLCollection} nodeList
param: {String} type
param: {Function} callback
return: {Object}

listenSelector(selector, type, callback)   X-Ref
Add an event listener to a selector
and returns a remove listener function.

param: {String} selector
param: {String} type
param: {Function} callback
return: {Object}

_delegate(element, selector, type, callback, useCapture)   X-Ref
Delegates event to a selector.

param: {Element} element
param: {String} selector
param: {String} type
param: {Function} callback
param: {Boolean} useCapture
return: {Object}

delegate(elements, selector, type, callback, useCapture)   X-Ref
Delegates event to a selector.

param: {Element|String|Array} [elements]
param: {String} selector
param: {String} type
param: {Function} callback
param: {Boolean} useCapture
return: {Object}

listener(element, selector, type, callback)   X-Ref
Finds closest match and invokes callback.

param: {Element} element
param: {String} selector
param: {String} type
param: {Function} callback
return: {Function}

closest(element, selector)   X-Ref
Finds the closest parent that matches a selector.

param: {Element} element
param: {String} selector
return: {Function}

_classCallCheck(instance, Constructor)   X-Ref
No description

ClipboardAction(options)   X-Ref

param: {Object} options

clipboard_classCallCheck(instance, Constructor)   X-Ref
No description

_possibleConstructorReturn(self, call)   X-Ref
No description

_inherits(subClass, superClass)   X-Ref
No description

Clipboard(trigger, options)   X-Ref

param: {String|HTMLElement|HTMLCollection|NodeList} trigger
param: {Object} options

getAttributeValue(suffix, element)   X-Ref
Helper function to retrieve attribute value.

param: {String} suffix
param: {Element} element

_addEvent(object, type, callback)   X-Ref
cross browser add event method

returns: void
param: {Element|HTMLDocument} object
param: {string} type
param: {Function} callback

_characterFromEvent(e)   X-Ref
takes the event and returns the key character

param: {Event} e
return: {string}

_modifiersMatch(modifiers1, modifiers2)   X-Ref
checks if two arrays are equal

returns: {boolean}
param: {Array} modifiers1
param: {Array} modifiers2

_eventModifiers(e)   X-Ref
takes a key event and figures out what the modifiers are

returns: {Array}
param: {Event} e

_preventDefault(e)   X-Ref
prevents default for this event

returns: void
param: {Event} e

_stopPropagation(e)   X-Ref
stops propogation for this event

returns: void
param: {Event} e

_isModifier(key)   X-Ref
determines if the keycode specified is a modifier key or not

returns: {boolean}
param: {string} key

_getReverseMap()   X-Ref
reverses the map lookup so that we can look for specific keys
to see what can and can't use keypress

return: {Object}

_pickBestAction(key, modifiers, action)   X-Ref
picks the best action based on the key combination

param: {string} key - character for key
param: {Array} modifiers
param: {string=} action passed in

_keysFromString(combination)   X-Ref
Converts from a string key combination to an array

param: {string} combination like "command+shift+l"
return: {Array}

_getKeyInfo(combination, action)   X-Ref
Gets info for a specific key combination

returns: {Object}
param: {string} combination key combination ("command+s" or "a" or "*")
param: {string=} action

_belongsTo(element, ancestor)   X-Ref
No description

Mousetrap(targetElement)   X-Ref
No description

_resetSequences(doNotReset)   X-Ref
resets all sequence counters except for the ones passed in

returns: void
param: {Object} doNotReset

_getMatches(character, modifiers, e, sequenceName, combination, level)   X-Ref
finds all callbacks that match based on the keycode, modifiers,
and action

returns: {Array}
param: {string} character
param: {Array} modifiers
param: {Event|Object} e
param: {string=} sequenceName - name of the sequence we are looking for
param: {string=} combination
param: {number=} level

_fireCallback(callback, e, combo, sequence)   X-Ref
actually calls the callback function

if your callback function returns false this will use the jquery
convention - prevent default and stop propogation on the event

returns: void
param: {Function} callback
param: {Event} e

_handleKeyEvent(e)   X-Ref
handles a keydown event

returns: void
param: {Event} e

_resetSequenceTimer()   X-Ref
called to set a 1 second timeout on the specified sequence

this is so after each key press in the sequence you have 1 second
to press the next key before you have to start over

returns: void

_bindSequence(combo, keys, callback, action)   X-Ref
binds a key sequence to an event

returns: void
param: {string} combo - combo specified in bind call
param: {Array} keys
param: {Function} callback
param: {string=} action

_increaseSequence(nextAction)   X-Ref
callback to increase the sequence level for this sequence and reset
all other sequences that were active

returns: {Function}
param: {string} nextAction

_callbackAndReset(e)   X-Ref
wraps the specified callback inside of another function in order
to reset all sequence counters as soon as this sequence is done

returns: void
param: {Event} e

_bindSingle(combination, callback, action, sequenceName, level)   X-Ref
binds a single keyboard combination

returns: void
param: {string} combination
param: {Function} callback
param: {string=} action
param: {string=} sequenceName - name of sequence if part of sequence
param: {number=} level - what part of the sequence the command is

_unsupportedIterableToArray(o, minLen)   X-Ref
No description

_iterableToArray(iter)   X-Ref
No description

_arrayWithHoles(arr)   X-Ref
No description

_nonIterableRest()   X-Ref
No description

_typeof(obj)   X-Ref
No description

createHigherOrderComponent(mapComponentToEnhancedComponent, modifierName)   X-Ref
Given a function mapping a component to an enhanced component and modifier
name, returns the enhanced component augmented with a generated displayName.

param: {Function} mapComponentToEnhancedComponent Function mapping component
param: {string}   modifierName                    Seed name from which to
return: {WPComponent} Component class with generated display name assigned.

_createSuper(Derived)   X-Ref
No description

_isNativeReflectConstruct()   X-Ref
No description

_class()   X-Ref
No description

_class2()   X-Ref
No description

Listener()   X-Ref
Class responsible for orchestrating event handling on the global window,
binding a single event to be shared across all handling instances, and
removing the handler when no instances are listening for the event.


with_global_events_createSuper(Derived)   X-Ref
No description

with_global_events_isNativeReflectConstruct()   X-Ref
No description

withGlobalEvents(eventTypesToHandlers)   X-Ref
Higher-order component creator which, given an object of DOM event types and
values corresponding to a callback function name on the component, will
create or update a window event handler to invoke the callback when an event
occurs. On behalf of the consuming developer, the higher-order component
manages unbinding when the component unmounts, and binding at most a single
event handler for the entire application.

param: {Object<string,string>} eventTypesToHandlers Object with keys of DOM
return: {Function} Higher-order component.

Wrapper()   X-Ref
No description

createId(object)   X-Ref
Creates a new id for a given object.

param: {Object} object Object reference to create an id for.

useInstanceId(object, prefix)   X-Ref
Provides a unique instance ID.

param: {Object} object Object reference to create an id for.
param: {string} prefix Prefix for the unique id.

with_safe_timeout_createSuper(Derived)   X-Ref
No description

with_safe_timeout_isNativeReflectConstruct()   X-Ref
No description

WrappedComponent()   X-Ref
No description

setTimeout(_x, _x2)   X-Ref
No description

clearTimeout(_x3)   X-Ref
No description

with_state_createSuper(Derived)   X-Ref
No description

with_state_isNativeReflectConstruct()   X-Ref
No description

withState()   X-Ref
A Higher Order Component used to provide and manage internal component state
via props.

param: {?Object} initialState Optional initial state of the component.
return: {WPComponent} Wrapped component.

WrappedComponent()   X-Ref
No description

useCopyOnClick(ref, _text)   X-Ref
Copies the text to the clipboard when the element is clicked.

param: {Object}          ref     Reference with the element.
param: {string|Function} text    The text to copy.
param: {number}          timeout Optional timeout to reset the returned
return: {boolean} Whether or not the text has been copied. Resets after the

useDragging(_ref)   X-Ref
WordPress dependencies


isAppleOS()   X-Ref
Return true if platform is MacOS.

param: {Object} _window   window object by default; used for DI testing.
return: {boolean} True if MacOS; false otherwise.

useKeyboardShortcut(shortcuts, callback)   X-Ref
Attach a keyboard shortcut handler.

param: {string[]|string}         shortcuts  Keyboard Shortcuts.
param: {Function}                callback   Shortcut callback.
param: {WPKeyboardShortcutConfig} options    Shortcut options.

useMediaQuery(query)   X-Ref
Runs a media query and returns its value when it changes.

param: {string} [query] Media Query.
return: {boolean} return value of the media query.

usePrevious(value)   X-Ref
Use something's value from the previous render.
Based on https://usehooks.com/usePrevious/.

param: {T} value The value to track.
return: {T|undefined} The value from the previous render.

getFirstItemsPresentInState(list, state)   X-Ref
Returns the first items from list that are present on state.

param: {Array} list  New array.
param: {Array} state Current state.
return: {Array} First items present iin state.

listReducer(state, action)   X-Ref
Reducer keeping track of a list of appended items.

param: {Array}  state  Current state
param: {Object} action Action
return: {Array} update state.

useAsyncList(list)   X-Ref
React hook returns an array which items get asynchronously appended from a source array.
This behavior is useful if we want to render a list of items asynchronously for performance reasons.

param: {Array} list Source array.
return: {Array} Async array.

useWarnOnChange(object)   X-Ref
Hook that performs a shallow comparison between the preview value of an object
and the new one, if there's a difference, it prints it to the console.
this is useful in performance related work, to check why a component re-renders.

param: {Object} object Object which changes to compare.
param: {string} prefix Just a prefix to show when console logging.

useDebounce()   X-Ref
Debounces a function with Lodash's `debounce`. A new debounced function will
be returned and any scheduled calls cancelled if any of the arguments change,
including the function to debounce, so please wrap functions created on
render in components in `useCallback`.

param: {...any} args Arguments passed to Lodash's `debounce`.

_extends()   X-Ref
No description



Generated : Wed Oct 28 08:20:01 2020 Cross-referenced by PHPXref