[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

WordPress dependencies

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

Defines 1 class

ObservableSet:: (136 methods):
  receiveUserQuery()
  receiveCurrentUser()
  addEntities()
  receiveEntityRecords()
  receiveCurrentTheme()
  __experimentalReceiveCurrentGlobalStylesId()
  __experimentalReceiveThemeBaseGlobalStyles()
  __experimentalReceiveThemeGlobalStyleVariations()
  receiveThemeSupports()
  receiveThemeGlobalStyleRevisions()
  receiveEmbedPreview()
  receiveUploadPermissions()
  receiveUserPermission()
  receiveUserPermissions()
  receiveAutosaves()
  receiveNavigationFallbackId()
  receiveDefaultTemplateId()
  makeBlockAttributesSerializable()
  makeBlocksSerializable()
  registerSyncConfigs()
  getNormalizedCommaSeparable()
  withWeakMapCache()
  getQueryParts()
  getContextFromAction()
  getMergedItemIds()
  removeEntitiesById()
  items()
  itemIsComplete()
  terms()
  users()
  currentUser()
  taxonomies()
  currentTheme()
  currentGlobalStylesId()
  themeBaseGlobalStyles()
  themeGlobalStyleVariations()
  entity()
  entitiesConfig()
  undoManager()
  editsReference()
  embedPreviews()
  userPermissions()
  autosaves()
  blockPatterns()
  blockPatternCategories()
  userPatternCategories()
  navigationFallbackId()
  themeGlobalStyleRevisions()
  defaultTemplates()
  registeredPostMeta()
  getQueriedItemsUncached()
  getQueriedTotalItems()
  getQueriedTotalPages()
  isNumericID()
  isRawAttribute()
  getUserPermissionsFromAllowHeader()
  getUserPermissionCacheKey()
  getAuthors()
  getCurrentUser()
  getEntitiesByKind()
  getEntity()
  getEntityConfig()
  __experimentalGetEntityRecordNoResolver()
  hasEntityRecords()
  getEntityRecordEdits()
  hasEditsForEntityRecord()
  isAutosavingEntityRecord()
  isSavingEntityRecord()
  isDeletingEntityRecord()
  getLastEntitySaveError()
  getLastEntityDeleteError()
  getUndoEdit()
  getRedoEdit()
  hasUndo()
  hasRedo()
  getCurrentTheme()
  __experimentalGetCurrentGlobalStylesId()
  getThemeSupports()
  getEmbedPreview()
  isPreviewEmbedFallback()
  canUser()
  canUserEditEntityRecord()
  getAutosaves()
  getAutosave()
  getReferenceByDistinctEdits()
  __experimentalGetTemplateForLink()
  __experimentalGetCurrentThemeBaseGlobalStyles()
  __experimentalGetCurrentThemeGlobalStylesVariations()
  getBlockPatterns()
  getBlockPatternCategories()
  getUserPatternCategories()
  getCurrentThemeGlobalStylesRevisions()
  getDefaultTemplateId()
  getUndoManager()
  getNavigationFallbackId()
  getEntityRecordPermissions()
  getRegisteredPostMeta()
  receiveRegisteredPostMeta()
  camelCaseTransform()
  camelCaseTransformMerge()
  camelCase()
  sortResults()
  tokenize()
  deepCopyLocksTreePath()
  getNode()
  hasConflictingLock()
  locks()
  getPendingLockRequests()
  isLockAvailable()
  createLocks()
  processPendingLockRequests()
  acquire()
  release()
  createLocksActions()
  __unstableAcquireStoreLock()
  __unstableReleaseStoreLock()
  EntityProvider()
  memize()
  memoized()
  useQuerySelect()
  useEntityRecord()
  __experimentalUseEntityRecord()
  useEntityRecords()
  __experimentalUseEntityRecords()
  useEntityRecordsWithPermissions()
  useResourcePermissions()
  __experimentalUseResourcePermissions()
  useEntityId()
  getRichTextValuesCached()
  getBlockFootnotesOrder()
  getFootnotesOrder()
  updateFootnotesFromMeta()
  updateAttributes()
  updateBlocksAttributes()
  useEntityBlockEditor()
  useEntityProp()

Defines 136 functions

  mergeHistoryChanges()
  createUndoManager()
  _typeof()
  _classCallCheck()
  _defineProperties()
  _createClass()
  getValuePair()
  EquivalentKeyMap()
  __webpack_require__()
  conservativeMapItem()
  __extends()
  __()
  __rest()
  __decorate()
  __param()
  __esDecorate()
  accept()
  __runInitializers()
  __propKey()
  __setFunctionName()
  __metadata()
  __awaiter()
  adopt()
  fulfilled()
  rejected()
  step()
  __generator()
  verb()
  step()
  __exportStar()
  __values()
  __read()
  __spread()
  __spreadArrays()
  __spreadArray()
  __await()
  __asyncGenerator()
  awaitReturn()
  verb()
  resume()
  step()
  fulfill()
  reject()
  settle()
  __asyncDelegator()
  verb()
  __asyncValues()
  verb()
  settle()
  __makeTemplateObject()
  __importStar()
  __importDefault()
  __classPrivateFieldGet()
  __classPrivateFieldSet()
  __classPrivateFieldIn()
  __addDisposableResource()
  __disposeResources()
  fail()
  next()
  localeLowerCase()
  lowerCase()
  noCase()
  replace()
  upperCaseFirst()
  capitalCaseTransform()
  capitalCase()
  pascalCaseTransform()
  dist_es2015_pascalCaseTransformMerge()
  pascalCase()
  rng()
  unsafeStringify()
  stringify()
  v4()
  setNestedValue()
  getNestedValue()
  receiveItems()
  removeItems()
  receiveQueriedItems()
  chunk()
  createBatch()

Class: ObservableSet  - X-Ref

receiveUserQuery(queryID, users)   X-Ref
Returns an action object used in signalling that authors have been received.
Ignored from documentation as it's internal to the data store.

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

receiveCurrentUser(currentUser)   X-Ref
Returns an action used in signalling that the current user has been received.
Ignored from documentation as it's internal to the data store.

param: {Object} currentUser Current user object.
return: {Object} Action object.

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

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

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

param: {string}       kind            Kind of the received entity record.
param: {string}       name            Name of the received entity record.
param: {Array|Object} records         Records received.
param: {?Object}      query           Query Object.
param: {?boolean}     invalidateCache Should invalidate query caches.
param: {?Object}      edits           Edits to reset.
param: {?Object}      meta            Meta information about pagination.
return: {Object} Action object.

receiveCurrentTheme(currentTheme)   X-Ref
Returns an action object used in signalling that the current theme has been received.
Ignored from documentation as it's internal to the data store.

param: {Object} currentTheme The current theme.
return: {Object} Action object.

__experimentalReceiveCurrentGlobalStylesId(currentGlobalStylesId)   X-Ref
Returns an action object used in signalling that the current global styles id has been received.
Ignored from documentation as it's internal to the data store.

param: {string} currentGlobalStylesId The current global styles id.
return: {Object} Action object.

__experimentalReceiveThemeBaseGlobalStyles(stylesheet, globalStyles)   X-Ref
Returns an action object used in signalling that the theme base global styles have been received
Ignored from documentation as it's internal to the data store.

param: {string} stylesheet   The theme's identifier
param: {Object} globalStyles The global styles object.
return: {Object} Action object.

__experimentalReceiveThemeGlobalStyleVariations(stylesheet, variations)   X-Ref
Returns an action object used in signalling that the theme global styles variations have been received.
Ignored from documentation as it's internal to the data store.

param: {string} stylesheet The theme's identifier
param: {Array}  variations The global styles variations.
return: {Object} Action object.

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

return: {Object} Action object.

receiveThemeGlobalStyleRevisions(currentId, revisions)   X-Ref
Returns an action object used in signalling that the theme global styles CPT post revisions have been received.
Ignored from documentation as it's internal to the data store.

param: {number} currentId The post id.
param: {Array}  revisions The global styles revisions.
return: {Object} Action object.

receiveEmbedPreview(url, preview)   X-Ref
Returns an action object used in signalling that the preview data for
a given URl has been received.
Ignored from documentation as it's internal to the data store.

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

receiveUploadPermissions(hasUploadPermissions)   X-Ref
Returns an action object used in signalling that Upload permissions have been received.

param: {boolean} hasUploadPermissions Does the user have permission to upload files?
return: {Object} Action object.

receiveUserPermission(key, isAllowed)   X-Ref
Returns an action object used in signalling that the current user has
permission to perform an action on a REST resource.
Ignored from documentation as it's internal to the data store.

param: {string}  key       A key that represents the action and REST resource.
param: {boolean} isAllowed Whether or not the user can perform the action.
return: {Object} Action object.

receiveUserPermissions(permissions)   X-Ref
Returns an action object used in signalling that the current user has
permission to perform an action on a REST resource. Ignored from
documentation as it's internal to the data store.

param: {Object<string, boolean>} permissions An object where keys represent
return: {Object} Action object.

receiveAutosaves(postId, autosaves)   X-Ref
Returns an action object used in signalling that the autosaves for a
post have been received.
Ignored from documentation as it's internal to the data store.

param: {number}       postId    The id of the post that is parent to the autosave.
param: {Array|Object} autosaves An array of autosaves or singular autosave object.
return: {Object} Action object.

receiveNavigationFallbackId(fallbackId)   X-Ref
Returns an action object signalling that the fallback Navigation
Menu id has been received.

param: {integer} fallbackId the id of the fallback Navigation Menu
return: {Object} Action object.

receiveDefaultTemplateId(query, templateId)   X-Ref
Returns an action object used to set the template for a given query.

param: {Object} query      The lookup query.
param: {string} templateId The resolved template id.
return: {Object} Action object.

makeBlockAttributesSerializable(attributes)   X-Ref
No description

makeBlocksSerializable(blocks)   X-Ref
No description

registerSyncConfigs(configs)   X-Ref
No description

getNormalizedCommaSeparable(value)   X-Ref
Given a value which can be specified as one or the other of a comma-separated
string or an array, returns a value normalized to an array of strings, or
null if the value cannot be interpreted as either.

param: {string|string[]|*} value
return: {?(string[])} Normalized field value.

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

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

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.

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

getContextFromAction(action)   X-Ref
No description

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.

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.
return: {number[]} Merged array of item IDs.

removeEntitiesById(entities, ids)   X-Ref
Helper function to filter out entities with certain IDs.
Entities are keyed by their ID.

param: {Object} entities Entity objects, keyed by entity ID.
param: {Array}  ids      Entity IDs to filter out.
return: {Object} Filtered entities.

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

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

itemIsComplete(state = {}, action)   X-Ref
Reducer tracking item completeness, keyed by ID. A complete item is one for
which all fields are known. This is used in supporting `_fields` queries,
where not all properties associated with an entity are necessarily returned.
In such cases, completeness is used as an indication of whether it would be
safe to use queried data for a non-`_fields`-limited request.

param: {Object<string,Object<string,boolean>>} state  Current state.
param: {Object}                                action Dispatched action.
return: {Object<string,Object<string,boolean>>} Next state.

terms(state = {}, action)   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.

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

users(state = {byId: {},queries: {}}, action)   X-Ref
Reducer managing authors state. Keyed by id.

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

currentUser(state = {}, action)   X-Ref
Reducer managing current user state.

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

taxonomies(state = [], action)   X-Ref
Reducer managing taxonomies.

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

currentTheme(state = undefined, action)   X-Ref
Reducer managing the current theme.

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

currentGlobalStylesId(state = undefined, action)   X-Ref
Reducer managing the current global styles id.

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

themeBaseGlobalStyles(state = {}, action)   X-Ref
Reducer managing the theme base global styles.

param: {Record<string, object>} state  Current state.
param: {Object}                 action Dispatched action.
return: {Record<string, object>} Updated state.

themeGlobalStyleVariations(state = {}, action)   X-Ref
Reducer managing the theme global styles variations.

param: {Record<string, object>} state  Current state.
param: {Object}                 action Dispatched action.
return: {Record<string, object>} Updated state.

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

- Fetching
- Editing
- Saving

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

entitiesConfig(state = rootEntitiesConfig, action)   X-Ref
Reducer keeping track of the registered entities.

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

undoManager(state = (0,build_module.createUndoManager)   X-Ref


editsReference(state = {}, action)   X-Ref
No description

embedPreviews(state = {}, action)   X-Ref
Reducer managing embed preview data.

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

userPermissions(state = {}, action)   X-Ref
State which tracks whether the user can perform an action on a REST
resource.

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

autosaves(state = {}, action)   X-Ref
Reducer returning autosaves keyed by their parent's post id.

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

blockPatterns(state = [], action)   X-Ref
No description

blockPatternCategories(state = [], action)   X-Ref
No description

userPatternCategories(state = [], action)   X-Ref
No description

navigationFallbackId(state = null, action)   X-Ref
No description

themeGlobalStyleRevisions(state = {}, action)   X-Ref
Reducer managing the theme global styles revisions.

param: {Record<string, object>} state  Current state.
param: {Object}                 action Dispatched action.
return: {Record<string, object>} Updated state.

defaultTemplates(state = {}, action)   X-Ref
Reducer managing the template lookup per query.

param: {Record<string, string>} state  Current state.
param: {Object}                 action Dispatched action.
return: {Record<string, string>} Updated state.

registeredPostMeta(state = {}, action)   X-Ref
Reducer returning an object of registered post meta.

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

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

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

getQueriedTotalItems(state, query = {})   X-Ref
No description

getQueriedTotalPages(state, query = {})   X-Ref
No description

isNumericID(id)   X-Ref
Checks argument to determine if it's a numeric ID.
For example, '123' is a numeric ID, but '123abc' is not.

param: {any} id the argument to determine if it's a numeric ID.
return: {boolean} true if the string is a numeric ID, false otherwise.

isRawAttribute(entity, attribute)   X-Ref
Checks whether the attribute is a "raw" attribute or not.

param: {Object} entity    Entity record.
param: {string} attribute Attribute name.
return: {boolean} Is the attribute raw

getUserPermissionsFromAllowHeader(allowedMethods)   X-Ref
No description

getUserPermissionCacheKey(action, resource, id)   X-Ref
No description

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

param: state Data state.
param: query Optional object of query parameters to
return: Authors list.

getCurrentUser(state)   X-Ref
Returns the current user.

param: state Data state.
return: Current user object.

getEntitiesByKind(state, kind)   X-Ref
Returns the loaded entities for the given kind.

param: state Data state.
param: kind  Entity kind.
return: Array of entities with config matching kind.

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

param: state Data state.
param: kind  Entity kind.
param: name  Entity name.
return: Entity config

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

param: state Data state.
param: kind  Entity kind.
param: name  Entity name.
return: Entity config

__experimentalGetEntityRecordNoResolver(state, kind, name, key)   X-Ref
Returns the Entity's record object by key. Doesn't trigger a resolver nor requests the entity records from the API if the entity record isn't available in the local state.

param: state State tree
param: kind  Entity kind.
param: name  Entity name.
param: key   Record's key
return: Record.

hasEntityRecords(state, kind, name, query)   X-Ref
Returns true if records have been received for the given set of parameters,
or false otherwise.

param: state State tree
param: kind  Entity kind.
param: name  Entity name.
param: query Optional terms query. For valid query parameters see the [Reference](https://developer.wordpress.org/rest-api/reference/) in the REST API Handbook and select the entity kind. Then see the arguments available for "List [Entity kind]s".
return: Whether entity records have been received.

getEntityRecordEdits(state, kind, name, recordId)   X-Ref
Returns the specified entity record's edits.

param: state    State tree.
param: kind     Entity kind.
param: name     Entity name.
param: recordId Record ID.
return: The entity record's edits.

hasEditsForEntityRecord(state, kind, name, recordId)   X-Ref
Returns true if the specified entity record has edits,
and false otherwise.

param: state    State tree.
param: kind     Entity kind.
param: name     Entity name.
param: recordId Record ID.
return: Whether the entity record has edits or not.

isAutosavingEntityRecord(state, kind, name, recordId)   X-Ref
Returns true if the specified entity record is autosaving, and false otherwise.

param: state    State tree.
param: kind     Entity kind.
param: name     Entity name.
param: recordId Record ID.
return: Whether the entity record is autosaving or not.

isSavingEntityRecord(state, kind, name, recordId)   X-Ref
Returns true if the specified entity record is saving, and false otherwise.

param: state    State tree.
param: kind     Entity kind.
param: name     Entity name.
param: recordId Record ID.
return: Whether the entity record is saving or not.

isDeletingEntityRecord(state, kind, name, recordId)   X-Ref
Returns true if the specified entity record is deleting, and false otherwise.

param: state    State tree.
param: kind     Entity kind.
param: name     Entity name.
param: recordId Record ID.
return: Whether the entity record is deleting or not.

getLastEntitySaveError(state, kind, name, recordId)   X-Ref
Returns the specified entity record's last save error.

param: state    State tree.
param: kind     Entity kind.
param: name     Entity name.
param: recordId Record ID.
return: The entity record's save error.

getLastEntityDeleteError(state, kind, name, recordId)   X-Ref
Returns the specified entity record's last delete error.

param: state    State tree.
param: kind     Entity kind.
param: name     Entity name.
param: recordId Record ID.
return: The entity record's save error.

getUndoEdit(state)   X-Ref
Returns the previous edit from the current undo offset
for the entity records edits history, if any.

param: state State tree.
return: The edit.

getRedoEdit(state)   X-Ref
Returns the next edit from the current undo offset
for the entity records edits history, if any.

param: state State tree.
return: The edit.

hasUndo(state)   X-Ref
Returns true if there is a previous edit from the current undo offset
for the entity records edits history, and false otherwise.

param: state State tree.
return: Whether there is a previous edit or not.

hasRedo(state)   X-Ref
Returns true if there is a next edit from the current undo offset
for the entity records edits history, and false otherwise.

param: state State tree.
return: Whether there is a next edit or not.

getCurrentTheme(state)   X-Ref
Return the current theme.

param: state Data state.
return: The current theme.

__experimentalGetCurrentGlobalStylesId(state)   X-Ref
Return the ID of the current global styles object.

param: state Data state.
return: The current global styles ID.

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

param: state Data state.
return: Index data.

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

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

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.

param: state Data state.
param: url   Embedded URL.
return: Is the preview for the URL an oEmbed link fallback.

canUser(state, action, resource, id)   X-Ref
Returns whether the current user can perform the given action on the given
REST resource.

Calling this may trigger an OPTIONS request to the REST API via the
`canUser()` resolver.

https://developer.wordpress.org/rest-api/reference/

param: state    Data state.
param: action   Action to check. One of: 'create', 'read', 'update', 'delete'.
param: resource Entity resource to check. Accepts entity object `{ kind: 'root', name: 'media', id: 1 }`
param: id       Optional ID of the rest resource to check.
return: Whether or not the user can perform the action,

canUserEditEntityRecord(state, kind, name, recordId)   X-Ref
Returns whether the current user can edit the given entity.

Calling this may trigger an OPTIONS request to the REST API via the
`canUser()` resolver.

https://developer.wordpress.org/rest-api/reference/

param: state    Data state.
param: kind     Entity kind.
param: name     Entity name.
param: recordId Record's id.
return: Whether or not the user can edit,

getAutosaves(state, postType, postId)   X-Ref
Returns the latest autosaves for the post.

May return multiple autosaves since the backend stores one autosave per
author for each post.

param: state    State tree.
param: postType The type of the parent post.
param: postId   The id of the parent post.
return: An array of autosaves for the post, or undefined if there is none.

getAutosave(state, postType, postId, authorId)   X-Ref
Returns the autosave for the post and author.

param: state    State tree.
param: postType The type of the parent post.
param: postId   The id of the parent post.
param: authorId The id of the author.
return: The autosave for the post and author.

getReferenceByDistinctEdits(state)   X-Ref
Returns a new reference when edited values have changed. This is useful in
inferring where an edit has been made between states by comparison of the
return values using strict equality.

param: state Editor state.
return: A value whose reference will change only when an edit occurs.

__experimentalGetTemplateForLink(state, link)   X-Ref
Retrieve the frontend template used for a given link.

param: state Editor state.
param: link  Link.
return: The template record.

__experimentalGetCurrentThemeBaseGlobalStyles(state)   X-Ref
Retrieve the current theme's base global styles

param: state Editor state.
return: The Global Styles object.

__experimentalGetCurrentThemeGlobalStylesVariations(state)   X-Ref
Return the ID of the current global styles object.

param: state Data state.
return: The current global styles ID.

getBlockPatterns(state)   X-Ref
Retrieve the list of registered block patterns.

param: state Data state.
return: Block pattern list.

getBlockPatternCategories(state)   X-Ref
Retrieve the list of registered block pattern categories.

param: state Data state.
return: Block pattern category list.

getUserPatternCategories(state)   X-Ref
Retrieve the registered user pattern categories.

param: state Data state.
return: User patterns category array.

getCurrentThemeGlobalStylesRevisions(state)   X-Ref
Returns the revisions of the current global styles theme.

param: state Data state.
return: The current global styles.

getDefaultTemplateId(state, query)   X-Ref
Returns the default template use to render a given query.

param: state Data state.
param: query Query.
return: The default template id for the given query.

getUndoManager(state)   X-Ref
Returns the previous edit from the current undo offset
for the entity records edits history, if any.

param: state State tree.
return: The undo manager.

getNavigationFallbackId(state)   X-Ref
Retrieve the fallback Navigation.

param: state Data state.
return: The ID for the fallback Navigation post.

getEntityRecordPermissions(state, kind, name, id)   X-Ref
Returns the entity record permissions for the given entity record id.

param: state Data state.
param: kind  Entity kind.
param: name  Entity name.
param: id    Entity record id.
return: The entity record permissions.

getRegisteredPostMeta(state, postType)   X-Ref
Returns the registered post meta fields for a given post type.

param: state    Data state.
param: postType Post type.
return: Registered post meta fields.

receiveRegisteredPostMeta(postType, registeredPostMeta)   X-Ref
Returns an action object used in signalling that the registered post meta
fields for a post type have been received.

param: {string} postType           Post type slug.
param: {Object} registeredPostMeta Registered post meta.
return: {Object} Action object.

camelCaseTransform(input, index)   X-Ref
No description

camelCaseTransformMerge(input, index)   X-Ref
No description

camelCase(input, options)   X-Ref
No description

sortResults(results, search)   X-Ref
Sort search results by relevance to the given query.

Sorting is necessary as we're querying multiple endpoints and merging the results. For example
a taxonomy title might be more relevant than a post title, but by default taxonomy results will
be ordered after all the (potentially irrelevant) post results.

We sort by scoring each result, where the score is the number of tokens in the title that are
also in the search query, divided by the total number of tokens in the title. This gives us a
score between 0 and 1, where 1 is a perfect match.

param: results
param: search

tokenize(text)   X-Ref
Turns text into an array of tokens, with whitespace and punctuation removed.

For example, `"I'm having a ball."` becomes `[ "im", "having", "a", "ball" ]`.

param: text

deepCopyLocksTreePath(tree, path)   X-Ref
No description

getNode(tree, path)   X-Ref
No description

hasConflictingLock({exclusive}, locks)   X-Ref
No description

locks(state = DEFAULT_STATE, action)   X-Ref
Reducer returning locks.

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

getPendingLockRequests(state)   X-Ref
Internal dependencies


isLockAvailable(state, store, path, {exclusive})   X-Ref
No description

createLocks()   X-Ref
Internal dependencies


processPendingLockRequests()   X-Ref
No description

acquire(store, path, exclusive)   X-Ref
No description

release(lock)   X-Ref
No description

createLocksActions()   X-Ref
Internal dependencies


__unstableAcquireStoreLock(store, path, {exclusive})   X-Ref
No description

__unstableReleaseStoreLock(lock)   X-Ref
No description

EntityProvider({kind,type: name,id,children})   X-Ref
Context provider component for providing
an entity for a specific entity.

param: {Object} props          The component's props.
param: {string} props.kind     The entity kind.
param: {string} props.type     The entity name.
param: {number} props.id       The entity ID.
param: {*}      props.children The children to wrap.
return: {Object} The provided children, wrapped with

memize(fn, options)   X-Ref
Accepts a function to be memoized, and returns a new memoized function, with
optional options.

param: {F}             fn        Function to memoize.
param: {MemizeOptions} [options] Options object.
return: {((...args: Parameters<F>) => ReturnType<F>) & MemizeMemoizedFunction} Memoized function.

memoized()   X-Ref
No description

useQuerySelect(mapQuerySelect, deps)   X-Ref
Like useSelect, but the selectors return objects containing
both the original data AND the resolution info.

param: {Function} mapQuerySelect see useSelect
param: {Array}    deps           see useSelect
return: {QuerySelectResponse} Queried data.

useEntityRecord(kind, name, recordId, options = {enabled: true})   X-Ref
Resolves the specified entity record.

param: kind     Kind of the entity, e.g. `root` or a `postType`. See rootEntitiesConfig in ../entities.ts for a list of available kinds.
param: name     Name of the entity, e.g. `plugin` or a `post`. See rootEntitiesConfig in ../entities.ts for a list of available names.
param: recordId ID of the requested entity record.
param: options  Optional hook options.
return: Entity record data.

__experimentalUseEntityRecord(kind, name, recordId, options)   X-Ref
No description

useEntityRecords(kind, name, queryArgs = {}, options = {enabled: true})   X-Ref
Resolves the specified entity records.

param: kind      Kind of the entity, e.g. `root` or a `postType`. See rootEntitiesConfig in ../entities.ts for a list of available kinds.
param: name      Name of the entity, e.g. `plugin` or a `post`. See rootEntitiesConfig in ../entities.ts for a list of available names.
param: queryArgs Optional HTTP query description for how to fetch the data, passed to the requested API endpoint.
param: options   Optional hook options.
return: Entity records data.

__experimentalUseEntityRecords(kind, name, queryArgs, options)   X-Ref
No description

useEntityRecordsWithPermissions(kind, name, queryArgs = {}, options = {enabled: true})   X-Ref
No description

useResourcePermissions(resource, id)   X-Ref
Resolves resource permissions.

param: resource Entity resource to check. Accepts entity object `{ kind: 'root', name: 'media', id: 1 }`
param: id       Optional ID of the resource to check, e.g. 10. Note: This argument is discouraged
return: Entity records data.

__experimentalUseResourcePermissions(resource, id)   X-Ref
No description

useEntityId(kind, name)   X-Ref
Hook that returns the ID for the nearest
provided entity of the specified type.

param: {string} kind The entity kind.
param: {string} name The entity name.

getRichTextValuesCached(block)   X-Ref
No description

getBlockFootnotesOrder(block)   X-Ref
Internal dependencies


getFootnotesOrder(blocks)   X-Ref
No description

updateFootnotesFromMeta(blocks, meta)   X-Ref
Internal dependencies


updateAttributes(attributes)   X-Ref
No description

updateBlocksAttributes(__blocks)   X-Ref
No description

useEntityBlockEditor(kind, name, {id: _id} = {})   X-Ref
Hook that returns block content getters and setters for
the nearest provided entity of the specified type.

The return value has the shape `[ blocks, onInput, onChange ]`.
`onInput` is for block changes that don't create undo levels
or dirty the post, non-persistent changes, and `onChange` is for
persistent changes. They map directly to the props of a
`BlockEditorProvider` and are intended to be used with it,
or similar components or hooks.

param: {string} kind         The entity kind.
param: {string} name         The entity name.
param: {Object} options
param: {string} [options.id] An entity ID to use instead of the context-provided one.
return: {[unknown[], Function, Function]} The block array and setters.

useEntityProp(kind, name, prop, _id)   X-Ref
Hook that returns the value and a setter for the
specified property of the nearest provided
entity of the specified type.

param: {string}        kind  The entity kind.
param: {string}        name  The entity name.
param: {string}        prop  The property name.
param: {number|string} [_id] An entity ID to use instead of the context-provided one.
return: {[*, Function, *]} An array where the first item is the

Functions
Functions that are not part of a class:

mergeHistoryChanges(changes1, changes2)   X-Ref
Merge changes for a single item into a record of changes.

param: {Record< string, HistoryChange >} changes1 Previous changes
param: {Record< string, HistoryChange >} changes2 NextChanges
return: {Record< string, HistoryChange >} Merged changes

createUndoManager()   X-Ref
Creates an undo manager.

return: {UndoManager} Undo manager.

_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

__webpack_require__(moduleId)   X-Ref
No description

conservativeMapItem(item, nextItem)   X-Ref
Given the current and next item entity record, returns the minimally "modified"
result of the next item, preferring value references from the original item
if equal. If all values match, the original item is returned.

param: {Object} item     Original item.
param: {Object} nextItem Next item.
return: {Object} Minimally modified merged item.

__extends(d, b)   X-Ref
No description

__()   X-Ref
No description

__rest(s, e)   X-Ref
No description

__decorate(decorators, target, key, desc)   X-Ref
No description

__param(paramIndex, decorator)   X-Ref
No description

__esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers)   X-Ref
No description

accept(f)   X-Ref
No description

__runInitializers(thisArg, initializers, value)   X-Ref
No description

__propKey(x)   X-Ref
No description

__setFunctionName(f, name, prefix)   X-Ref
No description

__metadata(metadataKey, metadataValue)   X-Ref
No description

__awaiter(thisArg, _arguments, P, generator)   X-Ref
No description

adopt(value)   X-Ref
No description

fulfilled(value)   X-Ref
No description

rejected(value)   X-Ref
No description

step(result)   X-Ref
No description

__generator(thisArg, body)   X-Ref
No description

verb(n)   X-Ref
No description

step(op)   X-Ref
No description

__exportStar(m, o)   X-Ref
No description

__values(o)   X-Ref
No description

__read(o, n)   X-Ref
No description

__spread()   X-Ref
No description

__spreadArrays()   X-Ref
No description

__spreadArray(to, from, pack)   X-Ref
No description

__await(v)   X-Ref
No description

__asyncGenerator(thisArg, _arguments, generator)   X-Ref
No description

awaitReturn(f)   X-Ref
No description

verb(n, f)   X-Ref
No description

resume(n, v)   X-Ref
No description

step(r)   X-Ref
No description

fulfill(value)   X-Ref
No description

reject(value)   X-Ref
No description

settle(f, v)   X-Ref
No description

__asyncDelegator(o)   X-Ref
No description

verb(n, f)   X-Ref
No description

__asyncValues(o)   X-Ref
No description

verb(n)   X-Ref
No description

settle(resolve, reject, d, v)   X-Ref
No description

__makeTemplateObject(cooked, raw)   X-Ref
No description

__importStar(mod)   X-Ref
No description

__importDefault(mod)   X-Ref
No description

__classPrivateFieldGet(receiver, state, kind, f)   X-Ref
No description

__classPrivateFieldSet(receiver, state, value, kind, f)   X-Ref
No description

__classPrivateFieldIn(state, receiver)   X-Ref
No description

__addDisposableResource(env, value, async)   X-Ref
No description

__disposeResources(env)   X-Ref
No description

fail(e)   X-Ref
No description

next()   X-Ref
No description

localeLowerCase(str, locale)   X-Ref
Localized lower case.


lowerCase(str)   X-Ref
Lower case as a function.


noCase(input, options)   X-Ref
Normalize the string into something other libraries can manipulate easier.


replace(input, re, value)   X-Ref
Replace `re` in the input string with the replacement value.


upperCaseFirst(input)   X-Ref
Upper case the first character of an input string.


capitalCaseTransform(input)   X-Ref
No description

capitalCase(input, options)   X-Ref
No description

pascalCaseTransform(input, index)   X-Ref
No description

dist_es2015_pascalCaseTransformMerge(input)   X-Ref
No description

pascalCase(input, options)   X-Ref
No description

rng()   X-Ref
No description

unsafeStringify(arr, offset = 0)   X-Ref
No description

stringify(arr, offset = 0)   X-Ref
No description

v4(options, buf, offset)   X-Ref
No description

setNestedValue(object, path, value)   X-Ref
Sets the value at path of object.
If a portion of path doesn’t exist, it’s created.
Arrays are created for missing index properties while objects are created
for all other missing properties.

Path is specified as either:
- a string of properties, separated by dots, for example: "x.y".
- an array of properties, for example `[ 'x', 'y' ]`.

This function intentionally mutates the input object.

Inspired by _.set().

param: {Object}       object Object to modify
param: {Array|string} path   Path of the property to set.
param: {*}            value  Value to set.

getNestedValue(object, path, defaultValue)   X-Ref
Helper util to return a value from a certain path of the object.
Path is specified as either:
- a string of properties, separated by dots, for example: "x.y".
- an array of properties, for example `[ 'x', 'y' ]`.
You can also specify a default value in case the result is nullish.

param: {Object}       object       Input object.
param: {string|Array} path         Path to the object property.
param: {*}            defaultValue Default value if the value at the specified path is undefined.
return: {*} Value of the object property at the specified path.

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

param: {Array}   items Items received.
param: {?Object} edits Optional edits to reset.
param: {?Object} meta  Meta information about pagination.
return: {Object} Action object.

removeItems(kind, name, records, invalidateCache = false)   X-Ref
Returns an action object used in signalling that entity records have been
deleted and they need to be removed from entities state.

param: {string}              kind            Kind of the removed entities.
param: {string}              name            Name of the removed entities.
param: {Array|number|string} records         Record IDs of the removed entities.
param: {boolean}             invalidateCache Controls whether we want to invalidate the cache.
return: {Object} Action object.

receiveQueriedItems(items, query = {}, edits, meta)   X-Ref
Returns an action object used in signalling that queried data has been
received.

param: {Array}   items Queried items received.
param: {?Object} query Optional query object.
param: {?Object} edits Optional edits to reset.
param: {?Object} meta  Meta information about pagination.
return: {Object} Action object.

chunk(arr, chunkSize)   X-Ref
Maximum number of requests to place in a single batch request. Obtained by
sending a preflight OPTIONS request to /batch/v1/.


createBatch(processor = defaultProcessor)   X-Ref
Creates a batch, which can be used to combine multiple API requests into one
API request using the WordPress batch processing API (/v1/batch).

```
const batch = createBatch();
const dunePromise = batch.add( {
path: '/v1/books',
method: 'POST',
data: { title: 'Dune' }
} );
const lotrPromise = batch.add( {
path: '/v1/books',
method: 'POST',
data: { title: 'Lord of the Rings' }
} );
const isSuccess = await batch.run(); // Sends one POST to /v1/batch.
if ( isSuccess ) {
console.log(
'Saved two books:',
await dunePromise,
await lotrPromise
);
}
```

param: {Function} [processor] Processor function. Can be used to replace the



Generated : Thu Nov 21 08:20:01 2024 Cross-referenced by PHPXref