Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / quickedit / js / models / EditorModel.es6.js
1 /**
2  * @file
3  * A Backbone Model for the state of an in-place editor.
4  *
5  * @see Drupal.quickedit.EditorView
6  */
7
8 (function (Backbone, Drupal) {
9   /**
10    * @constructor
11    *
12    * @augments Backbone.Model
13    */
14   Drupal.quickedit.EditorModel = Backbone.Model.extend(/** @lends Drupal.quickedit.EditorModel# */{
15
16     /**
17      * @type {object}
18      *
19      * @prop {string} originalValue
20      * @prop {string} currentValue
21      * @prop {Array} validationErrors
22      */
23     defaults: /** @lends Drupal.quickedit.EditorModel# */{
24
25       /**
26        * Not the full HTML representation of this field, but the "actual"
27        * original value of the field, stored by the used in-place editor, and
28        * in a representation that can be chosen by the in-place editor.
29        *
30        * @type {string}
31        */
32       originalValue: null,
33
34       /**
35        * Analogous to originalValue, but the current value.
36        *
37        * @type {string}
38        */
39       currentValue: null,
40
41       /**
42        * Stores any validation errors to be rendered.
43        *
44        * @type {Array}
45        */
46       validationErrors: null,
47     },
48
49   });
50 }(Backbone, Drupal));