@pocketprep/ui-kit 3.4.76 → 3.4.78
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/@pocketprep/ui-kit.js +25 -11
- package/dist/@pocketprep/ui-kit.js.map +1 -1
- package/dist/@pocketprep/ui-kit.umd.cjs +2 -2
- package/dist/@pocketprep/ui-kit.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/lib/components/Forms/RadioButton.vue +2 -0
- package/lib/components/Quiz/Question/ChoicesContainer.vue +8 -4
- package/lib/components/Quiz/Question/MobileMatrixChoicesContainer.vue +11 -6
- package/lib/components/Quiz/Question/MobileMatrixRadioGroup.vue +11 -6
- package/package.json +1 -1
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
? 'Correct Answer, '
|
|
120
120
|
: 'Incorrect Answer, '
|
|
121
121
|
: ''
|
|
122
|
-
}${
|
|
122
|
+
}${ stripHtmlTags(choice.text) }`"
|
|
123
123
|
v-html="choice.text"
|
|
124
124
|
/>
|
|
125
125
|
<PocketButton
|
|
@@ -334,11 +334,15 @@ export default class ChoicesContainer extends Vue {
|
|
|
334
334
|
} }) breakpoints!: TBreakPointsObject
|
|
335
335
|
@Prop({ default: [] }) keywordDefinitions!: { keyword: string; definition: string }[]
|
|
336
336
|
|
|
337
|
-
|
|
338
|
-
|
|
337
|
+
stripHtmlTags (string?: string) {
|
|
338
|
+
if (string) {
|
|
339
|
+
const div = document.createElement('div')
|
|
340
|
+
div.innerHTML = string
|
|
341
|
+
return div.textContent || ''
|
|
342
|
+
}
|
|
343
|
+
return ''
|
|
339
344
|
}
|
|
340
345
|
|
|
341
|
-
|
|
342
346
|
@Emit('emitChoiceFocusIn')
|
|
343
347
|
emitChoiceFocusIn (choiceKey: TChoiceKey) {
|
|
344
348
|
return choiceKey
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
class="uikit-question-mobile-matrix-choices-container__row-label"
|
|
49
49
|
v-dark="isDarkMode"
|
|
50
50
|
>
|
|
51
|
-
{{
|
|
51
|
+
{{ stripHtmlTags(rowLabel) }}
|
|
52
52
|
<Icon
|
|
53
53
|
class="uikit-question-mobile-matrix-choices-container__toggle-row-icon"
|
|
54
54
|
:class="{
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
>
|
|
79
79
|
{{ selectedColumnHeaders[rowIndex][colHeaderIndex] ===
|
|
80
80
|
selectedColumnHeaders[rowIndex][selectedColumnHeaders[rowIndex].length - 1] ?
|
|
81
|
-
|
|
82
|
-
`${
|
|
81
|
+
stripHtmlTags(selectedColumnHeaders[rowIndex][colHeaderIndex]) :
|
|
82
|
+
`${stripHtmlTags(selectedColumnHeaders[rowIndex][colHeaderIndex])},`
|
|
83
83
|
}}
|
|
84
84
|
</div>
|
|
85
85
|
</template>
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
matrixChoiceLayout[rowIndex][columnIndex]?.startsWith('d'),
|
|
128
128
|
}"
|
|
129
129
|
>
|
|
130
|
-
{{
|
|
130
|
+
{{ stripHtmlTags(column) }}
|
|
131
131
|
</div>
|
|
132
132
|
</div>
|
|
133
133
|
</div>
|
|
@@ -204,8 +204,13 @@ export default class MobileMatrixChoicesContainer extends Vue {
|
|
|
204
204
|
selectedColumnHeaders: string[][] = []
|
|
205
205
|
brandColors = BrandColors
|
|
206
206
|
|
|
207
|
-
|
|
208
|
-
|
|
207
|
+
stripHtmlTags (string?: string) {
|
|
208
|
+
if (string) {
|
|
209
|
+
const div = document.createElement('div')
|
|
210
|
+
div.innerHTML = string
|
|
211
|
+
return div.textContent || ''
|
|
212
|
+
}
|
|
213
|
+
return ''
|
|
209
214
|
}
|
|
210
215
|
|
|
211
216
|
get defaultCheckboxGrid () {
|
|
@@ -40,8 +40,13 @@ const radioButtonColor = (choice: string) => {
|
|
|
40
40
|
return 'blue'
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
const
|
|
44
|
-
|
|
43
|
+
const stripHtmlTags = (string?: string) => {
|
|
44
|
+
if (string) {
|
|
45
|
+
const div = document.createElement('div')
|
|
46
|
+
div.innerHTML = string
|
|
47
|
+
return div.textContent || ''
|
|
48
|
+
}
|
|
49
|
+
return ''
|
|
45
50
|
}
|
|
46
51
|
</script>
|
|
47
52
|
|
|
@@ -78,7 +83,7 @@ const stripText = (string?: string) => {
|
|
|
78
83
|
}"
|
|
79
84
|
@click="!disabled && !showAnswers && selectChoice(choice)"
|
|
80
85
|
>
|
|
81
|
-
{{
|
|
86
|
+
{{ stripHtmlTags(labels[index]) }}
|
|
82
87
|
</div>
|
|
83
88
|
</li>
|
|
84
89
|
</ul>
|
|
@@ -102,9 +107,9 @@ const stripText = (string?: string) => {
|
|
|
102
107
|
|
|
103
108
|
&__option {
|
|
104
109
|
display: flex;
|
|
105
|
-
align-items:
|
|
106
|
-
|
|
107
|
-
|
|
110
|
+
align-items: flex-start;
|
|
111
|
+
align-self: stretch;
|
|
112
|
+
padding: 11px 15px 12px 15px;
|
|
108
113
|
max-width: 325px;
|
|
109
114
|
border: 0.5px solid rgba($pewter, 0.85);
|
|
110
115
|
border-top: none;
|