sass-cms-template-common 0.0.7 → 0.0.8

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, }: 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;
@@ -2899,6 +2900,17 @@ export declare const enMessages: {
2899
2900
  readonly unreadCount: "{count} unread";
2900
2901
  readonly empty: "No notifications";
2901
2902
  readonly ariaLabel: "Notifications";
2903
+ readonly close: "Close";
2904
+ readonly today: "Today";
2905
+ readonly yesterday: "Yesterday";
2906
+ readonly assignedBefore: "You have";
2907
+ readonly assignedAfter: "new assigned topics.";
2908
+ readonly pendingBefore: "You have";
2909
+ readonly pendingAfter: "assigned topics about to expire.";
2910
+ readonly assignedToday: "Assigned today";
2911
+ readonly assignedYesterday: "Assigned yesterday";
2912
+ readonly assignedOn: "Assigned on";
2913
+ readonly expires: "Due";
2902
2914
  };
2903
2915
  readonly search: {
2904
2916
  readonly placeholder: "Search…";
@@ -3072,6 +3084,17 @@ export declare const esMessages: {
3072
3084
  unreadCount: string;
3073
3085
  empty: string;
3074
3086
  ariaLabel: string;
3087
+ close: string;
3088
+ today: string;
3089
+ yesterday: string;
3090
+ assignedBefore: string;
3091
+ assignedAfter: string;
3092
+ pendingBefore: string;
3093
+ pendingAfter: string;
3094
+ assignedToday: string;
3095
+ assignedYesterday: string;
3096
+ assignedOn: string;
3097
+ expires: string;
3075
3098
  };
3076
3099
  search: {
3077
3100
  placeholder: string;
@@ -3221,6 +3244,36 @@ export declare interface ExplorerFolder {
3221
3244
  [key: string]: unknown;
3222
3245
  }
3223
3246
 
3247
+ export declare type FeedbackBadgeColors = typeof feedbackBadgeColors;
3248
+
3249
+ /**
3250
+ * Colores del círculo de ícono del toast por severidad. `bg` = fondo del
3251
+ * círculo; `on` = color del ícono. Contenedores tonales claros con ícono
3252
+ * oscuro (misma familia que Material 3), legibles sobre la superficie oscura.
3253
+ */
3254
+ export declare const feedbackBadgeColors: {
3255
+ /** Éxito: círculo verde menta con check verde oscuro. */
3256
+ readonly success: {
3257
+ readonly bg: "#92F7B7";
3258
+ readonly on: "#002112";
3259
+ };
3260
+ /** Advertencia: círculo ámbar con ícono marrón. */
3261
+ readonly warning: {
3262
+ readonly bg: "#FFDDB0";
3263
+ readonly on: "#5F4200";
3264
+ };
3265
+ /** Error: círculo rosado con ícono rojo oscuro. */
3266
+ readonly error: {
3267
+ readonly bg: "#FFDAD6";
3268
+ readonly on: "#93000A";
3269
+ };
3270
+ /** Info: círculo azul tonal con ícono azul oscuro. */
3271
+ readonly info: {
3272
+ readonly bg: "#D8E2FF";
3273
+ readonly on: "#001551";
3274
+ };
3275
+ };
3276
+
3224
3277
  export declare type FeedbackColors = typeof feedbackColors;
3225
3278
 
3226
3279
  /**
@@ -3245,6 +3298,16 @@ export declare const feedbackColors: {
3245
3298
  readonly error: "#FF1744";
3246
3299
  /** Acento informativo (azul). */
3247
3300
  readonly info: "#2196F3";
3301
+ /** Enlace (url del recurso) sobre la superficie oscura del toast. */
3302
+ readonly link: "#9ECAFF";
3303
+ /** Fondo sutil del detalle crudo del servidor del toast de error. */
3304
+ readonly overlay: "#3B3B3B";
3305
+ /** Texto atenuado del toast de error (descripción, chip de versión, fecha). */
3306
+ readonly onSurfaceSoft: "#F0F0F7";
3307
+ /** Fondo del chip de versión (blanco translúcido sobre la superficie oscura). */
3308
+ readonly versionChipBg: "#F0F0F71A";
3309
+ /** Punto separador entre versión y fecha (blanco translúcido). */
3310
+ readonly separator: "#F0F0F7B3";
3248
3311
  };
3249
3312
 
3250
3313
  /**
@@ -3400,6 +3463,8 @@ export declare function findPublicationLabel(sites: SiteSection[], publicationId
3400
3463
  export declare const fontFamilies: {
3401
3464
  readonly roboto: "\"Roboto\",\"Helvetica\",\"Arial\",sans-serif";
3402
3465
  readonly productSans: "\"Product Sans\",\"Roboto\",\"Helvetica\",\"Arial\",sans-serif";
3466
+ /** Monoespaciada (url del toast de error, fragmentos de código). */
3467
+ readonly mono: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
3403
3468
  };
3404
3469
 
3405
3470
  /**
@@ -4500,6 +4565,34 @@ export declare interface NotificationAdminConfigurationResponse extends CmsRespo
4500
4565
  types?: NotificationSendType[];
4501
4566
  }
4502
4567
 
4568
+ export declare type NotificationColors = typeof notificationColors;
4569
+
4570
+ /**
4571
+ * Colores del avatar de ícono de cada tarjeta del centro de notificaciones
4572
+ * (campanita del TopBar). `bg` = fondo del contenedor cuadrado; `on` =
4573
+ * color del ícono. Replican los del centro de notificaciones del diseño
4574
+ * (mockup "Gestión de Noticias"): temas asignados en azul (misma familia
4575
+ * secundaria), actividades por vencer en naranja y notificaciones de sistema
4576
+ * (videos) en verde. Semánticos y reutilizables por cualquier gestor.
4577
+ */
4578
+ export declare const notificationColors: {
4579
+ /** Temas asignados (azul): mismo contenedor secundario que los chips activos. */
4580
+ readonly assigned: {
4581
+ readonly bg: "#D8E2FF";
4582
+ readonly on: "#2C4678";
4583
+ };
4584
+ /** Actividades por vencer (naranja). El `on` se reutiliza para la fecha de vencimiento. */
4585
+ readonly pending: {
4586
+ readonly bg: "#FFE2D5";
4587
+ readonly on: "#B3300A";
4588
+ };
4589
+ /** Notificaciones del sistema / videos (verde). */
4590
+ readonly system: {
4591
+ readonly bg: "#DCEFE0";
4592
+ readonly on: "#11663B";
4593
+ };
4594
+ };
4595
+
4503
4596
  /** Topic devuelto por notification/adminConfiguration (`{ name, value }`). */
4504
4597
  export declare interface NotificationConfigTopic {
4505
4598
  name: string;
@@ -4542,13 +4635,21 @@ export declare interface NotificationsListResponse {
4542
4635
  total?: number;
4543
4636
  }
4544
4637
 
4545
- export declare function NotificationsMenu({ unreadCount, notifications, }: NotificationsMenuProps): JSX.Element;
4638
+ export declare function NotificationsMenu({ unreadCount, notificationsData, masterBaseUrl, currentPublicationId, gmtRedaction, }: NotificationsMenuProps): JSX.Element;
4546
4639
 
4547
4640
  export declare type NotificationsMenuMessageKey = keyof CmsMessages['notificationsMenu'];
4548
4641
 
4549
4642
  export declare type NotificationsMenuProps = {
4643
+ /** Total de no leídas (badge de la campanita). */
4550
4644
  unreadCount: number;
4551
- notifications: DashboardNotification[];
4645
+ /** Respuesta cruda de `POST /dashboard/notification` (newsTask/expireTask/videos). */
4646
+ notificationsData?: DashboardNotificationsResponse | null;
4647
+ /** Dominio de `master` (Angular) para la redirección de los temas. */
4648
+ masterBaseUrl?: string;
4649
+ /** Id de la publicación activa (fallback de la redirección). */
4650
+ currentPublicationId?: number | string;
4651
+ /** Offset GMT de la publicación (para mostrar las fechas en zona de redacción). */
4652
+ gmtRedaction?: string | null;
4552
4653
  };
4553
4654
 
4554
4655
  /** Topic devuelto por notification/topics (`{ name, description }`). */
@@ -5536,6 +5637,17 @@ export declare const ptMessages: {
5536
5637
  unreadCount: string;
5537
5638
  empty: string;
5538
5639
  ariaLabel: string;
5640
+ close: string;
5641
+ today: string;
5642
+ yesterday: string;
5643
+ assignedBefore: string;
5644
+ assignedAfter: string;
5645
+ pendingBefore: string;
5646
+ pendingAfter: string;
5647
+ assignedToday: string;
5648
+ assignedYesterday: string;
5649
+ assignedOn: string;
5650
+ expires: string;
5539
5651
  };
5540
5652
  search: {
5541
5653
  placeholder: string;
@@ -5960,7 +6072,7 @@ export declare interface SectionsGetResponse extends CmsResponse {
5960
6072
  * "Todos / Activos / Inactivos"), reutilizable desde cualquier app que consuma
5961
6073
  * la librería.
5962
6074
  */
5963
- export declare function SelectDropdown({ value, options, onChange, highlighted, showIcons, minWidth, disabled, placeholder, prefix, pinSelectedFirst, ariaLabel, testId, }: SelectDropdownProps): JSX.Element;
6075
+ export declare function SelectDropdown({ value, options, onChange, highlighted, showIcons, minWidth, disabled, placeholder, prefix, ariaLabel, testId, }: SelectDropdownProps): JSX.Element;
5964
6076
 
5965
6077
  export declare type SelectDropdownProps = {
5966
6078
  /** Valor seleccionado actualmente. */
@@ -5991,11 +6103,6 @@ export declare type SelectDropdownProps = {
5991
6103
  * normal y el valor seleccionado en negrita.
5992
6104
  */
5993
6105
  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
6106
  /** `aria-label` del disparador (accesibilidad). */
6000
6107
  ariaLabel?: string;
6001
6108
  /** Valor base para los `data-testid`. */
@@ -6017,6 +6124,13 @@ export declare type SelectOption = {
6017
6124
  label: ReactNode;
6018
6125
  /** Ícono opcional a la izquierda del label. */
6019
6126
  icon?: ReactNode;
6127
+ /**
6128
+ * Color del ícono de esta opción (en el disparador y en el menú). Acepta un
6129
+ * valor de variable del theme (`cmsColors.*`, `feedbackColors.*`) o un path
6130
+ * del tema MUI (p. ej. `'m3.onSurfaceVariant'`). Si se omite, el ícono usa el
6131
+ * gris por defecto (`m3.onSurfaceVariant`).
6132
+ */
6133
+ iconColor?: string;
6020
6134
  /** Si es `false` la opción no se renderiza. Por defecto `true`. */
6021
6135
  show?: boolean;
6022
6136
  };
@@ -6052,8 +6166,6 @@ export declare const SelectStyles: {
6052
6166
  * Peso normal incluso en la opción activa (la negrita vive en el trigger).
6053
6167
  */
6054
6168
  sxItem: (selected: boolean) => SxProps<Theme>;
6055
- /** Divisor entre la opción activa (fijada arriba) y el resto del listado. */
6056
- sxMenuDivider: SxProps<Theme>;
6057
6169
  };
6058
6170
 
6059
6171
  /** Sombras (elevaciones) reutilizables. */
@@ -6495,7 +6607,7 @@ export declare interface ToastOptions {
6495
6607
  /** Severidad visual de un toast. */
6496
6608
  export declare type ToastSeverity = 'success' | 'error' | 'warning' | 'info';
6497
6609
 
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;
6610
+ 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
6611
 
6500
6612
  export declare type TopBarMessageKey = keyof CmsMessages['topBar'];
6501
6613
 
@@ -6504,7 +6616,8 @@ export declare type TopBarProps = {
6504
6616
  sidebarOpen: boolean;
6505
6617
  onToggleSidebar: () => void;
6506
6618
  notificationUnreadCount: number;
6507
- notifications: DashboardNotification[];
6619
+ /** Respuesta cruda de `POST /dashboard/notification` (newsTask/expireTask/videos). */
6620
+ notificationsData?: DashboardNotificationsResponse | null;
6508
6621
  profile: ProfileGetResponse;
6509
6622
  primaryLogo: ReactNode;
6510
6623
  brandLogo?: ReactNode;