sass-cms-template-common 0.0.20 → 0.0.21
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 +34 -9
- package/dist/index.js +945 -900
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes } from 'react';
|
|
2
2
|
import { AxiosInstance } from 'axios';
|
|
3
3
|
import { Context } from 'react';
|
|
4
|
+
import { CSSProperties } from 'react';
|
|
4
5
|
import { ElementType } from 'react';
|
|
5
6
|
import { ForwardRefExoticComponent } from 'react';
|
|
6
7
|
import { JSX } from 'react';
|
|
@@ -42,7 +43,7 @@ export declare type AppMessageNode = string | {
|
|
|
42
43
|
/** Árbol de mensajes del gestor (namespaces → claves → string anidable). */
|
|
43
44
|
export declare type AppMessages = Record<string, AppMessageNode>;
|
|
44
45
|
|
|
45
|
-
export declare function AppShell({ pathname, sites, children, notificationUnreadCount, notificationsData, copilotSuggestionsHref, onEditorialSeeMore, onEditorialRemindLater, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, previewFormats, operationPermissions, isAdmin, onPreviewSelect, LinkComponent, permissions, locale, language, messages, appMessages, baseUrl, profileServices, }: AppShellProps): JSX.Element;
|
|
46
|
+
export declare function AppShell({ pathname, sites, children, notificationUnreadCount, notificationsData, copilotSuggestionsHref, onEditorialSeeMore, onEditorialRemindLater, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, previewFormats, operationPermissions, isAdmin, onPreviewSelect, showAppearanceMenu, LinkComponent, permissions, navHrefOverrides, locale, language, messages, appMessages, baseUrl, profileServices, }: AppShellProps): JSX.Element;
|
|
46
47
|
|
|
47
48
|
export declare type AppShellProps = {
|
|
48
49
|
pathname: string;
|
|
@@ -80,8 +81,19 @@ export declare type AppShellProps = {
|
|
|
80
81
|
isAdmin?: boolean;
|
|
81
82
|
/** Integración: clic en un formato de previsualización (recibe su `id`). */
|
|
82
83
|
onPreviewSelect?: (formatId: string) => void;
|
|
84
|
+
/** Muestra el menú "Apariencia" (claro/oscuro) del TopBar. Por defecto `true`. */
|
|
85
|
+
showAppearanceMenu?: boolean;
|
|
83
86
|
LinkComponent?: CmsLinkComponent;
|
|
84
87
|
permissions: Array<NavItemPermissions>;
|
|
88
|
+
/**
|
|
89
|
+
* Override de destino por `module` del sidebar, para los ítems que representan
|
|
90
|
+
* a un gestor del ecosistema. El gestor manda su propio ítem a `/` (home) y el
|
|
91
|
+
* del gestor hermano al dominio de su deploy (misma pestaña, redirección real).
|
|
92
|
+
* Gestor de usuarios: `{ USERS: '/', COPILOT: <deploy sugerencias> }`; gestor
|
|
93
|
+
* de sugerencias: `{ COPILOT: '/', USERS: <deploy usuarios> }`. Un valor vacío
|
|
94
|
+
* se ignora (navegación interna normal). Ver `resolveNavHrefOverride`.
|
|
95
|
+
*/
|
|
96
|
+
navHrefOverrides?: Record<string, string>;
|
|
85
97
|
locale?: Locale | string;
|
|
86
98
|
/** Alias de `locale`. */
|
|
87
99
|
language?: Locale | string;
|
|
@@ -1495,7 +1507,9 @@ export declare type CmsNetworkState = 'online' | 'offline';
|
|
|
1495
1507
|
* globales, replicando el Angular legacy:
|
|
1496
1508
|
*
|
|
1497
1509
|
* - Al perder internet → toast de error "sin conexión" (no se autocierra).
|
|
1498
|
-
* - Al recuperarla → cierra el anterior
|
|
1510
|
+
* - Al recuperarla → cierra el anterior. No muestra "conexión restablecida":
|
|
1511
|
+
* era redundante (el toast "reintentando" de `useResilientAction` y el de
|
|
1512
|
+
* éxito de la acción ya evidencian que se reanudó) y apilaba toasts.
|
|
1499
1513
|
*
|
|
1500
1514
|
* Se monta una sola vez, dentro de `CmsNetworkProvider` + `CmsToastProvider`.
|
|
1501
1515
|
* El reintento y "reanudar el llamado" por acción los maneja
|
|
@@ -2294,7 +2308,7 @@ export declare type CmsTextFieldProps = {
|
|
|
2294
2308
|
testId?: string;
|
|
2295
2309
|
};
|
|
2296
2310
|
|
|
2297
|
-
export declare
|
|
2311
|
+
export declare const CmsToast: ForwardRefExoticComponent<CmsToastProps & RefAttributes<HTMLDivElement>>;
|
|
2298
2312
|
|
|
2299
2313
|
export declare interface CmsToastApi {
|
|
2300
2314
|
/** Toast de éxito (verde). */
|
|
@@ -2339,6 +2353,11 @@ export declare interface CmsToastProps {
|
|
|
2339
2353
|
/** Versión a mostrar en el detalle del error (app o lib). */
|
|
2340
2354
|
appVersion: string;
|
|
2341
2355
|
onClose: (id: string) => void;
|
|
2356
|
+
/**
|
|
2357
|
+
* Estilos inline que inyecta la transición (`Slide` de MUI) para animar la
|
|
2358
|
+
* entrada/salida del toast. Se aplican al nodo raíz.
|
|
2359
|
+
*/
|
|
2360
|
+
style?: CSSProperties;
|
|
2342
2361
|
}
|
|
2343
2362
|
|
|
2344
2363
|
/**
|
|
@@ -3480,7 +3499,6 @@ export declare const enMessages: {
|
|
|
3480
3499
|
readonly network: {
|
|
3481
3500
|
readonly disconnected: "No connection. Check your network or Wi-Fi status. We will retry when the connection is restored.";
|
|
3482
3501
|
readonly retrying: "Retrying requests.";
|
|
3483
|
-
readonly restored: "Connection restored.";
|
|
3484
3502
|
};
|
|
3485
3503
|
readonly userAvatar: {
|
|
3486
3504
|
readonly alt: "User avatar";
|
|
@@ -3707,7 +3725,6 @@ export declare const esMessages: {
|
|
|
3707
3725
|
network: {
|
|
3708
3726
|
disconnected: string;
|
|
3709
3727
|
retrying: string;
|
|
3710
|
-
restored: string;
|
|
3711
3728
|
};
|
|
3712
3729
|
userAvatar: {
|
|
3713
3730
|
alt: string;
|
|
@@ -6444,7 +6461,6 @@ export declare const ptMessages: {
|
|
|
6444
6461
|
network: {
|
|
6445
6462
|
disconnected: string;
|
|
6446
6463
|
retrying: string;
|
|
6447
|
-
restored: string;
|
|
6448
6464
|
};
|
|
6449
6465
|
userAvatar: {
|
|
6450
6466
|
alt: string;
|
|
@@ -6969,7 +6985,7 @@ export declare const shadows: {
|
|
|
6969
6985
|
readonly flyout: "0 6px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.10)";
|
|
6970
6986
|
};
|
|
6971
6987
|
|
|
6972
|
-
export declare function Sidebar({ open, pathname, permissions, LinkComponent, legacyBaseUrl, selectedPublicationId, }: SidebarProps): JSX.Element;
|
|
6988
|
+
export declare function Sidebar({ open, pathname, permissions, LinkComponent, legacyBaseUrl, selectedPublicationId, navHrefOverrides, }: SidebarProps): JSX.Element;
|
|
6973
6989
|
|
|
6974
6990
|
export declare type SidebarMessageKey = keyof CmsMessages['sidebar'];
|
|
6975
6991
|
|
|
@@ -6981,6 +6997,8 @@ export declare type SidebarProps = {
|
|
|
6981
6997
|
/** Dominio del admin legacy (JSP/Angular) para prefijar hrefs con `item.legacy`. */
|
|
6982
6998
|
legacyBaseUrl?: string;
|
|
6983
6999
|
selectedPublicationId: string;
|
|
7000
|
+
/** Override de destino por `module` (home `/` o dominio del gestor hermano). Ver `resolveNavHrefOverride`. */
|
|
7001
|
+
navHrefOverrides?: Record<string, string>;
|
|
6984
7002
|
};
|
|
6985
7003
|
|
|
6986
7004
|
/**
|
|
@@ -6990,7 +7008,7 @@ export declare type SidebarProps = {
|
|
|
6990
7008
|
* todo. El anclado se identifica por `item.module` y persiste vía
|
|
6991
7009
|
* `profileServices.addPins`/`deletePins`/`getPins` (recurso de perfil).
|
|
6992
7010
|
*/
|
|
6993
|
-
export declare function SidebarRail({ pathname, permissions, LinkComponent, legacyBaseUrl, cmsBaseUrl, legacySession, selectedPublicationId, items, profileServices, }: SidebarRailProps): JSX.Element;
|
|
7011
|
+
export declare function SidebarRail({ pathname, permissions, LinkComponent, legacyBaseUrl, cmsBaseUrl, legacySession, selectedPublicationId, navHrefOverrides, items, profileServices, }: SidebarRailProps): JSX.Element;
|
|
6994
7012
|
|
|
6995
7013
|
/** Servicio de pines usado por el rail: solo necesita estos tres métodos. */
|
|
6996
7014
|
export declare type SidebarRailPinService = Pick<CmsProfileServices, 'addPins' | 'deletePins' | 'getPins'>;
|
|
@@ -7007,6 +7025,11 @@ export declare type SidebarRailProps = {
|
|
|
7007
7025
|
legacySession?: LegacyAdminSession;
|
|
7008
7026
|
/** Id de publicación activa; se agrega a los ítems legacy con `appendPublicationId`. */
|
|
7009
7027
|
selectedPublicationId?: string;
|
|
7028
|
+
/**
|
|
7029
|
+
* Override de destino por `module` (home `/` para el propio gestor, dominio del
|
|
7030
|
+
* gestor hermano para el ajeno). Misma pestaña. Ver `resolveNavHrefOverride`.
|
|
7031
|
+
*/
|
|
7032
|
+
navHrefOverrides?: Record<string, string>;
|
|
7010
7033
|
/** Ítems de navegación. Por defecto, `ACCOUNT_NAV_BLOCKS`. */
|
|
7011
7034
|
items?: NavLinkItem[];
|
|
7012
7035
|
/**
|
|
@@ -7428,7 +7451,7 @@ export declare interface ToastOptions {
|
|
|
7428
7451
|
/** Severidad visual de un toast. */
|
|
7429
7452
|
export declare type ToastSeverity = 'success' | 'error' | 'warning' | 'info';
|
|
7430
7453
|
|
|
7431
|
-
export declare function TopBar({ sites, sidebarOpen, onToggleSidebar, notificationUnreadCount, notificationsData, copilotSuggestionsHref, onEditorialSeeMore, onEditorialRemindLater, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, previewFormats, operationPermissions, isAdmin, onPreviewSelect, }: TopBarProps): JSX.Element;
|
|
7454
|
+
export declare function TopBar({ sites, sidebarOpen, onToggleSidebar, notificationUnreadCount, notificationsData, copilotSuggestionsHref, onEditorialSeeMore, onEditorialRemindLater, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, previewFormats, operationPermissions, isAdmin, onPreviewSelect, showAppearanceMenu, }: TopBarProps): JSX.Element;
|
|
7432
7455
|
|
|
7433
7456
|
export declare type TopBarMessageKey = keyof CmsMessages['topBar'];
|
|
7434
7457
|
|
|
@@ -7477,6 +7500,8 @@ export declare type TopBarProps = {
|
|
|
7477
7500
|
isAdmin?: boolean;
|
|
7478
7501
|
/** Integración: clic en un formato de previsualización (recibe su `id`). */
|
|
7479
7502
|
onPreviewSelect?: (formatId: string) => void;
|
|
7503
|
+
/** Muestra el menú "Apariencia" (claro/oscuro). Por defecto `true`. */
|
|
7504
|
+
showAppearanceMenu?: boolean;
|
|
7480
7505
|
};
|
|
7481
7506
|
|
|
7482
7507
|
/**
|