sass-template-common 0.13.2 → 0.13.5

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.
@@ -936,7 +936,7 @@ declare interface Date_2 {
936
936
  }
937
937
  export { Date_2 as Date }
938
938
 
939
- export declare const DEBUG_MainSlots: ({ mainBlock, StylesConfigMain, config, banners, commonServices, }: Props_22) => JSX.Element | null;
939
+ export declare const DEBUG_MainSlots: ({ mainBlock, StylesConfigMain, config, banners, commonServices, textPosition, }: Props_22) => JSX.Element | null;
940
940
 
941
941
  declare type DebugCfg = {
942
942
  buttonPosition?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
@@ -3186,6 +3186,7 @@ declare type Props_22 = {
3186
3186
  config: Config;
3187
3187
  banners: BannerResponse[];
3188
3188
  commonServices?: CommonServices;
3189
+ textPosition?: 'start' | 'center';
3189
3190
  };
3190
3191
 
3191
3192
  declare type Props_23 = {
@@ -4794,7 +4794,7 @@ const Sd = (e) => Array.isArray(e) ? e.length > 0 : e && typeof e == "object" ?
4794
4794
  "[url_replace]": ""
4795
4795
  }),
4796
4796
  news: (e) => ({
4797
- "[author_replace]": e.currentNew?.authors[0]?.name ?? "",
4797
+ "[author_replace]": e.currentNew?.authors?.[0]?.name ?? "",
4798
4798
  "[section_replace]": e.currentNew?.info?.section?.slug ?? "",
4799
4799
  "[tag_replace]": jr(e.currentNew?.keywords),
4800
4800
  "[url_replace]": Wi(e.internalPath ?? "")
@@ -12540,29 +12540,29 @@ const tm = async (e) => {
12540
12540
  }
12541
12541
  );
12542
12542
  }, xt = (e) => {
12543
- const { SHOW_TAG_BY_SECTION: t, SUB_PUBLICATION_PREFIX_IN_ROUTES: n } = I(), a = `${e?.authors[0]?.fullname} - `, r = e?.config?.showtime && e.config?.showauthor ? Ze(e.info?.date?.modified, a) : e?.config?.showtime ? Ze(e.info?.date?.modified) : {}, o = () => {
12543
+ const { SHOW_TAG_BY_SECTION: t, SUB_PUBLICATION_PREFIX_IN_ROUTES: n } = I(), a = e.authors?.[0], r = `${a?.fullname ?? ""} - `, o = e?.config?.showtime && e.config?.showauthor ? Ze(e.info?.date?.modified, r) : e?.config?.showtime ? Ze(e.info?.date?.modified) : {}, i = () => {
12544
12544
  if (e?.config?.showtime && e.config?.showauthor)
12545
- return `${a}${Pe(e.info?.date?.modified)}`;
12545
+ return `${r}${Pe(e.info?.date?.modified)}`;
12546
12546
  if (e.config?.showauthor)
12547
- return e?.authors[0]?.fullname;
12547
+ return a?.fullname;
12548
12548
  if (e?.config?.showtime)
12549
12549
  return Pe(e.info?.date?.modified);
12550
- }, i = () => {
12550
+ }, c = () => {
12551
12551
  if (t && e.keywords?.tags?.length && e.keywords.tags.length > 0) {
12552
- const l = e.keywords.tags[0], d = l.name;
12553
- return l.approved ? /* @__PURE__ */ g("h3", { children: [
12552
+ const d = e.keywords.tags[0], u = d.name;
12553
+ return d.approved ? /* @__PURE__ */ g("h3", { children: [
12554
12554
  " ",
12555
12555
  /* @__PURE__ */ s(
12556
12556
  O,
12557
12557
  {
12558
- "aria-label": d,
12558
+ "aria-label": u,
12559
12559
  className: "sass-bmd-sup-tagmx",
12560
12560
  block_subPublication: n?.tema,
12561
- href: ot(l, e.paths),
12562
- children: d
12561
+ href: ot(d, e.paths),
12562
+ children: u
12563
12563
  }
12564
12564
  )
12565
- ] }) : /* @__PURE__ */ s("div", { className: "sass-bmd-sup-tagmx", children: d });
12565
+ ] }) : /* @__PURE__ */ s("div", { className: "sass-bmd-sup-tagmx", children: u });
12566
12566
  } else if (e.info?.section?.url)
12567
12567
  return /* @__PURE__ */ s("h3", { children: /* @__PURE__ */ s(
12568
12568
  O,
@@ -12573,19 +12573,19 @@ const tm = async (e) => {
12573
12573
  }
12574
12574
  ) });
12575
12575
  return null;
12576
- }, c = () => {
12576
+ }, l = () => {
12577
12577
  if (t && e.keywords?.tags?.length && e.keywords.tags.length > 0) {
12578
- const l = e.keywords.tags[0], d = l.name;
12579
- return l.approved ? /* @__PURE__ */ s("h3", { children: /* @__PURE__ */ s(
12578
+ const d = e.keywords.tags[0], u = d.name;
12579
+ return d.approved ? /* @__PURE__ */ s("h3", { children: /* @__PURE__ */ s(
12580
12580
  O,
12581
12581
  {
12582
- "aria-label": d,
12582
+ "aria-label": u,
12583
12583
  className: "sass-bmd-sup-tag",
12584
12584
  block_subPublication: n?.tema,
12585
- href: ot(l, e.paths),
12586
- children: d
12585
+ href: ot(d, e.paths),
12586
+ children: u
12587
12587
  }
12588
- ) }) : /* @__PURE__ */ s("div", { className: "sass-bmd-sup-tag", children: d });
12588
+ ) }) : /* @__PURE__ */ s("div", { className: "sass-bmd-sup-tag", children: u });
12589
12589
  } else if (e.info?.section?.url)
12590
12590
  return /* @__PURE__ */ s("h3", { children: /* @__PURE__ */ s(O, { className: "sass-bmd-sup-tag", href: e?.info?.section?.url, children: e?.info?.section?.name }) });
12591
12591
  return null;
@@ -12619,10 +12619,13 @@ const tm = async (e) => {
12619
12619
  {
12620
12620
  className: "sass-bmd-sup-contentNews",
12621
12621
  style: {
12622
- "--widthTextContent": e.textPosition === "start" ? "100%" : "80%"
12622
+ "--widthTextContent": e.textPosition === "start" ? "100%" : "80%",
12623
+ ...e.textPosition ? {
12624
+ "--titlePosition": e.textPosition === "start" ? "start" : "center"
12625
+ } : {}
12623
12626
  },
12624
12627
  children: [
12625
- /* @__PURE__ */ s(i, {}),
12628
+ /* @__PURE__ */ s(c, {}),
12626
12629
  /* @__PURE__ */ g(
12627
12630
  "div",
12628
12631
  {
@@ -12630,7 +12633,7 @@ const tm = async (e) => {
12630
12633
  position: "relative"
12631
12634
  },
12632
12635
  children: [
12633
- /* @__PURE__ */ s(c, {}),
12636
+ /* @__PURE__ */ s(l, {}),
12634
12637
  /* @__PURE__ */ s(
12635
12638
  O,
12636
12639
  {
@@ -12640,16 +12643,7 @@ const tm = async (e) => {
12640
12643
  ),
12641
12644
  href: e?.info?.link?.url,
12642
12645
  target: e?.info?.link?.target,
12643
- children: /* @__PURE__ */ s(
12644
- "h1",
12645
- {
12646
- className: "sass-bmd-sup-titular",
12647
- style: {
12648
- "--titlePosition": e.textPosition === "start" ? "initial" : "center"
12649
- },
12650
- children: e?.main?.title?.home
12651
- }
12652
- )
12646
+ children: /* @__PURE__ */ s("h1", { className: "sass-bmd-sup-titular", children: e?.main?.title?.home })
12653
12647
  }
12654
12648
  )
12655
12649
  ]
@@ -12664,16 +12658,16 @@ const tm = async (e) => {
12664
12658
  }
12665
12659
  }
12666
12660
  ),
12667
- e?.config?.showtime && e.config?.showauthor && /* @__PURE__ */ s(Q, { children: e.authors[0]?.internaluser ? /* @__PURE__ */ s(
12661
+ e?.config?.showtime && e.config?.showauthor && /* @__PURE__ */ s(Q, { children: a?.internaluser ? /* @__PURE__ */ s(
12668
12662
  O,
12669
12663
  {
12670
12664
  block_subPublication: n?.autor,
12671
- href: `/${e.paths?.autor ?? "autor"}/${e?.authors[0]?.name}`,
12665
+ href: `/${e.paths?.autor ?? "autor"}/${a?.name}`,
12672
12666
  className: "sass-bmd-sup-correspondent",
12673
- ...r,
12674
- children: o()
12667
+ ...o,
12668
+ children: i()
12675
12669
  }
12676
- ) : /* @__PURE__ */ s("p", { className: "sass-bmd-sup-correspondentLink", ...r, children: o() }) })
12670
+ ) : /* @__PURE__ */ s("p", { className: "sass-bmd-sup-correspondentLink", ...o, children: i() }) })
12677
12671
  ]
12678
12672
  }
12679
12673
  )
@@ -13734,14 +13728,14 @@ const xp = (e) => {
13734
13728
  }
13735
13729
  ) : /* @__PURE__ */ s("div", { className: "sass-com-opt1-contentIcon", children: e.autorIcon }),
13736
13730
  /* @__PURE__ */ g("div", { className: "sass-com-opt1-boxInformation", children: [
13737
- /* @__PURE__ */ s("p", { className: "sass-com-opt1-authorName", children: n?.authors[0]?.internaluser ? /* @__PURE__ */ s(
13731
+ /* @__PURE__ */ s("p", { className: "sass-com-opt1-authorName", children: n?.authors?.[0]?.internaluser ? /* @__PURE__ */ s(
13738
13732
  O,
13739
13733
  {
13740
13734
  block_subPublication: t?.autor,
13741
- href: n.authors[0]?.internaluser ? `/${e.paths.autor}/${n?.authors[0]?.name}` : "#",
13742
- children: n?.authors[0]?.fullname ?? "Redacción"
13735
+ href: n.authors?.[0]?.internaluser ? `/${e.paths.autor}/${n?.authors?.[0]?.name}` : "#",
13736
+ children: n?.authors?.[0]?.fullname ?? "Redacción"
13743
13737
  }
13744
- ) : n?.authors[0]?.fullname ?? "Redacción" }),
13738
+ ) : n?.authors?.[0]?.fullname ?? "Redacción" }),
13745
13739
  /* @__PURE__ */ s("p", { className: "sass-com-opt1-title", children: /* @__PURE__ */ s(
13746
13740
  O,
13747
13741
  {
@@ -20288,6 +20282,7 @@ const E1 = (e) => e?.main?.title ? {
20288
20282
  customSectionCardStyles: e.customSectionCardStyles,
20289
20283
  customNewsDescriptionStyles: e.customNewsDescriptionStyles,
20290
20284
  paths: e.paths,
20285
+ textPosition: e.textPosition,
20291
20286
  speculationPrerenderClass: e.speculationPrerenderClass
20292
20287
  }
20293
20288
  );
@@ -20297,6 +20292,7 @@ const E1 = (e) => e?.main?.title ? {
20297
20292
  {
20298
20293
  ...e.data[0],
20299
20294
  paths: e.paths,
20295
+ textPosition: e.textPosition,
20300
20296
  speculationPrerenderClass: e.speculationPrerenderClass
20301
20297
  }
20302
20298
  ),
@@ -20485,22 +20481,24 @@ const E1 = (e) => e?.main?.title ? {
20485
20481
  StylesConfigMain: t,
20486
20482
  config: n,
20487
20483
  banners: a,
20488
- commonServices: r
20484
+ commonServices: r,
20485
+ textPosition: o
20489
20486
  }) => {
20490
- const { PUBLIC_ENV: o } = I();
20491
- if (o !== "local") return null;
20492
- const i = e?.news?.data || [], c = (l, d) => ({
20487
+ const { PUBLIC_ENV: i } = I();
20488
+ if (i !== "local") return null;
20489
+ const c = e?.news?.data || [], l = (d, u) => ({
20493
20490
  ...e?.news,
20494
- ...t[l],
20495
- data: i.slice(0, d),
20496
- paths: n.paths
20491
+ ...t[d],
20492
+ data: c.slice(0, u),
20493
+ paths: n.paths,
20494
+ textPosition: o
20497
20495
  });
20498
20496
  return /* @__PURE__ */ g(Q, { children: [
20499
20497
  /* @__PURE__ */ s(
20500
20498
  bn,
20501
20499
  {
20502
20500
  component: "Super",
20503
- data: c("Super", 1),
20501
+ data: l("Super", 1),
20504
20502
  banners: a
20505
20503
  }
20506
20504
  ),
@@ -20509,7 +20507,7 @@ const E1 = (e) => e?.main?.title ? {
20509
20507
  bn,
20510
20508
  {
20511
20509
  component: "3 notas verticales",
20512
- data: c("3 notas verticales", 3),
20510
+ data: l("3 notas verticales", 3),
20513
20511
  banners: a
20514
20512
  }
20515
20513
  ),
@@ -20518,7 +20516,7 @@ const E1 = (e) => e?.main?.title ? {
20518
20516
  bn,
20519
20517
  {
20520
20518
  component: "3 notas horizontales",
20521
- data: c("3 notas horizontales", 3),
20519
+ data: l("3 notas horizontales", 3),
20522
20520
  banners: a
20523
20521
  }
20524
20522
  ),
@@ -20527,7 +20525,7 @@ const E1 = (e) => e?.main?.title ? {
20527
20525
  bn,
20528
20526
  {
20529
20527
  component: "Diario en vivo",
20530
- data: c("Diario en vivo", 5),
20528
+ data: l("Diario en vivo", 5),
20531
20529
  banners: a,
20532
20530
  commonServices: r
20533
20531
  }
@@ -21043,12 +21041,12 @@ function Y1(e, t, n) {
21043
21041
  if (e.config?.showtime || e.config?.showauthor) {
21044
21042
  let y, C = "";
21045
21043
  if (e.config?.showtime && e.config?.showauthor) {
21046
- const N = `${e.authors[0]?.fullname ?? "Redacción"} - `;
21044
+ const N = `${e.authors?.[0]?.fullname ?? "Redacción"} - `;
21047
21045
  y = `${N}${Pe(e.info?.date?.modified)}`, C = ks(e.info?.date?.modified, N);
21048
- } else e.config?.showauthor ? y = e.authors[0]?.fullname ?? "Redacción" : e.config?.showtime && (y = Pe(e.info?.date?.modified), C = ks(e.info?.date?.modified));
21046
+ } else e.config?.showauthor ? y = e.authors?.[0]?.fullname ?? "Redacción" : e.config?.showtime && (y = Pe(e.info?.date?.modified), C = ks(e.info?.date?.modified));
21049
21047
  if (y !== void 0)
21050
- if (e.authors[0]?.internaluser) {
21051
- const N = `/${t?.autor}/${e.authors[0]?.name}`, { finalHref: v } = jt(
21048
+ if (e.authors?.[0]?.internaluser) {
21049
+ const N = `/${t?.autor}/${e.authors?.[0]?.name}`, { finalHref: v } = jt(
21052
21050
  N,
21053
21051
  !!c?.autor
21054
21052
  );