|
|
@ -45,6 +45,7 @@ export default class Block {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
event_listeners: string[] = [];
|
|
|
|
event_listeners: string[] = [];
|
|
|
|
|
|
|
|
any_event_elements: string[] = [];
|
|
|
|
|
|
|
|
|
|
|
|
maintain_context: boolean;
|
|
|
|
maintain_context: boolean;
|
|
|
|
has_animation: boolean;
|
|
|
|
has_animation: boolean;
|
|
|
@ -325,6 +326,20 @@ export default class Block {
|
|
|
|
`);
|
|
|
|
`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.variables.size > 0) {
|
|
|
|
|
|
|
|
const listens = Array.from(this.variables.keys())
|
|
|
|
|
|
|
|
.filter(key => this.any_event_elements.includes(key))
|
|
|
|
|
|
|
|
.join(', ');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (listens.length > 0) {
|
|
|
|
|
|
|
|
properties.add_block(deindent`
|
|
|
|
|
|
|
|
${method_name('bbl', 'bubble')}() {
|
|
|
|
|
|
|
|
return [listen, [${listens}]];
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
`);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (this.has_intro_method || this.has_outro_method) {
|
|
|
|
if (this.has_intro_method || this.has_outro_method) {
|
|
|
|
if (this.builders.intro.is_empty()) {
|
|
|
|
if (this.builders.intro.is_empty()) {
|
|
|
|
properties.add_line(`i: @noop,`);
|
|
|
|
properties.add_line(`i: @noop,`);
|
|
|
|