@wg-npm/survey-core 0.3.377-8.develop → 0.3.479-2.release
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/dist/survey-core.esm.js +1 -1
- package/package.json +1 -1
- package/src/models.ts +278 -276
package/dist/survey-core.esm.js
CHANGED
package/package.json
CHANGED
package/src/models.ts
CHANGED
|
@@ -1,388 +1,390 @@
|
|
|
1
1
|
import _ from "lodash";
|
|
2
|
-
import {
|
|
2
|
+
import {QuestionFactory} from "./quetion-factory";
|
|
3
3
|
|
|
4
4
|
const defaultText = function getText(locale: string): object {
|
|
5
|
-
|
|
5
|
+
return _.set({}, locale, "");
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export const enum SurveyLocales {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
ZH_CN = "zh-CN",
|
|
10
|
+
ZH_TW = "zh-TW",
|
|
11
|
+
EN_US = "en-US",
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export const enum SurveyLayout {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
HORIZONTAL = "HORIZONTAL",
|
|
16
|
+
VERTICAL = "VERTICAL",
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export const enum QuestionType {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
SINGLE_SELECTION = "SINGLE_SELECTION",
|
|
21
|
+
MULTI_SELECTION = "MULTI_SELECTION",
|
|
22
|
+
FILL_BLANK = "FILL_BLANK",
|
|
23
|
+
SHORT_ANSWER = "SHORT_ANSWER",
|
|
24
|
+
MATRIX = "MATRIX",
|
|
25
|
+
TEXT_TITLE = "TEXT_TITLE",
|
|
26
|
+
EVALUATION = "EVALUATION",
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export const enum EvaluationType {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
STAR = "STAR",
|
|
31
|
+
EXPR = "EXPR"
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export const enum ExprConditionType {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
SCORE = "SCORE",
|
|
35
|
+
ASSIGN = "ASSIGN",
|
|
36
|
+
AUTO = "AUTO"
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
export const enum ExprEvaluationItemType {
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
IF = "IF",
|
|
41
|
+
ELSE = "ELSE"
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
export class ChoiceModel {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
45
|
+
id: string;
|
|
46
|
+
options?: Object;
|
|
47
|
+
text: object;
|
|
48
|
+
|
|
49
|
+
constructor(locale: string) {
|
|
50
|
+
this.id = ChoiceModel.createChoiceId();
|
|
51
|
+
this.text = defaultText(locale);
|
|
52
|
+
this.options = {
|
|
53
|
+
score: null,
|
|
54
|
+
star: false,
|
|
55
|
+
starCount: null
|
|
56
|
+
};
|
|
57
|
+
}
|
|
59
58
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
static createChoiceId(): string {
|
|
60
|
+
return `Choice-${_.now()}-${_.random(0, 9999999)}`;
|
|
61
|
+
}
|
|
63
62
|
}
|
|
64
63
|
|
|
65
64
|
export class LevelRange {
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
min?: Number;
|
|
66
|
+
max?: Number;
|
|
68
67
|
}
|
|
69
68
|
|
|
70
69
|
export class EvaluationItemModel {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
id: string;
|
|
71
|
+
options?: Object;
|
|
72
|
+
text: object;
|
|
74
73
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
constructor(locale: string) {
|
|
75
|
+
this.id = EvaluationItemModel.createChoiceId();
|
|
76
|
+
this.text = defaultText(locale);
|
|
77
|
+
}
|
|
79
78
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
static createChoiceId(): string {
|
|
80
|
+
return `Evaluation-Item-${_.now()}-${_.random(0, 9999999)}`;
|
|
81
|
+
}
|
|
83
82
|
}
|
|
84
83
|
|
|
85
84
|
export class StarEvaluationItemModel extends EvaluationItemModel {
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
level?: Number;
|
|
86
|
+
range?: LevelRange;
|
|
88
87
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
constructor(locale: string) {
|
|
89
|
+
super(locale);
|
|
90
|
+
}
|
|
92
91
|
}
|
|
93
92
|
|
|
94
93
|
export class ExprEvaluationItemModel extends EvaluationItemModel {
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
type: ExprEvaluationItemType;
|
|
95
|
+
conditions?: Array<ExprConditionModel>;
|
|
97
96
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
constructor(locale: string, type: ExprEvaluationItemType) {
|
|
98
|
+
super(locale);
|
|
99
|
+
this.type = type;
|
|
100
|
+
}
|
|
102
101
|
}
|
|
103
102
|
|
|
104
103
|
export class ExprConditionModel {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
104
|
+
type: ExprConditionType;
|
|
105
|
+
expr?: string;
|
|
106
|
+
desc?: string;
|
|
107
|
+
payload?: any;
|
|
109
108
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
constructor(type: ExprConditionType) {
|
|
110
|
+
this.type = type;
|
|
111
|
+
}
|
|
113
112
|
}
|
|
114
113
|
|
|
115
114
|
export class QuestionOptionsModel {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
115
|
+
required: Boolean;
|
|
116
|
+
visible: Boolean;
|
|
117
|
+
layout?: SurveyLayout;
|
|
118
|
+
wordLimit?: Number;
|
|
119
|
+
scoringEnabled?: Boolean;
|
|
120
|
+
starEnabled?: Boolean;
|
|
121
|
+
starMinCount?: Number;
|
|
122
|
+
|
|
123
|
+
constructor(required: Boolean) {
|
|
124
|
+
this.required = required;
|
|
125
|
+
this.visible = true;
|
|
126
|
+
}
|
|
128
127
|
}
|
|
129
128
|
|
|
130
129
|
export class QuestionHeaderModel {
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
number?: Number | null;
|
|
131
|
+
text: Object;
|
|
133
132
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
133
|
+
constructor(locale: string) {
|
|
134
|
+
this.text = defaultText(locale);
|
|
135
|
+
this.number = null;
|
|
136
|
+
}
|
|
138
137
|
}
|
|
139
138
|
|
|
140
139
|
export class SubQuestionModel {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
140
|
+
id: string;
|
|
141
|
+
number?: Number | null;
|
|
142
|
+
text?: Object;
|
|
143
|
+
|
|
144
|
+
constructor(locale: string) {
|
|
145
|
+
this.id = `SubQ-${_.now()}-${_.random(0, 9999999)}`;
|
|
146
|
+
this.text = defaultText(locale);
|
|
147
|
+
this.number = null;
|
|
148
|
+
}
|
|
150
149
|
}
|
|
151
150
|
|
|
152
151
|
export class QuestionExprModel {
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
id: string;
|
|
153
|
+
answer: any;
|
|
155
154
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
155
|
+
constructor(id: string, answer: any) {
|
|
156
|
+
this.id = id;
|
|
157
|
+
this.answer = answer;
|
|
158
|
+
}
|
|
160
159
|
}
|
|
161
160
|
|
|
162
161
|
export class BaseQuestionModel {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
static calculationAllQuestionCount(questions): number {
|
|
219
|
-
let count = 0;
|
|
220
|
-
let exclude = [QuestionType.TEXT_TITLE];
|
|
221
|
-
_.forEach(questions, (question) => {
|
|
222
|
-
if (!_.includes(exclude, question.type)) {
|
|
223
|
-
count++;
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
return count;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
static calculationAllQuestionMaxScore(questions): number {
|
|
230
|
-
let maxScore = 0;
|
|
231
|
-
_.forEach(questions, (question) => {
|
|
232
|
-
maxScore += this.getMaxScore(question);
|
|
233
|
-
});
|
|
234
|
-
return maxScore;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
static setActiveQuestion(currentQuestion, questions): void {
|
|
238
|
-
_.forEach(questions, (question) => {
|
|
239
|
-
if (question.id == currentQuestion.id) {
|
|
240
|
-
question.active = true;
|
|
241
|
-
} else {
|
|
242
|
-
question.active = false;
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
static rebuildQuestionNumber(questions): void {
|
|
248
|
-
let preNumber = 0;
|
|
249
|
-
_.forEach(questions, function (question: BaseQuestionModel) {
|
|
250
|
-
let number;
|
|
251
|
-
if (question.type === QuestionType.TEXT_TITLE) {
|
|
252
|
-
number = QuestionTextTitleModel.getNumber(preNumber, question);
|
|
253
|
-
} else if (question.type === QuestionType.MATRIX) {
|
|
254
|
-
number = QuestionMatrixModel.getNumber(
|
|
255
|
-
preNumber,
|
|
256
|
-
question as QuestionMatrixModel
|
|
162
|
+
id: string;
|
|
163
|
+
type: string;
|
|
164
|
+
options: QuestionOptionsModel;
|
|
165
|
+
header: QuestionHeaderModel;
|
|
166
|
+
|
|
167
|
+
constructor(type: string, locale: string) {
|
|
168
|
+
this.id = BaseQuestionModel.createQuestionId();
|
|
169
|
+
this.type = type;
|
|
170
|
+
this.header = new QuestionHeaderModel(locale);
|
|
171
|
+
this.options = new QuestionOptionsModel(false);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
static getMaxScore(question): number {
|
|
175
|
+
if (question.type == QuestionType.SINGLE_SELECTION) {
|
|
176
|
+
return _.max(
|
|
177
|
+
_.map(question.choices, (choice) =>
|
|
178
|
+
parseFloat(_.get(choice, "options.score", 0) || 0)
|
|
179
|
+
)
|
|
180
|
+
);
|
|
181
|
+
} else if (question.type == QuestionType.MULTI_SELECTION) {
|
|
182
|
+
return _.sumBy(
|
|
183
|
+
question.choices,
|
|
184
|
+
(item) => parseFloat(_.get(item, "options.score") || 0)
|
|
185
|
+
);
|
|
186
|
+
} else if (question.type == QuestionType.MATRIX) {
|
|
187
|
+
let score = _.max(
|
|
188
|
+
_.map(question.choices, (choice) =>
|
|
189
|
+
parseFloat(_.get(choice, "options.score", 0) || 0)
|
|
190
|
+
)
|
|
191
|
+
);
|
|
192
|
+
return score * question.subQuestions.length;
|
|
193
|
+
}
|
|
194
|
+
return 0;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
static createQuestionId(): string {
|
|
198
|
+
return `Q-${_.now()}-${_.random(0, 9999999)}`;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
static getNumber(
|
|
202
|
+
preNumber: number,
|
|
203
|
+
question: BaseQuestionModel
|
|
204
|
+
): null | number {
|
|
205
|
+
return preNumber + 1;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
static refreshSurvey(survey): void {
|
|
209
|
+
this.rebuildQuestionNumber(survey.questions);
|
|
210
|
+
survey.statistics.maxScore = this.calculationAllQuestionMaxScore(
|
|
211
|
+
survey.questions
|
|
212
|
+
);
|
|
213
|
+
survey.statistics.questionCount = this.calculationAllQuestionCount(
|
|
214
|
+
survey.questions
|
|
257
215
|
);
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
static calculationAllQuestionCount(questions): number {
|
|
219
|
+
let count = 0;
|
|
220
|
+
let exclude = [QuestionType.TEXT_TITLE];
|
|
221
|
+
_.forEach(questions, (question) => {
|
|
222
|
+
if (!_.includes(exclude, question.type)) {
|
|
223
|
+
count++;
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
return count;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
static calculationAllQuestionMaxScore(questions): number {
|
|
230
|
+
let maxScore = 0;
|
|
231
|
+
_.forEach(questions, (question) => {
|
|
232
|
+
maxScore += this.getMaxScore(question);
|
|
233
|
+
});
|
|
234
|
+
return maxScore;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
static setActiveQuestion(currentQuestion, questions): void {
|
|
238
|
+
_.forEach(questions, (question) => {
|
|
239
|
+
if (question.id == currentQuestion.id) {
|
|
240
|
+
question.active = true;
|
|
241
|
+
} else {
|
|
242
|
+
question.active = false;
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
static rebuildQuestionNumber(questions): void {
|
|
248
|
+
let preNumber = 0;
|
|
249
|
+
_.forEach(questions, function (question: BaseQuestionModel) {
|
|
250
|
+
let number;
|
|
251
|
+
if (question.type === QuestionType.TEXT_TITLE) {
|
|
252
|
+
number = QuestionTextTitleModel.getNumber(preNumber, question);
|
|
253
|
+
} else if (question.type === QuestionType.MATRIX) {
|
|
254
|
+
number = QuestionMatrixModel.getNumber(
|
|
255
|
+
preNumber,
|
|
256
|
+
question as QuestionMatrixModel
|
|
257
|
+
);
|
|
258
|
+
} else {
|
|
259
|
+
number = BaseQuestionModel.getNumber(preNumber, question);
|
|
260
|
+
}
|
|
261
|
+
question.header.number = number;
|
|
262
|
+
if (number) {
|
|
263
|
+
preNumber = number;
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
export class QuestionCheckBoxModel extends BaseQuestionModel {
|
|
270
|
-
|
|
270
|
+
choices: Array<any>;
|
|
271
271
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
272
|
+
constructor(type: QuestionType, locale: string) {
|
|
273
|
+
super(type, locale);
|
|
274
|
+
this.choices = QuestionFactory.createSelectionQuestionChoices(locale);
|
|
275
|
+
}
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
export class QuestionEvaluationModel extends BaseQuestionModel {
|
|
279
|
-
|
|
279
|
+
evaluationItems: Array<EvaluationItemModel>;
|
|
280
280
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
281
|
+
constructor(type: QuestionType, locale: string) {
|
|
282
|
+
super(type, locale);
|
|
283
|
+
this.evaluationItems = QuestionFactory.createEvaluationItems(locale);
|
|
284
|
+
}
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
export class QuestionTextTitleModel extends BaseQuestionModel {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
288
|
+
constructor(type: QuestionType, locale: string) {
|
|
289
|
+
super(type, locale);
|
|
290
|
+
}
|
|
291
291
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
292
|
+
static getNumber(
|
|
293
|
+
preNumber: number,
|
|
294
|
+
question: BaseQuestionModel
|
|
295
|
+
): null | number {
|
|
296
|
+
return null;
|
|
297
|
+
}
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
export class QuestionFillBlankModel extends BaseQuestionModel {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
301
|
+
constructor(type: QuestionType, locale: string) {
|
|
302
|
+
super(type, locale);
|
|
303
|
+
}
|
|
304
304
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
305
|
+
static getNumber(
|
|
306
|
+
preNumber: number,
|
|
307
|
+
question: BaseQuestionModel
|
|
308
|
+
): null | number {
|
|
309
|
+
return null;
|
|
310
|
+
}
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
export class QuestionShortAnswerModel extends BaseQuestionModel {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
314
|
+
constructor(type: QuestionType, locale: string) {
|
|
315
|
+
super(type, locale);
|
|
316
|
+
}
|
|
317
317
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
318
|
+
getNumber(preNumber: number): null | number {
|
|
319
|
+
return null;
|
|
320
|
+
}
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
export class QuestionSingleSelectionModel extends QuestionCheckBoxModel {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
324
|
+
constructor(type: QuestionType, locale: string) {
|
|
325
|
+
super(type, locale);
|
|
326
|
+
}
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
export class QuestionMulitSelectionModel extends QuestionCheckBoxModel {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
330
|
+
constructor(type: QuestionType, locale: string) {
|
|
331
|
+
super(type, locale);
|
|
332
|
+
}
|
|
333
333
|
}
|
|
334
334
|
|
|
335
335
|
export class QuestionMatrixModel extends BaseQuestionModel {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
336
|
+
choices: Array<any>;
|
|
337
|
+
subQuestions: Array<SubQuestionModel>;
|
|
338
|
+
|
|
339
|
+
constructor(type: QuestionType, locale: string) {
|
|
340
|
+
super(type, locale);
|
|
341
|
+
this.choices = QuestionFactory.createMatrixQuestionChoices(locale);
|
|
342
|
+
this.subQuestions = [QuestionFactory.createSubQuestion(locale)];
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
static getNumber(
|
|
346
|
+
preNumber: number,
|
|
347
|
+
question: QuestionMatrixModel
|
|
348
|
+
): null | number {
|
|
349
|
+
let number = preNumber + 1;
|
|
350
|
+
_.forEach(question.subQuestions, (sq, index) => {
|
|
351
|
+
sq.number = index + 1;
|
|
352
|
+
});
|
|
353
|
+
return number;
|
|
354
|
+
}
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
export interface SurveyOptionsModel {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
358
|
+
primaryLanguage: SurveyLocales;
|
|
359
|
+
languages: SurveyLocales[];
|
|
360
|
+
layout: SurveyLayout;
|
|
361
361
|
}
|
|
362
362
|
|
|
363
363
|
export interface SurveyStatisticsModel {
|
|
364
|
-
|
|
365
|
-
|
|
364
|
+
maxScore: Number;
|
|
365
|
+
questionCount: Number;
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
export interface SurveyModel {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
369
|
+
id: string;
|
|
370
|
+
name: any;
|
|
371
|
+
options: SurveyOptionsModel;
|
|
372
|
+
statistics: SurveyStatisticsModel;
|
|
373
|
+
questions: BaseQuestionModel[];
|
|
374
374
|
}
|
|
375
375
|
|
|
376
376
|
export class ResponseModel {
|
|
377
|
-
|
|
377
|
+
id?: string;
|
|
378
378
|
}
|
|
379
379
|
|
|
380
380
|
export class PlanModel {
|
|
381
|
-
|
|
381
|
+
id?: string;
|
|
382
382
|
}
|
|
383
383
|
|
|
384
384
|
//todo remove
|
|
385
|
-
export class PlanStatisticsModel {
|
|
385
|
+
export class PlanStatisticsModel {
|
|
386
|
+
}
|
|
386
387
|
|
|
387
388
|
//todo remove
|
|
388
|
-
export class ResponseStatisticsModel {
|
|
389
|
+
export class ResponseStatisticsModel {
|
|
390
|
+
}
|