@icure/form 1.1.15 → 1.1.17
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/{lit-element-npm-4.0.4-95110c5931-721b877743.zip → lit-element-npm-4.0.6-bfca4f9870-4f73cd1c0d.zip} +0 -0
- package/.yarn/cache/lit-html-npm-3.1.4-58e56c5010-428593679c.zip +0 -0
- package/.yarn/cache/{lit-npm-3.1.2-d289de97da-7776fc5f17.zip → lit-npm-3.1.4-b7dcc2d5a3-c6ffa5580f.zip} +0 -0
- package/.yarn/cache/markdown-it-npm-14.1.0-e337d75bfe-07296b45eb.zip +0 -0
- package/.yarn/cache/prosemirror-model-npm-1.22.2-9238026de4-f4004a4ebe.zip +0 -0
- package/.yarn/cache/prosemirror-transform-npm-1.9.0-fd256f82f0-c2d63c1fb0.zip +0 -0
- package/.yarn/cache/prosemirror-view-npm-1.33.9-dd77e3e48f-d3bd6cef56.zip +0 -0
- package/.yarn/cache/tslib-npm-2.6.3-0fd136b3be-74fce0e100.zip +0 -0
- package/.yarn/cache/uc.micro-npm-2.1.0-c45282c865-3719735824.zip +0 -0
- package/.yarn/install-state.gz +0 -0
- package/components/common/field-with-options.d.ts +1 -1
- package/components/common/field-with-options.js.map +1 -1
- package/components/common/field.d.ts +3 -1
- package/components/common/field.js +18 -8
- package/components/common/field.js.map +1 -1
- package/components/common/utils.js.map +1 -1
- package/components/icure-button-group/index.js +8 -2
- package/components/icure-button-group/index.js.map +1 -1
- package/components/icure-date-picker/index.js +11 -4
- package/components/icure-date-picker/index.js.map +1 -1
- package/components/icure-dropdown-field/index.d.ts +4 -1
- package/components/icure-dropdown-field/index.js +47 -9
- package/components/icure-dropdown-field/index.js.map +1 -1
- package/components/icure-form/fields/button-group/checkbox.js +4 -3
- package/components/icure-form/fields/button-group/checkbox.js.map +1 -1
- package/components/icure-form/fields/button-group/radio-button.js +5 -4
- package/components/icure-form/fields/button-group/radio-button.js.map +1 -1
- package/components/icure-form/fields/date-picker/date-picker.js +4 -3
- package/components/icure-form/fields/date-picker/date-picker.js.map +1 -1
- package/components/icure-form/fields/date-picker/date-time-picker.js +4 -3
- package/components/icure-form/fields/date-picker/date-time-picker.js.map +1 -1
- package/components/icure-form/fields/date-picker/time-picker.js +4 -3
- package/components/icure-form/fields/date-picker/time-picker.js.map +1 -1
- package/components/icure-form/fields/dropdown/dropdown-field.d.ts +2 -4
- package/components/icure-form/fields/dropdown/dropdown-field.js +6 -5
- package/components/icure-form/fields/dropdown/dropdown-field.js.map +1 -1
- package/components/icure-form/fields/items-list-field/items-list-field.js +4 -4
- package/components/icure-form/fields/items-list-field/items-list-field.js.map +1 -1
- package/components/icure-form/fields/label/label.js +1 -1
- package/components/icure-form/fields/label/label.js.map +1 -1
- package/components/icure-form/fields/measure-field/measure-field.js +4 -3
- package/components/icure-form/fields/measure-field/measure-field.js.map +1 -1
- package/components/icure-form/fields/number-field/number-field.js +4 -3
- package/components/icure-form/fields/number-field/number-field.js.map +1 -1
- package/components/icure-form/fields/text-field/text-field.d.ts +1 -1
- package/components/icure-form/fields/text-field/text-field.js +5 -4
- package/components/icure-form/fields/text-field/text-field.js.map +1 -1
- package/components/icure-form/fields/token-field/token-field.js +4 -4
- package/components/icure-form/fields/token-field/token-field.js.map +1 -1
- package/components/icure-form/fields/utils/index.d.ts +4 -6
- package/components/icure-form/fields/utils/index.js +1 -1
- package/components/icure-form/fields/utils/index.js.map +1 -1
- package/components/icure-form/index.d.ts +8 -8
- package/components/icure-form/index.js +17 -13
- package/components/icure-form/index.js.map +1 -1
- package/components/icure-form/renderer/form/form-selection-button.js +1 -1
- package/components/icure-form/renderer/form/form-selection-button.js.map +1 -1
- package/components/icure-form/renderer/form/form.js +89 -80
- package/components/icure-form/renderer/form/form.js.map +1 -1
- package/components/icure-form/renderer/index.d.ts +4 -6
- package/components/icure-form/renderer/index.js.map +1 -1
- package/components/icure-label/index.js +6 -1
- package/components/icure-label/index.js.map +1 -1
- package/components/icure-text-field/index.d.ts +7 -9
- package/components/icure-text-field/index.js +118 -51
- package/components/icure-text-field/index.js.map +1 -1
- package/components/icure-text-field/plugin/caret-fix-plugin.js.map +1 -1
- package/components/icure-text-field/plugin/mask-plugin.js.map +1 -1
- package/components/icure-text-field/plugin/regexp-plugin.js.map +1 -1
- package/components/icure-text-field/prosemirror-commands.d.ts +2 -2
- package/components/icure-text-field/prosemirror-commands.js.map +1 -1
- package/components/icure-text-field/prosemirror-utils.js.map +1 -1
- package/components/icure-text-field/schema/common-marks.js.map +1 -1
- package/components/icure-text-field/schema/measure-schema.js.map +1 -1
- package/components/icure-text-field/selection-companion.js.map +1 -1
- package/components/icure-text-field/suggestion-palette.js.map +1 -1
- package/components/model/index.d.ts +69 -137
- package/components/model/index.js +30 -103
- package/components/model/index.js.map +1 -1
- package/components/themes/icure-blue/index.d.ts +1 -0
- package/components/themes/icure-blue/index.js +321 -0
- package/components/themes/icure-blue/index.js.map +1 -0
- package/conversion/ckmeans-grouping.js.map +1 -1
- package/conversion/ckmeans.js.map +1 -1
- package/conversion/icure-convert.js.map +1 -1
- package/generic/model.d.ts +45 -1
- package/generic/model.js.map +1 -1
- package/icure/form-values-container.d.ts +42 -8
- package/icure/form-values-container.js +99 -52
- package/icure/form-values-container.js.map +1 -1
- package/icure/icure-utils.d.ts +19 -0
- package/icure/icure-utils.js +117 -0
- package/icure/icure-utils.js.map +1 -0
- package/icure/model.d.ts +1 -1
- package/icure/model.js.map +1 -1
- package/package.json +3 -4
- package/utils/code-utils.d.ts +3 -10
- package/utils/code-utils.js +3 -9
- package/utils/code-utils.js.map +1 -1
- package/utils/dates.d.ts +6 -0
- package/utils/dates.js +58 -0
- package/utils/dates.js.map +1 -0
- package/utils/fields-values-provider.d.ts +6 -2
- package/utils/fields-values-provider.js +25 -14
- package/utils/fields-values-provider.js.map +1 -1
- package/utils/form-value-container.js.map +1 -1
- package/utils/icure-utils.js.map +1 -1
- package/utils/interpreter.js +1 -2
- package/utils/interpreter.js.map +1 -1
- package/utils/languages.d.ts +1 -5
- package/utils/languages.js.map +1 -1
- package/utils/markdown.d.ts +2 -1
- package/utils/markdown.js +5 -1
- package/utils/markdown.js.map +1 -1
- package/utils/no-lodash.d.ts +3 -1
- package/utils/no-lodash.js +3 -1
- package/utils/no-lodash.js.map +1 -1
- package/utils/primitive.d.ts +0 -3
- package/utils/primitive.js +4 -59
- package/utils/primitive.js.map +1 -1
- package/.yarn/cache/@types-node-npm-18.19.15-63d17b58ca-8ebad6b0a0.zip +0 -0
- package/.yarn/cache/lit-html-npm-3.1.2-eef1e7cbd7-9a6f0326ae.zip +0 -0
- package/.yarn/cache/markdown-it-npm-14.0.0-e9aebdc7e3-f63bd8b39b.zip +0 -0
- package/.yarn/cache/tslib-npm-2.6.2-4fc8c068d9-329ea56123.zip +0 -0
- package/.yarn/cache/uc.micro-npm-2.0.0-9517366009-86e142c239.zip +0 -0
- package/.yarn/cache/undici-types-npm-5.26.5-de4f7c7bb9-3192ef6f3f.zip +0 -0
|
@@ -4,11 +4,14 @@ declare const IcureDropdownField_base: (new (...args: any[]) => import("../commo
|
|
|
4
4
|
export declare class IcureDropdownField extends IcureDropdownField_base {
|
|
5
5
|
placeholder: string;
|
|
6
6
|
protected displayMenu: boolean;
|
|
7
|
+
protected textInputValue?: string;
|
|
7
8
|
static get styles(): CSSResultGroup[];
|
|
8
|
-
togglePopup(): void;
|
|
9
|
+
togglePopup(event: MouseEvent, force?: boolean): void;
|
|
9
10
|
_handleClickOutside(event: MouseEvent): void;
|
|
10
11
|
connectedCallback(): void;
|
|
11
12
|
disconnectedCallback(): void;
|
|
13
|
+
textInputChanged(): (e: Event) => void;
|
|
14
|
+
private triggerSearch;
|
|
12
15
|
handleOptionButtonClicked(id: string | undefined): (e: Event) => boolean;
|
|
13
16
|
getValueFromProvider(): [string, string] | [undefined, undefined];
|
|
14
17
|
render(): TemplateResult;
|
|
@@ -863,6 +863,11 @@ app-date-picker {
|
|
|
863
863
|
display: grid;
|
|
864
864
|
}
|
|
865
865
|
|
|
866
|
+
.error {
|
|
867
|
+
color: red;
|
|
868
|
+
font-size: 12px;
|
|
869
|
+
}
|
|
870
|
+
|
|
866
871
|
.icure-text-field > .icure-label, .icure-button-group > .icure-label {
|
|
867
872
|
z-index: 1;
|
|
868
873
|
pointer-events: none;
|
|
@@ -1049,18 +1054,24 @@ class IcureDropdownField extends (0, field_with_options_1.FieldWithOptionsMixin)
|
|
|
1049
1054
|
super(...arguments);
|
|
1050
1055
|
this.placeholder = '';
|
|
1051
1056
|
this.displayMenu = false;
|
|
1057
|
+
this.textInputValue = undefined;
|
|
1052
1058
|
}
|
|
1053
1059
|
static get styles() {
|
|
1054
1060
|
return [baseCss];
|
|
1055
1061
|
}
|
|
1056
|
-
togglePopup() {
|
|
1062
|
+
togglePopup(event, force = false) {
|
|
1057
1063
|
if (this.readonly)
|
|
1058
1064
|
return;
|
|
1059
|
-
this.displayMenu = !this.displayMenu;
|
|
1065
|
+
this.displayMenu = force || !this.displayMenu;
|
|
1066
|
+
console.log('togglePopup', this.textInputValue);
|
|
1067
|
+
event.stopPropagation();
|
|
1060
1068
|
}
|
|
1061
1069
|
_handleClickOutside(event) {
|
|
1062
1070
|
if (!event.composedPath().includes(this)) {
|
|
1063
|
-
this.displayMenu
|
|
1071
|
+
if (this.displayMenu) {
|
|
1072
|
+
console.log(this.label);
|
|
1073
|
+
this.displayMenu = false;
|
|
1074
|
+
}
|
|
1064
1075
|
event.stopPropagation();
|
|
1065
1076
|
}
|
|
1066
1077
|
}
|
|
@@ -1072,6 +1083,26 @@ class IcureDropdownField extends (0, field_with_options_1.FieldWithOptionsMixin)
|
|
|
1072
1083
|
super.disconnectedCallback();
|
|
1073
1084
|
document.removeEventListener('click', this._handleClickOutside.bind(this));
|
|
1074
1085
|
}
|
|
1086
|
+
textInputChanged() {
|
|
1087
|
+
return (e) => {
|
|
1088
|
+
const target = e.target;
|
|
1089
|
+
const textInputValue = target.value;
|
|
1090
|
+
this.textInputValue = textInputValue;
|
|
1091
|
+
this.triggerSearch(textInputValue);
|
|
1092
|
+
};
|
|
1093
|
+
}
|
|
1094
|
+
triggerSearch(textInputValue, cooldown = 500) {
|
|
1095
|
+
setTimeout(() => {
|
|
1096
|
+
var _a;
|
|
1097
|
+
if (textInputValue === this.textInputValue) {
|
|
1098
|
+
(_a = this.optionsProvider) === null || _a === void 0 ? void 0 : _a.call(this, this.language(), textInputValue ? [textInputValue] : []).then((options) => {
|
|
1099
|
+
if (textInputValue === this.textInputValue) {
|
|
1100
|
+
this.displayedOptions = options;
|
|
1101
|
+
}
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
}, cooldown);
|
|
1105
|
+
}
|
|
1075
1106
|
handleOptionButtonClicked(id) {
|
|
1076
1107
|
return (e) => {
|
|
1077
1108
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -1082,10 +1113,12 @@ class IcureDropdownField extends (0, field_with_options_1.FieldWithOptionsMixin)
|
|
|
1082
1113
|
const code = (_b = this.displayedOptions) === null || _b === void 0 ? void 0 : _b.find((option) => option.id === id);
|
|
1083
1114
|
const inputValue = (_f = (_e = (_d = (_c = this.displayedOptions) === null || _c === void 0 ? void 0 : _c.find((option) => option.id === id)) === null || _d === void 0 ? void 0 : _d['label']) === null || _e === void 0 ? void 0 : _e[this.language()]) !== null && _f !== void 0 ? _f : '';
|
|
1084
1115
|
this.displayMenu = false;
|
|
1116
|
+
this.textInputValue = undefined;
|
|
1085
1117
|
(_g = this.handleValueChanged) === null || _g === void 0 ? void 0 : _g.call(this, this.label, this.language(), {
|
|
1086
1118
|
content: { [this.language()]: { type: 'string', value: inputValue } },
|
|
1087
1119
|
codes: code ? [code] : [],
|
|
1088
1120
|
}, valueId);
|
|
1121
|
+
this.triggerSearch(undefined, 0);
|
|
1089
1122
|
return true;
|
|
1090
1123
|
}
|
|
1091
1124
|
return false;
|
|
@@ -1107,7 +1140,7 @@ class IcureDropdownField extends (0, field_with_options_1.FieldWithOptionsMixin)
|
|
|
1107
1140
|
return [undefined, undefined];
|
|
1108
1141
|
}
|
|
1109
1142
|
render() {
|
|
1110
|
-
var _a, _b;
|
|
1143
|
+
var _a, _b, _c, _d, _e;
|
|
1111
1144
|
if (!this.visible) {
|
|
1112
1145
|
return (0, lit_1.html) ``;
|
|
1113
1146
|
}
|
|
@@ -1115,14 +1148,14 @@ class IcureDropdownField extends (0, field_with_options_1.FieldWithOptionsMixin)
|
|
|
1115
1148
|
return (0, lit_1.html) `
|
|
1116
1149
|
<div id="root" class="icure-text-field ${inputValue != '' ? 'has-content' : ''}" data-placeholder=${this.placeholder}>
|
|
1117
1150
|
${this.displayedLabels ? (0, utils_1.generateLabels)(this.displayedLabels, this.language(), this.translate ? this.translationProvider : undefined) : lit_1.nothing}
|
|
1118
|
-
<div class="icure-input" @click="${this.togglePopup}"
|
|
1119
|
-
<
|
|
1151
|
+
<div class="icure-input" id="test" @click="${(event) => this.togglePopup(event, true)}">
|
|
1152
|
+
<input type="text" id="editor" style="outline: none" .value=${(_c = (_b = this.textInputValue) !== null && _b !== void 0 ? _b : inputValue) !== null && _c !== void 0 ? _c : ''} @input="${this.textInputChanged()}" />
|
|
1120
1153
|
<div id="extra" class=${'extra forced'}>
|
|
1121
|
-
<button class="btn select-arrow">${paths_1.dropdownPicto}</button>
|
|
1154
|
+
<button class="btn select-arrow" @click="${this.togglePopup}">${paths_1.dropdownPicto}</button>
|
|
1122
1155
|
${this.displayMenu
|
|
1123
1156
|
? (0, lit_1.html) `
|
|
1124
1157
|
<div id="menu" class="options">
|
|
1125
|
-
${(
|
|
1158
|
+
${(_d = this.displayedOptions) === null || _d === void 0 ? void 0 : _d.map((x) => {
|
|
1126
1159
|
var _a, _b;
|
|
1127
1160
|
return (0, lit_1.html) `<button
|
|
1128
1161
|
@click="${this.handleOptionButtonClicked(x.id)}"
|
|
@@ -1136,11 +1169,13 @@ class IcureDropdownField extends (0, field_with_options_1.FieldWithOptionsMixin)
|
|
|
1136
1169
|
`
|
|
1137
1170
|
: ''}
|
|
1138
1171
|
</div>
|
|
1172
|
+
<div class="error">${(_e = this.validationErrorsProvider) === null || _e === void 0 ? void 0 : _e.call(this).map(([, error]) => { var _a; return (0, lit_1.html) `<div>${(_a = this.translationProvider) === null || _a === void 0 ? void 0 : _a.call(this, this.language(), error)}</div>`; })}</div>
|
|
1139
1173
|
</div>
|
|
1140
1174
|
</div>
|
|
1141
1175
|
`;
|
|
1142
1176
|
}
|
|
1143
1177
|
}
|
|
1178
|
+
exports.IcureDropdownField = IcureDropdownField;
|
|
1144
1179
|
__decorate([
|
|
1145
1180
|
(0, decorators_js_1.property)(),
|
|
1146
1181
|
__metadata("design:type", Object)
|
|
@@ -1149,5 +1184,8 @@ __decorate([
|
|
|
1149
1184
|
(0, decorators_js_1.state)(),
|
|
1150
1185
|
__metadata("design:type", Object)
|
|
1151
1186
|
], IcureDropdownField.prototype, "displayMenu", void 0);
|
|
1152
|
-
|
|
1187
|
+
__decorate([
|
|
1188
|
+
(0, decorators_js_1.state)(),
|
|
1189
|
+
__metadata("design:type", String)
|
|
1190
|
+
], IcureDropdownField.prototype, "textInputValue", void 0);
|
|
1153
1191
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/icure-dropdown-field/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6BAAmE;AACnE,qDAAmD;AACnD,kDAAsD;AACtD,sCAAiC;AACjC,2CAAgD;AAChD,sDAA+D;AAC/D,qEAAoE;AACpE,aAAa;AACb,6BAA0B;AAC1B,MAAM,OAAO,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;eAE9E,CAAA,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAG,OAAO,CAAC,0CAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAI,EAAE;sBAC9B,CAAA;aAAA,CACX;;UAED;YACH,CAAC,CAAC,EAAE;;;;GAIR,CAAA;IACF,CAAC;CACD;AAvGA;IAAC,IAAA,wBAAQ,GAAE;;uDAAiB;AAE5B;IAAC,IAAA,qBAAK,GAAE;;uDAA8B;AAHvC,gDAwGC","sourcesContent":["import { CSSResultGroup, html, nothing, TemplateResult } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { dropdownPicto } from '../common/styles/paths'\nimport { Field } from '../common'\nimport { generateLabels } from '../common/utils'\nimport { extractSingleValue } from '../icure-form/fields/utils'\nimport { FieldWithOptionsMixin } from '../common/field-with-options'\n// @ts-ignore\nimport { css } from 'lit';\nconst baseCss = css`@charset \"UTF-8\";\n:host {\n --bg-color-1: #f44336;\n}\n\n.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n width: 100%;\n word-wrap: break-word;\n white-space: pre-wrap;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\n.ProseMirror li {\n position: relative;\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection {\n caret-color: transparent;\n}\n\n.ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n/* Make sure li selections wrap around markers */\nli.ProseMirror-selectednode {\n outline: none;\n}\n\nli.ProseMirror-selectednode:after {\n content: \"\";\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid #8cf;\n pointer-events: none;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n/* Add space around the hr to make clicking it easier */\n.ProseMirror-example-setup-style hr {\n padding: 2px 10px;\n border: none;\n margin: 1em 0;\n}\n\n.ProseMirror-example-setup-style hr:after {\n content: \"\";\n display: block;\n height: 1px;\n background: silver;\n line-height: 2px;\n}\n\n.ProseMirror ul,\n.ProseMirror ol {\n padding-left: 30px;\n}\n\n.ProseMirror blockquote {\n padding-left: 1em;\n border-left: 3px solid #eee;\n margin-left: 0;\n margin-right: 0;\n}\n\n.ProseMirror-example-setup-style img {\n cursor: default;\n}\n\n.ProseMirror-prompt {\n background: white;\n padding: 5px 10px 5px 15px;\n border: 1px solid silver;\n position: fixed;\n border-radius: 3px;\n z-index: 11;\n box-shadow: -0.5px 2px 5px rgba(0, 0, 0, 0.2);\n}\n\n.ProseMirror-prompt h5 {\n margin: 0;\n font-weight: normal;\n font-size: 100%;\n color: #444;\n}\n\n.ProseMirror-prompt input[type=text],\n.ProseMirror-prompt textarea {\n background: #eee;\n border: none;\n outline: none;\n}\n\n.ProseMirror-prompt input[type=text] {\n padding: 0 4px;\n}\n\n.ProseMirror-prompt-close {\n position: absolute;\n left: 2px;\n top: 1px;\n color: #666;\n border: none;\n background: transparent;\n padding: 0;\n}\n\n.ProseMirror-prompt-close:after {\n content: \"✕\";\n font-size: 12px;\n}\n\n.ProseMirror-invalid {\n background: #ffc;\n border: 1px solid #cc7;\n border-radius: 4px;\n padding: 5px 10px;\n position: absolute;\n min-width: 10em;\n}\n\n.ProseMirror-prompt-buttons {\n margin-top: 5px;\n display: none;\n}\n\n#editor,\n.editor {\n color: rgb(101, 101, 101);\n background-clip: padding-box;\n border-radius: 4px;\n border: 2px solid rgba(0, 0, 0, 0.2);\n padding: 5px 0;\n display: flex;\n align-items: flex-end;\n}\n\n.ProseMirror p:last-child,\n.ProseMirror h1:last-child,\n.ProseMirror h2:last-child,\n.ProseMirror h3:last-child,\n.ProseMirror h4:last-child,\n.ProseMirror h5:last-child,\n.ProseMirror h6:last-child {\n margin-bottom: 2px;\n}\n\n.ProseMirror {\n padding: 6px 8px 2px 8px;\n line-height: 1.2;\n color: #274768;\n font-size: 14px;\n font-weight: 400;\n outline: none;\n}\n\n.ProseMirror p {\n margin-bottom: 1em;\n}\n\n.icure-input {\n background: #edf2f7;\n border-radius: 8px;\n border: none;\n min-height: 28px;\n height: auto;\n display: flex;\n flex-flow: row nowrap;\n align-items: flex-start;\n justify-content: space-between;\n}\n\n#editor {\n background: transparent;\n border: none;\n padding: 0;\n flex-grow: 1;\n display: flex;\n align-items: stretch;\n}\n#editor.tokens-list .ProseMirror, #editor.styled-tokens-list .ProseMirror {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: flex-start;\n}\n#editor.tokens-list .ProseMirror li, #editor.styled-tokens-list .ProseMirror li {\n display: inline-block;\n border-radius: 8px;\n padding: 2px 4px;\n margin-right: 2px;\n background-color: #dadada;\n border-color: rgba(42, 61, 108, 0.44);\n}\n#editor.tokens-list .ProseMirror li span, #editor.styled-tokens-list .ProseMirror li span {\n min-width: 26px;\n display: inline-block;\n}\n#editor.tokens-list .ProseMirror li span br, #editor.styled-tokens-list .ProseMirror li span br {\n display: none;\n}\n#editor.tokens-list .ProseMirror li span:after:hover, #editor.styled-tokens-list .ProseMirror li span:after:hover {\n background: transparent url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxu cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJPdXRsaW5lIiB2aWV3 Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iIzAwMDAwMCIgZmlsbD0iIzAwMDAwMCIg d2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiPjxwYXRoIGQ9Ik0xNiw4YTEsMSwwLDAs MC0xLjQxNCwwTDEyLDEwLjU4Niw5LjQxNCw4QTEsMSwwLDAsMCw4LDkuNDE0TDEw LjU4NiwxMiw4LDE0LjU4NkExLDEsMCwwLDAsOS40MTQsMTZMMTIsMTMuNDE0LDE0 LjU4NiwxNkExLDEsMCwwLDAsMTYsMTQuNTg2TDEzLjQxNCwxMiwxNiw5LjQxNEEx LDEsMCwwLDAsMTYsOFoiLz48cGF0aCBkPSJNMTIsMEExMiwxMiwwLDEsMCwyNCwx MiwxMi4wMTMsMTIuMDEzLDAsMCwwLDEyLDBabTAsMjJBMTAsMTAsMCwxLDEsMjIs MTIsMTAuMDExLDEwLjAxMSwwLDAsMSwxMiwyMloiLz48L3N2Zz4K\") no-repeat center/16px;\n}\n#editor.tokens-list .ProseMirror li span:after, #editor.styled-tokens-list .ProseMirror li span:after {\n content: \" \";\n min-width: 22px;\n background: transparent url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxu cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJPdXRsaW5lIiB2aWV3 Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iIzg4ODg4OCIgZmlsbD0iIzg4ODg4OCIg d2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiPjxwYXRoIGQ9Ik0xNiw4YTEsMSwwLDAs MC0xLjQxNCwwTDEyLDEwLjU4Niw5LjQxNCw4QTEsMSwwLDAsMCw4LDkuNDE0TDEw LjU4NiwxMiw4LDE0LjU4NkExLDEsMCwwLDAsOS40MTQsMTZMMTIsMTMuNDE0LDE0 LjU4NiwxNkExLDEsMCwwLDAsMTYsMTQuNTg2TDEzLjQxNCwxMiwxNiw5LjQxNEEx LDEsMCwwLDAsMTYsOFoiLz48cGF0aCBkPSJNMTIsMEExMiwxMiwwLDEsMCwyNCwx MiwxMi4wMTMsMTIuMDEzLDAsMCwwLDEyLDBabTAsMjJBMTAsMTAsMCwxLDEsMjIs MTIsMTAuMDExLDEwLjAxMSwwLDAsMSwxMiwyMloiLz48L3N2Zz4K\") no-repeat center/16px;\n display: inline-block;\n}\n#editor.items-list .ProseMirror {\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n align-items: flex-start;\n gap: 6px;\n}\n#editor.items-list .ProseMirror li {\n list-style-type: none;\n width: 100%;\n padding-bottom: 4px;\n border-bottom: 1px dotted rgba(128, 128, 128, 0.5098039216);\n}\n#editor.items-list .ProseMirror li:last-child {\n border-bottom: none;\n}\n\n#content {\n position: relative;\n padding: 0;\n}\n\n* {\n font-family: \"Roboto\", Helvetica, sans-serif;\n}\n\np {\n margin-top: 0;\n}\n\nh3 {\n color: #274768;\n margin-top: 0;\n}\n\n.extra {\n flex-shrink: 0;\n height: 28px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n padding: 0 8px;\n transition: all 0.24s cubic-bezier(0.42, 0.01, 1, 0.62);\n}\n\n.extra > .info {\n color: #809ab4;\n font-size: 12px;\n width: 100%;\n height: auto;\n overflow: hidden;\n pointer-events: none;\n text-align: right;\n}\n\n.extra > .info > span {\n font-weight: 700;\n}\n\n.extra .buttons-container {\n display: flex;\n height: 100%;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-end;\n width: 0;\n transition: all 0.24s cubic-bezier(0.14, 0.69, 0.87, 0.54);\n}\n\n.extra:hover .buttons-container .menu-container .btn {\n animation: slideIn 0.24s ease-in forwards;\n pointer-events: none;\n}\n\n.extra:hover .buttons-container .menu-container .btn {\n animation-delay: 0.24s;\n}\n\n.extra:hover .buttons-container .menu-container:hover .btn {\n animation-delay: 0.04s;\n}\n\n.extra.forced:hover .buttons-container .menu-container .btn {\n animation: none;\n pointer-events: all;\n}\n\n.extra.forced .buttons-container .btn {\n opacity: 1 !important;\n}\n\n.extra.forced .info {\n opacity: 0 !important;\n}\n\n.extra:hover .info {\n opacity: 0 !important;\n z-index: 0 !important;\n}\n\n.extra .buttons-container .btn {\n border: none;\n background: transparent;\n position: relative;\n top: 0;\n opacity: 0;\n cursor: pointer;\n height: 20px;\n width: 10px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0;\n}\n\n.extra .buttons-container .menu-container:last-child .btn {\n margin-right: 0;\n}\n\n.extra .buttons-container .btn svg path {\n fill: #809ab4;\n}\n\n.extra .buttons-container .btn:hover svg path {\n fill: #274768;\n}\n\n.extra .buttons-container .menu-container .btn:hover::after {\n content: attr(data-content);\n position: absolute;\n top: -22px;\n height: 16px;\n left: 50%;\n transform: translateX(-50%);\n border-radius: 8px;\n background: #274768;\n color: white;\n display: flex;\n flex-flow: row wrap;\n align-items: center;\n text-transform: capitalize;\n white-space: nowrap;\n padding: 0 12px;\n font-size: 12px;\n line-height: 0;\n}\n\n.extra .buttons-container .btn:focus,\n.extra .buttons-container .btn:focus-within {\n border: none;\n outline: none;\n}\n\n.extra .buttons-container .menu-container .btn:hover::before {\n content: \"\";\n display: block;\n border-color: #274768 transparent transparent transparent;\n border-style: solid;\n border-width: 4px;\n position: absolute;\n top: -6px;\n}\n\n@keyframes slideIn {\n 0% {\n top: 12px;\n pointer-events: none;\n }\n 100% {\n top: 0;\n opacity: 1;\n pointer-events: all;\n }\n}\n.menu-container {\n position: relative;\n display: flex;\n align-items: center;\n height: 100%;\n}\n\n.menu {\n display: block;\n position: absolute;\n top: 20px;\n right: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n border-radius: 8px;\n padding: 8px;\n width: 220px;\n min-height: 120px;\n max-height: 320px;\n overflow-y: scroll;\n}\n\n.menu .input-container {\n background: #edf2f7;\n border-radius: 4px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n height: 32px;\n margin-bottom: 4px;\n padding: 0 4px;\n}\n\n.menu .input-container:hover {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2);\n}\n\n.menu .input-container:focus-within {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2), 0 0 0 1px rgb(40, 151, 255);\n}\n\n.menu .input-container input {\n background: transparent;\n border: none;\n flex-grow: 1;\n height: 100%;\n}\n\n.menu .input-container input:focus {\n background: transparent;\n border: none;\n outline: none;\n}\n\n.menu-trigger:focus .menu {\n display: block;\n}\n\n.menu-container .item {\n height: 22px;\n width: 100%;\n background: transparent;\n border-radius: 4px;\n font-size: 14px;\n color: #274768;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n box-shadow: none;\n border: none;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n}\n\n.menu-container .item:hover {\n background: #f5f9fd;\n font-weight: 500;\n border-radius: 4px;\n}\n\nspan {\n position: relative;\n z-index: 1;\n}\n\nspan.date {\n margin-right: 1px;\n}\n\nspan.time {\n margin-left: 1px;\n}\n\nspan.measure {\n display: inline-block;\n margin-right: 1px;\n}\n\nspan.unit {\n margin-left: 1px;\n display: inline-block;\n}\n\nspan[data-content]:hover::after {\n position: absolute;\n content: attr(data-content);\n background: #274768;\n color: #ffffff;\n font-size: 9px;\n line-height: 12px;\n top: -12px;\n left: 0px;\n padding: 0px 2px;\n}\n\nspan[data-content]::before {\n position: absolute;\n content: \"\";\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: -1;\n opacity: 0.3;\n}\n\n.masked {\n display: none;\n}\n\n.companion {\n position: absolute;\n width: 15px;\n background-color: hsl(194, 100%, 50%);\n color: white;\n z-index: 20;\n padding: 0;\n text-align: center;\n font-size: 14px;\n font-weight: 500;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: 0 2px 2px 0;\n}\n\n.companion:hover {\n font-weight: 700;\n background: hsl(202, 100%, 50%);\n}\n\n*::selection {\n background-color: hsla(194, 100%, 50%, 0.2);\n}\n\n.suggestion-palette {\n position: absolute;\n z-index: 20;\n max-width: 380px;\n font-size: 11px;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 4px;\n border: none;\n border-radius: 8px;\n background: white;\n box-shadow: 0 1.1px 1.1px rgba(0, 0, 0, 0.022), 0 2.7px 2.7px rgba(0, 0, 0, 0.032), 0 5px 5px rgba(0, 0, 0, 0.04), 0 8.9px 8.9px rgba(0, 0, 0, 0.048), 0 16.7px 16.7px rgba(0, 0, 0, 0.058), 0 40px 40px rgba(0, 0, 0, 0.08);\n}\n\n.suggestion-palette ul {\n white-space: nowrap;\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n\n.suggestion-palette ul li {\n padding: 0 8px;\n font-size: 11px;\n height: 20px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-radius: 4px;\n color: rgb(39, 71, 104);\n}\n.suggestion-palette ul li svg {\n height: 12px;\n width: 12px;\n border-radius: 4px;\n transform-origin: center center;\n}\n.suggestion-palette ul li svg path {\n fill: rgb(128, 154, 180);\n}\n\n.suggestion-palette ul li:not(:first-child) svg.tab-icn,\n.suggestion-palette ul li:not(.focused) svg.return-icn,\n.suggestion-palette ul.focused li:first-child svg.tab-icn {\n height: 0;\n width: 0;\n transform: scale(0);\n opacity: 0;\n}\n\n.suggestion-palette ul li.focused {\n background-color: rgb(237, 242, 247);\n}\n\n.suggestion-palette ul li.focused svg.return-icn {\n animation: growIn 0.24s ease-in forwards;\n}\n\n@keyframes growIn {\n 0% {\n transform: scale(0.5);\n }\n 90% {\n transform: scale(1.1);\n }\n 100% {\n transform: scale(1);\n }\n}\nspan.code-count-1::after,\nspan.code-count-1::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n}\n\nspan.code-count-2::after,\nspan.code-count-2::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n /*background: repeating-linear-gradient(*/\n /*\t45deg,*/\n /*\tvar(--bg-code-color-1),*/\n /*\tvar(--bg-code-color-1) 10px,*/\n /*\tvar(--bg-code-color-2) 10px,*/\n /*\tvar(--bg-code-color-2) 20px*/\n /*);*/\n /* PAS STRIPES */\n background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);\n}\n\nspan.code-count-3::after,\nspan.code-count-3::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n background: repeating-linear-gradient(45deg, var(--bg-code-color-1), var(--bg-code-color-1) 10px, var(--bg-code-color-2) 10px, var(--bg-code-color-2) 20px);\n /* PAS STRIPES */\n /* background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);*/\n}\n\n.selected-option {\n padding: 2px;\n margin-right: 5px;\n}\n\n.options {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: 30px;\n left: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n width: auto;\n min-width: 100%;\n overflow-y: auto;\n max-height: 280px;\n}\n\n.date-picker {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: 30px;\n right: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n width: 260px;\n overflow-y: auto;\n max-height: 280px;\n left: 0px;\n}\n\napp-date-picker {\n --app-primary: #084B83;\n --app-hover: #5b7da2;\n --app-selected-hover: #5b7da2;\n}\n\n.option {\n height: 28px;\n min-height: 28px;\n width: 100%;\n background: transparent;\n border-radius: 4px;\n font-size: 14px;\n color: #545454;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n box-shadow: none;\n border: none;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n padding: 4px 8px;\n -webkit-user-select: none; /* Safari */\n -ms-user-select: none; /* IE 10 and IE 11 */\n user-select: none; /* Standard syntax */\n}\n\n.option:hover {\n color: #656565;\n background-color: #ededed;\n}\n\n.select-arrow {\n border: none;\n background: 0px 0px;\n position: relative;\n top: 0px;\n opacity: 0.5;\n cursor: pointer;\n height: 20px;\n width: 10px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0px;\n}\n\n.hidden {\n display: none;\n}\n\n.container {\n position: relative;\n}\n\n.icure-form {\n background-color: rgba(0, 0, 0, 0);\n display: grid;\n gap: 0 6px;\n grid-template-columns: repeat(24, 1fr);\n}\n\n.group {\n align-items: end;\n display: grid;\n}\n\n.subform {\n align-items: end;\n display: grid;\n position: relative;\n margin: 8px -8px 8px;\n padding: 0 8px 0;\n min-height: 64px;\n background-color: #e7f0fd;\n}\n\n.icure-form hr {\n display: block;\n margin-top: 20px;\n border-top: 1px solid rgba(8, 75, 131, 0.13);\n margin-bottom: 20px;\n}\n.icure-form h2 {\n font-size: 14.4px;\n font-weight: 700;\n color: #084B83;\n padding: 2px;\n}\n.icure-form h3 {\n font-size: 13.2px;\n font-weight: 500;\n color: #084B83;\n padding: 6px;\n}\n.icure-form .group.bordered {\n background: #f6f6f6;\n border-radius: 12px;\n}\n.icure-form .float-right-btn {\n position: absolute;\n right: 10px;\n cursor: pointer;\n}\n.icure-form .float-right-btn.top {\n top: 6px;\n}\n.icure-form .float-right-btn.bottom {\n bottom: -8px;\n}\n\n.icure-form-field {\n align-items: end;\n display: grid;\n}\n\n.icure-text-field > .icure-label, .icure-button-group > .icure-label {\n z-index: 1;\n pointer-events: none;\n line-height: 1.4em;\n cursor: text;\n font-size: 12px;\n left: 9px;\n color: #084B83;\n align-items: center;\n height: 28px;\n max-width: 85%;\n min-width: 0;\n}\n.icure-text-field > .icure-label.float, .icure-button-group > .icure-label.float {\n display: inline-block;\n height: 1.4em;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.icure-text-field {\n position: relative;\n width: 100%;\n flex-direction: row;\n justify-content: stretch;\n align-items: center;\n}\n.icure-text-field > .icure-label {\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n}\n.icure-text-field > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n.icure-text-field > .icure-label.side {\n position: relative;\n}\n.icure-text-field > .icure-label.side.left {\n order: -1;\n margin-right: 1em;\n}\n.icure-text-field > .icure-label.side.right {\n order: 1;\n margin-left: 1em;\n}\n.icure-text-field .icure-input,\n.icure-text-field .input-container {\n border-radius: 2px;\n padding: 4px 8px;\n width: 100%;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n outline: 0;\n font: inherit;\n font-size: 14px;\n line-height: 1.4em;\n display: flex;\n align-items: center;\n vertical-align: middle;\n position: relative;\n -webkit-appearance: none;\n background-color: #ffffff;\n border-color: red;\n color: #000000;\n box-sizing: border-box;\n}\n.icure-text-field .icure-input:focus, .icure-text-field .icure-input:focus-within,\n.icure-text-field .input-container:focus,\n.icure-text-field .input-container:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.icure-text-field .icure-input:hover,\n.icure-text-field .input-container:hover {\n border-color: rgba(0, 0, 0, 0.15);\n box-shadow: none;\n}\n.icure-text-field .icure-input:hover:focus, .icure-text-field .icure-input:hover:focus-within,\n.icure-text-field .input-container:hover:focus,\n.icure-text-field .input-container:hover:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.icure-text-field .icure-input .ProseMirror,\n.icure-text-field .input-container .ProseMirror {\n padding: 0;\n font-size: 14px;\n line-height: 1.4em;\n color: #000000;\n}\n.icure-text-field .icure-input .ProseMirror .date,\n.icure-text-field .input-container .ProseMirror .date {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror .time,\n.icure-text-field .input-container .ProseMirror .time {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror:focus .focused,\n.icure-text-field .input-container .ProseMirror:focus .focused {\n background-color: rgba(0, 0, 0, 0.05);\n border-radius: 3px;\n border-color: rgba(0, 0, 0, 0.1);\n}\n.icure-text-field .icure-input > svg,\n.icure-text-field .input-container > svg {\n opacity: 0.5;\n}\n.icure-text-field .icure-input > svg path,\n.icure-text-field .input-container > svg path {\n fill: #656565;\n}\n.icure-text-field .icure-input .extra,\n.icure-text-field .input-container .extra {\n height: 20px;\n}\n.icure-text-field .icure-input .extra > .info,\n.icure-text-field .input-container .extra > .info {\n color: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .buttons-container .btn svg path,\n.icure-text-field .input-container .extra .buttons-container .btn svg path {\n fill: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .buttons-container .btn svg path:hover,\n.icure-text-field .input-container .extra .buttons-container .btn svg path:hover {\n fill: #656565;\n opacity: 1;\n}\n\ninput[type=radio] {\n margin-top: -1px;\n vertical-align: middle;\n}\n\n.icure-checkbox:checked {\n accent-color: #06a070;\n}\n\n.icure-button-group > div {\n display: grid;\n}\n.icure-button-group > div > div {\n display: flex;\n align-items: center;\n}\n.icure-button-group > div > div > .icure-button-group-label {\n z-index: 1;\n line-height: 1.4em;\n cursor: text;\n font-size: 12px;\n top: calc(1.4em + 5px);\n left: 9px;\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n color: #084B83;\n display: flex;\n align-items: center;\n height: 28px;\n max-width: 85%;\n min-width: 0;\n}\n.icure-button-group > div > div > .icure-button-group-label > span {\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding-right: 8px;\n}\n.icure-button-group > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n.icure-button-group > .icure-label {\n transform: translate(0, 0) scale(1);\n}\n.icure-button-group > .icure-label.above, .icure-button-group.has-content > .icure-label, .icure-button-group:focus > .icure-label, .icure-button-group:focus-within > .icure-label {\n font-weight: 500;\n height: 1.4em;\n}` \n\nexport class IcureDropdownField extends FieldWithOptionsMixin(Field) {\n\t@property() placeholder = ''\n\n\t@state() protected displayMenu = false\n\n\tstatic get styles(): CSSResultGroup[] {\n\t\treturn [baseCss]\n\t}\n\n\ttogglePopup(): void {\n\t\tif (this.readonly) return\n\t\tthis.displayMenu = !this.displayMenu\n\t}\n\n\t_handleClickOutside(event: MouseEvent): void {\n\t\tif (!event.composedPath().includes(this)) {\n\t\t\tthis.displayMenu = false\n\t\t\tevent.stopPropagation()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tdocument.addEventListener('click', this._handleClickOutside.bind(this))\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tdocument.removeEventListener('click', this._handleClickOutside.bind(this))\n\t}\n\n\thandleOptionButtonClicked(id: string | undefined): (e: Event) => boolean {\n\t\treturn (e: Event) => {\n\t\t\te.preventDefault()\n\t\t\te.stopPropagation()\n\t\t\tconst [valueId] = this.getValueFromProvider() ?? ''\n\t\t\tif (id) {\n\t\t\t\tconst code = this.displayedOptions?.find((option) => option.id === id)\n\t\t\t\tconst inputValue = this.displayedOptions?.find((option) => option.id === id)?.['label']?.[this.language()] ?? ''\n\t\t\t\tthis.displayMenu = false\n\t\t\t\tthis.handleValueChanged?.(\n\t\t\t\t\tthis.label,\n\t\t\t\t\tthis.language(),\n\t\t\t\t\t{\n\t\t\t\t\t\tcontent: { [this.language()]: { type: 'string', value: inputValue } },\n\t\t\t\t\t\tcodes: code ? [code] : [],\n\t\t\t\t\t},\n\t\t\t\t\tvalueId,\n\t\t\t\t)\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t}\n\n\tgetValueFromProvider(): [string, string] | [undefined, undefined] {\n\t\tconst [id, versions] = extractSingleValue(this.valueProvider?.())\n\t\tif (versions) {\n\t\t\tconst value = versions[0]?.value\n\t\t\tconst valueForLanguage = value?.content?.[this.language()] ?? ''\n\t\t\tif (valueForLanguage && valueForLanguage.type === 'string' && valueForLanguage.value) {\n\t\t\t\treturn [id, valueForLanguage.value]\n\t\t\t} else if (value?.codes?.length) {\n\t\t\t\treturn [id, value?.codes?.[0]?.label?.[this.language()] ?? '']\n\t\t\t}\n\t\t}\n\t\treturn [undefined, undefined]\n\t}\n\n\trender(): TemplateResult {\n\t\tif (!this.visible) {\n\t\t\treturn html``\n\t\t}\n\n\t\tconst [, inputValue] = this.getValueFromProvider() ?? ''\n\n\t\treturn html`\n\t\t\t<div id=\"root\" class=\"icure-text-field ${inputValue != '' ? 'has-content' : ''}\" data-placeholder=${this.placeholder}>\n\t\t\t\t${this.displayedLabels ? generateLabels(this.displayedLabels, this.language(), this.translate ? this.translationProvider : undefined) : nothing}\n\t\t\t\t<div class=\"icure-input\" @click=\"${this.togglePopup}\" id=\"test\">\n\t\t\t\t\t<div id=\"editor\">${inputValue}</div>\n\t\t\t\t\t<div id=\"extra\" class=${'extra forced'}>\n\t\t\t\t\t\t<button class=\"btn select-arrow\">${dropdownPicto}</button>\n\t\t\t\t\t\t${this.displayMenu\n\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t<div id=\"menu\" class=\"options\">\n\t\t\t\t\t\t\t\t\t\t${this.displayedOptions?.map(\n\t\t\t\t\t\t\t\t\t\t\t(x) =>\n\t\t\t\t\t\t\t\t\t\t\t\thtml`<button\n\t\t\t\t\t\t\t\t\t\t\t\t\t@click=\"${this.handleOptionButtonClicked(x.id)}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"${x.id}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"option ${x?.['label']?.[this.language()] === inputValue ? 'selected' : ''}\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t${x?.['label']?.[this.language()] || ''}\n\t\t\t\t\t\t\t\t\t\t\t\t</button>`,\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t `\n\t\t\t\t\t\t\t: ''}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/icure-dropdown-field/index.ts"],"names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it'\nimport { property, state } from 'lit/decorators.js'\nimport { dropdownPicto } from '../common/styles/paths'\nimport { Field } from '../common'\nimport { generateLabels } from '../common/utils'\nimport { extractSingleValue } from '../icure-form/fields/utils'\nimport { FieldWithOptionsMixin } from '../common/field-with-options'\n// @ts-ignore\nimport { css } from 'lit';\nconst baseCss = css`@charset \"UTF-8\";\n:host {\n --bg-color-1: #f44336;\n}\n\n.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n width: 100%;\n word-wrap: break-word;\n white-space: pre-wrap;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\n.ProseMirror li {\n position: relative;\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection {\n caret-color: transparent;\n}\n\n.ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n/* Make sure li selections wrap around markers */\nli.ProseMirror-selectednode {\n outline: none;\n}\n\nli.ProseMirror-selectednode:after {\n content: \"\";\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid #8cf;\n pointer-events: none;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n/* Add space around the hr to make clicking it easier */\n.ProseMirror-example-setup-style hr {\n padding: 2px 10px;\n border: none;\n margin: 1em 0;\n}\n\n.ProseMirror-example-setup-style hr:after {\n content: \"\";\n display: block;\n height: 1px;\n background: silver;\n line-height: 2px;\n}\n\n.ProseMirror ul,\n.ProseMirror ol {\n padding-left: 30px;\n}\n\n.ProseMirror blockquote {\n padding-left: 1em;\n border-left: 3px solid #eee;\n margin-left: 0;\n margin-right: 0;\n}\n\n.ProseMirror-example-setup-style img {\n cursor: default;\n}\n\n.ProseMirror-prompt {\n background: white;\n padding: 5px 10px 5px 15px;\n border: 1px solid silver;\n position: fixed;\n border-radius: 3px;\n z-index: 11;\n box-shadow: -0.5px 2px 5px rgba(0, 0, 0, 0.2);\n}\n\n.ProseMirror-prompt h5 {\n margin: 0;\n font-weight: normal;\n font-size: 100%;\n color: #444;\n}\n\n.ProseMirror-prompt input[type=text],\n.ProseMirror-prompt textarea {\n background: #eee;\n border: none;\n outline: none;\n}\n\n.ProseMirror-prompt input[type=text] {\n padding: 0 4px;\n}\n\n.ProseMirror-prompt-close {\n position: absolute;\n left: 2px;\n top: 1px;\n color: #666;\n border: none;\n background: transparent;\n padding: 0;\n}\n\n.ProseMirror-prompt-close:after {\n content: \"✕\";\n font-size: 12px;\n}\n\n.ProseMirror-invalid {\n background: #ffc;\n border: 1px solid #cc7;\n border-radius: 4px;\n padding: 5px 10px;\n position: absolute;\n min-width: 10em;\n}\n\n.ProseMirror-prompt-buttons {\n margin-top: 5px;\n display: none;\n}\n\n#editor,\n.editor {\n color: rgb(101, 101, 101);\n background-clip: padding-box;\n border-radius: 4px;\n border: 2px solid rgba(0, 0, 0, 0.2);\n padding: 5px 0;\n display: flex;\n align-items: flex-end;\n}\n\n.ProseMirror p:last-child,\n.ProseMirror h1:last-child,\n.ProseMirror h2:last-child,\n.ProseMirror h3:last-child,\n.ProseMirror h4:last-child,\n.ProseMirror h5:last-child,\n.ProseMirror h6:last-child {\n margin-bottom: 2px;\n}\n\n.ProseMirror {\n padding: 6px 8px 2px 8px;\n line-height: 1.2;\n color: #274768;\n font-size: 14px;\n font-weight: 400;\n outline: none;\n}\n\n.ProseMirror p {\n margin-bottom: 1em;\n}\n\n.icure-input {\n background: #edf2f7;\n border-radius: 8px;\n border: none;\n min-height: 28px;\n height: auto;\n display: flex;\n flex-flow: row nowrap;\n align-items: flex-start;\n justify-content: space-between;\n}\n\n#editor {\n background: transparent;\n border: none;\n padding: 0;\n flex-grow: 1;\n display: flex;\n align-items: stretch;\n}\n#editor.tokens-list .ProseMirror, #editor.styled-tokens-list .ProseMirror {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: flex-start;\n}\n#editor.tokens-list .ProseMirror li, #editor.styled-tokens-list .ProseMirror li {\n display: inline-block;\n border-radius: 8px;\n padding: 2px 4px;\n margin-right: 2px;\n background-color: #dadada;\n border-color: rgba(42, 61, 108, 0.44);\n}\n#editor.tokens-list .ProseMirror li span, #editor.styled-tokens-list .ProseMirror li span {\n min-width: 26px;\n display: inline-block;\n}\n#editor.tokens-list .ProseMirror li span br, #editor.styled-tokens-list .ProseMirror li span br {\n display: none;\n}\n#editor.tokens-list .ProseMirror li span:after:hover, #editor.styled-tokens-list .ProseMirror li span:after:hover {\n background: transparent url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxu cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJPdXRsaW5lIiB2aWV3 Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iIzAwMDAwMCIgZmlsbD0iIzAwMDAwMCIg d2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiPjxwYXRoIGQ9Ik0xNiw4YTEsMSwwLDAs MC0xLjQxNCwwTDEyLDEwLjU4Niw5LjQxNCw4QTEsMSwwLDAsMCw4LDkuNDE0TDEw LjU4NiwxMiw4LDE0LjU4NkExLDEsMCwwLDAsOS40MTQsMTZMMTIsMTMuNDE0LDE0 LjU4NiwxNkExLDEsMCwwLDAsMTYsMTQuNTg2TDEzLjQxNCwxMiwxNiw5LjQxNEEx LDEsMCwwLDAsMTYsOFoiLz48cGF0aCBkPSJNMTIsMEExMiwxMiwwLDEsMCwyNCwx MiwxMi4wMTMsMTIuMDEzLDAsMCwwLDEyLDBabTAsMjJBMTAsMTAsMCwxLDEsMjIs MTIsMTAuMDExLDEwLjAxMSwwLDAsMSwxMiwyMloiLz48L3N2Zz4K\") no-repeat center/16px;\n}\n#editor.tokens-list .ProseMirror li span:after, #editor.styled-tokens-list .ProseMirror li span:after {\n content: \" \";\n min-width: 22px;\n background: transparent url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxu cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJPdXRsaW5lIiB2aWV3 Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iIzg4ODg4OCIgZmlsbD0iIzg4ODg4OCIg d2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiPjxwYXRoIGQ9Ik0xNiw4YTEsMSwwLDAs MC0xLjQxNCwwTDEyLDEwLjU4Niw5LjQxNCw4QTEsMSwwLDAsMCw4LDkuNDE0TDEw LjU4NiwxMiw4LDE0LjU4NkExLDEsMCwwLDAsOS40MTQsMTZMMTIsMTMuNDE0LDE0 LjU4NiwxNkExLDEsMCwwLDAsMTYsMTQuNTg2TDEzLjQxNCwxMiwxNiw5LjQxNEEx LDEsMCwwLDAsMTYsOFoiLz48cGF0aCBkPSJNMTIsMEExMiwxMiwwLDEsMCwyNCwx MiwxMi4wMTMsMTIuMDEzLDAsMCwwLDEyLDBabTAsMjJBMTAsMTAsMCwxLDEsMjIs MTIsMTAuMDExLDEwLjAxMSwwLDAsMSwxMiwyMloiLz48L3N2Zz4K\") no-repeat center/16px;\n display: inline-block;\n}\n#editor.items-list .ProseMirror {\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n align-items: flex-start;\n gap: 6px;\n}\n#editor.items-list .ProseMirror li {\n list-style-type: none;\n width: 100%;\n padding-bottom: 4px;\n border-bottom: 1px dotted rgba(128, 128, 128, 0.5098039216);\n}\n#editor.items-list .ProseMirror li:last-child {\n border-bottom: none;\n}\n\n#content {\n position: relative;\n padding: 0;\n}\n\n* {\n font-family: \"Roboto\", Helvetica, sans-serif;\n}\n\np {\n margin-top: 0;\n}\n\nh3 {\n color: #274768;\n margin-top: 0;\n}\n\n.extra {\n flex-shrink: 0;\n height: 28px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n padding: 0 8px;\n transition: all 0.24s cubic-bezier(0.42, 0.01, 1, 0.62);\n}\n\n.extra > .info {\n color: #809ab4;\n font-size: 12px;\n width: 100%;\n height: auto;\n overflow: hidden;\n pointer-events: none;\n text-align: right;\n}\n\n.extra > .info > span {\n font-weight: 700;\n}\n\n.extra .buttons-container {\n display: flex;\n height: 100%;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-end;\n width: 0;\n transition: all 0.24s cubic-bezier(0.14, 0.69, 0.87, 0.54);\n}\n\n.extra:hover .buttons-container .menu-container .btn {\n animation: slideIn 0.24s ease-in forwards;\n pointer-events: none;\n}\n\n.extra:hover .buttons-container .menu-container .btn {\n animation-delay: 0.24s;\n}\n\n.extra:hover .buttons-container .menu-container:hover .btn {\n animation-delay: 0.04s;\n}\n\n.extra.forced:hover .buttons-container .menu-container .btn {\n animation: none;\n pointer-events: all;\n}\n\n.extra.forced .buttons-container .btn {\n opacity: 1 !important;\n}\n\n.extra.forced .info {\n opacity: 0 !important;\n}\n\n.extra:hover .info {\n opacity: 0 !important;\n z-index: 0 !important;\n}\n\n.extra .buttons-container .btn {\n border: none;\n background: transparent;\n position: relative;\n top: 0;\n opacity: 0;\n cursor: pointer;\n height: 20px;\n width: 10px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0;\n}\n\n.extra .buttons-container .menu-container:last-child .btn {\n margin-right: 0;\n}\n\n.extra .buttons-container .btn svg path {\n fill: #809ab4;\n}\n\n.extra .buttons-container .btn:hover svg path {\n fill: #274768;\n}\n\n.extra .buttons-container .menu-container .btn:hover::after {\n content: attr(data-content);\n position: absolute;\n top: -22px;\n height: 16px;\n left: 50%;\n transform: translateX(-50%);\n border-radius: 8px;\n background: #274768;\n color: white;\n display: flex;\n flex-flow: row wrap;\n align-items: center;\n text-transform: capitalize;\n white-space: nowrap;\n padding: 0 12px;\n font-size: 12px;\n line-height: 0;\n}\n\n.extra .buttons-container .btn:focus,\n.extra .buttons-container .btn:focus-within {\n border: none;\n outline: none;\n}\n\n.extra .buttons-container .menu-container .btn:hover::before {\n content: \"\";\n display: block;\n border-color: #274768 transparent transparent transparent;\n border-style: solid;\n border-width: 4px;\n position: absolute;\n top: -6px;\n}\n\n@keyframes slideIn {\n 0% {\n top: 12px;\n pointer-events: none;\n }\n 100% {\n top: 0;\n opacity: 1;\n pointer-events: all;\n }\n}\n.menu-container {\n position: relative;\n display: flex;\n align-items: center;\n height: 100%;\n}\n\n.menu {\n display: block;\n position: absolute;\n top: 20px;\n right: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n border-radius: 8px;\n padding: 8px;\n width: 220px;\n min-height: 120px;\n max-height: 320px;\n overflow-y: scroll;\n}\n\n.menu .input-container {\n background: #edf2f7;\n border-radius: 4px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n height: 32px;\n margin-bottom: 4px;\n padding: 0 4px;\n}\n\n.menu .input-container:hover {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2);\n}\n\n.menu .input-container:focus-within {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2), 0 0 0 1px rgb(40, 151, 255);\n}\n\n.menu .input-container input {\n background: transparent;\n border: none;\n flex-grow: 1;\n height: 100%;\n}\n\n.menu .input-container input:focus {\n background: transparent;\n border: none;\n outline: none;\n}\n\n.menu-trigger:focus .menu {\n display: block;\n}\n\n.menu-container .item {\n height: 22px;\n width: 100%;\n background: transparent;\n border-radius: 4px;\n font-size: 14px;\n color: #274768;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n box-shadow: none;\n border: none;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n}\n\n.menu-container .item:hover {\n background: #f5f9fd;\n font-weight: 500;\n border-radius: 4px;\n}\n\nspan {\n position: relative;\n z-index: 1;\n}\n\nspan.date {\n margin-right: 1px;\n}\n\nspan.time {\n margin-left: 1px;\n}\n\nspan.measure {\n display: inline-block;\n margin-right: 1px;\n}\n\nspan.unit {\n margin-left: 1px;\n display: inline-block;\n}\n\nspan[data-content]:hover::after {\n position: absolute;\n content: attr(data-content);\n background: #274768;\n color: #ffffff;\n font-size: 9px;\n line-height: 12px;\n top: -12px;\n left: 0px;\n padding: 0px 2px;\n}\n\nspan[data-content]::before {\n position: absolute;\n content: \"\";\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: -1;\n opacity: 0.3;\n}\n\n.masked {\n display: none;\n}\n\n.companion {\n position: absolute;\n width: 15px;\n background-color: hsl(194, 100%, 50%);\n color: white;\n z-index: 20;\n padding: 0;\n text-align: center;\n font-size: 14px;\n font-weight: 500;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: 0 2px 2px 0;\n}\n\n.companion:hover {\n font-weight: 700;\n background: hsl(202, 100%, 50%);\n}\n\n*::selection {\n background-color: hsla(194, 100%, 50%, 0.2);\n}\n\n.suggestion-palette {\n position: absolute;\n z-index: 20;\n max-width: 380px;\n font-size: 11px;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 4px;\n border: none;\n border-radius: 8px;\n background: white;\n box-shadow: 0 1.1px 1.1px rgba(0, 0, 0, 0.022), 0 2.7px 2.7px rgba(0, 0, 0, 0.032), 0 5px 5px rgba(0, 0, 0, 0.04), 0 8.9px 8.9px rgba(0, 0, 0, 0.048), 0 16.7px 16.7px rgba(0, 0, 0, 0.058), 0 40px 40px rgba(0, 0, 0, 0.08);\n}\n\n.suggestion-palette ul {\n white-space: nowrap;\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n\n.suggestion-palette ul li {\n padding: 0 8px;\n font-size: 11px;\n height: 20px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-radius: 4px;\n color: rgb(39, 71, 104);\n}\n.suggestion-palette ul li svg {\n height: 12px;\n width: 12px;\n border-radius: 4px;\n transform-origin: center center;\n}\n.suggestion-palette ul li svg path {\n fill: rgb(128, 154, 180);\n}\n\n.suggestion-palette ul li:not(:first-child) svg.tab-icn,\n.suggestion-palette ul li:not(.focused) svg.return-icn,\n.suggestion-palette ul.focused li:first-child svg.tab-icn {\n height: 0;\n width: 0;\n transform: scale(0);\n opacity: 0;\n}\n\n.suggestion-palette ul li.focused {\n background-color: rgb(237, 242, 247);\n}\n\n.suggestion-palette ul li.focused svg.return-icn {\n animation: growIn 0.24s ease-in forwards;\n}\n\n@keyframes growIn {\n 0% {\n transform: scale(0.5);\n }\n 90% {\n transform: scale(1.1);\n }\n 100% {\n transform: scale(1);\n }\n}\nspan.code-count-1::after,\nspan.code-count-1::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n}\n\nspan.code-count-2::after,\nspan.code-count-2::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n /*background: repeating-linear-gradient(*/\n /*\t45deg,*/\n /*\tvar(--bg-code-color-1),*/\n /*\tvar(--bg-code-color-1) 10px,*/\n /*\tvar(--bg-code-color-2) 10px,*/\n /*\tvar(--bg-code-color-2) 20px*/\n /*);*/\n /* PAS STRIPES */\n background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);\n}\n\nspan.code-count-3::after,\nspan.code-count-3::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n background: repeating-linear-gradient(45deg, var(--bg-code-color-1), var(--bg-code-color-1) 10px, var(--bg-code-color-2) 10px, var(--bg-code-color-2) 20px);\n /* PAS STRIPES */\n /* background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);*/\n}\n\n.selected-option {\n padding: 2px;\n margin-right: 5px;\n}\n\n.options {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: 30px;\n left: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n width: auto;\n min-width: 100%;\n overflow-y: auto;\n max-height: 280px;\n}\n\n.date-picker {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: 30px;\n right: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n width: 260px;\n overflow-y: auto;\n max-height: 280px;\n left: 0px;\n}\n\napp-date-picker {\n --app-primary: #084B83;\n --app-hover: #5b7da2;\n --app-selected-hover: #5b7da2;\n}\n\n.option {\n height: 28px;\n min-height: 28px;\n width: 100%;\n background: transparent;\n border-radius: 4px;\n font-size: 14px;\n color: #545454;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n box-shadow: none;\n border: none;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n padding: 4px 8px;\n -webkit-user-select: none; /* Safari */\n -ms-user-select: none; /* IE 10 and IE 11 */\n user-select: none; /* Standard syntax */\n}\n\n.option:hover {\n color: #656565;\n background-color: #ededed;\n}\n\n.select-arrow {\n border: none;\n background: 0px 0px;\n position: relative;\n top: 0px;\n opacity: 0.5;\n cursor: pointer;\n height: 20px;\n width: 10px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0px;\n}\n\n.hidden {\n display: none;\n}\n\n.container {\n position: relative;\n}\n\n.icure-form {\n background-color: rgba(0, 0, 0, 0);\n display: grid;\n gap: 0 6px;\n grid-template-columns: repeat(24, 1fr);\n}\n\n.group {\n align-items: end;\n display: grid;\n}\n\n.subform {\n align-items: end;\n display: grid;\n position: relative;\n margin: 8px -8px 8px;\n padding: 0 8px 0;\n min-height: 64px;\n background-color: #e7f0fd;\n}\n\n.icure-form hr {\n display: block;\n margin-top: 20px;\n border-top: 1px solid rgba(8, 75, 131, 0.13);\n margin-bottom: 20px;\n}\n.icure-form h2 {\n font-size: 14.4px;\n font-weight: 700;\n color: #084B83;\n padding: 2px;\n}\n.icure-form h3 {\n font-size: 13.2px;\n font-weight: 500;\n color: #084B83;\n padding: 6px;\n}\n.icure-form .group.bordered {\n background: #f6f6f6;\n border-radius: 12px;\n}\n.icure-form .float-right-btn {\n position: absolute;\n right: 10px;\n cursor: pointer;\n}\n.icure-form .float-right-btn.top {\n top: 6px;\n}\n.icure-form .float-right-btn.bottom {\n bottom: -8px;\n}\n\n.icure-form-field {\n align-items: end;\n display: grid;\n}\n\n.error {\n color: red;\n font-size: 12px;\n}\n\n.icure-text-field > .icure-label, .icure-button-group > .icure-label {\n z-index: 1;\n pointer-events: none;\n line-height: 1.4em;\n cursor: text;\n font-size: 12px;\n left: 9px;\n color: #084B83;\n align-items: center;\n height: 28px;\n max-width: 85%;\n min-width: 0;\n}\n.icure-text-field > .icure-label.float, .icure-button-group > .icure-label.float {\n display: inline-block;\n height: 1.4em;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.icure-text-field {\n position: relative;\n width: 100%;\n flex-direction: row;\n justify-content: stretch;\n align-items: center;\n}\n.icure-text-field > .icure-label {\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n}\n.icure-text-field > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n.icure-text-field > .icure-label.side {\n position: relative;\n}\n.icure-text-field > .icure-label.side.left {\n order: -1;\n margin-right: 1em;\n}\n.icure-text-field > .icure-label.side.right {\n order: 1;\n margin-left: 1em;\n}\n.icure-text-field .icure-input,\n.icure-text-field .input-container {\n border-radius: 2px;\n padding: 4px 8px;\n width: 100%;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n outline: 0;\n font: inherit;\n font-size: 14px;\n line-height: 1.4em;\n display: flex;\n align-items: center;\n vertical-align: middle;\n position: relative;\n -webkit-appearance: none;\n background-color: #ffffff;\n border-color: red;\n color: #000000;\n box-sizing: border-box;\n}\n.icure-text-field .icure-input:focus, .icure-text-field .icure-input:focus-within,\n.icure-text-field .input-container:focus,\n.icure-text-field .input-container:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.icure-text-field .icure-input:hover,\n.icure-text-field .input-container:hover {\n border-color: rgba(0, 0, 0, 0.15);\n box-shadow: none;\n}\n.icure-text-field .icure-input:hover:focus, .icure-text-field .icure-input:hover:focus-within,\n.icure-text-field .input-container:hover:focus,\n.icure-text-field .input-container:hover:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.icure-text-field .icure-input .ProseMirror,\n.icure-text-field .input-container .ProseMirror {\n padding: 0;\n font-size: 14px;\n line-height: 1.4em;\n color: #000000;\n}\n.icure-text-field .icure-input .ProseMirror .date,\n.icure-text-field .input-container .ProseMirror .date {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror .time,\n.icure-text-field .input-container .ProseMirror .time {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror:focus .focused,\n.icure-text-field .input-container .ProseMirror:focus .focused {\n background-color: rgba(0, 0, 0, 0.05);\n border-radius: 3px;\n border-color: rgba(0, 0, 0, 0.1);\n}\n.icure-text-field .icure-input > svg,\n.icure-text-field .input-container > svg {\n opacity: 0.5;\n}\n.icure-text-field .icure-input > svg path,\n.icure-text-field .input-container > svg path {\n fill: #656565;\n}\n.icure-text-field .icure-input .extra,\n.icure-text-field .input-container .extra {\n height: 20px;\n}\n.icure-text-field .icure-input .extra > .info,\n.icure-text-field .input-container .extra > .info {\n color: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .buttons-container .btn svg path,\n.icure-text-field .input-container .extra .buttons-container .btn svg path {\n fill: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .buttons-container .btn svg path:hover,\n.icure-text-field .input-container .extra .buttons-container .btn svg path:hover {\n fill: #656565;\n opacity: 1;\n}\n\ninput[type=radio] {\n margin-top: -1px;\n vertical-align: middle;\n}\n\n.icure-checkbox:checked {\n accent-color: #06a070;\n}\n\n.icure-button-group > div {\n display: grid;\n}\n.icure-button-group > div > div {\n display: flex;\n align-items: center;\n}\n.icure-button-group > div > div > .icure-button-group-label {\n z-index: 1;\n line-height: 1.4em;\n cursor: text;\n font-size: 12px;\n top: calc(1.4em + 5px);\n left: 9px;\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n color: #084B83;\n display: flex;\n align-items: center;\n height: 28px;\n max-width: 85%;\n min-width: 0;\n}\n.icure-button-group > div > div > .icure-button-group-label > span {\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding-right: 8px;\n}\n.icure-button-group > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n.icure-button-group > .icure-label {\n transform: translate(0, 0) scale(1);\n}\n.icure-button-group > .icure-label.above, .icure-button-group.has-content > .icure-label, .icure-button-group:focus > .icure-label, .icure-button-group:focus-within > .icure-label {\n font-weight: 500;\n height: 1.4em;\n}` \n\nexport class IcureDropdownField extends FieldWithOptionsMixin(Field) {\n\t@property() placeholder = ''\n\n\t@state() protected displayMenu = false\n\t@state() protected textInputValue?: string = undefined\n\n\tstatic get styles(): CSSResultGroup[] {\n\t\treturn [baseCss]\n\t}\n\n\ttogglePopup(event: MouseEvent, force = false): void {\n\t\tif (this.readonly) return\n\t\tthis.displayMenu = force || !this.displayMenu\n\t\tconsole.log('togglePopup', this.textInputValue)\n\t\tevent.stopPropagation()\n\t}\n\n\t_handleClickOutside(event: MouseEvent): void {\n\t\tif (!event.composedPath().includes(this)) {\n\t\t\tif (this.displayMenu) {\n\t\t\t\tconsole.log(this.label)\n\t\t\t\tthis.displayMenu = false\n\t\t\t}\n\t\t\tevent.stopPropagation()\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tdocument.addEventListener('click', this._handleClickOutside.bind(this))\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tdocument.removeEventListener('click', this._handleClickOutside.bind(this))\n\t}\n\n\ttextInputChanged(): (e: Event) => void {\n\t\treturn (e: Event) => {\n\t\t\tconst target = e.target as HTMLInputElement\n\t\t\tconst textInputValue = target.value\n\t\t\tthis.textInputValue = textInputValue\n\t\t\tthis.triggerSearch(textInputValue)\n\t\t}\n\t}\n\n\tprivate triggerSearch(textInputValue: string | undefined, cooldown = 500) {\n\t\tsetTimeout(() => {\n\t\t\tif (textInputValue === this.textInputValue) {\n\t\t\t\tthis.optionsProvider?.(this.language(), textInputValue ? [textInputValue] : []).then((options) => {\n\t\t\t\t\tif (textInputValue === this.textInputValue) {\n\t\t\t\t\t\tthis.displayedOptions = options\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t}, cooldown)\n\t}\n\n\thandleOptionButtonClicked(id: string | undefined): (e: Event) => boolean {\n\t\treturn (e: Event) => {\n\t\t\te.preventDefault()\n\t\t\te.stopPropagation()\n\t\t\tconst [valueId] = this.getValueFromProvider() ?? ''\n\t\t\tif (id) {\n\t\t\t\tconst code = this.displayedOptions?.find((option) => option.id === id)\n\t\t\t\tconst inputValue = this.displayedOptions?.find((option) => option.id === id)?.['label']?.[this.language()] ?? ''\n\t\t\t\tthis.displayMenu = false\n\t\t\t\tthis.textInputValue = undefined\n\t\t\t\tthis.handleValueChanged?.(\n\t\t\t\t\tthis.label,\n\t\t\t\t\tthis.language(),\n\t\t\t\t\t{\n\t\t\t\t\t\tcontent: { [this.language()]: { type: 'string', value: inputValue } },\n\t\t\t\t\t\tcodes: code ? [code] : [],\n\t\t\t\t\t},\n\t\t\t\t\tvalueId,\n\t\t\t\t)\n\t\t\t\tthis.triggerSearch(undefined, 0)\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t}\n\n\tgetValueFromProvider(): [string, string] | [undefined, undefined] {\n\t\tconst [id, versions] = extractSingleValue(this.valueProvider?.())\n\t\tif (versions) {\n\t\t\tconst value = versions[0]?.value\n\t\t\tconst valueForLanguage = value?.content?.[this.language()] ?? ''\n\t\t\tif (valueForLanguage && valueForLanguage.type === 'string' && valueForLanguage.value) {\n\t\t\t\treturn [id, valueForLanguage.value]\n\t\t\t} else if (value?.codes?.length) {\n\t\t\t\treturn [id, value?.codes?.[0]?.label?.[this.language()] ?? '']\n\t\t\t}\n\t\t}\n\t\treturn [undefined, undefined]\n\t}\n\n\trender(): TemplateResult {\n\t\tif (!this.visible) {\n\t\t\treturn html``\n\t\t}\n\n\t\tconst [, inputValue] = this.getValueFromProvider() ?? ''\n\n\t\treturn html`\n\t\t\t<div id=\"root\" class=\"icure-text-field ${inputValue != '' ? 'has-content' : ''}\" data-placeholder=${this.placeholder}>\n\t\t\t\t${this.displayedLabels ? generateLabels(this.displayedLabels, this.language(), this.translate ? this.translationProvider : undefined) : nothing}\n\t\t\t\t<div class=\"icure-input\" id=\"test\" @click=\"${(event: MouseEvent) => this.togglePopup(event, true)}\">\n\t\t\t\t\t<input type=\"text\" id=\"editor\" style=\"outline: none\" .value=${this.textInputValue ?? inputValue ?? ''} @input=\"${this.textInputChanged()}\" />\n\t\t\t\t\t<div id=\"extra\" class=${'extra forced'}>\n\t\t\t\t\t\t<button class=\"btn select-arrow\" @click=\"${this.togglePopup}\">${dropdownPicto}</button>\n\t\t\t\t\t\t${this.displayMenu\n\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t<div id=\"menu\" class=\"options\">\n\t\t\t\t\t\t\t\t\t\t${this.displayedOptions?.map(\n\t\t\t\t\t\t\t\t\t\t\t(x) =>\n\t\t\t\t\t\t\t\t\t\t\t\thtml`<button\n\t\t\t\t\t\t\t\t\t\t\t\t\t@click=\"${this.handleOptionButtonClicked(x.id)}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"${x.id}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"option ${x?.['label']?.[this.language()] === inputValue ? 'selected' : ''}\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t${x?.['label']?.[this.language()] || ''}\n\t\t\t\t\t\t\t\t\t\t\t\t</button>`,\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t `\n\t\t\t\t\t\t\t: ''}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"error\">${this.validationErrorsProvider?.().map(([, error]) => html`<div>${this.translationProvider?.(this.language(), error)}</div>`)}</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n"]}
|
|
@@ -36,26 +36,27 @@ class CheckBox extends common_1.Field {
|
|
|
36
36
|
<icure-button-group
|
|
37
37
|
type="checkbox"
|
|
38
38
|
.readonly="${this.readonly}"
|
|
39
|
+
.displayMetadata="${this.displayMetadata}"
|
|
39
40
|
.displayedLabels="${this.displayedLabels}"
|
|
40
41
|
label="${this.label}"
|
|
41
42
|
.defaultLanguage="${this.defaultLanguage}"
|
|
42
|
-
displayedLanguage="${this.displayedLanguage}"
|
|
43
43
|
.translate="${this.translate}"
|
|
44
44
|
.optionsProvider=${this.optionsProvider}
|
|
45
45
|
.translationProvider=${this.translationProvider}
|
|
46
46
|
.valueProvider=${(0, utils_1.singleValueProvider)(this.valueProvider, id)}
|
|
47
|
+
.validationErrorsProvider=${this.validationErrorsProvider}
|
|
47
48
|
.metadataProvider=${this.metadataProvider}
|
|
48
49
|
.handleValueChanged=${(0, utils_1.handleSingleValueChanged)(this.handleValueChanged, id)}
|
|
49
|
-
.
|
|
50
|
+
.handleMetadataChanged=${(0, utils_1.handleSingleMetadataChanged)(this.handleMetadataChanged, id)}
|
|
50
51
|
.styleOptions=${this.styleOptions}
|
|
51
52
|
></icure-button-group>
|
|
52
53
|
`;
|
|
53
54
|
});
|
|
54
55
|
}
|
|
55
56
|
}
|
|
57
|
+
exports.CheckBox = CheckBox;
|
|
56
58
|
__decorate([
|
|
57
59
|
(0, decorators_js_1.property)(),
|
|
58
60
|
__metadata("design:type", Function)
|
|
59
61
|
], CheckBox.prototype, "optionsProvider", void 0);
|
|
60
|
-
exports.CheckBox = CheckBox;
|
|
61
62
|
//# sourceMappingURL=checkbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../../../tmp/components/icure-form/fields/button-group/checkbox.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,6BAA0B;AAC1B,4CAAuC;AACvC,oCAAqG;AACrG,qDAA4C;AAG5C,MAAa,QAAS,SAAQ,cAAK;IAAnC;;QACa,oBAAe,GAA+D,GAAS,EAAE,gDAAC,OAAA,EAAE,CAAA,GAAA,CAAA;
|
|
1
|
+
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../../../tmp/components/icure-form/fields/button-group/checkbox.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,6BAA0B;AAC1B,4CAAuC;AACvC,oCAAqG;AACrG,qDAA4C;AAG5C,MAAa,QAAS,SAAQ,cAAK;IAAnC;;QACa,oBAAe,GAA+D,GAAS,EAAE,gDAAC,OAAA,EAAE,CAAA,GAAA,CAAA;IA0BzG,CAAC;IAxBA,MAAM;;QACL,MAAM,eAAe,GAAG,MAAA,IAAI,CAAC,aAAa,oDAAI,CAAA;QAC9C,OAAO,CAAC,eAAe,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;YACvH,OAAO,IAAA,UAAI,EAAA;;;kBAGI,IAAI,CAAC,QAAQ;yBACN,IAAI,CAAC,eAAe;yBACpB,IAAI,CAAC,eAAe;cAC/B,IAAI,CAAC,KAAK;yBACC,IAAI,CAAC,eAAe;mBAC1B,IAAI,CAAC,SAAS;wBACT,IAAI,CAAC,eAAe;4BAChB,IAAI,CAAC,mBAAmB;sBAC9B,IAAA,2BAAmB,EAAC,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC;iCAChC,IAAI,CAAC,wBAAwB;yBACrC,IAAI,CAAC,gBAAgB;2BACnB,IAAA,gCAAwB,EAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC;8BAClD,IAAA,mCAA2B,EAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,CAAC;qBACpE,IAAI,CAAC,YAAY;;IAElC,CAAA;QACF,CAAC,CAAC,CAAA;IACH,CAAC;CACD;AA3BD,4BA2BC;AA1BY;IAAX,IAAA,wBAAQ,GAAE;;iDAA6F","sourcesContent":["import { html } from 'lit'\nimport { Field } from '../../../common'\nimport { handleSingleMetadataChanged, handleSingleValueChanged, singleValueProvider } from '../utils'\nimport { property } from 'lit/decorators.js'\nimport { Code } from '../../../model'\n\nexport class CheckBox extends Field {\n\t@property() optionsProvider: (language: string, searchTerm?: string) => Promise<Code[]> = async () => []\n\n\trender() {\n\t\tconst versionedValues = this.valueProvider?.()\n\t\treturn (versionedValues && Object.keys(versionedValues).length ? Object.keys(versionedValues) : [undefined]).map((id) => {\n\t\t\treturn html`\n\t\t\t\t<icure-button-group\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t.readonly=\"${this.readonly}\"\n\t\t\t\t\t.displayMetadata=\"${this.displayMetadata}\"\n\t\t\t\t\t.displayedLabels=\"${this.displayedLabels}\"\n\t\t\t\t\tlabel=\"${this.label}\"\n\t\t\t\t\t.defaultLanguage=\"${this.defaultLanguage}\"\n\t\t\t\t\t.translate=\"${this.translate}\"\n\t\t\t\t\t.optionsProvider=${this.optionsProvider}\n\t\t\t\t\t.translationProvider=${this.translationProvider}\n\t\t\t\t\t.valueProvider=${singleValueProvider(this.valueProvider, id)}\n\t\t\t\t\t.validationErrorsProvider=${this.validationErrorsProvider}\n\t\t\t\t\t.metadataProvider=${this.metadataProvider}\n\t\t\t\t\t.handleValueChanged=${handleSingleValueChanged(this.handleValueChanged, id)}\n\t\t\t\t\t.handleMetadataChanged=${handleSingleMetadataChanged(this.handleMetadataChanged, id)}\n\t\t\t\t\t.styleOptions=${this.styleOptions}\n\t\t\t\t></icure-button-group>\n\t\t\t`\n\t\t})\n\t}\n}\n"]}
|
|
@@ -35,27 +35,28 @@ class RadioButton extends common_1.Field {
|
|
|
35
35
|
return (0, lit_1.html) `
|
|
36
36
|
<icure-button-group
|
|
37
37
|
.readonly="${this.readonly}"
|
|
38
|
+
.displayMetadata="${this.displayMetadata}"
|
|
38
39
|
type="radio"
|
|
39
40
|
.displayedLabels="${this.displayedLabels}"
|
|
40
41
|
label="${this.label}"
|
|
41
|
-
defaultLanguage="${this.defaultLanguage}"
|
|
42
|
-
displayedLanguage="${this.displayedLanguage}"
|
|
42
|
+
.defaultLanguage="${this.defaultLanguage}"
|
|
43
43
|
.translate="${this.translate}"
|
|
44
44
|
.optionsProvider=${this.optionsProvider}
|
|
45
45
|
.translationProvider=${this.translationProvider}
|
|
46
46
|
.valueProvider=${(0, utils_1.singleValueProvider)(this.valueProvider, id)}
|
|
47
|
+
.validationErrorsProvider=${this.validationErrorsProvider}
|
|
47
48
|
.metadataProvider=${this.metadataProvider}
|
|
48
49
|
.handleValueChanged=${(0, utils_1.handleSingleValueChanged)(this.handleValueChanged, id)}
|
|
49
|
-
.
|
|
50
|
+
.handleMetadataChanged=${(0, utils_1.handleSingleMetadataChanged)(this.handleMetadataChanged, id)}
|
|
50
51
|
.styleOptions=${this.styleOptions}
|
|
51
52
|
></icure-button-group>
|
|
52
53
|
`;
|
|
53
54
|
});
|
|
54
55
|
}
|
|
55
56
|
}
|
|
57
|
+
exports.RadioButton = RadioButton;
|
|
56
58
|
__decorate([
|
|
57
59
|
(0, decorators_js_1.property)(),
|
|
58
60
|
__metadata("design:type", Function)
|
|
59
61
|
], RadioButton.prototype, "optionsProvider", void 0);
|
|
60
|
-
exports.RadioButton = RadioButton;
|
|
61
62
|
//# sourceMappingURL=radio-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button.js","sourceRoot":"","sources":["../../../../../tmp/components/icure-form/fields/button-group/radio-button.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,6BAA0B;AAC1B,4CAAuC;AACvC,oCAAqG;AACrG,qDAA4C;AAG5C,MAAa,WAAY,SAAQ,cAAK;IAAtC;;QACa,oBAAe,GAA+D,GAAS,EAAE,gDAAC,OAAA,EAAE,CAAA,GAAA,CAAA;
|
|
1
|
+
{"version":3,"file":"radio-button.js","sourceRoot":"","sources":["../../../../../tmp/components/icure-form/fields/button-group/radio-button.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,6BAA0B;AAC1B,4CAAuC;AACvC,oCAAqG;AACrG,qDAA4C;AAG5C,MAAa,WAAY,SAAQ,cAAK;IAAtC;;QACa,oBAAe,GAA+D,GAAS,EAAE,gDAAC,OAAA,EAAE,CAAA,GAAA,CAAA;IAyBzG,CAAC;IAxBA,MAAM;;QACL,MAAM,eAAe,GAAG,MAAA,IAAI,CAAC,aAAa,oDAAI,CAAA;QAC9C,OAAO,CAAC,eAAe,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;YACvH,OAAO,IAAA,UAAI,EAAA;;kBAEI,IAAI,CAAC,QAAQ;yBACN,IAAI,CAAC,eAAe;;yBAEpB,IAAI,CAAC,eAAe;cAC/B,IAAI,CAAC,KAAK;yBACC,IAAI,CAAC,eAAe;mBAC1B,IAAI,CAAC,SAAS;wBACT,IAAI,CAAC,eAAe;4BAChB,IAAI,CAAC,mBAAmB;sBAC9B,IAAA,2BAAmB,EAAC,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC;iCAChC,IAAI,CAAC,wBAAwB;yBACrC,IAAI,CAAC,gBAAgB;2BACnB,IAAA,gCAAwB,EAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC;8BAClD,IAAA,mCAA2B,EAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,CAAC;qBACpE,IAAI,CAAC,YAAY;;IAElC,CAAA;QACF,CAAC,CAAC,CAAA;IACH,CAAC;CACD;AA1BD,kCA0BC;AAzBY;IAAX,IAAA,wBAAQ,GAAE;;oDAA6F","sourcesContent":["import { html } from 'lit'\nimport { Field } from '../../../common'\nimport { handleSingleMetadataChanged, handleSingleValueChanged, singleValueProvider } from '../utils'\nimport { property } from 'lit/decorators.js'\nimport { Code } from '../../../model'\n\nexport class RadioButton extends Field {\n\t@property() optionsProvider: (language: string, searchTerm?: string) => Promise<Code[]> = async () => []\n\trender() {\n\t\tconst versionedValues = this.valueProvider?.()\n\t\treturn (versionedValues && Object.keys(versionedValues).length ? Object.keys(versionedValues) : [undefined]).map((id) => {\n\t\t\treturn html`\n\t\t\t\t<icure-button-group\n\t\t\t\t\t.readonly=\"${this.readonly}\"\n\t\t\t\t\t.displayMetadata=\"${this.displayMetadata}\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t.displayedLabels=\"${this.displayedLabels}\"\n\t\t\t\t\tlabel=\"${this.label}\"\n\t\t\t\t\t.defaultLanguage=\"${this.defaultLanguage}\"\n\t\t\t\t\t.translate=\"${this.translate}\"\n\t\t\t\t\t.optionsProvider=${this.optionsProvider}\n\t\t\t\t\t.translationProvider=${this.translationProvider}\n\t\t\t\t\t.valueProvider=${singleValueProvider(this.valueProvider, id)}\n\t\t\t\t\t.validationErrorsProvider=${this.validationErrorsProvider}\n\t\t\t\t\t.metadataProvider=${this.metadataProvider}\n\t\t\t\t\t.handleValueChanged=${handleSingleValueChanged(this.handleValueChanged, id)}\n\t\t\t\t\t.handleMetadataChanged=${handleSingleMetadataChanged(this.handleMetadataChanged, id)}\n\t\t\t\t\t.styleOptions=${this.styleOptions}\n\t\t\t\t></icure-button-group>\n\t\t\t`\n\t\t})\n\t}\n}\n"]}
|
|
@@ -11,16 +11,17 @@ class DatePicker extends common_1.Field {
|
|
|
11
11
|
return (versionedValues && Object.keys(versionedValues).length ? Object.keys(versionedValues) : [undefined]).map((id) => {
|
|
12
12
|
return (0, lit_1.html) `<icure-date-picker-field
|
|
13
13
|
.readonly="${this.readonly}"
|
|
14
|
+
.displayMetadata="${this.displayMetadata}"
|
|
14
15
|
label="${this.label}"
|
|
15
16
|
.displayedLabels="${this.displayedLabels}"
|
|
16
|
-
defaultLanguage="${this.defaultLanguage}"
|
|
17
|
-
displayedLanguage="${this.displayedLanguage}"
|
|
17
|
+
.defaultLanguage="${this.defaultLanguage}"
|
|
18
18
|
schema="decimal"
|
|
19
19
|
.translationProvider=${this.translationProvider}
|
|
20
20
|
.valueProvider=${(0, utils_1.singleValueProvider)(this.valueProvider, id)}
|
|
21
|
+
.validationErrorsProvider=${this.validationErrorsProvider}
|
|
21
22
|
.metadataProvider=${this.metadataProvider}
|
|
22
23
|
.handleValueChanged=${(0, utils_1.handleSingleValueChanged)(this.handleValueChanged, id)}
|
|
23
|
-
.
|
|
24
|
+
.handleMetadataChanged=${(0, utils_1.handleSingleMetadataChanged)(this.handleMetadataChanged, id)}
|
|
24
25
|
></icure-date-picker-field>`;
|
|
25
26
|
});
|
|
26
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.js","sourceRoot":"","sources":["../../../../../tmp/components/icure-form/fields/date-picker/date-picker.ts"],"names":[],"mappings":";;;AAAA,6BAA0B;AAC1B,oCAAqG;AACrG,4CAAuC;AAEvC,MAAa,UAAW,SAAQ,cAAK;IACpC,MAAM;;QACL,MAAM,eAAe,GAAG,MAAA,IAAI,CAAC,aAAa,oDAAI,CAAA;QAC9C,OAAO,CAAC,eAAe,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;YACvH,OAAO,IAAA,UAAI,EAAA;iBACG,IAAI,CAAC,QAAQ;
|
|
1
|
+
{"version":3,"file":"date-picker.js","sourceRoot":"","sources":["../../../../../tmp/components/icure-form/fields/date-picker/date-picker.ts"],"names":[],"mappings":";;;AAAA,6BAA0B;AAC1B,oCAAqG;AACrG,4CAAuC;AAEvC,MAAa,UAAW,SAAQ,cAAK;IACpC,MAAM;;QACL,MAAM,eAAe,GAAG,MAAA,IAAI,CAAC,aAAa,oDAAI,CAAA;QAC9C,OAAO,CAAC,eAAe,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;YACvH,OAAO,IAAA,UAAI,EAAA;iBACG,IAAI,CAAC,QAAQ;wBACN,IAAI,CAAC,eAAe;aAC/B,IAAI,CAAC,KAAK;wBACC,IAAI,CAAC,eAAe;wBACpB,IAAI,CAAC,eAAe;;2BAEjB,IAAI,CAAC,mBAAmB;qBAC9B,IAAA,2BAAmB,EAAC,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC;gCAChC,IAAI,CAAC,wBAAwB;wBACrC,IAAI,CAAC,gBAAgB;0BACnB,IAAA,gCAAwB,EAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC;6BAClD,IAAA,mCAA2B,EAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,CAAC;+BACzD,CAAA;QAC7B,CAAC,CAAC,CAAA;IACH,CAAC;CACD;AApBD,gCAoBC","sourcesContent":["import { html } from 'lit'\nimport { handleSingleMetadataChanged, handleSingleValueChanged, singleValueProvider } from '../utils'\nimport { Field } from '../../../common'\n\nexport class DatePicker extends Field {\n\trender() {\n\t\tconst versionedValues = this.valueProvider?.()\n\t\treturn (versionedValues && Object.keys(versionedValues).length ? Object.keys(versionedValues) : [undefined]).map((id) => {\n\t\t\treturn html`<icure-date-picker-field\n\t\t\t\t.readonly=\"${this.readonly}\"\n\t\t\t\t.displayMetadata=\"${this.displayMetadata}\"\n\t\t\t\tlabel=\"${this.label}\"\n\t\t\t\t.displayedLabels=\"${this.displayedLabels}\"\n\t\t\t\t.defaultLanguage=\"${this.defaultLanguage}\"\n\t\t\t\tschema=\"decimal\"\n\t\t\t\t.translationProvider=${this.translationProvider}\n\t\t\t\t.valueProvider=${singleValueProvider(this.valueProvider, id)}\n\t\t\t\t.validationErrorsProvider=${this.validationErrorsProvider}\n\t\t\t\t.metadataProvider=${this.metadataProvider}\n\t\t\t\t.handleValueChanged=${handleSingleValueChanged(this.handleValueChanged, id)}\n\t\t\t\t.handleMetadataChanged=${handleSingleMetadataChanged(this.handleMetadataChanged, id)}\n\t\t\t></icure-date-picker-field>`\n\t\t})\n\t}\n}\n"]}
|
|
@@ -11,16 +11,17 @@ class DateTimePicker extends common_1.Field {
|
|
|
11
11
|
return (versionedValues && Object.keys(versionedValues).length ? Object.keys(versionedValues) : [undefined]).map((id) => {
|
|
12
12
|
return (0, lit_1.html) `<icure-text-field
|
|
13
13
|
.readonly="${this.readonly}"
|
|
14
|
+
.displayMetadata="${this.displayMetadata}"
|
|
14
15
|
label="${this.label}"
|
|
15
16
|
.displayedLabels="${this.displayedLabels}"
|
|
16
|
-
defaultLanguage="${this.defaultLanguage}"
|
|
17
|
-
displayedLanguage="${this.displayedLanguage}"
|
|
17
|
+
.defaultLanguage="${this.defaultLanguage}"
|
|
18
18
|
schema="date-time"
|
|
19
19
|
.translationProvider=${this.translationProvider}
|
|
20
20
|
.valueProvider=${(0, utils_1.singleValueProvider)(this.valueProvider, id)}
|
|
21
|
+
.validationErrorsProvider=${this.validationErrorsProvider}
|
|
21
22
|
.metadataProvider=${this.metadataProvider}
|
|
22
23
|
.handleValueChanged=${(0, utils_1.handleSingleValueChanged)(this.handleValueChanged, id)}
|
|
23
|
-
.
|
|
24
|
+
.handleMetadataChanged=${(0, utils_1.handleSingleMetadataChanged)(this.handleMetadataChanged, id)}
|
|
24
25
|
></icure-text-field>`;
|
|
25
26
|
});
|
|
26
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-time-picker.js","sourceRoot":"","sources":["../../../../../tmp/components/icure-form/fields/date-picker/date-time-picker.ts"],"names":[],"mappings":";;;AAAA,6BAA0B;AAC1B,oCAAqG;AAErG,4CAAuC;AAEvC,MAAa,cAAe,SAAQ,cAAK;IACxC,MAAM;;QACL,MAAM,eAAe,GAAG,MAAA,IAAI,CAAC,aAAa,oDAAI,CAAA;QAC9C,OAAO,CAAC,eAAe,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;YACvH,OAAO,IAAA,UAAI,EAAA;iBACG,IAAI,CAAC,QAAQ;
|
|
1
|
+
{"version":3,"file":"date-time-picker.js","sourceRoot":"","sources":["../../../../../tmp/components/icure-form/fields/date-picker/date-time-picker.ts"],"names":[],"mappings":";;;AAAA,6BAA0B;AAC1B,oCAAqG;AAErG,4CAAuC;AAEvC,MAAa,cAAe,SAAQ,cAAK;IACxC,MAAM;;QACL,MAAM,eAAe,GAAG,MAAA,IAAI,CAAC,aAAa,oDAAI,CAAA;QAC9C,OAAO,CAAC,eAAe,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;YACvH,OAAO,IAAA,UAAI,EAAA;iBACG,IAAI,CAAC,QAAQ;wBACN,IAAI,CAAC,eAAe;aAC/B,IAAI,CAAC,KAAK;wBACC,IAAI,CAAC,eAAe;wBACpB,IAAI,CAAC,eAAe;;2BAEjB,IAAI,CAAC,mBAAmB;qBAC9B,IAAA,2BAAmB,EAAC,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC;gCAChC,IAAI,CAAC,wBAAwB;wBACrC,IAAI,CAAC,gBAAgB;0BACnB,IAAA,gCAAwB,EAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC;6BAClD,IAAA,mCAA2B,EAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,CAAC;wBAChE,CAAA;QACtB,CAAC,CAAC,CAAA;IACH,CAAC;CACD;AApBD,wCAoBC","sourcesContent":["import { html } from 'lit'\nimport { handleSingleMetadataChanged, handleSingleValueChanged, singleValueProvider } from '../utils'\n\nimport { Field } from '../../../common'\n\nexport class DateTimePicker extends Field {\n\trender() {\n\t\tconst versionedValues = this.valueProvider?.()\n\t\treturn (versionedValues && Object.keys(versionedValues).length ? Object.keys(versionedValues) : [undefined]).map((id) => {\n\t\t\treturn html`<icure-text-field\n\t\t\t\t.readonly=\"${this.readonly}\"\n\t\t\t\t.displayMetadata=\"${this.displayMetadata}\"\n\t\t\t\tlabel=\"${this.label}\"\n\t\t\t\t.displayedLabels=\"${this.displayedLabels}\"\n\t\t\t\t.defaultLanguage=\"${this.defaultLanguage}\"\n\t\t\t\tschema=\"date-time\"\n\t\t\t\t.translationProvider=${this.translationProvider}\n\t\t\t\t.valueProvider=${singleValueProvider(this.valueProvider, id)}\n\t\t\t\t.validationErrorsProvider=${this.validationErrorsProvider}\n\t\t\t\t.metadataProvider=${this.metadataProvider}\n\t\t\t\t.handleValueChanged=${handleSingleValueChanged(this.handleValueChanged, id)}\n\t\t\t\t.handleMetadataChanged=${handleSingleMetadataChanged(this.handleMetadataChanged, id)}\n\t\t\t></icure-text-field>`\n\t\t})\n\t}\n}\n"]}
|
|
@@ -11,16 +11,17 @@ class TimePicker extends common_1.Field {
|
|
|
11
11
|
return (versionedValues && Object.keys(versionedValues).length ? Object.keys(versionedValues) : [undefined]).map((id) => {
|
|
12
12
|
return (0, lit_1.html) `<icure-text-field
|
|
13
13
|
.readonly="${this.readonly}"
|
|
14
|
+
.displayMetadata="${this.displayMetadata}"
|
|
14
15
|
label="${this.label}"
|
|
15
16
|
.displayedLabels="${this.displayedLabels}"
|
|
16
|
-
defaultLanguage="${this.defaultLanguage}"
|
|
17
|
-
displayedLanguage="${this.displayedLanguage}"
|
|
17
|
+
.defaultLanguage="${this.defaultLanguage}"
|
|
18
18
|
schema="time"
|
|
19
19
|
.translationProvider=${this.translationProvider}
|
|
20
20
|
.valueProvider=${(0, utils_1.singleValueProvider)(this.valueProvider, id)}
|
|
21
|
+
.validationErrorsProvider=${this.validationErrorsProvider}
|
|
21
22
|
.metadataProvider=${this.metadataProvider}
|
|
22
23
|
.handleValueChanged=${(0, utils_1.handleSingleValueChanged)(this.handleValueChanged, id)}
|
|
23
|
-
.
|
|
24
|
+
.handleMetadataChanged=${(0, utils_1.handleSingleMetadataChanged)(this.handleMetadataChanged, id)}
|
|
24
25
|
></icure-text-field>`;
|
|
25
26
|
});
|
|
26
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-picker.js","sourceRoot":"","sources":["../../../../../tmp/components/icure-form/fields/date-picker/time-picker.ts"],"names":[],"mappings":";;;AAAA,6BAA0B;AAC1B,oCAAqG;AACrG,4CAAuC;AAEvC,MAAa,UAAW,SAAQ,cAAK;IACpC,MAAM;;QACL,MAAM,eAAe,GAAG,MAAA,IAAI,CAAC,aAAa,oDAAI,CAAA;QAC9C,OAAO,CAAC,eAAe,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;YACvH,OAAO,IAAA,UAAI,EAAA;iBACG,IAAI,CAAC,QAAQ;
|
|
1
|
+
{"version":3,"file":"time-picker.js","sourceRoot":"","sources":["../../../../../tmp/components/icure-form/fields/date-picker/time-picker.ts"],"names":[],"mappings":";;;AAAA,6BAA0B;AAC1B,oCAAqG;AACrG,4CAAuC;AAEvC,MAAa,UAAW,SAAQ,cAAK;IACpC,MAAM;;QACL,MAAM,eAAe,GAAG,MAAA,IAAI,CAAC,aAAa,oDAAI,CAAA;QAC9C,OAAO,CAAC,eAAe,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;YACvH,OAAO,IAAA,UAAI,EAAA;iBACG,IAAI,CAAC,QAAQ;wBACN,IAAI,CAAC,eAAe;aAC/B,IAAI,CAAC,KAAK;wBACC,IAAI,CAAC,eAAe;wBACpB,IAAI,CAAC,eAAe;;2BAEjB,IAAI,CAAC,mBAAmB;qBAC9B,IAAA,2BAAmB,EAAC,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC;gCAChC,IAAI,CAAC,wBAAwB;wBACrC,IAAI,CAAC,gBAAgB;0BACnB,IAAA,gCAAwB,EAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC;6BAClD,IAAA,mCAA2B,EAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,CAAC;wBAChE,CAAA;QACtB,CAAC,CAAC,CAAA;IACH,CAAC;CACD;AApBD,gCAoBC","sourcesContent":["import { html } from 'lit'\nimport { handleSingleMetadataChanged, handleSingleValueChanged, singleValueProvider } from '../utils'\nimport { Field } from '../../../common'\n\nexport class TimePicker extends Field {\n\trender() {\n\t\tconst versionedValues = this.valueProvider?.()\n\t\treturn (versionedValues && Object.keys(versionedValues).length ? Object.keys(versionedValues) : [undefined]).map((id) => {\n\t\t\treturn html`<icure-text-field\n\t\t\t\t.readonly=\"${this.readonly}\"\n\t\t\t\t.displayMetadata=\"${this.displayMetadata}\"\n\t\t\t\tlabel=\"${this.label}\"\n\t\t\t\t.displayedLabels=\"${this.displayedLabels}\"\n\t\t\t\t.defaultLanguage=\"${this.defaultLanguage}\"\n\t\t\t\tschema=\"time\"\n\t\t\t\t.translationProvider=${this.translationProvider}\n\t\t\t\t.valueProvider=${singleValueProvider(this.valueProvider, id)}\n\t\t\t\t.validationErrorsProvider=${this.validationErrorsProvider}\n\t\t\t\t.metadataProvider=${this.metadataProvider}\n\t\t\t\t.handleValueChanged=${handleSingleValueChanged(this.handleValueChanged, id)}\n\t\t\t\t.handleMetadataChanged=${handleSingleMetadataChanged(this.handleMetadataChanged, id)}\n\t\t\t></icure-text-field>`\n\t\t})\n\t}\n}\n"]}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { TemplateResult } from 'lit';
|
|
2
2
|
import { Field } from '../../../common';
|
|
3
3
|
import { Code } from '../../../model';
|
|
4
|
+
import { Suggestion } from '../../../../generic';
|
|
4
5
|
export declare class DropdownField extends Field {
|
|
5
|
-
ownersProvider: (
|
|
6
|
-
id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
}[];
|
|
6
|
+
ownersProvider: (terms: string[], ids?: string[], specialties?: string[]) => Promise<Suggestion[]>;
|
|
9
7
|
optionsProvider: (language: string, searchTerm?: string) => Promise<Code[]>;
|
|
10
8
|
render(): TemplateResult[];
|
|
11
9
|
}
|
|
@@ -26,7 +26,7 @@ const utils_1 = require("../utils");
|
|
|
26
26
|
class DropdownField extends common_1.Field {
|
|
27
27
|
constructor() {
|
|
28
28
|
super(...arguments);
|
|
29
|
-
this.ownersProvider = () => [];
|
|
29
|
+
this.ownersProvider = () => __awaiter(this, void 0, void 0, function* () { return []; });
|
|
30
30
|
this.optionsProvider = () => __awaiter(this, void 0, void 0, function* () { return []; });
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
@@ -36,23 +36,25 @@ class DropdownField extends common_1.Field {
|
|
|
36
36
|
return (0, lit_1.html) `
|
|
37
37
|
<icure-dropdown-field
|
|
38
38
|
.readonly="${this.readonly}"
|
|
39
|
+
.displayMetadata="${this.displayMetadata}"
|
|
39
40
|
.translate="${this.translate}"
|
|
40
41
|
label="${this.label}"
|
|
41
42
|
.displayedLabels="${this.displayedLabels}"
|
|
42
43
|
.valueProvider=${(0, utils_1.singleValueProvider)(this.valueProvider, id)}
|
|
44
|
+
.validationErrorsProvider=${this.validationErrorsProvider}
|
|
43
45
|
.metadataProvider=${this.metadataProvider}
|
|
44
46
|
.handleValueChanged=${(0, utils_1.handleSingleValueChanged)(this.handleValueChanged, id)}
|
|
45
|
-
.
|
|
47
|
+
.handleMetadataChanged=${(0, utils_1.handleSingleMetadataChanged)(this.handleMetadataChanged, id)}
|
|
46
48
|
.optionsProvider=${this.optionsProvider}
|
|
47
49
|
.translationProvider=${this.translationProvider}
|
|
48
50
|
.ownersProvider=${this.ownersProvider}
|
|
49
|
-
defaultLanguage="${this.defaultLanguage}"
|
|
50
|
-
displayedLanguage="${this.displayedLanguage}"
|
|
51
|
+
.defaultLanguage="${this.defaultLanguage}"
|
|
51
52
|
></icure-dropdown-field>
|
|
52
53
|
`;
|
|
53
54
|
});
|
|
54
55
|
}
|
|
55
56
|
}
|
|
57
|
+
exports.DropdownField = DropdownField;
|
|
56
58
|
__decorate([
|
|
57
59
|
(0, decorators_js_1.property)(),
|
|
58
60
|
__metadata("design:type", Function)
|
|
@@ -61,5 +63,4 @@ __decorate([
|
|
|
61
63
|
(0, decorators_js_1.property)(),
|
|
62
64
|
__metadata("design:type", Function)
|
|
63
65
|
], DropdownField.prototype, "optionsProvider", void 0);
|
|
64
|
-
exports.DropdownField = DropdownField;
|
|
65
66
|
//# sourceMappingURL=dropdown-field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-field.js","sourceRoot":"","sources":["../../../../../tmp/components/icure-form/fields/dropdown/dropdown-field.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,6BAA0C;AAC1C,qDAA4C;AAC5C,4CAAuC;AACvC,oCAAqG;
|
|
1
|
+
{"version":3,"file":"dropdown-field.js","sourceRoot":"","sources":["../../../../../tmp/components/icure-form/fields/dropdown/dropdown-field.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,6BAA0C;AAC1C,qDAA4C;AAC5C,4CAAuC;AACvC,oCAAqG;AAIrG,MAAa,aAAc,SAAQ,cAAK;IAAxC;;QACa,mBAAc,GAAuF,GAAS,EAAE,gDAAC,OAAA,EAAE,CAAA,GAAA,CAAA;QACnH,oBAAe,GAA+D,GAAS,EAAE,gDAAC,OAAA,EAAE,CAAA,GAAA,CAAA;IAyBzG,CAAC;IAvBA,MAAM;;QACL,MAAM,eAAe,GAAG,MAAA,IAAI,CAAC,aAAa,oDAAI,CAAA;QAC9C,OAAO,CAAC,eAAe,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;YACvH,OAAO,IAAA,UAAI,EAAA;;kBAEI,IAAI,CAAC,QAAQ;yBACN,IAAI,CAAC,eAAe;mBAC1B,IAAI,CAAC,SAAS;cACnB,IAAI,CAAC,KAAK;yBACC,IAAI,CAAC,eAAe;sBACvB,IAAA,2BAAmB,EAAC,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC;iCAChC,IAAI,CAAC,wBAAwB;yBACrC,IAAI,CAAC,gBAAgB;2BACnB,IAAA,gCAAwB,EAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC;8BAClD,IAAA,mCAA2B,EAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,CAAC;wBACjE,IAAI,CAAC,eAAe;4BAChB,IAAI,CAAC,mBAAmB;uBAC7B,IAAI,CAAC,cAAc;yBACjB,IAAI,CAAC,eAAe;;IAEzC,CAAA;QACF,CAAC,CAAC,CAAA;IACH,CAAC;CACD;AA3BD,sCA2BC;AA1BY;IAAX,IAAA,wBAAQ,GAAE;;qDAAoH;AACnH;IAAX,IAAA,wBAAQ,GAAE;;sDAA6F","sourcesContent":["import { html, TemplateResult } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport { Field } from '../../../common'\nimport { handleSingleMetadataChanged, handleSingleValueChanged, singleValueProvider } from '../utils'\nimport { Code } from '../../../model'\nimport { Suggestion } from '../../../../generic'\n\nexport class DropdownField extends Field {\n\t@property() ownersProvider: (terms: string[], ids?: string[], specialties?: string[]) => Promise<Suggestion[]> = async () => []\n\t@property() optionsProvider: (language: string, searchTerm?: string) => Promise<Code[]> = async () => []\n\n\trender(): TemplateResult[] {\n\t\tconst versionedValues = this.valueProvider?.()\n\t\treturn (versionedValues && Object.keys(versionedValues).length ? Object.keys(versionedValues) : [undefined]).map((id) => {\n\t\t\treturn html`\n\t\t\t\t<icure-dropdown-field\n\t\t\t\t\t.readonly=\"${this.readonly}\"\n\t\t\t\t\t.displayMetadata=\"${this.displayMetadata}\"\n\t\t\t\t\t.translate=\"${this.translate}\"\n\t\t\t\t\tlabel=\"${this.label}\"\n\t\t\t\t\t.displayedLabels=\"${this.displayedLabels}\"\n\t\t\t\t\t.valueProvider=${singleValueProvider(this.valueProvider, id)}\n\t\t\t\t\t.validationErrorsProvider=${this.validationErrorsProvider}\n\t\t\t\t\t.metadataProvider=${this.metadataProvider}\n\t\t\t\t\t.handleValueChanged=${handleSingleValueChanged(this.handleValueChanged, id)}\n\t\t\t\t\t.handleMetadataChanged=${handleSingleMetadataChanged(this.handleMetadataChanged, id)}\n\t\t\t\t\t.optionsProvider=${this.optionsProvider}\n\t\t\t\t\t.translationProvider=${this.translationProvider}\n\t\t\t\t\t.ownersProvider=${this.ownersProvider}\n\t\t\t\t\t.defaultLanguage=\"${this.defaultLanguage}\"\n\t\t\t\t></icure-dropdown-field>\n\t\t\t`\n\t\t})\n\t}\n}\n"]}
|