sass-cms-template-common 0.0.33 → 0.0.35

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
@@ -1154,17 +1154,17 @@ export declare type CmsEmptyStateProps = {
1154
1154
 
1155
1155
  /**
1156
1156
  * Página de error compartida por todos los gestores (mecanismo en la lib).
1157
- * Replica la de cmsmedios: ilustración + título + subtítulo + botón HOME, y en
1158
- * el 404 la línea "Error 404. Copiar detalle." que copia la URL al portapapeles.
1159
- * Los textos salen del i18n de la lib (namespace `errorPage`, es/en/pt), así que
1160
- * ningún gestor los duplica.
1157
+ * Header propio (logo + Apariencia) + ilustración/texto centrados + footer,
1158
+ * con la tarjeta "Detalle del error" copiable (Código, Usuario en el 403,
1159
+ * Dirección y Fecha). Los textos salen del i18n de la lib (namespace
1160
+ * `errorPage`, es/en/pt), así que ningún gestor los duplica.
1161
1161
  */
1162
- export declare function CmsErrorPage({ variant, homeHref, LinkComponent, illustrationSrc, }: CmsErrorPageProps): JSX.Element;
1162
+ export declare function CmsErrorPage({ variant, homeHref, LinkComponent, illustrationSrc, logo, userEmail, changeAccountHref, supportEmail, }: CmsErrorPageProps): JSX.Element;
1163
1163
 
1164
1164
  export declare type CmsErrorPageProps = {
1165
1165
  /** Tipo de error a mostrar. */
1166
1166
  variant: CmsErrorPageVariant;
1167
- /** Destino del botón HOME. Por defecto la raíz del gestor (`/`). */
1167
+ /** Destino del botón "Ir al gestor". Por defecto la raíz del gestor (`/`). */
1168
1168
  homeHref?: string;
1169
1169
  /** Componente de enlace del host (p. ej. `next/link`). Por defecto un `<a>`. */
1170
1170
  LinkComponent?: CmsLinkComponent;
@@ -1173,6 +1173,18 @@ export declare type CmsErrorPageProps = {
1173
1173
  * `/errors/notfound.png` o `/errors/not-allowed.png` según la variante.
1174
1174
  */
1175
1175
  illustrationSrc?: string;
1176
+ /** Logo de marca del gestor, mostrado en el header propio de la página. */
1177
+ logo?: ReactNode;
1178
+ /**
1179
+ * Email del usuario logueado. Solo se usa en `variant="not-allowed"`: alimenta
1180
+ * la fila "Usuario" de la tarjeta de detalle y el pie "Sesión iniciada como…".
1181
+ * Sin este dato esas dos piezas no se muestran.
1182
+ */
1183
+ userEmail?: string;
1184
+ /** Destino de "Cambiar de cuenta" (403). Por defecto `/logout`. */
1185
+ changeAccountHref?: string;
1186
+ /** Email de soporte para el hint del 404. Por defecto `soporte@bluestack.la`. */
1187
+ supportEmail?: string;
1176
1188
  };
1177
1189
 
1178
1190
  /** Variante de error a mostrar: 404 (no encontrado) o sin permisos. */
@@ -1289,7 +1301,7 @@ export declare class CmsGeneralServices {
1289
1301
  updateCDN: (path: string) => Promise<CmsResponse>;
1290
1302
  }
1291
1303
 
1292
- export declare function CmsI18nProvider({ locale, language, messages, catalog, appMessages, children, }: CmsI18nProviderProps): JSX.Element;
1304
+ export declare function CmsI18nProvider({ locale, language, messages, catalog, appMessages, syncDocumentLang, children, }: CmsI18nProviderProps): JSX.Element;
1293
1305
 
1294
1306
  export declare type CmsI18nProviderProps = {
1295
1307
  locale?: Locale | string;
@@ -1299,6 +1311,12 @@ export declare type CmsI18nProviderProps = {
1299
1311
  catalog?: LocaleCatalog;
1300
1312
  /** Catálogo de mensajes propio del gestor (namespaces libres, es/en/pt). */
1301
1313
  appMessages?: AppLocaleCatalog;
1314
+ /**
1315
+ * Mantiene el atributo `lang` del <html> en sincronía con el idioma activo
1316
+ * (NAA-5169). Por defecto `true`. Se pone en `false` en un provider anidado,
1317
+ * para que solo el del ámbito de la página escriba el idioma del documento.
1318
+ */
1319
+ syncDocumentLang?: boolean;
1302
1320
  children: ReactNode;
1303
1321
  };
1304
1322
 
@@ -3605,7 +3623,7 @@ export declare const enMessages: {
3605
3623
  readonly defaultInfo: "Information";
3606
3624
  };
3607
3625
  readonly network: {
3608
- readonly disconnected: "No connection. Check your network or Wi-Fi status. We will retry when the connection is restored.";
3626
+ readonly disconnected: "No connection.\nPlease check your Internet connection status.\nThe system will automatically retry pending actions once the connection is restored.";
3609
3627
  readonly retrying: "Retrying requests.";
3610
3628
  };
3611
3629
  readonly userAvatar: {
@@ -3613,16 +3631,28 @@ export declare const enMessages: {
3613
3631
  readonly unknownUser: "Unknown user";
3614
3632
  };
3615
3633
  readonly errorPage: {
3616
- readonly homeButton: "Home";
3617
- readonly notFoundTitle: "Sorry an error occurred.";
3618
- readonly notFoundSubtitle: "This website is no longer available. Keep browsing!";
3634
+ readonly homeButton: "Go to manager";
3635
+ readonly notFoundTitle: "We couldn't find this page";
3636
+ readonly notFoundSubtitle: "This content may have been moved, unpublished, or the link may be mistyped.";
3619
3637
  readonly notFoundCode: "404";
3638
+ readonly notFoundCodeLabel: "404 — Page not found";
3620
3639
  readonly errorLabel: "Error";
3621
- readonly copyDetail: "Copy detail.";
3622
- readonly copyDetailText: "The route {url} you are trying to access is no longer available.";
3623
- readonly copied: "Text copied to clipboard!";
3624
- readonly notAllowedTitle: "Sorry.\nYou do not have access.";
3625
- readonly notAllowedSubtitle: "What you want to see is restricted by permissions. Keep browsing!";
3640
+ readonly notAllowedTitle: "You don't have permission to access this";
3641
+ readonly notAllowedSubtitle: "Your account does not have the permissions needed to view this page. If you think this is a mistake, request access from the site administrator.";
3642
+ readonly notAllowedCode: "403";
3643
+ readonly notAllowedCodeLabel: "403 — Access denied";
3644
+ readonly detailTitle: "Error detail";
3645
+ readonly detailFieldCode: "Code";
3646
+ readonly detailFieldAddress: "Address";
3647
+ readonly detailFieldUser: "User";
3648
+ readonly detailFieldDate: "Date";
3649
+ readonly copyDetail: "Copy";
3650
+ readonly copied: "Copied";
3651
+ readonly helpHintPrefix: "Need help? Copy the detail and write to";
3652
+ readonly loggedInAsPrefix: "Signed in as";
3653
+ readonly changeAccount: "Change account";
3654
+ readonly footerBrand: "Bluestack CMS";
3655
+ readonly footerCodeLabel: "Error code";
3626
3656
  };
3627
3657
  };
3628
3658
 
@@ -3843,12 +3873,24 @@ export declare const esMessages: {
3843
3873
  notFoundTitle: string;
3844
3874
  notFoundSubtitle: string;
3845
3875
  notFoundCode: string;
3876
+ notFoundCodeLabel: string;
3846
3877
  errorLabel: string;
3847
- copyDetail: string;
3848
- copyDetailText: string;
3849
- copied: string;
3850
3878
  notAllowedTitle: string;
3851
3879
  notAllowedSubtitle: string;
3880
+ notAllowedCode: string;
3881
+ notAllowedCodeLabel: string;
3882
+ detailTitle: string;
3883
+ detailFieldCode: string;
3884
+ detailFieldAddress: string;
3885
+ detailFieldUser: string;
3886
+ detailFieldDate: string;
3887
+ copyDetail: string;
3888
+ copied: string;
3889
+ helpHintPrefix: string;
3890
+ loggedInAsPrefix: string;
3891
+ changeAccount: string;
3892
+ footerBrand: string;
3893
+ footerCodeLabel: string;
3852
3894
  };
3853
3895
  };
3854
3896
 
@@ -4151,7 +4193,7 @@ export declare function findPublicationLabel(sites: SiteSection[], publicationId
4151
4193
  * que la carga vive en `theme/fonts.ts` y se inyecta vía el provider MUI.
4152
4194
  */
4153
4195
  export declare const fontFamilies: {
4154
- readonly googleSans: "\"Google Sans\",\"Helvetica\",\"Arial\",sans-serif";
4196
+ readonly googleSans: "\"Google Sans\",\"Roboto\",\"Helvetica\",\"Arial\",sans-serif";
4155
4197
  /** Monoespaciada (url del toast de error, fragmentos de código). No es de marca. */
4156
4198
  readonly mono: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
4157
4199
  };
@@ -6643,12 +6685,24 @@ export declare const ptMessages: {
6643
6685
  notFoundTitle: string;
6644
6686
  notFoundSubtitle: string;
6645
6687
  notFoundCode: string;
6688
+ notFoundCodeLabel: string;
6646
6689
  errorLabel: string;
6647
- copyDetail: string;
6648
- copyDetailText: string;
6649
- copied: string;
6650
6690
  notAllowedTitle: string;
6651
6691
  notAllowedSubtitle: string;
6692
+ notAllowedCode: string;
6693
+ notAllowedCodeLabel: string;
6694
+ detailTitle: string;
6695
+ detailFieldCode: string;
6696
+ detailFieldAddress: string;
6697
+ detailFieldUser: string;
6698
+ detailFieldDate: string;
6699
+ copyDetail: string;
6700
+ copied: string;
6701
+ helpHintPrefix: string;
6702
+ loggedInAsPrefix: string;
6703
+ changeAccount: string;
6704
+ footerBrand: string;
6705
+ footerCodeLabel: string;
6652
6706
  };
6653
6707
  };
6654
6708
 
@@ -6962,6 +7016,19 @@ export declare interface ResilientRunOptions {
6962
7016
  maxRetries?: number;
6963
7017
  /** Mostrar el toast "reintentando" al reanudar tras una desconexión. Default true. */
6964
7018
  notifyRetry?: boolean;
7019
+ /**
7020
+ * Clave para **deduplicar** llamados idénticos en vuelo (p. ej. el usuario le
7021
+ * dio clic varias veces al mismo botón mientras esperaba reconexión). Si ya
7022
+ * hay un `run` con la misma clave esperando conexión/reintentando, este NO
7023
+ * vuelve a invocar `fn`: se engancha a esa misma promesa y ambos llamantes
7024
+ * reciben el mismo resultado (un solo request real, no uno por clic).
7025
+ *
7026
+ * Sin esta opción no hay dedupe (comportamiento previo, sin cambios). El
7027
+ * gestor arma la clave con lo que identifica **esa** acción de negocio, p. ej.
7028
+ * `` `users/setStatus:${userId}` ``: no la deriva la lib porque es una
7029
+ * decisión del caller (no todo llamado conviene deduplicar).
7030
+ */
7031
+ dedupeKey?: string;
6965
7032
  }
6966
7033
 
6967
7034
  export declare function resolveCmsAssetUrl(path: string, cmsOrigin?: string): string;
@@ -7058,6 +7125,11 @@ export declare interface SectionsGetResponse extends CmsResponse {
7058
7125
  * Pensado para filtros de listado (p. ej. "Últimas Noticias" o
7059
7126
  * "Todos / Activos / Inactivos"), reutilizable desde cualquier app que consuma
7060
7127
  * la librería.
7128
+ *
7129
+ * Para QA (NAA-5175) emite, además de los `data-testid`, el valor interno del
7130
+ * filtro: `data-value` en el disparador (la opción activa) y en cada opción del
7131
+ * menú, más `data-selected="true|false"` en la opción. Ninguno depende del
7132
+ * idioma ni de la clase `Mui-selected`.
7061
7133
  */
7062
7134
  export declare function SelectDropdown({ value, options, onChange, highlighted, showIcons, minWidth, disabled, placeholder, prefix, ariaLabel, testId, }: SelectDropdownProps): JSX.Element;
7063
7135
 
@@ -8084,6 +8156,11 @@ export declare type UserAvatarProps = {
8084
8156
  * resultado de error para que el caller muestre el toast.
8085
8157
  * - **Error de negocio (4xx / `status:'fail'`):** no reintenta; devuelve el
8086
8158
  * resultado tal cual para que el caller decida (toast/update optimista).
8159
+ * - **Clics repetidos a la misma acción** (con `dedupeKey`): mientras el
8160
+ * primer llamado siga esperando reconexión o reintentando, los siguientes
8161
+ * con la misma clave no disparan `fn` de nuevo — se enganchan a la misma
8162
+ * promesa, así solo sale un request real aunque el usuario haya hecho clic
8163
+ * varias veces.
8087
8164
  *
8088
8165
  * El toast global de "sin conexión" / "conexión restablecida" lo dispara
8089
8166
  * `CmsNetworkToaster`; este hook solo añade el "reintentando…" por acción.
@@ -8091,8 +8168,11 @@ export declare type UserAvatarProps = {
8091
8168
  * Uso en el gestor:
8092
8169
  * ```ts
8093
8170
  * const run = useResilientAction();
8094
- * const res = await run(() => setUserStatus(slug, id, action),
8095
- * { service: '/users/actions/setStatus', params: { id, action } });
8171
+ * const res = await run(() => setUserStatus(slug, id, action), {
8172
+ * service: '/users/actions/setStatus',
8173
+ * params: { id, action },
8174
+ * dedupeKey: `users/setStatus:${id}`,
8175
+ * });
8096
8176
  * ```
8097
8177
  */
8098
8178
  export declare function useResilientAction(): ResilientRunner;