@wg-npm/survey-core 0.3.13 → 0.3.377-8.develop
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 +276 -278
package/dist/survey-core.esm.js
CHANGED
package/package.json
CHANGED
package/src/models.ts
CHANGED
|
@@ -1,390 +1,388 @@
|
|
|
1
1
|
import _ from "lodash";
|
|
2
|
-
import {QuestionFactory} from "./quetion-factory";
|
|
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
|
-
|
|
35
|
+
ASSIGN = "ASSIGN",
|
|
36
|
+
AUTO = "AUTO",
|
|
37
|
+
SCORE = "SCORE",
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
export const enum ExprEvaluationItemType {
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
IF = "IF",
|
|
42
|
+
ELSE = "ELSE",
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
export class ChoiceModel {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
}
|
|
46
|
+
id: string;
|
|
47
|
+
options?: Object;
|
|
48
|
+
text: object;
|
|
58
49
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
50
|
+
constructor(locale: string) {
|
|
51
|
+
this.id = ChoiceModel.createChoiceId();
|
|
52
|
+
this.text = defaultText(locale);
|
|
53
|
+
this.options = {
|
|
54
|
+
score: null,
|
|
55
|
+
star: false,
|
|
56
|
+
starCount: null,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
static createChoiceId(): string {
|
|
61
|
+
return `Choice-${_.now()}-${_.random(0, 9999999)}`;
|
|
62
|
+
}
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
export class LevelRange {
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
min?: Number;
|
|
67
|
+
max?: Number;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
export class EvaluationItemModel {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
id: string;
|
|
72
|
+
options?: Object;
|
|
73
|
+
text: object;
|
|
73
74
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
constructor(locale: string) {
|
|
76
|
+
this.id = EvaluationItemModel.createChoiceId();
|
|
77
|
+
this.text = defaultText(locale);
|
|
78
|
+
}
|
|
78
79
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
static createChoiceId(): string {
|
|
81
|
+
return `Evaluation-Item-${_.now()}-${_.random(0, 9999999)}`;
|
|
82
|
+
}
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
export class StarEvaluationItemModel extends EvaluationItemModel {
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
level?: Number;
|
|
87
|
+
range?: LevelRange;
|
|
87
88
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
constructor(locale: string) {
|
|
90
|
+
super(locale);
|
|
91
|
+
}
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
export class ExprEvaluationItemModel extends EvaluationItemModel {
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
type: ExprEvaluationItemType;
|
|
96
|
+
conditions?: Array<ExprConditionModel>;
|
|
96
97
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
constructor(locale: string, type: ExprEvaluationItemType) {
|
|
99
|
+
super(locale);
|
|
100
|
+
this.type = type;
|
|
101
|
+
}
|
|
101
102
|
}
|
|
102
103
|
|
|
103
104
|
export class ExprConditionModel {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
type: ExprConditionType;
|
|
106
|
+
expr?: string;
|
|
107
|
+
desc?: string;
|
|
108
|
+
payload?: any;
|
|
108
109
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
constructor(type: ExprConditionType) {
|
|
111
|
+
this.type = type;
|
|
112
|
+
}
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
export class QuestionOptionsModel {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
116
|
+
required: Boolean;
|
|
117
|
+
visible: Boolean;
|
|
118
|
+
layout?: SurveyLayout;
|
|
119
|
+
wordLimit?: Number;
|
|
120
|
+
scoringEnabled?: Boolean;
|
|
121
|
+
starEnabled?: Boolean;
|
|
122
|
+
starMinCount?: Number;
|
|
123
|
+
|
|
124
|
+
constructor(required: Boolean) {
|
|
125
|
+
this.required = required;
|
|
126
|
+
this.visible = true;
|
|
127
|
+
}
|
|
127
128
|
}
|
|
128
129
|
|
|
129
130
|
export class QuestionHeaderModel {
|
|
130
|
-
|
|
131
|
-
|
|
131
|
+
number?: Number | null;
|
|
132
|
+
text: Object;
|
|
132
133
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
constructor(locale: string) {
|
|
135
|
+
this.text = defaultText(locale);
|
|
136
|
+
this.number = null;
|
|
137
|
+
}
|
|
137
138
|
}
|
|
138
139
|
|
|
139
140
|
export class SubQuestionModel {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
141
|
+
id: string;
|
|
142
|
+
number?: Number | null;
|
|
143
|
+
text?: Object;
|
|
144
|
+
|
|
145
|
+
constructor(locale: string) {
|
|
146
|
+
this.id = `SubQ-${_.now()}-${_.random(0, 9999999)}`;
|
|
147
|
+
this.text = defaultText(locale);
|
|
148
|
+
this.number = null;
|
|
149
|
+
}
|
|
149
150
|
}
|
|
150
151
|
|
|
151
152
|
export class QuestionExprModel {
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
id: string;
|
|
154
|
+
answer: any;
|
|
154
155
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
constructor(id: string, answer: any) {
|
|
157
|
+
this.id = id;
|
|
158
|
+
this.answer = answer;
|
|
159
|
+
}
|
|
159
160
|
}
|
|
160
161
|
|
|
161
162
|
export class BaseQuestionModel {
|
|
162
|
-
|
|
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
|
-
|
|
163
|
+
id: string;
|
|
164
|
+
type: string;
|
|
165
|
+
options: QuestionOptionsModel;
|
|
166
|
+
header: QuestionHeaderModel;
|
|
167
|
+
|
|
168
|
+
constructor(type: string, locale: string) {
|
|
169
|
+
this.id = BaseQuestionModel.createQuestionId();
|
|
170
|
+
this.type = type;
|
|
171
|
+
this.header = new QuestionHeaderModel(locale);
|
|
172
|
+
this.options = new QuestionOptionsModel(false);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
static getMaxScore(question): number {
|
|
176
|
+
if (question.type == QuestionType.SINGLE_SELECTION) {
|
|
177
|
+
return _.max(
|
|
178
|
+
_.map(question.choices, (choice) =>
|
|
179
|
+
parseFloat(_.get(choice, "options.score", 0) || 0)
|
|
180
|
+
)
|
|
181
|
+
);
|
|
182
|
+
} else if (question.type == QuestionType.MULTI_SELECTION) {
|
|
183
|
+
return _.sumBy(question.choices, (item) =>
|
|
184
|
+
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
|
|
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
|
|
215
257
|
);
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
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
|
-
}
|
|
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 {
|
|
386
|
-
}
|
|
385
|
+
export class PlanStatisticsModel {}
|
|
387
386
|
|
|
388
387
|
//todo remove
|
|
389
|
-
export class ResponseStatisticsModel {
|
|
390
|
-
}
|
|
388
|
+
export class ResponseStatisticsModel {}
|