@ozguraltan/strapi-content-input 1.0.26 → 1.0.28

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.
@@ -2,8 +2,8 @@
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
3
  const React = require("react");
4
4
  const ReactDOM = require("react-dom");
5
+ const index = require("./index-BvofXe07.js");
5
6
  const admin = require("@strapi/strapi/admin");
6
- const index = require("./index-DuJM60tO.js");
7
7
  const cloneDeep = require("lodash/cloneDeep");
8
8
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
9
9
  const React__default = /* @__PURE__ */ _interopDefault(React);
@@ -7274,6 +7274,2411 @@ const ColorCodesModal = ({
7274
7274
  document.body
7275
7275
  );
7276
7276
  };
7277
+ const CORPORATE_COLOR_PRESETS = [
7278
+ { hex: "#1E3A8A", tr: "Kurumsal Lacivert", en: "Corporate Navy" },
7279
+ { hex: "#059669", tr: "Zümrüt Yeşili", en: "Executive Emerald" },
7280
+ { hex: "#4F46E5", tr: "Modern İndigo", en: "Modern Indigo" },
7281
+ { hex: "#0F766E", tr: "Okyanus Turkuaz", en: "Deep Teal" },
7282
+ { hex: "#B45309", tr: "Kehribar Altın", en: "Warm Amber" },
7283
+ { hex: "#BE123C", tr: "Koyu Yakut", en: "Crimson Rose" },
7284
+ { hex: "#0F172A", tr: "Antrasit Koyu", en: "Slate Charcoal" }
7285
+ ];
7286
+ const SLICE_PALETTE = [
7287
+ "#2563EB",
7288
+ "#059669",
7289
+ "#D97706",
7290
+ "#7C3AED",
7291
+ "#DB2777",
7292
+ "#0891B2",
7293
+ "#4F46E5",
7294
+ "#EA580C",
7295
+ "#65A30D",
7296
+ "#64748B"
7297
+ ];
7298
+ function normalizeHex(raw, fallback = "#1E3A8A") {
7299
+ const clean = String(raw || "").trim().replace(/^#/, "");
7300
+ if (/^[0-9a-fA-F]{6}$/.test(clean)) return `#${clean.toUpperCase()}`;
7301
+ if (/^[0-9a-fA-F]{3}$/.test(clean)) {
7302
+ return `#${clean[0]}${clean[0]}${clean[1]}${clean[1]}${clean[2]}${clean[2]}`.toUpperCase();
7303
+ }
7304
+ return fallback;
7305
+ }
7306
+ function hexWithAlpha(hex, alpha) {
7307
+ const h = normalizeHex(hex).slice(1);
7308
+ const r = parseInt(h.slice(0, 2), 16);
7309
+ const g = parseInt(h.slice(2, 4), 16);
7310
+ const b = parseInt(h.slice(4, 6), 16);
7311
+ return `rgba(${r}, ${g}, ${b}, ${alpha})`;
7312
+ }
7313
+ function inferDefaultChartKind(qType, displayMode) {
7314
+ if (qType === "nps" || qType === "star_rating" || qType === "likert_scale" || qType === "matrix_single") {
7315
+ return "col";
7316
+ }
7317
+ if (qType === "single_choice" && displayMode === "quick_poll") {
7318
+ return "doughnut";
7319
+ }
7320
+ if (qType === "single_choice" || qType === "multiple_choice" || qType === "dropdown" || qType === "image_choice" || qType === "ranking") {
7321
+ return "bar";
7322
+ }
7323
+ return "none";
7324
+ }
7325
+ function isChartableQuestionType(qType) {
7326
+ return ![
7327
+ "short_text",
7328
+ "long_text",
7329
+ "statement",
7330
+ "consent"
7331
+ ].includes(qType);
7332
+ }
7333
+ function extractChartPreviewItems(qs, locale, tr) {
7334
+ const items = [];
7335
+ if (Array.isArray(qs.optionsBreakdown)) {
7336
+ for (const opt of qs.optionsBreakdown) {
7337
+ const isNa = opt.id === "__na__" || Boolean(opt.isNoOpinion);
7338
+ const lbl = opt.id === "__other__" ? tr ? "Diğer" : "Other" : pickTextForLocale(opt.labels, locale, opt.id);
7339
+ items.push({
7340
+ label: lbl,
7341
+ count: Number(opt.count || 0),
7342
+ pct: Number(opt.percentage || 0),
7343
+ isNoOpinion: isNa
7344
+ });
7345
+ }
7346
+ return items;
7347
+ }
7348
+ if (Array.isArray(qs.distribution)) {
7349
+ for (const d of qs.distribution) {
7350
+ const sub = d.labels ? pickTextForLocale(d.labels, locale, "") : "";
7351
+ items.push({
7352
+ label: sub ? `${d.value} - ${sub}` : String(d.value),
7353
+ count: Number(d.count || 0),
7354
+ pct: Number(d.percentage || 0)
7355
+ });
7356
+ }
7357
+ if (qs.allowNoOpinion || qs.noOpinionCount && qs.noOpinionCount > 0) {
7358
+ items.push({
7359
+ label: pickTextForLocale(
7360
+ qs.noOpinionLabels,
7361
+ locale,
7362
+ tr ? "Fikrim yok" : "No idea"
7363
+ ),
7364
+ count: Number(qs.noOpinionCount || 0),
7365
+ pct: Number(qs.noOpinionPercentage || 0),
7366
+ isNoOpinion: true
7367
+ });
7368
+ }
7369
+ return items;
7370
+ }
7371
+ if (Array.isArray(qs.rankingBreakdown)) {
7372
+ for (const rk of qs.rankingBreakdown) {
7373
+ items.push({
7374
+ label: pickTextForLocale(rk.labels, locale, rk.id),
7375
+ count: Number(rk.scorePercentage || 0),
7376
+ pct: Number(rk.scorePercentage || 0)
7377
+ });
7378
+ }
7379
+ return items;
7380
+ }
7381
+ if (qs.type === "matrix_single" && Array.isArray(qs.rowsBreakdown)) {
7382
+ for (const row of qs.rowsBreakdown) {
7383
+ const topCol = Array.isArray(row.columns) ? [...row.columns].sort((a, b) => (b.count || 0) - (a.count || 0))[0] : null;
7384
+ items.push({
7385
+ label: pickTextForLocale(row.labels, locale, row.rowId),
7386
+ count: Number(topCol?.count || row.total || 0),
7387
+ pct: Number(topCol?.percentage || 0)
7388
+ });
7389
+ }
7390
+ return items;
7391
+ }
7392
+ return items;
7393
+ }
7394
+ const ExcelReportStudioModal = ({
7395
+ open,
7396
+ onClose,
7397
+ surveySlugOrId,
7398
+ analytics,
7399
+ dateFrom,
7400
+ dateTo,
7401
+ uiLocale = "en"
7402
+ }) => {
7403
+ const tr = String(uiLocale).toLowerCase().startsWith("tr");
7404
+ const { get, post } = admin.useFetchClient();
7405
+ const { activePalette, tokens } = useColorCodes();
7406
+ const surveyObj = analytics?.survey || {};
7407
+ const summary = analytics?.summary || {};
7408
+ const questionStats = Array.isArray(analytics?.questionStats) ? analytics.questionStats : [];
7409
+ const [reportTitle, setReportTitle] = React.useState("");
7410
+ const [executiveNote, setExecutiveNote] = React.useState("");
7411
+ const [themeColor, setThemeColor] = React.useState("#1E3A8A");
7412
+ const [includeTrendChart, setIncludeTrendChart] = React.useState(true);
7413
+ const [includeDataBars, setIncludeDataBars] = React.useState(true);
7414
+ const [includeRawSheet, setIncludeRawSheet] = React.useState(true);
7415
+ const [questionOverrides, setQuestionOverrides] = React.useState({});
7416
+ const [activeSheet, setActiveSheet] = React.useState(
7417
+ "dashboard"
7418
+ );
7419
+ const [selectedFormulaHint, setSelectedFormulaHint] = React.useState("");
7420
+ const [rawSampleRows, setRawSampleRows] = React.useState([]);
7421
+ const [loadingRawSample, setLoadingRawSample] = React.useState(false);
7422
+ const [downloading, setDownloading] = React.useState(false);
7423
+ const [errorMsg, setErrorMsg] = React.useState("");
7424
+ React.useEffect(() => {
7425
+ if (!open) return;
7426
+ const defaultTitle = pickTextForLocale(
7427
+ surveyObj.titleI18n,
7428
+ uiLocale,
7429
+ surveyObj.title || surveySlugOrId
7430
+ );
7431
+ setReportTitle(defaultTitle);
7432
+ setExecutiveNote("");
7433
+ const brandHex = activePalette?.semanticTokens?.primary?.hex;
7434
+ setThemeColor(normalizeHex(brandHex || "#1E3A8A"));
7435
+ setIncludeTrendChart(true);
7436
+ setIncludeDataBars(true);
7437
+ setIncludeRawSheet(true);
7438
+ setActiveSheet("dashboard");
7439
+ setErrorMsg("");
7440
+ const initOverrides = {};
7441
+ for (const qs of questionStats) {
7442
+ const qTitle = pickTextForLocale(qs.title, uiLocale, qs.key);
7443
+ initOverrides[qs.key] = {
7444
+ included: true,
7445
+ chartType: inferDefaultChartKind(qs.type, surveyObj.displayMode),
7446
+ customTitle: qTitle
7447
+ };
7448
+ }
7449
+ setQuestionOverrides(initOverrides);
7450
+ setSelectedFormulaHint(
7451
+ tr ? `='2_Ozet_Istatistik'!$B$6:$C$10 (Gerçek OOXML Hücre Bağlantılı Grafik)` : `='2_Summary_Stats'!$B$6:$C$10 (Live Cell-Linked Native OOXML Chart)`
7452
+ );
7453
+ }, [open, surveySlugOrId]);
7454
+ React.useEffect(() => {
7455
+ if (!includeRawSheet && activeSheet === "raw") {
7456
+ setActiveSheet("dashboard");
7457
+ }
7458
+ }, [includeRawSheet, activeSheet]);
7459
+ React.useEffect(() => {
7460
+ if (!open || activeSheet !== "raw" || !surveySlugOrId) return;
7461
+ let cancelled = false;
7462
+ (async () => {
7463
+ setLoadingRawSample(true);
7464
+ try {
7465
+ const res = await get(
7466
+ `/content-input/surveys/${encodeURIComponent(surveySlugOrId)}/responses?limit=25`
7467
+ );
7468
+ if (!cancelled) {
7469
+ setRawSampleRows(Array.isArray(res?.data) ? res.data : []);
7470
+ }
7471
+ } catch {
7472
+ if (!cancelled) setRawSampleRows([]);
7473
+ } finally {
7474
+ if (!cancelled) setLoadingRawSample(false);
7475
+ }
7476
+ })();
7477
+ return () => {
7478
+ cancelled = true;
7479
+ };
7480
+ }, [open, activeSheet, surveySlugOrId, get]);
7481
+ const paletteSwatches = React.useMemo(() => {
7482
+ const seen = /* @__PURE__ */ new Set();
7483
+ const list = [];
7484
+ for (const tok of tokens.slice(0, 6)) {
7485
+ if (["primary", "secondary", "accent", "success", "info"].includes(tok.key) || tok.isCustom) {
7486
+ const h = normalizeHex(tok.hex, "");
7487
+ if (h && !seen.has(h)) {
7488
+ seen.add(h);
7489
+ list.push({
7490
+ hex: h,
7491
+ label: `${pickTextForLocale(tok.labels, uiLocale, tok.key)} (Color Codes)`,
7492
+ isBrand: true
7493
+ });
7494
+ }
7495
+ }
7496
+ }
7497
+ for (const p of CORPORATE_COLOR_PRESETS) {
7498
+ const h = normalizeHex(p.hex);
7499
+ if (!seen.has(h)) {
7500
+ seen.add(h);
7501
+ list.push({ hex: h, label: tr ? p.tr : p.en });
7502
+ }
7503
+ }
7504
+ return list;
7505
+ }, [tokens, uiLocale, tr]);
7506
+ const updateQuestionOverride = (qKey, patch) => {
7507
+ setQuestionOverrides((prev) => {
7508
+ const cur = prev[qKey] || {
7509
+ included: true,
7510
+ chartType: "bar",
7511
+ customTitle: qKey
7512
+ };
7513
+ return {
7514
+ ...prev,
7515
+ [qKey]: { ...cur, ...patch }
7516
+ };
7517
+ });
7518
+ };
7519
+ const handleDownloadCustomXlsx = async () => {
7520
+ if (!surveySlugOrId) return;
7521
+ setDownloading(true);
7522
+ setErrorMsg("");
7523
+ try {
7524
+ const payload = {
7525
+ format: "xlsx",
7526
+ locale: uiLocale,
7527
+ encoding: "base64",
7528
+ ...dateFrom ? { from: dateFrom } : {},
7529
+ ...dateTo ? { to: dateTo } : {},
7530
+ reportTitle,
7531
+ executiveNote,
7532
+ themeColor: normalizeHex(themeColor),
7533
+ includeTrendChart,
7534
+ includeDataBars,
7535
+ includeRawSheet,
7536
+ questionOverrides
7537
+ };
7538
+ let filePayload = null;
7539
+ try {
7540
+ const res = await post(
7541
+ `/content-input/surveys/${encodeURIComponent(
7542
+ surveySlugOrId
7543
+ )}/export?encoding=base64&format=xlsx&locale=${encodeURIComponent(uiLocale)}`,
7544
+ payload
7545
+ );
7546
+ filePayload = res?.data;
7547
+ } catch {
7548
+ const qs = new URLSearchParams({
7549
+ format: "xlsx",
7550
+ locale: uiLocale,
7551
+ encoding: "base64"
7552
+ });
7553
+ if (dateFrom) qs.set("from", dateFrom);
7554
+ if (dateTo) qs.set("to", dateTo);
7555
+ const fallbackRes = await get(
7556
+ `/content-input/surveys/${encodeURIComponent(
7557
+ surveySlugOrId
7558
+ )}/export?${qs.toString()}`
7559
+ );
7560
+ filePayload = fallbackRes?.data;
7561
+ }
7562
+ if (!filePayload?.base64) {
7563
+ throw new Error(
7564
+ tr ? "Excel çıktısı oluşturulamadı. Strapi sunucusunu yeniden başlattığınızdan emin olun." : "Failed to generate Excel workbook. Ensure Strapi backend is up to date."
7565
+ );
7566
+ }
7567
+ const binStr = window.atob(String(filePayload.base64));
7568
+ const bytes = new Uint8Array(binStr.length);
7569
+ for (let i = 0; i < binStr.length; i++) {
7570
+ bytes[i] = binStr.charCodeAt(i);
7571
+ }
7572
+ const blob = new Blob([bytes], {
7573
+ type: filePayload.contentType || "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
7574
+ });
7575
+ const dlUrl = URL.createObjectURL(blob);
7576
+ const a = document.createElement("a");
7577
+ a.href = dlUrl;
7578
+ a.download = filePayload.filename || `${surveySlugOrId}-executive-report.xlsx`;
7579
+ document.body.appendChild(a);
7580
+ a.click();
7581
+ document.body.removeChild(a);
7582
+ URL.revokeObjectURL(dlUrl);
7583
+ } catch (err) {
7584
+ setErrorMsg(
7585
+ err?.message || (tr ? "Excel indirme sırasında hata oluştu." : "Excel export failed.")
7586
+ );
7587
+ } finally {
7588
+ setDownloading(false);
7589
+ }
7590
+ };
7591
+ if (!open || typeof document === "undefined") return null;
7592
+ const primaryHex = normalizeHex(themeColor);
7593
+ const statsSheetTabName = tr ? "2_Ozet_Istatistik" : "2_Summary_Stats";
7594
+ const rawSheetTabName = tr ? "3_Ham_Yanitlar" : "3_Raw_Responses";
7595
+ const dailyTrend = Array.isArray(
7596
+ summary.dailyTrend
7597
+ ) ? summary.dailyTrend : [];
7598
+ const npsInfo = summary.nps || { hasNps: false };
7599
+ const activeQuestionCharts = questionStats.filter((qs) => {
7600
+ const ov = questionOverrides[qs.key];
7601
+ const included = ov ? ov.included : true;
7602
+ const kind = ov ? ov.chartType : inferDefaultChartKind(qs.type, surveyObj.displayMode);
7603
+ return included && kind !== "none" && isChartableQuestionType(qs.type);
7604
+ });
7605
+ const includedQuestionTables = questionStats.filter((qs) => {
7606
+ const ov = questionOverrides[qs.key];
7607
+ return ov ? ov.included : true;
7608
+ });
7609
+ return ReactDOM.createPortal(
7610
+ /* @__PURE__ */ jsxRuntime.jsx(
7611
+ "div",
7612
+ {
7613
+ onClick: onClose,
7614
+ style: {
7615
+ position: "fixed",
7616
+ inset: 0,
7617
+ zIndex: 10050,
7618
+ background: "rgba(15, 23, 42, 0.62)",
7619
+ backdropFilter: "blur(3px)",
7620
+ display: "flex",
7621
+ alignItems: "center",
7622
+ justifyContent: "center",
7623
+ padding: 20
7624
+ },
7625
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
7626
+ "div",
7627
+ {
7628
+ onClick: (e) => e.stopPropagation(),
7629
+ style: {
7630
+ width: "min(1440px, 97vw)",
7631
+ height: "min(900px, 93vh)",
7632
+ background: "#ffffff",
7633
+ color: "#0f172a",
7634
+ colorScheme: "light",
7635
+ fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
7636
+ borderRadius: 16,
7637
+ boxShadow: "0 25px 60px rgba(15, 23, 42, 0.35)",
7638
+ border: "1px solid #cbd5e1",
7639
+ display: "flex",
7640
+ flexDirection: "column",
7641
+ overflow: "hidden"
7642
+ },
7643
+ children: [
7644
+ /* @__PURE__ */ jsxRuntime.jsxs(
7645
+ "div",
7646
+ {
7647
+ style: {
7648
+ padding: "13px 20px",
7649
+ background: "#0f172a",
7650
+ color: "#ffffff",
7651
+ display: "flex",
7652
+ alignItems: "center",
7653
+ justifyContent: "space-between",
7654
+ gap: 12,
7655
+ flexShrink: 0
7656
+ },
7657
+ children: [
7658
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 11 }, children: [
7659
+ /* @__PURE__ */ jsxRuntime.jsx(
7660
+ "div",
7661
+ {
7662
+ style: {
7663
+ width: 36,
7664
+ height: 36,
7665
+ borderRadius: 9,
7666
+ background: "#059669",
7667
+ display: "inline-flex",
7668
+ alignItems: "center",
7669
+ justifyContent: "center"
7670
+ },
7671
+ children: /* @__PURE__ */ jsxRuntime.jsx(index.MaterialIcon, { name: "bar_chart", size: 20, color: "#ffffff" })
7672
+ }
7673
+ ),
7674
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
7675
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
7676
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 15, fontWeight: 800 }, children: tr ? "Excel Rapor Stüdyosu — Canlı Önizleme & Grafik Tasarımcısı" : "Excel Report Studio — Live Workbook Preview & Chart Designer" }),
7677
+ /* @__PURE__ */ jsxRuntime.jsx(
7678
+ "span",
7679
+ {
7680
+ style: {
7681
+ fontSize: 10,
7682
+ fontWeight: 800,
7683
+ padding: "2px 8px",
7684
+ borderRadius: 999,
7685
+ background: "rgba(16, 185, 129, 0.2)",
7686
+ color: "#6ee7b7",
7687
+ border: "1px solid rgba(16, 185, 129, 0.35)"
7688
+ },
7689
+ children: tr ? "Gerçek OOXML Grafik • Sıfır zlib" : "Native OOXML Charts • Zero zlib"
7690
+ }
7691
+ )
7692
+ ] }),
7693
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 11.5, color: "#94a3b8", marginTop: 1 }, children: tr ? "Başlıkları, kurumsal renk temasını ve soru bazlı Excel grafik tiplerini doküman üzerinde canlı görerek düzenleyin." : "Customize report titles, brand colors, and native Excel chart types with instant visual workbook preview." })
7694
+ ] })
7695
+ ] }),
7696
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10 }, children: [
7697
+ /* @__PURE__ */ jsxRuntime.jsxs(
7698
+ "button",
7699
+ {
7700
+ type: "button",
7701
+ onClick: handleDownloadCustomXlsx,
7702
+ disabled: downloading,
7703
+ style: {
7704
+ padding: "8px 16px",
7705
+ borderRadius: 8,
7706
+ border: "1px solid #10b981",
7707
+ background: "#059669",
7708
+ color: "#ffffff",
7709
+ fontSize: 12.5,
7710
+ fontWeight: 800,
7711
+ cursor: downloading ? "wait" : "pointer",
7712
+ display: "inline-flex",
7713
+ alignItems: "center",
7714
+ gap: 7,
7715
+ boxShadow: "0 4px 12px rgba(5, 150, 105, 0.35)"
7716
+ },
7717
+ children: [
7718
+ /* @__PURE__ */ jsxRuntime.jsx(index.MaterialIcon, { name: "download", size: 16, color: "#ffffff" }),
7719
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: downloading ? tr ? "Excel Hazırlanıyor..." : "Generating .xlsx..." : tr ? "Bu Tasarımla Excel (.xlsx) İndir" : "Download Custom Excel (.xlsx)" })
7720
+ ]
7721
+ }
7722
+ ),
7723
+ /* @__PURE__ */ jsxRuntime.jsxs(
7724
+ "button",
7725
+ {
7726
+ type: "button",
7727
+ onClick: onClose,
7728
+ style: {
7729
+ padding: "7px 12px",
7730
+ borderRadius: 8,
7731
+ border: "1px solid #334155",
7732
+ background: "#1e293b",
7733
+ color: "#cbd5e1",
7734
+ fontSize: 12,
7735
+ fontWeight: 700,
7736
+ cursor: "pointer"
7737
+ },
7738
+ children: [
7739
+ "✕ ",
7740
+ tr ? "Kapat" : "Close"
7741
+ ]
7742
+ }
7743
+ )
7744
+ ] })
7745
+ ]
7746
+ }
7747
+ ),
7748
+ errorMsg && /* @__PURE__ */ jsxRuntime.jsxs(
7749
+ "div",
7750
+ {
7751
+ style: {
7752
+ padding: "8px 20px",
7753
+ background: "#fef2f2",
7754
+ borderBottom: "1px solid #fecaca",
7755
+ color: "#dc2626",
7756
+ fontSize: 12,
7757
+ fontWeight: 700
7758
+ },
7759
+ children: [
7760
+ "⚠ ",
7761
+ errorMsg
7762
+ ]
7763
+ }
7764
+ ),
7765
+ /* @__PURE__ */ jsxRuntime.jsxs(
7766
+ "div",
7767
+ {
7768
+ style: {
7769
+ flex: 1,
7770
+ display: "grid",
7771
+ gridTemplateColumns: "380px 1fr",
7772
+ minHeight: 0,
7773
+ background: "#f1f5f9"
7774
+ },
7775
+ children: [
7776
+ /* @__PURE__ */ jsxRuntime.jsxs(
7777
+ "div",
7778
+ {
7779
+ style: {
7780
+ background: "#ffffff",
7781
+ borderRight: "1px solid #cbd5e1",
7782
+ overflowY: "auto",
7783
+ padding: 16,
7784
+ display: "flex",
7785
+ flexDirection: "column",
7786
+ gap: 16
7787
+ },
7788
+ children: [
7789
+ /* @__PURE__ */ jsxRuntime.jsxs(
7790
+ "div",
7791
+ {
7792
+ style: {
7793
+ padding: 13,
7794
+ borderRadius: 10,
7795
+ border: "1px solid #e2e8f0",
7796
+ background: "#f8fafc",
7797
+ display: "flex",
7798
+ flexDirection: "column",
7799
+ gap: 10
7800
+ },
7801
+ children: [
7802
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 12, fontWeight: 800, color: "#0f172a" }, children: [
7803
+ "1. ",
7804
+ tr ? "Kapak Başlığı & Yönetici Notu" : "Report Banner & Executive Note"
7805
+ ] }),
7806
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
7807
+ /* @__PURE__ */ jsxRuntime.jsx(
7808
+ "label",
7809
+ {
7810
+ style: {
7811
+ display: "block",
7812
+ fontSize: 11,
7813
+ fontWeight: 700,
7814
+ color: "#475569",
7815
+ marginBottom: 4
7816
+ },
7817
+ children: tr ? "Rapor Kapak Başlığı" : "Report Banner Title"
7818
+ }
7819
+ ),
7820
+ /* @__PURE__ */ jsxRuntime.jsx(
7821
+ "input",
7822
+ {
7823
+ type: "text",
7824
+ value: reportTitle,
7825
+ onChange: (e) => setReportTitle(e.target.value),
7826
+ placeholder: tr ? "Anket Yönetici Raporu..." : "Executive Survey Report...",
7827
+ style: {
7828
+ width: "100%",
7829
+ padding: "7px 10px",
7830
+ fontSize: 12,
7831
+ borderRadius: 6,
7832
+ border: "1px solid #cbd5e1",
7833
+ color: "#0f172a",
7834
+ background: "#ffffff"
7835
+ }
7836
+ }
7837
+ )
7838
+ ] }),
7839
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
7840
+ /* @__PURE__ */ jsxRuntime.jsx(
7841
+ "label",
7842
+ {
7843
+ style: {
7844
+ display: "block",
7845
+ fontSize: 11,
7846
+ fontWeight: 700,
7847
+ color: "#475569",
7848
+ marginBottom: 4
7849
+ },
7850
+ children: tr ? "Yönetici Özeti / Değerlendirme Notu (İsteğe Bağlı)" : "Executive Summary Note (Optional)"
7851
+ }
7852
+ ),
7853
+ /* @__PURE__ */ jsxRuntime.jsx(
7854
+ "textarea",
7855
+ {
7856
+ rows: 2,
7857
+ value: executiveNote,
7858
+ onChange: (e) => setExecutiveNote(e.target.value),
7859
+ placeholder: tr ? "Örn: Q4 müşteri memnuniyeti hedeflerinin %12 üzerinde gerçekleşmiştir..." : "e.g. Q4 customer satisfaction exceeded target benchmarks by 12%...",
7860
+ style: {
7861
+ width: "100%",
7862
+ padding: "7px 10px",
7863
+ fontSize: 12,
7864
+ borderRadius: 6,
7865
+ border: "1px solid #cbd5e1",
7866
+ color: "#0f172a",
7867
+ background: "#ffffff",
7868
+ resize: "vertical"
7869
+ }
7870
+ }
7871
+ )
7872
+ ] })
7873
+ ]
7874
+ }
7875
+ ),
7876
+ /* @__PURE__ */ jsxRuntime.jsxs(
7877
+ "div",
7878
+ {
7879
+ style: {
7880
+ padding: 13,
7881
+ borderRadius: 10,
7882
+ border: "1px solid #e2e8f0",
7883
+ background: "#f8fafc",
7884
+ display: "flex",
7885
+ flexDirection: "column",
7886
+ gap: 9
7887
+ },
7888
+ children: [
7889
+ /* @__PURE__ */ jsxRuntime.jsxs(
7890
+ "div",
7891
+ {
7892
+ style: {
7893
+ display: "flex",
7894
+ alignItems: "center",
7895
+ justifyContent: "space-between"
7896
+ },
7897
+ children: [
7898
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: 12, fontWeight: 800, color: "#0f172a" }, children: [
7899
+ "2. ",
7900
+ tr ? "Kurumsal Renk Teması" : "Brand Theme Color"
7901
+ ] }),
7902
+ activePalette?.name && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 10, fontWeight: 700, color: "#64748b" }, children: activePalette.name })
7903
+ ]
7904
+ }
7905
+ ),
7906
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: 7 }, children: paletteSwatches.map((sw) => {
7907
+ const selected = normalizeHex(themeColor) === sw.hex;
7908
+ return /* @__PURE__ */ jsxRuntime.jsx(
7909
+ "button",
7910
+ {
7911
+ type: "button",
7912
+ title: `${sw.label} (${sw.hex})`,
7913
+ onClick: () => setThemeColor(sw.hex),
7914
+ style: {
7915
+ width: 26,
7916
+ height: 26,
7917
+ borderRadius: 7,
7918
+ background: sw.hex,
7919
+ border: selected ? "2.5px solid #0f172a" : "1.5px solid rgba(15,23,42,0.18)",
7920
+ boxShadow: selected ? "0 0 0 2px #ffffff inset" : "none",
7921
+ cursor: "pointer",
7922
+ position: "relative"
7923
+ }
7924
+ },
7925
+ sw.hex
7926
+ );
7927
+ }) }),
7928
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8, marginTop: 2 }, children: [
7929
+ /* @__PURE__ */ jsxRuntime.jsx(
7930
+ "input",
7931
+ {
7932
+ type: "color",
7933
+ value: primaryHex,
7934
+ onChange: (e) => setThemeColor(e.target.value.toUpperCase()),
7935
+ style: {
7936
+ width: 34,
7937
+ height: 30,
7938
+ padding: 1,
7939
+ border: "1px solid #cbd5e1",
7940
+ borderRadius: 6,
7941
+ background: "#fff",
7942
+ cursor: "pointer"
7943
+ }
7944
+ }
7945
+ ),
7946
+ /* @__PURE__ */ jsxRuntime.jsx(
7947
+ "input",
7948
+ {
7949
+ type: "text",
7950
+ value: themeColor,
7951
+ onChange: (e) => setThemeColor(e.target.value),
7952
+ style: {
7953
+ flex: 1,
7954
+ padding: "6px 9px",
7955
+ fontSize: 12,
7956
+ fontFamily: "monospace",
7957
+ fontWeight: 700,
7958
+ borderRadius: 6,
7959
+ border: "1px solid #cbd5e1",
7960
+ background: "#ffffff",
7961
+ color: "#0f172a"
7962
+ }
7963
+ }
7964
+ )
7965
+ ] })
7966
+ ]
7967
+ }
7968
+ ),
7969
+ /* @__PURE__ */ jsxRuntime.jsxs(
7970
+ "div",
7971
+ {
7972
+ style: {
7973
+ padding: 13,
7974
+ borderRadius: 10,
7975
+ border: "1px solid #e2e8f0",
7976
+ background: "#f8fafc",
7977
+ display: "flex",
7978
+ flexDirection: "column",
7979
+ gap: 8
7980
+ },
7981
+ children: [
7982
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 12, fontWeight: 800, color: "#0f172a" }, children: [
7983
+ "3. ",
7984
+ tr ? "Çalışma Kitabı Katmanları" : "Workbook Layers & Formatting"
7985
+ ] }),
7986
+ /* @__PURE__ */ jsxRuntime.jsxs(
7987
+ "label",
7988
+ {
7989
+ style: {
7990
+ display: "flex",
7991
+ alignItems: "center",
7992
+ gap: 8,
7993
+ fontSize: 12,
7994
+ color: "#1e293b",
7995
+ cursor: "pointer"
7996
+ },
7997
+ children: [
7998
+ /* @__PURE__ */ jsxRuntime.jsx(
7999
+ "input",
8000
+ {
8001
+ type: "checkbox",
8002
+ checked: includeTrendChart,
8003
+ onChange: (e) => setIncludeTrendChart(e.target.checked)
8004
+ }
8005
+ ),
8006
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: tr ? "30 Günlük Katılım Çizgi Grafiği (<c:lineChart>)" : "30-Day Daily Trend Line Chart (<c:lineChart>)" })
8007
+ ]
8008
+ }
8009
+ ),
8010
+ /* @__PURE__ */ jsxRuntime.jsxs(
8011
+ "label",
8012
+ {
8013
+ style: {
8014
+ display: "flex",
8015
+ alignItems: "center",
8016
+ gap: 8,
8017
+ fontSize: 12,
8018
+ color: "#1e293b",
8019
+ cursor: "pointer"
8020
+ },
8021
+ children: [
8022
+ /* @__PURE__ */ jsxRuntime.jsx(
8023
+ "input",
8024
+ {
8025
+ type: "checkbox",
8026
+ checked: includeDataBars,
8027
+ onChange: (e) => setIncludeDataBars(e.target.checked)
8028
+ }
8029
+ ),
8030
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: tr ? "Özet Sekmesinde Veri Çubukları (Data Bars) & Isı Haritası" : "Conditional Data Bars & Matrix Heatmap" })
8031
+ ]
8032
+ }
8033
+ ),
8034
+ /* @__PURE__ */ jsxRuntime.jsxs(
8035
+ "label",
8036
+ {
8037
+ style: {
8038
+ display: "flex",
8039
+ alignItems: "center",
8040
+ gap: 8,
8041
+ fontSize: 12,
8042
+ color: "#1e293b",
8043
+ cursor: "pointer"
8044
+ },
8045
+ children: [
8046
+ /* @__PURE__ */ jsxRuntime.jsx(
8047
+ "input",
8048
+ {
8049
+ type: "checkbox",
8050
+ checked: includeRawSheet,
8051
+ onChange: (e) => setIncludeRawSheet(e.target.checked)
8052
+ }
8053
+ ),
8054
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: tr ? "3. Sekme: Filtreli Ham Yanıtlar Tablosunu Ekle" : "Include Sheet 3: AutoFiltered Raw Responses" })
8055
+ ]
8056
+ }
8057
+ )
8058
+ ]
8059
+ }
8060
+ ),
8061
+ /* @__PURE__ */ jsxRuntime.jsxs(
8062
+ "div",
8063
+ {
8064
+ style: {
8065
+ padding: 13,
8066
+ borderRadius: 10,
8067
+ border: "1px solid #e2e8f0",
8068
+ background: "#f8fafc",
8069
+ display: "flex",
8070
+ flexDirection: "column",
8071
+ gap: 10
8072
+ },
8073
+ children: [
8074
+ /* @__PURE__ */ jsxRuntime.jsxs(
8075
+ "div",
8076
+ {
8077
+ style: {
8078
+ display: "flex",
8079
+ alignItems: "center",
8080
+ justifyContent: "space-between"
8081
+ },
8082
+ children: [
8083
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: 12, fontWeight: 800, color: "#0f172a" }, children: [
8084
+ "4. ",
8085
+ tr ? "Soru Bazlı Grafik & Tablo Seçimi" : "Per-Question Charts & Tables"
8086
+ ] }),
8087
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: 11, fontWeight: 700, color: "#059669" }, children: [
8088
+ activeQuestionCharts.length,
8089
+ " ",
8090
+ tr ? "grafik" : "charts"
8091
+ ] })
8092
+ ]
8093
+ }
8094
+ ),
8095
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: questionStats.map((qs, idx) => {
8096
+ const ov = questionOverrides[qs.key] || {
8097
+ included: true,
8098
+ chartType: inferDefaultChartKind(qs.type, surveyObj.displayMode),
8099
+ customTitle: pickTextForLocale(qs.title, uiLocale, qs.key)
8100
+ };
8101
+ const canChart = isChartableQuestionType(qs.type);
8102
+ return /* @__PURE__ */ jsxRuntime.jsxs(
8103
+ "div",
8104
+ {
8105
+ style: {
8106
+ padding: "9px 10px",
8107
+ borderRadius: 8,
8108
+ background: ov.included ? "#ffffff" : "#f1f5f9",
8109
+ border: ov.included ? "1px solid #cbd5e1" : "1px dashed #cbd5e1",
8110
+ opacity: ov.included ? 1 : 0.65,
8111
+ display: "flex",
8112
+ flexDirection: "column",
8113
+ gap: 6
8114
+ },
8115
+ children: [
8116
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 7 }, children: [
8117
+ /* @__PURE__ */ jsxRuntime.jsx(
8118
+ "input",
8119
+ {
8120
+ type: "checkbox",
8121
+ checked: ov.included,
8122
+ onChange: (e) => updateQuestionOverride(qs.key, { included: e.target.checked })
8123
+ }
8124
+ ),
8125
+ /* @__PURE__ */ jsxRuntime.jsxs(
8126
+ "span",
8127
+ {
8128
+ style: {
8129
+ fontSize: 10.5,
8130
+ fontWeight: 800,
8131
+ color: "#64748b",
8132
+ flexShrink: 0
8133
+ },
8134
+ children: [
8135
+ "S",
8136
+ idx + 1
8137
+ ]
8138
+ }
8139
+ ),
8140
+ /* @__PURE__ */ jsxRuntime.jsx(
8141
+ "input",
8142
+ {
8143
+ type: "text",
8144
+ value: ov.customTitle,
8145
+ disabled: !ov.included,
8146
+ onChange: (e) => updateQuestionOverride(qs.key, { customTitle: e.target.value }),
8147
+ style: {
8148
+ flex: 1,
8149
+ minWidth: 0,
8150
+ padding: "3px 6px",
8151
+ fontSize: 11.5,
8152
+ fontWeight: 700,
8153
+ borderRadius: 5,
8154
+ border: "1px solid #e2e8f0",
8155
+ color: "#0f172a",
8156
+ background: ov.included ? "#fff" : "transparent"
8157
+ }
8158
+ }
8159
+ )
8160
+ ] }),
8161
+ ov.included && canChart && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: 4, paddingLeft: 20 }, children: [
8162
+ { id: "bar", tr: "Yatay Bar", en: "Bar" },
8163
+ { id: "col", tr: "Dikey Sütun", en: "Column" },
8164
+ { id: "doughnut", tr: "Halka", en: "Doughnut" },
8165
+ { id: "none", tr: "Sadece Tablo", en: "Table Only" }
8166
+ ].map((opt) => {
8167
+ const active = ov.chartType === opt.id;
8168
+ return /* @__PURE__ */ jsxRuntime.jsx(
8169
+ "button",
8170
+ {
8171
+ type: "button",
8172
+ onClick: () => updateQuestionOverride(qs.key, { chartType: opt.id }),
8173
+ style: {
8174
+ flex: 1,
8175
+ padding: "3px 4px",
8176
+ fontSize: 10,
8177
+ fontWeight: 700,
8178
+ borderRadius: 5,
8179
+ border: active ? `1px solid ${primaryHex}` : "1px solid #cbd5e1",
8180
+ background: active ? primaryHex : "#f8fafc",
8181
+ color: active ? "#ffffff" : "#475569",
8182
+ cursor: "pointer"
8183
+ },
8184
+ children: tr ? opt.tr : opt.en
8185
+ },
8186
+ opt.id
8187
+ );
8188
+ }) })
8189
+ ]
8190
+ },
8191
+ qs.key
8192
+ );
8193
+ }) })
8194
+ ]
8195
+ }
8196
+ )
8197
+ ]
8198
+ }
8199
+ ),
8200
+ /* @__PURE__ */ jsxRuntime.jsxs(
8201
+ "div",
8202
+ {
8203
+ style: {
8204
+ display: "flex",
8205
+ flexDirection: "column",
8206
+ minWidth: 0,
8207
+ minHeight: 0,
8208
+ background: "#e2e8f0"
8209
+ },
8210
+ children: [
8211
+ /* @__PURE__ */ jsxRuntime.jsxs(
8212
+ "div",
8213
+ {
8214
+ style: {
8215
+ padding: "6px 14px",
8216
+ background: "#f8fafc",
8217
+ borderBottom: "1px solid #cbd5e1",
8218
+ display: "flex",
8219
+ alignItems: "center",
8220
+ gap: 10,
8221
+ fontSize: 11.5,
8222
+ flexShrink: 0
8223
+ },
8224
+ children: [
8225
+ /* @__PURE__ */ jsxRuntime.jsx(
8226
+ "span",
8227
+ {
8228
+ style: {
8229
+ padding: "2px 8px",
8230
+ borderRadius: 4,
8231
+ background: "#e2e8f0",
8232
+ fontFamily: "monospace",
8233
+ fontWeight: 700,
8234
+ color: "#334155"
8235
+ },
8236
+ children: activeSheet === "dashboard" ? "B2" : activeSheet === "stats" ? "D6" : "A3"
8237
+ }
8238
+ ),
8239
+ /* @__PURE__ */ jsxRuntime.jsx(
8240
+ "span",
8241
+ {
8242
+ style: {
8243
+ fontStyle: "italic",
8244
+ fontWeight: 800,
8245
+ fontFamily: "serif",
8246
+ color: "#059669",
8247
+ fontSize: 13
8248
+ },
8249
+ children: "fx"
8250
+ }
8251
+ ),
8252
+ /* @__PURE__ */ jsxRuntime.jsx(
8253
+ "div",
8254
+ {
8255
+ style: {
8256
+ flex: 1,
8257
+ padding: "3px 10px",
8258
+ borderRadius: 4,
8259
+ background: "#ffffff",
8260
+ border: "1px solid #cbd5e1",
8261
+ fontFamily: "monospace",
8262
+ fontSize: 11,
8263
+ color: "#0f172a",
8264
+ overflow: "hidden",
8265
+ textOverflow: "ellipsis",
8266
+ whiteSpace: "nowrap"
8267
+ },
8268
+ children: selectedFormulaHint
8269
+ }
8270
+ )
8271
+ ]
8272
+ }
8273
+ ),
8274
+ /* @__PURE__ */ jsxRuntime.jsx(
8275
+ "div",
8276
+ {
8277
+ style: {
8278
+ flex: 1,
8279
+ overflow: "auto",
8280
+ padding: 18
8281
+ },
8282
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
8283
+ "div",
8284
+ {
8285
+ style: {
8286
+ background: "#ffffff",
8287
+ borderRadius: 8,
8288
+ border: "1px solid #cbd5e1",
8289
+ boxShadow: "0 6px 20px rgba(15, 23, 42, 0.06)",
8290
+ overflow: "hidden"
8291
+ },
8292
+ children: [
8293
+ /* @__PURE__ */ jsxRuntime.jsxs(
8294
+ "div",
8295
+ {
8296
+ style: {
8297
+ display: "grid",
8298
+ gridTemplateColumns: "36px repeat(8, 1fr)",
8299
+ background: "#f1f5f9",
8300
+ borderBottom: "1px solid #cbd5e1",
8301
+ fontSize: 10.5,
8302
+ fontWeight: 700,
8303
+ color: "#64748b",
8304
+ textAlign: "center"
8305
+ },
8306
+ children: [
8307
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "4px 0", borderRight: "1px solid #cbd5e1" }, children: "◢" }),
8308
+ ["A", "B", "C", "D", "E", "F", "G", "H"].map((col) => /* @__PURE__ */ jsxRuntime.jsx(
8309
+ "div",
8310
+ {
8311
+ style: { padding: "4px 0", borderRight: "1px solid #e2e8f0" },
8312
+ children: col
8313
+ },
8314
+ col
8315
+ ))
8316
+ ]
8317
+ }
8318
+ ),
8319
+ activeSheet === "dashboard" && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: 20, display: "flex", flexDirection: "column", gap: 16 }, children: [
8320
+ /* @__PURE__ */ jsxRuntime.jsxs(
8321
+ "div",
8322
+ {
8323
+ style: {
8324
+ borderRadius: 8,
8325
+ overflow: "hidden",
8326
+ border: `1px solid ${primaryHex}`
8327
+ },
8328
+ children: [
8329
+ /* @__PURE__ */ jsxRuntime.jsxs(
8330
+ "div",
8331
+ {
8332
+ style: {
8333
+ background: primaryHex,
8334
+ padding: "12px 16px",
8335
+ display: "flex",
8336
+ alignItems: "center",
8337
+ justifyContent: "space-between",
8338
+ gap: 12
8339
+ },
8340
+ children: [
8341
+ /* @__PURE__ */ jsxRuntime.jsx(
8342
+ "input",
8343
+ {
8344
+ type: "text",
8345
+ value: reportTitle,
8346
+ onChange: (e) => setReportTitle(e.target.value),
8347
+ title: tr ? "Başlığı doğrudan doküman üzerinde düzenlemek için tıklayın" : "Click to edit banner title directly",
8348
+ style: {
8349
+ flex: 1,
8350
+ background: "transparent",
8351
+ border: "1px dashed rgba(255,255,255,0.35)",
8352
+ borderRadius: 5,
8353
+ padding: "4px 8px",
8354
+ color: "#ffffff",
8355
+ fontSize: 16,
8356
+ fontWeight: 800,
8357
+ outline: "none"
8358
+ }
8359
+ }
8360
+ ),
8361
+ /* @__PURE__ */ jsxRuntime.jsxs(
8362
+ "span",
8363
+ {
8364
+ style: {
8365
+ fontSize: 10.5,
8366
+ fontWeight: 700,
8367
+ color: "rgba(255,255,255,0.85)",
8368
+ whiteSpace: "nowrap"
8369
+ },
8370
+ children: [
8371
+ "✏️ ",
8372
+ tr ? "Canlı Başlık" : "Editable Title"
8373
+ ]
8374
+ }
8375
+ )
8376
+ ]
8377
+ }
8378
+ ),
8379
+ /* @__PURE__ */ jsxRuntime.jsxs(
8380
+ "div",
8381
+ {
8382
+ style: {
8383
+ background: hexWithAlpha(primaryHex, 0.12),
8384
+ padding: "7px 16px",
8385
+ fontSize: 11.5,
8386
+ fontWeight: 600,
8387
+ color: "#1e293b",
8388
+ display: "flex",
8389
+ justifyContent: "space-between",
8390
+ flexWrap: "wrap",
8391
+ gap: 8
8392
+ },
8393
+ children: [
8394
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
8395
+ "Slug: ",
8396
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { children: surveyObj.slug || surveySlugOrId }),
8397
+ dateFrom || dateTo ? ` • ${tr ? "Filtre" : "Filter"}: ${dateFrom || "..."} → ${dateTo || "..."}` : ""
8398
+ ] }),
8399
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
8400
+ tr ? "Dışa Aktarım" : "Exported",
8401
+ ":",
8402
+ " ",
8403
+ (/* @__PURE__ */ new Date()).toISOString().slice(0, 10)
8404
+ ] })
8405
+ ]
8406
+ }
8407
+ )
8408
+ ]
8409
+ }
8410
+ ),
8411
+ /* @__PURE__ */ jsxRuntime.jsxs(
8412
+ "div",
8413
+ {
8414
+ style: {
8415
+ display: "grid",
8416
+ gridTemplateColumns: "repeat(4, 1fr)",
8417
+ gap: 12
8418
+ },
8419
+ children: [
8420
+ /* @__PURE__ */ jsxRuntime.jsxs(
8421
+ "div",
8422
+ {
8423
+ style: {
8424
+ padding: "12px 14px",
8425
+ borderRadius: 8,
8426
+ background: hexWithAlpha(primaryHex, 0.06),
8427
+ border: `1px solid ${hexWithAlpha(primaryHex, 0.25)}`
8428
+ },
8429
+ children: [
8430
+ /* @__PURE__ */ jsxRuntime.jsx(
8431
+ "div",
8432
+ {
8433
+ style: {
8434
+ fontSize: 10,
8435
+ fontWeight: 800,
8436
+ color: "#64748b",
8437
+ textTransform: "uppercase"
8438
+ },
8439
+ children: tr ? "TOPLAM YANIT" : "TOTAL RESPONSES"
8440
+ }
8441
+ ),
8442
+ /* @__PURE__ */ jsxRuntime.jsx(
8443
+ "div",
8444
+ {
8445
+ style: {
8446
+ fontSize: 22,
8447
+ fontWeight: 800,
8448
+ color: primaryHex,
8449
+ marginTop: 4
8450
+ },
8451
+ children: summary.totalResponses ?? 0
8452
+ }
8453
+ )
8454
+ ]
8455
+ }
8456
+ ),
8457
+ /* @__PURE__ */ jsxRuntime.jsxs(
8458
+ "div",
8459
+ {
8460
+ style: {
8461
+ padding: "12px 14px",
8462
+ borderRadius: 8,
8463
+ background: hexWithAlpha(primaryHex, 0.06),
8464
+ border: `1px solid ${hexWithAlpha(primaryHex, 0.25)}`
8465
+ },
8466
+ children: [
8467
+ /* @__PURE__ */ jsxRuntime.jsx(
8468
+ "div",
8469
+ {
8470
+ style: {
8471
+ fontSize: 10,
8472
+ fontWeight: 800,
8473
+ color: "#64748b",
8474
+ textTransform: "uppercase"
8475
+ },
8476
+ children: tr ? "ORT. / MEDYAN SÜRE" : "AVG / MEDIAN TIME"
8477
+ }
8478
+ ),
8479
+ /* @__PURE__ */ jsxRuntime.jsxs(
8480
+ "div",
8481
+ {
8482
+ style: {
8483
+ fontSize: 20,
8484
+ fontWeight: 800,
8485
+ color: "#0f172a",
8486
+ marginTop: 4
8487
+ },
8488
+ children: [
8489
+ summary.avgDurationSeconds ?? 0,
8490
+ "s",
8491
+ " ",
8492
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: 12, color: "#64748b", fontWeight: 600 }, children: [
8493
+ "/ ",
8494
+ summary.medianDurationSeconds ?? 0,
8495
+ "s"
8496
+ ] })
8497
+ ]
8498
+ }
8499
+ )
8500
+ ]
8501
+ }
8502
+ ),
8503
+ /* @__PURE__ */ jsxRuntime.jsxs(
8504
+ "div",
8505
+ {
8506
+ style: {
8507
+ padding: "12px 14px",
8508
+ borderRadius: 8,
8509
+ background: npsInfo.hasNps ? (npsInfo.score ?? 0) >= 30 ? "#ecfdf5" : (npsInfo.score ?? 0) >= 0 ? "#fffbeb" : "#fef2f2" : "#f8fafc",
8510
+ border: npsInfo.hasNps ? (npsInfo.score ?? 0) >= 30 ? "1px solid #86efac" : (npsInfo.score ?? 0) >= 0 ? "1px solid #fde68a" : "1px solid #fecaca" : "1px solid #e2e8f0"
8511
+ },
8512
+ children: [
8513
+ /* @__PURE__ */ jsxRuntime.jsx(
8514
+ "div",
8515
+ {
8516
+ style: {
8517
+ fontSize: 10,
8518
+ fontWeight: 800,
8519
+ color: "#64748b",
8520
+ textTransform: "uppercase"
8521
+ },
8522
+ children: "NET PROMOTER SCORE"
8523
+ }
8524
+ ),
8525
+ /* @__PURE__ */ jsxRuntime.jsx(
8526
+ "div",
8527
+ {
8528
+ style: {
8529
+ fontSize: 22,
8530
+ fontWeight: 800,
8531
+ color: npsInfo.hasNps ? (npsInfo.score ?? 0) >= 30 ? "#047857" : (npsInfo.score ?? 0) >= 0 ? "#b45309" : "#b91c1c" : "#94a3b8",
8532
+ marginTop: 4
8533
+ },
8534
+ children: npsInfo.hasNps ? `${(npsInfo.score ?? 0) > 0 ? "+" : ""}${npsInfo.score ?? 0}` : "—"
8535
+ }
8536
+ )
8537
+ ]
8538
+ }
8539
+ ),
8540
+ /* @__PURE__ */ jsxRuntime.jsxs(
8541
+ "div",
8542
+ {
8543
+ style: {
8544
+ padding: "12px 14px",
8545
+ borderRadius: 8,
8546
+ background: hexWithAlpha(primaryHex, 0.06),
8547
+ border: `1px solid ${hexWithAlpha(primaryHex, 0.25)}`
8548
+ },
8549
+ children: [
8550
+ /* @__PURE__ */ jsxRuntime.jsx(
8551
+ "div",
8552
+ {
8553
+ style: {
8554
+ fontSize: 10,
8555
+ fontWeight: 800,
8556
+ color: "#64748b",
8557
+ textTransform: "uppercase"
8558
+ },
8559
+ children: tr ? "DİL DAĞILIMI" : "LOCALE MIX"
8560
+ }
8561
+ ),
8562
+ /* @__PURE__ */ jsxRuntime.jsx(
8563
+ "div",
8564
+ {
8565
+ style: {
8566
+ fontSize: 13,
8567
+ fontWeight: 800,
8568
+ color: "#0f172a",
8569
+ marginTop: 7
8570
+ },
8571
+ children: Array.isArray(summary.localeBreakdown) && summary.localeBreakdown.length > 0 ? summary.localeBreakdown.slice(0, 3).map(
8572
+ (l) => `${String(l.locale).toUpperCase()}: ${l.percentage}%`
8573
+ ).join(" • ") : "—"
8574
+ }
8575
+ )
8576
+ ]
8577
+ }
8578
+ )
8579
+ ]
8580
+ }
8581
+ ),
8582
+ executiveNote.trim() && /* @__PURE__ */ jsxRuntime.jsxs(
8583
+ "div",
8584
+ {
8585
+ style: {
8586
+ padding: "10px 14px",
8587
+ borderRadius: 7,
8588
+ background: "#fffbeb",
8589
+ borderLeft: `4px solid ${primaryHex}`,
8590
+ borderTop: "1px solid #fde68a",
8591
+ borderRight: "1px solid #fde68a",
8592
+ borderBottom: "1px solid #fde68a",
8593
+ fontSize: 12,
8594
+ color: "#1e293b"
8595
+ },
8596
+ children: [
8597
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { style: { color: primaryHex }, children: tr ? "Yönetici Notu: " : "Executive Note: " }),
8598
+ executiveNote
8599
+ ]
8600
+ }
8601
+ ),
8602
+ includeTrendChart && dailyTrend.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
8603
+ "div",
8604
+ {
8605
+ onClick: () => setSelectedFormulaHint(
8606
+ `='${statsSheetTabName}'!$B$4:$C$${3 + dailyTrend.length} (<c:lineChart>)`
8607
+ ),
8608
+ style: {
8609
+ padding: "14px 16px",
8610
+ borderRadius: 8,
8611
+ border: "1px solid #cbd5e1",
8612
+ background: "#ffffff",
8613
+ cursor: "pointer"
8614
+ },
8615
+ children: [
8616
+ /* @__PURE__ */ jsxRuntime.jsxs(
8617
+ "div",
8618
+ {
8619
+ style: {
8620
+ display: "flex",
8621
+ justifyContent: "space-between",
8622
+ alignItems: "center",
8623
+ marginBottom: 8
8624
+ },
8625
+ children: [
8626
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: 12.5, fontWeight: 800, color: "#0f172a" }, children: [
8627
+ "📈",
8628
+ " ",
8629
+ tr ? "Son 30 Günlük Yanıt Eğilimi (Excel <c:lineChart>)" : "30-Day Participation Trend (Excel <c:lineChart>)"
8630
+ ] }),
8631
+ /* @__PURE__ */ jsxRuntime.jsx(
8632
+ "span",
8633
+ {
8634
+ style: {
8635
+ fontSize: 10,
8636
+ fontFamily: "monospace",
8637
+ color: "#64748b"
8638
+ },
8639
+ children: statsSheetTabName
8640
+ }
8641
+ )
8642
+ ]
8643
+ }
8644
+ ),
8645
+ (() => {
8646
+ const w = 760;
8647
+ const h = 110;
8648
+ const padX = 24;
8649
+ const padY = 14;
8650
+ const maxC = Math.max(1, ...dailyTrend.map((d) => d.count));
8651
+ const pts = dailyTrend.map((d, i) => {
8652
+ const x = padX + i / Math.max(1, dailyTrend.length - 1) * (w - padX * 2);
8653
+ const y = h - padY - d.count / maxC * (h - padY * 2);
8654
+ return { x, y, ...d };
8655
+ });
8656
+ const poly = pts.map((p) => `${p.x},${p.y}`).join(" ");
8657
+ return /* @__PURE__ */ jsxRuntime.jsxs(
8658
+ "svg",
8659
+ {
8660
+ viewBox: `0 0 ${w} ${h}`,
8661
+ style: { width: "100%", height: 110, display: "block" },
8662
+ children: [
8663
+ /* @__PURE__ */ jsxRuntime.jsx(
8664
+ "line",
8665
+ {
8666
+ x1: padX,
8667
+ y1: h - padY,
8668
+ x2: w - padX,
8669
+ y2: h - padY,
8670
+ stroke: "#cbd5e1",
8671
+ strokeWidth: 1
8672
+ }
8673
+ ),
8674
+ /* @__PURE__ */ jsxRuntime.jsx(
8675
+ "polyline",
8676
+ {
8677
+ fill: "none",
8678
+ stroke: primaryHex,
8679
+ strokeWidth: 2.5,
8680
+ points: poly
8681
+ }
8682
+ ),
8683
+ pts.map((p, idx) => /* @__PURE__ */ jsxRuntime.jsx(
8684
+ "circle",
8685
+ {
8686
+ cx: p.x,
8687
+ cy: p.y,
8688
+ r: 3,
8689
+ fill: "#ffffff",
8690
+ stroke: primaryHex,
8691
+ strokeWidth: 2
8692
+ },
8693
+ idx
8694
+ ))
8695
+ ]
8696
+ }
8697
+ );
8698
+ })()
8699
+ ]
8700
+ }
8701
+ ),
8702
+ /* @__PURE__ */ jsxRuntime.jsx(
8703
+ "div",
8704
+ {
8705
+ style: {
8706
+ display: "grid",
8707
+ gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
8708
+ gap: 14
8709
+ },
8710
+ children: activeQuestionCharts.map((qs, cIdx) => {
8711
+ const ov = questionOverrides[qs.key] || {
8712
+ chartType: inferDefaultChartKind(qs.type, surveyObj.displayMode),
8713
+ customTitle: pickTextForLocale(qs.title, uiLocale, qs.key)
8714
+ };
8715
+ const items = extractChartPreviewItems(qs, uiLocale, tr);
8716
+ const maxVal = Math.max(1, ...items.map((it) => it.count));
8717
+ const totalVal = Math.max(
8718
+ 1,
8719
+ items.reduce((acc, it) => acc + it.count, 0)
8720
+ );
8721
+ const rowStart = 8 + cIdx * 7;
8722
+ const rowEnd = rowStart + Math.max(1, items.length - 1);
8723
+ const formulaStr = `='${statsSheetTabName}'!$B$${rowStart}:$C$${rowEnd}`;
8724
+ return /* @__PURE__ */ jsxRuntime.jsxs(
8725
+ "div",
8726
+ {
8727
+ onClick: () => setSelectedFormulaHint(formulaStr),
8728
+ style: {
8729
+ padding: 14,
8730
+ borderRadius: 9,
8731
+ border: "1px solid #cbd5e1",
8732
+ background: "#ffffff",
8733
+ display: "flex",
8734
+ flexDirection: "column",
8735
+ gap: 10,
8736
+ boxShadow: "0 2px 6px rgba(15,23,42,0.04)"
8737
+ },
8738
+ children: [
8739
+ /* @__PURE__ */ jsxRuntime.jsxs(
8740
+ "div",
8741
+ {
8742
+ style: {
8743
+ display: "flex",
8744
+ alignItems: "center",
8745
+ justifyContent: "space-between",
8746
+ gap: 6,
8747
+ borderBottom: "1px solid #f1f5f9",
8748
+ paddingBottom: 6
8749
+ },
8750
+ children: [
8751
+ /* @__PURE__ */ jsxRuntime.jsx(
8752
+ "input",
8753
+ {
8754
+ type: "text",
8755
+ value: ov.customTitle,
8756
+ onChange: (e) => updateQuestionOverride(qs.key, {
8757
+ customTitle: e.target.value
8758
+ }),
8759
+ style: {
8760
+ flex: 1,
8761
+ minWidth: 0,
8762
+ border: "1px solid transparent",
8763
+ borderRadius: 4,
8764
+ padding: "2px 4px",
8765
+ fontSize: 12,
8766
+ fontWeight: 800,
8767
+ background: "#ffffff",
8768
+ color: "#0f172a"
8769
+ }
8770
+ }
8771
+ ),
8772
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: 3, flexShrink: 0 }, children: ["bar", "col", "doughnut"].map(
8773
+ (kind) => /* @__PURE__ */ jsxRuntime.jsx(
8774
+ "button",
8775
+ {
8776
+ type: "button",
8777
+ onClick: (e) => {
8778
+ e.stopPropagation();
8779
+ updateQuestionOverride(qs.key, { chartType: kind });
8780
+ },
8781
+ style: {
8782
+ padding: "2px 6px",
8783
+ fontSize: 9.5,
8784
+ fontWeight: 800,
8785
+ borderRadius: 4,
8786
+ border: ov.chartType === kind ? `1px solid ${primaryHex}` : "1px solid #e2e8f0",
8787
+ background: ov.chartType === kind ? primaryHex : "#f8fafc",
8788
+ color: ov.chartType === kind ? "#ffffff" : "#64748b",
8789
+ cursor: "pointer"
8790
+ },
8791
+ children: kind === "bar" ? "▬" : kind === "col" ? "▮" : "◕"
8792
+ },
8793
+ kind
8794
+ )
8795
+ ) })
8796
+ ]
8797
+ }
8798
+ ),
8799
+ ov.chartType === "bar" && /* @__PURE__ */ jsxRuntime.jsx(
8800
+ "div",
8801
+ {
8802
+ style: {
8803
+ display: "flex",
8804
+ flexDirection: "column",
8805
+ gap: 6
8806
+ },
8807
+ children: items.slice(0, 7).map((it, i) => /* @__PURE__ */ jsxRuntime.jsxs(
8808
+ "div",
8809
+ {
8810
+ style: {
8811
+ display: "grid",
8812
+ gridTemplateColumns: "120px 1fr 48px",
8813
+ alignItems: "center",
8814
+ gap: 8,
8815
+ fontSize: 11
8816
+ },
8817
+ children: [
8818
+ /* @__PURE__ */ jsxRuntime.jsx(
8819
+ "span",
8820
+ {
8821
+ title: it.label,
8822
+ style: {
8823
+ overflow: "hidden",
8824
+ textOverflow: "ellipsis",
8825
+ whiteSpace: "nowrap",
8826
+ color: it.isNoOpinion ? "#64748b" : "#334155",
8827
+ fontStyle: it.isNoOpinion ? "italic" : "normal",
8828
+ fontWeight: 600
8829
+ },
8830
+ children: it.label
8831
+ }
8832
+ ),
8833
+ /* @__PURE__ */ jsxRuntime.jsx(
8834
+ "div",
8835
+ {
8836
+ style: {
8837
+ height: 14,
8838
+ borderRadius: 3,
8839
+ background: "#f1f5f9",
8840
+ overflow: "hidden"
8841
+ },
8842
+ children: /* @__PURE__ */ jsxRuntime.jsx(
8843
+ "div",
8844
+ {
8845
+ style: {
8846
+ width: `${Math.max(
8847
+ 2,
8848
+ it.count / maxVal * 100
8849
+ )}%`,
8850
+ height: "100%",
8851
+ background: it.isNoOpinion ? "#94a3b8" : primaryHex,
8852
+ borderRadius: 3
8853
+ }
8854
+ }
8855
+ )
8856
+ }
8857
+ ),
8858
+ /* @__PURE__ */ jsxRuntime.jsx(
8859
+ "span",
8860
+ {
8861
+ style: {
8862
+ textAlign: "right",
8863
+ fontWeight: 700,
8864
+ color: "#0f172a"
8865
+ },
8866
+ children: it.count
8867
+ }
8868
+ )
8869
+ ]
8870
+ },
8871
+ i
8872
+ ))
8873
+ }
8874
+ ),
8875
+ ov.chartType === "col" && /* @__PURE__ */ jsxRuntime.jsx(
8876
+ "div",
8877
+ {
8878
+ style: {
8879
+ height: 145,
8880
+ display: "flex",
8881
+ alignItems: "flex-end",
8882
+ justifyContent: "space-around",
8883
+ gap: 6,
8884
+ padding: "12px 6px 4px",
8885
+ borderBottom: "1px solid #cbd5e1"
8886
+ },
8887
+ children: items.slice(0, 11).map((it, i) => {
8888
+ const barH = Math.max(
8889
+ 4,
8890
+ Math.round(it.count / maxVal * 96)
8891
+ );
8892
+ return /* @__PURE__ */ jsxRuntime.jsxs(
8893
+ "div",
8894
+ {
8895
+ style: {
8896
+ flex: 1,
8897
+ minWidth: 0,
8898
+ display: "flex",
8899
+ flexDirection: "column",
8900
+ alignItems: "center",
8901
+ gap: 4
8902
+ },
8903
+ children: [
8904
+ /* @__PURE__ */ jsxRuntime.jsx(
8905
+ "span",
8906
+ {
8907
+ style: {
8908
+ fontSize: 9.5,
8909
+ fontWeight: 700,
8910
+ color: "#475569"
8911
+ },
8912
+ children: it.count
8913
+ }
8914
+ ),
8915
+ /* @__PURE__ */ jsxRuntime.jsx(
8916
+ "div",
8917
+ {
8918
+ style: {
8919
+ width: "72%",
8920
+ maxWidth: 28,
8921
+ height: barH,
8922
+ background: it.isNoOpinion ? "#94a3b8" : primaryHex,
8923
+ borderRadius: "3px 3px 0 0"
8924
+ }
8925
+ }
8926
+ ),
8927
+ /* @__PURE__ */ jsxRuntime.jsx(
8928
+ "span",
8929
+ {
8930
+ title: it.label,
8931
+ style: {
8932
+ fontSize: 9.5,
8933
+ color: "#64748b",
8934
+ maxWidth: "100%",
8935
+ overflow: "hidden",
8936
+ textOverflow: "ellipsis",
8937
+ whiteSpace: "nowrap"
8938
+ },
8939
+ children: it.label
8940
+ }
8941
+ )
8942
+ ]
8943
+ },
8944
+ i
8945
+ );
8946
+ })
8947
+ }
8948
+ ),
8949
+ ov.chartType === "doughnut" && /* @__PURE__ */ jsxRuntime.jsxs(
8950
+ "div",
8951
+ {
8952
+ style: {
8953
+ display: "flex",
8954
+ alignItems: "center",
8955
+ gap: 14,
8956
+ padding: "4px 0"
8957
+ },
8958
+ children: [
8959
+ (() => {
8960
+ const r = 42;
8961
+ const circ = 2 * Math.PI * r;
8962
+ let accOffset = 0;
8963
+ return /* @__PURE__ */ jsxRuntime.jsxs(
8964
+ "svg",
8965
+ {
8966
+ width: 110,
8967
+ height: 110,
8968
+ viewBox: "0 0 110 110",
8969
+ style: { flexShrink: 0 },
8970
+ children: [
8971
+ /* @__PURE__ */ jsxRuntime.jsx(
8972
+ "circle",
8973
+ {
8974
+ cx: 55,
8975
+ cy: 55,
8976
+ r,
8977
+ fill: "none",
8978
+ stroke: "#f1f5f9",
8979
+ strokeWidth: 18
8980
+ }
8981
+ ),
8982
+ items.slice(0, 8).map((it, idx) => {
8983
+ const frac = it.count / totalVal;
8984
+ const dash = frac * circ;
8985
+ const strokeOffset = -accOffset;
8986
+ accOffset += dash;
8987
+ const color = it.isNoOpinion ? "#94a3b8" : idx === 0 ? primaryHex : SLICE_PALETTE[idx % SLICE_PALETTE.length];
8988
+ return /* @__PURE__ */ jsxRuntime.jsx(
8989
+ "circle",
8990
+ {
8991
+ cx: 55,
8992
+ cy: 55,
8993
+ r,
8994
+ fill: "none",
8995
+ stroke: color,
8996
+ strokeWidth: 18,
8997
+ strokeDasharray: `${dash} ${circ - dash}`,
8998
+ strokeDashoffset: strokeOffset,
8999
+ transform: "rotate(-90 55 55)"
9000
+ },
9001
+ idx
9002
+ );
9003
+ })
9004
+ ]
9005
+ }
9006
+ );
9007
+ })(),
9008
+ /* @__PURE__ */ jsxRuntime.jsx(
9009
+ "div",
9010
+ {
9011
+ style: {
9012
+ flex: 1,
9013
+ minWidth: 0,
9014
+ display: "flex",
9015
+ flexDirection: "column",
9016
+ gap: 4
9017
+ },
9018
+ children: items.slice(0, 6).map((it, idx) => {
9019
+ const color = it.isNoOpinion ? "#94a3b8" : idx === 0 ? primaryHex : SLICE_PALETTE[idx % SLICE_PALETTE.length];
9020
+ return /* @__PURE__ */ jsxRuntime.jsxs(
9021
+ "div",
9022
+ {
9023
+ style: {
9024
+ display: "flex",
9025
+ alignItems: "center",
9026
+ gap: 6,
9027
+ fontSize: 10.5
9028
+ },
9029
+ children: [
9030
+ /* @__PURE__ */ jsxRuntime.jsx(
9031
+ "span",
9032
+ {
9033
+ style: {
9034
+ width: 9,
9035
+ height: 9,
9036
+ borderRadius: 2,
9037
+ background: color,
9038
+ flexShrink: 0
9039
+ }
9040
+ }
9041
+ ),
9042
+ /* @__PURE__ */ jsxRuntime.jsx(
9043
+ "span",
9044
+ {
9045
+ style: {
9046
+ flex: 1,
9047
+ overflow: "hidden",
9048
+ textOverflow: "ellipsis",
9049
+ whiteSpace: "nowrap",
9050
+ color: "#334155"
9051
+ },
9052
+ children: it.label
9053
+ }
9054
+ ),
9055
+ /* @__PURE__ */ jsxRuntime.jsxs("strong", { style: { color: "#0f172a" }, children: [
9056
+ it.pct,
9057
+ "%"
9058
+ ] })
9059
+ ]
9060
+ },
9061
+ idx
9062
+ );
9063
+ })
9064
+ }
9065
+ )
9066
+ ]
9067
+ }
9068
+ ),
9069
+ /* @__PURE__ */ jsxRuntime.jsxs(
9070
+ "div",
9071
+ {
9072
+ style: {
9073
+ fontSize: 9.5,
9074
+ fontFamily: "monospace",
9075
+ color: "#94a3b8",
9076
+ display: "flex",
9077
+ justifyContent: "space-between"
9078
+ },
9079
+ children: [
9080
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
9081
+ "OOXML <c:",
9082
+ ov.chartType,
9083
+ "Chart>"
9084
+ ] }),
9085
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: formulaStr })
9086
+ ]
9087
+ }
9088
+ )
9089
+ ]
9090
+ },
9091
+ qs.key
9092
+ );
9093
+ })
9094
+ }
9095
+ )
9096
+ ] }),
9097
+ activeSheet === "stats" && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: 18, display: "flex", flexDirection: "column", gap: 16 }, children: [
9098
+ /* @__PURE__ */ jsxRuntime.jsxs(
9099
+ "div",
9100
+ {
9101
+ style: {
9102
+ background: primaryHex,
9103
+ color: "#ffffff",
9104
+ padding: "10px 14px",
9105
+ borderRadius: 6,
9106
+ fontSize: 13.5,
9107
+ fontWeight: 800
9108
+ },
9109
+ children: [
9110
+ reportTitle,
9111
+ " —",
9112
+ " ",
9113
+ tr ? "Soru Bazlı İstatistik Özeti (Grafik Veri Kaynağı)" : "Question Statistical Summary (Live Chart Source)"
9114
+ ]
9115
+ }
9116
+ ),
9117
+ includedQuestionTables.map((qs, qIdx) => {
9118
+ const ov = questionOverrides[qs.key];
9119
+ const qTitle = ov?.customTitle || pickTextForLocale(qs.title, uiLocale, qs.key);
9120
+ const items = extractChartPreviewItems(qs, uiLocale, tr);
9121
+ return /* @__PURE__ */ jsxRuntime.jsxs(
9122
+ "div",
9123
+ {
9124
+ style: {
9125
+ border: "1px solid #cbd5e1",
9126
+ borderRadius: 7,
9127
+ overflow: "hidden"
9128
+ },
9129
+ children: [
9130
+ /* @__PURE__ */ jsxRuntime.jsxs(
9131
+ "div",
9132
+ {
9133
+ style: {
9134
+ padding: "7px 12px",
9135
+ background: hexWithAlpha(primaryHex, 0.1),
9136
+ borderBottom: "1px solid #cbd5e1",
9137
+ fontSize: 12,
9138
+ fontWeight: 800,
9139
+ color: primaryHex,
9140
+ display: "flex",
9141
+ justifyContent: "space-between"
9142
+ },
9143
+ children: [
9144
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
9145
+ "S",
9146
+ qIdx + 1,
9147
+ ". ",
9148
+ qTitle,
9149
+ " (",
9150
+ qs.key,
9151
+ ")"
9152
+ ] }),
9153
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: 11, color: "#475569" }, children: [
9154
+ tr ? "Yanıt:" : "Answered:",
9155
+ " ",
9156
+ qs.answeredCount ?? 0
9157
+ ] })
9158
+ ]
9159
+ }
9160
+ ),
9161
+ /* @__PURE__ */ jsxRuntime.jsxs(
9162
+ "table",
9163
+ {
9164
+ style: {
9165
+ width: "100%",
9166
+ borderCollapse: "collapse",
9167
+ fontSize: 11.5,
9168
+ color: "#0f172a"
9169
+ },
9170
+ children: [
9171
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs(
9172
+ "tr",
9173
+ {
9174
+ style: {
9175
+ background: primaryHex,
9176
+ color: "#ffffff",
9177
+ textAlign: "left"
9178
+ },
9179
+ children: [
9180
+ /* @__PURE__ */ jsxRuntime.jsx(
9181
+ "th",
9182
+ {
9183
+ style: {
9184
+ padding: "6px 10px",
9185
+ width: "52%",
9186
+ color: "#ffffff",
9187
+ fontWeight: 700
9188
+ },
9189
+ children: tr ? "Seçenek / Kriter" : "Option / Metric"
9190
+ }
9191
+ ),
9192
+ /* @__PURE__ */ jsxRuntime.jsx(
9193
+ "th",
9194
+ {
9195
+ style: {
9196
+ padding: "6px 10px",
9197
+ textAlign: "right",
9198
+ color: "#ffffff",
9199
+ fontWeight: 700
9200
+ },
9201
+ children: tr ? "Adet / Puan" : "Count / Score"
9202
+ }
9203
+ ),
9204
+ /* @__PURE__ */ jsxRuntime.jsx(
9205
+ "th",
9206
+ {
9207
+ style: {
9208
+ padding: "6px 10px",
9209
+ width: "28%",
9210
+ color: "#ffffff",
9211
+ fontWeight: 700
9212
+ },
9213
+ children: tr ? "Oran (%)" : "Share (%)"
9214
+ }
9215
+ )
9216
+ ]
9217
+ }
9218
+ ) }),
9219
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: items.map((it, rIdx) => {
9220
+ const rowFg = it.isNoOpinion ? "#64748b" : "#0f172a";
9221
+ return /* @__PURE__ */ jsxRuntime.jsxs(
9222
+ "tr",
9223
+ {
9224
+ style: {
9225
+ background: it.isNoOpinion ? "#f1f5f9" : rIdx % 2 === 1 ? "#f8fafc" : "#ffffff",
9226
+ fontStyle: it.isNoOpinion ? "italic" : "normal",
9227
+ color: rowFg,
9228
+ borderBottom: "1px solid #e2e8f0"
9229
+ },
9230
+ children: [
9231
+ /* @__PURE__ */ jsxRuntime.jsx(
9232
+ "td",
9233
+ {
9234
+ style: {
9235
+ padding: "6px 10px",
9236
+ fontWeight: 600,
9237
+ color: rowFg
9238
+ },
9239
+ children: it.label
9240
+ }
9241
+ ),
9242
+ /* @__PURE__ */ jsxRuntime.jsx(
9243
+ "td",
9244
+ {
9245
+ style: {
9246
+ padding: "6px 10px",
9247
+ textAlign: "right",
9248
+ fontFamily: "monospace",
9249
+ fontWeight: 700,
9250
+ color: rowFg
9251
+ },
9252
+ children: it.count
9253
+ }
9254
+ ),
9255
+ /* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "6px 10px", color: rowFg }, children: /* @__PURE__ */ jsxRuntime.jsxs(
9256
+ "div",
9257
+ {
9258
+ style: {
9259
+ position: "relative",
9260
+ height: 18,
9261
+ borderRadius: 3,
9262
+ background: includeDataBars ? "#f1f5f9" : "transparent",
9263
+ display: "flex",
9264
+ alignItems: "center",
9265
+ justifyContent: "flex-end",
9266
+ padding: "0 6px",
9267
+ overflow: "hidden"
9268
+ },
9269
+ children: [
9270
+ includeDataBars && /* @__PURE__ */ jsxRuntime.jsx(
9271
+ "div",
9272
+ {
9273
+ style: {
9274
+ position: "absolute",
9275
+ left: 0,
9276
+ top: 0,
9277
+ bottom: 0,
9278
+ width: `${Math.min(100, Math.max(0, it.pct))}%`,
9279
+ background: hexWithAlpha(primaryHex, 0.24)
9280
+ }
9281
+ }
9282
+ ),
9283
+ /* @__PURE__ */ jsxRuntime.jsxs(
9284
+ "span",
9285
+ {
9286
+ style: {
9287
+ position: "relative",
9288
+ fontFamily: "monospace",
9289
+ fontWeight: 700,
9290
+ fontSize: 11,
9291
+ color: rowFg
9292
+ },
9293
+ children: [
9294
+ it.pct.toFixed(1),
9295
+ "%"
9296
+ ]
9297
+ }
9298
+ )
9299
+ ]
9300
+ }
9301
+ ) })
9302
+ ]
9303
+ },
9304
+ rIdx
9305
+ );
9306
+ }) })
9307
+ ]
9308
+ }
9309
+ )
9310
+ ]
9311
+ },
9312
+ qs.key
9313
+ );
9314
+ })
9315
+ ] }),
9316
+ activeSheet === "raw" && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: 18, display: "flex", flexDirection: "column", gap: 12 }, children: [
9317
+ /* @__PURE__ */ jsxRuntime.jsxs(
9318
+ "div",
9319
+ {
9320
+ style: {
9321
+ background: primaryHex,
9322
+ color: "#ffffff",
9323
+ padding: "10px 14px",
9324
+ borderRadius: 6,
9325
+ fontSize: 13,
9326
+ fontWeight: 800,
9327
+ display: "flex",
9328
+ justifyContent: "space-between"
9329
+ },
9330
+ children: [
9331
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
9332
+ reportTitle,
9333
+ " —",
9334
+ " ",
9335
+ tr ? "Ham Yanıt Kayıtları (Üst Satır Dondurulmuş + AutoFilter)" : "Raw Response Records (Frozen Header + AutoFilter)"
9336
+ ] }),
9337
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 11, opacity: 0.9 }, children: 'ySplit="3" • autoFilter' })
9338
+ ]
9339
+ }
9340
+ ),
9341
+ loadingRawSample ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: 24, textAlign: "center", color: "#64748b" }, children: tr ? "Örnek yanıt satırları yükleniyor..." : "Loading sample rows..." }) : rawSampleRows.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(
9342
+ "div",
9343
+ {
9344
+ style: {
9345
+ padding: 24,
9346
+ textAlign: "center",
9347
+ color: "#64748b",
9348
+ background: "#f8fafc",
9349
+ borderRadius: 6,
9350
+ border: "1px dashed #cbd5e1",
9351
+ fontSize: 12
9352
+ },
9353
+ children: tr ? "Henüz görüntülenecek ham yanıt kaydı bulunmuyor." : "No raw response records available yet."
9354
+ }
9355
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
9356
+ "div",
9357
+ {
9358
+ style: {
9359
+ overflowX: "auto",
9360
+ border: "1px solid #cbd5e1",
9361
+ borderRadius: 6,
9362
+ background: "#ffffff"
9363
+ },
9364
+ children: (() => {
9365
+ const previewQuestions = (Array.isArray(surveyObj.questions) ? surveyObj.questions : []).filter((q) => q && q.type !== "statement").slice(0, 4);
9366
+ const formatPreviewAnswer = (q, rawVal) => {
9367
+ if (rawVal === void 0 || rawVal === null || rawVal === "") {
9368
+ return { text: "—", isNa: false };
9369
+ }
9370
+ if (rawVal === "__na__" || Array.isArray(rawVal) && rawVal.length === 1 && rawVal[0] === "__na__") {
9371
+ return {
9372
+ text: pickTextForLocale(
9373
+ q.noOpinionLabel,
9374
+ uiLocale,
9375
+ tr ? "Fikrim yok" : "No idea"
9376
+ ),
9377
+ isNa: true
9378
+ };
9379
+ }
9380
+ if (typeof rawVal === "boolean") {
9381
+ return {
9382
+ text: rawVal ? tr ? "Evet" : "Yes" : tr ? "Hayır" : "No",
9383
+ isNa: false
9384
+ };
9385
+ }
9386
+ if (Array.isArray(q.options) && q.options.length > 0) {
9387
+ if (Array.isArray(rawVal)) {
9388
+ const mapped = rawVal.map((id) => {
9389
+ const found2 = q.options.find((o) => o.id === id);
9390
+ return found2 ? pickTextForLocale(found2.labels, uiLocale, id) : id;
9391
+ });
9392
+ return { text: mapped.join("; "), isNa: false };
9393
+ }
9394
+ const found = q.options.find(
9395
+ (o) => o.id === String(rawVal)
9396
+ );
9397
+ return {
9398
+ text: found ? pickTextForLocale(found.labels, uiLocale, String(rawVal)) : String(rawVal),
9399
+ isNa: false
9400
+ };
9401
+ }
9402
+ if (typeof rawVal === "object") {
9403
+ return { text: JSON.stringify(rawVal), isNa: false };
9404
+ }
9405
+ return { text: String(rawVal), isNa: false };
9406
+ };
9407
+ return /* @__PURE__ */ jsxRuntime.jsxs(
9408
+ "table",
9409
+ {
9410
+ style: {
9411
+ width: "100%",
9412
+ borderCollapse: "collapse",
9413
+ fontSize: 11.5,
9414
+ color: "#0f172a"
9415
+ },
9416
+ children: [
9417
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { style: { background: primaryHex, color: "#ffffff" }, children: [
9418
+ tr ? "Yanıt ID ▼" : "Response ID ▼",
9419
+ tr ? "Tarih ▼" : "Submitted At ▼",
9420
+ tr ? "Dil ▼" : "Locale ▼",
9421
+ tr ? "Süre (sn) ▼" : "Duration (s) ▼",
9422
+ "NPS ▼",
9423
+ tr ? "NPS Kategorisi ▼" : "NPS Category ▼",
9424
+ ...previewQuestions.map(
9425
+ (q) => `${pickTextForLocale(q.title, uiLocale, q.key).slice(
9426
+ 0,
9427
+ 26
9428
+ )} ▼`
9429
+ )
9430
+ ].map((h, i) => /* @__PURE__ */ jsxRuntime.jsx(
9431
+ "th",
9432
+ {
9433
+ style: {
9434
+ padding: "7px 10px",
9435
+ textAlign: "left",
9436
+ whiteSpace: "nowrap",
9437
+ color: "#ffffff",
9438
+ fontWeight: 700
9439
+ },
9440
+ children: h
9441
+ },
9442
+ i
9443
+ )) }) }),
9444
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: rawSampleRows.slice(0, 15).map((r, rIdx) => {
9445
+ const cat = String(r.npsCategory || "");
9446
+ const catStyle = cat === "promoter" ? { bg: "#dcfce7", fg: "#166534" } : cat === "passive" ? { bg: "#fef3c7", fg: "#92400e" } : cat === "detractor" ? { bg: "#fee2e2", fg: "#991b1b" } : null;
9447
+ return /* @__PURE__ */ jsxRuntime.jsxs(
9448
+ "tr",
9449
+ {
9450
+ style: {
9451
+ background: rIdx % 2 === 1 ? "#f8fafc" : "#ffffff",
9452
+ color: "#0f172a",
9453
+ borderBottom: "1px solid #e2e8f0"
9454
+ },
9455
+ children: [
9456
+ /* @__PURE__ */ jsxRuntime.jsxs(
9457
+ "td",
9458
+ {
9459
+ style: {
9460
+ padding: "6px 10px",
9461
+ fontFamily: "monospace",
9462
+ fontWeight: 700,
9463
+ color: "#334155",
9464
+ whiteSpace: "nowrap"
9465
+ },
9466
+ children: [
9467
+ "#",
9468
+ r.id || rIdx + 1
9469
+ ]
9470
+ }
9471
+ ),
9472
+ /* @__PURE__ */ jsxRuntime.jsx(
9473
+ "td",
9474
+ {
9475
+ style: {
9476
+ padding: "6px 10px",
9477
+ color: "#1e293b",
9478
+ whiteSpace: "nowrap"
9479
+ },
9480
+ children: String(r.submittedAt || r.createdAt || "").slice(0, 16).replace("T", " ")
9481
+ }
9482
+ ),
9483
+ /* @__PURE__ */ jsxRuntime.jsx(
9484
+ "td",
9485
+ {
9486
+ style: {
9487
+ padding: "6px 10px",
9488
+ fontWeight: 700,
9489
+ color: "#0f172a"
9490
+ },
9491
+ children: String(r.locale || "en").toUpperCase()
9492
+ }
9493
+ ),
9494
+ /* @__PURE__ */ jsxRuntime.jsx(
9495
+ "td",
9496
+ {
9497
+ style: {
9498
+ padding: "6px 10px",
9499
+ textAlign: "right",
9500
+ fontFamily: "monospace",
9501
+ color: "#1e293b"
9502
+ },
9503
+ children: r.durationSeconds ?? "—"
9504
+ }
9505
+ ),
9506
+ /* @__PURE__ */ jsxRuntime.jsx(
9507
+ "td",
9508
+ {
9509
+ style: {
9510
+ padding: "6px 10px",
9511
+ textAlign: "right",
9512
+ fontFamily: "monospace",
9513
+ fontWeight: 700,
9514
+ color: "#0f172a"
9515
+ },
9516
+ children: r.npsValue ?? "—"
9517
+ }
9518
+ ),
9519
+ /* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "6px 10px", color: "#64748b" }, children: catStyle ? /* @__PURE__ */ jsxRuntime.jsx(
9520
+ "span",
9521
+ {
9522
+ style: {
9523
+ padding: "2px 8px",
9524
+ borderRadius: 4,
9525
+ background: catStyle.bg,
9526
+ color: catStyle.fg,
9527
+ fontWeight: 800,
9528
+ fontSize: 10.5,
9529
+ textTransform: "uppercase"
9530
+ },
9531
+ children: cat
9532
+ }
9533
+ ) : /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#64748b" }, children: "—" }) }),
9534
+ previewQuestions.map((q) => {
9535
+ const formatted = formatPreviewAnswer(
9536
+ q,
9537
+ r.answers?.[q.key]
9538
+ );
9539
+ return /* @__PURE__ */ jsxRuntime.jsx(
9540
+ "td",
9541
+ {
9542
+ title: formatted.text,
9543
+ style: {
9544
+ padding: "6px 10px",
9545
+ maxWidth: 200,
9546
+ overflow: "hidden",
9547
+ textOverflow: "ellipsis",
9548
+ whiteSpace: "nowrap",
9549
+ color: formatted.isNa ? "#64748b" : "#1e293b",
9550
+ fontStyle: formatted.isNa ? "italic" : "normal"
9551
+ },
9552
+ children: formatted.text
9553
+ },
9554
+ q.key
9555
+ );
9556
+ })
9557
+ ]
9558
+ },
9559
+ r.id || rIdx
9560
+ );
9561
+ }) })
9562
+ ]
9563
+ }
9564
+ );
9565
+ })()
9566
+ }
9567
+ )
9568
+ ] })
9569
+ ]
9570
+ }
9571
+ )
9572
+ }
9573
+ ),
9574
+ /* @__PURE__ */ jsxRuntime.jsxs(
9575
+ "div",
9576
+ {
9577
+ style: {
9578
+ padding: "0 14px",
9579
+ height: 38,
9580
+ background: "#f1f5f9",
9581
+ borderTop: "1px solid #cbd5e1",
9582
+ display: "flex",
9583
+ alignItems: "flex-end",
9584
+ justifyContent: "space-between",
9585
+ flexShrink: 0
9586
+ },
9587
+ children: [
9588
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "flex-end", gap: 4 }, children: [
9589
+ /* @__PURE__ */ jsxRuntime.jsx(
9590
+ "button",
9591
+ {
9592
+ type: "button",
9593
+ onClick: () => setActiveSheet("dashboard"),
9594
+ style: {
9595
+ padding: "6px 14px",
9596
+ borderRadius: "6px 6px 0 0",
9597
+ border: "1px solid #cbd5e1",
9598
+ borderBottom: activeSheet === "dashboard" ? `3px solid ${primaryHex}` : "1px solid #cbd5e1",
9599
+ background: activeSheet === "dashboard" ? "#ffffff" : "#e2e8f0",
9600
+ color: activeSheet === "dashboard" ? primaryHex : "#475569",
9601
+ fontSize: 11.5,
9602
+ fontWeight: 800,
9603
+ cursor: "pointer"
9604
+ },
9605
+ children: "📊 1_Dashboard"
9606
+ }
9607
+ ),
9608
+ /* @__PURE__ */ jsxRuntime.jsxs(
9609
+ "button",
9610
+ {
9611
+ type: "button",
9612
+ onClick: () => setActiveSheet("stats"),
9613
+ style: {
9614
+ padding: "6px 14px",
9615
+ borderRadius: "6px 6px 0 0",
9616
+ border: "1px solid #cbd5e1",
9617
+ borderBottom: activeSheet === "stats" ? "3px solid #059669" : "1px solid #cbd5e1",
9618
+ background: activeSheet === "stats" ? "#ffffff" : "#e2e8f0",
9619
+ color: activeSheet === "stats" ? "#059669" : "#475569",
9620
+ fontSize: 11.5,
9621
+ fontWeight: 800,
9622
+ cursor: "pointer"
9623
+ },
9624
+ children: [
9625
+ "📈 ",
9626
+ statsSheetTabName
9627
+ ]
9628
+ }
9629
+ ),
9630
+ includeRawSheet && /* @__PURE__ */ jsxRuntime.jsxs(
9631
+ "button",
9632
+ {
9633
+ type: "button",
9634
+ onClick: () => setActiveSheet("raw"),
9635
+ style: {
9636
+ padding: "6px 14px",
9637
+ borderRadius: "6px 6px 0 0",
9638
+ border: "1px solid #cbd5e1",
9639
+ borderBottom: activeSheet === "raw" ? "3px solid #475569" : "1px solid #cbd5e1",
9640
+ background: activeSheet === "raw" ? "#ffffff" : "#e2e8f0",
9641
+ color: activeSheet === "raw" ? "#0f172a" : "#475569",
9642
+ fontSize: 11.5,
9643
+ fontWeight: 800,
9644
+ cursor: "pointer"
9645
+ },
9646
+ children: [
9647
+ "📋 ",
9648
+ rawSheetTabName
9649
+ ]
9650
+ }
9651
+ )
9652
+ ] }),
9653
+ /* @__PURE__ */ jsxRuntime.jsx(
9654
+ "div",
9655
+ {
9656
+ style: {
9657
+ alignSelf: "center",
9658
+ fontSize: 11,
9659
+ fontWeight: 700,
9660
+ color: "#64748b"
9661
+ },
9662
+ children: tr ? `Hazır • ${includeRawSheet ? 3 : 2} Çalışma Sayfası • ${activeQuestionCharts.length + (includeTrendChart ? 1 : 0)} Gerçek Grafik` : `Ready • ${includeRawSheet ? 3 : 2} Sheets • ${activeQuestionCharts.length + (includeTrendChart ? 1 : 0)} Native Charts`
9663
+ }
9664
+ )
9665
+ ]
9666
+ }
9667
+ )
9668
+ ]
9669
+ }
9670
+ )
9671
+ ]
9672
+ }
9673
+ )
9674
+ ]
9675
+ }
9676
+ )
9677
+ }
9678
+ ),
9679
+ document.body
9680
+ );
9681
+ };
7277
9682
  const QUESTION_TYPE_BADGES = {
7278
9683
  single_choice: { tr: "Tekli Seçim", en: "Single Choice", color: "#1d4ed8", bg: "#eff6ff" },
7279
9684
  multiple_choice: { tr: "Çoklu Seçim", en: "Multi Choice", color: "#7c3aed", bg: "#f5f3ff" },
@@ -7298,6 +9703,7 @@ const SurveyAnalyticsView = ({
7298
9703
  const { get } = admin.useFetchClient();
7299
9704
  const [loading, setLoading] = React.useState(false);
7300
9705
  const [exporting, setExporting] = React.useState(null);
9706
+ const [excelStudioOpen, setExcelStudioOpen] = React.useState(false);
7301
9707
  const [analytics, setAnalytics] = React.useState(null);
7302
9708
  const [dateFrom, setDateFrom] = React.useState("");
7303
9709
  const [dateTo, setDateTo] = React.useState("");
@@ -7509,6 +9915,30 @@ const SurveyAnalyticsView = ({
7509
9915
  ]
7510
9916
  }
7511
9917
  ),
9918
+ /* @__PURE__ */ jsxRuntime.jsxs(
9919
+ "button",
9920
+ {
9921
+ type: "button",
9922
+ onClick: () => setExcelStudioOpen(true),
9923
+ style: {
9924
+ padding: "6px 13px",
9925
+ fontSize: 11,
9926
+ fontWeight: 700,
9927
+ borderRadius: 6,
9928
+ border: "1px solid #1e3a8a",
9929
+ background: "#1e3a8a",
9930
+ color: "#ffffff",
9931
+ cursor: "pointer",
9932
+ display: "inline-flex",
9933
+ alignItems: "center",
9934
+ gap: 5
9935
+ },
9936
+ children: [
9937
+ /* @__PURE__ */ jsxRuntime.jsx(index.MaterialIcon, { name: "bar_chart", size: 14, color: "#fff" }),
9938
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: tr ? "Excel Önizle & Düzenle" : "Customize & Preview .xlsx" })
9939
+ ]
9940
+ }
9941
+ ),
7512
9942
  /* @__PURE__ */ jsxRuntime.jsxs(
7513
9943
  "button",
7514
9944
  {
@@ -7530,7 +9960,7 @@ const SurveyAnalyticsView = ({
7530
9960
  },
7531
9961
  children: [
7532
9962
  /* @__PURE__ */ jsxRuntime.jsx(index.MaterialIcon, { name: "table_view", size: 14, color: "#fff" }),
7533
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: exporting === "xlsx" ? "..." : tr ? "Excel İndir (.xlsx)" : "Export Excel (.xlsx)" })
9963
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: exporting === "xlsx" ? "..." : tr ? "Hızlı Excel (.xlsx)" : "Quick Excel (.xlsx)" })
7534
9964
  ]
7535
9965
  }
7536
9966
  ),
@@ -8691,7 +11121,19 @@ const SurveyAnalyticsView = ({
8691
11121
  },
8692
11122
  qs.key || qIdx
8693
11123
  );
8694
- }) })
11124
+ }) }),
11125
+ /* @__PURE__ */ jsxRuntime.jsx(
11126
+ ExcelReportStudioModal,
11127
+ {
11128
+ open: excelStudioOpen,
11129
+ onClose: () => setExcelStudioOpen(false),
11130
+ surveySlugOrId,
11131
+ analytics,
11132
+ dateFrom,
11133
+ dateTo,
11134
+ uiLocale
11135
+ }
11136
+ )
8695
11137
  ] });
8696
11138
  };
8697
11139
  function isEmptyVal(val) {