@pocketprep/ui-kit 3.5.30 → 3.7.0

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.
@@ -2,6 +2,7 @@ export type Ref = HTMLElement | null
2
2
 
3
3
  export type TChoiceKey = `${'a' | 'd'}${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}`
4
4
  export type TMatrixChoiceKey = `${'a' | 'd'}${1 | 2 | 3 }_${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12}`
5
+ export type TBuildListChoiceKey = `a${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}`
5
6
 
6
7
  export type TQuizMode = 'qotd' | 'quick10' | 'timed' | 'weakest' | 'missed' | 'custom'
7
8
 
@@ -15,6 +16,7 @@ export type TBreakPointsObject = {
15
16
  }
16
17
 
17
18
  export type TChoice = { text?: string; key: TChoiceKey }
19
+ export type TBuildListChoice = { text?: string; key: TBuildListChoiceKey }
18
20
 
19
21
  export type TChoiceScores = Partial<Record<TChoiceKey, number>> & {
20
22
  totalAnswered: number
@@ -26,6 +28,11 @@ export type TMatrixChoiceScores = {
26
28
  answeredCorrectly: number
27
29
  }
28
30
 
31
+ export type TBuildListChoiceScores = {
32
+ totalAnswered: number
33
+ answeredCorrectly: number
34
+ }
35
+
29
36
  export type TQuestionPassageAndImageTitle = 'Passage + Image' | 'Image' | 'Passage'
30
37
 
31
38
  export type TNamesRow = {
package/lib/utils.ts CHANGED
@@ -157,3 +157,11 @@ export const highlightKeywordsInText = (params: {
157
157
  return result
158
158
  }
159
159
 
160
+ export const stripHtmlTags = (string?: string) => {
161
+ if (string) {
162
+ const div = document.createElement('div')
163
+ div.innerHTML = string
164
+ return div.textContent || ''
165
+ }
166
+ return ''
167
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pocketprep/ui-kit",
3
- "version": "3.5.30",
3
+ "version": "3.7.0",
4
4
  "description": "Pocket Prep UI Kit",
5
5
  "author": "pocketprep",
6
6
  "scripts": {
@@ -82,7 +82,7 @@
82
82
  "vue-router": "4.5.0"
83
83
  },
84
84
  "devDependencies": {
85
- "@pocketprep/types": "1.14.43",
85
+ "@pocketprep/types": "1.15.17",
86
86
  "@stylistic/eslint-plugin-ts": "4.2.0",
87
87
  "@tsconfig/node22": "22.0.0",
88
88
  "@types/node": "22.13.10",