@nucleus-suite-pe/core 0.5.0 → 0.6.1

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.1",
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,28 @@ 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
+ type CardSize = 'sm' | 'md' | 'lg' | 'full';
322
+ declare class NucleusCard {
323
+ readonly heading: _angular_core.InputSignal<string>;
324
+ readonly subtitle: _angular_core.InputSignal<string>;
325
+ readonly size: _angular_core.InputSignal<CardSize>;
326
+ 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>;
328
+ }
329
+
330
+ interface TabItem {
331
+ readonly id: string;
332
+ readonly label: string;
333
+ readonly icon?: string;
334
+ readonly badge?: number;
335
+ }
336
+ declare class NucleusTabs {
337
+ readonly tabs: _angular_core.InputSignal<readonly TabItem[]>;
338
+ readonly active: _angular_core.ModelSignal<string>;
339
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NucleusTabs, never>;
340
+ 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>;
341
+ }
342
+
321
343
  interface Crumb {
322
344
  readonly label: string;
323
345
  readonly route?: readonly unknown[];
@@ -352,6 +374,7 @@ declare class NucleusFeedback {
352
374
 
353
375
  type FieldKind = 'text' | 'email' | 'password' | 'number' | 'textarea' | 'select' | 'checkbox' | 'switch';
354
376
  type FieldSpan = 1 | 2 | 3 | 4 | 'full';
377
+ type FieldSize = 'xs' | 'sm' | 'md' | 'lg' | 'full';
355
378
  interface FieldOption {
356
379
  readonly label: string;
357
380
  readonly value: unknown;
@@ -361,6 +384,7 @@ interface FormField {
361
384
  readonly label: string;
362
385
  readonly kind?: FieldKind;
363
386
  readonly span?: FieldSpan;
387
+ readonly size?: FieldSize;
364
388
  readonly hint?: string;
365
389
  readonly placeholder?: string;
366
390
  readonly maxlength?: number;
@@ -370,26 +394,29 @@ interface FormField {
370
394
  readonly clearable?: boolean;
371
395
  }
372
396
  type FormValue = Record<string, unknown>;
397
+ declare function resolveFieldSize(field: FormField): FieldSize;
373
398
 
374
399
  declare class NucleusForm {
375
400
  readonly fields: _angular_core.InputSignal<readonly FormField[]>;
376
401
  readonly value: _angular_core.InputSignal<FormValue>;
377
402
  readonly readonly: _angular_core.InputSignal<boolean>;
378
- readonly dense: _angular_core.InputSignal<boolean>;
403
+ readonly columns: _angular_core.InputSignal<number | null>;
379
404
  readonly valueChange: _angular_core.OutputEmitterRef<FormValue>;
380
405
  protected read(field: FormField): unknown;
381
406
  protected text(field: FormField): string;
382
407
  protected checked(field: FormField): boolean;
383
408
  protected write(field: FormField, next: unknown): void;
384
409
  protected isDisabled(field: FormField): boolean;
385
- protected spanClass(field: FormField): string;
410
+ protected fieldClass(field: FormField): string;
411
+ protected gridClass(): string;
386
412
  protected optionsOf(field: FormField): FieldOption[];
387
413
  protected kindOf(field: FormField): string;
388
414
  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>;
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, never>;
390
416
  }
391
417
 
392
418
  type ListAlign = 'left' | 'center' | 'right';
419
+ type ListColumnKind = 'text' | 'switch';
393
420
  interface ListTag {
394
421
  readonly label: string;
395
422
  readonly severity?: 'success' | 'info' | 'warn' | 'danger' | 'secondary';
@@ -397,11 +424,15 @@ interface ListTag {
397
424
  interface ListColumn<T = Record<string, unknown>> {
398
425
  readonly key: string;
399
426
  readonly header: string;
427
+ readonly kind?: ListColumnKind;
400
428
  readonly align?: ListAlign;
401
429
  readonly strong?: boolean;
402
430
  readonly width?: string;
403
431
  readonly value?: (row: T) => string;
404
432
  readonly tag?: (row: T) => ListTag | null;
433
+ readonly checked?: (row: T) => boolean;
434
+ readonly disabled?: (row: T) => boolean;
435
+ readonly hint?: (row: T) => string;
405
436
  }
406
437
  interface ListAction<T = Record<string, unknown>> {
407
438
  readonly id: string;
@@ -414,6 +445,11 @@ interface ListActionEvent<T = Record<string, unknown>> {
414
445
  readonly id: string;
415
446
  readonly row: T;
416
447
  }
448
+ interface ListToggleEvent<T = Record<string, unknown>> {
449
+ readonly key: string;
450
+ readonly row: T;
451
+ readonly value: boolean;
452
+ }
417
453
 
418
454
  declare class NucleusCell {
419
455
  readonly nucleusCell: _angular_core.InputSignal<string>;
@@ -431,6 +467,7 @@ declare class NucleusList<T extends object = Record<string, unknown>> {
431
467
  readonly minWidth: _angular_core.InputSignal<string>;
432
468
  readonly rowClass: _angular_core.InputSignal<(row: T) => string>;
433
469
  readonly action: _angular_core.OutputEmitterRef<ListActionEvent<T>>;
470
+ readonly toggle: _angular_core.OutputEmitterRef<ListToggleEvent<T>>;
434
471
  private readonly cells;
435
472
  protected readonly tableStyle: _angular_core.Signal<{
436
473
  'min-width': string;
@@ -441,8 +478,12 @@ declare class NucleusList<T extends object = Record<string, unknown>> {
441
478
  protected tagOf(column: ListColumn<T>, row: T): ListTag | null;
442
479
  protected visibleActions(row: T): readonly ListAction<T>[];
443
480
  protected run(entry: ListAction<T>, row: T): void;
481
+ protected isChecked(column: ListColumn<T>, row: T): boolean;
482
+ protected isLocked(column: ListColumn<T>, row: T): boolean;
483
+ protected hintOf(column: ListColumn<T>, row: T): string;
484
+ protected flip(column: ListColumn<T>, row: T): void;
444
485
  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>;
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>;
446
487
  }
447
488
 
448
489
  declare class NucleusMark {
@@ -602,5 +643,5 @@ declare class NucleusShell {
602
643
  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
644
  }
604
645
 
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 };
646
+ 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 };
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, Theme, ThemeId, ThemePreference, ThemeTokens, UserProfile };