@nucleus-suite-pe/core 0.6.1 → 1.0.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.
- package/fesm2022/nucleus-suite-pe-core.mjs +2399 -344
- package/fesm2022/nucleus-suite-pe-core.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/tokens.css +338 -8
- package/types/nucleus-suite-pe-core.d.ts +588 -51
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { InjectionToken, EnvironmentProviders, Signal, TemplateRef } from '@angular/core';
|
|
2
|
+
import { InjectionToken, EnvironmentProviders, Signal, ElementRef, TemplateRef } from '@angular/core';
|
|
3
3
|
import { HttpContextToken, HttpInterceptorFn } from '@angular/common/http';
|
|
4
|
+
import * as _nucleus_suite_pe_core from '@nucleus-suite-pe/core';
|
|
4
5
|
import * as _primeuix_themes from '@primeuix/themes';
|
|
5
6
|
import * as _primeuix_themes_types_base from '@primeuix/themes/types/base';
|
|
6
|
-
import
|
|
7
|
+
import { Popover } from 'primeng/popover';
|
|
7
8
|
import { MenuItem } from 'primeng/api';
|
|
8
9
|
|
|
9
10
|
interface NucleusConfig {
|
|
@@ -115,7 +116,8 @@ interface CompanySummary {
|
|
|
115
116
|
readonly legalName: string;
|
|
116
117
|
readonly tradeName: string | null;
|
|
117
118
|
readonly taxId: string;
|
|
118
|
-
readonly
|
|
119
|
+
readonly countryId: string | null;
|
|
120
|
+
readonly countryName: string | null;
|
|
119
121
|
readonly logoPath: string | null;
|
|
120
122
|
readonly status: number;
|
|
121
123
|
readonly isOwner: boolean;
|
|
@@ -124,6 +126,11 @@ interface CompanySummary {
|
|
|
124
126
|
readonly createdAtUtc: string;
|
|
125
127
|
readonly myAccess: readonly SiteAccess[];
|
|
126
128
|
}
|
|
129
|
+
interface GlobalAccess {
|
|
130
|
+
readonly appId: string;
|
|
131
|
+
readonly appName: string;
|
|
132
|
+
readonly roleName: string;
|
|
133
|
+
}
|
|
127
134
|
interface UserProfile {
|
|
128
135
|
readonly firstName: string | null;
|
|
129
136
|
readonly lastName: string | null;
|
|
@@ -139,7 +146,11 @@ interface Site {
|
|
|
139
146
|
readonly companyId: string;
|
|
140
147
|
readonly name: string;
|
|
141
148
|
readonly address: string | null;
|
|
142
|
-
readonly
|
|
149
|
+
readonly countryId: string | null;
|
|
150
|
+
readonly countryName: string | null;
|
|
151
|
+
readonly divisionId: string | null;
|
|
152
|
+
readonly divisionLabel: string | null;
|
|
153
|
+
readonly postalCode: string | null;
|
|
143
154
|
readonly phone: string | null;
|
|
144
155
|
readonly isMain: boolean;
|
|
145
156
|
readonly isActive: boolean;
|
|
@@ -170,6 +181,7 @@ interface MeResponse {
|
|
|
170
181
|
readonly subscription: Subscription;
|
|
171
182
|
readonly ownedCompanies: readonly CompanySummary[];
|
|
172
183
|
readonly sharedCompanies: readonly CompanySummary[];
|
|
184
|
+
readonly globalAccess: readonly GlobalAccess[];
|
|
173
185
|
}
|
|
174
186
|
type AccessScope = 'site' | 'account';
|
|
175
187
|
interface AppSummary {
|
|
@@ -184,6 +196,19 @@ interface AppSummary {
|
|
|
184
196
|
}
|
|
185
197
|
type LauncherApp = AppSummary;
|
|
186
198
|
|
|
199
|
+
declare function nucleusErrorMessage(error: unknown, lang?: string): string;
|
|
200
|
+
|
|
201
|
+
declare class NucleusCache {
|
|
202
|
+
private readonly entries;
|
|
203
|
+
private readonly inFlight;
|
|
204
|
+
read<T>(key: string, loader: () => Promise<T>, ttlMs?: number): Promise<T>;
|
|
205
|
+
prefetch<T>(key: string, loader: () => Promise<T>, ttlMs?: number): void;
|
|
206
|
+
invalidate(...prefixes: readonly string[]): void;
|
|
207
|
+
private load;
|
|
208
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusCache, never>;
|
|
209
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NucleusCache>;
|
|
210
|
+
}
|
|
211
|
+
|
|
187
212
|
interface MenuPermissions {
|
|
188
213
|
readonly canView: boolean;
|
|
189
214
|
readonly canInsert: boolean;
|
|
@@ -204,8 +229,10 @@ declare class SessionService {
|
|
|
204
229
|
private readonly _me;
|
|
205
230
|
private readonly _menu;
|
|
206
231
|
private readonly _access;
|
|
232
|
+
private readonly _globalRole;
|
|
207
233
|
private readonly _scope;
|
|
208
234
|
private readonly _apps;
|
|
235
|
+
private readonly _catalog;
|
|
209
236
|
private readonly _siteId;
|
|
210
237
|
private readonly _loading;
|
|
211
238
|
private readonly _switching;
|
|
@@ -218,6 +245,8 @@ declare class SessionService {
|
|
|
218
245
|
readonly access: _angular_core.Signal<SiteAccess | null>;
|
|
219
246
|
readonly scope: _angular_core.Signal<AccessScope | null>;
|
|
220
247
|
readonly apps: _angular_core.Signal<readonly AppSummary[]>;
|
|
248
|
+
readonly catalog: _angular_core.Signal<readonly AppSummary[]>;
|
|
249
|
+
readonly currentApp: _angular_core.Signal<AppSummary | null>;
|
|
221
250
|
readonly siteId: _angular_core.Signal<string | null>;
|
|
222
251
|
readonly loading: _angular_core.Signal<boolean>;
|
|
223
252
|
readonly switching: _angular_core.Signal<boolean>;
|
|
@@ -229,6 +258,7 @@ declare class SessionService {
|
|
|
229
258
|
readonly companyId: _angular_core.Signal<string | null>;
|
|
230
259
|
readonly companyName: _angular_core.Signal<string | null>;
|
|
231
260
|
load(language: string, force?: boolean): Promise<void>;
|
|
261
|
+
signOutToLanding(): Promise<void>;
|
|
232
262
|
permissionsFor(route: string): MenuPermissions;
|
|
233
263
|
reload(language: string): Promise<void>;
|
|
234
264
|
sites(companyId: string): Promise<Site[]>;
|
|
@@ -244,6 +274,7 @@ declare class SessionService {
|
|
|
244
274
|
|
|
245
275
|
type NucleusLang = 'es' | 'en';
|
|
246
276
|
declare const NUCLEUS_LANGS: readonly NucleusLang[];
|
|
277
|
+
declare function nucleusLang(): NucleusLang;
|
|
247
278
|
declare class NucleusLanguage {
|
|
248
279
|
private readonly _lang;
|
|
249
280
|
readonly lang: _angular_core.Signal<NucleusLang>;
|
|
@@ -253,39 +284,321 @@ declare class NucleusLanguage {
|
|
|
253
284
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NucleusLanguage>;
|
|
254
285
|
}
|
|
255
286
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
287
|
+
interface CommonCopy {
|
|
288
|
+
readonly search: string;
|
|
289
|
+
readonly choose: string;
|
|
290
|
+
readonly noIcon: string;
|
|
291
|
+
readonly noColor: string;
|
|
292
|
+
readonly searchIcon: string;
|
|
293
|
+
readonly noMatches: string;
|
|
294
|
+
readonly sessionExpired: string;
|
|
295
|
+
readonly errorNetwork: string;
|
|
296
|
+
readonly errorTimeout: string;
|
|
297
|
+
readonly errorServer: string;
|
|
298
|
+
readonly errorInvalid: string;
|
|
299
|
+
readonly errorForbidden: string;
|
|
300
|
+
readonly errorNotFound: string;
|
|
301
|
+
readonly errorConflict: string;
|
|
302
|
+
readonly errorUnknown: string;
|
|
303
|
+
}
|
|
304
|
+
interface CommonCopySet {
|
|
305
|
+
readonly es: CommonCopy;
|
|
306
|
+
readonly en: CommonCopy;
|
|
307
|
+
}
|
|
308
|
+
declare const COMMON_COPY: CommonCopySet;
|
|
309
|
+
declare function commonCopyOf(lang: string): CommonCopy;
|
|
310
|
+
|
|
311
|
+
declare function nucleusParseDate(value: string | null | undefined): Date | null;
|
|
312
|
+
declare function money(value: number | null | undefined): string;
|
|
313
|
+
declare function signedMoney(value: number | null | undefined): string;
|
|
314
|
+
declare function qty(value: number | null | undefined): string;
|
|
315
|
+
declare function integer(value: number | null | undefined): string;
|
|
316
|
+
declare function percent(value: number | null | undefined): string;
|
|
317
|
+
declare function day(value: string | null | undefined): string;
|
|
318
|
+
declare function stamp(value: string | null | undefined): string;
|
|
319
|
+
declare function clock(value: string | null | undefined): string;
|
|
320
|
+
declare function minutesAsClock(value: number | null | undefined): string;
|
|
321
|
+
declare function isoDay(value: Date | string | null | undefined): string;
|
|
322
|
+
declare function toNumber(value: unknown): number;
|
|
323
|
+
declare function shiftDay(value: string, days: number): string;
|
|
324
|
+
declare function isToday(value: string | null | undefined): boolean;
|
|
325
|
+
declare function isBeforeToday(value: string | null | undefined): boolean;
|
|
326
|
+
declare function isOnOrBeforeToday(value: string | null | undefined): boolean;
|
|
327
|
+
declare function startOfDayUtc(value: string): string;
|
|
328
|
+
declare function endOfDayUtc(value: string): string;
|
|
329
|
+
|
|
330
|
+
declare const FIELD_TARGETS: string;
|
|
331
|
+
declare function isReachable(element: HTMLElement): boolean;
|
|
332
|
+
declare function fieldsIn(root: HTMLElement): HTMLElement[];
|
|
333
|
+
declare function moveTo(element: HTMLElement): void;
|
|
334
|
+
|
|
335
|
+
interface ShortcutBinding {
|
|
336
|
+
readonly keys: string;
|
|
337
|
+
readonly label: string;
|
|
338
|
+
readonly whileTyping: boolean;
|
|
339
|
+
readonly run: () => void;
|
|
340
|
+
}
|
|
341
|
+
declare function normalizeKeys(keys: string): string;
|
|
342
|
+
declare function comboOf(event: KeyboardEvent): string;
|
|
343
|
+
declare function hasModifier(keys: string): boolean;
|
|
344
|
+
declare function isTypingTarget(target: EventTarget | null): boolean;
|
|
345
|
+
declare function isApplePlatform(): boolean;
|
|
346
|
+
declare function shortcutHint(keys: string): string;
|
|
347
|
+
declare function ariaKeysOf(keys: string): string;
|
|
348
|
+
|
|
349
|
+
declare class NucleusShortcuts {
|
|
350
|
+
private readonly document;
|
|
351
|
+
private readonly _bindings;
|
|
352
|
+
private readonly _enabled;
|
|
353
|
+
readonly bindings: _angular_core.Signal<readonly ShortcutBinding[]>;
|
|
354
|
+
readonly enabled: _angular_core.Signal<boolean>;
|
|
355
|
+
constructor();
|
|
356
|
+
setEnabled(enabled: boolean): void;
|
|
357
|
+
register(binding: ShortcutBinding): () => void;
|
|
358
|
+
private handle;
|
|
359
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusShortcuts, never>;
|
|
360
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NucleusShortcuts>;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
declare class NucleusShortcut {
|
|
364
|
+
private readonly host;
|
|
365
|
+
private readonly shortcuts;
|
|
366
|
+
readonly nucleusShortcut: _angular_core.InputSignal<string>;
|
|
367
|
+
readonly shortcutLabel: _angular_core.InputSignal<string>;
|
|
368
|
+
readonly shortcutWhileTyping: _angular_core.InputSignal<boolean | null>;
|
|
369
|
+
constructor();
|
|
370
|
+
private press;
|
|
371
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusShortcut, never>;
|
|
372
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NucleusShortcut, "[nucleusShortcut]", never, { "nucleusShortcut": { "alias": "nucleusShortcut"; "required": true; "isSignal": true; }; "shortcutLabel": { "alias": "shortcutLabel"; "required": false; "isSignal": true; }; "shortcutWhileTyping": { "alias": "shortcutWhileTyping"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
declare class NucleusEnterAdvance {
|
|
376
|
+
private readonly host;
|
|
377
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
378
|
+
private scope;
|
|
379
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusEnterAdvance, never>;
|
|
380
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NucleusEnterAdvance, "[nucleusEnterAdvance]", never, {}, {}, never, never, true, never>;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
interface GeoCountry {
|
|
384
|
+
readonly id: string;
|
|
385
|
+
readonly code: string;
|
|
386
|
+
readonly phoneCode: string | null;
|
|
387
|
+
readonly name: string;
|
|
388
|
+
}
|
|
389
|
+
interface GeoDivision {
|
|
390
|
+
readonly id: string;
|
|
391
|
+
readonly countryId: string;
|
|
392
|
+
readonly parentId: string | null;
|
|
393
|
+
readonly level: number;
|
|
394
|
+
readonly code: string;
|
|
395
|
+
readonly name: string;
|
|
396
|
+
readonly kind: string | null;
|
|
397
|
+
}
|
|
398
|
+
interface GeoLevel {
|
|
399
|
+
readonly level: number;
|
|
400
|
+
readonly kind: string | null;
|
|
401
|
+
readonly items: readonly GeoDivision[];
|
|
402
|
+
}
|
|
403
|
+
interface GeoPlace {
|
|
404
|
+
readonly countryId: string;
|
|
405
|
+
readonly countryCode: string;
|
|
406
|
+
readonly countryName: string;
|
|
407
|
+
readonly trail: readonly GeoDivision[];
|
|
408
|
+
}
|
|
409
|
+
interface GeoValue {
|
|
410
|
+
readonly countryId: string | null;
|
|
411
|
+
readonly divisionId: string | null;
|
|
412
|
+
}
|
|
413
|
+
declare const EMPTY_GEO_VALUE: GeoValue;
|
|
414
|
+
declare function flagOf(code: string): string;
|
|
415
|
+
|
|
416
|
+
interface GeoCopy {
|
|
417
|
+
readonly country: string;
|
|
418
|
+
readonly levels: readonly [string, string, string, string];
|
|
419
|
+
readonly kinds: Readonly<Record<string, string>>;
|
|
420
|
+
}
|
|
421
|
+
interface GeoCopySet {
|
|
422
|
+
readonly es: GeoCopy;
|
|
423
|
+
readonly en: GeoCopy;
|
|
424
|
+
}
|
|
425
|
+
declare const GEO_COPY: GeoCopySet;
|
|
426
|
+
declare function geoCopyOf(lang: string): GeoCopy;
|
|
427
|
+
declare function levelLabel(copy: GeoCopy, level: number, kind: string | null): string;
|
|
428
|
+
|
|
429
|
+
declare class NucleusGeo {
|
|
430
|
+
private readonly http;
|
|
431
|
+
private readonly config;
|
|
432
|
+
private readonly cache;
|
|
433
|
+
countries(language: string): Promise<readonly GeoCountry[]>;
|
|
434
|
+
divisions(countryId: string, parentId: string | null, language: string): Promise<GeoLevel>;
|
|
435
|
+
place(divisionId: string, language: string): Promise<GeoPlace>;
|
|
436
|
+
levelOf(countryId: string, parentId: string | null, language: string): Promise<GeoLevel>;
|
|
437
|
+
private once;
|
|
438
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusGeo, never>;
|
|
439
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NucleusGeo>;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
interface GeoStep {
|
|
443
|
+
readonly level: number;
|
|
444
|
+
readonly kind: string | null;
|
|
445
|
+
readonly items: GeoDivision[];
|
|
446
|
+
readonly selectedId: string | null;
|
|
447
|
+
}
|
|
448
|
+
declare class NucleusGeoSelect {
|
|
449
|
+
private readonly geo;
|
|
450
|
+
private readonly language;
|
|
451
|
+
readonly value: _angular_core.ModelSignal<GeoValue>;
|
|
452
|
+
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
453
|
+
readonly columns: _angular_core.InputSignal<number | null>;
|
|
454
|
+
protected readonly countries: _angular_core.WritableSignal<GeoCountry[]>;
|
|
455
|
+
protected readonly steps: _angular_core.WritableSignal<GeoStep[]>;
|
|
456
|
+
protected readonly labels: _angular_core.Signal<_nucleus_suite_pe_core.GeoCopy>;
|
|
457
|
+
protected readonly words: _angular_core.Signal<_nucleus_suite_pe_core.CommonCopy>;
|
|
458
|
+
private syncedKey;
|
|
459
|
+
constructor();
|
|
460
|
+
protected gridClass(): string;
|
|
461
|
+
protected nameOf(step: GeoStep): string;
|
|
462
|
+
protected pickCountry(countryId: string | null): Promise<void>;
|
|
463
|
+
protected pick(index: number, divisionId: string | null): Promise<void>;
|
|
464
|
+
private sync;
|
|
465
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusGeoSelect, never>;
|
|
466
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NucleusGeoSelect, "nucleus-geo-select", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, [{ directive: typeof NucleusEnterAdvance; inputs: {}; outputs: {}; }]>;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
declare const TEXT_CONTRAST = 4.5;
|
|
470
|
+
declare const CONTROL_CONTRAST = 3;
|
|
471
|
+
interface ContrastIssue {
|
|
472
|
+
readonly scope: string;
|
|
473
|
+
readonly pair: string;
|
|
474
|
+
readonly ratio: number;
|
|
475
|
+
readonly required: number;
|
|
476
|
+
}
|
|
477
|
+
declare function relativeLuminance(hex: string): number;
|
|
478
|
+
declare function contrastRatio(foreground: string, background: string): number;
|
|
479
|
+
declare function readableOn(background: string): string;
|
|
480
|
+
declare function mixHex(foreground: string, background: string, ratio: number): string;
|
|
481
|
+
declare function meetsContrast(foreground: string, background: string, required: number): boolean;
|
|
482
|
+
declare function contrastIssue(scope: string, pair: string, foreground: string, background: string, required: number): ContrastIssue | null;
|
|
483
|
+
|
|
484
|
+
type FrameId = 'nucleus' | 'ember' | 'forest' | 'plum' | 'midnight' | 'slate' | 'ocean' | 'sand' | 'ink' | 'graphite' | 'paper' | 'mist';
|
|
485
|
+
type CanvasId = 'light' | 'dim' | 'dark';
|
|
486
|
+
type CanvasPreference = CanvasId | 'system';
|
|
487
|
+
type AccentId = 'violet' | 'blue' | 'cyan' | 'green' | 'lime' | 'amber' | 'orange' | 'rose' | 'red';
|
|
488
|
+
type AccentPreference = AccentId | 'auto';
|
|
489
|
+
type DensityId = 'comfortable' | 'compact';
|
|
490
|
+
interface FrameTokens {
|
|
491
|
+
readonly bg: string;
|
|
492
|
+
readonly raised: string;
|
|
493
|
+
readonly ink: string;
|
|
494
|
+
readonly muted: string;
|
|
495
|
+
readonly line: string;
|
|
496
|
+
readonly glow: string;
|
|
497
|
+
}
|
|
498
|
+
interface Frame {
|
|
499
|
+
readonly id: FrameId;
|
|
500
|
+
readonly scheme: CanvasId;
|
|
501
|
+
readonly starfield: boolean;
|
|
502
|
+
readonly accent: AccentId;
|
|
503
|
+
readonly tokens: FrameTokens;
|
|
504
|
+
}
|
|
505
|
+
interface CanvasTokens {
|
|
259
506
|
readonly bg: string;
|
|
260
507
|
readonly surface: string;
|
|
261
508
|
readonly surfaceAlt: string;
|
|
262
509
|
readonly text: string;
|
|
263
510
|
readonly textMuted: string;
|
|
264
511
|
readonly border: string;
|
|
265
|
-
readonly accent: string;
|
|
266
|
-
readonly onAccent: string;
|
|
267
512
|
}
|
|
268
|
-
interface
|
|
269
|
-
readonly
|
|
270
|
-
readonly
|
|
271
|
-
readonly
|
|
272
|
-
readonly
|
|
273
|
-
readonly
|
|
513
|
+
interface CanvasEffects {
|
|
514
|
+
readonly shadowOne: string;
|
|
515
|
+
readonly shadowTwo: string;
|
|
516
|
+
readonly wash: number;
|
|
517
|
+
readonly washStrong: number;
|
|
518
|
+
readonly headerBg: string;
|
|
519
|
+
readonly headerInk: string;
|
|
520
|
+
readonly headerLine: string;
|
|
521
|
+
readonly danger: string;
|
|
522
|
+
readonly success: string;
|
|
523
|
+
readonly warning: string;
|
|
524
|
+
}
|
|
525
|
+
interface Canvas {
|
|
526
|
+
readonly id: CanvasId;
|
|
527
|
+
readonly tokens: CanvasTokens;
|
|
528
|
+
readonly effects: CanvasEffects;
|
|
529
|
+
}
|
|
530
|
+
interface Accent {
|
|
531
|
+
readonly id: AccentId;
|
|
532
|
+
readonly light: string;
|
|
533
|
+
readonly dark: string;
|
|
274
534
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
535
|
+
interface Density {
|
|
536
|
+
readonly id: DensityId;
|
|
537
|
+
readonly scale: number;
|
|
538
|
+
}
|
|
539
|
+
interface Appearance {
|
|
540
|
+
readonly frame: FrameId;
|
|
541
|
+
readonly canvas: CanvasPreference;
|
|
542
|
+
readonly accent: AccentPreference;
|
|
543
|
+
readonly density: DensityId;
|
|
544
|
+
}
|
|
545
|
+
declare const FRAMES: readonly Frame[];
|
|
546
|
+
declare const CANVASES: readonly Canvas[];
|
|
547
|
+
declare const ACCENTS: readonly Accent[];
|
|
548
|
+
declare const DENSITIES: readonly Density[];
|
|
549
|
+
declare const DEFAULT_APPEARANCE: Appearance;
|
|
550
|
+
declare const LEGACY_THEMES: Readonly<Record<string, Partial<Appearance>>>;
|
|
551
|
+
declare function frameById(id: string): Frame;
|
|
552
|
+
declare function canvasById(id: CanvasId): Canvas;
|
|
553
|
+
declare function accentById(id: string): Accent;
|
|
554
|
+
declare function densityById(id: string): Density;
|
|
555
|
+
declare function isFrameId(value: unknown): value is FrameId;
|
|
556
|
+
declare function isCanvasPreference(value: unknown): value is CanvasPreference;
|
|
557
|
+
declare function isAccentPreference(value: unknown): value is AccentPreference;
|
|
558
|
+
declare function isDensityId(value: unknown): value is DensityId;
|
|
559
|
+
declare function resolveAccent(frame: Frame, preference: AccentPreference): Accent;
|
|
560
|
+
declare function accentOn(accent: Accent, canvas: CanvasId): string;
|
|
561
|
+
declare function isDarkCanvas(canvas: CanvasId): boolean;
|
|
562
|
+
declare function auditAppearance(): readonly ContrastIssue[];
|
|
563
|
+
|
|
564
|
+
interface ThemeCopy {
|
|
565
|
+
readonly title: string;
|
|
566
|
+
readonly frameTitle: string;
|
|
567
|
+
readonly frameHint: string;
|
|
568
|
+
readonly canvasTitle: string;
|
|
569
|
+
readonly canvasHint: string;
|
|
570
|
+
readonly accentTitle: string;
|
|
571
|
+
readonly accentHint: string;
|
|
572
|
+
readonly densityTitle: string;
|
|
573
|
+
readonly densityHint: string;
|
|
574
|
+
readonly frames: Readonly<Record<FrameId, string>>;
|
|
575
|
+
readonly canvases: Readonly<Record<CanvasPreference, string>>;
|
|
576
|
+
readonly accents: Readonly<Record<AccentPreference, string>>;
|
|
577
|
+
readonly densities: Readonly<Record<DensityId, string>>;
|
|
578
|
+
}
|
|
579
|
+
declare const THEME_COPY: Readonly<Record<NucleusLang, ThemeCopy>>;
|
|
580
|
+
declare function themeCopyOf(lang: NucleusLang): ThemeCopy;
|
|
581
|
+
declare function accentLabelOf(lang: NucleusLang, id: AccentId): string;
|
|
280
582
|
|
|
281
583
|
declare class ThemeService {
|
|
282
|
-
private readonly
|
|
584
|
+
private readonly _appearance;
|
|
283
585
|
private readonly systemDark;
|
|
284
|
-
readonly
|
|
285
|
-
readonly
|
|
586
|
+
readonly appearance: _angular_core.Signal<Appearance>;
|
|
587
|
+
readonly frame: _angular_core.Signal<Frame>;
|
|
588
|
+
readonly canvasId: _angular_core.Signal<CanvasId>;
|
|
589
|
+
readonly systemCanvasId: _angular_core.Signal<CanvasId>;
|
|
590
|
+
readonly canvas: _angular_core.Signal<Canvas>;
|
|
591
|
+
readonly accent: _angular_core.Signal<Accent>;
|
|
592
|
+
readonly accentColor: _angular_core.Signal<string>;
|
|
593
|
+
readonly density: _angular_core.Signal<Density>;
|
|
286
594
|
readonly starfield: _angular_core.Signal<boolean>;
|
|
287
595
|
constructor();
|
|
288
|
-
|
|
596
|
+
setFrame(frame: FrameId): void;
|
|
597
|
+
setCanvas(canvas: CanvasPreference): void;
|
|
598
|
+
setAccent(accent: AccentPreference): void;
|
|
599
|
+
setDensity(density: DensityId): void;
|
|
600
|
+
reset(): void;
|
|
601
|
+
private patch;
|
|
289
602
|
private applyToDom;
|
|
290
603
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThemeService, never>;
|
|
291
604
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ThemeService>;
|
|
@@ -323,8 +636,36 @@ declare class NucleusCard {
|
|
|
323
636
|
readonly heading: _angular_core.InputSignal<string>;
|
|
324
637
|
readonly subtitle: _angular_core.InputSignal<string>;
|
|
325
638
|
readonly size: _angular_core.InputSignal<CardSize>;
|
|
639
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
640
|
+
readonly skeletonRows: _angular_core.InputSignal<number>;
|
|
641
|
+
private static readonly widths;
|
|
642
|
+
protected readonly placeholders: _angular_core.Signal<{
|
|
643
|
+
index: number;
|
|
644
|
+
left: string;
|
|
645
|
+
right: string;
|
|
646
|
+
}[]>;
|
|
326
647
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusCard, never>;
|
|
327
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NucleusCard, "nucleus-card", never, { "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, ["*", "[nucleusCardActions]"], true, never>;
|
|
648
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NucleusCard, "nucleus-card", never, { "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "skeletonRows": { "alias": "skeletonRows"; "required": false; "isSignal": true; }; }, {}, never, ["*", "[nucleusCardActions]"], true, never>;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
declare class NucleusMetrics {
|
|
652
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
653
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusMetrics, never>;
|
|
654
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NucleusMetrics, "nucleus-metrics", never, { "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
type MetricTone = 'plain' | 'accent';
|
|
658
|
+
declare class NucleusMetric {
|
|
659
|
+
private readonly group;
|
|
660
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
661
|
+
readonly value: _angular_core.InputSignal<string | number>;
|
|
662
|
+
readonly hint: _angular_core.InputSignal<string>;
|
|
663
|
+
readonly link: _angular_core.InputSignal<string | unknown[]>;
|
|
664
|
+
readonly tone: _angular_core.InputSignal<MetricTone>;
|
|
665
|
+
readonly loading: _angular_core.InputSignal<boolean | null>;
|
|
666
|
+
protected readonly busy: _angular_core.Signal<boolean>;
|
|
667
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusMetric, never>;
|
|
668
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NucleusMetric, "nucleus-metric", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "link": { "alias": "link"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
328
669
|
}
|
|
329
670
|
|
|
330
671
|
interface TabItem {
|
|
@@ -372,7 +713,7 @@ declare class NucleusFeedback {
|
|
|
372
713
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NucleusFeedback>;
|
|
373
714
|
}
|
|
374
715
|
|
|
375
|
-
type FieldKind = 'text' | 'email' | 'password' | 'number' | 'textarea' | 'select' | 'checkbox' | 'switch';
|
|
716
|
+
type FieldKind = 'text' | 'email' | 'password' | 'number' | 'textarea' | 'select' | 'checkbox' | 'switch' | 'icon' | 'color';
|
|
376
717
|
type FieldSpan = 1 | 2 | 3 | 4 | 'full';
|
|
377
718
|
type FieldSize = 'xs' | 'sm' | 'md' | 'lg' | 'full';
|
|
378
719
|
interface FieldOption {
|
|
@@ -392,27 +733,82 @@ interface FormField {
|
|
|
392
733
|
readonly options?: readonly FieldOption[];
|
|
393
734
|
readonly disabled?: boolean;
|
|
394
735
|
readonly clearable?: boolean;
|
|
736
|
+
readonly searchable?: boolean;
|
|
395
737
|
}
|
|
396
738
|
type FormValue = Record<string, unknown>;
|
|
397
739
|
declare function resolveFieldSize(field: FormField): FieldSize;
|
|
740
|
+
declare function isFieldSearchable(field: FormField): boolean;
|
|
741
|
+
|
|
742
|
+
declare const NUCLEUS_ICON_CATALOG: readonly string[];
|
|
743
|
+
declare function searchIcons(term: string): readonly string[];
|
|
744
|
+
declare function iconClassOf(name: string | null): string;
|
|
745
|
+
declare function iconNameOf(value: string | null): string | null;
|
|
746
|
+
|
|
747
|
+
declare class NucleusIconPicker {
|
|
748
|
+
private readonly language;
|
|
749
|
+
readonly value: _angular_core.ModelSignal<string | null>;
|
|
750
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
751
|
+
readonly inputId: _angular_core.InputSignal<string>;
|
|
752
|
+
protected readonly panel: _angular_core.Signal<Popover>;
|
|
753
|
+
protected readonly search: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
754
|
+
protected readonly term: _angular_core.WritableSignal<string>;
|
|
755
|
+
protected readonly labels: _angular_core.Signal<_nucleus_suite_pe_core.CommonCopy>;
|
|
756
|
+
protected readonly name: _angular_core.Signal<string | null>;
|
|
757
|
+
protected readonly iconClass: _angular_core.Signal<string>;
|
|
758
|
+
protected readonly results: _angular_core.Signal<readonly string[]>;
|
|
759
|
+
protected onShow(): void;
|
|
760
|
+
protected pick(icon: string | null): void;
|
|
761
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusIconPicker, never>;
|
|
762
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NucleusIconPicker, "nucleus-icon-picker", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
interface AccentOption {
|
|
766
|
+
readonly id: AccentId;
|
|
767
|
+
readonly light: string;
|
|
768
|
+
readonly dark: string;
|
|
769
|
+
}
|
|
770
|
+
declare const NUCLEUS_ACCENTS: readonly AccentOption[];
|
|
771
|
+
declare class NucleusColorPicker {
|
|
772
|
+
private readonly language;
|
|
773
|
+
readonly value: _angular_core.ModelSignal<string | null>;
|
|
774
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
775
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
776
|
+
protected readonly labels: _angular_core.Signal<_nucleus_suite_pe_core.CommonCopy>;
|
|
777
|
+
protected readonly options: _angular_core.Signal<{
|
|
778
|
+
color: string;
|
|
779
|
+
label: string;
|
|
780
|
+
}[]>;
|
|
781
|
+
protected pick(color: string | null): void;
|
|
782
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusColorPicker, never>;
|
|
783
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NucleusColorPicker, "nucleus-color-picker", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
784
|
+
}
|
|
398
785
|
|
|
399
786
|
declare class NucleusForm {
|
|
787
|
+
private readonly language;
|
|
788
|
+
private readonly host;
|
|
789
|
+
private readonly injector;
|
|
400
790
|
readonly fields: _angular_core.InputSignal<readonly FormField[]>;
|
|
401
791
|
readonly value: _angular_core.InputSignal<FormValue>;
|
|
402
792
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
403
793
|
readonly columns: _angular_core.InputSignal<number | null>;
|
|
794
|
+
readonly autofocus: _angular_core.InputSignal<boolean>;
|
|
404
795
|
readonly valueChange: _angular_core.OutputEmitterRef<FormValue>;
|
|
796
|
+
protected readonly labels: _angular_core.Signal<_nucleus_suite_pe_core.CommonCopy>;
|
|
797
|
+
private landed;
|
|
798
|
+
constructor();
|
|
405
799
|
protected read(field: FormField): unknown;
|
|
406
800
|
protected text(field: FormField): string;
|
|
801
|
+
protected nullableText(field: FormField): string | null;
|
|
407
802
|
protected checked(field: FormField): boolean;
|
|
408
803
|
protected write(field: FormField, next: unknown): void;
|
|
409
804
|
protected isDisabled(field: FormField): boolean;
|
|
805
|
+
protected isSearchable(field: FormField): boolean;
|
|
410
806
|
protected fieldClass(field: FormField): string;
|
|
411
807
|
protected gridClass(): string;
|
|
412
808
|
protected optionsOf(field: FormField): FieldOption[];
|
|
413
809
|
protected kindOf(field: FormField): string;
|
|
414
810
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusForm, never>;
|
|
415
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NucleusForm, "nucleus-form", never, { "fields": { "alias": "fields"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true,
|
|
811
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NucleusForm, "nucleus-form", never, { "fields": { "alias": "fields"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "autofocus": { "alias": "autofocus"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, [{ directive: typeof NucleusEnterAdvance; inputs: {}; outputs: {}; }]>;
|
|
416
812
|
}
|
|
417
813
|
|
|
418
814
|
type ListAlign = 'left' | 'center' | 'right';
|
|
@@ -440,6 +836,7 @@ interface ListAction<T = Record<string, unknown>> {
|
|
|
440
836
|
readonly label: string;
|
|
441
837
|
readonly tone?: 'default' | 'danger';
|
|
442
838
|
readonly visible?: (row: T) => boolean;
|
|
839
|
+
readonly disabled?: (row: T) => boolean;
|
|
443
840
|
}
|
|
444
841
|
interface ListActionEvent<T = Record<string, unknown>> {
|
|
445
842
|
readonly id: string;
|
|
@@ -465,6 +862,7 @@ declare class NucleusList<T extends object = Record<string, unknown>> {
|
|
|
465
862
|
readonly empty: _angular_core.InputSignal<string>;
|
|
466
863
|
readonly loading: _angular_core.InputSignal<boolean>;
|
|
467
864
|
readonly minWidth: _angular_core.InputSignal<string>;
|
|
865
|
+
readonly skeletonRows: _angular_core.InputSignal<number>;
|
|
468
866
|
readonly rowClass: _angular_core.InputSignal<(row: T) => string>;
|
|
469
867
|
readonly action: _angular_core.OutputEmitterRef<ListActionEvent<T>>;
|
|
470
868
|
readonly toggle: _angular_core.OutputEmitterRef<ListToggleEvent<T>>;
|
|
@@ -473,19 +871,31 @@ declare class NucleusList<T extends object = Record<string, unknown>> {
|
|
|
473
871
|
'min-width': string;
|
|
474
872
|
}>;
|
|
475
873
|
protected readonly showEmpty: _angular_core.Signal<boolean>;
|
|
874
|
+
protected readonly placeholders: _angular_core.Signal<object[]>;
|
|
875
|
+
protected readonly data: _angular_core.Signal<object[]>;
|
|
876
|
+
protected skeletonWidth(column: ListColumn<T>): string;
|
|
476
877
|
protected cellTemplate(key: string): TemplateRef<unknown> | null;
|
|
477
878
|
protected text(column: ListColumn<T>, row: T): string;
|
|
478
879
|
protected tagOf(column: ListColumn<T>, row: T): ListTag | null;
|
|
479
880
|
protected visibleActions(row: T): readonly ListAction<T>[];
|
|
881
|
+
protected isActionLocked(entry: ListAction<T>, row: T): boolean;
|
|
480
882
|
protected run(entry: ListAction<T>, row: T): void;
|
|
481
883
|
protected isChecked(column: ListColumn<T>, row: T): boolean;
|
|
482
884
|
protected isLocked(column: ListColumn<T>, row: T): boolean;
|
|
483
885
|
protected hintOf(column: ListColumn<T>, row: T): string;
|
|
484
886
|
protected flip(column: ListColumn<T>, row: T): void;
|
|
485
887
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusList<any>, never>;
|
|
486
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NucleusList<any>, "nucleus-list", never, { "rows": { "alias": "rows"; "required": true; "isSignal": true; }; "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "empty": { "alias": "empty"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "minWidth": { "alias": "minWidth"; "required": false; "isSignal": true; }; "rowClass": { "alias": "rowClass"; "required": false; "isSignal": true; }; }, { "action": "action"; "toggle": "toggle"; }, ["cells"], ["[nucleusListTitle]", "[nucleusListActions]"], true, never>;
|
|
888
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NucleusList<any>, "nucleus-list", never, { "rows": { "alias": "rows"; "required": true; "isSignal": true; }; "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "empty": { "alias": "empty"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "minWidth": { "alias": "minWidth"; "required": false; "isSignal": true; }; "skeletonRows": { "alias": "skeletonRows"; "required": false; "isSignal": true; }; "rowClass": { "alias": "rowClass"; "required": false; "isSignal": true; }; }, { "action": "action"; "toggle": "toggle"; }, ["cells"], ["[nucleusListTitle]", "[nucleusListActions]"], true, never>;
|
|
487
889
|
}
|
|
488
890
|
|
|
891
|
+
interface TreeRow {
|
|
892
|
+
readonly id: string;
|
|
893
|
+
readonly parentId: string | null;
|
|
894
|
+
}
|
|
895
|
+
declare function toggleCollapsed(collapsed: ReadonlySet<string>, id: string): ReadonlySet<string>;
|
|
896
|
+
declare function hasChildren(rows: readonly TreeRow[], id: string): boolean;
|
|
897
|
+
declare function visibleTreeRows<T extends TreeRow>(rows: readonly T[], collapsed: ReadonlySet<string>): T[];
|
|
898
|
+
|
|
489
899
|
declare class NucleusMark {
|
|
490
900
|
readonly accent: _angular_core.InputSignal<string>;
|
|
491
901
|
readonly size: _angular_core.InputSignal<number>;
|
|
@@ -498,6 +908,119 @@ declare class NucleusMark {
|
|
|
498
908
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NucleusMark, "nucleus-mark", never, { "accent": { "alias": "accent"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
499
909
|
}
|
|
500
910
|
|
|
911
|
+
interface FrameChoice {
|
|
912
|
+
readonly id: Frame['id'];
|
|
913
|
+
readonly label: string;
|
|
914
|
+
readonly tokens: Frame['tokens'];
|
|
915
|
+
}
|
|
916
|
+
interface CanvasChoice {
|
|
917
|
+
readonly id: CanvasPreference;
|
|
918
|
+
readonly label: string;
|
|
919
|
+
readonly bg: string;
|
|
920
|
+
readonly surface: string;
|
|
921
|
+
readonly text: string;
|
|
922
|
+
readonly icon: string | null;
|
|
923
|
+
}
|
|
924
|
+
interface AccentChoice {
|
|
925
|
+
readonly id: AccentPreference;
|
|
926
|
+
readonly label: string;
|
|
927
|
+
readonly color: string;
|
|
928
|
+
readonly ink: string;
|
|
929
|
+
}
|
|
930
|
+
interface DensityChoice {
|
|
931
|
+
readonly id: DensityId;
|
|
932
|
+
readonly label: string;
|
|
933
|
+
readonly gap: number;
|
|
934
|
+
}
|
|
935
|
+
declare class NucleusAppearance {
|
|
936
|
+
private readonly theme;
|
|
937
|
+
private readonly language;
|
|
938
|
+
protected readonly copy: _angular_core.Signal<_nucleus_suite_pe_core.ThemeCopy>;
|
|
939
|
+
protected readonly appearance: _angular_core.Signal<_nucleus_suite_pe_core.Appearance>;
|
|
940
|
+
protected readonly canvasId: _angular_core.Signal<_nucleus_suite_pe_core.CanvasId>;
|
|
941
|
+
protected readonly frames: _angular_core.Signal<FrameChoice[]>;
|
|
942
|
+
protected readonly canvases: _angular_core.Signal<CanvasChoice[]>;
|
|
943
|
+
protected readonly accents: _angular_core.Signal<AccentChoice[]>;
|
|
944
|
+
protected readonly densities: _angular_core.Signal<DensityChoice[]>;
|
|
945
|
+
protected pickFrame(id: Frame['id']): void;
|
|
946
|
+
protected pickCanvas(id: CanvasPreference): void;
|
|
947
|
+
protected pickAccent(id: AccentPreference): void;
|
|
948
|
+
protected pickDensity(id: DensityId): void;
|
|
949
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusAppearance, never>;
|
|
950
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NucleusAppearance, "nucleus-appearance", never, {}, {}, never, never, true, never>;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
interface MenuTile {
|
|
954
|
+
readonly label: string;
|
|
955
|
+
readonly icon: string | null;
|
|
956
|
+
readonly color: string | null;
|
|
957
|
+
readonly ink: string | null;
|
|
958
|
+
readonly ghost: boolean;
|
|
959
|
+
}
|
|
960
|
+
interface MenuRow {
|
|
961
|
+
readonly id: string;
|
|
962
|
+
readonly name: string;
|
|
963
|
+
readonly meta: string | null;
|
|
964
|
+
readonly tile: MenuTile | null;
|
|
965
|
+
readonly tag: string | null;
|
|
966
|
+
readonly current: boolean;
|
|
967
|
+
readonly disabled: boolean;
|
|
968
|
+
}
|
|
969
|
+
interface MenuSection {
|
|
970
|
+
readonly id: string;
|
|
971
|
+
readonly label: string | null;
|
|
972
|
+
readonly rows: readonly MenuRow[];
|
|
973
|
+
}
|
|
974
|
+
declare function menuTile(label: string, icon: string | null, color: string | null): MenuTile;
|
|
975
|
+
declare function menuGlyph(icon: string): MenuTile;
|
|
976
|
+
declare function foldText(value: string): string;
|
|
977
|
+
declare function matchesRow(row: MenuRow, term: string): boolean;
|
|
978
|
+
declare function selectableRows(sections: readonly MenuSection[]): MenuRow[];
|
|
979
|
+
|
|
980
|
+
declare class NucleusMenu {
|
|
981
|
+
readonly sections: _angular_core.InputSignal<readonly MenuSection[]>;
|
|
982
|
+
readonly heading: _angular_core.InputSignal<string>;
|
|
983
|
+
readonly badge: _angular_core.InputSignal<string | null>;
|
|
984
|
+
readonly searchable: _angular_core.InputSignal<boolean>;
|
|
985
|
+
readonly searchPlaceholder: _angular_core.InputSignal<string>;
|
|
986
|
+
readonly emptyText: _angular_core.InputSignal<string>;
|
|
987
|
+
readonly keyboardHint: _angular_core.InputSignal<string>;
|
|
988
|
+
readonly width: _angular_core.InputSignal<number>;
|
|
989
|
+
readonly select: _angular_core.OutputEmitterRef<MenuRow>;
|
|
990
|
+
readonly dismiss: _angular_core.OutputEmitterRef<void>;
|
|
991
|
+
protected readonly term: _angular_core.WritableSignal<string>;
|
|
992
|
+
private readonly searchBox;
|
|
993
|
+
private readonly root;
|
|
994
|
+
protected readonly visible: _angular_core.Signal<readonly MenuSection[]>;
|
|
995
|
+
protected readonly isEmpty: _angular_core.Signal<boolean>;
|
|
996
|
+
protected readonly showSearch: _angular_core.Signal<boolean>;
|
|
997
|
+
private readonly reachable;
|
|
998
|
+
private readonly activeId;
|
|
999
|
+
private readonly syncActive;
|
|
1000
|
+
constructor();
|
|
1001
|
+
protected isActive(row: MenuRow): boolean;
|
|
1002
|
+
protected onTerm(value: string): void;
|
|
1003
|
+
protected choose(row: MenuRow): void;
|
|
1004
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
1005
|
+
private step;
|
|
1006
|
+
private scrollIntoView;
|
|
1007
|
+
private focusEntry;
|
|
1008
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusMenu, never>;
|
|
1009
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NucleusMenu, "nucleus-menu", never, { "sections": { "alias": "sections"; "required": false; "isSignal": true; }; "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "badge": { "alias": "badge"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "keyboardHint": { "alias": "keyboardHint"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, { "select": "select"; "dismiss": "dismiss"; }, never, never, true, never>;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
declare class NucleusRecentApps {
|
|
1013
|
+
private readonly _ids;
|
|
1014
|
+
readonly ids: _angular_core.Signal<readonly string[]>;
|
|
1015
|
+
remember(appId: string): void;
|
|
1016
|
+
pick<T extends {
|
|
1017
|
+
readonly id: string;
|
|
1018
|
+
}>(source: readonly T[], limit: number): T[];
|
|
1019
|
+
clear(): void;
|
|
1020
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusRecentApps, never>;
|
|
1021
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NucleusRecentApps>;
|
|
1022
|
+
}
|
|
1023
|
+
|
|
501
1024
|
declare class NucleusStarfield {
|
|
502
1025
|
protected readonly W = 1280;
|
|
503
1026
|
protected readonly H = 720;
|
|
@@ -519,10 +1042,17 @@ interface ShellCopy {
|
|
|
519
1042
|
readonly navToggle: string;
|
|
520
1043
|
readonly appsLauncher: string;
|
|
521
1044
|
readonly appsEmpty: string;
|
|
1045
|
+
readonly appsSwitch: string;
|
|
1046
|
+
readonly appsSearch: string;
|
|
1047
|
+
readonly appsNoMatch: string;
|
|
1048
|
+
readonly appsRecent: string;
|
|
1049
|
+
readonly appsAll: string;
|
|
1050
|
+
readonly appsAvailable: string;
|
|
1051
|
+
readonly appsHere: string;
|
|
1052
|
+
readonly keyboardHint: string;
|
|
1053
|
+
readonly accountSwitchHint: string;
|
|
1054
|
+
readonly signOutHint: string;
|
|
522
1055
|
readonly settingsTitle: string;
|
|
523
|
-
readonly settingsTheme: string;
|
|
524
|
-
readonly settingsThemeHint: string;
|
|
525
|
-
readonly themeSystem: string;
|
|
526
1056
|
readonly signOut: string;
|
|
527
1057
|
readonly accountManage: string;
|
|
528
1058
|
readonly accountSwitch: string;
|
|
@@ -531,19 +1061,15 @@ interface ShellCopy {
|
|
|
531
1061
|
readonly accountScope: string;
|
|
532
1062
|
readonly hintComingSoon: string;
|
|
533
1063
|
readonly hintNotDeployed: string;
|
|
534
|
-
readonly
|
|
535
|
-
readonly contextTitle: string;
|
|
536
|
-
readonly contextHint: string;
|
|
1064
|
+
readonly roleCaption: string;
|
|
537
1065
|
readonly companyLabel: string;
|
|
538
1066
|
readonly companyPlaceholder: string;
|
|
539
1067
|
readonly siteLabel: string;
|
|
540
1068
|
readonly sitePlaceholder: string;
|
|
541
1069
|
readonly sitesLoading: string;
|
|
542
1070
|
readonly sitesEmpty: string;
|
|
543
|
-
readonly confirmSwitch: string;
|
|
544
1071
|
readonly relationOwner: string;
|
|
545
1072
|
readonly relationCollaborator: string;
|
|
546
|
-
readonly noContext: string;
|
|
547
1073
|
readonly noCompanyTitle: string;
|
|
548
1074
|
readonly noCompanyHint: string;
|
|
549
1075
|
}
|
|
@@ -554,11 +1080,6 @@ interface ShellNavItem {
|
|
|
554
1080
|
readonly icon: string;
|
|
555
1081
|
readonly label: string;
|
|
556
1082
|
}
|
|
557
|
-
interface ThemeOption {
|
|
558
|
-
readonly value: ThemePreference;
|
|
559
|
-
readonly label: string;
|
|
560
|
-
readonly swatch: string | null;
|
|
561
|
-
}
|
|
562
1083
|
interface CompanyChoice extends CompanyOption {
|
|
563
1084
|
readonly tag: string;
|
|
564
1085
|
}
|
|
@@ -571,6 +1092,7 @@ declare class NucleusShell {
|
|
|
571
1092
|
private readonly session;
|
|
572
1093
|
private readonly sessionAuth;
|
|
573
1094
|
private readonly themes;
|
|
1095
|
+
private readonly recents;
|
|
574
1096
|
private readonly language;
|
|
575
1097
|
private readonly page;
|
|
576
1098
|
private readonly config;
|
|
@@ -593,45 +1115,60 @@ declare class NucleusShell {
|
|
|
593
1115
|
readonly user: "https://cdn.lordicon.com/hrjifpbq.json";
|
|
594
1116
|
readonly key: "https://cdn.lordicon.com/ossgtprr.json";
|
|
595
1117
|
};
|
|
1118
|
+
protected readonly menuPlaceholders: string[];
|
|
596
1119
|
protected readonly title: _angular_core.Signal<string>;
|
|
597
1120
|
protected readonly subtitle: _angular_core.Signal<string>;
|
|
598
1121
|
protected readonly home: _angular_core.Signal<MenuItem>;
|
|
599
1122
|
protected readonly crumbs: _angular_core.Signal<MenuItem[]>;
|
|
600
1123
|
protected readonly copy: _angular_core.Signal<_nucleus_suite_pe_core.ShellCopy>;
|
|
601
1124
|
protected readonly starfield: _angular_core.Signal<boolean>;
|
|
602
|
-
protected readonly themePreference: _angular_core.Signal<ThemePreference>;
|
|
603
1125
|
protected readonly menu: _angular_core.Signal<readonly MenuNode[]>;
|
|
1126
|
+
private readonly collapsedIds;
|
|
604
1127
|
protected readonly menuLoading: _angular_core.Signal<boolean>;
|
|
605
1128
|
protected readonly menuError: _angular_core.Signal<string | null>;
|
|
606
1129
|
protected readonly launcherApps: _angular_core.Signal<readonly _nucleus_suite_pe_core.AppSummary[]>;
|
|
607
1130
|
protected readonly switching: _angular_core.Signal<boolean>;
|
|
1131
|
+
private readonly narrowQuery;
|
|
1132
|
+
protected readonly narrow: _angular_core.WritableSignal<boolean>;
|
|
608
1133
|
protected readonly sidebarOpen: _angular_core.WritableSignal<boolean>;
|
|
609
1134
|
protected readonly settingsOpen: _angular_core.WritableSignal<boolean>;
|
|
610
|
-
protected readonly contextOpen: _angular_core.WritableSignal<boolean>;
|
|
611
1135
|
protected readonly companyChoice: _angular_core.WritableSignal<string | null>;
|
|
612
1136
|
protected readonly siteChoice: _angular_core.WritableSignal<string | null>;
|
|
613
1137
|
protected readonly siteOptions: _angular_core.WritableSignal<Site[]>;
|
|
614
1138
|
protected readonly sitesLoading: _angular_core.WritableSignal<boolean>;
|
|
615
1139
|
private readonly auth;
|
|
1140
|
+
private sitesCompanyId;
|
|
616
1141
|
protected readonly identity: _angular_core.Signal<ShellIdentity | null>;
|
|
617
1142
|
protected readonly initials: _angular_core.Signal<string>;
|
|
618
1143
|
protected readonly canSwitchAccount: _angular_core.Signal<boolean>;
|
|
619
1144
|
protected readonly hasCompany: _angular_core.Signal<boolean>;
|
|
620
1145
|
protected readonly companyChoices: _angular_core.Signal<CompanyChoice[]>;
|
|
621
|
-
protected readonly contextCaption: _angular_core.Signal<string>;
|
|
622
1146
|
protected readonly roleName: _angular_core.Signal<string | null>;
|
|
623
|
-
protected readonly
|
|
624
|
-
protected readonly
|
|
1147
|
+
protected readonly words: _angular_core.Signal<_nucleus_suite_pe_core.CommonCopy>;
|
|
1148
|
+
protected readonly hasSiteContext: _angular_core.Signal<boolean>;
|
|
1149
|
+
protected readonly launcherRich: _angular_core.Signal<boolean>;
|
|
1150
|
+
protected readonly launcherCount: _angular_core.Signal<string | null>;
|
|
1151
|
+
protected readonly launcherSections: _angular_core.Signal<MenuSection[]>;
|
|
1152
|
+
protected readonly accountSections: _angular_core.Signal<MenuSection[]>;
|
|
1153
|
+
protected readonly accountContext: _angular_core.Signal<string>;
|
|
1154
|
+
protected readonly sitePlaceholder: _angular_core.Signal<string>;
|
|
1155
|
+
protected readonly topbarHeight: _angular_core.Signal<"100px" | "56px">;
|
|
1156
|
+
private readonly syncContext;
|
|
625
1157
|
private readonly loadSession;
|
|
1158
|
+
constructor();
|
|
626
1159
|
protected setLang(lang: NucleusLang): void;
|
|
627
1160
|
protected toggleSidebar(): void;
|
|
628
|
-
protected selectTheme(preference: ThemePreference | null): void;
|
|
629
1161
|
protected selectNav(id: string): void;
|
|
1162
|
+
protected isGroup(node: MenuNode): boolean;
|
|
1163
|
+
protected isExpanded(node: MenuNode): boolean;
|
|
630
1164
|
protected selectMenu(node: MenuNode): void;
|
|
1165
|
+
private closeSidebarOnNarrow;
|
|
631
1166
|
protected isSelected(node: MenuNode): boolean;
|
|
632
|
-
protected openContext(): Promise<void>;
|
|
633
1167
|
protected onCompanyChange(companyId: string | null): Promise<void>;
|
|
634
|
-
protected
|
|
1168
|
+
protected onSiteChange(siteId: string | null): Promise<void>;
|
|
1169
|
+
private appRow;
|
|
1170
|
+
protected onLauncherSelect(row: MenuRow): void;
|
|
1171
|
+
protected onAccountSelect(row: MenuRow): void;
|
|
635
1172
|
protected canOpen(app: LauncherApp): boolean;
|
|
636
1173
|
protected launch(app: LauncherApp): void;
|
|
637
1174
|
protected appInitials(app: LauncherApp): string;
|
|
@@ -643,5 +1180,5 @@ declare class NucleusShell {
|
|
|
643
1180
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NucleusShell, "nucleus-shell", never, { "brand": { "alias": "brand"; "required": false; "isSignal": true; }; "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "lead": { "alias": "lead"; "required": false; "isSignal": true; }; "navItems": { "alias": "navItems"; "required": false; "isSignal": true; }; "activeNavId": { "alias": "activeNavId"; "required": false; "isSignal": true; }; "selectedMenuId": { "alias": "selectedMenuId"; "required": false; "isSignal": true; }; }, { "navSelect": "navSelect"; "menuSelect": "menuSelect"; }, never, ["[nucleusTop]", "*"], true, never>;
|
|
644
1181
|
}
|
|
645
1182
|
|
|
646
|
-
export {
|
|
647
|
-
export type { AccessScope, AppSummary, AppUser, AuthSyncRequest, CardSize, CompanyOption, CompanyRelation, CompanySummary, ConfirmRequest, Crumb, FieldKind, FieldOption, FieldSize, FieldSpan, FormField, FormValue, LauncherApp, ListAction, ListActionEvent, ListAlign, ListColumn, ListColumnKind, ListTag, ListToggleEvent, MeResponse, MenuNode, MenuPermissions, NucleusConfig, NucleusIdentity, NucleusLang, SessionTicket, ShellCopy, ShellNavItem, Site, SiteAccess, Subscription, TabItem,
|
|
1183
|
+
export { ACCENTS, CANVASES, COMMON_COPY, CONTROL_CONTRAST, DEFAULT_APPEARANCE, DENSITIES, EMPTY_GEO_VALUE, FIELD_TARGETS, FRAMES, GEO_COPY, LEGACY_THEMES, NO_PERMISSIONS, NUCLEUS_ACCENTS, NUCLEUS_CONFIG, NUCLEUS_DARK_SELECTOR, NUCLEUS_FORCE_BEARER, NUCLEUS_ICONS, NUCLEUS_ICON_CATALOG, NUCLEUS_LANGS, NUCLEUS_LOGOUT_PARAM, NUCLEUS_SKIP_AUTH, NucleusAppearance, NucleusAuth, NucleusCache, NucleusCard, NucleusCell, NucleusColorPicker, NucleusEnterAdvance, NucleusFeedback, NucleusForm, NucleusGeo, NucleusGeoSelect, NucleusIconPicker, NucleusLanguage, NucleusList, NucleusLordicon, NucleusMark, NucleusMenu, NucleusMetric, NucleusMetrics, NucleusPage, NucleusPreset, NucleusRecentApps, NucleusSessionAuth, NucleusShell, NucleusShortcut, NucleusShortcuts, NucleusStarfield, NucleusTabs, SHELL_COPY, SessionService, TEXT_CONTRAST, THEME_COPY, ThemeService, UserSyncService, accentById, accentLabelOf, accentOn, ariaKeysOf, auditAppearance, canvasById, clock, comboOf, commonCopyOf, consumeNucleusLogout, contrastIssue, contrastRatio, day, densityById, endOfDayUtc, fieldsIn, findMenuByRoute, flagOf, foldText, frameById, geoCopyOf, hasChildren, hasModifier, iconClassOf, iconNameOf, integer, isAccentPreference, isApplePlatform, isBeforeToday, isCanvasPreference, isDarkCanvas, isDensityId, isFieldSearchable, isFrameId, isNucleusConfigured, isOnOrBeforeToday, isReachable, isToday, isTypingTarget, isoDay, levelLabel, loadLordicon, loadNucleusConfig, matchesRow, meetsContrast, menuGlyph, menuTile, minutesAsClock, mixHex, money, moveTo, normalizeKeys, nucleusAuthInterceptor, nucleusErrorMessage, nucleusLang, nucleusLogoutUrl, nucleusParseDate, ownsUrl, percent, permissionsOf, provideNucleus, provideNucleusFeedback, provideNucleusTheme, qty, readableOn, relativeLuminance, resolveAccent, resolveFieldSize, searchIcons, selectableRows, shiftDay, shortcutHint, signedMoney, stamp, startOfDayUtc, themeCopyOf, toNumber, toggleCollapsed, visibleTreeRows };
|
|
1184
|
+
export type { Accent, AccentId, AccentOption, AccentPreference, AccessScope, AppSummary, AppUser, Appearance, AuthSyncRequest, Canvas, CanvasEffects, CanvasId, CanvasPreference, CanvasTokens, CardSize, CommonCopy, CommonCopySet, CompanyOption, CompanyRelation, CompanySummary, ConfirmRequest, ContrastIssue, Crumb, Density, DensityId, FieldKind, FieldOption, FieldSize, FieldSpan, FormField, FormValue, Frame, FrameId, FrameTokens, GeoCopy, GeoCopySet, GeoCountry, GeoDivision, GeoLevel, GeoPlace, GeoValue, GlobalAccess, LauncherApp, ListAction, ListActionEvent, ListAlign, ListColumn, ListColumnKind, ListTag, ListToggleEvent, MeResponse, MenuNode, MenuPermissions, MenuRow, MenuSection, MenuTile, MetricTone, NucleusConfig, NucleusIdentity, NucleusLang, SessionTicket, ShellCopy, ShellNavItem, ShortcutBinding, Site, SiteAccess, Subscription, TabItem, ThemeCopy, TreeRow, UserProfile };
|