@sinequa/atomic-angular 2.0.0 → 2.2.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.
@@ -99,7 +99,7 @@ export type UserSettingsState = {
99
99
  assistants: Record<string, unknown>;
100
100
  collapseAssistant?: boolean;
101
101
  language?: string;
102
- userTheme?: 'dark' | 'light' | 'system';
102
+ userTheme?: "dark" | "light" | "system";
103
103
  agents?: AgentUserSettings;
104
104
  /** Preview highlight categories the user has turned off (global, applied across documents). */
105
105
  disabledHighlightCategories?: string[];
@@ -6468,24 +6468,24 @@ export declare const THEMES: {
6468
6468
  id: string;
6469
6469
  private: boolean;
6470
6470
  colors: {
6471
- 'button-primary-background': string;
6471
+ "button-primary-background": string;
6472
6472
  background: string;
6473
6473
  foreground: string;
6474
6474
  card: string;
6475
- 'card-foreground': string;
6475
+ "card-foreground": string;
6476
6476
  active: string;
6477
- 'active-foreground': string;
6478
- 'active-background': string;
6477
+ "active-foreground": string;
6478
+ "active-background": string;
6479
6479
  primary: string;
6480
- 'primary-foreground': string;
6480
+ "primary-foreground": string;
6481
6481
  secondary: string;
6482
- 'secondary-foreground': string;
6482
+ "secondary-foreground": string;
6483
6483
  muted: string;
6484
- 'muted-foreground': string;
6484
+ "muted-foreground": string;
6485
6485
  accent: string;
6486
- 'accent-foreground': string;
6486
+ "accent-foreground": string;
6487
6487
  destructive: string;
6488
- 'destructive-foreground': string;
6488
+ "destructive-foreground": string;
6489
6489
  border: string;
6490
6490
  input: string;
6491
6491
  ring: string;
@@ -6494,20 +6494,20 @@ export declare const THEMES: {
6494
6494
  background: string;
6495
6495
  foreground: string;
6496
6496
  card: string;
6497
- 'card-foreground': string;
6497
+ "card-foreground": string;
6498
6498
  active: string;
6499
- 'active-foreground': string;
6500
- 'active-background': string;
6499
+ "active-foreground": string;
6500
+ "active-background": string;
6501
6501
  primary: string;
6502
- 'primary-foreground': string;
6502
+ "primary-foreground": string;
6503
6503
  secondary: string;
6504
- 'secondary-foreground': string;
6504
+ "secondary-foreground": string;
6505
6505
  muted: string;
6506
- 'muted-foreground': string;
6506
+ "muted-foreground": string;
6507
6507
  accent: string;
6508
- 'accent-foreground': string;
6508
+ "accent-foreground": string;
6509
6509
  destructive: string;
6510
- 'destructive-foreground': string;
6510
+ "destructive-foreground": string;
6511
6511
  border: string;
6512
6512
  input: string;
6513
6513
  ring: string;
@@ -9265,24 +9265,24 @@ export declare class ThemeSelectorComponent {
9265
9265
  id: string;
9266
9266
  private: boolean;
9267
9267
  colors: {
9268
- 'button-primary-background': string;
9268
+ "button-primary-background": string;
9269
9269
  background: string;
9270
9270
  foreground: string;
9271
9271
  card: string;
9272
- 'card-foreground': string;
9272
+ "card-foreground": string;
9273
9273
  active: string;
9274
- 'active-foreground': string;
9275
- 'active-background': string;
9274
+ "active-foreground": string;
9275
+ "active-background": string;
9276
9276
  primary: string;
9277
- 'primary-foreground': string;
9277
+ "primary-foreground": string;
9278
9278
  secondary: string;
9279
- 'secondary-foreground': string;
9279
+ "secondary-foreground": string;
9280
9280
  muted: string;
9281
- 'muted-foreground': string;
9281
+ "muted-foreground": string;
9282
9282
  accent: string;
9283
- 'accent-foreground': string;
9283
+ "accent-foreground": string;
9284
9284
  destructive: string;
9285
- 'destructive-foreground': string;
9285
+ "destructive-foreground": string;
9286
9286
  border: string;
9287
9287
  input: string;
9288
9288
  ring: string;
@@ -9291,20 +9291,20 @@ export declare class ThemeSelectorComponent {
9291
9291
  background: string;
9292
9292
  foreground: string;
9293
9293
  card: string;
9294
- 'card-foreground': string;
9294
+ "card-foreground": string;
9295
9295
  active: string;
9296
- 'active-foreground': string;
9297
- 'active-background': string;
9296
+ "active-foreground": string;
9297
+ "active-background": string;
9298
9298
  primary: string;
9299
- 'primary-foreground': string;
9299
+ "primary-foreground": string;
9300
9300
  secondary: string;
9301
- 'secondary-foreground': string;
9301
+ "secondary-foreground": string;
9302
9302
  muted: string;
9303
- 'muted-foreground': string;
9303
+ "muted-foreground": string;
9304
9304
  accent: string;
9305
- 'accent-foreground': string;
9305
+ "accent-foreground": string;
9306
9306
  destructive: string;
9307
- 'destructive-foreground': string;
9307
+ "destructive-foreground": string;
9308
9308
  border: string;
9309
9309
  input: string;
9310
9310
  ring: string;
@@ -19890,13 +19890,67 @@ export declare function provideDocumentLang(): EnvironmentProviders;
19890
19890
  * ```
19891
19891
  */
19892
19892
  export declare function provideKeyboardShortcuts(): EnvironmentProviders;
19893
+ export type SessionExpiryOptions = {
19894
+ /** How long before the expiry the user is warned. Defaults to 5 minutes. */
19895
+ warnBeforeMs?: number;
19896
+ /**
19897
+ * How long after start-up the interface language is considered settled. Defaults to 5000.
19898
+ *
19899
+ * A notification can be due right at start-up (a session already within the warning window). Transloco
19900
+ * keeps answering in its default language until the application applies the user's one — typically once
19901
+ * their settings are loaded — and nothing signals that moment, so without a delay the notification is
19902
+ * worded in the wrong language. Later notifications, the usual case, are not affected. `0` disables it.
19903
+ */
19904
+ startupGraceMs?: number;
19905
+ /**
19906
+ * `duration` of the "session expired" notification. Defaults to `0`: the session is gone, so it stays
19907
+ * until the user dismisses it or signs in again.
19908
+ *
19909
+ * The library has no toast layer of its own — it only emits `notify` events — so the meaning of a
19910
+ * duration belongs to the application's bridge. `0` is "never closes on its own" for `sonner-a11y`
19911
+ * (`Infinity` is not: a non-finite delay reaches a timer that fires straight away). Adapt it to yours.
19912
+ */
19913
+ expiredDuration?: number;
19914
+ /** Action of the "session expired" notification. Defaults to reloading the page, which starts a new sign-in. */
19915
+ onReconnect?: () => void;
19916
+ };
19917
+ /**
19918
+ * Tells the user that the session is about to expire, and that it has.
19919
+ *
19920
+ * Two independent signals, because no single one works for every way of signing in:
19921
+ * - **Proactive**: when the stored token carries an expiry, a warning is scheduled shortly before it. The
19922
+ * date is re-read on every `tokenRefreshed`, so a server that renews the session as the user works
19923
+ * moves the window with them, and the warning only fires for a session that is really running out. With
19924
+ * a sign-in that leaves no readable token (ambient SSO) there is simply nothing to schedule.
19925
+ * - **Reactive**: a 401 that reaches its caller on a session that had been established says it is gone,
19926
+ * whatever the sign-in. It follows the client's `sessionLost` event (atomic 2.8), not `unauthorized`:
19927
+ * `unauthorized` fires before `auth.recoverFromUnauthorized` runs, so a session the recovery
19928
+ * re-establishes silently (SSO) would be announced lost. The client already leaves out the 401s that
19929
+ * are answers (sign-in, the start-up probe, audit) and the requests trailing behind a logout. The
19930
+ * `HttpClient` channel, which the client never sees, is reported by `errorInterceptorFn`.
19931
+ *
19932
+ * Both raise `notify` events (`warning` and `error`), rendered by the application's toast bridge.
19933
+ *
19934
+ * Not covered: a reverse proxy (OIDC) whose own session lapsed answers with a cross-origin redirect to the
19935
+ * identity provider. `fetch` rejects with a `TypeError` before the client sees a response, so no event is
19936
+ * raised and neither signal fires.
19937
+ *
19938
+ * Registered at the root it covers the root client; a second backend served by a scope has its own
19939
+ * events, so register it in the scope's providers too.
19940
+ *
19941
+ * @example
19942
+ * ```ts
19943
+ * providers: [provideAtomicClient({ app: "my-app" }), provideSessionExpiry({ warnBeforeMs: 2 * 60_000 })]
19944
+ * ```
19945
+ */
19946
+ export declare function provideSessionExpiry(options?: SessionExpiryOptions): EnvironmentProviders;
19893
19947
  /**
19894
19948
  * Resolves the name of the default query from the application store.
19895
19949
  *
19896
19950
  * @returns The name of the default query or an empty string if not available.
19897
19951
  */
19898
19952
  export declare const queryNameResolver: ResolveFn<string>;
19899
- export type PreviewHighlightName = 'company' | 'geo' | 'person' | 'extractslocations' | 'matchlocations';
19953
+ export type PreviewHighlightName = "company" | "geo" | "person" | "extractslocations" | "matchlocations";
19900
19954
  export type PreviewHighlight = {
19901
19955
  name: PreviewHighlightName;
19902
19956
  color: string;