@ozguraltan/strapi-content-input 1.0.22 → 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.
@@ -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-DGSwgTzR.mjs";
5
- import { M as MaterialIcon } from "./index-Dc7AFLOj.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,236 +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 resolveCanvasMediaUrl(assetOrUrl, imageSettings) {
1073
- if (!assetOrUrl) return "";
1074
- const asset = typeof assetOrUrl === "object" ? assetOrUrl : null;
1075
- const preferredUrl = typeof assetOrUrl === "string" ? assetOrUrl : asset?.optimized_url || asset?.target_url || asset?.url || asset?.src || "";
1076
- const origUrl = typeof assetOrUrl === "string" ? assetOrUrl : asset?.original_url || asset?.url || asset?.target_url || preferredUrl;
1077
- if (!preferredUrl && !origUrl) return "";
1078
- const proc = String(imageSettings?.process || "").trim().toLowerCase();
1079
- if (proc === "none" || proc === "no-process") {
1080
- return origUrl || preferredUrl;
1081
- }
1082
- if (!proc || proc === "auto") {
1083
- return preferredUrl || origUrl;
1084
- }
1085
- if (proc !== "fit" && proc !== "widen") {
1086
- return preferredUrl || origUrl;
1087
- }
1088
- const w = Number(imageSettings?.cWidth) || 0;
1089
- const h = proc === "fit" ? Number(imageSettings?.cHeight) || 0 : 0;
1090
- const rotate = Number(imageSettings?.rotate) || 0;
1091
- if (w <= 0 && h <= 0) {
1092
- return preferredUrl || origUrl;
1093
- }
1094
- const formatKey = `ci_${proc}_${w}x${h}${rotate ? `_r${rotate}` : ""}`;
1095
- const directVariantUrl = asset?.formats?.[formatKey]?.url;
1096
- if (directVariantUrl) {
1097
- return directVariantUrl;
1098
- }
1099
- const baseSrc = origUrl || preferredUrl;
1100
- if (baseSrc.startsWith("data:") || baseSrc.startsWith("blob:") || /\.(svg|gif|mp4|webm|mov|pdf)(\?|#|$)/i.test(baseSrc) || baseSrc.includes("/api/content-input/image") || baseSrc.includes("/content-input/image")) {
1101
- return baseSrc;
1102
- }
1103
- const params = new URLSearchParams();
1104
- params.set("src", baseSrc);
1105
- params.set("process", proc);
1106
- if (w > 0) params.set("w", String(w));
1107
- if (proc === "fit" && h > 0) params.set("h", String(h));
1108
- if (rotate) params.set("rotate", String(rotate));
1109
- return `/api/content-input/image?${params.toString()}`;
1110
- }
1111
- function nodeCanvasStyles(node) {
1112
- const so = node?.styleOptions || {};
1113
- const style = {};
1114
- if (so.padding) style.padding = so.padding;
1115
- if (so.margin) style.margin = so.margin;
1116
- if (so.height) style.height = so.height;
1117
- if (so.minHeight || so["min-height"]) {
1118
- style.minHeight = so.minHeight || so["min-height"];
1119
- }
1120
- if (so.maxHeight || so["max-height"]) {
1121
- style.maxHeight = so.maxHeight || so["max-height"];
1122
- }
1123
- if (so.fontSize || so["font-size"]) {
1124
- style.fontSize = so.fontSize || so["font-size"];
1125
- }
1126
- if (so.backgroundColor || so["background-color"]) {
1127
- style.backgroundColor = so.backgroundColor || so["background-color"];
1128
- }
1129
- if (so.color) style.color = so.color;
1130
- if (so.border) style.border = so.border;
1131
- if (so.borderTop || so["border-top"]) style.borderTop = so.borderTop || so["border-top"];
1132
- if (so.borderRight || so["border-right"])
1133
- style.borderRight = so.borderRight || so["border-right"];
1134
- if (so.borderBottom || so["border-bottom"])
1135
- style.borderBottom = so.borderBottom || so["border-bottom"];
1136
- if (so.borderLeft || so["border-left"]) style.borderLeft = so.borderLeft || so["border-left"];
1137
- if (so.outline) style.outline = so.outline;
1138
- if (so.borderRadius || so["border-radius"]) {
1139
- style.borderRadius = so.borderRadius || so["border-radius"];
1140
- }
1141
- const bgOpts = node?.bgOptions || {};
1142
- const bgAsset = node?.bgImage || bgOpts?.bgImage;
1143
- const bgUrl = resolveCanvasMediaUrl(bgAsset, bgOpts?.imageSettings);
1144
- if (bgUrl) {
1145
- style.backgroundImage = `url("${bgUrl}")`;
1146
- style.backgroundSize = bgOpts["background-size"] || bgOpts.size || "cover";
1147
- style.backgroundPosition = bgOpts["background-position"] || bgOpts.position || "center center";
1148
- style.backgroundRepeat = bgOpts["background-repeat"] || bgOpts.repeat || "no-repeat";
1149
- if (bgOpts["background-attachment"] || bgOpts.attachment) {
1150
- style.backgroundAttachment = bgOpts["background-attachment"] || bgOpts.attachment;
1151
- }
1152
- }
1153
- return style;
1154
- }
1155
925
  const VENodeToolbar = ({
1156
926
  type,
1157
927
  label,
@@ -12497,7 +12267,7 @@ const DataTableStudioModal = ({
12497
12267
  const importFromWorkbookSheet = (wb, sheetName, fileName) => {
12498
12268
  const ws = wb.Sheets[sheetName];
12499
12269
  if (!ws) return;
12500
- const jsonRows = XLSX.utils.sheet_to_json(ws, {
12270
+ const jsonRows = XLSXNs.utils.sheet_to_json(ws, {
12501
12271
  defval: "",
12502
12272
  raw: true
12503
12273
  });
@@ -12576,7 +12346,7 @@ const DataTableStudioModal = ({
12576
12346
  reader.onload = () => {
12577
12347
  try {
12578
12348
  const buf = reader.result;
12579
- const wb = XLSX.read(buf, { type: "array", cellDates: true });
12349
+ const wb = XLSXNs.read(buf, { type: "array", cellDates: true });
12580
12350
  workbookRef.current = wb;
12581
12351
  const names = Array.isArray(wb.SheetNames) ? wb.SheetNames : [];
12582
12352
  setSheetNames(names);
@@ -14156,7 +13926,7 @@ const DataTableStudioModal = ({
14156
13926
  { key: "bordered", label: tr ? "Tablo Kenarlıkları" : "Table Borders" },
14157
13927
  {
14158
13928
  key: "exportCsv",
14159
- 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"
14160
13930
  }
14161
13931
  ].map((sw) => /* @__PURE__ */ jsxs(
14162
13932
  "label",
@@ -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-C5Uvyf_h.js");
7
- const index = require("./index-i0NfSYto.js");
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 XLSX = require("xlsx");
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 XLSX__namespace = /* @__PURE__ */ _interopNamespace(XLSX);
31
+ const XLSXNs__namespace = /* @__PURE__ */ _interopNamespace(XLSXNs);
32
32
  function buildRichSampleRows(locale = "en") {
33
33
  const tr = locale === "tr";
34
34
  return [
@@ -944,236 +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 resolveCanvasMediaUrl(assetOrUrl, imageSettings) {
1095
- if (!assetOrUrl) return "";
1096
- const asset = typeof assetOrUrl === "object" ? assetOrUrl : null;
1097
- const preferredUrl = typeof assetOrUrl === "string" ? assetOrUrl : asset?.optimized_url || asset?.target_url || asset?.url || asset?.src || "";
1098
- const origUrl = typeof assetOrUrl === "string" ? assetOrUrl : asset?.original_url || asset?.url || asset?.target_url || preferredUrl;
1099
- if (!preferredUrl && !origUrl) return "";
1100
- const proc = String(imageSettings?.process || "").trim().toLowerCase();
1101
- if (proc === "none" || proc === "no-process") {
1102
- return origUrl || preferredUrl;
1103
- }
1104
- if (!proc || proc === "auto") {
1105
- return preferredUrl || origUrl;
1106
- }
1107
- if (proc !== "fit" && proc !== "widen") {
1108
- return preferredUrl || origUrl;
1109
- }
1110
- const w = Number(imageSettings?.cWidth) || 0;
1111
- const h = proc === "fit" ? Number(imageSettings?.cHeight) || 0 : 0;
1112
- const rotate = Number(imageSettings?.rotate) || 0;
1113
- if (w <= 0 && h <= 0) {
1114
- return preferredUrl || origUrl;
1115
- }
1116
- const formatKey = `ci_${proc}_${w}x${h}${rotate ? `_r${rotate}` : ""}`;
1117
- const directVariantUrl = asset?.formats?.[formatKey]?.url;
1118
- if (directVariantUrl) {
1119
- return directVariantUrl;
1120
- }
1121
- const baseSrc = origUrl || preferredUrl;
1122
- if (baseSrc.startsWith("data:") || baseSrc.startsWith("blob:") || /\.(svg|gif|mp4|webm|mov|pdf)(\?|#|$)/i.test(baseSrc) || baseSrc.includes("/api/content-input/image") || baseSrc.includes("/content-input/image")) {
1123
- return baseSrc;
1124
- }
1125
- const params = new URLSearchParams();
1126
- params.set("src", baseSrc);
1127
- params.set("process", proc);
1128
- if (w > 0) params.set("w", String(w));
1129
- if (proc === "fit" && h > 0) params.set("h", String(h));
1130
- if (rotate) params.set("rotate", String(rotate));
1131
- return `/api/content-input/image?${params.toString()}`;
1132
- }
1133
- function nodeCanvasStyles(node) {
1134
- const so = node?.styleOptions || {};
1135
- const style = {};
1136
- if (so.padding) style.padding = so.padding;
1137
- if (so.margin) style.margin = so.margin;
1138
- if (so.height) style.height = so.height;
1139
- if (so.minHeight || so["min-height"]) {
1140
- style.minHeight = so.minHeight || so["min-height"];
1141
- }
1142
- if (so.maxHeight || so["max-height"]) {
1143
- style.maxHeight = so.maxHeight || so["max-height"];
1144
- }
1145
- if (so.fontSize || so["font-size"]) {
1146
- style.fontSize = so.fontSize || so["font-size"];
1147
- }
1148
- if (so.backgroundColor || so["background-color"]) {
1149
- style.backgroundColor = so.backgroundColor || so["background-color"];
1150
- }
1151
- if (so.color) style.color = so.color;
1152
- if (so.border) style.border = so.border;
1153
- if (so.borderTop || so["border-top"]) style.borderTop = so.borderTop || so["border-top"];
1154
- if (so.borderRight || so["border-right"])
1155
- style.borderRight = so.borderRight || so["border-right"];
1156
- if (so.borderBottom || so["border-bottom"])
1157
- style.borderBottom = so.borderBottom || so["border-bottom"];
1158
- if (so.borderLeft || so["border-left"]) style.borderLeft = so.borderLeft || so["border-left"];
1159
- if (so.outline) style.outline = so.outline;
1160
- if (so.borderRadius || so["border-radius"]) {
1161
- style.borderRadius = so.borderRadius || so["border-radius"];
1162
- }
1163
- const bgOpts = node?.bgOptions || {};
1164
- const bgAsset = node?.bgImage || bgOpts?.bgImage;
1165
- const bgUrl = resolveCanvasMediaUrl(bgAsset, bgOpts?.imageSettings);
1166
- if (bgUrl) {
1167
- style.backgroundImage = `url("${bgUrl}")`;
1168
- style.backgroundSize = bgOpts["background-size"] || bgOpts.size || "cover";
1169
- style.backgroundPosition = bgOpts["background-position"] || bgOpts.position || "center center";
1170
- style.backgroundRepeat = bgOpts["background-repeat"] || bgOpts.repeat || "no-repeat";
1171
- if (bgOpts["background-attachment"] || bgOpts.attachment) {
1172
- style.backgroundAttachment = bgOpts["background-attachment"] || bgOpts.attachment;
1173
- }
1174
- }
1175
- return style;
1176
- }
1177
947
  const VENodeToolbar = ({
1178
948
  type,
1179
949
  label,
@@ -12519,7 +12289,7 @@ const DataTableStudioModal = ({
12519
12289
  const importFromWorkbookSheet = (wb, sheetName, fileName) => {
12520
12290
  const ws = wb.Sheets[sheetName];
12521
12291
  if (!ws) return;
12522
- const jsonRows = XLSX__namespace.utils.sheet_to_json(ws, {
12292
+ const jsonRows = XLSXNs__namespace.utils.sheet_to_json(ws, {
12523
12293
  defval: "",
12524
12294
  raw: true
12525
12295
  });
@@ -12598,7 +12368,7 @@ const DataTableStudioModal = ({
12598
12368
  reader.onload = () => {
12599
12369
  try {
12600
12370
  const buf = reader.result;
12601
- const wb = XLSX__namespace.read(buf, { type: "array", cellDates: true });
12371
+ const wb = XLSXNs__namespace.read(buf, { type: "array", cellDates: true });
12602
12372
  workbookRef.current = wb;
12603
12373
  const names = Array.isArray(wb.SheetNames) ? wb.SheetNames : [];
12604
12374
  setSheetNames(names);
@@ -14178,7 +13948,7 @@ const DataTableStudioModal = ({
14178
13948
  { key: "bordered", label: tr ? "Tablo Kenarlıkları" : "Table Borders" },
14179
13949
  {
14180
13950
  key: "exportCsv",
14181
- label: tr ? "Ziyaretçi CSV İndirme Butonu" : "Visitor CSV Download Button"
13951
+ label: tr ? "Ziyaretçi Excel (.xlsx) & CSV İndirme" : "Visitor Excel (.xlsx) & CSV Export"
14182
13952
  }
14183
13953
  ].map((sw) => /* @__PURE__ */ jsxRuntime.jsxs(
14184
13954
  "label",
@@ -16271,7 +16041,7 @@ function resolveYoutubeVideoId(raw) {
16271
16041
  return extracted;
16272
16042
  }
16273
16043
  function buildSharpImageUrl(assetOrUrl, imageSettings) {
16274
- return resolveCanvasMediaUrl(assetOrUrl, imageSettings);
16044
+ return SurveyWidgetEditor.resolveCanvasMediaUrl(assetOrUrl, imageSettings);
16275
16045
  }
16276
16046
  function pickLocalized(val, locale, fallback = "") {
16277
16047
  if (!val) return fallback;
@@ -19688,7 +19458,7 @@ const CIWidgetComponent = ({
19688
19458
  editor.insertWidgetAt(rowIndex, blockIndex, d.widgetId, insertIdx);
19689
19459
  }
19690
19460
  };
19691
- const widgetStyles = nodeCanvasStyles({
19461
+ const widgetStyles = SurveyWidgetEditor.nodeCanvasStyles({
19692
19462
  styleOptions: widget.options?.styleOptions || {},
19693
19463
  bgImage: widget.id === "youtubeVideo" ? void 0 : widget.options?.bgImage,
19694
19464
  bgOptions: widget.options?.bgOptions
@@ -19808,13 +19578,13 @@ const CIBlockComponent = ({
19808
19578
  const isHovered = editor.isHovered("block", rowIndex, blockIndex);
19809
19579
  const bpIndex = SurveyWidgetEditor.getDevice(editor.device).bpIndex ?? 2;
19810
19580
  const currentCols = block.cols?.[bpIndex] ?? 12;
19811
- const classes = blockCanvasClasses(block);
19812
- const styles = nodeCanvasStyles(block);
19581
+ const classes = SurveyWidgetEditor.blockCanvasClasses(block);
19582
+ const styles = SurveyWidgetEditor.nodeCanvasStyles(block);
19813
19583
  const lp = block.layoutProps || {};
19814
- const alignSelfArr = extractResponsiveProp(lp, "align-self", "alignSelf");
19584
+ const alignSelfArr = SurveyWidgetEditor.extractResponsiveProp(lp, "align-self", "alignSelf");
19815
19585
  const effectiveAlignSelf = resolveEffectiveResponsiveValue(alignSelfArr, bpIndex);
19816
19586
  const mappedAlignSelf = mapFlexAlign(effectiveAlignSelf);
19817
- const textArr = extractResponsiveProp(lp, "text", "textAlign");
19587
+ const textArr = SurveyWidgetEditor.extractResponsiveProp(lp, "text", "textAlign");
19818
19588
  const effectiveTextAlign = resolveEffectiveResponsiveValue(textArr, bpIndex);
19819
19589
  const effectiveVerticalMode = effectiveAlignSelf || rowAlign || "stretch";
19820
19590
  const isStretched = effectiveVerticalMode === "stretch";
@@ -20056,16 +19826,16 @@ const CIRowComponent = ({ row, rowIndex }) => {
20056
19826
  const isSelected = editor.isSelected("row", rowIndex);
20057
19827
  const isHovered = editor.isHovered("row", rowIndex);
20058
19828
  const bpIndex = SurveyWidgetEditor.getDevice(editor.device).bpIndex ?? 2;
20059
- const classes = rowCanvasClasses(row);
20060
- const styles = nodeCanvasStyles(row);
19829
+ const classes = SurveyWidgetEditor.rowCanvasClasses(row);
19830
+ const styles = SurveyWidgetEditor.nodeCanvasStyles(row);
20061
19831
  const lp = row.layoutProps || {};
20062
- const alignArr = extractResponsiveProp(lp, "align");
19832
+ const alignArr = SurveyWidgetEditor.extractResponsiveProp(lp, "align");
20063
19833
  const effectiveAlign = resolveEffectiveResponsiveValue(alignArr, bpIndex);
20064
19834
  const mappedAlignItems = mapFlexAlign(effectiveAlign);
20065
- const justifyArr = extractResponsiveProp(lp, "justify");
19835
+ const justifyArr = SurveyWidgetEditor.extractResponsiveProp(lp, "justify");
20066
19836
  const effectiveJustify = resolveEffectiveResponsiveValue(justifyArr, bpIndex);
20067
19837
  const mappedJustifyContent = mapFlexJustify(effectiveJustify);
20068
- const textArr = extractResponsiveProp(lp, "text", "textAlign");
19838
+ const textArr = SurveyWidgetEditor.extractResponsiveProp(lp, "text", "textAlign");
20069
19839
  if (row.textAlign && !textArr[0]) textArr[0] = row.textAlign;
20070
19840
  const effectiveTextAlign = resolveEffectiveResponsiveValue(textArr, bpIndex);
20071
19841
  const isHiddenOnCurrentBp = Array.isArray(row.visibility) && row.visibility[bpIndex] === false;
@@ -28591,16 +28361,16 @@ const AlignButtons = ({
28591
28361
  const isRow = mode === "row";
28592
28362
  const alignKey = isRow ? "align" : "align-self";
28593
28363
  const alignCamel = isRow ? void 0 : "alignSelf";
28594
- const alignArr = extractResponsiveProp(lp, alignKey, alignCamel);
28364
+ const alignArr = SurveyWidgetEditor.extractResponsiveProp(lp, alignKey, alignCamel);
28595
28365
  const currentAlign = alignArr[bpIndex] || alignArr.slice(0, bpIndex + 1).reverse().find((v) => Boolean(v)) || null;
28596
28366
  const justifyKey = isRow ? "justify" : "justify-self";
28597
28367
  const justifyCamel = isRow ? void 0 : "justifySelf";
28598
- const justifyArr = extractResponsiveProp(lp, justifyKey, justifyCamel);
28368
+ const justifyArr = SurveyWidgetEditor.extractResponsiveProp(lp, justifyKey, justifyCamel);
28599
28369
  const currentJustify = justifyArr[bpIndex] || justifyArr.slice(0, bpIndex + 1).reverse().find((v) => Boolean(v)) || null;
28600
- const textArr = extractResponsiveProp(lp, "text", "textAlign");
28370
+ const textArr = SurveyWidgetEditor.extractResponsiveProp(lp, "text", "textAlign");
28601
28371
  const currentText = textArr[bpIndex] || textArr.slice(0, bpIndex + 1).reverse().find((v) => Boolean(v)) || null;
28602
28372
  const handleSetProp = (baseKey, val, camelKey) => {
28603
- const nextLp = setResponsiveProp(lp, baseKey, bpIndex, val, camelKey);
28373
+ const nextLp = SurveyWidgetEditor.setResponsiveProp(lp, baseKey, bpIndex, val, camelKey);
28604
28374
  onChange(nextLp);
28605
28375
  };
28606
28376
  const handleClearPropAllBreakpoints = (baseKey, camelKey) => {