[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

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

(no description)

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

Defines 103 functions

  __webpack_require__()
  getDefault()
  getModuleExports()
  _defineProperty()
  combineReducers()
  _arrayWithoutHoles()
  _nonIterableSpread()
  _toConsumableArray()
  _extends()
  symbolObservablePonyfill()
  _iterableToArrayLimit()
  _slicedToArray()
  _iterableToArray()
  isPlainObject()
  createStore()
  ensureCanMutateNextListeners()
  getState()
  subscribe()
  dispatch()
  replaceReducer()
  observable()
  observeState()
  warning()
  getUndefinedStateErrorMessage()
  getUnexpectedStateShapeWarningMessage()
  assertReducerShape()
  combineReducers()
  bindActionCreator()
  bindActionCreators()
  _defineProperty()
  ownKeys()
  _objectSpread2()
  compose()
  applyMiddleware()
  isCrushed()
  getIsResolving()
  hasStartedResolution()
  hasFinishedResolution()
  isResolving()
  getCachedResolvers()
  startResolution()
  finishResolution()
  invalidateResolution()
  invalidateResolutionForStore()
  invalidateResolutionForStoreSelector()
  createNamespace()
  createReduxStore()
  mapSelectors()
  mapActions()
  mapResolvers()
  fulfillSelector()
  _fulfillSelector()
  fulfillResolver()
  _fulfillResolver()
  createCoreDataStore()
  createRegistry()
  globalListener()
  select()
  dispatch()
  withPlugins()
  registerGenericStore()
  use()
  createPersistenceInterface()
  getData()
  setData()
  createPersistOnChange()
  useRegistry()
  useAsyncMode()
  useSelect()
  createRegistrySelector()
  createRegistryControl()
  _arrayWithHoles()
  _nonIterableRest()
  asyncGeneratorStep()
  _asyncToGenerator()
  _next()
  _throw()
  wrap()
  tryCatch()
  Generator()
  GeneratorFunction()
  GeneratorFunctionPrototype()
  defineIteratorMethods()
  AsyncIterator()
  invoke()
  enqueue()
  callInvokeWithMethodAndArg()
  makeInvokeMethod()
  maybeInvokeDelegate()
  pushTryEntry()
  resetTryEntry()
  Context()
  values()
  doneResult()
  handle()
  _objectSpread()
  _typeof()
  _classCallCheck()
  _defineProperties()
  _createClass()
  getValuePair()
  EquivalentKeyMap()
  isPromise()

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

_defineProperty(obj, key, value)   X-Ref
No description

combineReducers( reducers )   X-Ref
No description

_arrayWithoutHoles(arr)   X-Ref
No description

_nonIterableSpread()   X-Ref
No description

_toConsumableArray(arr)   X-Ref
No description

_extends()   X-Ref
No description

symbolObservablePonyfill(root)   X-Ref
No description

_iterableToArrayLimit(arr, i)   X-Ref
No description

_slicedToArray(arr, i)   X-Ref
No description

_iterableToArray(iter)   X-Ref
No description

isPlainObject(obj)   X-Ref

param: {any} obj The object to inspect.
returns: {boolean} True if the argument appears to be a plain object.

createStore(reducer, preloadedState, enhancer)   X-Ref
Creates a Redux store that holds the state tree.
The only way to change the data in the store is to call `dispatch()` on it.

There should only be a single store in your app. To specify how different
parts of the state tree respond to actions, you may combine several reducers
into a single reducer function by using `combineReducers`.

param: {Function} reducer A function that returns the next state tree, given
param: {any} [preloadedState] The initial state. You may optionally specify it
param: {Function} [enhancer] The store enhancer. You may optionally specify it
returns: {Store} A Redux store that lets you read the state, dispatch actions

ensureCanMutateNextListeners()   X-Ref
This makes a shallow copy of currentListeners so we can use
nextListeners as a temporary list while dispatching.

This prevents any bugs around consumers calling
subscribe/unsubscribe in the middle of a dispatch.

getState()   X-Ref
Reads the state tree managed by the store.

returns: {any} The current state tree of your application.

subscribe(listener)   X-Ref
Adds a change listener. It will be called any time an action is dispatched,
and some part of the state tree may potentially have changed. You may then
call `getState()` to read the current state tree inside the callback.

You may call `dispatch()` from a change listener, with the following
caveats:

1. The subscriptions are snapshotted just before every `dispatch()` call.
If you subscribe or unsubscribe while the listeners are being invoked, this
will not have any effect on the `dispatch()` that is currently in progress.
However, the next `dispatch()` call, whether nested or not, will use a more
recent snapshot of the subscription list.

2. The listener should not expect to see all state changes, as the state
might have been updated multiple times during a nested `dispatch()` before
the listener is called. It is, however, guaranteed that all subscribers
registered before the `dispatch()` started will be called with the latest
state by the time it exits.

param: {Function} listener A callback to be invoked on every dispatch.
returns: {Function} A function to remove this change listener.

dispatch(action)   X-Ref
Dispatches an action. It is the only way to trigger a state change.

The `reducer` function, used to create the store, will be called with the
current state tree and the given `action`. Its return value will
be considered the **next** state of the tree, and the change listeners
will be notified.

The base implementation only supports plain object actions. If you want to
dispatch a Promise, an Observable, a thunk, or something else, you need to
wrap your store creating function into the corresponding middleware. For
example, see the documentation for the `redux-thunk` package. Even the
middleware will eventually dispatch plain object actions using this method.

param: {Object} action A plain object representing “what changed”. It is
returns: {Object} For convenience, the same action object you dispatched.

replaceReducer(nextReducer)   X-Ref
Replaces the reducer currently used by the store to calculate the state.

You might need this if your app implements code splitting and you want to
load some of the reducers dynamically. You might also need this if you
implement a hot reloading mechanism for Redux.

param: {Function} nextReducer The reducer for the store to use instead.
returns: {void}

observable()   X-Ref
Interoperability point for observable/reactive libraries.

returns: {observable} A minimal observable of state changes.

observeState()   X-Ref
No description

warning(message)   X-Ref
Prints a warning in the console if it exists.

param: {String} message The warning message.
returns: {void}

getUndefinedStateErrorMessage(key, action)   X-Ref
No description

getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache)   X-Ref
No description

assertReducerShape(reducers)   X-Ref
No description

combineReducers(reducers)   X-Ref
Turns an object whose values are different reducer functions, into a single
reducer function. It will call every child reducer, and gather their results
into a single state object, whose keys correspond to the keys of the passed
reducer functions.

param: {Object} reducers An object whose values correspond to different
returns: {Function} A reducer function that invokes every reducer inside the

bindActionCreator(actionCreator, dispatch)   X-Ref
No description

bindActionCreators(actionCreators, dispatch)   X-Ref
Turns an object whose values are action creators, into an object with the
same keys, but with every function wrapped into a `dispatch` call so they
may be invoked directly. This is just a convenience method, as you can call
`store.dispatch(MyActionCreators.doSomething())` yourself just fine.

For convenience, you can also pass an action creator as the first argument,
and get a dispatch wrapped function in return.

param: {Function|Object} actionCreators An object whose values are action
param: {Function} dispatch The `dispatch` function available on your Redux
returns: {Function|Object} The object mimicking the original object, but with

_defineProperty(obj, key, value)   X-Ref
No description

ownKeys(object, enumerableOnly)   X-Ref
No description

_objectSpread2(target)   X-Ref
No description

compose()   X-Ref
Composes single-argument functions from right to left. The rightmost
function can take multiple arguments as it provides the signature for
the resulting composite function.

param: {...Function} funcs The functions to compose.
returns: {Function} A function obtained by composing the argument functions

applyMiddleware()   X-Ref
Creates a store enhancer that applies middleware to the dispatch method
of the Redux store. This is handy for a variety of tasks, such as expressing
asynchronous actions in a concise manner, or logging every action payload.

See `redux-thunk` package as an example of the Redux middleware.

Because middleware is potentially asynchronous, this should be the first
store enhancer in the composition chain.

Note that each middleware will be given the `dispatch` and `getState` functions
as named arguments.

param: {...Function} middlewares The middleware chain to be applied.
returns: {Function} A store enhancer applying the middleware.

isCrushed()   X-Ref
No description

getIsResolving(state, selectorName, args)   X-Ref
Returns the raw `isResolving` value for a given selector name,
and arguments set. May be undefined if the selector has never been resolved
or not resolved for the given set of arguments, otherwise true or false for
resolution started and completed respectively.

param: {Object} state        Data state.
param: {string} selectorName Selector name.
param: {Array}  args         Arguments passed to selector.
return: {?boolean} isResolving value.

hasStartedResolution(state, selectorName)   X-Ref
Returns true if resolution has already been triggered for a given
selector name, and arguments set.

param: {Object} state        Data state.
param: {string} selectorName Selector name.
param: {?Array} args         Arguments passed to selector (default `[]`).
return: {boolean} Whether resolution has been triggered.

hasFinishedResolution(state, selectorName)   X-Ref
Returns true if resolution has completed for a given selector
name, and arguments set.

param: {Object} state        Data state.
param: {string} selectorName Selector name.
param: {?Array} args         Arguments passed to selector.
return: {boolean} Whether resolution has completed.

isResolving(state, selectorName)   X-Ref
Returns true if resolution has been triggered but has not yet completed for
a given selector name, and arguments set.

param: {Object} state        Data state.
param: {string} selectorName Selector name.
param: {?Array} args         Arguments passed to selector.
return: {boolean} Whether resolution is in progress.

getCachedResolvers(state)   X-Ref
Returns the list of the cached resolvers.

param: {Object} state      Data state.
return: {Object} Resolvers mapped by args and selectorName.

startResolution(selectorName, args)   X-Ref
Returns an action object used in signalling that selector resolution has
started.

param: {string} selectorName Name of selector for which resolver triggered.
param: {...*}   args         Arguments to associate for uniqueness.
return: {Object} Action object.

finishResolution(selectorName, args)   X-Ref
Returns an action object used in signalling that selector resolution has
completed.

param: {string} selectorName Name of selector for which resolver triggered.
param: {...*}   args         Arguments to associate for uniqueness.
return: {Object} Action object.

invalidateResolution(selectorName, args)   X-Ref
Returns an action object used in signalling that we should invalidate the resolution cache.

param: {string} selectorName Name of selector for which resolver should be invalidated.
param: {Array}  args         Arguments to associate for uniqueness.
return: {Object} Action object.

invalidateResolutionForStore()   X-Ref
Returns an action object used in signalling that the resolution
should be invalidated.

return: {Object} Action object.

invalidateResolutionForStoreSelector(selectorName)   X-Ref
Returns an action object used in signalling that the resolution cache for a
given selectorName should be invalidated.

param: {string} selectorName Name of selector for which all resolvers should
return: {Object} Action object.

createNamespace(key, options, registry)   X-Ref
Creates a namespace object with a store derived from the reducer given.

param: {string}         key      Unique namespace identifier.
param: {Object}         options  Registered store options, with properties
param: {WPDataRegistry} registry Registry reference.
return: {Object} Store Object.

createReduxStore(key, options, registry)   X-Ref
Creates a redux store for a namespace.

param: {string}         key      Unique namespace identifier.
param: {Object}         options  Registered store options, with properties
param: {WPDataRegistry} registry Registry reference.
return: {Object} Newly created redux store.

mapSelectors(selectors, store)   X-Ref
Maps selectors to a store.

param: {Object} selectors Selectors to register. Keys will be used as the
param: {Object} store     The store to which the selectors should be mapped.
return: {Object} Selectors mapped to the provided store.

mapActions(actions, store)   X-Ref
Maps actions to dispatch from a given store.

param: {Object} actions    Actions to register.
param: {Object} store      The redux store to which the actions should be mapped.
return: {Object}           Actions mapped to the redux store provided.

mapResolvers(resolvers, selectors, store)   X-Ref
Returns resolvers with matched selectors for a given namespace.
Resolvers are side effects invoked once per argument set of a given selector call,
used in ensuring that the data needs for the selector are satisfied.

param: {Object} resolvers   Resolvers to register.
param: {Object} selectors   The current selectors to be modified.
param: {Object} store       The redux store to which the resolvers should be mapped.
return: {Object}            An object containing updated selectors and resolvers.

fulfillSelector()   X-Ref
No description

_fulfillSelector()   X-Ref
No description

fulfillResolver(_x, _x2, _x3)   X-Ref
Calls a resolver given arguments

param: {Object} store        Store reference, for fulfilling via resolvers
param: {Object} resolvers    Store Resolvers
param: {string} selectorName Selector name to fulfill.
param: {Array} args          Selector Arguments.

_fulfillResolver()   X-Ref
No description

createCoreDataStore(registry)   X-Ref
No description

createRegistry()   X-Ref
Creates a new store registry, given an optional object of initial store
configurations.

param: {Object}  storeConfigs Initial store configurations.
param: {Object?} parent       Parent registry.
return: {WPDataRegistry} Data registry.

globalListener()   X-Ref
Global listener called for each store's update.


select(reducerKey)   X-Ref
Calls a selector given the current state and extra arguments.

param: {string} reducerKey Part of the state shape to register the
return: {*} The selector's returned value.

dispatch(reducerKey)   X-Ref
Returns the available actions for a part of the state.

param: {string} reducerKey Part of the state shape to dispatch the
return: {*} The action's returned value.

withPlugins(attributes)   X-Ref
No description

registerGenericStore(key, config)   X-Ref
Registers a generic store.

param: {string} key    Store registry key.
param: {Object} config Configuration (getSelectors, getActions, subscribe).

use(plugin, options)   X-Ref
No description

createPersistenceInterface(options)   X-Ref
Creates a persistence interface, exposing getter and setter methods (`get`
and `set` respectively).

param: {WPDataPersistencePluginOptions} options Plugin options.
return: {Object} Persistence interface.

getData()   X-Ref
Returns the persisted data as an object, defaulting to an empty object.

return: {Object} Persisted data.

setData(key, value)   X-Ref
Merges an updated reducer state into the persisted data.

param: {string} key   Key to update.
param: {*}      value Updated value.

createPersistOnChange(getState, reducerKey, keys)   X-Ref
Creates an enhanced store dispatch function, triggering the state of the
given reducer key to be persisted when changed.

param: {Function}       getState   Function which returns current state.
param: {string}         reducerKey Reducer key.
param: {?Array<string>} keys       Optional subset of keys to save.
return: {Function} Enhanced dispatch function.

useRegistry()   X-Ref
A custom react hook exposing the registry context for use.

This exposes the `registry` value provided via the
<a href="#RegistryProvider">Registry Provider</a> to a component implementing
this hook.

It acts similarly to the `useContext` react hook.

Note: Generally speaking, `useRegistry` is a low level hook that in most cases
won't be needed for implementation. Most interactions with the wp.data api
can be performed via the `useSelect` hook,  or the `withSelect` and
`withDispatch` higher order components.

return: {Function}  A custom react hook exposing the registry context value.

useAsyncMode()   X-Ref
Internal dependencies


useSelect(_mapSelect, deps)   X-Ref
Custom react hook for retrieving props from registered selectors.

In general, this custom React hook follows the
[rules of hooks](https://reactjs.org/docs/hooks-rules.html).

param: {Function} _mapSelect  Function called on every state change. The
param: {Array}    deps        If provided, this memoizes the mapSelect so the
return: {Function}  A custom react hook.

createRegistrySelector(registrySelector)   X-Ref
Mark a selector as a registry selector.

param: {Function} registrySelector Function receiving a registry object and returning a state selector.
return: {Function} marked registry selector.

createRegistryControl(registryControl)   X-Ref
Mark a control as a registry control.

param: {Function} registryControl Function receiving a registry object and returning a control.
return: {Function} marked registry control.

_arrayWithHoles(arr)   X-Ref
No description

_nonIterableRest()   X-Ref
No description

asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg)   X-Ref
No description

_asyncToGenerator(fn)   X-Ref
No description

_next(value)   X-Ref
No description

_throw(err)   X-Ref
No description

wrap(innerFn, outerFn, self, tryLocsList)   X-Ref
No description

tryCatch(fn, obj, arg)   X-Ref
No description

Generator()   X-Ref
No description

GeneratorFunction()   X-Ref
No description

GeneratorFunctionPrototype()   X-Ref
No description

defineIteratorMethods(prototype)   X-Ref
No description

AsyncIterator(generator)   X-Ref
No description

invoke(method, arg, resolve, reject)   X-Ref
No description

enqueue(method, arg)   X-Ref
No description

callInvokeWithMethodAndArg()   X-Ref
No description

makeInvokeMethod(innerFn, self, context)   X-Ref
No description

maybeInvokeDelegate(delegate, context)   X-Ref
No description

pushTryEntry(locs)   X-Ref
No description

resetTryEntry(entry)   X-Ref
No description

Context(tryLocsList)   X-Ref
No description

values(iterable)   X-Ref
No description

doneResult()   X-Ref
No description

handle(loc, caught)   X-Ref
No description

_objectSpread(target)   X-Ref
No description

_typeof(obj)   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

getValuePair(instance, key)   X-Ref
Given an instance of EquivalentKeyMap, returns its internal value pair tuple
for a key, if one exists. The tuple members consist of the last reference
value for the key (used in efficient subsequent lookups) and the value
assigned for the key at the leaf node.

param: {EquivalentKeyMap} instance EquivalentKeyMap instance.
param: {*} key                     The key for which to return value pair.
return: {?Array} Value pair, if exists.

EquivalentKeyMap(iterable)   X-Ref
No description

isPromise(obj)   X-Ref
No description



Generated: Sat Nov 23 20:47:33 2019 Cross-referenced by PHPXref 0.7