@omniloy/sofia-sdk 0.0.10 → 0.0.11
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/README.md +84 -73
- package/dist/legacy/webcomponents.es.js +36 -43
- package/dist/legacy/webcomponents.umd.js +36 -43
- package/dist/tailor/webcomponents.es.js +36 -43
- package/dist/tailor/webcomponents.umd.js +36 -43
- package/dist/webcomponents.es.js +36 -43
- package/dist/webcomponents.umd.js +36 -43
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -13,104 +13,115 @@ AI-powered medical assistant web component for healthcare applications.
|
|
|
13
13
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
16
|
+
### Option 1: NPM/Yarn (Recommended)
|
|
17
|
+
|
|
16
18
|
```bash
|
|
17
19
|
npm install @omniloy/sofia-sdk
|
|
18
20
|
```
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
```bash
|
|
23
|
+
yarn add @omniloy/sofia-sdk
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Import in your project:
|
|
21
27
|
|
|
22
|
-
### Option 1: ES Modules (Recommended)
|
|
23
28
|
```javascript
|
|
29
|
+
// In your main file (main.js, app.js, index.js, etc.)
|
|
24
30
|
import '@omniloy/sofia-sdk';
|
|
25
|
-
|
|
26
|
-
<sofia-sdk
|
|
27
|
-
baseurl="your-base-url"
|
|
28
|
-
wssurl="your-wss-url"
|
|
29
|
-
apikey="your-api-key"
|
|
30
|
-
userid="dr-garcia-123"
|
|
31
|
-
patientid="patient-456"
|
|
32
|
-
toolsargs='{
|
|
33
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
34
|
-
"title": "Medical Consultation",
|
|
35
|
-
"type": "object",
|
|
36
|
-
"properties": {
|
|
37
|
-
"chief_complaint": {"type": "string", "description": "Primary reason for visit"},
|
|
38
|
-
"diagnosis": {"type": "string", "description": "Medical diagnosis"},
|
|
39
|
-
"treatment_plan": {"type": "string", "description": "Recommended treatment"}
|
|
40
|
-
},
|
|
41
|
-
"required": ["chief_complaint", "diagnosis"]
|
|
42
|
-
}'>
|
|
43
|
-
</sofia-sdk>
|
|
44
31
|
```
|
|
45
32
|
|
|
46
|
-
|
|
33
|
+
Once imported, the `<sofia-sdk>` component becomes available globally.
|
|
34
|
+
|
|
35
|
+
### Option 2: CDN
|
|
36
|
+
|
|
37
|
+
Latest version:
|
|
38
|
+
|
|
47
39
|
```html
|
|
48
40
|
<script src="https://unpkg.com/@omniloy/sofia-sdk@latest/dist/webcomponents.umd.js"></script>
|
|
41
|
+
```
|
|
49
42
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
userid="dr-garcia-123"
|
|
55
|
-
patientid="patient-456"
|
|
56
|
-
toolsargs='{"$schema": "http://json-schema.org/draft-07/schema#", "title": "Medical Consultation", "type": "object", "properties": {"diagnosis": {"type": "string"}}, "required": ["diagnosis"]}'
|
|
57
|
-
templateid='1234'
|
|
58
|
-
>
|
|
59
|
-
</sofia-sdk>
|
|
43
|
+
Specific version:
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<script src="https://unpkg.com/@omniloy/sofia-sdk@1.0.0/dist/webcomponents.umd.js"></script>
|
|
60
47
|
```
|
|
61
48
|
|
|
62
|
-
###
|
|
49
|
+
### Option 3: Manual Build
|
|
50
|
+
|
|
51
|
+
```html
|
|
52
|
+
<script src="/dist/webcomponents.umd.js"></script>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Installation Verification
|
|
56
|
+
|
|
57
|
+
Browser verification:
|
|
58
|
+
|
|
63
59
|
```javascript
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
60
|
+
console.log(customElements.get('sofia-sdk'));
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Should return the component definition rather than `undefined`.
|
|
64
|
+
|
|
65
|
+
HTML verification:
|
|
66
|
+
|
|
67
|
+
```html
|
|
68
|
+
<sofia-sdk></sofia-sdk>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Successful installation displays a message about missing required properties.
|
|
72
|
+
|
|
73
|
+
## Environment Requirements
|
|
74
|
+
|
|
75
|
+
### HTTPS Protocol
|
|
76
|
+
|
|
77
|
+
SofIA SDK requires HTTPS for audio and microphone functionality. Local development uses `https://localhost` or `local-ssl-proxy`.
|
|
78
|
+
|
|
79
|
+
### Content Security Policy
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
connect-src 'self' https://*.omniloy.com wss://*.omniloy.com;
|
|
83
|
+
script-src 'self' 'unsafe-inline' https://unpkg.com;
|
|
77
84
|
```
|
|
78
85
|
|
|
79
|
-
|
|
86
|
+
### SDK Configuration with Proxy
|
|
80
87
|
|
|
81
|
-
|
|
88
|
+
```html
|
|
89
|
+
<sofia-sdk
|
|
90
|
+
baseurl="base-url"
|
|
91
|
+
apikey="your-api-key"
|
|
92
|
+
wssurl="wss://WSS_URL"
|
|
93
|
+
userid="doctor-123"
|
|
94
|
+
patientid="patient-456"
|
|
95
|
+
template='{"$schema": "http://json-schema.org/draft-07/schema#", "title": "Medical Consultation", "type": "object", "properties": {"diagnosis": {"type": "string"}}, "required": ["diagnosis"]}'
|
|
96
|
+
templateid='1234'
|
|
97
|
+
></sofia-sdk>
|
|
98
|
+
```
|
|
82
99
|
|
|
83
|
-
|
|
84
|
-
|----------|------|-------------|
|
|
85
|
-
| **baseurl** | `string` | SofIA REST API endpoint (HTTPS required) |
|
|
86
|
-
| **wssurl** | `string` | WebSocket URL for real-time streaming (WSS required) |
|
|
87
|
-
| **apikey** | `string` | Authentication key provided by Omniloy |
|
|
88
|
-
| **userid** | `string` | Unique identifier of the healthcare professional |
|
|
89
|
-
| **patientid** | `string` | Unique identifier of the patient for the session |
|
|
90
|
-
| **toolsargs** | `string` | JSON Schema Draft-07 defining clinical data structure - mandatory if isonlychat is not "true" |
|
|
91
|
-
| **templateid** | `string` | The current template Id - mandatory if isonlychat is not "true" |
|
|
100
|
+
## Troubleshooting
|
|
92
101
|
|
|
93
|
-
|
|
102
|
+
**Component doesn't load:**
|
|
103
|
+
- Verify the import is in the main file
|
|
104
|
+
- Confirm no errors in browser console
|
|
105
|
+
- Check network connectivity for CDN usage
|
|
94
106
|
|
|
95
|
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
- **WebSocket URL**: Real-time connection endpoint
|
|
107
|
+
**CORS errors:**
|
|
108
|
+
- Ensure application uses HTTPS
|
|
109
|
+
- Verify `baseurl` and `wssurl` URLs are correct
|
|
99
110
|
|
|
100
|
-
|
|
111
|
+
**Component not defined:**
|
|
101
112
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
113
|
+
```javascript
|
|
114
|
+
// Wait for component definition
|
|
115
|
+
customElements.whenDefined('sofia-sdk').then(() => {
|
|
116
|
+
console.log('SofIA SDK is ready');
|
|
117
|
+
});
|
|
118
|
+
```
|
|
108
119
|
|
|
109
|
-
##
|
|
120
|
+
## Next Steps
|
|
110
121
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
122
|
+
1. **[Required Properties](https://omniloy.mintlify.app/en/sdk/installation)**: Configure mandatory parameters
|
|
123
|
+
2. **[Optional Properties](https://omniloy.mintlify.app/en/sdk/installation)**: Customize behavior
|
|
124
|
+
3. **[Clinical Data Schemas](https://omniloy.mintlify.app/en/sdk/installation)**: Define data structure to generate
|
|
114
125
|
|
|
115
126
|
## License
|
|
116
127
|
|
|
@@ -12411,11 +12411,9 @@ const Collapse$4 = "طي";
|
|
|
12411
12411
|
const Multilingual$4 = "متعدد اللغات";
|
|
12412
12412
|
const Arabic$4 = "عربي";
|
|
12413
12413
|
const Tamil$4 = "التاميل";
|
|
12414
|
-
const Malayalam$4 = "المالايالامية";
|
|
12415
12414
|
const Telugu$4 = "التيلجو";
|
|
12416
12415
|
const Kannada$4 = "الكانادا";
|
|
12417
12416
|
const Hindi$4 = "الهندية";
|
|
12418
|
-
const Malay$4 = "لغة الملايو";
|
|
12419
12417
|
const Thai$4 = "التايلاندية";
|
|
12420
12418
|
const Filipino$4 = "فلبينية";
|
|
12421
12419
|
const English$4 = "الإنجليزية";
|
|
@@ -12541,12 +12539,11 @@ const ar = {
|
|
|
12541
12539
|
Multilingual: Multilingual$4,
|
|
12542
12540
|
Arabic: Arabic$4,
|
|
12543
12541
|
Tamil: Tamil$4,
|
|
12544
|
-
Malayalam:
|
|
12542
|
+
"Malay / Malayalam": "لغة الملايو / المالايالامية",
|
|
12545
12543
|
Telugu: Telugu$4,
|
|
12546
12544
|
Kannada: Kannada$4,
|
|
12547
12545
|
Hindi: Hindi$4,
|
|
12548
12546
|
"Bahasa Indonesia": "البهاسا الاندونيسية",
|
|
12549
|
-
Malay: Malay$4,
|
|
12550
12547
|
Thai: Thai$4,
|
|
12551
12548
|
Filipino: Filipino$4,
|
|
12552
12549
|
English: English$4,
|
|
@@ -12637,11 +12634,9 @@ const Collapse$3 = "Collapse";
|
|
|
12637
12634
|
const Multilingual$3 = "Multilingual";
|
|
12638
12635
|
const Arabic$3 = "Arabic";
|
|
12639
12636
|
const Tamil$3 = "Tamil";
|
|
12640
|
-
const Malayalam$3 = "Malayalam";
|
|
12641
12637
|
const Telugu$3 = "Telugu";
|
|
12642
12638
|
const Kannada$3 = "Kannada";
|
|
12643
12639
|
const Hindi$3 = "Hindi";
|
|
12644
|
-
const Malay$3 = "Malay";
|
|
12645
12640
|
const Thai$3 = "Thai";
|
|
12646
12641
|
const Filipino$3 = "Filipino";
|
|
12647
12642
|
const English$3 = "English";
|
|
@@ -12769,12 +12764,11 @@ const en = {
|
|
|
12769
12764
|
Multilingual: Multilingual$3,
|
|
12770
12765
|
Arabic: Arabic$3,
|
|
12771
12766
|
Tamil: Tamil$3,
|
|
12772
|
-
Malayalam: Malayalam
|
|
12767
|
+
"Malay / Malayalam": "Malay / Malayalam",
|
|
12773
12768
|
Telugu: Telugu$3,
|
|
12774
12769
|
Kannada: Kannada$3,
|
|
12775
12770
|
Hindi: Hindi$3,
|
|
12776
12771
|
"Bahasa Indonesia": "Bahasa Indonesia",
|
|
12777
|
-
Malay: Malay$3,
|
|
12778
12772
|
Thai: Thai$3,
|
|
12779
12773
|
Filipino: Filipino$3,
|
|
12780
12774
|
English: English$3,
|
|
@@ -12868,11 +12862,9 @@ const Collapse$2 = "Cerrar";
|
|
|
12868
12862
|
const Multilingual$2 = "Plurilingüe";
|
|
12869
12863
|
const Arabic$2 = "Árabe";
|
|
12870
12864
|
const Tamil$2 = "Tamil";
|
|
12871
|
-
const Malayalam$2 = "Malayalam";
|
|
12872
12865
|
const Telugu$2 = "Telugu";
|
|
12873
12866
|
const Kannada$2 = "Canarés";
|
|
12874
12867
|
const Hindi$2 = "Hindi";
|
|
12875
|
-
const Malay$2 = "Malayo";
|
|
12876
12868
|
const Thai$2 = "Tailandés";
|
|
12877
12869
|
const Filipino$2 = "Filipino";
|
|
12878
12870
|
const English$2 = "Inglés";
|
|
@@ -13000,12 +12992,11 @@ const es = {
|
|
|
13000
12992
|
Multilingual: Multilingual$2,
|
|
13001
12993
|
Arabic: Arabic$2,
|
|
13002
12994
|
Tamil: Tamil$2,
|
|
13003
|
-
Malayalam: Malayalam
|
|
12995
|
+
"Malay / Malayalam": "Malayo / Malayalam",
|
|
13004
12996
|
Telugu: Telugu$2,
|
|
13005
12997
|
Kannada: Kannada$2,
|
|
13006
12998
|
Hindi: Hindi$2,
|
|
13007
12999
|
"Bahasa Indonesia": "Bahasa Indonesia",
|
|
13008
|
-
Malay: Malay$2,
|
|
13009
13000
|
Thai: Thai$2,
|
|
13010
13001
|
Filipino: Filipino$2,
|
|
13011
13002
|
English: English$2,
|
|
@@ -13099,11 +13090,9 @@ const Collapse$1 = "संक्षिप्त करें";
|
|
|
13099
13090
|
const Multilingual$1 = "बहुभाषी";
|
|
13100
13091
|
const Arabic$1 = "अरबी";
|
|
13101
13092
|
const Tamil$1 = "तमिल";
|
|
13102
|
-
const Malayalam$1 = "मलयालम";
|
|
13103
13093
|
const Telugu$1 = "तेलुगु";
|
|
13104
13094
|
const Kannada$1 = "कन्नड़";
|
|
13105
13095
|
const Hindi$1 = "हिंदी";
|
|
13106
|
-
const Malay$1 = "मलय";
|
|
13107
13096
|
const Thai$1 = "थाई";
|
|
13108
13097
|
const Filipino$1 = "फिलिपिनो";
|
|
13109
13098
|
const English$1 = "अंग्रेज़ी";
|
|
@@ -13229,12 +13218,11 @@ const hi = {
|
|
|
13229
13218
|
Multilingual: Multilingual$1,
|
|
13230
13219
|
Arabic: Arabic$1,
|
|
13231
13220
|
Tamil: Tamil$1,
|
|
13232
|
-
Malayalam:
|
|
13221
|
+
"Malay / Malayalam": "मलय / मलयालम",
|
|
13233
13222
|
Telugu: Telugu$1,
|
|
13234
13223
|
Kannada: Kannada$1,
|
|
13235
13224
|
Hindi: Hindi$1,
|
|
13236
13225
|
"Bahasa Indonesia": "बहासा इंडोनेशिया",
|
|
13237
|
-
Malay: Malay$1,
|
|
13238
13226
|
Thai: Thai$1,
|
|
13239
13227
|
Filipino: Filipino$1,
|
|
13240
13228
|
English: English$1,
|
|
@@ -13326,11 +13314,9 @@ const Collapse = "Ciutkan";
|
|
|
13326
13314
|
const Multilingual = "Multibahasa";
|
|
13327
13315
|
const Arabic = "Arab";
|
|
13328
13316
|
const Tamil = "Tamil";
|
|
13329
|
-
const Malayalam = "Malayalam";
|
|
13330
13317
|
const Telugu = "Telugu";
|
|
13331
13318
|
const Kannada = "Kannada";
|
|
13332
13319
|
const Hindi = "Hindi";
|
|
13333
|
-
const Malay = "Melayu";
|
|
13334
13320
|
const Thai = "Thai";
|
|
13335
13321
|
const Filipino = "Filipina";
|
|
13336
13322
|
const English = "Bahasa Inggris";
|
|
@@ -13456,12 +13442,11 @@ const id = {
|
|
|
13456
13442
|
Multilingual,
|
|
13457
13443
|
Arabic,
|
|
13458
13444
|
Tamil,
|
|
13459
|
-
Malayalam,
|
|
13445
|
+
"Malay / Malayalam": "Melayu / Malayalam",
|
|
13460
13446
|
Telugu,
|
|
13461
13447
|
Kannada,
|
|
13462
13448
|
Hindi,
|
|
13463
13449
|
"Bahasa Indonesia": "Bahasa Indonesia",
|
|
13464
|
-
Malay,
|
|
13465
13450
|
Thai,
|
|
13466
13451
|
Filipino,
|
|
13467
13452
|
English,
|
|
@@ -13534,27 +13519,27 @@ var LanguageCode;
|
|
|
13534
13519
|
var TranscriptionLanguageCode;
|
|
13535
13520
|
(function(TranscriptionLanguageCode2) {
|
|
13536
13521
|
TranscriptionLanguageCode2["ar"] = "ar";
|
|
13537
|
-
TranscriptionLanguageCode2["
|
|
13522
|
+
TranscriptionLanguageCode2["ca"] = "ca";
|
|
13523
|
+
TranscriptionLanguageCode2["cs"] = "cs";
|
|
13538
13524
|
TranscriptionLanguageCode2["de"] = "de";
|
|
13525
|
+
TranscriptionLanguageCode2["en_GB"] = "en_GB";
|
|
13526
|
+
TranscriptionLanguageCode2["en_US"] = "en_US";
|
|
13539
13527
|
TranscriptionLanguageCode2["es"] = "es";
|
|
13540
|
-
TranscriptionLanguageCode2["fil"] = "fil";
|
|
13541
13528
|
TranscriptionLanguageCode2["fr"] = "fr";
|
|
13542
|
-
TranscriptionLanguageCode2["id"] = "id";
|
|
13543
13529
|
TranscriptionLanguageCode2["hi"] = "hi";
|
|
13530
|
+
TranscriptionLanguageCode2["id"] = "id";
|
|
13531
|
+
TranscriptionLanguageCode2["it"] = "it";
|
|
13544
13532
|
TranscriptionLanguageCode2["ja"] = "ja";
|
|
13545
13533
|
TranscriptionLanguageCode2["kn"] = "kn";
|
|
13546
|
-
TranscriptionLanguageCode2["ml"] = "ml";
|
|
13547
13534
|
TranscriptionLanguageCode2["ms"] = "ms";
|
|
13535
|
+
TranscriptionLanguageCode2["pt"] = "pt";
|
|
13536
|
+
TranscriptionLanguageCode2["sv"] = "sv";
|
|
13548
13537
|
TranscriptionLanguageCode2["ta"] = "ta";
|
|
13549
13538
|
TranscriptionLanguageCode2["te"] = "te";
|
|
13550
13539
|
TranscriptionLanguageCode2["th"] = "th";
|
|
13540
|
+
TranscriptionLanguageCode2["ur"] = "ur";
|
|
13551
13541
|
TranscriptionLanguageCode2["zh"] = "zh";
|
|
13552
|
-
TranscriptionLanguageCode2["
|
|
13553
|
-
TranscriptionLanguageCode2["pt"] = "pt";
|
|
13554
|
-
TranscriptionLanguageCode2["ca"] = "ca";
|
|
13555
|
-
TranscriptionLanguageCode2["eu"] = "eu";
|
|
13556
|
-
TranscriptionLanguageCode2["gl"] = "gl";
|
|
13557
|
-
TranscriptionLanguageCode2["multilingual"] = "";
|
|
13542
|
+
TranscriptionLanguageCode2["multilingual"] = "multi";
|
|
13558
13543
|
})(TranscriptionLanguageCode || (TranscriptionLanguageCode = {}));
|
|
13559
13544
|
LanguageCode.es;
|
|
13560
13545
|
const languages = [
|
|
@@ -13587,25 +13572,31 @@ const languages = [
|
|
|
13587
13572
|
const transcriptionLanguages = [
|
|
13588
13573
|
{ label: "Multilingual", value: TranscriptionLanguageCode.multilingual },
|
|
13589
13574
|
{ label: "Español", value: TranscriptionLanguageCode.es },
|
|
13590
|
-
{
|
|
13575
|
+
{
|
|
13576
|
+
label: "English (US)",
|
|
13577
|
+
value: TranscriptionLanguageCode.en_US
|
|
13578
|
+
},
|
|
13579
|
+
{
|
|
13580
|
+
label: "English (UK)",
|
|
13581
|
+
value: TranscriptionLanguageCode.en_GB
|
|
13582
|
+
},
|
|
13591
13583
|
{ label: "Français", value: TranscriptionLanguageCode.fr },
|
|
13592
13584
|
{ label: "Deutsch", value: TranscriptionLanguageCode.de },
|
|
13593
13585
|
{ label: "Italiano", value: TranscriptionLanguageCode.it },
|
|
13594
13586
|
{ label: "Português", value: TranscriptionLanguageCode.pt },
|
|
13595
13587
|
{ label: "Català", value: TranscriptionLanguageCode.ca },
|
|
13596
|
-
{ label: "Euskera", value: TranscriptionLanguageCode.eu },
|
|
13597
|
-
{ label: "Galego", value: TranscriptionLanguageCode.gl },
|
|
13598
13588
|
{ label: "Arabic", value: TranscriptionLanguageCode.ar },
|
|
13589
|
+
{ label: "Čeština", value: TranscriptionLanguageCode.cs },
|
|
13599
13590
|
{ label: "Bahasa Indonesia", value: TranscriptionLanguageCode.id },
|
|
13600
13591
|
{ label: "Chinese", value: TranscriptionLanguageCode.zh },
|
|
13601
|
-
{ label: "Filipino", value: TranscriptionLanguageCode.fil },
|
|
13602
13592
|
{ label: "Hindi", value: TranscriptionLanguageCode.hi },
|
|
13603
13593
|
{ label: "Japanese", value: TranscriptionLanguageCode.ja },
|
|
13604
13594
|
{ label: "Kannada", value: TranscriptionLanguageCode.kn },
|
|
13605
|
-
{ label: "Malay", value: TranscriptionLanguageCode.ms },
|
|
13606
|
-
{ label: "Malayalam", value: TranscriptionLanguageCode.ml },
|
|
13595
|
+
{ label: "Malay / Malayalam", value: TranscriptionLanguageCode.ms },
|
|
13607
13596
|
{ label: "Tamil", value: TranscriptionLanguageCode.ta },
|
|
13608
13597
|
{ label: "Telugu", value: TranscriptionLanguageCode.te },
|
|
13598
|
+
{ label: "Urdu", value: TranscriptionLanguageCode.ur },
|
|
13599
|
+
{ label: "Svenska", value: TranscriptionLanguageCode.sv },
|
|
13609
13600
|
{ label: "Thai", value: TranscriptionLanguageCode.th }
|
|
13610
13601
|
];
|
|
13611
13602
|
function bind(fn, thisArg) {
|
|
@@ -16084,7 +16075,7 @@ const {
|
|
|
16084
16075
|
getAdapter,
|
|
16085
16076
|
mergeConfig: mergeConfig$1
|
|
16086
16077
|
} = axios;
|
|
16087
|
-
const version$1 = "0.0.
|
|
16078
|
+
const version$1 = "0.0.11";
|
|
16088
16079
|
const handleApiError = async (error) => {
|
|
16089
16080
|
return Promise.reject(error);
|
|
16090
16081
|
};
|
|
@@ -16663,7 +16654,7 @@ const SettingsProvider = ({ predefinedLanguage, templateId, toolArgs, children }
|
|
|
16663
16654
|
const profile = await SettingsApi.getSettings(templateId, toolArgs);
|
|
16664
16655
|
const newDictionary = (profile == null ? void 0 : profile[SettingsApiKeys.dictionary]) || [];
|
|
16665
16656
|
const newLanguage = (profile == null ? void 0 : profile[SettingsApiKeys.language]) || (predefinedLanguage != null ? predefinedLanguage : getUserDefaultLanguage().code);
|
|
16666
|
-
const newTranscriptionLanguage = profile == null ? void 0 : profile[SettingsApiKeys.transcriptionLanguage];
|
|
16657
|
+
const newTranscriptionLanguage = (profile == null ? void 0 : profile[SettingsApiKeys.transcriptionLanguage]) || TranscriptionLanguageCode.multilingual;
|
|
16667
16658
|
const newSources = Array.isArray(profile == null ? void 0 : profile[SettingsApiKeys.sources]) ? profile[SettingsApiKeys.sources] : null;
|
|
16668
16659
|
const newAvailableSources = Array.isArray(profile == null ? void 0 : profile[SettingsApiKeys.availableSources]) ? profile[SettingsApiKeys.availableSources] : [];
|
|
16669
16660
|
const newCustomTemplate = (profile == null ? void 0 : profile[SettingsApiKeys.template]) ? {
|
|
@@ -16759,7 +16750,7 @@ const SettingsProvider = ({ predefinedLanguage, templateId, toolArgs, children }
|
|
|
16759
16750
|
try {
|
|
16760
16751
|
setTranscriptionLanguage(lang);
|
|
16761
16752
|
SettingsCache.getInstance().setTranscriptionLanguage(lang);
|
|
16762
|
-
const dBLanguage = lang
|
|
16753
|
+
const dBLanguage = lang;
|
|
16763
16754
|
await SettingsApi.updateSetting(SettingsApiKeys.transcriptionLanguage, dBLanguage);
|
|
16764
16755
|
} catch (error) {
|
|
16765
16756
|
logger.settingsError("Error updating transcription language:", error);
|
|
@@ -97292,7 +97283,7 @@ const ReportButton = ({ onFillClick }) => {
|
|
|
97292
97283
|
};
|
|
97293
97284
|
return jsxRuntimeExports.jsxs("div", { className: "omniscribe_report-button-container", children: [renderContent(), jsxRuntimeExports.jsx(LoadingModal, { isLoading: transcriptorLoader || generating || loading, message: loading ? "Por favor espera mientras rellenamos con el reporte" : void 0 })] });
|
|
97294
97285
|
};
|
|
97295
|
-
const CustomSelect = ({ options, onChange, selectedNumber = 0 }) => {
|
|
97286
|
+
const CustomSelect = ({ options, onChange, selectedNumber = 0, maxVisibleItems }) => {
|
|
97296
97287
|
const dropdownRef = reactExports.useRef(null);
|
|
97297
97288
|
const [selected, setSelected] = reactExports.useState(options[selectedNumber]);
|
|
97298
97289
|
const [isOpen, setIsOpen] = reactExports.useState(false);
|
|
@@ -97332,7 +97323,9 @@ const CustomSelect = ({ options, onChange, selectedNumber = 0 }) => {
|
|
|
97332
97323
|
height: "calc(var(--spacing) * 5)",
|
|
97333
97324
|
color: "var(--color-gray-900)",
|
|
97334
97325
|
marginLeft: "calc(var(--spacing) * 2)"
|
|
97335
|
-
} })] }), isOpen && jsxRuntimeExports.jsx("div", { className: "omniscribe_select-content-container", children: jsxRuntimeExports.jsx("ul", { className: "omniscribe_select-content-ul scrollbar-pretty",
|
|
97326
|
+
} })] }), isOpen && jsxRuntimeExports.jsx("div", { className: "omniscribe_select-content-container", children: jsxRuntimeExports.jsx("ul", { className: "omniscribe_select-content-ul scrollbar-pretty", style: maxVisibleItems ? {
|
|
97327
|
+
maxHeight: `calc(var(--spacing) * ${maxVisibleItems * 11} + var(--spacing) * 2)`
|
|
97328
|
+
} : void 0, children: options.map((option) => {
|
|
97336
97329
|
var _a2;
|
|
97337
97330
|
return jsxRuntimeExports.jsxs("li", { onMouseDown: (e) => {
|
|
97338
97331
|
e.stopPropagation();
|
|
@@ -97777,7 +97770,7 @@ const LanguageSelector = () => {
|
|
|
97777
97770
|
const { code: code2 } = await getLanguageByCode(value);
|
|
97778
97771
|
await updateLanguage(code2);
|
|
97779
97772
|
};
|
|
97780
|
-
return jsxRuntimeExports.jsx("div", { className: "w-full", "data-testid": "language-selector", children: jsxRuntimeExports.jsx(CustomSelect, { options: langOptions, onChange: handleLanguageChange, selectedNumber, className: "w-full" }) });
|
|
97773
|
+
return jsxRuntimeExports.jsx("div", { className: "w-full", "data-testid": "language-selector", children: jsxRuntimeExports.jsx(CustomSelect, { options: langOptions, onChange: handleLanguageChange, selectedNumber, className: "w-full", maxVisibleItems: 3 }) });
|
|
97781
97774
|
};
|
|
97782
97775
|
const TranscriptionLanguageSelector = () => {
|
|
97783
97776
|
const { updateTranscriptionLanguage, transcriptionLanguage } = useSettingsContext();
|
|
@@ -97794,7 +97787,7 @@ const TranscriptionLanguageSelector = () => {
|
|
|
97794
97787
|
logger.settingsError("Error updating transcription language:", error);
|
|
97795
97788
|
}
|
|
97796
97789
|
};
|
|
97797
|
-
return jsxRuntimeExports.jsx("div", { className: "w-full", "data-testid": "transcription-language-selector", children: jsxRuntimeExports.jsx(CustomSelect, { options: transcriptionLanguageOptions, onChange: handleTranscriptionLanguageChange, selectedNumber: getSelectedIndex, className: "w-full" }) });
|
|
97790
|
+
return jsxRuntimeExports.jsx("div", { className: "w-full", "data-testid": "transcription-language-selector", children: jsxRuntimeExports.jsx(CustomSelect, { options: transcriptionLanguageOptions, onChange: handleTranscriptionLanguageChange, selectedNumber: getSelectedIndex, className: "w-full", maxVisibleItems: 4 }) });
|
|
97798
97791
|
};
|
|
97799
97792
|
const ConfigSection = ({ description, children, className = "" }) => {
|
|
97800
97793
|
return jsxRuntimeExports.jsxs("div", { className: `omniscribe_config-language-section ${className}`.trim(), children: [description && jsxRuntimeExports.jsx("p", { className: "omniscribe_config-subscreen-description", children: description }), children] });
|