oro-sdk 2.15.1 → 2.18.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",
2
+ "version": "2.18.0",
3
3
  "main": "dist/index.js",
4
4
  "typings": "dist/index.d.ts",
5
5
  "files": [
@@ -20,12 +20,8 @@
20
20
  "prepare": "tsdx build",
21
21
  "size": "size-limit",
22
22
  "analyze": "size-limit --why",
23
- "package": "tsdx build && npm publish"
24
- },
25
- "husky": {
26
- "hooks": {
27
- "pre-commit": "tsdx lint"
28
- }
23
+ "package": "tsdx build && npm publish",
24
+ "pretty": "prettier --config ../../.prettierrc.yaml --write './src/**/*.{ts,js,json,md}' && prettier --write './*.md'"
29
25
  },
30
26
  "name": "oro-sdk",
31
27
  "author": "Antoine Jaouën <antoine@orohealth.me>",
@@ -45,7 +41,6 @@
45
41
  "@size-limit/preset-small-lib": "^4.10.2",
46
42
  "@types/jest": "^27.4.1",
47
43
  "@types/uuid": "^8.3.0",
48
- "husky": "^6.0.0",
49
44
  "prettier": "^2.5.1",
50
45
  "prettier-plugin-svelte": "^2.3.0",
51
46
  "size-limit": "^4.10.2",
@@ -59,7 +54,7 @@
59
54
  "form-data": "^4.0.0",
60
55
  "formdata-node": "^4.3.1",
61
56
  "idb-keyval": "^5.0.6",
62
- "oro-sdk-apis": "1.11.1",
57
+ "oro-sdk-apis": "1.20.0",
63
58
  "oro-toolbox": "0.0.6",
64
59
  "uuid": "^8.3.2"
65
60
  }
@@ -14,10 +14,9 @@ import {
14
14
 
15
15
  export async function filterTriggeredAnsweredWithKind(
16
16
  workflowData: WorkflowData,
17
- kind: 'text' | '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,8 +117,13 @@ 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) {
121
+ case 'text-select-group':
122
+ if (question.answers) {
123
+ displayedAnswer = `${answerValue[0]} ${question.answers[answerValue[1] as string].text}`
124
+ }
125
+ answer = answerValue
126
+ break
123
127
  case 'radio':
124
128
  case 'radio-card':
125
129
  case 'select':
@@ -1,5 +1,4 @@
1
- import { PlaceData } from '../services/external/clinia'
2
- import { Uuid } from 'oro-sdk-apis'
1
+ import { PlaceData, Uuid } from 'oro-sdk-apis'
3
2
 
4
3
  export interface PersonalInformations {
5
4
  birthday?: string
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 ORO Health Inc.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.