@ozguraltan/strapi-content-input 1.0.10 → 1.0.12
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 +387 -230
- package/dist/admin/AnalyticsHubPage-DNREITPq.js +637 -0
- package/dist/admin/AnalyticsHubPage-Dj4roAe0.mjs +637 -0
- package/dist/admin/{ContentInputField-figtXsYp.js → ContentInputField-2hk9xG8p.js} +5881 -4757
- package/dist/admin/{ContentInputField-B917gT8j.mjs → ContentInputField-Ko-r12jl.mjs} +5744 -4619
- package/dist/admin/SurveyWidgetEditor-B1S83aBE.mjs +7956 -0
- package/dist/admin/SurveyWidgetEditor-B3F4DE5r.js +7957 -0
- package/dist/admin/{en-D7v9nv9J.mjs → en-DnLdDKyq.mjs} +2 -1
- package/dist/admin/{en-DF-a59T_.js → en-bneQpRJa.js} +2 -1
- package/dist/admin/{index-WlNKw5Qo.js → index-B4FpXxnK.js} +43 -4
- package/dist/admin/{index-DV8S3QWG.mjs → index-gn-4eO6g.mjs} +43 -4
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/components/analytics/SurveyAnalyticsView.d.ts +6 -0
- package/dist/admin/src/components/widgets/ContentFormWidgetEditor.d.ts +81 -0
- package/dist/admin/src/components/widgets/EntityCardWidgetEditor.d.ts +46 -0
- package/dist/admin/src/components/widgets/SurveyWidgetEditor.d.ts +91 -0
- package/dist/admin/src/core/useStrapiLocales.d.ts +13 -0
- package/dist/admin/src/pages/AnalyticsHubPage.d.ts +3 -0
- package/dist/admin/{tr-ByHzf64V.mjs → tr-00QqO0E7.mjs} +2 -1
- package/dist/admin/{tr-SNvSmKZQ.js → tr-O0nhB9er.js} +2 -1
- package/dist/server/index.js +4148 -46
- package/dist/server/index.mjs +4148 -46
- package/dist/server/src/bootstrap.d.ts +1 -1
- package/dist/server/src/content-types/ci-form/schema.json.d.ts +77 -0
- package/dist/server/src/content-types/ci-form-submission/schema.json.d.ts +54 -0
- package/dist/server/src/content-types/ci-survey/schema.json.d.ts +111 -0
- package/dist/server/src/content-types/ci-survey-response/schema.json.d.ts +81 -0
- package/dist/server/src/content-types/index.d.ts +315 -0
- package/dist/server/src/controllers/ci-form.d.ts +17 -0
- package/dist/server/src/controllers/ci-survey.d.ts +18 -0
- package/dist/server/src/controllers/index.d.ts +31 -0
- package/dist/server/src/index.d.ts +731 -1
- package/dist/server/src/services/ci-form.d.ts +250 -0
- package/dist/server/src/services/ci-survey.d.ts +296 -0
- package/dist/server/src/services/index.d.ts +384 -0
- package/dist/server/src/utils/formValidator.d.ts +19 -0
- package/dist/server/src/utils/mailer.d.ts +41 -0
- package/dist/server/src/utils/surveyEngine.d.ts +252 -0
- package/dist/server/src/utils/surveySeedData.d.ts +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,68 +1,40 @@
|
|
|
1
|
-
# @ozguraltan/strapi-
|
|
1
|
+
# @ozguraltan/strapi-content-input
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Visual Page & Content Builder (`JSONB` Custom Field), Dynamic Form Studio, Enterprise Survey & Analytics Hub, and Entity Card Engine for Strapi v5**
|
|
4
4
|
|
|
5
|
-
`@ozguraltan/strapi-
|
|
5
|
+
`@ozguraltan/strapi-content-input` brings an enterprise-grade visual page and layout builder to **Strapi v5** as a native `json` (`PostgreSQL JSONB`) Custom Field (`plugin::content-input.content-input`), paired with official Vue 3 / Nuxt 3/4 storefront renderers for **Vuetify (`v3.5+` & `v4.+`)** and **Element Plus (`>=2.7.0 <4.0.0`)**.
|
|
6
6
|
|
|
7
|
-
- **
|
|
7
|
+
- **Strapi Plugin Package:** `@ozguraltan/strapi-content-input`
|
|
8
8
|
- **Custom Field UID:** `plugin::content-input.content-input`
|
|
9
|
-
- **
|
|
10
|
-
-
|
|
11
|
-
-
|
|
9
|
+
- **Plugin Content-Types:**
|
|
10
|
+
- `plugin::content-input.ci-menu` (`ci_menus` — Reusable hierarchical menus)
|
|
11
|
+
- `plugin::content-input.ci-form` (`ci_forms` — Dynamic `cms-core`-style forms, validation rules & mail configs)
|
|
12
|
+
- `plugin::content-input.ci-form-submission` (`ci_form_submissions` — Recorded form submissions & delivery logs)
|
|
13
|
+
- `plugin::content-input.ci-survey` (`ci_surveys` — Multi-step surveys, quick polls, conditional skip logic, lifecycle & anti-duplicate rules)
|
|
14
|
+
- `plugin::content-input.ci-survey-response` (`ci_survey_responses` — Recorded survey votes, completion duration, locale & salted voter hash)
|
|
15
|
+
- **Strapi Admin Left Sidebar Page:** `/admin/plugins/content-input` (**Surveys & Forms Analytics Hub**)
|
|
16
|
+
- **Database Column Type:** `json` (stored as `JSONB` in PostgreSQL)
|
|
17
|
+
- **Companion Storefront Renderers:**
|
|
18
|
+
- **Vuetify (3.5+ / 4.+):** `@ozguraltan/strapi-content-input-nuxt-vuetify` (`npx strapi-content-input-vuetify eject`)
|
|
19
|
+
- **Element Plus (2.7+ / 3.x):** `@ozguraltan/strapi-content-input-nuxt-element-plus` (`npx strapi-content-input-ep eject`)
|
|
20
|
+
- **AI Agent Technical Reference:** [AGENTS.md](./AGENTS.md)
|
|
21
|
+
|
|
22
|
+
> 🌍 **Languages / Diller:** [English Documentation](#-english-documentation) | [Türkçe Dokümantasyon](#-türkçe-dokümantasyon)
|
|
12
23
|
|
|
13
24
|
---
|
|
14
25
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
1. [Mevcut Bir Strapi v5 Projesine Kurulum ve Entegrasyon](#1-mevcut-bir-strapi-v5-projesine-kurulum-ve-entegrasyon)
|
|
18
|
-
2. [Görsel Kılavuz ve Ekran Görüntüleri ile Davranış Analizi](#2-görsel-kılavuz-ve-ekran-görüntüleri-ile-davranış-analizi)
|
|
19
|
-
- [2.1 Yapı Görünümü (Structure View) ve Sürükle-Bırak](#21-yapı-görünümü-structure-view-ve-sürükle-bırak)
|
|
20
|
-
- [2.2 Tuval Görünümü (Inline Canvas Preview)](#22-tuval-görünümü-inline-canvas-preview)
|
|
21
|
-
- [2.3 Tam Ekran Görsel Editör (3 Panelli Stüdyo & Ölçekleme)](#23-tam-ekran-görsel-editör-3-panelli-stüdyo--ölçekleme)
|
|
22
|
-
- [2.4 Sekme (Tab) & Akordiyon İçinde HTML Editör + İç İçe ContentInput](#24-sekme-tab--akordiyon-içinde-html-editör--iç-içe-contentinput)
|
|
23
|
-
- [2.5 Sağ Tık Bağlam Menüsü (Context Menu) & Zengin HTML Editörü](#25-sağ-tık-bağlam-menüsü-context-menu--zengin-html-editörü)
|
|
24
|
-
- [2.6 Katmanlar (Layers) Ağacı ve 5 Kırılımlı Responsive Grid Ayarları](#26-katmanlar-layers-ağacı-ve-5-kırılımlı-responsive-grid-ayarları)
|
|
25
|
-
- [2.7 YouTube Video Editörü, Özel Kapak Görseli (Thumbnail) ve Pop-up Oynatıcı](#27-youtube-video-editörü-özel-kapak-görseli-thumbnail-ve-pop-up-oynatıcı)
|
|
26
|
-
- [2.8 Hiyerarşik (Nested) Menü Oluşturucu ve Strapi Entity/Ağaç Entegrasyonu](#28-hiyerarşik-nested-menü-oluşturucu-ve-strapi-entityağaç-entegrasyonu)
|
|
27
|
-
3. [Desteklenen 13 Bileşen (Widget) Türü](#3-desteklenen-13-bileşen-widget-türü)
|
|
28
|
-
4. [Üretilen JSONB Veri Mimarisi](#4-üretilen-jsonb-veri-mimarisi)
|
|
29
|
-
5. [Lokal Geliştirme ve Playground Ortamı](#5-lokal-geliştirme-ve-playground-ortamı)
|
|
26
|
+
# 🇬🇧 English Documentation
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
## 1. Mevcut Bir Strapi v5 Projesine Kurulum ve Entegrasyon
|
|
34
|
-
|
|
35
|
-
Bu eklentiyi halihazırda var olan herhangi bir **Strapi v5** projenize **3 farklı yöntemden** biriyle çekebilirsiniz. Derlenmiş `dist/` dosyaları Git deposuna dahil edildiği için doğrudan Git üzerinden kurulumda ekstra bir derleme adımına gerek kalmaz.
|
|
36
|
-
|
|
37
|
-
### Adım 1: Paketi Strapi Projenize Çekin
|
|
28
|
+
## 1. Installation in a Strapi v5 Project
|
|
38
29
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
#### Yöntem A — GitLab Üzerinden Doğrudan Kurulum (Önerilen)
|
|
30
|
+
### Step 1: Install the Plugin
|
|
42
31
|
```bash
|
|
32
|
+
npm install @ozguraltan/strapi-content-input
|
|
33
|
+
# or directly from GitLab:
|
|
43
34
|
npm install git+ssh://git@gitlab.com:ozguraltan/strapi-content-input.git
|
|
44
|
-
# veya yarn kullanıyorsanız:
|
|
45
|
-
yarn add git+ssh://git@gitlab.com:ozguraltan/strapi-content-input.git
|
|
46
|
-
```
|
|
47
|
-
> **İpucu:** Eklentide yeni bir güncelleme yaptığınızda hedef Strapi projesinde `npm update @ozguraltan/strapi-plugin-content-input` veya aynı `npm install git+ssh://...` komutunu çalıştırmanız yeterlidir.
|
|
48
|
-
|
|
49
|
-
#### Yöntem B — Lokal Klasör Bağlantısı ile Kurulum (Aynı Bilgisayarda Geliştirme İçin)
|
|
50
|
-
```bash
|
|
51
|
-
npm install file:../strapi-content-input
|
|
52
35
|
```
|
|
53
36
|
|
|
54
|
-
|
|
55
|
-
`strapi-content-input` dizininde `npm pack` çalıştırarak oluşan `ozguraltan-strapi-plugin-content-input-1.0.0.tgz` dosyasını hedef projede kurabilirsiniz:
|
|
56
|
-
```bash
|
|
57
|
-
npm install /path/to/ozguraltan-strapi-plugin-content-input-1.0.0.tgz
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
### Adım 2: `config/plugins.ts` (veya `config/plugins.js`) İçinde Eklentiyi Etkinleştirin
|
|
63
|
-
|
|
64
|
-
Hedef Strapi projenizin `config/plugins.ts` dosyasına `content-input` tanımını ekleyin:
|
|
65
|
-
|
|
37
|
+
### Step 2: Enable in `config/plugins.ts`
|
|
66
38
|
```ts
|
|
67
39
|
export default () => ({
|
|
68
40
|
'content-input': {
|
|
@@ -71,12 +43,8 @@ export default () => ({
|
|
|
71
43
|
});
|
|
72
44
|
```
|
|
73
45
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
### Adım 3: `config/middlewares.ts` İçinde Güvenlik Başlıklarını (CSP & Referrer-Policy) Yapılandırın
|
|
77
|
-
|
|
78
|
-
YouTube videolarının pop-up modal içinde sorunsuz oynatılabilmesi (`Error 153` almaması) ve harici görsellerin yüklenebilmesi için hedef projenizin `config/middlewares.ts` dosyasındaki `strapi::security` ayarını aşağıdaki gibi güncelleyin:
|
|
79
|
-
|
|
46
|
+
### Step 3: Configure Content Security Policy in `config/middlewares.ts`
|
|
47
|
+
To allow YouTube iframe embeds and external/CDN media previews inside the Strapi Admin panel:
|
|
80
48
|
```ts
|
|
81
49
|
export default [
|
|
82
50
|
'strapi::logger',
|
|
@@ -91,32 +59,10 @@ export default [
|
|
|
91
59
|
useDefaults: true,
|
|
92
60
|
directives: {
|
|
93
61
|
'connect-src': ["'self'", 'https:', 'http:'],
|
|
94
|
-
'img-src': [
|
|
95
|
-
"'self'",
|
|
96
|
-
'data:',
|
|
97
|
-
'blob:',
|
|
98
|
-
'https:',
|
|
99
|
-
'http:',
|
|
100
|
-
'https://images.unsplash.com',
|
|
101
|
-
'https://img.youtube.com',
|
|
102
|
-
'https://i.ytimg.com',
|
|
103
|
-
'https://market-assets.strapi.io',
|
|
104
|
-
],
|
|
62
|
+
'img-src': ["'self'", 'data:', 'blob:', 'https:', 'http:'],
|
|
105
63
|
'media-src': ["'self'", 'data:', 'blob:', 'https:', 'http:'],
|
|
106
|
-
'frame-src': [
|
|
107
|
-
|
|
108
|
-
'https:',
|
|
109
|
-
'http:',
|
|
110
|
-
'https://www.youtube.com',
|
|
111
|
-
'https://www.youtube-nocookie.com',
|
|
112
|
-
],
|
|
113
|
-
'child-src': [
|
|
114
|
-
"'self'",
|
|
115
|
-
'https:',
|
|
116
|
-
'http:',
|
|
117
|
-
'https://www.youtube.com',
|
|
118
|
-
'https://www.youtube-nocookie.com',
|
|
119
|
-
],
|
|
64
|
+
'frame-src': ["'self'", 'https:', 'http:', 'https://www.youtube.com', 'https://www.youtube-nocookie.com'],
|
|
65
|
+
'child-src': ["'self'", 'https:', 'http:', 'https://www.youtube.com', 'https://www.youtube-nocookie.com'],
|
|
120
66
|
upgradeInsecureRequests: null,
|
|
121
67
|
},
|
|
122
68
|
},
|
|
@@ -132,19 +78,7 @@ export default [
|
|
|
132
78
|
];
|
|
133
79
|
```
|
|
134
80
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
### Adım 4: İçerik Tipine (Content-Type) Alan Olarak Ekleyin
|
|
138
|
-
|
|
139
|
-
#### Seçenek 1 — Strapi Admin Arayüzünden (`Content-Type Builder`):
|
|
140
|
-
1. Sol menüden **Content-Type Builder** ekranına gidin.
|
|
141
|
-
2. Alan eklemek istediğiniz Collection Type veya Single Type'ı seçip **"+ Add another field"** butonuna tıklayın.
|
|
142
|
-
3. **"Custom"** sekmesine geçin ve **"Content Input (Visual Builder)"** seçeneğini seçin.
|
|
143
|
-
4. Alan adını (ör. `content` veya `body`) girip **Save** butonuna basın.
|
|
144
|
-
|
|
145
|
-
#### Seçenek 2 — `schema.json` Dosyasına Doğrudan Ekleyerek:
|
|
146
|
-
İlgili içerik tipinin `src/api/<icerik-tipi>/content-types/<icerik-tipi>/schema.json` dosyasına şu alanı ekleyin:
|
|
147
|
-
|
|
81
|
+
### Step 4: Add the Custom Field to Any Content-Type (`schema.json`)
|
|
148
82
|
```json
|
|
149
83
|
{
|
|
150
84
|
"attributes": {
|
|
@@ -160,195 +94,418 @@ export default [
|
|
|
160
94
|
}
|
|
161
95
|
```
|
|
162
96
|
|
|
163
|
-
Ardından Strapi yönetim panelini derleyip başlatın:
|
|
164
|
-
```bash
|
|
165
|
-
npm run build
|
|
166
|
-
npm run develop
|
|
167
|
-
```
|
|
168
|
-
|
|
169
97
|
---
|
|
170
98
|
|
|
171
|
-
## 2.
|
|
99
|
+
## 2. Key Features & Visual Studio Capabilities
|
|
172
100
|
|
|
173
|
-
### 2.1
|
|
101
|
+
### 2.1 Structure View, Inline Canvas View & Full-Screen 3-Panel Studio
|
|
102
|
+
- **Structure View:** Drag-and-drop rows, 12-column responsive blocks, and widgets across containers with one-click multi-column row presets (`12`, `6+6`, `4+4+4`, `3+6+3`, `8+4`).
|
|
103
|
+
- **Inline Canvas View:** Live interactive preview directly inside the Strapi Content Manager form.
|
|
104
|
+
- **Full-Screen Visual Editor:** 3-panel design studio with collapsible/resizable sidebars, 5 responsive breakpoints (`SM`, `MD`, `LG`, `XL`, `2XL`), zoom scaling (`Fit`, `50%`–`125%`), undo/redo history, and clean preview mode.
|
|
174
105
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
-
|
|
178
|
-
- **Hızlı Şablon Ekleme:** Alt kısımdaki `+ Yeni Satır Ekle`, `+ 6 + 6`, `+ 4 + 4 + 4`, `+ 3 × 4`, `+ 8 + 4` butonlarıyla tek tıkla çok sütunlu satırlar oluşturabilirsiniz.
|
|
106
|
+

|
|
107
|
+

|
|
108
|
+

|
|
179
109
|
|
|
180
|
-
|
|
110
|
+
### 2.2 Built-in Media Library Studio & `sharp` On-the-Fly + CDN Thumbnail Pipeline
|
|
111
|
+
- **Full Media Library Studio (`StrapiMediaPicker`):** Folder navigation & folder creation, multi-file upload, multi-select with order badges (`✓ 1`, `✓ 2`), type filtering (`Images`, `Videos`, `Docs`), metadata editing (`name`, `alternativeText`, `caption`, `folder`), asset deletion, and an interactive **Crop & Rotate Studio** (`Free`, `1:1`, `16:9`, `4:3`, `3:2`, `4:5`, `-90°/+90°`, `Duplicate & Crop` or `Crop Original Asset`).
|
|
112
|
+
- **On-the-Fly `sharp` Endpoint (`/api/content-input/image`) & Automatic CDN Upload:**
|
|
113
|
+
- When a `gallery` widget uses `imageSettings` (`process: 'fit'` for `cWidth × cHeight` crop, or `process: 'widen'` for `cWidth` scaling), `sharp` generates the exact thumbnail on the backend, uploads the generated variant to Strapi's active Upload Provider / CDN (`strapi.plugin('upload').service('provider').upload`), persists the CDN URL in `file.formats['ci_fit_WxH']`, and caches it with immutable HTTP headers.
|
|
114
|
+
- Clicking any gallery image opens the **Popup Lightbox** with the **full-resolution uncropped original image**.
|
|
115
|
+
- **Official Swiper.js Engine (`swiper/react` & `swiper/vue`):**
|
|
116
|
+
- Supports touch/mouse drag-to-swipe (`grabCursor`), mousewheel scrolling (`mousewheel`), transition effects (`slide`, `fade`, `cube`, `coverflow`, `flip`), `slidesPerView`, `spaceBetween`, `loop`, `autoplay`, `navigation`, and `pagination`.
|
|
181
117
|
|
|
182
118
|
---
|
|
183
119
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
120
|
+
## 3. Dynamic Form Builder (`contentForm`), Shared `vee-validate` Rules, reCAPTCHA v2 & Mail Delivery
|
|
121
|
+
|
|
122
|
+
Inspired by `cms-core`'s dynamic form architecture, `contentForm` provides a complete database-backed form studio, shared client+server validation engine, Google reCAPTCHA v2 protection, and multi-driver email delivery.
|
|
123
|
+
|
|
124
|
+
### 3.1 How Dynamic Forms Work End-to-End
|
|
125
|
+
1. **Database Storage (`ci_forms`) & Full Drag-and-Drop Form Studio:** Forms are created and managed inside the **Full-Screen Form Studio Modal** (accessible directly from any `contentForm` widget in Strapi). Every structural and list element inside the Studio supports **HTML5 Drag & Drop**:
|
|
126
|
+
- **Quick Field Presets & Unassigned Fields:** Drag directly into any column, before/after any field, or onto the bottom "+ New Row" drop zone.
|
|
127
|
+
- **Form Rows & Row Layout Presets (`12`, `6+6`, `4+4+4`, `8+4`):** Drag to reorder rows or insert new grid rows between existing ones.
|
|
128
|
+
- **Columns / Blocks & Placed Fields:** Reorder within the same container or move freely across different columns and rows.
|
|
129
|
+
- **Choice Options (Dynamic Strapi `i18n` Locales) & Active Validation Rules:** Reorder dropdown/radio/checkbox options and rule evaluation priority via drag handles. All localized labels (`alias`, `placeholder`, `hint`, `options.optionList`, `buttonLabel`, `successMessage`) dynamically pull active locales from Strapi's **Internationalization (`i18n`)** plugin (`GET /content-input/locales` & `GET /api/content-input/locales` — e.g. `en`, `tr`, `de`, `fr`, `ar`) with automatic default-locale fallback.
|
|
130
|
+
- Each form stores its responsive 12-column `form` layout (`rows -> blocks -> fields[]`), localized `fields[name]` dictionary (`alias`, `placeholder`, `hint`, `options.optionList`, `validation`), and delivery settings (`to`, `subject`, `buttonLabel`, `successMessage`, `redirect`, `mailConfig`, `useRecaptcha`).
|
|
131
|
+
- Inside the page's `ContentInput` JSONB, only a lightweight reference (`{ formId: "showcase_contact_form", form: { id, documentId, name }, ... }`) is stored.
|
|
132
|
+
2. **Asynchronous Frontend Rendering (`CIDynamicForm.vue`):**
|
|
133
|
+
- Both Nuxt packages asynchronously fetch `GET ${baseUrl}/api/content-input/forms/:id` (secrets such as `mailConfig` and `recaptchaSecretKey` are automatically stripped on the server).
|
|
134
|
+
- Renders 9 field types natively in Vuetify / Element Plus: `input`, `emailInput`, `telInput`, `numeric`, `textArea`, `selectGroup`, `radioGroup`, `checkboxGroup`, `switchBox`.
|
|
135
|
+
3. **Identical Client + Backend Validation (`POST /api/content-input/forms/:id/submit`):**
|
|
136
|
+
- Fields are validated in real time on blur/change in Vue AND re-validated with the **exact same rule parser** on the Strapi backend before saving or sending mail.
|
|
137
|
+
- Invalid requests return **HTTP `422`** with `{ ok: false, errors: { [fieldName]: ["Localized error message"] } }`, which `CIDynamicForm` maps directly onto each input's error state.
|
|
138
|
+
- Valid submissions are persisted in `ci_form_submissions` (`data`, `ipAddress`, `userAgent`, `mailSent`, `mailError`) and dispatched via the configured mail driver.
|
|
139
|
+
|
|
140
|
+
### 3.2 Supported `vee-validate` / `validatorjs` Validation Rules
|
|
141
|
+
Combine rules with pipes (`|`), e.g. `"required|email|max:120"` or `"required|min:10|max:1000"`:
|
|
142
|
+
|
|
143
|
+
| Rule | Example | Description |
|
|
144
|
+
| :--- | :--- | :--- |
|
|
145
|
+
| `required` | `required` | Field must be non-empty (non-blank string, selected option, or non-empty array). |
|
|
146
|
+
| `accepted` | `accepted` | Must be `true`, `'true'`, `1`, `'1'`, `'yes'`, or `'on'` (ideal for GDPR / KVKK `switchBox`). |
|
|
147
|
+
| `email` | `required\|email` | Valid email address format. |
|
|
148
|
+
| `phone` | `phone` | International / local phone format (`+`, digits, spaces, parentheses; min 7 digits). |
|
|
149
|
+
| `url` | `url` | Valid `http://` or `https://` URL. |
|
|
150
|
+
| `numeric` | `required\|numeric` | Numeric value (integers or decimals). |
|
|
151
|
+
| `integer` | `required\|integer` | Whole integer value. |
|
|
152
|
+
| `min:<n>` | `required\|min:3` | Minimum string character length (or minimum selected items for `checkboxGroup`). |
|
|
153
|
+
| `max:<n>` | `max:500` | Maximum string character length (or maximum selected items for `checkboxGroup`). |
|
|
154
|
+
| `min_value:<n>` | `numeric\|min_value:1` | Minimum numeric value (`>= n`). |
|
|
155
|
+
| `max_value:<n>` | `numeric\|max_value:100` | Maximum numeric value (`<= n`). |
|
|
156
|
+
| `between:<min>,<max>` | `numeric\|between:18,99` | Numeric value (or string length) must fall between `min` and `max`. |
|
|
157
|
+
| `alpha` | `alpha` | Alphabetic characters only (includes Turkish/Unicode letters). |
|
|
158
|
+
| `alpha_num` | `alpha_num` | Alphanumeric characters only (includes Turkish/Unicode letters & digits). |
|
|
159
|
+
| `in:<a,b,c>` | `required\|in:Sales,Support` | Value must match one of the comma-separated allowed values. |
|
|
160
|
+
| `regex:<pattern>` | `regex:^[A-Z0-9-]+$` | Value must match the custom regular expression. |
|
|
161
|
+
| `confirmed:<field>` | `confirmed:password` | Value must match another field in the same form. |
|
|
162
|
+
|
|
163
|
+
### 3.3 Google reCAPTCHA v2 & 3rd-Party Mail Delivery (`.env` or Form Studio UI)
|
|
164
|
+
Configure globally in Strapi's `.env` (compatible with `cms-core` env names) **or** override per-form inside Strapi's Form Studio Modal (`Tab 2 -> Mail & reCAPTCHA`):
|
|
165
|
+
|
|
166
|
+
```dotenv
|
|
167
|
+
# Google reCAPTCHA v2 (Renders automatically on frontend when public key is present)
|
|
168
|
+
MIX_RECAPTCHA_PUBLIC_KEY=6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
|
|
169
|
+
RECAPTCHA_PRIVATE_KEY=6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
|
|
170
|
+
|
|
171
|
+
# Mail Delivery Driver: auto | mailtrap | mailgun | smtp | strapi
|
|
172
|
+
MAIL_DRIVER=auto
|
|
173
|
+
MAIL_FROM="Company Website <noreply@example.com>"
|
|
174
|
+
MAIL_TO=info@example.com
|
|
175
|
+
|
|
176
|
+
# 1. Mailtrap HTTP API (Leave MAILTRAP_INBOX_ID empty for Live Sending API, or set Inbox ID for Sandbox Testing)
|
|
177
|
+
MAILTRAP_API_TOKEN=your_mailtrap_api_token_here
|
|
178
|
+
MAILTRAP_INBOX_ID=
|
|
179
|
+
|
|
180
|
+
# 2. Mailgun v3 REST API (api.mailgun.net or api.eu.mailgun.net)
|
|
181
|
+
MAILGUN_SECRET=
|
|
182
|
+
MAILGUN_DOMAIN=
|
|
183
|
+
MAILGUN_HOST=api.mailgun.net
|
|
184
|
+
|
|
185
|
+
# 3. Generic SMTP (or Mailtrap / Mailgun SMTP credentials)
|
|
186
|
+
MAIL_HOST=sandbox.smtp.mailtrap.io
|
|
187
|
+
MAIL_PORT=2525
|
|
188
|
+
MAIL_USERNAME=
|
|
189
|
+
MAIL_PASSWORD=
|
|
190
|
+
MAIL_ENCRYPTION=tls
|
|
191
|
+
```
|
|
189
192
|
|
|
190
193
|
---
|
|
191
194
|
|
|
192
|
-
|
|
195
|
+
## 4. Linked Strapi `entityCard` Widget (Entity Inheritance + Overrides + Universal Card Props)
|
|
193
196
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
-
|
|
201
|
-
-
|
|
197
|
+
The **`entityCard`** widget links to any Strapi Collection-Type entry (e.g. `api::page.page`, `api::article.article`, `api::product.product`) and renders a rich card:
|
|
198
|
+
1. **Automatic Entity Fallback:** When an editor selects a Strapi entry (`entityUid` + `documentId`), `entityCard` automatically inherits `title`, `subtitle`, `description` (even extracting clean text & cover media from `ContentInput` JSONB!), `image`, `badgeText`, and `url` from the linked entity (`GET ${baseUrl}/api/content-input/entity-card`).
|
|
199
|
+
2. **Granular Manual Overrides:** Editors can optionally override `overrides.image`, `overrides.title`, `overrides.subtitle`, `overrides.description`, `overrides.badgeText`, `overrides.buttonText`, `overrides.url`, and `overrides.target`. Any override left blank seamlessly falls back to the linked entity!
|
|
200
|
+
3. **Universal Vuetify / Element Plus Card Props (`options.cardProps`):**
|
|
201
|
+
- `layout`: `'vertical'` | `'horizontal'` | `'overlay'`
|
|
202
|
+
- `variant`: `'elevated'` | `'outlined'` | `'flat'` | `'tonal'`
|
|
203
|
+
- `elevation`: `0`–`24`
|
|
204
|
+
- `rounded`: `'0'` | `'sm'` | `'md'` | `'lg'` | `'xl'`
|
|
205
|
+
- `color`, `textColor`, `accentColor`, `imageHeight`, `showBadge`, `showButton`, `buttonVariant`, `hoverEffect`
|
|
206
|
+
4. **External Override Support:** Override globally via `:components="{ entityCard: MyEntityCard }"` or inline via `<template #widget-entityCard="{ entityCardData }">`.
|
|
202
207
|
|
|
203
|
-
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## 5. Enterprise Survey & Poll Module (`survey`) + Strapi Analytics Hub
|
|
211
|
+
|
|
212
|
+
The **`survey`** widget (15th built-in widget) provides a full-featured survey, NPS, and quick-poll platform with native Strapi reporting, statistical breakdowns, and anti-duplicate voting controls.
|
|
213
|
+
|
|
214
|
+
### 5.1 Three Display Modes (`displayMode`)
|
|
215
|
+
1. **`quick_poll` (Quick Poll):** Compact single-card poll for 1-click voting and instant live `%` bar feedback.
|
|
216
|
+
2. **`single_page` (Single-Page Survey):** Classic multi-question vertical survey form on one page.
|
|
217
|
+
3. **`multi_step` (Multi-Step Wizard):** Typeform-style step-by-step wizard (`steps[]`) with animated progress bar, per-step validation before advancing, and Back/Next navigation.
|
|
218
|
+
|
|
219
|
+
### 5.2 Supported 13 Question & Item Types
|
|
220
|
+
| Question Type | Key Options & Capabilities | Analytics Visualization |
|
|
221
|
+
| :--- | :--- | :--- |
|
|
222
|
+
| `single_choice` | Canonical `option.id`, `i18n` `labels`, `allowOther`, `shuffleOptions` | Horizontal `%` bars + expandable `"Other"` text entries |
|
|
223
|
+
| `multiple_choice` | `minSelections`, `maxSelections`, `allowOther`, `shuffleOptions` | Multi-select `%` distribution bars + `"Other"` entries |
|
|
224
|
+
| `dropdown` | Searchable/clean select menu with localized `option.labels` | Horizontal `%` & count bars |
|
|
225
|
+
| `image_choice` | Visual cards backed by Strapi Media Library (`option.image`) | Visual option `%` distribution bars |
|
|
226
|
+
| `nps` | `0–10` Net Promoter Score scale with localized endpoint labels | **NPS Score Gauge (`-100..+100`)** + Promoters (`9–10`), Passives (`7–8`), Detractors (`0–6`) + `0..10` histogram |
|
|
227
|
+
| `star_rating` | `1–5` or `1–10` interactive star rating | Weighted average score (`★`) + per-score vertical histogram |
|
|
228
|
+
| `likert_scale` | `1–5` or `1–7` agreement scale with `lowLabel` / `highLabel` | Weighted average + distribution histogram |
|
|
229
|
+
| `matrix_single` | Evaluation table (`rows[] × columns[]`, 1 choice per row) | **Color-coded Matrix Heatmap Table** (`%` & count per cell) |
|
|
230
|
+
| `ranking` | Drag-and-drop + ↑/↓ priority ordering of items | **Borda Count Leaderboard** (Average Rank, `#1` votes, Borda score `%`) |
|
|
231
|
+
| `short_text` | Single-line open-ended input with `vee-validate` rules (`email`, `min`, `max`, etc.) | Searchable Open-Ended Response Feed with locale & timestamp |
|
|
232
|
+
| `long_text` | Multi-line open-ended feedback textarea with `vee-validate` rules | Searchable Open-Ended Response Feed (cross-linked with NPS score) |
|
|
233
|
+
| `consent` | Required GDPR / KVKK consent switch (`accepted`) | Acceptance count & `100%` compliance bar |
|
|
234
|
+
| `statement` | Rich informational callout / section intro block (no input required) | Informational separator |
|
|
235
|
+
|
|
236
|
+
### 5.3 Canonical Option IDs + Dynamic Strapi `i18n` Locales
|
|
237
|
+
Every choice option, matrix row/column, and ranking item uses an immutable `id` alongside a dynamic `labels` dictionary populated from Strapi's active `i18n` locales (`Settings -> Internationalization`):
|
|
238
|
+
```json
|
|
239
|
+
{
|
|
240
|
+
"id": "opt_ai_assistant",
|
|
241
|
+
"labels": {
|
|
242
|
+
"tr": "Yapay Zeka (AI) İçerik & SEO Asistanı",
|
|
243
|
+
"en": "AI Content & SEO Assistant",
|
|
244
|
+
"de": "KI-Inhalts- & SEO-Assistent"
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
```
|
|
248
|
+
Votes are recorded against `opt_ai_assistant`, so responses submitted in Turkish, English, German, or any other Strapi locale automatically aggregate into a single unified analytics chart!
|
|
249
|
+
|
|
250
|
+
### 5.4 Conditional Skip / Display Logic (`conditions`)
|
|
251
|
+
Show or hide follow-up questions dynamically based on previous answers (e.g. reveal `"What is the #1 improvement we should make?"` only when `nps_score <= 6`):
|
|
252
|
+
- **Supported Operators:** `equals`, `not_equals`, `in`, `contains`, `gt`, `lt`, `gte`, `lte`, `is_answered` (`logicMode`: `'all'` AND / `'any'` OR).
|
|
253
|
+
- **Shared Client + Backend Engine (`surveyEngine.ts` & `surveyHelpers.ts`):** When a question is hidden by its condition, both `<CISurvey>` and `POST /api/content-input/surveys/:id/submit` automatically skip its `required` check so submissions never fail on hidden fields.
|
|
254
|
+
|
|
255
|
+
### 5.5 Lifecycle, Anti-Duplicate Voting & GDPR/KVKK Controls
|
|
256
|
+
- **Publication & Quotas:** `status` (`'draft' | 'published' | 'closed'`), `startsAt` / `endsAt` date window, and `quotaLimit` maximum response cap.
|
|
257
|
+
- **Submission Policies (`submissionPolicy`):**
|
|
258
|
+
- `'one_per_voter'`: Browser `localStorage` token + backend salted **`HMAC-SHA256(IP + User-Agent + voterToken)`** check (returns **HTTP `409`** `{ alreadyVoted: true }` on duplicate attempts).
|
|
259
|
+
- `'one_per_token'`: Single vote per invited campaign/member token.
|
|
260
|
+
- `'unlimited'`: Unlimited kiosk/feedback submissions.
|
|
261
|
+
- **Privacy & Bot Protection:** `anonymizeIp: true` (never persists raw IP addresses in `ci_survey_responses`), hidden `_hp` honeypot field, optional Google reCAPTCHA v2 (`useRecaptcha`), and `showPublicResults` (`'never' | 'after_vote' | 'always'`).
|
|
262
|
+
|
|
263
|
+
### 5.6 Strapi Reporting & Analytics Hub + Excel CSV / JSON Export
|
|
264
|
+
Reporting is available in **two places** inside Strapi Admin:
|
|
265
|
+
1. **Dedicated Left Sidebar Menu (`Surveys & Forms` -> `/admin/plugins/content-input`):**
|
|
266
|
+
- Global dashboard for all surveys, polls, and dynamic form submissions.
|
|
267
|
+
- **4 KPI Cards:** Total Responses & Quota progress, Average & Median Completion Time (`durationMs`), Net Promoter Score (`-100..+100`) stacked bar, and Locale breakdown.
|
|
268
|
+
- **30-Day Daily Participation Trend** bar chart + Date Range (`from`/`to`) & `Locale` filters.
|
|
269
|
+
- **1-Click Export:** UTF-8 BOM `.csv` (opens directly in Microsoft Excel with Turkish/Unicode characters intact) and structured `.json` export (`GET /content-input/surveys/:id/export?format=csv|json`).
|
|
270
|
+
2. **Inline `Survey Studio Modal` -> `Tab 4: Analytics & Reports`:** View live charts for the selected survey directly inside the Content Manager page editor.
|
|
271
|
+
3. **Rich Seed Dataset Included in Playground (`525` Responses):** Boots automatically with 3 realistic showcase surveys (`showcase_dx_survey` with `185` correlated 30-day responses, `showcase_roadmap_poll` with `245` votes, and `showcase_visual_theme_poll` with `95` votes) plus `20` sample corporate form submissions.
|
|
204
272
|
|
|
205
273
|
---
|
|
206
274
|
|
|
207
|
-
|
|
275
|
+
## 6. Component Map Keys (`widget.id`) & Reference Table (All 15 Widgets)
|
|
208
276
|
|
|
209
|
-
|
|
210
|
-
1. **HTML Editör (Varsayılan):** Sekme veya akordiyon paneli içine doğrudan zengin metin, liste, başlık ve bağlantı yazılabilir.
|
|
211
|
-
2. **Görsel Bloklar (`ContentInput`):** Sekme veya akordiyon paneli içine **yeni bir `ContentInput` ızgarası (satırlar, sütunlar, galeriler, formlar, videolar)** gömülebilir. **"İçerik Tasarla (ContentInput)"** butonuna basıldığında o sekmenin iç ızgarası için iç içe Görsel Editör açılır.
|
|
277
|
+
All 15 built-in widgets use the following `widget.id` keys across the Strapi Visual Editor and both Nuxt storefront renderers (`@ozguraltan/strapi-content-input-nuxt-vuetify` and `@ozguraltan/strapi-content-input-nuxt-element-plus`):
|
|
212
278
|
|
|
213
|
-
|
|
279
|
+
| Component Map Key (`widget.id`) | Category | `slotContext` Helper Property | Description & Supported Scenarios |
|
|
280
|
+
| :--- | :--- | :--- | :--- |
|
|
281
|
+
| `HtmlEditor` | Content & Typography | `resolvedHtml` (`string`) | WYSIWYG rich HTML editor with source code view, media download link picker, transparent default background, and automatic `baseUrl` resolution for `/uploads/...` URLs. |
|
|
282
|
+
| `heading` | Content & Typography | `headingData` (`{ text, tag, align, color, fontSize, fontWeight }`) | Semantic heading (`h1`–`h6`) with alignment (`left`, `center`, `right`), color, font size, and weight. |
|
|
283
|
+
| `button` | Interactive & Navigation | `buttonData` (`{ label, url, target, variant, size, align }`) | CTA button supporting `primary`, `secondary`, `outline`, `ghost` variants and `sm`, `md`, `lg` sizes. |
|
|
284
|
+
| `singleImage` | Media & Visuals | `widget.data` (`{ image, alt, caption, link, objectFit, borderRadius, maxWidth }`) | Single image with caption, border radius, `cover`/`contain` mode, and optional external link. |
|
|
285
|
+
| `spacer` | Layout | `widget.data` (`{ height, divider, dividerColor, lineWidth }`) | Configurable vertical space (`height` in `px`) with optional horizontal divider line. |
|
|
286
|
+
| `gallery` | Media & Visuals | `galleryList` (`CIMediaAsset[]`) | **Swiper Carousel (`kind: 'swiper'`):** Official Swiper.js with mouse/touch drag, mousewheel, `slide`/`fade`/`cube`/`coverflow`/`flip` effects, `slidesPerView`, `spaceBetween`, `loop`, `autoplay`.<br>**Grid Gallery (`kind: 'gridGallery'`):** 5-breakpoint `itemsPerRow`, `aspectRatio`, `gridPadding`.<br>**Thumbnails vs Lightbox:** `sharp` `fit`/`widen` thumbnails in slides, **full-size original image** in Lightbox Popup. |
|
|
287
|
+
| `youtubeVideo` | Media & Visuals | `ytData` (`{ videos, title, activeTitle, description, activeVideoId, thumb, isPopup, isThumbnailMode, iframeUrl, watchUrl }`) | Custom cover thumbnail (`customThumbnail`), hover animated Play button, Lightbox modal player (`popup: true`) with multi-video playlist, or inline card playback (`popup: false`). |
|
|
288
|
+
| `tab` | Interactive & Navigation | `tabAccItems` (`NormalizedTabAccItem[]`) | Horizontal or vertical tabs (`options.vertical`, `options.grow`). Each tab supports both Rich HTML (`contentMode: 'text'`) and recursive nested `ContentInput` rows (`contentMode: 'builder'`). |
|
|
289
|
+
| `accordion` | Interactive & Navigation | `tabAccItems` (`NormalizedTabAccItem[]`) | Single or multi-open (`options.multiple`) accordion panels with custom header colors (`header.color`, `header.textColor`), Rich HTML, and nested `ContentInput` rows. |
|
|
290
|
+
| `menu` | Dynamic & Modules | `menuData` (`{ name, mode, items: CIMenuNodeItem[] }`) | Unlimited-depth hierarchical menu (`horizontal` dropdowns & `vertical` collapsible tree), reusable DB menu templates (`plugin::content-input.ci-menu`), and Strapi Collection-Type entity tree picker. |
|
|
291
|
+
| `contentForm` | Dynamic & Modules | `formData`, `submitForm` | Async DB-backed dynamic form (`CIDynamicForm`) with 9 field types, dynamic Strapi `i18n` locales, shared client+server `vee-validate` rules, Google reCAPTCHA v2, Mailtrap/Mailgun/SMTP delivery, and `@submit-form` event. |
|
|
292
|
+
| `survey` | Dynamic & Modules | `surveyData`, `submitSurvey` | Enterprise Survey & Quick Poll (`CISurvey`) supporting `quick_poll`, `single_page`, and `multi_step` wizard modes, 13 question types (NPS, Star, Likert, Matrix, Borda Ranking, Image Choice, etc.), conditional skip logic, HMAC duplicate protection, live `%` results, and `@submit-survey` event. |
|
|
293
|
+
| `entityCard` | Dynamic & Modules | `entityCardData` (`NormalizedEntityCardData`) | Linked Strapi entity card (`vertical`, `horizontal`, `overlay` layouts) that auto-inherits entity fields (`title`, `description`, `image`, `url`) with optional per-field manual overrides and Vuetify/Element Plus `cardProps`. |
|
|
294
|
+
| `iframe` | Media & Visuals | `widget.data` (`string` or `{ url, height }`) | Embedded iframe (OpenStreetMap, Google Maps, external embeds) with configurable height. |
|
|
295
|
+
| `banner` | Media & Visuals | `widget.data` (`{ banner: { id, name } }`) | Campaign / promotional banner widget designed to be easily customized via slots or `:components`. |
|
|
214
296
|
|
|
215
297
|
---
|
|
216
298
|
|
|
217
|
-
|
|
299
|
+
## 7. Storefront Customization Guide (Nuxt Vuetify & Element Plus)
|
|
218
300
|
|
|
219
|
-
-
|
|
220
|
-
- *Bileşeni Düzenle (Pencere)* / *Ayarlar (Sağ Denetçi)*
|
|
221
|
-
- *Üstüne / Altına Bileşen veya Satır Ekle*
|
|
222
|
-
- *Yukarı / Aşağı Taşı (`Alt+↑` / `Alt+↓`)*
|
|
223
|
-
- *Çoğalt (`Ctrl+D`)*, *Kopyala (`Ctrl+C`)*, *Yapıştır (`Ctrl+V`)*, *Sil (`Del`)*
|
|
224
|
-
- **Zengin HTML Editörü (`RichHtmlEditor`):**
|
|
225
|
-
- Varsayılan olarak **WYSIWYG Görsel Modda** çalışır; yalnızca **`<> Kaynak`** butonuna basıldığında ham HTML kodunu gösterir.
|
|
226
|
-
- Arka plan rengi özellikle belirtilmedikçe **transparan (`transparent`)** olarak render edilir.
|
|
227
|
-
- **`Link`** ve **`Dosya / Medya Linki`** butonlarıyla hem harici URL'lere bağlantı verebilir hem de **Strapi Medya Kütüphanesindeki yüklü dosyalar (PDF, görsel, doküman vb.) içinde gezerek indirme (`download`) bağlantısı** ekleyebilirsiniz.
|
|
301
|
+
Both `@ozguraltan/strapi-content-input-nuxt-vuetify` and `@ozguraltan/strapi-content-input-nuxt-element-plus` provide **3 ways** to customize widget rendering in your Nuxt 3/4 or Vue 3 application:
|
|
228
302
|
|
|
229
|
-
|
|
303
|
+
### Method 1: Scoped Slots (`#widget-<id>` or `#<id>`)
|
|
304
|
+
Override individual widgets inline while keeping the responsive 12-column grid and all other default widgets intact (automatically inherited by nested Tabs and Accordions):
|
|
230
305
|
|
|
231
|
-
|
|
306
|
+
```vue
|
|
307
|
+
<template>
|
|
308
|
+
<ContentInputPreview :model-value="page.content" base-url="http://localhost:1337">
|
|
309
|
+
<template #widget-entityCard="{ entityCardData }">
|
|
310
|
+
<MyCustomEntityCard :card="entityCardData" />
|
|
311
|
+
</template>
|
|
312
|
+
|
|
313
|
+
<template #widget-banner="{ data, options }">
|
|
314
|
+
<MyCustomBanner :banner="data?.banner" :options="options" />
|
|
315
|
+
</template>
|
|
316
|
+
</ContentInputPreview>
|
|
317
|
+
</template>
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Method 2: Component Map Override Prop (`:components`)
|
|
321
|
+
Pass an object mapping any `widget.id` key from the table above to your own Vue component:
|
|
322
|
+
|
|
323
|
+
```vue
|
|
324
|
+
<template>
|
|
325
|
+
<ContentInputPreview
|
|
326
|
+
:model-value="page.content"
|
|
327
|
+
base-url="http://localhost:1337"
|
|
328
|
+
:components="{
|
|
329
|
+
entityCard: MyCustomEntityCard,
|
|
330
|
+
banner: MyCustomBanner,
|
|
331
|
+
youtubeVideo: MyCustomVideoPlayer,
|
|
332
|
+
}"
|
|
333
|
+
/>
|
|
334
|
+
</template>
|
|
335
|
+
```
|
|
232
336
|
|
|
233
|
-
###
|
|
337
|
+
### Method 3: CLI Template Ejection (`npx ... eject`)
|
|
338
|
+
Copy the entire set of Vue SFC templates (`ContentInputPreview.vue`, `CIRow.vue`, `CIBlock.vue`, `CIWidget.vue`, `CIDynamicForm.vue`, `CISurvey.vue`) and utilities (`utils/helpers.ts`, `utils/formValidation.ts`, `utils/surveyHelpers.ts`) directly into your project so you can edit every line of template/CSS freely:
|
|
234
339
|
|
|
235
|
-
|
|
236
|
-
|
|
340
|
+
```bash
|
|
341
|
+
# For Nuxt + Vuetify projects:
|
|
342
|
+
npx strapi-content-input-vuetify eject ./components/content-input
|
|
343
|
+
|
|
344
|
+
# For Nuxt + Element Plus projects:
|
|
345
|
+
npx strapi-content-input-ep eject ./components/content-input
|
|
237
346
|
|
|
238
|
-
|
|
347
|
+
# Overwrite existing files if needed:
|
|
348
|
+
npx strapi-content-input-vuetify eject ./components/content-input --force
|
|
349
|
+
```
|
|
239
350
|
|
|
351
|
+
---
|
|
240
352
|
---
|
|
241
353
|
|
|
242
|
-
|
|
354
|
+
# 🇹🇷 Türkçe Dokümantasyon
|
|
243
355
|
|
|
244
|
-
|
|
245
|
-
- **Pop-up'ta Göster (Varsayılan: Açık):** Tıklandığında videoyu sayfa düzenini bozmadan şık bir pop-up (lightbox modal) pencerede açar. İstenirse işaret kaldırılarak kartın kendi içinde (inline) oynatılması sağlanabilir.
|
|
246
|
-
- **Özel Kapak Görseli / Thumbnail (`StrapiMediaPicker`):** **"Medya Seç"** butonuna basıldığında Strapi Medya Kütüphanesindeki yüklü görseller listelenir (veya yeni görsel yüklenir). Özel bir görsel seçildiğinde standart YouTube kartı yerine bu görsel kapak olarak kullanılır ve **üzerine gelindiğinde (hover) ortada Play butonu** belirir.
|
|
356
|
+
## 1. Mevcut Bir Strapi v5 Projesine Kurulum ve Entegrasyon
|
|
247
357
|
|
|
248
|
-
|
|
358
|
+
`@ozguraltan/strapi-content-input`, gelişmiş **ContentInput** görsel sayfa/içerik tasarım motorunu, **Dinamik Form Oluşturucu Stüdyosunu (`contentForm`)**, **Kurumsal Anket & Raporlama Merkezini (`survey`)** ve **Strapi Entity Kartı (`entityCard`)** sistemini **Strapi v5** ekosistemine yerel bir `json` (`PostgreSQL JSONB`) özel alanı (**Custom Field**) olarak taşır.
|
|
249
359
|
|
|
250
|
-
|
|
360
|
+
### Adım 1: Paketi Strapi Projenize Çekin
|
|
361
|
+
```bash
|
|
362
|
+
npm install @ozguraltan/strapi-content-input
|
|
363
|
+
# veya GitLab üzerinden:
|
|
364
|
+
npm install git+ssh://git@gitlab.com:ozguraltan/strapi-content-input.git
|
|
365
|
+
```
|
|
251
366
|
|
|
252
|
-
|
|
367
|
+
### Adım 2: `config/plugins.ts` İçinde Etkinleştirin
|
|
368
|
+
```ts
|
|
369
|
+
export default () => ({
|
|
370
|
+
'content-input': {
|
|
371
|
+
enabled: true,
|
|
372
|
+
},
|
|
373
|
+
});
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
### Adım 3: `schema.json` İçine Custom Field Olarak Ekleyin
|
|
377
|
+
```json
|
|
378
|
+
{
|
|
379
|
+
"attributes": {
|
|
380
|
+
"title": {
|
|
381
|
+
"type": "string",
|
|
382
|
+
"required": true
|
|
383
|
+
},
|
|
384
|
+
"content": {
|
|
385
|
+
"type": "customField",
|
|
386
|
+
"customField": "plugin::content-input.content-input"
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
```
|
|
253
391
|
|
|
254
392
|
---
|
|
255
393
|
|
|
256
|
-
|
|
394
|
+
## 2. Dinamik Form Oluşturucu (`contentForm`), Validasyon Kuralları, reCAPTCHA v2 ve Mail Gönderimi
|
|
395
|
+
|
|
396
|
+
`cms-core` mimarisinden ilham alınarak geliştirilen `contentForm` bileşeni, veritabanı tabanlı form yönetimi, hem önyüzde hem sunucuda çalışan ortak validasyon motoru, Google reCAPTCHA v2 ve 3. parti e-posta servislerini barındırır:
|
|
397
|
+
|
|
398
|
+
1. **Veritabanı Kaydı, Tam Sürükle-Bırak Form Stüdyosu ve Asenkron Yükleme:**
|
|
399
|
+
- Form şablonları PostgreSQL üzerinde `ci_forms` (`plugin::content-input.ci-form`) tablosunda tutulur; gönderilen başvurular ise IP adresi, User-Agent ve mail gönderim durumu ile birlikte `ci_form_submissions` tablosuna kaydedilir.
|
|
400
|
+
- **Tam Sürükle & Bırak (Drag & Drop) ve Dinamik Strapi `i18n` Dil Desteği:** Form Stüdyosu içerisindeki Hızlı Alan Şablonları, Satır Şablonları (`12`, `6+6`, `4+4+4`, `8+4`), Satırlar, Sütunlar (satır içi ve satırlar arası), Yerleşmiş/Yerleşmemiş Form Alanları, Çoklu Seçenek satırları ve Aktif Validasyon Kuralı rozetlerinin tamamı sürükle-bırak ile taşınabilir. Seçenek etiketleri (`selectGroup`, `radioGroup`, `checkboxGroup`), alan başlıkları ve ipuçları Strapi **Internationalization (`i18n`)** eklentisinde tanımlı aktif dillerden (`GET /content-input/locales` — örn. `tr`, `en`, `de`, `fr`, `ar`) dinamik olarak beslenir.
|
|
401
|
+
- Nuxt Vuetify ve Element Plus paketlerindeki `<CIDynamicForm>` bileşeni, form şemasını `GET ${baseUrl}/api/content-input/forms/:id` uç noktasından asenkron olarak çeker (API anahtarları ve gizli bilgiler yanıt içinden otomatik temizlenir).
|
|
402
|
+
- 12 sütunlu duyarlı (responsive) form ızgarası içinde **9 alan tipini** destekler: `input` (Metin), `emailInput` (E-Posta), `telInput` (Telefon), `numeric` (Sayısal), `textArea` (Çok Satırlı Metin), `selectGroup` (Açılır Liste), `radioGroup` (Tekli Seçim), `checkboxGroup` (Çoklu Seçim), `switchBox` (KVKK / Onay Kutusu).
|
|
403
|
+
2. **Hem Önyüzde Hem Backend'de Çalışan `vee-validate` Tarzı Validasyon Kuralları:**
|
|
404
|
+
- Kurallar `|` karakteri ile birleştirilir (Örn: `required|email|max:120` veya `required|min:10|max:1000`).
|
|
405
|
+
- Gönderim anında `POST ${baseUrl}/api/content-input/forms/:id/submit` uç noktasında aynı kurallar tekrar çalıştırılır; hata varsa **HTTP `422`** koduyla alan bazlı Türkçe/İngilizce hata mesajları döner:
|
|
406
|
+
|
|
407
|
+
| Kural | Örnek Kullanım | Açıklama |
|
|
408
|
+
| :--- | :--- | :--- |
|
|
409
|
+
| `required` | `required` | Alan boş bırakılamaz. |
|
|
410
|
+
| `accepted` | `accepted` | Onay kutusu (`switchBox`) işaretlenmelidir (`true` / `1` / `on`). |
|
|
411
|
+
| `email` | `required\|email` | Geçerli e-posta adresi formatı kontrolü. |
|
|
412
|
+
| `phone` | `phone` | Telefon numarası formatı kontrolü (en az 7 rakam). |
|
|
413
|
+
| `url` | `url` | Geçerli `http://` veya `https://` web adresi. |
|
|
414
|
+
| `numeric` / `integer` | `required\|numeric` | Sayısal veya tam sayı değer kontrolü. |
|
|
415
|
+
| `min:<n>` / `max:<n>` | `required\|min:3\|max:100` | Minimum / maksimum karakter sayısı (veya `checkboxGroup` için seçim adedi). |
|
|
416
|
+
| `min_value:<n>` / `max_value:<n>` | `numeric\|min_value:1` | Sayısal alt ve üst sınır kontrolü. |
|
|
417
|
+
| `between:<min>,<max>` | `numeric\|between:1,100` | Belirtilen aralıkta olma zorunluluğu. |
|
|
418
|
+
| `alpha` / `alpha_num` | `alpha_num` | Yalnızca harf veya harf+rakam (Türkçe karakter destekli). |
|
|
419
|
+
| `in:<a,b,c>` | `required\|in:Satış,Destek` | İzin verilen değerlerden biri olma zorunluluğu. |
|
|
420
|
+
| `regex:<desen>` | `regex:^[A-Z0-9-]+$` | Özel düzenli ifade (RegExp) doğrulaması. |
|
|
421
|
+
| `confirmed:<alan>` | `confirmed:email` | Başka bir alanla birebir eşleşme kontrolü. |
|
|
422
|
+
|
|
423
|
+
3. **Google reCAPTCHA v2 ve 3. Parti Mail Servisleri (`Mailtrap`, `Mailgun`, `SMTP`):**
|
|
424
|
+
- Ortam değişkenlerinde (`.env`) `MIX_RECAPTCHA_PUBLIC_KEY` (veya form özelinde `recaptchaSiteKey`) tanımlıysa formun altında otomatik olarak Google reCAPTCHA v2 kutusu render edilir ve sunucuda `RECAPTCHA_PRIVATE_KEY` ile doğrulanır.
|
|
425
|
+
- Mail gönderimi için hem `.env` üzerinden (`MAIL_DRIVER=mailtrap|mailgun|smtp|strapi`, `MAILTRAP_API_TOKEN`, `MAILTRAP_INBOX_ID`, `MAILGUN_SECRET`, `MAILGUN_DOMAIN`, `MAIL_HOST`, `MAIL_PORT`, `MAIL_USERNAME`, `MAIL_PASSWORD`) hem de Strapi Form Stüdyosu içindeki **2. Sekme (Mail & reCAPTCHA)** üzerinden form bazlı API Key tanımlanabilir.
|
|
426
|
+
|
|
427
|
+
---
|
|
257
428
|
|
|
258
|
-
|
|
259
|
-
- **Yatay ve Düşey Görünüm:** Üst açılır menü (**Yatay / Dropdown**) veya yan açılır-kapanır ağaç menü (**Düşey / Sidebar Tree**) olarak kullanılabilir.
|
|
260
|
-
- **Sınırsız Alt Kırılım (Nested Tree):** Menü öğeleri `→` (Alt Kırılıma Kaydır), `←` (Üst Kırılıma Çıkar), `↑`, `↓` ve `+` (Alt Öğe Ekle) butonlarıyla sınırsız derinlikte ağaç yapısına dönüştürülebilir.
|
|
261
|
-
- **Veritabanında Kayıtlı Menüler (`plugin::content-input.ci-menu`):** Oluşturduğunuz bir menüyü **"Bu Menüyü Veritabanına Kaydet / Güncelle"** butonuyla PostgreSQL'e kaydedebilir ve diğer sayfalarda tek tıkla çağırabilirsiniz.
|
|
262
|
-
- **Strapi Entity Arama & Ağaç Görünümü:** `Sayfalar (api::page.page)` gibi herhangi bir Strapi modülünü seçip kayıtlar içinde arama yapabilir, **Ağaç** veya **Liste** görünümünden tekil ya da **"+ Altlarıyla Ekle"** butonuyla tüm alt sayfalarıyla birlikte hiyerarşik olarak menüye aktarabilirsiniz.
|
|
429
|
+
## 3. Bağlı İçerik Kartı (`entityCard`) — Otomatik Miras, Manuel Ezme ve Genel Kart Propları
|
|
263
430
|
|
|
264
|
-
|
|
431
|
+
Yeni **`entityCard`** bileşeni herhangi bir Strapi içerik kaydına (`api::page.page`, makale, ürün vb.) bağlanır:
|
|
432
|
+
- **Otomatik Miras (Fallback):** Editör kart üzerindeki Başlık (`title`), Alt Başlık (`subtitle`), Açıklama (`description`), Görsel (`image`), Rozet (`badgeText`) veya Link (`url`) alanlarını boş bıraktığında, bu bilgiler otomatik olarak bağlı olduğu Strapi kaydından çekilir (`ContentInput` JSON içeriğinden özet ve kapak görseli çıkarma dahil).
|
|
433
|
+
- **Manuel Ezme (Override):** Editör istediği alanı doldurarak bağlı kayıttan gelen veriyi o kart özelinde ezebilir.
|
|
434
|
+
- **Vuetify & Element Plus Kart Propları (`options.cardProps`):** `layout` (`vertical` dikey, `horizontal` yatay, `overlay` görsel üzeri kaplama), `variant` (`elevated`, `outlined`, `flat`, `tonal`), `elevation` (`0`–`24`), `rounded` (`0`, `sm`, `md`, `lg`, `xl`), `color`, `textColor`, `accentColor`, `imageHeight`, `showBadge`, `showButton`, `buttonVariant`, `hoverEffect`.
|
|
435
|
+
- **Dışarıdan Tam Özelleştirme:** `#widget-entityCard="{ entityCardData }"` slotu veya `:components="{ entityCard: BenimKartBilesenim }"` prop'u ile tamamen kendi kart tasarımınızı kullanabilirsiniz.
|
|
265
436
|
|
|
266
437
|
---
|
|
267
438
|
|
|
268
|
-
##
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
439
|
+
## 4. Kurumsal Anket & Oylama Modülü (`survey`) ve Strapi Raporlama Merkezi
|
|
440
|
+
|
|
441
|
+
**`survey`** bileşeni (15. yerleşik bileşen); tek tıkla hızlı oylamalardan çok adımlı (Typeform tarzı) kurumsal anketlere, koşullu soru mantığından Strapi içi görsel analitik ve Excel dışa aktarımına kadar uçtan uca bir anket altyapısı sunar:
|
|
442
|
+
|
|
443
|
+
1. **3 Farklı Görünüm Modu (`displayMode`):**
|
|
444
|
+
- `quick_poll`: Tek kartta hızlı oylama ve oy sonrası anlık `%` çubuk grafiği.
|
|
445
|
+
- `single_page`: Tüm soruların tek sayfada alt alta yer aldığı klasik anket düzeni.
|
|
446
|
+
- `multi_step`: Adım çubuklu, ilerleme yüzdeli, her adımda validasyon yapan **Çok Adımlı Sihirbaz (Wizard)** modu.
|
|
447
|
+
2. **13 Soru ve Öğe Tipi:**
|
|
448
|
+
- Seçimli tipler: `single_choice` (Tekli Seçim + `"Diğer"` açık uçlu seçenek + şık karıştırma), `multiple_choice` (Çoklu Seçim + `minSelections`/`maxSelections`), `dropdown` (Açılır Liste), `image_choice` (Strapi Medya Kütüphanesi görselli kart seçimi).
|
|
449
|
+
- Ölçek, Matris ve Sıralama: `nps` (`0–10` Net Promoter Score), `star_rating` (`1–5` / `1–10` Yıldız), `likert_scale` (`1–5` / `1–7` Katılım Ölçeği), `matrix_single` (Satır × Sütun değerlendirme tablosu), `ranking` (Sürükle-bırak öncelik sıralama ve **Borda Puanlama**).
|
|
450
|
+
- Metin, Onay ve Bilgi: `short_text`, `long_text` (`vee-validate` kurallı), `consent` (KVKK/GDPR onayı) ve `statement` (bilgi/bölüm açıklaması).
|
|
451
|
+
3. **Sabit Seçenek Kimliği (`option.id`) + Dinamik Strapi `i18n` Etiketleri:**
|
|
452
|
+
- Seçenekler sabit bir `id` (`"opt_ai"`) ve Strapi `i18n` dillerine göre dinamik `labels` (`{ tr: "...", en: "...", de: "..." }`) sözlüğü ile saklanır. Böylece farklı dillerde verilen tüm oylar raporlama ekranında tek bir grafik çubuğunda birleşir.
|
|
453
|
+
4. **Koşullu Soru Gösterimi (`conditions` / Skip Logic):**
|
|
454
|
+
- Önceki sorulara verilen yanıtlara göre (`equals`, `not_equals`, `in`, `contains`, `gt`, `lt`, `gte`, `lte`, `is_answered`) takip sorularını dinamik olarak gösterir veya gizler (Örn: `nps_score <= 6` ise *"Geliştirmemiz gereken en kritik nokta nedir?"* sorusunun açılması). Gizlenen zorunlu sorular hem Nuxt önyüzünde hem Strapi sunucu validasyonunda (`HTTP 422`) otomatik atlanır.
|
|
455
|
+
5. **Mükerrer Oy Engelleme, Kota & KVKK/GDPR Güvenliği:**
|
|
456
|
+
- `status` (`draft` / `published` / `closed`), başlangıç/bitiş tarihi (`startsAt`/`endsAt`), maksimum yanıt kotası (`quotaLimit`).
|
|
457
|
+
- `submissionPolicy`: `'one_per_voter'` (`localStorage` + sunucuda tuzlanmış **`HMAC-SHA256(IP + User-Agent + voterToken)`** kontrolü ile mükerrer oyda `HTTP 409`), `'one_per_token'` veya `'unlimited'`.
|
|
458
|
+
- `anonymizeIp: true` ile ham IP kaydetmeden anonim parmak izi üretimi, `_hp` honeypot, isteğe bağlı Google reCAPTCHA v2 ve katılımcılara canlı sonuç gösterimi (`showPublicResults`: `'never' | 'after_vote' | 'always'`).
|
|
459
|
+
6. **Strapi Sol Menü "Surveys & Forms" Raporlama Merkezi (`/admin/plugins/content-input`):**
|
|
460
|
+
- Hem Strapi sol menüsündeki bağımsız **Surveys & Forms** sayfasından hem de **Anket Stüdyosu -> Raporlama & Analiz** sekmesinden erişilebilir.
|
|
461
|
+
- Toplam yanıt & kota doluluk oranı, ortalama/medyan tamamlama süresi, **NPS Skoru (`-100..+100` — Destekçiler / Pasifler / Eleştirenler)**, **30 Günlük Katılım Trendi**, Matris **Isı Haritası (Heatmap)**, Borda Sıralama Liderlik Tablosu, aranabilir açık uçlu yanıt listesi, Tarih & Dil filtreleri ve tek tıkla **Excel uyumlu UTF-8 BOM `.csv` / `.json`** indirme özelliklerini içerir.
|
|
462
|
+
- Playground ortamı **525 korelasyonlu örnek anket yanıtı** (`showcase_dx_survey`: `185`, `showcase_roadmap_poll`: `245`, `showcase_visual_theme_poll`: `95`) ve **20 örnek kurumsal form başvurusu** ile hazır gelir.
|
|
285
463
|
|
|
286
464
|
---
|
|
287
465
|
|
|
288
|
-
##
|
|
466
|
+
## 5. Bileşen Haritası Anahtarları (`widget.id` — Tüm 15 Bileşen)
|
|
289
467
|
|
|
290
|
-
|
|
468
|
+
| Anahtar (`widget.id`) | Etiket | `slotContext` Verisi | Açıklama |
|
|
469
|
+
| :--- | :--- | :--- | :--- |
|
|
470
|
+
| `HtmlEditor` | Metin Editörü | `resolvedHtml` | WYSIWYG zengin metin, kaynak kodu, dosya indirme linki ve transparan arka plan |
|
|
471
|
+
| `heading` | Başlık | `headingData` | `H1`–`H6` seviye, hizalama, boyut ve renk seçenekli başlık |
|
|
472
|
+
| `button` | Buton | `buttonData` | `primary`, `secondary`, `outline`, `ghost` varyantlı ve `sm`/`md`/`lg` boyutlu aksiyon butonu |
|
|
473
|
+
| `spacer` | Boşluk | `data` | Piksel yüksekliği ve isteğe bağlı ayırıcı çizgi (`divider: true`) |
|
|
474
|
+
| `singleImage` | Tek Görsel | `data` | Alt yazılı, köşe yuvarlatmalı (`borderRadius`) ve dış linkli görsel |
|
|
475
|
+
| `gallery` | Galeri | `galleryList` | Resmi **Swiper.js** (`swiper`) veya çok sütunlu ızgara (`gridGallery`) + `sharp` thumbnail + tam boyutlu Lightbox Popup |
|
|
476
|
+
| `youtubeVideo` | YouTube Video | `ytData` | Özel kapak görseli (`customThumbnail`), hover Play butonu, çoklu videolu Lightbox modal veya kart içi oynatıcı |
|
|
477
|
+
| `tab` | Sekme (Tab) | `tabAccItems` | Yatay/Dikey sekmeler; zengin HTML ve iç içe (nested) `ContentInput` ızgarası |
|
|
478
|
+
| `accordion` | Akordiyon | `tabAccItems` | Tekli/Çoklu açılır paneller; özel başlık renkleri, zengin HTML ve iç içe `ContentInput` ızgarası |
|
|
479
|
+
| `menu` | Menü | `menuData` | Yatay/Düşey sınırsız kırılımlı ağaç menü, DB şablon kaydı ve Strapi Entity ağaç seçici |
|
|
480
|
+
| `contentForm` | Dinamik Form | `formData`, `submitForm` | PostgreSQL tabanlı dinamik form (`CIDynamicForm`), dinamik Strapi `i18n` dil desteği, `vee-validate` kuralları, reCAPTCHA v2 ve Mailtrap/Mailgun/SMTP gönderimi |
|
|
481
|
+
| `survey` | Anket & Oylama | `surveyData`, `submitSurvey` | Çok adımlı sihirbaz / hızlı oylama (`CISurvey`), 13 soru tipi (NPS, Yıldız, Likert, Matris, Borda Sıralama, Görsel Seçim vb.), koşullu mantık, HMAC mükerrer oy engelleme ve canlı `%` sonuç grafikleri |
|
|
482
|
+
| `entityCard` | İçerik Kartı | `entityCardData` | Strapi kaydından otomatik veri miras alan, alan bazlı ezilebilen ve Vuetify/Element Plus kart proplarını destekleyen kart |
|
|
483
|
+
| `iframe` | Iframe | `data` | Harita veya harici sayfa yerleştirme (özelleştirilebilir yükseklik) |
|
|
484
|
+
| `banner` | Banner | `data` | Kampanya ve tanıtım alanı (`#widget-banner` veya `:components="{ banner: MyBanner }"` ile özelleştirmeye hazır) |
|
|
485
|
+
|
|
486
|
+
### `npx` Komutu ile Nuxt Şablonlarını Projeye Kopyalama (`eject`)
|
|
487
|
+
```bash
|
|
488
|
+
# Vuetify projeleri için (CIDynamicForm.vue, CISurvey.vue, formValidation.ts ve surveyHelpers.ts dahil tüm dosyaları kopyalar):
|
|
489
|
+
npx strapi-content-input-vuetify eject ./components/content-input
|
|
291
490
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
{
|
|
295
|
-
"_uId": "row_1",
|
|
296
|
-
"cols": [],
|
|
297
|
-
"offset": [0, 0, 0, 0, 0],
|
|
298
|
-
"layoutProps": {
|
|
299
|
-
"align": ["start", "start", "start", "start", "start"]
|
|
300
|
-
},
|
|
301
|
-
"styleOptions": {
|
|
302
|
-
"backgroundColor": "#f5f7fa",
|
|
303
|
-
"padding": "32px 24px",
|
|
304
|
-
"borderRadius": "8px"
|
|
305
|
-
},
|
|
306
|
-
"bgImage": null,
|
|
307
|
-
"bgOptions": {},
|
|
308
|
-
"parallax": false,
|
|
309
|
-
"blocks": [
|
|
310
|
-
{
|
|
311
|
-
"_uId": "block_1",
|
|
312
|
-
"cols": [12, 12, 6, 6, 6],
|
|
313
|
-
"offset": [0, 0, 0, 0, 0],
|
|
314
|
-
"layoutProps": {},
|
|
315
|
-
"styleOptions": { "padding": "16px" },
|
|
316
|
-
"widgets": [
|
|
317
|
-
{
|
|
318
|
-
"_uId": "widget_1",
|
|
319
|
-
"id": "HtmlEditor",
|
|
320
|
-
"options": {},
|
|
321
|
-
"data": "<h2>Kurumsal Çözümler</h2><p>Detaylı açıklama metni...</p>"
|
|
322
|
-
}
|
|
323
|
-
]
|
|
324
|
-
}
|
|
325
|
-
]
|
|
326
|
-
}
|
|
327
|
-
]
|
|
491
|
+
# Element Plus projeleri için:
|
|
492
|
+
npx strapi-content-input-ep eject ./components/content-input
|
|
328
493
|
```
|
|
329
494
|
|
|
330
|
-
> Tüm bileşenlerin detaylı TypeScript arayüzleri ve alt veri şemaları için **[AGENTS.md](./AGENTS.md)** dosyasına başvurabilirsiniz.
|
|
331
|
-
|
|
332
495
|
---
|
|
333
496
|
|
|
334
|
-
##
|
|
335
|
-
|
|
336
|
-
Bu repo içinde eklentiyi anında test edebileceğiniz hazır bir **Strapi v5 Playground** (`./playground`) ve **Docker PostgreSQL** kurulumu yer almaktadır:
|
|
497
|
+
## 6. Lokal Geliştirme ve Playground Ortamları
|
|
337
498
|
|
|
338
499
|
```bash
|
|
339
|
-
# 1. PostgreSQL
|
|
500
|
+
# 1. PostgreSQL veritabanını başlatın
|
|
340
501
|
npm run db:up
|
|
341
502
|
|
|
342
|
-
# 2.
|
|
343
|
-
npm run build
|
|
344
|
-
npm run verify
|
|
345
|
-
|
|
346
|
-
# 3. Playground uygulamasını derleyip başlatın
|
|
347
|
-
cd playground
|
|
503
|
+
# 2. Strapi eklentisini derleyin ve Playground'u başlatın (Port 1337)
|
|
348
504
|
npm run build
|
|
349
|
-
npm run
|
|
505
|
+
npm --prefix playground run dev
|
|
350
506
|
```
|
|
351
507
|
|
|
352
|
-
- **Strapi Admin Paneli:** `http://localhost:1337/admin`
|
|
353
|
-
- **
|
|
354
|
-
- **
|
|
508
|
+
- **Strapi Admin Paneli:** `http://localhost:1337/admin` (`ozguraltan05@gmail.com` / `12345678`)
|
|
509
|
+
- **Strapi Anket & Form Raporlama Merkezi:** `http://localhost:1337/admin/plugins/content-input`
|
|
510
|
+
- **Nuxt Vuetify Playground:** `http://localhost:3001`
|
|
511
|
+
- **Nuxt Element Plus Playground:** `http://localhost:3002`
|