@ozguraltan/strapi-content-input 1.0.12 → 1.0.22
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 +187 -54
- package/dist/admin/{AnalyticsHubPage-DNREITPq.js → AnalyticsHubPage-B1_chQkG.js} +60 -9
- package/dist/admin/{AnalyticsHubPage-Dj4roAe0.mjs → AnalyticsHubPage-DUj3D2kA.mjs} +60 -9
- package/dist/admin/{ContentInputField-Ko-r12jl.mjs → ContentInputField-BrtpTCDd.mjs} +11898 -903
- package/dist/admin/{ContentInputField-2hk9xG8p.js → ContentInputField-CQFQxxgm.js} +11934 -921
- package/dist/admin/{SurveyWidgetEditor-B3F4DE5r.js → SurveyWidgetEditor-C5Uvyf_h.js} +3992 -1086
- package/dist/admin/{SurveyWidgetEditor-B1S83aBE.mjs → SurveyWidgetEditor-DGSwgTzR.mjs} +4012 -1107
- package/dist/admin/{en-bneQpRJa.js → en-BZg845za.js} +2 -2
- package/dist/admin/{en-DnLdDKyq.mjs → en-C9LN2PJY.mjs} +2 -2
- package/dist/admin/{index-gn-4eO6g.mjs → index-Dc7AFLOj.mjs} +16 -6
- package/dist/admin/{index-B4FpXxnK.js → index-i0NfSYto.js} +16 -6
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/components/color-codes/ColorCodesManager.d.ts +10 -0
- package/dist/admin/src/components/common/CIAspectRatioField.d.ts +35 -0
- package/dist/admin/src/components/common/CIColorField.d.ts +13 -0
- package/dist/admin/src/components/common/CIImageSettingsControl.d.ts +17 -0
- package/dist/admin/src/components/widgets/CustomCardWidgetEditor.d.ts +84 -0
- package/dist/admin/src/components/widgets/DataTableWidgetEditor.d.ts +65 -0
- package/dist/admin/src/components/widgets/EntityCardWidgetEditor.d.ts +10 -0
- package/dist/admin/src/components/widgets/HeroSliderStage.d.ts +156 -0
- package/dist/admin/src/components/widgets/HeroSliderWidgetEditor.d.ts +21 -0
- package/dist/admin/src/components/widgets/StrapiMediaPicker.d.ts +2 -0
- package/dist/admin/src/components/widgets/SurveyWidgetEditor.d.ts +1 -1
- package/dist/admin/src/core/canvasClasses.d.ts +1 -0
- package/dist/admin/src/core/colorUtils.d.ts +30 -0
- package/dist/admin/src/core/sampleData.d.ts +2 -1
- package/dist/admin/src/core/types.d.ts +12 -0
- package/dist/admin/src/core/useColorCodes.d.ts +43 -0
- package/dist/admin/{tr-00QqO0E7.mjs → tr-MtQFY92V.mjs} +2 -2
- package/dist/admin/{tr-O0nhB9er.js → tr-ZEmzAvKR.js} +2 -2
- package/dist/server/index.js +2162 -286
- package/dist/server/index.mjs +2162 -286
- package/dist/server/src/config/index.d.ts +4 -0
- package/dist/server/src/content-types/ci-color-palette/schema.json.d.ts +52 -0
- package/dist/server/src/content-types/index.d.ts +50 -0
- package/dist/server/src/controllers/ci-color.d.ts +14 -0
- package/dist/server/src/controllers/ci-image.d.ts +11 -2
- package/dist/server/src/controllers/index.d.ts +13 -0
- package/dist/server/src/index.d.ts +124 -0
- package/dist/server/src/services/ci-color.d.ts +127 -0
- package/dist/server/src/services/index.d.ts +57 -0
- package/dist/server/src/utils/image-variants.d.ts +74 -0
- package/dist/server/src/utils/mailer.d.ts +1 -0
- package/package.json +3 -2
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useCallback, useEffect } from "react";
|
|
3
3
|
import { useFetchClient } from "@strapi/strapi/admin";
|
|
4
|
-
import { M as MaterialIcon } from "./index-
|
|
5
|
-
import {
|
|
4
|
+
import { M as MaterialIcon } from "./index-Dc7AFLOj.mjs";
|
|
5
|
+
import { h as useStrapiLocales, B as getInitialLocale, F as createBlankSurveyDraft, G as ColorCodesManager, H as pickTextForLocale, I as SurveyAnalyticsView, J as SurveyStudioModal, K as persistLocale } from "./SurveyWidgetEditor-DGSwgTzR.mjs";
|
|
6
6
|
const AnalyticsHubPage = () => {
|
|
7
7
|
const { get, post } = useFetchClient();
|
|
8
8
|
const { locales: strapiLocales } = useStrapiLocales();
|
|
9
9
|
const [uiLocale, setUiLocale] = useState(() => getInitialLocale());
|
|
10
10
|
const tr = uiLocale === "tr";
|
|
11
|
-
const [section, setSection] = useState(
|
|
11
|
+
const [section, setSection] = useState(() => {
|
|
12
|
+
try {
|
|
13
|
+
const sp = new URLSearchParams(window.location.search);
|
|
14
|
+
const tab = sp.get("tab");
|
|
15
|
+
if (tab === "colors" || tab === "forms" || tab === "surveys") return tab;
|
|
16
|
+
} catch {
|
|
17
|
+
}
|
|
18
|
+
return "surveys";
|
|
19
|
+
});
|
|
12
20
|
const [surveys, setSurveys] = useState([]);
|
|
13
21
|
const [selectedSurveySlug, setSelectedSurveySlug] = useState("showcase_dx_survey");
|
|
14
22
|
const [analyticsRefreshKey, setAnalyticsRefreshKey] = useState(0);
|
|
15
23
|
const [reseeding, setReseeding] = useState(false);
|
|
16
24
|
const [studioOpen, setStudioOpen] = useState(false);
|
|
17
25
|
const [studioTarget, setStudioTarget] = useState(
|
|
18
|
-
() => createBlankSurveyDraft()
|
|
26
|
+
() => createBlankSurveyDraft(uiLocale)
|
|
19
27
|
);
|
|
20
28
|
const [forms, setForms] = useState([]);
|
|
21
29
|
const [selectedFormSlug, setSelectedFormSlug] = useState("all");
|
|
@@ -150,7 +158,7 @@ const AnalyticsHubPage = () => {
|
|
|
150
158
|
}
|
|
151
159
|
),
|
|
152
160
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
153
|
-
/* @__PURE__ */ jsx("h1", { style: { margin: 0, fontSize: 20, fontWeight: 800, letterSpacing: "-0.01em" }, children: tr ? "ContentInput — Anket &
|
|
161
|
+
/* @__PURE__ */ jsx("h1", { style: { margin: 0, fontSize: 20, fontWeight: 800, letterSpacing: "-0.01em" }, children: tr ? "ContentInput — Anket, Form & Color Codes Merkezi" : "ContentInput — Surveys, Forms & Color Codes Hub" }),
|
|
154
162
|
/* @__PURE__ */ jsx("div", { style: { fontSize: 12, color: "#cbd5e1", marginTop: 3 }, children: tr ? `${surveys.length} Aktif Anket • ${totalAllResponses} Toplam Anket Yanıtı • Strapi i18n Dilleri: ${strapiLocales.map((l) => l.code.toUpperCase()).join(", ")}` : `${surveys.length} Active Surveys • ${totalAllResponses} Total Survey Responses • Strapi i18n Locales: ${strapiLocales.map((l) => l.code.toUpperCase()).join(", ")}` })
|
|
155
163
|
] })
|
|
156
164
|
] }),
|
|
@@ -160,7 +168,7 @@ const AnalyticsHubPage = () => {
|
|
|
160
168
|
{
|
|
161
169
|
type: "button",
|
|
162
170
|
onClick: () => {
|
|
163
|
-
setStudioTarget(createBlankSurveyDraft());
|
|
171
|
+
setStudioTarget(createBlankSurveyDraft(uiLocale));
|
|
164
172
|
setStudioOpen(true);
|
|
165
173
|
},
|
|
166
174
|
style: {
|
|
@@ -217,7 +225,7 @@ const AnalyticsHubPage = () => {
|
|
|
217
225
|
overflow: "hidden",
|
|
218
226
|
border: "1px solid rgba(255,255,255,0.25)"
|
|
219
227
|
},
|
|
220
|
-
children: ["
|
|
228
|
+
children: ["en", "tr"].map((loc) => /* @__PURE__ */ jsx(
|
|
221
229
|
"button",
|
|
222
230
|
{
|
|
223
231
|
type: "button",
|
|
@@ -313,11 +321,54 @@ const AnalyticsHubPage = () => {
|
|
|
313
321
|
/* @__PURE__ */ jsx("span", { children: tr ? "Dinamik Form Başvuruları" : "Dynamic Form Submissions" })
|
|
314
322
|
]
|
|
315
323
|
}
|
|
324
|
+
),
|
|
325
|
+
/* @__PURE__ */ jsxs(
|
|
326
|
+
"button",
|
|
327
|
+
{
|
|
328
|
+
type: "button",
|
|
329
|
+
onClick: () => setSection("colors"),
|
|
330
|
+
style: {
|
|
331
|
+
padding: "13px 18px",
|
|
332
|
+
border: "none",
|
|
333
|
+
borderBottom: section === "colors" ? "3px solid #2563eb" : "3px solid transparent",
|
|
334
|
+
background: "transparent",
|
|
335
|
+
color: section === "colors" ? "#1d4ed8" : "#475569",
|
|
336
|
+
fontSize: 13,
|
|
337
|
+
fontWeight: 700,
|
|
338
|
+
cursor: "pointer",
|
|
339
|
+
display: "inline-flex",
|
|
340
|
+
alignItems: "center",
|
|
341
|
+
gap: 7
|
|
342
|
+
},
|
|
343
|
+
children: [
|
|
344
|
+
/* @__PURE__ */ jsx(
|
|
345
|
+
MaterialIcon,
|
|
346
|
+
{
|
|
347
|
+
name: "palette",
|
|
348
|
+
size: 17,
|
|
349
|
+
color: section === "colors" ? "#2563eb" : "#64748b"
|
|
350
|
+
}
|
|
351
|
+
),
|
|
352
|
+
/* @__PURE__ */ jsx("span", { children: tr ? "Color Codes & Tema Renkleri" : "Color Codes & Theme Palettes" })
|
|
353
|
+
]
|
|
354
|
+
}
|
|
316
355
|
)
|
|
317
356
|
]
|
|
318
357
|
}
|
|
319
358
|
),
|
|
320
|
-
section === "
|
|
359
|
+
section === "colors" ? /* @__PURE__ */ jsx("div", { style: { padding: "22px 28px" }, children: /* @__PURE__ */ jsx(
|
|
360
|
+
"div",
|
|
361
|
+
{
|
|
362
|
+
style: {
|
|
363
|
+
background: "#ffffff",
|
|
364
|
+
borderRadius: 14,
|
|
365
|
+
border: "1px solid #cbd5e1",
|
|
366
|
+
padding: 20,
|
|
367
|
+
boxShadow: "0 4px 18px rgba(15, 23, 42, 0.04)"
|
|
368
|
+
},
|
|
369
|
+
children: /* @__PURE__ */ jsx(ColorCodesManager, { locale: uiLocale })
|
|
370
|
+
}
|
|
371
|
+
) }) : section === "surveys" ? /* @__PURE__ */ jsxs(
|
|
321
372
|
"div",
|
|
322
373
|
{
|
|
323
374
|
style: {
|
|
@@ -387,7 +438,7 @@ const AnalyticsHubPage = () => {
|
|
|
387
438
|
]
|
|
388
439
|
}
|
|
389
440
|
),
|
|
390
|
-
/* @__PURE__ */ jsx("div", { style: { fontSize: 13, fontWeight: 700, color: "#0f172a" }, children: srv.title }),
|
|
441
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: 13, fontWeight: 700, color: "#0f172a" }, children: pickTextForLocale(srv.titleI18n, uiLocale, srv.title) }),
|
|
391
442
|
/* @__PURE__ */ jsxs(
|
|
392
443
|
"div",
|
|
393
444
|
{
|