sass-template-common 0.2.4 → 0.2.6

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.
@@ -848,7 +848,7 @@ export declare const IframeHeader: ({ newsformated, internal, commonServices, }:
848
848
  newsformated: NewListResponseData;
849
849
  internal?: string;
850
850
  commonServices: CommonServices;
851
- }) => Promise<JSX.Element | undefined>;
851
+ }) => Promise<JSX.Element | null>;
852
852
 
853
853
  declare interface Image_2 {
854
854
  sizes: Size[];
@@ -2361,7 +2361,7 @@ export declare const VideoEmbeddedHeader: ({ newsformated, internal, commonServi
2361
2361
  newsformated: NewListResponseData;
2362
2362
  internal?: string;
2363
2363
  commonServices: CommonServices;
2364
- }) => Promise<JSX.Element | undefined>;
2364
+ }) => Promise<JSX.Element | null>;
2365
2365
 
2366
2366
  export declare interface VideoItem {
2367
2367
  type: string;
@@ -2426,7 +2426,7 @@ export declare const VideoYoutubeHeader: ({ newsformated, internal, commonServic
2426
2426
  newsformated: NewListResponseData;
2427
2427
  internal?: string;
2428
2428
  commonServices: CommonServices;
2429
- }) => Promise<JSX.Element | undefined>;
2429
+ }) => Promise<JSX.Element | null>;
2430
2430
 
2431
2431
  export declare const WebsiteList: ({ config }: {
2432
2432
  config: Config;
@@ -7044,7 +7044,7 @@ const jd = "_content_r1co8_1", Qd = "_videoContent_r1co8_20", Gd = "_articleSect
7044
7044
  ),
7045
7045
  e.banner
7046
7046
  ] })
7047
- ] }), gu = "_content_1xqtp_1", pu = "_header_1xqtp_30", Au = "_videos_1xqtp_56", yu = "_videoContent_1xqtp_63", wu = "_articleSection_1xqtp_70", vu = "_contentLayoutVideoSection_1xqtp_85", bu = "_sectionVideoList_1xqtp_93", Cu = "_iframeStyled_1xqtp_166", _u = "_contentFrame_1xqtp_173", qe = {
7047
+ ] }), gu = "_content_7v98f_1", pu = "_header_7v98f_30", Au = "_videos_7v98f_56", yu = "_videoContent_7v98f_63", wu = "_articleSection_7v98f_70", vu = "_contentLayoutVideoSection_7v98f_85", bu = "_sectionVideoList_7v98f_93", Cu = "_iframeStyled_7v98f_166", _u = "_contentFrame_7v98f_172", qe = {
7048
7048
  content: gu,
7049
7049
  header: pu,
7050
7050
  videos: Au,
@@ -7086,7 +7086,7 @@ const jd = "_content_r1co8_1", Qd = "_videoContent_r1co8_20", Gd = "_articleSect
7086
7086
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(xt, { ...n, paths: e.paths }) })
7087
7087
  ] }) : null;
7088
7088
  }, r3 = (e) => /* @__PURE__ */ a("div", { className: qe.content, children: /* @__PURE__ */ m(zt, { className: qe.contentLayoutVideoSection, children: [
7089
- /* @__PURE__ */ m("a", { className: qe.header, href: "/", children: [
7089
+ /* @__PURE__ */ m("a", { className: qe.header, href: e.goBackLink ?? "/videos", children: [
7090
7090
  /* @__PURE__ */ a(
7091
7091
  "svg",
7092
7092
  {
@@ -9967,19 +9967,30 @@ const c0 = "_content_cu8lm_1", l0 = "_title_cu8lm_18", gr = {
9967
9967
  internal: t,
9968
9968
  commonServices: n
9969
9969
  }) => {
9970
- if (!t) return;
9971
- const r = await n.getNewsMultimedia({
9972
- path: t,
9973
- imagesizes: e.preview.sizes[0]?.scale
9974
- });
9975
- if (!r) return;
9976
- const o = r.data.data[0]?.videos.filter(
9977
- (s) => s.type === "video-embedded"
9978
- )[0];
9979
- return /* @__PURE__ */ m("div", { className: gr.content, children: [
9980
- /* @__PURE__ */ a("div", { dangerouslySetInnerHTML: { __html: o?.code ?? "" } }),
9981
- /* @__PURE__ */ a("p", { className: gr.title, children: o?.title })
9982
- ] });
9970
+ if (!t) return null;
9971
+ try {
9972
+ const r = e?.preview?.sizes?.[0]?.scale ?? void 0, s = (await n.getNewsMultimedia({
9973
+ path: t,
9974
+ imagesizes: r
9975
+ }))?.data?.data;
9976
+ if (!Array.isArray(s) || s.length === 0) return null;
9977
+ const i = s[0], d = (Array.isArray(i?.videos) ? i.videos : []).find(
9978
+ (l) => l?.type === "video-embedded"
9979
+ );
9980
+ return d?.code ? /* @__PURE__ */ m("div", { className: gr.content, children: [
9981
+ /* @__PURE__ */ a(
9982
+ "div",
9983
+ {
9984
+ dangerouslySetInnerHTML: {
9985
+ __html: typeof d.code == "string" ? d.code : ""
9986
+ }
9987
+ }
9988
+ ),
9989
+ d?.title && /* @__PURE__ */ a("p", { className: gr.title, children: d.title })
9990
+ ] }) : null;
9991
+ } catch {
9992
+ return null;
9993
+ }
9983
9994
  }, u0 = "_content_cu8lm_1", h0 = "_title_cu8lm_18", zn = {
9984
9995
  content: u0,
9985
9996
  title: h0
@@ -9988,27 +9999,31 @@ const c0 = "_content_cu8lm_1", l0 = "_title_cu8lm_18", gr = {
9988
9999
  internal: t,
9989
10000
  commonServices: n
9990
10001
  }) => {
9991
- if (!t) return;
9992
- const r = await n.getNewsMultimedia({
9993
- path: t,
9994
- imagesizes: e.preview.sizes[0]?.scale
9995
- });
9996
- if (!r) return;
9997
- const o = r.data.data[0]?.videos.filter(
9998
- (s) => s.type === "video-youtube"
9999
- )[0];
10000
- return /* @__PURE__ */ m("div", { className: zn.content, children: [
10001
- /* @__PURE__ */ a(
10002
- "iframe",
10003
- {
10004
- className: zn.iframeStyled,
10005
- src: `https://www.youtube.com/embed/${o?.code ?? ""}`,
10006
- frameBorder: "0",
10007
- allowFullScreen: !0
10008
- }
10009
- ),
10010
- /* @__PURE__ */ a("p", { className: zn.title, children: o?.title })
10011
- ] });
10002
+ if (!t) return null;
10003
+ try {
10004
+ const r = e?.preview?.sizes?.[0]?.scale ?? void 0, s = (await n.getNewsMultimedia({
10005
+ path: t,
10006
+ imagesizes: r
10007
+ }))?.data?.data;
10008
+ if (!Array.isArray(s) || s.length === 0) return null;
10009
+ const i = s[0], d = (Array.isArray(i?.videos) ? i.videos : []).find(
10010
+ (l) => l?.type === "video-youtube"
10011
+ );
10012
+ return !d?.code || typeof d.code != "string" ? null : /* @__PURE__ */ m("div", { className: zn.content, children: [
10013
+ /* @__PURE__ */ a(
10014
+ "iframe",
10015
+ {
10016
+ className: zn.iframeStyled,
10017
+ src: `https://www.youtube.com/embed/${d.code}`,
10018
+ frameBorder: "0",
10019
+ allowFullScreen: !0
10020
+ }
10021
+ ),
10022
+ d?.title && /* @__PURE__ */ a("p", { className: zn.title, children: d.title })
10023
+ ] });
10024
+ } catch {
10025
+ return null;
10026
+ }
10012
10027
  }, f0 = "_content_ezbiw_1", g0 = {
10013
10028
  content: f0
10014
10029
  }, p0 = async ({
@@ -10016,21 +10031,24 @@ const c0 = "_content_cu8lm_1", l0 = "_title_cu8lm_18", gr = {
10016
10031
  internal: t,
10017
10032
  commonServices: n
10018
10033
  }) => {
10019
- if (!t) return;
10020
- const r = await n.getNews({
10021
- path: t,
10022
- imagesizes: e.preview.sizes[0]?.scale
10023
- });
10024
- if (!r) return;
10025
- console.log("response", r.data.data[0]);
10026
- const o = r.data.data[0]?.external?.iframe;
10027
- return /* @__PURE__ */ a(
10028
- "div",
10029
- {
10030
- className: g0.content,
10031
- dangerouslySetInnerHTML: { __html: o ?? "" }
10032
- }
10033
- );
10034
+ if (!t) return null;
10035
+ try {
10036
+ const r = e?.preview?.sizes?.[0]?.scale ?? void 0, s = (await n.getNews({
10037
+ path: t,
10038
+ imagesizes: r
10039
+ }))?.data?.data;
10040
+ if (!Array.isArray(s) || s.length === 0) return null;
10041
+ const c = s[0]?.external?.iframe;
10042
+ return typeof c != "string" || c.trim() === "" ? null : /* @__PURE__ */ a(
10043
+ "div",
10044
+ {
10045
+ className: g0.content,
10046
+ dangerouslySetInnerHTML: { __html: c }
10047
+ }
10048
+ );
10049
+ } catch {
10050
+ return null;
10051
+ }
10034
10052
  }, A0 = "_content_156j7_1", pr = {
10035
10053
  content: A0
10036
10054
  }, ot = {