@icure/form 2.0.10 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.yarn/cache/@babel-runtime-npm-7.28.4-31bc1b0001-934b0a0460.zip +0 -0
- package/.yarn/cache/@icure-api-npm-5.3.18-99d397b97c-0da319f009.zip +0 -0
- package/.yarn/cache/@icure-motss-app-datepicker-npm-6.0.0-rc.40-ca1da7abbb-9bbe2bed34.zip +0 -0
- package/.yarn/cache/@lit-labs-ssr-dom-shim-npm-1.4.0-e5ef5fbeba-e267c25576.zip +0 -0
- package/.yarn/cache/@lit-reactive-element-npm-2.1.1-3875228c32-b9bbc9c089.zip +0 -0
- package/.yarn/cache/@lit-task-npm-1.0.3-48f265b3e9-790b6a2603.zip +0 -0
- package/.yarn/cache/@types-linkify-it-npm-5.0.0-576a16b976-ec98e03aa8.zip +0 -0
- package/.yarn/cache/@types-markdown-it-npm-14.1.2-d0c4e12c49-ad66e0b377.zip +0 -0
- package/.yarn/cache/@types-mdurl-npm-2.0.0-2f4116c0b0-78746e96c6.zip +0 -0
- package/.yarn/cache/big-integer-npm-1.6.52-4bec75720c-6e86885787.zip +0 -0
- package/.yarn/cache/date-fns-npm-2.30.0-895c790e0f-f7be015232.zip +0 -0
- package/.yarn/cache/libphonenumber-js-npm-1.12.23-68ac3c21d2-aad6c9ddc4.zip +0 -0
- package/.yarn/cache/{lit-element-npm-4.1.1-bb20932b82-74d0f2d6fb.zip → lit-element-npm-4.2.1-b5bc114ced-5925326176.zip} +0 -0
- package/.yarn/cache/{lit-html-npm-3.2.1-1662fc597d-1bacd9f8b2.zip → lit-html-npm-3.3.1-e3722d4f4a-de07c66945.zip} +0 -0
- package/.yarn/cache/{lit-npm-3.2.1-27cb5b7782-ee22bbc53d.zip → lit-npm-3.3.1-8f683c51f1-fb88f1ff80.zip} +0 -0
- package/.yarn/cache/lodash-npm-4.17.21-6382451519-eb835a2e51.zip +0 -0
- package/.yarn/cache/moment-npm-2.30.1-1c51a5c631-859236bab1.zip +0 -0
- package/.yarn/cache/prosemirror-commands-npm-1.7.1-5b2afb6640-2316c40ea2.zip +0 -0
- package/.yarn/cache/prosemirror-history-npm-1.4.1-ad68c86bb7-90f9bf59bc.zip +0 -0
- package/.yarn/cache/prosemirror-keymap-npm-1.2.3-0e7e0c8195-0a2eed2771.zip +0 -0
- package/.yarn/cache/prosemirror-markdown-npm-1.13.2-6e2f179fd8-ce9fcb3b13.zip +0 -0
- package/.yarn/cache/prosemirror-model-npm-1.25.3-95b23ed79b-2720e49795.zip +0 -0
- package/.yarn/cache/prosemirror-schema-basic-npm-1.2.4-8f943ded01-10ed022990.zip +0 -0
- package/.yarn/cache/prosemirror-schema-list-npm-1.5.1-7b138c5fed-6c7041e5b8.zip +0 -0
- package/.yarn/cache/prosemirror-transform-npm-1.10.4-f765dfe652-7b8b3ed82c.zip +0 -0
- package/.yarn/cache/prosemirror-view-npm-1.41.2-7f800b4d2b-263f15bec9.zip +0 -0
- package/.yarn/cache/text-encoding-npm-0.7.0-ff0c4af052-b6109a843f.zip +0 -0
- package/.yarn/cache/uuid-encoder-npm-1.2.0-6a9a810c6d-dd06230f08.zip +0 -0
- package/.yarn/cache/uuid-npm-8.3.2-eca0baba53-5575a8a75c.zip +0 -0
- package/.yarn/install-state.gz +0 -0
- package/components/common/field-with-options.d.ts +2 -2
- package/components/common/field-with-options.js +0 -1
- package/components/common/field-with-options.js.map +1 -1
- package/components/common/field.d.ts +10 -3
- package/components/common/field.js +21 -0
- package/components/common/field.js.map +1 -1
- package/components/common/metadata-buttons-bar.d.ts +2 -1
- package/components/common/metadata-buttons-bar.js +60 -28
- package/components/common/metadata-buttons-bar.js.map +1 -1
- package/components/common/styles/paths.d.ts +1 -0
- package/components/common/styles/paths.js +29 -16
- package/components/common/styles/paths.js.map +1 -1
- package/components/common/utils.js +4 -4
- package/components/common/utils.js.map +1 -1
- package/components/icure-button/index.d.ts +1 -1
- package/components/icure-button/index.js +54 -14
- package/components/icure-button/index.js.map +1 -1
- package/components/icure-button-group/index.d.ts +5 -3
- package/components/icure-button-group/index.js +81 -45
- package/components/icure-button-group/index.js.map +1 -1
- package/components/icure-date-picker/index.d.ts +6 -3
- package/components/icure-date-picker/index.js +62 -22
- package/components/icure-date-picker/index.js.map +1 -1
- package/components/icure-dropdown-field/index.d.ts +5 -2
- package/components/icure-dropdown-field/index.js +58 -18
- package/components/icure-dropdown-field/index.js.map +1 -1
- package/components/icure-form/fields/button-group/checkbox.d.ts +2 -1
- package/components/icure-form/fields/button-group/checkbox.js +1 -1
- package/components/icure-form/fields/button-group/checkbox.js.map +1 -1
- package/components/icure-form/fields/button-group/radio-button.d.ts +2 -1
- package/components/icure-form/fields/button-group/radio-button.js +1 -1
- package/components/icure-form/fields/button-group/radio-button.js.map +1 -1
- package/components/icure-form/fields/date-picker/date-picker.d.ts +2 -1
- package/components/icure-form/fields/date-picker/date-picker.js +1 -1
- package/components/icure-form/fields/date-picker/date-picker.js.map +1 -1
- package/components/icure-form/fields/date-picker/date-time-picker.d.ts +2 -1
- package/components/icure-form/fields/date-picker/date-time-picker.js +1 -1
- package/components/icure-form/fields/date-picker/date-time-picker.js.map +1 -1
- package/components/icure-form/fields/date-picker/time-picker.d.ts +2 -1
- package/components/icure-form/fields/date-picker/time-picker.js +1 -1
- package/components/icure-form/fields/date-picker/time-picker.js.map +1 -1
- package/components/icure-form/fields/dropdown/dropdown-field.d.ts +1 -1
- package/components/icure-form/fields/dropdown/dropdown-field.js +1 -1
- package/components/icure-form/fields/dropdown/dropdown-field.js.map +1 -1
- package/components/icure-form/fields/items-list-field/items-list-field.d.ts +2 -1
- package/components/icure-form/fields/items-list-field/items-list-field.js +1 -1
- package/components/icure-form/fields/items-list-field/items-list-field.js.map +1 -1
- package/components/icure-form/fields/measure-field/measure-field.d.ts +2 -1
- package/components/icure-form/fields/measure-field/measure-field.js +2 -1
- package/components/icure-form/fields/measure-field/measure-field.js.map +1 -1
- package/components/icure-form/fields/number-field/number-field.d.ts +2 -1
- package/components/icure-form/fields/number-field/number-field.js +2 -1
- package/components/icure-form/fields/number-field/number-field.js.map +1 -1
- package/components/icure-form/fields/text-field/text-field.d.ts +2 -1
- package/components/icure-form/fields/text-field/text-field.js +2 -1
- package/components/icure-form/fields/text-field/text-field.js.map +1 -1
- package/components/icure-form/fields/token-field/token-field.d.ts +2 -1
- package/components/icure-form/fields/token-field/token-field.js +1 -1
- package/components/icure-form/fields/token-field/token-field.js.map +1 -1
- package/components/icure-form/index.d.ts +6 -2
- package/components/icure-form/index.js +111 -21
- package/components/icure-form/index.js.map +1 -1
- package/components/icure-form/renderer/form/form-selection-button.js +48 -12
- package/components/icure-form/renderer/form/form-selection-button.js.map +1 -1
- package/components/icure-form/renderer/form/form.js +183 -142
- package/components/icure-form/renderer/form/form.js.map +1 -1
- package/components/icure-form/renderer/index.d.ts +1 -1
- package/components/icure-form/renderer/index.js.map +1 -1
- package/components/icure-label/index.js +54 -14
- package/components/icure-label/index.js.map +1 -1
- package/components/icure-text-field/index.d.ts +5 -2
- package/components/icure-text-field/index.js +151 -49
- package/components/icure-text-field/index.js.map +1 -1
- package/components/icure-text-field/prosemirror-commands.js +2 -3
- package/components/icure-text-field/prosemirror-commands.js.map +1 -1
- package/components/icure-text-field/prosemirror-utils.js +1 -2
- package/components/icure-text-field/prosemirror-utils.js.map +1 -1
- package/components/icure-text-field/schema/common-marks.js +2 -2
- package/components/icure-text-field/schema/common-marks.js.map +1 -1
- package/components/icure-text-field/schema/date-time-schema.js +3 -4
- package/components/icure-text-field/schema/date-time-schema.js.map +1 -1
- package/components/icure-text-field/schema/decimal-schema.js +1 -2
- package/components/icure-text-field/schema/decimal-schema.js.map +1 -1
- package/components/icure-text-field/schema/index.js +1 -2
- package/components/icure-text-field/schema/index.js.map +1 -1
- package/components/icure-text-field/schema/items-list-schema.js +1 -2
- package/components/icure-text-field/schema/items-list-schema.js.map +1 -1
- package/components/icure-text-field/schema/markdown-schema.js +3 -25
- package/components/icure-text-field/schema/markdown-schema.js.map +1 -1
- package/components/icure-text-field/schema/measure-schema.js +2 -2
- package/components/icure-text-field/schema/measure-schema.js.map +1 -1
- package/components/icure-text-field/schema/token-schema.js +1 -2
- package/components/icure-text-field/schema/token-schema.js.map +1 -1
- package/components/icure-text-field/schema/utils.js +2 -3
- package/components/icure-text-field/schema/utils.js.map +1 -1
- package/components/themes/default/index.js.map +1 -1
- package/components/themes/icure-blue/index.js +58 -3
- package/components/themes/icure-blue/index.js.map +1 -1
- package/components/themes/kendo/index.js +9 -5
- package/components/themes/kendo/index.js.map +1 -1
- package/conversion/icure-convert.js +1 -2
- package/conversion/icure-convert.js.map +1 -1
- package/generic/model.d.ts +5 -4
- package/generic/model.js.map +1 -1
- package/icure/form-values-container.d.ts +21 -13
- package/icure/form-values-container.js +235 -138
- package/icure/form-values-container.js.map +1 -1
- package/icure/icure-utils.js +6 -6
- package/icure/icure-utils.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +2 -0
- package/index.js.map +1 -1
- package/package.json +16 -13
- package/utils/dates.js +6 -7
- package/utils/dates.js.map +1 -1
- package/utils/fields-values-provider.d.ts +1 -1
- package/utils/fields-values-provider.js +16 -8
- package/utils/fields-values-provider.js.map +1 -1
- package/utils/interpreter.d.ts +2 -3
- package/utils/interpreter.js +11 -2
- package/utils/interpreter.js.map +1 -1
- package/utils/no-lodash.js +3 -4
- package/utils/no-lodash.js.map +1 -1
- package/utils/primitive.d.ts +1 -1
- package/utils/primitive.js +9 -9
- package/utils/primitive.js.map +1 -1
- package/.yarn/cache/@lit-labs-ssr-dom-shim-npm-1.2.1-d14ce3e3e5-5667c44f58.zip +0 -0
- package/.yarn/cache/@lit-reactive-element-npm-2.0.4-4836436301-368d788d9e.zip +0 -0
- package/.yarn/cache/app-datepicker-npm-6.0.0-rc.33-f74d593ddf-6490949c45.zip +0 -0
- package/.yarn/cache/lit-ntml-npm-3.0.6-98ebc6c1ac-2917c778d9.zip +0 -0
- package/.yarn/cache/lodash-es-npm-4.17.21-b45832dfce-05cbffad6e.zip +0 -0
- package/.yarn/cache/nodemod-npm-3.0.6-844d650911-47ffe619b3.zip +0 -0
- package/.yarn/cache/normalize-diacritics-npm-3.0.12-93e2346015-5ddc2cfaf8.zip +0 -0
- package/.yarn/cache/parse5-npm-6.0.1-70a35a494a-7d569a176c.zip +0 -0
- package/.yarn/cache/prosemirror-commands-npm-1.5.2-27f8f3fee9-ff65063a8c.zip +0 -0
- package/.yarn/cache/prosemirror-history-npm-1.3.2-cc128c8ee6-b85fe6378a.zip +0 -0
- package/.yarn/cache/prosemirror-keymap-npm-1.2.2-efb8276b00-85fe4fc303.zip +0 -0
- package/.yarn/cache/prosemirror-markdown-npm-1.12.0-28e990f443-d7607ee1a6.zip +0 -0
- package/.yarn/cache/prosemirror-model-npm-1.19.4-4fd32211c8-12c277ed30.zip +0 -0
- package/.yarn/cache/prosemirror-model-npm-1.23.0-57eb718541-f5ab1593cb.zip +0 -0
- package/.yarn/cache/prosemirror-schema-basic-npm-1.2.2-def7bf2ec7-1f93f8678c.zip +0 -0
- package/.yarn/cache/prosemirror-schema-list-npm-1.3.0-23c1830a7e-03654e37c8.zip +0 -0
- package/.yarn/cache/prosemirror-transform-npm-1.10.2-1c2da9123e-93b0c03aff.zip +0 -0
- package/.yarn/cache/prosemirror-transform-npm-1.8.0-ea3ca0411f-6d16ca4f95.zip +0 -0
- package/.yarn/cache/prosemirror-view-npm-1.32.7-63c3e4b182-40c9038a52.zip +0 -0
- package/.yarn/cache/prosemirror-view-npm-1.36.0-830888802f-38986f55e4.zip +0 -0
- package/components/icure-text-field/schema/items-list.d.ts +0 -3
- package/components/icure-text-field/schema/items-list.js +0 -31
- package/components/icure-text-field/schema/items-list.js.map +0 -1
- package/components/themes/ehr-lite/index.d.ts +0 -1
- package/components/themes/ehr-lite/index.js +0 -321
- package/components/themes/ehr-lite/index.js.map +0 -1
- package/utils/form-value-container.d.ts +0 -3
- package/utils/form-value-container.js +0 -34
- package/utils/form-value-container.js.map +0 -1
- package/utils/icure-utils.d.ts +0 -16
- package/utils/icure-utils.js +0 -105
- package/utils/icure-utils.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-field.js","sourceRoot":"","sources":["../../../../../tmp/components/icure-form/fields/token-field/token-field.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"token-field.js","sourceRoot":"","sources":["../../../../../tmp/components/icure-form/fields/token-field/token-field.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,6BAA0C;AAC1C,4CAAuC;AACvC,qDAA4C;AAG5C,MAAa,UAAW,SAAQ,cAAK;IAArC;;QACa,cAAS,GAAqB,KAAK,CAAA;QACnC,uBAAkB,GAA+C,GAAS,EAAE,gDAAC,OAAA,EAAE,CAAA,GAAA,CAAA;QAC/E,UAAK,GAAG,CAAC,CAAA;IAoBtB,CAAC;IAnBS,UAAU;QAClB,OAAO,IAAA,UAAI,EAAA;gBACG,IAAI,CAAC,QAAQ;YACjB,IAAI,CAAC,KAAK;iBACL,IAAI,CAAC,SAAS;aAClB,IAAI,CAAC,KAAK;uBACA,IAAI,CAAC,eAAe;uBACpB,IAAI,CAAC,eAAe;;4BAEf,IAAI,CAAC,qBAAqB;yBAC7B,IAAI,CAAC,kBAAkB;uBACzB,IAAI,CAAC,gBAAgB;qBACvB,IAAI,CAAC,cAAc;yBACf,IAAI,CAAC,kBAAkB;0BACtB,IAAI,CAAC,mBAAmB;+BACnB,IAAI,CAAC,wBAAwB;oBACxC,IAAI,CAAC,aAAa;uBACf,CAAA;IACtB,CAAC;CACD;AAvBD,gCAuBC;AAtBY;IAAX,IAAA,wBAAQ,GAAE;;6CAAoC;AACnC;IAAX,IAAA,wBAAQ,GAAE;;sDAAgF;AAC/E;IAAX,IAAA,wBAAQ,GAAE;;yCAAU","sourcesContent":["import { html, TemplateResult } from 'lit'\nimport { Field } from '../../../common'\nimport { property } from 'lit/decorators.js'\nimport { Suggestion } from '../../../../generic'\n\nexport class TokenField extends Field {\n\t@property() multiline: boolean | string = false\n\t@property() suggestionProvider: (terms: string[]) => Promise<Suggestion[]> = async () => []\n\t@property() lines = 1\n\toverride renderSync(): TemplateResult {\n\t\treturn html`<icure-text-field\n\t\t\t.readonly=\"${this.readonly}\"\n\t\t\tlabel=\"${this.label}\"\n\t\t\t.multiline=\"${this.multiline}\"\n\t\t\t.lines=\"${this.lines}\"\n\t\t\t.displayedLabels=\"${this.displayedLabels}\"\n\t\t\t.defaultLanguage=\"${this.defaultLanguage}\"\n\t\t\tschema=\"tokens-list\"\n\t\t\t.handleMetadataChanged=${this.handleMetadataChanged}\n\t\t\t.handleValueChanged=${this.handleValueChanged}\n\t\t\t.metadataProvider=${this.metadataProvider}\n\t\t\t.ownersProvider=${this.ownersProvider}\n\t\t\t.suggestionProvider=${this.suggestionProvider}\n\t\t\t.translationProvider=${this.translationProvider}\n\t\t\t.validationErrorsProvider=${this.validationErrorsProvider}\n\t\t\t.valueProvider=${this.valueProvider}\n\t\t></icure-text-field>`\n\t}\n}\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
1
|
+
import { LitElement, nothing, TemplateResult } from 'lit';
|
|
2
2
|
import { FieldMetadata, FieldValue, Form } from '../model';
|
|
3
3
|
import { FormValuesContainer, Suggestion } from '../../generic';
|
|
4
|
+
import { Task } from '@lit/task';
|
|
4
5
|
/**
|
|
5
6
|
* Form element
|
|
6
7
|
*/
|
|
@@ -20,7 +21,10 @@ export declare class IcureForm extends LitElement {
|
|
|
20
21
|
ownersProvider?: (terms: string[], ids?: string[], specialties?: string[]) => Promise<Suggestion[]>;
|
|
21
22
|
optionsProvider?: (language: string, codifications: string[], terms?: string[]) => Promise<Suggestion[]>;
|
|
22
23
|
actionListener?: (event: string, payload: unknown) => void;
|
|
24
|
+
selectedTab: number;
|
|
25
|
+
latestRender?: TemplateResult;
|
|
23
26
|
constructor();
|
|
24
27
|
static get styles(): import("lit").CSSResult[];
|
|
25
|
-
|
|
28
|
+
_asyncTask: Task<readonly [Form | undefined, FormValuesContainer<FieldValue, FieldMetadata> | undefined, string | undefined, number], TemplateResult>;
|
|
29
|
+
render(): typeof nothing | TemplateResult | undefined;
|
|
26
30
|
}
|
|
@@ -8,6 +8,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
+
});
|
|
19
|
+
};
|
|
11
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
21
|
exports.IcureForm = void 0;
|
|
13
22
|
// Import the LitElement base class and html helper function
|
|
@@ -18,6 +27,25 @@ const model_1 = require("../model");
|
|
|
18
27
|
// @ts-ignore
|
|
19
28
|
const lit_2 = require("lit");
|
|
20
29
|
const baseCss = (0, lit_2.css) `@charset "UTF-8";
|
|
30
|
+
.tab-container .tab-bar li {
|
|
31
|
+
display: inline-block;
|
|
32
|
+
padding: 8px 16px;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
color: #000000;
|
|
35
|
+
font-size: 14px;
|
|
36
|
+
font-weight: 500;
|
|
37
|
+
}
|
|
38
|
+
.tab-container .tab-bar li.active {
|
|
39
|
+
background-color: #656565;
|
|
40
|
+
color: white;
|
|
41
|
+
}
|
|
42
|
+
.tab-container .tab-content .tab {
|
|
43
|
+
display: none;
|
|
44
|
+
}
|
|
45
|
+
.tab-container .tab-content .tab.active {
|
|
46
|
+
display: block;
|
|
47
|
+
}
|
|
48
|
+
|
|
21
49
|
:host {
|
|
22
50
|
--bg-color-1: #f44336;
|
|
23
51
|
}
|
|
@@ -66,15 +94,15 @@ const baseCss = (0, lit_2.css) `@charset "UTF-8";
|
|
|
66
94
|
margin-right: 0;
|
|
67
95
|
}
|
|
68
96
|
|
|
69
|
-
.ProseMirror-hideselection {
|
|
70
|
-
caret-color: transparent;
|
|
71
|
-
}
|
|
72
97
|
.ProseMirror-hideselection *::selection {
|
|
73
98
|
background: transparent;
|
|
74
99
|
}
|
|
75
100
|
.ProseMirror-hideselection *::-moz-selection {
|
|
76
101
|
background: transparent;
|
|
77
102
|
}
|
|
103
|
+
.ProseMirror-hideselection {
|
|
104
|
+
caret-color: transparent;
|
|
105
|
+
}
|
|
78
106
|
|
|
79
107
|
.ProseMirror-selectednode {
|
|
80
108
|
outline: 2px solid #8cf;
|
|
@@ -865,13 +893,13 @@ app-date-picker {
|
|
|
865
893
|
margin-bottom: 20px;
|
|
866
894
|
}
|
|
867
895
|
.icure-form h2 {
|
|
868
|
-
font-size:
|
|
896
|
+
font-size: add-two(12px, 0, 1.2);
|
|
869
897
|
font-weight: 700;
|
|
870
898
|
color: #084B83;
|
|
871
899
|
padding: 2px;
|
|
872
900
|
}
|
|
873
901
|
.icure-form h3 {
|
|
874
|
-
font-size:
|
|
902
|
+
font-size: add-two(12px, 0, 1.1);
|
|
875
903
|
font-weight: 500;
|
|
876
904
|
color: #084B83;
|
|
877
905
|
padding: 6px;
|
|
@@ -903,17 +931,16 @@ app-date-picker {
|
|
|
903
931
|
line-height: 1.4em;
|
|
904
932
|
cursor: text;
|
|
905
933
|
font-size: 12px;
|
|
906
|
-
left:
|
|
934
|
+
left: add-two(8px, 1px);
|
|
907
935
|
color: #084B83;
|
|
908
936
|
align-items: center;
|
|
909
|
-
|
|
937
|
+
text-wrap: auto;
|
|
938
|
+
min-height: 28px;
|
|
910
939
|
max-width: 85%;
|
|
911
940
|
min-width: 0;
|
|
912
941
|
}
|
|
913
942
|
.icure-text-field .icure-label.float, .icure-button-group .icure-label.float {
|
|
914
943
|
display: flex;
|
|
915
|
-
white-space: nowrap;
|
|
916
|
-
text-overflow: ellipsis;
|
|
917
944
|
overflow: hidden;
|
|
918
945
|
}
|
|
919
946
|
|
|
@@ -948,7 +975,6 @@ app-date-picker {
|
|
|
948
975
|
border-style: solid;
|
|
949
976
|
border-color: #DDE3E7;
|
|
950
977
|
border-radius: 2px;
|
|
951
|
-
box-sizing: border-box;
|
|
952
978
|
outline: 0;
|
|
953
979
|
font: inherit;
|
|
954
980
|
font-size: 14px;
|
|
@@ -961,6 +987,25 @@ app-date-picker {
|
|
|
961
987
|
background-color: #ffffff;
|
|
962
988
|
color: #000000;
|
|
963
989
|
}
|
|
990
|
+
.icure-text-field .icure-input .reset-button,
|
|
991
|
+
.icure-text-field .input-container .reset-button {
|
|
992
|
+
position: absolute;
|
|
993
|
+
right: 0;
|
|
994
|
+
border: none;
|
|
995
|
+
background: transparent;
|
|
996
|
+
top: 0;
|
|
997
|
+
opacity: 0.5;
|
|
998
|
+
cursor: pointer;
|
|
999
|
+
height: 20px;
|
|
1000
|
+
margin-left: 4px;
|
|
1001
|
+
margin-right: 4px;
|
|
1002
|
+
padding: 0;
|
|
1003
|
+
}
|
|
1004
|
+
.icure-text-field .icure-input .reset-button svg,
|
|
1005
|
+
.icure-text-field .input-container .reset-button svg {
|
|
1006
|
+
width: 15px;
|
|
1007
|
+
height: 15px;
|
|
1008
|
+
}
|
|
964
1009
|
.icure-text-field .icure-input__validationError,
|
|
965
1010
|
.icure-text-field .input-container__validationError {
|
|
966
1011
|
border-color: red;
|
|
@@ -1074,8 +1119,8 @@ input[type=radio] {
|
|
|
1074
1119
|
line-height: 1.4em;
|
|
1075
1120
|
cursor: text;
|
|
1076
1121
|
font-size: 12px;
|
|
1077
|
-
top:
|
|
1078
|
-
left:
|
|
1122
|
+
top: add-three(1.4em, 1px, 0);
|
|
1123
|
+
left: add-two(8px, 1px);
|
|
1079
1124
|
transition: transform 0.2s ease-out, color 0.2s ease-out;
|
|
1080
1125
|
color: #084B83;
|
|
1081
1126
|
display: flex;
|
|
@@ -1103,6 +1148,7 @@ input[type=radio] {
|
|
|
1103
1148
|
height: 1.4em;
|
|
1104
1149
|
}`;
|
|
1105
1150
|
const languages_1 = require("../../utils/languages");
|
|
1151
|
+
const task_1 = require("@lit/task");
|
|
1106
1152
|
/**
|
|
1107
1153
|
* Form element
|
|
1108
1154
|
*/
|
|
@@ -1117,23 +1163,63 @@ class IcureForm extends lit_1.LitElement {
|
|
|
1117
1163
|
this.languages = languages_1.languages;
|
|
1118
1164
|
this.formValuesContainer = undefined;
|
|
1119
1165
|
this.actionListener = () => undefined;
|
|
1166
|
+
this.selectedTab = 0;
|
|
1167
|
+
this.latestRender = undefined;
|
|
1168
|
+
this._asyncTask = new task_1.Task(this, {
|
|
1169
|
+
task: (_a) => __awaiter(this, [_a], void 0, function* ([form, formValuesContainer, language]) {
|
|
1170
|
+
var _b, _c, _d;
|
|
1171
|
+
if (!form) {
|
|
1172
|
+
return (0, lit_1.html) `<p>missing form</p>`;
|
|
1173
|
+
}
|
|
1174
|
+
const variant = (_b = this.renderer) === null || _b === void 0 ? void 0 : _b.split(':');
|
|
1175
|
+
const renderer = variant[0] === 'form' ? form_1.render : undefined;
|
|
1176
|
+
if (!renderer) {
|
|
1177
|
+
return (0, lit_1.html) `<p>unknown renderer</p>`;
|
|
1178
|
+
}
|
|
1179
|
+
const translationTables = (_c = this.form) === null || _c === void 0 ? void 0 : _c.translations;
|
|
1180
|
+
const sectionWrapper = variant[1] === 'tab'
|
|
1181
|
+
? (index, section) => {
|
|
1182
|
+
return (0, lit_1.html) `<div class="tab ${index === this.selectedTab ? 'active' : ''}">${index === this.selectedTab ? section() : lit_1.nothing}</div>`;
|
|
1183
|
+
}
|
|
1184
|
+
: undefined;
|
|
1185
|
+
return renderer(form, { labelPosition: this.labelPosition, language }, formValuesContainer, (_d = this.translationProvider) !== null && _d !== void 0 ? _d : (translationTables ? (0, languages_1.defaultTranslationProvider)(translationTables) : undefined), this.ownersProvider, this.optionsProvider, this.actionListener, this.languages, this.readonly, this.displayMetadata, sectionWrapper);
|
|
1186
|
+
}),
|
|
1187
|
+
args: () => [this.form, this.formValuesContainer, this.language, this.selectedTab],
|
|
1188
|
+
});
|
|
1120
1189
|
}
|
|
1121
1190
|
static get styles() {
|
|
1122
1191
|
return [baseCss];
|
|
1123
1192
|
}
|
|
1124
1193
|
render() {
|
|
1125
|
-
var _a, _b;
|
|
1126
|
-
const renderer = this.renderer === 'form' ? form_1.render : undefined;
|
|
1194
|
+
var _a, _b, _c;
|
|
1127
1195
|
console.log('Render metadata', this.displayMetadata);
|
|
1128
1196
|
if (!this.visible) {
|
|
1129
|
-
return
|
|
1197
|
+
return lit_1.nothing;
|
|
1130
1198
|
}
|
|
1131
|
-
const
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
: this.
|
|
1135
|
-
|
|
1136
|
-
|
|
1199
|
+
const variant = (_a = this.renderer) === null || _a === void 0 ? void 0 : _a.split(':');
|
|
1200
|
+
const render = this._asyncTask.render({
|
|
1201
|
+
pending: () => { var _a; return (_a = this.latestRender) !== null && _a !== void 0 ? _a : (0, lit_1.html) `<p>Loading...</p>`; },
|
|
1202
|
+
complete: (render) => (this.latestRender = render),
|
|
1203
|
+
error: () => (0, lit_1.html) `<p>Error</p>`,
|
|
1204
|
+
});
|
|
1205
|
+
return variant[1] === 'tab'
|
|
1206
|
+
? (0, lit_1.html) `<div class="tab-container">
|
|
1207
|
+
<div class="tab-bar">
|
|
1208
|
+
<ul>
|
|
1209
|
+
${((_c = (_b = this.form) === null || _b === void 0 ? void 0 : _b.sections) !== null && _c !== void 0 ? _c : []).map((s, idx) => (0, lit_1.html) `<li
|
|
1210
|
+
class="${this.selectedTab === idx ? 'active' : ''}"
|
|
1211
|
+
@click="${() => {
|
|
1212
|
+
this.selectedTab = idx;
|
|
1213
|
+
setTimeout(() => { var _a; return (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.tab-bar li.active')[0].scrollIntoView({ inline: 'center' }); }, 100);
|
|
1214
|
+
}}"
|
|
1215
|
+
>
|
|
1216
|
+
${s.section}
|
|
1217
|
+
</li>`)}
|
|
1218
|
+
</ul>
|
|
1219
|
+
</div>
|
|
1220
|
+
<div class="tab-content">${render}</div>
|
|
1221
|
+
</div>`
|
|
1222
|
+
: render;
|
|
1137
1223
|
}
|
|
1138
1224
|
}
|
|
1139
1225
|
exports.IcureForm = IcureForm;
|
|
@@ -1189,4 +1275,8 @@ __decorate([
|
|
|
1189
1275
|
(0, decorators_js_1.property)(),
|
|
1190
1276
|
__metadata("design:type", Function)
|
|
1191
1277
|
], IcureForm.prototype, "actionListener", void 0);
|
|
1278
|
+
__decorate([
|
|
1279
|
+
(0, decorators_js_1.state)(),
|
|
1280
|
+
__metadata("design:type", Object)
|
|
1281
|
+
], IcureForm.prototype, "selectedTab", void 0);
|
|
1192
1282
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/icure-form/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4DAA4D;AAC5D,6BAAsC;AACtC,qDAA4C;AAG5C,+CAA6D;AAC7D,oCAA0D;AAG1D,aAAa;AACb,6BAA0B;AAC1B,MAAM,OAAO,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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nB;YACH,CAAC,CAAC,IAAI,CAAC,IAAI;gBACX,CAAC,CAAC,IAAA,UAAI,EAAA,yBAAyB;gBAC/B,CAAC,CAAC,IAAA,UAAI,EAAA,qBAAqB,CAAA;IAC7B,CAAC;CACD;AAlDD,8BAkDC;AAjDY;IAAX,IAAA,wBAAQ,GAAE;8BAAQ,YAAI;uCAAA;AACX;IAAX,IAAA,wBAAQ,GAAE;;2CAAkB;AACjB;IAAX,IAAA,wBAAQ,GAAE;;0CAAe;AACd;IAAX,IAAA,wBAAQ,GAAE;;2CAAiB;AAChB;IAAX,IAAA,wBAAQ,GAAE;;kDAAwB;AACvB;IAAX,IAAA,wBAAQ,GAAE;;gDAAsF;AACrF;IAAX,IAAA,wBAAQ,GAAE;;2CAAkB;AACjB;IAAX,IAAA,wBAAQ,GAAE;;4CAAkD;AACjD;IAAX,IAAA,wBAAQ,GAAE;;sDAAiF;AAChF;IAAX,IAAA,wBAAQ,GAAE;;sDAAiE;AAChE;IAAX,IAAA,wBAAQ,GAAE;;iDAAoG;AACnG;IAAX,IAAA,wBAAQ,GAAE;;kDAAyG;AACxG;IAAX,IAAA,wBAAQ,GAAE;;iDAA6E","sourcesContent":["// Import the LitElement base class and html helper function\nimport { html, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport { Renderer } from './renderer'\nimport { render as renderAsForm } from './renderer/form/form'\nimport { FieldMetadata, FieldValue, Form } from '../model'\nimport { FormValuesContainer, Suggestion } from '../../generic'\n\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 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 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.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.ProseMirror p {\n margin-bottom: 1em;\n}\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n.ProseMirror li {\n position: relative;\n}\n.ProseMirror ul,\n.ProseMirror ol {\n padding-left: 30px;\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-hideselection {\n caret-color: transparent;\n}\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n.ProseMirror-hideselection *::-moz-selection {\n background: 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}\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.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.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-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.ProseMirror-prompt h5 {\n margin: 0;\n font-weight: normal;\n font-size: 100%;\n color: #444;\n}\n.ProseMirror-prompt input[type=text],\n.ProseMirror-prompt textarea {\n background: #eee;\n border: none;\n outline: none;\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.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.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: flex;\n flex-direction: row;\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 min-height: 20px;\n}\n#editor.tokens-list .ProseMirror li span, #editor.styled-tokens-list .ProseMirror li span {\n display: inline-block;\n min-height: 18px;\n}\n#editor.tokens-list .ProseMirror li span br, #editor.styled-tokens-list .ProseMirror li span br {\n display: none;\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.icure-input-metadata-container {\n display: flex;\n}\n.icure-input-metadata-container .icure-metadata-container {\n display: flex;\n flex-grow: 1;\n padding: 0 4px;\n border: 1px solid #DDE3E7;\n border-left: none;\n border-radius: 0 6px 6px 0;\n outline: 0;\n box-sizing: border-box;\n}\n.icure-input-metadata-container .icure-metadata-container__validationError {\n border-color: red;\n}\n\n.extra {\n min-width: 20px;\n width: auto;\n height: 20px;\n transition: all 0.24s cubic-bezier(0.42, 0.01, 1, 0.62);\n}\n.extra:hover .info {\n display: none;\n}\n.extra:hover .buttons-container .menu-container .btn {\n animation: slideIn 0.24s ease-in forwards;\n pointer-events: none;\n display: unset !important;\n}\n.extra.forced .info, .extra.forced .extra .info.hidden {\n opacity: 0 !important;\n z-index: 0 !important;\n display: none;\n}\n.extra.forced .buttons-container .btn {\n opacity: 1 !important;\n display: unset !important;\n}\n.extra.forced:hover .buttons-container .menu-container .btn {\n animation: none;\n pointer-events: all;\n}\n.extra--metadataButtonsBar {\n height: 100%;\n display: flex;\n align-items: center;\n padding: 0 4px;\n}\n.extra .info {\n color: #809ab4;\n font-size: 15px;\n width: 100%;\n height: auto;\n overflow: hidden;\n pointer-events: none;\n text-align: center;\n}\n.extra .info span {\n font-weight: 700;\n}\n.extra .info.hidden {\n display: none;\n}\n.extra .buttons-container {\n display: flex;\n height: 20px;\n width: auto;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-end;\n transition: all 0.24s cubic-bezier(0.14, 0.69, 0.87, 0.54);\n z-index: 1000;\n}\n.extra .buttons-container .btn {\n border: none;\n background: transparent;\n position: relative;\n top: 0;\n display: none;\n opacity: 0;\n cursor: pointer;\n height: 20px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0;\n}\n.extra .buttons-container .btn svg {\n width: 15px;\n height: 15px;\n}\n.extra .buttons-container .btn svg path {\n fill: #809ab4;\n}\n.extra .buttons-container .btn.forced {\n opacity: 1 !important;\n display: unset !important;\n}\n.extra .buttons-container .btn.forced svg path {\n fill: crimson !important;\n}\n.extra .buttons-container .btn:focus, .extra .buttons-container .btn:focus-within {\n border: none;\n outline: none;\n}\n.extra .buttons-container .btn:hover svg path {\n fill: #274768;\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.extra .buttons-container .menu-container .btn:hover::after {\n content: attr(data-content);\n position: absolute;\n top: -21px;\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.extra .buttons-container .menu-container:last-child .btn {\n margin-right: 0;\n}\n\n@keyframes slideIn {\n 0% {\n top: 0;\n opacity: 0;\n pointer-events: none;\n }\n 100% {\n top: 0;\n opacity: 1;\n pointer-events: all;\n }\n}\n.menu-container {\n display: flex;\n align-items: center;\n height: fit-content;\n}\n.menu-container .item {\n height: 30px;\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.menu-container .item.existing {\n background-color: #BFE8EA;\n}\n.menu-container .item.selected {\n color: white;\n background-color: #084B83;\n}\n.menu-container .item:hover {\n background: #DCE7F2;\n color: #274768;\n font-weight: 500;\n border-radius: 4px;\n}\n\n.value-date-menu {\n width: unset !important;\n}\n\n.menu {\n display: flex;\n flex-direction: column;\n gap: 2px;\n position: absolute;\n top: 32px;\n right: -12px;\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.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.menu .input-container:hover {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2);\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.menu .input-container input {\n background: transparent;\n border: none;\n flex-grow: 1;\n height: 100%;\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: flex;\n}\n\nspan {\n position: relative;\n z-index: 1;\n}\nspan.date {\n margin-right: 1px;\n}\nspan.time {\n margin-left: 1px;\n}\nspan.measure {\n display: inline-block;\n margin-right: 1px;\n}\nspan.unit {\n margin-left: 1px;\n display: inline-block;\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}\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.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.suggestion-palette ul {\n white-space: nowrap;\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n.suggestion-palette ul li:not(:first-child) svg.tab-icn,\n.suggestion-palette ul li:not(.focused) svg.return-icn, .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.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.focused {\n background-color: rgb(237, 242, 247);\n}\n.suggestion-palette ul li.focused svg.return-icn {\n animation: growIn 0.24s ease-in forwards;\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@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: calc(100% + 6px);\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 padding: 2px;\n border-radius: 6px;\n}\n.options--subformView {\n top: 46px;\n min-width: unset;\n left: unset;\n right: 0;\n}\n\n.date-picker {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: calc(100% + 6px);\n left: 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}\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 cursor: pointer;\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.group {\n align-items: end;\n display: grid;\n}\n\n.subform {\n display: grid;\n position: relative;\n padding: 8px;\n border-radius: 6px;\n background-color: #e7f0fd;\n gap: 12px;\n}\n.subform__heading {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: auto;\n}\n.subform__heading__title {\n padding: 0;\n margin: 0;\n}\n.subform__addBtn, .subform__removeBtn {\n cursor: pointer;\n background-color: #084B83;\n color: white;\n height: 32px;\n padding: 0 16px;\n border-radius: 6px;\n border: none;\n outline: none;\n}\n.subform__addBtn:hover, .subform__removeBtn:hover {\n background-color: #3D87C5;\n}\n.subform__removeBtn {\n justify-self: end;\n border: 1px solid #DDE3E7;\n background-color: #FCFCFD;\n color: #084B83;\n}\n.subform__removeBtn:hover {\n background-color: #F2F2F2;\n}\n.subform__child {\n display: grid;\n grid-template-rows: auto;\n gap: 8px;\n padding: 8px;\n border-radius: 6px;\n background: white;\n border: 1px solid #3D87C5;\n}\n.subform__child__title {\n padding: 12px !important;\n border-radius: 6px;\n margin: 0;\n background-color: #BFE8EA;\n}\n.subform__child .subform {\n background: unset;\n margin: 0;\n padding: 0;\n}\n\n.icure-form {\n background-color: rgba(0, 0, 0, 0);\n display: grid;\n gap: 16px 6px;\n grid-template-columns: repeat(24, 1fr);\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\n.icure-form-field {\n display: grid;\n align-items: flex-start;\n}\n\n.error {\n color: red;\n font-size: 12px;\n margin-top: 4px;\n}\n\n.icure-text-field .icure-label-extra, .icure-button-group .icure-label-extra {\n display: flex;\n width: 100%;\n gap: 12px;\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: flex;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.icure-text-field {\n position: relative;\n width: 100%;\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 padding: 8px;\n width: 100%;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n border-color: #DDE3E7;\n border-radius: 2px;\n box-sizing: border-box;\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 color: #000000;\n}\n.icure-text-field .icure-input__validationError,\n.icure-text-field .input-container__validationError {\n border-color: red;\n}\n.icure-text-field .icure-input__withMetadata,\n.icure-text-field .input-container__withMetadata {\n border-radius: 6px 0 0 6px;\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 .btn svg path,\n.icure-text-field .input-container .extra .btn svg path {\n fill: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .btn svg path:hover,\n.icure-text-field .input-container .extra .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 {\n display: flex;\n height: 32px;\n padding: 0 16px;\n background-color: #084B83;\n color: white;\n border-radius: 6px;\n cursor: pointer;\n font-size: 14px;\n font-weight: normal;\n}\n.icure-button:hover {\n background-color: #3D87C5;\n}\n\n.icure-button-group {\n display: flex;\n flex-direction: column;\n gap: 4px;\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 + 1px);\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}` \nimport { defaultTranslationProvider, languages } from '../../utils/languages'\n\n/**\n * Form element\n */\nexport class IcureForm extends LitElement {\n\t@property() form?: Form\n\t@property() renderer = 'form'\n\t@property() visible = true\n\t@property() readonly = false\n\t@property() displayMetadata = false\n\t@property() labelPosition?: 'top' | 'left' | 'right' | 'bottom' | 'float' | undefined = undefined\n\t@property() language?: string\n\t@property() languages?: { [iso: string]: string } = languages\n\t@property() formValuesContainer?: FormValuesContainer<FieldValue, FieldMetadata> = undefined\n\t@property() translationProvider?: (language: string, text: string) => string\n\t@property() ownersProvider?: (terms: string[], ids?: string[], specialties?: string[]) => Promise<Suggestion[]>\n\t@property() optionsProvider?: (language: string, codifications: string[], terms?: string[]) => Promise<Suggestion[]>\n\t@property() actionListener?: (event: string, payload: unknown) => void = () => undefined\n\n\tconstructor() {\n\t\tsuper()\n\t}\n\n\tstatic get styles() {\n\t\treturn [baseCss]\n\t}\n\n\trender() {\n\t\tconst renderer: Renderer | undefined = this.renderer === 'form' ? renderAsForm : undefined\n\n\t\tconsole.log('Render metadata', this.displayMetadata)\n\n\t\tif (!this.visible) {\n\t\t\treturn html``\n\t\t}\n\t\tconst translationTables = this.form?.translations\n\n\t\treturn renderer && this.form\n\t\t\t? renderer(\n\t\t\t\t\tthis.form,\n\t\t\t\t\t{ labelPosition: this.labelPosition, language: this.language },\n\t\t\t\t\tthis.formValuesContainer,\n\t\t\t\t\tthis.translationProvider ?? (translationTables ? defaultTranslationProvider(translationTables) : undefined),\n\t\t\t\t\tthis.ownersProvider,\n\t\t\t\t\tthis.optionsProvider,\n\t\t\t\t\tthis.actionListener,\n\t\t\t\t\tthis.languages,\n\t\t\t\t\tthis.readonly,\n\t\t\t\t\tthis.displayMetadata,\n\t\t\t )\n\t\t\t: this.form\n\t\t\t? html`<p>unknown renderer</p>`\n\t\t\t: html`<p>missing form</p>`\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/icure-form/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,4DAA4D;AAC5D,6BAA+D;AAC/D,qDAAmD;AAGnD,+CAA6D;AAC7D,oCAA0D;AAG1D,aAAa;AACb,6BAA0B;AAC1B,MAAM,OAAO,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,GAAE;;gDAAsF;AACrF;IAAX,IAAA,wBAAQ,GAAE;;2CAAkB;AACjB;IAAX,IAAA,wBAAQ,GAAE;;4CAAkD;AACjD;IAAX,IAAA,wBAAQ,GAAE;;sDAAiF;AAChF;IAAX,IAAA,wBAAQ,GAAE;;sDAAiE;AAChE;IAAX,IAAA,wBAAQ,GAAE;;iDAAoG;AACnG;IAAX,IAAA,wBAAQ,GAAE;;kDAAyG;AACxG;IAAX,IAAA,wBAAQ,GAAE;;iDAA6E;AAE/E;IAAR,IAAA,qBAAK,GAAE;;8CAAgB","sourcesContent":["// Import the LitElement base class and html helper function\nimport { html, LitElement, nothing, TemplateResult } from 'lit'\nimport { property, state } from 'lit/decorators.js'\n\nimport { Renderer } from './renderer'\nimport { render as renderAsForm } from './renderer/form/form'\nimport { FieldMetadata, FieldValue, Form } from '../model'\nimport { FormValuesContainer, Suggestion } from '../../generic'\n\n// @ts-ignore\nimport { css } from 'lit';\nconst baseCss = css`@charset \"UTF-8\";\n.tab-container .tab-bar li {\n display: inline-block;\n padding: 8px 16px;\n cursor: pointer;\n color: #000000;\n font-size: 14px;\n font-weight: 500;\n}\n.tab-container .tab-bar li.active {\n background-color: #656565;\n color: white;\n}\n.tab-container .tab-content .tab {\n display: none;\n}\n.tab-container .tab-content .tab.active {\n display: block;\n}\n\n:host {\n --bg-color-1: #f44336;\n}\n\n.ProseMirror {\n position: relative;\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 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.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.ProseMirror p {\n margin-bottom: 1em;\n}\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n.ProseMirror li {\n position: relative;\n}\n.ProseMirror ul,\n.ProseMirror ol {\n padding-left: 30px;\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-hideselection *::selection {\n background: transparent;\n}\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\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}\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.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.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-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.ProseMirror-prompt h5 {\n margin: 0;\n font-weight: normal;\n font-size: 100%;\n color: #444;\n}\n.ProseMirror-prompt input[type=text],\n.ProseMirror-prompt textarea {\n background: #eee;\n border: none;\n outline: none;\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.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.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: flex;\n flex-direction: row;\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 min-height: 20px;\n}\n#editor.tokens-list .ProseMirror li span, #editor.styled-tokens-list .ProseMirror li span {\n display: inline-block;\n min-height: 18px;\n}\n#editor.tokens-list .ProseMirror li span br, #editor.styled-tokens-list .ProseMirror li span br {\n display: none;\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.icure-input-metadata-container {\n display: flex;\n}\n.icure-input-metadata-container .icure-metadata-container {\n display: flex;\n flex-grow: 1;\n padding: 0 4px;\n border: 1px solid #DDE3E7;\n border-left: none;\n border-radius: 0 6px 6px 0;\n outline: 0;\n box-sizing: border-box;\n}\n.icure-input-metadata-container .icure-metadata-container__validationError {\n border-color: red;\n}\n\n.extra {\n min-width: 20px;\n width: auto;\n height: 20px;\n transition: all 0.24s cubic-bezier(0.42, 0.01, 1, 0.62);\n}\n.extra:hover .info {\n display: none;\n}\n.extra:hover .buttons-container .menu-container .btn {\n animation: slideIn 0.24s ease-in forwards;\n pointer-events: none;\n display: unset !important;\n}\n.extra.forced .info, .extra.forced .extra .info.hidden {\n opacity: 0 !important;\n z-index: 0 !important;\n display: none;\n}\n.extra.forced .buttons-container .btn {\n opacity: 1 !important;\n display: unset !important;\n}\n.extra.forced:hover .buttons-container .menu-container .btn {\n animation: none;\n pointer-events: all;\n}\n.extra--metadataButtonsBar {\n height: 100%;\n display: flex;\n align-items: center;\n padding: 0 4px;\n}\n.extra .info {\n color: #809ab4;\n font-size: 15px;\n width: 100%;\n height: auto;\n overflow: hidden;\n pointer-events: none;\n text-align: center;\n}\n.extra .info span {\n font-weight: 700;\n}\n.extra .info.hidden {\n display: none;\n}\n.extra .buttons-container {\n display: flex;\n height: 20px;\n width: auto;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-end;\n transition: all 0.24s cubic-bezier(0.14, 0.69, 0.87, 0.54);\n z-index: 1000;\n}\n.extra .buttons-container .btn {\n border: none;\n background: transparent;\n position: relative;\n top: 0;\n display: none;\n opacity: 0;\n cursor: pointer;\n height: 20px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0;\n}\n.extra .buttons-container .btn svg {\n width: 15px;\n height: 15px;\n}\n.extra .buttons-container .btn svg path {\n fill: #809ab4;\n}\n.extra .buttons-container .btn.forced {\n opacity: 1 !important;\n display: unset !important;\n}\n.extra .buttons-container .btn.forced svg path {\n fill: crimson !important;\n}\n.extra .buttons-container .btn:focus, .extra .buttons-container .btn:focus-within {\n border: none;\n outline: none;\n}\n.extra .buttons-container .btn:hover svg path {\n fill: #274768;\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.extra .buttons-container .menu-container .btn:hover::after {\n content: attr(data-content);\n position: absolute;\n top: -21px;\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.extra .buttons-container .menu-container:last-child .btn {\n margin-right: 0;\n}\n\n@keyframes slideIn {\n 0% {\n top: 0;\n opacity: 0;\n pointer-events: none;\n }\n 100% {\n top: 0;\n opacity: 1;\n pointer-events: all;\n }\n}\n.menu-container {\n display: flex;\n align-items: center;\n height: fit-content;\n}\n.menu-container .item {\n height: 30px;\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.menu-container .item.existing {\n background-color: #BFE8EA;\n}\n.menu-container .item.selected {\n color: white;\n background-color: #084B83;\n}\n.menu-container .item:hover {\n background: #DCE7F2;\n color: #274768;\n font-weight: 500;\n border-radius: 4px;\n}\n\n.value-date-menu {\n width: unset !important;\n}\n\n.menu {\n display: flex;\n flex-direction: column;\n gap: 2px;\n position: absolute;\n top: 32px;\n right: -12px;\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.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.menu .input-container:hover {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2);\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.menu .input-container input {\n background: transparent;\n border: none;\n flex-grow: 1;\n height: 100%;\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: flex;\n}\n\nspan {\n position: relative;\n z-index: 1;\n}\nspan.date {\n margin-right: 1px;\n}\nspan.time {\n margin-left: 1px;\n}\nspan.measure {\n display: inline-block;\n margin-right: 1px;\n}\nspan.unit {\n margin-left: 1px;\n display: inline-block;\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}\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.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.suggestion-palette ul {\n white-space: nowrap;\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n.suggestion-palette ul li:not(:first-child) svg.tab-icn,\n.suggestion-palette ul li:not(.focused) svg.return-icn, .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.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.focused {\n background-color: rgb(237, 242, 247);\n}\n.suggestion-palette ul li.focused svg.return-icn {\n animation: growIn 0.24s ease-in forwards;\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@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: calc(100% + 6px);\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 padding: 2px;\n border-radius: 6px;\n}\n.options--subformView {\n top: 46px;\n min-width: unset;\n left: unset;\n right: 0;\n}\n\n.date-picker {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: calc(100% + 6px);\n left: 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}\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 cursor: pointer;\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.group {\n align-items: end;\n display: grid;\n}\n\n.subform {\n display: grid;\n position: relative;\n padding: 8px;\n border-radius: 6px;\n background-color: #e7f0fd;\n gap: 12px;\n}\n.subform__heading {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: auto;\n}\n.subform__heading__title {\n padding: 0;\n margin: 0;\n}\n.subform__addBtn, .subform__removeBtn {\n cursor: pointer;\n background-color: #084B83;\n color: white;\n height: 32px;\n padding: 0 16px;\n border-radius: 6px;\n border: none;\n outline: none;\n}\n.subform__addBtn:hover, .subform__removeBtn:hover {\n background-color: #3D87C5;\n}\n.subform__removeBtn {\n justify-self: end;\n border: 1px solid #DDE3E7;\n background-color: #FCFCFD;\n color: #084B83;\n}\n.subform__removeBtn:hover {\n background-color: #F2F2F2;\n}\n.subform__child {\n display: grid;\n grid-template-rows: auto;\n gap: 8px;\n padding: 8px;\n border-radius: 6px;\n background: white;\n border: 1px solid #3D87C5;\n}\n.subform__child__title {\n padding: 12px !important;\n border-radius: 6px;\n margin: 0;\n background-color: #BFE8EA;\n}\n.subform__child .subform {\n background: unset;\n margin: 0;\n padding: 0;\n}\n\n.icure-form {\n background-color: rgba(0, 0, 0, 0);\n display: grid;\n gap: 16px 6px;\n grid-template-columns: repeat(24, 1fr);\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: add-two(12px, 0, 1.2);\n font-weight: 700;\n color: #084B83;\n padding: 2px;\n}\n.icure-form h3 {\n font-size: add-two(12px, 0, 1.1);\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\n.icure-form-field {\n display: grid;\n align-items: flex-start;\n}\n\n.error {\n color: red;\n font-size: 12px;\n margin-top: 4px;\n}\n\n.icure-text-field .icure-label-extra, .icure-button-group .icure-label-extra {\n display: flex;\n width: 100%;\n gap: 12px;\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: add-two(8px, 1px);\n color: #084B83;\n align-items: center;\n text-wrap: auto;\n min-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: flex;\n overflow: hidden;\n}\n\n.icure-text-field {\n position: relative;\n width: 100%;\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 padding: 8px;\n width: 100%;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n border-color: #DDE3E7;\n border-radius: 2px;\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 color: #000000;\n}\n.icure-text-field .icure-input .reset-button,\n.icure-text-field .input-container .reset-button {\n position: absolute;\n right: 0;\n border: none;\n background: transparent;\n top: 0;\n opacity: 0.5;\n cursor: pointer;\n height: 20px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0;\n}\n.icure-text-field .icure-input .reset-button svg,\n.icure-text-field .input-container .reset-button svg {\n width: 15px;\n height: 15px;\n}\n.icure-text-field .icure-input__validationError,\n.icure-text-field .input-container__validationError {\n border-color: red;\n}\n.icure-text-field .icure-input__withMetadata,\n.icure-text-field .input-container__withMetadata {\n border-radius: 6px 0 0 6px;\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 .btn svg path,\n.icure-text-field .input-container .extra .btn svg path {\n fill: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .btn svg path:hover,\n.icure-text-field .input-container .extra .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 {\n display: flex;\n height: 32px;\n padding: 0 16px;\n background-color: #084B83;\n color: white;\n border-radius: 6px;\n cursor: pointer;\n font-size: 14px;\n font-weight: normal;\n}\n.icure-button:hover {\n background-color: #3D87C5;\n}\n\n.icure-button-group {\n display: flex;\n flex-direction: column;\n gap: 4px;\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: add-three(1.4em, 1px, 0);\n left: add-two(8px, 1px);\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}` \nimport { defaultTranslationProvider, languages } from '../../utils/languages'\nimport { Task } from '@lit/task'\n\n/**\n * Form element\n */\nexport class IcureForm extends LitElement {\n\t@property() form?: Form\n\t@property() renderer = 'form'\n\t@property() visible = true\n\t@property() readonly = false\n\t@property() displayMetadata = false\n\t@property() labelPosition?: 'top' | 'left' | 'right' | 'bottom' | 'float' | undefined = undefined\n\t@property() language?: string\n\t@property() languages?: { [iso: string]: string } = languages\n\t@property() formValuesContainer?: FormValuesContainer<FieldValue, FieldMetadata> = undefined\n\t@property() translationProvider?: (language: string, text: string) => string\n\t@property() ownersProvider?: (terms: string[], ids?: string[], specialties?: string[]) => Promise<Suggestion[]>\n\t@property() optionsProvider?: (language: string, codifications: string[], terms?: string[]) => Promise<Suggestion[]>\n\t@property() actionListener?: (event: string, payload: unknown) => void = () => undefined\n\n\t@state() selectedTab = 0\n\n\tlatestRender?: TemplateResult = undefined\n\n\tconstructor() {\n\t\tsuper()\n\t}\n\n\tstatic get styles() {\n\t\treturn [baseCss]\n\t}\n\n\t_asyncTask = new Task(this, {\n\t\ttask: async ([form, formValuesContainer, language]) => {\n\t\t\tif (!form) {\n\t\t\t\treturn html`<p>missing form</p>`\n\t\t\t}\n\n\t\t\tconst variant = this.renderer?.split(':')\n\t\t\tconst renderer: Renderer | undefined = variant[0] === 'form' ? renderAsForm : undefined\n\n\t\t\tif (!renderer) {\n\t\t\t\treturn html`<p>unknown renderer</p>`\n\t\t\t}\n\t\t\tconst translationTables = this.form?.translations\n\n\t\t\tconst sectionWrapper =\n\t\t\t\tvariant[1] === 'tab'\n\t\t\t\t\t? (index: number, section: () => TemplateResult) => {\n\t\t\t\t\t\t\treturn html`<div class=\"tab ${index === this.selectedTab ? 'active' : ''}\">${index === this.selectedTab ? section() : nothing}</div>`\n\t\t\t\t\t }\n\t\t\t\t\t: undefined\n\n\t\t\treturn renderer(\n\t\t\t\tform,\n\t\t\t\t{ labelPosition: this.labelPosition, language },\n\t\t\t\tformValuesContainer,\n\t\t\t\tthis.translationProvider ?? (translationTables ? defaultTranslationProvider(translationTables) : undefined),\n\t\t\t\tthis.ownersProvider,\n\t\t\t\tthis.optionsProvider,\n\t\t\t\tthis.actionListener,\n\t\t\t\tthis.languages,\n\t\t\t\tthis.readonly,\n\t\t\t\tthis.displayMetadata,\n\t\t\t\tsectionWrapper,\n\t\t\t)\n\t\t},\n\t\targs: () => [this.form, this.formValuesContainer, this.language, this.selectedTab],\n\t})\n\n\trender() {\n\t\tconsole.log('Render metadata', this.displayMetadata)\n\n\t\tif (!this.visible) {\n\t\t\treturn nothing\n\t\t}\n\n\t\tconst variant = this.renderer?.split(':')\n\n\t\tconst render = this._asyncTask.render({\n\t\t\tpending: () => this.latestRender ?? html`<p>Loading...</p>`,\n\t\t\tcomplete: (render: TemplateResult) => (this.latestRender = render),\n\t\t\terror: () => html`<p>Error</p>`,\n\t\t})\n\n\t\treturn variant[1] === 'tab'\n\t\t\t? html`<div class=\"tab-container\">\n\t\t\t\t\t<div class=\"tab-bar\">\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t${(this.form?.sections ?? []).map(\n\t\t\t\t\t\t\t\t(s, idx) =>\n\t\t\t\t\t\t\t\t\thtml`<li\n\t\t\t\t\t\t\t\t\t\tclass=\"${this.selectedTab === idx ? 'active' : ''}\"\n\t\t\t\t\t\t\t\t\t\t@click=\"${() => {\n\t\t\t\t\t\t\t\t\t\t\tthis.selectedTab = idx\n\t\t\t\t\t\t\t\t\t\t\tsetTimeout(() => this.shadowRoot?.querySelectorAll('.tab-bar li.active')[0].scrollIntoView({ inline: 'center' }), 100)\n\t\t\t\t\t\t\t\t\t\t}}\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t${s.section}\n\t\t\t\t\t\t\t\t\t</li>`,\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"tab-content\">${render}</div>\n\t\t\t </div>`\n\t\t\t: render\n\t}\n}\n"]}
|
|
@@ -15,6 +15,25 @@ const decorators_js_1 = require("lit/decorators.js");
|
|
|
15
15
|
// @ts-ignore
|
|
16
16
|
const lit_2 = require("lit");
|
|
17
17
|
const baseCss = (0, lit_2.css) `@charset "UTF-8";
|
|
18
|
+
.tab-container .tab-bar li {
|
|
19
|
+
display: inline-block;
|
|
20
|
+
padding: 8px 16px;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
color: #000000;
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
font-weight: 500;
|
|
25
|
+
}
|
|
26
|
+
.tab-container .tab-bar li.active {
|
|
27
|
+
background-color: #656565;
|
|
28
|
+
color: white;
|
|
29
|
+
}
|
|
30
|
+
.tab-container .tab-content .tab {
|
|
31
|
+
display: none;
|
|
32
|
+
}
|
|
33
|
+
.tab-container .tab-content .tab.active {
|
|
34
|
+
display: block;
|
|
35
|
+
}
|
|
36
|
+
|
|
18
37
|
:host {
|
|
19
38
|
--bg-color-1: #f44336;
|
|
20
39
|
}
|
|
@@ -63,15 +82,15 @@ const baseCss = (0, lit_2.css) `@charset "UTF-8";
|
|
|
63
82
|
margin-right: 0;
|
|
64
83
|
}
|
|
65
84
|
|
|
66
|
-
.ProseMirror-hideselection {
|
|
67
|
-
caret-color: transparent;
|
|
68
|
-
}
|
|
69
85
|
.ProseMirror-hideselection *::selection {
|
|
70
86
|
background: transparent;
|
|
71
87
|
}
|
|
72
88
|
.ProseMirror-hideselection *::-moz-selection {
|
|
73
89
|
background: transparent;
|
|
74
90
|
}
|
|
91
|
+
.ProseMirror-hideselection {
|
|
92
|
+
caret-color: transparent;
|
|
93
|
+
}
|
|
75
94
|
|
|
76
95
|
.ProseMirror-selectednode {
|
|
77
96
|
outline: 2px solid #8cf;
|
|
@@ -862,13 +881,13 @@ app-date-picker {
|
|
|
862
881
|
margin-bottom: 20px;
|
|
863
882
|
}
|
|
864
883
|
.icure-form h2 {
|
|
865
|
-
font-size:
|
|
884
|
+
font-size: add-two(12px, 0, 1.2);
|
|
866
885
|
font-weight: 700;
|
|
867
886
|
color: #084B83;
|
|
868
887
|
padding: 2px;
|
|
869
888
|
}
|
|
870
889
|
.icure-form h3 {
|
|
871
|
-
font-size:
|
|
890
|
+
font-size: add-two(12px, 0, 1.1);
|
|
872
891
|
font-weight: 500;
|
|
873
892
|
color: #084B83;
|
|
874
893
|
padding: 6px;
|
|
@@ -900,17 +919,16 @@ app-date-picker {
|
|
|
900
919
|
line-height: 1.4em;
|
|
901
920
|
cursor: text;
|
|
902
921
|
font-size: 12px;
|
|
903
|
-
left:
|
|
922
|
+
left: add-two(8px, 1px);
|
|
904
923
|
color: #084B83;
|
|
905
924
|
align-items: center;
|
|
906
|
-
|
|
925
|
+
text-wrap: auto;
|
|
926
|
+
min-height: 28px;
|
|
907
927
|
max-width: 85%;
|
|
908
928
|
min-width: 0;
|
|
909
929
|
}
|
|
910
930
|
.icure-text-field .icure-label.float, .icure-button-group .icure-label.float {
|
|
911
931
|
display: flex;
|
|
912
|
-
white-space: nowrap;
|
|
913
|
-
text-overflow: ellipsis;
|
|
914
932
|
overflow: hidden;
|
|
915
933
|
}
|
|
916
934
|
|
|
@@ -945,7 +963,6 @@ app-date-picker {
|
|
|
945
963
|
border-style: solid;
|
|
946
964
|
border-color: #DDE3E7;
|
|
947
965
|
border-radius: 2px;
|
|
948
|
-
box-sizing: border-box;
|
|
949
966
|
outline: 0;
|
|
950
967
|
font: inherit;
|
|
951
968
|
font-size: 14px;
|
|
@@ -958,6 +975,25 @@ app-date-picker {
|
|
|
958
975
|
background-color: #ffffff;
|
|
959
976
|
color: #000000;
|
|
960
977
|
}
|
|
978
|
+
.icure-text-field .icure-input .reset-button,
|
|
979
|
+
.icure-text-field .input-container .reset-button {
|
|
980
|
+
position: absolute;
|
|
981
|
+
right: 0;
|
|
982
|
+
border: none;
|
|
983
|
+
background: transparent;
|
|
984
|
+
top: 0;
|
|
985
|
+
opacity: 0.5;
|
|
986
|
+
cursor: pointer;
|
|
987
|
+
height: 20px;
|
|
988
|
+
margin-left: 4px;
|
|
989
|
+
margin-right: 4px;
|
|
990
|
+
padding: 0;
|
|
991
|
+
}
|
|
992
|
+
.icure-text-field .icure-input .reset-button svg,
|
|
993
|
+
.icure-text-field .input-container .reset-button svg {
|
|
994
|
+
width: 15px;
|
|
995
|
+
height: 15px;
|
|
996
|
+
}
|
|
961
997
|
.icure-text-field .icure-input__validationError,
|
|
962
998
|
.icure-text-field .input-container__validationError {
|
|
963
999
|
border-color: red;
|
|
@@ -1071,8 +1107,8 @@ input[type=radio] {
|
|
|
1071
1107
|
line-height: 1.4em;
|
|
1072
1108
|
cursor: text;
|
|
1073
1109
|
font-size: 12px;
|
|
1074
|
-
top:
|
|
1075
|
-
left:
|
|
1110
|
+
top: add-three(1.4em, 1px, 0);
|
|
1111
|
+
left: add-two(8px, 1px);
|
|
1076
1112
|
transition: transform 0.2s ease-out, color 0.2s ease-out;
|
|
1077
1113
|
color: #084B83;
|
|
1078
1114
|
display: flex;
|