@magmonium/one 0.4.52 → 0.4.54
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
|
-
|
|
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
|
|
30789
|
-
this.
|
|
30790
|
-
|
|
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",
|
|
@@ -47373,9 +47375,8 @@ function provideMagWcConfig(options) {
|
|
|
47373
47375
|
},
|
|
47374
47376
|
{
|
|
47375
47377
|
provide: MODAL_STORE_REF,
|
|
47376
|
-
useFactory: () =>
|
|
47377
|
-
|
|
47378
|
-
}
|
|
47378
|
+
useFactory: (localStore) => SharedStoreRegistry.getHostInjector()?.get(MODAL_STORE_REF, null) ?? localStore,
|
|
47379
|
+
deps: [ModalStore]
|
|
47379
47380
|
},
|
|
47380
47381
|
{
|
|
47381
47382
|
provide: ModalStore,
|