@ntix/components-scorad 1.0.3 → 1.0.5

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.
Files changed (42) hide show
  1. package/README.md +0 -4
  2. package/dist/@ntix/components-scorad.es.js +31 -18
  3. package/dist/@ntix/components-scorad.umd.js +11 -11
  4. package/dist/HTMLScoradValueElement.d.ts +37 -0
  5. package/dist/ScoradData.d.ts +1 -1
  6. package/dist/ScoradExtentData.d.ts +11 -7
  7. package/dist/ScoradExtentWeights.d.ts +1 -1
  8. package/dist/ScoradIntensityData.d.ts +11 -7
  9. package/dist/ScoradResources.d.ts +11 -0
  10. package/dist/ScoradScore.d.ts +14 -1
  11. package/dist/ScoradSubjectiveData.d.ts +7 -3
  12. package/dist/component.d.ts +35 -7
  13. package/dist/componentsScoradLogger.d.ts +8 -0
  14. package/dist/constants.d.ts +19 -4
  15. package/dist/extent/component.d.ts +45 -8
  16. package/dist/getScoradScore.d.ts +1 -2
  17. package/dist/index.d.ts +1 -0
  18. package/dist/intensity/component.d.ts +39 -7
  19. package/dist/label/component.d.ts +1 -1
  20. package/dist/options/component.d.ts +4 -7
  21. package/dist/subjective/component.d.ts +40 -7
  22. package/dist/weightings/component.d.ts +30 -7
  23. package/docs/HTMLScoradValueElement.md +35 -0
  24. package/docs/README.md +36 -0
  25. package/docs/ScoradData.md +13 -0
  26. package/docs/ScoradExtentData.md +63 -0
  27. package/docs/ScoradExtentWeights.md +13 -0
  28. package/docs/ScoradIntensityData.md +64 -0
  29. package/docs/ScoradResources.md +41 -0
  30. package/docs/ScoradScore.md +47 -0
  31. package/docs/ScoradSubjectiveData.md +32 -0
  32. package/docs/component.md +68 -0
  33. package/docs/componentsScoradLogger.md +14 -0
  34. package/docs/constants.md +99 -0
  35. package/docs/extent.component.md +86 -0
  36. package/docs/getScoradScore.md +25 -0
  37. package/docs/intensity.component.md +77 -0
  38. package/docs/selectScoradWeights.md +25 -0
  39. package/docs/subjective.component.md +77 -0
  40. package/docs/validateScoradData.md +26 -0
  41. package/docs/weightings.component.md +59 -0
  42. package/package.json +4 -2
@@ -0,0 +1,64 @@
1
+ [**@ntix/components-scorad**](README.md)
2
+
3
+ ***
4
+
5
+ ## Type Aliases
6
+
7
+ ### ScoradIntensityData
8
+
9
+ ```ts
10
+ type ScoradIntensityData = object;
11
+ ```
12
+
13
+ Represents the single assessment of the six clinical signs from a representative lesion area.
14
+ Used for calculating the Intensity Score (B).
15
+
16
+ #### Properties
17
+
18
+ ##### erythema
19
+
20
+ ```ts
21
+ erythema: number;
22
+ ```
23
+
24
+ Erythema (Redness).
25
+
26
+ ##### excoriations
27
+
28
+ ```ts
29
+ excoriations: number;
30
+ ```
31
+
32
+ Excoriations (Scratch marks).
33
+
34
+ ##### lichenification
35
+
36
+ ```ts
37
+ lichenification: number;
38
+ ```
39
+
40
+ Lichenification (Skin thickening).
41
+
42
+ ##### oedemaPapulation
43
+
44
+ ```ts
45
+ oedemaPapulation: number;
46
+ ```
47
+
48
+ Oedema and Papulation (Swelling/Bumps).
49
+
50
+ ##### oozingCrusting
51
+
52
+ ```ts
53
+ oozingCrusting: number;
54
+ ```
55
+
56
+ Oozing and Crusting.
57
+
58
+ ##### xerosis
59
+
60
+ ```ts
61
+ xerosis: number;
62
+ ```
63
+
64
+ Xerosis (Dryness).
@@ -0,0 +1,41 @@
1
+ [**@ntix/components-scorad**](README.md)
2
+
3
+ ***
4
+
5
+ ## Type Aliases
6
+
7
+ ### ScoradResource
8
+
9
+ ```ts
10
+ type ScoradResource = object;
11
+ ```
12
+
13
+ A single resource item containing UI text strings.
14
+
15
+ ***
16
+
17
+ ### ScoradResourceMap
18
+
19
+ ```ts
20
+ type ScoradResourceMap<T> = { [P in keyof T]: T[P] extends object ? ScoradResourceMap<T[P]> : ScoradResource };
21
+ ```
22
+
23
+ A recursive type that mirrors the structure of a SCORAD data record,
24
+ replacing leaf values with ScoradResource objects.
25
+
26
+ #### Type Parameters
27
+
28
+ | Type Parameter |
29
+ | ------ |
30
+ | `T` |
31
+
32
+ ## Variables
33
+
34
+ ### ScoradResources
35
+
36
+ ```ts
37
+ const ScoradResources: ScoradResourceMap<ScoradData>;
38
+ ```
39
+
40
+ Localization and UI resources for the SCORAD component.
41
+ Maps data keys to human-readable labels and descriptions for display in the UI.
@@ -0,0 +1,47 @@
1
+ [**@ntix/components-scorad**](README.md)
2
+
3
+ ***
4
+
5
+ ## Type Aliases
6
+
7
+ ### ScoradScore
8
+
9
+ ```ts
10
+ type ScoradScore = object;
11
+ ```
12
+
13
+ Computed SCORAD values representing the three clinical sections and the final sum.
14
+
15
+ #### Properties
16
+
17
+ ##### A
18
+
19
+ ```ts
20
+ A: number;
21
+ ```
22
+
23
+ Extent (Surface Area): The percentage of body surface area affected, weighted by age.
24
+
25
+ ##### B
26
+
27
+ ```ts
28
+ B: number;
29
+ ```
30
+
31
+ Intensity: The sum of the six clinical sign grades (Erythema, Oedema, etc.).
32
+
33
+ ##### C
34
+
35
+ ```ts
36
+ C: number;
37
+ ```
38
+
39
+ Subjective Symptoms: The sum of patient-reported pruritus and sleeplessness scores.
40
+
41
+ ##### total
42
+
43
+ ```ts
44
+ total: number;
45
+ ```
46
+
47
+ The final calculated score using the standard formula: A/5 + 7B/2 + C.
@@ -0,0 +1,32 @@
1
+ [**@ntix/components-scorad**](README.md)
2
+
3
+ ***
4
+
5
+ ## Type Aliases
6
+
7
+ ### ScoradSubjectiveData
8
+
9
+ ```ts
10
+ type ScoradSubjectiveData = object;
11
+ ```
12
+
13
+ Represents the patient-reported scores for subjective symptoms (Itch/Sleeplessness).
14
+ Used for calculating the Subjective Score (C).
15
+
16
+ #### Properties
17
+
18
+ ##### pruritus
19
+
20
+ ```ts
21
+ pruritus: number;
22
+ ```
23
+
24
+ Visual Analog Scale (VAS) score (0-10) for Pruritus (Itch) over the last 3 days/nights.
25
+
26
+ ##### sleeplessness
27
+
28
+ ```ts
29
+ sleeplessness: number;
30
+ ```
31
+
32
+ Visual Analog Scale (VAS) score (0-10) for Sleeplessness over the last 3 days/nights.
@@ -0,0 +1,68 @@
1
+ [**@ntix/components-scorad**](README.md)
2
+
3
+ ***
4
+
5
+ ## Classes
6
+
7
+ ### HTMLScoradElement
8
+
9
+ Root component for calculating and displaying the total SCORAD (SCORing Atopic Dermatitis).
10
+
11
+ This component aggregates data from Extent, Intensity, and Subjective sub-components
12
+ to calculate the final clinical score.
13
+
14
+ #### Extends
15
+
16
+ - `HTMLComponentElement`\<[`HTMLScoradValueElement`](HTMLScoradValueElement.md#htmlscoradvalueelement)\<[`ScoradData`](ScoradData.md#scoraddata)\>\>
17
+
18
+ #### Events
19
+
20
+ ##### valueChange
21
+
22
+ ```ts
23
+ readonly valueChange: EventEmitter<ScoradData>;
24
+ ```
25
+
26
+ Fired when the value is finalized or "committed" by the user.
27
+
28
+ ###### Param
29
+
30
+ The final updated value.
31
+
32
+ ##### valueInput
33
+
34
+ ```ts
35
+ readonly valueInput: EventEmitter<ScoradData>;
36
+ ```
37
+
38
+ Fired immediately as the user interacts with the input (high frequency).
39
+
40
+ ###### Param
41
+
42
+ The current value during input.
43
+
44
+ #### Properties
45
+
46
+ ##### readonly
47
+
48
+ ```ts
49
+ readonly: boolean = false;
50
+ ```
51
+
52
+ Value is readonly
53
+
54
+ ##### showErrors
55
+
56
+ ```ts
57
+ showErrors: boolean = false;
58
+ ```
59
+
60
+ Show the errors from validation on the components
61
+
62
+ ##### value
63
+
64
+ ```ts
65
+ value: ScoradData = SCORAD_DEFAULT;
66
+ ```
67
+
68
+ The current value of the component.
@@ -0,0 +1,14 @@
1
+ [**@ntix/components-scorad**](README.md)
2
+
3
+ ***
4
+
5
+ ## Variables
6
+
7
+ ### componentsScoradLogger
8
+
9
+ ```ts
10
+ const componentsScoradLogger: ILogger;
11
+ ```
12
+
13
+ Internal logger instance for @ntix/components-scorad.
14
+ Configured with a dedicated namespace and the resolved logLevel.
@@ -0,0 +1,99 @@
1
+ [**@ntix/components-scorad**](README.md)
2
+
3
+ ***
4
+
5
+ ## Variables
6
+
7
+ ### SCORAD\_ADULT\_WEIGHTS
8
+
9
+ ```ts
10
+ const SCORAD_ADULT_WEIGHTS: ScoradExtentWeights;
11
+ ```
12
+
13
+ Configuration map for the Body Surface Area (BSA) weights for adult SCORAD Extent (A) calculation.
14
+ The values are decimals representing the percentage of total BSA.
15
+
16
+ ***
17
+
18
+ ### SCORAD\_CHILD\_WEIGHTS
19
+
20
+ ```ts
21
+ const SCORAD_CHILD_WEIGHTS: ScoradExtentWeights;
22
+ ```
23
+
24
+ Configuration map for the Body Surface Area (BSA) weights for child SCORAD Extent (A) calculation.
25
+ The head and neck area is proportionally larger than in adults.
26
+
27
+ ***
28
+
29
+ ### SCORAD\_DEFAULT
30
+
31
+ ```ts
32
+ const SCORAD_DEFAULT: ScoradData;
33
+ ```
34
+
35
+ Global default state for a complete SCORAD assessment.
36
+ Uses adult weighting by default.
37
+
38
+ ***
39
+
40
+ ### SCORAD\_EXTENT\_DEFAULT
41
+
42
+ ```ts
43
+ const SCORAD_EXTENT_DEFAULT: ScoradExtentData;
44
+ ```
45
+
46
+ Initial state for SCORAD Extent data.
47
+ All regions are initialized as non-null to satisfy record constraints.
48
+
49
+ ***
50
+
51
+ ### SCORAD\_EXTENT\_MAX\_VALUE
52
+
53
+ ```ts
54
+ const SCORAD_EXTENT_MAX_VALUE: number = 100;
55
+ ```
56
+
57
+ Maximum percentage value allowed for any body region in the Extent (A) calculation.
58
+
59
+ ***
60
+
61
+ ### SCORAD\_INTENSITY\_DEFAULT
62
+
63
+ ```ts
64
+ const SCORAD_INTENSITY_DEFAULT: ScoradIntensityData;
65
+ ```
66
+
67
+ Initial state for SCORAD Intensity data.
68
+ Represents a baseline where no clinical signs have been graded.
69
+
70
+ ***
71
+
72
+ ### SCORAD\_INTENSITY\_MAX\_VALUE
73
+
74
+ ```ts
75
+ const SCORAD_INTENSITY_MAX_VALUE: number = 3;
76
+ ```
77
+
78
+ Maximum grade (0-3) allowed for clinical signs in the Intensity (B) calculation.
79
+
80
+ ***
81
+
82
+ ### SCORAD\_SUBJECTIVE\_DEFAULT
83
+
84
+ ```ts
85
+ const SCORAD_SUBJECTIVE_DEFAULT: ScoradSubjectiveData;
86
+ ```
87
+
88
+ Initial state for SCORAD Subjective data.
89
+ Represents a baseline for pruritus and sleeplessness.
90
+
91
+ ***
92
+
93
+ ### SCORAD\_SUBJECTIVE\_MAX\_VALUE
94
+
95
+ ```ts
96
+ const SCORAD_SUBJECTIVE_MAX_VALUE: number = 10;
97
+ ```
98
+
99
+ Maximum value (0-10) allowed for patient-reported symptoms in the Subjective (C) calculation.
@@ -0,0 +1,86 @@
1
+ [**@ntix/components-scorad**](README.md)
2
+
3
+ ***
4
+
5
+ ## Classes
6
+
7
+ ### HTMLScoradExtentElement
8
+
9
+ Interactive SVG component for calculating the 'Extent' (A) section of the SCORAD score.
10
+
11
+ Users can interact with different body regions (head, trunk, limbs) via pointer gestures
12
+ or keyboard input to define the percentage of affected surface area. The component
13
+ supports different surface area weightings based on the `child` attribute.
14
+
15
+ #### Extends
16
+
17
+ - `HTMLComponentElement`\<[`HTMLScoradValueElement`](HTMLScoradValueElement.md#htmlscoradvalueelement)\<[`ScoradExtentData`](ScoradExtentData.md#scoradextentdata)\>\>
18
+
19
+ #### Events
20
+
21
+ ##### valueChange
22
+
23
+ ```ts
24
+ readonly valueChange: EventEmitter<ScoradExtentData>;
25
+ ```
26
+
27
+ Fired when the value is finalized or "committed" by the user.
28
+
29
+ ###### Param
30
+
31
+ The final updated value.
32
+
33
+ ##### valueInput
34
+
35
+ ```ts
36
+ readonly valueInput: EventEmitter<ScoradExtentData>;
37
+ ```
38
+
39
+ Fired immediately as the user interacts with the input (high frequency).
40
+
41
+ ###### Param
42
+
43
+ The current value during input.
44
+
45
+ #### Properties
46
+
47
+ ##### child
48
+
49
+ ```ts
50
+ child: boolean = false;
51
+ ```
52
+
53
+ Extent score is to be weighted as a child or adult
54
+
55
+ ##### errors?
56
+
57
+ ```ts
58
+ optional errors: Record<string, string>;
59
+ ```
60
+
61
+ validation errors
62
+ shows as has-errors attribute
63
+
64
+ ##### readonly
65
+
66
+ ```ts
67
+ readonly: boolean = false;
68
+ ```
69
+
70
+ Value is readonly
71
+
72
+ ##### score?
73
+
74
+ ```ts
75
+ optional score: number;
76
+ ```
77
+
78
+ Subjective SCORAD score (A)
79
+
80
+ ##### value
81
+
82
+ ```ts
83
+ value: ScoradExtentData = SCORAD_EXTENT_DEFAULT;
84
+ ```
85
+
86
+ The current value of the component.
@@ -0,0 +1,25 @@
1
+ [**@ntix/components-scorad**](README.md)
2
+
3
+ ***
4
+
5
+ ## Functions
6
+
7
+ ### getScoradScore()
8
+
9
+ ```ts
10
+ function getScoradScore(data): Result<ScoradScore>;
11
+ ```
12
+
13
+ Calculates the final composite SCORAD score (A/5 + 7B/2 + C) from the raw data.
14
+
15
+ #### Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | ------ | ------ | ------ |
19
+ | `data` | [`ScoradData`](ScoradData.md#scoraddata) \| `null` \| `undefined` | The complete ScoradData input object. |
20
+
21
+ #### Returns
22
+
23
+ `Result`\<[`ScoradScore`](ScoradScore.md#scoradscore)\>
24
+
25
+ The final SCORAD score, rounded to two decimal places.
@@ -0,0 +1,77 @@
1
+ [**@ntix/components-scorad**](README.md)
2
+
3
+ ***
4
+
5
+ ## Classes
6
+
7
+ ### HTMLScoradIntensityElement
8
+
9
+ Component for assessing the 'Intensity' (B) criteria of the SCORAD score.
10
+
11
+ It renders a list of clinical signs (e.g., Erythema, Edema, Oozing) and allows
12
+ the user to grade each on a scale of 0 to 3 using integrated option pickers.
13
+
14
+ #### Extends
15
+
16
+ - `HTMLComponentElement`\<[`HTMLScoradValueElement`](HTMLScoradValueElement.md#htmlscoradvalueelement)\<[`ScoradIntensityData`](ScoradIntensityData.md#scoradintensitydata)\>\>
17
+
18
+ #### Events
19
+
20
+ ##### valueChange
21
+
22
+ ```ts
23
+ readonly valueChange: EventEmitter<ScoradIntensityData>;
24
+ ```
25
+
26
+ Fired when the value is finalized or "committed" by the user.
27
+
28
+ ###### Param
29
+
30
+ The final updated value.
31
+
32
+ ##### valueInput
33
+
34
+ ```ts
35
+ readonly valueInput: EventEmitter<ScoradIntensityData>;
36
+ ```
37
+
38
+ Fired immediately as the user interacts with the input (high frequency).
39
+
40
+ ###### Param
41
+
42
+ The current value during input.
43
+
44
+ #### Properties
45
+
46
+ ##### errors?
47
+
48
+ ```ts
49
+ optional errors: Record<string, string>;
50
+ ```
51
+
52
+ validation errors
53
+ shows as has-errors attribute
54
+
55
+ ##### readonly
56
+
57
+ ```ts
58
+ readonly: boolean = false;
59
+ ```
60
+
61
+ Value is readonly
62
+
63
+ ##### score?
64
+
65
+ ```ts
66
+ optional score: number;
67
+ ```
68
+
69
+ Subjective SCORAD score (B)
70
+
71
+ ##### value
72
+
73
+ ```ts
74
+ value: ScoradIntensityData = SCORAD_INTENSITY_DEFAULT;
75
+ ```
76
+
77
+ The current value of the component.
@@ -0,0 +1,25 @@
1
+ [**@ntix/components-scorad**](README.md)
2
+
3
+ ***
4
+
5
+ ## Functions
6
+
7
+ ### selectScoradWeights()
8
+
9
+ ```ts
10
+ function selectScoradWeights(data): ScoradExtentWeights;
11
+ ```
12
+
13
+ Select the weights by the data passed
14
+
15
+ #### Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | ------ | ------ | ------ |
19
+ | `data` | [`ScoradData`](ScoradData.md#scoraddata) \| `null` \| `undefined` | scorad data |
20
+
21
+ #### Returns
22
+
23
+ [`ScoradExtentWeights`](ScoradExtentWeights.md#scoradextentweights)
24
+
25
+ weights to use
@@ -0,0 +1,77 @@
1
+ [**@ntix/components-scorad**](README.md)
2
+
3
+ ***
4
+
5
+ ## Classes
6
+
7
+ ### HTMLScoradSubjectiveElement
8
+
9
+ Component for assessing the 'Subjective' (C) criteria of the SCORAD score.
10
+
11
+ It provides visual analog scales (VAS) for patients to self-report symptoms
12
+ such as pruritus (itching) and insomnia (sleep loss) over the last 3 days.
13
+
14
+ #### Extends
15
+
16
+ - `HTMLComponentElement`\<[`HTMLScoradValueElement`](HTMLScoradValueElement.md#htmlscoradvalueelement)\<[`ScoradSubjectiveData`](ScoradSubjectiveData.md#scoradsubjectivedata)\>\>
17
+
18
+ #### Events
19
+
20
+ ##### valueChange
21
+
22
+ ```ts
23
+ readonly valueChange: EventEmitter<ScoradSubjectiveData>;
24
+ ```
25
+
26
+ Fired when the value is finalized or "committed" by the user.
27
+
28
+ ###### Param
29
+
30
+ The final updated value.
31
+
32
+ ##### valueInput
33
+
34
+ ```ts
35
+ readonly valueInput: EventEmitter<ScoradSubjectiveData>;
36
+ ```
37
+
38
+ Fired immediately as the user interacts with the input (high frequency).
39
+
40
+ ###### Param
41
+
42
+ The current value during input.
43
+
44
+ #### Properties
45
+
46
+ ##### errors?
47
+
48
+ ```ts
49
+ optional errors: Record<string, string>;
50
+ ```
51
+
52
+ validation errors
53
+ shows as has-errors attribute
54
+
55
+ ##### readonly
56
+
57
+ ```ts
58
+ readonly: boolean = false;
59
+ ```
60
+
61
+ Value is readonly
62
+
63
+ ##### score?
64
+
65
+ ```ts
66
+ optional score: number;
67
+ ```
68
+
69
+ Subjective SCORAD score (C)
70
+
71
+ ##### value
72
+
73
+ ```ts
74
+ value: ScoradSubjectiveData = SCORAD_SUBJECTIVE_DEFAULT;
75
+ ```
76
+
77
+ The current value of the component.
@@ -0,0 +1,26 @@
1
+ [**@ntix/components-scorad**](README.md)
2
+
3
+ ***
4
+
5
+ ## Functions
6
+
7
+ ### validateScoradData()
8
+
9
+ ```ts
10
+ function validateScoradData(data): Result<ScoradData>;
11
+ ```
12
+
13
+ Validates all fields within the ScoradData object against their allowed clinical bounds.
14
+ Returns an array of error messages.
15
+
16
+ #### Parameters
17
+
18
+ | Parameter | Type | Description |
19
+ | ------ | ------ | ------ |
20
+ | `data` | [`ScoradData`](ScoradData.md#scoraddata) \| `null` \| `undefined` | The complete ScoradData input object. |
21
+
22
+ #### Returns
23
+
24
+ `Result`\<[`ScoradData`](ScoradData.md#scoraddata)\>
25
+
26
+ Result.