nvis-fe-cms-libs 2.0.8 → 2.1.0

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.
@@ -941,7 +941,7 @@ var __async = (__this, __arguments, generator) => {
941
941
  "button",
942
942
  {
943
943
  onClick: () => setCurrentPartnerSlide(index2),
944
- className: `w-3 h-3 rounded-full transition-all duration-300 ${index2 === currentPartnerSlide ? "bg-brand-primary scale-125 shadow-lg" : "bg-muted hover:bg-brand-primary/70"}`,
944
+ className: `w-3 h-3 rounded-full transition-all duration-300 ${index2 === currentPartnerSlide ? "bg-brand-primary scale-125 shadow-lg" : "bg-surface hover:bg-brand-primary/70"}`,
945
945
  "aria-label": `Slide ${index2 + 1}`
946
946
  },
947
947
  index2
@@ -1344,17 +1344,17 @@ var __async = (__this, __arguments, generator) => {
1344
1344
  border: "none",
1345
1345
  cursor: "pointer",
1346
1346
  transition: "all 0.3s ease",
1347
- backgroundColor: index2 === currentPartnerSlide ? "var(--brand-primary)" : "rgba(255, 255, 255, 0.3)",
1347
+ backgroundColor: index2 === currentPartnerSlide ? "var(--brand-primary)" : "rgba(151, 151, 151, 0.8)",
1348
1348
  transform: index2 === currentPartnerSlide ? "scale(1.3)" : "scale(1)"
1349
1349
  },
1350
1350
  onMouseEnter: (e) => {
1351
1351
  if (index2 !== currentPartnerSlide) {
1352
- e.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.5)";
1352
+ e.currentTarget.style.backgroundColor = "rgba(151, 151, 151, 0.8)";
1353
1353
  }
1354
1354
  },
1355
1355
  onMouseLeave: (e) => {
1356
1356
  if (index2 !== currentPartnerSlide) {
1357
- e.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.3)";
1357
+ e.currentTarget.style.backgroundColor = "rgba(151, 151, 151, 0.8)";
1358
1358
  }
1359
1359
  },
1360
1360
  "aria-label": `Slide ${index2 + 1}`
@@ -2903,7 +2903,7 @@ var __async = (__this, __arguments, generator) => {
2903
2903
  ]
2904
2904
  ];
2905
2905
  const Zap = createLucideIcon("zap", __iconNode);
2906
- const DiagramSection = ({ data, t, isDarkMode }) => {
2906
+ const DiagramSection = ({ data, t, isDarkMode, imageBaseUrl = "" }) => {
2907
2907
  var _a, _b;
2908
2908
  const [mounted, setMounted] = require$$0.useState(false);
2909
2909
  const [isMobile, setIsMobile] = require$$0.useState(false);
@@ -2921,12 +2921,55 @@ var __async = (__this, __arguments, generator) => {
2921
2921
  return () => window.removeEventListener("resize", checkMobile);
2922
2922
  }, []);
2923
2923
  const diagramData = (_b = (_a = data == null ? void 0 : data.sectionDataBindingItems) == null ? void 0 : _a[0]) == null ? void 0 : _b.data;
2924
+ const getImageUrl = (images) => {
2925
+ console.log("getImageUrl called with:", images);
2926
+ console.log("Type of images:", typeof images);
2927
+ if (!images) {
2928
+ console.log("No images found");
2929
+ return null;
2930
+ }
2931
+ let imageUrl;
2932
+ if (typeof images === "string") {
2933
+ imageUrl = images;
2934
+ } else if (Array.isArray(images) && images.length > 0) {
2935
+ imageUrl = images[0];
2936
+ } else {
2937
+ console.log("Invalid images format");
2938
+ return null;
2939
+ }
2940
+ console.log("Image URL:", imageUrl);
2941
+ if (!imageUrl || imageUrl.trim() === "") {
2942
+ console.log("Image URL is empty");
2943
+ return null;
2944
+ }
2945
+ if (imageUrl.startsWith("http")) {
2946
+ console.log("Full URL (already has http):", imageUrl);
2947
+ return imageUrl;
2948
+ }
2949
+ const fullUrl = `${imageBaseUrl}${imageUrl}`;
2950
+ console.log("Full URL:", fullUrl);
2951
+ return fullUrl;
2952
+ };
2924
2953
  if (!diagramData) {
2925
2954
  return null;
2926
2955
  }
2927
2956
  const diagramName = diagramData.name || safeT("diagram.defaults.name");
2928
2957
  const diagramDescription = diagramData.description || safeT("diagram.defaults.description");
2929
2958
  const modules = diagramData.diagramChildrenDTOs || [];
2959
+ require$$0.useEffect(() => {
2960
+ console.log("=== DIAGRAM MODULES DEBUG ===");
2961
+ console.log("Total modules:", modules.length);
2962
+ console.log("imageBaseUrl:", imageBaseUrl);
2963
+ modules.forEach((module2, index2) => {
2964
+ console.log(`Module ${index2 + 1}:`, {
2965
+ name: module2.name,
2966
+ images: module2.images,
2967
+ imagesType: typeof module2.images,
2968
+ isArray: Array.isArray(module2.images),
2969
+ hasImages: Boolean(module2.images)
2970
+ });
2971
+ });
2972
+ }, [modules, imageBaseUrl]);
2930
2973
  const getIconComponent = (iconName) => {
2931
2974
  const icons = {
2932
2975
  Calculator,
@@ -2956,10 +2999,10 @@ var __async = (__this, __arguments, generator) => {
2956
2999
  };
2957
3000
  }
2958
3001
  return {
2959
- gradient: "linear-gradient(to right, var(--gradient-accent-soft-start), var(--gradient-accent-soft-end))",
2960
- border: "var(--gradient-accent-soft-start)",
2961
- line: "var(--gradient-accent-soft-start)",
2962
- iconBg: "var(--gradient-accent-soft-start)",
3002
+ gradient: "linear-gradient(to right, var(--gradient-brand-strong-start), var(--gradient-brand-strong-end))",
3003
+ border: "var(--gradient-brand-strong-start)",
3004
+ line: "var(--gradient-brand-strong-start)",
3005
+ iconBg: "var(--gradient-brand-strong-start)",
2963
3006
  shadow: "rgba(139, 92, 246, 0.2)"
2964
3007
  };
2965
3008
  };
@@ -3015,15 +3058,30 @@ var __async = (__this, __arguments, generator) => {
3015
3058
  animation: `slideUp 0.5s ease-out ${index2 * 0.1}s both`
3016
3059
  },
3017
3060
  children: [
3018
- /* @__PURE__ */ jsxRuntimeExports.jsx(
3061
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
3019
3062
  "div",
3020
3063
  {
3021
- className: "flex-shrink-0 p-3 rounded-xl border",
3064
+ className: "flex-shrink-0 p-3 rounded-xl border bg-surface",
3022
3065
  style: {
3023
3066
  backgroundColor: `${colors.iconBg}33`,
3024
3067
  borderColor: colors.border
3025
3068
  },
3026
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon2, { className: "w-6 h-6 text-inverse", strokeWidth: 2 })
3069
+ children: [
3070
+ module2.images ? /* @__PURE__ */ jsxRuntimeExports.jsx(
3071
+ "img",
3072
+ {
3073
+ src: getImageUrl(module2.images),
3074
+ alt: module2.name,
3075
+ className: "w-6 h-6 object-contain",
3076
+ onError: (e) => {
3077
+ console.error("Image load error:", e.target.src);
3078
+ e.target.style.display = "none";
3079
+ e.target.nextElementSibling.style.display = "block";
3080
+ }
3081
+ }
3082
+ ) : null,
3083
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Icon2, { className: "w-6 h-6 text-inverse", strokeWidth: 2, style: { display: module2.images ? "none" : "block" } })
3084
+ ]
3027
3085
  }
3028
3086
  ),
3029
3087
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1", children: [
@@ -3279,7 +3337,7 @@ var __async = (__this, __arguments, generator) => {
3279
3337
  ] }, `line-${module2.id}`);
3280
3338
  }) }),
3281
3339
  modules.map((module2, index2) => {
3282
- const Icon2 = getIconComponent(module2.icon);
3340
+ getIconComponent(module2.icon);
3283
3341
  const colors = getColorStyles(index2);
3284
3342
  const angle = angles[index2] * Math.PI / 180;
3285
3343
  const radius = 360;
@@ -3287,6 +3345,7 @@ var __async = (__this, __arguments, generator) => {
3287
3345
  const y = Math.sin(angle) * radius;
3288
3346
  const normalizedAngle = (angles[index2] % 360 + 360) % 360;
3289
3347
  const isRightSide = normalizedAngle > 270 || normalizedAngle < 90;
3348
+ const isTopHalf = y < 0;
3290
3349
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
3291
3350
  "a",
3292
3351
  {
@@ -3321,36 +3380,40 @@ var __async = (__this, __arguments, generator) => {
3321
3380
  style: { borderColor: colors.border }
3322
3381
  }
3323
3382
  ),
3324
- /* @__PURE__ */ jsxRuntimeExports.jsx(
3325
- "div",
3326
- {
3327
- className: "flex-shrink-0 p-2.5 rounded-lg border transition-all duration-300 group-hover:rotate-12 group-hover:scale-125 relative z-10",
3328
- style: {
3329
- backgroundColor: `${colors.iconBg}33`,
3330
- borderColor: colors.border
3331
- },
3332
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon2, { className: "w-5 h-5 text-inverse", strokeWidth: 2 })
3333
- }
3334
- ),
3335
3383
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `flex-1 text-inverse text-small tracking-wide overflow-hidden text-ellipsis whitespace-nowrap ${isRightSide ? "text-right" : "text-left"} relative z-10 min-w-0`, children: module2.name }),
3336
3384
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
3337
3385
  "div",
3338
3386
  {
3339
- className: `absolute bottom-full left-1/2 -translate-x-1/2 mb-3 px-4 py-2 rounded-lg shadow-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none whitespace-nowrap z-50 border max-w-xs ${isDarkMode ? "bg-surface" : "bg-body"}`,
3387
+ className: `absolute ${isTopHalf ? "top-full mt-4" : "bottom-full mb-4"} left-1/2 -translate-x-1/2 px-6 py-4 rounded-xl shadow-2xl opacity-0 group-hover:opacity-100 transition-all duration-300 pointer-events-none z-50 border-2 ${isDarkMode ? "bg-surface" : "bg-body"}`,
3340
3388
  style: {
3341
3389
  borderColor: "var(--border-color)",
3342
- maxHeight: "120px",
3343
- overflowY: "auto"
3390
+ maxHeight: "400px",
3391
+ minWidth: "320px",
3392
+ maxWidth: "420px",
3393
+ overflowY: "auto",
3394
+ whiteSpace: "normal"
3344
3395
  },
3345
3396
  children: [
3346
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-small text-main", children: module2.name }),
3347
- module2.description && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-caption text-muted mt-1", children: module2.description }),
3397
+ module2.images && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
3398
+ "img",
3399
+ {
3400
+ src: getImageUrl(module2.images),
3401
+ alt: module2.name,
3402
+ className: "w-full h-48 object-cover rounded-lg",
3403
+ onError: (e) => {
3404
+ console.error("Tooltip image load error:", e.target.src);
3405
+ e.target.style.display = "none";
3406
+ }
3407
+ }
3408
+ ) }),
3409
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-base text-main font-bold mb-2", children: module2.name }),
3410
+ module2.description && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-small text-muted leading-relaxed", children: module2.description }),
3348
3411
  /* @__PURE__ */ jsxRuntimeExports.jsx(
3349
3412
  "div",
3350
3413
  {
3351
- className: "absolute top-full left-1/2 -translate-x-1/2 -mt-px border-4 border-transparent",
3414
+ className: `absolute ${isTopHalf ? "bottom-full" : "top-full"} left-1/2 -translate-x-1/2 ${isTopHalf ? "-mb-px" : "-mt-px"} border-8 border-transparent`,
3352
3415
  style: {
3353
- borderTopColor: isDarkMode ? "var(--bg-surface)" : "var(--bg-body)"
3416
+ [isTopHalf ? "borderBottomColor" : "borderTopColor"]: isDarkMode ? "var(--bg-surface)" : "var(--bg-body)"
3354
3417
  }
3355
3418
  }
3356
3419
  )