Class ContributionSurveyRow

Represents a contribution survey row. This is an abstraction of the row that can be seen on contribution survey pages, which acts as an intermediate between raw wikitext and actual HTML content.

Hierarchy

  • ContributionSurveyRow

Constructors

Properties

casePage: DeputyCasePage

The case page of this row.

comment?: string

Editor comments for this row (including signature)

Data returned by the ContributionSurveyRowParser. Run on the wikitext during instantiation.

The diffs included in this row. Mapped by revision IDs.

extras: string

Extra page information. e.g. "(1 edit, 1 major, +173)"

The original status of this row (if it had a prior status).

The status of this row.

statusIsolated?: false | "start" | "end"

Determines if the status indicator (as tested by the regular expressions at commentMatchRegex) is isolated (at the start or end of the comment). This will enable removal of the status indicator from the comment in the comment text input box.

title: Title

The title of the page that this row is attached to.

type: "detailed" | "pageonly"
  • detailed refers to a row with both page and revision information.
  • pageonly refers to a row with only a page and no revision information.
wikitext: string

The original wikitext of the row.

Parser: typeof ContributionSurveyRowParser = ContributionSurveyRowParser

A set of regular expressions that will match a specific contribution survey row comment. Used to determine the status of the comment.

Accessors

  • get completed(): boolean
  • This variable returns true when (a) the row has a non-unfinished status, and (b) there are no outstanding diffs in this row

    Returns boolean

    See description.

Methods

  • Gets the sorter function which will sort a set of diffs based on a given sort order. This sorts any array containing revisions.

    Parameters

    Returns ((a, b) => number)

  • Gets the sorter function which will sort a set of diffs based on a given sort order. This sorts any entry array using the first element (the key).

    Parameters

    Returns ((a, b) => number)

      • (a, b): number
      • Gets the sorter function which will sort a set of diffs based on a given sort order. This sorts any entry array using the first element (the key).

        Returns number

  • Gets the sorter function which will sort a set of diffs based on a given sort order. This sorts any entry array using the second element (the value).

    Parameters

    Returns ((a, b) => number)

      • (a, b): number
      • Gets the sorter function which will sort a set of diffs based on a given sort order. This sorts any entry array using the second element (the value).

        Returns number

Generated using TypeDoc