Replace deprecated require-jsdoc
, valid-jsdoc
with jsdoc plugin for eslint
Enabled and fixed for `check-alignment`, `implements-on-classes`, `newline-after-description`, `require-param-name`, `require-param-type`, `require-returns-type` and `valid-types`. Change-Id: Icb0533e44e17b10246f1b9d33f8d01f16a1e15a5
This commit is contained in:
parent
9ec2bbccc3
commit
9a07681dc2
@ -7,6 +7,7 @@
|
||||
"eslint": "^6.6.0",
|
||||
"eslint-config-google": "^0.13.0",
|
||||
"eslint-plugin-html": "^6.0.0",
|
||||
"eslint-plugin-jsdoc": "^18.4.3",
|
||||
"fried-twinkie": "^0.2.2",
|
||||
"polymer-cli": "^1.9.11",
|
||||
"typescript": "^2.x.x",
|
||||
|
@ -90,13 +90,41 @@
|
||||
"prefer-const": "error",
|
||||
"prefer-spread": "error",
|
||||
"quote-props": ["error", "consistent-as-needed"],
|
||||
"require-jsdoc": "off",
|
||||
"semi": [2, "always"],
|
||||
"template-curly-spacing": "error",
|
||||
"valid-jsdoc": "off"
|
||||
|
||||
"require-jsdoc": 0,
|
||||
"valid-jsdoc": 0,
|
||||
"jsdoc/check-alignment": 2,
|
||||
"jsdoc/check-examples": 0,
|
||||
"jsdoc/check-indentation": 0,
|
||||
"jsdoc/check-param-names": 0,
|
||||
"jsdoc/check-syntax": 0,
|
||||
"jsdoc/check-tag-names": 0,
|
||||
"jsdoc/check-types": 0,
|
||||
"jsdoc/implements-on-classes": 2,
|
||||
"jsdoc/match-description": 0,
|
||||
"jsdoc/newline-after-description": 2,
|
||||
"jsdoc/no-types": 0,
|
||||
"jsdoc/no-undefined-types": 0,
|
||||
"jsdoc/require-description": 0,
|
||||
"jsdoc/require-description-complete-sentence": 0,
|
||||
"jsdoc/require-example": 0,
|
||||
"jsdoc/require-hyphen-before-param-description": 0,
|
||||
"jsdoc/require-jsdoc": 0,
|
||||
"jsdoc/require-param": 0,
|
||||
"jsdoc/require-param-description": 0,
|
||||
"jsdoc/require-param-name": 2,
|
||||
"jsdoc/require-param-type": 2,
|
||||
"jsdoc/require-returns": 0,
|
||||
"jsdoc/require-returns-check": 0,
|
||||
"jsdoc/require-returns-description": 0,
|
||||
"jsdoc/require-returns-type": 2,
|
||||
"jsdoc/valid-types": 2
|
||||
},
|
||||
"plugins": [
|
||||
"html"
|
||||
"html",
|
||||
"jsdoc"
|
||||
],
|
||||
"settings": {
|
||||
"html/report-bad-indent": "error"
|
||||
|
@ -31,6 +31,7 @@ limitations under the License.
|
||||
|
||||
/**
|
||||
* Get the docs base URL from either the server config or by probing.
|
||||
*
|
||||
* @param {Object} config The server config.
|
||||
* @param {!Object} restApi A REST API instance
|
||||
* @return {!Promise<string>} A promise that resolves with the docs base
|
||||
|
@ -25,6 +25,7 @@ limitations under the License.
|
||||
/**
|
||||
* Are any ancestors of the element (or the element itself) members of the
|
||||
* given class.
|
||||
*
|
||||
* @param {!Element} element
|
||||
* @param {string} className
|
||||
* @param {Element=} opt_stopElement If provided, stop traversing the
|
||||
|
@ -41,6 +41,7 @@ limitations under the License.
|
||||
|
||||
/**
|
||||
* Returns the complement to the given column array
|
||||
*
|
||||
* @param {Array} columns
|
||||
* @return {!Array}
|
||||
*/
|
||||
@ -63,6 +64,7 @@ limitations under the License.
|
||||
* The Project column was renamed to Repo, but some users may have
|
||||
* preferences that use its old name. If that column is found, rename it
|
||||
* before use.
|
||||
*
|
||||
* @param {!Array<string>} columns
|
||||
* @return {!Array<string>} If the column was renamed, returns a new array
|
||||
* with the corrected name. Otherwise, it returns the original param.
|
||||
|
@ -52,6 +52,7 @@ limitations under the License.
|
||||
/**
|
||||
* Whether the given patch is a numbered parent of a merge (i.e. a negative
|
||||
* number).
|
||||
*
|
||||
* @param {string|number} n
|
||||
* @return {Boolean}
|
||||
*/
|
||||
@ -265,6 +266,7 @@ limitations under the License.
|
||||
/**
|
||||
* Convert parent indexes from patch range expressions to numbers.
|
||||
* For example, in a patch range expression `"-3"` becomes `3`.
|
||||
*
|
||||
* @param {number|string} rangeBase
|
||||
* @return {number}
|
||||
*/
|
||||
|
@ -25,6 +25,7 @@ limitations under the License.
|
||||
/**
|
||||
* Pretty-encodes a URL. Double-encodes the string, and then replaces
|
||||
* benevolent characters for legibility.
|
||||
*
|
||||
* @param {string} url
|
||||
* @param {boolean=} replaceSlashes
|
||||
* @return {string}
|
||||
@ -45,6 +46,7 @@ limitations under the License.
|
||||
* Single decode for URL components. Will decode plus signs ('+') to spaces.
|
||||
* Note: because this function decodes once, it is not the inverse of
|
||||
* encodeURL.
|
||||
*
|
||||
* @param {string} url
|
||||
* @return {string}
|
||||
*/
|
||||
|
@ -99,9 +99,9 @@ limitations under the License.
|
||||
SKIP_MERGEABLE: 22,
|
||||
|
||||
/**
|
||||
* Skip diffstat computation that compute the insertions field (number of lines inserted) and
|
||||
* deletions field (number of lines deleted)
|
||||
*/
|
||||
* Skip diffstat computation that compute the insertions field (number of lines inserted) and
|
||||
* deletions field (number of lines deleted)
|
||||
*/
|
||||
SKIP_DIFFSTAT: 23,
|
||||
},
|
||||
|
||||
|
@ -28,6 +28,7 @@ limitations under the License.
|
||||
/**
|
||||
* Wraps a string to be used as a URL. An error is thrown if the string cannot
|
||||
* be considered safe.
|
||||
*
|
||||
* @constructor
|
||||
* @param {string} url the unwrapped, potentially unsafe URL.
|
||||
*/
|
||||
@ -40,6 +41,7 @@ limitations under the License.
|
||||
|
||||
/**
|
||||
* Get the string representation of the safe URL.
|
||||
*
|
||||
* @returns {string}
|
||||
*/
|
||||
Gerrit.SafeTypes.SafeUrl.prototype.asString = function() {
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
/**
|
||||
* Fired when a section that was previously added was removed.
|
||||
*
|
||||
* @event added-section-removed
|
||||
*/
|
||||
|
||||
@ -37,15 +38,15 @@
|
||||
const LABEL = 'Label';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.AccessMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.AccessMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrAccessSection extends Polymer.mixinBehaviors( [
|
||||
Gerrit.AccessBehavior,
|
||||
/**
|
||||
* Unused in this element, but called by other elements in tests
|
||||
* e.g gr-repo-access_test.
|
||||
*/
|
||||
* Unused in this element, but called by other elements in tests
|
||||
* e.g gr-repo-access_test.
|
||||
*/
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
Polymer.LegacyElementMixin(
|
||||
|
@ -18,9 +18,9 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.ListViewMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.ListViewMixin
|
||||
*/
|
||||
class GrAdminGroupList extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.ListViewBehavior,
|
||||
@ -40,8 +40,8 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* Offset of currently visible query results.
|
||||
*/
|
||||
* Offset of currently visible query results.
|
||||
*/
|
||||
_offset: Number,
|
||||
_path: {
|
||||
type: String,
|
||||
@ -56,9 +56,9 @@
|
||||
_groups: Array,
|
||||
|
||||
/**
|
||||
* Because we request one more than the groupsPerPage, _shownGroups
|
||||
* may be one less than _groups.
|
||||
* */
|
||||
* Because we request one more than the groupsPerPage, _shownGroups
|
||||
* may be one less than _groups.
|
||||
* */
|
||||
_shownGroups: {
|
||||
type: Array,
|
||||
computed: 'computeShownItems(_groups)',
|
||||
@ -95,6 +95,7 @@
|
||||
|
||||
/**
|
||||
* Opens the create overlay if the route has a hash 'create'
|
||||
*
|
||||
* @param {!Object} params
|
||||
*/
|
||||
_maybeOpenCreateOverlay(params) {
|
||||
|
@ -20,10 +20,10 @@
|
||||
const INTERNAL_GROUP_REGEX = /^[\da-f]{40}$/;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.AdminNavMixin
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.AdminNavMixin
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
class GrAdminView extends Polymer.mixinBehaviors( [
|
||||
Gerrit.AdminNavBehavior,
|
||||
Gerrit.BaseUrlBehavior,
|
||||
|
@ -24,8 +24,8 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrConfirmDeleteItemDialog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -21,16 +21,16 @@
|
||||
const REF_PREFIX = 'refs/heads/';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
class GrCreateChangeDialog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.BaseUrlBehavior,
|
||||
/**
|
||||
* Unused in this element, but called by other elements in tests
|
||||
* e.g gr-repo-commands_test.
|
||||
*/
|
||||
* Unused in this element, but called by other elements in tests
|
||||
* e.g gr-repo-commands_test.
|
||||
*/
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.URLEncodingBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -18,9 +18,9 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
class GrCreateGroupDialog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.BaseUrlBehavior,
|
||||
Gerrit.URLEncodingBehavior,
|
||||
|
@ -23,9 +23,9 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
class GrCreatePointerDialog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.BaseUrlBehavior,
|
||||
Gerrit.URLEncodingBehavior,
|
||||
|
@ -18,9 +18,9 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
class GrCreateRepoDialog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.BaseUrlBehavior,
|
||||
Gerrit.URLEncodingBehavior,
|
||||
|
@ -20,9 +20,9 @@
|
||||
const GROUP_EVENTS = ['ADD_GROUP', 'REMOVE_GROUP'];
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.ListViewMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.ListViewMixin
|
||||
*/
|
||||
class GrGroupAuditLog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.ListViewBehavior,
|
||||
|
@ -24,10 +24,10 @@
|
||||
const URL_REGEX = '^(?:[a-z]+:)?//';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
class GrGroupMembers extends Polymer.mixinBehaviors( [
|
||||
Gerrit.BaseUrlBehavior,
|
||||
Gerrit.FireBehavior,
|
||||
|
@ -31,8 +31,8 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrGroup extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -25,9 +25,9 @@
|
||||
];
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.AccessMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.AccessMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
/**
|
||||
* Fired when the permission has been modified or removed.
|
||||
*
|
||||
@ -35,14 +35,15 @@
|
||||
*/
|
||||
/**
|
||||
* Fired when a permission that was previously added was removed.
|
||||
*
|
||||
* @event added-permission-removed
|
||||
*/
|
||||
class GrPermission extends Polymer.mixinBehaviors( [
|
||||
Gerrit.AccessBehavior,
|
||||
/**
|
||||
* Unused in this element, but called by other elements in tests
|
||||
* e.g gr-access-section_test.
|
||||
*/
|
||||
* Unused in this element, but called by other elements in tests
|
||||
* e.g gr-access-section_test.
|
||||
*/
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
Polymer.LegacyElementMixin(
|
||||
|
@ -18,9 +18,9 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.ListViewMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.ListViewMixin
|
||||
*/
|
||||
class GrPluginList extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.ListViewBehavior,
|
||||
@ -39,8 +39,8 @@
|
||||
observer: '_paramsChanged',
|
||||
},
|
||||
/**
|
||||
* Offset of currently visible query results.
|
||||
*/
|
||||
* Offset of currently visible query results.
|
||||
*/
|
||||
_offset: {
|
||||
type: Number,
|
||||
value: 0,
|
||||
@ -52,9 +52,9 @@
|
||||
},
|
||||
_plugins: Array,
|
||||
/**
|
||||
* Because we request one more than the pluginsPerPage, _shownPlugins
|
||||
* maybe one less than _plugins.
|
||||
* */
|
||||
* Because we request one more than the pluginsPerPage, _shownPlugins
|
||||
* maybe one less than _plugins.
|
||||
* */
|
||||
_shownPlugins: {
|
||||
type: Array,
|
||||
computed: 'computeShownItems(_plugins)',
|
||||
|
@ -68,11 +68,11 @@
|
||||
Defs.projectAccessInput;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.AccessMixin
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.AccessMixin
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
class GrRepoAccess extends Polymer.mixinBehaviors( [
|
||||
Gerrit.AccessBehavior,
|
||||
Gerrit.BaseUrlBehavior,
|
||||
@ -356,6 +356,7 @@
|
||||
/**
|
||||
* As add / delete both can happen in the new section,
|
||||
* so here to make sure it will remove the deleted ones.
|
||||
*
|
||||
* @see Issue 11339
|
||||
*/
|
||||
this._recursivelyRemoveDeleted(addRemoveObj.add[k]);
|
||||
|
@ -27,8 +27,8 @@
|
||||
const CREATE_CHANGE_SUCCEEDED_MESSAGE = 'Navigating to change';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrRepoCommands extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrRepoDashboards extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -25,10 +25,10 @@
|
||||
const PGP_START = '-----BEGIN PGP SIGNATURE-----';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.ListViewMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.ListViewMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
class GrRepoDetailList extends Polymer.mixinBehaviors( [
|
||||
Gerrit.ListViewBehavior,
|
||||
Gerrit.FireBehavior,
|
||||
@ -48,9 +48,9 @@
|
||||
observer: '_paramsChanged',
|
||||
},
|
||||
/**
|
||||
* The kind of detail we are displaying, possibilities are determined by
|
||||
* the const DETAIL_TYPES.
|
||||
*/
|
||||
* The kind of detail we are displaying, possibilities are determined by
|
||||
* the const DETAIL_TYPES.
|
||||
*/
|
||||
detailType: String,
|
||||
|
||||
_editing: {
|
||||
@ -66,15 +66,15 @@
|
||||
value: false,
|
||||
},
|
||||
/**
|
||||
* Offset of currently visible query results.
|
||||
*/
|
||||
* Offset of currently visible query results.
|
||||
*/
|
||||
_offset: Number,
|
||||
_repo: Object,
|
||||
_items: Array,
|
||||
/**
|
||||
* Because we request one more than the projectsPerPage, _shownProjects
|
||||
* maybe one less than _projects.
|
||||
*/
|
||||
* Because we request one more than the projectsPerPage, _shownProjects
|
||||
* maybe one less than _projects.
|
||||
*/
|
||||
_shownItems: {
|
||||
type: Array,
|
||||
computed: 'computeShownItems(_items)',
|
||||
|
@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.ListViewMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.ListViewMixin
|
||||
*/
|
||||
class GrRepoList extends Polymer.mixinBehaviors( [
|
||||
Gerrit.ListViewBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
@ -38,8 +38,8 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* Offset of currently visible query results.
|
||||
*/
|
||||
* Offset of currently visible query results.
|
||||
*/
|
||||
_offset: Number,
|
||||
_path: {
|
||||
type: String,
|
||||
@ -54,9 +54,9 @@
|
||||
_repos: Array,
|
||||
|
||||
/**
|
||||
* Because we request one more than the projectsPerPage, _shownProjects
|
||||
* maybe one less than _projects.
|
||||
* */
|
||||
* Because we request one more than the projectsPerPage, _shownProjects
|
||||
* maybe one less than _projects.
|
||||
* */
|
||||
_shownRepos: {
|
||||
type: Array,
|
||||
computed: 'computeShownItems(_repos)',
|
||||
@ -96,6 +96,7 @@
|
||||
|
||||
/**
|
||||
* Opens the create overlay if the route has a hash 'create'
|
||||
*
|
||||
* @param {!Object} params
|
||||
*/
|
||||
_maybeOpenCreateOverlay(params) {
|
||||
|
@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.RepoPluginConfigMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.RepoPluginConfigMixin
|
||||
*/
|
||||
class GrRepoPluginConfig extends Polymer.mixinBehaviors( [
|
||||
Gerrit.RepoPluginConfig,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -52,8 +52,8 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrRepo extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
/**
|
||||
* Fired when a rule that was previously added was removed.
|
||||
*
|
||||
* @event added-rule-removed
|
||||
*/
|
||||
|
||||
@ -64,18 +65,18 @@
|
||||
];
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.AccessMixin
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.AccessMixin
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
class GrRuleEditor extends Polymer.mixinBehaviors( [
|
||||
Gerrit.AccessBehavior,
|
||||
Gerrit.BaseUrlBehavior,
|
||||
/**
|
||||
* Unused in this element, but called by other elements in tests
|
||||
* e.g gr-permission_test.
|
||||
*/
|
||||
* Unused in this element, but called by other elements in tests
|
||||
* e.g gr-permission_test.
|
||||
*/
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.URLEncodingBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -25,12 +25,12 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.ChangeTableMixin
|
||||
* @appliesMixin Gerrit.PathListMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.ChangeTableMixin
|
||||
* @appliesMixin Gerrit.PathListMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
class GrChangeListItem extends Polymer.mixinBehaviors( [
|
||||
Gerrit.BaseUrlBehavior,
|
||||
Gerrit.ChangeTableBehavior,
|
||||
|
@ -30,10 +30,10 @@
|
||||
const LIMIT_OPERATOR_PATTERN = /\blimit:(\d+)/i;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
class GrChangeListView extends Polymer.mixinBehaviors( [
|
||||
Gerrit.BaseUrlBehavior,
|
||||
Gerrit.FireBehavior,
|
||||
@ -59,8 +59,8 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* True when user is logged in.
|
||||
*/
|
||||
* True when user is logged in.
|
||||
*/
|
||||
_loggedIn: {
|
||||
type: Boolean,
|
||||
computed: '_computeLoggedIn(account)',
|
||||
@ -72,13 +72,14 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* State persisted across restamps of the element.
|
||||
*
|
||||
* Need sub-property declaration since it is used in template before
|
||||
* assignment.
|
||||
* @type {{ selectedChangeIndex: (number|undefined) }}
|
||||
*
|
||||
*/
|
||||
* State persisted across restamps of the element.
|
||||
*
|
||||
* Need sub-property declaration since it is used in template before
|
||||
* assignment.
|
||||
*
|
||||
* @type {{ selectedChangeIndex: (number|undefined) }}
|
||||
*
|
||||
*/
|
||||
viewState: {
|
||||
type: Object,
|
||||
notify: true,
|
||||
@ -90,29 +91,29 @@
|
||||
_changesPerPage: Number,
|
||||
|
||||
/**
|
||||
* Currently active query.
|
||||
*/
|
||||
* Currently active query.
|
||||
*/
|
||||
_query: {
|
||||
type: String,
|
||||
value: '',
|
||||
},
|
||||
|
||||
/**
|
||||
* Offset of currently visible query results.
|
||||
*/
|
||||
* Offset of currently visible query results.
|
||||
*/
|
||||
_offset: Number,
|
||||
|
||||
/**
|
||||
* Change objects loaded from the server.
|
||||
*/
|
||||
* Change objects loaded from the server.
|
||||
*/
|
||||
_changes: {
|
||||
type: Array,
|
||||
observer: '_changesChanged',
|
||||
},
|
||||
|
||||
/**
|
||||
* For showing a "loading..." string during ajax requests.
|
||||
*/
|
||||
* For showing a "loading..." string during ajax requests.
|
||||
*/
|
||||
_loading: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
|
@ -23,13 +23,13 @@
|
||||
const MAX_SHORTCUT_CHARS = 5;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.ChangeTableMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.ChangeTableMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
class GrChangeList extends Polymer.mixinBehaviors( [
|
||||
Gerrit.BaseUrlBehavior,
|
||||
Gerrit.ChangeTableBehavior,
|
||||
@ -64,23 +64,23 @@
|
||||
value: null,
|
||||
},
|
||||
/**
|
||||
* An array of ChangeInfo objects to render.
|
||||
* https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#change-info
|
||||
*/
|
||||
* An array of ChangeInfo objects to render.
|
||||
* https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#change-info
|
||||
*/
|
||||
changes: {
|
||||
type: Array,
|
||||
observer: '_changesChanged',
|
||||
},
|
||||
/**
|
||||
* ChangeInfo objects grouped into arrays. The sections and changes
|
||||
* properties should not be used together.
|
||||
*
|
||||
* @type {!Array<{
|
||||
* name: string,
|
||||
* query: string,
|
||||
* results: !Array<!Object>
|
||||
* }>}
|
||||
*/
|
||||
* ChangeInfo objects grouped into arrays. The sections and changes
|
||||
* properties should not be used together.
|
||||
*
|
||||
* @type {!Array<{
|
||||
* name: string,
|
||||
* query: string,
|
||||
* results: !Array<!Object>
|
||||
* }>}
|
||||
*/
|
||||
sections: {
|
||||
type: Array,
|
||||
value() { return []; },
|
||||
|
@ -20,9 +20,9 @@
|
||||
const PROJECT_PLACEHOLDER_PATTERN = /\$\{project\}/g;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
class GrDashboardView extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.RESTClientBehavior,
|
||||
@ -61,8 +61,8 @@
|
||||
_results: Array,
|
||||
|
||||
/**
|
||||
* For showing a "loading..." string during ajax requests.
|
||||
*/
|
||||
* For showing a "loading..." string during ajax requests.
|
||||
*/
|
||||
_loading: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
|
@ -41,8 +41,8 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* @type {?{name: ?, email: ?, registered_on: ?}}
|
||||
*/
|
||||
* @type {?{name: ?, email: ?, registered_on: ?}}
|
||||
*/
|
||||
_accountDetails: {
|
||||
type: Object,
|
||||
value: null,
|
||||
|
@ -193,10 +193,10 @@
|
||||
const AWAIT_CHANGE_TIMEOUT_MS = 1000;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
class GrChangeActions extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.PatchSetBehavior,
|
||||
@ -214,7 +214,7 @@
|
||||
/**
|
||||
* Fired when an action is tapped.
|
||||
*
|
||||
* @event <action key>-tap
|
||||
* @event custom-tap - naming pattern: <action key>-tap
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -644,8 +644,8 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string=} actionName
|
||||
*/
|
||||
* @param {string=} actionName
|
||||
*/
|
||||
_deleteAndNotify(actionName) {
|
||||
if (this.actions && this.actions[actionName]) {
|
||||
delete this.actions[actionName];
|
||||
@ -886,6 +886,7 @@
|
||||
|
||||
/**
|
||||
* Capitalize the first letter and lowecase all others.
|
||||
*
|
||||
* @param {string} s
|
||||
* @return {string}
|
||||
*/
|
||||
@ -1413,6 +1414,7 @@
|
||||
/**
|
||||
* Merge sources of change actions into a single ordered array of action
|
||||
* values.
|
||||
*
|
||||
* @param {!Array} changeActionsRecord
|
||||
* @param {!Array} revisionActionsRecord
|
||||
* @param {!Array} primariesRecord
|
||||
|
@ -49,8 +49,8 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
class GrChangeMetadata extends Polymer.mixinBehaviors( [
|
||||
Gerrit.RESTClientBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
@ -96,8 +96,8 @@
|
||||
computed: '_computeHashtagReadOnly(_mutable, change)',
|
||||
},
|
||||
/**
|
||||
* @type {Gerrit.PushCertificateValidation}
|
||||
*/
|
||||
* @type {Gerrit.PushCertificateValidation}
|
||||
*/
|
||||
_pushCertificateValidation: {
|
||||
type: Object,
|
||||
computed: '_computePushCertificateValidation(serverConfig, change)',
|
||||
@ -401,6 +401,7 @@
|
||||
/**
|
||||
* Get the user with the specified role on the change. Returns null if the
|
||||
* user with that role is the same as the owner.
|
||||
*
|
||||
* @param {!Object} change
|
||||
* @param {string} role One of the values from _CHANGE_ROLE
|
||||
* @return {Object|null} either an accound or null.
|
||||
|
@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
class GrChangeRequirements extends Polymer.mixinBehaviors( [
|
||||
Gerrit.RESTClientBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -64,11 +64,11 @@
|
||||
const SEND_REPLY_TIMING_LABEL = 'SendReply';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
class GrChangeView extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.KeyboardShortcutBehavior,
|
||||
@ -942,6 +942,7 @@
|
||||
/**
|
||||
* Gets base patch number, if it is a parent try and decide from
|
||||
* preference whether to default to `auto merge`, `Parent 1` or `PARENT`.
|
||||
*
|
||||
* @param {Object} change
|
||||
* @param {Object} patchRange
|
||||
* @return {number|string}
|
||||
@ -1415,6 +1416,7 @@
|
||||
|
||||
/**
|
||||
* Reload the change.
|
||||
*
|
||||
* @param {boolean=} opt_isLocationChange Reloads the related changes
|
||||
* when true and ends reporting events that started on location change.
|
||||
* @return {Promise} A promise that resolves when the core data has loaded.
|
||||
|
@ -18,10 +18,10 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.PathListMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.PathListMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
class GrCommentList extends Polymer.mixinBehaviors( [
|
||||
Gerrit.BaseUrlBehavior,
|
||||
Gerrit.PathListBehavior,
|
||||
|
@ -18,9 +18,9 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
*/
|
||||
class GrConfirmAbandonDialog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.KeyboardShortcutBehavior,
|
||||
|
@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrConfirmCherrypickConflictDialog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -20,8 +20,8 @@
|
||||
const SUGGESTIONS_LIMIT = 15;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrConfirmCherrypickDialog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -20,8 +20,8 @@
|
||||
const SUGGESTIONS_LIMIT = 15;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrConfirmMoveDialog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -21,8 +21,8 @@
|
||||
'Unable to find the commit hash of this change.';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrConfirmRevertDialog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -22,8 +22,8 @@
|
||||
const CHANGE_SUBJECT_LIMIT = 50;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrConfirmRevertSubmissionDialog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -44,10 +44,10 @@
|
||||
change: Object,
|
||||
|
||||
/**
|
||||
* @type {{
|
||||
* label: string,
|
||||
* }}
|
||||
*/
|
||||
* @type {{
|
||||
* label: string,
|
||||
* }}
|
||||
*/
|
||||
action: Object,
|
||||
};
|
||||
}
|
||||
|
@ -18,10 +18,10 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
class GrDownloadDialog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.PatchSetBehavior,
|
||||
|
@ -22,9 +22,9 @@
|
||||
const MERGED_STATUS = 'MERGED';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
*/
|
||||
class GrFileListHeader extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.PatchSetBehavior,
|
||||
@ -183,6 +183,7 @@
|
||||
|
||||
/**
|
||||
* Update the patchset description with the rest API.
|
||||
*
|
||||
* @param {string} desc
|
||||
* @param {?(Event|Node)} e
|
||||
* @return {!Promise}
|
||||
|
@ -42,13 +42,13 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.AsyncForeachMixin
|
||||
* @appliesMixin Gerrit.DomUtilMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.PathListMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.AsyncForeachMixin
|
||||
* @appliesMixin Gerrit.DomUtilMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.PathListMixin
|
||||
*/
|
||||
class GrFileList extends Polymer.mixinBehaviors( [
|
||||
Gerrit.AsyncForeachBehavior,
|
||||
Gerrit.DomUtilBehavior,
|
||||
@ -148,9 +148,9 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* The amount of files added to the shown files list the last time it was
|
||||
* updated. This is used for reporting the average render time.
|
||||
*/
|
||||
* The amount of files added to the shown files list the last time it was
|
||||
* updated. This is used for reporting the average render time.
|
||||
*/
|
||||
_reportinShownFilesIncrement: Number,
|
||||
|
||||
_expandedFilePaths: {
|
||||
@ -538,6 +538,7 @@
|
||||
/**
|
||||
* The closure compiler doesn't realize this.specialFilePathCompare is
|
||||
* valid.
|
||||
*
|
||||
* @suppress {checkTypes}
|
||||
*/
|
||||
_normalizeChangeFilesResponse(response) {
|
||||
@ -972,6 +973,7 @@
|
||||
/**
|
||||
* Get a descriptive label for use in the status indicator's tooltip and
|
||||
* ARIA label.
|
||||
*
|
||||
* @param {string} status
|
||||
* @return {string}
|
||||
*/
|
||||
@ -1004,6 +1006,7 @@
|
||||
* entries in the expanded list, then render each diff corresponding in
|
||||
* order by waiting for the previous diff to finish before starting the next
|
||||
* one.
|
||||
*
|
||||
* @param {!Array} record The splice record in the expanded paths list.
|
||||
*/
|
||||
_expandedPathsChanged(record) {
|
||||
@ -1048,6 +1051,7 @@
|
||||
* Given an array of paths and a NodeList of diff elements, render the diff
|
||||
* for each path in order, awaiting the previous render to complete before
|
||||
* continung.
|
||||
*
|
||||
* @param {!Array<string>} paths
|
||||
* @param {!NodeList<!Object>} diffElements (GrDiffHostElement)
|
||||
* @param {number} initialCount The total number of paths in the pass. This
|
||||
@ -1093,6 +1097,7 @@
|
||||
|
||||
/**
|
||||
* In the given NodeList of diff elements, find the diff for the given path.
|
||||
*
|
||||
* @param {string} path
|
||||
* @param {!NodeList<!Object>} diffElements (GrDiffElement)
|
||||
* @return {!Object|undefined} (GrDiffElement)
|
||||
@ -1107,6 +1112,7 @@
|
||||
|
||||
/**
|
||||
* Reset the comments of a modified thread
|
||||
*
|
||||
* @param {string} rootId
|
||||
* @param {string} path
|
||||
*/
|
||||
@ -1153,6 +1159,7 @@
|
||||
* Update the loading class for the file list rows. The update is inside a
|
||||
* debouncer so that the file list doesn't flash gray when the API requests
|
||||
* are reasonably fast.
|
||||
*
|
||||
* @param {boolean} loading
|
||||
*/
|
||||
_loadingChanged(loading) {
|
||||
@ -1178,6 +1185,7 @@
|
||||
/**
|
||||
* Given a file path, return whether that path should have visible size bars
|
||||
* and be included in the size bars calculation.
|
||||
*
|
||||
* @param {string} path
|
||||
* @return {boolean}
|
||||
*/
|
||||
@ -1187,6 +1195,7 @@
|
||||
|
||||
/**
|
||||
* Compute size bar layout values from the file list.
|
||||
*
|
||||
* @return {Gerrit.LayoutStats|undefined}
|
||||
*/
|
||||
_computeSizeBarLayout(shownFilesRecord) {
|
||||
@ -1221,6 +1230,7 @@
|
||||
|
||||
/**
|
||||
* Get the width of the addition bar for a file.
|
||||
*
|
||||
* @param {Object} file
|
||||
* @param {Gerrit.LayoutStats} stats
|
||||
* @return {number}
|
||||
@ -1238,6 +1248,7 @@
|
||||
|
||||
/**
|
||||
* Get the x-offset of the addition bar for a file.
|
||||
*
|
||||
* @param {Object} file
|
||||
* @param {Gerrit.LayoutStats} stats
|
||||
* @return {number}
|
||||
@ -1249,6 +1260,7 @@
|
||||
|
||||
/**
|
||||
* Get the width of the deletion bar for a file.
|
||||
*
|
||||
* @param {Object} file
|
||||
* @param {Gerrit.LayoutStats} stats
|
||||
* @return {number}
|
||||
@ -1266,6 +1278,7 @@
|
||||
|
||||
/**
|
||||
* Get the x-offset of the deletion bar for a file.
|
||||
*
|
||||
* @param {Gerrit.LayoutStats} stats
|
||||
* @return {number}
|
||||
*/
|
||||
@ -1302,6 +1315,7 @@
|
||||
|
||||
/**
|
||||
* Returns true if none of the inline diffs have been expanded.
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
_noDiffsExpanded() {
|
||||
@ -1312,6 +1326,7 @@
|
||||
* Method to call via binding when each file list row is rendered. This
|
||||
* allows approximate detection of when the dom-repeat has completed
|
||||
* rendering.
|
||||
*
|
||||
* @param {number} index The index of the row being rendered.
|
||||
* @return {string} an empty string.
|
||||
*/
|
||||
|
@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrIncludedInDialog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -129,8 +129,8 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* @param label {string|undefined}
|
||||
* @param permittedLabels {Object|undefined}
|
||||
* @param {string|undefined} label
|
||||
* @param {Object|undefined} permittedLabels
|
||||
* @return {string}
|
||||
*/
|
||||
_computeLabelAccessClass(label, permittedLabels) {
|
||||
|
@ -21,8 +21,8 @@
|
||||
const LABEL_TITLE_SCORE_PATTERN = /^([A-Za-z0-9-]+)([+-]\d+)$/;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrMessage extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
@ -86,14 +86,14 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* A mapping from label names to objects representing the minimum and
|
||||
* maximum possible values for that label.
|
||||
*/
|
||||
* A mapping from label names to objects representing the minimum and
|
||||
* maximum possible values for that label.
|
||||
*/
|
||||
labelExtremes: Object,
|
||||
|
||||
/**
|
||||
* @type {{ commentlinks: Array }}
|
||||
*/
|
||||
* @type {{ commentlinks: Array }}
|
||||
*/
|
||||
_projectConfig: Object,
|
||||
// Computed property needed to trigger Polymer value observing.
|
||||
_expanded: {
|
||||
|
@ -59,16 +59,16 @@
|
||||
value: false,
|
||||
},
|
||||
/**
|
||||
* The messages after processing and including merged reviewer updates.
|
||||
*/
|
||||
* The messages after processing and including merged reviewer updates.
|
||||
*/
|
||||
_processedMessages: {
|
||||
type: Array,
|
||||
computed: '_computeItems(messages, reviewerUpdates)',
|
||||
observer: '_processedMessagesChanged',
|
||||
},
|
||||
/**
|
||||
* The subset of _processedMessages that is visible to the user.
|
||||
*/
|
||||
* The subset of _processedMessages that is visible to the user.
|
||||
*/
|
||||
_visibleMessages: {
|
||||
type: Array,
|
||||
value() { return []; },
|
||||
@ -223,6 +223,7 @@
|
||||
* Computes message author's file comments for change's message.
|
||||
* Method uses this.messages to find next message and relies on messages
|
||||
* to be sorted by date field descending.
|
||||
*
|
||||
* @param {!Object} changeComments changeComment object, which includes
|
||||
* a method to get all published comments (including robot comments),
|
||||
* which returns a Hash of arrays of comments, filename as key.
|
||||
|
@ -18,10 +18,10 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
class GrRelatedChangesList extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.PatchSetBehavior,
|
||||
@ -166,6 +166,7 @@
|
||||
* Determines whether or not the given change has a parent change. If there
|
||||
* is a relation chain, and the change id is not the last item of the
|
||||
* relation chain, there is a parent.
|
||||
*
|
||||
* @param {number} currentChangeId
|
||||
* @param {!Array} relatedChanges
|
||||
* @return {boolean}
|
||||
@ -227,6 +228,7 @@
|
||||
/**
|
||||
* Do the given objects describe the same change? Compares the changes by
|
||||
* their numbers.
|
||||
*
|
||||
* @see /Documentation/rest-api-changes.html#change-info
|
||||
* @see /Documentation/rest-api-changes.html#related-change-and-commit-info
|
||||
* @param {!Object} a Either ChangeInfo or RelatedChangeAndCommitInfo
|
||||
@ -244,6 +246,7 @@
|
||||
* SubmittedTogetherInfo responses) or get the change number from a
|
||||
* RelatedChangeAndCommitInfo (such as those included in a
|
||||
* RelatedChangesInfo response).
|
||||
*
|
||||
* @see /Documentation/rest-api-changes.html#change-info
|
||||
* @see /Documentation/rest-api-changes.html#related-change-and-commit-info
|
||||
*
|
||||
|
@ -53,12 +53,12 @@
|
||||
const SEND_REPLY_TIMING_LABEL = 'SendReply';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
class GrReplyDialog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.BaseUrlBehavior,
|
||||
Gerrit.FireBehavior,
|
||||
@ -102,10 +102,10 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fires when the state of the send button (enabled/disabled) changes.
|
||||
*
|
||||
* @event send-disabled-changed
|
||||
*/
|
||||
* Fires when the state of the send button (enabled/disabled) changes.
|
||||
*
|
||||
* @event send-disabled-changed
|
||||
*/
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
@ -157,8 +157,8 @@
|
||||
},
|
||||
permittedLabels: Object,
|
||||
/**
|
||||
* @type {{ commentlinks: Array }}
|
||||
*/
|
||||
* @type {{ commentlinks: Array }}
|
||||
*/
|
||||
projectConfig: Object,
|
||||
knownLatestState: String,
|
||||
underReview: {
|
||||
@ -641,6 +641,7 @@
|
||||
* Generates a function to filter out reviewer/CC entries. When isCCs is
|
||||
* truthy, the function filters out entries that already exist in this._ccs.
|
||||
* When falsy, the function filters entries that exist in this._reviewers.
|
||||
*
|
||||
* @param {boolean} isCCs
|
||||
* @return {!Function}
|
||||
*/
|
||||
|
@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrReviewerList extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
@ -110,6 +110,7 @@
|
||||
|
||||
/**
|
||||
* Returns hash of labels to max permitted score.
|
||||
*
|
||||
* @param {!Object} change
|
||||
* @returns {!Object} labels to max permitted scores hash
|
||||
*/
|
||||
@ -124,6 +125,7 @@
|
||||
|
||||
/**
|
||||
* Returns max permitted score for reviewer.
|
||||
*
|
||||
* @param {!Object} reviewer
|
||||
* @param {!Object} change
|
||||
* @param {string} label
|
||||
|
@ -65,6 +65,7 @@
|
||||
* - Unresolved threads without drafts (reverse chronological)
|
||||
* - Resolved threads with drafts (reverse chronological)
|
||||
* - Resolved threads without drafts (reverse chronological)
|
||||
*
|
||||
* @param {!Object} changeRecord
|
||||
*/
|
||||
_computeSortedThreads(changeRecord) {
|
||||
|
@ -28,8 +28,8 @@
|
||||
];
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrUploadHelpDialog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -20,8 +20,8 @@
|
||||
const INTERPOLATE_URL_PATTERN = /\$\{([\w]+)\}/g;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.DisplayNameMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.DisplayNameMixin
|
||||
*/
|
||||
class GrAccountDropdown extends Polymer.mixinBehaviors( [
|
||||
Gerrit.DisplayNameBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -26,9 +26,9 @@
|
||||
const AUTHENTICATION_REQUIRED = 'Authentication required\n';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrErrorManager extends Polymer.mixinBehaviors( [
|
||||
Gerrit.BaseUrlBehavior,
|
||||
Gerrit.FireBehavior,
|
||||
@ -55,8 +55,8 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* The time (in milliseconds) since the most recent credential check.
|
||||
*/
|
||||
* The time (in milliseconds) since the most recent credential check.
|
||||
*/
|
||||
_lastCredentialCheck: {
|
||||
type: Number,
|
||||
value() { return Date.now(); },
|
||||
|
@ -20,9 +20,9 @@
|
||||
const {ShortcutSection} = window.Gerrit.KeyboardShortcutBinder;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
*/
|
||||
class GrKeyboardShortcutsDialog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.KeyboardShortcutBehavior,
|
||||
|
@ -70,11 +70,11 @@
|
||||
]);
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.AdminNavMixin
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.DocsUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.AdminNavMixin
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.DocsUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrMainHeader extends Polymer.mixinBehaviors( [
|
||||
Gerrit.AdminNavBehavior,
|
||||
Gerrit.BaseUrlBehavior,
|
||||
|
@ -224,6 +224,7 @@ limitations under the License.
|
||||
|
||||
/**
|
||||
* Setup router implementation.
|
||||
*
|
||||
* @param {function(!string)} navigate the router-abstracted equivalent of
|
||||
* `window.location.href = ...`. Takes a string.
|
||||
* @param {function(!Object): string} generateUrl generates a URL given
|
||||
@ -260,6 +261,7 @@ limitations under the License.
|
||||
|
||||
/**
|
||||
* Generate a URL for the given route parameters.
|
||||
*
|
||||
* @param {Object} params
|
||||
* @return {string}
|
||||
*/
|
||||
@ -336,6 +338,7 @@ limitations under the License.
|
||||
|
||||
/**
|
||||
* Navigate to a search for changes with the given status.
|
||||
*
|
||||
* @param {string} status
|
||||
*/
|
||||
navigateToStatusSearch(status) {
|
||||
@ -347,6 +350,7 @@ limitations under the License.
|
||||
|
||||
/**
|
||||
* Navigate to a search query
|
||||
*
|
||||
* @param {string} query
|
||||
* @param {number=} opt_offset
|
||||
*/
|
||||
@ -548,6 +552,7 @@ limitations under the License.
|
||||
|
||||
/**
|
||||
* Navigate to an arbitrary relative URL.
|
||||
*
|
||||
* @param {string} relativeUrl
|
||||
*/
|
||||
navigateToRelativeUrl(relativeUrl) {
|
||||
@ -570,6 +575,7 @@ limitations under the License.
|
||||
|
||||
/**
|
||||
* Navigate to a repo settings page.
|
||||
*
|
||||
* @param {string} repoName
|
||||
*/
|
||||
navigateToRepo(repoName) {
|
||||
|
@ -212,6 +212,7 @@
|
||||
|
||||
/**
|
||||
* The default reporter reports events immediately.
|
||||
*
|
||||
* @param {string} type
|
||||
* @param {string} category
|
||||
* @param {string} eventName
|
||||
@ -254,6 +255,7 @@
|
||||
/**
|
||||
* The caching reporter will queue reports until plugins have loaded, and
|
||||
* log events immediately if they're reported after plugins have loaded.
|
||||
*
|
||||
* @param {string} type
|
||||
* @param {string} category
|
||||
* @param {string} eventName
|
||||
@ -437,6 +439,7 @@
|
||||
/**
|
||||
* Reports just line timeEnd, but additionally reports an average given a
|
||||
* denominator and a separate reporiting name for the average.
|
||||
*
|
||||
* @param {string} name Timing name.
|
||||
* @param {string} averageName Average timing name.
|
||||
* @param {number} denominator Number by which to divide the total to
|
||||
@ -455,6 +458,7 @@
|
||||
|
||||
/**
|
||||
* Send a timing report with an arbitrary time value.
|
||||
*
|
||||
* @param {string} name Timing name.
|
||||
* @param {number} time The time to report as an integer of milliseconds.
|
||||
*/
|
||||
@ -467,6 +471,7 @@
|
||||
* Get a timer object to for reporing a user timing. The start time will be
|
||||
* the time that the object has been created, and the end time will be the
|
||||
* time that the "end" method is called on the object.
|
||||
*
|
||||
* @param {string} name Timing name.
|
||||
* @returns {!Object} The timer object.
|
||||
*/
|
||||
@ -513,6 +518,7 @@
|
||||
|
||||
/**
|
||||
* Log timing information for an RPC.
|
||||
*
|
||||
* @param {string} anonymizedUrl The URL of the RPC with tokens obfuscated.
|
||||
* @param {number} elapsed The time elapsed of the RPC.
|
||||
*/
|
||||
|
@ -106,6 +106,7 @@
|
||||
|
||||
/**
|
||||
* Support vestigial params from GWT UI.
|
||||
*
|
||||
* @see Issue 7673.
|
||||
* @type {!RegExp}
|
||||
*/
|
||||
@ -162,6 +163,7 @@
|
||||
* the hash of diff URLs. In this format, a number on its own indicates that
|
||||
* line number in the revision of the diff. A number prefixed by either an 'a'
|
||||
* or a 'b' indicates that line number of the base of the diff.
|
||||
*
|
||||
* @type {RegExp}
|
||||
*/
|
||||
const LINE_ADDRESS_PATTERN = /^([ab]?)(\d+)$/;
|
||||
@ -208,11 +210,11 @@
|
||||
})();
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
class GrRouter extends Polymer.mixinBehaviors( [
|
||||
Gerrit.BaseUrlBehavior,
|
||||
Gerrit.FireBehavior,
|
||||
@ -547,6 +549,7 @@
|
||||
* Given an object of parameters, potentially including a `patchNum` or a
|
||||
* `basePatchNum` or both, return a string representation of that range. If
|
||||
* no range is indicated in the params, the empty string is returned.
|
||||
*
|
||||
* @param {!Object} params
|
||||
* @return {string}
|
||||
*/
|
||||
@ -613,6 +616,7 @@
|
||||
/**
|
||||
* Redirect the user to login using the given return-URL for redirection
|
||||
* after authentication success.
|
||||
*
|
||||
* @param {string} returnUrl
|
||||
*/
|
||||
_redirectToLogin(returnUrl) {
|
||||
@ -625,6 +629,7 @@
|
||||
* Hashes parsed by page.js exclude "inner" hashes, so a URL like "/a#b#c"
|
||||
* is parsed to have a hash of "b" rather than "b#c". Instead, this method
|
||||
* parses hashes correctly. Will return an empty string if there is no hash.
|
||||
*
|
||||
* @param {!string} canonicalPath
|
||||
* @return {!string} Everything after the first '#' ("a#b#c" -> "b#c").
|
||||
*/
|
||||
@ -645,6 +650,7 @@
|
||||
* Check to see if the user is logged in and return a promise that only
|
||||
* resolves if the user is logged in. If the user us not logged in, the
|
||||
* promise is rejected and the page is redirected to the login flow.
|
||||
*
|
||||
* @param {!Object} data The parsed route data.
|
||||
* @return {!Promise<!Object>} A promise yielding the original route data
|
||||
* (if it resolves).
|
||||
|
@ -104,9 +104,9 @@
|
||||
const TOKENIZE_REGEX = /(?:[^\s"]+|"[^"]*")+\s*/g;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
class GrSearchBar extends Polymer.mixinBehaviors( [
|
||||
Gerrit.KeyboardShortcutBehavior,
|
||||
Gerrit.URLEncodingBehavior,
|
||||
@ -215,6 +215,7 @@
|
||||
/**
|
||||
* Determine what array of possible suggestions should be provided
|
||||
* to _getSearchSuggestions.
|
||||
*
|
||||
* @param {string} input - The full search term, in lowercase.
|
||||
* @return {!Promise} This returns a promise that resolves to an array of
|
||||
* suggestion objects.
|
||||
@ -256,6 +257,7 @@
|
||||
|
||||
/**
|
||||
* Get the sorted, pruned list of suggestions for the current search query.
|
||||
*
|
||||
* @param {string} input - The complete search query.
|
||||
* @return {!Promise} This returns a promise that resolves to an array of
|
||||
* suggestions.
|
||||
|
@ -22,8 +22,8 @@
|
||||
const ME_EXPRESSION = 'me';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.DisplayNameMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.DisplayNameMixin
|
||||
*/
|
||||
class GrSmartSearch extends Polymer.mixinBehaviors( [
|
||||
Gerrit.DisplayNameBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
@ -76,6 +76,7 @@
|
||||
|
||||
/**
|
||||
* Fetch from the API the predicted projects.
|
||||
*
|
||||
* @param {string} predicate - The first part of the search term, e.g.
|
||||
* 'project'
|
||||
* @param {string} expression - The second part of the search term, e.g.
|
||||
@ -96,6 +97,7 @@
|
||||
|
||||
/**
|
||||
* Fetch from the API the predicted groups.
|
||||
*
|
||||
* @param {string} predicate - The first part of the search term, e.g.
|
||||
* 'ownerin'
|
||||
* @param {string} expression - The second part of the search term, e.g.
|
||||
@ -117,6 +119,7 @@
|
||||
|
||||
/**
|
||||
* Fetch from the API the predicted accounts.
|
||||
*
|
||||
* @param {string} predicate - The first part of the search term, e.g.
|
||||
* 'owner'
|
||||
* @param {string} expression - The second part of the search term, e.g.
|
||||
|
@ -406,12 +406,13 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* Whether the given comment should be included in the base side of the
|
||||
* given patch range.
|
||||
* @param {!Object} comment
|
||||
* @param {!Gerrit.PatchRange} range
|
||||
* @return {boolean}
|
||||
*/
|
||||
* Whether the given comment should be included in the base side of the
|
||||
* given patch range.
|
||||
*
|
||||
* @param {!Object} comment
|
||||
* @param {!Gerrit.PatchRange} range
|
||||
* @return {boolean}
|
||||
*/
|
||||
ChangeComments.prototype._isInBaseOfPatchRange = function(comment, range) {
|
||||
// If the base of the patch range is a parent of a merge, and the comment
|
||||
// appears on a specific parent then only show the comment if the parent
|
||||
@ -439,6 +440,7 @@
|
||||
/**
|
||||
* Whether the given comment should be included in the revision side of the
|
||||
* given patch range.
|
||||
*
|
||||
* @param {!Object} comment
|
||||
* @param {!Gerrit.PatchRange} range
|
||||
* @return {boolean}
|
||||
@ -451,6 +453,7 @@
|
||||
|
||||
/**
|
||||
* Whether the given comment should be included in the given patch range.
|
||||
*
|
||||
* @param {!Object} comment
|
||||
* @param {!Gerrit.PatchRange} range
|
||||
* @return {boolean|undefined}
|
||||
@ -461,8 +464,8 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
*/
|
||||
class GrCommentApi extends Polymer.mixinBehaviors( [
|
||||
Gerrit.PatchSetBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -41,13 +41,13 @@
|
||||
side: String,
|
||||
|
||||
/**
|
||||
* We keep track of the line number from the previous annotate() call,
|
||||
* and also of the index of the coverage range that had matched.
|
||||
* annotate() calls are coming in with increasing line numbers and
|
||||
* coverage ranges are sorted by line number. So this is a very simple
|
||||
* and efficient way for finding the coverage range that matches a given
|
||||
* line number.
|
||||
*/
|
||||
* We keep track of the line number from the previous annotate() call,
|
||||
* and also of the index of the coverage range that had matched.
|
||||
* annotate() calls are coming in with increasing line numbers and
|
||||
* coverage ranges are sorted by line number. So this is a very simple
|
||||
* and efficient way for finding the coverage range that matches a given
|
||||
* line number.
|
||||
*/
|
||||
_lineNumber: {
|
||||
type: Number,
|
||||
value: 0,
|
||||
|
@ -113,6 +113,7 @@ limitations under the License.
|
||||
* The promise last returned from `render()` while the asynchronous
|
||||
* rendering is running - `null` otherwise. Provides a `cancel()`
|
||||
* method that rejects it with `{isCancelled: true}`.
|
||||
*
|
||||
* @type {?Object}
|
||||
*/
|
||||
_cancelableRenderPromise: Object,
|
||||
|
@ -92,6 +92,7 @@
|
||||
|
||||
/**
|
||||
* Abstract method
|
||||
*
|
||||
* @param {string} outputEl
|
||||
* @param {number} fontSize
|
||||
*/
|
||||
@ -101,6 +102,7 @@
|
||||
|
||||
/**
|
||||
* Abstract method
|
||||
*
|
||||
* @param {Object} group
|
||||
*/
|
||||
GrDiffBuilder.prototype.buildSectionElement = function() {
|
||||
@ -469,6 +471,7 @@
|
||||
/**
|
||||
* Finds the next DIV.contentText element following the given element, and on
|
||||
* the same side. Will only search within a group.
|
||||
*
|
||||
* @param {HTMLElement} content
|
||||
* @param {string} side Either 'left' or 'right'
|
||||
* @return {HTMLElement}
|
||||
@ -480,6 +483,7 @@
|
||||
/**
|
||||
* Determines whether the given group is either totally an addition or totally
|
||||
* a removal.
|
||||
*
|
||||
* @param {!Object} group (GrDiffGroup)
|
||||
* @return {boolean}
|
||||
*/
|
||||
@ -492,6 +496,7 @@
|
||||
/**
|
||||
* Set the blame information for the diff. For any already-rendered line,
|
||||
* re-render its blame cell content.
|
||||
*
|
||||
* @param {Object} blame
|
||||
*/
|
||||
GrDiffBuilder.prototype.setBlame = function(blame) {
|
||||
@ -519,6 +524,7 @@
|
||||
|
||||
/**
|
||||
* Find the blame cell for a given line number.
|
||||
*
|
||||
* @param {number} lineNum
|
||||
* @return {HTMLTableDataCellElement}
|
||||
*/
|
||||
@ -531,6 +537,7 @@
|
||||
* Given a base line number, return the commit containing that line in the
|
||||
* current set of blame information. If no blame information has been
|
||||
* provided, null is returned.
|
||||
*
|
||||
* @param {number} lineNum
|
||||
* @return {Object} The commit information.
|
||||
*/
|
||||
@ -550,6 +557,7 @@
|
||||
/**
|
||||
* Given the number of a base line, get the content for the blame cell of that
|
||||
* line. If there is no blame information for that line, returns null.
|
||||
*
|
||||
* @param {number} lineNum
|
||||
* @param {Object=} opt_commit Optionally provide the commit object, so that
|
||||
* it does not need to be searched.
|
||||
@ -578,6 +586,7 @@
|
||||
/**
|
||||
* Create a blame cell for the given base line. Blame information will be
|
||||
* included in the cell if available.
|
||||
*
|
||||
* @param {GrDiffLine} line
|
||||
* @return {HTMLTableDataCellElement}
|
||||
*/
|
||||
|
@ -57,33 +57,33 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* The diff views to cursor through and listen to.
|
||||
*/
|
||||
* The diff views to cursor through and listen to.
|
||||
*/
|
||||
diffs: {
|
||||
type: Array,
|
||||
value() { return []; },
|
||||
},
|
||||
|
||||
/**
|
||||
* If set, the cursor will attempt to move to the line number (instead of
|
||||
* the first chunk) the next time the diff renders. It is set back to null
|
||||
* when used. It should be only used if you want the line to be focused
|
||||
* after initialization of the component and page should scroll
|
||||
* to that position. This parameter should be set at most for one gr-diff
|
||||
* element in the page.
|
||||
*
|
||||
* @type (?number)
|
||||
*/
|
||||
* If set, the cursor will attempt to move to the line number (instead of
|
||||
* the first chunk) the next time the diff renders. It is set back to null
|
||||
* when used. It should be only used if you want the line to be focused
|
||||
* after initialization of the component and page should scroll
|
||||
* to that position. This parameter should be set at most for one gr-diff
|
||||
* element in the page.
|
||||
*
|
||||
* @type {?number}
|
||||
*/
|
||||
initialLineNumber: {
|
||||
type: Number,
|
||||
value: null,
|
||||
},
|
||||
|
||||
/**
|
||||
* The scroll behavior for the cursor. Values are 'never' and
|
||||
* 'keep-visible'. 'keep-visible' will only scroll if the cursor is beyond
|
||||
* the viewport.
|
||||
*/
|
||||
* The scroll behavior for the cursor. Values are 'never' and
|
||||
* 'keep-visible'. 'keep-visible' will only scroll if the cursor is beyond
|
||||
* the viewport.
|
||||
*/
|
||||
_scrollBehavior: {
|
||||
type: String,
|
||||
value: ScrollBehavior.KEEP_VISIBLE,
|
||||
@ -201,6 +201,7 @@
|
||||
|
||||
/**
|
||||
* Get the line number element targeted by the cursor row and side.
|
||||
*
|
||||
* @return {?Element|undefined}
|
||||
*/
|
||||
getTargetLineElement() {
|
||||
@ -290,6 +291,7 @@
|
||||
* {leftSide: false, number: 123} for line 123 of the revision, or
|
||||
* {leftSide: true, number: 321} for line 321 of the base patch.
|
||||
* Returns null if an address is not available.
|
||||
*
|
||||
* @return {?Object}
|
||||
*/
|
||||
getAddress() {
|
||||
@ -414,6 +416,7 @@
|
||||
/**
|
||||
* Setup and tear down on-render listeners for any diffs that are added or
|
||||
* removed from the cursor.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
_diffsChanged(changeRecord) {
|
||||
|
@ -31,6 +31,7 @@
|
||||
/**
|
||||
* The DOM API textContent.length calculation is broken when the text
|
||||
* contains Unicode. See https://mathiasbynens.be/notes/javascript-unicode .
|
||||
*
|
||||
* @param {!Text} node text node.
|
||||
* @return {number} The length of the text.
|
||||
*/
|
||||
|
@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrDiffHighlight extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
@ -36,20 +36,20 @@
|
||||
},
|
||||
loggedIn: Boolean,
|
||||
/**
|
||||
* querySelector can return null, so needs to be nullable.
|
||||
*
|
||||
* @type {?HTMLElement}
|
||||
* */
|
||||
* querySelector can return null, so needs to be nullable.
|
||||
*
|
||||
* @type {?HTMLElement}
|
||||
* */
|
||||
_cachedDiffBuilder: Object,
|
||||
|
||||
/**
|
||||
* Which range is currently selected by the user.
|
||||
* Stored in order to add a range-based comment
|
||||
* later.
|
||||
* undefined if no range is selected.
|
||||
*
|
||||
* @type {{side: string, range: Gerrit.Range}|undefined}
|
||||
*/
|
||||
* Which range is currently selected by the user.
|
||||
* Stored in order to add a range-based comment
|
||||
* later.
|
||||
* undefined if no range is selected.
|
||||
*
|
||||
* @type {{side: string, range: Gerrit.Range}|undefined}
|
||||
*/
|
||||
selectedRange: {
|
||||
type: Object,
|
||||
notify: true,
|
||||
@ -162,6 +162,7 @@
|
||||
* Merges multiple ranges, accounts for triple click, accounts for
|
||||
* syntax highligh, convert native DOM Range objects to Gerrit concepts
|
||||
* (line, side, etc).
|
||||
*
|
||||
* @param {Selection} selection
|
||||
* @return {({
|
||||
* start: {
|
||||
@ -197,6 +198,7 @@
|
||||
|
||||
/**
|
||||
* Normalize a specific DOM Range.
|
||||
*
|
||||
* @return {!Object} fixed normalized range
|
||||
*/
|
||||
_normalizeRange(domRange) {
|
||||
|
@ -97,6 +97,7 @@
|
||||
/**
|
||||
* The DOM API textContent.length calculation is broken when the text
|
||||
* contains Unicode. See https://mathiasbynens.be/notes/javascript-unicode .
|
||||
*
|
||||
* @param {text} node A text node.
|
||||
* @return {number} The length of the text.
|
||||
*/
|
||||
|
@ -69,9 +69,9 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
*/
|
||||
/**
|
||||
* Wrapper around gr-diff.
|
||||
*
|
||||
@ -87,6 +87,7 @@
|
||||
static get is() { return 'gr-diff-host'; }
|
||||
/**
|
||||
* Fired when the user selects a line.
|
||||
*
|
||||
* @event line-selected
|
||||
*/
|
||||
|
||||
@ -155,20 +156,21 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* Special line number which should not be collapsed into a shared region.
|
||||
* @type {{
|
||||
* number: number,
|
||||
* leftSide: {boolean}
|
||||
* }|null}
|
||||
*/
|
||||
* Special line number which should not be collapsed into a shared region.
|
||||
*
|
||||
* @type {{
|
||||
* number: number,
|
||||
* leftSide: {boolean}
|
||||
* }|null}
|
||||
*/
|
||||
lineOfInterest: Object,
|
||||
|
||||
/**
|
||||
* If the diff fails to load, show the failure message in the diff rather
|
||||
* than bubbling the error up to the whole page. This is useful for when
|
||||
* loading inline diffs because one diff failing need not mark the whole
|
||||
* page with a failure.
|
||||
*/
|
||||
* If the diff fails to load, show the failure message in the diff rather
|
||||
* than bubbling the error up to the whole page. This is useful for when
|
||||
* loading inline diffs because one diff failing need not mark the whole
|
||||
* page with a failure.
|
||||
*/
|
||||
showLoadFailure: Boolean,
|
||||
|
||||
isBlameLoaded: {
|
||||
@ -198,8 +200,8 @@
|
||||
/** @type {?Object} */
|
||||
_revisionImage: Object,
|
||||
/**
|
||||
* This is a DiffInfo object.
|
||||
*/
|
||||
* This is a DiffInfo object.
|
||||
*/
|
||||
diff: {
|
||||
type: Object,
|
||||
notify: true,
|
||||
@ -212,8 +214,8 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* @type {!Array<!Gerrit.CoverageRange>}
|
||||
*/
|
||||
* @type {!Array<!Gerrit.CoverageRange>}
|
||||
*/
|
||||
_coverageRanges: {
|
||||
type: Array,
|
||||
value: () => [],
|
||||
@ -454,6 +456,7 @@
|
||||
|
||||
/**
|
||||
* Load and display blame information for the base of the diff.
|
||||
*
|
||||
* @return {Promise} A promise that resolves when blame finishes rendering.
|
||||
*/
|
||||
loadBlame() {
|
||||
@ -476,6 +479,7 @@
|
||||
|
||||
/**
|
||||
* The thread elements in this diff, in no particular order.
|
||||
*
|
||||
* @return {!Array<!HTMLElement>}
|
||||
*/
|
||||
getThreadEls() {
|
||||
|
@ -30,9 +30,9 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* If set to true, the user's preference will be updated every time a
|
||||
* button is tapped. Don't set to true if there is no user.
|
||||
*/
|
||||
* If set to true, the user's preference will be updated every time a
|
||||
* button is tapped. Don't set to true if there is no user.
|
||||
*/
|
||||
saveOnChange: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
|
@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrDiffPreferencesDialog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -73,30 +73,30 @@
|
||||
return {
|
||||
|
||||
/**
|
||||
* The amount of context around collapsed groups.
|
||||
*/
|
||||
* The amount of context around collapsed groups.
|
||||
*/
|
||||
context: Number,
|
||||
|
||||
/**
|
||||
* The array of groups output by the processor.
|
||||
*/
|
||||
* The array of groups output by the processor.
|
||||
*/
|
||||
groups: {
|
||||
type: Array,
|
||||
notify: true,
|
||||
},
|
||||
|
||||
/**
|
||||
* Locations that should not be collapsed, including the locations of
|
||||
* comments.
|
||||
*/
|
||||
* Locations that should not be collapsed, including the locations of
|
||||
* comments.
|
||||
*/
|
||||
keyLocations: {
|
||||
type: Object,
|
||||
value() { return {left: {}, right: {}}; },
|
||||
},
|
||||
|
||||
/**
|
||||
* The maximum number of lines to process synchronously.
|
||||
*/
|
||||
* The maximum number of lines to process synchronously.
|
||||
*/
|
||||
_asyncThreshold: {
|
||||
type: Number,
|
||||
value: 64,
|
||||
@ -105,11 +105,12 @@
|
||||
/** @type {?number} */
|
||||
_nextStepHandle: Number,
|
||||
/**
|
||||
* The promise last returned from `process()` while the asynchronous
|
||||
* processing is running - `null` otherwise. Provides a `cancel()`
|
||||
* method that rejects it with `{isCancelled: true}`.
|
||||
* @type {?Object}
|
||||
*/
|
||||
* The promise last returned from `process()` while the asynchronous
|
||||
* processing is running - `null` otherwise. Provides a `cancel()`
|
||||
* method that rejects it with `{isCancelled: true}`.
|
||||
*
|
||||
* @type {?Object}
|
||||
*/
|
||||
_processPromise: {
|
||||
type: Object,
|
||||
value: null,
|
||||
@ -139,6 +140,7 @@
|
||||
/**
|
||||
* Asynchronously process the diff chunks into groups. As it processes, it
|
||||
* will splice groups into the `groups` property of the component.
|
||||
*
|
||||
* @param {!Array<!Gerrit.DiffChunk>} chunks
|
||||
* @param {boolean} isBinary
|
||||
* @return {!Promise<!Array<!Object>>} A promise that resolves with an
|
||||
@ -464,6 +466,7 @@
|
||||
* In order to show key locations, such as comments, out of the bounds of
|
||||
* the selected context, treat them as separate chunks within the model so
|
||||
* that the content (and context surrounding it) renders correctly.
|
||||
*
|
||||
* @param {!Array<!Object>} chunks DiffContents as returned from server.
|
||||
* @return {!Array<!Object>} Finer grained DiffContents.
|
||||
*/
|
||||
@ -607,6 +610,7 @@
|
||||
* If a group is an addition or a removal, break it down into smaller groups
|
||||
* of that type using the MAX_GROUP_SIZE. If the group is a shared chunk
|
||||
* or a delta it is returned as the single element of the result array.
|
||||
*
|
||||
* @param {!Gerrit.DiffChunk} chunk A raw chunk from a diff response.
|
||||
* @return {!Array<!Array<!Object>>}
|
||||
*/
|
||||
@ -636,6 +640,7 @@
|
||||
/**
|
||||
* Given an array and a size, return an array of arrays where no inner array
|
||||
* is larger than that size, preserving the original order.
|
||||
*
|
||||
* @param {!Array<T>} array
|
||||
* @param {number} size
|
||||
* @return {!Array<!Array<T>>}
|
||||
|
@ -31,8 +31,8 @@
|
||||
const getNewCache = () => { return {left: null, right: null}; };
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.DomUtilMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.DomUtilMixin
|
||||
*/
|
||||
class GrDiffSelection extends Polymer.mixinBehaviors( [
|
||||
Gerrit.DomUtilBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
@ -131,6 +131,7 @@
|
||||
/**
|
||||
* Set the provided list of classes on the element, to the exclusion of all
|
||||
* other SelectionClass values.
|
||||
*
|
||||
* @param {!Array<!string>} targetClasses
|
||||
*/
|
||||
_setClasses(targetClasses) {
|
||||
|
@ -34,12 +34,12 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.PathListMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.PathListMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
class GrDiffView extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.KeyboardShortcutBehavior,
|
||||
@ -76,8 +76,8 @@
|
||||
value() { return document.body; },
|
||||
},
|
||||
/**
|
||||
* @type {{ diffMode: (string|undefined) }}
|
||||
*/
|
||||
* @type {{ diffMode: (string|undefined) }}
|
||||
*/
|
||||
changeViewState: {
|
||||
type: Object,
|
||||
notify: true,
|
||||
@ -97,20 +97,20 @@
|
||||
/** @type {?} */
|
||||
_commitRange: Object,
|
||||
/**
|
||||
* @type {{
|
||||
* subject: string,
|
||||
* project: string,
|
||||
* revisions: string,
|
||||
* }}
|
||||
*/
|
||||
* @type {{
|
||||
* subject: string,
|
||||
* project: string,
|
||||
* revisions: string,
|
||||
* }}
|
||||
*/
|
||||
_change: Object,
|
||||
/** @type {?} */
|
||||
_changeComments: Object,
|
||||
_changeNum: String,
|
||||
/**
|
||||
* This is a DiffInfo object.
|
||||
* This is retrieved and owned by a child component.
|
||||
*/
|
||||
* This is a DiffInfo object.
|
||||
* This is retrieved and owned by a child component.
|
||||
*/
|
||||
_diff: Object,
|
||||
// An array specifically formatted to be used in a gr-dropdown-list
|
||||
// element for selected a file to view.
|
||||
@ -152,17 +152,17 @@
|
||||
_filesWeblinks: Object,
|
||||
|
||||
/**
|
||||
* Map of paths in the current change and patch range that have comments
|
||||
* or drafts or robot comments.
|
||||
*/
|
||||
* Map of paths in the current change and patch range that have comments
|
||||
* or drafts or robot comments.
|
||||
*/
|
||||
_commentMap: Object,
|
||||
|
||||
_commentsForDiff: Object,
|
||||
|
||||
/**
|
||||
* Object to contain the path of the next and previous file in the current
|
||||
* change and patch range that has comments.
|
||||
*/
|
||||
* Object to contain the path of the next and previous file in the current
|
||||
* change and patch range that has comments.
|
||||
*/
|
||||
_commentSkips: {
|
||||
type: Object,
|
||||
computed: '_computeCommentSkips(_commentMap, _fileList, _path)',
|
||||
|
@ -36,6 +36,7 @@
|
||||
/**
|
||||
* True means all changes in this line are whitespace changes that should
|
||||
* not be highlighted as changed as per the user settings.
|
||||
*
|
||||
* @type{boolean}
|
||||
*/
|
||||
this.ignoredWhitespaceOnly = false;
|
||||
|
@ -37,7 +37,7 @@
|
||||
/** @type {boolean} */
|
||||
this.hasIntralineInfo = false;
|
||||
|
||||
/** @type Array<GrDiffLine.Highlights> */
|
||||
/** @type {!Array<GrDiffLine.Highlights>} */
|
||||
this.highlights = [];
|
||||
|
||||
/** @type {?Array<Object>} ?Array<!GrDiffGroup> */
|
||||
|
@ -92,9 +92,9 @@
|
||||
const RENDER_DIFF_TABLE_DEBOUNCE_NAME = 'renderDiffTable';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
*/
|
||||
class GrDiff extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.PatchSetBehavior,
|
||||
@ -104,6 +104,7 @@
|
||||
static get is() { return 'gr-diff'; }
|
||||
/**
|
||||
* Fired when the user selects a line.
|
||||
*
|
||||
* @event line-selected
|
||||
*/
|
||||
|
||||
@ -186,7 +187,7 @@
|
||||
observer: '_viewModeObserver',
|
||||
},
|
||||
|
||||
/** @type ?Gerrit.LineOfInterest */
|
||||
/** @type {?Gerrit.LineOfInterest} */
|
||||
lineOfInterest: Object,
|
||||
|
||||
loading: {
|
||||
@ -218,13 +219,13 @@
|
||||
revisionImage: Object,
|
||||
|
||||
/**
|
||||
* Whether the safety check for large diffs when whole-file is set has
|
||||
* been bypassed. If the value is null, then the safety has not been
|
||||
* bypassed. If the value is a number, then that number represents the
|
||||
* context preference to use when rendering the bypassed diff.
|
||||
*
|
||||
* @type (number|null)
|
||||
*/
|
||||
* Whether the safety check for large diffs when whole-file is set has
|
||||
* been bypassed. If the value is null, then the safety has not been
|
||||
* bypassed. If the value is a number, then that number represents the
|
||||
* context preference to use when rendering the bypassed diff.
|
||||
*
|
||||
* @type {number|null}
|
||||
*/
|
||||
_safetyBypass: {
|
||||
type: Number,
|
||||
value: null,
|
||||
@ -255,18 +256,20 @@
|
||||
_diffLength: Number,
|
||||
|
||||
/**
|
||||
* Observes comment nodes added or removed after the initial render.
|
||||
* Can be used to unregister when the entire diff is (re-)rendered or upon
|
||||
* detachment.
|
||||
* @type {?PolymerDomApi.ObserveHandle}
|
||||
*/
|
||||
* Observes comment nodes added or removed after the initial render.
|
||||
* Can be used to unregister when the entire diff is (re-)rendered or upon
|
||||
* detachment.
|
||||
*
|
||||
* @type {?PolymerDomApi.ObserveHandle}
|
||||
*/
|
||||
_incrementalNodeObserver: Object,
|
||||
|
||||
/**
|
||||
* Observes comment nodes added or removed at any point.
|
||||
* Can be used to unregister upon detachment.
|
||||
* @type {?PolymerDomApi.ObserveHandle}
|
||||
*/
|
||||
* Observes comment nodes added or removed at any point.
|
||||
* Can be used to unregister upon detachment.
|
||||
*
|
||||
* @type {?PolymerDomApi.ObserveHandle}
|
||||
*/
|
||||
_nodeObserver: Object,
|
||||
|
||||
/** Set by Polymer. */
|
||||
@ -610,6 +613,7 @@
|
||||
/**
|
||||
* Gets or creates a comment thread group for a specific line and side on a
|
||||
* diff.
|
||||
*
|
||||
* @param {!Object} contentEl
|
||||
* @param {!Gerrit.DiffSide} commentSide
|
||||
* @return {!Node}
|
||||
@ -909,6 +913,7 @@
|
||||
|
||||
/**
|
||||
* Find the last chunk for the given side.
|
||||
*
|
||||
* @param {!Object} diff
|
||||
* @param {boolean} leftSide true if checking the base of the diff,
|
||||
* false if testing the revision.
|
||||
@ -945,6 +950,7 @@
|
||||
|
||||
/**
|
||||
* Check whether the specified side of the diff has a trailing newline.
|
||||
*
|
||||
* @param {!Object} diff
|
||||
* @param {boolean} leftSide true if checking the base of the diff,
|
||||
* false if testing the revision.
|
||||
@ -995,6 +1001,7 @@
|
||||
/**
|
||||
* Get the approximate length of the diff as the sum of the maximum
|
||||
* length of the chunks.
|
||||
*
|
||||
* @param {Object} diff object
|
||||
* @return {number}
|
||||
*/
|
||||
|
@ -21,8 +21,8 @@
|
||||
const PATCH_DESC_MAX_LENGTH = 500;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
*/
|
||||
/**
|
||||
* Fired when the patch range changes
|
||||
*
|
||||
@ -186,6 +186,7 @@
|
||||
* The basePatchNum should always be <= patchNum -- because sortedRevisions
|
||||
* is sorted in reverse order (higher patchset nums first), invalid base
|
||||
* patch nums have an index greater than the index of patchNum.
|
||||
*
|
||||
* @param {number|string} basePatchNum The possible base patch num.
|
||||
* @param {number|string} patchNum The current selected patch num.
|
||||
* @param {!Array} sortedRevisions
|
||||
|
@ -63,6 +63,7 @@
|
||||
|
||||
/**
|
||||
* Layer method to add annotations to a line.
|
||||
*
|
||||
* @param {!HTMLElement} el The DIV.contentText element to apply the
|
||||
* annotation to.
|
||||
* @param {!HTMLElement} lineNumberEl
|
||||
@ -90,6 +91,7 @@
|
||||
|
||||
/**
|
||||
* Register a listener for layer updates.
|
||||
*
|
||||
* @param {function(number, number, string)} fn The update handler function.
|
||||
* Should accept as arguments the line numbers for the start and end of
|
||||
* the update and the side as a string.
|
||||
@ -100,6 +102,7 @@
|
||||
|
||||
/**
|
||||
* Notify Layer listeners of changes to annotations.
|
||||
*
|
||||
* @param {number} start The line where the update starts.
|
||||
* @param {number} end The line where the update ends.
|
||||
* @param {string} side The side of the update. ('left' or 'right')
|
||||
@ -113,6 +116,7 @@
|
||||
/**
|
||||
* Handle change in the ranges by updating the ranges maps and by
|
||||
* emitting appropriate update notifications.
|
||||
*
|
||||
* @param {Object} record The change record.
|
||||
*/
|
||||
_handleCommentRangesChange(record) {
|
||||
|
@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrSelectionActionBox extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -163,11 +163,12 @@
|
||||
/** @type {?number} */
|
||||
_processHandle: Number,
|
||||
/**
|
||||
* The promise last returned from `process()` while the asynchronous
|
||||
* processing is running - `null` otherwise. Provides a `cancel()`
|
||||
* method that rejects it with `{isCancelled: true}`.
|
||||
* @type {?Object}
|
||||
*/
|
||||
* The promise last returned from `process()` while the asynchronous
|
||||
* processing is running - `null` otherwise. Provides a `cancel()`
|
||||
* method that rejects it with `{isCancelled: true}`.
|
||||
*
|
||||
* @type {?Object}
|
||||
*/
|
||||
_processPromise: {
|
||||
type: Object,
|
||||
value: null,
|
||||
@ -187,6 +188,7 @@
|
||||
/**
|
||||
* Annotation layer method to add syntax annotations to the given element
|
||||
* for the given line.
|
||||
*
|
||||
* @param {!HTMLElement} el
|
||||
* @param {!HTMLElement} lineNumberEl
|
||||
* @param {!Object} line (GrDiffLine)
|
||||
@ -231,6 +233,7 @@
|
||||
/**
|
||||
* Start processing syntax for the loaded diff and notify layer listeners
|
||||
* as syntax info comes online.
|
||||
*
|
||||
* @return {Promise}
|
||||
*/
|
||||
process() {
|
||||
@ -328,6 +331,7 @@
|
||||
* Take a string of HTML with the (potentially nested) syntax markers
|
||||
* Highlight.js emits and emit a list of text ranges and classes for the
|
||||
* markers.
|
||||
*
|
||||
* @param {string} str The string of HTML.
|
||||
* @param {Map<string, !Array<!Object>>} rangesCache A map for caching
|
||||
* ranges for each string. A cache is read and written by this method.
|
||||
@ -372,6 +376,7 @@
|
||||
/**
|
||||
* For a given state, process the syntax for the next line (or pair of
|
||||
* lines).
|
||||
*
|
||||
* @param {!Object} state The processing state for the layer.
|
||||
*/
|
||||
_processNextLine(state, rangesCache) {
|
||||
@ -488,6 +493,7 @@
|
||||
|
||||
/**
|
||||
* Tells whether the state has exhausted its current section.
|
||||
*
|
||||
* @param {!Object} state
|
||||
* @return {boolean}
|
||||
*/
|
||||
@ -504,6 +510,7 @@
|
||||
/**
|
||||
* For a given state, notify layer listeners of any processed line ranges
|
||||
* that have not yet been notified.
|
||||
*
|
||||
* @param {!Object} state
|
||||
*/
|
||||
_notify(state) {
|
||||
|
@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.ListViewMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.ListViewMixin
|
||||
*/
|
||||
class GrDocumentationSearch extends Polymer.mixinBehaviors( [
|
||||
Gerrit.ListViewBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
*/
|
||||
class GrEditControls extends Polymer.mixinBehaviors( [
|
||||
Gerrit.PatchSetBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
@ -33,11 +33,11 @@
|
||||
patchNum: String,
|
||||
|
||||
/**
|
||||
* TODO(kaspern): by default, the RESTORE action should be hidden in the
|
||||
* file-list as it is a per-file action only. Remove this default value
|
||||
* when the Actions dictionary is moved to a shared constants file and
|
||||
* use the hiddenActions property in the parent component.
|
||||
*/
|
||||
* TODO(kaspern): by default, the RESTORE action should be hidden in the
|
||||
* file-list as it is a per-file action only. Remove this default value
|
||||
* when the Actions dictionary is moved to a shared constants file and
|
||||
* use the hiddenActions property in the parent component.
|
||||
*/
|
||||
hiddenActions: {
|
||||
type: Array,
|
||||
value() { return [GrEditConstants.Actions.RESTORE.id]; },
|
||||
@ -117,6 +117,7 @@
|
||||
|
||||
/**
|
||||
* Given a path string, checks that it is a valid file path.
|
||||
*
|
||||
* @param {string} path
|
||||
* @return {boolean}
|
||||
*/
|
||||
@ -131,6 +132,7 @@
|
||||
|
||||
/**
|
||||
* Given a dom event, gets the dialog that lies along this event path.
|
||||
*
|
||||
* @param {!Event} e
|
||||
* @return {!Element|undefined}
|
||||
*/
|
||||
|
@ -25,11 +25,11 @@
|
||||
const STORAGE_DEBOUNCE_INTERVAL_MS = 100;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.PathListMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.PathListMixin
|
||||
*/
|
||||
class GrEditorView extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.KeyboardShortcutBehavior,
|
||||
|
@ -18,9 +18,9 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
*/
|
||||
class GrAppElement extends Polymer.mixinBehaviors( [
|
||||
Gerrit.BaseUrlBehavior,
|
||||
Gerrit.KeyboardShortcutBehavior,
|
||||
@ -51,18 +51,19 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* The last time the g key was pressed in milliseconds (or a keydown event
|
||||
* was handled if the key is held down).
|
||||
* @type {number|null}
|
||||
*/
|
||||
* The last time the g key was pressed in milliseconds (or a keydown event
|
||||
* was handled if the key is held down).
|
||||
*
|
||||
* @type {number|null}
|
||||
*/
|
||||
_lastGKeyPressTimestamp: {
|
||||
type: Number,
|
||||
value: null,
|
||||
},
|
||||
|
||||
/**
|
||||
* @type {{ plugin: Object }}
|
||||
*/
|
||||
* @type {{ plugin: Object }}
|
||||
*/
|
||||
_serverConfig: Object,
|
||||
_version: String,
|
||||
_showChangeListView: Boolean,
|
||||
|
@ -28,6 +28,7 @@
|
||||
|
||||
/**
|
||||
* Returns true if the property is defined on wrapped element.
|
||||
*
|
||||
* @param {string} name
|
||||
* @return {boolean}
|
||||
*/
|
||||
|
@ -76,6 +76,7 @@
|
||||
/**
|
||||
* Get instance of last DOM hook element attached into the endpoint.
|
||||
* Returns a Promise, that's resolved when attachment is done.
|
||||
*
|
||||
* @return {!Promise<!Element>}
|
||||
*/
|
||||
GrDomHook.prototype.getLastAttached = function() {
|
||||
@ -108,6 +109,7 @@
|
||||
/**
|
||||
* Install a new callback to invoke when a new instance of DOM hook element
|
||||
* is attached.
|
||||
*
|
||||
* @param {function(Element)} callback
|
||||
*/
|
||||
GrDomHook.prototype.onAttached = function(callback) {
|
||||
|
@ -33,11 +33,12 @@
|
||||
value() { return new Map(); },
|
||||
},
|
||||
/**
|
||||
* This map prevents importing the same endpoint twice.
|
||||
* Without caching, if a plugin is loaded after the loaded plugins
|
||||
* callback fires, it will be imported twice and appear twice on the page.
|
||||
* @type {!Map}
|
||||
*/
|
||||
* This map prevents importing the same endpoint twice.
|
||||
* Without caching, if a plugin is loaded after the loaded plugins
|
||||
* callback fires, it will be imported twice and appear twice on the page.
|
||||
*
|
||||
* @type {!Map}
|
||||
*/
|
||||
_initializedPlugins: {
|
||||
type: Map,
|
||||
value() { return new Map(); },
|
||||
|
@ -25,6 +25,7 @@
|
||||
/**
|
||||
* Add a callback to arbitrary event.
|
||||
* The callback may return false to prevent event bubbling.
|
||||
*
|
||||
* @param {string} event Event name
|
||||
* @param {function(Event):boolean} callback
|
||||
* @return {function()} Unsubscribe function.
|
||||
@ -35,6 +36,7 @@
|
||||
|
||||
/**
|
||||
* Alias of onClick
|
||||
*
|
||||
* @see onClick
|
||||
*/
|
||||
GrEventHelper.prototype.onTap = function(callback) {
|
||||
@ -44,6 +46,7 @@
|
||||
/**
|
||||
* Add a callback to element click or touch.
|
||||
* The callback may return false to prevent event bubbling.
|
||||
*
|
||||
* @param {function(Event):boolean} callback
|
||||
* @return {function()} Unsubscribe function.
|
||||
*/
|
||||
@ -53,6 +56,7 @@
|
||||
|
||||
/**
|
||||
* Alias of captureClick
|
||||
*
|
||||
* @see captureClick
|
||||
*/
|
||||
GrEventHelper.prototype.captureTap = function(callback) {
|
||||
@ -64,6 +68,7 @@
|
||||
* Callback is installed on parent during capture phase.
|
||||
* https://www.w3.org/TR/DOM-Level-3-Events/#event-flow
|
||||
* The callback may return false to cancel regular event listeners.
|
||||
*
|
||||
* @param {function(Event):boolean} callback
|
||||
* @return {function()} Unsubscribe function.
|
||||
*/
|
||||
|
@ -22,6 +22,7 @@
|
||||
* Provides method for opening and closing popups from plugin.
|
||||
* opt_moduleName is a name of custom element that will be automatically
|
||||
* inserted on popup opening.
|
||||
*
|
||||
* @param {!Object} plugin
|
||||
* @param {opt_moduleName=} string
|
||||
*/
|
||||
@ -40,6 +41,7 @@
|
||||
* Opens the popup, inserts it into DOM over current UI.
|
||||
* Creates the popup if not previously created. Creates popup content element,
|
||||
* if it was provided with constructor.
|
||||
*
|
||||
* @returns {!Promise<!Object>}
|
||||
*/
|
||||
GrPopupInterface.prototype.open = function() {
|
||||
|
@ -33,6 +33,7 @@
|
||||
* if it hasn't been added yet. A root node is an document or is the
|
||||
* associated shadowRoot. This class can be added to any element with the same
|
||||
* root node.
|
||||
*
|
||||
* @param {HTMLElement} element The element to get class name for.
|
||||
* @return {string} Appropriate class name for the element is returned
|
||||
*/
|
||||
@ -56,6 +57,7 @@
|
||||
|
||||
/**
|
||||
* Apply shared style to the element.
|
||||
*
|
||||
* @param {HTMLElement} element The element to apply style for
|
||||
*/
|
||||
GrStyleObject.prototype.apply = function(element) {
|
||||
@ -67,9 +69,10 @@
|
||||
|
||||
/**
|
||||
* Creates a new GrStyleObject with specified style properties.
|
||||
*
|
||||
* @param {string} String with style properties.
|
||||
* @return {GrStyleObject}
|
||||
*/
|
||||
*/
|
||||
GrStylesApi.prototype.css = function(ruleStr) {
|
||||
return new GrStyleObject(ruleStr);
|
||||
};
|
||||
|
@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrAccountInfo extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user