@coolms/core-angular 2.0.0-alpha.7 → 2.0.0-alpha.9
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coolms/core-angular",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.9",
|
|
4
4
|
"description": "The CoolMS client runtime for Angular: session and token refresh, boot manifest and app configuration, theme, user preferences, error handling, HTTP interceptors, and the wire types the CoolMS API emits.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -494,6 +494,20 @@ export type AuthAudience = 'admin' | 'workspace';
|
|
|
494
494
|
* None by default: an application that provides none signs in as before, naming no audience.
|
|
495
495
|
*/
|
|
496
496
|
export declare const AUTH_AUDIENCE: InjectionToken<AuthAudience | null>;
|
|
497
|
+
/** One declared setting as the server reads it for the person: the value in force, and what they set themselves. */
|
|
498
|
+
export interface DeclaredSettingKey {
|
|
499
|
+
readonly key: string;
|
|
500
|
+
/** The value in force: the person's own, else the installation's. */
|
|
501
|
+
readonly value: unknown;
|
|
502
|
+
/** What the person set themselves; null when they set nothing and the installation's value applies. */
|
|
503
|
+
readonly own: unknown;
|
|
504
|
+
readonly locked: boolean;
|
|
505
|
+
}
|
|
506
|
+
/** One section of the person's declared settings. */
|
|
507
|
+
export interface DeclaredSettingsSection {
|
|
508
|
+
readonly section: string;
|
|
509
|
+
readonly keys: ReadonlyArray<DeclaredSettingKey>;
|
|
510
|
+
}
|
|
497
511
|
/**
|
|
498
512
|
* The identity endpoints core owns: the session lifecycle, plus the settings
|
|
499
513
|
* read at boot.
|
|
@@ -529,6 +543,11 @@ export declare class IdentityApiClient {
|
|
|
529
543
|
* is kept past the answer, so a save is never hidden behind an old read.
|
|
530
544
|
*/
|
|
531
545
|
getSettings(): Observable<Record<string, Record<string, unknown>>>;
|
|
546
|
+
/**
|
|
547
|
+
* The person's settings as declared: each section's keys with the value in force and the person's own (null when
|
|
548
|
+
* they set none). `host` picks the sections a host reads (`console` for the admin); none gives every section.
|
|
549
|
+
*/
|
|
550
|
+
getDeclaredSettings(host?: string): Observable<ReadonlyArray<DeclaredSettingsSection>>;
|
|
532
551
|
static ɵfac: i0.ɵɵFactoryDeclaration<IdentityApiClient, never>;
|
|
533
552
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
534
553
|
}
|
|
@@ -878,9 +897,10 @@ export interface ElevationState {
|
|
|
878
897
|
/**
|
|
879
898
|
* `closed` is the beacon (the panel was closed or reloaded), `dropped_by_user`
|
|
880
899
|
* the explicit drop, `refresh_from_other_pair` the server's refresh tripwire,
|
|
881
|
-
* `
|
|
900
|
+
* `factor_reset` the person's second factor reset on the server, which ends
|
|
901
|
+
* every live elevation they hold, `never` a session that has not elevated yet.
|
|
882
902
|
*/
|
|
883
|
-
export type ElevationEndedReason = 'expired' | 'closed' | 'dropped_by_user' | 'refresh_from_other_pair' | 'never';
|
|
903
|
+
export type ElevationEndedReason = 'expired' | 'closed' | 'dropped_by_user' | 'refresh_from_other_pair' | 'factor_reset' | 'never';
|
|
884
904
|
export interface ElevationEnded {
|
|
885
905
|
reason: ElevationEndedReason;
|
|
886
906
|
/** ISO 8601, null for `never`. */
|
|
@@ -1072,6 +1092,17 @@ export declare class ElevationService {
|
|
|
1072
1092
|
* so subscribers that refetch a listing on it never refetch for no reason.
|
|
1073
1093
|
*/
|
|
1074
1094
|
readonly changes$: Subject<ElevationChange>;
|
|
1095
|
+
private readonly retriesWaiting;
|
|
1096
|
+
/**
|
|
1097
|
+
* How many refused writes wait to be sent again: each is counted from the moment its refusal is taken up, before
|
|
1098
|
+
* any prompt opens, until its repeat has answered or the person declined. A view that reloads after a grant waits
|
|
1099
|
+
* for 0, so the reload never cancels a repeat in flight.
|
|
1100
|
+
*/
|
|
1101
|
+
readonly retriesPending: import("@angular/core").Signal<number>;
|
|
1102
|
+
/** Each time the last refused write waiting for its repeat stops waiting: `retriesPending` has come back to 0. */
|
|
1103
|
+
readonly retriesSettled$: Subject<void>;
|
|
1104
|
+
/** Counts one refused write as waiting for its repeat; the function returned ends that count, once. */
|
|
1105
|
+
holdForRetry(): () => void;
|
|
1075
1106
|
private expiryTimer;
|
|
1076
1107
|
private pendingPrompt;
|
|
1077
1108
|
private expiryAnnouncePending;
|
|
@@ -1997,6 +2028,7 @@ export declare class NaviGraphService {
|
|
|
1997
2028
|
* semantics.
|
|
1998
2029
|
*/
|
|
1999
2030
|
matchesShowWhen(showWhen: Record<string, unknown> | undefined | null, record: Record<string, unknown>): boolean;
|
|
2031
|
+
private isCondition;
|
|
2000
2032
|
private evalCondition;
|
|
2001
2033
|
/**
|
|
2002
2034
|
* Fetch a graph endpoint and return a nested tree.
|
|
@@ -2300,4 +2332,23 @@ export interface CurrentSectionPort {
|
|
|
2300
2332
|
* nothing and simply sends no `X-CoolMS-Section` header, which is exactly what
|
|
2301
2333
|
* a single-site install wants.
|
|
2302
2334
|
*/
|
|
2303
|
-
export declare const CURRENT_SECTION: InjectionToken<CurrentSectionPort>;
|
|
2335
|
+
export declare const CURRENT_SECTION: InjectionToken<CurrentSectionPort>;
|
|
2336
|
+
/**
|
|
2337
|
+
* One floating menu open in the whole app at a time: a dropdown, a picker's results, a menu, a date picker. Opening one
|
|
2338
|
+
* closes the one open before it, without moving the focus, wherever the two were opened.
|
|
2339
|
+
*/
|
|
2340
|
+
export declare class FloatingMenus {
|
|
2341
|
+
private current;
|
|
2342
|
+
/** This menu has opened: the one open before it, if another, closes. */
|
|
2343
|
+
claim(close: () => void): void;
|
|
2344
|
+
/** This menu has closed. */
|
|
2345
|
+
release(close: () => void): void;
|
|
2346
|
+
/**
|
|
2347
|
+
* Follow a menu's open state from an injection context (a component's or a service's field or constructor): when
|
|
2348
|
+
* it opens it claims the app's one floating menu, and `close` closes it when another opens. `close` must not move
|
|
2349
|
+
* the focus. Gives back the release, which the owner's destruction also runs.
|
|
2350
|
+
*/
|
|
2351
|
+
track(open: () => boolean, close: () => void): () => void;
|
|
2352
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FloatingMenus, never>;
|
|
2353
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
2354
|
+
}
|