@sinequa/atomic-angular 1.0.12 → 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.
@@ -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
- applicationService
1639
- .initialize(createRoutes)
1640
- .then(() => {
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
- .catch(err => {
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
- if (general.name) {
3734
- info("Setting document title to:", general.name);
3735
- this.titleService.setTitle(general.name);
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
@@ -8990,6 +8993,24 @@ class AggregationListComponent {
8990
8993
  }
8991
8994
  });
8992
8995
  }
8996
+ else if (Array.isArray(activeFilters.values) && activeFilters.values.length) {
8997
+ // multiple values stored as a string array, e.g. { values: ["alice_martin", "caroline_dubois"] }
8998
+ // (no `filters` sub-array and no single `value`) — mark each matching item as selected
8999
+ activeFilters.values.forEach((value) => {
9000
+ const found = aggItems.find(item => item.value?.toString().toLocaleLowerCase() === value?.toLocaleLowerCase());
9001
+ if (!found) {
9002
+ // value not in the loaded items — add it so it shows up as selected
9003
+ aggItems.unshift({
9004
+ value,
9005
+ display: value,
9006
+ $selected: true
9007
+ });
9008
+ }
9009
+ else {
9010
+ found.$selected = true;
9011
+ }
9012
+ });
9013
+ }
8993
9014
  else {
8994
9015
  // single filter
8995
9016
  const found = aggItems.find(item => item.value?.toString().toLocaleLowerCase() === activeFilters.value?.toLocaleLowerCase());