@ozguraltan/strapi-content-input 1.0.21 → 1.0.23

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.
Files changed (29) hide show
  1. package/README.md +42 -13
  2. package/dist/admin/{AnalyticsHubPage-DsrcGI_Y.mjs → AnalyticsHubPage-Dvpx3KsP.mjs} +168 -55
  3. package/dist/admin/{AnalyticsHubPage-0p0Mx4AU.js → AnalyticsHubPage-K_trli5i.js} +186 -55
  4. package/dist/admin/{ContentInputField-CHXrzvE-.mjs → ContentInputField-C2kmtUwD.mjs} +328 -366
  5. package/dist/admin/{ContentInputField-7rWLSx_7.js → ContentInputField-CjxYYEps.js} +343 -381
  6. package/dist/admin/{SurveyWidgetEditor-BVN6X_3G.mjs → SurveyWidgetEditor-DMWOkHUt.mjs} +3271 -227
  7. package/dist/admin/{SurveyWidgetEditor-BmgYQaQS.js → SurveyWidgetEditor-DOYxWop9.js} +3247 -203
  8. package/dist/admin/{index-hFIuYqu5.mjs → index-AePRA0IB.mjs} +2 -2
  9. package/dist/admin/{index-CZAwXCFH.js → index-B9C8Qrfd.js} +2 -2
  10. package/dist/admin/index.js +1 -1
  11. package/dist/admin/index.mjs +1 -1
  12. package/dist/admin/src/components/common/CIImageSettingsControl.d.ts +17 -0
  13. package/dist/admin/src/components/widgets/CustomCardWidgetEditor.d.ts +1 -0
  14. package/dist/admin/src/components/widgets/HeroSliderStage.d.ts +3 -0
  15. package/dist/admin/src/components/widgets/SurveyLivePreviewPane.d.ts +9 -0
  16. package/dist/admin/src/components/widgets/SurveyWidgetEditor.d.ts +3 -1
  17. package/dist/admin/src/core/canvasClasses.d.ts +1 -0
  18. package/dist/admin/src/core/types.d.ts +12 -0
  19. package/dist/server/index.js +1359 -196
  20. package/dist/server/index.mjs +1341 -196
  21. package/dist/server/src/config/index.d.ts +4 -0
  22. package/dist/server/src/controllers/ci-image.d.ts +11 -2
  23. package/dist/server/src/controllers/index.d.ts +1 -0
  24. package/dist/server/src/index.d.ts +15 -1
  25. package/dist/server/src/services/ci-survey.d.ts +10 -1
  26. package/dist/server/src/services/index.d.ts +10 -1
  27. package/dist/server/src/utils/image-variants.d.ts +74 -0
  28. package/dist/server/src/utils/surveyEngine.d.ts +5 -0
  29. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import React, { useState, useRef, useEffect, useMemo, useCallback } from "react";
3
3
  import { createPortal } from "react-dom";
4
- import { u as uid, a as useEditorTranslator, R as ROW_PRESETS, g as getRowPresetLabel, W as WIDGET_DEFINITIONS, b as getWidgetLabel, C as CIColorField, c as createWidget, d as createBlock, e as createRow, f as getWidgetDefinition, S as StrapiMediaPicker, D as DEVICES, r as resolveAdminMediaUrl, h as useStrapiLocales, i as useOptionalEditorContext, j as DEVICE_INDEX_MAP, k as useEditorContext, l as getDevice, m as useColorCodes, n as getDeviceLabel, o as WIDTH_PRESETS, Z as ZOOM_OPTIONS, p as ColorCodesModal, q as getWidgetDescription, s as WIDGET_CATEGORIES, t as normalizeLocalizedRecord, v as normalizeOptionListByLocales, w as getDeviceTooltip, x as SurveyWidgetEditor, y as getClipboard, z as copyToClipboard, E as EditorProvider, A as ensureIds } from "./SurveyWidgetEditor-BVN6X_3G.mjs";
5
- import { M as MaterialIcon } from "./index-hFIuYqu5.mjs";
4
+ import { u as uid, a as useEditorTranslator, R as ROW_PRESETS, g as getRowPresetLabel, W as WIDGET_DEFINITIONS, b as getWidgetLabel, C as CIColorField, c as createWidget, d as createBlock, e as createRow, f as getWidgetDefinition, S as StrapiMediaPicker, D as DEVICES, r as resolveAdminMediaUrl, h as useStrapiLocales, i as useOptionalEditorContext, j as resolveCanvasMediaUrl, k as DEVICE_INDEX_MAP, l as useEditorContext, m as getDevice, n as rowCanvasClasses, o as nodeCanvasStyles, p as extractResponsiveProp, q as blockCanvasClasses, s as useColorCodes, t as getDeviceLabel, v as WIDTH_PRESETS, Z as ZOOM_OPTIONS, w as ColorCodesModal, x as getWidgetDescription, y as WIDGET_CATEGORIES, z as normalizeLocalizedRecord, A as normalizeOptionListByLocales, B as getDeviceTooltip, E as SurveyWidgetEditor, F as setResponsiveProp, G as getClipboard, H as copyToClipboard, I as EditorProvider, J as ensureIds } from "./SurveyWidgetEditor-DMWOkHUt.mjs";
5
+ import { M as MaterialIcon } from "./index-AePRA0IB.mjs";
6
6
  import { Swiper, SwiperSlide } from "swiper/react";
7
7
  import { Navigation, Pagination, Autoplay, Parallax, EffectFade, EffectCreative, EffectCoverflow, EffectCube, EffectFlip, Mousewheel } from "swiper/modules";
8
8
  import { useFetchClient, useStrapiApp } from "@strapi/strapi/admin";
9
- import * as XLSX from "xlsx";
9
+ import * as XLSXNs from "xlsx";
10
10
  function buildRichSampleRows(locale = "en") {
11
11
  const tr = locale === "tr";
12
12
  return [
@@ -922,196 +922,6 @@ function ensureCICanvasStyles() {
922
922
  style.textContent = buildCICanvasCss();
923
923
  document.head.appendChild(style);
924
924
  }
925
- const BP_INFIXES = ["", "-sm", "-md", "-lg", "-xl"];
926
- function extractResponsiveProp(lp, baseKey, camelKey) {
927
- if (!lp) return [null, null, null, null, null];
928
- const rawArr = lp[baseKey] ?? (camelKey ? lp[camelKey] : void 0);
929
- if (Array.isArray(rawArr)) {
930
- return BP_INFIXES.map((infix, idx) => {
931
- const explicitKey = `${baseKey}${infix}`;
932
- if (typeof lp[explicitKey] === "string" && lp[explicitKey]) {
933
- return lp[explicitKey];
934
- }
935
- const v = rawArr[idx];
936
- return typeof v === "string" && v ? v : null;
937
- });
938
- }
939
- return BP_INFIXES.map((infix, idx) => {
940
- const k = `${baseKey}${infix}`;
941
- if (typeof lp[k] === "string" && lp[k]) return lp[k];
942
- if (idx === 0 && camelKey && typeof lp[camelKey] === "string" && lp[camelKey]) {
943
- return lp[camelKey];
944
- }
945
- return null;
946
- });
947
- }
948
- function setResponsiveProp(lp, baseKey, bpIndex, value, camelKey) {
949
- const nextLp = { ...lp || {} };
950
- const arr = extractResponsiveProp(nextLp, baseKey, camelKey);
951
- const cleanVal = value && value.trim() ? value.trim() : null;
952
- arr[bpIndex] = cleanVal;
953
- const hasOtherValues = arr.some((v, i) => i !== bpIndex && v !== null);
954
- if (bpIndex !== 0 && !hasOtherValues && cleanVal !== null) {
955
- arr[0] = cleanVal;
956
- }
957
- nextLp[baseKey] = arr;
958
- if (camelKey) {
959
- nextLp[camelKey] = arr;
960
- }
961
- BP_INFIXES.forEach((infix, idx) => {
962
- if (idx === 0) return;
963
- const flatKey = `${baseKey}${infix}`;
964
- if (arr[idx]) {
965
- nextLp[flatKey] = arr[idx];
966
- } else {
967
- delete nextLp[flatKey];
968
- }
969
- });
970
- return nextLp;
971
- }
972
- function rowCanvasClasses(row = {}) {
973
- const classes = ["ci-grid"];
974
- const lp = row.layoutProps || {};
975
- if (lp.noGutters || lp["no-gutters"]) classes.push("ci-no-gutters");
976
- if (lp.fillHeight || lp["fill-height"]) classes.push("ci-fill-height");
977
- if (lp.reverse) classes.push("flex-row-reverse");
978
- if (lp.flexDirection === "column") classes.push("flex-column");
979
- const alignArr = extractResponsiveProp(lp, "align");
980
- const firstAlign = alignArr.find((v) => Boolean(v)) || null;
981
- if (!alignArr[0] && firstAlign) {
982
- classes.push(`ci-align-${firstAlign}`);
983
- }
984
- alignArr.forEach((val, idx) => {
985
- if (val && BP_INFIXES[idx] !== void 0) {
986
- classes.push(`ci-align${BP_INFIXES[idx]}-${val}`);
987
- }
988
- });
989
- const justifyArr = extractResponsiveProp(lp, "justify");
990
- const firstJustify = justifyArr.find((v) => Boolean(v)) || null;
991
- if (!justifyArr[0] && firstJustify) {
992
- classes.push(`ci-justify-${firstJustify}`);
993
- }
994
- justifyArr.forEach((val, idx) => {
995
- if (val && BP_INFIXES[idx] !== void 0) {
996
- classes.push(`ci-justify${BP_INFIXES[idx]}-${val}`);
997
- }
998
- });
999
- const textArr = extractResponsiveProp(lp, "text", "textAlign");
1000
- if (row.textAlign && !textArr[0]) {
1001
- textArr[0] = row.textAlign;
1002
- }
1003
- const firstText = textArr.find((v) => Boolean(v)) || null;
1004
- if (!textArr[0] && firstText) {
1005
- classes.push(`ci-text-${firstText}`);
1006
- }
1007
- textArr.forEach((val, idx) => {
1008
- if (val && BP_INFIXES[idx] !== void 0) {
1009
- classes.push(`ci-text${BP_INFIXES[idx]}-${val}`);
1010
- }
1011
- });
1012
- if (Array.isArray(row.extraClasses)) {
1013
- row.extraClasses.forEach((c) => {
1014
- if (c && typeof c === "string") classes.push(c);
1015
- });
1016
- }
1017
- return classes;
1018
- }
1019
- function blockCanvasClasses(block = {}) {
1020
- const classes = ["ci-col"];
1021
- const cols = Array.isArray(block.cols) && block.cols.length > 0 ? block.cols : [12, 12, 12, 12, 12];
1022
- BP_INFIXES.forEach((infix, idx) => {
1023
- const c = Math.max(1, Math.min(12, Number(cols[idx] ?? cols[0] ?? 12)));
1024
- classes.push(`ci-col${infix}-${c}`);
1025
- });
1026
- if (Array.isArray(block.offset)) {
1027
- BP_INFIXES.forEach((infix, idx) => {
1028
- const off = Number(block.offset?.[idx] || 0);
1029
- if (off > 0 && off <= 11) {
1030
- classes.push(`ci-offset${infix}-${off}`);
1031
- }
1032
- });
1033
- }
1034
- const lp = block.layoutProps || {};
1035
- const alignSelfArr = extractResponsiveProp(lp, "align-self", "alignSelf");
1036
- const firstAlignSelf = alignSelfArr.find((v) => Boolean(v)) || null;
1037
- if (!alignSelfArr[0] && firstAlignSelf) {
1038
- classes.push(`ci-align-self-${firstAlignSelf}`);
1039
- }
1040
- alignSelfArr.forEach((val, idx) => {
1041
- if (val && BP_INFIXES[idx] !== void 0) {
1042
- classes.push(`ci-align-self${BP_INFIXES[idx]}-${val}`);
1043
- }
1044
- });
1045
- const justifySelfArr = extractResponsiveProp(lp, "justify-self", "justifySelf");
1046
- const firstJustifySelf = justifySelfArr.find((v) => Boolean(v)) || null;
1047
- if (!justifySelfArr[0] && firstJustifySelf) {
1048
- classes.push(`ci-justify-self-${firstJustifySelf}`);
1049
- }
1050
- justifySelfArr.forEach((val, idx) => {
1051
- if (val && BP_INFIXES[idx] !== void 0) {
1052
- classes.push(`ci-justify-self${BP_INFIXES[idx]}-${val}`);
1053
- }
1054
- });
1055
- const textArr = extractResponsiveProp(lp, "text", "textAlign");
1056
- const firstText = textArr.find((v) => Boolean(v)) || null;
1057
- if (!textArr[0] && firstText) {
1058
- classes.push(`ci-text-${firstText}`);
1059
- }
1060
- textArr.forEach((val, idx) => {
1061
- if (val && BP_INFIXES[idx] !== void 0) {
1062
- classes.push(`ci-text${BP_INFIXES[idx]}-${val}`);
1063
- }
1064
- });
1065
- if (Array.isArray(block.extraClasses)) {
1066
- block.extraClasses.forEach((c) => {
1067
- if (c && typeof c === "string") classes.push(c);
1068
- });
1069
- }
1070
- return classes;
1071
- }
1072
- function nodeCanvasStyles(node) {
1073
- const so = node?.styleOptions || {};
1074
- const style = {};
1075
- if (so.padding) style.padding = so.padding;
1076
- if (so.margin) style.margin = so.margin;
1077
- if (so.height) style.height = so.height;
1078
- if (so.minHeight || so["min-height"]) {
1079
- style.minHeight = so.minHeight || so["min-height"];
1080
- }
1081
- if (so.maxHeight || so["max-height"]) {
1082
- style.maxHeight = so.maxHeight || so["max-height"];
1083
- }
1084
- if (so.fontSize || so["font-size"]) {
1085
- style.fontSize = so.fontSize || so["font-size"];
1086
- }
1087
- if (so.backgroundColor || so["background-color"]) {
1088
- style.backgroundColor = so.backgroundColor || so["background-color"];
1089
- }
1090
- if (so.color) style.color = so.color;
1091
- if (so.border) style.border = so.border;
1092
- if (so.borderTop || so["border-top"]) style.borderTop = so.borderTop || so["border-top"];
1093
- if (so.borderRight || so["border-right"])
1094
- style.borderRight = so.borderRight || so["border-right"];
1095
- if (so.borderBottom || so["border-bottom"])
1096
- style.borderBottom = so.borderBottom || so["border-bottom"];
1097
- if (so.borderLeft || so["border-left"]) style.borderLeft = so.borderLeft || so["border-left"];
1098
- if (so.outline) style.outline = so.outline;
1099
- if (so.borderRadius || so["border-radius"]) {
1100
- style.borderRadius = so.borderRadius || so["border-radius"];
1101
- }
1102
- const bgOpts = node?.bgOptions || {};
1103
- const bgUrl = node?.bgImage?.target_url || node?.bgImage?.url || bgOpts?.bgImage?.target_url || bgOpts?.bgImage?.url;
1104
- if (bgUrl) {
1105
- style.backgroundImage = `url("${bgUrl}")`;
1106
- style.backgroundSize = bgOpts["background-size"] || bgOpts.size || "cover";
1107
- style.backgroundPosition = bgOpts["background-position"] || bgOpts.position || "center center";
1108
- style.backgroundRepeat = bgOpts["background-repeat"] || bgOpts.repeat || "no-repeat";
1109
- if (bgOpts["background-attachment"] || bgOpts.attachment) {
1110
- style.backgroundAttachment = bgOpts["background-attachment"] || bgOpts.attachment;
1111
- }
1112
- }
1113
- return style;
1114
- }
1115
925
  const VENodeToolbar = ({
1116
926
  type,
1117
927
  label,
@@ -2708,7 +2518,7 @@ function summarizeRowWidgets(row, locale, tr) {
2708
2518
  }
2709
2519
  return `${blocks.length} ${tr ? "blok" : "blocks"} (${widgetLabels.join(", ")})`;
2710
2520
  }
2711
- const inputStyle$7 = {
2521
+ const inputStyle$8 = {
2712
2522
  width: "100%",
2713
2523
  padding: "6px 9px",
2714
2524
  fontSize: 12,
@@ -2717,7 +2527,7 @@ const inputStyle$7 = {
2717
2527
  background: "#fff",
2718
2528
  color: "#1e293b"
2719
2529
  };
2720
- const labelStyle$7 = {
2530
+ const labelStyle$8 = {
2721
2531
  display: "block",
2722
2532
  fontSize: 11,
2723
2533
  fontWeight: 600,
@@ -2906,13 +2716,13 @@ const TabAccordionEditor = ({ widget, onChange }) => {
2906
2716
  /* @__PURE__ */ jsx("div", { style: { fontSize: 11, fontWeight: 700, color: "#1e3a8a", marginBottom: 8 }, children: isTab ? tr ? "Sekme (Tab) Görünüm Seçenekleri" : "Tab Appearance Options" : tr ? "Akordiyon Görünüm Seçenekleri" : "Accordion Appearance Options" }),
2907
2717
  isTab ? /* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 8 }, children: [
2908
2718
  /* @__PURE__ */ jsxs("div", { children: [
2909
- /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Sekme Yönü" : "Tab Direction" }),
2719
+ /* @__PURE__ */ jsx("label", { style: labelStyle$8, children: tr ? "Sekme Yönü" : "Tab Direction" }),
2910
2720
  /* @__PURE__ */ jsxs(
2911
2721
  "select",
2912
2722
  {
2913
2723
  value: options.vertical ? "vertical" : "horizontal",
2914
2724
  onChange: (e) => updateOptions({ vertical: e.target.value === "vertical" }),
2915
- style: inputStyle$7,
2725
+ style: inputStyle$8,
2916
2726
  children: [
2917
2727
  /* @__PURE__ */ jsx("option", { value: "horizontal", children: tr ? "Yatay (Üst Sekmeler)" : "Horizontal (Top Tabs)" }),
2918
2728
  /* @__PURE__ */ jsx("option", { value: "vertical", children: tr ? "Düşey (Sol Yan Sekmeler)" : "Vertical (Side Tabs)" })
@@ -2921,7 +2731,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
2921
2731
  )
2922
2732
  ] }),
2923
2733
  /* @__PURE__ */ jsxs("div", { children: [
2924
- /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Hizalama" : "Alignment" }),
2734
+ /* @__PURE__ */ jsx("label", { style: labelStyle$8, children: tr ? "Hizalama" : "Alignment" }),
2925
2735
  /* @__PURE__ */ jsxs(
2926
2736
  "select",
2927
2737
  {
@@ -2934,7 +2744,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
2934
2744
  right: v === "right"
2935
2745
  });
2936
2746
  },
2937
- style: inputStyle$7,
2747
+ style: inputStyle$8,
2938
2748
  children: [
2939
2749
  /* @__PURE__ */ jsx("option", { value: "left", children: tr ? "Sola Yaslı" : "Left" }),
2940
2750
  /* @__PURE__ */ jsx("option", { value: "center", children: tr ? "Ortalı" : "Centered" }),
@@ -3029,7 +2839,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
3029
2839
  }
3030
2840
  ),
3031
2841
  isTab ? /* @__PURE__ */ jsxs("div", { children: [
3032
- /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Çizgi Kalınlığı (px)" : "Line Height (px)" }),
2842
+ /* @__PURE__ */ jsx("label", { style: labelStyle$8, children: tr ? "Çizgi Kalınlığı (px)" : "Line Height (px)" }),
3033
2843
  /* @__PURE__ */ jsx(
3034
2844
  "input",
3035
2845
  {
@@ -3040,7 +2850,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
3040
2850
  onChange: (e) => updateOptions({
3041
2851
  indicatorHeight: Math.max(1, Math.min(10, Number(e.target.value) || 3))
3042
2852
  }),
3043
- style: inputStyle$7
2853
+ style: inputStyle$8
3044
2854
  }
3045
2855
  )
3046
2856
  ] }) : /* @__PURE__ */ jsx(
@@ -3168,7 +2978,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
3168
2978
  placeholder: tr ? `${itemLabel} başlığı / sorusu...` : `${itemLabel} title / question...`,
3169
2979
  onChange: (e) => updateSingleNode(idx, { title: e.target.value }),
3170
2980
  style: {
3171
- ...inputStyle$7,
2981
+ ...inputStyle$8,
3172
2982
  fontWeight: 600,
3173
2983
  padding: "4px 8px",
3174
2984
  flex: 1
@@ -3919,7 +3729,7 @@ function appendToParentByUid(items, parentUid, newNodes) {
3919
3729
  }
3920
3730
  return false;
3921
3731
  }
3922
- const inputStyle$6 = {
3732
+ const inputStyle$7 = {
3923
3733
  width: "100%",
3924
3734
  padding: "6px 9px",
3925
3735
  fontSize: 12,
@@ -3928,7 +3738,7 @@ const inputStyle$6 = {
3928
3738
  background: "#fff",
3929
3739
  color: "#1e293b"
3930
3740
  };
3931
- const labelStyle$6 = {
3741
+ const labelStyle$7 = {
3932
3742
  display: "block",
3933
3743
  fontSize: 11,
3934
3744
  fontWeight: 600,
@@ -4463,31 +4273,31 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4463
4273
  },
4464
4274
  children: [
4465
4275
  /* @__PURE__ */ jsxs("div", { children: [
4466
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Başlık" : "Title" }),
4276
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Başlık" : "Title" }),
4467
4277
  /* @__PURE__ */ jsx(
4468
4278
  "input",
4469
4279
  {
4470
4280
  type: "text",
4471
4281
  value: node.title,
4472
4282
  onChange: (e) => handleUpdateNodeField(currentPath, { title: e.target.value }),
4473
- style: inputStyle$6
4283
+ style: inputStyle$7
4474
4284
  }
4475
4285
  )
4476
4286
  ] }),
4477
4287
  /* @__PURE__ */ jsxs("div", { children: [
4478
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "URL / Bağlantı" : "URL / Link" }),
4288
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "URL / Bağlantı" : "URL / Link" }),
4479
4289
  /* @__PURE__ */ jsx(
4480
4290
  "input",
4481
4291
  {
4482
4292
  type: "text",
4483
4293
  value: node.url,
4484
4294
  onChange: (e) => handleUpdateNodeField(currentPath, { url: e.target.value }),
4485
- style: inputStyle$6
4295
+ style: inputStyle$7
4486
4296
  }
4487
4297
  )
4488
4298
  ] }),
4489
4299
  /* @__PURE__ */ jsxs("div", { children: [
4490
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Hedef" : "Target" }),
4300
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Hedef" : "Target" }),
4491
4301
  /* @__PURE__ */ jsxs(
4492
4302
  "select",
4493
4303
  {
@@ -4495,7 +4305,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4495
4305
  onChange: (e) => handleUpdateNodeField(currentPath, {
4496
4306
  target: e.target.value
4497
4307
  }),
4498
- style: inputStyle$6,
4308
+ style: inputStyle$7,
4499
4309
  children: [
4500
4310
  /* @__PURE__ */ jsx("option", { value: "_self", children: tr ? "Aynı Sekme (_self)" : "Same Tab (_self)" }),
4501
4311
  /* @__PURE__ */ jsx("option", { value: "_blank", children: tr ? "Yeni Sekme (_blank)" : "New Tab (_blank)" })
@@ -4504,7 +4314,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4504
4314
  )
4505
4315
  ] }),
4506
4316
  /* @__PURE__ */ jsxs("div", { children: [
4507
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "İkon (Opsiyonel)" : "Icon (Optional)" }),
4317
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "İkon (Opsiyonel)" : "Icon (Optional)" }),
4508
4318
  /* @__PURE__ */ jsx(
4509
4319
  "input",
4510
4320
  {
@@ -4512,7 +4322,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4512
4322
  value: node.icon || "",
4513
4323
  placeholder: "e.g. home, business, mail",
4514
4324
  onChange: (e) => handleUpdateNodeField(currentPath, { icon: e.target.value }),
4515
- style: inputStyle$6
4325
+ style: inputStyle$7
4516
4326
  }
4517
4327
  )
4518
4328
  ] })
@@ -4613,7 +4423,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4613
4423
  },
4614
4424
  children: [
4615
4425
  /* @__PURE__ */ jsxs("div", { style: { marginBottom: 10 }, children: [
4616
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Menü Görünüm Yönü (Yatay / Düşey)" : "Menu Orientation (Horizontal / Vertical)" }),
4426
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Menü Görünüm Yönü (Yatay / Düşey)" : "Menu Orientation (Horizontal / Vertical)" }),
4617
4427
  /* @__PURE__ */ jsxs(
4618
4428
  "div",
4619
4429
  {
@@ -4695,14 +4505,14 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4695
4505
  )
4696
4506
  ] }),
4697
4507
  /* @__PURE__ */ jsxs("div", { style: { marginBottom: 8 }, children: [
4698
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Veritabanında Kayıtlı Menülerden Yükle (PostgreSQL)" : "Load from Saved Database Menus (PostgreSQL)" }),
4508
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Veritabanında Kayıtlı Menülerden Yükle (PostgreSQL)" : "Load from Saved Database Menus (PostgreSQL)" }),
4699
4509
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 6 }, children: [
4700
4510
  /* @__PURE__ */ jsxs(
4701
4511
  "select",
4702
4512
  {
4703
4513
  value: selectedDbMenuId,
4704
4514
  onChange: (e) => handleLoadDbMenu(e.target.value),
4705
- style: { ...inputStyle$6, flex: 1 },
4515
+ style: { ...inputStyle$7, flex: 1 },
4706
4516
  children: [
4707
4517
  /* @__PURE__ */ jsx("option", { value: "", children: tr ? "-- Kayıtlı Menü Seçin veya Özel Oluşturun --" : "-- Select a Saved Menu or Create Custom --" }),
4708
4518
  savedMenus.map((m) => /* @__PURE__ */ jsxs("option", { value: String(m._id || m.id), children: [
@@ -4738,26 +4548,26 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4738
4548
  ] }),
4739
4549
  /* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 8 }, children: [
4740
4550
  /* @__PURE__ */ jsxs("div", { children: [
4741
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Menü Başlığı" : "Menu Title" }),
4551
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Menü Başlığı" : "Menu Title" }),
4742
4552
  /* @__PURE__ */ jsx(
4743
4553
  "input",
4744
4554
  {
4745
4555
  type: "text",
4746
4556
  value: menuMeta.name,
4747
4557
  onChange: (e) => commitMenu(items, { name: e.target.value }),
4748
- style: inputStyle$6
4558
+ style: inputStyle$7
4749
4559
  }
4750
4560
  )
4751
4561
  ] }),
4752
4562
  /* @__PURE__ */ jsxs("div", { children: [
4753
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Menü Kodu (Slug)" : "Menu Code (Slug)" }),
4563
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Menü Kodu (Slug)" : "Menu Code (Slug)" }),
4754
4564
  /* @__PURE__ */ jsx(
4755
4565
  "input",
4756
4566
  {
4757
4567
  type: "text",
4758
4568
  value: menuMeta.id,
4759
4569
  onChange: (e) => commitMenu(items, { id: e.target.value }),
4760
- style: inputStyle$6
4570
+ style: inputStyle$7
4761
4571
  }
4762
4572
  )
4763
4573
  ] })
@@ -4926,13 +4736,13 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4926
4736
  ),
4927
4737
  /* @__PURE__ */ jsxs("div", { style: { padding: 10 }, children: [
4928
4738
  /* @__PURE__ */ jsxs("div", { style: { marginBottom: 8 }, children: [
4929
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Eklenecek Konum (Üst Menü Öğesi)" : "Target Location (Parent Menu Item)" }),
4739
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Eklenecek Konum (Üst Menü Öğesi)" : "Target Location (Parent Menu Item)" }),
4930
4740
  /* @__PURE__ */ jsxs(
4931
4741
  "select",
4932
4742
  {
4933
4743
  value: targetParentUid,
4934
4744
  onChange: (e) => setTargetParentUid(e.target.value),
4935
- style: inputStyle$6,
4745
+ style: inputStyle$7,
4936
4746
  children: [
4937
4747
  /* @__PURE__ */ jsx("option", { value: "__root__", children: tr ? "Ana (Kök) Düzeye Ekle" : "Add to Root Level" }),
4938
4748
  flatParentChoices.map((ch) => /* @__PURE__ */ jsxs("option", { value: ch._uId, children: [
@@ -4957,7 +4767,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4957
4767
  },
4958
4768
  children: [
4959
4769
  /* @__PURE__ */ jsxs("div", { children: [
4960
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Strapi Modülü (Content-Type)" : "Strapi Content-Type" }),
4770
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Strapi Modülü (Content-Type)" : "Strapi Content-Type" }),
4961
4771
  /* @__PURE__ */ jsx(
4962
4772
  "select",
4963
4773
  {
@@ -4966,7 +4776,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
4966
4776
  setSelectedEntityUid(e.target.value);
4967
4777
  setCheckedEntityMap({});
4968
4778
  },
4969
- style: inputStyle$6,
4779
+ style: inputStyle$7,
4970
4780
  children: entityTypes.length === 0 ? /* @__PURE__ */ jsx("option", { value: "api::page.page", children: tr ? "Sayfalar (api::page.page)" : "Pages (api::page.page)" }) : entityTypes.map((ct) => /* @__PURE__ */ jsxs("option", { value: ct.uid, children: [
4971
4781
  ct.displayName,
4972
4782
  " (",
@@ -5036,7 +4846,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
5036
4846
  value: entitySearch,
5037
4847
  onChange: (e) => setEntitySearch(e.target.value),
5038
4848
  placeholder: tr ? "Strapi kayıtlarında başlık veya URL ara..." : "Search title or URL in Strapi entries...",
5039
- style: { ...inputStyle$6, paddingLeft: 28 }
4849
+ style: { ...inputStyle$7, paddingLeft: 28 }
5040
4850
  }
5041
4851
  ),
5042
4852
  /* @__PURE__ */ jsx("span", { style: { position: "absolute", left: 8, top: 7, pointerEvents: "none" }, children: /* @__PURE__ */ jsx(MaterialIcon, { name: "search", size: 15, color: "#94a3b8" }) })
@@ -5111,7 +4921,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
5111
4921
  ] }) : /* @__PURE__ */ jsxs("div", { children: [
5112
4922
  /* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 8 }, children: [
5113
4923
  /* @__PURE__ */ jsxs("div", { children: [
5114
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Bağlantı Başlığı" : "Link Title" }),
4924
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Bağlantı Başlığı" : "Link Title" }),
5115
4925
  /* @__PURE__ */ jsx(
5116
4926
  "input",
5117
4927
  {
@@ -5119,12 +4929,12 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
5119
4929
  value: customTitle,
5120
4930
  onChange: (e) => setCustomTitle(e.target.value),
5121
4931
  placeholder: tr ? "örn: Kurumsal Portal" : "e.g. Corporate Portal",
5122
- style: inputStyle$6
4932
+ style: inputStyle$7
5123
4933
  }
5124
4934
  )
5125
4935
  ] }),
5126
4936
  /* @__PURE__ */ jsxs("div", { children: [
5127
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Bağlantı URL" : "Link URL" }),
4937
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Bağlantı URL" : "Link URL" }),
5128
4938
  /* @__PURE__ */ jsx(
5129
4939
  "input",
5130
4940
  {
@@ -5132,20 +4942,20 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
5132
4942
  value: customUrl,
5133
4943
  onChange: (e) => setCustomUrl(e.target.value),
5134
4944
  placeholder: "https://... or /about",
5135
- style: inputStyle$6
4945
+ style: inputStyle$7
5136
4946
  }
5137
4947
  )
5138
4948
  ] })
5139
4949
  ] }),
5140
4950
  /* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 8 }, children: [
5141
4951
  /* @__PURE__ */ jsxs("div", { children: [
5142
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Hedef Sekme" : "Target Tab" }),
4952
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "Hedef Sekme" : "Target Tab" }),
5143
4953
  /* @__PURE__ */ jsxs(
5144
4954
  "select",
5145
4955
  {
5146
4956
  value: customTarget,
5147
4957
  onChange: (e) => setCustomTarget(e.target.value),
5148
- style: inputStyle$6,
4958
+ style: inputStyle$7,
5149
4959
  children: [
5150
4960
  /* @__PURE__ */ jsx("option", { value: "_self", children: tr ? "Aynı Sekme (_self)" : "Same Tab (_self)" }),
5151
4961
  /* @__PURE__ */ jsx("option", { value: "_blank", children: tr ? "Yeni Sekme (_blank)" : "New Tab (_blank)" })
@@ -5154,7 +4964,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
5154
4964
  )
5155
4965
  ] }),
5156
4966
  /* @__PURE__ */ jsxs("div", { children: [
5157
- /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "İkon (Opsiyonel)" : "Icon (Optional)" }),
4967
+ /* @__PURE__ */ jsx("label", { style: labelStyle$7, children: tr ? "İkon (Opsiyonel)" : "Icon (Optional)" }),
5158
4968
  /* @__PURE__ */ jsx(
5159
4969
  "input",
5160
4970
  {
@@ -5162,7 +4972,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
5162
4972
  value: customIcon,
5163
4973
  onChange: (e) => setCustomIcon(e.target.value),
5164
4974
  placeholder: "e.g. home, launch",
5165
- style: inputStyle$6
4975
+ style: inputStyle$7
5166
4976
  }
5167
4977
  )
5168
4978
  ] })
@@ -5586,6 +5396,130 @@ const UnitInput = ({
5586
5396
  )
5587
5397
  ] });
5588
5398
  };
5399
+ const inputStyle$6 = {
5400
+ width: "100%",
5401
+ padding: "6px 8px",
5402
+ fontSize: 12,
5403
+ border: "1px solid #cbd5e1",
5404
+ borderRadius: 5,
5405
+ background: "#ffffff",
5406
+ color: "#0f172a"
5407
+ };
5408
+ const labelStyle$6 = {
5409
+ display: "block",
5410
+ fontSize: 11,
5411
+ fontWeight: 600,
5412
+ color: "#475569",
5413
+ marginBottom: 4
5414
+ };
5415
+ const CIImageSettingsControl = ({
5416
+ value,
5417
+ onChange,
5418
+ locale = "en",
5419
+ label,
5420
+ defaultWidth = 800,
5421
+ defaultHeight = 600,
5422
+ compact = false
5423
+ }) => {
5424
+ const tr = String(locale || "en").toLowerCase().startsWith("tr");
5425
+ const rawProc = String(value?.process || "");
5426
+ const mode = rawProc === "fit" ? "fit" : rawProc === "widen" ? "widen" : rawProc === "none" || rawProc === "no-process" ? "none" : "auto";
5427
+ const cWidth = Number(value?.cWidth) || defaultWidth;
5428
+ const cHeight = Number(value?.cHeight) || defaultHeight;
5429
+ const headingText = label || (tr ? "Görsel Optimizasyon & Boyutlandırma (Sharp / CDN WebP)" : "Image Optimization & Sizing (Sharp / CDN WebP)");
5430
+ return /* @__PURE__ */ jsxs(
5431
+ "div",
5432
+ {
5433
+ style: {
5434
+ padding: compact ? 8 : 10,
5435
+ border: "1px solid #e2e8f0",
5436
+ borderRadius: 6,
5437
+ background: "#f8fafc",
5438
+ display: "flex",
5439
+ flexDirection: "column",
5440
+ gap: 8
5441
+ },
5442
+ children: [
5443
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 5 }, children: [
5444
+ /* @__PURE__ */ jsx(MaterialIcon, { name: "auto_fix_high", size: 14, color: "#2669a0" }),
5445
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 11, fontWeight: 700, color: "#1e293b" }, children: headingText })
5446
+ ] }),
5447
+ /* @__PURE__ */ jsxs(
5448
+ "select",
5449
+ {
5450
+ value: mode,
5451
+ onChange: (e) => {
5452
+ const nextMode = e.target.value;
5453
+ onChange({
5454
+ ...value || {},
5455
+ process: nextMode === "auto" ? "" : nextMode,
5456
+ cWidth,
5457
+ cHeight
5458
+ });
5459
+ },
5460
+ style: inputStyle$6,
5461
+ children: [
5462
+ /* @__PURE__ */ jsx("option", { value: "auto", children: tr ? "Otomatik Optimize (WebP • ci-optimized)" : "Auto Optimize (WebP • ci-optimized)" }),
5463
+ /* @__PURE__ */ jsx("option", { value: "fit", children: tr ? "Tam Boyut / Kırparak Sığdır (Fit W × H WebP)" : "Exact Fit / Crop (Fit W × H WebP)" }),
5464
+ /* @__PURE__ */ jsx("option", { value: "widen", children: tr ? "Genişliğe Ölçekle (Widen W WebP)" : "Scale to Width (Widen W WebP)" }),
5465
+ /* @__PURE__ */ jsx("option", { value: "none", children: tr ? "Orijinal Dosya (Sharp İşlemi Yok)" : "Original File (No Sharp Processing)" })
5466
+ ]
5467
+ }
5468
+ ),
5469
+ (mode === "fit" || mode === "widen") && /* @__PURE__ */ jsxs(
5470
+ "div",
5471
+ {
5472
+ style: {
5473
+ display: "grid",
5474
+ gridTemplateColumns: mode === "fit" ? "1fr 1fr" : "1fr",
5475
+ gap: 8
5476
+ },
5477
+ children: [
5478
+ /* @__PURE__ */ jsxs("div", { children: [
5479
+ /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Genişlik (px)" : "Width (px)" }),
5480
+ /* @__PURE__ */ jsx(
5481
+ "input",
5482
+ {
5483
+ type: "number",
5484
+ min: 50,
5485
+ max: 3840,
5486
+ value: cWidth,
5487
+ onChange: (e) => onChange({
5488
+ ...value || {},
5489
+ process: mode,
5490
+ cWidth: Number(e.target.value) || defaultWidth,
5491
+ cHeight
5492
+ }),
5493
+ style: inputStyle$6
5494
+ }
5495
+ )
5496
+ ] }),
5497
+ mode === "fit" && /* @__PURE__ */ jsxs("div", { children: [
5498
+ /* @__PURE__ */ jsx("label", { style: labelStyle$6, children: tr ? "Yükseklik (px)" : "Height (px)" }),
5499
+ /* @__PURE__ */ jsx(
5500
+ "input",
5501
+ {
5502
+ type: "number",
5503
+ min: 50,
5504
+ max: 3840,
5505
+ value: cHeight,
5506
+ onChange: (e) => onChange({
5507
+ ...value || {},
5508
+ process: mode,
5509
+ cWidth,
5510
+ cHeight: Number(e.target.value) || defaultHeight
5511
+ }),
5512
+ style: inputStyle$6
5513
+ }
5514
+ )
5515
+ ] })
5516
+ ]
5517
+ }
5518
+ )
5519
+ ]
5520
+ }
5521
+ );
5522
+ };
5589
5523
  function resolveEntityCardPreviewData(rawData, rawOptions, locale = "en") {
5590
5524
  const tr = locale === "tr";
5591
5525
  const data = rawData && typeof rawData === "object" ? rawData : {};
@@ -7093,6 +7027,23 @@ const EntityCardWidgetEditor = ({
7093
7027
  )
7094
7028
  ] })
7095
7029
  ] }),
7030
+ /* @__PURE__ */ jsx(
7031
+ CIImageSettingsControl,
7032
+ {
7033
+ value: options.imageSettings || cardProps.imageSettings,
7034
+ onChange: (next) => onChange({
7035
+ options: {
7036
+ ...options,
7037
+ imageSettings: next,
7038
+ cardProps: { ...cardProps, imageSettings: next }
7039
+ }
7040
+ }),
7041
+ defaultWidth: 960,
7042
+ defaultHeight: 540,
7043
+ compact: true,
7044
+ locale
7045
+ }
7046
+ ),
7096
7047
  /* @__PURE__ */ jsx(
7097
7048
  CIColorField,
7098
7049
  {
@@ -10861,6 +10812,17 @@ const HeroSliderStudioModal = ({
10861
10812
  onChange: (asset) => updateLayer(selectedLayerIdx, { image: asset })
10862
10813
  }
10863
10814
  ),
10815
+ activeLayer.image && /* @__PURE__ */ jsx(
10816
+ CIImageSettingsControl,
10817
+ {
10818
+ value: activeLayer.imageSettings,
10819
+ onChange: (next) => updateLayer(selectedLayerIdx, { imageSettings: next }),
10820
+ defaultWidth: 1e3,
10821
+ defaultHeight: 1e3,
10822
+ compact: true,
10823
+ locale: uiLocale
10824
+ }
10825
+ ),
10864
10826
  activeLayer.positionMode !== "free" && /* @__PURE__ */ jsxs("div", { children: [
10865
10827
  /* @__PURE__ */ jsx("label", { style: labelStyle$4, children: tr ? "Görsel Genişliği" : "Image Width" }),
10866
10828
  /* @__PURE__ */ jsx(
@@ -11254,14 +11216,27 @@ const HeroSliderStudioModal = ({
11254
11216
  }
11255
11217
  )
11256
11218
  ] }),
11257
- activeSlide.bgType === "image" && /* @__PURE__ */ jsx(
11258
- StrapiMediaPicker,
11259
- {
11260
- label: tr ? "Slayt Arka Plan Görseli" : "Slide Background Image",
11261
- value: activeSlide.bgImage || null,
11262
- onChange: (asset) => updateSlide(selectedSlideIdx, { bgImage: asset })
11263
- }
11264
- ),
11219
+ activeSlide.bgType === "image" && /* @__PURE__ */ jsxs(Fragment, { children: [
11220
+ /* @__PURE__ */ jsx(
11221
+ StrapiMediaPicker,
11222
+ {
11223
+ label: tr ? "Slayt Arka Plan Görseli" : "Slide Background Image",
11224
+ value: activeSlide.bgImage || null,
11225
+ onChange: (asset) => updateSlide(selectedSlideIdx, { bgImage: asset })
11226
+ }
11227
+ ),
11228
+ activeSlide.bgImage && /* @__PURE__ */ jsx(
11229
+ CIImageSettingsControl,
11230
+ {
11231
+ value: activeSlide.imageSettings,
11232
+ onChange: (next) => updateSlide(selectedSlideIdx, { imageSettings: next }),
11233
+ defaultWidth: 1920,
11234
+ defaultHeight: 1080,
11235
+ compact: true,
11236
+ locale: uiLocale
11237
+ }
11238
+ )
11239
+ ] }),
11265
11240
  activeSlide.bgType === "gradient" && /* @__PURE__ */ jsxs("div", { children: [
11266
11241
  /* @__PURE__ */ jsx("label", { style: labelStyle$4, children: "CSS Gradient" }),
11267
11242
  /* @__PURE__ */ jsx(
@@ -11338,14 +11313,27 @@ const HeroSliderStudioModal = ({
11338
11313
  ]
11339
11314
  }
11340
11315
  ),
11341
- activeSlide.mobileBgType === "image" && /* @__PURE__ */ jsx(
11342
- StrapiMediaPicker,
11343
- {
11344
- label: tr ? "Mobil Dikey Görsel" : "Mobile Portrait Image",
11345
- value: activeSlide.mobileBgImage || null,
11346
- onChange: (asset) => updateSlide(selectedSlideIdx, { mobileBgImage: asset })
11347
- }
11348
- ),
11316
+ activeSlide.mobileBgType === "image" && /* @__PURE__ */ jsxs(Fragment, { children: [
11317
+ /* @__PURE__ */ jsx(
11318
+ StrapiMediaPicker,
11319
+ {
11320
+ label: tr ? "Mobil Dikey Görsel" : "Mobile Portrait Image",
11321
+ value: activeSlide.mobileBgImage || null,
11322
+ onChange: (asset) => updateSlide(selectedSlideIdx, { mobileBgImage: asset })
11323
+ }
11324
+ ),
11325
+ activeSlide.mobileBgImage && /* @__PURE__ */ jsx(
11326
+ CIImageSettingsControl,
11327
+ {
11328
+ value: activeSlide.mobileImageSettings,
11329
+ onChange: (next) => updateSlide(selectedSlideIdx, { mobileImageSettings: next }),
11330
+ defaultWidth: 1080,
11331
+ defaultHeight: 1350,
11332
+ compact: true,
11333
+ locale: uiLocale
11334
+ }
11335
+ )
11336
+ ] }),
11349
11337
  activeSlide.mobileBgType === "gradient" && /* @__PURE__ */ jsx(
11350
11338
  "input",
11351
11339
  {
@@ -12279,7 +12267,7 @@ const DataTableStudioModal = ({
12279
12267
  const importFromWorkbookSheet = (wb, sheetName, fileName) => {
12280
12268
  const ws = wb.Sheets[sheetName];
12281
12269
  if (!ws) return;
12282
- const jsonRows = XLSX.utils.sheet_to_json(ws, {
12270
+ const jsonRows = XLSXNs.utils.sheet_to_json(ws, {
12283
12271
  defval: "",
12284
12272
  raw: true
12285
12273
  });
@@ -12358,7 +12346,7 @@ const DataTableStudioModal = ({
12358
12346
  reader.onload = () => {
12359
12347
  try {
12360
12348
  const buf = reader.result;
12361
- const wb = XLSX.read(buf, { type: "array", cellDates: true });
12349
+ const wb = XLSXNs.read(buf, { type: "array", cellDates: true });
12362
12350
  workbookRef.current = wb;
12363
12351
  const names = Array.isArray(wb.SheetNames) ? wb.SheetNames : [];
12364
12352
  setSheetNames(names);
@@ -13938,7 +13926,7 @@ const DataTableStudioModal = ({
13938
13926
  { key: "bordered", label: tr ? "Tablo Kenarlıkları" : "Table Borders" },
13939
13927
  {
13940
13928
  key: "exportCsv",
13941
- label: tr ? "Ziyaretçi CSV İndirme Butonu" : "Visitor CSV Download Button"
13929
+ label: tr ? "Ziyaretçi Excel (.xlsx) & CSV İndirme" : "Visitor Excel (.xlsx) & CSV Export"
13942
13930
  }
13943
13931
  ].map((sw) => /* @__PURE__ */ jsxs(
13944
13932
  "label",
@@ -15633,6 +15621,17 @@ const CustomCardStudioModal = ({
15633
15621
  compact: true,
15634
15622
  locale: uiLocale
15635
15623
  }
15624
+ ),
15625
+ /* @__PURE__ */ jsx(
15626
+ CIImageSettingsControl,
15627
+ {
15628
+ value: data.design.imageSettings,
15629
+ onChange: (next) => updateDesign({ imageSettings: next }),
15630
+ defaultWidth: 960,
15631
+ defaultHeight: 540,
15632
+ compact: true,
15633
+ locale: uiLocale
15634
+ }
15636
15635
  )
15637
15636
  ] }),
15638
15637
  rightTab === "layout" && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
@@ -16019,23 +16018,8 @@ function resolveYoutubeVideoId(raw) {
16019
16018
  if (extracted === "dQw4w9WgXcQ") return "M7lc1UVf-VE";
16020
16019
  return extracted;
16021
16020
  }
16022
- function buildSharpImageUrl(rawUrl, imageSettings) {
16023
- if (!rawUrl) return "";
16024
- if (!imageSettings || !imageSettings.process) return rawUrl;
16025
- const proc = String(imageSettings.process).toLowerCase();
16026
- if (proc !== "fit" && proc !== "widen") return rawUrl;
16027
- const w = Number(imageSettings.cWidth) || 0;
16028
- const h = Number(imageSettings.cHeight) || 0;
16029
- if (w <= 0 && h <= 0) return rawUrl;
16030
- if (rawUrl.includes("/api/content-input/image") || rawUrl.includes("/content-input/image")) {
16031
- return rawUrl;
16032
- }
16033
- const params = new URLSearchParams();
16034
- params.set("src", rawUrl);
16035
- params.set("process", proc);
16036
- if (w > 0) params.set("w", String(w));
16037
- if (proc === "fit" && h > 0) params.set("h", String(h));
16038
- return `/api/content-input/image?${params.toString()}`;
16021
+ function buildSharpImageUrl(assetOrUrl, imageSettings) {
16022
+ return resolveCanvasMediaUrl(assetOrUrl, imageSettings);
16039
16023
  }
16040
16024
  function pickLocalized(val, locale, fallback = "") {
16041
16025
  if (!val) return fallback;
@@ -17760,7 +17744,8 @@ const WidgetPreview = ({
17760
17744
  ) });
17761
17745
  }
17762
17746
  if (id === "singleImage") {
17763
- const imgUrl = data?.image?.target_url || data?.image?.url || data?.url || "";
17747
+ const imgAsset = data?.image || data?.url || "";
17748
+ const imgUrl = buildSharpImageUrl(imgAsset, options?.imageSettings || data?.imageSettings);
17764
17749
  const alt = data?.alt || data?.image?.caption || t("widgets.singleImage.label");
17765
17750
  const caption = data?.caption || "";
17766
17751
  const borderRadius = toCssLength(data?.borderRadius, "4px");
@@ -17879,7 +17864,7 @@ const WidgetPreview = ({
17879
17864
  if (galleryPopupIndex === null || typeof document === "undefined") return null;
17880
17865
  const safePopIdx = (galleryPopupIndex % images.length + images.length) % images.length;
17881
17866
  const popImg = images[safePopIdx];
17882
- const popUrl = popImg?.target_url || popImg?.url || "";
17867
+ const popUrl = popImg?.formats?.ci_auto_1920x0?.url || popImg?.optimized_url || popImg?.target_url || popImg?.url || "";
17883
17868
  const popCaption = popImg?.caption || popImg?.filename || `${t("widgets.gallery.label")} ${safePopIdx + 1}`;
17884
17869
  return createPortal(
17885
17870
  /* @__PURE__ */ jsx(
@@ -18083,7 +18068,7 @@ const WidgetPreview = ({
18083
18068
  children: /* @__PURE__ */ jsx(
18084
18069
  "img",
18085
18070
  {
18086
- src: buildSharpImageUrl(img.target_url || img.url, imageSettings),
18071
+ src: buildSharpImageUrl(img, imageSettings),
18087
18072
  alt: img.caption || `${t("widgets.gallery.label")} ${i + 1}`,
18088
18073
  style: {
18089
18074
  width: "100%",
@@ -18169,8 +18154,8 @@ const WidgetPreview = ({
18169
18154
  onSlideChange: (s) => setGalleryIndex(s.realIndex ?? s.activeIndex ?? 0),
18170
18155
  style: { width: "100%" },
18171
18156
  children: images.map((item, index) => {
18172
- const rawSlideUrl = item?.target_url || item?.url || "";
18173
- const slideUrl = buildSharpImageUrl(rawSlideUrl, imageSettings);
18157
+ const rawSlideUrl = item?.optimized_url || item?.target_url || item?.url || "";
18158
+ const slideUrl = buildSharpImageUrl(item, imageSettings);
18174
18159
  return /* @__PURE__ */ jsx(SwiperSlide, { children: /* @__PURE__ */ jsxs(
18175
18160
  "div",
18176
18161
  {
@@ -18299,7 +18284,8 @@ const WidgetPreview = ({
18299
18284
  const title = first?.title || first?.snippet?.title || t("widgets.youtubeVideo.label");
18300
18285
  const activeTitle = activeVideo?.title || activeVideo?.snippet?.title || title;
18301
18286
  const description = first?.description || first?.snippet?.description || "";
18302
- const customThumbUrl = first?.customThumbnail?.target_url || first?.customThumbnail?.url || first?.image?.target_url || first?.image?.url || options?.thumbnailImage?.target_url || options?.thumbnailImage?.url || options?.bgImage?.target_url || options?.bgImage?.url || "";
18287
+ const customThumbAsset = first?.customThumbnail || first?.image || options?.thumbnailImage || options?.bgImage || null;
18288
+ const customThumbUrl = customThumbAsset ? buildSharpImageUrl(customThumbAsset, options?.imageSettings) : "";
18303
18289
  const rawThumb = first?.thumbnail || first?.snippet?.thumbnails?.high?.url || "";
18304
18290
  const safeRawThumb = rawThumb && !rawThumb.includes("dQw4w9WgXcQ") ? rawThumb : `https://img.youtube.com/vi/${previewVideoId}/hqdefault.jpg`;
18305
18291
  const thumb = customThumbUrl || safeRawThumb;
@@ -19078,19 +19064,21 @@ const WidgetPreview = ({
19078
19064
  );
19079
19065
  }
19080
19066
  if (id === "banner") {
19081
- const name = data?.banner?.name || t("widgets.banner.defaultTitle");
19067
+ const name = (typeof data?.title === "object" ? data.title?.text : data?.title) || data?.banner?.name || t("widgets.banner.defaultTitle");
19082
19068
  const type = options?.type || "grid";
19069
+ const bannerImgUrl = data?.image ? buildSharpImageUrl(data.image, options?.imageSettings || data?.imageSettings) : "";
19083
19070
  return /* @__PURE__ */ jsx(
19084
19071
  "div",
19085
19072
  {
19086
19073
  style: {
19087
19074
  padding: 16,
19088
19075
  borderRadius: 6,
19089
- background: "linear-gradient(135deg, #1e3a8a 0%, #2669a0 100%)",
19076
+ background: bannerImgUrl ? `linear-gradient(rgba(15, 23, 42, 0.52), rgba(15, 23, 42, 0.52)), url("${bannerImgUrl}") center / cover no-repeat` : "linear-gradient(135deg, #1e3a8a 0%, #2669a0 100%)",
19090
19077
  color: "#fff",
19091
19078
  display: "flex",
19092
19079
  alignItems: "center",
19093
- justifyContent: "space-between"
19080
+ justifyContent: "space-between",
19081
+ minHeight: bannerImgUrl ? 120 : void 0
19094
19082
  },
19095
19083
  children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10 }, children: [
19096
19084
  /* @__PURE__ */ jsx(MaterialIcon, { name: "featured_video", size: 24, color: "#93c5fd" }),
@@ -25791,6 +25779,17 @@ const WidgetEditor = ({ widget, onChange }) => {
25791
25779
  })
25792
25780
  }
25793
25781
  ) }),
25782
+ sData.image && /* @__PURE__ */ jsx("div", { style: fieldWrapStyle, children: /* @__PURE__ */ jsx(
25783
+ CIImageSettingsControl,
25784
+ {
25785
+ value: options.imageSettings,
25786
+ onChange: (next) => updateOptions({ imageSettings: next }),
25787
+ defaultWidth: 1200,
25788
+ defaultHeight: 800,
25789
+ compact: true,
25790
+ locale
25791
+ }
25792
+ ) }),
25794
25793
  /* @__PURE__ */ jsxs("div", { style: fieldWrapStyle, children: [
25795
25794
  /* @__PURE__ */ jsx("label", { style: labelStyle, children: t("altText") }),
25796
25795
  /* @__PURE__ */ jsx(
@@ -26570,87 +26569,15 @@ const WidgetEditor = ({ widget, onChange }) => {
26570
26569
  }
26571
26570
  )
26572
26571
  ),
26573
- /* @__PURE__ */ jsxs(
26574
- "div",
26572
+ /* @__PURE__ */ jsx(
26573
+ CIImageSettingsControl,
26575
26574
  {
26576
- style: {
26577
- padding: 10,
26578
- border: "1px solid #e2e8f0",
26579
- borderRadius: 6,
26580
- background: "#f8fafc"
26581
- },
26582
- children: [
26583
- /* @__PURE__ */ jsx("label", { style: labelStyle, children: t("imageProcessSettings") }),
26584
- /* @__PURE__ */ jsxs(
26585
- "select",
26586
- {
26587
- value: imageSettings.process || "",
26588
- onChange: (e) => updateOptions({
26589
- imageSettings: {
26590
- ...imageSettings,
26591
- process: e.target.value
26592
- }
26593
- }),
26594
- style: inputStyle,
26595
- children: [
26596
- /* @__PURE__ */ jsx("option", { value: "", children: t("imageProcessNone") }),
26597
- /* @__PURE__ */ jsx("option", { value: "fit", children: t("imageProcessFit") }),
26598
- /* @__PURE__ */ jsx("option", { value: "widen", children: t("imageProcessWiden") })
26599
- ]
26600
- }
26601
- ),
26602
- (imageSettings.process === "fit" || imageSettings.process === "widen") && /* @__PURE__ */ jsxs(
26603
- "div",
26604
- {
26605
- style: {
26606
- display: "grid",
26607
- gridTemplateColumns: imageSettings.process === "fit" ? "1fr 1fr" : "1fr",
26608
- gap: 8,
26609
- marginTop: 8
26610
- },
26611
- children: [
26612
- /* @__PURE__ */ jsxs("div", { children: [
26613
- /* @__PURE__ */ jsx("label", { style: labelStyle, children: t("cropWidth") }),
26614
- /* @__PURE__ */ jsx(
26615
- "input",
26616
- {
26617
- type: "number",
26618
- min: 50,
26619
- max: 3840,
26620
- value: imageSettings.cWidth ?? 640,
26621
- onChange: (e) => updateOptions({
26622
- imageSettings: {
26623
- ...imageSettings,
26624
- cWidth: Number(e.target.value) || 640
26625
- }
26626
- }),
26627
- style: inputStyle
26628
- }
26629
- )
26630
- ] }),
26631
- imageSettings.process === "fit" && /* @__PURE__ */ jsxs("div", { children: [
26632
- /* @__PURE__ */ jsx("label", { style: labelStyle, children: t("cropHeight") }),
26633
- /* @__PURE__ */ jsx(
26634
- "input",
26635
- {
26636
- type: "number",
26637
- min: 50,
26638
- max: 3840,
26639
- value: imageSettings.cHeight ?? 480,
26640
- onChange: (e) => updateOptions({
26641
- imageSettings: {
26642
- ...imageSettings,
26643
- cHeight: Number(e.target.value) || 480
26644
- }
26645
- }),
26646
- style: inputStyle
26647
- }
26648
- )
26649
- ] })
26650
- ]
26651
- }
26652
- )
26653
- ]
26575
+ label: t("imageProcessSettings"),
26576
+ value: imageSettings,
26577
+ onChange: (next) => updateOptions({ imageSettings: next }),
26578
+ defaultWidth: 640,
26579
+ defaultHeight: 480,
26580
+ locale
26654
26581
  }
26655
26582
  ),
26656
26583
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
@@ -26944,14 +26871,27 @@ const WidgetEditor = ({ widget, onChange }) => {
26944
26871
  }
26945
26872
  )
26946
26873
  ] }),
26947
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
26948
- StrapiMediaPicker,
26949
- {
26950
- label: t("youtubeCoverImage"),
26951
- value: currentThumbAsset,
26952
- onChange: handleCustomThumbnailChange
26953
- }
26954
- ) })
26874
+ /* @__PURE__ */ jsxs("div", { children: [
26875
+ /* @__PURE__ */ jsx(
26876
+ StrapiMediaPicker,
26877
+ {
26878
+ label: t("youtubeCoverImage"),
26879
+ value: currentThumbAsset,
26880
+ onChange: handleCustomThumbnailChange
26881
+ }
26882
+ ),
26883
+ currentThumbAsset && /* @__PURE__ */ jsx("div", { style: { marginTop: 8 }, children: /* @__PURE__ */ jsx(
26884
+ CIImageSettingsControl,
26885
+ {
26886
+ value: options.imageSettings,
26887
+ onChange: (next) => updateOptions({ imageSettings: next }),
26888
+ defaultWidth: 1280,
26889
+ defaultHeight: 720,
26890
+ compact: true,
26891
+ locale
26892
+ }
26893
+ ) })
26894
+ ] })
26955
26895
  ]
26956
26896
  }
26957
26897
  ),
@@ -27183,6 +27123,17 @@ const WidgetEditor = ({ widget, onChange }) => {
27183
27123
  onChange: (asset) => updateData({ ...bnData, image: asset })
27184
27124
  }
27185
27125
  ) }),
27126
+ bnData.image && /* @__PURE__ */ jsx("div", { style: fieldWrapStyle, children: /* @__PURE__ */ jsx(
27127
+ CIImageSettingsControl,
27128
+ {
27129
+ value: options.imageSettings,
27130
+ onChange: (next) => updateOptions({ imageSettings: next }),
27131
+ defaultWidth: 1600,
27132
+ defaultHeight: 600,
27133
+ compact: true,
27134
+ locale
27135
+ }
27136
+ ) }),
27186
27137
  /* @__PURE__ */ jsxs("div", { style: fieldWrapStyle, children: [
27187
27138
  /* @__PURE__ */ jsx("label", { style: labelStyle, children: t("title") }),
27188
27139
  /* @__PURE__ */ jsx(
@@ -27911,7 +27862,7 @@ const BgOptionsEditor = ({
27911
27862
  showParallax = false,
27912
27863
  onChange
27913
27864
  }) => {
27914
- const { t } = useEditorContext();
27865
+ const { t, locale } = useEditorContext();
27915
27866
  const opts = bgOptions || {};
27916
27867
  const pOpts = parallaxOptions || {
27917
27868
  type: "scroll",
@@ -27947,6 +27898,17 @@ const BgOptionsEditor = ({
27947
27898
  gap: 8
27948
27899
  },
27949
27900
  children: [
27901
+ /* @__PURE__ */ jsx(
27902
+ CIImageSettingsControl,
27903
+ {
27904
+ value: opts.imageSettings,
27905
+ onChange: (next) => updateBgOpt("imageSettings", next),
27906
+ defaultWidth: 1920,
27907
+ defaultHeight: 1080,
27908
+ compact: true,
27909
+ locale
27910
+ }
27911
+ ),
27950
27912
  /* @__PURE__ */ jsxs("div", { children: [
27951
27913
  /* @__PURE__ */ jsx("label", { style: fieldLabelStyle, children: t("backgroundSize") }),
27952
27914
  /* @__PURE__ */ jsxs(