sass-cms-template-common 0.0.7 → 0.0.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/dist/index.d.ts CHANGED
@@ -35,14 +35,15 @@ export declare type AppMessageNode = string | {
35
35
  /** Árbol de mensajes del gestor (namespaces → claves → string anidable). */
36
36
  export declare type AppMessages = Record<string, AppMessageNode>;
37
37
 
38
- export declare function AppShell({ pathname, sites, children, notificationUnreadCount, notifications, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, newContentGroups, previewFormats, operationPermissions, isAdmin, onNewContentSelect, onPreviewSelect, LinkComponent, permissions, locale, language, messages, appMessages, baseUrl, }: AppShellProps): JSX.Element;
38
+ export declare function AppShell({ pathname, sites, children, notificationUnreadCount, notificationsData, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, newContentGroups, previewFormats, operationPermissions, isAdmin, onNewContentSelect, onPreviewSelect, LinkComponent, permissions, locale, language, messages, appMessages, baseUrl, profileServices, }: AppShellProps): JSX.Element;
39
39
 
40
40
  export declare type AppShellProps = {
41
41
  pathname: string;
42
42
  sites: SiteSection[];
43
43
  children: ReactNode;
44
44
  notificationUnreadCount: number;
45
- notifications: DashboardNotification[];
45
+ /** Respuesta cruda de `POST /dashboard/notification` (newsTask/expireTask/videos). */
46
+ notificationsData?: DashboardNotificationsResponse | null;
46
47
  profile: ProfileGetResponse;
47
48
  primaryLogo: ReactNode;
48
49
  brandLogo?: ReactNode;
@@ -79,6 +80,12 @@ export declare type AppShellProps = {
79
80
  /** Catálogo de mensajes propio del gestor (namespaces libres, es/en/pt). */
80
81
  appMessages?: AppLocaleCatalog;
81
82
  baseUrl: string;
83
+ /**
84
+ * Servicio de pines del sidebar (`CmsProfileServices`, construido por el
85
+ * host con su `axiosApi`/`authentication`). Si se omite, el anclado de
86
+ * accesos es solo visual y no persiste entre sesiones.
87
+ */
88
+ profileServices?: SidebarRailPinService;
82
89
  };
83
90
 
84
91
  /** Traductor genérico de claves del gestor por ruta con puntos (`ns.clave`). */
@@ -2855,6 +2862,8 @@ export declare const enMessages: {
2855
2862
  readonly collapse: "Collapse";
2856
2863
  readonly expand: "Expand";
2857
2864
  readonly newBadge: "New";
2865
+ readonly pin: "Pin to top";
2866
+ readonly unpin: "Unpin";
2858
2867
  };
2859
2868
  readonly topBar: {
2860
2869
  readonly openSidebar: "Open sidebar menu";
@@ -2899,6 +2908,17 @@ export declare const enMessages: {
2899
2908
  readonly unreadCount: "{count} unread";
2900
2909
  readonly empty: "No notifications";
2901
2910
  readonly ariaLabel: "Notifications";
2911
+ readonly close: "Close";
2912
+ readonly today: "Today";
2913
+ readonly yesterday: "Yesterday";
2914
+ readonly assignedBefore: "You have";
2915
+ readonly assignedAfter: "new assigned topics.";
2916
+ readonly pendingBefore: "You have";
2917
+ readonly pendingAfter: "assigned topics about to expire.";
2918
+ readonly assignedToday: "Assigned today";
2919
+ readonly assignedYesterday: "Assigned yesterday";
2920
+ readonly assignedOn: "Assigned on";
2921
+ readonly expires: "Due";
2902
2922
  };
2903
2923
  readonly search: {
2904
2924
  readonly placeholder: "Search…";
@@ -3028,6 +3048,8 @@ export declare const esMessages: {
3028
3048
  collapse: string;
3029
3049
  expand: string;
3030
3050
  newBadge: string;
3051
+ pin: string;
3052
+ unpin: string;
3031
3053
  };
3032
3054
  topBar: {
3033
3055
  openSidebar: string;
@@ -3072,6 +3094,17 @@ export declare const esMessages: {
3072
3094
  unreadCount: string;
3073
3095
  empty: string;
3074
3096
  ariaLabel: string;
3097
+ close: string;
3098
+ today: string;
3099
+ yesterday: string;
3100
+ assignedBefore: string;
3101
+ assignedAfter: string;
3102
+ pendingBefore: string;
3103
+ pendingAfter: string;
3104
+ assignedToday: string;
3105
+ assignedYesterday: string;
3106
+ assignedOn: string;
3107
+ expires: string;
3075
3108
  };
3076
3109
  search: {
3077
3110
  placeholder: string;
@@ -3221,6 +3254,36 @@ export declare interface ExplorerFolder {
3221
3254
  [key: string]: unknown;
3222
3255
  }
3223
3256
 
3257
+ export declare type FeedbackBadgeColors = typeof feedbackBadgeColors;
3258
+
3259
+ /**
3260
+ * Colores del círculo de ícono del toast por severidad. `bg` = fondo del
3261
+ * círculo; `on` = color del ícono. Contenedores tonales claros con ícono
3262
+ * oscuro (misma familia que Material 3), legibles sobre la superficie oscura.
3263
+ */
3264
+ export declare const feedbackBadgeColors: {
3265
+ /** Éxito: círculo verde menta con check verde oscuro. */
3266
+ readonly success: {
3267
+ readonly bg: "#92F7B7";
3268
+ readonly on: "#002112";
3269
+ };
3270
+ /** Advertencia: círculo ámbar con ícono marrón. */
3271
+ readonly warning: {
3272
+ readonly bg: "#FFDDB0";
3273
+ readonly on: "#5F4200";
3274
+ };
3275
+ /** Error: círculo rosado con ícono rojo oscuro. */
3276
+ readonly error: {
3277
+ readonly bg: "#FFDAD6";
3278
+ readonly on: "#93000A";
3279
+ };
3280
+ /** Info: círculo azul tonal con ícono azul oscuro. */
3281
+ readonly info: {
3282
+ readonly bg: "#D8E2FF";
3283
+ readonly on: "#001551";
3284
+ };
3285
+ };
3286
+
3224
3287
  export declare type FeedbackColors = typeof feedbackColors;
3225
3288
 
3226
3289
  /**
@@ -3245,6 +3308,16 @@ export declare const feedbackColors: {
3245
3308
  readonly error: "#FF1744";
3246
3309
  /** Acento informativo (azul). */
3247
3310
  readonly info: "#2196F3";
3311
+ /** Enlace (url del recurso) sobre la superficie oscura del toast. */
3312
+ readonly link: "#9ECAFF";
3313
+ /** Fondo sutil del detalle crudo del servidor del toast de error. */
3314
+ readonly overlay: "#3B3B3B";
3315
+ /** Texto atenuado del toast de error (descripción, chip de versión, fecha). */
3316
+ readonly onSurfaceSoft: "#F0F0F7";
3317
+ /** Fondo del chip de versión (blanco translúcido sobre la superficie oscura). */
3318
+ readonly versionChipBg: "#F0F0F71A";
3319
+ /** Punto separador entre versión y fecha (blanco translúcido). */
3320
+ readonly separator: "#F0F0F7B3";
3248
3321
  };
3249
3322
 
3250
3323
  /**
@@ -3400,6 +3473,8 @@ export declare function findPublicationLabel(sites: SiteSection[], publicationId
3400
3473
  export declare const fontFamilies: {
3401
3474
  readonly roboto: "\"Roboto\",\"Helvetica\",\"Arial\",sans-serif";
3402
3475
  readonly productSans: "\"Product Sans\",\"Roboto\",\"Helvetica\",\"Arial\",sans-serif";
3476
+ /** Monoespaciada (url del toast de error, fragmentos de código). */
3477
+ readonly mono: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
3403
3478
  };
3404
3479
 
3405
3480
  /**
@@ -3961,6 +4036,8 @@ export declare type NavLinkItem = {
3961
4036
  badge?: string;
3962
4037
  children?: NavLinkItem[];
3963
4038
  defaultOpen?: boolean;
4039
+ /** Acento visual (p. ej. destacar un ítem generado/asistido por IA). */
4040
+ accent?: 'ai';
3964
4041
  };
3965
4042
 
3966
4043
  /** Columna del menú "Nuevo" (Frecuentes / Otros / Videos). */
@@ -4500,6 +4577,34 @@ export declare interface NotificationAdminConfigurationResponse extends CmsRespo
4500
4577
  types?: NotificationSendType[];
4501
4578
  }
4502
4579
 
4580
+ export declare type NotificationColors = typeof notificationColors;
4581
+
4582
+ /**
4583
+ * Colores del avatar de ícono de cada tarjeta del centro de notificaciones
4584
+ * (campanita del TopBar). `bg` = fondo del contenedor cuadrado; `on` =
4585
+ * color del ícono. Replican los del centro de notificaciones del diseño
4586
+ * (mockup "Gestión de Noticias"): temas asignados en azul (misma familia
4587
+ * secundaria), actividades por vencer en naranja y notificaciones de sistema
4588
+ * (videos) en verde. Semánticos y reutilizables por cualquier gestor.
4589
+ */
4590
+ export declare const notificationColors: {
4591
+ /** Temas asignados (azul): mismo contenedor secundario que los chips activos. */
4592
+ readonly assigned: {
4593
+ readonly bg: "#D8E2FF";
4594
+ readonly on: "#2C4678";
4595
+ };
4596
+ /** Actividades por vencer (naranja). El `on` se reutiliza para la fecha de vencimiento. */
4597
+ readonly pending: {
4598
+ readonly bg: "#FFE2D5";
4599
+ readonly on: "#B3300A";
4600
+ };
4601
+ /** Notificaciones del sistema / videos (verde). */
4602
+ readonly system: {
4603
+ readonly bg: "#DCEFE0";
4604
+ readonly on: "#11663B";
4605
+ };
4606
+ };
4607
+
4503
4608
  /** Topic devuelto por notification/adminConfiguration (`{ name, value }`). */
4504
4609
  export declare interface NotificationConfigTopic {
4505
4610
  name: string;
@@ -4542,13 +4647,21 @@ export declare interface NotificationsListResponse {
4542
4647
  total?: number;
4543
4648
  }
4544
4649
 
4545
- export declare function NotificationsMenu({ unreadCount, notifications, }: NotificationsMenuProps): JSX.Element;
4650
+ export declare function NotificationsMenu({ unreadCount, notificationsData, masterBaseUrl, currentPublicationId, gmtRedaction, }: NotificationsMenuProps): JSX.Element;
4546
4651
 
4547
4652
  export declare type NotificationsMenuMessageKey = keyof CmsMessages['notificationsMenu'];
4548
4653
 
4549
4654
  export declare type NotificationsMenuProps = {
4655
+ /** Total de no leídas (badge de la campanita). */
4550
4656
  unreadCount: number;
4551
- notifications: DashboardNotification[];
4657
+ /** Respuesta cruda de `POST /dashboard/notification` (newsTask/expireTask/videos). */
4658
+ notificationsData?: DashboardNotificationsResponse | null;
4659
+ /** Dominio de `master` (Angular) para la redirección de los temas. */
4660
+ masterBaseUrl?: string;
4661
+ /** Id de la publicación activa (fallback de la redirección). */
4662
+ currentPublicationId?: number | string;
4663
+ /** Offset GMT de la publicación (para mostrar las fechas en zona de redacción). */
4664
+ gmtRedaction?: string | null;
4552
4665
  };
4553
4666
 
4554
4667
  /** Topic devuelto por notification/topics (`{ name, description }`). */
@@ -5492,6 +5605,8 @@ export declare const ptMessages: {
5492
5605
  collapse: string;
5493
5606
  expand: string;
5494
5607
  newBadge: string;
5608
+ pin: string;
5609
+ unpin: string;
5495
5610
  };
5496
5611
  topBar: {
5497
5612
  openSidebar: string;
@@ -5536,6 +5651,17 @@ export declare const ptMessages: {
5536
5651
  unreadCount: string;
5537
5652
  empty: string;
5538
5653
  ariaLabel: string;
5654
+ close: string;
5655
+ today: string;
5656
+ yesterday: string;
5657
+ assignedBefore: string;
5658
+ assignedAfter: string;
5659
+ pendingBefore: string;
5660
+ pendingAfter: string;
5661
+ assignedToday: string;
5662
+ assignedYesterday: string;
5663
+ assignedOn: string;
5664
+ expires: string;
5539
5665
  };
5540
5666
  search: {
5541
5667
  placeholder: string;
@@ -5960,7 +6086,7 @@ export declare interface SectionsGetResponse extends CmsResponse {
5960
6086
  * "Todos / Activos / Inactivos"), reutilizable desde cualquier app que consuma
5961
6087
  * la librería.
5962
6088
  */
5963
- export declare function SelectDropdown({ value, options, onChange, highlighted, showIcons, minWidth, disabled, placeholder, prefix, pinSelectedFirst, ariaLabel, testId, }: SelectDropdownProps): JSX.Element;
6089
+ export declare function SelectDropdown({ value, options, onChange, highlighted, showIcons, minWidth, disabled, placeholder, prefix, ariaLabel, testId, }: SelectDropdownProps): JSX.Element;
5964
6090
 
5965
6091
  export declare type SelectDropdownProps = {
5966
6092
  /** Valor seleccionado actualmente. */
@@ -5991,11 +6117,6 @@ export declare type SelectDropdownProps = {
5991
6117
  * normal y el valor seleccionado en negrita.
5992
6118
  */
5993
6119
  prefix?: ReactNode;
5994
- /**
5995
- * Al abrir el menú, mueve la opción seleccionada al tope y la separa del resto
5996
- * con un divisor. Por defecto `false` (mantiene el orden original).
5997
- */
5998
- pinSelectedFirst?: boolean;
5999
6120
  /** `aria-label` del disparador (accesibilidad). */
6000
6121
  ariaLabel?: string;
6001
6122
  /** Valor base para los `data-testid`. */
@@ -6017,6 +6138,13 @@ export declare type SelectOption = {
6017
6138
  label: ReactNode;
6018
6139
  /** Ícono opcional a la izquierda del label. */
6019
6140
  icon?: ReactNode;
6141
+ /**
6142
+ * Color del ícono de esta opción (en el disparador y en el menú). Acepta un
6143
+ * valor de variable del theme (`cmsColors.*`, `feedbackColors.*`) o un path
6144
+ * del tema MUI (p. ej. `'m3.onSurfaceVariant'`). Si se omite, el ícono usa el
6145
+ * gris por defecto (`m3.onSurfaceVariant`).
6146
+ */
6147
+ iconColor?: string;
6020
6148
  /** Si es `false` la opción no se renderiza. Por defecto `true`. */
6021
6149
  show?: boolean;
6022
6150
  };
@@ -6052,8 +6180,6 @@ export declare const SelectStyles: {
6052
6180
  * Peso normal incluso en la opción activa (la negrita vive en el trigger).
6053
6181
  */
6054
6182
  sxItem: (selected: boolean) => SxProps<Theme>;
6055
- /** Divisor entre la opción activa (fijada arriba) y el resto del listado. */
6056
- sxMenuDivider: SxProps<Theme>;
6057
6183
  };
6058
6184
 
6059
6185
  /** Sombras (elevaciones) reutilizables. */
@@ -6083,6 +6209,33 @@ export declare type SidebarProps = {
6083
6209
  selectedPublicationId: string;
6084
6210
  };
6085
6211
 
6212
+ /**
6213
+ * Variante compacta del sidebar: rail vertical de íconos con etiqueta debajo,
6214
+ * sin modo expandido. Los ítems con hijos abren un menú flotante a la derecha.
6215
+ * Al pasar el mouse sobre un ítem aparece un botón para anclarlo arriba del
6216
+ * todo. El anclado se identifica por `item.module` y persiste vía
6217
+ * `profileServices.addPins`/`deletePins`/`getPins` (recurso de perfil).
6218
+ */
6219
+ export declare function SidebarRail({ pathname, permissions, LinkComponent, baseUrl, items, profileServices, }: SidebarRailProps): JSX.Element;
6220
+
6221
+ /** Servicio de pines usado por el rail: solo necesita estos tres métodos. */
6222
+ export declare type SidebarRailPinService = Pick<CmsProfileServices, 'addPins' | 'deletePins' | 'getPins'>;
6223
+
6224
+ export declare type SidebarRailProps = {
6225
+ pathname: string;
6226
+ LinkComponent?: CmsLinkComponent;
6227
+ permissions: Array<NavItemPermissions>;
6228
+ baseUrl: string;
6229
+ /** Ítems de navegación. Por defecto, `ACCOUNT_NAV_BLOCKS`. */
6230
+ items?: NavLinkItem[];
6231
+ /**
6232
+ * Servicio de pines (`CmsProfileServices`, construido por el host con su
6233
+ * `axiosApi`/`authentication`). Si se omite, el anclado es solo visual y no
6234
+ * persiste entre sesiones.
6235
+ */
6236
+ profileServices?: SidebarRailPinService;
6237
+ };
6238
+
6086
6239
  /**
6087
6240
  * Menú desplegable genérico y presentacional. Renderiza una lista de opciones
6088
6241
  * recibidas por props y ejecuta el `onClick` de cada una. Soporta una o dos
@@ -6495,16 +6648,18 @@ export declare interface ToastOptions {
6495
6648
  /** Severidad visual de un toast. */
6496
6649
  export declare type ToastSeverity = 'success' | 'error' | 'warning' | 'info';
6497
6650
 
6498
- export declare function TopBar({ sites, sidebarOpen, onToggleSidebar, notificationUnreadCount, notifications, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, newContentGroups, previewFormats, operationPermissions, isAdmin, onNewContentSelect, onPreviewSelect, }: TopBarProps): JSX.Element;
6651
+ export declare function TopBar({ sites, sidebarOpen, onToggleSidebar, notificationUnreadCount, notificationsData, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, newContentGroups, previewFormats, operationPermissions, isAdmin, onNewContentSelect, onPreviewSelect, }: TopBarProps): JSX.Element;
6499
6652
 
6500
6653
  export declare type TopBarMessageKey = keyof CmsMessages['topBar'];
6501
6654
 
6502
6655
  export declare type TopBarProps = {
6503
6656
  sites: SiteSection[];
6504
- sidebarOpen: boolean;
6505
- onToggleSidebar: () => void;
6657
+ /** Solo aplica con un sidebar colapsable (p. ej. `Sidebar`). Omitir oculta el botón. */
6658
+ sidebarOpen?: boolean;
6659
+ onToggleSidebar?: () => void;
6506
6660
  notificationUnreadCount: number;
6507
- notifications: DashboardNotification[];
6661
+ /** Respuesta cruda de `POST /dashboard/notification` (newsTask/expireTask/videos). */
6662
+ notificationsData?: DashboardNotificationsResponse | null;
6508
6663
  profile: ProfileGetResponse;
6509
6664
  primaryLogo: ReactNode;
6510
6665
  brandLogo?: ReactNode;