@minvws/mgo-hcim-ui 0.1.1-1

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 (208) hide show
  1. package/LICENSE.md +7 -0
  2. package/README.md +78 -0
  3. package/dist/common/index.d.ts +7 -0
  4. package/dist/common/index.d.ts.map +1 -0
  5. package/dist/common/index.js +6 -0
  6. package/dist/common/organization/organization.d.ts +6 -0
  7. package/dist/common/organization/organization.d.ts.map +1 -0
  8. package/dist/common/organization/organization.js +7 -0
  9. package/dist/common/summaryOptions/summaryOptions.d.ts +8 -0
  10. package/dist/common/summaryOptions/summaryOptions.d.ts.map +1 -0
  11. package/dist/common/summaryOptions/summaryOptions.js +12 -0
  12. package/dist/context/formatLabel.d.ts +14 -0
  13. package/dist/context/formatLabel.d.ts.map +1 -0
  14. package/dist/context/formatLabel.js +61 -0
  15. package/dist/context/index.d.ts +14 -0
  16. package/dist/context/index.d.ts.map +1 -0
  17. package/dist/context/index.js +16 -0
  18. package/dist/format/date/date.d.ts +4 -0
  19. package/dist/format/date/date.d.ts.map +1 -0
  20. package/dist/format/date/date.js +44 -0
  21. package/dist/format/index.d.ts +6 -0
  22. package/dist/format/index.d.ts.map +1 -0
  23. package/dist/format/index.js +6 -0
  24. package/dist/format/system/system.d.ts +4 -0
  25. package/dist/format/system/system.d.ts.map +1 -0
  26. package/dist/format/system/system.js +21 -0
  27. package/dist/format/systemCode/systemCode.d.ts +4 -0
  28. package/dist/format/systemCode/systemCode.d.ts.map +1 -0
  29. package/dist/format/systemCode/systemCode.js +12 -0
  30. package/dist/format/systemValue/systemValue.d.ts +4 -0
  31. package/dist/format/systemValue/systemValue.d.ts.map +1 -0
  32. package/dist/format/systemValue/systemValue.js +16 -0
  33. package/dist/format/value/value.d.ts +4 -0
  34. package/dist/format/value/value.d.ts.map +1 -0
  35. package/dist/format/value/value.js +18 -0
  36. package/dist/generator/createGeneratorContext/createGeneratorContext.d.ts +12 -0
  37. package/dist/generator/createGeneratorContext/createGeneratorContext.d.ts.map +1 -0
  38. package/dist/generator/createGeneratorContext/createGeneratorContext.js +12 -0
  39. package/dist/generator/createUiElementHelper/createUiElementHelper.d.ts +6 -0
  40. package/dist/generator/createUiElementHelper/createUiElementHelper.d.ts.map +1 -0
  41. package/dist/generator/createUiElementHelper/createUiElementHelper.js +60 -0
  42. package/dist/generator/generateUiSchema/generateUiSchema.d.ts +5 -0
  43. package/dist/generator/generateUiSchema/generateUiSchema.d.ts.map +1 -0
  44. package/dist/generator/generateUiSchema/generateUiSchema.js +40 -0
  45. package/dist/generator/getProfileKey/getProfileKey.d.ts +3 -0
  46. package/dist/generator/getProfileKey/getProfileKey.d.ts.map +1 -0
  47. package/dist/generator/getProfileKey/getProfileKey.js +5 -0
  48. package/dist/generator/getUiElements/getUiElements.d.ts +3 -0
  49. package/dist/generator/getUiElements/getUiElements.d.ts.map +1 -0
  50. package/dist/generator/getUiElements/getUiElements.js +4 -0
  51. package/dist/generator/index.d.ts +2 -0
  52. package/dist/generator/index.d.ts.map +1 -0
  53. package/dist/generator/index.js +1 -0
  54. package/dist/generator/processArray/processArray.d.ts +4 -0
  55. package/dist/generator/processArray/processArray.d.ts.map +1 -0
  56. package/dist/generator/processArray/processArray.js +39 -0
  57. package/dist/generator/processMgoType/processMgoType.d.ts +5 -0
  58. package/dist/generator/processMgoType/processMgoType.d.ts.map +1 -0
  59. package/dist/generator/processMgoType/processMgoType.js +52 -0
  60. package/dist/generator/processObject/processObject.d.ts +4 -0
  61. package/dist/generator/processObject/processObject.d.ts.map +1 -0
  62. package/dist/generator/processObject/processObject.js +34 -0
  63. package/dist/generator/processValue/processValue.d.ts +5 -0
  64. package/dist/generator/processValue/processValue.d.ts.map +1 -0
  65. package/dist/generator/processValue/processValue.js +38 -0
  66. package/dist/helpers/dropEmptyEntries/dropEmptyEntries.d.ts +5 -0
  67. package/dist/helpers/dropEmptyEntries/dropEmptyEntries.d.ts.map +1 -0
  68. package/dist/helpers/dropEmptyEntries/dropEmptyEntries.js +28 -0
  69. package/dist/helpers/getChildren/getChildren.d.ts +4 -0
  70. package/dist/helpers/getChildren/getChildren.d.ts.map +1 -0
  71. package/dist/helpers/getChildren/getChildren.js +9 -0
  72. package/dist/helpers/hasExtensions/hasExtensions.d.ts +4 -0
  73. package/dist/helpers/hasExtensions/hasExtensions.d.ts.map +1 -0
  74. package/dist/helpers/hasExtensions/hasExtensions.js +23 -0
  75. package/dist/helpers/index.d.ts +8 -0
  76. package/dist/helpers/index.d.ts.map +1 -0
  77. package/dist/helpers/index.js +7 -0
  78. package/dist/helpers/isEmptyUiEntry/isEmptyUiEntry.d.ts +3 -0
  79. package/dist/helpers/isEmptyUiEntry/isEmptyUiEntry.d.ts.map +1 -0
  80. package/dist/helpers/isEmptyUiEntry/isEmptyUiEntry.js +18 -0
  81. package/dist/helpers/isUiEntry/isUiEntry.d.ts +5 -0
  82. package/dist/helpers/isUiEntry/isUiEntry.d.ts.map +1 -0
  83. package/dist/helpers/isUiEntry/isUiEntry.js +3 -0
  84. package/dist/helpers/isUiSchemaGroup/isUiSchemaGroup.d.ts +3 -0
  85. package/dist/helpers/isUiSchemaGroup/isUiSchemaGroup.d.ts.map +1 -0
  86. package/dist/helpers/isUiSchemaGroup/isUiSchemaGroup.js +3 -0
  87. package/dist/helpers/numberToString/numberToString.d.ts +3 -0
  88. package/dist/helpers/numberToString/numberToString.d.ts.map +1 -0
  89. package/dist/helpers/numberToString/numberToString.js +6 -0
  90. package/dist/helpers/setEmptyEntries/setEmptyEntries.d.ts +4 -0
  91. package/dist/helpers/setEmptyEntries/setEmptyEntries.d.ts.map +1 -0
  92. package/dist/helpers/setEmptyEntries/setEmptyEntries.js +31 -0
  93. package/dist/helpers/toString/toString.d.ts +3 -0
  94. package/dist/helpers/toString/toString.d.ts.map +1 -0
  95. package/dist/helpers/toString/toString.js +6 -0
  96. package/dist/helpers/valueOf/valueOf.d.ts +4 -0
  97. package/dist/helpers/valueOf/valueOf.d.ts.map +1 -0
  98. package/dist/helpers/valueOf/valueOf.js +11 -0
  99. package/dist/index.d.ts +9 -0
  100. package/dist/index.d.ts.map +1 -0
  101. package/dist/index.js +8 -0
  102. package/dist/special/attachment/attachment.d.ts +4 -0
  103. package/dist/special/attachment/attachment.d.ts.map +1 -0
  104. package/dist/special/attachment/attachment.js +18 -0
  105. package/dist/special/index.d.ts +8 -0
  106. package/dist/special/index.d.ts.map +1 -0
  107. package/dist/special/index.js +12 -0
  108. package/dist/special/oneOfValueX/oneOfValueX.d.ts +6 -0
  109. package/dist/special/oneOfValueX/oneOfValueX.d.ts.map +1 -0
  110. package/dist/special/oneOfValueX/oneOfValueX.js +22 -0
  111. package/dist/special/valueWithMax/valueWithMax.d.ts +3 -0
  112. package/dist/special/valueWithMax/valueWithMax.d.ts.map +1 -0
  113. package/dist/special/valueWithMax/valueWithMax.js +8 -0
  114. package/dist/special/valueWithUnit/valueWithUnit.d.ts +4 -0
  115. package/dist/special/valueWithUnit/valueWithUnit.d.ts.map +1 -0
  116. package/dist/special/valueWithUnit/valueWithUnit.js +9 -0
  117. package/dist/type/annotation/annotation.d.ts +6 -0
  118. package/dist/type/annotation/annotation.d.ts.map +1 -0
  119. package/dist/type/annotation/annotation.js +18 -0
  120. package/dist/type/boolean/boolean.d.ts +4 -0
  121. package/dist/type/boolean/boolean.d.ts.map +1 -0
  122. package/dist/type/boolean/boolean.js +11 -0
  123. package/dist/type/code/code.d.ts +12 -0
  124. package/dist/type/code/code.d.ts.map +1 -0
  125. package/dist/type/code/code.js +31 -0
  126. package/dist/type/codeableConcept/codeableConcept.d.ts +4 -0
  127. package/dist/type/codeableConcept/codeableConcept.d.ts.map +1 -0
  128. package/dist/type/codeableConcept/codeableConcept.js +25 -0
  129. package/dist/type/coding/coding.d.ts +4 -0
  130. package/dist/type/coding/coding.d.ts.map +1 -0
  131. package/dist/type/coding/coding.js +18 -0
  132. package/dist/type/date/date.d.ts +4 -0
  133. package/dist/type/date/date.d.ts.map +1 -0
  134. package/dist/type/date/date.js +8 -0
  135. package/dist/type/dateTime/dateTime.d.ts +4 -0
  136. package/dist/type/dateTime/dateTime.d.ts.map +1 -0
  137. package/dist/type/dateTime/dateTime.js +19 -0
  138. package/dist/type/decimal/decimal.d.ts +4 -0
  139. package/dist/type/decimal/decimal.d.ts.map +1 -0
  140. package/dist/type/decimal/decimal.js +8 -0
  141. package/dist/type/duration/duration.d.ts +4 -0
  142. package/dist/type/duration/duration.d.ts.map +1 -0
  143. package/dist/type/duration/duration.js +2 -0
  144. package/dist/type/identifier/identifier.d.ts +5 -0
  145. package/dist/type/identifier/identifier.d.ts.map +1 -0
  146. package/dist/type/identifier/identifier.js +15 -0
  147. package/dist/type/index.d.ts +32 -0
  148. package/dist/type/index.d.ts.map +1 -0
  149. package/dist/type/index.js +54 -0
  150. package/dist/type/instant/instant.d.ts +4 -0
  151. package/dist/type/instant/instant.d.ts.map +1 -0
  152. package/dist/type/instant/instant.js +18 -0
  153. package/dist/type/integer/integer.d.ts +4 -0
  154. package/dist/type/integer/integer.d.ts.map +1 -0
  155. package/dist/type/integer/integer.js +8 -0
  156. package/dist/type/integer64/integer64.d.ts +4 -0
  157. package/dist/type/integer64/integer64.d.ts.map +1 -0
  158. package/dist/type/integer64/integer64.js +8 -0
  159. package/dist/type/period/period.d.ts +9 -0
  160. package/dist/type/period/period.d.ts.map +1 -0
  161. package/dist/type/period/period.js +19 -0
  162. package/dist/type/positiveInt/positiveInt.d.ts +4 -0
  163. package/dist/type/positiveInt/positiveInt.d.ts.map +1 -0
  164. package/dist/type/positiveInt/positiveInt.js +8 -0
  165. package/dist/type/quantity/quantity.d.ts +4 -0
  166. package/dist/type/quantity/quantity.d.ts.map +1 -0
  167. package/dist/type/quantity/quantity.js +9 -0
  168. package/dist/type/range/range.d.ts +9 -0
  169. package/dist/type/range/range.d.ts.map +1 -0
  170. package/dist/type/range/range.js +19 -0
  171. package/dist/type/ratio/ratio.d.ts +9 -0
  172. package/dist/type/ratio/ratio.d.ts.map +1 -0
  173. package/dist/type/ratio/ratio.js +19 -0
  174. package/dist/type/reference/reference.d.ts +4 -0
  175. package/dist/type/reference/reference.d.ts.map +1 -0
  176. package/dist/type/reference/reference.js +23 -0
  177. package/dist/type/sampledData/sampledData.d.ts +4 -0
  178. package/dist/type/sampledData/sampledData.d.ts.map +1 -0
  179. package/dist/type/sampledData/sampledData.js +37 -0
  180. package/dist/type/simpleQuantity/simpleQuantity.d.ts +4 -0
  181. package/dist/type/simpleQuantity/simpleQuantity.d.ts.map +1 -0
  182. package/dist/type/simpleQuantity/simpleQuantity.js +9 -0
  183. package/dist/type/string/string.d.ts +4 -0
  184. package/dist/type/string/string.d.ts.map +1 -0
  185. package/dist/type/string/string.js +16 -0
  186. package/dist/type/time/time.d.ts +4 -0
  187. package/dist/type/time/time.d.ts.map +1 -0
  188. package/dist/type/time/time.js +17 -0
  189. package/dist/type/timing/timing.d.ts +4 -0
  190. package/dist/type/timing/timing.d.ts.map +1 -0
  191. package/dist/type/timing/timing.js +65 -0
  192. package/dist/type/unsignedInt/unsignedInt.d.ts +4 -0
  193. package/dist/type/unsignedInt/unsignedInt.d.ts.map +1 -0
  194. package/dist/type/unsignedInt/unsignedInt.js +9 -0
  195. package/dist/types/context.d.ts +22 -0
  196. package/dist/types/context.d.ts.map +1 -0
  197. package/dist/types/context.js +1 -0
  198. package/dist/types/index.d.ts +3 -0
  199. package/dist/types/index.d.ts.map +1 -0
  200. package/dist/types/index.js +3 -0
  201. package/dist/types/schema.d.ts +39 -0
  202. package/dist/types/schema.d.ts.map +1 -0
  203. package/dist/types/schema.js +1 -0
  204. package/dist/ui.d.ts +40 -0
  205. package/dist/ui.d.ts.map +1 -0
  206. package/dist/ui.js +12 -0
  207. package/health-ui-schema.png +0 -0
  208. package/package.json +37 -0
@@ -0,0 +1,5 @@
1
+ import { snakeCase } from 'lodash-es';
2
+ export function getProfileKey(fhirVersion, profile) {
3
+ const name = profile.split('/').pop();
4
+ return `${fhirVersion.toLowerCase()}.${snakeCase(name)}`;
5
+ }
@@ -0,0 +1,3 @@
1
+ import { type HealthUiGroup, type UiElement } from '../../types/index.js';
2
+ export declare function getUiElements(elements: (UiElement | HealthUiGroup)[]): UiElement[];
3
+ //# sourceMappingURL=getUiElements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getUiElements.d.ts","sourceRoot":"","sources":["../../../src/generator/getUiElements/getUiElements.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE1E,wBAAgB,aAAa,CAAC,QAAQ,EAAE,CAAC,SAAS,GAAG,aAAa,CAAC,EAAE,GAAG,SAAS,EAAE,CAElF"}
@@ -0,0 +1,4 @@
1
+ import { isUiSchemaGroup } from '../../helpers/isUiSchemaGroup/isUiSchemaGroup.js';
2
+ export function getUiElements(elements) {
3
+ return elements.map((x) => (isUiSchemaGroup(x) ? x.children : x)).flat();
4
+ }
@@ -0,0 +1,2 @@
1
+ export { generateUiSchema } from './generateUiSchema/generateUiSchema.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC"}
@@ -0,0 +1 @@
1
+ export { generateUiSchema } from './generateUiSchema/generateUiSchema.js';
@@ -0,0 +1,4 @@
1
+ import { type HealthUiGroup, type UiElement } from '../../types/index.js';
2
+ import { type GeneratorContext } from '../createGeneratorContext/createGeneratorContext.js';
3
+ export declare function processArray(context: GeneratorContext, path: string, value: unknown[]): (UiElement | HealthUiGroup)[];
4
+ //# sourceMappingURL=processArray.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processArray.d.ts","sourceRoot":"","sources":["../../../src/generator/processArray/processArray.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AAsB5F,wBAAgB,YAAY,CACxB,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,EAAE,GACjB,CAAC,SAAS,GAAG,aAAa,CAAC,EAAE,CAoB/B"}
@@ -0,0 +1,39 @@
1
+ import { isValueType } from '@minvws/mgo-hcim-parse';
2
+ import { hasExtensions } from '../../helpers/hasExtensions/hasExtensions.js';
3
+ import { processValue } from '../processValue/processValue.js';
4
+ function isArrayOfSameValueType(values) {
5
+ if (!values.length)
6
+ return false;
7
+ const firstValue = values[0];
8
+ if (!isValueType(firstValue)) {
9
+ return false;
10
+ }
11
+ const type = firstValue._type;
12
+ return values.every((value) => {
13
+ if (!isValueType(value)) {
14
+ return false;
15
+ }
16
+ return value._type === type;
17
+ });
18
+ }
19
+ function arrayContainsExtensions(values) {
20
+ return values.some((value) => hasExtensions(value));
21
+ }
22
+ export function processArray(context, path, value) {
23
+ const { createUiElement } = context;
24
+ if (isArrayOfSameValueType(value) && !arrayContainsExtensions(value)) {
25
+ const result = createUiElement(path, value);
26
+ return [result].flat();
27
+ }
28
+ const elements = value.map((x) => processValue(context, path, x)).flat();
29
+ if (elements.length) {
30
+ return elements;
31
+ }
32
+ return [
33
+ {
34
+ label: context.formatLabel(path, null),
35
+ type: 'SINGLE_VALUE',
36
+ display: undefined,
37
+ },
38
+ ];
39
+ }
@@ -0,0 +1,5 @@
1
+ import { type PrimitiveValueType, type ValueType } from '@minvws/mgo-hcim-parse';
2
+ import { type HealthUiGroup, type UiElement } from '../../types/index.js';
3
+ import { type GeneratorContext } from '../createGeneratorContext/createGeneratorContext.js';
4
+ export declare function processMgoType(context: GeneratorContext, path: string, value: ValueType | PrimitiveValueType): (UiElement | HealthUiGroup)[];
5
+ //# sourceMappingURL=processMgoType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processMgoType.d.ts","sourceRoot":"","sources":["../../../src/generator/processMgoType/processMgoType.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACjB,MAAM,wBAAwB,CAAC;AAIhC,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AAyC5F,wBAAgB,cAAc,CAC1B,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,SAAS,GAAG,kBAAkB,iCA0BxC"}
@@ -0,0 +1,52 @@
1
+ import { isExtensionValue, isValueType, } from '@minvws/mgo-hcim-parse';
2
+ import { isNullish } from '@minvws/mgo-utils';
3
+ import { snakeCase } from 'lodash-es';
4
+ import { getUiElements } from '../getUiElements/getUiElements.js';
5
+ function processNestedArray(context, path, value) {
6
+ return value.map((item) => processNestedValue(context, path, item).flat()).flat();
7
+ }
8
+ function processNestedValue(context, path, value) {
9
+ if (isNullish(value)) {
10
+ return [];
11
+ }
12
+ else if (isExtensionValue(value) && isValueType(value)) {
13
+ return [context.createUiElement(path, value)].flat();
14
+ }
15
+ else if (Array.isArray(value)) {
16
+ return processNestedArray(context, path, value);
17
+ }
18
+ else if (typeof value === 'object') {
19
+ return processNestedObject(context, path, value);
20
+ }
21
+ return [];
22
+ }
23
+ function processNestedObject(context, path, value) {
24
+ const uiElements = [];
25
+ const entries = Object.entries(value);
26
+ for (const [key, value] of entries) {
27
+ uiElements.push(...processNestedValue(context, `${path}.${snakeCase(key)}`, value));
28
+ }
29
+ return uiElements;
30
+ }
31
+ export function processMgoType(context, path, value) {
32
+ const { createUiElement } = context;
33
+ const elements = [];
34
+ const uiElement = createUiElement(path, value);
35
+ elements.push(...[uiElement].flat());
36
+ /**
37
+ * Sometimes there are extra values nested inside an existing valueType,
38
+ * We include them in the UI schema as well.
39
+ * See for an example: zibMedicationUse.effectivePeriod.duration
40
+ */
41
+ const extraUiElements = processNestedObject(context, path, value);
42
+ elements.push(...[extraUiElements].flat());
43
+ if (extraUiElements.length) {
44
+ return [
45
+ {
46
+ label: path,
47
+ children: getUiElements(elements),
48
+ },
49
+ ];
50
+ }
51
+ return elements;
52
+ }
@@ -0,0 +1,4 @@
1
+ import { type HealthUiGroup, type UiElement } from '../../types/index.js';
2
+ import { type GeneratorContext } from '../createGeneratorContext/createGeneratorContext.js';
3
+ export declare function processObject(context: GeneratorContext, path: string, value: object): (UiElement | HealthUiGroup)[];
4
+ //# sourceMappingURL=processObject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processObject.d.ts","sourceRoot":"","sources":["../../../src/generator/processObject/processObject.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AAI5F,wBAAgB,aAAa,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,iCAgCnF"}
@@ -0,0 +1,34 @@
1
+ import { isNullish } from '@minvws/mgo-utils';
2
+ import { snakeCase } from 'lodash-es';
3
+ import { getUiElements } from '../getUiElements/getUiElements.js';
4
+ import { processValue } from '../processValue/processValue.js';
5
+ export function processObject(context, path, value) {
6
+ const elements = [];
7
+ const entries = Object.entries(value);
8
+ for (const [key, value] of entries) {
9
+ // skip meta data properties such as _profile used in MGO elements
10
+ if (key.startsWith('_')) {
11
+ continue;
12
+ }
13
+ const valuePath = `${path}.${snakeCase(key)}`;
14
+ if (isNullish(value)) {
15
+ elements.push({
16
+ label: context.formatLabel(valuePath, null),
17
+ type: 'SINGLE_VALUE',
18
+ display: undefined,
19
+ });
20
+ }
21
+ else {
22
+ elements.push(...processValue(context, valuePath, value));
23
+ }
24
+ }
25
+ if (path !== context.rootPath && elements.length > 1) {
26
+ return [
27
+ {
28
+ label: path,
29
+ children: getUiElements(elements),
30
+ },
31
+ ];
32
+ }
33
+ return elements;
34
+ }
@@ -0,0 +1,5 @@
1
+ import { type Nullable } from '@minvws/mgo-utils';
2
+ import { type HealthUiGroup, type UiElement } from '../../types/index.js';
3
+ import { type GeneratorContext } from '../createGeneratorContext/createGeneratorContext.js';
4
+ export declare function processValue(context: GeneratorContext, path: string, value: Nullable<unknown[] | object>): (UiElement | HealthUiGroup)[];
5
+ //# sourceMappingURL=processValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processValue.d.ts","sourceRoot":"","sources":["../../../src/generator/processValue/processValue.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AAO5F,wBAAgB,YAAY,CACxB,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,QAAQ,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,GACpC,CAAC,SAAS,GAAG,aAAa,CAAC,EAAE,CA8B/B"}
@@ -0,0 +1,38 @@
1
+ import { isMgoElement, isValueType } from '@minvws/mgo-hcim-parse';
2
+ import { isNullish } from '@minvws/mgo-utils';
3
+ import { getProfileKey } from '../getProfileKey/getProfileKey.js';
4
+ import { getUiElements } from '../getUiElements/getUiElements.js';
5
+ import { processArray } from '../processArray/processArray.js';
6
+ import { processMgoType } from '../processMgoType/processMgoType.js';
7
+ import { processObject } from '../processObject/processObject.js';
8
+ export function processValue(context, path, value) {
9
+ let elements = [];
10
+ let group;
11
+ if (isMgoElement(value)) {
12
+ path = getProfileKey(context.fhirVersion, value._profile);
13
+ group = {
14
+ label: getProfileKey(context.fhirVersion, value._profile),
15
+ children: [],
16
+ };
17
+ }
18
+ if (isNullish(value)) {
19
+ elements = [];
20
+ }
21
+ else if (isValueType(value)) {
22
+ elements = processMgoType(context, path, value);
23
+ }
24
+ else if (Array.isArray(value)) {
25
+ elements = processArray(context, path, value);
26
+ }
27
+ else if (typeof value === 'object') {
28
+ elements = processObject(context, path, value);
29
+ }
30
+ else {
31
+ console.error(`Failed to process path: ${path} with value:`, value);
32
+ }
33
+ if (group) {
34
+ group.children = getUiElements(elements);
35
+ return [group];
36
+ }
37
+ return elements;
38
+ }
@@ -0,0 +1,5 @@
1
+ import { type HealthUiGroup, type HealthUiSchema } from '../../types/index.js';
2
+ export declare function dropEmptyEntries(schema: HealthUiSchema): HealthUiSchema;
3
+ export declare function dropEmptyEntries(schema: HealthUiGroup): HealthUiGroup;
4
+ export declare function dropEmptyEntries(schema: HealthUiGroup[]): HealthUiGroup[];
5
+ //# sourceMappingURL=dropEmptyEntries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropEmptyEntries.d.ts","sourceRoot":"","sources":["../../../src/helpers/dropEmptyEntries/dropEmptyEntries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAwB/E,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAAC;AACzE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,CAAC;AACvE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,aAAa,EAAE,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { isEmptyUiEntry } from '../isEmptyUiEntry/isEmptyUiEntry.js';
2
+ function processGroup(group) {
3
+ return {
4
+ ...group,
5
+ children: group.children.filter((entry) => !isEmptyUiEntry(entry)),
6
+ };
7
+ }
8
+ function isSchemaGroup(schema) {
9
+ return schema.children?.some((x) => typeof x.type === 'string');
10
+ }
11
+ function isSchemaGroupmockArray(schema) {
12
+ return Array.isArray(schema) && schema?.some(isSchemaGroup);
13
+ }
14
+ function hasChildren(group) {
15
+ return group.children.length > 0;
16
+ }
17
+ export function dropEmptyEntries(schema) {
18
+ if (isSchemaGroup(schema)) {
19
+ return processGroup(schema);
20
+ }
21
+ if (isSchemaGroupmockArray(schema)) {
22
+ return schema.map(processGroup).filter(hasChildren);
23
+ }
24
+ return {
25
+ ...schema,
26
+ children: schema.children.map(processGroup).filter(hasChildren),
27
+ };
28
+ }
@@ -0,0 +1,4 @@
1
+ import { type Nullable } from '@minvws/mgo-utils';
2
+ import { type HealthUiGroup } from '../../types/index.js';
3
+ export declare function getChildren<T extends HealthUiGroup | HealthUiGroup[]>(value?: Nullable<T>): HealthUiGroup['children'];
4
+ //# sourceMappingURL=getChildren.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getChildren.d.ts","sourceRoot":"","sources":["../../../src/helpers/getChildren/getChildren.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,wBAAgB,WAAW,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,EAAE,EACjE,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,GACpB,aAAa,CAAC,UAAU,CAAC,CAQ3B"}
@@ -0,0 +1,9 @@
1
+ import { isNullish } from '@minvws/mgo-utils';
2
+ export function getChildren(value) {
3
+ if (isNullish(value))
4
+ return [];
5
+ if (Array.isArray(value)) {
6
+ return value.map((x) => x.children).flat();
7
+ }
8
+ return value.children;
9
+ }
@@ -0,0 +1,4 @@
1
+ import { type ValueType } from '@minvws/mgo-hcim-parse';
2
+ import { type Nullable } from '@minvws/mgo-utils';
3
+ export declare function hasExtensions<T extends ValueType>(value: Nullable<T>): boolean;
4
+ //# sourceMappingURL=hasExtensions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hasExtensions.d.ts","sourceRoot":"","sources":["../../../src/helpers/hasExtensions/hasExtensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAsB7D,wBAAgB,aAAa,CAAC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAM9E"}
@@ -0,0 +1,23 @@
1
+ import { isExtensionValue } from '@minvws/mgo-hcim-parse';
2
+ import { isNullish } from '@minvws/mgo-utils';
3
+ function isOrHasExtensionsDeep(value) {
4
+ if (isNullish(value)) {
5
+ return false;
6
+ }
7
+ if (isExtensionValue(value)) {
8
+ return true;
9
+ }
10
+ if (Array.isArray(value)) {
11
+ return value.some((item) => isOrHasExtensionsDeep(item));
12
+ }
13
+ if (typeof value === 'object') {
14
+ return Object.values(value).some((item) => isOrHasExtensionsDeep(item));
15
+ }
16
+ return false;
17
+ }
18
+ export function hasExtensions(value) {
19
+ if (isNullish(value)) {
20
+ return false;
21
+ }
22
+ return Object.values(value).some((item) => isOrHasExtensionsDeep(item));
23
+ }
@@ -0,0 +1,8 @@
1
+ export * from './dropEmptyEntries/dropEmptyEntries.js';
2
+ export * from './getChildren/getChildren.js';
3
+ export * from './isEmptyUiEntry/isEmptyUiEntry.js';
4
+ export * from './isUiEntry/isUiEntry.js';
5
+ export * from './numberToString/numberToString.js';
6
+ export * from './setEmptyEntries/setEmptyEntries.js';
7
+ export * from './toString/toString.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC;AACvD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from './dropEmptyEntries/dropEmptyEntries.js';
2
+ export * from './getChildren/getChildren.js';
3
+ export * from './isEmptyUiEntry/isEmptyUiEntry.js';
4
+ export * from './isUiEntry/isUiEntry.js';
5
+ export * from './numberToString/numberToString.js';
6
+ export * from './setEmptyEntries/setEmptyEntries.js';
7
+ export * from './toString/toString.js';
@@ -0,0 +1,3 @@
1
+ import { type UiElement } from '../../types/index.js';
2
+ export declare function isEmptyUiEntry<T extends UiElement>(uiField: T): boolean;
3
+ //# sourceMappingURL=isEmptyUiEntry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isEmptyUiEntry.d.ts","sourceRoot":"","sources":["../../../src/helpers/isEmptyUiEntry/isEmptyUiEntry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,wBAAgB,cAAc,CAAC,CAAC,SAAS,SAAS,EAAE,OAAO,EAAE,CAAC,WAgB7D"}
@@ -0,0 +1,18 @@
1
+ import { isNullish } from '@minvws/mgo-utils';
2
+ export function isEmptyUiEntry(uiField) {
3
+ switch (uiField.type) {
4
+ case 'REFERENCE_VALUE':
5
+ case 'REFERENCE_LINK':
6
+ case 'DOWNLOAD_BINARY':
7
+ return isNullish(uiField.reference);
8
+ case 'SINGLE_VALUE':
9
+ return isNullish(uiField.display);
10
+ case 'MULTIPLE_VALUES':
11
+ case 'MULTIPLE_GROUPED_VALUES':
12
+ return isNullish(uiField.display) || !uiField.display.flat().length;
13
+ case 'DOWNLOAD_LINK':
14
+ return isNullish(uiField.url);
15
+ default:
16
+ throw new Error(`Unknown UI entry type: ${JSON.stringify(uiField)}`);
17
+ }
18
+ }
@@ -0,0 +1,5 @@
1
+ import { type UiElement } from '../../types/index.js';
2
+ export declare function isUiEntry<T extends UiElement['type']>(entry: UiElement, type: T): entry is Extract<UiElement, {
3
+ type: T;
4
+ }>;
5
+ //# sourceMappingURL=isUiEntry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUiEntry.d.ts","sourceRoot":"","sources":["../../../src/helpers/isUiEntry/isUiEntry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,wBAAgB,SAAS,CAAC,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,EACjD,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,CAAC,GACR,KAAK,IAAI,OAAO,CAAC,SAAS,EAAE;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,CAAC,CAE1C"}
@@ -0,0 +1,3 @@
1
+ export function isUiEntry(entry, type) {
2
+ return entry.type === type;
3
+ }
@@ -0,0 +1,3 @@
1
+ import { type HealthUiGroup, type HealthUiSchema, type UiElement } from '../../types/index.js';
2
+ export declare function isUiSchemaGroup(schema: UiElement | HealthUiSchema | HealthUiGroup): schema is HealthUiGroup;
3
+ //# sourceMappingURL=isUiSchemaGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUiSchemaGroup.d.ts","sourceRoot":"","sources":["../../../src/helpers/isUiSchemaGroup/isUiSchemaGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE/F,wBAAgB,eAAe,CAC3B,MAAM,EAAE,SAAS,GAAG,cAAc,GAAG,aAAa,GACnD,MAAM,IAAI,aAAa,CAEzB"}
@@ -0,0 +1,3 @@
1
+ export function isUiSchemaGroup(schema) {
2
+ return schema.children?.some((x) => typeof x.type === 'string');
3
+ }
@@ -0,0 +1,3 @@
1
+ import { type LosslessNumber, type Nullable } from '@minvws/mgo-utils';
2
+ export declare function numberToString(value: Nullable<number | LosslessNumber>): string | undefined;
3
+ //# sourceMappingURL=numberToString.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numberToString.d.ts","sourceRoot":"","sources":["../../../src/helpers/numberToString/numberToString.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElF,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,GAAG,cAAc,CAAC,sBAGtE"}
@@ -0,0 +1,6 @@
1
+ import { isNullish } from '@minvws/mgo-utils';
2
+ export function numberToString(value) {
3
+ if (isNullish(value))
4
+ return;
5
+ return value.toString();
6
+ }
@@ -0,0 +1,4 @@
1
+ import { type UiContext } from '../../context/index.js';
2
+ import { type HealthUiGroup, type HealthUiSchema } from '../../types/index.js';
3
+ export declare function setEmptyEntries(context: UiContext): <T extends HealthUiSchema | HealthUiGroup | HealthUiGroup[]>(schema: T) => T;
4
+ //# sourceMappingURL=setEmptyEntries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setEmptyEntries.d.ts","sourceRoot":"","sources":["../../../src/helpers/setEmptyEntries/setEmptyEntries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAoB/E,wBAAgB,eAAe,CAAC,OAAO,EAAE,SAAS,IACtC,CAAC,SAAS,cAAc,GAAG,aAAa,GAAG,aAAa,EAAE,EAAE,QAAQ,CAAC,KAAG,CAAC,CAcpF"}
@@ -0,0 +1,31 @@
1
+ import { isEmptyUiEntry } from '../isEmptyUiEntry/isEmptyUiEntry.js';
2
+ import { isUiSchemaGroup } from '../isUiSchemaGroup/isUiSchemaGroup.js';
3
+ function processGroup(group, { formatMessage }) {
4
+ return {
5
+ ...group,
6
+ children: group.children.map((entry) => {
7
+ return isEmptyUiEntry(entry) &&
8
+ !['DOWNLOAD_LINK', 'DOWNLOAD_BINARY'].includes(entry.type)
9
+ ? {
10
+ label: entry.label,
11
+ type: 'SINGLE_VALUE',
12
+ display: formatMessage('fhir.empty_value'),
13
+ }
14
+ : entry;
15
+ }),
16
+ };
17
+ }
18
+ export function setEmptyEntries(context) {
19
+ return (schema) => {
20
+ if (Array.isArray(schema)) {
21
+ return schema.map((x) => processGroup(x, context));
22
+ }
23
+ if (isUiSchemaGroup(schema)) {
24
+ return processGroup(schema, context);
25
+ }
26
+ return {
27
+ ...schema,
28
+ children: schema.children.map((x) => processGroup(x, context)),
29
+ };
30
+ };
31
+ }
@@ -0,0 +1,3 @@
1
+ import { type Nullable } from '@minvws/mgo-utils';
2
+ export declare function toString<T extends string | boolean>(value?: Nullable<T>): string | undefined;
3
+ //# sourceMappingURL=toString.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toString.d.ts","sourceRoot":"","sources":["../../../src/helpers/toString/toString.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7D,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,OAAO,EAAE,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,sBAGvE"}
@@ -0,0 +1,6 @@
1
+ import { isNullish } from '@minvws/mgo-utils';
2
+ export function toString(value) {
3
+ if (isNullish(value))
4
+ return;
5
+ return `${value}`;
6
+ }
@@ -0,0 +1,4 @@
1
+ import { type PrimitiveValueType } from '@minvws/mgo-hcim-parse';
2
+ import { type Nullable } from '@minvws/mgo-utils';
3
+ export declare function valueOf<T extends string, V>(value: Nullable<V | PrimitiveValueType<T, V>>): V | undefined;
4
+ //# sourceMappingURL=valueOf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valueOf.d.ts","sourceRoot":"","sources":["../../../src/helpers/valueOf/valueOf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACvF,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7D,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,EACvC,KAAK,EAAE,QAAQ,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAC9C,CAAC,GAAG,SAAS,CAUf"}
@@ -0,0 +1,11 @@
1
+ import { isPrimitiveValueType } from '@minvws/mgo-hcim-parse';
2
+ import { isNullish } from '@minvws/mgo-utils';
3
+ export function valueOf(value) {
4
+ if (isNullish(value)) {
5
+ return;
6
+ }
7
+ if (isPrimitiveValueType(value)) {
8
+ return value.value;
9
+ }
10
+ return value;
11
+ }
@@ -0,0 +1,9 @@
1
+ export { dropEmptyEntries } from './helpers/index.js';
2
+ export * from './types/index.js';
3
+ export { common } from './common/index.js';
4
+ export { createUiContext, type UiContext, type UiContextOptions } from './context/index.js';
5
+ export { generateUiSchema } from './generator/index.js';
6
+ export * from './helpers/index.js';
7
+ export { createUiHelpers, type UiHelpers } from './ui.js';
8
+ export { systemCode } from './format/systemCode/systemCode.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,cAAc,kBAAkB,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ export { dropEmptyEntries } from './helpers/index.js';
2
+ export * from './types/index.js';
3
+ export { common } from './common/index.js';
4
+ export { createUiContext } from './context/index.js';
5
+ export { generateUiSchema } from './generator/index.js';
6
+ export * from './helpers/index.js';
7
+ export { createUiHelpers } from './ui.js';
8
+ export { systemCode } from './format/systemCode/systemCode.js';
@@ -0,0 +1,4 @@
1
+ import { type MgoAttachment } from '@minvws/mgo-hcim-parse';
2
+ import { type DownloadBinary, type DownloadLink, type UiFunctionWithoutLabel, type WithUiContext } from '../../types/index.js';
3
+ export declare const attachment: WithUiContext<UiFunctionWithoutLabel<MgoAttachment, DownloadLink | DownloadBinary>>;
4
+ //# sourceMappingURL=attachment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../../src/special/attachment/attachment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EACrB,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,UAAU,EAAE,aAAa,CAClC,sBAAsB,CAAC,aAAa,EAAE,YAAY,GAAG,cAAc,CAAC,CAkBnE,CAAC"}
@@ -0,0 +1,18 @@
1
+ export const attachment = ({ formatMessage }) => (value) => {
2
+ const label = value?.title ?? formatMessage('fhir.unknown');
3
+ if (isBinaryReference(value?.url)) {
4
+ return {
5
+ type: 'DOWNLOAD_BINARY',
6
+ label,
7
+ reference: value?.url,
8
+ };
9
+ }
10
+ return {
11
+ type: 'DOWNLOAD_LINK',
12
+ label,
13
+ url: value?.url,
14
+ };
15
+ };
16
+ function isBinaryReference(value) {
17
+ return value?.startsWith('Binary/');
18
+ }
@@ -0,0 +1,8 @@
1
+ import { type UiContext } from '../context/index.js';
2
+ export declare function getSpecial(context: UiContext): {
3
+ valueWithMax: import("../index.js").CombinedUiFunction<number, number, import("../index.js").SingleValue>;
4
+ valueWithUnit: import("../index.js").CombinedUiFunction<number | import("@minvws/mgo-hcim-parse").PrimitiveValueType<string, number>, string | import("@minvws/mgo-hcim-parse").PrimitiveValueType<string, string>, import("../index.js").SingleValue>;
5
+ oneOfValueX: <T extends object>(label: import("@minvws/mgo-intl").FhirMessagesIds, value: import("@minvws/mgo-utils").Nullable<T>, prefix?: string) => import("../index.js").UiElement[];
6
+ attachment: import("../index.js").UiFunctionWithoutLabel<import("@minvws/mgo-hcim-parse").MgoAttachment, import("../index.js").DownloadLink | import("../index.js").DownloadBinary>;
7
+ };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/special/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAMrD,wBAAgB,UAAU,CAAC,OAAO,EAAE,SAAS;;;;;EAO5C"}
@@ -0,0 +1,12 @@
1
+ import { attachment } from './attachment/attachment.js';
2
+ import { oneOfValueX } from './oneOfValueX/oneOfValueX.js';
3
+ import { valueWithMax } from './valueWithMax/valueWithMax.js';
4
+ import { valueWithUnit } from './valueWithUnit/valueWithUnit.js';
5
+ export function getSpecial(context) {
6
+ return {
7
+ valueWithMax: valueWithMax(context),
8
+ valueWithUnit: valueWithUnit(context),
9
+ oneOfValueX: oneOfValueX(context),
10
+ attachment: attachment(context),
11
+ };
12
+ }
@@ -0,0 +1,6 @@
1
+ import { type FhirMessagesIds } from '@minvws/mgo-intl';
2
+ import { type Nullable } from '@minvws/mgo-utils';
3
+ import { type UiContext } from '../../context/index.js';
4
+ import { type UiElement } from '../../types/index.js';
5
+ export declare const oneOfValueX: (context: UiContext) => <T extends object>(label: FhirMessagesIds, value: Nullable<T>, prefix?: string) => UiElement[];
6
+ //# sourceMappingURL=oneOfValueX.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oneOfValueX.d.ts","sourceRoot":"","sources":["../../../src/special/oneOfValueX/oneOfValueX.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAA2B,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE3E,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGxD,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE1E,eAAO,MAAM,WAAW,GACnB,SAAS,SAAS,MAClB,CAAC,SAAS,MAAM,EAAE,OAAO,eAAe,EAAE,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE,eAAgB,gBAoB9E,CAAC"}