@ozguraltan/strapi-content-input 1.0.25 → 1.0.26
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 +2 -0
- package/dist/admin/{AnalyticsHubPage-0fb7chuv.js → AnalyticsHubPage-CHlhvUIU.js} +2 -2
- package/dist/admin/{AnalyticsHubPage-BO6Lg1qh.mjs → AnalyticsHubPage-Crz4vv46.mjs} +2 -2
- package/dist/admin/{ContentInputField-C-fh5qGC.mjs → ContentInputField-BeKDx_bb.mjs} +2 -2
- package/dist/admin/{ContentInputField-CnVzTBNf.js → ContentInputField-CNWVLuRt.js} +2 -2
- package/dist/admin/{SurveyWidgetEditor-DNDtKbmo.js → SurveyWidgetEditor-BTipBBEU.js} +447 -103
- package/dist/admin/{SurveyWidgetEditor-DdZBpfbS.mjs → SurveyWidgetEditor-GKRT3eHj.mjs} +447 -103
- package/dist/admin/{index-BdrFmPg5.mjs → index-DSDcG4QW.mjs} +2 -2
- package/dist/admin/{index--fSIDKkt.js → index-DuJM60tO.js} +2 -2
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/components/widgets/SurveyWidgetEditor.d.ts +2 -0
- package/dist/server/index.js +129 -22
- package/dist/server/index.mjs +129 -22
- package/dist/server/src/index.d.ts +23 -0
- package/dist/server/src/services/ci-survey.d.ts +23 -0
- package/dist/server/src/services/index.d.ts +23 -0
- package/dist/server/src/utils/surveyEngine.d.ts +19 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -308,6 +308,8 @@ The **`survey`** widget provides a full-featured survey, NPS, and quick-poll pla
|
|
|
308
308
|
| `consent` | Required GDPR / KVKK consent switch (`accepted`) | Acceptance count & `100%` compliance bar |
|
|
309
309
|
| `statement` | Rich informational callout / section intro block (no input required) | Informational separator |
|
|
310
310
|
|
|
311
|
+
- **Built-in `"No idea / N/A"` (`allowNoOpinion` + `i18n` `noOpinionLabel`) & Optional Clear:** Enable `allowNoOpinion: true` on any choice, scale (`likert_scale`, `nps`, `star_rating`), `matrix_single`, or `ranking` question (`__na__`). It satisfies `required` rules (and acts as an exclusive choice in `multiple_choice`), **excludes `__na__` from numeric averages (`★`, Likert) and NPS formulas**, reports its count & `%` separately in Strapi Analytics + `.xlsx`/`.csv` exports, and offers a `× Clear` action on non-required (`required: false`) questions.
|
|
312
|
+
|
|
311
313
|
### 5.3 Canonical Option IDs + Dynamic Strapi `i18n` Locales
|
|
312
314
|
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`):
|
|
313
315
|
```json
|
|
@@ -4,8 +4,8 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const admin = require("@strapi/strapi/admin");
|
|
6
6
|
const XLSXNs = require("xlsx");
|
|
7
|
-
const index = require("./index
|
|
8
|
-
const SurveyWidgetEditor = require("./SurveyWidgetEditor-
|
|
7
|
+
const index = require("./index-DuJM60tO.js");
|
|
8
|
+
const SurveyWidgetEditor = require("./SurveyWidgetEditor-BTipBBEU.js");
|
|
9
9
|
function _interopNamespace(e) {
|
|
10
10
|
if (e && e.__esModule) return e;
|
|
11
11
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -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 SurveyExportModal, T as SurveyImportModal, U as SurveyCleanupConfirmModal, V as persistLocale } from "./SurveyWidgetEditor-
|
|
5
|
+
import { M as MaterialIcon } from "./index-DSDcG4QW.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-GKRT3eHj.mjs";
|
|
7
7
|
const XLSX = XLSXNs?.utils ? XLSXNs : XLSXNs?.default || XLSXNs;
|
|
8
8
|
const AnalyticsHubPage = () => {
|
|
9
9
|
const { get, post } = useFetchClient();
|
|
@@ -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-GKRT3eHj.mjs";
|
|
5
|
+
import { M as MaterialIcon } from "./index-DSDcG4QW.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-BTipBBEU.js");
|
|
7
|
+
const index = require("./index-DuJM60tO.js");
|
|
8
8
|
const react = require("swiper/react");
|
|
9
9
|
const modules = require("swiper/modules");
|
|
10
10
|
const admin = require("@strapi/strapi/admin");
|