@ozguraltan/strapi-content-input 1.0.23 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/admin/{AnalyticsHubPage-K_trli5i.js → AnalyticsHubPage-ByOrVZCl.js} +372 -7
- package/dist/admin/{AnalyticsHubPage-Dvpx3KsP.mjs → AnalyticsHubPage-O-7pF2E5.mjs} +372 -7
- package/dist/admin/{ContentInputField-C2kmtUwD.mjs → ContentInputField-BoZHf0Ka.mjs} +2 -2
- package/dist/admin/{ContentInputField-CjxYYEps.js → ContentInputField-DK97AIG0.js} +2 -2
- package/dist/admin/{SurveyWidgetEditor-DOYxWop9.js → SurveyWidgetEditor-D3KiAotu.js} +2927 -302
- package/dist/admin/{SurveyWidgetEditor-DMWOkHUt.mjs → SurveyWidgetEditor-Y5BR-NWE.mjs} +2928 -304
- package/dist/admin/{index-AePRA0IB.mjs → index-C5Uj5YV9.mjs} +2 -2
- package/dist/admin/{index-B9C8Qrfd.js → index-CHtB_Fa5.js} +2 -2
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/components/widgets/SurveyTransferCleanupModal.d.ts +35 -0
- package/dist/admin/src/components/widgets/surveyStepTreeOps.d.ts +54 -0
- package/dist/server/index.js +613 -20
- package/dist/server/index.mjs +613 -20
- package/dist/server/src/controllers/ci-survey.d.ts +4 -0
- package/dist/server/src/controllers/index.d.ts +4 -0
- package/dist/server/src/index.d.ts +46 -1
- package/dist/server/src/services/ci-form.d.ts +5 -1
- package/dist/server/src/services/ci-survey.d.ts +37 -0
- package/dist/server/src/services/index.d.ts +42 -1
- package/dist/server/src/utils/demoSeedState.d.ts +14 -0
- package/package.json +1 -1
|
@@ -2,8 +2,8 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState, useCallback, useEffect } from "react";
|
|
3
3
|
import { useFetchClient } from "@strapi/strapi/admin";
|
|
4
4
|
import * as XLSXNs from "xlsx";
|
|
5
|
-
import { M as MaterialIcon } from "./index-
|
|
6
|
-
import { h as useStrapiLocales, K as getInitialLocale, L as createBlankSurveyDraft, M as ColorCodesManager, N as pickTextForLocale, O as SurveyAnalyticsView, P as SurveyStudioModal, Q as persistLocale } from "./SurveyWidgetEditor-
|
|
5
|
+
import { M as MaterialIcon } from "./index-C5Uj5YV9.mjs";
|
|
6
|
+
import { h as useStrapiLocales, K as getInitialLocale, L as createBlankSurveyDraft, M as ColorCodesManager, N as pickTextForLocale, O as SurveyAnalyticsView, P as SurveyStudioModal, Q as SurveyExportModal, T as SurveyImportModal, U as SurveyCleanupConfirmModal, V as persistLocale } from "./SurveyWidgetEditor-Y5BR-NWE.mjs";
|
|
7
7
|
const XLSX = XLSXNs?.utils ? XLSXNs : XLSXNs?.default || XLSXNs;
|
|
8
8
|
const AnalyticsHubPage = () => {
|
|
9
9
|
const { get, post } = useFetchClient();
|
|
@@ -28,6 +28,11 @@ const AnalyticsHubPage = () => {
|
|
|
28
28
|
const [studioTarget, setStudioTarget] = useState(
|
|
29
29
|
() => createBlankSurveyDraft(uiLocale)
|
|
30
30
|
);
|
|
31
|
+
const [exportModalOpen, setExportModalOpen] = useState(false);
|
|
32
|
+
const [exportDefaultScope, setExportDefaultScope] = useState("single");
|
|
33
|
+
const [importModalOpen, setImportModalOpen] = useState(false);
|
|
34
|
+
const [cleanupAction, setCleanupAction] = useState(null);
|
|
35
|
+
const [hubNotice, setHubNotice] = useState("");
|
|
31
36
|
const [forms, setForms] = useState([]);
|
|
32
37
|
const [selectedFormSlug, setSelectedFormSlug] = useState("all");
|
|
33
38
|
const [submissions, setSubmissions] = useState([]);
|
|
@@ -75,6 +80,9 @@ const AnalyticsHubPage = () => {
|
|
|
75
80
|
await loadSurveys();
|
|
76
81
|
if (section === "forms") await loadFormsAndSubmissions();
|
|
77
82
|
setAnalyticsRefreshKey((k) => k + 1);
|
|
83
|
+
setHubNotice(
|
|
84
|
+
tr ? "Örnek anketler ve form verileri başarıyla geri yüklendi." : "Sample surveys and form submissions restored."
|
|
85
|
+
);
|
|
78
86
|
} catch {
|
|
79
87
|
} finally {
|
|
80
88
|
setReseeding(false);
|
|
@@ -245,6 +253,86 @@ const AnalyticsHubPage = () => {
|
|
|
245
253
|
]
|
|
246
254
|
}
|
|
247
255
|
),
|
|
256
|
+
/* @__PURE__ */ jsxs(
|
|
257
|
+
"button",
|
|
258
|
+
{
|
|
259
|
+
type: "button",
|
|
260
|
+
onClick: () => setImportModalOpen(true),
|
|
261
|
+
style: {
|
|
262
|
+
padding: "8px 12px",
|
|
263
|
+
borderRadius: 8,
|
|
264
|
+
border: "1px solid rgba(56, 189, 248, 0.5)",
|
|
265
|
+
background: "rgba(14, 165, 233, 0.16)",
|
|
266
|
+
color: "#e0f2fe",
|
|
267
|
+
fontSize: 11.5,
|
|
268
|
+
fontWeight: 700,
|
|
269
|
+
cursor: "pointer",
|
|
270
|
+
display: "inline-flex",
|
|
271
|
+
alignItems: "center",
|
|
272
|
+
gap: 6
|
|
273
|
+
},
|
|
274
|
+
title: tr ? "JSON (.ci-survey.json) paketinden anket yapısını ve/veya yanıtlarını canlandırır" : "Import survey structure and/or responses from a .ci-survey.json bundle",
|
|
275
|
+
children: [
|
|
276
|
+
/* @__PURE__ */ jsx(MaterialIcon, { name: "upload_file", size: 15, color: "#7dd3fc" }),
|
|
277
|
+
/* @__PURE__ */ jsx("span", { children: tr ? "JSON İçe Aktar" : "Import JSON" })
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
),
|
|
281
|
+
/* @__PURE__ */ jsxs(
|
|
282
|
+
"button",
|
|
283
|
+
{
|
|
284
|
+
type: "button",
|
|
285
|
+
disabled: surveys.length === 0,
|
|
286
|
+
onClick: () => {
|
|
287
|
+
setExportDefaultScope("all");
|
|
288
|
+
setExportModalOpen(true);
|
|
289
|
+
},
|
|
290
|
+
style: {
|
|
291
|
+
padding: "8px 12px",
|
|
292
|
+
borderRadius: 8,
|
|
293
|
+
border: "1px solid rgba(52, 211, 153, 0.45)",
|
|
294
|
+
background: "rgba(16, 185, 129, 0.16)",
|
|
295
|
+
color: "#d1fae5",
|
|
296
|
+
fontSize: 11.5,
|
|
297
|
+
fontWeight: 700,
|
|
298
|
+
opacity: surveys.length === 0 ? 0.55 : 1,
|
|
299
|
+
cursor: surveys.length === 0 ? "not-allowed" : "pointer",
|
|
300
|
+
display: "inline-flex",
|
|
301
|
+
alignItems: "center",
|
|
302
|
+
gap: 6
|
|
303
|
+
},
|
|
304
|
+
title: tr ? "Anketleri sadece yapı veya yapı + veri olarak .ci-survey.json paketine aktarır" : "Export surveys as structure-only or structure + data (.ci-survey.json)",
|
|
305
|
+
children: [
|
|
306
|
+
/* @__PURE__ */ jsx(MaterialIcon, { name: "download", size: 15, color: "#6ee7b7" }),
|
|
307
|
+
/* @__PURE__ */ jsx("span", { children: tr ? "Yedekle / Dışa Aktar" : "Export Bundle" })
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
),
|
|
311
|
+
/* @__PURE__ */ jsxs(
|
|
312
|
+
"button",
|
|
313
|
+
{
|
|
314
|
+
type: "button",
|
|
315
|
+
onClick: () => setCleanupAction("purge-demo"),
|
|
316
|
+
style: {
|
|
317
|
+
padding: "8px 12px",
|
|
318
|
+
borderRadius: 8,
|
|
319
|
+
border: "1px solid rgba(251, 146, 60, 0.48)",
|
|
320
|
+
background: "rgba(234, 88, 12, 0.18)",
|
|
321
|
+
color: "#ffedd5",
|
|
322
|
+
fontSize: 11.5,
|
|
323
|
+
fontWeight: 700,
|
|
324
|
+
cursor: "pointer",
|
|
325
|
+
display: "inline-flex",
|
|
326
|
+
alignItems: "center",
|
|
327
|
+
gap: 6
|
|
328
|
+
},
|
|
329
|
+
title: tr ? "Sadece yerleşik örnek (showcase_*) anket/form verilerini siler; kendi anketlerinize dokunmaz" : "Removes built-in showcase_* demo surveys & form submissions without touching your custom surveys",
|
|
330
|
+
children: [
|
|
331
|
+
/* @__PURE__ */ jsx(MaterialIcon, { name: "delete_sweep", size: 15, color: "#fdba74" }),
|
|
332
|
+
/* @__PURE__ */ jsx("span", { children: tr ? "Dummy Veriyi Temizle" : "Purge Demo Data" })
|
|
333
|
+
]
|
|
334
|
+
}
|
|
335
|
+
),
|
|
248
336
|
/* @__PURE__ */ jsxs(
|
|
249
337
|
"button",
|
|
250
338
|
{
|
|
@@ -264,10 +352,10 @@ const AnalyticsHubPage = () => {
|
|
|
264
352
|
alignItems: "center",
|
|
265
353
|
gap: 6
|
|
266
354
|
},
|
|
267
|
-
title: tr ? "Örnek analiz veri kümesini (525 anket yanıtı + 20 form başvurusu) yeniler" : "
|
|
355
|
+
title: tr ? "Örnek analiz veri kümesini (525 anket yanıtı + 20 form başvurusu) geri yükler / yeniler" : "Restores or refreshes the 525-response correlated analytics dataset",
|
|
268
356
|
children: [
|
|
269
357
|
/* @__PURE__ */ jsx(MaterialIcon, { name: "refresh", size: 15, color: "#38bdf8" }),
|
|
270
|
-
/* @__PURE__ */ jsx("span", { children: reseeding ? "..." : tr ? "Örnek Veriyi
|
|
358
|
+
/* @__PURE__ */ jsx("span", { children: reseeding ? "..." : tr ? "Örnek Veriyi Geri Yükle" : "Restore Sample Data" })
|
|
271
359
|
]
|
|
272
360
|
}
|
|
273
361
|
),
|
|
@@ -411,6 +499,46 @@ const AnalyticsHubPage = () => {
|
|
|
411
499
|
]
|
|
412
500
|
}
|
|
413
501
|
),
|
|
502
|
+
hubNotice && /* @__PURE__ */ jsxs(
|
|
503
|
+
"div",
|
|
504
|
+
{
|
|
505
|
+
style: {
|
|
506
|
+
margin: "14px 28px 0",
|
|
507
|
+
padding: "10px 16px",
|
|
508
|
+
borderRadius: 9,
|
|
509
|
+
background: "#ecfdf5",
|
|
510
|
+
border: "1px solid #6ee7b7",
|
|
511
|
+
color: "#065f46",
|
|
512
|
+
fontSize: 12.5,
|
|
513
|
+
fontWeight: 700,
|
|
514
|
+
display: "flex",
|
|
515
|
+
alignItems: "center",
|
|
516
|
+
justifyContent: "space-between",
|
|
517
|
+
gap: 12
|
|
518
|
+
},
|
|
519
|
+
children: [
|
|
520
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
521
|
+
/* @__PURE__ */ jsx(MaterialIcon, { name: "check_circle", size: 18, color: "#059669" }),
|
|
522
|
+
/* @__PURE__ */ jsx("span", { children: hubNotice })
|
|
523
|
+
] }),
|
|
524
|
+
/* @__PURE__ */ jsx(
|
|
525
|
+
"button",
|
|
526
|
+
{
|
|
527
|
+
type: "button",
|
|
528
|
+
onClick: () => setHubNotice(""),
|
|
529
|
+
style: {
|
|
530
|
+
border: "none",
|
|
531
|
+
background: "transparent",
|
|
532
|
+
color: "#065f46",
|
|
533
|
+
fontSize: 16,
|
|
534
|
+
cursor: "pointer"
|
|
535
|
+
},
|
|
536
|
+
children: "×"
|
|
537
|
+
}
|
|
538
|
+
)
|
|
539
|
+
]
|
|
540
|
+
}
|
|
541
|
+
),
|
|
414
542
|
section === "colors" ? /* @__PURE__ */ jsx("div", { style: { padding: "22px 28px" }, children: /* @__PURE__ */ jsx(
|
|
415
543
|
"div",
|
|
416
544
|
{
|
|
@@ -423,7 +551,99 @@ const AnalyticsHubPage = () => {
|
|
|
423
551
|
},
|
|
424
552
|
children: /* @__PURE__ */ jsx(ColorCodesManager, { locale: uiLocale })
|
|
425
553
|
}
|
|
426
|
-
) }) : section === "surveys" ? /* @__PURE__ */ jsxs(
|
|
554
|
+
) }) : section === "surveys" ? surveys.length === 0 ? /* @__PURE__ */ jsx("div", { style: { padding: "36px 28px" }, children: /* @__PURE__ */ jsxs(
|
|
555
|
+
"div",
|
|
556
|
+
{
|
|
557
|
+
style: {
|
|
558
|
+
maxWidth: 640,
|
|
559
|
+
margin: "0 auto",
|
|
560
|
+
padding: "38px 32px",
|
|
561
|
+
borderRadius: 14,
|
|
562
|
+
background: "#ffffff",
|
|
563
|
+
border: "1px solid #cbd5e1",
|
|
564
|
+
textAlign: "center",
|
|
565
|
+
boxShadow: "0 6px 20px rgba(15, 23, 42, 0.04)"
|
|
566
|
+
},
|
|
567
|
+
children: [
|
|
568
|
+
/* @__PURE__ */ jsx(MaterialIcon, { name: "poll", size: 40, color: "#2563eb" }),
|
|
569
|
+
/* @__PURE__ */ jsx("h2", { style: { margin: "12px 0 6px", fontSize: 18, fontWeight: 800, color: "#0f172a" }, children: tr ? "Henüz Kayıtlı Anket Bulunmuyor" : "No Surveys Found Yet" }),
|
|
570
|
+
/* @__PURE__ */ jsx("p", { style: { margin: "0 0 20px", fontSize: 13, color: "#64748b", lineHeight: 1.55 }, children: tr ? "Sıfırdan yeni bir kurumsal anket veya oylama oluşturabilir, daha önce dışa aktardığınız bir .ci-survey.json paketini canlandırabilir ya da yerleşik örnek verileri geri yükleyebilirsiniz." : "Create a brand-new survey from scratch, revive an exported .ci-survey.json package, or restore the sample showcase dataset." }),
|
|
571
|
+
/* @__PURE__ */ jsxs(
|
|
572
|
+
"div",
|
|
573
|
+
{
|
|
574
|
+
style: {
|
|
575
|
+
display: "flex",
|
|
576
|
+
alignItems: "center",
|
|
577
|
+
justifyContent: "center",
|
|
578
|
+
flexWrap: "wrap",
|
|
579
|
+
gap: 10
|
|
580
|
+
},
|
|
581
|
+
children: [
|
|
582
|
+
/* @__PURE__ */ jsx(
|
|
583
|
+
"button",
|
|
584
|
+
{
|
|
585
|
+
type: "button",
|
|
586
|
+
onClick: () => {
|
|
587
|
+
setStudioTarget(createBlankSurveyDraft(uiLocale));
|
|
588
|
+
setStudioInitialTab("builder");
|
|
589
|
+
setStudioOpen(true);
|
|
590
|
+
},
|
|
591
|
+
style: {
|
|
592
|
+
padding: "9px 16px",
|
|
593
|
+
borderRadius: 8,
|
|
594
|
+
border: "none",
|
|
595
|
+
background: "#2563eb",
|
|
596
|
+
color: "#ffffff",
|
|
597
|
+
fontSize: 12.5,
|
|
598
|
+
fontWeight: 700,
|
|
599
|
+
cursor: "pointer"
|
|
600
|
+
},
|
|
601
|
+
children: tr ? "+ Yeni Anket Oluştur" : "+ Create New Survey"
|
|
602
|
+
}
|
|
603
|
+
),
|
|
604
|
+
/* @__PURE__ */ jsx(
|
|
605
|
+
"button",
|
|
606
|
+
{
|
|
607
|
+
type: "button",
|
|
608
|
+
onClick: () => setImportModalOpen(true),
|
|
609
|
+
style: {
|
|
610
|
+
padding: "9px 16px",
|
|
611
|
+
borderRadius: 8,
|
|
612
|
+
border: "1px solid #2563eb",
|
|
613
|
+
background: "#eff6ff",
|
|
614
|
+
color: "#1d4ed8",
|
|
615
|
+
fontSize: 12.5,
|
|
616
|
+
fontWeight: 700,
|
|
617
|
+
cursor: "pointer"
|
|
618
|
+
},
|
|
619
|
+
children: tr ? "JSON Paketinden İçe Aktar" : "Import from JSON Bundle"
|
|
620
|
+
}
|
|
621
|
+
),
|
|
622
|
+
/* @__PURE__ */ jsx(
|
|
623
|
+
"button",
|
|
624
|
+
{
|
|
625
|
+
type: "button",
|
|
626
|
+
disabled: reseeding,
|
|
627
|
+
onClick: handleReseedDemo,
|
|
628
|
+
style: {
|
|
629
|
+
padding: "9px 14px",
|
|
630
|
+
borderRadius: 8,
|
|
631
|
+
border: "1px solid #cbd5e1",
|
|
632
|
+
background: "#f8fafc",
|
|
633
|
+
color: "#334155",
|
|
634
|
+
fontSize: 12,
|
|
635
|
+
fontWeight: 600,
|
|
636
|
+
cursor: "pointer"
|
|
637
|
+
},
|
|
638
|
+
children: tr ? "Örnek Verileri Geri Yükle" : "Restore Sample Data"
|
|
639
|
+
}
|
|
640
|
+
)
|
|
641
|
+
]
|
|
642
|
+
}
|
|
643
|
+
)
|
|
644
|
+
]
|
|
645
|
+
}
|
|
646
|
+
) }) : /* @__PURE__ */ jsxs(
|
|
427
647
|
"div",
|
|
428
648
|
{
|
|
429
649
|
style: {
|
|
@@ -462,7 +682,7 @@ const AnalyticsHubPage = () => {
|
|
|
462
682
|
cursor: "pointer",
|
|
463
683
|
display: "flex",
|
|
464
684
|
flexDirection: "column",
|
|
465
|
-
gap:
|
|
685
|
+
gap: 5
|
|
466
686
|
},
|
|
467
687
|
children: [
|
|
468
688
|
/* @__PURE__ */ jsxs(
|
|
@@ -494,6 +714,7 @@ const AnalyticsHubPage = () => {
|
|
|
494
714
|
}
|
|
495
715
|
),
|
|
496
716
|
/* @__PURE__ */ jsx("div", { style: { fontSize: 13, fontWeight: 700, color: "#0f172a" }, children: pickTextForLocale(srv.titleI18n, uiLocale, srv.title) }),
|
|
717
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: 10.5, color: "#64748b" }, children: /* @__PURE__ */ jsx("code", { children: srv.slug }) }),
|
|
497
718
|
/* @__PURE__ */ jsxs(
|
|
498
719
|
"div",
|
|
499
720
|
{
|
|
@@ -593,7 +814,90 @@ const AnalyticsHubPage = () => {
|
|
|
593
814
|
/* @__PURE__ */ jsx("span", { children: tr ? "Anket Akışını Önizle & Test Et" : "Preview & Test Survey Flow" })
|
|
594
815
|
]
|
|
595
816
|
}
|
|
596
|
-
)
|
|
817
|
+
),
|
|
818
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr 1fr", gap: 5 }, children: [
|
|
819
|
+
/* @__PURE__ */ jsxs(
|
|
820
|
+
"button",
|
|
821
|
+
{
|
|
822
|
+
type: "button",
|
|
823
|
+
onClick: () => {
|
|
824
|
+
setExportDefaultScope("single");
|
|
825
|
+
setExportModalOpen(true);
|
|
826
|
+
},
|
|
827
|
+
title: tr ? "Seçili anketi Yapı veya Yapı + Veri olarak dışa aktar" : "Export selected survey (Structure or Full)",
|
|
828
|
+
style: {
|
|
829
|
+
padding: "7px 6px",
|
|
830
|
+
borderRadius: 7,
|
|
831
|
+
border: "1px solid #cbd5e1",
|
|
832
|
+
background: "#f8fafc",
|
|
833
|
+
color: "#0f172a",
|
|
834
|
+
fontSize: 10.5,
|
|
835
|
+
fontWeight: 700,
|
|
836
|
+
cursor: "pointer",
|
|
837
|
+
display: "inline-flex",
|
|
838
|
+
alignItems: "center",
|
|
839
|
+
justifyContent: "center",
|
|
840
|
+
gap: 4
|
|
841
|
+
},
|
|
842
|
+
children: [
|
|
843
|
+
/* @__PURE__ */ jsx(MaterialIcon, { name: "download", size: 14, color: "#2563eb" }),
|
|
844
|
+
/* @__PURE__ */ jsx("span", { children: tr ? "Dışa Aktar" : "Export" })
|
|
845
|
+
]
|
|
846
|
+
}
|
|
847
|
+
),
|
|
848
|
+
/* @__PURE__ */ jsxs(
|
|
849
|
+
"button",
|
|
850
|
+
{
|
|
851
|
+
type: "button",
|
|
852
|
+
onClick: () => setCleanupAction("clear-responses"),
|
|
853
|
+
title: tr ? "Anket yapısını koruyarak sadece yanıtları sıfırlar (0 yapar)" : "Clear all responses for this survey while keeping its structure",
|
|
854
|
+
style: {
|
|
855
|
+
padding: "7px 6px",
|
|
856
|
+
borderRadius: 7,
|
|
857
|
+
border: "1px solid #fcd34d",
|
|
858
|
+
background: "#fffbeb",
|
|
859
|
+
color: "#92400e",
|
|
860
|
+
fontSize: 10.5,
|
|
861
|
+
fontWeight: 700,
|
|
862
|
+
cursor: "pointer",
|
|
863
|
+
display: "inline-flex",
|
|
864
|
+
alignItems: "center",
|
|
865
|
+
justifyContent: "center",
|
|
866
|
+
gap: 4
|
|
867
|
+
},
|
|
868
|
+
children: [
|
|
869
|
+
/* @__PURE__ */ jsx(MaterialIcon, { name: "restart_alt", size: 14, color: "#d97706" }),
|
|
870
|
+
/* @__PURE__ */ jsx("span", { children: tr ? "Yanıt 0'la" : "Reset" })
|
|
871
|
+
]
|
|
872
|
+
}
|
|
873
|
+
),
|
|
874
|
+
/* @__PURE__ */ jsxs(
|
|
875
|
+
"button",
|
|
876
|
+
{
|
|
877
|
+
type: "button",
|
|
878
|
+
onClick: () => setCleanupAction("delete-survey"),
|
|
879
|
+
title: tr ? "Bu anketi ve tüm yanıtlarını kalıcı olarak siler" : "Delete this survey and all its responses",
|
|
880
|
+
style: {
|
|
881
|
+
padding: "7px 6px",
|
|
882
|
+
borderRadius: 7,
|
|
883
|
+
border: "1px solid #fecaca",
|
|
884
|
+
background: "#fef2f2",
|
|
885
|
+
color: "#991b1b",
|
|
886
|
+
fontSize: 10.5,
|
|
887
|
+
fontWeight: 700,
|
|
888
|
+
cursor: "pointer",
|
|
889
|
+
display: "inline-flex",
|
|
890
|
+
alignItems: "center",
|
|
891
|
+
justifyContent: "center",
|
|
892
|
+
gap: 4
|
|
893
|
+
},
|
|
894
|
+
children: [
|
|
895
|
+
/* @__PURE__ */ jsx(MaterialIcon, { name: "delete", size: 14, color: "#dc2626" }),
|
|
896
|
+
/* @__PURE__ */ jsx("span", { children: tr ? "Sil" : "Delete" })
|
|
897
|
+
]
|
|
898
|
+
}
|
|
899
|
+
)
|
|
900
|
+
] })
|
|
597
901
|
] })
|
|
598
902
|
]
|
|
599
903
|
}
|
|
@@ -791,6 +1095,67 @@ const AnalyticsHubPage = () => {
|
|
|
791
1095
|
setAnalyticsRefreshKey((k) => k + 1);
|
|
792
1096
|
}
|
|
793
1097
|
}
|
|
1098
|
+
),
|
|
1099
|
+
/* @__PURE__ */ jsx(
|
|
1100
|
+
SurveyExportModal,
|
|
1101
|
+
{
|
|
1102
|
+
open: exportModalOpen,
|
|
1103
|
+
uiLocale,
|
|
1104
|
+
targetSurvey: currentSurvey,
|
|
1105
|
+
allowAllSurveys: true,
|
|
1106
|
+
defaultScope: exportDefaultScope,
|
|
1107
|
+
totalSurveysCount: surveys.length,
|
|
1108
|
+
onClose: () => setExportModalOpen(false)
|
|
1109
|
+
}
|
|
1110
|
+
),
|
|
1111
|
+
/* @__PURE__ */ jsx(
|
|
1112
|
+
SurveyImportModal,
|
|
1113
|
+
{
|
|
1114
|
+
open: importModalOpen,
|
|
1115
|
+
uiLocale,
|
|
1116
|
+
existingSlugs: surveys.map((s) => s.slug),
|
|
1117
|
+
onClose: () => setImportModalOpen(false),
|
|
1118
|
+
onImported: async (res) => {
|
|
1119
|
+
await loadSurveys();
|
|
1120
|
+
if (res.importedSurveys?.[0]?.slug) {
|
|
1121
|
+
setSelectedSurveySlug(res.importedSurveys[0].slug);
|
|
1122
|
+
}
|
|
1123
|
+
setAnalyticsRefreshKey((k) => k + 1);
|
|
1124
|
+
setHubNotice(
|
|
1125
|
+
tr ? `${res.importedCount} anket ve ${res.importedResponsesCount} yanıt başarıyla içe aktarıldı!` : `Successfully imported ${res.importedCount} survey(s) and ${res.importedResponsesCount} response(s)!`
|
|
1126
|
+
);
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
),
|
|
1130
|
+
/* @__PURE__ */ jsx(
|
|
1131
|
+
SurveyCleanupConfirmModal,
|
|
1132
|
+
{
|
|
1133
|
+
open: Boolean(cleanupAction),
|
|
1134
|
+
action: cleanupAction,
|
|
1135
|
+
uiLocale,
|
|
1136
|
+
targetSurvey: currentSurvey,
|
|
1137
|
+
onClose: () => setCleanupAction(null),
|
|
1138
|
+
onCompleted: async (act, payload) => {
|
|
1139
|
+
await loadSurveys();
|
|
1140
|
+
if (section === "forms" || act === "purge-demo") {
|
|
1141
|
+
await loadFormsAndSubmissions();
|
|
1142
|
+
}
|
|
1143
|
+
setAnalyticsRefreshKey((k) => k + 1);
|
|
1144
|
+
if (act === "purge-demo") {
|
|
1145
|
+
setHubNotice(
|
|
1146
|
+
tr ? `Dummy veriler temizlendi (${payload?.deletedSurveys || 0} örnek anket, ${payload?.deletedSurveyResponses || 0} örnek yanıt, ${payload?.deletedForms || 0} örnek form silindi).` : `Demo data purged (${payload?.deletedSurveys || 0} demo surveys, ${payload?.deletedSurveyResponses || 0} demo responses, ${payload?.deletedForms || 0} demo forms removed).`
|
|
1147
|
+
);
|
|
1148
|
+
} else if (act === "clear-responses") {
|
|
1149
|
+
setHubNotice(
|
|
1150
|
+
tr ? `Seçili anketin ${payload?.deletedCount || 0} yanıtı sıfırlandı.` : `Cleared ${payload?.deletedCount || 0} response(s) from the selected survey.`
|
|
1151
|
+
);
|
|
1152
|
+
} else if (act === "delete-survey") {
|
|
1153
|
+
setHubNotice(
|
|
1154
|
+
tr ? "Anket ve bağlı yanıtları kalıcı olarak silindi." : "Survey and its responses were permanently deleted."
|
|
1155
|
+
);
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
794
1159
|
)
|
|
795
1160
|
]
|
|
796
1161
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
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 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-
|
|
5
|
-
import { M as MaterialIcon } from "./index-
|
|
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-Y5BR-NWE.mjs";
|
|
5
|
+
import { M as MaterialIcon } from "./index-C5Uj5YV9.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";
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const ReactDOM = require("react-dom");
|
|
6
|
-
const SurveyWidgetEditor = require("./SurveyWidgetEditor-
|
|
7
|
-
const index = require("./index-
|
|
6
|
+
const SurveyWidgetEditor = require("./SurveyWidgetEditor-D3KiAotu.js");
|
|
7
|
+
const index = require("./index-CHtB_Fa5.js");
|
|
8
8
|
const react = require("swiper/react");
|
|
9
9
|
const modules = require("swiper/modules");
|
|
10
10
|
const admin = require("@strapi/strapi/admin");
|