@coolms/core-angular 2.0.0-alpha.8 → 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,20 @@ 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
+
12
26
  ## 2.0.0-alpha.8 - 2026-11-21
13
27
 
14
28
  ### Added
@@ -2075,9 +2075,18 @@ var NaviGraphService = class NaviGraphService {
2075
2075
  if (!showWhen) return true;
2076
2076
  return this.evalCondition(showWhen, record);
2077
2077
  }
2078
+ isCondition(value) {
2079
+ return value !== null && typeof value === "object" && !Array.isArray(value);
2080
+ }
2078
2081
  evalCondition(cond, record) {
2079
- if ("and" in cond) return cond["and"].every((c) => this.evalCondition(c, record));
2080
- if ("or" in cond) return cond["or"].some((c) => this.evalCondition(c, record));
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
+ }
2081
2090
  const field = cond["field"];
2082
2091
  if (!(field in record)) return false;
2083
2092
  const val = record[field];
@@ -2086,6 +2095,7 @@ var NaviGraphService = class NaviGraphService {
2086
2095
  case "ne": return val !== cond["value"];
2087
2096
  case "in": return Array.isArray(cond["value"]) && cond["value"].includes(val);
2088
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"]);
2089
2099
  case "startsWith": return typeof val === "string" && typeof cond["value"] === "string" && val.startsWith(cond["value"]);
2090
2100
  default: return false;
2091
2101
  }
@@ -2362,6 +2372,51 @@ function shouldStamp(url) {
2362
2372
  if (path.startsWith("/api/v1/auth/")) return false;
2363
2373
  return true;
2364
2374
  }
2365
- 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, 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 };
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 };
2366
2421
 
2367
2422
  //# sourceMappingURL=coolms-core-angular.mjs.map