sass-cms-template-common 0.0.11 → 0.0.13
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 +111 -55
- package/dist/index.js +1448 -1418
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +82 -1
- package/dist/server.js +2 -2
- package/dist/{services-BLy9bEvH.js → services-DS4p6Tpl.js} +74 -59
- package/dist/services-DS4p6Tpl.js.map +1 -0
- package/package.json +1 -1
- package/dist/services-BLy9bEvH.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ 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, notificationsData,
|
|
38
|
+
export declare function AppShell({ pathname, sites, children, notificationUnreadCount, notificationsData, copilotSuggestionsHref, onEditorialSeeMore, onEditorialRemindLater, 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;
|
|
@@ -44,14 +44,12 @@ export declare type AppShellProps = {
|
|
|
44
44
|
notificationUnreadCount: number;
|
|
45
45
|
/** Respuesta cruda de `POST /dashboard/notification` (newsTask/expireTask/videos). */
|
|
46
46
|
notificationsData?: DashboardNotificationsResponse | null;
|
|
47
|
-
/**
|
|
48
|
-
editorialOpportunities?: EditorialOpportunity[];
|
|
49
|
-
/** Muestra la card de oportunidades editoriales copilot. Por defecto `true`. */
|
|
50
|
-
showEditorialOpportunities?: boolean;
|
|
51
|
-
/** URL del gestor de sugerencias copilot para el "Ver más" (enlace real). */
|
|
47
|
+
/** Destino del "Ver más" / clic en una oportunidad copilot (página de sugerencias). */
|
|
52
48
|
copilotSuggestionsHref?: string;
|
|
53
49
|
/** Clic en "Ver más" cuando no hay `copilotSuggestionsHref` (fallback). */
|
|
54
50
|
onEditorialSeeMore?: () => void;
|
|
51
|
+
/** "Recordar luego": recibe los `opportunity_id` mostrados para el snooze. */
|
|
52
|
+
onEditorialRemindLater?: (opportunityIds: string[]) => void;
|
|
55
53
|
profile: ProfileGetResponse;
|
|
56
54
|
primaryLogo: ReactNode;
|
|
57
55
|
brandLogo?: ReactNode;
|
|
@@ -919,7 +917,11 @@ export declare type CmsConfirmDialogProps = {
|
|
|
919
917
|
minHeight?: number | string;
|
|
920
918
|
/** Evita cerrar al hacer clic fuera o con Escape (p. ej. mientras carga). */
|
|
921
919
|
disableBackdropClose?: boolean;
|
|
922
|
-
/**
|
|
920
|
+
/**
|
|
921
|
+
* Base para los `data-testid`. Emite: `${testId}` (modal),
|
|
922
|
+
* `${testId}-icon-btn-close` (botón X), `${testId}-actions` (fila de botones)
|
|
923
|
+
* y los botones `${testId}-actions-btn-cancel` y `${testId}-actions-btn-confirm`.
|
|
924
|
+
*/
|
|
923
925
|
testId?: string;
|
|
924
926
|
};
|
|
925
927
|
|
|
@@ -977,6 +979,13 @@ export declare class CmsCopilotServices {
|
|
|
977
979
|
* oportunidad: `save` | `like` | `dislike` | `assign` (permiso COPILOT_ACTION).
|
|
978
980
|
*/
|
|
979
981
|
executeAction: (input: CopilotActionInput) => Promise<CopilotActionResponse>;
|
|
982
|
+
/**
|
|
983
|
+
* POST /copilot/snooze — "recordar luego" de una oportunidad de la campanita
|
|
984
|
+
* (permiso COPILOT_VIEW). La oportunidad desaparece de la campanita para el
|
|
985
|
+
* usuario y reaparece sola al vencer el plazo configurado.
|
|
986
|
+
* @param opportunityId - Id de la oportunidad a posponer.
|
|
987
|
+
*/
|
|
988
|
+
snooze: (opportunityId: string) => Promise<CopilotSnoozeResponse>;
|
|
980
989
|
}
|
|
981
990
|
|
|
982
991
|
/**
|
|
@@ -1052,7 +1061,11 @@ export declare type CmsDialogActionsProps = {
|
|
|
1052
1061
|
fullWidth?: boolean;
|
|
1053
1062
|
/** Alineación horizontal de los botones. Por defecto `end`. */
|
|
1054
1063
|
align?: CmsDialogActionsAlign;
|
|
1055
|
-
/**
|
|
1064
|
+
/**
|
|
1065
|
+
* Base para los `data-testid`. El contenedor usa `testId`; el botón cancelar
|
|
1066
|
+
* emite `${testId}-btn-cancel` y el de confirmar `${testId}-btn-confirm`
|
|
1067
|
+
* (cada uno con su `data-action` `cancel` / `confirm` como atributo extra).
|
|
1068
|
+
*/
|
|
1056
1069
|
testId?: string;
|
|
1057
1070
|
};
|
|
1058
1071
|
|
|
@@ -2675,7 +2688,8 @@ export declare interface CopilotOpportunitiesResponse extends CmsResponse {
|
|
|
2675
2688
|
*
|
|
2676
2689
|
* La doc del gateway lista `id`, `topic` y `created_at`, pero el microservicio
|
|
2677
2690
|
* (observado en dev) puede omitirlos: solo `title`, `status` y `score` están
|
|
2678
|
-
* garantizados. El consumidor debe tolerar los faltantes.
|
|
2691
|
+
* garantizados. El consumidor debe tolerar los faltantes. En dev (2026-07-06) el
|
|
2692
|
+
* micro también entrega `source`, `type`, `reasons` e `is_followed`.
|
|
2679
2693
|
*/
|
|
2680
2694
|
export declare interface CopilotOpportunity {
|
|
2681
2695
|
id?: string;
|
|
@@ -2687,8 +2701,23 @@ export declare interface CopilotOpportunity {
|
|
|
2687
2701
|
score?: number;
|
|
2688
2702
|
/** Fecha de creación (ISO 8601, p. ej. "2026-06-26T10:15:00Z"). */
|
|
2689
2703
|
created_at?: string;
|
|
2704
|
+
/** Fuente detectada (p. ej. "rss"). Verificado en dev 2026-07-06. */
|
|
2705
|
+
source?: CopilotOpportunitySource;
|
|
2706
|
+
/** Subtipo de match del micro (p. ej. "rss_match"). */
|
|
2707
|
+
type?: string;
|
|
2708
|
+
/** Motivos por los que el micro la propuso (para tooltip/detalle). */
|
|
2709
|
+
reasons?: string[];
|
|
2710
|
+
/** Si el editor ya la siguió/guardó (acción "save" de `copilot/actions`). */
|
|
2711
|
+
is_followed?: boolean;
|
|
2690
2712
|
}
|
|
2691
2713
|
|
|
2714
|
+
/**
|
|
2715
|
+
* Fuente de la que el microservicio detectó la oportunidad. Valor observado en
|
|
2716
|
+
* dev hoy: `"rss"`. Se deja abierto (passthrough) para no romper cuando el micro
|
|
2717
|
+
* agregue fuentes nuevas.
|
|
2718
|
+
*/
|
|
2719
|
+
declare type CopilotOpportunitySource = 'rss' | 'gtrends' | 'sconsole' | 'x' | (string & {});
|
|
2720
|
+
|
|
2692
2721
|
/**
|
|
2693
2722
|
* Estado de una oportunidad tal como lo entrega el microservicio (passthrough).
|
|
2694
2723
|
* El único valor documentado hoy es `"open"`; se deja abierto para no romper
|
|
@@ -2696,6 +2725,18 @@ export declare interface CopilotOpportunity {
|
|
|
2696
2725
|
*/
|
|
2697
2726
|
export declare type CopilotOpportunityStatus = 'open' | (string & {});
|
|
2698
2727
|
|
|
2728
|
+
/**
|
|
2729
|
+
* Cuerpo de la respuesta de POST /copilot/snooze (NAA-4645). El "recordar luego"
|
|
2730
|
+
* de la campanita: la oportunidad se oculta para ese usuario y reaparece sola al
|
|
2731
|
+
* vencer el plazo configurado.
|
|
2732
|
+
*/
|
|
2733
|
+
export declare interface CopilotSnoozeResponse extends CmsResponse {
|
|
2734
|
+
copilotEnabled?: boolean;
|
|
2735
|
+
opportunity_id?: string;
|
|
2736
|
+
/** Momento hasta el cual la oportunidad queda oculta (ISO 8601 o epoch). */
|
|
2737
|
+
snoozed_until?: string | number;
|
|
2738
|
+
}
|
|
2739
|
+
|
|
2699
2740
|
/** POST /dashboard/countNotificatio */
|
|
2700
2741
|
export declare interface CountNotificationsResponse {
|
|
2701
2742
|
status: string;
|
|
@@ -2736,10 +2777,32 @@ export declare interface CurrentUserPhotoProviderProps {
|
|
|
2736
2777
|
children: ReactNode;
|
|
2737
2778
|
}
|
|
2738
2779
|
|
|
2780
|
+
/**
|
|
2781
|
+
* Oportunidad editorial copilot presente en POST /dashboard/notification
|
|
2782
|
+
* (NAA-4645). El back manda hasta 3, ordenadas por `score` desc, y solo si hay.
|
|
2783
|
+
*/
|
|
2784
|
+
export declare interface DashboardCopilotOpportunity {
|
|
2785
|
+
/** Id de la oportunidad (opportunity_id, requerido para el snooze). */
|
|
2786
|
+
id?: string;
|
|
2787
|
+
title: string;
|
|
2788
|
+
/** Tema/categoría de la oportunidad. */
|
|
2789
|
+
topic?: string;
|
|
2790
|
+
/** Puntaje de coincidencia editorial (0-100). */
|
|
2791
|
+
score?: number;
|
|
2792
|
+
/** Fecha de creación (ISO 8601, p. ej. "2026-06-26T10:15:00Z"). */
|
|
2793
|
+
created_at?: string;
|
|
2794
|
+
isRead?: boolean;
|
|
2795
|
+
}
|
|
2796
|
+
|
|
2739
2797
|
/** Cuerpo de la respuesta de POST /dashboard/countNotifications. */
|
|
2740
2798
|
export declare interface DashboardCountNotificationsResponse extends CmsResponse {
|
|
2741
2799
|
/** Total de notificaciones no leídas del usuario autenticado. */
|
|
2742
2800
|
unreadNotifications?: number;
|
|
2801
|
+
/**
|
|
2802
|
+
* Oportunidades copilot no leídas (NAA-4645). Ya está **sumado** dentro de
|
|
2803
|
+
* `unreadNotifications`; solo aparece si copilot aplica al usuario/publicación.
|
|
2804
|
+
*/
|
|
2805
|
+
copilotOpportunities?: number;
|
|
2743
2806
|
}
|
|
2744
2807
|
|
|
2745
2808
|
/** Actividad vencida o por vencer presente en POST /dashboard/notification. */
|
|
@@ -2784,6 +2847,8 @@ export declare interface DashboardNotificationsResponse extends CmsResponse {
|
|
|
2784
2847
|
newsTask?: DashboardNewsTask[];
|
|
2785
2848
|
/** Actividades vencidas o por vencer. */
|
|
2786
2849
|
expireTask?: DashboardExpireTask[];
|
|
2850
|
+
/** Oportunidades editoriales copilot (hasta 3, por `score` desc). NAA-4645. */
|
|
2851
|
+
copilot?: DashboardCopilotOpportunity[];
|
|
2787
2852
|
}
|
|
2788
2853
|
|
|
2789
2854
|
/** Evento de encoder de video presente en POST /dashboard/notification. */
|
|
@@ -2910,25 +2975,6 @@ export declare type DropdownOption = {
|
|
|
2910
2975
|
testId?: string;
|
|
2911
2976
|
};
|
|
2912
2977
|
|
|
2913
|
-
/**
|
|
2914
|
-
* Oportunidad editorial de un tema copilot (fuente de la card de la campanita).
|
|
2915
|
-
* Misma forma que el `getCopilotOpportunities()` del CMS Angular (NAA-4645): hoy
|
|
2916
|
-
* datos quemados; cuando el back libere el bloque en el WS de notificaciones se
|
|
2917
|
-
* reemplaza la fuente manteniendo esta forma.
|
|
2918
|
-
*/
|
|
2919
|
-
export declare interface EditorialOpportunity {
|
|
2920
|
-
id: number | string;
|
|
2921
|
-
title: string;
|
|
2922
|
-
/** % de coincidencia con la línea editorial. */
|
|
2923
|
-
match: number;
|
|
2924
|
-
trending: boolean;
|
|
2925
|
-
isRead: boolean;
|
|
2926
|
-
/** Momento de entrega (epoch ms), como `{ time }` o número. */
|
|
2927
|
-
timeStamp?: {
|
|
2928
|
-
time: number;
|
|
2929
|
-
} | number | null;
|
|
2930
|
-
}
|
|
2931
|
-
|
|
2932
2978
|
export declare type EditorialOpportunityColors = typeof editorialOpportunityColors;
|
|
2933
2979
|
|
|
2934
2980
|
export declare const editorialOpportunityColors: Record<"accent" | "text" | "topicBg" | "topicBorder" | "trending", string>;
|
|
@@ -3694,15 +3740,6 @@ export declare function getDefaultPublicationSlug(sites: SiteSection[]): string;
|
|
|
3694
3740
|
/** BCP 47 tag for `Intl` / `toLocaleString` formatting. */
|
|
3695
3741
|
export declare function getIntlLocaleTag(locale: Locale): string;
|
|
3696
3742
|
|
|
3697
|
-
/**
|
|
3698
|
-
* Oportunidades editoriales copilot QUEMADAS temporales (NAA-4837). El back aún
|
|
3699
|
-
* no envía este bloque; cuando lo haga, el gestor pasa las oportunidades reales
|
|
3700
|
-
* por la prop `editorialOpportunities` y este mock se elimina.
|
|
3701
|
-
*
|
|
3702
|
-
* @param now Instante actual (epoch ms) usado como hora de entrega de las cards.
|
|
3703
|
-
*/
|
|
3704
|
-
export declare function getMockCopilotOpportunities(now: number): EditorialOpportunity[];
|
|
3705
|
-
|
|
3706
3743
|
export declare function getProfileAvatarSrc(profile: ProfileGetResponse, options?: ProfileAvatarOptions): string;
|
|
3707
3744
|
|
|
3708
3745
|
export declare function getProfileDisplayName(profile: ProfileGetResponse): string;
|
|
@@ -4860,7 +4897,7 @@ export declare interface NotificationsListResponse {
|
|
|
4860
4897
|
total?: number;
|
|
4861
4898
|
}
|
|
4862
4899
|
|
|
4863
|
-
export declare function NotificationsMenu({ unreadCount, notificationsData, masterBaseUrl, currentPublicationId, gmtRedaction,
|
|
4900
|
+
export declare function NotificationsMenu({ unreadCount, notificationsData, masterBaseUrl, currentPublicationId, gmtRedaction, copilotSuggestionsHref, onEditorialSeeMore, onEditorialRemindLater, }: NotificationsMenuProps): JSX.Element;
|
|
4864
4901
|
|
|
4865
4902
|
export declare type NotificationsMenuMessageKey = keyof CmsMessages['notificationsMenu'];
|
|
4866
4903
|
|
|
@@ -4876,21 +4913,20 @@ export declare type NotificationsMenuProps = {
|
|
|
4876
4913
|
/** Offset GMT de la publicación (para mostrar las fechas en zona de redacción). */
|
|
4877
4914
|
gmtRedaction?: string | null;
|
|
4878
4915
|
/**
|
|
4879
|
-
*
|
|
4880
|
-
*
|
|
4881
|
-
*
|
|
4882
|
-
|
|
4883
|
-
editorialOpportunities?: EditorialOpportunity[];
|
|
4884
|
-
/** Muestra la card de oportunidades editoriales copilot. Por defecto `true`. */
|
|
4885
|
-
showEditorialOpportunities?: boolean;
|
|
4886
|
-
/**
|
|
4887
|
-
* URL del gestor de sugerencias copilot para el "Ver más" de la card. La arma
|
|
4888
|
-
* el gestor con su deploy (env) + la publicación actual; si se pasa, el "Ver
|
|
4889
|
-
* más" es un enlace real (nueva pestaña). Si no, cae al callback.
|
|
4916
|
+
* Destino del "Ver más" / clic en una oportunidad copilot (página de
|
|
4917
|
+
* sugerencias). Lo arma el gestor: URL absoluta al deploy de sugerencias
|
|
4918
|
+
* (env) si estás en otro gestor → abre en pestaña nueva; ruta relativa si ya
|
|
4919
|
+
* estás en el gestor de sugerencias → navega en la misma. Sin valor, cae al callback.
|
|
4890
4920
|
*/
|
|
4891
4921
|
copilotSuggestionsHref?: string;
|
|
4892
4922
|
/** Clic en "Ver más" cuando no hay `copilotSuggestionsHref` (fallback). */
|
|
4893
4923
|
onEditorialSeeMore?: () => void;
|
|
4924
|
+
/**
|
|
4925
|
+
* "Recordar luego" de la card de oportunidades: recibe los `opportunity_id` de
|
|
4926
|
+
* las oportunidades mostradas para que el gestor dispare `copilot/snooze` por
|
|
4927
|
+
* cada una. La card se oculta de inmediato (optimista).
|
|
4928
|
+
*/
|
|
4929
|
+
onEditorialRemindLater?: (opportunityIds: string[]) => void;
|
|
4894
4930
|
};
|
|
4895
4931
|
|
|
4896
4932
|
/** Topic devuelto por notification/topics (`{ name, description }`). */
|
|
@@ -6869,7 +6905,7 @@ export declare interface ToastOptions {
|
|
|
6869
6905
|
/** Severidad visual de un toast. */
|
|
6870
6906
|
export declare type ToastSeverity = 'success' | 'error' | 'warning' | 'info';
|
|
6871
6907
|
|
|
6872
|
-
export declare function TopBar({ sites, sidebarOpen, onToggleSidebar, notificationUnreadCount, notificationsData,
|
|
6908
|
+
export declare function TopBar({ sites, sidebarOpen, onToggleSidebar, notificationUnreadCount, notificationsData, copilotSuggestionsHref, onEditorialSeeMore, onEditorialRemindLater, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, newContentGroups, previewFormats, operationPermissions, isAdmin, onNewContentSelect, onPreviewSelect, }: TopBarProps): JSX.Element;
|
|
6873
6909
|
|
|
6874
6910
|
export declare type TopBarMessageKey = keyof CmsMessages['topBar'];
|
|
6875
6911
|
|
|
@@ -6881,14 +6917,12 @@ export declare type TopBarProps = {
|
|
|
6881
6917
|
notificationUnreadCount: number;
|
|
6882
6918
|
/** Respuesta cruda de `POST /dashboard/notification` (newsTask/expireTask/videos). */
|
|
6883
6919
|
notificationsData?: DashboardNotificationsResponse | null;
|
|
6884
|
-
/**
|
|
6885
|
-
editorialOpportunities?: EditorialOpportunity[];
|
|
6886
|
-
/** Muestra la card de oportunidades editoriales copilot. Por defecto `true`. */
|
|
6887
|
-
showEditorialOpportunities?: boolean;
|
|
6888
|
-
/** URL del gestor de sugerencias copilot para el "Ver más" (enlace real). */
|
|
6920
|
+
/** Destino del "Ver más" / clic en una oportunidad copilot (página de sugerencias). */
|
|
6889
6921
|
copilotSuggestionsHref?: string;
|
|
6890
6922
|
/** Clic en "Ver más" cuando no hay `copilotSuggestionsHref` (fallback). */
|
|
6891
6923
|
onEditorialSeeMore?: () => void;
|
|
6924
|
+
/** "Recordar luego": recibe los `opportunity_id` mostrados para el snooze. */
|
|
6925
|
+
onEditorialRemindLater?: (opportunityIds: string[]) => void;
|
|
6892
6926
|
profile: ProfileGetResponse;
|
|
6893
6927
|
primaryLogo: ReactNode;
|
|
6894
6928
|
brandLogo?: ReactNode;
|
|
@@ -6937,6 +6971,28 @@ export declare type TopBarProps = {
|
|
|
6937
6971
|
*/
|
|
6938
6972
|
export declare function toSiteWallClock(epochMs: number, gmtRedaction: string | null | undefined): number;
|
|
6939
6973
|
|
|
6974
|
+
/**
|
|
6975
|
+
* Normaliza un valor a un `data-testid` estable en kebab-case ASCII.
|
|
6976
|
+
*
|
|
6977
|
+
* Equivalente React del pipe `toTestId` del CMS Angular (`cmsmedios-ux`):
|
|
6978
|
+
* pasa a minúsculas, quita tildes/acentos y convierte cualquier separador
|
|
6979
|
+
* (espacios, puntos, guiones bajos, barras) en un único guion.
|
|
6980
|
+
*
|
|
6981
|
+
* IMPORTANTE: el valor que se le pasa debe ser **independiente del idioma**
|
|
6982
|
+
* (una clave i18n, un `id`/`value`/`slug`, un código o enum interno), nunca el
|
|
6983
|
+
* texto traducido: si no, el `data-testid` cambiaría según el idioma del usuario
|
|
6984
|
+
* y las pruebas no podrían apuntarlo de forma estable.
|
|
6985
|
+
*
|
|
6986
|
+
* @param value Valor de origen (clave i18n, id, código o índice).
|
|
6987
|
+
* @returns El `data-testid` normalizado, o `''` si el valor es vacío/nulo.
|
|
6988
|
+
*
|
|
6989
|
+
* @example
|
|
6990
|
+
* toTestId('modal.deactivate.title') // 'modal-deactivate-title'
|
|
6991
|
+
* toTestId('Próximo evento') // 'proximo-evento'
|
|
6992
|
+
* toTestId(3) // '3'
|
|
6993
|
+
*/
|
|
6994
|
+
export declare function toTestId(value: string | number | null | undefined): string;
|
|
6995
|
+
|
|
6940
6996
|
/**
|
|
6941
6997
|
* Cuerpo de la respuesta de POST /transcribe/get.
|
|
6942
6998
|
*
|