Skip to main content

Class: WT21ChecklistDomParser

Defined in: workingtitle-instruments-wt21/shared/Checklist/WT21ChecklistDomParser.ts:10

A checklist DOM parser specifically for the WT21

Extends

Constructors

Constructor

new WT21ChecklistDomParser(): WT21ChecklistDomParser

Returns

WT21ChecklistDomParser

Inherited from

ChecklistDOMParser.constructor

Methods

protected auditBranchItemLinks(set, group, list, branch, item, options): void

Defined in: sdk/checklist/ChecklistDOMParser.ts:704

Audits links contained in a parsed branch checklist item definition.

Parameters

ParameterTypeDescription
setChecklistSetDef<ChecklistItemTypeDefMap>The set containing the group to audit.
groupChecklistGroupDef<ChecklistItemTypeDefMap>The group containing the item to audit.
listChecklistListDef<ChecklistItemTypeDefMap>The list containing the item to audit.
branchundefined | ChecklistBranchDef<ChecklistItemTypeDefMap, unknown>The branch containing the item to audit, or undefined if the item is not in a branch.
itemChecklistBranchItemDefThe item to audit.
optionsChecklistDOMParseOptionsToUse<ChecklistItemTypeDefMap>The options to use when parsing.

Returns

void

Inherited from

ChecklistDOMParser.auditBranchItemLinks


auditLinkItemTarget()

protected auditLinkItemTarget(set, group, list, branch, item, options): void

Defined in: sdk/checklist/ChecklistDOMParser.ts:729

Audits links contained in a parsed link checklist item definition.

Parameters

ParameterTypeDescription
setChecklistSetDef<ChecklistItemTypeDefMap>The set containing the group to audit.
groupChecklistGroupDef<ChecklistItemTypeDefMap>The group containing the item to audit.
listChecklistListDef<ChecklistItemTypeDefMap>The list containing the item to audit.
branchundefined | ChecklistBranchDef<ChecklistItemTypeDefMap, unknown>The branch containing the item to audit, or undefined if the item is not in a branch.
itemChecklistLinkItemDefThe item to audit.
optionsChecklistDOMParseOptionsToUse<ChecklistItemTypeDefMap>The options to use when parsing.

Returns

void

Inherited from

ChecklistDOMParser.auditLinkItemTarget


auditLinksInGroup()

protected auditLinksInGroup(set, group, options): void

Defined in: sdk/checklist/ChecklistDOMParser.ts:638

Audits links contained in a parsed checklist group definition.

Parameters

ParameterTypeDescription
setChecklistSetDef<ChecklistItemTypeDefMap>The set containing the group to audit.
groupChecklistGroupDef<ChecklistItemTypeDefMap>The group to audit.
optionsChecklistDOMParseOptionsToUse<ChecklistItemTypeDefMap>The options to use when parsing.

Returns

void

Inherited from

ChecklistDOMParser.auditLinksInGroup


auditLinksInItem()

protected auditLinksInItem(set, group, list, branch, item, options): void

Defined in: sdk/checklist/ChecklistDOMParser.ts:677

Audits links contained in a parsed checklist item definition.

Parameters

ParameterTypeDescription
setChecklistSetDef<ChecklistItemTypeDefMap>The set containing the group to audit.
groupChecklistGroupDef<ChecklistItemTypeDefMap>The group containing the item to audit.
listChecklistListDef<ChecklistItemTypeDefMap>The list containing the item to audit.
branchundefined | ChecklistBranchDef<ChecklistItemTypeDefMap, unknown>The branch containing the item to audit, or undefined if the item is not in a branch.
itemChecklistItemDef<ChecklistItemTypeDefMap>The item to audit.
optionsChecklistDOMParseOptionsToUse<ChecklistItemTypeDefMap>The options to use when parsing.

Returns

void

Inherited from

ChecklistDOMParser.auditLinksInItem


auditLinksInList()

protected auditLinksInList(set, group, list, options): void

Defined in: sdk/checklist/ChecklistDOMParser.ts:651

Audits links contained in a parsed checklist list definition.

Parameters

ParameterTypeDescription
setChecklistSetDef<ChecklistItemTypeDefMap>The set containing the group to audit.
groupChecklistGroupDef<ChecklistItemTypeDefMap>The group containing the list to audit.
listChecklistListDef<ChecklistItemTypeDefMap>The list to audit.
optionsChecklistDOMParseOptionsToUse<ChecklistItemTypeDefMap>The options to use when parsing.

Returns

void

Inherited from

ChecklistDOMParser.auditLinksInList


auditLinksInSet()

protected auditLinksInSet(set, options): void

Defined in: sdk/checklist/ChecklistDOMParser.ts:626

Audits links contained in a parsed checklist set definition.

Parameters

ParameterTypeDescription
setChecklistSetDef<ChecklistItemTypeDefMap>The set to audit.
optionsChecklistDOMParseOptionsToUse<ChecklistItemTypeDefMap>The options to use when parsing.

Returns

void

Inherited from

ChecklistDOMParser.auditLinksInSet


parse()

parse(element, options?): WT21ChecklistSetDef

Defined in: workingtitle-instruments-wt21/shared/Checklist/WT21ChecklistDomParser.ts:12

Parses the checklist set definition specified by a DOM element.

Parameters

ParameterTypeDescription
elementElementThe element to parse.
options?Readonly<WT21ChecklistDomParserParseOptions>-

Returns

WT21ChecklistSetDef

The checklist set definition parsed from the specified element.

Throws

Error if the parsing operation encounters an unrecoverable syntax error or if the errorInsteadOfDiscard option is enabled and the operation encounters a syntax error that would normally cause a definition to be discarded.

Overrides

ChecklistDOMParser.parse


parseActionableItemDef()

protected parseActionableItemDef(element, groupName, listName, branchName, options): undefined | ChecklistActionableItemDef

Defined in: sdk/checklist/ChecklistDOMParser.ts:401

Parses an actionable checklist item definition from a DOM element.

Parameters

ParameterTypeDescription
elementElementThe element to parse.
groupNamestringThe name of the checklist group for which the item is to be parsed.
listNamestringThe name of the checklist list for which the item is to be parsed.
branchNameundefined | stringThe name of the checklist branch for which the item is to be parsed.
optionsChecklistDOMParseOptionsToUse<ChecklistItemTypeDefMap>The options to use when parsing.

Returns

undefined | ChecklistActionableItemDef

The actionable checklist item definition parsed from the specified element, or undefined if the definition was discarded.

Inherited from

ChecklistDOMParser.parseActionableItemDef


parseBranchDef()

protected parseBranchDef(): undefined

Defined in: workingtitle-instruments-wt21/shared/Checklist/WT21ChecklistDomParser.ts:25

Parses a checklist branch definition from a DOM element.

Returns

undefined

The checklist branch definition parsed from the specified element, or undefined if the definition was discarded.

Overrides

ChecklistDOMParser.parseBranchDef


parseBranchItemDef()

protected parseBranchItemDef(): undefined

Defined in: workingtitle-instruments-wt21/shared/Checklist/WT21ChecklistDomParser.ts:31

Parses a branch checklist item definition from a DOM element.

Returns

undefined

The branch checklist item definition parsed from the specified element, or undefined if the definition was discarded.

Overrides

ChecklistDOMParser.parseBranchItemDef


parseGroupDef()

protected parseGroupDef(element, options): undefined | ChecklistGroupDef<ChecklistItemTypeDefMap, unknown, unknown, unknown>

Defined in: sdk/checklist/ChecklistDOMParser.ts:208

Parses a checklist group definition from a DOM element.

Parameters

ParameterTypeDescription
elementElementThe element to parse.
optionsChecklistDOMParseOptionsToUse<ChecklistItemTypeDefMap>The options to use when parsing.

Returns

undefined | ChecklistGroupDef<ChecklistItemTypeDefMap, unknown, unknown, unknown>

The checklist group definition parsed from the specified element, or undefined if the definition was discarded.

Inherited from

ChecklistDOMParser.parseGroupDef


parseItemDef()

protected parseItemDef(element, groupName, listName, branchName, options): undefined | ChecklistItemDef<ChecklistItemTypeDefMap>

Defined in: sdk/checklist/ChecklistDOMParser.ts:359

Parses a checklist item definition from a DOM element.

Parameters

ParameterTypeDescription
elementElementThe element to parse.
groupNamestringThe name of the checklist group for which the item is to be parsed.
listNamestringThe name of the checklist list for which the item is to be parsed.
branchNameundefined | stringThe name of the checklist branch for which the item is to be parsed.
optionsChecklistDOMParseOptionsToUse<ChecklistItemTypeDefMap>The options to use when parsing.

Returns

undefined | ChecklistItemDef<ChecklistItemTypeDefMap>

The checklist item definition parsed from the specified element, or undefined if the definition was discarded.

Inherited from

ChecklistDOMParser.parseItemDef


parseItemDefArray()

protected parseItemDefArray(element, groupName, listName, branchName, options): ChecklistItemDef<ChecklistItemTypeDefMap>[]

Defined in: sdk/checklist/ChecklistDOMParser.ts:330

Parses an array of item definitions from a DOM element.

Parameters

ParameterTypeDescription
elementElementThe element to parse.
groupNamestringThe name of the checklist group for which the item array is to be parsed.
listNamestringThe name of the checklist list for which the item array is to be parsed.
branchNameundefined | stringThe name of the checklist branch for which the item array is to be parsed.
optionsChecklistDOMParseOptionsToUse<ChecklistItemTypeDefMap>The options to use when parsing.

Returns

ChecklistItemDef<ChecklistItemTypeDefMap>[]

The checklist item definition array parsed from the specified element.

Inherited from

ChecklistDOMParser.parseItemDefArray


parseLinkItemDef()

protected parseLinkItemDef(): undefined

Defined in: workingtitle-instruments-wt21/shared/Checklist/WT21ChecklistDomParser.ts:37

Parses a link checklist item definition from a DOM element.

Returns

undefined

The link checklist item definition parsed from the specified element, or undefined if the definition was discarded.

Overrides

ChecklistDOMParser.parseLinkItemDef


parseListDef()

protected parseListDef(element, groupName, options): undefined | ChecklistListDef<ChecklistItemTypeDefMap, unknown, unknown>

Defined in: sdk/checklist/ChecklistDOMParser.ts:246

Parses a checklist list definition from a DOM element.

Parameters

ParameterTypeDescription
elementElementThe element to parse.
groupNamestringThe name of the checklist group for which the list is to be parsed.
optionsChecklistDOMParseOptionsToUse<ChecklistItemTypeDefMap>The options to use when parsing.

Returns

undefined | ChecklistListDef<ChecklistItemTypeDefMap, unknown, unknown>

The checklist list definition parsed from the specified element, or undefined if the definition was discarded.

Inherited from

ChecklistDOMParser.parseListDef


parseNoteItemDef()

protected parseNoteItemDef(): undefined

Defined in: workingtitle-instruments-wt21/shared/Checklist/WT21ChecklistDomParser.ts:49

Parses a note checklist item definition from a DOM element.

Returns

undefined

The note checklist item definition parsed from the specified element, or undefined if the definition was discarded.

Overrides

ChecklistDOMParser.parseNoteItemDef


parseSpacerItemDef()

protected parseSpacerItemDef(): undefined

Defined in: workingtitle-instruments-wt21/shared/Checklist/WT21ChecklistDomParser.ts:55

Parses a spacer checklist item definition from a DOM element.

Returns

undefined

The spacer checklist item definition parsed from the specified element, or undefined if the definition was discarded.

Overrides

ChecklistDOMParser.parseSpacerItemDef


parseTitleItemDef()

protected parseTitleItemDef(): undefined

Defined in: workingtitle-instruments-wt21/shared/Checklist/WT21ChecklistDomParser.ts:43

Parses a title checklist item definition from a DOM element.

Returns

undefined

The title checklist item definition parsed from the specified element, or undefined if the definition was discarded.

Overrides

ChecklistDOMParser.parseTitleItemDef


tryParseTextAsJSON()

static tryParseTextAsJSON(text): string

Defined in: sdk/checklist/ChecklistDOMParser.ts:775

Attempts to parse a text string as a JSON-formatted string.

Parameters

ParameterTypeDescription
textstringThe text string to parse.

Returns

string

The string parsed from the text string, or the original text string if it did not encode a JSON-formatted string.

Inherited from

ChecklistDOMParser.tryParseTextAsJSON