@icure/form 2.0.8 → 3.0.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.
- package/.yarn/cache/@babel-runtime-npm-7.26.0-9afa3c4ef6-c8e2c0504a.zip +0 -0
- package/.yarn/cache/@lit-labs-ssr-dom-shim-npm-1.3.0-6bfa115c08-c2003e8bb6.zip +0 -0
- package/.yarn/cache/date-fns-npm-2.30.0-895c790e0f-f7be015232.zip +0 -0
- package/.yarn/cache/prosemirror-model-npm-1.24.1-6467e55b40-386076e2ff.zip +0 -0
- package/.yarn/cache/prosemirror-view-npm-1.37.2-1bde3a1540-1db70cab86.zip +0 -0
- package/.yarn/cache/regenerator-runtime-npm-0.14.1-a6c97c609a-9f57c93277.zip +0 -0
- package/.yarn/install-state.gz +0 -0
- package/components/common/utils.js +1 -1
- package/components/common/utils.js.map +1 -1
- package/icure/form-values-container.d.ts +14 -14
- package/icure/form-values-container.js +18 -15
- package/icure/form-values-container.js.map +1 -1
- package/icure/icure-utils.d.ts +7 -7
- package/icure/icure-utils.js +7 -6
- package/icure/icure-utils.js.map +1 -1
- package/icure/model.d.ts +1 -1
- package/icure/model.js.map +1 -1
- package/package.json +2 -1
- package/utils/code-utils.d.ts +10 -1
- package/utils/code-utils.js +43 -3
- package/utils/code-utils.js.map +1 -1
- package/.yarn/cache/@lit-labs-ssr-dom-shim-npm-1.2.1-d14ce3e3e5-5667c44f58.zip +0 -0
- package/.yarn/cache/prosemirror-model-npm-1.23.0-57eb718541-f5ab1593cb.zip +0 -0
- package/.yarn/cache/prosemirror-view-npm-1.36.0-830888802f-38986f55e4.zip +0 -0
- package/components/icure-text-field/schema/items-list.d.ts +0 -3
- package/components/icure-text-field/schema/items-list.js +0 -31
- package/components/icure-text-field/schema/items-list.js.map +0 -1
- package/components/themes/ehr-lite/index.d.ts +0 -1
- package/components/themes/ehr-lite/index.js +0 -321
- package/components/themes/ehr-lite/index.js.map +0 -1
- package/conversion/icure-convert.d.ts +0 -3
- package/conversion/icure-convert.js +0 -165
- package/conversion/icure-convert.js.map +0 -1
- package/utils/icure-utils.d.ts +0 -16
- package/utils/icure-utils.js +0 -105
- package/utils/icure-utils.js.map +0 -1
package/icure/icure-utils.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.codeStubToCode = exports.contentToPrimitiveType = exports.primitiveTypeToContent = exports.isServiceContentEqual = exports.isContentEqual = exports.isServiceEqual = exports.areCodesEqual = exports.isCodeEqual = void 0;
|
|
4
|
+
const cardinal_sdk_1 = require("@icure/cardinal-sdk");
|
|
4
5
|
function isCodeEqual(c1, c2) {
|
|
5
6
|
var _a, _b;
|
|
6
7
|
const idParts1 = (_a = c1.id) === null || _a === void 0 ? void 0 : _a.split('|');
|
|
@@ -19,7 +20,7 @@ function areCodesEqual(c1s, c2s) {
|
|
|
19
20
|
}
|
|
20
21
|
exports.areCodesEqual = areCodesEqual;
|
|
21
22
|
function isServiceEqual(svc1, svc2) {
|
|
22
|
-
return
|
|
23
|
+
return svc1.id === svc2.id && svc1.valueDate === svc2.valueDate && areCodesEqual(svc1.codes || [], svc2.codes || []) && isServiceContentEqual(svc1.content || {}, svc2.content || {});
|
|
23
24
|
}
|
|
24
25
|
exports.isServiceEqual = isServiceEqual;
|
|
25
26
|
function isContentEqual(content1, content2) {
|
|
@@ -52,23 +53,23 @@ function isServiceContentEqual(content1, content2) {
|
|
|
52
53
|
}
|
|
53
54
|
exports.isServiceContentEqual = isServiceContentEqual;
|
|
54
55
|
const primitiveTypeToContent = (language, value) => {
|
|
55
|
-
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (value.type === 'number' ? { numberValue: value.value } : {})), (value.type === 'measure'
|
|
56
|
+
return new cardinal_sdk_1.DecryptedContent(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (value.type === 'number' ? { numberValue: value.value } : {})), (value.type === 'measure'
|
|
56
57
|
? {
|
|
57
|
-
measureValue: {
|
|
58
|
+
measureValue: new cardinal_sdk_1.Measure({
|
|
58
59
|
value: value.value,
|
|
59
60
|
unit: value.unit,
|
|
60
|
-
},
|
|
61
|
+
}),
|
|
61
62
|
}
|
|
62
63
|
: {})), (value.type === 'string' ? { stringValue: value.value } : {})), (value.type === 'datetime' ? { fuzzyDateValue: value.value } : {})), (value.type === 'boolean' ? { booleanValue: value.value } : {})), (value.type === 'timestamp' ? { instantValue: value.value } : {})), (value.type === 'compound'
|
|
63
64
|
? {
|
|
64
|
-
compoundValue: Object.entries(value.value).map(([label, value]) => ({
|
|
65
|
+
compoundValue: Object.entries(value.value).map(([label, value]) => new cardinal_sdk_1.DecryptedService({
|
|
65
66
|
label,
|
|
66
67
|
content: {
|
|
67
68
|
[language]: (0, exports.primitiveTypeToContent)(language, value),
|
|
68
69
|
},
|
|
69
70
|
})),
|
|
70
71
|
}
|
|
71
|
-
: {}));
|
|
72
|
+
: {})));
|
|
72
73
|
};
|
|
73
74
|
exports.primitiveTypeToContent = primitiveTypeToContent;
|
|
74
75
|
const contentToPrimitiveType = (language, content) => {
|
package/icure/icure-utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icure-utils.js","sourceRoot":"","sources":["../../tmp/icure/icure-utils.ts"],"names":[],"mappings":";;;AAGA,SAAgB,WAAW,CAAC,EAAY,EAAE,EAAY;;IACrD,MAAM,QAAQ,GAAG,MAAA,EAAE,CAAC,EAAE,0CAAE,KAAK,CAAC,GAAG,CAAC,CAAA;IAClC,MAAM,QAAQ,GAAG,MAAA,EAAE,CAAC,EAAE,0CAAE,KAAK,CAAC,GAAG,CAAC,CAAA;IAClC,MAAM,KAAK,GAAG,EAAE,CAAC,IAAI,KAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,CAAC,CAAC,CAAA,CAAA;IACtC,MAAM,KAAK,GA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AA;AAjCY,QAAA,sBAAsB,0BAiClC;AACM,MAAM,cAAc,GAAG,CAAC,CAAW,EAAE,EAAE;;IAAC,OAAA,CAAC;QAC/C,EAAE,EAAE,MAAA,CAAC,CAAC,EAAE,mCAAI,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,EAAE;QAC9C,KAAK,EAAE,MAAA,CAAC,CAAC,KAAK,mCAAI,EAAE;KACpB,CAAC,CAAA;CAAA,CAAA;AAHW,QAAA,cAAc,kBAGzB","sourcesContent":["import { CodeStub, Content, Service } from '@icure/api'\nimport { BooleanType, CompoundType, DateTimeType, MeasureType, NumberType, PrimitiveType, StringType, TimestampType } from '../components/model'\n\nexport function isCodeEqual(c1: CodeStub, c2: CodeStub): boolean {\n\tconst idParts1 = c1.id?.split('|')\n\tconst idParts2 = c2.id?.split('|')\n\tconst type1 = c1.type || idParts1?.[0]\n\tconst type2 = c2.type || idParts2?.[0]\n\tconst code1 = c1.code || idParts1?.[1]\n\tconst code2 = c2.code || idParts2?.[1]\n\tconst version1 = c1.version || idParts1?.[2]\n\tconst version2 = c2.version || idParts2?.[2]\n\treturn type1 === type2 && code1 === code2 && version1 === version2\n}\n\nexport function areCodesEqual(c1s: CodeStub[], c2s: CodeStub[]): boolean {\n\treturn c1s.every((c1) => c2s.some((c2) => isCodeEqual(c1, c2)) || false) && c2s.every((c2) => c1s.some((c1) => isCodeEqual(c1, c2)) || false)\n}\n\nexport function isServiceEqual(svc1: Service, svc2: Service): boolean {\n\treturn (\n\t\tsvc1.id === svc2.id && svc1.valueDate === svc2.valueDate && areCodesEqual(svc1.codes || [], svc2.codes || []) && isServiceContentEqual(svc1.content || {}, svc2.content || {})\n\t)\n}\n\nexport function isContentEqual(content1: Content | undefined, content2: Content | undefined): boolean {\n\tif (!content1 && !content2) {\n\t\treturn true\n\t}\n\tif (!content1 || !content2) {\n\t\treturn false\n\t}\n\treturn (\n\t\t((!content1.binaryValue && !content2.binaryValue) || content1.binaryValue === content2.binaryValue) &&\n\t\t(((content1.booleanValue === null || content1.booleanValue === undefined) && (content2.booleanValue === null || content2.booleanValue === undefined)) ||\n\t\t\tcontent1.booleanValue === content2.booleanValue) &&\n\t\t((!content1.documentId && !content2.documentId) || content1.documentId === content2.documentId) &&\n\t\t(((content1.fuzzyDateValue === null || content1.fuzzyDateValue === undefined) && (content2.fuzzyDateValue === null || content2.fuzzyDateValue === undefined)) ||\n\t\t\tcontent1.fuzzyDateValue === content2.fuzzyDateValue) &&\n\t\t((!content1.instantValue && !content2.instantValue) || content1.instantValue === content2.instantValue) &&\n\t\t((!content1.measureValue && !content2.measureValue) || content1.measureValue === content2.measureValue) &&\n\t\t((!content1.medicationValue && !content2.medicationValue) || content1.medicationValue === content2.medicationValue) &&\n\t\t((!content1.stringValue && !content2.stringValue) || content1.stringValue === content2.stringValue) &&\n\t\t(((content1.numberValue === null || content1.numberValue === undefined) && (content2.numberValue === null || content2.numberValue === undefined)) ||\n\t\t\tcontent1.numberValue === content2.numberValue) &&\n\t\t((!content1.compoundValue && !content2.compoundValue) ||\n\t\t\t((content1.compoundValue?.every((s1) => content2.compoundValue?.some((s2) => isServiceEqual(s1, s2))) || false) &&\n\t\t\t\t(content2?.compoundValue?.every((s2) => content1?.compoundValue?.some((s1) => isServiceEqual(s1, s2))) || false)))\n\t)\n}\n\nexport function isServiceContentEqual(content1: { [language: string]: Content }, content2: { [language: string]: Content }): boolean {\n\treturn Object.keys(content1).reduce((isEqual, lng) => isEqual && isContentEqual(content1[lng], content2[lng]), true as boolean)\n}\n\nexport const primitiveTypeToContent = (language: string, value: PrimitiveType): Content => {\n\treturn {\n\t\t...(value.type === 'number' ? { numberValue: (value as NumberType).value } : {}),\n\t\t...(value.type === 'measure'\n\t\t\t? {\n\t\t\t\t\tmeasureValue: {\n\t\t\t\t\t\tvalue: (value as MeasureType).value,\n\t\t\t\t\t\tunit: (value as MeasureType).unit,\n\t\t\t\t\t},\n\t\t\t }\n\t\t\t: {}),\n\t\t...(value.type === 'string' ? { stringValue: (value as StringType).value } : {}),\n\t\t...(value.type === 'datetime' ? { fuzzyDateValue: (value as DateTimeType).value } : {}),\n\t\t...(value.type === 'boolean' ? { booleanValue: (value as BooleanType).value } : {}),\n\t\t...(value.type === 'timestamp' ? { instantValue: (value as TimestampType).value } : {}),\n\t\t...(value.type === 'compound'\n\t\t\t? {\n\t\t\t\t\tcompoundValue: Object.entries((value as CompoundType).value).map(([label, value]) => ({\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\tcontent: {\n\t\t\t\t\t\t\t[language]: primitiveTypeToContent(language, value),\n\t\t\t\t\t\t},\n\t\t\t\t\t})),\n\t\t\t }\n\t\t\t: {}),\n\t}\n}\nexport const contentToPrimitiveType = (language: string, content: Content | undefined): PrimitiveType | undefined => {\n\tif (!content) {\n\t\treturn undefined\n\t}\n\tif (content.numberValue || content.numberValue === 0) {\n\t\treturn { type: 'number', value: content.numberValue }\n\t}\n\tif (content.measureValue?.value || content.measureValue?.value === 0 || content.measureValue?.unit?.length) {\n\t\treturn { type: 'measure', value: content.measureValue?.value, unit: content.measureValue?.unit }\n\t}\n\tif (content.stringValue) {\n\t\treturn { type: 'string', value: content.stringValue }\n\t}\n\tif (content.fuzzyDateValue) {\n\t\treturn { type: 'datetime', value: content.fuzzyDateValue }\n\t}\n\tif (content.booleanValue) {\n\t\treturn { type: 'boolean', value: content.booleanValue }\n\t}\n\tif (content.instantValue) {\n\t\treturn { type: 'timestamp', value: content.instantValue }\n\t}\n\tif (content.compoundValue) {\n\t\treturn {\n\t\t\ttype: 'compound',\n\t\t\tvalue: content.compoundValue.reduce((acc: { [label: string]: PrimitiveType }, { label, content }) => {\n\t\t\t\tconst primitiveValue = contentToPrimitiveType(language, content?.[language])\n\t\t\t\treturn label && primitiveValue ? { ...acc, [label]: primitiveValue } : acc\n\t\t\t}, {}),\n\t\t}\n\t}\n\n\treturn undefined\n}\nexport const codeStubToCode = (c: CodeStub) => ({\n\tid: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K,EAAE,OAAO,CAAC,YAAY,EAAE,CAAA;IAC1D,CAAC;IACD,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;QAC3B,OAAO;YACN,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,GAAuC,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE;gBACnG,MAAM,cAAc,GAAG,IAAA,8BAAsB,EAAC,QAAQ,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,QAAQ,CAAC,CAAC,CAAA;gBAC5E,OAAO,KAAK,IAAI,cAAc,CAAC,CAAC,iCAAM,GAAG,KAAE,CAAC,KAAK,CAAC,EAAE,cAAc,IAAG,CAAC,CAAC,GAAG,CAAA;YAC3E,CAAC,EAAE,EAAE,CAAC;SACN,CAAA;IACF,CAAC;IAED,OAAO,SAAS,CAAA;AACjB,CAAC,CAAA;AAjCY,QAAA,sBAAsB,0BAiClC;AACM,MAAM,cAAc,GAAG,CAAC,CAAW,EAAE,EAAE;;IAAC,OAAA,CAAC;QAC/C,EAAE,EAAE,MAAA,CAAC,CAAC,EAAE,mCAAI,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,EAAE;QAC9C,KAAK,EAAE,MAAA,CAAC,CAAC,KAAK,mCAAI,EAAE;KACpB,CAAC,CAAA;CAAA,CAAA;AAHW,QAAA,cAAc,kBAGzB","sourcesContent":["import { CodeStub, DecryptedContent, DecryptedService, Measure } from '@icure/cardinal-sdk'\nimport { BooleanType, CompoundType, DateTimeType, MeasureType, NumberType, PrimitiveType, StringType, TimestampType } from '../components/model'\n\nexport function isCodeEqual(c1: CodeStub, c2: CodeStub): boolean {\n\tconst idParts1 = c1.id?.split('|')\n\tconst idParts2 = c2.id?.split('|')\n\tconst type1 = c1.type || idParts1?.[0]\n\tconst type2 = c2.type || idParts2?.[0]\n\tconst code1 = c1.code || idParts1?.[1]\n\tconst code2 = c2.code || idParts2?.[1]\n\tconst version1 = c1.version || idParts1?.[2]\n\tconst version2 = c2.version || idParts2?.[2]\n\treturn type1 === type2 && code1 === code2 && version1 === version2\n}\n\nexport function areCodesEqual(c1s: CodeStub[], c2s: CodeStub[]): boolean {\n\treturn c1s.every((c1) => c2s.some((c2) => isCodeEqual(c1, c2)) || false) && c2s.every((c2) => c1s.some((c1) => isCodeEqual(c1, c2)) || false)\n}\n\nexport function isServiceEqual(svc1: DecryptedService, svc2: DecryptedService): boolean {\n\treturn svc1.id === svc2.id && svc1.valueDate === svc2.valueDate && areCodesEqual(svc1.codes || [], svc2.codes || []) && isServiceContentEqual(svc1.content || {}, svc2.content || {})\n}\n\nexport function isContentEqual(content1: DecryptedContent | undefined, content2: DecryptedContent | undefined): boolean {\n\tif (!content1 && !content2) {\n\t\treturn true\n\t}\n\tif (!content1 || !content2) {\n\t\treturn false\n\t}\n\treturn (\n\t\t((!content1.binaryValue && !content2.binaryValue) || content1.binaryValue === content2.binaryValue) &&\n\t\t(((content1.booleanValue === null || content1.booleanValue === undefined) && (content2.booleanValue === null || content2.booleanValue === undefined)) ||\n\t\t\tcontent1.booleanValue === content2.booleanValue) &&\n\t\t((!content1.documentId && !content2.documentId) || content1.documentId === content2.documentId) &&\n\t\t(((content1.fuzzyDateValue === null || content1.fuzzyDateValue === undefined) && (content2.fuzzyDateValue === null || content2.fuzzyDateValue === undefined)) ||\n\t\t\tcontent1.fuzzyDateValue === content2.fuzzyDateValue) &&\n\t\t((!content1.instantValue && !content2.instantValue) || content1.instantValue === content2.instantValue) &&\n\t\t((!content1.measureValue && !content2.measureValue) || content1.measureValue === content2.measureValue) &&\n\t\t((!content1.medicationValue && !content2.medicationValue) || content1.medicationValue === content2.medicationValue) &&\n\t\t((!content1.stringValue && !content2.stringValue) || content1.stringValue === content2.stringValue) &&\n\t\t(((content1.numberValue === null || content1.numberValue === undefined) && (content2.numberValue === null || content2.numberValue === undefined)) ||\n\t\t\tcontent1.numberValue === content2.numberValue) &&\n\t\t((!content1.compoundValue && !content2.compoundValue) ||\n\t\t\t((content1.compoundValue?.every((s1) => content2.compoundValue?.some((s2) => isServiceEqual(s1, s2))) || false) &&\n\t\t\t\t(content2?.compoundValue?.every((s2) => content1?.compoundValue?.some((s1) => isServiceEqual(s1, s2))) || false)))\n\t)\n}\n\nexport function isServiceContentEqual(content1: { [language: string]: DecryptedContent }, content2: { [language: string]: DecryptedContent }): boolean {\n\treturn Object.keys(content1).reduce((isEqual, lng) => isEqual && isContentEqual(content1[lng], content2[lng]), true as boolean)\n}\n\nexport const primitiveTypeToContent = (language: string, value: PrimitiveType): DecryptedContent => {\n\treturn new DecryptedContent({\n\t\t...(value.type === 'number' ? { numberValue: (value as NumberType).value } : {}),\n\t\t...(value.type === 'measure'\n\t\t\t? {\n\t\t\t\t\tmeasureValue: new Measure({\n\t\t\t\t\t\tvalue: (value as MeasureType).value,\n\t\t\t\t\t\tunit: (value as MeasureType).unit,\n\t\t\t\t\t}),\n\t\t\t }\n\t\t\t: {}),\n\t\t...(value.type === 'string' ? { stringValue: (value as StringType).value } : {}),\n\t\t...(value.type === 'datetime' ? { fuzzyDateValue: (value as DateTimeType).value } : {}),\n\t\t...(value.type === 'boolean' ? { booleanValue: (value as BooleanType).value } : {}),\n\t\t...(value.type === 'timestamp' ? { instantValue: (value as TimestampType).value } : {}),\n\t\t...(value.type === 'compound'\n\t\t\t? {\n\t\t\t\t\tcompoundValue: Object.entries((value as CompoundType).value).map(\n\t\t\t\t\t\t([label, value]) =>\n\t\t\t\t\t\t\tnew DecryptedService({\n\t\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\t\tcontent: {\n\t\t\t\t\t\t\t\t\t[language]: primitiveTypeToContent(language, value),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t }\n\t\t\t: {}),\n\t})\n}\nexport const contentToPrimitiveType = (language: string, content: DecryptedContent | undefined): PrimitiveType | undefined => {\n\tif (!content) {\n\t\treturn undefined\n\t}\n\tif (content.numberValue || content.numberValue === 0) {\n\t\treturn { type: 'number', value: content.numberValue }\n\t}\n\tif (content.measureValue?.value || content.measureValue?.value === 0 || content.measureValue?.unit?.length) {\n\t\treturn { type: 'measure', value: content.measureValue?.value, unit: content.measureValue?.unit }\n\t}\n\tif (content.stringValue) {\n\t\treturn { type: 'string', value: content.stringValue }\n\t}\n\tif (content.fuzzyDateValue) {\n\t\treturn { type: 'datetime', value: content.fuzzyDateValue }\n\t}\n\tif (content.booleanValue) {\n\t\treturn { type: 'boolean', value: content.booleanValue }\n\t}\n\tif (content.instantValue) {\n\t\treturn { type: 'timestamp', value: content.instantValue }\n\t}\n\tif (content.compoundValue) {\n\t\treturn {\n\t\t\ttype: 'compound',\n\t\t\tvalue: content.compoundValue.reduce((acc: { [label: string]: PrimitiveType }, { label, content }) => {\n\t\t\t\tconst primitiveValue = contentToPrimitiveType(language, content?.[language])\n\t\t\t\treturn label && primitiveValue ? { ...acc, [label]: primitiveValue } : acc\n\t\t\t}, {}),\n\t\t}\n\t}\n\n\treturn undefined\n}\nexport const codeStubToCode = (c: CodeStub) => ({\n\tid: c.id ?? `${c.type}|${c.code}|${c.version}`,\n\tlabel: c.label ?? {},\n})\n"]}
|
package/icure/model.d.ts
CHANGED
package/icure/model.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../tmp/icure/model.ts"],"names":[],"mappings":"","sourcesContent":["import { CodeStub } from '@icure/
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../tmp/icure/model.ts"],"names":[],"mappings":"","sourcesContent":["import { CodeStub } from '@icure/cardinal-sdk'\n\nexport interface ServiceMetadata {\n\tlabel: string\n\tindex?: number\n\tvalueDate?: number\n\tauthor?: string\n\tresponsible?: string\n\tcodes?: CodeStub[]\n\ttags?: CodeStub[]\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icure/form",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@webcomponents/webcomponentsjs": "^2.7.0",
|
|
9
9
|
"app-datepicker": "^6.0.0-rc.33",
|
|
10
|
+
"date-fns": "^2.23.0",
|
|
10
11
|
"fast-deep-equal": "^3.1.3",
|
|
11
12
|
"lit": "^3.1.3",
|
|
12
13
|
"markdown-it": "^14.1.0",
|
package/utils/code-utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Code, Field, SortOptions } from '../components/model';
|
|
2
2
|
import { Suggestion } from '../generic';
|
|
3
|
-
import { CodeStub } from '@icure/
|
|
3
|
+
import { CodeStub } from '@icure/cardinal-sdk';
|
|
4
4
|
/**
|
|
5
5
|
* Maps the options defined in a field into a list of codes
|
|
6
6
|
*
|
|
@@ -13,3 +13,12 @@ export declare const sortCodes: (codes: Code[], language: string, sortOptions?:
|
|
|
13
13
|
export declare const sortSuggestions: (codes: (Code | Suggestion)[], language: string, sortOptions?: SortOptions) => Suggestion[];
|
|
14
14
|
export declare const filterAndSortOptionsFromFieldDefinition: (language: string, fg: Field, translationProvider: ((language: string, text: string) => string) | undefined, terms?: string[]) => Promise<Code[]>;
|
|
15
15
|
export declare const normalizeCodes: (codes: CodeStub[]) => CodeStub[];
|
|
16
|
+
/**
|
|
17
|
+
* Normalizes the code's four main fields (type, code, version and id). The first three are considered to be
|
|
18
|
+
* authoritative, while the id is a pure function of them. The authoritative fields are filled in from the id if
|
|
19
|
+
* missing, or the version is set to '1' if it is the only missing authoritative field. The id is then rederived from
|
|
20
|
+
* the three fields.
|
|
21
|
+
* @param code The code to normalize.
|
|
22
|
+
* @returns A shallow copy of the input with its type, code, version and id normalized.
|
|
23
|
+
*/
|
|
24
|
+
export declare function normalizeCode(code: CodeStub): CodeStub;
|
package/utils/code-utils.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normalizeCodes = exports.filterAndSortOptionsFromFieldDefinition = exports.sortSuggestions = exports.sortCodes = exports.optionMapper = void 0;
|
|
3
|
+
exports.normalizeCode = exports.normalizeCodes = exports.filterAndSortOptionsFromFieldDefinition = exports.sortSuggestions = exports.sortCodes = exports.optionMapper = void 0;
|
|
4
4
|
const utils_1 = require("../components/common/utils");
|
|
5
|
-
const
|
|
5
|
+
const cardinal_sdk_1 = require("@icure/cardinal-sdk");
|
|
6
6
|
/**
|
|
7
7
|
* Maps the options defined in a field into a list of codes
|
|
8
8
|
*
|
|
@@ -32,6 +32,46 @@ const sortSuggestions = (codes, language, sortOptions) => ((sortOptions === null
|
|
|
32
32
|
exports.sortSuggestions = sortSuggestions;
|
|
33
33
|
const filterAndSortOptionsFromFieldDefinition = (language, fg, translationProvider, terms) => Promise.resolve((0, exports.sortCodes)((0, exports.optionMapper)(language, fg, translationProvider).filter((x) => (terms !== null && terms !== void 0 ? terms : []).map((st) => st.toLowerCase()).every((st) => x.label[language].toLowerCase().includes(st))), language, fg.sortOptions));
|
|
34
34
|
exports.filterAndSortOptionsFromFieldDefinition = filterAndSortOptionsFromFieldDefinition;
|
|
35
|
-
const normalizeCodes = (codes) => codes.map((c) =>
|
|
35
|
+
const normalizeCodes = (codes) => codes.map((c) => normalizeCode(c));
|
|
36
36
|
exports.normalizeCodes = normalizeCodes;
|
|
37
|
+
/**
|
|
38
|
+
* Normalizes the code's four main fields (type, code, version and id). The first three are considered to be
|
|
39
|
+
* authoritative, while the id is a pure function of them. The authoritative fields are filled in from the id if
|
|
40
|
+
* missing, or the version is set to '1' if it is the only missing authoritative field. The id is then rederived from
|
|
41
|
+
* the three fields.
|
|
42
|
+
* @param code The code to normalize.
|
|
43
|
+
* @returns A shallow copy of the input with its type, code, version and id normalized.
|
|
44
|
+
*/
|
|
45
|
+
function normalizeCode(code) {
|
|
46
|
+
code = new cardinal_sdk_1.CodeStub(code);
|
|
47
|
+
if (code.type && code.code && code.version) {
|
|
48
|
+
// do nothing, we all have the authoritative fields we need
|
|
49
|
+
}
|
|
50
|
+
else if (code.id) {
|
|
51
|
+
// reconstruct the authoritative fields from the id
|
|
52
|
+
const [idType, idCode, idVersion, ...idRest] = code.id.split('|');
|
|
53
|
+
if (idType && idCode && idVersion && idRest.length === 0) {
|
|
54
|
+
if (!code.type)
|
|
55
|
+
code.type = idType;
|
|
56
|
+
if (!code.code)
|
|
57
|
+
code.code = idCode;
|
|
58
|
+
if (!code.version)
|
|
59
|
+
code.version = idVersion;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
throw new Error(`attempted to normalize from a malformed code id "${code.id}"`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
else if (code.type && code.code && !code.version) {
|
|
66
|
+
// we can provide a default value
|
|
67
|
+
code.version = '1';
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
throw new Error('could not reconstruct the code');
|
|
71
|
+
}
|
|
72
|
+
// Recompute the id to ensure that it matches the reconstructed code.
|
|
73
|
+
code.id = `${code.type}|${code.code}|${code.version}`;
|
|
74
|
+
return code;
|
|
75
|
+
}
|
|
76
|
+
exports.normalizeCode = normalizeCode;
|
|
37
77
|
//# sourceMappingURL=code-utils.js.map
|
package/utils/code-utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-utils.js","sourceRoot":"","sources":["../../tmp/utils/code-utils.ts"],"names":[],"mappings":";;;AACA,sDAA8H;AAE9H,
|
|
1
|
+
{"version":3,"file":"code-utils.js","sourceRoot":"","sources":["../../tmp/utils/code-utils.ts"],"names":[],"mappings":";;;AACA,sDAA8H;AAE9H,sDAA8C;AAE9C;;;;;;GAMG;AACI,MAAM,YAA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,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1D,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;YAClC,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;YAClC,IAAI,CAAC,IAAI,CAAC,OAAO;gBAAE,IAAI,CAAC,OAAO,GAAG,SAAS,CAAA;QAC5C,CAAC;aAAM,CAAC;YACP,MAAM,IAAI,KAAK,CAAC,oDAAoD,IAAI,CAAC,EAAE,GAAG,CAAC,CAAA;QAChF,CAAC;IACF,CAAC;SAAM,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QACpD,iCAAiC;QACjC,IAAI,CAAC,OAAO,GAAG,GAAG,CAAA;IACnB,CAAC;SAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;IAClD,CAAC;IAED,qEAAqE;IACrE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE,CAAA;IAErD,OAAO,IAAI,CAAA;AACZ,CAAC;AA1BD,sCA0BC","sourcesContent":["import { Code, Field, SortOptions } from '../components/model'\nimport { defaultCodePromoter, defaultCodesComparator, makePromoter, naturalCodesComparator } from '../components/common/utils'\nimport { Suggestion } from '../generic'\nimport { CodeStub } from '@icure/cardinal-sdk'\n\n/**\n * Maps the options defined in a field into a list of codes\n *\n * @param language\n * @param field\n * @param translationProvider\n */\nexport const optionMapper = (language: string, field: Field, translationProvider?: (language: string, text: string) => string): Code[] =>\n\tObject.keys(field?.options ?? []).map((optionKey) => {\n\t\tconst text: string = (field?.options?.[optionKey] as string) ?? ''\n\t\treturn {\n\t\t\tid: optionKey,\n\t\t\tlabel: { [language]: translationProvider ? translationProvider(language, text) : text },\n\t\t}\n\t})\n\nexport const sortCodes = (codes: Code[], language: string, sortOptions?: SortOptions) =>\n\tsortOptions?.sort && sortOptions?.sort !== 'natural'\n\t\t? codes.sort(defaultCodesComparator(language, sortOptions?.sort === 'asc', sortOptions?.promotions ? makePromoter(sortOptions.promotions.split(/ ?, ?/)) : defaultCodePromoter))\n\t\t: codes.sort(naturalCodesComparator(sortOptions?.promotions ? makePromoter(sortOptions.promotions.split(/ ?, ?/)) : defaultCodePromoter))\n\nexport const sortSuggestions = (codes: (Code | Suggestion)[], language: string, sortOptions?: SortOptions): Suggestion[] =>\n\t(sortOptions?.sort && sortOptions?.sort !== 'natural'\n\t\t? codes.sort(defaultCodesComparator(language, sortOptions?.sort === 'asc', sortOptions?.promotions ? makePromoter(sortOptions.promotions.split(/ ?, ?/)) : defaultCodePromoter))\n\t\t: codes.sort(naturalCodesComparator(sortOptions?.promotions ? makePromoter(sortOptions.promotions.split(/ ?, ?/)) : defaultCodePromoter))\n\t).map((c) => ({ id: c.id, label: c.label, text: c.label[language] ?? '', terms: [] }))\n\nexport const filterAndSortOptionsFromFieldDefinition = (\n\tlanguage: string,\n\tfg: Field,\n\ttranslationProvider: ((language: string, text: string) => string) | undefined,\n\tterms?: string[],\n) =>\n\tPromise.resolve(\n\t\tsortCodes(\n\t\t\toptionMapper(language, fg, translationProvider).filter((x) => (terms ?? []).map((st) => st.toLowerCase()).every((st) => x.label[language].toLowerCase().includes(st))),\n\t\t\tlanguage,\n\t\t\tfg.sortOptions,\n\t\t),\n\t)\n\nexport const normalizeCodes = (codes: CodeStub[]): CodeStub[] => codes.map((c) => normalizeCode(c))\n\n/**\n * Normalizes the code's four main fields (type, code, version and id). The first three are considered to be\n * authoritative, while the id is a pure function of them. The authoritative fields are filled in from the id if\n * missing, or the version is set to '1' if it is the only missing authoritative field. The id is then rederived from\n * the three fields.\n * @param code The code to normalize.\n * @returns A shallow copy of the input with its type, code, version and id normalized.\n */\nexport function normalizeCode(code: CodeStub): CodeStub {\n\tcode = new CodeStub(code)\n\n\tif (code.type && code.code && code.version) {\n\t\t// do nothing, we all have the authoritative fields we need\n\t} else if (code.id) {\n\t\t// reconstruct the authoritative fields from the id\n\t\tconst [idType, idCode, idVersion, ...idRest] = code.id.split('|')\n\t\tif (idType && idCode && idVersion && idRest.length === 0) {\n\t\t\tif (!code.type) code.type = idType\n\t\t\tif (!code.code) code.code = idCode\n\t\t\tif (!code.version) code.version = idVersion\n\t\t} else {\n\t\t\tthrow new Error(`attempted to normalize from a malformed code id \"${code.id}\"`)\n\t\t}\n\t} else if (code.type && code.code && !code.version) {\n\t\t// we can provide a default value\n\t\tcode.version = '1'\n\t} else {\n\t\tthrow new Error('could not reconstruct the code')\n\t}\n\n\t// Recompute the id to ensure that it matches the reconstructed code.\n\tcode.id = `${code.type}|${code.code}|${code.version}`\n\n\treturn code\n}\n"]}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getItemsListSpec = void 0;
|
|
4
|
-
const utils_1 = require("./utils");
|
|
5
|
-
function getItemsListSpec() {
|
|
6
|
-
return {
|
|
7
|
-
nodes: (0, utils_1.reduceNodes)({
|
|
8
|
-
doc: {
|
|
9
|
-
content: 'paragraph*',
|
|
10
|
-
parseDOM: [{ tag: 'ul' }],
|
|
11
|
-
toDOM() {
|
|
12
|
-
return ['ul', 0];
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
paragraph: {
|
|
16
|
-
content: 'inline*',
|
|
17
|
-
group: 'block',
|
|
18
|
-
parseDOM: [{ tag: 'li' }],
|
|
19
|
-
toDOM() {
|
|
20
|
-
return ['li', 0];
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
text: {
|
|
24
|
-
group: 'inline',
|
|
25
|
-
},
|
|
26
|
-
}),
|
|
27
|
-
marks: {},
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
exports.getItemsListSpec = getItemsListSpec;
|
|
31
|
-
//# sourceMappingURL=items-list.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"items-list.js","sourceRoot":"","sources":["../../../../tmp/components/icure-text-field/schema/items-list.ts"],"names":[],"mappings":";;;AACA,mCAAqC;AAIrC,SAAgB,gBAAgB;IAC/B,OAAO;QACN,KAAK,EAAE,IAAA,mBAAW,EAAC;YAClB,GAAG,EAAE;gBACJ,OAAO,EAAE,YAAY;gBACrB,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;gBACzB,KAAK;oBACJ,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;gBACjB,CAAC;aACD;YAED,SAAS,EAAE;gBACV,OAAO,EAAE,SAAS;gBAClB,KAAK,EAAE,OAAO;gBACd,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;gBACzB,KAAK;oBACJ,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;gBACjB,CAAC;aACD;YAED,IAAI,EAAE;gBACL,KAAK,EAAE,QAAQ;aACf;SACD,CAAC;QACF,KAAK,EAAE,EAAE;KACT,CAAA;AACF,CAAC;AA1BD,4CA0BC","sourcesContent":["import { SchemaSpec } from 'prosemirror-model'\nimport { reduceNodes } from './utils'\n\nexport type ItemsListSchema = 'items-list'\n\nexport function getItemsListSpec(): SchemaSpec {\n\treturn {\n\t\tnodes: reduceNodes({\n\t\t\tdoc: {\n\t\t\t\tcontent: 'paragraph*',\n\t\t\t\tparseDOM: [{ tag: 'ul' }],\n\t\t\t\ttoDOM() {\n\t\t\t\t\treturn ['ul', 0]\n\t\t\t\t},\n\t\t\t},\n\n\t\t\tparagraph: {\n\t\t\t\tcontent: 'inline*',\n\t\t\t\tgroup: 'block',\n\t\t\t\tparseDOM: [{ tag: 'li' }],\n\t\t\t\ttoDOM() {\n\t\t\t\t\treturn ['li', 0]\n\t\t\t\t},\n\t\t\t},\n\n\t\t\ttext: {\n\t\t\t\tgroup: 'inline',\n\t\t\t},\n\t\t}),\n\t\tmarks: {},\n\t}\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const fields_1 = require("../../icure-form/fields");
|
|
4
|
-
const icure_button_group_1 = require("../../icure-button-group");
|
|
5
|
-
const icure_date_picker_1 = require("../../icure-date-picker");
|
|
6
|
-
const icure_dropdown_field_1 = require("../../icure-dropdown-field");
|
|
7
|
-
const icure_form_1 = require("../../icure-form");
|
|
8
|
-
const icure_label_1 = require("../../icure-label");
|
|
9
|
-
const icure_text_field_1 = require("../../icure-text-field");
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
const lit_1 = require("lit");
|
|
12
|
-
const ehrLiteCss = (0, lit_1.css) `.icure-form {
|
|
13
|
-
row-gap: 24px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.icure-text-field, .icure-button-group {
|
|
17
|
-
width: 100%;
|
|
18
|
-
}
|
|
19
|
-
.icure-text-field > .icure-label, .icure-button-group > .icure-label {
|
|
20
|
-
color: #1D2235;
|
|
21
|
-
font-size: 14px;
|
|
22
|
-
font-weight: 400;
|
|
23
|
-
}
|
|
24
|
-
.icure-text-field > .icure-label > span, .icure-button-group > .icure-label > span {
|
|
25
|
-
display: block;
|
|
26
|
-
word-wrap: break-word;
|
|
27
|
-
overflow: auto;
|
|
28
|
-
font-weight: 400;
|
|
29
|
-
}
|
|
30
|
-
.icure-text-field > .icure-input, .icure-button-group > .icure-input {
|
|
31
|
-
flex: 1 1 auto;
|
|
32
|
-
width: auto;
|
|
33
|
-
}
|
|
34
|
-
.icure-text-field > .icure-label, .icure-button-group > .icure-label {
|
|
35
|
-
transform: translate(0, 0) scale(1);
|
|
36
|
-
}
|
|
37
|
-
.icure-text-field .icure-input,
|
|
38
|
-
.icure-text-field .input-container, .icure-button-group .icure-input,
|
|
39
|
-
.icure-button-group .input-container {
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
border-radius: 6px;
|
|
42
|
-
padding: 4px 8px;
|
|
43
|
-
width: 100%;
|
|
44
|
-
box-sizing: border-box;
|
|
45
|
-
border-width: 1px;
|
|
46
|
-
border-style: solid;
|
|
47
|
-
outline: 0;
|
|
48
|
-
font: inherit;
|
|
49
|
-
font-size: 13px;
|
|
50
|
-
line-height: 1.4em;
|
|
51
|
-
display: flex;
|
|
52
|
-
align-items: center;
|
|
53
|
-
vertical-align: middle;
|
|
54
|
-
position: relative;
|
|
55
|
-
-webkit-appearance: none;
|
|
56
|
-
background-color: #ffffff;
|
|
57
|
-
border-color: #DDE3E7;
|
|
58
|
-
color: #1D2235;
|
|
59
|
-
box-sizing: border-box;
|
|
60
|
-
}
|
|
61
|
-
.icure-text-field .icure-input:focus, .icure-text-field .icure-input:focus-within,
|
|
62
|
-
.icure-text-field .input-container:focus,
|
|
63
|
-
.icure-text-field .input-container:focus-within, .icure-button-group .icure-input:focus, .icure-button-group .icure-input:focus-within,
|
|
64
|
-
.icure-button-group .input-container:focus,
|
|
65
|
-
.icure-button-group .input-container:focus-within {
|
|
66
|
-
box-shadow: 0px 0px 0px 2px rgba(61, 135, 197, 0.2);
|
|
67
|
-
border-color: #084B83;
|
|
68
|
-
}
|
|
69
|
-
.icure-text-field .icure-input:hover,
|
|
70
|
-
.icure-text-field .input-container:hover, .icure-button-group .icure-input:hover,
|
|
71
|
-
.icure-button-group .input-container:hover {
|
|
72
|
-
border-color: #084B83;
|
|
73
|
-
box-shadow: none;
|
|
74
|
-
}
|
|
75
|
-
.icure-text-field .icure-input:hover:focus, .icure-text-field .icure-input:hover:focus-within,
|
|
76
|
-
.icure-text-field .input-container:hover:focus,
|
|
77
|
-
.icure-text-field .input-container:hover:focus-within, .icure-button-group .icure-input:hover:focus, .icure-button-group .icure-input:hover:focus-within,
|
|
78
|
-
.icure-button-group .input-container:hover:focus,
|
|
79
|
-
.icure-button-group .input-container:hover:focus-within {
|
|
80
|
-
box-shadow: 0px 0px 0px 2px rgba(61, 135, 197, 0.2);
|
|
81
|
-
border-color: #084B83;
|
|
82
|
-
}
|
|
83
|
-
.icure-text-field .icure-input .ProseMirror,
|
|
84
|
-
.icure-text-field .input-container .ProseMirror, .icure-button-group .icure-input .ProseMirror,
|
|
85
|
-
.icure-button-group .input-container .ProseMirror {
|
|
86
|
-
padding: 0;
|
|
87
|
-
font-size: 13px;
|
|
88
|
-
line-height: 1.4em;
|
|
89
|
-
color: #1D2235;
|
|
90
|
-
}
|
|
91
|
-
.icure-text-field .icure-input .ProseMirror .date,
|
|
92
|
-
.icure-text-field .input-container .ProseMirror .date, .icure-button-group .icure-input .ProseMirror .date,
|
|
93
|
-
.icure-button-group .input-container .ProseMirror .date {
|
|
94
|
-
padding: 1px;
|
|
95
|
-
}
|
|
96
|
-
.icure-text-field .icure-input .ProseMirror .time,
|
|
97
|
-
.icure-text-field .input-container .ProseMirror .time, .icure-button-group .icure-input .ProseMirror .time,
|
|
98
|
-
.icure-button-group .input-container .ProseMirror .time {
|
|
99
|
-
padding: 1px;
|
|
100
|
-
}
|
|
101
|
-
.icure-text-field .icure-input .ProseMirror:focus .focused, .icure-text-field .icure-input .ProseMirror:hover,
|
|
102
|
-
.icure-text-field .input-container .ProseMirror:focus .focused,
|
|
103
|
-
.icure-text-field .input-container .ProseMirror:hover, .icure-button-group .icure-input .ProseMirror:focus .focused, .icure-button-group .icure-input .ProseMirror:hover,
|
|
104
|
-
.icure-button-group .input-container .ProseMirror:focus .focused,
|
|
105
|
-
.icure-button-group .input-container .ProseMirror:hover {
|
|
106
|
-
border-color: #084B83;
|
|
107
|
-
}
|
|
108
|
-
.icure-text-field .icure-input > svg,
|
|
109
|
-
.icure-text-field .input-container > svg, .icure-button-group .icure-input > svg,
|
|
110
|
-
.icure-button-group .input-container > svg {
|
|
111
|
-
opacity: 0.5;
|
|
112
|
-
}
|
|
113
|
-
.icure-text-field .icure-input > svg path,
|
|
114
|
-
.icure-text-field .input-container > svg path, .icure-button-group .icure-input > svg path,
|
|
115
|
-
.icure-button-group .input-container > svg path {
|
|
116
|
-
fill: #656565;
|
|
117
|
-
}
|
|
118
|
-
.icure-text-field .icure-input .extra,
|
|
119
|
-
.icure-text-field .input-container .extra, .icure-button-group .icure-input .extra,
|
|
120
|
-
.icure-button-group .input-container .extra {
|
|
121
|
-
height: 20px;
|
|
122
|
-
}
|
|
123
|
-
.icure-text-field .icure-input .extra > .info,
|
|
124
|
-
.icure-text-field .input-container .extra > .info, .icure-button-group .icure-input .extra > .info,
|
|
125
|
-
.icure-button-group .input-container .extra > .info {
|
|
126
|
-
color: #656565;
|
|
127
|
-
opacity: 0.5;
|
|
128
|
-
}
|
|
129
|
-
.icure-text-field .icure-input .extra .buttons-container .btn svg path,
|
|
130
|
-
.icure-text-field .input-container .extra .buttons-container .btn svg path, .icure-button-group .icure-input .extra .buttons-container .btn svg path,
|
|
131
|
-
.icure-button-group .input-container .extra .buttons-container .btn svg path {
|
|
132
|
-
fill: #656565;
|
|
133
|
-
opacity: 0.5;
|
|
134
|
-
}
|
|
135
|
-
.icure-text-field .icure-input .extra .buttons-container .btn svg path:hover,
|
|
136
|
-
.icure-text-field .input-container .extra .buttons-container .btn svg path:hover, .icure-button-group .icure-input .extra .buttons-container .btn svg path:hover,
|
|
137
|
-
.icure-button-group .input-container .extra .buttons-container .btn svg path:hover {
|
|
138
|
-
fill: #656565;
|
|
139
|
-
opacity: 1;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
input[type=radio] {
|
|
143
|
-
margin-top: -1px;
|
|
144
|
-
vertical-align: middle;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.icure-checkbox:hover {
|
|
148
|
-
border-color: #DCE7F2;
|
|
149
|
-
}
|
|
150
|
-
.icure-checkbox:checked {
|
|
151
|
-
accent-color: #084B83;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.icure-button-group > .icure-label {
|
|
155
|
-
z-index: 1;
|
|
156
|
-
pointer-events: none;
|
|
157
|
-
line-height: 1.4em;
|
|
158
|
-
cursor: text;
|
|
159
|
-
font-size: 14px;
|
|
160
|
-
top: calc(1.4em + 5px);
|
|
161
|
-
left: 9px;
|
|
162
|
-
color: #1D2235;
|
|
163
|
-
align-items: center;
|
|
164
|
-
height: 28px;
|
|
165
|
-
max-width: 85%;
|
|
166
|
-
min-width: 0;
|
|
167
|
-
padding-bottom: 8px;
|
|
168
|
-
}
|
|
169
|
-
.icure-button-group > .icure-label > span {
|
|
170
|
-
display: block;
|
|
171
|
-
white-space: nowrap;
|
|
172
|
-
text-overflow: ellipsis;
|
|
173
|
-
overflow: hidden;
|
|
174
|
-
padding-right: 8px;
|
|
175
|
-
}
|
|
176
|
-
.icure-button-group > div {
|
|
177
|
-
display: grid;
|
|
178
|
-
}
|
|
179
|
-
.icure-button-group > div > div {
|
|
180
|
-
display: flex;
|
|
181
|
-
align-items: center;
|
|
182
|
-
gap: 6px;
|
|
183
|
-
}
|
|
184
|
-
.icure-button-group > div > div > .icure-button-group-label {
|
|
185
|
-
z-index: 1;
|
|
186
|
-
line-height: 1.4em;
|
|
187
|
-
cursor: text;
|
|
188
|
-
font-size: 14px;
|
|
189
|
-
top: calc(1.4em + 5px);
|
|
190
|
-
left: 9px;
|
|
191
|
-
transition: transform 0.2s ease-out, color 0.2s ease-out;
|
|
192
|
-
color: #1D2235;
|
|
193
|
-
display: flex;
|
|
194
|
-
align-items: center;
|
|
195
|
-
max-width: 85%;
|
|
196
|
-
min-width: 0;
|
|
197
|
-
}
|
|
198
|
-
.icure-button-group > div > div > .icure-button-group-label > span {
|
|
199
|
-
display: block;
|
|
200
|
-
white-space: nowrap;
|
|
201
|
-
text-overflow: ellipsis;
|
|
202
|
-
overflow: hidden;
|
|
203
|
-
padding-right: 8px;
|
|
204
|
-
}
|
|
205
|
-
.icure-button-group > .icure-input {
|
|
206
|
-
flex: 1 1 auto;
|
|
207
|
-
width: auto;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.icure-input #editor {
|
|
211
|
-
color: #1D2235;
|
|
212
|
-
}
|
|
213
|
-
.icure-input #editor.tokens-list .ProseMirror li, .icure-input #editor.styled-tokens-list .ProseMirror li {
|
|
214
|
-
background-color: #DCE7F2;
|
|
215
|
-
}
|
|
216
|
-
.icure-input #editor.tokens-list .ProseMirror li span:after, .icure-input #editor.styled-tokens-list .ProseMirror li span:after {
|
|
217
|
-
background: transparent url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxu cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJPdXRsaW5lIiB2aWV3 Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iIzg4ODg4OCIgZmlsbD0iIzg4ODg4OCIg d2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiPjxwYXRoIGQ9Ik0xNiw4YTEsMSwwLDAs MC0xLjQxNCwwTDEyLDEwLjU4Niw5LjQxNCw4QTEsMSwwLDAsMCw4LDkuNDE0TDEw LjU4NiwxMiw4LDE0LjU4NkExLDEsMCwwLDAsOS40MTQsMTZMMTIsMTMuNDE0LDE0 LjU4NiwxNkExLDEsMCwwLDAsMTYsMTQuNTg2TDEzLjQxNCwxMiwxNiw5LjQxNEEx LDEsMCwwLDAsMTYsOFoiLz48cGF0aCBkPSJNMTIsMEExMiwxMiwwLDEsMCwyNCwx MiwxMi4wMTMsMTIuMDEzLDAsMCwwLDEyLDBabTAsMjJBMTAsMTAsMCwxLDEsMjIs MTIsMTAuMDExLDEwLjAxMSwwLDAsMSwxMiwyMloiLz48L3N2Zz4K") no-repeat center/16px;
|
|
218
|
-
}
|
|
219
|
-
.icure-input #editor.items-list .ProseMirror li {
|
|
220
|
-
border-bottom: 1px dotted #8DA6BF;
|
|
221
|
-
}
|
|
222
|
-
.icure-input .extra {
|
|
223
|
-
padding-right: 0;
|
|
224
|
-
}
|
|
225
|
-
.icure-input .select-arrow {
|
|
226
|
-
opacity: 1;
|
|
227
|
-
}
|
|
228
|
-
.icure-input .select-arrow svg {
|
|
229
|
-
width: 15px;
|
|
230
|
-
height: 15px;
|
|
231
|
-
}
|
|
232
|
-
.icure-input .select-arrow svg path {
|
|
233
|
-
fill: #9CA8B2;
|
|
234
|
-
}
|
|
235
|
-
.icure-input .options {
|
|
236
|
-
padding: 2px;
|
|
237
|
-
display: flex;
|
|
238
|
-
flex-direction: column;
|
|
239
|
-
align-items: flex-start;
|
|
240
|
-
gap: 2px;
|
|
241
|
-
border-radius: 6px;
|
|
242
|
-
background: white;
|
|
243
|
-
box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 9px 28px 0px rgba(0, 0, 0, 0.05);
|
|
244
|
-
}
|
|
245
|
-
.icure-input .options .option {
|
|
246
|
-
height: auto;
|
|
247
|
-
min-height: unset;
|
|
248
|
-
display: flex;
|
|
249
|
-
padding: 8px;
|
|
250
|
-
align-items: center;
|
|
251
|
-
align-self: stretch;
|
|
252
|
-
border-radius: 4px;
|
|
253
|
-
background: white;
|
|
254
|
-
color: #1D2235;
|
|
255
|
-
font-size: 12px;
|
|
256
|
-
font-style: normal;
|
|
257
|
-
font-weight: 400;
|
|
258
|
-
line-height: normal;
|
|
259
|
-
cursor: pointer;
|
|
260
|
-
}
|
|
261
|
-
.icure-input .options .option:hover {
|
|
262
|
-
background: #DCE7F2;
|
|
263
|
-
color: #084B83;
|
|
264
|
-
}
|
|
265
|
-
.icure-input:hover .select-arrow svg path, .icure-input:focus .select-arrow svg path {
|
|
266
|
-
fill: #084B83;
|
|
267
|
-
}`;
|
|
268
|
-
class EhrLiteIcureButtonGroup extends icure_button_group_1.IcureButtonGroup {
|
|
269
|
-
static get styles() {
|
|
270
|
-
return [...icure_button_group_1.IcureButtonGroup.styles, ehrLiteCss];
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
class EhrLiteIcureDatePickerField extends icure_date_picker_1.IcureDatePickerField {
|
|
274
|
-
static get styles() {
|
|
275
|
-
return [...icure_date_picker_1.IcureDatePickerField.styles, ehrLiteCss];
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
class EhrLiteIcureDropdownField extends icure_dropdown_field_1.IcureDropdownField {
|
|
279
|
-
static get styles() {
|
|
280
|
-
return [...icure_dropdown_field_1.IcureDropdownField.styles, ehrLiteCss];
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
class EhrLiteIcureForm extends icure_form_1.IcureForm {
|
|
284
|
-
static get styles() {
|
|
285
|
-
return [...icure_form_1.IcureForm.styles, ehrLiteCss];
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
class EhrLiteIcureLabel extends icure_label_1.IcureLabel {
|
|
289
|
-
static get styles() {
|
|
290
|
-
return [...icure_label_1.IcureLabel.styles, ehrLiteCss];
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
class EhrLiteIcureTextField extends icure_text_field_1.IcureTextField {
|
|
294
|
-
static get styles() {
|
|
295
|
-
return [...icure_text_field_1.IcureTextField.styles, ehrLiteCss];
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
class EhrLiteLabel extends fields_1.Label {
|
|
299
|
-
static get styles() {
|
|
300
|
-
return [...fields_1.Label.styles, ehrLiteCss];
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
customElements.define('icure-form-checkbox', fields_1.CheckBox);
|
|
304
|
-
customElements.define('icure-form-date-picker', fields_1.DatePicker);
|
|
305
|
-
customElements.define('icure-form-date-time-picker', fields_1.DateTimePicker);
|
|
306
|
-
customElements.define('icure-form-dropdown-field', fields_1.DropdownField);
|
|
307
|
-
customElements.define('icure-button-group', EhrLiteIcureButtonGroup);
|
|
308
|
-
customElements.define('icure-date-picker-field', EhrLiteIcureDatePickerField);
|
|
309
|
-
customElements.define('icure-dropdown-field', EhrLiteIcureDropdownField);
|
|
310
|
-
customElements.define('icure-form', EhrLiteIcureForm);
|
|
311
|
-
customElements.define('icure-label', EhrLiteIcureLabel);
|
|
312
|
-
customElements.define('icure-text-field', EhrLiteIcureTextField);
|
|
313
|
-
customElements.define('icure-form-items-list-field', fields_1.ItemsListField);
|
|
314
|
-
customElements.define('icure-form-label', EhrLiteLabel);
|
|
315
|
-
customElements.define('icure-form-measure-field', fields_1.MeasureField);
|
|
316
|
-
customElements.define('icure-form-number-field', fields_1.NumberField);
|
|
317
|
-
customElements.define('icure-form-radio-button', fields_1.RadioButton);
|
|
318
|
-
customElements.define('icure-form-text-field', fields_1.TextField);
|
|
319
|
-
customElements.define('icure-form-time-picker', fields_1.TimePicker);
|
|
320
|
-
customElements.define('icure-form-token-field', fields_1.TokenField);
|
|
321
|
-
//# sourceMappingURL=index.js.map
|