@icure/form 3.0.11 → 3.0.12

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.
Binary file
@@ -1114,6 +1114,7 @@ input[type=radio] {
1114
1114
  font-weight: 500;
1115
1115
  height: 1.4em;
1116
1116
  }`;
1117
+ import { icureFormLogging } from '../../index';
1117
1118
  export class IcureButton extends LitElement {
1118
1119
  constructor() {
1119
1120
  super(...arguments);
@@ -1130,6 +1131,9 @@ export class IcureButton extends LitElement {
1130
1131
  if (!this.visible) {
1131
1132
  return html ``;
1132
1133
  }
1134
+ if (icureFormLogging) {
1135
+ console.log(`Rendering button ${this.label}`);
1136
+ }
1133
1137
  return html `<div class="icure-button" style="button" @click="${() => this.actionListener(this.event, this.payload)}">
1134
1138
  ${this.label ? (_b = (_a = this.translationProvider) === null || _a === void 0 ? void 0 : _a.call(this, this.defaultLanguage, this.label)) !== null && _b !== void 0 ? _b : this.label : ''}
1135
1139
  </div>`;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/icure-button/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,aAAa;AACb,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,OAAO,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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C,GAAG,EAAE,CAAC,SAAS,CAAA;IAgBxF,CAAC;IAZA,MAAM,KAAK,MAAM;QAChB,OAAO,CAAC,OAAO,CAAC,CAAA;IACjB,CAAC;IAED,MAAM;;QACL,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YACnB,OAAO,IAAI,CAAA,EAAE,CAAA;QACd,CAAC;QACD,OAAO,IAAI,CAAA,oDAAoD,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC;KAC/G,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAA,MAAA,IAAI,CAAC,mBAAmB,qDAAG,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,mCAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;SACxF,CAAA;IACR,CAAC;CACD;AArBY;IAAX,QAAQ,EAAE;;0CAAe;AACd;IAAX,QAAQ,EAAE;;kDAAuB;AACtB;IAAX,QAAQ,EAAE;;4CAAe;AACd;IAAX,QAAQ,EAAE;;oDAAuB;AACtB;IAAX,QAAQ,EAAE;;wDAA2F;AAC1F;IAAX,QAAQ,EAAE;;mDAA4E;AAC3E;IAAX,QAAQ,EAAE;;0CAAc;AACb;IAAX,QAAQ,EAAE;;4CAAiB","sourcesContent":["import { html, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\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 {\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: 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 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: 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}` \n\nexport class IcureButton extends LitElement {\n\t@property() label?: string\n\t@property() labelPosition?: string\n\t@property() visible = true\n\t@property() defaultLanguage = 'en'\n\t@property() translationProvider: (language: string, text: string) => string = (language, text) => text\n\t@property() actionListener: (event: string, payload: unknown) => void = () => undefined\n\t@property() event: string\n\t@property() payload: unknown\n\n\tstatic get styles() {\n\t\treturn [baseCss]\n\t}\n\n\trender() {\n\t\tif (!this.visible) {\n\t\t\treturn html``\n\t\t}\n\t\treturn html`<div class=\"icure-button\" style=\"button\" @click=\"${() => this.actionListener(this.event, this.payload)}\">\n\t\t\t${this.label ? this.translationProvider?.(this.defaultLanguage, this.label) ?? this.label : ''}\n\t\t</div>`\n\t}\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/icure-button/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,aAAa;AACb,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,OAAO,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AI,gBAAgB,EAAE,CAAC;YACtB,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,CAAC,KAAK,EAAE,CAAC,CAAA;QAC9C,CAAC;QACD,OAAO,IAAI,CAAA,oDAAoD,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC;KAC/G,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAA,MAAA,IAAI,CAAC,mBAAmB,qDAAG,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,mCAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;SACxF,CAAA;IACR,CAAC;CACD;AAxBY;IAAX,QAAQ,EAAE;;0CAAe;AACd;IAAX,QAAQ,EAAE;;kDAAuB;AACtB;IAAX,QAAQ,EAAE;;4CAAe;AACd;IAAX,QAAQ,EAAE;;oDAAuB;AACtB;IAAX,QAAQ,EAAE;;wDAA2F;AAC1F;IAAX,QAAQ,EAAE;;mDAA4E;AAC3E;IAAX,QAAQ,EAAE;;0CAAc;AACb;IAAX,QAAQ,EAAE;;4CAAiB","sourcesContent":["import { html, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\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 {\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: 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 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: 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 { icureFormLogging } from '../../index'\n\nexport class IcureButton extends LitElement {\n\t@property() label?: string\n\t@property() labelPosition?: string\n\t@property() visible = true\n\t@property() defaultLanguage = 'en'\n\t@property() translationProvider: (language: string, text: string) => string = (language, text) => text\n\t@property() actionListener: (event: string, payload: unknown) => void = () => undefined\n\t@property() event: string\n\t@property() payload: unknown\n\n\tstatic get styles() {\n\t\treturn [baseCss]\n\t}\n\n\trender() {\n\t\tif (!this.visible) {\n\t\t\treturn html``\n\t\t}\n\t\tif (icureFormLogging) {\n\t\t\tconsole.log(`Rendering button ${this.label}`)\n\t\t}\n\t\treturn html`<div class=\"icure-button\" style=\"button\" @click=\"${() => this.actionListener(this.event, this.payload)}\">\n\t\t\t${this.label ? this.translationProvider?.(this.defaultLanguage, this.label) ?? this.label : ''}\n\t\t</div>`\n\t}\n}\n"]}
@@ -1118,6 +1118,7 @@ import { Field } from '../common';
1118
1118
  import { generateLabels } from '../common/utils';
1119
1119
  import { extractSingleValue } from '../icure-form/fields/utils';
1120
1120
  import { FieldWithOptionsMixin } from '../common/field-with-options';
1121
+ import { icureFormLogging } from '../../index';
1121
1122
  export class IcureButtonGroup extends FieldWithOptionsMixin(Field) {
1122
1123
  constructor() {
1123
1124
  super(...arguments);
@@ -1162,6 +1163,9 @@ export class IcureButtonGroup extends FieldWithOptionsMixin(Field) {
1162
1163
  if (!this.visible) {
1163
1164
  return html ``;
1164
1165
  }
1166
+ if (icureFormLogging) {
1167
+ console.log(`Rendering button group ${this.label}`);
1168
+ }
1165
1169
  const [id, inputValues, versions] = this.getValueFromProvider();
1166
1170
  const version = this.selectedRevision ? versions === null || versions === void 0 ? void 0 : versions.find((v) => v.revision === this.selectedRevision) : versions === null || versions === void 0 ? void 0 : versions[0];
1167
1171
  const rev = version === null || version === void 0 ? void 0 : version.revision;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/icure-button-group/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAkB,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,aAAa;AACb,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,OAAO,GAAG,GAAG,CAAA;;;;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,qDAAG,IAAI,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAA,EAAA,CAAC;;GAEnJ,CAAA;IACF,CAAC;IAEO,aAAa;;QACpB,OAAO,CAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI;YAC7B,CAAC,CAAC,iCAAiC,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI,SAAS;YACnE,CAAC,CAAC,CAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAI;gBACzB,CAAC,CAAC,iCAAiC,MAAM,CAAC,CAAC,MAAA,MAAA,IAAI,CAAC,gBAAgB,0CAAE,MAAM,mCAAI,CAAC,CAAC,IAAI,MAAA,IAAI,CAAC,YAAY,0CAAE,IAAe,CAAA,CAAC,SAAS;gBAC9H,CAAC,CAAC,EAAE,CAAA;IACN,CAAC;CACD;AAzHY;IAAX,QAAQ,EAAE;;8CAAqC","sourcesContent":["import { CSSResultGroup, html, nothing, TemplateResult } from 'lit'\nimport { property } from 'lit/decorators.js'\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 {\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: 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 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: 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 { Field } from '../common'\nimport { generateLabels } from '../common/utils'\nimport { extractSingleValue } from '../icure-form/fields/utils'\nimport { FieldWithOptionsMixin } from '../common/field-with-options'\nimport { FieldValue } from '../model'\nimport { Version } from '../../generic'\n\nexport class IcureButtonGroup extends FieldWithOptionsMixin(Field) {\n\t@property() type: 'radio' | 'checkbox' = 'radio'\n\n\t//override\n\tstatic get styles(): CSSResultGroup[] {\n\t\treturn [baseCss]\n\t}\n\n\tgetValueFromProvider(): [string, string[], Version<FieldValue>[]] | [undefined, 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\tconst fromValue = valueForLanguage && valueForLanguage.type === 'compound' && valueForLanguage.value ? Object.keys(valueForLanguage.value) : []\n\t\t\treturn [id, fromValue.concat(value?.codes?.map((c) => c.id)?.filter((id) => !fromValue.includes(id)) ?? []), versions]\n\t\t}\n\t\treturn [undefined, undefined, undefined]\n\t}\n\n\tpublic checkboxChange() {\n\t\tif (this.readonly) return\n\t\tif (this.handleValueChanged) {\n\t\t\tconst [valueId] = this.getValueFromProvider() ?? ''\n\t\t\tconst inputs = Array.from(this.shadowRoot?.querySelectorAll('input') || []).filter((input) => input.checked)\n\t\t\tconst selectedOptions = this.displayedOptions?.filter((option) => inputs.some((i) => i.id === option.id))\n\t\t\tthis.handleValueChanged?.(\n\t\t\t\tthis.label,\n\t\t\t\tthis.language(),\n\t\t\t\t{\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t[this.language()]: {\n\t\t\t\t\t\t\ttype: 'compound',\n\t\t\t\t\t\t\tvalue: selectedOptions?.reduce(\n\t\t\t\t\t\t\t\t(acc, c) => ({\n\t\t\t\t\t\t\t\t\t...acc,\n\t\t\t\t\t\t\t\t\t[c.id]: { type: 'boolean', value: true },\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tcodes: selectedOptions,\n\t\t\t\t},\n\t\t\t\tvalueId,\n\t\t\t)\n\t\t}\n\t}\n\n\trender(): TemplateResult {\n\t\tif (!this.visible) {\n\t\t\treturn html``\n\t\t}\n\t\tconst [id, inputValues, versions] = this.getValueFromProvider()\n\n\t\tconst version = this.selectedRevision ? versions?.find((v) => v.revision === this.selectedRevision) : versions?.[0]\n\n\t\tconst rev = version?.revision\n\t\tconst metadata = id && rev !== undefined ? this.metadataProvider?.(id, versions?.map((v) => v.revision) ?? [])?.[id]?.find((m) => m.revision === rev)?.value : undefined\n\n\t\treturn html`\n\t\t\t<div class=\"icure-text-field icure-button-group\">\n\t\t\t\t${this.displayedLabels && this.displayedOptions?.length\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<div class=\"icure-label-extra\">\n\t\t\t\t\t\t\t\t${generateLabels(\n\t\t\t\t\t\t\t\t\tObject.entries(this.displayedLabels ?? {})\n\t\t\t\t\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t\t\t\t\t//If we have less than 2 options, we don't need to display the label except if it is different from the first option\n\t\t\t\t\t\t\t\t\t\t\t([, l]) => (this.displayedOptions?.length ?? 0) > 1 || (this.displayedOptions?.length && l !== this.displayedOptions[0].label[this.language()]),\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t.reduce((acc, [k, v]) => ({ ...acc, [k]: v }), {}),\n\t\t\t\t\t\t\t\t\tthis.language(),\n\t\t\t\t\t\t\t\t\tthis.translate ? this.translationProvider : undefined,\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t${this.displayMetadata && metadata\n\t\t\t\t\t\t\t\t\t? html` <icure-metadata-buttons-bar\n\t\t\t\t\t\t\t\t\t\t\t.metadata=\"${metadata}\"\n\t\t\t\t\t\t\t\t\t\t\t.revision=\"${rev}\"\n\t\t\t\t\t\t\t\t\t\t\t.versions=\"${versions ?? []}\"\n\t\t\t\t\t\t\t\t\t\t\t.valueId=\"${extractSingleValue(this.valueProvider?.())?.[0]}\"\n\t\t\t\t\t\t\t\t\t\t\t.defaultLanguage=\"${this.defaultLanguage}\"\n\t\t\t\t\t\t\t\t\t\t\t.selectedLanguage=\"${this.selectedLanguage}\"\n\t\t\t\t\t\t\t\t\t\t\t.languages=\"${this.languages}\"\n\t\t\t\t\t\t\t\t\t\t\t.handleMetadataChanged=\"${this.handleMetadataChanged}\"\n\t\t\t\t\t\t\t\t\t\t\t.handleLanguageSelected=\"${(iso: string) => (this.selectedLanguage = iso)}\"\n\t\t\t\t\t\t\t\t\t\t\t.handleRevisionSelected=\"${(rev: string) => (this.selectedRevision = rev)}\"\n\t\t\t\t\t\t\t\t\t\t\t.ownersProvider=\"${this.ownersProvider}\"\n\t\t\t\t\t\t\t\t\t />`\n\t\t\t\t\t\t\t\t\t: nothing}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t `\n\t\t\t\t\t: nothing}\n\t\t\t\t<div style=\"${this.generateStyle()}\">\n\t\t\t\t\t${(this.displayedOptions?.length ? this.displayedOptions : [{ id: this.label, label: {} }]).map((x) => {\n\t\t\t\t\t\tconst text = (x.label ?? {})[this.language()] ?? ''\n\t\t\t\t\t\tif (this.readonly) {\n\t\t\t\t\t\t\treturn html` <div>\n\t\t\t\t\t\t\t\t<input class=\"icure-checkbox\" disabled type=\"${this.type}\" id=\"${x.id}\" name=\"${this.label}\" value=\"${text}\" .checked=\"${inputValues?.includes(x.id)}\" />\n\t\t\t\t\t\t\t\t<label class=\"icure-button-group-label\" for=\"${x.id}\"><span>${text}</span></label>\n\t\t\t\t\t\t\t</div>`\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn html` <div>\n\t\t\t\t\t\t\t<input class=\"icure-checkbox\" type=\"${this.type}\" id=\"${x.id}\" name=\"${this.label}\" value=\"${text}\" .checked=\"${inputValues?.includes(x.id)}\" @change=\"${this.checkboxChange}\" /><label\n\t\t\t\t\t\t\t\tclass=\"icure-button-group-label\"\n\t\t\t\t\t\t\t\tfor=\"${x.id}\"\n\t\t\t\t\t\t\t\t><span>${text}</span></label\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t</div>`\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"error\">${this.validationErrorsProvider?.().map(([, error]) => html` <div>${this.translationProvider?.(this.language(), error)}</div>`)}</div>\n\t\t\t</div>\n\t\t`\n\t}\n\n\tprivate generateStyle() {\n\t\treturn this.styleOptions?.span\n\t\t\t? `grid-template-columns: repeat(${this.styleOptions?.span}, 1fr);`\n\t\t\t: this.styleOptions?.rows\n\t\t\t? `grid-template-columns: repeat(${Number((this.displayedOptions?.length ?? 0) / (this.styleOptions?.rows as number))}, 1fr);`\n\t\t\t: ''\n\t}\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/icure-button-group/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAkB,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,aAAa;AACb,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,OAAO,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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Group, html, nothing, TemplateResult } from 'lit'\nimport { property } from 'lit/decorators.js'\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 {\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: 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 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: 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 { Field } from '../common'\nimport { generateLabels } from '../common/utils'\nimport { extractSingleValue } from '../icure-form/fields/utils'\nimport { FieldWithOptionsMixin } from '../common/field-with-options'\nimport { FieldValue } from '../model'\nimport { Version } from '../../generic'\nimport { icureFormLogging } from '../../index'\n\nexport class IcureButtonGroup extends FieldWithOptionsMixin(Field) {\n\t@property() type: 'radio' | 'checkbox' = 'radio'\n\n\t//override\n\tstatic get styles(): CSSResultGroup[] {\n\t\treturn [baseCss]\n\t}\n\n\tgetValueFromProvider(): [string, string[], Version<FieldValue>[]] | [undefined, 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\tconst fromValue = valueForLanguage && valueForLanguage.type === 'compound' && valueForLanguage.value ? Object.keys(valueForLanguage.value) : []\n\t\t\treturn [id, fromValue.concat(value?.codes?.map((c) => c.id)?.filter((id) => !fromValue.includes(id)) ?? []), versions]\n\t\t}\n\t\treturn [undefined, undefined, undefined]\n\t}\n\n\tpublic checkboxChange() {\n\t\tif (this.readonly) return\n\t\tif (this.handleValueChanged) {\n\t\t\tconst [valueId] = this.getValueFromProvider() ?? ''\n\t\t\tconst inputs = Array.from(this.shadowRoot?.querySelectorAll('input') || []).filter((input) => input.checked)\n\t\t\tconst selectedOptions = this.displayedOptions?.filter((option) => inputs.some((i) => i.id === option.id))\n\t\t\tthis.handleValueChanged?.(\n\t\t\t\tthis.label,\n\t\t\t\tthis.language(),\n\t\t\t\t{\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\t[this.language()]: {\n\t\t\t\t\t\t\ttype: 'compound',\n\t\t\t\t\t\t\tvalue: selectedOptions?.reduce(\n\t\t\t\t\t\t\t\t(acc, c) => ({\n\t\t\t\t\t\t\t\t\t...acc,\n\t\t\t\t\t\t\t\t\t[c.id]: { type: 'boolean', value: true },\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tcodes: selectedOptions,\n\t\t\t\t},\n\t\t\t\tvalueId,\n\t\t\t)\n\t\t}\n\t}\n\n\trender(): TemplateResult {\n\t\tif (!this.visible) {\n\t\t\treturn html``\n\t\t}\n\t\tif (icureFormLogging) {\n\t\t\tconsole.log(`Rendering button group ${this.label}`)\n\t\t}\n\n\t\tconst [id, inputValues, versions] = this.getValueFromProvider()\n\n\t\tconst version = this.selectedRevision ? versions?.find((v) => v.revision === this.selectedRevision) : versions?.[0]\n\n\t\tconst rev = version?.revision\n\t\tconst metadata = id && rev !== undefined ? this.metadataProvider?.(id, versions?.map((v) => v.revision) ?? [])?.[id]?.find((m) => m.revision === rev)?.value : undefined\n\n\t\treturn html`\n\t\t\t<div class=\"icure-text-field icure-button-group\">\n\t\t\t\t${this.displayedLabels && this.displayedOptions?.length\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<div class=\"icure-label-extra\">\n\t\t\t\t\t\t\t\t${generateLabels(\n\t\t\t\t\t\t\t\t\tObject.entries(this.displayedLabels ?? {})\n\t\t\t\t\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t\t\t\t\t//If we have less than 2 options, we don't need to display the label except if it is different from the first option\n\t\t\t\t\t\t\t\t\t\t\t([, l]) => (this.displayedOptions?.length ?? 0) > 1 || (this.displayedOptions?.length && l !== this.displayedOptions[0].label[this.language()]),\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t.reduce((acc, [k, v]) => ({ ...acc, [k]: v }), {}),\n\t\t\t\t\t\t\t\t\tthis.language(),\n\t\t\t\t\t\t\t\t\tthis.translate ? this.translationProvider : undefined,\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t${this.displayMetadata && metadata\n\t\t\t\t\t\t\t\t\t? html` <icure-metadata-buttons-bar\n\t\t\t\t\t\t\t\t\t\t\t.metadata=\"${metadata}\"\n\t\t\t\t\t\t\t\t\t\t\t.revision=\"${rev}\"\n\t\t\t\t\t\t\t\t\t\t\t.versions=\"${versions ?? []}\"\n\t\t\t\t\t\t\t\t\t\t\t.valueId=\"${extractSingleValue(this.valueProvider?.())?.[0]}\"\n\t\t\t\t\t\t\t\t\t\t\t.defaultLanguage=\"${this.defaultLanguage}\"\n\t\t\t\t\t\t\t\t\t\t\t.selectedLanguage=\"${this.selectedLanguage}\"\n\t\t\t\t\t\t\t\t\t\t\t.languages=\"${this.languages}\"\n\t\t\t\t\t\t\t\t\t\t\t.handleMetadataChanged=\"${this.handleMetadataChanged}\"\n\t\t\t\t\t\t\t\t\t\t\t.handleLanguageSelected=\"${(iso: string) => (this.selectedLanguage = iso)}\"\n\t\t\t\t\t\t\t\t\t\t\t.handleRevisionSelected=\"${(rev: string) => (this.selectedRevision = rev)}\"\n\t\t\t\t\t\t\t\t\t\t\t.ownersProvider=\"${this.ownersProvider}\"\n\t\t\t\t\t\t\t\t\t />`\n\t\t\t\t\t\t\t\t\t: nothing}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t `\n\t\t\t\t\t: nothing}\n\t\t\t\t<div style=\"${this.generateStyle()}\">\n\t\t\t\t\t${(this.displayedOptions?.length ? this.displayedOptions : [{ id: this.label, label: {} }]).map((x) => {\n\t\t\t\t\t\tconst text = (x.label ?? {})[this.language()] ?? ''\n\t\t\t\t\t\tif (this.readonly) {\n\t\t\t\t\t\t\treturn html` <div>\n\t\t\t\t\t\t\t\t<input class=\"icure-checkbox\" disabled type=\"${this.type}\" id=\"${x.id}\" name=\"${this.label}\" value=\"${text}\" .checked=\"${inputValues?.includes(x.id)}\" />\n\t\t\t\t\t\t\t\t<label class=\"icure-button-group-label\" for=\"${x.id}\"><span>${text}</span></label>\n\t\t\t\t\t\t\t</div>`\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn html` <div>\n\t\t\t\t\t\t\t<input class=\"icure-checkbox\" type=\"${this.type}\" id=\"${x.id}\" name=\"${this.label}\" value=\"${text}\" .checked=\"${inputValues?.includes(x.id)}\" @change=\"${this.checkboxChange}\" /><label\n\t\t\t\t\t\t\t\tclass=\"icure-button-group-label\"\n\t\t\t\t\t\t\t\tfor=\"${x.id}\"\n\t\t\t\t\t\t\t\t><span>${text}</span></label\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t</div>`\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"error\">${this.validationErrorsProvider?.().map(([, error]) => html` <div>${this.translationProvider?.(this.language(), error)}</div>`)}</div>\n\t\t\t</div>\n\t\t`\n\t}\n\n\tprivate generateStyle() {\n\t\treturn this.styleOptions?.span\n\t\t\t? `grid-template-columns: repeat(${this.styleOptions?.span}, 1fr);`\n\t\t\t: this.styleOptions?.rows\n\t\t\t? `grid-template-columns: repeat(${Number((this.displayedOptions?.length ?? 0) / (this.styleOptions?.rows as number))}, 1fr);`\n\t\t\t: ''\n\t}\n}\n"]}
@@ -1123,6 +1123,7 @@ input[type=radio] {
1123
1123
  height: 1.4em;
1124
1124
  }`;
1125
1125
  import { anyDateToDate } from '../../utils/dates';
1126
+ import { icureFormLogging } from '../../index';
1126
1127
  export class IcureDatePickerField extends Field {
1127
1128
  constructor() {
1128
1129
  super(...arguments);
@@ -1165,6 +1166,9 @@ export class IcureDatePickerField extends Field {
1165
1166
  if (!this.visible) {
1166
1167
  return html ``;
1167
1168
  }
1169
+ if (icureFormLogging) {
1170
+ console.log(`Rendering dat epicker ${this.label}`);
1171
+ }
1168
1172
  const value = this.getValueFromProvider();
1169
1173
  const validationError = (_b = (_a = this.validationErrorsProvider) === null || _a === void 0 ? void 0 : _a.call(this)) === null || _b === void 0 ? void 0 : _b.length;
1170
1174
  return html ` <div id="root" class="icure-text-field ${value && value != '' ? 'has-content' : ''}" data-placeholder="${this.placeholder}">
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/icure-date-picker/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAkB,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,2DAA2D,CAAA;AAC1F,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,aAAa;AACb,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,OAAO,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;YAC9C,OAAM;QACP,CAAC;QACD,IAAI,CAAC,iBAAiB,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAA;IACjD,CAAC;CACD;AA5FY;IAAX,QAAQ,EAAE;;yDAAiB;AAET;IAAlB,KAAK,EAAE;;+DAAoC","sourcesContent":["import { CSSResultGroup, html, nothing, TemplateResult } from 'lit'\nimport { generateLabels } from '../common/utils'\nimport { property, state } from 'lit/decorators.js'\nimport '@icure/motss-app-datepicker'\nimport { CustomEventDetail } from '@icure/motss-app-datepicker/dist/typings'\nimport { MAX_DATE } from '@icure/motss-app-datepicker/dist/constants'\nimport { toResolvedDate } from '@icure/motss-app-datepicker/dist/helpers/to-resolved-date'\nimport { Field } from '../common'\nimport { datePicto } from '../common/styles/paths'\nimport { extractSingleValue } from '../icure-form/fields/utils'\nimport { format } from 'date-fns'\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 {\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: 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 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: 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 { anyDateToDate } from '../../utils/dates'\n\nexport class IcureDatePickerField extends Field {\n\t//TODO: support different date formats\n\t@property() placeholder = ''\n\n\t@state() protected displayDatePicker = false\n\n\tstatic get styles(): CSSResultGroup[] {\n\t\treturn [baseCss]\n\t}\n\n\t_handleClickOutside(event: MouseEvent): void {\n\t\tif (!event.composedPath().includes(this)) {\n\t\t\tthis.displayDatePicker = 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\tgetValueFromProvider(): string | undefined {\n\t\tconst [, versions] = extractSingleValue(this.valueProvider?.())\n\t\tif (versions) {\n\t\t\tconst content = versions[0]?.value?.content\n\t\t\tconst valueForLanguage = content?.[this.language()] ?? content?.[this.defaultLanguage] ?? content?.['*'] ?? content?.[Object.keys(content)[0]]\n\t\t\tif (valueForLanguage && (valueForLanguage.type === 'timestamp' || valueForLanguage.type === 'datetime') && valueForLanguage.value) {\n\t\t\t\tconst date = anyDateToDate(valueForLanguage.value)\n\t\t\t\treturn date ? format(date, 'dd/MM/yyyy') : ''\n\t\t\t}\n\t\t}\n\t\treturn undefined\n\t}\n\n\trender(): TemplateResult {\n\t\tif (!this.visible) {\n\t\t\treturn html``\n\t\t}\n\n\t\tconst value = this.getValueFromProvider()\n\t\tconst validationError = this.validationErrorsProvider?.()?.length\n\n\t\treturn html` <div id=\"root\" class=\"icure-text-field ${value && value != '' ? 'has-content' : ''}\" data-placeholder=\"${this.placeholder}\">\n\t\t\t${this.displayedLabels ? generateLabels(this.displayedLabels, this.language(), this.translate ? this.translationProvider : undefined) : nothing}\n\t\t\t<div class=\"icure-input ${validationError && 'icure-input__validationError'}\" @click=\"${this.togglePopup}\" id=\"test\">\n\t\t\t\t<div id=\"editor\">${value}</div>\n\t\t\t\t<div id=\"extra\" class=${'extra forced'}>\n\t\t\t\t\t<button class=\"btn select-arrow\">${datePicto}</button>\n\t\t\t\t\t${this.displayDatePicker\n\t\t\t\t\t\t? html`<div id=\"menu\" class=\"date-picker\" @click=\"${(event: Event) => event.stopPropagation()}\">\n\t\t\t\t\t\t\t\t<app-date-picker\n\t\t\t\t\t\t\t\t\tlocale=\"${this.selectedLanguage ?? this.defaultLanguage ?? 'en'}\"\n\t\t\t\t\t\t\t\t\tstyle=\"\"\n\t\t\t\t\t\t\t\t\tmax=\"${MAX_DATE}\"\n\t\t\t\t\t\t\t\t\tmin=\"${toResolvedDate('1900-01-01')}\"\n\t\t\t\t\t\t\t\t\t@date-updated=\"${this.dateUpdated}\"\n\t\t\t\t\t\t\t\t></app-date-picker>\n\t\t\t\t\t\t </div>`\n\t\t\t\t\t\t: ''}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"error\">${this.validationErrorsProvider?.().map(([, error]) => html`<div>${this.translationProvider?.(this.language(), error)}</div>`)}</div>\n\t\t\t</div>\n\t\t</div>`\n\t}\n\n\tpublic dateUpdated(date: CustomEventDetail['date-updated']): void {\n\t\tconst parts = date.detail.value?.split('-')\n\t\tif (parts && parts.length === 3) {\n\t\t\tconst fuzzyDateValue = parseInt(parts[0]) * 10000 + parseInt(parts[1]) * 100 + parseInt(parts[2])\n\n\t\t\tconst [valueId] = this.getValueFromProvider() ?? ''\n\t\t\tthis.handleValueChanged?.(\n\t\t\t\tthis.label,\n\t\t\t\tthis.language(),\n\t\t\t\t{\n\t\t\t\t\tcontent: { [this.language()]: { type: 'datetime', value: fuzzyDateValue } },\n\t\t\t\t},\n\t\t\t\tvalueId,\n\t\t\t)\n\t\t}\n\t}\n\n\tpublic togglePopup(): void {\n\t\tif (this.readonly && !this.displayDatePicker) {\n\t\t\treturn\n\t\t}\n\t\tthis.displayDatePicker = !this.displayDatePicker\n\t}\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/icure-date-picker/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAkB,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,2DAA2D,CAAA;AAC1F,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAA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MAAM,KAAK,CAAC,EAAE,CAAC;YACjC,MAAM,cAAc,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;YAEjG,MAAM,CAAC,OAAO,CAAC,GAAG,MAAA,IAAI,CAAC,oBAAoB,EAAE,mCAAI,EAAE,CAAA;YACnD,MAAA,IAAI,CAAC,kBAAkB,qDACtB,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,QAAQ,EAAE,EACf;gBACC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;aAC3E,EACD,OAAO,CACP,CAAA;QACF,CAAC;IACF,CAAC;IAEM,WAAW;QACjB,IAAI,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC9C,OAAM;QACP,CAAC;QACD,IAAI,CAAC,iBAAiB,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAA;IACjD,CAAC;CACD;AAhGY;IAAX,QAAQ,EAAE;;yDAAiB;AAET;IAAlB,KAAK,EAAE;;+DAAoC","sourcesContent":["import { CSSResultGroup, html, nothing, TemplateResult } from 'lit'\nimport { generateLabels } from '../common/utils'\nimport { property, state } from 'lit/decorators.js'\nimport '@icure/motss-app-datepicker'\nimport { CustomEventDetail } from '@icure/motss-app-datepicker/dist/typings'\nimport { MAX_DATE } from '@icure/motss-app-datepicker/dist/constants'\nimport { toResolvedDate } from '@icure/motss-app-datepicker/dist/helpers/to-resolved-date'\nimport { Field } from '../common'\nimport { datePicto } from '../common/styles/paths'\nimport { extractSingleValue } from '../icure-form/fields/utils'\nimport { format } from 'date-fns'\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 {\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: 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 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: 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 { anyDateToDate } from '../../utils/dates'\nimport { icureFormLogging } from '../../index'\n\nexport class IcureDatePickerField extends Field {\n\t//TODO: support different date formats\n\t@property() placeholder = ''\n\n\t@state() protected displayDatePicker = false\n\n\tstatic get styles(): CSSResultGroup[] {\n\t\treturn [baseCss]\n\t}\n\n\t_handleClickOutside(event: MouseEvent): void {\n\t\tif (!event.composedPath().includes(this)) {\n\t\t\tthis.displayDatePicker = 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\tgetValueFromProvider(): string | undefined {\n\t\tconst [, versions] = extractSingleValue(this.valueProvider?.())\n\t\tif (versions) {\n\t\t\tconst content = versions[0]?.value?.content\n\t\t\tconst valueForLanguage = content?.[this.language()] ?? content?.[this.defaultLanguage] ?? content?.['*'] ?? content?.[Object.keys(content)[0]]\n\t\t\tif (valueForLanguage && (valueForLanguage.type === 'timestamp' || valueForLanguage.type === 'datetime') && valueForLanguage.value) {\n\t\t\t\tconst date = anyDateToDate(valueForLanguage.value)\n\t\t\t\treturn date ? format(date, 'dd/MM/yyyy') : ''\n\t\t\t}\n\t\t}\n\t\treturn undefined\n\t}\n\n\trender(): TemplateResult {\n\t\tif (!this.visible) {\n\t\t\treturn html``\n\t\t}\n\n\t\tif (icureFormLogging) {\n\t\t\tconsole.log(`Rendering dat epicker ${this.label}`)\n\t\t}\n\n\t\tconst value = this.getValueFromProvider()\n\t\tconst validationError = this.validationErrorsProvider?.()?.length\n\n\t\treturn html` <div id=\"root\" class=\"icure-text-field ${value && value != '' ? 'has-content' : ''}\" data-placeholder=\"${this.placeholder}\">\n\t\t\t${this.displayedLabels ? generateLabels(this.displayedLabels, this.language(), this.translate ? this.translationProvider : undefined) : nothing}\n\t\t\t<div class=\"icure-input ${validationError && 'icure-input__validationError'}\" @click=\"${this.togglePopup}\" id=\"test\">\n\t\t\t\t<div id=\"editor\">${value}</div>\n\t\t\t\t<div id=\"extra\" class=${'extra forced'}>\n\t\t\t\t\t<button class=\"btn select-arrow\">${datePicto}</button>\n\t\t\t\t\t${this.displayDatePicker\n\t\t\t\t\t\t? html`<div id=\"menu\" class=\"date-picker\" @click=\"${(event: Event) => event.stopPropagation()}\">\n\t\t\t\t\t\t\t\t<app-date-picker\n\t\t\t\t\t\t\t\t\tlocale=\"${this.selectedLanguage ?? this.defaultLanguage ?? 'en'}\"\n\t\t\t\t\t\t\t\t\tstyle=\"\"\n\t\t\t\t\t\t\t\t\tmax=\"${MAX_DATE}\"\n\t\t\t\t\t\t\t\t\tmin=\"${toResolvedDate('1900-01-01')}\"\n\t\t\t\t\t\t\t\t\t@date-updated=\"${this.dateUpdated}\"\n\t\t\t\t\t\t\t\t></app-date-picker>\n\t\t\t\t\t\t </div>`\n\t\t\t\t\t\t: ''}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"error\">${this.validationErrorsProvider?.().map(([, error]) => html`<div>${this.translationProvider?.(this.language(), error)}</div>`)}</div>\n\t\t\t</div>\n\t\t</div>`\n\t}\n\n\tpublic dateUpdated(date: CustomEventDetail['date-updated']): void {\n\t\tconst parts = date.detail.value?.split('-')\n\t\tif (parts && parts.length === 3) {\n\t\t\tconst fuzzyDateValue = parseInt(parts[0]) * 10000 + parseInt(parts[1]) * 100 + parseInt(parts[2])\n\n\t\t\tconst [valueId] = this.getValueFromProvider() ?? ''\n\t\t\tthis.handleValueChanged?.(\n\t\t\t\tthis.label,\n\t\t\t\tthis.language(),\n\t\t\t\t{\n\t\t\t\t\tcontent: { [this.language()]: { type: 'datetime', value: fuzzyDateValue } },\n\t\t\t\t},\n\t\t\t\tvalueId,\n\t\t\t)\n\t\t}\n\t}\n\n\tpublic togglePopup(): void {\n\t\tif (this.readonly && !this.displayDatePicker) {\n\t\t\treturn\n\t\t}\n\t\tthis.displayDatePicker = !this.displayDatePicker\n\t}\n}\n"]}
@@ -1119,6 +1119,7 @@ input[type=radio] {
1119
1119
  font-weight: 500;
1120
1120
  height: 1.4em;
1121
1121
  }`;
1122
+ import { icureFormLogging } from '../../index';
1122
1123
  export class IcureDropdownField extends FieldWithOptionsMixin(Field) {
1123
1124
  constructor() {
1124
1125
  super(...arguments);
@@ -1213,6 +1214,9 @@ export class IcureDropdownField extends FieldWithOptionsMixin(Field) {
1213
1214
  if (!this.visible) {
1214
1215
  return html ``;
1215
1216
  }
1217
+ if (icureFormLogging) {
1218
+ console.log(`Rendering dropdown ${this.label}`);
1219
+ }
1216
1220
  const [, inputValue] = (_a = this.getValueFromProvider()) !== null && _a !== void 0 ? _a : '';
1217
1221
  const validationError = (_c = (_b = this.validationErrorsProvider) === null || _b === void 0 ? void 0 : _b.call(this)) === null || _c === void 0 ? void 0 : _c.length;
1218
1222
  return html `