oro-sdk 2.15.1-dev1 → 2.17.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.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.15.1-dev1",
2
+ "version": "2.17.0",
3
3
  "main": "dist/index.js",
4
4
  "typings": "dist/index.d.ts",
5
5
  "files": [
@@ -54,7 +54,7 @@
54
54
  "form-data": "^4.0.0",
55
55
  "formdata-node": "^4.3.1",
56
56
  "idb-keyval": "^5.0.6",
57
- "oro-sdk-apis": "1.11.1-dev1",
57
+ "oro-sdk-apis": "1.19.0",
58
58
  "oro-toolbox": "0.0.6",
59
59
  "uuid": "^8.3.2"
60
60
  }
@@ -14,10 +14,9 @@ import {
14
14
 
15
15
  export async function filterTriggeredAnsweredWithKind(
16
16
  workflowData: WorkflowData,
17
- kind: 'text' | 'textArea' | 'hybrid' | 'date' | 'number' | 'images' | 'images-alias' | 'body-parts' | 'pharmacy-picker'
17
+ kind: 'text' | 'text-area' | 'text-select-group' | 'date' | 'number' | 'images' | 'images-alias' | 'body-parts' | 'pharmacy-picker'
18
18
  ): Promise<SelectedAnswerData[]> {
19
19
  if (!workflowData.selectedAnswers) throw WorkflowAnswersMissingError
20
-
21
20
  // Flattens the list of answered questions
22
21
  let flattenedAnswers = flattenSelectedAnswers(workflowData.selectedAnswers)
23
22
  // Generates a list of applicable questions
@@ -118,15 +117,11 @@ async function populateWorkflowField(
118
117
  ): Promise<PopulatedWorkflowField> {
119
118
  let answer: any
120
119
  let displayedAnswer: string | string[] | undefined = undefined
121
-
122
120
  switch (question.kind) {
123
- case 'hybrid':
121
+ case 'text-select-group':
124
122
  if (question.answers) {
125
- const displayedAnswer1 = question.answers[answerValue as string].text.split(" ")[0]
126
- const displayedAnswer2 = question.answers[answerValue as string].text.split(" ")[1]
127
- displayedAnswer = `${displayedAnswer1} ${displayedAnswer2}`
123
+ displayedAnswer = `${answerValue[0]} ${question.answers[answerValue[1] as string].text}`
128
124
  }
129
-
130
125
  answer = answerValue
131
126
  break
132
127
  case 'radio':