@sinequa/atomic-angular 1.5.3 → 1.5.5

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.
@@ -26,5 +26,7 @@
26
26
  "or": "Oder",
27
27
  "welcomeBack": "Willkommen zurück{ name, select, other {{{name}}} undefined {}}!",
28
28
  "youAreLoggedIn": "Sie sind angemeldet",
29
- "invalidCredentials": "Ungültiger Benutzername oder Passwort"
29
+ "invalidCredentials": "Ungültiger Benutzername oder Passwort",
30
+ "signedOutTitle": "Sie wurden abgemeldet",
31
+ "signedOutDescription": "Ihre Sitzung wurde beendet. Melden Sie sich erneut an, um fortzufahren."
30
32
  }
@@ -26,5 +26,7 @@
26
26
  "or": "Or",
27
27
  "welcomeBack": "Welcome back { name, select, other {{{name}}} undefined {}}!",
28
28
  "youAreLoggedIn": "You are logged in",
29
- "invalidCredentials": "Invalid username or password"
29
+ "invalidCredentials": "Invalid username or password",
30
+ "signedOutTitle": "You have been signed out",
31
+ "signedOutDescription": "Your session has ended. Sign in again to continue."
30
32
  }
@@ -27,5 +27,7 @@
27
27
  "or": "Ou",
28
28
  "welcomeBack": "Bienvenue { name, select, other {{{name}}} undefined {}}!",
29
29
  "youAreLoggedIn": "Vous êtes connecté",
30
- "invalidCredentials": "Nom d'utilisateur ou mot de passe invalide"
30
+ "invalidCredentials": "Nom d'utilisateur ou mot de passe invalide",
31
+ "signedOutTitle": "Vous avez été déconnecté",
32
+ "signedOutDescription": "Votre session a pris fin. Reconnectez-vous pour continuer."
31
33
  }
@@ -10733,6 +10733,96 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
10733
10733
  }]
10734
10734
  }], propDecorators: { cancel: [{ type: i0.Output, args: ["cancel"] }], success: [{ type: i0.Output, args: ["success"] }], userName: [{ type: i0.Input, args: [{ isSignal: true, alias: "userName", required: false }] }, { type: i0.Output, args: ["userNameChange"] }] } });
10735
10735
 
10736
+ /**
10737
+ * Post-logout confirmation shown on the `/logout` route.
10738
+ *
10739
+ * Rendering this view (instead of the sign-in form) is essential for the external-auth modes
10740
+ * (`sso` / `oauth` / `saml`): the sign-in form auto-initiates the handshake when
10741
+ * `authMode` is external, so showing it on `/logout` would immediately re-authenticate the user
10742
+ * (a spinner that loops back in). This view gives a clear "signed out" state and a single explicit
10743
+ * action to sign in again.
10744
+ */
10745
+ class SignedOutComponent {
10746
+ router = inject(Router);
10747
+ /**
10748
+ * Navigate to the login screen, which then drives the normal sign-in handshake.
10749
+ *
10750
+ * A `returnUrl` is required: in the external-auth modes the sign-in screen only navigates away
10751
+ * once the handshake completes IF a `returnUrl` is present (otherwise it stays on the loader).
10752
+ * We send the user back to the app root after signing in again.
10753
+ */
10754
+ signInAgain() {
10755
+ this.router.navigate([globalConfig.loginPath ?? "/login"], {
10756
+ queryParams: { returnUrl: "/" }
10757
+ });
10758
+ }
10759
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: SignedOutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10760
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: SignedOutComponent, isStandalone: true, selector: "signed-out, SignedOut, signedout", providers: [provideTranslocoScope("login")], ngImport: i0, template: `
10761
+ <Card hover="no" class="bg-card rounded-xl shadow-sm">
10762
+ <CardHeader class="flex flex-col items-center gap-3">
10763
+ <img class="h-12 content-(--logo-large)" alt="logo" />
10764
+ <h2 class="text-lg font-semibold">
10765
+ {{ 'login.signedOutTitle' | transloco }}
10766
+ </h2>
10767
+ <p class="text-xs text-muted-foreground text-center">
10768
+ {{ 'login.signedOutDescription' | transloco }}
10769
+ </p>
10770
+ </CardHeader>
10771
+
10772
+ <CardContent />
10773
+
10774
+ <CardFooter class="mt-4 flex justify-center">
10775
+ <button
10776
+ type="button"
10777
+ class="w-full rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90"
10778
+ (click)="signInAgain()"
10779
+ >
10780
+ {{ 'login.connect' | transloco }}
10781
+ </button>
10782
+ </CardFooter>
10783
+ </Card>
10784
+ `, isInline: true, dependencies: [{ kind: "directive", type: CardComponent, selector: ".card, card, Card", inputs: ["class", "variant", "hover"] }, { kind: "directive", type: CardHeaderComponent, selector: ".card-header, card-header, CardHeader, cardheader", inputs: ["class"] }, { kind: "directive", type: CardContentComponent, selector: ".card-content, card-content, CardContent, cardcontent", inputs: ["class"] }, { kind: "directive", type: CardFooterComponent, selector: ".card-footer, card-footer, CardFooter, cardfooter", inputs: ["class"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }] });
10785
+ }
10786
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: SignedOutComponent, decorators: [{
10787
+ type: Component,
10788
+ args: [{
10789
+ selector: "signed-out, SignedOut, signedout",
10790
+ imports: [
10791
+ TranslocoPipe,
10792
+ CardComponent,
10793
+ CardHeaderComponent,
10794
+ CardContentComponent,
10795
+ CardFooterComponent
10796
+ ],
10797
+ providers: [provideTranslocoScope("login")],
10798
+ template: `
10799
+ <Card hover="no" class="bg-card rounded-xl shadow-sm">
10800
+ <CardHeader class="flex flex-col items-center gap-3">
10801
+ <img class="h-12 content-(--logo-large)" alt="logo" />
10802
+ <h2 class="text-lg font-semibold">
10803
+ {{ 'login.signedOutTitle' | transloco }}
10804
+ </h2>
10805
+ <p class="text-xs text-muted-foreground text-center">
10806
+ {{ 'login.signedOutDescription' | transloco }}
10807
+ </p>
10808
+ </CardHeader>
10809
+
10810
+ <CardContent />
10811
+
10812
+ <CardFooter class="mt-4 flex justify-center">
10813
+ <button
10814
+ type="button"
10815
+ class="w-full rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90"
10816
+ (click)="signInAgain()"
10817
+ >
10818
+ {{ 'login.connect' | transloco }}
10819
+ </button>
10820
+ </CardFooter>
10821
+ </Card>
10822
+ `
10823
+ }]
10824
+ }] });
10825
+
10736
10826
  /**
10737
10827
  * Represents the LoginComponent class, which is responsible for handling the login functionality.
10738
10828
  * This component is used to authenticate users and manage the user's authentication status.
@@ -11047,10 +11137,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
11047
11137
 
11048
11138
  class AuthPageComponent {
11049
11139
  mode = input(...(ngDevMode ? [undefined, { debugName: "mode" }] : []));
11050
- view = linkedSignal(() => this.mode() ?? "signin", ...(ngDevMode ? [{ debugName: "view" }] : []));
11140
+ view = linkedSignal(() => this.mode() ?? this.routeView(), ...(ngDevMode ? [{ debugName: "view" }] : []));
11051
11141
  username = signal("", ...(ngDevMode ? [{ debugName: "username" }] : []));
11052
11142
  alert = signal(undefined, ...(ngDevMode ? [{ debugName: "alert" }] : []));
11053
11143
  route = inject(ActivatedRoute);
11144
+ /**
11145
+ * Default view derived from the route. The `/logout` route renders the "signed out" confirmation
11146
+ * (NOT the sign-in form): in external-auth modes the form would auto-restart the handshake and
11147
+ * re-authenticate the user, defeating the logout. Everything else defaults to the sign-in form.
11148
+ */
11149
+ routeView() {
11150
+ return this.route.snapshot.routeConfig?.path === "logout" ? "signedout" : "signin";
11151
+ }
11054
11152
  constructor() {
11055
11153
  const params = this.route.snapshot.queryParams;
11056
11154
  const u = params["username"] || "";
@@ -11077,6 +11175,8 @@ class AuthPageComponent {
11077
11175
  (cancel)="view.set('signin')"
11078
11176
  (success)="view.set('signin')"
11079
11177
  />
11178
+ } @else if (view() === 'signedout') {
11179
+ <signed-out />
11080
11180
  } @else {
11081
11181
  <sign-in
11082
11182
  (changePassword)="view.set('changepassword')"
@@ -11084,14 +11184,14 @@ class AuthPageComponent {
11084
11184
  />
11085
11185
  }
11086
11186
  </div>
11087
- `, isInline: true, dependencies: [{ kind: "component", type: SignInComponent, selector: "signIn, signin, sign-in", inputs: ["class", "username", "password"], outputs: ["forgotPassword", "usernameChange", "passwordChange"] }, { kind: "component", type: ChangePasswordComponent, selector: "change-password, ChangePassword, changepassword", inputs: ["username", "alert", "redirectAfterSuccess", "redirectAfterCancel", "currentPassword", "newPassword", "confirmPassword"], outputs: ["success", "cancel", "currentPasswordChange", "newPasswordChange", "confirmPasswordChange"] }, { kind: "component", type: ForgotPasswordComponent, selector: "forgot-password, ForgotPassword, forgotpassword", inputs: ["userName"], outputs: ["cancel", "success", "userNameChange"] }] });
11187
+ `, isInline: true, dependencies: [{ kind: "component", type: SignInComponent, selector: "signIn, signin, sign-in", inputs: ["class", "username", "password"], outputs: ["forgotPassword", "usernameChange", "passwordChange"] }, { kind: "component", type: ChangePasswordComponent, selector: "change-password, ChangePassword, changepassword", inputs: ["username", "alert", "redirectAfterSuccess", "redirectAfterCancel", "currentPassword", "newPassword", "confirmPassword"], outputs: ["success", "cancel", "currentPasswordChange", "newPasswordChange", "confirmPasswordChange"] }, { kind: "component", type: ForgotPasswordComponent, selector: "forgot-password, ForgotPassword, forgotpassword", inputs: ["userName"], outputs: ["cancel", "success", "userNameChange"] }, { kind: "component", type: SignedOutComponent, selector: "signed-out, SignedOut, signedout" }] });
11088
11188
  }
11089
11189
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: AuthPageComponent, decorators: [{
11090
11190
  type: Component,
11091
11191
  args: [{
11092
11192
  selector: "auth-page, AuthPage, authpage",
11093
11193
  providers: [provideTranslocoScope("login")],
11094
- imports: [SignInComponent, ChangePasswordComponent, ForgotPasswordComponent],
11194
+ imports: [SignInComponent, ChangePasswordComponent, ForgotPasswordComponent, SignedOutComponent],
11095
11195
  host: { class: "min-h-screen grid place-items-center p-6 bg-background" },
11096
11196
  template: `
11097
11197
  <div class="w-full max-w-md">
@@ -11106,6 +11206,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
11106
11206
  (cancel)="view.set('signin')"
11107
11207
  (success)="view.set('signin')"
11108
11208
  />
11209
+ } @else if (view() === 'signedout') {
11210
+ <signed-out />
11109
11211
  } @else {
11110
11212
  <sign-in
11111
11213
  (changePassword)="view.set('changepassword')"
@@ -16270,5 +16372,5 @@ const queryNameResolver = () => {
16270
16372
  * Generated bundle index. Do not edit.
16271
16373
  */
16272
16374
 
16273
- export { AGGREGATIONS_NAMES, AGGREGATIONS_NAMES_PRESET_DEFAULT, APP_FEATURES, AdvancedFiltersComponent, AdvancedSearch, AdvancedSearchComponent, AggregationComponent, AggregationDateComponent, AggregationDateRangeDialogComponent, AggregationListComponent, AggregationPanelComponent, AggregationTreeComponent, AggregationsService, AggregationsStore, Alert, AlertDialog, AlertsComponent, AppService, AppStore, ApplicationService, ApplicationStore, ArticleEntities, ArticleExtracts, ArticleLabels, ArticleSimilarDocuments, AsideFiltersComponent, AuditFeedbackType, AuditService, AuthGuard, AuthPageComponent, AutocompleteService, BOOKMARKS_CONFIG, BOOKMARKS_OPTIONS, BackdropComponent, BackdropService, BookmarkButtonComponent, BookmarksComponent, COLLECTIONS_CONFIG, COLLECTIONS_OPTIONS, COMPONENTS_FOR_DOCUMENT_TYPE, ChangePasswordComponent, ChildMarkerDirective, CollectionsComponent, CollectionsDialog, DRAWER_COMPONENT, DRAWER_STACK_MAX_COUNT, DateComponent, DeleteCollectionDialog, DidYouMeanComponent, DocumentLocatorComponent, DrawerAdvancedFiltersComponent, DrawerComponent, DrawerNavbarComponent, DrawerPreviewComponent, DrawerService, DrawerStackComponent, DrawerStackService, DropdownInputComponent, DropdownListComponent, ErrorComponent, ExportDialog, ExportService, FILTERS_BREAKPOINT, FILTER_DATE_ALLOW_CUSTOM_RANGE, FeedbackDialogComponent, FileSizePipe, FilterButtonComponent, FiltersBarComponent, HIGHLIGHTS, HighlightWordPipe, InfinityScrollDirective, InlineWorker, JsonMethodPluginService, KeyboardNavigatorDirective, LabelService, LabelsEditDialog, LoadingComponent, MetadataComponent, MissingTermsComponent, MoreButtonComponent, MoreComponent, MultiSelectLabelsComponent, MultiSelectionToolbarComponent, NON_SEARCHABLE_COLUMNS, NON_SEARCHABLE_DEFAULTS, NavbarTabsComponent, NavigationService, NoResultComponent, OpenArticleOnCtrlEnterDirective, OperatorPipe, OverflowItemDirective, OverflowManagerDirective, OverflowStopDirective, OverrideUserDialogComponent, PREVIEW_CONFIG, PagerComponent, PreviewNavigator, PreviewService, PrincipalService, PrincipalStore, QueryParamsStore, QueryService, RECENT_SEARCHES_CONFIG, RECENT_SEARCHES_OPTIONS, ROUTE_COMPONENTS, RecentSearchesComponent, ResetUserSettingsDialogComponent, SAVED_SEARCHES_CONFIG, SAVED_SEARCHES_OPTIONS, SavedSearchDialog, SavedSearchesComponent, SavedSearchesService, SearchFeedbackComponent, SearchInputFooter, SearchService, SelectArticleDirective, SelectArticleOnClickDirective, SelectionHistoryService, SelectionService, SelectionStore, ShowBookmarkDirective, SidebarNavComponent, SignInComponent, SortSelectorComponent, SourceComponent, SourceIconPipe, SponsoredResultsComponent, SyslangPipe, THEMES, TextChunkService, ThemeProviderDirective, ThemeSelectorComponent, ThemeStore, ThemeToggleComponent, TranslocoDateImpurePipe, UserProfileDialog, UserProfileFormComponent, UserProfileService, UserSettingsStore, applyThemeToNativeElement, auditInterceptorFn, authInterceptorFn, bodyInterceptorFn, bootstrapApp, buildQuery, debouncedSignal, errorInterceptorFn, getCurrentPath, getCurrentQueryName, getQueryNameFromRoute, injectRouteNavigation, processCssVars, queryNameResolver, signIn, themeColorNameToCssVariable, themeColorsToCssVariables, toastInterceptorFn, withAggregationsFeatures, withAlertsFeatures, withAppFeatures, withApplicationFeatures, withAssistantFeatures, withBasketsFeatures, withBookmarkFeatures, withBootstrapApp, withExtractsFeatures, withFetch, withMultiSelectionFeatures, withPrincipalFeatures, withQueryParamsFeatures, withRecentSearchesFeatures, withSavedSearchesFeatures, withSelectionFeatures, withThemeBodyHook, withThemes, withThemesFeatures, withUserSettingsFeatures };
16375
+ export { AGGREGATIONS_NAMES, AGGREGATIONS_NAMES_PRESET_DEFAULT, APP_FEATURES, AdvancedFiltersComponent, AdvancedSearch, AdvancedSearchComponent, AggregationComponent, AggregationDateComponent, AggregationDateRangeDialogComponent, AggregationListComponent, AggregationPanelComponent, AggregationTreeComponent, AggregationsService, AggregationsStore, Alert, AlertDialog, AlertsComponent, AppService, AppStore, ApplicationService, ApplicationStore, ArticleEntities, ArticleExtracts, ArticleLabels, ArticleSimilarDocuments, AsideFiltersComponent, AuditFeedbackType, AuditService, AuthGuard, AuthPageComponent, AutocompleteService, BOOKMARKS_CONFIG, BOOKMARKS_OPTIONS, BackdropComponent, BackdropService, BookmarkButtonComponent, BookmarksComponent, COLLECTIONS_CONFIG, COLLECTIONS_OPTIONS, COMPONENTS_FOR_DOCUMENT_TYPE, ChangePasswordComponent, ChildMarkerDirective, CollectionsComponent, CollectionsDialog, DRAWER_COMPONENT, DRAWER_STACK_MAX_COUNT, DateComponent, DeleteCollectionDialog, DidYouMeanComponent, DocumentLocatorComponent, DrawerAdvancedFiltersComponent, DrawerComponent, DrawerNavbarComponent, DrawerPreviewComponent, DrawerService, DrawerStackComponent, DrawerStackService, DropdownInputComponent, DropdownListComponent, ErrorComponent, ExportDialog, ExportService, FILTERS_BREAKPOINT, FILTER_DATE_ALLOW_CUSTOM_RANGE, FeedbackDialogComponent, FileSizePipe, FilterButtonComponent, FiltersBarComponent, HIGHLIGHTS, HighlightWordPipe, InfinityScrollDirective, InlineWorker, JsonMethodPluginService, KeyboardNavigatorDirective, LabelService, LabelsEditDialog, LoadingComponent, MetadataComponent, MissingTermsComponent, MoreButtonComponent, MoreComponent, MultiSelectLabelsComponent, MultiSelectionToolbarComponent, NON_SEARCHABLE_COLUMNS, NON_SEARCHABLE_DEFAULTS, NavbarTabsComponent, NavigationService, NoResultComponent, OpenArticleOnCtrlEnterDirective, OperatorPipe, OverflowItemDirective, OverflowManagerDirective, OverflowStopDirective, OverrideUserDialogComponent, PREVIEW_CONFIG, PagerComponent, PreviewNavigator, PreviewService, PrincipalService, PrincipalStore, QueryParamsStore, QueryService, RECENT_SEARCHES_CONFIG, RECENT_SEARCHES_OPTIONS, ROUTE_COMPONENTS, RecentSearchesComponent, ResetUserSettingsDialogComponent, SAVED_SEARCHES_CONFIG, SAVED_SEARCHES_OPTIONS, SavedSearchDialog, SavedSearchesComponent, SavedSearchesService, SearchFeedbackComponent, SearchInputFooter, SearchService, SelectArticleDirective, SelectArticleOnClickDirective, SelectionHistoryService, SelectionService, SelectionStore, ShowBookmarkDirective, SidebarNavComponent, SignInComponent, SignedOutComponent, SortSelectorComponent, SourceComponent, SourceIconPipe, SponsoredResultsComponent, SyslangPipe, THEMES, TextChunkService, ThemeProviderDirective, ThemeSelectorComponent, ThemeStore, ThemeToggleComponent, TranslocoDateImpurePipe, UserProfileDialog, UserProfileFormComponent, UserProfileService, UserSettingsStore, applyThemeToNativeElement, auditInterceptorFn, authInterceptorFn, bodyInterceptorFn, bootstrapApp, buildQuery, debouncedSignal, errorInterceptorFn, getCurrentPath, getCurrentQueryName, getQueryNameFromRoute, injectRouteNavigation, processCssVars, queryNameResolver, signIn, themeColorNameToCssVariable, themeColorsToCssVariables, toastInterceptorFn, withAggregationsFeatures, withAlertsFeatures, withAppFeatures, withApplicationFeatures, withAssistantFeatures, withBasketsFeatures, withBookmarkFeatures, withBootstrapApp, withExtractsFeatures, withFetch, withMultiSelectionFeatures, withPrincipalFeatures, withQueryParamsFeatures, withRecentSearchesFeatures, withSavedSearchesFeatures, withSelectionFeatures, withThemeBodyHook, withThemes, withThemesFeatures, withUserSettingsFeatures };
16274
16376
  //# sourceMappingURL=sinequa-atomic-angular.mjs.map