sass-template-common 0.10.14 → 0.10.15
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/sass-template-common.d.ts +71 -22
- package/dist/sass-template-common.js +2555 -2515
- package/dist/sass-template-common.umd.cjs +35 -35
- package/package.json +1 -1
|
@@ -244,29 +244,51 @@ export declare type BucketOriginConfig = {
|
|
|
244
244
|
proxyUrl?: string;
|
|
245
245
|
/** Prefijo raíz del cliente dentro del bucket (ej. `'debate'`). */
|
|
246
246
|
clientName: string;
|
|
247
|
-
/**
|
|
247
|
+
/**
|
|
248
|
+
* Sirve el menú (sidebar/menu/footer/freeZone/cintillo + equipos/sites) desde
|
|
249
|
+
* el bucket. Con el toggle ON, SIN fallback a CMS: si el bucket agota los 4
|
|
250
|
+
* intentos, se sirve vacío + registro en el debugPanel (`reportBucketOriginExhausted`).
|
|
251
|
+
*/
|
|
248
252
|
menu?: boolean;
|
|
249
|
-
/**
|
|
253
|
+
/**
|
|
254
|
+
* Sirve los banners (home/seccion/nota) desde el bucket. Con el toggle ON, SIN
|
|
255
|
+
* fallback a CMS: si el bucket agota los 4 intentos, se sirve vacío + registro
|
|
256
|
+
* en el debugPanel.
|
|
257
|
+
*/
|
|
250
258
|
banners?: boolean;
|
|
251
259
|
/**
|
|
252
260
|
* [transicional] Sirve la config de los slots dinámicos de home
|
|
253
261
|
* (`bloques/modulos-dinamicos/modulos-dinamicos.json`) desde el bucket en
|
|
254
262
|
* lugar del fan-out N contra `/config/blocks-saas`. Toggle de migración: al
|
|
255
263
|
* pasar todos los sitios a `true`, la rama legacy CMS se elimina y el toggle
|
|
256
|
-
* queda no-op (luego se remueve).
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
*
|
|
264
|
+
* queda no-op (luego se remueve). El JSON keyea plano `Home_N` (sin subíndices);
|
|
265
|
+
* cada entry se resuelve con `resolveSlotContent` (content-fetch al CMS igual
|
|
266
|
+
* que legacy). SIN fallback de CONFIG a CMS: con el toggle ON el bucket es el
|
|
267
|
+
* método único; si agota los 4 intentos, los slots se sirven vacíos y se
|
|
268
|
+
* registra en el debugPanel (`reportBucketOriginExhausted`) para notar la falla.
|
|
269
|
+
* El fan-out CMS solo corre con el toggle OFF (sitios sin migrar).
|
|
270
|
+
* Ver `PLAN_DYNAMIC_SLOTS_BUCKET_ORIGIN.md` §4.3/§7.
|
|
260
271
|
*/
|
|
261
272
|
slots?: boolean;
|
|
262
273
|
/**
|
|
263
274
|
* [transicional] Sirve la config del destacado dinámico
|
|
264
275
|
* (`bloques/destacado/destacado.json`) desde el bucket en lugar de
|
|
265
|
-
* `/config/blocks`.
|
|
266
|
-
*
|
|
267
|
-
* `
|
|
268
|
-
*
|
|
269
|
-
*
|
|
276
|
+
* `/config/blocks`. Es drop-in de TRANSPORTE (mismo `.data.data` que el CMS).
|
|
277
|
+
* ⚠ CONTRATO (verificado contra un sitio CMS funcional, golfo): el LAYOUT del
|
|
278
|
+
* destacado va en `data[0].block`, que debe ser uno de los 5 nombres de layout
|
|
279
|
+
* (`Diario` | `Diario con imagen` | `Super` | `3 notas verticales` |
|
|
280
|
+
* `3 notas horizontales`) — es la key que consume `DynamicMainSlot` vía el prop
|
|
281
|
+
* `component`. Los campos `value`/`size`/`title`/`link` NO los usa el destacado
|
|
282
|
+
* (en el CMS vuelven como tokens sin rellenar) → se ignoran. (Nota: existe
|
|
283
|
+
* `getMainBlockData`, que lee `value` contra `GetByOptions`, pero es otra ruta
|
|
284
|
+
* que el render vivo de golfo no usa.)
|
|
285
|
+
* El CONTENIDO (las notas) SIEMPRE sale del CMS (zona `destacadas`, sección
|
|
286
|
+
* provista por la app) — permanente, no transicional: este toggle solo mueve el
|
|
287
|
+
* ORIGEN DE LA CONFIG (bucket vs CMS), nunca el contenido. SIN fallback de CONFIG
|
|
288
|
+
* a CMS: con el toggle ON el bucket es el método único; si agota los 4 intentos,
|
|
289
|
+
* el destacado se sirve vacío y se registra en el debugPanel (`reportBucketOriginExhausted`).
|
|
290
|
+
* El CMS solo sirve la config con el toggle OFF (sitios sin migrar).
|
|
291
|
+
* Ver `PLAN_DYNAMIC_SLOTS_BUCKET_ORIGIN.md` §4.4/§7.
|
|
270
292
|
*/
|
|
271
293
|
destacado?: boolean;
|
|
272
294
|
/**
|
|
@@ -553,9 +575,7 @@ export declare class CommonServices {
|
|
|
553
575
|
getEntitySection: (params: Params) => Promise<AxiosResponse<{
|
|
554
576
|
data: Array<NewListResponse>;
|
|
555
577
|
}, any, {}>> | undefined;
|
|
556
|
-
getMainMenu: (params: Params) => Promise<
|
|
557
|
-
data: Array<MenuResponse>;
|
|
558
|
-
}, any, {}> | {
|
|
578
|
+
getMainMenu: (params: Params) => Promise<{
|
|
559
579
|
data: {
|
|
560
580
|
data: Array<MenuResponse>;
|
|
561
581
|
};
|
|
@@ -583,9 +603,7 @@ export declare class CommonServices {
|
|
|
583
603
|
getVideosList: (params: Params) => Promise<AxiosResponse<{
|
|
584
604
|
data: Array<VideoResponseData>;
|
|
585
605
|
}, any, {}>> | undefined;
|
|
586
|
-
getBanners: (params: Params) => Promise<
|
|
587
|
-
data: Array<BannerResponse>;
|
|
588
|
-
}, any, {}> | {
|
|
606
|
+
getBanners: (params: Params) => Promise<{
|
|
589
607
|
data: {
|
|
590
608
|
data: Array<BannerResponse>;
|
|
591
609
|
};
|
|
@@ -1050,7 +1068,7 @@ export declare class DynamicBlockServices extends CommonServices {
|
|
|
1050
1068
|
}>;
|
|
1051
1069
|
}
|
|
1052
1070
|
|
|
1053
|
-
export declare const DynamicComponents: ({ slots, DYNAMIC_SLOT_SUBINDEXES, stylesConfig, AutorIcon, config, banners, showTagBySection, pathname, }: Props_21) =>
|
|
1071
|
+
export declare const DynamicComponents: ({ slots, DYNAMIC_SLOT_SUBINDEXES, stylesConfig, AutorIcon, config, banners, showTagBySection, pathname, }: Props_21) => ReactNode[];
|
|
1054
1072
|
|
|
1055
1073
|
export declare const DynamicMainSlot: ({ component, data, banners, rightOnlyBanner, isHome, }: Props_20) => JSX.Element;
|
|
1056
1074
|
|
|
@@ -1954,6 +1972,12 @@ export declare type LibraryConfig = {
|
|
|
1954
1972
|
* comportamiento no cambia (sigue yendo al CMS). Si un archivo no existe
|
|
1955
1973
|
* en el bucket para un sitio/tipo dado, el request falla simple (sin
|
|
1956
1974
|
* fallback automático al CMS) — igual que cualquier otro fetch fallido.
|
|
1975
|
+
*
|
|
1976
|
+
* [offline] Cuando `PUBLIC_IS_OFFLINE === 'true'`, todos los archivos de bucket
|
|
1977
|
+
* se leen de la subcarpeta `offline/` del mismo directorio
|
|
1978
|
+
* (`.../${subtype}/offline/${subtype}.json`) y, si fallan tras agotar
|
|
1979
|
+
* reintentos, NO caen al CMS ni al archivo online: se devuelve vacío. Ver
|
|
1980
|
+
* `resolveBucketOriginUrl`.
|
|
1957
1981
|
*/
|
|
1958
1982
|
BUCKET_ORIGIN?: BucketOriginConfig;
|
|
1959
1983
|
};
|
|
@@ -2025,9 +2049,11 @@ export declare class MainComponentServices {
|
|
|
2025
2049
|
readonly contract: ImageSizesContract;
|
|
2026
2050
|
constructor(config: Config, imgSizes: any, axiosApi: AxiosInstance, exclude?: string, customMainImagesSizes?: string, imageSizes?: ImageSizesContractInput);
|
|
2027
2051
|
getNewsListZone(params: Params): Promise<AxiosResponse<NewListResponse, any, {}> | undefined>;
|
|
2028
|
-
getOutstandingBlock(params: Params): Promise<
|
|
2029
|
-
data:
|
|
2030
|
-
|
|
2052
|
+
getOutstandingBlock(params: Params): Promise<{
|
|
2053
|
+
data: {
|
|
2054
|
+
data: Array<Outstanding>;
|
|
2055
|
+
};
|
|
2056
|
+
} | undefined>;
|
|
2031
2057
|
getNewsListZoneWrapper(section: string, size: number, imagesizes?: string): Promise<AxiosResponse<NewListResponse, any, {}> | undefined>;
|
|
2032
2058
|
getNewsDestacadoDiario(section: string): Promise<never[] | AxiosResponse<NewListResponse, any, {}>>;
|
|
2033
2059
|
getNewsDestacadoDiarioImage(section: string): Promise<never[] | AxiosResponse<NewListResponse, any, {}>>;
|
|
@@ -3291,6 +3317,18 @@ export declare const REPORT_REASONS: {
|
|
|
3291
3317
|
readonly bullying: "Bullying o acoso";
|
|
3292
3318
|
};
|
|
3293
3319
|
|
|
3320
|
+
/**
|
|
3321
|
+
* Registra en el **debugPanel** (`DebugStore`, gated por `DEBUG_ENABLED`) que un
|
|
3322
|
+
* recurso de `BUCKET_ORIGIN` agotó los reintentos. En un sitio con el toggle
|
|
3323
|
+
* prendido, el bucket es el MÉTODO ÚNICO: NO se cae al CMS (eso solo pasa con el
|
|
3324
|
+
* toggle OFF, en sitios sin migrar). El recurso se sirve VACÍO y esta entrada
|
|
3325
|
+
* deja constancia explícita del "servido vacío, sin fallback" para que la falla
|
|
3326
|
+
* se NOTE en el panel en vez de quedar enmascarada. (El fallo de red crudo ya lo
|
|
3327
|
+
* registra `resilientFetch`; esta entrada agrega la decisión de no-fallback.)
|
|
3328
|
+
* Ver `PLAN_DYNAMIC_SLOTS_BUCKET_ORIGIN.md` §7.
|
|
3329
|
+
*/
|
|
3330
|
+
export declare function reportBucketOriginExhausted(kind: string, url: string): void;
|
|
3331
|
+
|
|
3294
3332
|
export declare function reportComment({ publication, username, id, type, baseUrl, captchaToken, apiToken, securityToken, COMMENTS_VARS, }: ReportCommentParams): Promise<{
|
|
3295
3333
|
type: string;
|
|
3296
3334
|
message: string;
|
|
@@ -3349,7 +3387,18 @@ export declare function resolveBatchCount(): number;
|
|
|
3349
3387
|
|
|
3350
3388
|
export declare function resolveBucketMenuSubtype(path?: string): string;
|
|
3351
3389
|
|
|
3352
|
-
|
|
3390
|
+
/**
|
|
3391
|
+
* Arma la URL del recurso en el bucket:
|
|
3392
|
+
* `${base}/${clientName}/${site}/${type}/${subtype}/${subtype}.json`.
|
|
3393
|
+
*
|
|
3394
|
+
* En modo offline (`PUBLIC_IS_OFFLINE === 'true'`) el consumidor pasa
|
|
3395
|
+
* `offline = true` y el archivo se resuelve dentro de la subcarpeta `offline/`
|
|
3396
|
+
* del MISMO directorio: `.../${subtype}/offline/${subtype}.json`. La variante
|
|
3397
|
+
* offline es un archivo aparte que convive con el de producción
|
|
3398
|
+
* (`.../${subtype}/${subtype}.json`); el consumidor NO cae al CMS ni al archivo
|
|
3399
|
+
* online si la offline falla (ver getMainMenu/getBanners/getDynamicSlots/destacado).
|
|
3400
|
+
*/
|
|
3401
|
+
export declare function resolveBucketOriginUrl(bucket: BucketOriginConfig, servicePrefix: string | undefined, type: 'menu' | 'banners' | 'bloques', subtype: string, offline?: boolean): string;
|
|
3353
3402
|
|
|
3354
3403
|
/**
|
|
3355
3404
|
* Recibe lo que el app mande hoy (contrato completo, parcial, o nada) y
|