eat-js-sdk 1.0.30 → 1.0.31
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/eat-prompt-builder.mjs +109 -83
- package/package.json +1 -1
|
@@ -3513,21 +3513,21 @@
|
|
|
3513
3513
|
isResultCorrect: (
|
|
3514
3514
|
/*selectedOptions*/
|
|
3515
3515
|
ctx[4].length === /*correctAnswersLength*/
|
|
3516
|
-
ctx[
|
|
3517
|
-
ctx[
|
|
3516
|
+
ctx[5] && /*isResultCorrect*/
|
|
3517
|
+
ctx[13](
|
|
3518
3518
|
/*selectedOptions*/
|
|
3519
3519
|
ctx[4],
|
|
3520
3520
|
/*correctAnswerIds*/
|
|
3521
|
-
ctx[
|
|
3521
|
+
ctx[6]
|
|
3522
3522
|
)
|
|
3523
3523
|
),
|
|
3524
3524
|
isSkipped: (
|
|
3525
3525
|
/*isSkipped*/
|
|
3526
|
-
ctx[
|
|
3526
|
+
ctx[14]()
|
|
3527
3527
|
),
|
|
3528
3528
|
resultFeedback: (
|
|
3529
3529
|
/*resultFeedback*/
|
|
3530
|
-
ctx[
|
|
3530
|
+
ctx[7]
|
|
3531
3531
|
)
|
|
3532
3532
|
}
|
|
3533
3533
|
});
|
|
@@ -3546,20 +3546,20 @@
|
|
|
3546
3546
|
promptresult_changes.isFeedbackAlert = /*isPreviewModeInteractive*/
|
|
3547
3547
|
ctx2[3] ? false : true;
|
|
3548
3548
|
if (dirty[0] & /*selectedOptions, correctAnswersLength, correctAnswerIds*/
|
|
3549
|
-
|
|
3549
|
+
112)
|
|
3550
3550
|
promptresult_changes.isResultCorrect = /*selectedOptions*/
|
|
3551
3551
|
ctx2[4].length === /*correctAnswersLength*/
|
|
3552
|
-
ctx2[
|
|
3553
|
-
ctx2[
|
|
3552
|
+
ctx2[5] && /*isResultCorrect*/
|
|
3553
|
+
ctx2[13](
|
|
3554
3554
|
/*selectedOptions*/
|
|
3555
3555
|
ctx2[4],
|
|
3556
3556
|
/*correctAnswerIds*/
|
|
3557
|
-
ctx2[
|
|
3557
|
+
ctx2[6]
|
|
3558
3558
|
);
|
|
3559
3559
|
if (dirty[0] & /*resultFeedback*/
|
|
3560
|
-
|
|
3560
|
+
128)
|
|
3561
3561
|
promptresult_changes.resultFeedback = /*resultFeedback*/
|
|
3562
|
-
ctx2[
|
|
3562
|
+
ctx2[7];
|
|
3563
3563
|
promptresult.$set(promptresult_changes);
|
|
3564
3564
|
},
|
|
3565
3565
|
i(local) {
|
|
@@ -3585,7 +3585,7 @@
|
|
|
3585
3585
|
let current;
|
|
3586
3586
|
let each_value = ensure_array_like(Object.values(
|
|
3587
3587
|
/*options*/
|
|
3588
|
-
ctx[
|
|
3588
|
+
ctx[12]
|
|
3589
3589
|
));
|
|
3590
3590
|
let each_blocks = [];
|
|
3591
3591
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
@@ -3624,10 +3624,10 @@
|
|
|
3624
3624
|
attr(div0, "class", div0_class_value);
|
|
3625
3625
|
}
|
|
3626
3626
|
if (dirty[0] & /*correctAnswersLength, selectedOptions, options, isFinished, isPreviewModeInteractive, isPreviewMode, correctAnswerIds, handleOptionClick*/
|
|
3627
|
-
|
|
3627
|
+
36990) {
|
|
3628
3628
|
each_value = ensure_array_like(Object.values(
|
|
3629
3629
|
/*options*/
|
|
3630
|
-
ctx2[
|
|
3630
|
+
ctx2[12]
|
|
3631
3631
|
));
|
|
3632
3632
|
let i;
|
|
3633
3633
|
for (i = 0; i < each_value.length; i += 1) {
|
|
@@ -3772,11 +3772,11 @@
|
|
|
3772
3772
|
const if_blocks = [];
|
|
3773
3773
|
function select_block_type(ctx2, dirty) {
|
|
3774
3774
|
if (dirty[0] & /*correctAnswerIds, isPreviewMode, isPreviewModeInteractive*/
|
|
3775
|
-
|
|
3775
|
+
76)
|
|
3776
3776
|
show_if = null;
|
|
3777
3777
|
if (show_if == null)
|
|
3778
3778
|
show_if = !!/*correctAnswerIds*/
|
|
3779
|
-
(ctx2[
|
|
3779
|
+
(ctx2[6]?.includes(
|
|
3780
3780
|
/*option*/
|
|
3781
3781
|
ctx2[29].id
|
|
3782
3782
|
) || /*isPreviewMode*/
|
|
@@ -3794,7 +3794,7 @@
|
|
|
3794
3794
|
if_block.c();
|
|
3795
3795
|
attr(span, "aria-hidden", "true");
|
|
3796
3796
|
attr(span, "class", span_class_value = /*correctAnswerIds*/
|
|
3797
|
-
(ctx[
|
|
3797
|
+
(ctx[6]?.includes(
|
|
3798
3798
|
/*option*/
|
|
3799
3799
|
ctx[29].id
|
|
3800
3800
|
) || /*isPreviewMode*/
|
|
@@ -3825,8 +3825,8 @@
|
|
|
3825
3825
|
if_block.m(span, null);
|
|
3826
3826
|
}
|
|
3827
3827
|
if (!current || dirty[0] & /*correctAnswerIds, isPreviewMode, isPreviewModeInteractive*/
|
|
3828
|
-
|
|
3829
|
-
(ctx2[
|
|
3828
|
+
76 && span_class_value !== (span_class_value = /*correctAnswerIds*/
|
|
3829
|
+
(ctx2[6]?.includes(
|
|
3830
3830
|
/*option*/
|
|
3831
3831
|
ctx2[29].id
|
|
3832
3832
|
) || /*isPreviewMode*/
|
|
@@ -4041,7 +4041,7 @@
|
|
|
4041
4041
|
/*option*/
|
|
4042
4042
|
ctx[29].id
|
|
4043
4043
|
) && /*correctAnswersLength*/
|
|
4044
|
-
ctx[
|
|
4044
|
+
ctx[5] == 1
|
|
4045
4045
|
);
|
|
4046
4046
|
let t0;
|
|
4047
4047
|
let button;
|
|
@@ -4053,7 +4053,7 @@
|
|
|
4053
4053
|
let show_if_3 = (
|
|
4054
4054
|
/*isFinished*/
|
|
4055
4055
|
ctx[1] && /*correctAnswerIds*/
|
|
4056
|
-
ctx[
|
|
4056
|
+
ctx[6]?.includes(
|
|
4057
4057
|
/*option*/
|
|
4058
4058
|
ctx[29].id
|
|
4059
4059
|
) && (!/*selectedOptions*/
|
|
@@ -4065,7 +4065,7 @@
|
|
|
4065
4065
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
4066
4066
|
ctx[3] && /*selectedOptions*/
|
|
4067
4067
|
ctx[4].length === /*correctAnswersLength*/
|
|
4068
|
-
ctx[
|
|
4068
|
+
ctx[5])
|
|
4069
4069
|
);
|
|
4070
4070
|
let t3;
|
|
4071
4071
|
let commonstringtohtml;
|
|
@@ -4074,7 +4074,7 @@
|
|
|
4074
4074
|
let show_if_2 = (
|
|
4075
4075
|
/*isFinished*/
|
|
4076
4076
|
ctx[1] && /*correctAnswerIds*/
|
|
4077
|
-
ctx[
|
|
4077
|
+
ctx[6]?.includes(
|
|
4078
4078
|
/*option*/
|
|
4079
4079
|
ctx[29].id
|
|
4080
4080
|
) && !/*selectedOptions*/
|
|
@@ -4085,7 +4085,7 @@
|
|
|
4085
4085
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
4086
4086
|
ctx[3] && /*selectedOptions*/
|
|
4087
4087
|
ctx[4].length === /*correctAnswersLength*/
|
|
4088
|
-
ctx[
|
|
4088
|
+
ctx[5])
|
|
4089
4089
|
);
|
|
4090
4090
|
let t5;
|
|
4091
4091
|
let show_if_1 = (
|
|
@@ -4098,12 +4098,12 @@
|
|
|
4098
4098
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
4099
4099
|
ctx[3] && /*selectedOptions*/
|
|
4100
4100
|
ctx[4].length === /*correctAnswersLength*/
|
|
4101
|
-
ctx[
|
|
4101
|
+
ctx[5])
|
|
4102
4102
|
);
|
|
4103
4103
|
let t6;
|
|
4104
4104
|
let show_if = (
|
|
4105
4105
|
/*correctAnswersLength*/
|
|
4106
|
-
ctx[
|
|
4106
|
+
ctx[5] > 1 && (!/*isFinished*/
|
|
4107
4107
|
ctx[1] && !/*isPreviewModeInteractive*/
|
|
4108
4108
|
ctx[3] || /*isFinished*/
|
|
4109
4109
|
ctx[1] && !/*selectedOptions*/
|
|
@@ -4111,7 +4111,7 @@
|
|
|
4111
4111
|
/*option*/
|
|
4112
4112
|
ctx[29].id
|
|
4113
4113
|
) && !/*correctAnswerIds*/
|
|
4114
|
-
ctx[
|
|
4114
|
+
ctx[6].includes(
|
|
4115
4115
|
/*option*/
|
|
4116
4116
|
ctx[29].id
|
|
4117
4117
|
) || /*isPreviewModeInteractive*/
|
|
@@ -4144,7 +4144,7 @@
|
|
|
4144
4144
|
function func() {
|
|
4145
4145
|
return (
|
|
4146
4146
|
/*func*/
|
|
4147
|
-
ctx[
|
|
4147
|
+
ctx[18](
|
|
4148
4148
|
/*option*/
|
|
4149
4149
|
ctx[29]
|
|
4150
4150
|
)
|
|
@@ -4153,7 +4153,7 @@
|
|
|
4153
4153
|
function click_handler() {
|
|
4154
4154
|
return (
|
|
4155
4155
|
/*click_handler*/
|
|
4156
|
-
ctx[
|
|
4156
|
+
ctx[19](
|
|
4157
4157
|
/*option*/
|
|
4158
4158
|
ctx[29]
|
|
4159
4159
|
)
|
|
@@ -4195,11 +4195,11 @@
|
|
|
4195
4195
|
attr(span3, "class", "flex items-center");
|
|
4196
4196
|
attr(span4, "class", "grow flex items-center justify-between");
|
|
4197
4197
|
attr(button, "role", button_role_value = /*correctAnswersLength*/
|
|
4198
|
-
ctx[
|
|
4198
|
+
ctx[5] > 1 ? "checkbox" : null);
|
|
4199
4199
|
attr(button, "tabindex", button_tabindex_value = /*correctAnswersLength*/
|
|
4200
|
-
ctx[
|
|
4200
|
+
ctx[5] > 1 ? 0 : null);
|
|
4201
4201
|
attr(button, "aria-checked", button_aria_checked_value = /*correctAnswersLength*/
|
|
4202
|
-
ctx[
|
|
4202
|
+
ctx[5] > 1 ? (
|
|
4203
4203
|
/*selectedOptions*/
|
|
4204
4204
|
ctx[4].includes(
|
|
4205
4205
|
/*option*/
|
|
@@ -4230,7 +4230,7 @@
|
|
|
4230
4230
|
ctx[29].id
|
|
4231
4231
|
) ? "selected" : "") + " " + /*isFinished*/
|
|
4232
4232
|
(ctx[1] && /*correctAnswerIds*/
|
|
4233
|
-
ctx[
|
|
4233
|
+
ctx[6]?.includes(
|
|
4234
4234
|
/*option*/
|
|
4235
4235
|
ctx[29].id
|
|
4236
4236
|
) && (!/*selectedOptions*/
|
|
@@ -4242,19 +4242,19 @@
|
|
|
4242
4242
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
4243
4243
|
ctx[3] && /*selectedOptions*/
|
|
4244
4244
|
ctx[4].length === /*correctAnswersLength*/
|
|
4245
|
-
ctx[
|
|
4245
|
+
ctx[5]) ? "missing" : "") + " " + /*isFinished*/
|
|
4246
4246
|
((ctx[1] && !/*isPreviewModeInteractive*/
|
|
4247
4247
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
4248
4248
|
ctx[3] && /*selectedOptions*/
|
|
4249
4249
|
ctx[4].length === /*correctAnswersLength*/
|
|
4250
|
-
ctx[
|
|
4250
|
+
ctx[5] || /*isPreviewMode*/
|
|
4251
4251
|
ctx[2] && !/*isPreviewModeInteractive*/
|
|
4252
4252
|
ctx[3] && /*selectedOptions*/
|
|
4253
4253
|
ctx[4].includes(
|
|
4254
4254
|
/*option*/
|
|
4255
4255
|
ctx[29].id
|
|
4256
4256
|
)) && /*correctAnswerIds*/
|
|
4257
|
-
ctx[
|
|
4257
|
+
ctx[6].includes(
|
|
4258
4258
|
/*option*/
|
|
4259
4259
|
ctx[29].id
|
|
4260
4260
|
) ? "correct" : (
|
|
@@ -4263,7 +4263,7 @@
|
|
|
4263
4263
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
4264
4264
|
ctx[3] && /*selectedOptions*/
|
|
4265
4265
|
ctx[4].length === /*correctAnswersLength*/
|
|
4266
|
-
ctx[
|
|
4266
|
+
ctx[5] ? "incorrect" : ""
|
|
4267
4267
|
)) + " " + /*isPreviewModeInteractive*/
|
|
4268
4268
|
(ctx[3] ? "interactive" : ""));
|
|
4269
4269
|
},
|
|
@@ -4301,14 +4301,14 @@
|
|
|
4301
4301
|
p(new_ctx, dirty) {
|
|
4302
4302
|
ctx = new_ctx;
|
|
4303
4303
|
if (dirty[0] & /*isFinished, selectedOptions, correctAnswersLength*/
|
|
4304
|
-
|
|
4304
|
+
50)
|
|
4305
4305
|
show_if_4 = /*isFinished*/
|
|
4306
4306
|
ctx[1] && /*selectedOptions*/
|
|
4307
4307
|
ctx[4].includes(
|
|
4308
4308
|
/*option*/
|
|
4309
4309
|
ctx[29].id
|
|
4310
4310
|
) && /*correctAnswersLength*/
|
|
4311
|
-
ctx[
|
|
4311
|
+
ctx[5] == 1;
|
|
4312
4312
|
if (show_if_4) {
|
|
4313
4313
|
if (if_block0) {
|
|
4314
4314
|
if_block0.p(ctx, dirty);
|
|
@@ -4322,10 +4322,10 @@
|
|
|
4322
4322
|
if_block0 = null;
|
|
4323
4323
|
}
|
|
4324
4324
|
if (dirty[0] & /*isFinished, correctAnswerIds, selectedOptions, isPreviewModeInteractive, correctAnswersLength*/
|
|
4325
|
-
|
|
4325
|
+
122)
|
|
4326
4326
|
show_if_3 = /*isFinished*/
|
|
4327
4327
|
ctx[1] && /*correctAnswerIds*/
|
|
4328
|
-
ctx[
|
|
4328
|
+
ctx[6]?.includes(
|
|
4329
4329
|
/*option*/
|
|
4330
4330
|
ctx[29].id
|
|
4331
4331
|
) && (!/*selectedOptions*/
|
|
@@ -4337,7 +4337,7 @@
|
|
|
4337
4337
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
4338
4338
|
ctx[3] && /*selectedOptions*/
|
|
4339
4339
|
ctx[4].length === /*correctAnswersLength*/
|
|
4340
|
-
ctx[
|
|
4340
|
+
ctx[5]);
|
|
4341
4341
|
if (show_if_3) {
|
|
4342
4342
|
if (if_block1) {
|
|
4343
4343
|
} else {
|
|
@@ -4350,10 +4350,10 @@
|
|
|
4350
4350
|
if_block1 = null;
|
|
4351
4351
|
}
|
|
4352
4352
|
if (dirty[0] & /*isFinished, correctAnswerIds, selectedOptions, isPreviewModeInteractive, correctAnswersLength*/
|
|
4353
|
-
|
|
4353
|
+
122)
|
|
4354
4354
|
show_if_2 = /*isFinished*/
|
|
4355
4355
|
ctx[1] && /*correctAnswerIds*/
|
|
4356
|
-
ctx[
|
|
4356
|
+
ctx[6]?.includes(
|
|
4357
4357
|
/*option*/
|
|
4358
4358
|
ctx[29].id
|
|
4359
4359
|
) && !/*selectedOptions*/
|
|
@@ -4364,11 +4364,11 @@
|
|
|
4364
4364
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
4365
4365
|
ctx[3] && /*selectedOptions*/
|
|
4366
4366
|
ctx[4].length === /*correctAnswersLength*/
|
|
4367
|
-
ctx[
|
|
4367
|
+
ctx[5]);
|
|
4368
4368
|
if (show_if_2) {
|
|
4369
4369
|
if (if_block2) {
|
|
4370
4370
|
if (dirty[0] & /*isFinished, correctAnswerIds, selectedOptions, isPreviewModeInteractive, correctAnswersLength*/
|
|
4371
|
-
|
|
4371
|
+
122) {
|
|
4372
4372
|
transition_in(if_block2, 1);
|
|
4373
4373
|
}
|
|
4374
4374
|
} else {
|
|
@@ -4385,7 +4385,7 @@
|
|
|
4385
4385
|
check_outros();
|
|
4386
4386
|
}
|
|
4387
4387
|
if (dirty[0] & /*selectedOptions, isFinished, isPreviewModeInteractive, correctAnswersLength*/
|
|
4388
|
-
|
|
4388
|
+
58)
|
|
4389
4389
|
show_if_1 = /*selectedOptions*/
|
|
4390
4390
|
ctx[4].includes(
|
|
4391
4391
|
/*option*/
|
|
@@ -4395,12 +4395,12 @@
|
|
|
4395
4395
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
4396
4396
|
ctx[3] && /*selectedOptions*/
|
|
4397
4397
|
ctx[4].length === /*correctAnswersLength*/
|
|
4398
|
-
ctx[
|
|
4398
|
+
ctx[5]);
|
|
4399
4399
|
if (show_if_1) {
|
|
4400
4400
|
if (if_block3) {
|
|
4401
4401
|
if_block3.p(ctx, dirty);
|
|
4402
4402
|
if (dirty[0] & /*selectedOptions, isFinished, isPreviewModeInteractive, correctAnswersLength*/
|
|
4403
|
-
|
|
4403
|
+
58) {
|
|
4404
4404
|
transition_in(if_block3, 1);
|
|
4405
4405
|
}
|
|
4406
4406
|
} else {
|
|
@@ -4417,9 +4417,9 @@
|
|
|
4417
4417
|
check_outros();
|
|
4418
4418
|
}
|
|
4419
4419
|
if (dirty[0] & /*correctAnswersLength, isFinished, isPreviewModeInteractive, selectedOptions, correctAnswerIds*/
|
|
4420
|
-
|
|
4420
|
+
122)
|
|
4421
4421
|
show_if = /*correctAnswersLength*/
|
|
4422
|
-
ctx[
|
|
4422
|
+
ctx[5] > 1 && (!/*isFinished*/
|
|
4423
4423
|
ctx[1] && !/*isPreviewModeInteractive*/
|
|
4424
4424
|
ctx[3] || /*isFinished*/
|
|
4425
4425
|
ctx[1] && !/*selectedOptions*/
|
|
@@ -4427,7 +4427,7 @@
|
|
|
4427
4427
|
/*option*/
|
|
4428
4428
|
ctx[29].id
|
|
4429
4429
|
) && !/*correctAnswerIds*/
|
|
4430
|
-
ctx[
|
|
4430
|
+
ctx[6].includes(
|
|
4431
4431
|
/*option*/
|
|
4432
4432
|
ctx[29].id
|
|
4433
4433
|
) || /*isPreviewModeInteractive*/
|
|
@@ -4436,7 +4436,7 @@
|
|
|
4436
4436
|
if (if_block4) {
|
|
4437
4437
|
if_block4.p(ctx, dirty);
|
|
4438
4438
|
if (dirty[0] & /*correctAnswersLength, isFinished, isPreviewModeInteractive, selectedOptions, correctAnswerIds*/
|
|
4439
|
-
|
|
4439
|
+
122) {
|
|
4440
4440
|
transition_in(if_block4, 1);
|
|
4441
4441
|
}
|
|
4442
4442
|
} else {
|
|
@@ -4453,18 +4453,18 @@
|
|
|
4453
4453
|
check_outros();
|
|
4454
4454
|
}
|
|
4455
4455
|
if (!current || dirty[0] & /*correctAnswersLength*/
|
|
4456
|
-
|
|
4457
|
-
ctx[
|
|
4456
|
+
32 && button_role_value !== (button_role_value = /*correctAnswersLength*/
|
|
4457
|
+
ctx[5] > 1 ? "checkbox" : null)) {
|
|
4458
4458
|
attr(button, "role", button_role_value);
|
|
4459
4459
|
}
|
|
4460
4460
|
if (!current || dirty[0] & /*correctAnswersLength*/
|
|
4461
|
-
|
|
4462
|
-
ctx[
|
|
4461
|
+
32 && button_tabindex_value !== (button_tabindex_value = /*correctAnswersLength*/
|
|
4462
|
+
ctx[5] > 1 ? 0 : null)) {
|
|
4463
4463
|
attr(button, "tabindex", button_tabindex_value);
|
|
4464
4464
|
}
|
|
4465
4465
|
if (!current || dirty[0] & /*correctAnswersLength, selectedOptions*/
|
|
4466
|
-
|
|
4467
|
-
ctx[
|
|
4466
|
+
48 && button_aria_checked_value !== (button_aria_checked_value = /*correctAnswersLength*/
|
|
4467
|
+
ctx[5] > 1 ? (
|
|
4468
4468
|
/*selectedOptions*/
|
|
4469
4469
|
ctx[4].includes(
|
|
4470
4470
|
/*option*/
|
|
@@ -4480,7 +4480,7 @@
|
|
|
4480
4480
|
attr(button, "aria-disabled", button_aria_disabled_value);
|
|
4481
4481
|
}
|
|
4482
4482
|
if (!current || dirty[0] & /*isFinished, isPreviewModeInteractive, selectedOptions, isPreviewMode, correctAnswerIds, correctAnswersLength*/
|
|
4483
|
-
|
|
4483
|
+
126 && button_aria_label_value !== (button_aria_label_value = `${(!/*isFinished*/
|
|
4484
4484
|
ctx[1] || /*isPreviewModeInteractive*/
|
|
4485
4485
|
ctx[3]) && /*selectedOptions*/
|
|
4486
4486
|
ctx[4].includes(
|
|
@@ -4496,7 +4496,7 @@
|
|
|
4496
4496
|
attr(button, "aria-label", button_aria_label_value);
|
|
4497
4497
|
}
|
|
4498
4498
|
if (!current || dirty[0] & /*isFinished, isPreviewModeInteractive, selectedOptions, correctAnswerIds, correctAnswersLength, isPreviewMode*/
|
|
4499
|
-
|
|
4499
|
+
126 && button_class_value !== (button_class_value = "group text-left btn-mcq-option " + (!/*isFinished*/
|
|
4500
4500
|
ctx[1] || /*isPreviewModeInteractive*/
|
|
4501
4501
|
ctx[3] ? "active:raw-focus-ring-by" : "finished") + " " + /*selectedOptions*/
|
|
4502
4502
|
(ctx[4].includes(
|
|
@@ -4504,7 +4504,7 @@
|
|
|
4504
4504
|
ctx[29].id
|
|
4505
4505
|
) ? "selected" : "") + " " + /*isFinished*/
|
|
4506
4506
|
(ctx[1] && /*correctAnswerIds*/
|
|
4507
|
-
ctx[
|
|
4507
|
+
ctx[6]?.includes(
|
|
4508
4508
|
/*option*/
|
|
4509
4509
|
ctx[29].id
|
|
4510
4510
|
) && (!/*selectedOptions*/
|
|
@@ -4516,19 +4516,19 @@
|
|
|
4516
4516
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
4517
4517
|
ctx[3] && /*selectedOptions*/
|
|
4518
4518
|
ctx[4].length === /*correctAnswersLength*/
|
|
4519
|
-
ctx[
|
|
4519
|
+
ctx[5]) ? "missing" : "") + " " + /*isFinished*/
|
|
4520
4520
|
((ctx[1] && !/*isPreviewModeInteractive*/
|
|
4521
4521
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
4522
4522
|
ctx[3] && /*selectedOptions*/
|
|
4523
4523
|
ctx[4].length === /*correctAnswersLength*/
|
|
4524
|
-
ctx[
|
|
4524
|
+
ctx[5] || /*isPreviewMode*/
|
|
4525
4525
|
ctx[2] && !/*isPreviewModeInteractive*/
|
|
4526
4526
|
ctx[3] && /*selectedOptions*/
|
|
4527
4527
|
ctx[4].includes(
|
|
4528
4528
|
/*option*/
|
|
4529
4529
|
ctx[29].id
|
|
4530
4530
|
)) && /*correctAnswerIds*/
|
|
4531
|
-
ctx[
|
|
4531
|
+
ctx[6].includes(
|
|
4532
4532
|
/*option*/
|
|
4533
4533
|
ctx[29].id
|
|
4534
4534
|
) ? "correct" : (
|
|
@@ -4537,7 +4537,7 @@
|
|
|
4537
4537
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
4538
4538
|
ctx[3] && /*selectedOptions*/
|
|
4539
4539
|
ctx[4].length === /*correctAnswersLength*/
|
|
4540
|
-
ctx[
|
|
4540
|
+
ctx[5] ? "incorrect" : ""
|
|
4541
4541
|
)) + " " + /*isPreviewModeInteractive*/
|
|
4542
4542
|
(ctx[3] ? "interactive" : ""))) {
|
|
4543
4543
|
attr(button, "class", button_class_value);
|
|
@@ -4587,11 +4587,11 @@
|
|
|
4587
4587
|
let current;
|
|
4588
4588
|
let if_block0 = (
|
|
4589
4589
|
/*isFeedbackShown*/
|
|
4590
|
-
ctx[
|
|
4590
|
+
ctx[8] && create_if_block_82(ctx)
|
|
4591
4591
|
);
|
|
4592
4592
|
let if_block1 = (
|
|
4593
4593
|
/*options*/
|
|
4594
|
-
ctx[
|
|
4594
|
+
ctx[12] && create_if_block5(ctx)
|
|
4595
4595
|
);
|
|
4596
4596
|
return {
|
|
4597
4597
|
c() {
|
|
@@ -4617,12 +4617,30 @@
|
|
|
4617
4617
|
p(ctx2, dirty) {
|
|
4618
4618
|
if (
|
|
4619
4619
|
/*isFeedbackShown*/
|
|
4620
|
-
ctx2[
|
|
4621
|
-
)
|
|
4622
|
-
if_block0
|
|
4620
|
+
ctx2[8]
|
|
4621
|
+
) {
|
|
4622
|
+
if (if_block0) {
|
|
4623
|
+
if_block0.p(ctx2, dirty);
|
|
4624
|
+
if (dirty[0] & /*isFeedbackShown*/
|
|
4625
|
+
256) {
|
|
4626
|
+
transition_in(if_block0, 1);
|
|
4627
|
+
}
|
|
4628
|
+
} else {
|
|
4629
|
+
if_block0 = create_if_block_82(ctx2);
|
|
4630
|
+
if_block0.c();
|
|
4631
|
+
transition_in(if_block0, 1);
|
|
4632
|
+
if_block0.m(div, null);
|
|
4633
|
+
}
|
|
4634
|
+
} else if (if_block0) {
|
|
4635
|
+
group_outros();
|
|
4636
|
+
transition_out(if_block0, 1, 1, () => {
|
|
4637
|
+
if_block0 = null;
|
|
4638
|
+
});
|
|
4639
|
+
check_outros();
|
|
4640
|
+
}
|
|
4623
4641
|
if (
|
|
4624
4642
|
/*options*/
|
|
4625
|
-
ctx2[
|
|
4643
|
+
ctx2[12]
|
|
4626
4644
|
)
|
|
4627
4645
|
if_block1.p(ctx2, dirty);
|
|
4628
4646
|
},
|
|
@@ -4658,16 +4676,16 @@
|
|
|
4658
4676
|
props: {
|
|
4659
4677
|
rubric: (
|
|
4660
4678
|
/*rubric*/
|
|
4661
|
-
ctx[
|
|
4679
|
+
ctx[9].text
|
|
4662
4680
|
),
|
|
4663
4681
|
prompt: (
|
|
4664
4682
|
/*prompt*/
|
|
4665
|
-
ctx[
|
|
4683
|
+
ctx[11]
|
|
4666
4684
|
),
|
|
4667
4685
|
interactionType: INTERACTION_TYPE_MCQ,
|
|
4668
4686
|
stimulus: (
|
|
4669
4687
|
/*stimulus*/
|
|
4670
|
-
ctx[
|
|
4688
|
+
ctx[10]
|
|
4671
4689
|
),
|
|
4672
4690
|
$$slots: { default: [create_default_slot] },
|
|
4673
4691
|
$$scope: { ctx }
|
|
@@ -4683,8 +4701,8 @@
|
|
|
4683
4701
|
},
|
|
4684
4702
|
p(ctx2, dirty) {
|
|
4685
4703
|
const promptbody_changes = {};
|
|
4686
|
-
if (dirty[0] & /*correctAnswersLength, selectedOptions, isFinished, isPreviewModeInteractive, isPreviewMode, correctAnswerIds, isDataSaving, resultFeedback*/
|
|
4687
|
-
|
|
4704
|
+
if (dirty[0] & /*correctAnswersLength, selectedOptions, isFinished, isPreviewModeInteractive, isPreviewMode, correctAnswerIds, isDataSaving, resultFeedback, isFeedbackShown*/
|
|
4705
|
+
511 | dirty[1] & /*$$scope*/
|
|
4688
4706
|
2) {
|
|
4689
4707
|
promptbody_changes.$$scope = { dirty, ctx: ctx2 };
|
|
4690
4708
|
}
|
|
@@ -4706,6 +4724,7 @@
|
|
|
4706
4724
|
};
|
|
4707
4725
|
}
|
|
4708
4726
|
function instance5($$self, $$props, $$invalidate) {
|
|
4727
|
+
let isFeedbackShown;
|
|
4709
4728
|
let { sessionData } = $$props;
|
|
4710
4729
|
let { isDataSaving } = $$props;
|
|
4711
4730
|
let { isFinished = false } = $$props;
|
|
@@ -4730,7 +4749,7 @@
|
|
|
4730
4749
|
}
|
|
4731
4750
|
const getFeedback = () => {
|
|
4732
4751
|
const { correct: correctFeedback, incorrect: incorrectFeedback } = feedback;
|
|
4733
|
-
$$invalidate(
|
|
4752
|
+
$$invalidate(7, resultFeedback = isResultCorrect(selectedOptions, correctAnswerIds) ? correctFeedback : incorrectFeedback);
|
|
4734
4753
|
};
|
|
4735
4754
|
const isResultCorrect = (selectedOptions2, correctAnswerIds2) => {
|
|
4736
4755
|
return selectedOptions2.length > 0 && correctAnswerIds2.every((option) => selectedOptions2.includes(option));
|
|
@@ -4787,8 +4806,8 @@
|
|
|
4787
4806
|
});
|
|
4788
4807
|
}
|
|
4789
4808
|
if (isPreviewModeInteractive) {
|
|
4790
|
-
interactiveHasAnswered = true;
|
|
4791
|
-
$$invalidate(
|
|
4809
|
+
$$invalidate(17, interactiveHasAnswered = true);
|
|
4810
|
+
$$invalidate(7, resultFeedback = null);
|
|
4792
4811
|
if (correctAnswersLength === selectedOptions.length) {
|
|
4793
4812
|
setTimeout(
|
|
4794
4813
|
() => {
|
|
@@ -4799,7 +4818,6 @@
|
|
|
4799
4818
|
}
|
|
4800
4819
|
}
|
|
4801
4820
|
};
|
|
4802
|
-
const isFeedbackShown = isFinished && !isPreviewModeInteractive && (!isResultCorrect(selectedOptions, correctAnswerIds) || !selectedOptions.length) || isPreviewModeInteractive && (selectedOptions.length === correctAnswersLength || !selectedOptions.length && interactiveHasAnswered);
|
|
4803
4821
|
const func = (option) => {
|
|
4804
4822
|
if (isFinished && !isPreviewMode && !isPreviewModeInteractive) {
|
|
4805
4823
|
if (correctAnswerIds.includes(option.id)) {
|
|
@@ -4833,15 +4851,23 @@
|
|
|
4833
4851
|
if ("isPreviewModeInteractive" in $$props2)
|
|
4834
4852
|
$$invalidate(3, isPreviewModeInteractive = $$props2.isPreviewModeInteractive);
|
|
4835
4853
|
};
|
|
4854
|
+
$$self.$$.update = () => {
|
|
4855
|
+
if ($$self.$$.dirty[0] & /*isFinished, isPreviewModeInteractive, selectedOptions, correctAnswerIds, correctAnswersLength, interactiveHasAnswered*/
|
|
4856
|
+
131194) {
|
|
4857
|
+
$:
|
|
4858
|
+
$$invalidate(8, isFeedbackShown = isFinished && !isPreviewModeInteractive && (!isResultCorrect(selectedOptions, correctAnswerIds) || !selectedOptions.length) || isPreviewModeInteractive && (selectedOptions.length === correctAnswersLength || !selectedOptions.length && interactiveHasAnswered));
|
|
4859
|
+
}
|
|
4860
|
+
};
|
|
4836
4861
|
return [
|
|
4837
4862
|
isDataSaving,
|
|
4838
4863
|
isFinished,
|
|
4839
4864
|
isPreviewMode,
|
|
4840
4865
|
isPreviewModeInteractive,
|
|
4841
4866
|
selectedOptions,
|
|
4842
|
-
resultFeedback,
|
|
4843
4867
|
correctAnswersLength,
|
|
4844
4868
|
correctAnswerIds,
|
|
4869
|
+
resultFeedback,
|
|
4870
|
+
isFeedbackShown,
|
|
4845
4871
|
rubric,
|
|
4846
4872
|
stimulus,
|
|
4847
4873
|
prompt,
|
|
@@ -4849,8 +4875,8 @@
|
|
|
4849
4875
|
isResultCorrect,
|
|
4850
4876
|
isSkipped,
|
|
4851
4877
|
handleOptionClick,
|
|
4852
|
-
isFeedbackShown,
|
|
4853
4878
|
sessionData,
|
|
4879
|
+
interactiveHasAnswered,
|
|
4854
4880
|
func,
|
|
4855
4881
|
click_handler
|
|
4856
4882
|
];
|