[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/js/dist/ -> core-data.js (summary)

(no description)

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

Defines 88 functions

  __webpack_require__()
  getDefault()
  getModuleExports()
  _arrayWithHoles()
  _arrayWithoutHoles()
  _defineProperty()
  _iterableToArray()
  _iterableToArrayLimit()
  _nonIterableRest()
  _nonIterableSpread()
  _objectSpread()
  _slicedToArray()
  _toConsumableArray()
  receiveUserQuery()
  addEntities()
  receiveEntityRecords()
  receiveThemeSupportsFromIndex()
  receiveEmbedPreview()
  apiFetch()
  select()
  loadPostTypeEntities()
  loadTaxonomyEntities()
  getKindEntities()
  receiveItems()
  receiveQueriedItems()
  getQueryParts()
  getMergedItemIds()
  items()
  getQueriedItemsUncached()
  terms()
  users()
  taxonomies()
  themeSupports()
  entity()
  entitiesConfig()
  embedPreviews()
  getAuthors()
  getEntityRecord()
  getEntityRecords()
  getThemeSupports()
  getEmbedPreview()
  isResolving()
  isRequestingEmbedPreview()
  getAuthors()
  getEntitiesByKind()
  getEntity()
  getEntityRecord()
  getEntityRecords()
  getThemeSupports()
  getEmbedPreview()
  isPreviewEmbedFallback()
  withWeakMapCache()
  _typeof()
  _classCallCheck()
  _defineProperties()
  _createClass()
  getValuePair()
  EquivalentKeyMap()
  isPlainObject()
  createStore()
  ensureCanMutateNextListeners()
  getState()
  subscribe()
  dispatch()
  replaceReducer()
  observable()
  observeState()
  warning()
  getUndefinedStateErrorMessage()
  getUnexpectedStateShapeWarningMessage()
  assertReducerShape()
  combineReducers()
  bindActionCreator()
  bindActionCreators()
  _defineProperty()
  _objectSpread()
  compose()
  applyMiddleware()
  isCrushed()
  symbolObservablePonyfill()
  arrayOf()
  isObjectLike()
  createCache()
  isShallowEqual()
  getRootCache()
  getWeakMapCache()
  clear()
  callSelector()

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

_arrayWithHoles(arr)   X-Ref
No description

_arrayWithoutHoles(arr)   X-Ref
No description

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

_iterableToArray(iter)   X-Ref
No description

_iterableToArrayLimit(arr, i)   X-Ref
No description

_nonIterableRest()   X-Ref
No description

_nonIterableSpread()   X-Ref
No description

_objectSpread(target)   X-Ref
No description

_slicedToArray(arr, i)   X-Ref
No description

_toConsumableArray(arr)   X-Ref
No description

receiveUserQuery(queryID, users)   X-Ref
Returns an action object used in signalling that authors have been received.

return: {Object} Action object.
param: {string}       queryID Query ID.
param: {Array|Object} users   Users received.

addEntities(entities)   X-Ref
Returns an action object used in adding new entities.

return: {Object} Action object.
param: {Array} entities  Entities received.

receiveEntityRecords(kind, name, records, query)   X-Ref
Returns an action object used in signalling that entity records have been received.

return: {Object} Action object.
param: {string}       kind    Kind of the received entity.
param: {string}       name    Name of the received entity.
param: {Array|Object} records Records received.
param: {?Object}      query  Query Object.

receiveThemeSupportsFromIndex(index)   X-Ref
Returns an action object used in signalling that the index has been received.

return: {Object} Action object.
param: {Object} index Index received.

receiveEmbedPreview(url, preview)   X-Ref
Returns an action object used in signalling that the preview data for
a given URl has been received.

return: {Object} Action object.
param: {string}  url      URL to preview the embed for.
param: {Mixed}   preview  Preview data.

apiFetch(request)   X-Ref
Trigger an API Fetch request.

return: {Object} control descriptor.
param: {Object} request API Fetch Request Object.

select(selectorName)   X-Ref
Calls a selector using the current state.

return: {Object} control descriptor.
param: {string} selectorName Selector name.
param: {Array} args         Selector arguments.

loadPostTypeEntities()   X-Ref
Returns the list of post type entities.

return: {Promise} Entities promise

loadTaxonomyEntities()   X-Ref
Returns the list of the taxonomies entities.

return: {Promise} Entities promise

getKindEntities(kind)   X-Ref
Loads the kind entities into the store.

return: {Array} Entities
param: {string} kind  Kind

receiveItems(items)   X-Ref
Returns an action object used in signalling that items have been received.

return: {Object} Action object.
param: {Array} items Items received.

receiveQueriedItems(items)   X-Ref
Returns an action object used in signalling that queried data has been
received.

return: {Object} Action object.
param: {Array}   items Queried items received.
param: {?Object} query Optional query object.

getQueryParts(query)   X-Ref
Given a query object, returns an object of parts, including pagination
details (`page` and `perPage`, or default values). All other properties are
encoded into a stable (idempotent) `stableKey` value.

return: {WPQueriedDataQueryParts} Query parts.
param: {Object} query Optional query object.

getMergedItemIds(itemIds, nextItemIds, page, perPage)   X-Ref
Returns a merged array of item IDs, given details of the received paginated
items. The array is sparse-like with `undefined` entries where holes exist.

return: {number[]} Merged array of item IDs.
param: {?Array<number>} itemIds     Original item IDs (default empty array).
param: {number[]}       nextItemIds Item IDs to merge.
param: {number}         page        Page of items merged.
param: {number}         perPage     Number of items per page.

items()   X-Ref
Reducer tracking items state, keyed by ID. Items are assumed to be normal,
where identifiers are common across all queries.

return: {Object} Next state.
param: {Object} state  Current state.
param: {Object} action Dispatched action.

getQueriedItemsUncached(state, query)   X-Ref
Returns items for a given query, or null if the items are not known.

return: {?Array} Query items.
param: {Object}  state State object.
param: {?Object} query Optional query.

terms()   X-Ref
Reducer managing terms state. Keyed by taxonomy slug, the value is either
undefined (if no request has been made for given taxonomy), null (if a
request is in-flight for given taxonomy), or the array of terms for the
taxonomy.

return: {Object} Updated state.
param: {Object} state  Current state.
param: {Object} action Dispatched action.

users()   X-Ref
Reducer managing authors state. Keyed by id.

return: {Object} Updated state.
param: {Object} state  Current state.
param: {Object} action Dispatched action.

taxonomies()   X-Ref
Reducer managing taxonomies.

return: {Object} Updated state.
param: {Object} state  Current state.
param: {Object} action Dispatched action.

themeSupports()   X-Ref
Reducer managing theme supports data.

return: {Object} Updated state.
param: {Object} state  Current state.
param: {Object} action Dispatched action.

entity(entityConfig)   X-Ref
Higher Order Reducer for a given entity config. It supports:

- Fetching a record by primary key

return: {Function} Reducer.
param: {Object} entityConfig  Entity config.

entitiesConfig()   X-Ref
Reducer keeping track of the registered entities.

return: {Object} Updated state.
param: {Object} state  Current state.
param: {Object} action Dispatched action.

embedPreviews()   X-Ref
Reducer managing embed preview data.

return: {Object} Updated state.
param: {Object} state  Current state.
param: {Object} action Dispatched action.

getAuthors()   X-Ref
Requests authors from the REST API.


getEntityRecord(kind, name, key)   X-Ref
Requests an entity's record from the REST API.

param: {string} kind   Entity kind.
param: {string} name   Entity name.
param: {number} key    Record's key

getEntityRecords(kind, name)   X-Ref
Requests the entity's records from the REST API.

param: {string}  kind   Entity kind.
param: {string}  name   Entity name.
param: {Object?} query  Query Object.

getThemeSupports()   X-Ref
Requests theme supports data from the index.


getEmbedPreview(url)   X-Ref
Requests a preview from the from the Embed API.

param: {string} url   URL to get the preview for.

isResolving(selectorName)   X-Ref
Returns true if resolution is in progress for the core selector of the given
name and arguments.

return: {boolean} Whether resolution is in progress.
param: {string} selectorName Core data selector name.
param: {...*}   args         Arguments passed to selector.

isRequestingEmbedPreview(state, url)   X-Ref
Returns true if a request is in progress for embed preview data, or false
otherwise.

return: {boolean} Whether a request is in progress for an embed preview.
param: {Object} state Data state.
param: {string} url   URL the preview would be for.

getAuthors(state)   X-Ref
Returns all available authors.

return: {Array} Authors list.
param: {Object} state Data state.

getEntitiesByKind(state, kind)   X-Ref
Returns whether the entities for the give kind are loaded.

return: {boolean} Whether the entities are loaded
param: {Object} state   Data state.
param: {string} kind  Entity kind.

getEntity(state, kind, name)   X-Ref
Returns the entity object given its kind and name.

return: {Object} Entity
param: {Object} state   Data state.
param: {string} kind  Entity kind.
param: {string} name  Entity name.

getEntityRecord(state, kind, name, key)   X-Ref
Returns the Entity's record object by key.

return: {Object?} Record.
param: {Object} state  State tree
param: {string} kind   Entity kind.
param: {string} name   Entity name.
param: {number} key    Record's key

getEntityRecords(state, kind, name, query)   X-Ref
Returns the Entity's records.

return: {Array} Records.
param: {Object}  state  State tree
param: {string}  kind   Entity kind.
param: {string}  name   Entity name.
param: {?Object} query  Optional terms query.

getThemeSupports(state)   X-Ref
Return theme supports data in the index.

return: {*}           Index data.
param: {Object} state Data state.

getEmbedPreview(state, url)   X-Ref
Returns the embed preview for the given URL.

return: {*} Undefined if the preview has not been fetched, otherwise, the preview fetched from the embed preview API.
param: {Object} state    Data state.
param: {string} url      Embedded URL.

isPreviewEmbedFallback(state, url)   X-Ref
Determines if the returned preview is an oEmbed link fallback.

WordPress can be configured to return a simple link to a URL if it is not embeddable.
We need to be able to determine if a URL is embeddable or not, based on what we
get back from the oEmbed preview API.

return: {booleans} Is the preview for the URL an oEmbed link fallback.
param: {Object} state    Data state.
param: {string} url      Embedded URL.

withWeakMapCache(fn)   X-Ref
Given a function, returns an enhanced function which caches the result and
tracks in WeakMap. The result is only cached if the original function is
passed a valid object-like argument (requirement for WeakMap key).

return: {Function} Enhanced caching function.
param: {Function} fn Original function.

_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.

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

EquivalentKeyMap(iterable)   X-Ref
No description

isPlainObject(obj)   X-Ref

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

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`.

returns: {Store} A Redux store that lets you read the state, dispatch actions
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

ensureCanMutateNextListeners()   X-Ref
No description

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.

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

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.

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

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.

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

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.

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

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.

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

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 a single function as the first argument,
and get a function in return.

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

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

_objectSpread(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.

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

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.

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

isCrushed()   X-Ref
No description

symbolObservablePonyfill(root)   X-Ref
No description

arrayOf( value )   X-Ref
Returns the first argument as the sole entry in an array.

return: {Array} Value returned as entry in array.
param: {*} value Value to return.

isObjectLike( value )   X-Ref
Returns true if the value passed is object-like, or false otherwise. A value
is object-like if it can support property assignment, e.g. object or array.

return: {boolean} Whether value is object-like.
param: {*} value Value to test.

createCache()   X-Ref
Creates and returns a new cache object.

return: {Object} Cache object.

isShallowEqual( a, b, fromIndex )   X-Ref
Returns true if entries within the two arrays are strictly equal by
reference from a starting index.

return: {boolean} Whether arrays are shallowly equal.
param: {Array}  a         First array.
param: {Array}  b         Second array.
param: {number} fromIndex Index from which to start comparison.

getRootCache()   X-Ref
Returns the root cache. If WeakMap is supported, this is assigned to the
root WeakMap cache set, otherwise it is a shared instance of the default
cache object.

return: {(WeakMap|Object)} Root cache object.

getWeakMapCache( dependants )   X-Ref
Returns the cache for a given dependants array. When possible, a WeakMap
will be used to create a unique cache for each set of dependants. This
is feasible due to the nature of WeakMap in allowing garbage collection
to occur on entries where the key object is no longer referenced. Since
WeakMap requires the key to be an object, this is only possible when the
dependant is object-like. The root cache is created as a hierarchy where
each top-level key is the first entry in a dependants set, the value a
WeakMap where each key is the next dependant, and so on. This continues
so long as the dependants are object-like. If no dependants are object-
like, then the cache is shared across all invocations.

return: {Object} Cache object.
param: {Array} dependants Selector dependants.

clear()   X-Ref
Resets root memoization cache.


callSelector( )   X-Ref
The augmented selector call, considering first whether dependants have
changed before passing it to underlying memoize function.

return: {*} Selector result.
param: {Object} source    Source object for derivation.
param: {...*}   extraArgs Additional arguments to pass to selector.



Generated: Mon Jan 7 01:00:05 2019 Cross-referenced by PHPXref 0.7.1