eat-js-sdk 0.0.54 → 0.0.56
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 +170 -172
- package/package.json +1 -1
|
@@ -2808,51 +2808,6 @@
|
|
|
2808
2808
|
}
|
|
2809
2809
|
};
|
|
2810
2810
|
}
|
|
2811
|
-
function create_default_slot(ctx) {
|
|
2812
|
-
let if_block_anchor;
|
|
2813
|
-
let current;
|
|
2814
|
-
let if_block = (
|
|
2815
|
-
/*options*/
|
|
2816
|
-
ctx[8] && create_if_block_14(ctx)
|
|
2817
|
-
);
|
|
2818
|
-
return {
|
|
2819
|
-
c() {
|
|
2820
|
-
if (if_block)
|
|
2821
|
-
if_block.c();
|
|
2822
|
-
if_block_anchor = empty();
|
|
2823
|
-
},
|
|
2824
|
-
m(target, anchor) {
|
|
2825
|
-
if (if_block)
|
|
2826
|
-
if_block.m(target, anchor);
|
|
2827
|
-
insert(target, if_block_anchor, anchor);
|
|
2828
|
-
current = true;
|
|
2829
|
-
},
|
|
2830
|
-
p(ctx2, dirty) {
|
|
2831
|
-
if (
|
|
2832
|
-
/*options*/
|
|
2833
|
-
ctx2[8]
|
|
2834
|
-
)
|
|
2835
|
-
if_block.p(ctx2, dirty);
|
|
2836
|
-
},
|
|
2837
|
-
i(local) {
|
|
2838
|
-
if (current)
|
|
2839
|
-
return;
|
|
2840
|
-
transition_in(if_block);
|
|
2841
|
-
current = true;
|
|
2842
|
-
},
|
|
2843
|
-
o(local) {
|
|
2844
|
-
transition_out(if_block);
|
|
2845
|
-
current = false;
|
|
2846
|
-
},
|
|
2847
|
-
d(detaching) {
|
|
2848
|
-
if (detaching) {
|
|
2849
|
-
detach(if_block_anchor);
|
|
2850
|
-
}
|
|
2851
|
-
if (if_block)
|
|
2852
|
-
if_block.d(detaching);
|
|
2853
|
-
}
|
|
2854
|
-
};
|
|
2855
|
-
}
|
|
2856
2811
|
function create_if_block4(ctx) {
|
|
2857
2812
|
let promptresult;
|
|
2858
2813
|
let current;
|
|
@@ -2903,10 +2858,92 @@
|
|
|
2903
2858
|
}
|
|
2904
2859
|
};
|
|
2905
2860
|
}
|
|
2861
|
+
function create_default_slot(ctx) {
|
|
2862
|
+
let t2;
|
|
2863
|
+
let if_block1_anchor;
|
|
2864
|
+
let current;
|
|
2865
|
+
let if_block0 = (
|
|
2866
|
+
/*options*/
|
|
2867
|
+
ctx[8] && create_if_block_14(ctx)
|
|
2868
|
+
);
|
|
2869
|
+
let if_block1 = (
|
|
2870
|
+
/*isFinished*/
|
|
2871
|
+
ctx[1] && create_if_block4(ctx)
|
|
2872
|
+
);
|
|
2873
|
+
return {
|
|
2874
|
+
c() {
|
|
2875
|
+
if (if_block0)
|
|
2876
|
+
if_block0.c();
|
|
2877
|
+
t2 = space();
|
|
2878
|
+
if (if_block1)
|
|
2879
|
+
if_block1.c();
|
|
2880
|
+
if_block1_anchor = empty();
|
|
2881
|
+
},
|
|
2882
|
+
m(target, anchor) {
|
|
2883
|
+
if (if_block0)
|
|
2884
|
+
if_block0.m(target, anchor);
|
|
2885
|
+
insert(target, t2, anchor);
|
|
2886
|
+
if (if_block1)
|
|
2887
|
+
if_block1.m(target, anchor);
|
|
2888
|
+
insert(target, if_block1_anchor, anchor);
|
|
2889
|
+
current = true;
|
|
2890
|
+
},
|
|
2891
|
+
p(ctx2, dirty) {
|
|
2892
|
+
if (
|
|
2893
|
+
/*options*/
|
|
2894
|
+
ctx2[8]
|
|
2895
|
+
)
|
|
2896
|
+
if_block0.p(ctx2, dirty);
|
|
2897
|
+
if (
|
|
2898
|
+
/*isFinished*/
|
|
2899
|
+
ctx2[1]
|
|
2900
|
+
) {
|
|
2901
|
+
if (if_block1) {
|
|
2902
|
+
if_block1.p(ctx2, dirty);
|
|
2903
|
+
if (dirty & /*isFinished*/
|
|
2904
|
+
2) {
|
|
2905
|
+
transition_in(if_block1, 1);
|
|
2906
|
+
}
|
|
2907
|
+
} else {
|
|
2908
|
+
if_block1 = create_if_block4(ctx2);
|
|
2909
|
+
if_block1.c();
|
|
2910
|
+
transition_in(if_block1, 1);
|
|
2911
|
+
if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
|
|
2912
|
+
}
|
|
2913
|
+
} else if (if_block1) {
|
|
2914
|
+
group_outros();
|
|
2915
|
+
transition_out(if_block1, 1, 1, () => {
|
|
2916
|
+
if_block1 = null;
|
|
2917
|
+
});
|
|
2918
|
+
check_outros();
|
|
2919
|
+
}
|
|
2920
|
+
},
|
|
2921
|
+
i(local) {
|
|
2922
|
+
if (current)
|
|
2923
|
+
return;
|
|
2924
|
+
transition_in(if_block0);
|
|
2925
|
+
transition_in(if_block1);
|
|
2926
|
+
current = true;
|
|
2927
|
+
},
|
|
2928
|
+
o(local) {
|
|
2929
|
+
transition_out(if_block0);
|
|
2930
|
+
transition_out(if_block1);
|
|
2931
|
+
current = false;
|
|
2932
|
+
},
|
|
2933
|
+
d(detaching) {
|
|
2934
|
+
if (detaching) {
|
|
2935
|
+
detach(t2);
|
|
2936
|
+
detach(if_block1_anchor);
|
|
2937
|
+
}
|
|
2938
|
+
if (if_block0)
|
|
2939
|
+
if_block0.d(detaching);
|
|
2940
|
+
if (if_block1)
|
|
2941
|
+
if_block1.d(detaching);
|
|
2942
|
+
}
|
|
2943
|
+
};
|
|
2944
|
+
}
|
|
2906
2945
|
function create_fragment6(ctx) {
|
|
2907
2946
|
let promptbody;
|
|
2908
|
-
let t2;
|
|
2909
|
-
let if_block_anchor;
|
|
2910
2947
|
let current;
|
|
2911
2948
|
promptbody = new PromptBody_default({
|
|
2912
2949
|
props: {
|
|
@@ -2927,77 +2964,34 @@
|
|
|
2927
2964
|
$$scope: { ctx }
|
|
2928
2965
|
}
|
|
2929
2966
|
});
|
|
2930
|
-
let if_block = (
|
|
2931
|
-
/*isFinished*/
|
|
2932
|
-
ctx[1] && create_if_block4(ctx)
|
|
2933
|
-
);
|
|
2934
2967
|
return {
|
|
2935
2968
|
c() {
|
|
2936
2969
|
create_component(promptbody.$$.fragment);
|
|
2937
|
-
t2 = space();
|
|
2938
|
-
if (if_block)
|
|
2939
|
-
if_block.c();
|
|
2940
|
-
if_block_anchor = empty();
|
|
2941
2970
|
},
|
|
2942
2971
|
m(target, anchor) {
|
|
2943
2972
|
mount_component(promptbody, target, anchor);
|
|
2944
|
-
insert(target, t2, anchor);
|
|
2945
|
-
if (if_block)
|
|
2946
|
-
if_block.m(target, anchor);
|
|
2947
|
-
insert(target, if_block_anchor, anchor);
|
|
2948
2973
|
current = true;
|
|
2949
2974
|
},
|
|
2950
2975
|
p(ctx2, [dirty]) {
|
|
2951
2976
|
const promptbody_changes = {};
|
|
2952
|
-
if (dirty & /*$$scope,
|
|
2953
|
-
|
|
2977
|
+
if (dirty & /*$$scope, isResultCorrect, resultFeedback, isFinished, selectedOption, isDataSaving*/
|
|
2978
|
+
2097183) {
|
|
2954
2979
|
promptbody_changes.$$scope = { dirty, ctx: ctx2 };
|
|
2955
2980
|
}
|
|
2956
2981
|
promptbody.$set(promptbody_changes);
|
|
2957
|
-
if (
|
|
2958
|
-
/*isFinished*/
|
|
2959
|
-
ctx2[1]
|
|
2960
|
-
) {
|
|
2961
|
-
if (if_block) {
|
|
2962
|
-
if_block.p(ctx2, dirty);
|
|
2963
|
-
if (dirty & /*isFinished*/
|
|
2964
|
-
2) {
|
|
2965
|
-
transition_in(if_block, 1);
|
|
2966
|
-
}
|
|
2967
|
-
} else {
|
|
2968
|
-
if_block = create_if_block4(ctx2);
|
|
2969
|
-
if_block.c();
|
|
2970
|
-
transition_in(if_block, 1);
|
|
2971
|
-
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
2972
|
-
}
|
|
2973
|
-
} else if (if_block) {
|
|
2974
|
-
group_outros();
|
|
2975
|
-
transition_out(if_block, 1, 1, () => {
|
|
2976
|
-
if_block = null;
|
|
2977
|
-
});
|
|
2978
|
-
check_outros();
|
|
2979
|
-
}
|
|
2980
2982
|
},
|
|
2981
2983
|
i(local) {
|
|
2982
2984
|
if (current)
|
|
2983
2985
|
return;
|
|
2984
2986
|
transition_in(promptbody.$$.fragment, local);
|
|
2985
|
-
transition_in(if_block);
|
|
2986
2987
|
current = true;
|
|
2987
2988
|
},
|
|
2988
2989
|
o(local) {
|
|
2989
2990
|
transition_out(promptbody.$$.fragment, local);
|
|
2990
|
-
transition_out(if_block);
|
|
2991
2991
|
current = false;
|
|
2992
2992
|
},
|
|
2993
2993
|
d(detaching) {
|
|
2994
|
-
if (detaching) {
|
|
2995
|
-
detach(t2);
|
|
2996
|
-
detach(if_block_anchor);
|
|
2997
|
-
}
|
|
2998
2994
|
destroy_component(promptbody, detaching);
|
|
2999
|
-
if (if_block)
|
|
3000
|
-
if_block.d(detaching);
|
|
3001
2995
|
}
|
|
3002
2996
|
};
|
|
3003
2997
|
}
|
|
@@ -3025,9 +3019,9 @@
|
|
|
3025
3019
|
$$invalidate(4, resultFeedback = feedbackData[0].feedback || resultFeedback);
|
|
3026
3020
|
};
|
|
3027
3021
|
if (isFinished) {
|
|
3028
|
-
getFeedback();
|
|
3029
3022
|
const { answerId, hasAnswer } = scoringMetadata;
|
|
3030
3023
|
selectedOption = answerId && hasAnswer ? answerId : selectedOption;
|
|
3024
|
+
getFeedback();
|
|
3031
3025
|
}
|
|
3032
3026
|
const handleOptionClick = (optionId, option) => {
|
|
3033
3027
|
if (isDataSaving || optionId === selectedOption || isFinished && !isPreviewModeInteractive)
|
|
@@ -3449,38 +3443,6 @@
|
|
|
3449
3443
|
}
|
|
3450
3444
|
};
|
|
3451
3445
|
}
|
|
3452
|
-
function create_default_slot2(ctx) {
|
|
3453
|
-
let if_block_anchor;
|
|
3454
|
-
function select_block_type(ctx2, dirty) {
|
|
3455
|
-
if (
|
|
3456
|
-
/*typeinType*/
|
|
3457
|
-
ctx2[11] === TYPEIN_TYPE_SHORT
|
|
3458
|
-
)
|
|
3459
|
-
return create_if_block_24;
|
|
3460
|
-
return create_else_block_1;
|
|
3461
|
-
}
|
|
3462
|
-
let current_block_type = select_block_type(ctx, [-1, -1]);
|
|
3463
|
-
let if_block = current_block_type(ctx);
|
|
3464
|
-
return {
|
|
3465
|
-
c() {
|
|
3466
|
-
if_block.c();
|
|
3467
|
-
if_block_anchor = empty();
|
|
3468
|
-
},
|
|
3469
|
-
m(target, anchor) {
|
|
3470
|
-
if_block.m(target, anchor);
|
|
3471
|
-
insert(target, if_block_anchor, anchor);
|
|
3472
|
-
},
|
|
3473
|
-
p(ctx2, dirty) {
|
|
3474
|
-
if_block.p(ctx2, dirty);
|
|
3475
|
-
},
|
|
3476
|
-
d(detaching) {
|
|
3477
|
-
if (detaching) {
|
|
3478
|
-
detach(if_block_anchor);
|
|
3479
|
-
}
|
|
3480
|
-
if_block.d(detaching);
|
|
3481
|
-
}
|
|
3482
|
-
};
|
|
3483
|
-
}
|
|
3484
3446
|
function create_if_block5(ctx) {
|
|
3485
3447
|
let div;
|
|
3486
3448
|
let span0;
|
|
@@ -3666,10 +3628,89 @@
|
|
|
3666
3628
|
}
|
|
3667
3629
|
};
|
|
3668
3630
|
}
|
|
3631
|
+
function create_default_slot2(ctx) {
|
|
3632
|
+
let t2;
|
|
3633
|
+
let if_block1_anchor;
|
|
3634
|
+
let current;
|
|
3635
|
+
function select_block_type(ctx2, dirty) {
|
|
3636
|
+
if (
|
|
3637
|
+
/*typeinType*/
|
|
3638
|
+
ctx2[11] === TYPEIN_TYPE_SHORT
|
|
3639
|
+
)
|
|
3640
|
+
return create_if_block_24;
|
|
3641
|
+
return create_else_block_1;
|
|
3642
|
+
}
|
|
3643
|
+
let current_block_type = select_block_type(ctx, [-1, -1]);
|
|
3644
|
+
let if_block0 = current_block_type(ctx);
|
|
3645
|
+
let if_block1 = (
|
|
3646
|
+
/*isFinished*/
|
|
3647
|
+
ctx[1] && create_if_block5(ctx)
|
|
3648
|
+
);
|
|
3649
|
+
return {
|
|
3650
|
+
c() {
|
|
3651
|
+
if_block0.c();
|
|
3652
|
+
t2 = space();
|
|
3653
|
+
if (if_block1)
|
|
3654
|
+
if_block1.c();
|
|
3655
|
+
if_block1_anchor = empty();
|
|
3656
|
+
},
|
|
3657
|
+
m(target, anchor) {
|
|
3658
|
+
if_block0.m(target, anchor);
|
|
3659
|
+
insert(target, t2, anchor);
|
|
3660
|
+
if (if_block1)
|
|
3661
|
+
if_block1.m(target, anchor);
|
|
3662
|
+
insert(target, if_block1_anchor, anchor);
|
|
3663
|
+
current = true;
|
|
3664
|
+
},
|
|
3665
|
+
p(ctx2, dirty) {
|
|
3666
|
+
if_block0.p(ctx2, dirty);
|
|
3667
|
+
if (
|
|
3668
|
+
/*isFinished*/
|
|
3669
|
+
ctx2[1]
|
|
3670
|
+
) {
|
|
3671
|
+
if (if_block1) {
|
|
3672
|
+
if_block1.p(ctx2, dirty);
|
|
3673
|
+
if (dirty[0] & /*isFinished*/
|
|
3674
|
+
2) {
|
|
3675
|
+
transition_in(if_block1, 1);
|
|
3676
|
+
}
|
|
3677
|
+
} else {
|
|
3678
|
+
if_block1 = create_if_block5(ctx2);
|
|
3679
|
+
if_block1.c();
|
|
3680
|
+
transition_in(if_block1, 1);
|
|
3681
|
+
if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
|
|
3682
|
+
}
|
|
3683
|
+
} else if (if_block1) {
|
|
3684
|
+
group_outros();
|
|
3685
|
+
transition_out(if_block1, 1, 1, () => {
|
|
3686
|
+
if_block1 = null;
|
|
3687
|
+
});
|
|
3688
|
+
check_outros();
|
|
3689
|
+
}
|
|
3690
|
+
},
|
|
3691
|
+
i(local) {
|
|
3692
|
+
if (current)
|
|
3693
|
+
return;
|
|
3694
|
+
transition_in(if_block1);
|
|
3695
|
+
current = true;
|
|
3696
|
+
},
|
|
3697
|
+
o(local) {
|
|
3698
|
+
transition_out(if_block1);
|
|
3699
|
+
current = false;
|
|
3700
|
+
},
|
|
3701
|
+
d(detaching) {
|
|
3702
|
+
if (detaching) {
|
|
3703
|
+
detach(t2);
|
|
3704
|
+
detach(if_block1_anchor);
|
|
3705
|
+
}
|
|
3706
|
+
if_block0.d(detaching);
|
|
3707
|
+
if (if_block1)
|
|
3708
|
+
if_block1.d(detaching);
|
|
3709
|
+
}
|
|
3710
|
+
};
|
|
3711
|
+
}
|
|
3669
3712
|
function create_fragment7(ctx) {
|
|
3670
3713
|
let promptbody;
|
|
3671
|
-
let t2;
|
|
3672
|
-
let if_block_anchor;
|
|
3673
3714
|
let current;
|
|
3674
3715
|
promptbody = new PromptBody_default({
|
|
3675
3716
|
props: {
|
|
@@ -3690,78 +3731,35 @@
|
|
|
3690
3731
|
$$scope: { ctx }
|
|
3691
3732
|
}
|
|
3692
3733
|
});
|
|
3693
|
-
let if_block = (
|
|
3694
|
-
/*isFinished*/
|
|
3695
|
-
ctx[1] && create_if_block5(ctx)
|
|
3696
|
-
);
|
|
3697
3734
|
return {
|
|
3698
3735
|
c() {
|
|
3699
3736
|
create_component(promptbody.$$.fragment);
|
|
3700
|
-
t2 = space();
|
|
3701
|
-
if (if_block)
|
|
3702
|
-
if_block.c();
|
|
3703
|
-
if_block_anchor = empty();
|
|
3704
3737
|
},
|
|
3705
3738
|
m(target, anchor) {
|
|
3706
3739
|
mount_component(promptbody, target, anchor);
|
|
3707
|
-
insert(target, t2, anchor);
|
|
3708
|
-
if (if_block)
|
|
3709
|
-
if_block.m(target, anchor);
|
|
3710
|
-
insert(target, if_block_anchor, anchor);
|
|
3711
3740
|
current = true;
|
|
3712
3741
|
},
|
|
3713
3742
|
p(ctx2, dirty) {
|
|
3714
3743
|
const promptbody_changes = {};
|
|
3715
|
-
if (dirty[0] & /*
|
|
3716
|
-
|
|
3744
|
+
if (dirty[0] & /*isResultCorrect, resultFeedback, resultLabel, isFinished, textAriaLabel, placeholder, isDataSaving, typeinAnswer*/
|
|
3745
|
+
255 | dirty[1] & /*$$scope*/
|
|
3717
3746
|
64) {
|
|
3718
3747
|
promptbody_changes.$$scope = { dirty, ctx: ctx2 };
|
|
3719
3748
|
}
|
|
3720
3749
|
promptbody.$set(promptbody_changes);
|
|
3721
|
-
if (
|
|
3722
|
-
/*isFinished*/
|
|
3723
|
-
ctx2[1]
|
|
3724
|
-
) {
|
|
3725
|
-
if (if_block) {
|
|
3726
|
-
if_block.p(ctx2, dirty);
|
|
3727
|
-
if (dirty[0] & /*isFinished*/
|
|
3728
|
-
2) {
|
|
3729
|
-
transition_in(if_block, 1);
|
|
3730
|
-
}
|
|
3731
|
-
} else {
|
|
3732
|
-
if_block = create_if_block5(ctx2);
|
|
3733
|
-
if_block.c();
|
|
3734
|
-
transition_in(if_block, 1);
|
|
3735
|
-
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
3736
|
-
}
|
|
3737
|
-
} else if (if_block) {
|
|
3738
|
-
group_outros();
|
|
3739
|
-
transition_out(if_block, 1, 1, () => {
|
|
3740
|
-
if_block = null;
|
|
3741
|
-
});
|
|
3742
|
-
check_outros();
|
|
3743
|
-
}
|
|
3744
3750
|
},
|
|
3745
3751
|
i(local) {
|
|
3746
3752
|
if (current)
|
|
3747
3753
|
return;
|
|
3748
3754
|
transition_in(promptbody.$$.fragment, local);
|
|
3749
|
-
transition_in(if_block);
|
|
3750
3755
|
current = true;
|
|
3751
3756
|
},
|
|
3752
3757
|
o(local) {
|
|
3753
3758
|
transition_out(promptbody.$$.fragment, local);
|
|
3754
|
-
transition_out(if_block);
|
|
3755
3759
|
current = false;
|
|
3756
3760
|
},
|
|
3757
3761
|
d(detaching) {
|
|
3758
|
-
if (detaching) {
|
|
3759
|
-
detach(t2);
|
|
3760
|
-
detach(if_block_anchor);
|
|
3761
|
-
}
|
|
3762
3762
|
destroy_component(promptbody, detaching);
|
|
3763
|
-
if (if_block)
|
|
3764
|
-
if_block.d(detaching);
|
|
3765
3763
|
}
|
|
3766
3764
|
};
|
|
3767
3765
|
}
|