nvis-fe-cms-libs 1.1.4 → 1.1.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.
@@ -671,7 +671,7 @@ var __async = (__this, __arguments, generator) => {
671
671
  };
672
672
  const TimelineSection = ({ data, t, isDarkMode }) => {
673
673
  var _a;
674
- const timelineData = ((_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.map((item) => item.data)) || [];
674
+ const timelineData = ((_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.filter((item) => item == null ? void 0 : item.data).map((item) => item.data)) || [];
675
675
  const [timelineVisible, setTimelineVisible] = require$$0.useState([]);
676
676
  const timelineRefs = require$$0.useRef([]);
677
677
  require$$0.useEffect(() => {
@@ -970,8 +970,8 @@ var __async = (__this, __arguments, generator) => {
970
970
  return width;
971
971
  }
972
972
  const PartnersSection = ({ data, t, isDarkMode, imageBaseUrl = "" }) => {
973
- var _a;
974
- const partnersData = ((_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.map((item) => item.data)) || [];
973
+ var _a, _b;
974
+ const partnersData = ((_b = (_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.filter((item) => item == null ? void 0 : item.data)) == null ? void 0 : _b.map((item) => item.data)) || [];
975
975
  const [currentPartnerSlide, setCurrentPartnerSlide] = require$$0.useState(0);
976
976
  const [partnersVisible, setPartnersVisible] = require$$0.useState(false);
977
977
  const partnersRef = require$$0.useRef(null);
@@ -1090,7 +1090,7 @@ var __async = (__this, __arguments, generator) => {
1090
1090
  const timelineRefs = require$$0.useRef([]);
1091
1091
  require$$0.useEffect(() => {
1092
1092
  const fetchMilestones = () => __async(null, null, function* () {
1093
- var _a;
1093
+ var _a, _b;
1094
1094
  if (getMilestoneTimeline) {
1095
1095
  try {
1096
1096
  setLoading(true);
@@ -1106,7 +1106,7 @@ var __async = (__this, __arguments, generator) => {
1106
1106
  setLoading(false);
1107
1107
  }
1108
1108
  } else {
1109
- const milestonesData = ((_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.map((item) => item.data)) || [];
1109
+ const milestonesData = ((_b = (_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.filter((item) => item == null ? void 0 : item.data)) == null ? void 0 : _b.map((item) => item.data)) || [];
1110
1110
  setMilestones(milestonesData);
1111
1111
  setLoading(false);
1112
1112
  }
@@ -1247,12 +1247,15 @@ var __async = (__this, __arguments, generator) => {
1247
1247
  const TestimonialsSection = ({ data, t, isDarkMode }) => {
1248
1248
  var _a;
1249
1249
  const [currentIndex, setCurrentIndex] = require$$0.useState(0);
1250
- const testimonials = ((_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.map((item) => ({
1251
- quote: item.data.content,
1252
- author: item.data.customerName,
1253
- position: item.data.customerTitle || t("testimonials.fallback.defaultPosition"),
1254
- company: item.data.customerCompany || ""
1255
- }))) || [];
1250
+ const testimonials = ((_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.filter((item) => item == null ? void 0 : item.data).map((item) => {
1251
+ var _a2, _b, _c, _d;
1252
+ return {
1253
+ quote: ((_a2 = item.data) == null ? void 0 : _a2.content) || "",
1254
+ author: ((_b = item.data) == null ? void 0 : _b.customerName) || "",
1255
+ position: ((_c = item.data) == null ? void 0 : _c.customerTitle) || t("testimonials.fallback.defaultPosition"),
1256
+ company: ((_d = item.data) == null ? void 0 : _d.customerCompany) || ""
1257
+ };
1258
+ })) || [];
1256
1259
  const fallbackTestimonials = [
1257
1260
  {
1258
1261
  quote: t("testimonials.fallback.testimonial1.quote"),
@@ -2316,7 +2319,8 @@ var __async = (__this, __arguments, generator) => {
2316
2319
  ] }) }) });
2317
2320
  };
2318
2321
  const ContactInfoSection = ({ data, t, isDarkMode }) => {
2319
- const contactData = (data == null ? void 0 : data.sectionDataBindingItems) || [];
2322
+ var _a;
2323
+ const contactData = ((_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a.filter((item) => item)) || [];
2320
2324
  if (!contactData.length) return null;
2321
2325
  return /* @__PURE__ */ jsxRuntimeExports.jsx("section", { className: `py-16 ${isDarkMode ? "bg-gray-900" : "bg-slate-50"}`, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: [
2322
2326
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center mb-12", children: [
@@ -2331,14 +2335,14 @@ var __async = (__this, __arguments, generator) => {
2331
2335
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: `text-lg max-w-3xl mx-auto ${isDarkMode ? "text-gray-300" : "text-slate-600"}`, children: t("contact.team.description") || "Chúng tôi luôn sẵn sàng hỗ trợ bạn với đội ngũ chuyên nghiệp và giàu kinh nghiệm" })
2332
2336
  ] }),
2333
2337
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid md:grid-cols-2 lg:grid-cols-3 gap-8", children: contactData.map((contact, index2) => {
2334
- var _a;
2338
+ var _a2;
2335
2339
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
2336
2340
  "div",
2337
2341
  {
2338
2342
  className: `rounded-2xl p-8 shadow-lg transition-all duration-300 hover:shadow-xl hover:-translate-y-1 border ${isDarkMode ? "bg-gray-800 border-gray-700" : "bg-white border-slate-200"}`,
2339
2343
  children: [
2340
2344
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center mb-6", children: [
2341
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-20 h-20 rounded-full mx-auto mb-4 flex items-center justify-center text-2xl font-bold text-white bg-gradient-to-br from-indigo-500 to-purple-600", children: ((_a = contact.data.name) == null ? void 0 : _a.charAt(0)) || "A" }),
2345
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-20 h-20 rounded-full mx-auto mb-4 flex items-center justify-center text-2xl font-bold text-white bg-gradient-to-br from-indigo-500 to-purple-600", children: ((_a2 = contact.data.name) == null ? void 0 : _a2.charAt(0)) || "A" }),
2342
2346
  /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: `text-xl font-bold mb-2 ${isDarkMode ? "text-white" : "text-slate-800"}`, children: contact.data.name }),
2343
2347
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `inline-block px-3 py-1 rounded-full text-sm font-semibold ${isDarkMode ? "bg-indigo-900/50 text-indigo-300" : "bg-indigo-50 text-indigo-700"}`, children: contact.data.position })
2344
2348
  ] }),