@beda.software/web-item-controls 0.1.25 → 0.1.27

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 (72) hide show
  1. package/dist/components/ModalQuestionnaireGroupItem/index.js +3 -2
  2. package/dist/components/SearchBar/SearchBarColumn/ChoiceColumn/hooks.js +3 -2
  3. package/dist/contexts/image-annotation.d.ts +23 -0
  4. package/dist/contexts/image-annotation.d.ts.map +1 -0
  5. package/dist/contexts/image-annotation.js +5 -0
  6. package/dist/contexts/index.d.ts +1 -0
  7. package/dist/contexts/index.d.ts.map +1 -1
  8. package/dist/contexts/index.js +4 -2
  9. package/dist/controls/Choice/index.js +11 -10
  10. package/dist/controls/Display/index.js +4 -2
  11. package/dist/controls/GroupTable/RenderFormItemReadOnly/index.js +4 -2
  12. package/dist/controls/ImageAnnotation/AnnotationImage.d.ts +9 -14
  13. package/dist/controls/ImageAnnotation/AnnotationImage.d.ts.map +1 -1
  14. package/dist/controls/ImageAnnotation/AnnotationImage.js +48 -32
  15. package/dist/controls/ImageAnnotation/BodyAnnotationImage/body-regions.d.ts +23 -0
  16. package/dist/controls/ImageAnnotation/BodyAnnotationImage/body-regions.d.ts.map +1 -0
  17. package/dist/controls/ImageAnnotation/BodyAnnotationImage/body-regions.js +436 -0
  18. package/dist/controls/ImageAnnotation/BodyAnnotationImage/index.d.ts +13 -0
  19. package/dist/controls/ImageAnnotation/BodyAnnotationImage/index.d.ts.map +1 -0
  20. package/dist/controls/ImageAnnotation/BodyAnnotationImage/index.js +95 -0
  21. package/dist/controls/ImageAnnotation/BodyAnnotationImage/labels.d.ts +3 -0
  22. package/dist/controls/ImageAnnotation/BodyAnnotationImage/labels.d.ts.map +1 -0
  23. package/dist/controls/ImageAnnotation/BodyAnnotationImage/labels.js +224 -0
  24. package/dist/controls/ImageAnnotation/BodyAnnotationImage/styles.d.ts +17 -0
  25. package/dist/controls/ImageAnnotation/BodyAnnotationImage/styles.d.ts.map +1 -0
  26. package/dist/controls/ImageAnnotation/BodyAnnotationImage/styles.js +42 -0
  27. package/dist/controls/ImageAnnotation/BodyAnnotationImage/utils.d.ts +17 -0
  28. package/dist/controls/ImageAnnotation/BodyAnnotationImage/utils.d.ts.map +1 -0
  29. package/dist/controls/ImageAnnotation/BodyAnnotationImage/utils.js +35 -0
  30. package/dist/controls/ImageAnnotation/index.d.ts +2 -3
  31. package/dist/controls/ImageAnnotation/index.d.ts.map +1 -1
  32. package/dist/controls/ImageAnnotation/index.js +60 -92
  33. package/dist/controls/ImageAnnotation/useAnnotationImageComponent.d.ts +5 -0
  34. package/dist/controls/ImageAnnotation/useAnnotationImageComponent.d.ts.map +1 -0
  35. package/dist/controls/ImageAnnotation/useAnnotationImageComponent.js +11 -0
  36. package/dist/controls/ImageAnnotation/utils.d.ts +14 -1
  37. package/dist/controls/ImageAnnotation/utils.d.ts.map +1 -1
  38. package/dist/controls/ImageAnnotation/utils.js +38 -6
  39. package/dist/controls/InlineChoice/index.d.ts.map +1 -1
  40. package/dist/controls/InlineChoice/index.js +46 -55
  41. package/dist/controls/InlineChoice/styles.d.ts +27 -0
  42. package/dist/controls/InlineChoice/styles.d.ts.map +1 -0
  43. package/dist/controls/InlineChoice/styles.js +40 -0
  44. package/dist/controls/InlineChoice/utils.d.ts +5 -0
  45. package/dist/controls/InlineChoice/utils.d.ts.map +1 -0
  46. package/dist/controls/InlineChoice/utils.js +11 -0
  47. package/dist/controls/controls.js +11 -14
  48. package/dist/controls/index.d.ts +1 -0
  49. package/dist/controls/index.d.ts.map +1 -1
  50. package/dist/controls/index.js +77 -75
  51. package/dist/locale/de/messages.d.ts.map +1 -1
  52. package/dist/locale/de/messages.js +1 -1
  53. package/dist/locale/en/messages.d.ts.map +1 -1
  54. package/dist/locale/en/messages.js +1 -1
  55. package/dist/locale/es/messages.d.ts.map +1 -1
  56. package/dist/locale/es/messages.js +1 -1
  57. package/dist/locale/ru/messages.d.ts.map +1 -1
  58. package/dist/locale/ru/messages.js +1 -1
  59. package/dist/readonly-controls/Display/index.js +4 -2
  60. package/dist/readonly-controls/ImageAnnotation/index.d.ts.map +1 -1
  61. package/dist/readonly-controls/ImageAnnotation/index.js +25 -30
  62. package/dist/readonly-controls/MarkdownRender/index.d.ts.map +1 -1
  63. package/dist/readonly-controls/MarkdownRender/index.js +51 -41
  64. package/package.json +3 -2
  65. package/src/locale/de/messages.po +172 -8
  66. package/src/locale/de/messages.ts +1 -1
  67. package/src/locale/en/messages.po +172 -8
  68. package/src/locale/en/messages.ts +1 -1
  69. package/src/locale/es/messages.po +172 -8
  70. package/src/locale/es/messages.ts +1 -1
  71. package/src/locale/ru/messages.po +172 -8
  72. package/src/locale/ru/messages.ts +1 -1
@@ -0,0 +1,436 @@
1
+ const t = {
2
+ width: 289,
3
+ height: 566
4
+ }, L = {
5
+ head: "M122.678 8.25714L115.6 34.2082L121.498 56.6204L133.294 67.2367L143.91 73.1347L158.065 64.8776L166.322 55.4408L171.041 29.4898L165.143 7.07755L143.91 0L122.678 8.25714Z",
6
+ leftNeck: "M160.425 68.416L146.269 96.7262V113.241L178.118 115.6L204.069 129.755L200.531 106.163L182.837 101.445L168.682 88.4691L160.425 68.416Z",
7
+ rightNeck: "M84 127.98L87.5388 105.567L105.233 99.6694L119.388 85.5143L128.824 69L141.8 96.1306L140.62 111.465L109.951 112.645L84 127.98Z",
8
+ leftShoulder: "M226.482 153.347L230.02 138.012L228.841 119.139L219.404 109.702L205.249 104.984L208.788 123.857L206.429 136.833L226.482 153.347Z",
9
+ rightShoulder: "M81.3919 136.833L61.3388 153.347L57.8 138.012L58.9796 117.959L70.7756 107.343H82.5715L77.8531 125.037L81.3919 136.833Z",
10
+ leftChest: "M149.808 120.318L147.449 159.245L167.502 167.502L195.812 160.424L204.069 136.833L179.298 120.318H149.808Z",
11
+ rightChest: "M86 132.976L90.7184 158.927L117.849 166.004L139.082 157.747L137.902 120H108.412L86 132.976Z",
12
+ leftFlank: "M198.171 182.836L194.633 165.143L169.861 172.22L173.4 185.196L174.58 240.636L189.914 227.661L192.273 201.71L198.171 182.836Z",
13
+ rightFlank: "M97.9061 226.481L95.5469 207.608L89.6489 182.836L93.1877 165.143L117.959 171.041L113.241 182.836V241.816L97.9061 226.481Z",
14
+ leftAbdomen: "M162.784 171.041L167.502 185.196L168.682 225.302V267.767L162.784 284.281L159.245 300.796L148.629 311.412L147.449 244.175L146.269 194.632L147.449 165.143L162.784 171.041Z",
15
+ rightAbdomen: "M126.216 169.861L140.371 165.143L141.551 194.632L140.371 244.175L139.192 310.232L128.575 299.616L117.959 264.228V226.481L119.139 186.375L126.216 169.861Z",
16
+ leftUpperArmLateral: "M206.429 142.731L202.89 158.066L220.584 191.094L235.918 207.608L239.457 199.351L227.661 160.425L206.429 142.731Z",
17
+ leftUpperArmMedial: "M200.531 160.425V178.119L219.404 209.968L224.122 202.89L218.225 194.633L200.531 160.425Z",
18
+ rightUpperArmLateral: "M48.3633 196.992L51.9021 206.429L66.0572 191.094L83.751 155.706L80.2123 142.731L58.9796 161.604L48.3633 196.992Z",
19
+ rightUpperArmMedial: "M64.8776 200.531L86.1102 160.425V175.759L66.0572 211.147L64.8776 200.531Z",
20
+ leftForearmLateral: "M244.176 201.71L240.637 212.327L231.2 211.147L274.845 284.282L289 290.18L270.127 258.331L259.51 220.584L244.176 201.71Z",
21
+ leftForearmMedial: "M224.122 208.788V224.122L232.38 242.996L246.535 259.51L266.588 292.539L273.665 287.82L224.122 208.788Z",
22
+ rightForearmLateral: "M17.6939 255.971L29.4898 217.045L42.4653 202.89L47.1837 214.686L55.4408 212.326L12.9755 281.922L0 289L17.6939 255.971Z",
23
+ rightForearmMedial: "M20.053 292.539L38.9265 261.869L54.2612 242.996L62.5183 222.943L61.3387 207.608L14.155 285.461L20.053 292.539Z",
24
+ leftGroin: "M152.167 318.49L156.886 360.955L173.4 318.49L179.298 289L187.555 272.485L173.4 267.767L163.963 301.975L152.167 318.49Z",
25
+ rightGroin: "M138.012 319.67L129.755 362.135L121.498 335.004L116.78 326.747L114.42 310.233L109.702 296.078L100.265 271.306L114.42 266.588L120.318 286.641L126.216 304.335L138.012 319.67Z",
26
+ leftThighAnterior: "M182.837 305.515L186.376 289L193.453 273.666L202.89 292.539L205.249 323.208L196.992 384.547L188.735 397.523L180.478 371.572L179.298 322.029L182.837 305.515Z",
27
+ leftThighMedial: "M172.22 421.114L160.424 372.751L175.759 329.106L176.939 376.29L185.196 403.42L181.657 423.473L172.22 421.114Z",
28
+ leftThighLateral: "M207.608 326.747L213.506 358.596V405.78L209.967 421.114L192.273 399.882L202.89 385.727L207.608 326.747Z",
29
+ rightThighAnterior: "M100.265 285.461L107.343 312.592V369.212L99.0857 396.343L89.649 383.368L84.9306 346.8L81.3918 322.029L84.9306 291.359L93.1878 273.666L100.265 285.461Z",
30
+ rightThighMedial: "M112.061 373.931L110.882 324.388L119.139 342.082L128.576 373.931L123.857 390.445L115.6 422.294L104.984 423.473L102.625 404.6L112.061 373.931Z",
31
+ rightThighLateral: "M94.3673 399.882L76.6734 421.114L74.3142 395.163V368.033L77.853 330.286L84.9305 385.726L94.3673 399.882Z",
32
+ leftKnee: "M189.914 404.6L208.788 427.012V439.988L201.71 454.143L187.555 452.963L181.657 436.449L189.914 404.6Z",
33
+ rightKnee: "M97.9062 404.6L100.265 414.037L102.625 425.833L104.984 436.449L101.445 452.963H86.1103L79.0327 441.167V425.833L87.2899 416.396L97.9062 404.6Z",
34
+ leftLowerLegLateral: "M206.429 463.579L212.327 443.526L221.763 465.939L230.02 484.812L226.482 542.612L230.02 565.024H215.865L206.429 463.579Z",
35
+ leftLowerLegMedial: "M209.967 563.845L201.71 460.041L188.735 457.682L185.196 469.478V477.735L189.914 511.943L209.967 563.845Z",
36
+ rightLowerLegLateral: "M71.9551 562.665L80.2122 476.555L81.3918 463.58L75.4939 445.886L71.9551 455.322L64.8776 467.118L60.1592 484.812L63.698 543.792L60.1592 565.025L71.9551 562.665Z",
37
+ rightLowerLegMedial: "M102.624 457.682L103.804 469.478V482.453L101.445 497.788V510.763L93.1877 526.098L88.4694 541.433L77.853 562.665L79.0326 542.612L81.3918 521.38L82.5714 507.225L83.751 490.71L86.1102 474.196L87.2898 458.861L102.624 457.682Z"
38
+ }, e = {
39
+ head: "M81.0211 0L73.5317 1.3617L65.3615 8.85106L64.6807 20.4255L72.17 32H89.1913L94.6381 21.7872L95.319 7.48936L89.1913 2.04255L81.0211 0Z",
40
+ leftTrapezius: "M71.4894 34.7234H76.2553L75.5745 61.2766L76.2553 103.489L61.2766 85.1064L56.5107 65.3617L49.7021 58.5532L62.6383 53.1064L70.1277 43.5745L71.4894 34.7234Z",
41
+ rightTrapezius: "M83.7446 34.7234H89.1914L90.5531 43.5745L97.3616 52.4255L110.298 58.5532L103.489 64.6808L98.7234 85.1064L83.7446 103.489L85.1063 61.2766L83.7446 34.7234Z",
42
+ leftShoulder: "M46.9789 59.2341L36.7661 62.6384L27.915 70.8086L29.2767 85.7873L38.8087 78.9788L43.5746 74.2129L46.9789 59.2341Z",
43
+ rightShoulder: "M113.702 59.2341L125.277 63.3192L132.085 71.4894L130.723 85.7873L119.83 78.298L115.745 72.1703L113.702 59.2341Z",
44
+ leftScapula: "M49.702 61.9575L44.936 78.2979L45.6169 88.5107L54.468 120.511L75.5743 113.702V106.213L58.5531 86.4682L53.7871 66.0426L49.702 61.9575Z",
45
+ rightScapula: "M110.298 61.9575L115.064 78.9788L114.383 89.8724L105.532 120.511L84.4253 113.702V106.213L101.447 87.149L106.213 66.7235L110.298 61.9575Z",
46
+ leftUpperArmLateral: "M42.8936 79.6597L28.5957 89.1916L23.1489 115.745L26.5532 130.723L34.7234 102.128L42.8936 89.1916V79.6597Z",
47
+ rightUpperArmLateral: "M117.787 80.3403L131.404 89.1914L137.532 117.106L133.447 131.404L124.596 100.766L117.106 89.1914L117.787 80.3403Z",
48
+ leftUpperArmMedial: "M42.8935 93.2766V109.617L36.7658 120.511L30.6382 123.915L36.085 104.851L42.8935 93.2766Z",
49
+ rightUpperArmMedial: "M116.426 93.2766L123.234 103.489L128.681 123.915L122.553 120.511L116.426 110.298V93.2766Z",
50
+ leftLowerBack: "M76.2553 116.426L55.1489 123.234L56.5106 133.447L78.9787 163.404L74.8936 132.766L76.2553 116.426Z",
51
+ rightLowerBack: "M83.7449 116.426L104.851 123.234L103.49 133.447L81.0215 163.404L85.1066 134.128L83.7449 116.426Z",
52
+ rightForearmLateral: "M138.213 121.191L145.702 133.447L149.106 150.468L160 170.213L153.872 166.808L140.936 142.979L134.809 134.128L138.213 121.191Z",
53
+ leftForearmLateral: "M21.7872 121.191L14.2979 134.128L10.8936 149.787L0 170.213L6.12766 166.808L19.7447 141.617L25.1915 132.766L21.7872 121.191Z",
54
+ rightForearmMedial: "M130.043 127.319L123.915 124.596L126.638 135.489L145.702 166.128L149.107 174.298L151.149 167.489L130.043 127.319Z",
55
+ leftForearmMedial: "M29.9576 127.319L35.4045 124.596L33.3619 134.808L14.9789 164.766L10.8938 173.617L8.17041 167.489L29.9576 127.319Z",
56
+ leftButtock: "M71.4895 159.319L48.3405 173.617L47.6597 189.957L50.3831 201.532L75.5746 194.042L78.9788 183.83L71.4895 159.319Z",
57
+ rightButtock: "M88.5107 158.638L81.7021 183.149L83.7447 193.362L108.936 201.532L111.66 190.638L110.979 173.617L88.5107 158.638Z",
58
+ leftThighMedial: "M76.9361 196.766H71.4893L66.0425 200.851L72.1701 230.808L77.617 217.191L78.2978 206.979L76.9361 196.766Z",
59
+ rightThighMedial: "M83.0638 196.085L89.1915 197.447L94.6383 201.532L87.8298 230.809L83.0638 217.872L81.7021 206.979L83.0638 196.085Z",
60
+ leftThighLateral: "M46.2981 195.404L49.7024 206.979L58.5534 201.532L56.5109 216.511L55.1492 240.34L46.979 253.277L46.2981 234.894L44.2556 226.043L43.5747 210.383L46.2981 195.404Z",
61
+ rightThighLateral: "M114.383 194.723L110.979 206.298L102.127 201.532L104.851 218.553L106.213 240.34L113.702 253.277L114.383 236.255L116.425 227.404L117.787 211.064L114.383 194.723Z",
62
+ leftThighPosterior: "M61.9577 200.851L70.8087 233.532L64.6811 266.894L57.8726 244.426L59.2343 216.511L61.9577 200.851Z",
63
+ rightThighPosterior: "M98.7236 200.851L101.447 217.872L102.809 245.106L96.0002 266.894L89.8726 234.213L98.7236 200.851Z",
64
+ leftPopliteal: "M55.149 245.106L49.7021 254.638L53.7873 266.213L59.9149 260.085L55.149 245.106Z",
65
+ rightPopliteal: "M106.213 245.787L100.766 260.766L106.894 266.213L110.979 254.638L106.213 245.787Z",
66
+ leftCalfLateral: "M46.9785 256.681L45.6168 267.575L39.4891 287.319L38.1274 308.426L40.8508 315.234L45.6168 309.106L47.6594 288L51.0636 273.702V266.894L46.9785 256.681Z",
67
+ leftCalfMedial: "M59.9148 264.17L56.5105 268.255L53.1063 275.064L49.702 288.681L48.3403 307.064L54.468 320L61.9574 305.021L62.6382 270.298L59.9148 264.17Z",
68
+ rightCalfMedial: "M100.766 264.17L98.0425 269.617L98.7233 305.021L106.213 319.319L113.021 307.064L110.298 287.319L106.894 272.34L100.766 264.17Z",
69
+ rightCalfLateral: "M113.021 256.681L115.745 269.617L121.191 286.638L122.553 308.426L119.149 314.553L115.745 309.787L113.021 287.319L108.936 268.936L113.021 256.681Z",
70
+ leftHeel: "M45.617 313.191H48.3404L53.7872 322.723L49.0212 352L45.617 341.787L42.8936 317.277L45.617 313.191Z",
71
+ rightHeel: "M111.659 313.191H115.064L117.787 317.277L115.064 341.106L112.34 351.319L107.574 323.404L111.659 313.191Z"
72
+ }, l = {
73
+ front: {
74
+ regions: [{
75
+ code: "89545001",
76
+ key: "face",
77
+ paths: [L.head],
78
+ label: {
79
+ x: 143.7,
80
+ y: 35
81
+ }
82
+ }, {
83
+ code: "170583000",
84
+ key: "leftNeck",
85
+ paths: [L.leftNeck],
86
+ label: {
87
+ x: 171.2,
88
+ y: 103.2
89
+ }
90
+ }, {
91
+ code: "170303002",
92
+ key: "rightNeck",
93
+ paths: [L.rightNeck],
94
+ label: {
95
+ x: 116.9,
96
+ y: 101.3
97
+ }
98
+ }, {
99
+ code: "91775009",
100
+ key: "leftShoulder",
101
+ paths: [L.leftShoulder],
102
+ label: {
103
+ x: 218.3,
104
+ y: 128.2
105
+ }
106
+ }, {
107
+ code: "91774008",
108
+ key: "rightShoulder",
109
+ paths: [L.rightShoulder],
110
+ label: {
111
+ x: 69.2,
112
+ y: 128.2
113
+ }
114
+ }, {
115
+ code: "1290343009",
116
+ key: "leftChest",
117
+ paths: [L.leftChest],
118
+ label: {
119
+ x: 172.9,
120
+ y: 143.1
121
+ }
122
+ }, {
123
+ code: "1290342004",
124
+ key: "rightChest",
125
+ paths: [L.rightChest],
126
+ label: {
127
+ x: 114.6,
128
+ y: 142
129
+ }
130
+ }, {
131
+ code: "1290341006",
132
+ key: "leftFlank",
133
+ paths: [L.leftFlank],
134
+ label: {
135
+ x: 183.6,
136
+ y: 197.9
137
+ }
138
+ }, {
139
+ code: "1290340007",
140
+ key: "rightFlank",
141
+ paths: [L.rightFlank],
142
+ label: {
143
+ x: 103.8,
144
+ y: 197.8
145
+ }
146
+ }, {
147
+ code: "416011007",
148
+ key: "leftAbdomen",
149
+ paths: [L.leftAbdomen],
150
+ label: {
151
+ x: 157,
152
+ y: 233.1
153
+ }
154
+ }, {
155
+ code: "415994006",
156
+ key: "rightAbdomen",
157
+ paths: [L.rightAbdomen],
158
+ label: {
159
+ x: 130.3,
160
+ y: 232.7
161
+ }
162
+ }, {
163
+ code: "368208006",
164
+ key: "leftUpperArm",
165
+ paths: [L.leftUpperArmLateral, L.leftUpperArmMedial],
166
+ label: {
167
+ x: 221.4,
168
+ y: 173.9
169
+ }
170
+ }, {
171
+ code: "368209003",
172
+ key: "rightUpperArm",
173
+ paths: [L.rightUpperArmLateral, L.rightUpperArmMedial],
174
+ label: {
175
+ x: 65.5,
176
+ y: 173.6
177
+ }
178
+ }, {
179
+ code: "66480008",
180
+ key: "leftForearm",
181
+ paths: [L.leftForearmLateral, L.leftForearmMedial],
182
+ label: {
183
+ x: 258,
184
+ y: 241.7
185
+ }
186
+ }, {
187
+ code: "64262003",
188
+ key: "rightForearm",
189
+ paths: [L.rightForearmLateral, L.rightForearmMedial],
190
+ label: {
191
+ x: 29.5,
192
+ y: 240.8
193
+ }
194
+ }, {
195
+ code: "85119005",
196
+ key: "leftGroin",
197
+ paths: [L.leftGroin],
198
+ label: {
199
+ x: 167.3,
200
+ y: 310.1
201
+ }
202
+ }, {
203
+ code: "37117007",
204
+ key: "rightGroin",
205
+ paths: [L.rightGroin],
206
+ label: {
207
+ x: 121,
208
+ y: 309.7
209
+ }
210
+ }, {
211
+ code: "61396006",
212
+ key: "leftThigh",
213
+ paths: [L.leftThighAnterior, L.leftThighMedial, L.leftThighLateral],
214
+ label: {
215
+ x: 191.8,
216
+ y: 334.5
217
+ }
218
+ }, {
219
+ code: "11207009",
220
+ key: "rightThigh",
221
+ paths: [L.rightThighAnterior, L.rightThighMedial, L.rightThighLateral],
222
+ label: {
223
+ x: 95.5,
224
+ y: 334
225
+ }
226
+ }, {
227
+ code: "82169009",
228
+ key: "leftKnee",
229
+ paths: [L.leftKnee],
230
+ label: {
231
+ x: 195.2,
232
+ y: 433.1
233
+ }
234
+ }, {
235
+ code: "6757004",
236
+ key: "rightKnee",
237
+ paths: [L.rightKnee],
238
+ label: {
239
+ x: 92.3,
240
+ y: 432.8
241
+ }
242
+ }, {
243
+ code: "48979004",
244
+ key: "leftLowerLeg",
245
+ paths: [L.leftLowerLegLateral, L.leftLowerLegMedial],
246
+ label: {
247
+ x: 218.8,
248
+ y: 506.4
249
+ }
250
+ }, {
251
+ code: "32696007",
252
+ key: "rightLowerLeg",
253
+ paths: [L.rightLowerLegLateral, L.rightLowerLegMedial],
254
+ label: {
255
+ x: 70,
256
+ y: 504.5
257
+ }
258
+ }]
259
+ },
260
+ back: {
261
+ transform: "translate(3.00 0) scale(1.7688)",
262
+ regions: [{
263
+ code: "43631005",
264
+ key: "backOfHead",
265
+ paths: [e.head],
266
+ label: {
267
+ x: 145,
268
+ y: 28.9
269
+ }
270
+ }, {
271
+ code: "91775009",
272
+ key: "leftShoulder",
273
+ paths: [e.leftShoulder],
274
+ label: {
275
+ x: 67.9,
276
+ y: 126.9
277
+ }
278
+ }, {
279
+ code: "91774008",
280
+ key: "rightShoulder",
281
+ paths: [e.rightShoulder],
282
+ label: {
283
+ x: 221.3,
284
+ y: 126.9
285
+ }
286
+ }, {
287
+ code: "1303210008",
288
+ key: "leftUpperBack",
289
+ paths: [e.leftScapula, e.leftTrapezius],
290
+ label: {
291
+ x: 123,
292
+ y: 120.5
293
+ }
294
+ }, {
295
+ code: "1303211007",
296
+ key: "rightUpperBack",
297
+ paths: [e.rightScapula, e.rightTrapezius],
298
+ label: {
299
+ x: 166.3,
300
+ y: 119.9
301
+ }
302
+ }, {
303
+ code: "1017210004",
304
+ key: "leftLowerBack",
305
+ paths: [e.leftLowerBack],
306
+ label: {
307
+ x: 123.9,
308
+ y: 238.8
309
+ }
310
+ }, {
311
+ code: "1017211000",
312
+ key: "rightLowerBack",
313
+ paths: [e.rightLowerBack],
314
+ label: {
315
+ x: 165.2,
316
+ y: 238.7
317
+ }
318
+ }, {
319
+ code: "368208006",
320
+ key: "leftUpperArm",
321
+ paths: [e.leftUpperArmLateral, e.leftUpperArmMedial],
322
+ label: {
323
+ x: 59.3,
324
+ y: 179.2
325
+ }
326
+ }, {
327
+ code: "368209003",
328
+ key: "rightUpperArm",
329
+ paths: [e.rightUpperArmLateral, e.rightUpperArmMedial],
330
+ label: {
331
+ x: 230.4,
332
+ y: 181
333
+ }
334
+ }, {
335
+ code: "66480008",
336
+ key: "leftForearm",
337
+ paths: [e.leftForearmLateral, e.leftForearmMedial],
338
+ label: {
339
+ x: 42.2,
340
+ y: 261.1
341
+ }
342
+ }, {
343
+ code: "64262003",
344
+ key: "rightForearm",
345
+ paths: [e.rightForearmLateral, e.rightForearmMedial],
346
+ label: {
347
+ x: 245.7,
348
+ y: 260.2
349
+ }
350
+ }, {
351
+ code: "723979003",
352
+ key: "leftButtock",
353
+ paths: [e.leftButtock],
354
+ label: {
355
+ x: 114,
356
+ y: 321.9
357
+ }
358
+ }, {
359
+ code: "723980000",
360
+ key: "rightButtock",
361
+ paths: [e.rightButtock],
362
+ label: {
363
+ x: 174.7,
364
+ y: 321.4
365
+ }
366
+ }, {
367
+ code: "61396006",
368
+ key: "leftThigh",
369
+ paths: [e.leftThighPosterior, e.leftThighLateral, e.leftThighMedial],
370
+ label: {
371
+ x: 92,
372
+ y: 394.1
373
+ }
374
+ }, {
375
+ code: "11207009",
376
+ key: "rightThigh",
377
+ paths: [e.rightThighPosterior, e.rightThighLateral, e.rightThighMedial],
378
+ label: {
379
+ x: 198.9,
380
+ y: 392.8
381
+ }
382
+ }, {
383
+ code: "1373282002",
384
+ key: "leftBackOfKnee",
385
+ paths: [e.leftPopliteal],
386
+ label: {
387
+ x: 99.8,
388
+ y: 453.3
389
+ }
390
+ }, {
391
+ code: "1373283007",
392
+ key: "rightBackOfKnee",
393
+ paths: [e.rightPopliteal],
394
+ label: {
395
+ x: 190.6,
396
+ y: 454.1
397
+ }
398
+ }, {
399
+ code: "722115008",
400
+ key: "leftCalf",
401
+ paths: [e.leftCalfLateral, e.leftCalfMedial],
402
+ label: {
403
+ x: 102.3,
404
+ y: 517.2
405
+ }
406
+ }, {
407
+ code: "722116009",
408
+ key: "rightCalf",
409
+ paths: [e.rightCalfLateral, e.rightCalfMedial],
410
+ label: {
411
+ x: 188,
412
+ y: 517.2
413
+ }
414
+ }, {
415
+ code: "723606006",
416
+ key: "leftHeel",
417
+ paths: [e.leftHeel],
418
+ label: {
419
+ x: 88.2,
420
+ y: 582
421
+ }
422
+ }, {
423
+ code: "723607002",
424
+ key: "rightHeel",
425
+ paths: [e.rightHeel],
426
+ label: {
427
+ x: 202.5,
428
+ y: 580.8
429
+ }
430
+ }]
431
+ }
432
+ };
433
+ export {
434
+ l as BODY_VIEWS,
435
+ t as BODY_VIEW_BOX
436
+ };
@@ -0,0 +1,13 @@
1
+ import { AnnotationImageProps } from '../../../contexts/image-annotation';
2
+ import { getBodyAnnotationDetailItems } from './utils';
3
+ /**
4
+ * Human body chart (front and back views) for the `image-annotation` control.
5
+ * Every body region has a body site code: a click on a region adds an annotation that stores
6
+ * the region code in the first child item (a choice bound to the body site value set).
7
+ * A click on an annotated region selects its annotation instead.
8
+ */
9
+ export declare function BodyAnnotationImage(props: AnnotationImageProps): import("react/jsx-runtime").JSX.Element | null;
10
+ export declare namespace BodyAnnotationImage {
11
+ var getDetailItems: typeof getBodyAnnotationDetailItems;
12
+ }
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/controls/ImageAnnotation/BodyAnnotationImage/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAKrE,OAAO,EAAuB,4BAA4B,EAAoC,MAAM,SAAS,CAAC;AAQ9G;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,oBAAoB,kDAsH9D;yBAtHe,mBAAmB"}
@@ -0,0 +1,95 @@
1
+ import { jsxs as h, jsx as i } from "react/jsx-runtime";
2
+ import { i18n as a } from "@lingui/core";
3
+ import { Radio as b } from "antd";
4
+ import { useState as R, useEffect as V } from "react";
5
+ import { populateItemKey as E } from "sdc-qrf";
6
+ import { BODY_VIEWS as p, BODY_VIEW_BOX as K } from "./body-regions.js";
7
+ import { getBodyRegionLabel as $ } from "./labels.js";
8
+ import { S as o } from "./styles.js";
9
+ import { getBodySiteItem as W, getBodySiteCode as X, buildBodySiteAnswer as j, getBodyAnnotationDetailItems as G } from "./utils.js";
10
+ const {
11
+ width: g,
12
+ height: M
13
+ } = K;
14
+ function _(x) {
15
+ return ["front", "back"].find((l) => p[l].regions.some((v) => v.code === x));
16
+ }
17
+ function Y(x) {
18
+ const {
19
+ questionItem: l,
20
+ items: v,
21
+ activeIndex: k,
22
+ onAdd: s,
23
+ onSelect: m
24
+ } = x, f = W(l), d = v.map((e) => f ? X(e, f.linkId) : void 0), r = k === void 0 ? void 0 : d[k], [c, B] = R(() => _(r) ?? "front");
25
+ if (V(() => {
26
+ const e = _(r);
27
+ e && !p[c].regions.some((t) => t.code === r) && B(e);
28
+ }, [r]), !f)
29
+ return null;
30
+ const {
31
+ regions: I,
32
+ transform: C
33
+ } = p[c], w = (e) => p[e].regions.filter((t) => d.includes(t.code)).length, S = (e) => {
34
+ const t = d.indexOf(e.code);
35
+ if (t !== -1) {
36
+ m == null || m(t);
37
+ return;
38
+ }
39
+ s == null || s(E({
40
+ [f.linkId]: j(e.code)
41
+ }));
42
+ }, D = (e, t) => {
43
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), S(t));
44
+ }, [O, A] = c === "front" ? [g - 24, 24] : [24, g - 24];
45
+ return /* @__PURE__ */ h(o.Container, { children: [
46
+ /* @__PURE__ */ h(b.Group, { value: c, onChange: (e) => B(e.target.value), "aria-label": a._(
47
+ /*i18n*/
48
+ {
49
+ id: "kM1zBb"
50
+ }
51
+ ), "data-testid": "body-view-select", children: [
52
+ /* @__PURE__ */ i(b.Button, { value: "front", children: `${a._(
53
+ /*i18n*/
54
+ {
55
+ id: "5w2d/G"
56
+ }
57
+ )} (${w("front")})` }),
58
+ /* @__PURE__ */ i(b.Button, { value: "back", children: `${a._(
59
+ /*i18n*/
60
+ {
61
+ id: "iH8pgl"
62
+ }
63
+ )} (${w("back")})` })
64
+ ] }),
65
+ /* @__PURE__ */ i(o.Figure, { children: /* @__PURE__ */ h(o.Svg, { viewBox: `0 0 ${g} ${M}`, role: "group", "aria-label": l.text, "data-testid": "body-annotation-image", "data-view": c, children: [
66
+ /* @__PURE__ */ i(o.Side, { x: A, y: 20, textAnchor: "middle", children: a._(
67
+ /*i18n*/
68
+ {
69
+ id: "nOPbWJ"
70
+ }
71
+ ) }),
72
+ /* @__PURE__ */ i(o.Side, { x: O, y: 20, textAnchor: "middle", children: a._(
73
+ /*i18n*/
74
+ {
75
+ id: "UlKSMd"
76
+ }
77
+ ) }),
78
+ /* @__PURE__ */ i("g", { transform: C, children: I.map((e) => {
79
+ const u = d.indexOf(e.code) !== -1, n = u ? !!m : !!s;
80
+ return /* @__PURE__ */ h(o.Region, { $selected: u, $active: u && e.code === r, $interactive: n, role: n ? "button" : "img", tabIndex: n ? 0 : void 0, "aria-label": $(e.key), "aria-pressed": n ? u : void 0, onClick: n ? () => S(e) : void 0, onKeyDown: n ? (y) => D(y, e) : void 0, "data-testid": `body-region-${e.code}`, children: [
81
+ /* @__PURE__ */ i("title", { children: $(e.key) }),
82
+ e.paths.map((y) => /* @__PURE__ */ i("path", { d: y }, y))
83
+ ] }, e.key);
84
+ }) }),
85
+ I.map((e) => {
86
+ const t = d.indexOf(e.code);
87
+ return t === -1 ? null : /* @__PURE__ */ i(o.Number, { x: e.label.x, y: e.label.y, textAnchor: "middle", dominantBaseline: "central", children: t + 1 }, e.key);
88
+ })
89
+ ] }) })
90
+ ] });
91
+ }
92
+ Y.getDetailItems = G;
93
+ export {
94
+ Y as BodyAnnotationImage
95
+ };
@@ -0,0 +1,3 @@
1
+ import { BodyRegionKey } from './body-regions';
2
+ export declare function getBodyRegionLabel(key: BodyRegionKey): string;
3
+ //# sourceMappingURL=labels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../../../src/controls/ImageAnnotation/BodyAnnotationImage/labels.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAyC7D"}