@polyv/iar-questionnaire-ui 2.1.0-release-2025213.2 → 2.1.0
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/index.cjs.js +1037 -5
- package/index.es.d.ts +97 -0
- package/index.es.js +30497 -808
- package/index.umd.js +1041 -9
- package/normal-questionnaire.cjs.js +1013 -5
- package/normal-questionnaire.es.js +27834 -808
- package/normal-questionnaire.umd.js +1017 -9
- package/package.json +3 -3
- package/questionnaire-dialog.cjs.js +1041 -0
- package/questionnaire-dialog.es.js +30534 -0
- package/questionnaire-dialog.umd.js +1041 -0
- package/questionnaire-filling.cjs.js +1041 -0
- package/questionnaire-filling.es.js +30287 -0
- package/questionnaire-filling.umd.js +1041 -0
- package/questionnaire-list.cjs.js +1031 -0
- package/questionnaire-list.es.js +29509 -0
- package/questionnaire-list.umd.js +1031 -0
- package/questionnaire-rank.cjs.js +1007 -0
- package/questionnaire-rank.es.d.ts +3 -0
- package/questionnaire-rank.es.js +27349 -0
- package/questionnaire-rank.umd.js +1007 -0
- package/questionnaire-statistics.cjs.js +1041 -0
- package/questionnaire-statistics.es.d.ts +3 -0
- package/questionnaire-statistics.es.js +30135 -0
- package/questionnaire-statistics.umd.js +1041 -0
- package/index.d.ts +0 -25
- package/question-item.cjs.js +0 -9
- package/question-item.es.js +0 -676
- package/question-item.umd.js +0 -9
- package/question-option.cjs.js +0 -9
- package/question-option.es.js +0 -398
- package/question-option.umd.js +0 -9
- package/question-score.cjs.js +0 -9
- package/question-score.es.js +0 -407
- package/question-score.umd.js +0 -9
- /package/{question-item.es.d.ts → questionnaire-dialog.es.d.ts} +0 -0
- /package/{question-option.es.d.ts → questionnaire-filling.es.d.ts} +0 -0
- /package/{question-score.es.d.ts → questionnaire-list.es.d.ts} +0 -0
package/question-item.es.js
DELETED
|
@@ -1,676 +0,0 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var i=document.createElement("style");i.appendChild(document.createTextNode('.plv-iar-questionnaire__question-option__item{padding:11px 24px 12px 48px;border-radius:8px;font-size:14px;line-height:22px;color:#0009;background:#f2f3f5;position:relative}.plv-iar-questionnaire__question-option__item+.plv-iar-questionnaire__question-option__item{margin-top:12px}.plv-iar-questionnaire__question-option__item.is-active{background:#3f76fc1a;color:#3f76fc;font-weight:700}.plv-iar-questionnaire__question-option__item__index{position:absolute;top:11px;left:24px}.plv-iar-questionnaire__question-score{display:flex;align-items:center;flex-wrap:wrap}.plv-iar-questionnaire__question-score__item{cursor:pointer}.plv-iar-questionnaire__question-score__item--start{width:24px;height:24px;margin-right:14px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAflBMVEUAAAD09PTc3Nzc3Nzd3d3g4ODb29vc3Nzc3Nzc3Nzc3Nzd3d3d3d3d3d3f39/g4ODh4eHc3Nzc3Nzb29vb29vc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzb29ve3t7i4uLb29vc3Nzb29vb29vb29vd3d3b29vc3Nzf39/////b29tUkRBFAAAAKXRSTlMAB/XwLBz04teThl5QQSchFvnm3t29ubGXjX9sOTUR7OnJqqONckkwAv3RWLEAAAFDSURBVEjHxZTXjoMwEEUBG9NMLyGhpJf5/x9cR4sw0XrAftmcN4Z7dK2RZetruK6hEASGBY7jmhUAGFVkDoCTGQh7EOzNCmSFXoFRRcZ+BaZbEcJEqJcfGUywUbfAqGIkUiA6FQdYcNhK25STpUA4tZFkwu9t7YECr27vPJFe+uiCpoRNyiboHqkQYge0cWLrbTDdPBP5Nz3Ry5Pemhi0DDLIHT2P2/nj01pAT1v5E7U+SIr1fJFMQWl4a3lvzkvSFcNLlW9RheUrF3m9fHXedzVutt4dv6iFCypgR8Lydq4WchsRKCBQRIgwIULfF4QQEXaYsEOESkbytl1soEKWJBPXVNytq/xWr2mYT0Cnrc1nHNaWVPdy1Ndra7qB4Bx/DuMzCG5KoQHw+d8x9wEapVCU0Us1f0VloVxSJ3eB/PoffgD3A4P/UBEs0gAAAABJRU5ErkJggg==);background-size:100% 100%;margin-bottom:8px}.plv-iar-questionnaire__question-score__item--start.is-active{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAeFBMVEUAAAD/mQ7/mQ7/mg7/mQ3/mg7/mg7/mw3/rin/mQ3/mg3/mg3/mw//nBH/ng7/nBH/nhL/mg3/mg3/mg3/mg7/mg3/mg3/mw3/mw//mxD/mhP/nxP/oRb/phn/mg7/mQ7/mQ7/mQ7/mg7/mw7/mQ7/mg7/mxH/mQ0FSzOOAAAAJ3RSTlMA9O/e/JWONgbn14ZQLCMeEvjivbmxcF9DLygaFwrJqqOAfmtaST2km/q1AAABP0lEQVRIx8WV2ZKCMBREsxhZZAfZxHXU+/9/OGNhQRzTQ/Iy9mPSp/pC3eqwjylNHQGl3Py7PN85AWuitYt/yInywS3AKWLgD4APLgFOERkfAZ5ZAht6auMWMEcsBzhFZGIGhE3EmTSdl9z7OBI6IKJ4b3b6fVSrsiCDilLVUe/Pm3+rVSVXtKCVrFR9S3+AlpO1ePuIuFsT/D4O5Qk7v/AYAwTyT+osCNExTXGw5A9i9qJ+gQh69ktJ8Ze/SNibEon9MjGWHSRkCtorNPtD2GkXM3BhSEczcIQAGgn5/RXYbB8AHQF1ALgi4Ar7BQi1zRYBWwBI7TuV0v6ABBUz208JY8lpRsxV400TPFc/nmb0jEAzXpbarVeOZw1+Rg7t62F7wE9LRRRG78dRSFQZgUCak1kjA+Mmfc0rA67+R98Mx3zXTcKFewAAAABJRU5ErkJggg==)}.plv-iar-questionnaire__question-score__item--score{width:32px;height:32px;flex-shrink:0;border-radius:50%;border:1px solid #CFD8DC;font-size:14px;color:#333;text-align:center;line-height:32px;margin-right:8px;margin-bottom:8px}.plv-iar-questionnaire__question-score__item--score.is-active{border-color:#2196f3;color:#2196f3;background-color:#2196f31a}.plv-iar-questionnaire__question-item__top{display:flex;align-items:center;margin-bottom:12px}.plv-iar-questionnaire__question-item__count{border-radius:2px;background:#0000000f;font-size:10px;height:16px;line-height:16px;color:#0009;padding:0 4px;min-width:36px;text-align:center;box-sizing:border-box;margin-right:6px}.plv-iar-questionnaire__question-item__type{color:#23aa4f;font-size:10px;border-radius:2px;height:16px;line-height:16px;padding:0 4px;box-sizing:border-box;font-weight:700;position:relative;overflow:hidden}.plv-iar-questionnaire__question-item__type:after{content:"";width:100%;height:100%;position:absolute;top:0;left:0;background:currentColor;opacity:.1}.plv-iar-questionnaire__question-item__type--C{color:#3f76fc}.plv-iar-questionnaire__question-item__type--J{color:#ff5252}.plv-iar-questionnaire__question-item__title{color:#333a47;font-size:14px;line-height:22px;font-weight:700;margin-bottom:16px}.plv-iar-questionnaire__question-item__desc{font-size:12px;color:#0006;margin-bottom:24px;margin-top:-4px;line-height:18px}.plv-iar-questionnaire__question-item__textarea{width:100%;box-sizing:border-box;height:88px;display:block;font-size:14px;color:#333;resize:none;padding:5px 10px;border:1px solid #efefef;border-radius:4px;outline:none}')),document.head.appendChild(i)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
import { inject, defineComponent, computed } from "vue";
|
|
6
|
-
const emitFunc = () => () => true;
|
|
7
|
-
/*!
|
|
8
|
-
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
9
|
-
*
|
|
10
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
11
|
-
* Released under the MIT License.
|
|
12
|
-
*/
|
|
13
|
-
function isObject(o2) {
|
|
14
|
-
return Object.prototype.toString.call(o2) === "[object Object]";
|
|
15
|
-
}
|
|
16
|
-
function isPlainObject(o2) {
|
|
17
|
-
var ctor, prot;
|
|
18
|
-
if (isObject(o2) === false) return false;
|
|
19
|
-
ctor = o2.constructor;
|
|
20
|
-
if (ctor === void 0) return true;
|
|
21
|
-
prot = ctor.prototype;
|
|
22
|
-
if (isObject(prot) === false) return false;
|
|
23
|
-
if (prot.hasOwnProperty("isPrototypeOf") === false) {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
var define_process_env_default = {};
|
|
29
|
-
function t() {
|
|
30
|
-
return t = Object.assign ? Object.assign.bind() : function(e2) {
|
|
31
|
-
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
32
|
-
var r2 = arguments[t2];
|
|
33
|
-
for (var n2 in r2) Object.prototype.hasOwnProperty.call(r2, n2) && (e2[n2] = r2[n2]);
|
|
34
|
-
}
|
|
35
|
-
return e2;
|
|
36
|
-
}, t.apply(this, arguments);
|
|
37
|
-
}
|
|
38
|
-
function r(e2, t2) {
|
|
39
|
-
if (null == e2) return {};
|
|
40
|
-
var r2, n2, i2 = {}, o2 = Object.keys(e2);
|
|
41
|
-
for (n2 = 0; n2 < o2.length; n2++) t2.indexOf(r2 = o2[n2]) >= 0 || (i2[r2] = e2[r2]);
|
|
42
|
-
return i2;
|
|
43
|
-
}
|
|
44
|
-
const n = { silent: false, logLevel: "warn" }, i = ["validator"], o = Object.prototype, a = o.toString, s = o.hasOwnProperty, u = /^\s*function (\w+)/;
|
|
45
|
-
function l(e2) {
|
|
46
|
-
var t2;
|
|
47
|
-
const r2 = null !== (t2 = null == e2 ? void 0 : e2.type) && void 0 !== t2 ? t2 : e2;
|
|
48
|
-
if (r2) {
|
|
49
|
-
const e3 = r2.toString().match(u);
|
|
50
|
-
return e3 ? e3[1] : "";
|
|
51
|
-
}
|
|
52
|
-
return "";
|
|
53
|
-
}
|
|
54
|
-
const c = isPlainObject, f = (e2) => e2;
|
|
55
|
-
let d = f;
|
|
56
|
-
if ("production" !== define_process_env_default.NODE_ENV) {
|
|
57
|
-
const e2 = "undefined" != typeof console;
|
|
58
|
-
d = e2 ? function(e3, t2 = n.logLevel) {
|
|
59
|
-
false === n.silent && console[t2](`[VueTypes warn]: ${e3}`);
|
|
60
|
-
} : f;
|
|
61
|
-
}
|
|
62
|
-
const p = (e2, t2) => s.call(e2, t2), y = Number.isInteger || function(e2) {
|
|
63
|
-
return "number" == typeof e2 && isFinite(e2) && Math.floor(e2) === e2;
|
|
64
|
-
}, v = Array.isArray || function(e2) {
|
|
65
|
-
return "[object Array]" === a.call(e2);
|
|
66
|
-
}, h = (e2) => "[object Function]" === a.call(e2), b = (e2) => c(e2) && p(e2, "_vueTypes_name"), g = (e2) => c(e2) && (p(e2, "type") || ["_vueTypes_name", "validator", "default", "required"].some((t2) => p(e2, t2)));
|
|
67
|
-
function O(e2, t2) {
|
|
68
|
-
return Object.defineProperty(e2.bind(t2), "__original", { value: e2 });
|
|
69
|
-
}
|
|
70
|
-
function m(e2, t2, r2 = false) {
|
|
71
|
-
let n2, i2 = true, o2 = "";
|
|
72
|
-
n2 = c(e2) ? e2 : { type: e2 };
|
|
73
|
-
const a2 = b(n2) ? n2._vueTypes_name + " - " : "";
|
|
74
|
-
if (g(n2) && null !== n2.type) {
|
|
75
|
-
if (void 0 === n2.type || true === n2.type) return i2;
|
|
76
|
-
if (!n2.required && void 0 === t2) return i2;
|
|
77
|
-
v(n2.type) ? (i2 = n2.type.some((e3) => true === m(e3, t2, true)), o2 = n2.type.map((e3) => l(e3)).join(" or ")) : (o2 = l(n2), i2 = "Array" === o2 ? v(t2) : "Object" === o2 ? c(t2) : "String" === o2 || "Number" === o2 || "Boolean" === o2 || "Function" === o2 ? function(e3) {
|
|
78
|
-
if (null == e3) return "";
|
|
79
|
-
const t3 = e3.constructor.toString().match(u);
|
|
80
|
-
return t3 ? t3[1] : "";
|
|
81
|
-
}(t2) === o2 : t2 instanceof n2.type);
|
|
82
|
-
}
|
|
83
|
-
if (!i2) {
|
|
84
|
-
const e3 = `${a2}value "${t2}" should be of type "${o2}"`;
|
|
85
|
-
return false === r2 ? (d(e3), false) : e3;
|
|
86
|
-
}
|
|
87
|
-
if (p(n2, "validator") && h(n2.validator)) {
|
|
88
|
-
const e3 = d, o3 = [];
|
|
89
|
-
if (d = (e4) => {
|
|
90
|
-
o3.push(e4);
|
|
91
|
-
}, i2 = n2.validator(t2), d = e3, !i2) {
|
|
92
|
-
const e4 = (o3.length > 1 ? "* " : "") + o3.join("\n* ");
|
|
93
|
-
return o3.length = 0, false === r2 ? (d(e4), i2) : e4;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return i2;
|
|
97
|
-
}
|
|
98
|
-
function j(e2, t2) {
|
|
99
|
-
const r2 = Object.defineProperties(t2, { _vueTypes_name: { value: e2, writable: true }, isRequired: { get() {
|
|
100
|
-
return this.required = true, this;
|
|
101
|
-
} }, def: { value(e3) {
|
|
102
|
-
return void 0 === e3 ? (p(this, "default") && delete this.default, this) : h(e3) || true === m(this, e3, true) ? (this.default = v(e3) ? () => [...e3] : c(e3) ? () => Object.assign({}, e3) : e3, this) : (d(`${this._vueTypes_name} - invalid default value: "${e3}"`), this);
|
|
103
|
-
} } }), { validator: n2 } = r2;
|
|
104
|
-
return h(n2) && (r2.validator = O(n2, r2)), r2;
|
|
105
|
-
}
|
|
106
|
-
function _(e2, t2) {
|
|
107
|
-
const r2 = j(e2, t2);
|
|
108
|
-
return Object.defineProperty(r2, "validate", { value(e3) {
|
|
109
|
-
return h(this.validator) && d(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:
|
|
110
|
-
${JSON.stringify(this)}`), this.validator = O(e3, this), this;
|
|
111
|
-
} });
|
|
112
|
-
}
|
|
113
|
-
function T(e2, t2, n2) {
|
|
114
|
-
const o2 = function(e3) {
|
|
115
|
-
const t3 = {};
|
|
116
|
-
return Object.getOwnPropertyNames(e3).forEach((r2) => {
|
|
117
|
-
t3[r2] = Object.getOwnPropertyDescriptor(e3, r2);
|
|
118
|
-
}), Object.defineProperties({}, t3);
|
|
119
|
-
}(t2);
|
|
120
|
-
if (o2._vueTypes_name = e2, !c(n2)) return o2;
|
|
121
|
-
const { validator: a2 } = n2, s2 = r(n2, i);
|
|
122
|
-
if (h(a2)) {
|
|
123
|
-
let { validator: e3 } = o2;
|
|
124
|
-
e3 && (e3 = null !== (l2 = (u2 = e3).__original) && void 0 !== l2 ? l2 : u2), o2.validator = O(e3 ? function(t3) {
|
|
125
|
-
return e3.call(this, t3) && a2.call(this, t3);
|
|
126
|
-
} : a2, o2);
|
|
127
|
-
}
|
|
128
|
-
var u2, l2;
|
|
129
|
-
return Object.assign(o2, s2);
|
|
130
|
-
}
|
|
131
|
-
function $(e2) {
|
|
132
|
-
return e2.replace(/^(?!\s*$)/gm, " ");
|
|
133
|
-
}
|
|
134
|
-
const w = () => _("any", {}), P = () => _("function", { type: Function }), x = () => _("boolean", { type: Boolean }), E = () => _("string", { type: String }), N = () => _("number", { type: Number }), q = () => _("array", { type: Array }), A = () => _("object", { type: Object }), V = () => j("integer", { type: Number, validator: (e2) => y(e2) }), S = () => j("symbol", { validator: (e2) => "symbol" == typeof e2 });
|
|
135
|
-
function D(e2, t2 = "custom validation failed") {
|
|
136
|
-
if ("function" != typeof e2) throw new TypeError("[VueTypes error]: You must provide a function as argument");
|
|
137
|
-
return j(e2.name || "<<anonymous function>>", { type: null, validator(r2) {
|
|
138
|
-
const n2 = e2(r2);
|
|
139
|
-
return n2 || d(`${this._vueTypes_name} - ${t2}`), n2;
|
|
140
|
-
} });
|
|
141
|
-
}
|
|
142
|
-
function L(e2) {
|
|
143
|
-
if (!v(e2)) throw new TypeError("[VueTypes error]: You must provide an array as argument.");
|
|
144
|
-
const t2 = `oneOf - value should be one of "${e2.join('", "')}".`, r2 = e2.reduce((e3, t3) => {
|
|
145
|
-
if (null != t3) {
|
|
146
|
-
const r3 = t3.constructor;
|
|
147
|
-
-1 === e3.indexOf(r3) && e3.push(r3);
|
|
148
|
-
}
|
|
149
|
-
return e3;
|
|
150
|
-
}, []);
|
|
151
|
-
return j("oneOf", { type: r2.length > 0 ? r2 : void 0, validator(r3) {
|
|
152
|
-
const n2 = -1 !== e2.indexOf(r3);
|
|
153
|
-
return n2 || d(t2), n2;
|
|
154
|
-
} });
|
|
155
|
-
}
|
|
156
|
-
function F(e2) {
|
|
157
|
-
if (!v(e2)) throw new TypeError("[VueTypes error]: You must provide an array as argument");
|
|
158
|
-
let t2 = false, r2 = [];
|
|
159
|
-
for (let n3 = 0; n3 < e2.length; n3 += 1) {
|
|
160
|
-
const i2 = e2[n3];
|
|
161
|
-
if (g(i2)) {
|
|
162
|
-
if (b(i2) && "oneOf" === i2._vueTypes_name && i2.type) {
|
|
163
|
-
r2 = r2.concat(i2.type);
|
|
164
|
-
continue;
|
|
165
|
-
}
|
|
166
|
-
if (h(i2.validator) && (t2 = true), true === i2.type || !i2.type) {
|
|
167
|
-
d('oneOfType - invalid usage of "true" or "null" as types.');
|
|
168
|
-
continue;
|
|
169
|
-
}
|
|
170
|
-
r2 = r2.concat(i2.type);
|
|
171
|
-
} else r2.push(i2);
|
|
172
|
-
}
|
|
173
|
-
r2 = r2.filter((e3, t3) => r2.indexOf(e3) === t3);
|
|
174
|
-
const n2 = r2.length > 0 ? r2 : null;
|
|
175
|
-
return j("oneOfType", t2 ? { type: n2, validator(t3) {
|
|
176
|
-
const r3 = [], n3 = e2.some((e3) => {
|
|
177
|
-
const n4 = m(b(e3) && "oneOf" === e3._vueTypes_name ? e3.type || null : e3, t3, true);
|
|
178
|
-
return "string" == typeof n4 && r3.push(n4), true === n4;
|
|
179
|
-
});
|
|
180
|
-
return n3 || d(`oneOfType - provided value does not match any of the ${r3.length} passed-in validators:
|
|
181
|
-
${$(r3.join("\n"))}`), n3;
|
|
182
|
-
} } : { type: n2 });
|
|
183
|
-
}
|
|
184
|
-
function Y(e2) {
|
|
185
|
-
return j("arrayOf", { type: Array, validator(t2) {
|
|
186
|
-
let r2 = "";
|
|
187
|
-
const n2 = t2.every((t3) => (r2 = m(e2, t3, true), true === r2));
|
|
188
|
-
return n2 || d(`arrayOf - value validation error:
|
|
189
|
-
${$(r2)}`), n2;
|
|
190
|
-
} });
|
|
191
|
-
}
|
|
192
|
-
function B(e2) {
|
|
193
|
-
return j("instanceOf", { type: e2 });
|
|
194
|
-
}
|
|
195
|
-
function I(e2) {
|
|
196
|
-
return j("objectOf", { type: Object, validator(t2) {
|
|
197
|
-
let r2 = "";
|
|
198
|
-
const n2 = Object.keys(t2).every((n3) => (r2 = m(e2, t2[n3], true), true === r2));
|
|
199
|
-
return n2 || d(`objectOf - value validation error:
|
|
200
|
-
${$(r2)}`), n2;
|
|
201
|
-
} });
|
|
202
|
-
}
|
|
203
|
-
function J(e2) {
|
|
204
|
-
const t2 = Object.keys(e2), r2 = t2.filter((t3) => {
|
|
205
|
-
var r3;
|
|
206
|
-
return !(null === (r3 = e2[t3]) || void 0 === r3 || !r3.required);
|
|
207
|
-
}), n2 = j("shape", { type: Object, validator(n3) {
|
|
208
|
-
if (!c(n3)) return false;
|
|
209
|
-
const i2 = Object.keys(n3);
|
|
210
|
-
if (r2.length > 0 && r2.some((e3) => -1 === i2.indexOf(e3))) {
|
|
211
|
-
const e3 = r2.filter((e4) => -1 === i2.indexOf(e4));
|
|
212
|
-
return d(1 === e3.length ? `shape - required property "${e3[0]}" is not defined.` : `shape - required properties "${e3.join('", "')}" are not defined.`), false;
|
|
213
|
-
}
|
|
214
|
-
return i2.every((r3) => {
|
|
215
|
-
if (-1 === t2.indexOf(r3)) return true === this._vueTypes_isLoose || (d(`shape - shape definition does not include a "${r3}" property. Allowed keys: "${t2.join('", "')}".`), false);
|
|
216
|
-
const i3 = m(e2[r3], n3[r3], true);
|
|
217
|
-
return "string" == typeof i3 && d(`shape - "${r3}" property validation error:
|
|
218
|
-
${$(i3)}`), true === i3;
|
|
219
|
-
});
|
|
220
|
-
} });
|
|
221
|
-
return Object.defineProperty(n2, "_vueTypes_isLoose", { writable: true, value: false }), Object.defineProperty(n2, "loose", { get() {
|
|
222
|
-
return this._vueTypes_isLoose = true, this;
|
|
223
|
-
} }), n2;
|
|
224
|
-
}
|
|
225
|
-
const M = ["name", "validate", "getter"], R = /* @__PURE__ */ (() => {
|
|
226
|
-
var e2;
|
|
227
|
-
return (e2 = class {
|
|
228
|
-
static get any() {
|
|
229
|
-
return w();
|
|
230
|
-
}
|
|
231
|
-
static get func() {
|
|
232
|
-
return P().def(this.defaults.func);
|
|
233
|
-
}
|
|
234
|
-
static get bool() {
|
|
235
|
-
return x().def(this.defaults.bool);
|
|
236
|
-
}
|
|
237
|
-
static get string() {
|
|
238
|
-
return E().def(this.defaults.string);
|
|
239
|
-
}
|
|
240
|
-
static get number() {
|
|
241
|
-
return N().def(this.defaults.number);
|
|
242
|
-
}
|
|
243
|
-
static get array() {
|
|
244
|
-
return q().def(this.defaults.array);
|
|
245
|
-
}
|
|
246
|
-
static get object() {
|
|
247
|
-
return A().def(this.defaults.object);
|
|
248
|
-
}
|
|
249
|
-
static get integer() {
|
|
250
|
-
return V().def(this.defaults.integer);
|
|
251
|
-
}
|
|
252
|
-
static get symbol() {
|
|
253
|
-
return S();
|
|
254
|
-
}
|
|
255
|
-
static get nullable() {
|
|
256
|
-
return { type: null };
|
|
257
|
-
}
|
|
258
|
-
static extend(e3) {
|
|
259
|
-
if (v(e3)) return e3.forEach((e4) => this.extend(e4)), this;
|
|
260
|
-
const { name: t2, validate: n2 = false, getter: i2 = false } = e3, o2 = r(e3, M);
|
|
261
|
-
if (p(this, t2)) throw new TypeError(`[VueTypes error]: Type "${t2}" already defined`);
|
|
262
|
-
const { type: a2 } = o2;
|
|
263
|
-
if (b(a2)) return delete o2.type, Object.defineProperty(this, t2, i2 ? { get: () => T(t2, a2, o2) } : { value(...e4) {
|
|
264
|
-
const r2 = T(t2, a2, o2);
|
|
265
|
-
return r2.validator && (r2.validator = r2.validator.bind(r2, ...e4)), r2;
|
|
266
|
-
} });
|
|
267
|
-
let s2;
|
|
268
|
-
return s2 = i2 ? { get() {
|
|
269
|
-
const e4 = Object.assign({}, o2);
|
|
270
|
-
return n2 ? _(t2, e4) : j(t2, e4);
|
|
271
|
-
}, enumerable: true } : { value(...e4) {
|
|
272
|
-
const r2 = Object.assign({}, o2);
|
|
273
|
-
let i3;
|
|
274
|
-
return i3 = n2 ? _(t2, r2) : j(t2, r2), r2.validator && (i3.validator = r2.validator.bind(i3, ...e4)), i3;
|
|
275
|
-
}, enumerable: true }, Object.defineProperty(this, t2, s2);
|
|
276
|
-
}
|
|
277
|
-
}).defaults = {}, e2.sensibleDefaults = void 0, e2.config = n, e2.custom = D, e2.oneOf = L, e2.instanceOf = B, e2.oneOfType = F, e2.arrayOf = Y, e2.objectOf = I, e2.shape = J, e2.utils = { validate: (e3, t2) => true === m(t2, e3, true), toType: (e3, t2, r2 = false) => r2 ? _(e3, t2) : j(e3, t2) }, e2;
|
|
278
|
-
})();
|
|
279
|
-
function z(e2 = { func: () => {
|
|
280
|
-
}, bool: true, string: "", number: 0, array: () => [], object: () => ({}), integer: 0 }) {
|
|
281
|
-
var r2;
|
|
282
|
-
return (r2 = class extends R {
|
|
283
|
-
static get sensibleDefaults() {
|
|
284
|
-
return t({}, this.defaults);
|
|
285
|
-
}
|
|
286
|
-
static set sensibleDefaults(r3) {
|
|
287
|
-
this.defaults = false !== r3 ? t({}, true !== r3 ? r3 : e2) : {};
|
|
288
|
-
}
|
|
289
|
-
}).defaults = t({}, e2), r2;
|
|
290
|
-
}
|
|
291
|
-
class C extends z() {
|
|
292
|
-
}
|
|
293
|
-
class PropUtils {
|
|
294
|
-
/** String 类型,默认:'' */
|
|
295
|
-
static get string() {
|
|
296
|
-
return E().def("");
|
|
297
|
-
}
|
|
298
|
-
/** String 类型,默认:undefined */
|
|
299
|
-
static get looseString() {
|
|
300
|
-
return E();
|
|
301
|
-
}
|
|
302
|
-
/** Number 类型,默认:0 */
|
|
303
|
-
static get number() {
|
|
304
|
-
return N().def(0);
|
|
305
|
-
}
|
|
306
|
-
/** Number 类型,默认:undefined */
|
|
307
|
-
static get looseNumber() {
|
|
308
|
-
return N();
|
|
309
|
-
}
|
|
310
|
-
/** Boolean 类型,默认:true */
|
|
311
|
-
static get bool() {
|
|
312
|
-
return x().def(true);
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
__publicField(PropUtils, "objectType", A);
|
|
316
|
-
/** Array 类型,默认:[] */
|
|
317
|
-
__publicField(PropUtils, "array", () => {
|
|
318
|
-
return q().def([]);
|
|
319
|
-
});
|
|
320
|
-
/** Object 类型 */
|
|
321
|
-
__publicField(PropUtils, "object", A);
|
|
322
|
-
/** Function 类型 */
|
|
323
|
-
__publicField(PropUtils, "func", P);
|
|
324
|
-
/** 指定为数组中的值 */
|
|
325
|
-
__publicField(PropUtils, "oneOf", L);
|
|
326
|
-
/** 自定义类型 */
|
|
327
|
-
__publicField(PropUtils, "oneOfType", F);
|
|
328
|
-
/** 枚举类型 */
|
|
329
|
-
__publicField(PropUtils, "enum", E);
|
|
330
|
-
/** 任意类型 */
|
|
331
|
-
__publicField(PropUtils, "any", w);
|
|
332
|
-
const QUESTIONNAIRE_PROVIDE_KEY = Symbol("QUESTIONNAIRE_PROVIDE_KEY");
|
|
333
|
-
const useQuestionnaireInject = () => {
|
|
334
|
-
const data = inject(QUESTIONNAIRE_PROVIDE_KEY);
|
|
335
|
-
const questionnaireTarget = data.getQuestionnaireTarget();
|
|
336
|
-
const QuestionItemType = questionnaireTarget.QuestionItemType;
|
|
337
|
-
return {
|
|
338
|
-
...data,
|
|
339
|
-
questionnaireTarget,
|
|
340
|
-
QuestionItemType
|
|
341
|
-
};
|
|
342
|
-
};
|
|
343
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
344
|
-
__name: "question-option",
|
|
345
|
-
props: {
|
|
346
|
-
options: PropUtils.array(),
|
|
347
|
-
value: PropUtils.oneOfType([String, Number, Array]),
|
|
348
|
-
type: PropUtils.enum()
|
|
349
|
-
},
|
|
350
|
-
emits: {
|
|
351
|
-
click: emitFunc()
|
|
352
|
-
},
|
|
353
|
-
setup(__props, { emit }) {
|
|
354
|
-
const props = __props;
|
|
355
|
-
const { questionnaireTarget } = useQuestionnaireInject();
|
|
356
|
-
function isActive(option) {
|
|
357
|
-
const QuestionItemType = questionnaireTarget.QuestionItemType;
|
|
358
|
-
if (props.type === QuestionItemType.CheckBox) {
|
|
359
|
-
const val = props.value || [];
|
|
360
|
-
return val.includes(option.id);
|
|
361
|
-
}
|
|
362
|
-
return props.value === option.id;
|
|
363
|
-
}
|
|
364
|
-
return { __sfc: true, props, emit, questionnaireTarget, isActive };
|
|
365
|
-
}
|
|
366
|
-
});
|
|
367
|
-
function normalizeComponent(scriptExports, render4, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
368
|
-
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
369
|
-
if (render4) {
|
|
370
|
-
options.render = render4;
|
|
371
|
-
options.staticRenderFns = staticRenderFns;
|
|
372
|
-
options._compiled = true;
|
|
373
|
-
}
|
|
374
|
-
return {
|
|
375
|
-
exports: scriptExports,
|
|
376
|
-
options
|
|
377
|
-
};
|
|
378
|
-
}
|
|
379
|
-
var _sfc_render$2 = function render() {
|
|
380
|
-
var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
|
|
381
|
-
return _c("div", { staticClass: "plv-iar-questionnaire__question-option" }, _vm._l(_vm.options, function(item, index) {
|
|
382
|
-
return _c("div", { key: index, staticClass: "plv-iar-questionnaire__question-option__item", class: {
|
|
383
|
-
"is-active": _setup.isActive(item)
|
|
384
|
-
}, on: { "click": function($event) {
|
|
385
|
-
return _setup.emit("click", item);
|
|
386
|
-
} } }, [_c("div", { staticClass: "plv-iar-questionnaire__question-option__item__index" }, [_vm._v(_vm._s(item.id) + ".")]), _c("div", [_vm._v(_vm._s(item.content))])]);
|
|
387
|
-
}), 0);
|
|
388
|
-
};
|
|
389
|
-
var _sfc_staticRenderFns$2 = [];
|
|
390
|
-
var __component__$2 = /* @__PURE__ */ normalizeComponent(
|
|
391
|
-
_sfc_main$2,
|
|
392
|
-
_sfc_render$2,
|
|
393
|
-
_sfc_staticRenderFns$2
|
|
394
|
-
);
|
|
395
|
-
const QuestionOption = __component__$2.exports;
|
|
396
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
397
|
-
__name: "question-score",
|
|
398
|
-
props: {
|
|
399
|
-
value: PropUtils.oneOfType([String, Number, Array]),
|
|
400
|
-
type: PropUtils.enum()
|
|
401
|
-
},
|
|
402
|
-
emits: {
|
|
403
|
-
click: emitFunc()
|
|
404
|
-
},
|
|
405
|
-
setup(__props, { emit }) {
|
|
406
|
-
const props = __props;
|
|
407
|
-
const { questionnaireTarget } = useQuestionnaireInject();
|
|
408
|
-
const isScore = computed(() => {
|
|
409
|
-
const QuestionItemType = questionnaireTarget.QuestionItemType;
|
|
410
|
-
return props.type === QuestionItemType.Scor;
|
|
411
|
-
});
|
|
412
|
-
function isActive(index) {
|
|
413
|
-
const indexNum = index + 1;
|
|
414
|
-
return indexNum <= props.value;
|
|
415
|
-
}
|
|
416
|
-
function onClickItem(index) {
|
|
417
|
-
const indexNum = index + 1;
|
|
418
|
-
if (props.value === indexNum) {
|
|
419
|
-
emit("click", 0);
|
|
420
|
-
return;
|
|
421
|
-
}
|
|
422
|
-
emit("click", indexNum);
|
|
423
|
-
}
|
|
424
|
-
return { __sfc: true, props, emit, questionnaireTarget, isScore, isActive, onClickItem };
|
|
425
|
-
}
|
|
426
|
-
});
|
|
427
|
-
var _sfc_render$1 = function render2() {
|
|
428
|
-
var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
|
|
429
|
-
return _c("div", { staticClass: "plv-iar-questionnaire__question-score" }, _vm._l(Array(_setup.isScore ? 10 : 5), function(item, index) {
|
|
430
|
-
return _c("div", { key: index, staticClass: "plv-iar-questionnaire__question-score__item", class: {
|
|
431
|
-
"plv-iar-questionnaire__question-score__item--start": !_setup.isScore,
|
|
432
|
-
"plv-iar-questionnaire__question-score__item--score": _setup.isScore,
|
|
433
|
-
"is-active": _setup.isActive(index)
|
|
434
|
-
}, on: { "click": function($event) {
|
|
435
|
-
return _setup.onClickItem(index);
|
|
436
|
-
} } }, [_vm._v(" " + _vm._s(_setup.isScore ? index + 1 : "") + " ")]);
|
|
437
|
-
}), 0);
|
|
438
|
-
};
|
|
439
|
-
var _sfc_staticRenderFns$1 = [];
|
|
440
|
-
var __component__$1 = /* @__PURE__ */ normalizeComponent(
|
|
441
|
-
_sfc_main$1,
|
|
442
|
-
_sfc_render$1,
|
|
443
|
-
_sfc_staticRenderFns$1
|
|
444
|
-
);
|
|
445
|
-
const QuestionScore = __component__$1.exports;
|
|
446
|
-
const commonZh = {
|
|
447
|
-
confirm: "确认",
|
|
448
|
-
cancel: "取消",
|
|
449
|
-
close: "关闭",
|
|
450
|
-
submit: "提交",
|
|
451
|
-
submitSuccess: "提交成功"
|
|
452
|
-
};
|
|
453
|
-
const commonEn = {
|
|
454
|
-
confirm: "Confirm",
|
|
455
|
-
cancel: "Cancel",
|
|
456
|
-
close: "Close",
|
|
457
|
-
submit: "Submit",
|
|
458
|
-
submitSuccess: "Success"
|
|
459
|
-
};
|
|
460
|
-
function compressObject(obj, prefix = "") {
|
|
461
|
-
return Object.keys(obj).reduce((acc, key) => {
|
|
462
|
-
const value = obj[key];
|
|
463
|
-
const newKey = prefix ? `${prefix}.${key}` : key;
|
|
464
|
-
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
465
|
-
Object.assign(acc, compressObject(value, newKey));
|
|
466
|
-
} else {
|
|
467
|
-
acc[newKey] = value;
|
|
468
|
-
}
|
|
469
|
-
return acc;
|
|
470
|
-
}, {});
|
|
471
|
-
}
|
|
472
|
-
function mitt(n2) {
|
|
473
|
-
return { all: n2 = n2 || /* @__PURE__ */ new Map(), on: function(t2, e) {
|
|
474
|
-
var i2 = n2.get(t2);
|
|
475
|
-
i2 ? i2.push(e) : n2.set(t2, [e]);
|
|
476
|
-
}, off: function(t2, e) {
|
|
477
|
-
var i2 = n2.get(t2);
|
|
478
|
-
i2 && (e ? i2.splice(i2.indexOf(e) >>> 0, 1) : n2.set(t2, []));
|
|
479
|
-
}, emit: function(t2, e) {
|
|
480
|
-
var i2 = n2.get(t2);
|
|
481
|
-
i2 && i2.slice().map(function(n3) {
|
|
482
|
-
n3(e);
|
|
483
|
-
}), (i2 = n2.get("*")) && i2.slice().map(function(n3) {
|
|
484
|
-
n3(t2, e);
|
|
485
|
-
});
|
|
486
|
-
} };
|
|
487
|
-
}
|
|
488
|
-
const globalKey = "__iar-event-emitter-key";
|
|
489
|
-
function createEmitter() {
|
|
490
|
-
if (window[globalKey]) {
|
|
491
|
-
return window[globalKey];
|
|
492
|
-
}
|
|
493
|
-
const emitter = mitt();
|
|
494
|
-
window[globalKey] = emitter;
|
|
495
|
-
return emitter;
|
|
496
|
-
}
|
|
497
|
-
const IarInjectKey = "interactGlobalConfig";
|
|
498
|
-
const useGlobalInject = () => {
|
|
499
|
-
const injectData = inject(IarInjectKey, {
|
|
500
|
-
globalLang: "zh_CN"
|
|
501
|
-
});
|
|
502
|
-
const toast = (msg) => {
|
|
503
|
-
injectData.toast && injectData.toast(msg);
|
|
504
|
-
};
|
|
505
|
-
function getEmitter() {
|
|
506
|
-
if (injectData.getEmitter) {
|
|
507
|
-
return injectData.getEmitter();
|
|
508
|
-
}
|
|
509
|
-
return createEmitter();
|
|
510
|
-
}
|
|
511
|
-
return {
|
|
512
|
-
injectData,
|
|
513
|
-
toast,
|
|
514
|
-
getEmitter
|
|
515
|
-
};
|
|
516
|
-
};
|
|
517
|
-
const useI18n = (config = {
|
|
518
|
-
zh: {},
|
|
519
|
-
en: {},
|
|
520
|
-
key: ""
|
|
521
|
-
}) => {
|
|
522
|
-
const { injectData } = useGlobalInject();
|
|
523
|
-
const zhLang = compressObject({
|
|
524
|
-
common: commonZh,
|
|
525
|
-
[config.key]: config.zh
|
|
526
|
-
});
|
|
527
|
-
const enLang = compressObject({
|
|
528
|
-
common: commonEn,
|
|
529
|
-
[config.key]: config.en
|
|
530
|
-
});
|
|
531
|
-
const currentLang = computed(() => {
|
|
532
|
-
return injectData.globalLang || "zh_CN";
|
|
533
|
-
});
|
|
534
|
-
function $t(key) {
|
|
535
|
-
const currentLangData = currentLang.value === "zh_CN" ? zhLang : enLang;
|
|
536
|
-
return currentLangData[key];
|
|
537
|
-
}
|
|
538
|
-
return {
|
|
539
|
-
$t
|
|
540
|
-
};
|
|
541
|
-
};
|
|
542
|
-
const zh = {
|
|
543
|
-
typeCheckbox: "多选题",
|
|
544
|
-
typeRadio: "单选题",
|
|
545
|
-
typeQuestion: "问答题",
|
|
546
|
-
typeStar: "评星题",
|
|
547
|
-
typeScor: "评星题",
|
|
548
|
-
typeJudgement: "判断题",
|
|
549
|
-
typeFill: "填空题",
|
|
550
|
-
prevQuestion: "上一题",
|
|
551
|
-
nextQuestion: "下一题",
|
|
552
|
-
finishError: "请完成答题"
|
|
553
|
-
};
|
|
554
|
-
const en = {
|
|
555
|
-
typeCheckbox: "Multiple Choice",
|
|
556
|
-
typeRadio: "Single Choice",
|
|
557
|
-
typeQuestion: "Question",
|
|
558
|
-
typeStar: "Evaluation",
|
|
559
|
-
typeScor: "Evaluation",
|
|
560
|
-
typeJudgement: "Judgement",
|
|
561
|
-
typeFill: "Fill in the blank",
|
|
562
|
-
prevQuestion: "Previous",
|
|
563
|
-
nextQuestion: "Next",
|
|
564
|
-
finishError: "Please complete the answer"
|
|
565
|
-
};
|
|
566
|
-
const i18nConfig = {
|
|
567
|
-
key: "questionnaire",
|
|
568
|
-
zh,
|
|
569
|
-
en
|
|
570
|
-
};
|
|
571
|
-
const questionItemProps = () => ({
|
|
572
|
-
value: PropUtils.oneOfType([Array, Number, String]),
|
|
573
|
-
/** 问卷实例 */
|
|
574
|
-
questionnaireTarget: PropUtils.object().isRequired,
|
|
575
|
-
/** 问题数据 */
|
|
576
|
-
question: PropUtils.object().isRequired,
|
|
577
|
-
/** 当前题目索引 */
|
|
578
|
-
index: PropUtils.number.def(0),
|
|
579
|
-
/** 问题总数 */
|
|
580
|
-
total: PropUtils.number.def(0)
|
|
581
|
-
});
|
|
582
|
-
const questionItemEmit = () => ({
|
|
583
|
-
input: emitFunc()
|
|
584
|
-
});
|
|
585
|
-
const useQuestionItem = (options) => {
|
|
586
|
-
const { props, emit } = options;
|
|
587
|
-
const { $t } = useI18n(i18nConfig);
|
|
588
|
-
const questionType = computed(() => props.question.type);
|
|
589
|
-
const questionTypeText = computed(() => {
|
|
590
|
-
const questionnaireTarget = props.questionnaireTarget;
|
|
591
|
-
const QuestionItemType = questionnaireTarget.QuestionItemType;
|
|
592
|
-
const texts = {
|
|
593
|
-
[QuestionItemType.CheckBox]: $t("questionnaire.typeCheckbox"),
|
|
594
|
-
[QuestionItemType.Fill]: $t("questionnaire.typeFill"),
|
|
595
|
-
[QuestionItemType.Judgement]: $t("questionnaire.typeJudgement"),
|
|
596
|
-
[QuestionItemType.Question]: $t("questionnaire.typeQuestion"),
|
|
597
|
-
[QuestionItemType.Radio]: $t("questionnaire.typeRadio"),
|
|
598
|
-
[QuestionItemType.Scor]: $t("questionnaire.typeScor"),
|
|
599
|
-
[QuestionItemType.Star]: $t("questionnaire.typeStar")
|
|
600
|
-
};
|
|
601
|
-
return texts[questionType.value];
|
|
602
|
-
});
|
|
603
|
-
const questionTitle = computed(() => props.question.title);
|
|
604
|
-
const questionDesc = computed(() => props.question.desc);
|
|
605
|
-
function onClickOption(option) {
|
|
606
|
-
const questionnaireTarget = props.questionnaireTarget;
|
|
607
|
-
const QuestionItemType = questionnaireTarget.QuestionItemType;
|
|
608
|
-
switch (questionType.value) {
|
|
609
|
-
case QuestionItemType.Radio:
|
|
610
|
-
case QuestionItemType.Judgement:
|
|
611
|
-
emit("input", option.id);
|
|
612
|
-
break;
|
|
613
|
-
case QuestionItemType.CheckBox:
|
|
614
|
-
let currentValue = props.value || [];
|
|
615
|
-
if (!Array.isArray(currentValue)) {
|
|
616
|
-
currentValue = [];
|
|
617
|
-
}
|
|
618
|
-
if (currentValue.includes(option.id)) {
|
|
619
|
-
currentValue = currentValue.filter((item) => item !== option.id);
|
|
620
|
-
} else {
|
|
621
|
-
currentValue.push(option.id);
|
|
622
|
-
}
|
|
623
|
-
emit("input", currentValue);
|
|
624
|
-
break;
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
function onTextareaInput(event) {
|
|
628
|
-
const elem = event.target;
|
|
629
|
-
emit("input", elem.value);
|
|
630
|
-
}
|
|
631
|
-
function onClickScore(num) {
|
|
632
|
-
emit("input", num);
|
|
633
|
-
}
|
|
634
|
-
return {
|
|
635
|
-
questionType,
|
|
636
|
-
questionTypeText,
|
|
637
|
-
questionTitle,
|
|
638
|
-
questionDesc,
|
|
639
|
-
onClickOption,
|
|
640
|
-
onTextareaInput,
|
|
641
|
-
onClickScore
|
|
642
|
-
};
|
|
643
|
-
};
|
|
644
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
645
|
-
__name: "question-item",
|
|
646
|
-
props: questionItemProps(),
|
|
647
|
-
emits: questionItemEmit(),
|
|
648
|
-
setup(__props, { emit }) {
|
|
649
|
-
const props = __props;
|
|
650
|
-
const QuestionItemType = props.questionnaireTarget.QuestionItemType;
|
|
651
|
-
const {
|
|
652
|
-
questionTypeText,
|
|
653
|
-
questionType,
|
|
654
|
-
questionTitle,
|
|
655
|
-
questionDesc,
|
|
656
|
-
onClickOption,
|
|
657
|
-
onTextareaInput,
|
|
658
|
-
onClickScore
|
|
659
|
-
} = useQuestionItem({ props, emit });
|
|
660
|
-
return { __sfc: true, props, emit, QuestionItemType, questionTypeText, questionType, questionTitle, questionDesc, onClickOption, onTextareaInput, onClickScore, QuestionOption, QuestionScore };
|
|
661
|
-
}
|
|
662
|
-
});
|
|
663
|
-
var _sfc_render = function render3() {
|
|
664
|
-
var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
|
|
665
|
-
return _c("div", { staticClass: "plv-iar-questionnaire__question-item" }, [_c("div", { staticClass: "plv-iar-questionnaire__question-item__top" }, [_c("div", { staticClass: "plv-iar-questionnaire__question-item__count" }, [_vm._v(_vm._s(_vm.index + 1) + "/" + _vm._s(_vm.total))]), _c("div", { class: ["plv-iar-questionnaire__question-item__type", "plv-iar-questionnaire__question-item__type--" + _setup.questionType] }, [_vm._v(_vm._s(_setup.questionTypeText))])]), _c("div", { staticClass: "plv-iar-questionnaire__question-item__title" }, [_vm._v(_vm._s(_setup.questionTitle))]), _setup.questionDesc ? _c("div", { staticClass: "plv-iar-questionnaire__question-item__desc" }, [_vm._v(_vm._s(_setup.questionDesc))]) : _vm._e(), [_setup.QuestionItemType.CheckBox, _setup.QuestionItemType.Radio, _setup.QuestionItemType.Judgement].includes(_setup.questionType) ? _c(_setup.QuestionOption, { attrs: { "options": _vm.question.options, "value": _vm.value, "type": _setup.questionType }, on: { "click": _setup.onClickOption } }) : _setup.questionType === _setup.QuestionItemType.Question ? _c("textarea", { staticClass: "plv-iar-questionnaire__question-item__textarea", domProps: { "value": _vm.value }, on: { "input": _setup.onTextareaInput } }) : [_setup.QuestionItemType.Scor, _setup.QuestionItemType.Star].includes(_setup.questionType) ? _c(_setup.QuestionScore, { attrs: { "value": _vm.value, "type": _setup.questionType }, on: { "click": _setup.onClickScore } }) : _vm._e()], 1);
|
|
666
|
-
};
|
|
667
|
-
var _sfc_staticRenderFns = [];
|
|
668
|
-
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
669
|
-
_sfc_main,
|
|
670
|
-
_sfc_render,
|
|
671
|
-
_sfc_staticRenderFns
|
|
672
|
-
);
|
|
673
|
-
const questionItem = __component__.exports;
|
|
674
|
-
export {
|
|
675
|
-
questionItem as default
|
|
676
|
-
};
|