@magmonium/one 0.4.52 → 0.4.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30722,7 +30722,7 @@ var PluginComponent = class PluginComponent {
30722
30722
  loginStore = inject(LOGIN_STORE, { optional: true });
30723
30723
  appLink = inject(APP_LINK);
30724
30724
  elementRef = inject(ElementRef);
30725
- loadedElement;
30725
+ loadedElement = signal(void 0, ...ngDevMode ? [{ debugName: "loadedElement" }] : /* istanbul ignore next */ []);
30726
30726
  loadId = 0;
30727
30727
  state = signal("idle", ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
30728
30728
  failure = signal({}, ...ngDevMode ? [{ debugName: "failure" }] : /* istanbul ignore next */ []);
@@ -30742,7 +30742,7 @@ var PluginComponent = class PluginComponent {
30742
30742
  });
30743
30743
  effect(() => {
30744
30744
  const inputs = this.values();
30745
- const el = this.loadedElement;
30745
+ const el = this.loadedElement();
30746
30746
  if (!el) return;
30747
30747
  Object.entries(inputs).forEach(([key, value]) => {
30748
30748
  el[key] = value;
@@ -30750,7 +30750,8 @@ var PluginComponent = class PluginComponent {
30750
30750
  });
30751
30751
  effect(() => {
30752
30752
  const lang = this.translateService.lang();
30753
- if (this.loadedElement) this.loadedElement.lang = lang;
30753
+ const el = this.loadedElement();
30754
+ if (el) el.lang = lang;
30754
30755
  });
30755
30756
  }
30756
30757
  ngOnDestroy() {
@@ -30773,10 +30774,10 @@ var PluginComponent = class PluginComponent {
30773
30774
  if (result.reason) this.failed.emit(result);
30774
30775
  return this.state.set(result.reason ? "failed" : "idle");
30775
30776
  }
30776
- this.loadedElement = result.element;
30777
30777
  result.element.style.display = "block";
30778
30778
  result.element.addEventListener(PLUGIN_OUTPUT_EVENT, this.onOutput);
30779
30779
  this.elementRef.nativeElement.appendChild(result.element);
30780
+ this.loadedElement.set(result.element);
30780
30781
  this.state.set("loaded");
30781
30782
  };
30782
30783
  onOutput = (event) => {
@@ -30785,9 +30786,10 @@ var PluginComponent = class PluginComponent {
30785
30786
  this.outputChildren().filter((child) => child.name() === detail.name).forEach((child) => child.fired.emit(detail.value));
30786
30787
  };
30787
30788
  dismount = () => {
30788
- this.loadedElement?.removeEventListener(PLUGIN_OUTPUT_EVENT, this.onOutput);
30789
- this.loadedElement?.remove();
30790
- this.loadedElement = void 0;
30789
+ const el = untracked(this.loadedElement);
30790
+ el?.removeEventListener(PLUGIN_OUTPUT_EVENT, this.onOutput);
30791
+ el?.remove();
30792
+ this.loadedElement.set(void 0);
30791
30793
  };
30792
30794
  static ɵfac = i0.ɵɵngDeclareFactory({
30793
30795
  minVersion: "12.0.0",