|
|
@ -1,5 +1,5 @@
|
|
|
|
import { createClassComponent } from '../../../../legacy/legacy-client.js';
|
|
|
|
import { createClassComponent } from '../../../../legacy/legacy-client.js';
|
|
|
|
import { destroy_effect, render_effect } from '../../reactivity/effects.js';
|
|
|
|
import { destroy_effect, effect_root, render_effect } from '../../reactivity/effects.js';
|
|
|
|
import { append } from '../template.js';
|
|
|
|
import { append } from '../template.js';
|
|
|
|
import { define_property, get_descriptor, object_keys } from '../../../shared/utils.js';
|
|
|
|
import { define_property, get_descriptor, object_keys } from '../../../shared/utils.js';
|
|
|
|
|
|
|
|
|
|
|
@ -145,7 +145,8 @@ if (typeof HTMLElement === 'function') {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// Reflect component props as attributes
|
|
|
|
// Reflect component props as attributes
|
|
|
|
this.$$me = render_effect(() => {
|
|
|
|
this.$$me = effect_root(() => {
|
|
|
|
|
|
|
|
render_effect(() => {
|
|
|
|
this.$$r = true;
|
|
|
|
this.$$r = true;
|
|
|
|
for (const key of object_keys(this.$$c)) {
|
|
|
|
for (const key of object_keys(this.$$c)) {
|
|
|
|
if (!this.$$p_d[key]?.reflect) continue;
|
|
|
|
if (!this.$$p_d[key]?.reflect) continue;
|
|
|
@ -164,6 +165,7 @@ if (typeof HTMLElement === 'function') {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.$$r = false;
|
|
|
|
this.$$r = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
for (const type in this.$$l) {
|
|
|
|
for (const type in this.$$l) {
|
|
|
|
for (const listener of this.$$l[type]) {
|
|
|
|
for (const listener of this.$$l[type]) {
|
|
|
@ -196,7 +198,7 @@ if (typeof HTMLElement === 'function') {
|
|
|
|
Promise.resolve().then(() => {
|
|
|
|
Promise.resolve().then(() => {
|
|
|
|
if (!this.$$cn && this.$$c) {
|
|
|
|
if (!this.$$cn && this.$$c) {
|
|
|
|
this.$$c.$destroy();
|
|
|
|
this.$$c.$destroy();
|
|
|
|
destroy_effect(this.$$me);
|
|
|
|
this.$$me();
|
|
|
|
this.$$c = undefined;
|
|
|
|
this.$$c = undefined;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|