sass-cms-template-common 0.0.33 → 0.0.34
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 +12 -1
- package/dist/index.js +14 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1289,7 +1289,7 @@ export declare class CmsGeneralServices {
|
|
|
1289
1289
|
updateCDN: (path: string) => Promise<CmsResponse>;
|
|
1290
1290
|
}
|
|
1291
1291
|
|
|
1292
|
-
export declare function CmsI18nProvider({ locale, language, messages, catalog, appMessages, children, }: CmsI18nProviderProps): JSX.Element;
|
|
1292
|
+
export declare function CmsI18nProvider({ locale, language, messages, catalog, appMessages, syncDocumentLang, children, }: CmsI18nProviderProps): JSX.Element;
|
|
1293
1293
|
|
|
1294
1294
|
export declare type CmsI18nProviderProps = {
|
|
1295
1295
|
locale?: Locale | string;
|
|
@@ -1299,6 +1299,12 @@ export declare type CmsI18nProviderProps = {
|
|
|
1299
1299
|
catalog?: LocaleCatalog;
|
|
1300
1300
|
/** Catálogo de mensajes propio del gestor (namespaces libres, es/en/pt). */
|
|
1301
1301
|
appMessages?: AppLocaleCatalog;
|
|
1302
|
+
/**
|
|
1303
|
+
* Mantiene el atributo `lang` del <html> en sincronía con el idioma activo
|
|
1304
|
+
* (NAA-5169). Por defecto `true`. Se pone en `false` en un provider anidado,
|
|
1305
|
+
* para que solo el del ámbito de la página escriba el idioma del documento.
|
|
1306
|
+
*/
|
|
1307
|
+
syncDocumentLang?: boolean;
|
|
1302
1308
|
children: ReactNode;
|
|
1303
1309
|
};
|
|
1304
1310
|
|
|
@@ -7058,6 +7064,11 @@ export declare interface SectionsGetResponse extends CmsResponse {
|
|
|
7058
7064
|
* Pensado para filtros de listado (p. ej. "Últimas Noticias" o
|
|
7059
7065
|
* "Todos / Activos / Inactivos"), reutilizable desde cualquier app que consuma
|
|
7060
7066
|
* la librería.
|
|
7067
|
+
*
|
|
7068
|
+
* Para QA (NAA-5175) emite, además de los `data-testid`, el valor interno del
|
|
7069
|
+
* filtro: `data-value` en el disparador (la opción activa) y en cada opción del
|
|
7070
|
+
* menú, más `data-selected="true|false"` en la opción. Ninguno depende del
|
|
7071
|
+
* idioma ni de la clase `Mui-selected`.
|
|
7061
7072
|
*/
|
|
7062
7073
|
export declare function SelectDropdown({ value, options, onChange, highlighted, showIcons, minWidth, disabled, placeholder, prefix, ariaLabel, testId, }: SelectDropdownProps): JSX.Element;
|
|
7063
7074
|
|
package/dist/index.js
CHANGED
|
@@ -1673,19 +1673,23 @@ function Ar(e) {
|
|
|
1673
1673
|
//#endregion
|
|
1674
1674
|
//#region src/lib/i18n/CmsI18nProvider.tsx
|
|
1675
1675
|
var jr = Qe(null);
|
|
1676
|
-
function Mr({ locale: e, language: t, messages: n, catalog: r = wr, appMessages: i,
|
|
1677
|
-
let
|
|
1678
|
-
|
|
1679
|
-
|
|
1676
|
+
function Mr({ locale: e, language: t, messages: n, catalog: r = wr, appMessages: i, syncDocumentLang: a = !0, children: o }) {
|
|
1677
|
+
let s = Ar(e ?? t);
|
|
1678
|
+
P(() => {
|
|
1679
|
+
typeof document > "u" || !a || (document.documentElement.lang = s);
|
|
1680
|
+
}, [s, a]);
|
|
1681
|
+
let c = F(() => ({
|
|
1682
|
+
locale: s,
|
|
1683
|
+
t: br(Tr(s, r, n), Dr(s, i))
|
|
1680
1684
|
}), [
|
|
1681
1685
|
i,
|
|
1682
1686
|
r,
|
|
1683
1687
|
n,
|
|
1684
|
-
|
|
1688
|
+
s
|
|
1685
1689
|
]);
|
|
1686
1690
|
return /* @__PURE__ */ R(jr.Provider, {
|
|
1687
|
-
value:
|
|
1688
|
-
children:
|
|
1691
|
+
value: c,
|
|
1692
|
+
children: o
|
|
1689
1693
|
});
|
|
1690
1694
|
}
|
|
1691
1695
|
//#endregion
|
|
@@ -6566,6 +6570,8 @@ function bo({ value: e, options: t, onChange: n, highlighted: r = !1, showIcons:
|
|
|
6566
6570
|
selected: n,
|
|
6567
6571
|
onClick: () => g(t.value),
|
|
6568
6572
|
"data-testid": u ? `${u}-option-${t.value}` : void 0,
|
|
6573
|
+
"data-value": t.value,
|
|
6574
|
+
"data-selected": n ? "true" : "false",
|
|
6569
6575
|
sx: sr.sxItem(n),
|
|
6570
6576
|
children: [i && t.icon ? /* @__PURE__ */ R(gt, {
|
|
6571
6577
|
sx: { color: t.iconColor ?? "m3.onSurfaceVariant" },
|
|
@@ -6582,6 +6588,7 @@ function bo({ value: e, options: t, onChange: n, highlighted: r = !1, showIcons:
|
|
|
6582
6588
|
"aria-label": l,
|
|
6583
6589
|
onClick: (e) => f(e.currentTarget),
|
|
6584
6590
|
"data-testid": u,
|
|
6591
|
+
"data-value": h?.value ?? "",
|
|
6585
6592
|
sx: sr.sxTrigger(r, p),
|
|
6586
6593
|
children: [
|
|
6587
6594
|
i && h?.icon ? /* @__PURE__ */ R(B, {
|