@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.
- package/README.md +42 -13
- package/dist/admin/{AnalyticsHubPage-DsrcGI_Y.mjs → AnalyticsHubPage-Dvpx3KsP.mjs} +168 -55
- package/dist/admin/{AnalyticsHubPage-0p0Mx4AU.js → AnalyticsHubPage-K_trli5i.js} +186 -55
- package/dist/admin/{ContentInputField-CHXrzvE-.mjs → ContentInputField-C2kmtUwD.mjs} +328 -366
- package/dist/admin/{ContentInputField-7rWLSx_7.js → ContentInputField-CjxYYEps.js} +343 -381
- package/dist/admin/{SurveyWidgetEditor-BVN6X_3G.mjs → SurveyWidgetEditor-DMWOkHUt.mjs} +3271 -227
- package/dist/admin/{SurveyWidgetEditor-BmgYQaQS.js → SurveyWidgetEditor-DOYxWop9.js} +3247 -203
- package/dist/admin/{index-hFIuYqu5.mjs → index-AePRA0IB.mjs} +2 -2
- package/dist/admin/{index-CZAwXCFH.js → index-B9C8Qrfd.js} +2 -2
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/components/common/CIImageSettingsControl.d.ts +17 -0
- package/dist/admin/src/components/widgets/CustomCardWidgetEditor.d.ts +1 -0
- package/dist/admin/src/components/widgets/HeroSliderStage.d.ts +3 -0
- package/dist/admin/src/components/widgets/SurveyLivePreviewPane.d.ts +9 -0
- package/dist/admin/src/components/widgets/SurveyWidgetEditor.d.ts +3 -1
- package/dist/admin/src/core/canvasClasses.d.ts +1 -0
- package/dist/admin/src/core/types.d.ts +12 -0
- package/dist/server/index.js +1359 -196
- package/dist/server/index.mjs +1341 -196
- package/dist/server/src/config/index.d.ts +4 -0
- package/dist/server/src/controllers/ci-image.d.ts +11 -2
- package/dist/server/src/controllers/index.d.ts +1 -0
- package/dist/server/src/index.d.ts +15 -1
- package/dist/server/src/services/ci-survey.d.ts +10 -1
- package/dist/server/src/services/index.d.ts +10 -1
- package/dist/server/src/utils/image-variants.d.ts +74 -0
- package/dist/server/src/utils/surveyEngine.d.ts +5 -0
- package/package.json +1 -1
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const ReactDOM = require("react-dom");
|
|
6
|
-
const SurveyWidgetEditor = require("./SurveyWidgetEditor-
|
|
7
|
-
const index = require("./index-
|
|
6
|
+
const SurveyWidgetEditor = require("./SurveyWidgetEditor-DOYxWop9.js");
|
|
7
|
+
const index = require("./index-B9C8Qrfd.js");
|
|
8
8
|
const react = require("swiper/react");
|
|
9
9
|
const modules = require("swiper/modules");
|
|
10
10
|
const admin = require("@strapi/strapi/admin");
|
|
11
|
-
const
|
|
11
|
+
const XLSXNs = require("xlsx");
|
|
12
12
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
13
13
|
function _interopNamespace(e) {
|
|
14
14
|
if (e && e.__esModule) return e;
|
|
@@ -28,7 +28,7 @@ function _interopNamespace(e) {
|
|
|
28
28
|
return Object.freeze(n);
|
|
29
29
|
}
|
|
30
30
|
const React__default = /* @__PURE__ */ _interopDefault(React);
|
|
31
|
-
const
|
|
31
|
+
const XLSXNs__namespace = /* @__PURE__ */ _interopNamespace(XLSXNs);
|
|
32
32
|
function buildRichSampleRows(locale = "en") {
|
|
33
33
|
const tr = locale === "tr";
|
|
34
34
|
return [
|
|
@@ -944,196 +944,6 @@ function ensureCICanvasStyles() {
|
|
|
944
944
|
style.textContent = buildCICanvasCss();
|
|
945
945
|
document.head.appendChild(style);
|
|
946
946
|
}
|
|
947
|
-
const BP_INFIXES = ["", "-sm", "-md", "-lg", "-xl"];
|
|
948
|
-
function extractResponsiveProp(lp, baseKey, camelKey) {
|
|
949
|
-
if (!lp) return [null, null, null, null, null];
|
|
950
|
-
const rawArr = lp[baseKey] ?? (camelKey ? lp[camelKey] : void 0);
|
|
951
|
-
if (Array.isArray(rawArr)) {
|
|
952
|
-
return BP_INFIXES.map((infix, idx) => {
|
|
953
|
-
const explicitKey = `${baseKey}${infix}`;
|
|
954
|
-
if (typeof lp[explicitKey] === "string" && lp[explicitKey]) {
|
|
955
|
-
return lp[explicitKey];
|
|
956
|
-
}
|
|
957
|
-
const v = rawArr[idx];
|
|
958
|
-
return typeof v === "string" && v ? v : null;
|
|
959
|
-
});
|
|
960
|
-
}
|
|
961
|
-
return BP_INFIXES.map((infix, idx) => {
|
|
962
|
-
const k = `${baseKey}${infix}`;
|
|
963
|
-
if (typeof lp[k] === "string" && lp[k]) return lp[k];
|
|
964
|
-
if (idx === 0 && camelKey && typeof lp[camelKey] === "string" && lp[camelKey]) {
|
|
965
|
-
return lp[camelKey];
|
|
966
|
-
}
|
|
967
|
-
return null;
|
|
968
|
-
});
|
|
969
|
-
}
|
|
970
|
-
function setResponsiveProp(lp, baseKey, bpIndex, value, camelKey) {
|
|
971
|
-
const nextLp = { ...lp || {} };
|
|
972
|
-
const arr = extractResponsiveProp(nextLp, baseKey, camelKey);
|
|
973
|
-
const cleanVal = value && value.trim() ? value.trim() : null;
|
|
974
|
-
arr[bpIndex] = cleanVal;
|
|
975
|
-
const hasOtherValues = arr.some((v, i) => i !== bpIndex && v !== null);
|
|
976
|
-
if (bpIndex !== 0 && !hasOtherValues && cleanVal !== null) {
|
|
977
|
-
arr[0] = cleanVal;
|
|
978
|
-
}
|
|
979
|
-
nextLp[baseKey] = arr;
|
|
980
|
-
if (camelKey) {
|
|
981
|
-
nextLp[camelKey] = arr;
|
|
982
|
-
}
|
|
983
|
-
BP_INFIXES.forEach((infix, idx) => {
|
|
984
|
-
if (idx === 0) return;
|
|
985
|
-
const flatKey = `${baseKey}${infix}`;
|
|
986
|
-
if (arr[idx]) {
|
|
987
|
-
nextLp[flatKey] = arr[idx];
|
|
988
|
-
} else {
|
|
989
|
-
delete nextLp[flatKey];
|
|
990
|
-
}
|
|
991
|
-
});
|
|
992
|
-
return nextLp;
|
|
993
|
-
}
|
|
994
|
-
function rowCanvasClasses(row = {}) {
|
|
995
|
-
const classes = ["ci-grid"];
|
|
996
|
-
const lp = row.layoutProps || {};
|
|
997
|
-
if (lp.noGutters || lp["no-gutters"]) classes.push("ci-no-gutters");
|
|
998
|
-
if (lp.fillHeight || lp["fill-height"]) classes.push("ci-fill-height");
|
|
999
|
-
if (lp.reverse) classes.push("flex-row-reverse");
|
|
1000
|
-
if (lp.flexDirection === "column") classes.push("flex-column");
|
|
1001
|
-
const alignArr = extractResponsiveProp(lp, "align");
|
|
1002
|
-
const firstAlign = alignArr.find((v) => Boolean(v)) || null;
|
|
1003
|
-
if (!alignArr[0] && firstAlign) {
|
|
1004
|
-
classes.push(`ci-align-${firstAlign}`);
|
|
1005
|
-
}
|
|
1006
|
-
alignArr.forEach((val, idx) => {
|
|
1007
|
-
if (val && BP_INFIXES[idx] !== void 0) {
|
|
1008
|
-
classes.push(`ci-align${BP_INFIXES[idx]}-${val}`);
|
|
1009
|
-
}
|
|
1010
|
-
});
|
|
1011
|
-
const justifyArr = extractResponsiveProp(lp, "justify");
|
|
1012
|
-
const firstJustify = justifyArr.find((v) => Boolean(v)) || null;
|
|
1013
|
-
if (!justifyArr[0] && firstJustify) {
|
|
1014
|
-
classes.push(`ci-justify-${firstJustify}`);
|
|
1015
|
-
}
|
|
1016
|
-
justifyArr.forEach((val, idx) => {
|
|
1017
|
-
if (val && BP_INFIXES[idx] !== void 0) {
|
|
1018
|
-
classes.push(`ci-justify${BP_INFIXES[idx]}-${val}`);
|
|
1019
|
-
}
|
|
1020
|
-
});
|
|
1021
|
-
const textArr = extractResponsiveProp(lp, "text", "textAlign");
|
|
1022
|
-
if (row.textAlign && !textArr[0]) {
|
|
1023
|
-
textArr[0] = row.textAlign;
|
|
1024
|
-
}
|
|
1025
|
-
const firstText = textArr.find((v) => Boolean(v)) || null;
|
|
1026
|
-
if (!textArr[0] && firstText) {
|
|
1027
|
-
classes.push(`ci-text-${firstText}`);
|
|
1028
|
-
}
|
|
1029
|
-
textArr.forEach((val, idx) => {
|
|
1030
|
-
if (val && BP_INFIXES[idx] !== void 0) {
|
|
1031
|
-
classes.push(`ci-text${BP_INFIXES[idx]}-${val}`);
|
|
1032
|
-
}
|
|
1033
|
-
});
|
|
1034
|
-
if (Array.isArray(row.extraClasses)) {
|
|
1035
|
-
row.extraClasses.forEach((c) => {
|
|
1036
|
-
if (c && typeof c === "string") classes.push(c);
|
|
1037
|
-
});
|
|
1038
|
-
}
|
|
1039
|
-
return classes;
|
|
1040
|
-
}
|
|
1041
|
-
function blockCanvasClasses(block = {}) {
|
|
1042
|
-
const classes = ["ci-col"];
|
|
1043
|
-
const cols = Array.isArray(block.cols) && block.cols.length > 0 ? block.cols : [12, 12, 12, 12, 12];
|
|
1044
|
-
BP_INFIXES.forEach((infix, idx) => {
|
|
1045
|
-
const c = Math.max(1, Math.min(12, Number(cols[idx] ?? cols[0] ?? 12)));
|
|
1046
|
-
classes.push(`ci-col${infix}-${c}`);
|
|
1047
|
-
});
|
|
1048
|
-
if (Array.isArray(block.offset)) {
|
|
1049
|
-
BP_INFIXES.forEach((infix, idx) => {
|
|
1050
|
-
const off = Number(block.offset?.[idx] || 0);
|
|
1051
|
-
if (off > 0 && off <= 11) {
|
|
1052
|
-
classes.push(`ci-offset${infix}-${off}`);
|
|
1053
|
-
}
|
|
1054
|
-
});
|
|
1055
|
-
}
|
|
1056
|
-
const lp = block.layoutProps || {};
|
|
1057
|
-
const alignSelfArr = extractResponsiveProp(lp, "align-self", "alignSelf");
|
|
1058
|
-
const firstAlignSelf = alignSelfArr.find((v) => Boolean(v)) || null;
|
|
1059
|
-
if (!alignSelfArr[0] && firstAlignSelf) {
|
|
1060
|
-
classes.push(`ci-align-self-${firstAlignSelf}`);
|
|
1061
|
-
}
|
|
1062
|
-
alignSelfArr.forEach((val, idx) => {
|
|
1063
|
-
if (val && BP_INFIXES[idx] !== void 0) {
|
|
1064
|
-
classes.push(`ci-align-self${BP_INFIXES[idx]}-${val}`);
|
|
1065
|
-
}
|
|
1066
|
-
});
|
|
1067
|
-
const justifySelfArr = extractResponsiveProp(lp, "justify-self", "justifySelf");
|
|
1068
|
-
const firstJustifySelf = justifySelfArr.find((v) => Boolean(v)) || null;
|
|
1069
|
-
if (!justifySelfArr[0] && firstJustifySelf) {
|
|
1070
|
-
classes.push(`ci-justify-self-${firstJustifySelf}`);
|
|
1071
|
-
}
|
|
1072
|
-
justifySelfArr.forEach((val, idx) => {
|
|
1073
|
-
if (val && BP_INFIXES[idx] !== void 0) {
|
|
1074
|
-
classes.push(`ci-justify-self${BP_INFIXES[idx]}-${val}`);
|
|
1075
|
-
}
|
|
1076
|
-
});
|
|
1077
|
-
const textArr = extractResponsiveProp(lp, "text", "textAlign");
|
|
1078
|
-
const firstText = textArr.find((v) => Boolean(v)) || null;
|
|
1079
|
-
if (!textArr[0] && firstText) {
|
|
1080
|
-
classes.push(`ci-text-${firstText}`);
|
|
1081
|
-
}
|
|
1082
|
-
textArr.forEach((val, idx) => {
|
|
1083
|
-
if (val && BP_INFIXES[idx] !== void 0) {
|
|
1084
|
-
classes.push(`ci-text${BP_INFIXES[idx]}-${val}`);
|
|
1085
|
-
}
|
|
1086
|
-
});
|
|
1087
|
-
if (Array.isArray(block.extraClasses)) {
|
|
1088
|
-
block.extraClasses.forEach((c) => {
|
|
1089
|
-
if (c && typeof c === "string") classes.push(c);
|
|
1090
|
-
});
|
|
1091
|
-
}
|
|
1092
|
-
return classes;
|
|
1093
|
-
}
|
|
1094
|
-
function nodeCanvasStyles(node) {
|
|
1095
|
-
const so = node?.styleOptions || {};
|
|
1096
|
-
const style = {};
|
|
1097
|
-
if (so.padding) style.padding = so.padding;
|
|
1098
|
-
if (so.margin) style.margin = so.margin;
|
|
1099
|
-
if (so.height) style.height = so.height;
|
|
1100
|
-
if (so.minHeight || so["min-height"]) {
|
|
1101
|
-
style.minHeight = so.minHeight || so["min-height"];
|
|
1102
|
-
}
|
|
1103
|
-
if (so.maxHeight || so["max-height"]) {
|
|
1104
|
-
style.maxHeight = so.maxHeight || so["max-height"];
|
|
1105
|
-
}
|
|
1106
|
-
if (so.fontSize || so["font-size"]) {
|
|
1107
|
-
style.fontSize = so.fontSize || so["font-size"];
|
|
1108
|
-
}
|
|
1109
|
-
if (so.backgroundColor || so["background-color"]) {
|
|
1110
|
-
style.backgroundColor = so.backgroundColor || so["background-color"];
|
|
1111
|
-
}
|
|
1112
|
-
if (so.color) style.color = so.color;
|
|
1113
|
-
if (so.border) style.border = so.border;
|
|
1114
|
-
if (so.borderTop || so["border-top"]) style.borderTop = so.borderTop || so["border-top"];
|
|
1115
|
-
if (so.borderRight || so["border-right"])
|
|
1116
|
-
style.borderRight = so.borderRight || so["border-right"];
|
|
1117
|
-
if (so.borderBottom || so["border-bottom"])
|
|
1118
|
-
style.borderBottom = so.borderBottom || so["border-bottom"];
|
|
1119
|
-
if (so.borderLeft || so["border-left"]) style.borderLeft = so.borderLeft || so["border-left"];
|
|
1120
|
-
if (so.outline) style.outline = so.outline;
|
|
1121
|
-
if (so.borderRadius || so["border-radius"]) {
|
|
1122
|
-
style.borderRadius = so.borderRadius || so["border-radius"];
|
|
1123
|
-
}
|
|
1124
|
-
const bgOpts = node?.bgOptions || {};
|
|
1125
|
-
const bgUrl = node?.bgImage?.target_url || node?.bgImage?.url || bgOpts?.bgImage?.target_url || bgOpts?.bgImage?.url;
|
|
1126
|
-
if (bgUrl) {
|
|
1127
|
-
style.backgroundImage = `url("${bgUrl}")`;
|
|
1128
|
-
style.backgroundSize = bgOpts["background-size"] || bgOpts.size || "cover";
|
|
1129
|
-
style.backgroundPosition = bgOpts["background-position"] || bgOpts.position || "center center";
|
|
1130
|
-
style.backgroundRepeat = bgOpts["background-repeat"] || bgOpts.repeat || "no-repeat";
|
|
1131
|
-
if (bgOpts["background-attachment"] || bgOpts.attachment) {
|
|
1132
|
-
style.backgroundAttachment = bgOpts["background-attachment"] || bgOpts.attachment;
|
|
1133
|
-
}
|
|
1134
|
-
}
|
|
1135
|
-
return style;
|
|
1136
|
-
}
|
|
1137
947
|
const VENodeToolbar = ({
|
|
1138
948
|
type,
|
|
1139
949
|
label,
|
|
@@ -2730,7 +2540,7 @@ function summarizeRowWidgets(row, locale, tr) {
|
|
|
2730
2540
|
}
|
|
2731
2541
|
return `${blocks.length} ${tr ? "blok" : "blocks"} (${widgetLabels.join(", ")})`;
|
|
2732
2542
|
}
|
|
2733
|
-
const inputStyle$
|
|
2543
|
+
const inputStyle$8 = {
|
|
2734
2544
|
width: "100%",
|
|
2735
2545
|
padding: "6px 9px",
|
|
2736
2546
|
fontSize: 12,
|
|
@@ -2739,7 +2549,7 @@ const inputStyle$7 = {
|
|
|
2739
2549
|
background: "#fff",
|
|
2740
2550
|
color: "#1e293b"
|
|
2741
2551
|
};
|
|
2742
|
-
const labelStyle$
|
|
2552
|
+
const labelStyle$8 = {
|
|
2743
2553
|
display: "block",
|
|
2744
2554
|
fontSize: 11,
|
|
2745
2555
|
fontWeight: 600,
|
|
@@ -2928,13 +2738,13 @@ const TabAccordionEditor = ({ widget, onChange }) => {
|
|
|
2928
2738
|
/* @__PURE__ */ jsxRuntime.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" }),
|
|
2929
2739
|
isTab ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 8 }, children: [
|
|
2930
2740
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2931
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$
|
|
2741
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$8, children: tr ? "Sekme Yönü" : "Tab Direction" }),
|
|
2932
2742
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2933
2743
|
"select",
|
|
2934
2744
|
{
|
|
2935
2745
|
value: options.vertical ? "vertical" : "horizontal",
|
|
2936
2746
|
onChange: (e) => updateOptions({ vertical: e.target.value === "vertical" }),
|
|
2937
|
-
style: inputStyle$
|
|
2747
|
+
style: inputStyle$8,
|
|
2938
2748
|
children: [
|
|
2939
2749
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "horizontal", children: tr ? "Yatay (Üst Sekmeler)" : "Horizontal (Top Tabs)" }),
|
|
2940
2750
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "vertical", children: tr ? "Düşey (Sol Yan Sekmeler)" : "Vertical (Side Tabs)" })
|
|
@@ -2943,7 +2753,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
|
|
|
2943
2753
|
)
|
|
2944
2754
|
] }),
|
|
2945
2755
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2946
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$
|
|
2756
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$8, children: tr ? "Hizalama" : "Alignment" }),
|
|
2947
2757
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2948
2758
|
"select",
|
|
2949
2759
|
{
|
|
@@ -2956,7 +2766,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
|
|
|
2956
2766
|
right: v === "right"
|
|
2957
2767
|
});
|
|
2958
2768
|
},
|
|
2959
|
-
style: inputStyle$
|
|
2769
|
+
style: inputStyle$8,
|
|
2960
2770
|
children: [
|
|
2961
2771
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "left", children: tr ? "Sola Yaslı" : "Left" }),
|
|
2962
2772
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "center", children: tr ? "Ortalı" : "Centered" }),
|
|
@@ -3051,7 +2861,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
|
|
|
3051
2861
|
}
|
|
3052
2862
|
),
|
|
3053
2863
|
isTab ? /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3054
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$
|
|
2864
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$8, children: tr ? "Çizgi Kalınlığı (px)" : "Line Height (px)" }),
|
|
3055
2865
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3056
2866
|
"input",
|
|
3057
2867
|
{
|
|
@@ -3062,7 +2872,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
|
|
|
3062
2872
|
onChange: (e) => updateOptions({
|
|
3063
2873
|
indicatorHeight: Math.max(1, Math.min(10, Number(e.target.value) || 3))
|
|
3064
2874
|
}),
|
|
3065
|
-
style: inputStyle$
|
|
2875
|
+
style: inputStyle$8
|
|
3066
2876
|
}
|
|
3067
2877
|
)
|
|
3068
2878
|
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3190,7 +3000,7 @@ const TabAccordionEditor = ({ widget, onChange }) => {
|
|
|
3190
3000
|
placeholder: tr ? `${itemLabel} başlığı / sorusu...` : `${itemLabel} title / question...`,
|
|
3191
3001
|
onChange: (e) => updateSingleNode(idx, { title: e.target.value }),
|
|
3192
3002
|
style: {
|
|
3193
|
-
...inputStyle$
|
|
3003
|
+
...inputStyle$8,
|
|
3194
3004
|
fontWeight: 600,
|
|
3195
3005
|
padding: "4px 8px",
|
|
3196
3006
|
flex: 1
|
|
@@ -3941,7 +3751,7 @@ function appendToParentByUid(items, parentUid, newNodes) {
|
|
|
3941
3751
|
}
|
|
3942
3752
|
return false;
|
|
3943
3753
|
}
|
|
3944
|
-
const inputStyle$
|
|
3754
|
+
const inputStyle$7 = {
|
|
3945
3755
|
width: "100%",
|
|
3946
3756
|
padding: "6px 9px",
|
|
3947
3757
|
fontSize: 12,
|
|
@@ -3950,7 +3760,7 @@ const inputStyle$6 = {
|
|
|
3950
3760
|
background: "#fff",
|
|
3951
3761
|
color: "#1e293b"
|
|
3952
3762
|
};
|
|
3953
|
-
const labelStyle$
|
|
3763
|
+
const labelStyle$7 = {
|
|
3954
3764
|
display: "block",
|
|
3955
3765
|
fontSize: 11,
|
|
3956
3766
|
fontWeight: 600,
|
|
@@ -4485,31 +4295,31 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
|
|
|
4485
4295
|
},
|
|
4486
4296
|
children: [
|
|
4487
4297
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
4488
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$
|
|
4298
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Başlık" : "Title" }),
|
|
4489
4299
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4490
4300
|
"input",
|
|
4491
4301
|
{
|
|
4492
4302
|
type: "text",
|
|
4493
4303
|
value: node.title,
|
|
4494
4304
|
onChange: (e) => handleUpdateNodeField(currentPath, { title: e.target.value }),
|
|
4495
|
-
style: inputStyle$
|
|
4305
|
+
style: inputStyle$7
|
|
4496
4306
|
}
|
|
4497
4307
|
)
|
|
4498
4308
|
] }),
|
|
4499
4309
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
4500
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$
|
|
4310
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "URL / Bağlantı" : "URL / Link" }),
|
|
4501
4311
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4502
4312
|
"input",
|
|
4503
4313
|
{
|
|
4504
4314
|
type: "text",
|
|
4505
4315
|
value: node.url,
|
|
4506
4316
|
onChange: (e) => handleUpdateNodeField(currentPath, { url: e.target.value }),
|
|
4507
|
-
style: inputStyle$
|
|
4317
|
+
style: inputStyle$7
|
|
4508
4318
|
}
|
|
4509
4319
|
)
|
|
4510
4320
|
] }),
|
|
4511
4321
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
4512
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$
|
|
4322
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Hedef" : "Target" }),
|
|
4513
4323
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4514
4324
|
"select",
|
|
4515
4325
|
{
|
|
@@ -4517,7 +4327,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
|
|
|
4517
4327
|
onChange: (e) => handleUpdateNodeField(currentPath, {
|
|
4518
4328
|
target: e.target.value
|
|
4519
4329
|
}),
|
|
4520
|
-
style: inputStyle$
|
|
4330
|
+
style: inputStyle$7,
|
|
4521
4331
|
children: [
|
|
4522
4332
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "_self", children: tr ? "Aynı Sekme (_self)" : "Same Tab (_self)" }),
|
|
4523
4333
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "_blank", children: tr ? "Yeni Sekme (_blank)" : "New Tab (_blank)" })
|
|
@@ -4526,7 +4336,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
|
|
|
4526
4336
|
)
|
|
4527
4337
|
] }),
|
|
4528
4338
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
4529
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$
|
|
4339
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "İkon (Opsiyonel)" : "Icon (Optional)" }),
|
|
4530
4340
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4531
4341
|
"input",
|
|
4532
4342
|
{
|
|
@@ -4534,7 +4344,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
|
|
|
4534
4344
|
value: node.icon || "",
|
|
4535
4345
|
placeholder: "e.g. home, business, mail",
|
|
4536
4346
|
onChange: (e) => handleUpdateNodeField(currentPath, { icon: e.target.value }),
|
|
4537
|
-
style: inputStyle$
|
|
4347
|
+
style: inputStyle$7
|
|
4538
4348
|
}
|
|
4539
4349
|
)
|
|
4540
4350
|
] })
|
|
@@ -4635,7 +4445,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
|
|
|
4635
4445
|
},
|
|
4636
4446
|
children: [
|
|
4637
4447
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 10 }, children: [
|
|
4638
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$
|
|
4448
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Menü Görünüm Yönü (Yatay / Düşey)" : "Menu Orientation (Horizontal / Vertical)" }),
|
|
4639
4449
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4640
4450
|
"div",
|
|
4641
4451
|
{
|
|
@@ -4717,14 +4527,14 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
|
|
|
4717
4527
|
)
|
|
4718
4528
|
] }),
|
|
4719
4529
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 8 }, children: [
|
|
4720
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$
|
|
4530
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Veritabanında Kayıtlı Menülerden Yükle (PostgreSQL)" : "Load from Saved Database Menus (PostgreSQL)" }),
|
|
4721
4531
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 6 }, children: [
|
|
4722
4532
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4723
4533
|
"select",
|
|
4724
4534
|
{
|
|
4725
4535
|
value: selectedDbMenuId,
|
|
4726
4536
|
onChange: (e) => handleLoadDbMenu(e.target.value),
|
|
4727
|
-
style: { ...inputStyle$
|
|
4537
|
+
style: { ...inputStyle$7, flex: 1 },
|
|
4728
4538
|
children: [
|
|
4729
4539
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: tr ? "-- Kayıtlı Menü Seçin veya Özel Oluşturun --" : "-- Select a Saved Menu or Create Custom --" }),
|
|
4730
4540
|
savedMenus.map((m) => /* @__PURE__ */ jsxRuntime.jsxs("option", { value: String(m._id || m.id), children: [
|
|
@@ -4760,26 +4570,26 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
|
|
|
4760
4570
|
] }),
|
|
4761
4571
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 8 }, children: [
|
|
4762
4572
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
4763
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$
|
|
4573
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Menü Başlığı" : "Menu Title" }),
|
|
4764
4574
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4765
4575
|
"input",
|
|
4766
4576
|
{
|
|
4767
4577
|
type: "text",
|
|
4768
4578
|
value: menuMeta.name,
|
|
4769
4579
|
onChange: (e) => commitMenu(items, { name: e.target.value }),
|
|
4770
|
-
style: inputStyle$
|
|
4580
|
+
style: inputStyle$7
|
|
4771
4581
|
}
|
|
4772
4582
|
)
|
|
4773
4583
|
] }),
|
|
4774
4584
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
4775
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$
|
|
4585
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Menü Kodu (Slug)" : "Menu Code (Slug)" }),
|
|
4776
4586
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4777
4587
|
"input",
|
|
4778
4588
|
{
|
|
4779
4589
|
type: "text",
|
|
4780
4590
|
value: menuMeta.id,
|
|
4781
4591
|
onChange: (e) => commitMenu(items, { id: e.target.value }),
|
|
4782
|
-
style: inputStyle$
|
|
4592
|
+
style: inputStyle$7
|
|
4783
4593
|
}
|
|
4784
4594
|
)
|
|
4785
4595
|
] })
|
|
@@ -4948,13 +4758,13 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
|
|
|
4948
4758
|
),
|
|
4949
4759
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: 10 }, children: [
|
|
4950
4760
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 8 }, children: [
|
|
4951
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$
|
|
4761
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Eklenecek Konum (Üst Menü Öğesi)" : "Target Location (Parent Menu Item)" }),
|
|
4952
4762
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4953
4763
|
"select",
|
|
4954
4764
|
{
|
|
4955
4765
|
value: targetParentUid,
|
|
4956
4766
|
onChange: (e) => setTargetParentUid(e.target.value),
|
|
4957
|
-
style: inputStyle$
|
|
4767
|
+
style: inputStyle$7,
|
|
4958
4768
|
children: [
|
|
4959
4769
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "__root__", children: tr ? "Ana (Kök) Düzeye Ekle" : "Add to Root Level" }),
|
|
4960
4770
|
flatParentChoices.map((ch) => /* @__PURE__ */ jsxRuntime.jsxs("option", { value: ch._uId, children: [
|
|
@@ -4979,7 +4789,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
|
|
|
4979
4789
|
},
|
|
4980
4790
|
children: [
|
|
4981
4791
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
4982
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$
|
|
4792
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Strapi Modülü (Content-Type)" : "Strapi Content-Type" }),
|
|
4983
4793
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4984
4794
|
"select",
|
|
4985
4795
|
{
|
|
@@ -4988,7 +4798,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
|
|
|
4988
4798
|
setSelectedEntityUid(e.target.value);
|
|
4989
4799
|
setCheckedEntityMap({});
|
|
4990
4800
|
},
|
|
4991
|
-
style: inputStyle$
|
|
4801
|
+
style: inputStyle$7,
|
|
4992
4802
|
children: entityTypes.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("option", { value: "api::page.page", children: tr ? "Sayfalar (api::page.page)" : "Pages (api::page.page)" }) : entityTypes.map((ct) => /* @__PURE__ */ jsxRuntime.jsxs("option", { value: ct.uid, children: [
|
|
4993
4803
|
ct.displayName,
|
|
4994
4804
|
" (",
|
|
@@ -5058,7 +4868,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
|
|
|
5058
4868
|
value: entitySearch,
|
|
5059
4869
|
onChange: (e) => setEntitySearch(e.target.value),
|
|
5060
4870
|
placeholder: tr ? "Strapi kayıtlarında başlık veya URL ara..." : "Search title or URL in Strapi entries...",
|
|
5061
|
-
style: { ...inputStyle$
|
|
4871
|
+
style: { ...inputStyle$7, paddingLeft: 28 }
|
|
5062
4872
|
}
|
|
5063
4873
|
),
|
|
5064
4874
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "absolute", left: 8, top: 7, pointerEvents: "none" }, children: /* @__PURE__ */ jsxRuntime.jsx(index.MaterialIcon, { name: "search", size: 15, color: "#94a3b8" }) })
|
|
@@ -5133,7 +4943,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
|
|
|
5133
4943
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5134
4944
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 8 }, children: [
|
|
5135
4945
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5136
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$
|
|
4946
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Bağlantı Başlığı" : "Link Title" }),
|
|
5137
4947
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5138
4948
|
"input",
|
|
5139
4949
|
{
|
|
@@ -5141,12 +4951,12 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
|
|
|
5141
4951
|
value: customTitle,
|
|
5142
4952
|
onChange: (e) => setCustomTitle(e.target.value),
|
|
5143
4953
|
placeholder: tr ? "örn: Kurumsal Portal" : "e.g. Corporate Portal",
|
|
5144
|
-
style: inputStyle$
|
|
4954
|
+
style: inputStyle$7
|
|
5145
4955
|
}
|
|
5146
4956
|
)
|
|
5147
4957
|
] }),
|
|
5148
4958
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5149
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$
|
|
4959
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Bağlantı URL" : "Link URL" }),
|
|
5150
4960
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5151
4961
|
"input",
|
|
5152
4962
|
{
|
|
@@ -5154,20 +4964,20 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
|
|
|
5154
4964
|
value: customUrl,
|
|
5155
4965
|
onChange: (e) => setCustomUrl(e.target.value),
|
|
5156
4966
|
placeholder: "https://... or /about",
|
|
5157
|
-
style: inputStyle$
|
|
4967
|
+
style: inputStyle$7
|
|
5158
4968
|
}
|
|
5159
4969
|
)
|
|
5160
4970
|
] })
|
|
5161
4971
|
] }),
|
|
5162
4972
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 8 }, children: [
|
|
5163
4973
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5164
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$
|
|
4974
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "Hedef Sekme" : "Target Tab" }),
|
|
5165
4975
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5166
4976
|
"select",
|
|
5167
4977
|
{
|
|
5168
4978
|
value: customTarget,
|
|
5169
4979
|
onChange: (e) => setCustomTarget(e.target.value),
|
|
5170
|
-
style: inputStyle$
|
|
4980
|
+
style: inputStyle$7,
|
|
5171
4981
|
children: [
|
|
5172
4982
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "_self", children: tr ? "Aynı Sekme (_self)" : "Same Tab (_self)" }),
|
|
5173
4983
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "_blank", children: tr ? "Yeni Sekme (_blank)" : "New Tab (_blank)" })
|
|
@@ -5176,7 +4986,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
|
|
|
5176
4986
|
)
|
|
5177
4987
|
] }),
|
|
5178
4988
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5179
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$
|
|
4989
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$7, children: tr ? "İkon (Opsiyonel)" : "Icon (Optional)" }),
|
|
5180
4990
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5181
4991
|
"input",
|
|
5182
4992
|
{
|
|
@@ -5184,7 +4994,7 @@ const MenuWidgetEditor = ({ widget, onChange }) => {
|
|
|
5184
4994
|
value: customIcon,
|
|
5185
4995
|
onChange: (e) => setCustomIcon(e.target.value),
|
|
5186
4996
|
placeholder: "e.g. home, launch",
|
|
5187
|
-
style: inputStyle$
|
|
4997
|
+
style: inputStyle$7
|
|
5188
4998
|
}
|
|
5189
4999
|
)
|
|
5190
5000
|
] })
|
|
@@ -5608,6 +5418,130 @@ const UnitInput = ({
|
|
|
5608
5418
|
)
|
|
5609
5419
|
] });
|
|
5610
5420
|
};
|
|
5421
|
+
const inputStyle$6 = {
|
|
5422
|
+
width: "100%",
|
|
5423
|
+
padding: "6px 8px",
|
|
5424
|
+
fontSize: 12,
|
|
5425
|
+
border: "1px solid #cbd5e1",
|
|
5426
|
+
borderRadius: 5,
|
|
5427
|
+
background: "#ffffff",
|
|
5428
|
+
color: "#0f172a"
|
|
5429
|
+
};
|
|
5430
|
+
const labelStyle$6 = {
|
|
5431
|
+
display: "block",
|
|
5432
|
+
fontSize: 11,
|
|
5433
|
+
fontWeight: 600,
|
|
5434
|
+
color: "#475569",
|
|
5435
|
+
marginBottom: 4
|
|
5436
|
+
};
|
|
5437
|
+
const CIImageSettingsControl = ({
|
|
5438
|
+
value,
|
|
5439
|
+
onChange,
|
|
5440
|
+
locale = "en",
|
|
5441
|
+
label,
|
|
5442
|
+
defaultWidth = 800,
|
|
5443
|
+
defaultHeight = 600,
|
|
5444
|
+
compact = false
|
|
5445
|
+
}) => {
|
|
5446
|
+
const tr = String(locale || "en").toLowerCase().startsWith("tr");
|
|
5447
|
+
const rawProc = String(value?.process || "");
|
|
5448
|
+
const mode = rawProc === "fit" ? "fit" : rawProc === "widen" ? "widen" : rawProc === "none" || rawProc === "no-process" ? "none" : "auto";
|
|
5449
|
+
const cWidth = Number(value?.cWidth) || defaultWidth;
|
|
5450
|
+
const cHeight = Number(value?.cHeight) || defaultHeight;
|
|
5451
|
+
const headingText = label || (tr ? "Görsel Optimizasyon & Boyutlandırma (Sharp / CDN WebP)" : "Image Optimization & Sizing (Sharp / CDN WebP)");
|
|
5452
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5453
|
+
"div",
|
|
5454
|
+
{
|
|
5455
|
+
style: {
|
|
5456
|
+
padding: compact ? 8 : 10,
|
|
5457
|
+
border: "1px solid #e2e8f0",
|
|
5458
|
+
borderRadius: 6,
|
|
5459
|
+
background: "#f8fafc",
|
|
5460
|
+
display: "flex",
|
|
5461
|
+
flexDirection: "column",
|
|
5462
|
+
gap: 8
|
|
5463
|
+
},
|
|
5464
|
+
children: [
|
|
5465
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 5 }, children: [
|
|
5466
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.MaterialIcon, { name: "auto_fix_high", size: 14, color: "#2669a0" }),
|
|
5467
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 11, fontWeight: 700, color: "#1e293b" }, children: headingText })
|
|
5468
|
+
] }),
|
|
5469
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5470
|
+
"select",
|
|
5471
|
+
{
|
|
5472
|
+
value: mode,
|
|
5473
|
+
onChange: (e) => {
|
|
5474
|
+
const nextMode = e.target.value;
|
|
5475
|
+
onChange({
|
|
5476
|
+
...value || {},
|
|
5477
|
+
process: nextMode === "auto" ? "" : nextMode,
|
|
5478
|
+
cWidth,
|
|
5479
|
+
cHeight
|
|
5480
|
+
});
|
|
5481
|
+
},
|
|
5482
|
+
style: inputStyle$6,
|
|
5483
|
+
children: [
|
|
5484
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "auto", children: tr ? "Otomatik Optimize (WebP • ci-optimized)" : "Auto Optimize (WebP • ci-optimized)" }),
|
|
5485
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "fit", children: tr ? "Tam Boyut / Kırparak Sığdır (Fit W × H WebP)" : "Exact Fit / Crop (Fit W × H WebP)" }),
|
|
5486
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "widen", children: tr ? "Genişliğe Ölçekle (Widen W WebP)" : "Scale to Width (Widen W WebP)" }),
|
|
5487
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "none", children: tr ? "Orijinal Dosya (Sharp İşlemi Yok)" : "Original File (No Sharp Processing)" })
|
|
5488
|
+
]
|
|
5489
|
+
}
|
|
5490
|
+
),
|
|
5491
|
+
(mode === "fit" || mode === "widen") && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5492
|
+
"div",
|
|
5493
|
+
{
|
|
5494
|
+
style: {
|
|
5495
|
+
display: "grid",
|
|
5496
|
+
gridTemplateColumns: mode === "fit" ? "1fr 1fr" : "1fr",
|
|
5497
|
+
gap: 8
|
|
5498
|
+
},
|
|
5499
|
+
children: [
|
|
5500
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5501
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$6, children: tr ? "Genişlik (px)" : "Width (px)" }),
|
|
5502
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5503
|
+
"input",
|
|
5504
|
+
{
|
|
5505
|
+
type: "number",
|
|
5506
|
+
min: 50,
|
|
5507
|
+
max: 3840,
|
|
5508
|
+
value: cWidth,
|
|
5509
|
+
onChange: (e) => onChange({
|
|
5510
|
+
...value || {},
|
|
5511
|
+
process: mode,
|
|
5512
|
+
cWidth: Number(e.target.value) || defaultWidth,
|
|
5513
|
+
cHeight
|
|
5514
|
+
}),
|
|
5515
|
+
style: inputStyle$6
|
|
5516
|
+
}
|
|
5517
|
+
)
|
|
5518
|
+
] }),
|
|
5519
|
+
mode === "fit" && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
5520
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$6, children: tr ? "Yükseklik (px)" : "Height (px)" }),
|
|
5521
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5522
|
+
"input",
|
|
5523
|
+
{
|
|
5524
|
+
type: "number",
|
|
5525
|
+
min: 50,
|
|
5526
|
+
max: 3840,
|
|
5527
|
+
value: cHeight,
|
|
5528
|
+
onChange: (e) => onChange({
|
|
5529
|
+
...value || {},
|
|
5530
|
+
process: mode,
|
|
5531
|
+
cWidth,
|
|
5532
|
+
cHeight: Number(e.target.value) || defaultHeight
|
|
5533
|
+
}),
|
|
5534
|
+
style: inputStyle$6
|
|
5535
|
+
}
|
|
5536
|
+
)
|
|
5537
|
+
] })
|
|
5538
|
+
]
|
|
5539
|
+
}
|
|
5540
|
+
)
|
|
5541
|
+
]
|
|
5542
|
+
}
|
|
5543
|
+
);
|
|
5544
|
+
};
|
|
5611
5545
|
function resolveEntityCardPreviewData(rawData, rawOptions, locale = "en") {
|
|
5612
5546
|
const tr = locale === "tr";
|
|
5613
5547
|
const data = rawData && typeof rawData === "object" ? rawData : {};
|
|
@@ -7115,6 +7049,23 @@ const EntityCardWidgetEditor = ({
|
|
|
7115
7049
|
)
|
|
7116
7050
|
] })
|
|
7117
7051
|
] }),
|
|
7052
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7053
|
+
CIImageSettingsControl,
|
|
7054
|
+
{
|
|
7055
|
+
value: options.imageSettings || cardProps.imageSettings,
|
|
7056
|
+
onChange: (next) => onChange({
|
|
7057
|
+
options: {
|
|
7058
|
+
...options,
|
|
7059
|
+
imageSettings: next,
|
|
7060
|
+
cardProps: { ...cardProps, imageSettings: next }
|
|
7061
|
+
}
|
|
7062
|
+
}),
|
|
7063
|
+
defaultWidth: 960,
|
|
7064
|
+
defaultHeight: 540,
|
|
7065
|
+
compact: true,
|
|
7066
|
+
locale
|
|
7067
|
+
}
|
|
7068
|
+
),
|
|
7118
7069
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7119
7070
|
SurveyWidgetEditor.CIColorField,
|
|
7120
7071
|
{
|
|
@@ -10883,6 +10834,17 @@ const HeroSliderStudioModal = ({
|
|
|
10883
10834
|
onChange: (asset) => updateLayer(selectedLayerIdx, { image: asset })
|
|
10884
10835
|
}
|
|
10885
10836
|
),
|
|
10837
|
+
activeLayer.image && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10838
|
+
CIImageSettingsControl,
|
|
10839
|
+
{
|
|
10840
|
+
value: activeLayer.imageSettings,
|
|
10841
|
+
onChange: (next) => updateLayer(selectedLayerIdx, { imageSettings: next }),
|
|
10842
|
+
defaultWidth: 1e3,
|
|
10843
|
+
defaultHeight: 1e3,
|
|
10844
|
+
compact: true,
|
|
10845
|
+
locale: uiLocale
|
|
10846
|
+
}
|
|
10847
|
+
),
|
|
10886
10848
|
activeLayer.positionMode !== "free" && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
10887
10849
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$4, children: tr ? "Görsel Genişliği" : "Image Width" }),
|
|
10888
10850
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11276,14 +11238,27 @@ const HeroSliderStudioModal = ({
|
|
|
11276
11238
|
}
|
|
11277
11239
|
)
|
|
11278
11240
|
] }),
|
|
11279
|
-
activeSlide.bgType === "image" && /* @__PURE__ */ jsxRuntime.
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
|
|
11241
|
+
activeSlide.bgType === "image" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11242
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11243
|
+
SurveyWidgetEditor.StrapiMediaPicker,
|
|
11244
|
+
{
|
|
11245
|
+
label: tr ? "Slayt Arka Plan Görseli" : "Slide Background Image",
|
|
11246
|
+
value: activeSlide.bgImage || null,
|
|
11247
|
+
onChange: (asset) => updateSlide(selectedSlideIdx, { bgImage: asset })
|
|
11248
|
+
}
|
|
11249
|
+
),
|
|
11250
|
+
activeSlide.bgImage && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11251
|
+
CIImageSettingsControl,
|
|
11252
|
+
{
|
|
11253
|
+
value: activeSlide.imageSettings,
|
|
11254
|
+
onChange: (next) => updateSlide(selectedSlideIdx, { imageSettings: next }),
|
|
11255
|
+
defaultWidth: 1920,
|
|
11256
|
+
defaultHeight: 1080,
|
|
11257
|
+
compact: true,
|
|
11258
|
+
locale: uiLocale
|
|
11259
|
+
}
|
|
11260
|
+
)
|
|
11261
|
+
] }),
|
|
11287
11262
|
activeSlide.bgType === "gradient" && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
11288
11263
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle$4, children: "CSS Gradient" }),
|
|
11289
11264
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11360,14 +11335,27 @@ const HeroSliderStudioModal = ({
|
|
|
11360
11335
|
]
|
|
11361
11336
|
}
|
|
11362
11337
|
),
|
|
11363
|
-
activeSlide.mobileBgType === "image" && /* @__PURE__ */ jsxRuntime.
|
|
11364
|
-
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
|
|
11369
|
-
|
|
11370
|
-
|
|
11338
|
+
activeSlide.mobileBgType === "image" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11339
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11340
|
+
SurveyWidgetEditor.StrapiMediaPicker,
|
|
11341
|
+
{
|
|
11342
|
+
label: tr ? "Mobil Dikey Görsel" : "Mobile Portrait Image",
|
|
11343
|
+
value: activeSlide.mobileBgImage || null,
|
|
11344
|
+
onChange: (asset) => updateSlide(selectedSlideIdx, { mobileBgImage: asset })
|
|
11345
|
+
}
|
|
11346
|
+
),
|
|
11347
|
+
activeSlide.mobileBgImage && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11348
|
+
CIImageSettingsControl,
|
|
11349
|
+
{
|
|
11350
|
+
value: activeSlide.mobileImageSettings,
|
|
11351
|
+
onChange: (next) => updateSlide(selectedSlideIdx, { mobileImageSettings: next }),
|
|
11352
|
+
defaultWidth: 1080,
|
|
11353
|
+
defaultHeight: 1350,
|
|
11354
|
+
compact: true,
|
|
11355
|
+
locale: uiLocale
|
|
11356
|
+
}
|
|
11357
|
+
)
|
|
11358
|
+
] }),
|
|
11371
11359
|
activeSlide.mobileBgType === "gradient" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11372
11360
|
"input",
|
|
11373
11361
|
{
|
|
@@ -12301,7 +12289,7 @@ const DataTableStudioModal = ({
|
|
|
12301
12289
|
const importFromWorkbookSheet = (wb, sheetName, fileName) => {
|
|
12302
12290
|
const ws = wb.Sheets[sheetName];
|
|
12303
12291
|
if (!ws) return;
|
|
12304
|
-
const jsonRows =
|
|
12292
|
+
const jsonRows = XLSXNs__namespace.utils.sheet_to_json(ws, {
|
|
12305
12293
|
defval: "",
|
|
12306
12294
|
raw: true
|
|
12307
12295
|
});
|
|
@@ -12380,7 +12368,7 @@ const DataTableStudioModal = ({
|
|
|
12380
12368
|
reader.onload = () => {
|
|
12381
12369
|
try {
|
|
12382
12370
|
const buf = reader.result;
|
|
12383
|
-
const wb =
|
|
12371
|
+
const wb = XLSXNs__namespace.read(buf, { type: "array", cellDates: true });
|
|
12384
12372
|
workbookRef.current = wb;
|
|
12385
12373
|
const names = Array.isArray(wb.SheetNames) ? wb.SheetNames : [];
|
|
12386
12374
|
setSheetNames(names);
|
|
@@ -13960,7 +13948,7 @@ const DataTableStudioModal = ({
|
|
|
13960
13948
|
{ key: "bordered", label: tr ? "Tablo Kenarlıkları" : "Table Borders" },
|
|
13961
13949
|
{
|
|
13962
13950
|
key: "exportCsv",
|
|
13963
|
-
label: tr ? "Ziyaretçi CSV İndirme
|
|
13951
|
+
label: tr ? "Ziyaretçi Excel (.xlsx) & CSV İndirme" : "Visitor Excel (.xlsx) & CSV Export"
|
|
13964
13952
|
}
|
|
13965
13953
|
].map((sw) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13966
13954
|
"label",
|
|
@@ -15655,6 +15643,17 @@ const CustomCardStudioModal = ({
|
|
|
15655
15643
|
compact: true,
|
|
15656
15644
|
locale: uiLocale
|
|
15657
15645
|
}
|
|
15646
|
+
),
|
|
15647
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15648
|
+
CIImageSettingsControl,
|
|
15649
|
+
{
|
|
15650
|
+
value: data.design.imageSettings,
|
|
15651
|
+
onChange: (next) => updateDesign({ imageSettings: next }),
|
|
15652
|
+
defaultWidth: 960,
|
|
15653
|
+
defaultHeight: 540,
|
|
15654
|
+
compact: true,
|
|
15655
|
+
locale: uiLocale
|
|
15656
|
+
}
|
|
15658
15657
|
)
|
|
15659
15658
|
] }),
|
|
15660
15659
|
rightTab === "layout" && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
@@ -16041,23 +16040,8 @@ function resolveYoutubeVideoId(raw) {
|
|
|
16041
16040
|
if (extracted === "dQw4w9WgXcQ") return "M7lc1UVf-VE";
|
|
16042
16041
|
return extracted;
|
|
16043
16042
|
}
|
|
16044
|
-
function buildSharpImageUrl(
|
|
16045
|
-
|
|
16046
|
-
if (!imageSettings || !imageSettings.process) return rawUrl;
|
|
16047
|
-
const proc = String(imageSettings.process).toLowerCase();
|
|
16048
|
-
if (proc !== "fit" && proc !== "widen") return rawUrl;
|
|
16049
|
-
const w = Number(imageSettings.cWidth) || 0;
|
|
16050
|
-
const h = Number(imageSettings.cHeight) || 0;
|
|
16051
|
-
if (w <= 0 && h <= 0) return rawUrl;
|
|
16052
|
-
if (rawUrl.includes("/api/content-input/image") || rawUrl.includes("/content-input/image")) {
|
|
16053
|
-
return rawUrl;
|
|
16054
|
-
}
|
|
16055
|
-
const params = new URLSearchParams();
|
|
16056
|
-
params.set("src", rawUrl);
|
|
16057
|
-
params.set("process", proc);
|
|
16058
|
-
if (w > 0) params.set("w", String(w));
|
|
16059
|
-
if (proc === "fit" && h > 0) params.set("h", String(h));
|
|
16060
|
-
return `/api/content-input/image?${params.toString()}`;
|
|
16043
|
+
function buildSharpImageUrl(assetOrUrl, imageSettings) {
|
|
16044
|
+
return SurveyWidgetEditor.resolveCanvasMediaUrl(assetOrUrl, imageSettings);
|
|
16061
16045
|
}
|
|
16062
16046
|
function pickLocalized(val, locale, fallback = "") {
|
|
16063
16047
|
if (!val) return fallback;
|
|
@@ -17782,7 +17766,8 @@ const WidgetPreview = ({
|
|
|
17782
17766
|
) });
|
|
17783
17767
|
}
|
|
17784
17768
|
if (id === "singleImage") {
|
|
17785
|
-
const
|
|
17769
|
+
const imgAsset = data?.image || data?.url || "";
|
|
17770
|
+
const imgUrl = buildSharpImageUrl(imgAsset, options?.imageSettings || data?.imageSettings);
|
|
17786
17771
|
const alt = data?.alt || data?.image?.caption || t("widgets.singleImage.label");
|
|
17787
17772
|
const caption = data?.caption || "";
|
|
17788
17773
|
const borderRadius = toCssLength(data?.borderRadius, "4px");
|
|
@@ -17901,7 +17886,7 @@ const WidgetPreview = ({
|
|
|
17901
17886
|
if (galleryPopupIndex === null || typeof document === "undefined") return null;
|
|
17902
17887
|
const safePopIdx = (galleryPopupIndex % images.length + images.length) % images.length;
|
|
17903
17888
|
const popImg = images[safePopIdx];
|
|
17904
|
-
const popUrl = popImg?.target_url || popImg?.url || "";
|
|
17889
|
+
const popUrl = popImg?.formats?.ci_auto_1920x0?.url || popImg?.optimized_url || popImg?.target_url || popImg?.url || "";
|
|
17905
17890
|
const popCaption = popImg?.caption || popImg?.filename || `${t("widgets.gallery.label")} ${safePopIdx + 1}`;
|
|
17906
17891
|
return ReactDOM.createPortal(
|
|
17907
17892
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -18105,7 +18090,7 @@ const WidgetPreview = ({
|
|
|
18105
18090
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18106
18091
|
"img",
|
|
18107
18092
|
{
|
|
18108
|
-
src: buildSharpImageUrl(img
|
|
18093
|
+
src: buildSharpImageUrl(img, imageSettings),
|
|
18109
18094
|
alt: img.caption || `${t("widgets.gallery.label")} ${i + 1}`,
|
|
18110
18095
|
style: {
|
|
18111
18096
|
width: "100%",
|
|
@@ -18191,8 +18176,8 @@ const WidgetPreview = ({
|
|
|
18191
18176
|
onSlideChange: (s) => setGalleryIndex(s.realIndex ?? s.activeIndex ?? 0),
|
|
18192
18177
|
style: { width: "100%" },
|
|
18193
18178
|
children: images.map((item, index2) => {
|
|
18194
|
-
const rawSlideUrl = item?.target_url || item?.url || "";
|
|
18195
|
-
const slideUrl = buildSharpImageUrl(
|
|
18179
|
+
const rawSlideUrl = item?.optimized_url || item?.target_url || item?.url || "";
|
|
18180
|
+
const slideUrl = buildSharpImageUrl(item, imageSettings);
|
|
18196
18181
|
return /* @__PURE__ */ jsxRuntime.jsx(react.SwiperSlide, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18197
18182
|
"div",
|
|
18198
18183
|
{
|
|
@@ -18321,7 +18306,8 @@ const WidgetPreview = ({
|
|
|
18321
18306
|
const title = first?.title || first?.snippet?.title || t("widgets.youtubeVideo.label");
|
|
18322
18307
|
const activeTitle = activeVideo?.title || activeVideo?.snippet?.title || title;
|
|
18323
18308
|
const description = first?.description || first?.snippet?.description || "";
|
|
18324
|
-
const
|
|
18309
|
+
const customThumbAsset = first?.customThumbnail || first?.image || options?.thumbnailImage || options?.bgImage || null;
|
|
18310
|
+
const customThumbUrl = customThumbAsset ? buildSharpImageUrl(customThumbAsset, options?.imageSettings) : "";
|
|
18325
18311
|
const rawThumb = first?.thumbnail || first?.snippet?.thumbnails?.high?.url || "";
|
|
18326
18312
|
const safeRawThumb = rawThumb && !rawThumb.includes("dQw4w9WgXcQ") ? rawThumb : `https://img.youtube.com/vi/${previewVideoId}/hqdefault.jpg`;
|
|
18327
18313
|
const thumb = customThumbUrl || safeRawThumb;
|
|
@@ -19100,19 +19086,21 @@ const WidgetPreview = ({
|
|
|
19100
19086
|
);
|
|
19101
19087
|
}
|
|
19102
19088
|
if (id === "banner") {
|
|
19103
|
-
const name = data?.banner?.name || t("widgets.banner.defaultTitle");
|
|
19089
|
+
const name = (typeof data?.title === "object" ? data.title?.text : data?.title) || data?.banner?.name || t("widgets.banner.defaultTitle");
|
|
19104
19090
|
const type = options?.type || "grid";
|
|
19091
|
+
const bannerImgUrl = data?.image ? buildSharpImageUrl(data.image, options?.imageSettings || data?.imageSettings) : "";
|
|
19105
19092
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
19106
19093
|
"div",
|
|
19107
19094
|
{
|
|
19108
19095
|
style: {
|
|
19109
19096
|
padding: 16,
|
|
19110
19097
|
borderRadius: 6,
|
|
19111
|
-
background: "linear-gradient(135deg, #1e3a8a 0%, #2669a0 100%)",
|
|
19098
|
+
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%)",
|
|
19112
19099
|
color: "#fff",
|
|
19113
19100
|
display: "flex",
|
|
19114
19101
|
alignItems: "center",
|
|
19115
|
-
justifyContent: "space-between"
|
|
19102
|
+
justifyContent: "space-between",
|
|
19103
|
+
minHeight: bannerImgUrl ? 120 : void 0
|
|
19116
19104
|
},
|
|
19117
19105
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10 }, children: [
|
|
19118
19106
|
/* @__PURE__ */ jsxRuntime.jsx(index.MaterialIcon, { name: "featured_video", size: 24, color: "#93c5fd" }),
|
|
@@ -19470,7 +19458,7 @@ const CIWidgetComponent = ({
|
|
|
19470
19458
|
editor.insertWidgetAt(rowIndex, blockIndex, d.widgetId, insertIdx);
|
|
19471
19459
|
}
|
|
19472
19460
|
};
|
|
19473
|
-
const widgetStyles = nodeCanvasStyles({
|
|
19461
|
+
const widgetStyles = SurveyWidgetEditor.nodeCanvasStyles({
|
|
19474
19462
|
styleOptions: widget.options?.styleOptions || {},
|
|
19475
19463
|
bgImage: widget.id === "youtubeVideo" ? void 0 : widget.options?.bgImage,
|
|
19476
19464
|
bgOptions: widget.options?.bgOptions
|
|
@@ -19590,13 +19578,13 @@ const CIBlockComponent = ({
|
|
|
19590
19578
|
const isHovered = editor.isHovered("block", rowIndex, blockIndex);
|
|
19591
19579
|
const bpIndex = SurveyWidgetEditor.getDevice(editor.device).bpIndex ?? 2;
|
|
19592
19580
|
const currentCols = block.cols?.[bpIndex] ?? 12;
|
|
19593
|
-
const classes = blockCanvasClasses(block);
|
|
19594
|
-
const styles = nodeCanvasStyles(block);
|
|
19581
|
+
const classes = SurveyWidgetEditor.blockCanvasClasses(block);
|
|
19582
|
+
const styles = SurveyWidgetEditor.nodeCanvasStyles(block);
|
|
19595
19583
|
const lp = block.layoutProps || {};
|
|
19596
|
-
const alignSelfArr = extractResponsiveProp(lp, "align-self", "alignSelf");
|
|
19584
|
+
const alignSelfArr = SurveyWidgetEditor.extractResponsiveProp(lp, "align-self", "alignSelf");
|
|
19597
19585
|
const effectiveAlignSelf = resolveEffectiveResponsiveValue(alignSelfArr, bpIndex);
|
|
19598
19586
|
const mappedAlignSelf = mapFlexAlign(effectiveAlignSelf);
|
|
19599
|
-
const textArr = extractResponsiveProp(lp, "text", "textAlign");
|
|
19587
|
+
const textArr = SurveyWidgetEditor.extractResponsiveProp(lp, "text", "textAlign");
|
|
19600
19588
|
const effectiveTextAlign = resolveEffectiveResponsiveValue(textArr, bpIndex);
|
|
19601
19589
|
const effectiveVerticalMode = effectiveAlignSelf || rowAlign || "stretch";
|
|
19602
19590
|
const isStretched = effectiveVerticalMode === "stretch";
|
|
@@ -19838,16 +19826,16 @@ const CIRowComponent = ({ row, rowIndex }) => {
|
|
|
19838
19826
|
const isSelected = editor.isSelected("row", rowIndex);
|
|
19839
19827
|
const isHovered = editor.isHovered("row", rowIndex);
|
|
19840
19828
|
const bpIndex = SurveyWidgetEditor.getDevice(editor.device).bpIndex ?? 2;
|
|
19841
|
-
const classes = rowCanvasClasses(row);
|
|
19842
|
-
const styles = nodeCanvasStyles(row);
|
|
19829
|
+
const classes = SurveyWidgetEditor.rowCanvasClasses(row);
|
|
19830
|
+
const styles = SurveyWidgetEditor.nodeCanvasStyles(row);
|
|
19843
19831
|
const lp = row.layoutProps || {};
|
|
19844
|
-
const alignArr = extractResponsiveProp(lp, "align");
|
|
19832
|
+
const alignArr = SurveyWidgetEditor.extractResponsiveProp(lp, "align");
|
|
19845
19833
|
const effectiveAlign = resolveEffectiveResponsiveValue(alignArr, bpIndex);
|
|
19846
19834
|
const mappedAlignItems = mapFlexAlign(effectiveAlign);
|
|
19847
|
-
const justifyArr = extractResponsiveProp(lp, "justify");
|
|
19835
|
+
const justifyArr = SurveyWidgetEditor.extractResponsiveProp(lp, "justify");
|
|
19848
19836
|
const effectiveJustify = resolveEffectiveResponsiveValue(justifyArr, bpIndex);
|
|
19849
19837
|
const mappedJustifyContent = mapFlexJustify(effectiveJustify);
|
|
19850
|
-
const textArr = extractResponsiveProp(lp, "text", "textAlign");
|
|
19838
|
+
const textArr = SurveyWidgetEditor.extractResponsiveProp(lp, "text", "textAlign");
|
|
19851
19839
|
if (row.textAlign && !textArr[0]) textArr[0] = row.textAlign;
|
|
19852
19840
|
const effectiveTextAlign = resolveEffectiveResponsiveValue(textArr, bpIndex);
|
|
19853
19841
|
const isHiddenOnCurrentBp = Array.isArray(row.visibility) && row.visibility[bpIndex] === false;
|
|
@@ -25813,6 +25801,17 @@ const WidgetEditor = ({ widget, onChange }) => {
|
|
|
25813
25801
|
})
|
|
25814
25802
|
}
|
|
25815
25803
|
) }),
|
|
25804
|
+
sData.image && /* @__PURE__ */ jsxRuntime.jsx("div", { style: fieldWrapStyle, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
25805
|
+
CIImageSettingsControl,
|
|
25806
|
+
{
|
|
25807
|
+
value: options.imageSettings,
|
|
25808
|
+
onChange: (next) => updateOptions({ imageSettings: next }),
|
|
25809
|
+
defaultWidth: 1200,
|
|
25810
|
+
defaultHeight: 800,
|
|
25811
|
+
compact: true,
|
|
25812
|
+
locale
|
|
25813
|
+
}
|
|
25814
|
+
) }),
|
|
25816
25815
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldWrapStyle, children: [
|
|
25817
25816
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: t("altText") }),
|
|
25818
25817
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -26592,87 +26591,15 @@ const WidgetEditor = ({ widget, onChange }) => {
|
|
|
26592
26591
|
}
|
|
26593
26592
|
)
|
|
26594
26593
|
),
|
|
26595
|
-
/* @__PURE__ */ jsxRuntime.
|
|
26596
|
-
|
|
26594
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26595
|
+
CIImageSettingsControl,
|
|
26597
26596
|
{
|
|
26598
|
-
|
|
26599
|
-
|
|
26600
|
-
|
|
26601
|
-
|
|
26602
|
-
|
|
26603
|
-
|
|
26604
|
-
children: [
|
|
26605
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: t("imageProcessSettings") }),
|
|
26606
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
26607
|
-
"select",
|
|
26608
|
-
{
|
|
26609
|
-
value: imageSettings.process || "",
|
|
26610
|
-
onChange: (e) => updateOptions({
|
|
26611
|
-
imageSettings: {
|
|
26612
|
-
...imageSettings,
|
|
26613
|
-
process: e.target.value
|
|
26614
|
-
}
|
|
26615
|
-
}),
|
|
26616
|
-
style: inputStyle,
|
|
26617
|
-
children: [
|
|
26618
|
-
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: t("imageProcessNone") }),
|
|
26619
|
-
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "fit", children: t("imageProcessFit") }),
|
|
26620
|
-
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "widen", children: t("imageProcessWiden") })
|
|
26621
|
-
]
|
|
26622
|
-
}
|
|
26623
|
-
),
|
|
26624
|
-
(imageSettings.process === "fit" || imageSettings.process === "widen") && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
26625
|
-
"div",
|
|
26626
|
-
{
|
|
26627
|
-
style: {
|
|
26628
|
-
display: "grid",
|
|
26629
|
-
gridTemplateColumns: imageSettings.process === "fit" ? "1fr 1fr" : "1fr",
|
|
26630
|
-
gap: 8,
|
|
26631
|
-
marginTop: 8
|
|
26632
|
-
},
|
|
26633
|
-
children: [
|
|
26634
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
26635
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: t("cropWidth") }),
|
|
26636
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26637
|
-
"input",
|
|
26638
|
-
{
|
|
26639
|
-
type: "number",
|
|
26640
|
-
min: 50,
|
|
26641
|
-
max: 3840,
|
|
26642
|
-
value: imageSettings.cWidth ?? 640,
|
|
26643
|
-
onChange: (e) => updateOptions({
|
|
26644
|
-
imageSettings: {
|
|
26645
|
-
...imageSettings,
|
|
26646
|
-
cWidth: Number(e.target.value) || 640
|
|
26647
|
-
}
|
|
26648
|
-
}),
|
|
26649
|
-
style: inputStyle
|
|
26650
|
-
}
|
|
26651
|
-
)
|
|
26652
|
-
] }),
|
|
26653
|
-
imageSettings.process === "fit" && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
26654
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: t("cropHeight") }),
|
|
26655
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26656
|
-
"input",
|
|
26657
|
-
{
|
|
26658
|
-
type: "number",
|
|
26659
|
-
min: 50,
|
|
26660
|
-
max: 3840,
|
|
26661
|
-
value: imageSettings.cHeight ?? 480,
|
|
26662
|
-
onChange: (e) => updateOptions({
|
|
26663
|
-
imageSettings: {
|
|
26664
|
-
...imageSettings,
|
|
26665
|
-
cHeight: Number(e.target.value) || 480
|
|
26666
|
-
}
|
|
26667
|
-
}),
|
|
26668
|
-
style: inputStyle
|
|
26669
|
-
}
|
|
26670
|
-
)
|
|
26671
|
-
] })
|
|
26672
|
-
]
|
|
26673
|
-
}
|
|
26674
|
-
)
|
|
26675
|
-
]
|
|
26597
|
+
label: t("imageProcessSettings"),
|
|
26598
|
+
value: imageSettings,
|
|
26599
|
+
onChange: (next) => updateOptions({ imageSettings: next }),
|
|
26600
|
+
defaultWidth: 640,
|
|
26601
|
+
defaultHeight: 480,
|
|
26602
|
+
locale
|
|
26676
26603
|
}
|
|
26677
26604
|
),
|
|
26678
26605
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -26966,14 +26893,27 @@ const WidgetEditor = ({ widget, onChange }) => {
|
|
|
26966
26893
|
}
|
|
26967
26894
|
)
|
|
26968
26895
|
] }),
|
|
26969
|
-
/* @__PURE__ */ jsxRuntime.
|
|
26970
|
-
|
|
26971
|
-
|
|
26972
|
-
|
|
26973
|
-
|
|
26974
|
-
|
|
26975
|
-
|
|
26976
|
-
|
|
26896
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
26897
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26898
|
+
SurveyWidgetEditor.StrapiMediaPicker,
|
|
26899
|
+
{
|
|
26900
|
+
label: t("youtubeCoverImage"),
|
|
26901
|
+
value: currentThumbAsset,
|
|
26902
|
+
onChange: handleCustomThumbnailChange
|
|
26903
|
+
}
|
|
26904
|
+
),
|
|
26905
|
+
currentThumbAsset && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 8 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
26906
|
+
CIImageSettingsControl,
|
|
26907
|
+
{
|
|
26908
|
+
value: options.imageSettings,
|
|
26909
|
+
onChange: (next) => updateOptions({ imageSettings: next }),
|
|
26910
|
+
defaultWidth: 1280,
|
|
26911
|
+
defaultHeight: 720,
|
|
26912
|
+
compact: true,
|
|
26913
|
+
locale
|
|
26914
|
+
}
|
|
26915
|
+
) })
|
|
26916
|
+
] })
|
|
26977
26917
|
]
|
|
26978
26918
|
}
|
|
26979
26919
|
),
|
|
@@ -27205,6 +27145,17 @@ const WidgetEditor = ({ widget, onChange }) => {
|
|
|
27205
27145
|
onChange: (asset) => updateData({ ...bnData, image: asset })
|
|
27206
27146
|
}
|
|
27207
27147
|
) }),
|
|
27148
|
+
bnData.image && /* @__PURE__ */ jsxRuntime.jsx("div", { style: fieldWrapStyle, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
27149
|
+
CIImageSettingsControl,
|
|
27150
|
+
{
|
|
27151
|
+
value: options.imageSettings,
|
|
27152
|
+
onChange: (next) => updateOptions({ imageSettings: next }),
|
|
27153
|
+
defaultWidth: 1600,
|
|
27154
|
+
defaultHeight: 600,
|
|
27155
|
+
compact: true,
|
|
27156
|
+
locale
|
|
27157
|
+
}
|
|
27158
|
+
) }),
|
|
27208
27159
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldWrapStyle, children: [
|
|
27209
27160
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: t("title") }),
|
|
27210
27161
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -27933,7 +27884,7 @@ const BgOptionsEditor = ({
|
|
|
27933
27884
|
showParallax = false,
|
|
27934
27885
|
onChange
|
|
27935
27886
|
}) => {
|
|
27936
|
-
const { t } = SurveyWidgetEditor.useEditorContext();
|
|
27887
|
+
const { t, locale } = SurveyWidgetEditor.useEditorContext();
|
|
27937
27888
|
const opts = bgOptions || {};
|
|
27938
27889
|
const pOpts = parallaxOptions || {
|
|
27939
27890
|
type: "scroll",
|
|
@@ -27969,6 +27920,17 @@ const BgOptionsEditor = ({
|
|
|
27969
27920
|
gap: 8
|
|
27970
27921
|
},
|
|
27971
27922
|
children: [
|
|
27923
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27924
|
+
CIImageSettingsControl,
|
|
27925
|
+
{
|
|
27926
|
+
value: opts.imageSettings,
|
|
27927
|
+
onChange: (next) => updateBgOpt("imageSettings", next),
|
|
27928
|
+
defaultWidth: 1920,
|
|
27929
|
+
defaultHeight: 1080,
|
|
27930
|
+
compact: true,
|
|
27931
|
+
locale
|
|
27932
|
+
}
|
|
27933
|
+
),
|
|
27972
27934
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
27973
27935
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: fieldLabelStyle, children: t("backgroundSize") }),
|
|
27974
27936
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -28399,16 +28361,16 @@ const AlignButtons = ({
|
|
|
28399
28361
|
const isRow = mode === "row";
|
|
28400
28362
|
const alignKey = isRow ? "align" : "align-self";
|
|
28401
28363
|
const alignCamel = isRow ? void 0 : "alignSelf";
|
|
28402
|
-
const alignArr = extractResponsiveProp(lp, alignKey, alignCamel);
|
|
28364
|
+
const alignArr = SurveyWidgetEditor.extractResponsiveProp(lp, alignKey, alignCamel);
|
|
28403
28365
|
const currentAlign = alignArr[bpIndex] || alignArr.slice(0, bpIndex + 1).reverse().find((v) => Boolean(v)) || null;
|
|
28404
28366
|
const justifyKey = isRow ? "justify" : "justify-self";
|
|
28405
28367
|
const justifyCamel = isRow ? void 0 : "justifySelf";
|
|
28406
|
-
const justifyArr = extractResponsiveProp(lp, justifyKey, justifyCamel);
|
|
28368
|
+
const justifyArr = SurveyWidgetEditor.extractResponsiveProp(lp, justifyKey, justifyCamel);
|
|
28407
28369
|
const currentJustify = justifyArr[bpIndex] || justifyArr.slice(0, bpIndex + 1).reverse().find((v) => Boolean(v)) || null;
|
|
28408
|
-
const textArr = extractResponsiveProp(lp, "text", "textAlign");
|
|
28370
|
+
const textArr = SurveyWidgetEditor.extractResponsiveProp(lp, "text", "textAlign");
|
|
28409
28371
|
const currentText = textArr[bpIndex] || textArr.slice(0, bpIndex + 1).reverse().find((v) => Boolean(v)) || null;
|
|
28410
28372
|
const handleSetProp = (baseKey, val, camelKey) => {
|
|
28411
|
-
const nextLp = setResponsiveProp(lp, baseKey, bpIndex, val, camelKey);
|
|
28373
|
+
const nextLp = SurveyWidgetEditor.setResponsiveProp(lp, baseKey, bpIndex, val, camelKey);
|
|
28412
28374
|
onChange(nextLp);
|
|
28413
28375
|
};
|
|
28414
28376
|
const handleClearPropAllBreakpoints = (baseKey, camelKey) => {
|