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:
@@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrAccountChip extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.DisplayNameMixin
|
||||
* @appliesMixin Gerrit.TooltipMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.DisplayNameMixin
|
||||
* @appliesMixin Gerrit.TooltipMixin
|
||||
*/
|
||||
class GrAccountLabel extends Polymer.mixinBehaviors( [
|
||||
Gerrit.DisplayNameBehavior,
|
||||
Gerrit.TooltipBehavior,
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
*/
|
||||
class GrAccountLink extends Polymer.mixinBehaviors( [
|
||||
Gerrit.BaseUrlBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
const VALID_EMAIL_ALERT = 'Please input a valid email.';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrAccountList extends Polymer.mixinBehaviors( [
|
||||
// Used in the tests for gr-account-list and other elements tests.
|
||||
Gerrit.FireBehavior,
|
||||
@@ -52,6 +52,7 @@
|
||||
|
||||
/**
|
||||
* Returns suggestions and convert them to list item
|
||||
*
|
||||
* @type {Gerrit.GrSuggestionsProvider}
|
||||
*/
|
||||
suggestionsProvider: {
|
||||
@@ -60,6 +61,7 @@
|
||||
|
||||
/**
|
||||
* Needed for template checking since value is initially set to null.
|
||||
*
|
||||
* @type {?Object}
|
||||
*/
|
||||
pendingConfirmation: {
|
||||
@@ -91,6 +93,7 @@
|
||||
|
||||
/**
|
||||
* Returns suggestion items
|
||||
*
|
||||
* @type {!function(string): Promise<Array<Gerrit.GrSuggestionItem>>}
|
||||
*/
|
||||
_querySuggestions: {
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Polymer.IronFitMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Polymer.IronFitMixin
|
||||
*/
|
||||
class GrAutocompleteDropdown extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.KeyboardShortcutBehavior,
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
const DEBOUNCE_WAIT_MS = 200;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
*/
|
||||
class GrAutocomplete extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.KeyboardShortcutBehavior,
|
||||
@@ -54,16 +54,16 @@
|
||||
return {
|
||||
|
||||
/**
|
||||
* Query for requesting autocomplete suggestions. The function should
|
||||
* accept the input as a string parameter and return a promise. The
|
||||
* promise yields an array of suggestion objects with "name", "label",
|
||||
* "value" properties. The "name" property will be displayed in the
|
||||
* suggestion entry. The "label" property will, when specified, appear
|
||||
* next to the "name" as label text. The "value" property will be emitted
|
||||
* if that suggestion is selected.
|
||||
*
|
||||
* @type {function(string): Promise<?>}
|
||||
*/
|
||||
* Query for requesting autocomplete suggestions. The function should
|
||||
* accept the input as a string parameter and return a promise. The
|
||||
* promise yields an array of suggestion objects with "name", "label",
|
||||
* "value" properties. The "name" property will be displayed in the
|
||||
* suggestion entry. The "label" property will, when specified, appear
|
||||
* next to the "name" as label text. The "value" property will be emitted
|
||||
* if that suggestion is selected.
|
||||
*
|
||||
* @type {function(string): Promise<?>}
|
||||
*/
|
||||
query: {
|
||||
type: Function,
|
||||
value() {
|
||||
@@ -129,26 +129,26 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* Multi mode appends autocompleted entries to the value.
|
||||
* If false, autocompleted entries replace value.
|
||||
*/
|
||||
* Multi mode appends autocompleted entries to the value.
|
||||
* If false, autocompleted entries replace value.
|
||||
*/
|
||||
multi: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
},
|
||||
|
||||
/**
|
||||
* When true and uncommitted text is left in the autocomplete input after
|
||||
* blurring, the text will appear red.
|
||||
*/
|
||||
* When true and uncommitted text is left in the autocomplete input after
|
||||
* blurring, the text will appear red.
|
||||
*/
|
||||
warnUncommitted: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
},
|
||||
|
||||
/**
|
||||
* When true, querying for suggestions is not debounced w/r/t keypresses
|
||||
*/
|
||||
* When true, querying for suggestions is not debounced w/r/t keypresses
|
||||
*/
|
||||
noDebounce: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
@@ -235,6 +235,7 @@
|
||||
|
||||
/**
|
||||
* Set the text of the input without triggering the suggestion dropdown.
|
||||
*
|
||||
* @param {string} text The new text for the input.
|
||||
*/
|
||||
setText(text) {
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
*/
|
||||
class GrAvatar extends Polymer.mixinBehaviors( [
|
||||
Gerrit.BaseUrlBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Gerrit.TooltipMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Gerrit.TooltipMixin
|
||||
*/
|
||||
class GrButton extends Polymer.mixinBehaviors( [
|
||||
Gerrit.KeyboardShortcutBehavior,
|
||||
Gerrit.TooltipBehavior,
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
const NEWLINE_PATTERN = /\n/g;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Gerrit.PathListMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
* @appliesMixin Gerrit.PathListMixin
|
||||
*/
|
||||
class GrCommentThread extends Polymer.mixinBehaviors( [
|
||||
/**
|
||||
* Not used in this element rather other elements tests
|
||||
*/
|
||||
* Not used in this element rather other elements tests
|
||||
*/
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.KeyboardShortcutBehavior,
|
||||
Gerrit.PathListBehavior,
|
||||
@@ -49,25 +49,25 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* gr-comment-thread exposes the following attributes that allow a
|
||||
* diff widget like gr-diff to show the thread in the right location:
|
||||
*
|
||||
* line-num:
|
||||
* 1-based line number or undefined if it refers to the entire file.
|
||||
*
|
||||
* comment-side:
|
||||
* "left" or "right". These indicate which of the two diffed versions
|
||||
* the comment relates to. In the case of unified diff, the left
|
||||
* version is the one whose line number column is further to the left.
|
||||
*
|
||||
* range:
|
||||
* The range of text that the comment refers to (start_line,
|
||||
* start_character, end_line, end_character), serialized as JSON. If
|
||||
* set, range's end_line will have the same value as line-num. Line
|
||||
* numbers are 1-based, char numbers are 0-based. The start position
|
||||
* (start_line, start_character) is inclusive, and the end position
|
||||
* (end_line, end_character) is exclusive.
|
||||
*/
|
||||
* gr-comment-thread exposes the following attributes that allow a
|
||||
* diff widget like gr-diff to show the thread in the right location:
|
||||
*
|
||||
* line-num:
|
||||
* 1-based line number or undefined if it refers to the entire file.
|
||||
*
|
||||
* comment-side:
|
||||
* "left" or "right". These indicate which of the two diffed versions
|
||||
* the comment relates to. In the case of unified diff, the left
|
||||
* version is the one whose line number column is further to the left.
|
||||
*
|
||||
* range:
|
||||
* The range of text that the comment refers to (start_line,
|
||||
* start_character, end_line, end_character), serialized as JSON. If
|
||||
* set, range's end_line will have the same value as line-num. Line
|
||||
* numbers are 1-based, char numbers are 0-based. The start position
|
||||
* (start_line, start_character) is inclusive, and the end position
|
||||
* (end_line, end_character) is exclusive.
|
||||
*/
|
||||
static get properties() {
|
||||
return {
|
||||
changeNum: String,
|
||||
@@ -76,9 +76,9 @@
|
||||
value() { return []; },
|
||||
},
|
||||
/**
|
||||
* @type {?{start_line: number, start_character: number, end_line: number,
|
||||
* end_character: number}}
|
||||
*/
|
||||
* @type {?{start_line: number, start_character: number, end_line: number,
|
||||
* end_character: number}}
|
||||
*/
|
||||
range: {
|
||||
type: Object,
|
||||
reflectToAttribute: true,
|
||||
@@ -116,9 +116,9 @@
|
||||
computed: '_computeRootId(comments.*)',
|
||||
},
|
||||
/**
|
||||
* If this is true, the comment thread also needs to have the change and
|
||||
* line properties property set
|
||||
*/
|
||||
* If this is true, the comment thread also needs to have the change and
|
||||
* line properties property set
|
||||
*/
|
||||
showFilePath: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
@@ -512,6 +512,7 @@
|
||||
|
||||
/**
|
||||
* Load the project config when a project name has been provided.
|
||||
*
|
||||
* @param {string} name The project name.
|
||||
*/
|
||||
_projectNameChanged(name) {
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
const FILE = 'FILE';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
*/
|
||||
class GrComment extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.KeyboardShortcutBehavior,
|
||||
@@ -151,11 +151,11 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* Property for storing references to overlay elements. When the overlays
|
||||
* are moved to Gerrit.getRootElement() to be shown they are no-longer
|
||||
* children, so they can't be queried along the tree, so they are stored
|
||||
* here.
|
||||
*/
|
||||
* Property for storing references to overlay elements. When the overlays
|
||||
* are moved to Gerrit.getRootElement() to be shown they are no-longer
|
||||
* children, so they can't be queried along the tree, so they are stored
|
||||
* here.
|
||||
*/
|
||||
_overlays: {
|
||||
type: Object,
|
||||
value: () => ({}),
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrConfirmDeleteCommentDialog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
||||
@@ -37,22 +37,23 @@
|
||||
observer: '_updateIndex',
|
||||
},
|
||||
/**
|
||||
* @type (?Object)
|
||||
*/
|
||||
* @type {?Object}
|
||||
*/
|
||||
target: {
|
||||
type: Object,
|
||||
notify: true,
|
||||
observer: '_scrollToTarget',
|
||||
},
|
||||
/**
|
||||
* The height of content intended to be included with the target.
|
||||
* @type (?number)
|
||||
*/
|
||||
* The height of content intended to be included with the target.
|
||||
*
|
||||
* @type {?number}
|
||||
*/
|
||||
_targetHeight: Number,
|
||||
|
||||
/**
|
||||
* The index of the current target (if any). -1 otherwise.
|
||||
*/
|
||||
* The index of the current target (if any). -1 otherwise.
|
||||
*/
|
||||
index: {
|
||||
type: Number,
|
||||
value: -1,
|
||||
@@ -60,28 +61,29 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* The class to apply to the current target. Use null for no class.
|
||||
*/
|
||||
* The class to apply to the current target. Use null for no class.
|
||||
*/
|
||||
cursorTargetClass: {
|
||||
type: String,
|
||||
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.
|
||||
* TODO (beckysiegel) figure out why it can be undefined
|
||||
* @type (string|undefined)
|
||||
*/
|
||||
* The scroll behavior for the cursor. Values are 'never' and
|
||||
* 'keep-visible'. 'keep-visible' will only scroll if the cursor is beyond
|
||||
* the viewport.
|
||||
* TODO (beckysiegel) figure out why it can be undefined
|
||||
*
|
||||
* @type {string|undefined}
|
||||
*/
|
||||
scrollBehavior: {
|
||||
type: String,
|
||||
value: ScrollBehavior.NEVER,
|
||||
},
|
||||
|
||||
/**
|
||||
* When true, will call element.focus() during scrolling.
|
||||
*/
|
||||
* When true, will call element.focus() during scrolling.
|
||||
*/
|
||||
focusOnMove: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
@@ -96,6 +98,7 @@
|
||||
|
||||
/**
|
||||
* Move the cursor forward. Clipped to the ends of the stop list.
|
||||
*
|
||||
* @param {!Function=} opt_condition Optional stop condition. If a condition
|
||||
* is passed the cursor will continue to move in the specified direction
|
||||
* until the condition is met.
|
||||
@@ -117,6 +120,7 @@
|
||||
|
||||
/**
|
||||
* Set the cursor to an arbitrary element.
|
||||
*
|
||||
* @param {!HTMLElement} element
|
||||
* @param {boolean=} opt_noScroll prevent any potential scrolling in response
|
||||
* setting the cursor.
|
||||
@@ -164,6 +168,7 @@
|
||||
/**
|
||||
* Move the cursor forward or backward by delta. Clipped to the beginning or
|
||||
* end of stop list.
|
||||
*
|
||||
* @param {number} delta either -1 or 1.
|
||||
* @param {!Function=} opt_condition Optional stop condition. If a condition
|
||||
* is passed the cursor will continue to move in the specified direction
|
||||
@@ -220,6 +225,7 @@
|
||||
|
||||
/**
|
||||
* Get the next stop index indicated by the delta direction.
|
||||
*
|
||||
* @param {number} delta either -1 or 1.
|
||||
* @param {!Function=} opt_condition Optional stop condition.
|
||||
* @param {boolean=} opt_clipToTop When none of the next indices match, move
|
||||
@@ -270,6 +276,7 @@
|
||||
|
||||
/**
|
||||
* Calculate where the element is relative to the window.
|
||||
*
|
||||
* @param {!Object} target Target to scroll to.
|
||||
* @return {number} Distance to top of the target.
|
||||
*/
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.TooltipMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.TooltipMixin
|
||||
*/
|
||||
class GrDateFormatter extends Polymer.mixinBehaviors( [
|
||||
Gerrit.TooltipBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
@@ -54,14 +54,14 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* When true, the detailed date appears in a GR-TOOLTIP rather than in the
|
||||
* native browser tooltip.
|
||||
*/
|
||||
* When true, the detailed date appears in a GR-TOOLTIP rather than in the
|
||||
* native browser tooltip.
|
||||
*/
|
||||
hasTooltip: Boolean,
|
||||
|
||||
/**
|
||||
* The title to be used as the native tooltip or by the tooltip behavior.
|
||||
*/
|
||||
* The title to be used as the native tooltip or by the tooltip behavior.
|
||||
*/
|
||||
title: {
|
||||
type: String,
|
||||
reflectToAttribute: true,
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrDialog extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
class GrDownloadCommands extends Polymer.mixinBehaviors( [
|
||||
Gerrit.RESTClientBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
|
||||
/**
|
||||
* Handle a click on the iron-dropdown element.
|
||||
*
|
||||
* @param {!Event} e
|
||||
*/
|
||||
_handleDropdownClick(e) {
|
||||
@@ -94,6 +95,7 @@
|
||||
|
||||
/**
|
||||
* Handle a click on the button to open the dropdown.
|
||||
*
|
||||
* @param {!Event} e
|
||||
*/
|
||||
_showDropdownTapHandler(e) {
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
const REL_EXTERNAL = 'external';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
*/
|
||||
class GrDropdown extends Polymer.mixinBehaviors( [
|
||||
Gerrit.BaseUrlBehavior,
|
||||
Gerrit.KeyboardShortcutBehavior,
|
||||
@@ -57,8 +57,8 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* Style the dropdown trigger as a link (rather than a button).
|
||||
*/
|
||||
* Style the dropdown trigger as a link (rather than a button).
|
||||
*/
|
||||
link: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
@@ -70,17 +70,17 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* List the IDs of dropdown buttons to be disabled. (Note this only
|
||||
* diisables bittons and not link entries.)
|
||||
*/
|
||||
* List the IDs of dropdown buttons to be disabled. (Note this only
|
||||
* diisables bittons and not link entries.)
|
||||
*/
|
||||
disabledIds: {
|
||||
type: Array,
|
||||
value() { return []; },
|
||||
},
|
||||
|
||||
/**
|
||||
* The elements of the list.
|
||||
*/
|
||||
* The elements of the list.
|
||||
*/
|
||||
_listElements: {
|
||||
type: Array,
|
||||
value() { return []; },
|
||||
@@ -99,6 +99,7 @@
|
||||
|
||||
/**
|
||||
* Handle the up key.
|
||||
*
|
||||
* @param {!Event} e
|
||||
*/
|
||||
_handleUp(e) {
|
||||
@@ -113,6 +114,7 @@
|
||||
|
||||
/**
|
||||
* Handle the down key.
|
||||
*
|
||||
* @param {!Event} e
|
||||
*/
|
||||
_handleDown(e) {
|
||||
@@ -127,6 +129,7 @@
|
||||
|
||||
/**
|
||||
* Handle the tab key.
|
||||
*
|
||||
* @param {!Event} e
|
||||
*/
|
||||
_handleTab(e) {
|
||||
@@ -139,6 +142,7 @@
|
||||
|
||||
/**
|
||||
* Handle the enter key.
|
||||
*
|
||||
* @param {!Event} e
|
||||
*/
|
||||
_handleEnter(e) {
|
||||
@@ -157,6 +161,7 @@
|
||||
|
||||
/**
|
||||
* Handle a click on the iron-dropdown element.
|
||||
*
|
||||
* @param {!Event} e
|
||||
*/
|
||||
_handleDropdownClick(e) {
|
||||
@@ -165,6 +170,7 @@
|
||||
|
||||
/**
|
||||
* Hanlde a click on the button to open the dropdown.
|
||||
*
|
||||
* @param {!Event} e
|
||||
*/
|
||||
_dropdownTriggerTapHandler(e) {
|
||||
@@ -197,6 +203,7 @@
|
||||
|
||||
/**
|
||||
* Get the class for a top-content item based on the given boolean.
|
||||
*
|
||||
* @param {boolean} bold Whether the item is bold.
|
||||
* @return {string} The class for the top-content item.
|
||||
*/
|
||||
@@ -207,6 +214,7 @@
|
||||
/**
|
||||
* Build a URL for the given host and path. The base URL will be only added,
|
||||
* if it is not already included in the path.
|
||||
*
|
||||
* @param {!string} host
|
||||
* @param {!string} path
|
||||
* @return {!string} The scheme-relative URL.
|
||||
@@ -221,6 +229,7 @@
|
||||
* Build a scheme-relative URL for the current host. Will include the base
|
||||
* URL if one is present. Note: the URL will be scheme-relative but absolute
|
||||
* with regard to the host.
|
||||
*
|
||||
* @param {!string} path The path for the URL.
|
||||
* @return {!string} The scheme-relative URL.
|
||||
*/
|
||||
@@ -231,6 +240,7 @@
|
||||
|
||||
/**
|
||||
* Compute the URL for a link object.
|
||||
*
|
||||
* @param {!Object} link The object describing the link.
|
||||
* @return {!string} The URL.
|
||||
*/
|
||||
@@ -248,6 +258,7 @@
|
||||
* Compute the value for the rel attribute of an anchor for the given link
|
||||
* object. If the link has a target value, then the rel must be "noopener"
|
||||
* for security reasons.
|
||||
*
|
||||
* @param {!Object} link The object describing the link.
|
||||
* @return {?string} The rel value for the link.
|
||||
*/
|
||||
@@ -260,6 +271,7 @@
|
||||
|
||||
/**
|
||||
* Handle a click on an item of the dropdown.
|
||||
*
|
||||
* @param {!Event} e
|
||||
*/
|
||||
_handleItemTap(e) {
|
||||
@@ -275,6 +287,7 @@
|
||||
|
||||
/**
|
||||
* If a dropdown item is shown as a button, get the class for the button.
|
||||
*
|
||||
* @param {string} id
|
||||
* @param {!Object} disabledIdsRecord The change record for the disabled IDs
|
||||
* list.
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
const STORAGE_DEBOUNCE_INTERVAL_MS = 400;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrEditableContent extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
const AWAIT_STEP = 5;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
*/
|
||||
class GrEditableLabel extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.KeyboardShortcutBehavior,
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
constructor() {
|
||||
/**
|
||||
* Shared events map from name to the listeners.
|
||||
*
|
||||
* @type {!Object<string, Array<eventCallback>>}
|
||||
*/
|
||||
this._listenersMap = new Map();
|
||||
|
||||
@@ -39,13 +39,13 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* Initial offset from the top of the document, in pixels.
|
||||
*/
|
||||
* Initial offset from the top of the document, in pixels.
|
||||
*/
|
||||
_topInitial: Number,
|
||||
|
||||
/**
|
||||
* Current offset from the top of the window, in pixels.
|
||||
*/
|
||||
* Current offset from the top of the window, in pixels.
|
||||
*/
|
||||
_topLast: Number,
|
||||
|
||||
_headerHeight: Number,
|
||||
|
||||
@@ -252,6 +252,7 @@
|
||||
|
||||
/**
|
||||
* Map an array of block objects to an array of DOM nodes.
|
||||
*
|
||||
* @param {!Array<!Object>} blocks
|
||||
* @return {!Array<!HTMLElement>}
|
||||
*/
|
||||
|
||||
@@ -38,41 +38,41 @@
|
||||
_target: Object,
|
||||
|
||||
/**
|
||||
* Determines whether or not the hovercard is visible.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
* Determines whether or not the hovercard is visible.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
_isShowing: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
},
|
||||
/**
|
||||
* The `id` of the element that the hovercard is anchored to.
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
* The `id` of the element that the hovercard is anchored to.
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
for: {
|
||||
type: String,
|
||||
observer: '_forChanged',
|
||||
},
|
||||
|
||||
/**
|
||||
* The spacing between the top of the hovercard and the element it is
|
||||
* anchored to.
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
* The spacing between the top of the hovercard and the element it is
|
||||
* anchored to.
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
offset: {
|
||||
type: Number,
|
||||
value: 14,
|
||||
},
|
||||
|
||||
/**
|
||||
* Positions the hovercard to the top, right, bottom, left, bottom-left,
|
||||
* bottom-right, top-left, or top-right of its content.
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
* Positions the hovercard to the top, right, bottom, left, bottom-left,
|
||||
* bottom-right, top-left, or top-right of its content.
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
position: {
|
||||
type: String,
|
||||
value: 'bottom',
|
||||
@@ -80,10 +80,10 @@
|
||||
|
||||
container: Object,
|
||||
/**
|
||||
* ID for the container element.
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
* ID for the container element.
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
containerId: {
|
||||
type: String,
|
||||
value: 'gr-hovercard-container',
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
/**
|
||||
* Used to create a context for GrAnnotationActionsInterface.
|
||||
*
|
||||
* @param {HTMLElement} contentEl The DIV.contentText element of the line
|
||||
* content to apply the annotation to using annotateRange.
|
||||
* @param {HTMLElement} lineNumberEl The TD element of the line number to
|
||||
@@ -41,6 +42,7 @@
|
||||
|
||||
/**
|
||||
* Method to add annotations to a content line.
|
||||
*
|
||||
* @param {number} offset The char offset where the update starts.
|
||||
* @param {number} length The number of chars that the update covers.
|
||||
* @param {GrStyleObject} styleObject The style object for the range.
|
||||
@@ -56,6 +58,7 @@
|
||||
|
||||
/**
|
||||
* Method to add a CSS class to the line number TD element.
|
||||
*
|
||||
* @param {GrStyleObject} styleObject The style object for the range.
|
||||
* @param {string} side The side of the update. ('left' or 'right')
|
||||
*/
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
* GrAnnotationActionsContext.annotateRange and
|
||||
* GrAnnotationActionsContext.annotateLineNumber to apply a CSS class to the
|
||||
* line content or the line number.
|
||||
*
|
||||
* @param {function(GrAnnotationActionsContext)} addLayerFunc The function
|
||||
* that will be called when the AnnotationLayer is ready to annotate.
|
||||
*/
|
||||
@@ -48,6 +49,7 @@
|
||||
/**
|
||||
* The specified function will be called with a notify function for the plugin
|
||||
* to call when it has all required data for annotation. Optional.
|
||||
*
|
||||
* @param {function(function(String, Number, Number, String))} notifyFunc See
|
||||
* doc of the notify function below to see what it does.
|
||||
*/
|
||||
@@ -129,6 +131,7 @@
|
||||
* The notify function will call the listeners of all required annotation
|
||||
* layers. Intended to be called by the plugin when all required data for
|
||||
* annotation is available.
|
||||
*
|
||||
* @param {String} path The file path whose listeners should be notified.
|
||||
* @param {Number} start The line where the update starts.
|
||||
* @param {Number} end The line where the update ends.
|
||||
@@ -149,6 +152,7 @@
|
||||
/**
|
||||
* Should be called to register annotation layers by the framework. Not
|
||||
* intended to be called by plugins.
|
||||
*
|
||||
* @param {String} path The file path (eg: /COMMIT_MSG').
|
||||
* @param {String} changeNum The Gerrit change number.
|
||||
* @param {String} patchNum The Gerrit patch number.
|
||||
@@ -163,6 +167,7 @@
|
||||
|
||||
/**
|
||||
* Used to create an instance of the Annotation Layer interface.
|
||||
*
|
||||
* @param {String} path The file path (eg: /COMMIT_MSG').
|
||||
* @param {String} changeNum The Gerrit change number.
|
||||
* @param {String} patchNum The Gerrit patch number.
|
||||
@@ -180,6 +185,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.
|
||||
@@ -190,6 +196,7 @@
|
||||
|
||||
/**
|
||||
* Layer method to add annotations to a line.
|
||||
*
|
||||
* @param {HTMLElement} contentEl The DIV.contentText element of the line
|
||||
* content to apply the annotation to using annotateRange.
|
||||
* @param {HTMLElement} lineNumberEl The TD element of the line number to
|
||||
@@ -205,6 +212,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')
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
/**
|
||||
* Retrieves the name of the plugin base on the url.
|
||||
*
|
||||
* @param {string|URL} url
|
||||
*/
|
||||
function getPluginNameFromUrl(url) {
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
/**
|
||||
* Ensure GrChangeActionsInterface instance has access to gr-change-actions
|
||||
* element and retrieve if the interface was created before element.
|
||||
*
|
||||
* @param {!GrChangeActionsInterface} api
|
||||
*/
|
||||
function ensureEl(api) {
|
||||
@@ -32,6 +33,7 @@
|
||||
|
||||
/**
|
||||
* Set gr-change-actions element to a GrChangeActionsInterface instance.
|
||||
*
|
||||
* @param {!GrChangeActionsInterface} api
|
||||
* @param {!Element} el gr-change-actions
|
||||
*/
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
/**
|
||||
* Ensure GrChangeReplyInterface instance has access to gr-reply-dialog
|
||||
* element and retrieve if the interface was created before element.
|
||||
*
|
||||
* @param {!GrChangeReplyInterfaceOld} api
|
||||
*/
|
||||
function ensureEl(api) {
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* This defines the Gerrit instance. All methods directly attached to Gerrit
|
||||
* should be defined or linked here.
|
||||
*/
|
||||
* This defines the Gerrit instance. All methods directly attached to Gerrit
|
||||
* should be defined or linked here.
|
||||
*/
|
||||
|
||||
(function(window) {
|
||||
'use strict';
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
*/
|
||||
class GrJsApiInterface extends Polymer.mixinBehaviors( [
|
||||
Gerrit.PatchSetBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
/**
|
||||
* Get detailed information about modules registered with an extension
|
||||
* endpoint.
|
||||
*
|
||||
* @param {string} name Endpoint name.
|
||||
* @param {?{
|
||||
* type: (string|undefined),
|
||||
@@ -112,6 +113,7 @@
|
||||
|
||||
/**
|
||||
* Get detailed module names for instantiating at the endpoint.
|
||||
*
|
||||
* @param {string} name Endpoint name.
|
||||
* @param {?{
|
||||
* type: (string|undefined),
|
||||
@@ -129,6 +131,7 @@
|
||||
|
||||
/**
|
||||
* Get .html plugin URLs with element and module definitions.
|
||||
*
|
||||
* @param {string} name Endpoint name.
|
||||
* @param {?{
|
||||
* type: (string|undefined),
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
|
||||
/**
|
||||
* Use the plugin name or use the full url if not recognized.
|
||||
*
|
||||
* @see gr-api-utils#getPluginNameFromUrl
|
||||
* @param {string|URL} url
|
||||
*/
|
||||
@@ -283,6 +284,7 @@
|
||||
|
||||
/**
|
||||
* Checks if given plugin path/url is enabled or not.
|
||||
*
|
||||
* @param {string} pathOrUrl
|
||||
*/
|
||||
isPluginEnabled(pathOrUrl) {
|
||||
@@ -294,6 +296,7 @@
|
||||
|
||||
/**
|
||||
* Returns the plugin object with a given url.
|
||||
*
|
||||
* @param {string} pathOrUrl
|
||||
*/
|
||||
getPlugin(pathOrUrl) {
|
||||
@@ -303,6 +306,7 @@
|
||||
|
||||
/**
|
||||
* Checks if given plugin path/url is loaded or not.
|
||||
*
|
||||
* @param {string} pathOrUrl
|
||||
*/
|
||||
isPluginLoaded(pathOrUrl) {
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
|
||||
/**
|
||||
* Fetch and return native browser REST API Response.
|
||||
*
|
||||
* @param {string} method HTTP Method (GET, POST, etc)
|
||||
* @param {string} url URL without base path or plugin prefix
|
||||
* @param {Object=} payload Respected for POST and PUT only.
|
||||
@@ -76,6 +77,7 @@
|
||||
|
||||
/**
|
||||
* Fetch and parse REST API response, if request succeeds.
|
||||
*
|
||||
* @param {string} method HTTP Method (GET, POST, etc)
|
||||
* @param {string} url URL without base path or plugin prefix
|
||||
* @param {Object=} payload Respected for POST and PUT only.
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
/**
|
||||
* Registers an endpoint for the plugin.
|
||||
*/
|
||||
*/
|
||||
Plugin.prototype.registerCustomComponent = function(
|
||||
endpointName, opt_moduleName, opt_options) {
|
||||
return this._registerCustomComponent(endpointName, opt_moduleName,
|
||||
@@ -94,7 +94,7 @@
|
||||
*
|
||||
* Dynamic plugins are registered by specific prefix, such as
|
||||
* 'change-list-header'.
|
||||
*/
|
||||
*/
|
||||
Plugin.prototype.registerDynamicCustomComponent = function(
|
||||
endpointName, opt_moduleName, opt_options) {
|
||||
const fullEndpointName = `${endpointName}-${this.getPluginName()}`;
|
||||
@@ -222,6 +222,7 @@
|
||||
|
||||
/**
|
||||
* To make REST requests for plugin-provided endpoints, use
|
||||
*
|
||||
* @example
|
||||
* const pluginRestApi = plugin.restApi(plugin.url());
|
||||
*
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.TooltipMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.TooltipMixin
|
||||
*/
|
||||
class GrLabel extends Polymer.mixinBehaviors( [
|
||||
Gerrit.TooltipBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
return {
|
||||
|
||||
/**
|
||||
* Used just like the query property of gr-autocomplete.
|
||||
*
|
||||
* @type {function(string): Promise<?>}
|
||||
*/
|
||||
* Used just like the query property of gr-autocomplete.
|
||||
*
|
||||
* @type {function(string): Promise<?>}
|
||||
*/
|
||||
query: {
|
||||
type: Function,
|
||||
value() {
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
* Get the HLJS library. Returns a promise that resolves with a reference to
|
||||
* the library after it's been loaded. The promise resolves immediately if
|
||||
* it's already been loaded.
|
||||
*
|
||||
* @return {!Promise<Object>}
|
||||
*/
|
||||
getHLJS() {
|
||||
@@ -68,6 +69,7 @@
|
||||
/**
|
||||
* Loads the dark theme document. Returns a promise that resolves with a
|
||||
* custom-style DOM element.
|
||||
*
|
||||
* @return {!Promise<Element>}
|
||||
* @suppress {checkTypes}
|
||||
*/
|
||||
@@ -103,6 +105,7 @@
|
||||
/**
|
||||
* Get the HLJS library, assuming it has been loaded. Configure the library
|
||||
* if it hasn't already been configured.
|
||||
*
|
||||
* @return {!Object}
|
||||
*/
|
||||
_getHighlightLib() {
|
||||
@@ -118,6 +121,7 @@
|
||||
/**
|
||||
* Get the resource path used to load the application. If the application
|
||||
* was loaded through a CDN, then this will be the path to CDN resources.
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
_getLibRoot() {
|
||||
@@ -129,6 +133,7 @@
|
||||
|
||||
/**
|
||||
* Load and execute a JS file from the lib root.
|
||||
*
|
||||
* @param {string} src The path to the JS file without the lib root.
|
||||
* @return {Promise} a promise that resolves when the script's onload
|
||||
* executes.
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.TooltipMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.TooltipMixin
|
||||
*/
|
||||
/*
|
||||
* The gr-limited-text element is for displaying text with a maximum length
|
||||
* (in number of characters) to display. If the length of the text exceeds the
|
||||
@@ -51,17 +51,17 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* Disable the tooltip.
|
||||
* When set to true, will not show tooltip even text is over limit
|
||||
*/
|
||||
* Disable the tooltip.
|
||||
* When set to true, will not show tooltip even text is over limit
|
||||
*/
|
||||
disableTooltip: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
},
|
||||
|
||||
/**
|
||||
* The maximum number of characters to display in the tooltop.
|
||||
*/
|
||||
* The maximum number of characters to display in the tooltop.
|
||||
*/
|
||||
tooltipLimit: {
|
||||
type: Number,
|
||||
value: 1024,
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrLinkedChip extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
const REQUEST_DEBOUNCE_INTERVAL_MS = 200;
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.BaseUrlMixin
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
class GrListView extends Polymer.mixinBehaviors( [
|
||||
Gerrit.BaseUrlBehavior,
|
||||
Gerrit.FireBehavior,
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
const BREAKPOINT_FULLSCREEN_OVERLAY = '50em';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrOverlay extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Polymer.IronOverlayBehavior,
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
const REF_PREFIX = 'refs/heads/';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.URLEncodingMixin
|
||||
*/
|
||||
class GrRepoBranchPicker extends Polymer.mixinBehaviors( [
|
||||
Gerrit.URLEncodingBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
/**
|
||||
* Get or upgrade fetch options to include an ETag in a request.
|
||||
*
|
||||
* @param {string} url The URL being fetched.
|
||||
* @param {!Object=} opt_options Optional options object in which to include
|
||||
* the ETag request header. If omitted, the result will be a fresh option
|
||||
@@ -77,6 +78,7 @@
|
||||
|
||||
/**
|
||||
* Get the cached payload for a given URL.
|
||||
*
|
||||
* @param {string} url
|
||||
* @return {string|undefined} Returns the unparsed JSON payload from the
|
||||
* cache.
|
||||
|
||||
@@ -40,11 +40,11 @@
|
||||
'/revisions/*';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.PathListMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.PathListMixin
|
||||
* @appliesMixin Gerrit.PatchSetMixin
|
||||
* @appliesMixin Gerrit.RESTClientMixin
|
||||
*/
|
||||
class GrRestApiInterface extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.PathListBehavior,
|
||||
@@ -106,8 +106,8 @@
|
||||
value: new GrEtagDecorator(), // Share across instances.
|
||||
},
|
||||
/**
|
||||
* Used to maintain a mapping of changeNums to project names.
|
||||
*/
|
||||
* Used to maintain a mapping of changeNums to project names.
|
||||
*/
|
||||
_projectLookup: {
|
||||
type: Object,
|
||||
value: {}, // Intentional to share the object across instances.
|
||||
@@ -1004,6 +1004,7 @@
|
||||
|
||||
/**
|
||||
* Inserts a change into _projectLookup iff it has a valid structure.
|
||||
*
|
||||
* @param {?{ _number: (number|string) }} change
|
||||
*/
|
||||
_maybeInsertInLookup(change) {
|
||||
@@ -1206,6 +1207,7 @@
|
||||
/**
|
||||
* The closure compiler doesn't realize this.specialFilePathCompare is
|
||||
* valid.
|
||||
*
|
||||
* @suppress {checkTypes}
|
||||
*/
|
||||
getChangeFilePathsAsSpeciallySortedArray(changeNum, patchRange) {
|
||||
@@ -1766,6 +1768,7 @@
|
||||
|
||||
/**
|
||||
* Gets a file in a specific change and revision.
|
||||
*
|
||||
* @param {number|string} changeNum
|
||||
* @param {string} path
|
||||
* @param {number|string} patchNum
|
||||
@@ -1785,6 +1788,7 @@
|
||||
|
||||
/**
|
||||
* Gets a file in a change edit.
|
||||
*
|
||||
* @param {number|string} changeNum
|
||||
* @param {string} path
|
||||
*/
|
||||
@@ -1911,6 +1915,7 @@
|
||||
|
||||
/**
|
||||
* Public version of the _restApiHelper.send method preserved for plugins.
|
||||
*
|
||||
* @param {string} method
|
||||
* @param {string} url
|
||||
* @param {?string|number|Object=} opt_body passed as null sometimes
|
||||
@@ -2603,6 +2608,7 @@
|
||||
|
||||
/**
|
||||
* Alias for _changeBaseURL.then(send).
|
||||
*
|
||||
* @todo(beckysiegel) clean up comments
|
||||
* @param {Gerrit.ChangeSendRequest} req
|
||||
* @return {!Promise<!Object>}
|
||||
@@ -2630,6 +2636,7 @@
|
||||
|
||||
/**
|
||||
* Alias for _changeBaseURL.then(_fetchJSON).
|
||||
*
|
||||
* @param {Gerrit.ChangeFetchRequest} req
|
||||
* @return {!Promise<!Object>}
|
||||
*/
|
||||
@@ -2652,6 +2659,7 @@
|
||||
|
||||
/**
|
||||
* Execute a change action or revision action on a change.
|
||||
*
|
||||
* @param {number} changeNum
|
||||
* @param {string} method
|
||||
* @param {string} endpoint
|
||||
@@ -2674,6 +2682,7 @@
|
||||
|
||||
/**
|
||||
* Get blame information for the given diff.
|
||||
*
|
||||
* @param {string|number} changeNum
|
||||
* @param {string|number} patchNum
|
||||
* @param {string} path
|
||||
@@ -2695,6 +2704,7 @@
|
||||
/**
|
||||
* Modify the given create draft request promise so that it fails and throws
|
||||
* an error if the response bears HTTP status 200 instead of HTTP 201.
|
||||
*
|
||||
* @see Issue 7763
|
||||
* @param {Promise} promise The original promise.
|
||||
* @return {Promise} The modified promise.
|
||||
@@ -2724,6 +2734,7 @@
|
||||
/**
|
||||
* Fetch a project dashboard definition.
|
||||
* https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#get-dashboard
|
||||
*
|
||||
* @param {string} project
|
||||
* @param {string} dashboard
|
||||
* @param {function(?Response, string=)=} opt_errFn
|
||||
|
||||
@@ -122,6 +122,7 @@
|
||||
/**
|
||||
* Wraps calls to the underlying authenticated fetch function (_auth.fetch)
|
||||
* with timing and logging.
|
||||
*
|
||||
* @param {Gerrit.FetchRequest} req
|
||||
*/
|
||||
fetch(req) {
|
||||
@@ -139,6 +140,7 @@
|
||||
* Log information about a REST call. Because the elapsed time is determined
|
||||
* by this method, it should be called immediately after the request
|
||||
* finishes.
|
||||
*
|
||||
* @param {Gerrit.FetchRequest} req
|
||||
* @param {number} startTime the time that the request was started.
|
||||
* @param {number} status the HTTP status of the response. The status value
|
||||
@@ -171,6 +173,7 @@
|
||||
* Returns a Promise that resolves to a native Response.
|
||||
* Doesn't do error checking. Supports cancel condition. Performs auth.
|
||||
* Validates auth expiry errors.
|
||||
*
|
||||
* @param {Gerrit.FetchJSONRequest} req
|
||||
*/
|
||||
fetchRawJSON(req) {
|
||||
@@ -205,6 +208,7 @@
|
||||
* Fetch JSON from url provided.
|
||||
* Returns a Promise that resolves to a parsed response.
|
||||
* Same as {@link fetchRawJSON}, plus error handling.
|
||||
*
|
||||
* @param {Gerrit.FetchJSONRequest} req
|
||||
*/
|
||||
fetchJSON(req) {
|
||||
@@ -329,6 +333,7 @@
|
||||
|
||||
/**
|
||||
* Send an XHR.
|
||||
*
|
||||
* @param {Gerrit.SendRequest} req
|
||||
* @return {Promise}
|
||||
*/
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
|
||||
/**
|
||||
* Is a part of _groupUpdates(). Creates a new batch of updates.
|
||||
*
|
||||
* @param {Object} update instance of ReviewerUpdateInfo
|
||||
*/
|
||||
GrReviewerUpdatesParser.prototype._startBatch = function(update) {
|
||||
@@ -75,6 +76,7 @@
|
||||
* Is a part of _groupUpdates(). Validates current batch:
|
||||
* - filters out updates that don't change reviewer state.
|
||||
* - updates current reviewer state.
|
||||
*
|
||||
* @param {Object} update instance of ReviewerUpdateInfo
|
||||
*/
|
||||
GrReviewerUpdatesParser.prototype._completeBatch = function(update) {
|
||||
@@ -136,6 +138,7 @@
|
||||
|
||||
/**
|
||||
* Generates update message for reviewer state change.
|
||||
*
|
||||
* @param {string} prev previous reviewer state.
|
||||
* @param {string} state current reviewer state.
|
||||
* @return {string}
|
||||
@@ -157,6 +160,7 @@
|
||||
/**
|
||||
* Groups updates for same category (eg CC->CC) into a hash arrays of
|
||||
* reviewers.
|
||||
*
|
||||
* @param {!Array<!Object>} updates Array of ReviewerUpdateItemInfo.
|
||||
* @return {!Object} Hash of arrays of AccountInfo, message as key.
|
||||
*/
|
||||
@@ -174,6 +178,7 @@
|
||||
/**
|
||||
* Generates text messages for grouped reviewer updates.
|
||||
* Formats reviewer updates to a (not yet implemented) EventInfo instance.
|
||||
*
|
||||
* @see https://gerrit-review.googlesource.com/c/94490/
|
||||
*/
|
||||
GrReviewerUpdatesParser.prototype._formatUpdates = function() {
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
*/
|
||||
class GrSelect extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
||||
@@ -53,9 +53,9 @@
|
||||
];
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.FireMixin
|
||||
* @appliesMixin Gerrit.KeyboardShortcutMixin
|
||||
*/
|
||||
class GrTextarea extends Polymer.mixinBehaviors( [
|
||||
Gerrit.FireBehavior,
|
||||
Gerrit.KeyboardShortcutBehavior,
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @appliesMixin Gerrit.TooltipMixin
|
||||
*/
|
||||
* @appliesMixin Gerrit.TooltipMixin
|
||||
*/
|
||||
class GrTooltipContent extends Polymer.mixinBehaviors( [
|
||||
Gerrit.TooltipBehavior,
|
||||
], Polymer.GestureEventListeners(
|
||||
|
||||
@@ -32,6 +32,7 @@ limitations under the License.
|
||||
* example, with normal changes this will always return 1. For merge changes
|
||||
* wherein the revisions are merge commits this will return 2 or potentially
|
||||
* more.
|
||||
*
|
||||
* @return {Number}
|
||||
*/
|
||||
RevisionInfo.prototype.getMaxParents = function() {
|
||||
@@ -45,6 +46,7 @@ limitations under the License.
|
||||
/**
|
||||
* Get an object that maps revision numbers to the number of parents of the
|
||||
* commit of that revision.
|
||||
*
|
||||
* @return {!Object}
|
||||
*/
|
||||
RevisionInfo.prototype.getParentCountMap = function() {
|
||||
@@ -68,6 +70,7 @@ limitations under the License.
|
||||
/**
|
||||
* Get the commit ID of the (0-offset) indexed parent in the given revision
|
||||
* number.
|
||||
*
|
||||
* @param {number|string} patchNum
|
||||
* @param {number} parentIndex (0-offset)
|
||||
* @return {string}
|
||||
|
||||
Reference in New Issue
Block a user