@minvws/mgo-hcim-ui 0.1.1-1 → 0.1.2
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/CHANGELOG.md +46 -0
- package/README.md +9 -7
- package/dist/common/organization/organization.d.ts.map +1 -1
- package/dist/common/organization/organization.js +2 -1
- package/dist/common/summaryOptions/summaryOptions.d.ts +2 -6
- package/dist/common/summaryOptions/summaryOptions.d.ts.map +1 -1
- package/dist/common/summaryOptions/summaryOptions.js +7 -4
- package/dist/context/baseProps/baseProps.d.ts +7 -0
- package/dist/context/baseProps/baseProps.d.ts.map +1 -0
- package/dist/context/baseProps/baseProps.js +10 -0
- package/dist/context/formatLabel/formatLabel.d.ts +20 -0
- package/dist/context/formatLabel/formatLabel.d.ts.map +1 -0
- package/dist/context/formatLabel/formatLabel.js +69 -0
- package/dist/context/index.d.ts +5 -3
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/index.js +3 -1
- package/dist/finalize/finalizeSchema/finalizeSchema.d.ts +7 -0
- package/dist/finalize/finalizeSchema/finalizeSchema.d.ts.map +1 -0
- package/dist/finalize/finalizeSchema/finalizeSchema.js +17 -0
- package/dist/finalize/flattenDeepGroups/flattenDeepGroups.d.ts +7 -0
- package/dist/finalize/flattenDeepGroups/flattenDeepGroups.d.ts.map +1 -0
- package/dist/finalize/flattenDeepGroups/flattenDeepGroups.js +69 -0
- package/dist/finalize/flattenSingleSubGroups/flattenSingleSubGroups.d.ts +7 -0
- package/dist/finalize/flattenSingleSubGroups/flattenSingleSubGroups.d.ts.map +1 -0
- package/dist/finalize/flattenSingleSubGroups/flattenSingleSubGroups.js +29 -0
- package/dist/finalize/hoistRootElements/hoistRootElements.d.ts +8 -0
- package/dist/finalize/hoistRootElements/hoistRootElements.d.ts.map +1 -0
- package/dist/finalize/hoistRootElements/hoistRootElements.js +47 -0
- package/dist/finalize/index.d.ts +7 -0
- package/dist/finalize/index.d.ts.map +1 -0
- package/dist/finalize/index.js +6 -0
- package/dist/finalize/normalizeSchema/normalizeSchema.d.ts +12 -0
- package/dist/finalize/normalizeSchema/normalizeSchema.d.ts.map +1 -0
- package/dist/finalize/normalizeSchema/normalizeSchema.js +81 -0
- package/dist/finalize/setEmptyEntries/setEmptyEntries.d.ts +4 -0
- package/dist/finalize/setEmptyEntries/setEmptyEntries.d.ts.map +1 -0
- package/dist/finalize/setEmptyEntries/setEmptyEntries.js +27 -0
- package/dist/finalize/translateGroupLabels/translateGroupLabels.d.ts +8 -0
- package/dist/finalize/translateGroupLabels/translateGroupLabels.d.ts.map +1 -0
- package/dist/finalize/translateGroupLabels/translateGroupLabels.js +29 -0
- package/dist/format/cardTitle/cardTitle.d.ts +6 -0
- package/dist/format/cardTitle/cardTitle.d.ts.map +1 -0
- package/dist/format/cardTitle/cardTitle.js +21 -0
- package/dist/format/cardTitle/extractDisplayFromUiElement/extractDisplayFromUiElement.d.ts +3 -0
- package/dist/format/cardTitle/extractDisplayFromUiElement/extractDisplayFromUiElement.d.ts.map +1 -0
- package/dist/format/cardTitle/extractDisplayFromUiElement/extractDisplayFromUiElement.js +17 -0
- package/dist/format/index.d.ts +10 -1
- package/dist/format/index.d.ts.map +1 -1
- package/dist/format/index.js +9 -0
- package/dist/generator/createGeneratorContext/createGeneratorContext.d.ts +5 -2
- package/dist/generator/createGeneratorContext/createGeneratorContext.d.ts.map +1 -1
- package/dist/generator/createGeneratorContext/createGeneratorContext.js +5 -2
- package/dist/generator/createUiElementHelper/createUiElementHelper.d.ts +2 -2
- package/dist/generator/createUiElementHelper/createUiElementHelper.d.ts.map +1 -1
- package/dist/generator/createUiElementHelper/createUiElementHelper.js +11 -43
- package/dist/generator/generateUiSchema/generateUiSchema.d.ts.map +1 -1
- package/dist/generator/generateUiSchema/generateUiSchema.js +5 -14
- package/dist/generator/getProfileKey/getProfileKey.d.ts +1 -1
- package/dist/generator/getProfileKey/getProfileKey.d.ts.map +1 -1
- package/dist/generator/getUiElements/getUiElements.d.ts +2 -2
- package/dist/generator/getUiElements/getUiElements.d.ts.map +1 -1
- package/dist/generator/getUiElements/getUiElements.js +2 -2
- package/dist/generator/processArray/processArray.d.ts +2 -2
- package/dist/generator/processArray/processArray.d.ts.map +1 -1
- package/dist/generator/processArray/processArray.js +2 -2
- package/dist/generator/processMgoType/processMgoType.d.ts +2 -2
- package/dist/generator/processMgoType/processMgoType.d.ts.map +1 -1
- package/dist/generator/processMgoType/processMgoType.js +3 -2
- package/dist/generator/processObject/processObject.d.ts +2 -2
- package/dist/generator/processObject/processObject.d.ts.map +1 -1
- package/dist/generator/processObject/processObject.js +5 -4
- package/dist/generator/processValue/processValue.d.ts +2 -2
- package/dist/generator/processValue/processValue.d.ts.map +1 -1
- package/dist/generator/processValue/processValue.js +4 -3
- package/dist/helpers/index.d.ts +3 -3
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +3 -3
- package/dist/helpers/isEmptyNode/isEmptyNode.d.ts +5 -0
- package/dist/helpers/isEmptyNode/isEmptyNode.d.ts.map +1 -0
- package/dist/helpers/isEmptyNode/isEmptyNode.js +24 -0
- package/dist/helpers/isEmptyUiEntry/isEmptyUiEntry.d.ts +4 -2
- package/dist/helpers/isEmptyUiEntry/isEmptyUiEntry.d.ts.map +1 -1
- package/dist/helpers/isEmptyUiEntry/isEmptyUiEntry.js +8 -3
- package/dist/helpers/isGroupNode/isGroupNode.d.ts +6 -0
- package/dist/helpers/isGroupNode/isGroupNode.d.ts.map +1 -0
- package/dist/helpers/isGroupNode/isGroupNode.js +3 -0
- package/dist/helpers/isUiGroupNode/isUiGroupNode.d.ts +6 -0
- package/dist/helpers/isUiGroupNode/isUiGroupNode.d.ts.map +1 -0
- package/dist/helpers/isUiGroupNode/isUiGroupNode.js +3 -0
- package/dist/helpers/isUiSchemaGroup/isUiSchemaGroup.d.ts +2 -2
- package/dist/helpers/isUiSchemaGroup/isUiSchemaGroup.d.ts.map +1 -1
- package/dist/helpers/isUiSchemaGroup/isUiSchemaGroup.js +1 -1
- package/dist/helpers/optional/optional.d.ts +17 -0
- package/dist/helpers/optional/optional.d.ts.map +1 -0
- package/dist/helpers/optional/optional.js +21 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -3
- package/dist/schema.d.ts +2 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +2 -0
- package/dist/special/attachment/attachment.d.ts +2 -2
- package/dist/special/attachment/attachment.d.ts.map +1 -1
- package/dist/special/attachment/attachment.js +28 -15
- package/dist/special/index.d.ts +3 -4
- package/dist/special/index.d.ts.map +1 -1
- package/dist/special/index.js +0 -2
- package/dist/special/oneOfValueX/oneOfValueX.d.ts +2 -2
- package/dist/special/oneOfValueX/oneOfValueX.d.ts.map +1 -1
- package/dist/special/oneOfValueX/oneOfValueX.js +7 -7
- package/dist/special/valueWithMax/valueWithMax.js +3 -3
- package/dist/special/valueWithUnit/valueWithUnit.js +3 -3
- package/dist/type/annotation/annotation.d.ts +3 -1
- package/dist/type/annotation/annotation.d.ts.map +1 -1
- package/dist/type/annotation/annotation.js +8 -6
- package/dist/type/attachment/attachment.d.ts +4 -0
- package/dist/type/attachment/attachment.d.ts.map +1 -0
- package/dist/type/attachment/attachment.js +31 -0
- package/dist/type/boolean/boolean.js +3 -3
- package/dist/type/code/code.js +8 -8
- package/dist/type/codeableConcept/codeableConcept.d.ts +2 -2
- package/dist/type/codeableConcept/codeableConcept.d.ts.map +1 -1
- package/dist/type/codeableConcept/codeableConcept.js +28 -15
- package/dist/type/coding/coding.d.ts +5 -2
- package/dist/type/coding/coding.d.ts.map +1 -1
- package/dist/type/coding/coding.js +14 -6
- package/dist/type/date/date.d.ts.map +1 -1
- package/dist/type/date/date.js +2 -1
- package/dist/type/dateTime/dateTime.d.ts.map +1 -1
- package/dist/type/dateTime/dateTime.js +5 -6
- package/dist/type/decimal/decimal.js +3 -3
- package/dist/type/duration/duration.d.ts +2 -2
- package/dist/type/duration/duration.d.ts.map +1 -1
- package/dist/type/identifier/identifier.d.ts.map +1 -1
- package/dist/type/identifier/identifier.js +5 -6
- package/dist/type/index.d.ts +12 -11
- package/dist/type/index.d.ts.map +1 -1
- package/dist/type/index.js +4 -1
- package/dist/type/instant/instant.d.ts.map +1 -1
- package/dist/type/instant/instant.js +5 -6
- package/dist/type/integer/integer.js +3 -3
- package/dist/type/integer64/integer64.js +3 -3
- package/dist/type/period/period.d.ts.map +1 -1
- package/dist/type/period/period.js +4 -2
- package/dist/type/positiveInt/positiveInt.js +3 -3
- package/dist/type/quantity/quantity.d.ts +2 -2
- package/dist/type/quantity/quantity.d.ts.map +1 -1
- package/dist/type/quantity/quantity.js +15 -3
- package/dist/type/range/range.d.ts.map +1 -1
- package/dist/type/range/range.js +5 -7
- package/dist/type/ratio/ratio.d.ts.map +1 -1
- package/dist/type/ratio/ratio.js +5 -7
- package/dist/type/reference/reference.d.ts.map +1 -1
- package/dist/type/reference/reference.js +6 -7
- package/dist/type/sampledData/sampledData.d.ts +2 -2
- package/dist/type/sampledData/sampledData.d.ts.map +1 -1
- package/dist/type/sampledData/sampledData.js +2 -0
- package/dist/type/simpleQuantity/simpleQuantity.js +3 -3
- package/dist/type/string/string.d.ts.map +1 -1
- package/dist/type/string/string.js +5 -6
- package/dist/type/time/time.d.ts.map +1 -1
- package/dist/type/time/time.js +5 -6
- package/dist/type/timing/timing.d.ts +2 -2
- package/dist/type/timing/timing.d.ts.map +1 -1
- package/dist/type/timing/timing.js +2 -0
- package/dist/type/unsignedInt/unsignedInt.js +3 -3
- package/dist/typeMaps/complexUiTypeMap.d.ts +8 -0
- package/dist/typeMaps/complexUiTypeMap.d.ts.map +1 -0
- package/dist/typeMaps/complexUiTypeMap.js +6 -0
- package/dist/typeMaps/index.d.ts +4 -0
- package/dist/typeMaps/index.d.ts.map +1 -0
- package/dist/typeMaps/index.js +3 -0
- package/dist/typeMaps/multipleUiTypeMap.d.ts +19 -0
- package/dist/typeMaps/multipleUiTypeMap.d.ts.map +1 -0
- package/dist/typeMaps/multipleUiTypeMap.js +15 -0
- package/dist/typeMaps/singleUiTypeMap.d.ts +32 -0
- package/dist/typeMaps/singleUiTypeMap.d.ts.map +1 -0
- package/dist/typeMaps/singleUiTypeMap.js +28 -0
- package/dist/typeMaps/typeMapTypes.d.ts +12 -0
- package/dist/typeMaps/typeMapTypes.d.ts.map +1 -0
- package/dist/typeMaps/typeMapTypes.js +2 -0
- package/dist/types/context.d.ts +5 -11
- package/dist/types/context.d.ts.map +1 -1
- package/dist/types/draft.d.ts +10 -0
- package/dist/types/draft.d.ts.map +1 -0
- package/dist/types/draft.js +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -1
- package/dist/types/schema.d.ts +39 -18
- package/dist/types/schema.d.ts.map +1 -1
- package/dist/types/schemaFunction.d.ts +5 -0
- package/dist/types/schemaFunction.d.ts.map +1 -0
- package/dist/types/schemaFunction.js +1 -0
- package/dist/ui.d.ts +30 -30
- package/package.json +26 -11
- package/dist/context/formatLabel.d.ts +0 -14
- package/dist/context/formatLabel.d.ts.map +0 -1
- package/dist/context/formatLabel.js +0 -61
- package/dist/helpers/dropEmptyEntries/dropEmptyEntries.d.ts +0 -5
- package/dist/helpers/dropEmptyEntries/dropEmptyEntries.d.ts.map +0 -1
- package/dist/helpers/dropEmptyEntries/dropEmptyEntries.js +0 -28
- package/dist/helpers/setEmptyEntries/setEmptyEntries.d.ts +0 -4
- package/dist/helpers/setEmptyEntries/setEmptyEntries.d.ts.map +0 -1
- package/dist/helpers/setEmptyEntries/setEmptyEntries.js +0 -31
|
@@ -1,25 +1,38 @@
|
|
|
1
1
|
import { isNonNullish } from '@minvws/mgo-utils';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { codingToDisplay } from '../coding/coding.js';
|
|
3
|
+
function findPreferredCoding(codeableConcept) {
|
|
4
|
+
const { coding } = codeableConcept;
|
|
5
|
+
let preferredCoding = coding.find((c) => c.userSelected === true);
|
|
6
|
+
if (!preferredCoding) {
|
|
7
|
+
const codingsWithDisplay = coding.filter((c) => c.display);
|
|
8
|
+
const snomedCoding = codingsWithDisplay.find((c) => c.system === 'http://snomed.info/sct');
|
|
9
|
+
preferredCoding = snomedCoding ?? codingsWithDisplay[0] ?? coding[0];
|
|
6
10
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
11
|
+
return preferredCoding;
|
|
12
|
+
}
|
|
10
13
|
export const codeableConcept = (context) => (label, value, options = {}) => {
|
|
11
|
-
const {
|
|
12
|
-
const
|
|
14
|
+
const { baseProps } = context;
|
|
15
|
+
const formatCoding = codingToDisplay(context);
|
|
16
|
+
const formatCodeableConcept = (value) => {
|
|
17
|
+
if (!value) {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
const { text } = value;
|
|
21
|
+
if (text) {
|
|
22
|
+
return { display: text };
|
|
23
|
+
}
|
|
24
|
+
return formatCoding(findPreferredCoding(value));
|
|
25
|
+
};
|
|
13
26
|
if (Array.isArray(value)) {
|
|
14
27
|
return {
|
|
15
|
-
|
|
16
|
-
type: '
|
|
17
|
-
|
|
28
|
+
...baseProps(label, value, options),
|
|
29
|
+
type: 'MULTIPLE_VALUES',
|
|
30
|
+
value: value.map(formatCodeableConcept).filter(isNonNullish),
|
|
18
31
|
};
|
|
19
32
|
}
|
|
20
33
|
return {
|
|
21
|
-
|
|
22
|
-
type: '
|
|
23
|
-
|
|
34
|
+
...baseProps(label, value, options),
|
|
35
|
+
type: 'SINGLE_VALUE',
|
|
36
|
+
value: formatCodeableConcept(value),
|
|
24
37
|
};
|
|
25
38
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { type MgoCoding } from '@minvws/mgo-hcim-parse';
|
|
2
|
-
import {
|
|
1
|
+
import { MgoCodingProps, type MgoCoding } from '@minvws/mgo-hcim-parse';
|
|
2
|
+
import { Nullable } from '@minvws/mgo-utils';
|
|
3
|
+
import { UiContext } from '../../context/index.js';
|
|
4
|
+
import { type DisplayValue, type MultipleValues, type SingleValue, type UiFunction, type WithUiContext } from '../../types/index.js';
|
|
5
|
+
export declare const codingToDisplay: (uiContext: UiContext) => (value: Nullable<MgoCodingProps>) => DisplayValue;
|
|
3
6
|
export declare const coding: WithUiContext<UiFunction<MgoCoding | MgoCoding[], SingleValue | MultipleValues>>;
|
|
4
7
|
//# sourceMappingURL=coding.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coding.d.ts","sourceRoot":"","sources":["../../../src/type/coding/coding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"coding.d.ts","sourceRoot":"","sources":["../../../src/type/coding/coding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAgB,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EACH,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,EACrB,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,eAAe,GAAI,WAAW,SAAS,MAExC,OAAO,QAAQ,CAAC,cAAc,CAAC,KAAG,YAK7C,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,aAAa,CAC9B,UAAU,CAAC,SAAS,GAAG,SAAS,EAAE,EAAE,WAAW,GAAG,cAAc,CAAC,CAmBhE,CAAC"}
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import { isNonNullish } from '@minvws/mgo-utils';
|
|
2
2
|
import { system } from '../../format/system/system.js';
|
|
3
|
+
export const codingToDisplay = (uiContext) => {
|
|
4
|
+
const display = system(uiContext);
|
|
5
|
+
return (value) => ({
|
|
6
|
+
display: display(value),
|
|
7
|
+
code: value?.code,
|
|
8
|
+
system: value?.system,
|
|
9
|
+
});
|
|
10
|
+
};
|
|
3
11
|
export const coding = (context) => (label, value, options = {}) => {
|
|
4
|
-
const {
|
|
5
|
-
const
|
|
12
|
+
const { baseProps } = context;
|
|
13
|
+
const formatCoding = codingToDisplay(context);
|
|
6
14
|
if (Array.isArray(value)) {
|
|
7
15
|
return {
|
|
8
|
-
|
|
16
|
+
...baseProps(label, value, options),
|
|
9
17
|
type: 'MULTIPLE_VALUES',
|
|
10
|
-
|
|
18
|
+
value: value.map(formatCoding).filter((item) => isNonNullish(item.display)),
|
|
11
19
|
};
|
|
12
20
|
}
|
|
13
21
|
return {
|
|
14
|
-
|
|
22
|
+
...baseProps(label, value, options),
|
|
15
23
|
type: 'SINGLE_VALUE',
|
|
16
|
-
|
|
24
|
+
value: formatCoding(value),
|
|
17
25
|
};
|
|
18
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../../src/type/date/date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE7F,eAAO,MAAM,IAAI,EAAE,aAAa,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../../src/type/date/date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE7F,eAAO,MAAM,IAAI,EAAE,aAAa,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,CAS5D,CAAC"}
|
package/dist/type/date/date.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { date as formatDate } from '../../format/date/date.js';
|
|
2
2
|
export const date = (i18nContext) => (label, value, options = {}) => {
|
|
3
3
|
return {
|
|
4
|
+
id: label,
|
|
4
5
|
label: i18nContext.formatLabel(label, value, options.defaultLabel),
|
|
5
6
|
type: 'SINGLE_VALUE',
|
|
6
|
-
display: formatDate(i18nContext)(value?.value),
|
|
7
|
+
value: { display: formatDate(i18nContext)(value?.value) },
|
|
7
8
|
};
|
|
8
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateTime.d.ts","sourceRoot":"","sources":["../../../src/type/dateTime/dateTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"dateTime.d.ts","sourceRoot":"","sources":["../../../src/type/dateTime/dateTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,EACrB,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,QAAQ,EAAE,aAAa,CAChC,UAAU,CAAC,WAAW,GAAG,WAAW,EAAE,EAAE,WAAW,GAAG,cAAc,CAAC,CAoBpE,CAAC"}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { isNonNullish } from '@minvws/mgo-utils';
|
|
2
1
|
import { date } from '../../format/date/date.js';
|
|
3
2
|
import { valueOf } from '../../helpers/valueOf/valueOf.js';
|
|
4
3
|
export const dateTime = (context) => (label, value, options = {}) => {
|
|
5
4
|
const formatDate = date(context);
|
|
6
|
-
const {
|
|
5
|
+
const { baseProps } = context;
|
|
7
6
|
if (Array.isArray(value)) {
|
|
8
7
|
return {
|
|
9
|
-
|
|
8
|
+
...baseProps(label, value, options),
|
|
10
9
|
type: 'MULTIPLE_VALUES',
|
|
11
|
-
|
|
10
|
+
value: value.map((x) => ({ display: formatDate(valueOf(x)) })),
|
|
12
11
|
};
|
|
13
12
|
}
|
|
14
13
|
return {
|
|
15
|
-
|
|
14
|
+
...baseProps(label, value, options),
|
|
16
15
|
type: 'SINGLE_VALUE',
|
|
17
|
-
display: formatDate(valueOf(value)),
|
|
16
|
+
value: { display: formatDate(valueOf(value)) },
|
|
18
17
|
};
|
|
19
18
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { numberToString } from '../../helpers/index.js';
|
|
2
|
-
export const decimal = ({
|
|
2
|
+
export const decimal = ({ baseProps }) => (label, value, options = {}) => {
|
|
3
3
|
return {
|
|
4
|
-
|
|
4
|
+
...baseProps(label, value, options),
|
|
5
5
|
type: 'SINGLE_VALUE',
|
|
6
|
-
display: numberToString(value?.value),
|
|
6
|
+
value: { display: numberToString(value?.value) },
|
|
7
7
|
};
|
|
8
8
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type MgoDuration } from '@minvws/mgo-hcim-parse';
|
|
2
|
-
import { type SingleValue, type UiFunction, type WithUiContext } from '../../types/index.js';
|
|
3
|
-
export declare const duration: WithUiContext<UiFunction<MgoDuration, SingleValue>>;
|
|
2
|
+
import { type MultipleValues, type SingleValue, type UiFunction, type WithUiContext } from '../../types/index.js';
|
|
3
|
+
export declare const duration: WithUiContext<UiFunction<MgoDuration | MgoDuration[], SingleValue | MultipleValues>>;
|
|
4
4
|
//# sourceMappingURL=duration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"duration.d.ts","sourceRoot":"","sources":["../../../src/type/duration/duration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,
|
|
1
|
+
{"version":3,"file":"duration.d.ts","sourceRoot":"","sources":["../../../src/type/duration/duration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,EACrB,MAAM,sBAAsB,CAAC;AAG9B,eAAO,MAAM,QAAQ,EAAE,aAAa,CAChC,UAAU,CAAC,WAAW,GAAG,WAAW,EAAE,EAAE,WAAW,GAAG,cAAc,CAAC,CAC7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifier.d.ts","sourceRoot":"","sources":["../../../src/type/identifier/identifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"identifier.d.ts","sourceRoot":"","sources":["../../../src/type/identifier/identifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,EACrB,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,UAAU,EAAE,aAAa,CAClC,UAAU,CAAC,aAAa,GAAG,aAAa,EAAE,EAAE,WAAW,GAAG,cAAc,EAAE,eAAe,CAAC,CAgBzF,CAAC"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
export const identifier = ({ formatLabel }) => (label, value, options = {}) => {
|
|
1
|
+
export const identifier = ({ baseProps }) => (label, value, options = {}) => {
|
|
3
2
|
if (Array.isArray(value)) {
|
|
4
3
|
return {
|
|
5
|
-
|
|
4
|
+
...baseProps(label, value, options),
|
|
6
5
|
type: 'MULTIPLE_VALUES',
|
|
7
|
-
|
|
6
|
+
value: value.map((x) => ({ display: x?.value })),
|
|
8
7
|
};
|
|
9
8
|
}
|
|
10
9
|
return {
|
|
11
|
-
|
|
10
|
+
...baseProps(label, value, options),
|
|
12
11
|
type: 'SINGLE_VALUE',
|
|
13
|
-
display: value?.value,
|
|
12
|
+
value: { display: value?.value },
|
|
14
13
|
};
|
|
15
14
|
};
|