@jspsych/plugin-survey-multi-choice 1.1.2 → 1.1.3

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/index.d.ts CHANGED
@@ -1,156 +1,156 @@
1
- import { JsPsych, JsPsychPlugin, ParameterType, TrialType } from "jspsych";
2
- declare const info: {
3
- readonly name: "survey-multi-choice";
4
- readonly parameters: {
5
- /** Array containing one or more objects with parameters for the question(s) that should be shown on the page. */
6
- readonly questions: {
7
- readonly type: ParameterType.COMPLEX;
8
- readonly array: true;
9
- readonly pretty_name: "Questions";
10
- readonly nested: {
11
- /** Question prompt. */
12
- readonly prompt: {
13
- readonly type: ParameterType.HTML_STRING;
14
- readonly pretty_name: "Prompt";
15
- readonly default: any;
16
- };
17
- /** Array of multiple choice options for this question. */
18
- readonly options: {
19
- readonly type: ParameterType.STRING;
20
- readonly pretty_name: "Options";
21
- readonly array: true;
22
- readonly default: any;
23
- };
24
- /** Whether or not a response to this question must be given in order to continue. */
25
- readonly required: {
26
- readonly type: ParameterType.BOOL;
27
- readonly pretty_name: "Required";
28
- readonly default: false;
29
- };
30
- /** If true, then the question will be centered and options will be displayed horizontally. */
31
- readonly horizontal: {
32
- readonly type: ParameterType.BOOL;
33
- readonly pretty_name: "Horizontal";
34
- readonly default: false;
35
- };
36
- /** Name of the question in the trial data. If no name is given, the questions are named Q0, Q1, etc. */
37
- readonly name: {
38
- readonly type: ParameterType.STRING;
39
- readonly pretty_name: "Question Name";
40
- readonly default: "";
41
- };
42
- };
43
- };
44
- /** If true, the order of the questions in the 'questions' array will be randomized. */
45
- readonly randomize_question_order: {
46
- readonly type: ParameterType.BOOL;
47
- readonly pretty_name: "Randomize Question Order";
48
- readonly default: false;
49
- };
50
- /** HTML-formatted string to display at top of the page above all of the questions. */
51
- readonly preamble: {
52
- readonly type: ParameterType.HTML_STRING;
53
- readonly pretty_name: "Preamble";
54
- readonly default: any;
55
- };
56
- /** Label of the button to submit responses. */
57
- readonly button_label: {
58
- readonly type: ParameterType.STRING;
59
- readonly pretty_name: "Button label";
60
- readonly default: "Continue";
61
- };
62
- /** Setting this to true will enable browser auto-complete or auto-fill for the form. */
63
- readonly autocomplete: {
64
- readonly type: ParameterType.BOOL;
65
- readonly pretty_name: "Allow autocomplete";
66
- readonly default: false;
67
- };
68
- };
69
- };
70
- declare type Info = typeof info;
71
- /**
72
- * **survey-multi-choice**
73
- *
74
- * jsPsych plugin for presenting multiple choice survey questions
75
- *
76
- * @author Shane Martin
77
- * @see {@link https://www.jspsych.org/plugins/jspsych-survey-multi-choice/ survey-multi-choice plugin documentation on jspsych.org}
78
- */
79
- declare class SurveyMultiChoicePlugin implements JsPsychPlugin<Info> {
80
- private jsPsych;
81
- static info: {
82
- readonly name: "survey-multi-choice";
83
- readonly parameters: {
84
- /** Array containing one or more objects with parameters for the question(s) that should be shown on the page. */
85
- readonly questions: {
86
- readonly type: ParameterType.COMPLEX;
87
- readonly array: true;
88
- readonly pretty_name: "Questions";
89
- readonly nested: {
90
- /** Question prompt. */
91
- readonly prompt: {
92
- readonly type: ParameterType.HTML_STRING;
93
- readonly pretty_name: "Prompt";
94
- readonly default: any;
95
- };
96
- /** Array of multiple choice options for this question. */
97
- readonly options: {
98
- readonly type: ParameterType.STRING;
99
- readonly pretty_name: "Options";
100
- readonly array: true;
101
- readonly default: any;
102
- };
103
- /** Whether or not a response to this question must be given in order to continue. */
104
- readonly required: {
105
- readonly type: ParameterType.BOOL;
106
- readonly pretty_name: "Required";
107
- readonly default: false;
108
- };
109
- /** If true, then the question will be centered and options will be displayed horizontally. */
110
- readonly horizontal: {
111
- readonly type: ParameterType.BOOL;
112
- readonly pretty_name: "Horizontal";
113
- readonly default: false;
114
- };
115
- /** Name of the question in the trial data. If no name is given, the questions are named Q0, Q1, etc. */
116
- readonly name: {
117
- readonly type: ParameterType.STRING;
118
- readonly pretty_name: "Question Name";
119
- readonly default: "";
120
- };
121
- };
122
- };
123
- /** If true, the order of the questions in the 'questions' array will be randomized. */
124
- readonly randomize_question_order: {
125
- readonly type: ParameterType.BOOL;
126
- readonly pretty_name: "Randomize Question Order";
127
- readonly default: false;
128
- };
129
- /** HTML-formatted string to display at top of the page above all of the questions. */
130
- readonly preamble: {
131
- readonly type: ParameterType.HTML_STRING;
132
- readonly pretty_name: "Preamble";
133
- readonly default: any;
134
- };
135
- /** Label of the button to submit responses. */
136
- readonly button_label: {
137
- readonly type: ParameterType.STRING;
138
- readonly pretty_name: "Button label";
139
- readonly default: "Continue";
140
- };
141
- /** Setting this to true will enable browser auto-complete or auto-fill for the form. */
142
- readonly autocomplete: {
143
- readonly type: ParameterType.BOOL;
144
- readonly pretty_name: "Allow autocomplete";
145
- readonly default: false;
146
- };
147
- };
148
- };
149
- constructor(jsPsych: JsPsych);
150
- trial(display_element: HTMLElement, trial: TrialType<Info>): void;
151
- simulate(trial: TrialType<Info>, simulation_mode: any, simulation_options: any, load_callback: () => void): void;
152
- private create_simulation_data;
153
- private simulate_data_only;
154
- private simulate_visual;
155
- }
156
- export default SurveyMultiChoicePlugin;
1
+ import { JsPsych, JsPsychPlugin, ParameterType, TrialType } from "jspsych";
2
+ declare const info: {
3
+ readonly name: "survey-multi-choice";
4
+ readonly parameters: {
5
+ /** Array containing one or more objects with parameters for the question(s) that should be shown on the page. */
6
+ readonly questions: {
7
+ readonly type: ParameterType.COMPLEX;
8
+ readonly array: true;
9
+ readonly pretty_name: "Questions";
10
+ readonly nested: {
11
+ /** Question prompt. */
12
+ readonly prompt: {
13
+ readonly type: ParameterType.HTML_STRING;
14
+ readonly pretty_name: "Prompt";
15
+ readonly default: any;
16
+ };
17
+ /** Array of multiple choice options for this question. */
18
+ readonly options: {
19
+ readonly type: ParameterType.STRING;
20
+ readonly pretty_name: "Options";
21
+ readonly array: true;
22
+ readonly default: any;
23
+ };
24
+ /** Whether or not a response to this question must be given in order to continue. */
25
+ readonly required: {
26
+ readonly type: ParameterType.BOOL;
27
+ readonly pretty_name: "Required";
28
+ readonly default: false;
29
+ };
30
+ /** If true, then the question will be centered and options will be displayed horizontally. */
31
+ readonly horizontal: {
32
+ readonly type: ParameterType.BOOL;
33
+ readonly pretty_name: "Horizontal";
34
+ readonly default: false;
35
+ };
36
+ /** Name of the question in the trial data. If no name is given, the questions are named Q0, Q1, etc. */
37
+ readonly name: {
38
+ readonly type: ParameterType.STRING;
39
+ readonly pretty_name: "Question Name";
40
+ readonly default: "";
41
+ };
42
+ };
43
+ };
44
+ /** If true, the order of the questions in the 'questions' array will be randomized. */
45
+ readonly randomize_question_order: {
46
+ readonly type: ParameterType.BOOL;
47
+ readonly pretty_name: "Randomize Question Order";
48
+ readonly default: false;
49
+ };
50
+ /** HTML-formatted string to display at top of the page above all of the questions. */
51
+ readonly preamble: {
52
+ readonly type: ParameterType.HTML_STRING;
53
+ readonly pretty_name: "Preamble";
54
+ readonly default: any;
55
+ };
56
+ /** Label of the button to submit responses. */
57
+ readonly button_label: {
58
+ readonly type: ParameterType.STRING;
59
+ readonly pretty_name: "Button label";
60
+ readonly default: "Continue";
61
+ };
62
+ /** Setting this to true will enable browser auto-complete or auto-fill for the form. */
63
+ readonly autocomplete: {
64
+ readonly type: ParameterType.BOOL;
65
+ readonly pretty_name: "Allow autocomplete";
66
+ readonly default: false;
67
+ };
68
+ };
69
+ };
70
+ type Info = typeof info;
71
+ /**
72
+ * **survey-multi-choice**
73
+ *
74
+ * jsPsych plugin for presenting multiple choice survey questions
75
+ *
76
+ * @author Shane Martin
77
+ * @see {@link https://www.jspsych.org/plugins/jspsych-survey-multi-choice/ survey-multi-choice plugin documentation on jspsych.org}
78
+ */
79
+ declare class SurveyMultiChoicePlugin implements JsPsychPlugin<Info> {
80
+ private jsPsych;
81
+ static info: {
82
+ readonly name: "survey-multi-choice";
83
+ readonly parameters: {
84
+ /** Array containing one or more objects with parameters for the question(s) that should be shown on the page. */
85
+ readonly questions: {
86
+ readonly type: ParameterType.COMPLEX;
87
+ readonly array: true;
88
+ readonly pretty_name: "Questions";
89
+ readonly nested: {
90
+ /** Question prompt. */
91
+ readonly prompt: {
92
+ readonly type: ParameterType.HTML_STRING;
93
+ readonly pretty_name: "Prompt";
94
+ readonly default: any;
95
+ };
96
+ /** Array of multiple choice options for this question. */
97
+ readonly options: {
98
+ readonly type: ParameterType.STRING;
99
+ readonly pretty_name: "Options";
100
+ readonly array: true;
101
+ readonly default: any;
102
+ };
103
+ /** Whether or not a response to this question must be given in order to continue. */
104
+ readonly required: {
105
+ readonly type: ParameterType.BOOL;
106
+ readonly pretty_name: "Required";
107
+ readonly default: false;
108
+ };
109
+ /** If true, then the question will be centered and options will be displayed horizontally. */
110
+ readonly horizontal: {
111
+ readonly type: ParameterType.BOOL;
112
+ readonly pretty_name: "Horizontal";
113
+ readonly default: false;
114
+ };
115
+ /** Name of the question in the trial data. If no name is given, the questions are named Q0, Q1, etc. */
116
+ readonly name: {
117
+ readonly type: ParameterType.STRING;
118
+ readonly pretty_name: "Question Name";
119
+ readonly default: "";
120
+ };
121
+ };
122
+ };
123
+ /** If true, the order of the questions in the 'questions' array will be randomized. */
124
+ readonly randomize_question_order: {
125
+ readonly type: ParameterType.BOOL;
126
+ readonly pretty_name: "Randomize Question Order";
127
+ readonly default: false;
128
+ };
129
+ /** HTML-formatted string to display at top of the page above all of the questions. */
130
+ readonly preamble: {
131
+ readonly type: ParameterType.HTML_STRING;
132
+ readonly pretty_name: "Preamble";
133
+ readonly default: any;
134
+ };
135
+ /** Label of the button to submit responses. */
136
+ readonly button_label: {
137
+ readonly type: ParameterType.STRING;
138
+ readonly pretty_name: "Button label";
139
+ readonly default: "Continue";
140
+ };
141
+ /** Setting this to true will enable browser auto-complete or auto-fill for the form. */
142
+ readonly autocomplete: {
143
+ readonly type: ParameterType.BOOL;
144
+ readonly pretty_name: "Allow autocomplete";
145
+ readonly default: false;
146
+ };
147
+ };
148
+ };
149
+ constructor(jsPsych: JsPsych);
150
+ trial(display_element: HTMLElement, trial: TrialType<Info>): void;
151
+ simulate(trial: TrialType<Info>, simulation_mode: any, simulation_options: any, load_callback: () => void): void;
152
+ private create_simulation_data;
153
+ private simulate_data_only;
154
+ private simulate_visual;
155
+ }
156
+ export default SurveyMultiChoicePlugin;