@sinequa/atomic-angular 1.0.13 → 1.0.14
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/fesm2022/sinequa-atomic-angular.mjs +15 -12
- package/fesm2022/sinequa-atomic-angular.mjs.map +1 -1
- package/index.d.ts +157 -157
- package/package.json +1 -1
|
@@ -1631,18 +1631,21 @@ async function withBootstrapApp(applicationService, { createRoutes = true }) {
|
|
|
1631
1631
|
return new Promise(resolve => {
|
|
1632
1632
|
// Check if the user is authenticated
|
|
1633
1633
|
signIn()
|
|
1634
|
-
.then((response) => {
|
|
1634
|
+
.then(async (response) => {
|
|
1635
1635
|
if (response) {
|
|
1636
1636
|
info('User authenticated, initializing application...');
|
|
1637
|
-
// Initialize the application
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1637
|
+
// Initialize the application.
|
|
1638
|
+
// Awaited so the APP_INITIALIZER does not resolve (and bootstrap does not
|
|
1639
|
+
// complete) until initialization is done. Otherwise routed components render
|
|
1640
|
+
// and set their page title before `initialize()` runs `setGeneralApp()`, which
|
|
1641
|
+
// would then overwrite the page title with the bare application name.
|
|
1642
|
+
try {
|
|
1643
|
+
await applicationService.initialize(createRoutes);
|
|
1641
1644
|
info(`Application initialized with routes: ${createRoutes} successfully.`);
|
|
1642
|
-
}
|
|
1643
|
-
|
|
1645
|
+
}
|
|
1646
|
+
catch (err) {
|
|
1644
1647
|
error(`Error initializing application with routes: ${createRoutes}:`, err);
|
|
1645
|
-
}
|
|
1648
|
+
}
|
|
1646
1649
|
}
|
|
1647
1650
|
else {
|
|
1648
1651
|
info('User not authenticated, skipping application initialization.');
|
|
@@ -3730,10 +3733,10 @@ class ApplicationService {
|
|
|
3730
3733
|
// If general is not defined or is an empty object, do nothing
|
|
3731
3734
|
if (!general || (typeof general === "object" && Object.keys(general).length === 0))
|
|
3732
3735
|
return;
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3736
|
+
// NB: the document title is intentionally NOT set here. The page-specific title is
|
|
3737
|
+
// owned by the routed components/layouts via `setTitle()`. Setting it here would
|
|
3738
|
+
// overwrite the page title with the bare application name during bootstrap.
|
|
3739
|
+
// The initial title falls back to the static <title> defined in index.html.
|
|
3737
3740
|
const { light, dark, alt } = general.logo || {};
|
|
3738
3741
|
document.documentElement.style.setProperty("--logo-alt-text", `'${alt || general.name}'`);
|
|
3739
3742
|
// light mode logo configuration
|