@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/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,27 @@ 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.9 - 2026-11-30
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- `FloatingMenus`: one floating menu open in the whole app at a time. A floating element (a dropdown, a picker's
|
|
17
|
+
results, a menu) claims it while open, and opening another closes it without moving the focus. `track(open, close)`
|
|
18
|
+
follows an open state from an injection context and releases on destroy; `claim(close)` and `release(close)` serve
|
|
19
|
+
code without one.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- The elevation state's ended reasons include `factor_reset`: the person's second factor was reset on the server, which ends every live elevation they hold (`ElevationEndedReason`).
|
|
24
|
+
- `NaviGraphService` runs the shared condition cases (design tokens' `contract/conditions.json` at v0.28.0, pinned beside its spec with its origin): every case through the evaluator, unchanged. The `cn` operator (a list holding the value, strictly equal, never a substring); an `and` or `or` whose value is not a list never holds, as an unknown operator does not.
|
|
25
|
+
|
|
26
|
+
## 2.0.0-alpha.8 - 2026-11-21
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- `IdentityApiClient.getDeclaredSettings(host?)`: the person's settings as declared, each key with the value in force and
|
|
31
|
+
the person's own (null when they set none), so a reader can tell a chosen value from the installation's.
|
|
32
|
+
|
|
12
33
|
## 2.0.0-alpha.7 - 2026-11-17
|
|
13
34
|
|
|
14
35
|
### 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") {
|
|
@@ -2056,9 +2075,18 @@ var NaviGraphService = class NaviGraphService {
|
|
|
2056
2075
|
if (!showWhen) return true;
|
|
2057
2076
|
return this.evalCondition(showWhen, record);
|
|
2058
2077
|
}
|
|
2078
|
+
isCondition(value) {
|
|
2079
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
2080
|
+
}
|
|
2059
2081
|
evalCondition(cond, record) {
|
|
2060
|
-
if ("and" in cond)
|
|
2061
|
-
|
|
2082
|
+
if ("and" in cond) {
|
|
2083
|
+
const parts = cond["and"];
|
|
2084
|
+
return Array.isArray(parts) && parts.every((c) => this.isCondition(c) && this.evalCondition(c, record));
|
|
2085
|
+
}
|
|
2086
|
+
if ("or" in cond) {
|
|
2087
|
+
const parts = cond["or"];
|
|
2088
|
+
return Array.isArray(parts) && parts.some((c) => this.isCondition(c) && this.evalCondition(c, record));
|
|
2089
|
+
}
|
|
2062
2090
|
const field = cond["field"];
|
|
2063
2091
|
if (!(field in record)) return false;
|
|
2064
2092
|
const val = record[field];
|
|
@@ -2067,6 +2095,7 @@ var NaviGraphService = class NaviGraphService {
|
|
|
2067
2095
|
case "ne": return val !== cond["value"];
|
|
2068
2096
|
case "in": return Array.isArray(cond["value"]) && cond["value"].includes(val);
|
|
2069
2097
|
case "nin": return Array.isArray(cond["value"]) && !cond["value"].includes(val);
|
|
2098
|
+
case "cn": return Array.isArray(val) && val.some((item) => item === cond["value"]);
|
|
2070
2099
|
case "startsWith": return typeof val === "string" && typeof cond["value"] === "string" && val.startsWith(cond["value"]);
|
|
2071
2100
|
default: return false;
|
|
2072
2101
|
}
|
|
@@ -2343,6 +2372,51 @@ function shouldStamp(url) {
|
|
|
2343
2372
|
if (path.startsWith("/api/v1/auth/")) return false;
|
|
2344
2373
|
return true;
|
|
2345
2374
|
}
|
|
2346
|
-
|
|
2375
|
+
var FloatingMenus = class FloatingMenus {
|
|
2376
|
+
current = null;
|
|
2377
|
+
claim(close) {
|
|
2378
|
+
const before = this.current;
|
|
2379
|
+
this.current = close;
|
|
2380
|
+
if (before !== null && before !== close) before();
|
|
2381
|
+
}
|
|
2382
|
+
release(close) {
|
|
2383
|
+
if (this.current === close) this.current = null;
|
|
2384
|
+
}
|
|
2385
|
+
track(open, close) {
|
|
2386
|
+
effect(() => {
|
|
2387
|
+
if (open()) untracked(() => this.claim(close));
|
|
2388
|
+
else this.release(close);
|
|
2389
|
+
});
|
|
2390
|
+
const release = () => this.release(close);
|
|
2391
|
+
inject(DestroyRef).onDestroy(release);
|
|
2392
|
+
return release;
|
|
2393
|
+
}
|
|
2394
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2395
|
+
minVersion: "12.0.0",
|
|
2396
|
+
version: "22.2.3",
|
|
2397
|
+
ngImport: i0,
|
|
2398
|
+
type: FloatingMenus,
|
|
2399
|
+
deps: [],
|
|
2400
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
2401
|
+
});
|
|
2402
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
2403
|
+
minVersion: "12.0.0",
|
|
2404
|
+
version: "22.2.3",
|
|
2405
|
+
ngImport: i0,
|
|
2406
|
+
type: FloatingMenus,
|
|
2407
|
+
providedIn: "root"
|
|
2408
|
+
});
|
|
2409
|
+
};
|
|
2410
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2411
|
+
minVersion: "12.0.0",
|
|
2412
|
+
version: "22.2.3",
|
|
2413
|
+
ngImport: i0,
|
|
2414
|
+
type: FloatingMenus,
|
|
2415
|
+
decorators: [{
|
|
2416
|
+
type: Injectable,
|
|
2417
|
+
args: [{ providedIn: "root" }]
|
|
2418
|
+
}]
|
|
2419
|
+
});
|
|
2420
|
+
export { AUDIENCE_NOT_GRANTED, AUDIENCE_REQUIRED, AUTH_AUDIENCE, AppConfigState, AppInitService, AuthRefreshCoordinator, AuthState, BACKGROUND_REQUEST, BYPASS_AUTH, BYPASS_ELEVATION, CONSOLE_CONTRACT, CONSOLE_ENTRIES, CURRENT_SECTION, CmsLoaderComponent, ComponentRegistry, ConfigService, ConsoleAccessService, ConsoleActivation, ConsoleAssemblyError, ConsolePanelHost, CrossTabAuthSyncService, DATAGRID_ENTRY_PREFIX, ELEVATION_ACTION, ELEVATION_CODE_REQUIRED_TYPE, ELEVATION_NOTICE, ELEVATION_PROMPT, ELEVATION_REQUIRED_HEADER, ELEVATION_REQUIRED_PROBLEM_TYPE, ELEVATION_RETRY_TYPES, ELEVATION_WARNING_FACTOR_MISSING, ELEVATION_WARNING_MFA_OFF, ELEVATION_WARNING_PASSWORD_NOT_SET, ElevationService, EntitySearchService, ErrorHandlerService, FloatingMenus, IdentityApiClient, Login, LoginComponent, Logout, NOT_AVAILABLE, NaviGraphService, PREFERENCES_NOTICE, PatchCurrentUser, RealtimeTokenClient, RestoreSession, SOMETHING_WENT_WRONG, SetAppConfig, SetTokens, SidebarStateService, ThemeService, UserPreferencesService, WRONG_INTERFACE, actionOf, assembleConsole, audienceRefusalOf, authGuard, authInterceptor, consoleChildren, consoleEntry, consoleModuleInstalled, datagridEntry, declaredProblemOf, declaredTypeOf, elevationInterceptor, installedConsoleModules, isElevationRefusal, isPortProvision, isRefusal, loginPageGuard, naviAccessOf, problemOf, provideConsole, refusalWords, resolvePattern, satisfiesRange, sectionInterceptor, sentenceOf, sessionEndsOn };
|
|
2347
2421
|
|
|
2348
2422
|
//# sourceMappingURL=coolms-core-angular.mjs.map
|