(
dir: TcbDirectiveMetadata,
node: Element | Template,
dirMap: Map<TcbDirectiveMetadata, number>,
allDirectiveMatches: TcbDirectiveMetadata[],
directiveIndex?: number,
)
| 740 | } |
| 741 | |
| 742 | private appendDirectiveInputs( |
| 743 | dir: TcbDirectiveMetadata, |
| 744 | node: Element | Template, |
| 745 | dirMap: Map<TcbDirectiveMetadata, number>, |
| 746 | allDirectiveMatches: TcbDirectiveMetadata[], |
| 747 | directiveIndex?: number, |
| 748 | ): void { |
| 749 | const nodeIsFormControl = isFormControl(allDirectiveMatches); |
| 750 | const customFormControlType = nodeIsFormControl ? getCustomFieldDirectiveType(dir) : null; |
| 751 | |
| 752 | const directiveOp = this.getDirectiveOp(dir, node, customFormControlType, directiveIndex); |
| 753 | const dirIndex = this.opQueue.push(directiveOp) - 1; |
| 754 | dirMap.set(dir, dirIndex); |
| 755 | |
| 756 | if (isNativeField(dir, node, allDirectiveMatches)) { |
| 757 | const inputType = |
| 758 | (node.name === 'input' && node.attributes.find((attr) => attr.name === 'type')?.value) || |
| 759 | null; |
| 760 | |
| 761 | this.opQueue.push( |
| 762 | inputType === 'radio' |
| 763 | ? new TcbNativeRadioButtonFieldOp(this.tcb, this, node) |
| 764 | : new TcbNativeFieldOp(this.tcb, this, node, inputType), |
| 765 | ); |
| 766 | } |
| 767 | |
| 768 | this.opQueue.push( |
| 769 | new TcbDirectiveInputsOp(this.tcb, this, node, dir, nodeIsFormControl, customFormControlType), |
| 770 | ); |
| 771 | } |
| 772 | |
| 773 | private getDirectiveOp( |
| 774 | dir: TcbDirectiveMetadata, |
no test coverage detected