@coolms/core-angular 2.0.0-alpha.7 → 2.0.0-alpha.8
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/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,13 @@ currently serves. Earlier alphas are deliberately not reconstructed: entries are
|
|
|
9
9
|
in the same commit as the work they describe, and inventing the ones that
|
|
10
10
|
predate this file would be a worse record than not having them.
|
|
11
11
|
|
|
12
|
+
## 2.0.0-alpha.8 - 2026-11-21
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- `IdentityApiClient.getDeclaredSettings(host?)`: the person's settings as declared, each key with the value in force and
|
|
17
|
+
the person's own (null when they set none), so a reader can tell a chosen value from the installation's.
|
|
18
|
+
|
|
12
19
|
## 2.0.0-alpha.7 - 2026-11-17
|
|
13
20
|
|
|
14
21
|
### Changed
|
|
@@ -119,6 +119,10 @@ var IdentityApiClient = class IdentityApiClient {
|
|
|
119
119
|
this.settingsRead$ = read$;
|
|
120
120
|
return read$;
|
|
121
121
|
}
|
|
122
|
+
getDeclaredSettings(host) {
|
|
123
|
+
const query = host === void 0 ? "" : `?host=${encodeURIComponent(host)}`;
|
|
124
|
+
return this.http.get(`${this.manifest.identity.settingsUrl}/declared${query}`, { headers: { Accept: "application/json" } });
|
|
125
|
+
}
|
|
122
126
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
123
127
|
minVersion: "12.0.0",
|
|
124
128
|
version: "22.2.3",
|
|
@@ -225,6 +229,20 @@ var ElevationService = class ElevationService {
|
|
|
225
229
|
return iso ? new Date(iso) : null;
|
|
226
230
|
};
|
|
227
231
|
changes$ = new Subject();
|
|
232
|
+
retriesWaiting = signal(0, ...ngDevMode ? [{ debugName: "retriesWaiting" }] : /* istanbul ignore next */ []);
|
|
233
|
+
retriesPending = this.retriesWaiting.asReadonly();
|
|
234
|
+
retriesSettled$ = new Subject();
|
|
235
|
+
holdForRetry() {
|
|
236
|
+
this.retriesWaiting.update((n) => n + 1);
|
|
237
|
+
let held = true;
|
|
238
|
+
return () => {
|
|
239
|
+
if (held) {
|
|
240
|
+
held = false;
|
|
241
|
+
this.retriesWaiting.update((n) => n - 1);
|
|
242
|
+
if (this.retriesWaiting() === 0) this.retriesSettled$.next();
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
}
|
|
228
246
|
expiryTimer = null;
|
|
229
247
|
pendingPrompt = null;
|
|
230
248
|
expiryAnnouncePending = false;
|
|
@@ -1412,11 +1430,12 @@ const elevationInterceptor = (req, next) => {
|
|
|
1412
1430
|
return throwError(() => err);
|
|
1413
1431
|
};
|
|
1414
1432
|
if (!elevation.canPrompt) return decline();
|
|
1433
|
+
const release = elevation.holdForRetry();
|
|
1415
1434
|
return elevation.refresh().pipe(switchMap((state) => state.elevated ? of(true) : elevation.requestElevation({
|
|
1416
1435
|
state,
|
|
1417
1436
|
refusal,
|
|
1418
1437
|
action
|
|
1419
|
-
})), catchError(() => of(false)), switchMap((granted) => granted ? next(req) : decline()));
|
|
1438
|
+
})), catchError(() => of(false)), switchMap((granted) => granted ? next(req) : decline()), finalize(release));
|
|
1420
1439
|
}));
|
|
1421
1440
|
};
|
|
1422
1441
|
function actionOf(req, apiBase = "/api/v1") {
|