@worktile/planet 17.0.0-next.3 → 17.1.0-next.0
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.
- package/CHANGELOG.md +19 -0
- package/README.md +10 -6
- package/application/planet-application-loader.d.ts +5 -0
- package/application/planet-application-loader.d.ts.map +1 -1
- package/component/planet-component-loader.d.ts.map +1 -1
- package/component/plant-component.config.d.ts +4 -0
- package/component/plant-component.config.d.ts.map +1 -1
- package/esm2022/application/planet-application-loader.mjs +10 -5
- package/esm2022/component/planet-component-loader.mjs +3 -2
- package/esm2022/component/plant-component.config.mjs +1 -1
- package/esm2022/planet.mjs +7 -1
- package/fesm2022/worktile-planet.mjs +17 -5
- package/fesm2022/worktile-planet.mjs.map +1 -1
- package/package.json +1 -1
- package/planet.d.ts +4 -0
- package/planet.d.ts.map +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Injectable, NgZone, NgModuleRef, Inject, Optional, Component, ChangeDetectionStrategy, Injector, createComponent, reflectComponentType, EventEmitter, Directive, Input, Output, inject, NgModule } from '@angular/core';
|
|
2
|
+
import { InjectionToken, Injectable, NgZone, NgModuleRef, signal, Inject, Optional, Component, ChangeDetectionStrategy, Injector, createComponent, reflectComponentType, EventEmitter, Directive, Input, Output, inject, NgModule } from '@angular/core';
|
|
3
3
|
import * as i3 from '@angular/router';
|
|
4
4
|
import { Router, NavigationEnd, ActivatedRoute } from '@angular/router';
|
|
5
5
|
import * as i1 from '@angular/common/http';
|
|
@@ -1527,7 +1527,12 @@ class PlanetApplicationLoader {
|
|
|
1527
1527
|
this.routeChange$ = new Subject();
|
|
1528
1528
|
this.appStatusChange$ = new Subject();
|
|
1529
1529
|
this.appsLoadingStart$ = new Subject();
|
|
1530
|
+
this.innerLoading = signal(false);
|
|
1531
|
+
/**
|
|
1532
|
+
* @deprecated please use loading signal
|
|
1533
|
+
*/
|
|
1530
1534
|
this.loadingDone = false;
|
|
1535
|
+
this.loading = this.innerLoading.asReadonly();
|
|
1531
1536
|
if (getApplicationLoader()) {
|
|
1532
1537
|
throw new Error('PlanetApplicationLoader has been injected in the portal, repeated injection is not allowed');
|
|
1533
1538
|
}
|
|
@@ -1579,6 +1584,7 @@ class PlanetApplicationLoader {
|
|
|
1579
1584
|
setLoadingDone() {
|
|
1580
1585
|
this.ngZone.run(() => {
|
|
1581
1586
|
this.loadingDone = true;
|
|
1587
|
+
this.innerLoading.set(false);
|
|
1582
1588
|
});
|
|
1583
1589
|
}
|
|
1584
1590
|
getAppNames(apps) {
|
|
@@ -1633,6 +1639,7 @@ class PlanetApplicationLoader {
|
|
|
1633
1639
|
});
|
|
1634
1640
|
if (hasAppsNeedLoadingAssets) {
|
|
1635
1641
|
this.loadingDone = false;
|
|
1642
|
+
this.innerLoading.set(true);
|
|
1636
1643
|
}
|
|
1637
1644
|
return loadApps$.length > 0 ? forkJoin(loadApps$) : of([]);
|
|
1638
1645
|
}),
|
|
@@ -1663,9 +1670,7 @@ class PlanetApplicationLoader {
|
|
|
1663
1670
|
debug(`[routeChange] app(${app.name}) is active, do nothings`);
|
|
1664
1671
|
const appRef = getPlanetApplicationRef(app.name);
|
|
1665
1672
|
// Backwards compatibility sub app use old version which has not getCurrentRouterStateUrl
|
|
1666
|
-
const currentUrl = appRef?.getCurrentRouterStateUrl
|
|
1667
|
-
? appRef.getCurrentRouterStateUrl()
|
|
1668
|
-
: '';
|
|
1673
|
+
const currentUrl = appRef?.getCurrentRouterStateUrl ? appRef.getCurrentRouterStateUrl() : '';
|
|
1669
1674
|
if (currentUrl !== event.url) {
|
|
1670
1675
|
appRef?.navigateByUrl(event.url);
|
|
1671
1676
|
}
|
|
@@ -1944,9 +1949,15 @@ class Planet {
|
|
|
1944
1949
|
get planetApplicationService() {
|
|
1945
1950
|
return getApplicationService();
|
|
1946
1951
|
}
|
|
1952
|
+
/**
|
|
1953
|
+
* @deprecated please use loading signal
|
|
1954
|
+
*/
|
|
1947
1955
|
get loadingDone() {
|
|
1948
1956
|
return this.planetApplicationLoader.loadingDone;
|
|
1949
1957
|
}
|
|
1958
|
+
get loading() {
|
|
1959
|
+
return this.planetApplicationLoader.loading;
|
|
1960
|
+
}
|
|
1950
1961
|
get appStatusChange() {
|
|
1951
1962
|
return this.planetApplicationLoader.appStatusChange;
|
|
1952
1963
|
}
|
|
@@ -2114,7 +2125,8 @@ class PlanetComponentLoader {
|
|
|
2114
2125
|
const container = this.getContainerElement(config);
|
|
2115
2126
|
const componentRef = createComponent(component, {
|
|
2116
2127
|
environmentInjector: environmentInjector,
|
|
2117
|
-
elementInjector: injector
|
|
2128
|
+
elementInjector: injector,
|
|
2129
|
+
projectableNodes: config.projectableNodes
|
|
2118
2130
|
});
|
|
2119
2131
|
appRef.attachView(componentRef.hostView);
|
|
2120
2132
|
const componentRootNode = this.getComponentRootNode(componentRef);
|