Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
createElseInstruction(def: PartialCustomElementDefinition): HydrateTemplateController {
return new HydrateTemplateController(def, 'else', [], true);
},
createRepeatInstruction(expression: string, def: PartialCustomElementDefinition): HydrateTemplateController {
[
createElement(dom, 'thead', {}, [
createElement(dom, 'tr', {
$1: new HydrateTemplateController({
name: '',
template: ' ',
instructions: [[new TextBindingInstruction(`\${col | pascal}`)]],
strategy
},
'repeat',
[new IteratorBindingInstruction(this.keyedStrategy ? 'col of cols' : 'col of cols', 'items')]
)
})
]),
createElement(dom, 'tbody', {
$1: new HydrateTemplateController({
name: '',
template: '',
instructions: [[new HydrateTemplateController({
name: '',
template: ' ',
instructions: [[new TextBindingInstruction(`\${row[col]}`)]],
strategy
},
'repeat',
[new IteratorBindingInstruction(this.keyedStrategy ? 'col of cols' : 'col of cols', 'items')]
)]]
},
'repeat',
[new IteratorBindingInstruction(this.keyedStrategy ? 'row of rows' : 'row of rows', 'items')]
)
})
createIfInstruction(expression, def) {
return new HydrateTemplateController(def, 'if', [new ToViewBindingInstruction(parseExpression(expression), 'value')]);
},
createElseInstruction(def) {
createReplaceableInstruction(def) {
return new HydrateTemplateController(def, 'replaceable', []);
},
createWithInstruction(expression, def) {
createReplaceableInstruction(def) {
return new runtime_1.HydrateTemplateController(def, 'replaceable', []);
},
createWithInstruction(expression, def) {
private createSubject(): void {
let strategy: BindingStrategy;
if (this.proxyStrategy) {
strategy |= BindingStrategy.proxies;
}
const dom = this.$controller.context.get>(IDOM);
this.subject = createElement(
dom,
'table',
{
class: 'table is-fullwidth',
},
[
createElement(dom, 'thead', {}, [
createElement(dom, 'tr', {
$1: new HydrateTemplateController({
name: '',
template: ' ',
instructions: [[new TextBindingInstruction(`\${col | pascal}`)]],
strategy
},
'repeat',
[new IteratorBindingInstruction(this.keyedStrategy ? 'col of cols' : 'col of cols', 'items')]
)
})
]),
createElement(dom, 'tbody', {
$1: new HydrateTemplateController({
name: '',
template: '',
instructions: [[new HydrateTemplateController({
name: '',
createReplaceableInstruction(def: ITemplateDefinition): HydrateTemplateController {
return new HydrateTemplateController(def, 'replaceable', []);
},
createWithInstruction(expression: string, def: ITemplateDefinition): HydrateTemplateController {
scopeParts,
name: symbol.partName == null ? symbol.res : symbol.partName,
template: symbol.physicalNode,
instructions: controllerInstructions,
build: buildNotRequired
};
let parts: Record | undefined = void 0;
if ((symbol.flags & SymbolFlags.hasParts) > 0) {
parts = {};
for (const part of symbol.parts) {
parts[part.name] = this.parts[part.name];
}
}
this.instructionRows.push([new HydrateTemplateController(def, symbol.res, bindings, symbol.res === 'else', parts)]);
}
const def: ITemplateDefinition = {
name: symbol.partName == null ? symbol.res : symbol.partName,
template: symbol.physicalNode,
instructions: controllerInstructions,
build: buildNotRequired
};
let parts: Record | undefined = void 0;
if ((symbol.flags & SymbolFlags.hasParts) > 0) {
parts = {};
for (const part of symbol.parts) {
parts[part.name] = this.parts[part.name];
}
}
this.instructionRows.push([new HydrateTemplateController(def, symbol.res, bindings, symbol.res === 'else', parts)]);
}