@nucleus-suite-pe/core 0.5.0 → 0.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nucleus-suite-pe/core",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Capa compartida de la suite Nucleus: sesión única, permisos, tema y marco de aplicación para Angular.",
5
5
  "keywords": [
6
6
  "angular",
@@ -318,6 +318,26 @@ declare class NucleusLordicon {
318
318
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NucleusLordicon, "nucleus-lordicon", never, { "src": { "alias": "src"; "required": true; "isSignal": true; }; "trigger": { "alias": "trigger"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
319
319
  }
320
320
 
321
+ declare class NucleusCard {
322
+ readonly heading: _angular_core.InputSignal<string>;
323
+ readonly subtitle: _angular_core.InputSignal<string>;
324
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusCard, never>;
325
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NucleusCard, "nucleus-card", never, { "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; }, {}, never, ["*", "[nucleusCardActions]"], true, never>;
326
+ }
327
+
328
+ interface TabItem {
329
+ readonly id: string;
330
+ readonly label: string;
331
+ readonly icon?: string;
332
+ readonly badge?: number;
333
+ }
334
+ declare class NucleusTabs {
335
+ readonly tabs: _angular_core.InputSignal<readonly TabItem[]>;
336
+ readonly active: _angular_core.ModelSignal<string>;
337
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusTabs, never>;
338
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NucleusTabs, "nucleus-tabs", never, { "tabs": { "alias": "tabs"; "required": true; "isSignal": true; }; "active": { "alias": "active"; "required": true; "isSignal": true; }; }, { "active": "activeChange"; }, never, never, true, never>;
339
+ }
340
+
321
341
  interface Crumb {
322
342
  readonly label: string;
323
343
  readonly route?: readonly unknown[];
@@ -352,6 +372,7 @@ declare class NucleusFeedback {
352
372
 
353
373
  type FieldKind = 'text' | 'email' | 'password' | 'number' | 'textarea' | 'select' | 'checkbox' | 'switch';
354
374
  type FieldSpan = 1 | 2 | 3 | 4 | 'full';
375
+ type FieldSize = 'xs' | 'sm' | 'md' | 'lg' | 'full';
355
376
  interface FieldOption {
356
377
  readonly label: string;
357
378
  readonly value: unknown;
@@ -361,6 +382,7 @@ interface FormField {
361
382
  readonly label: string;
362
383
  readonly kind?: FieldKind;
363
384
  readonly span?: FieldSpan;
385
+ readonly size?: FieldSize;
364
386
  readonly hint?: string;
365
387
  readonly placeholder?: string;
366
388
  readonly maxlength?: number;
@@ -370,26 +392,29 @@ interface FormField {
370
392
  readonly clearable?: boolean;
371
393
  }
372
394
  type FormValue = Record<string, unknown>;
395
+ declare function resolveFieldSize(field: FormField): FieldSize;
373
396
 
374
397
  declare class NucleusForm {
375
398
  readonly fields: _angular_core.InputSignal<readonly FormField[]>;
376
399
  readonly value: _angular_core.InputSignal<FormValue>;
377
400
  readonly readonly: _angular_core.InputSignal<boolean>;
378
- readonly dense: _angular_core.InputSignal<boolean>;
401
+ readonly columns: _angular_core.InputSignal<number | null>;
379
402
  readonly valueChange: _angular_core.OutputEmitterRef<FormValue>;
380
403
  protected read(field: FormField): unknown;
381
404
  protected text(field: FormField): string;
382
405
  protected checked(field: FormField): boolean;
383
406
  protected write(field: FormField, next: unknown): void;
384
407
  protected isDisabled(field: FormField): boolean;
385
- protected spanClass(field: FormField): string;
408
+ protected fieldClass(field: FormField): string;
409
+ protected gridClass(): string;
386
410
  protected optionsOf(field: FormField): FieldOption[];
387
411
  protected kindOf(field: FormField): string;
388
412
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusForm, never>;
389
- 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; }; "dense": { "alias": "dense"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
413
+ 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, never>;
390
414
  }
391
415
 
392
416
  type ListAlign = 'left' | 'center' | 'right';
417
+ type ListColumnKind = 'text' | 'switch';
393
418
  interface ListTag {
394
419
  readonly label: string;
395
420
  readonly severity?: 'success' | 'info' | 'warn' | 'danger' | 'secondary';
@@ -397,11 +422,15 @@ interface ListTag {
397
422
  interface ListColumn<T = Record<string, unknown>> {
398
423
  readonly key: string;
399
424
  readonly header: string;
425
+ readonly kind?: ListColumnKind;
400
426
  readonly align?: ListAlign;
401
427
  readonly strong?: boolean;
402
428
  readonly width?: string;
403
429
  readonly value?: (row: T) => string;
404
430
  readonly tag?: (row: T) => ListTag | null;
431
+ readonly checked?: (row: T) => boolean;
432
+ readonly disabled?: (row: T) => boolean;
433
+ readonly hint?: (row: T) => string;
405
434
  }
406
435
  interface ListAction<T = Record<string, unknown>> {
407
436
  readonly id: string;
@@ -414,6 +443,11 @@ interface ListActionEvent<T = Record<string, unknown>> {
414
443
  readonly id: string;
415
444
  readonly row: T;
416
445
  }
446
+ interface ListToggleEvent<T = Record<string, unknown>> {
447
+ readonly key: string;
448
+ readonly row: T;
449
+ readonly value: boolean;
450
+ }
417
451
 
418
452
  declare class NucleusCell {
419
453
  readonly nucleusCell: _angular_core.InputSignal<string>;
@@ -431,6 +465,7 @@ declare class NucleusList<T extends object = Record<string, unknown>> {
431
465
  readonly minWidth: _angular_core.InputSignal<string>;
432
466
  readonly rowClass: _angular_core.InputSignal<(row: T) => string>;
433
467
  readonly action: _angular_core.OutputEmitterRef<ListActionEvent<T>>;
468
+ readonly toggle: _angular_core.OutputEmitterRef<ListToggleEvent<T>>;
434
469
  private readonly cells;
435
470
  protected readonly tableStyle: _angular_core.Signal<{
436
471
  'min-width': string;
@@ -441,8 +476,12 @@ declare class NucleusList<T extends object = Record<string, unknown>> {
441
476
  protected tagOf(column: ListColumn<T>, row: T): ListTag | null;
442
477
  protected visibleActions(row: T): readonly ListAction<T>[];
443
478
  protected run(entry: ListAction<T>, row: T): void;
479
+ protected isChecked(column: ListColumn<T>, row: T): boolean;
480
+ protected isLocked(column: ListColumn<T>, row: T): boolean;
481
+ protected hintOf(column: ListColumn<T>, row: T): string;
482
+ protected flip(column: ListColumn<T>, row: T): void;
444
483
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusList<any>, never>;
445
- 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"; }, ["cells"], ["[nucleusListTitle]", "[nucleusListActions]"], true, never>;
484
+ 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>;
446
485
  }
447
486
 
448
487
  declare class NucleusMark {
@@ -602,5 +641,5 @@ declare class NucleusShell {
602
641
  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>;
603
642
  }
604
643
 
605
- export { DEFAULT_THEME, NO_PERMISSIONS, NUCLEUS_CONFIG, NUCLEUS_DARK_SELECTOR, NUCLEUS_FORCE_BEARER, NUCLEUS_ICONS, NUCLEUS_LANGS, NUCLEUS_LOGOUT_PARAM, NUCLEUS_SKIP_AUTH, NucleusAuth, NucleusCell, NucleusFeedback, NucleusForm, NucleusLanguage, NucleusList, NucleusLordicon, NucleusMark, NucleusPage, NucleusPreset, NucleusSessionAuth, NucleusShell, NucleusStarfield, SHELL_COPY, SessionService, THEMES, THEME_LABELS, ThemeService, UserSyncService, consumeNucleusLogout, findMenuByRoute, isNucleusConfigured, isThemePreference, loadLordicon, loadNucleusConfig, nucleusAuthInterceptor, nucleusLogoutUrl, ownsUrl, permissionsOf, provideNucleus, provideNucleusFeedback, provideNucleusTheme, themeById };
606
- export type { AccessScope, AppSummary, AppUser, AuthSyncRequest, CompanyOption, CompanyRelation, CompanySummary, ConfirmRequest, Crumb, FieldKind, FieldOption, FieldSpan, FormField, FormValue, LauncherApp, ListAction, ListActionEvent, ListAlign, ListColumn, ListTag, MeResponse, MenuNode, MenuPermissions, NucleusConfig, NucleusIdentity, NucleusLang, SessionTicket, ShellCopy, ShellNavItem, Site, SiteAccess, Subscription, Theme, ThemeId, ThemePreference, ThemeTokens, UserProfile };
644
+ export { DEFAULT_THEME, NO_PERMISSIONS, NUCLEUS_CONFIG, NUCLEUS_DARK_SELECTOR, NUCLEUS_FORCE_BEARER, NUCLEUS_ICONS, NUCLEUS_LANGS, NUCLEUS_LOGOUT_PARAM, NUCLEUS_SKIP_AUTH, NucleusAuth, NucleusCard, NucleusCell, NucleusFeedback, NucleusForm, NucleusLanguage, NucleusList, NucleusLordicon, NucleusMark, NucleusPage, NucleusPreset, NucleusSessionAuth, NucleusShell, NucleusStarfield, NucleusTabs, SHELL_COPY, SessionService, THEMES, THEME_LABELS, ThemeService, UserSyncService, consumeNucleusLogout, findMenuByRoute, isNucleusConfigured, isThemePreference, loadLordicon, loadNucleusConfig, nucleusAuthInterceptor, nucleusLogoutUrl, ownsUrl, permissionsOf, provideNucleus, provideNucleusFeedback, provideNucleusTheme, resolveFieldSize, themeById };
645
+ export type { AccessScope, AppSummary, AppUser, AuthSyncRequest, 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, Theme, ThemeId, ThemePreference, ThemeTokens, UserProfile };