[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

(no description)

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

Defines 36 functions

  __webpack_require__()
  getDefault()
  getModuleExports()
  bytesToUuid()
  _arrayWithoutHoles()
  _nonIterableSpread()
  _toConsumableArray()
  _objectWithoutProperties()
  _iterableToArray()
  arrayOf()
  isObjectLike()
  createCache()
  isShallowEqual()
  getRootCache()
  getWeakMapCache()
  clear()
  callSelector()
  _objectWithoutPropertiesLoose()
  ownKeys()
  _objectSpread()
  filterWithReference()
  isValidAnnotationRange()
  reducer_annotations()
  selectors_ownKeys()
  selectors_objectSpread()
  __experimentalGetAnnotations()
  __experimentalAddAnnotation()
  __experimentalRemoveAnnotation()
  __experimentalUpdateAnnotationRange()
  __experimentalRemoveAnnotationsBySource()
  applyAnnotations()
  removeAnnotations()
  retrieveAnnotationPositions()
  updateAnnotationsWithPositions()
  _defineProperty()
  v4()

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

bytesToUuid(buf, offset)   X-Ref
No description

_arrayWithoutHoles(arr)   X-Ref
No description

_nonIterableSpread()   X-Ref
No description

_toConsumableArray(arr)   X-Ref
No description

_objectWithoutProperties(source, excluded)   X-Ref
No description

_iterableToArray(iter)   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.

_objectWithoutPropertiesLoose(source, excluded)   X-Ref
No description

ownKeys(object, enumerableOnly)   X-Ref
No description

_objectSpread(target)   X-Ref
No description

filterWithReference(collection, predicate)   X-Ref
Filters an array based on the predicate, but keeps the reference the same if
the array hasn't changed.

return: {Array} Filtered array.
param: {Array}    collection The collection to filter.
param: {Function} predicate  Function that determines if the item should stay

isValidAnnotationRange(annotation)   X-Ref
Verifies whether the given annotations is a valid annotation.

return: {boolean} Whether the given annotation is valid.
param: {Object} annotation The annotation to verify.

reducer_annotations()   X-Ref
Reducer managing annotations.

return: {Array} Updated state.
param: {Array} state The annotations currently shown in the editor.
param: {Object} action Dispatched action.

selectors_ownKeys(object, enumerableOnly)   X-Ref
No description

selectors_objectSpread(target)   X-Ref
No description

__experimentalGetAnnotations(state)   X-Ref
Returns all annotations in the editor state.

return: {Array} All annotations currently applied.
param: {Object} state Editor state.

__experimentalAddAnnotation(_ref)   X-Ref
Adds an annotation to a block.

The `block` attribute refers to a block ID that needs to be annotated.
`isBlockAnnotation` controls whether or not the annotation is a block
annotation. The `source` is the source of the annotation, this will be used
to identity groups of annotations.

The `range` property is only relevant if the selector is 'range'.

return: {Object} Action object.
param: {Object} annotation                    The annotation to add.
param: {string} annotation.blockClientId      The blockClientId to add the annotation to.
param: {string} annotation.richTextIdentifier Identifier for the RichText instance the annotation applies to.
param: {Object} annotation.range              The range at which to apply this annotation.
param: {number} annotation.range.start        The offset where the annotation should start.
param: {number} annotation.range.end          The offset where the annotation should end.
param: {string} annotation.[selector="range"] The way to apply this annotation.
param: {string} annotation.[source="default"] The source that added the annotation.
param: {string} annotation.[id]               The ID the annotation should have. Generates a UUID by default.

__experimentalRemoveAnnotation(annotationId)   X-Ref
Removes an annotation with a specific ID.

return: {Object} Action object.
param: {string} annotationId The annotation to remove.

__experimentalUpdateAnnotationRange(annotationId, start, end)   X-Ref
Updates the range of an annotation.

return: {Object} Action object.
param: {string} annotationId ID of the annotation to update.
param: {number} start The start of the new range.
param: {number} end The end of the new range.

__experimentalRemoveAnnotationsBySource(source)   X-Ref
Removes all annotations of a specific source.

return: {Object} Action object.
param: {string} source The source to remove.

applyAnnotations(record)   X-Ref
Applies given annotations to the given record.

return: {Object} A record with the annotations applied.
param: {Object} record The record to apply annotations to.
param: {Array} annotations The annotation to apply.

removeAnnotations(record)   X-Ref
Removes annotations from the given record.

return: {Object} The cleaned record.
param: {Object} record Record to remove annotations from.

retrieveAnnotationPositions(formats)   X-Ref
Retrieves the positions of annotations inside an array of formats.

return: {Object} ID keyed positions of annotations.
param: {Array} formats Formats with annotations in there.

updateAnnotationsWithPositions(annotations, positions, _ref)   X-Ref
Updates annotations in the state based on positions retrieved from RichText.

param: {Array}    annotations                   The annotations that are currently applied.
param: {Array}    positions                     The current positions of the given annotations.
param: {Object}   actions
param: {Function} actions.removeAnnotation      Function to remove an annotation from the state.
param: {Function} actions.updateAnnotationRange Function to update an annotation range in the state.

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

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



Generated: Sun Feb 23 01:00:03 2020 Cross-referenced by PHPXref 0.7.1