@icure/form 2.0.8 → 2.0.9

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.
Files changed (37) hide show
  1. package/.yarn/cache/@icure-motss-app-datepicker-npm-6.0.0-rc.40-ca1da7abbb-9bbe2bed34.zip +0 -0
  2. package/.yarn/cache/@lit-labs-ssr-dom-shim-npm-1.4.0-e5ef5fbeba-e267c25576.zip +0 -0
  3. package/.yarn/cache/@lit-reactive-element-npm-2.1.1-3875228c32-b9bbc9c089.zip +0 -0
  4. package/.yarn/cache/{lit-element-npm-4.1.1-bb20932b82-74d0f2d6fb.zip → lit-element-npm-4.2.1-b5bc114ced-5925326176.zip} +0 -0
  5. package/.yarn/cache/{lit-html-npm-3.2.1-1662fc597d-1bacd9f8b2.zip → lit-html-npm-3.3.1-e3722d4f4a-de07c66945.zip} +0 -0
  6. package/.yarn/cache/{lit-npm-3.2.1-27cb5b7782-ee22bbc53d.zip → lit-npm-3.3.1-8f683c51f1-fb88f1ff80.zip} +0 -0
  7. package/.yarn/cache/prosemirror-model-npm-1.25.3-95b23ed79b-2720e49795.zip +0 -0
  8. package/.yarn/cache/prosemirror-transform-npm-1.10.4-f765dfe652-7b8b3ed82c.zip +0 -0
  9. package/.yarn/cache/prosemirror-view-npm-1.41.2-7f800b4d2b-263f15bec9.zip +0 -0
  10. package/.yarn/install-state.gz +0 -0
  11. package/components/common/metadata-buttons-bar.d.ts +1 -1
  12. package/components/common/metadata-buttons-bar.js +5 -16
  13. package/components/common/metadata-buttons-bar.js.map +1 -1
  14. package/components/icure-date-picker/index.d.ts +2 -2
  15. package/components/icure-date-picker/index.js +5 -5
  16. package/components/icure-date-picker/index.js.map +1 -1
  17. package/package.json +2 -2
  18. package/.yarn/cache/@lit-labs-ssr-dom-shim-npm-1.2.1-d14ce3e3e5-5667c44f58.zip +0 -0
  19. package/.yarn/cache/@lit-reactive-element-npm-2.0.4-4836436301-368d788d9e.zip +0 -0
  20. package/.yarn/cache/app-datepicker-npm-6.0.0-rc.33-f74d593ddf-6490949c45.zip +0 -0
  21. package/.yarn/cache/lit-ntml-npm-3.0.6-98ebc6c1ac-2917c778d9.zip +0 -0
  22. package/.yarn/cache/lodash-es-npm-4.17.21-b45832dfce-05cbffad6e.zip +0 -0
  23. package/.yarn/cache/nodemod-npm-3.0.6-844d650911-47ffe619b3.zip +0 -0
  24. package/.yarn/cache/normalize-diacritics-npm-3.0.12-93e2346015-5ddc2cfaf8.zip +0 -0
  25. package/.yarn/cache/parse5-npm-6.0.1-70a35a494a-7d569a176c.zip +0 -0
  26. package/.yarn/cache/prosemirror-model-npm-1.23.0-57eb718541-f5ab1593cb.zip +0 -0
  27. package/.yarn/cache/prosemirror-transform-npm-1.10.2-1c2da9123e-93b0c03aff.zip +0 -0
  28. package/.yarn/cache/prosemirror-view-npm-1.36.0-830888802f-38986f55e4.zip +0 -0
  29. package/components/icure-text-field/schema/items-list.d.ts +0 -3
  30. package/components/icure-text-field/schema/items-list.js +0 -31
  31. package/components/icure-text-field/schema/items-list.js.map +0 -1
  32. package/components/themes/ehr-lite/index.d.ts +0 -1
  33. package/components/themes/ehr-lite/index.js +0 -321
  34. package/components/themes/ehr-lite/index.js.map +0 -1
  35. package/utils/icure-utils.d.ts +0 -16
  36. package/utils/icure-utils.js +0 -105
  37. package/utils/icure-utils.js.map +0 -1
Binary file
@@ -1,7 +1,7 @@
1
1
  import { LitElement } from 'lit';
2
2
  import { FieldMetadata, FieldValue } from '../model';
3
3
  import { Suggestion, Version } from '../../generic';
4
- import { CustomEventDetail } from 'app-datepicker/dist/typings';
4
+ import { CustomEventDetail } from '@icure/motss-app-datepicker/dist/typings.js';
5
5
  export declare class MetadataButtonBar extends LitElement {
6
6
  valueId: string;
7
7
  metadata: FieldMetadata;
@@ -24,8 +24,8 @@ const decorators_js_1 = require("lit/decorators.js");
24
24
  const paths_1 = require("./styles/paths");
25
25
  const date_fns_1 = require("date-fns");
26
26
  const dates_1 = require("../../utils/dates");
27
- const to_resolved_date_1 = require("app-datepicker/dist/helpers/to-resolved-date");
28
- const constants_1 = require("app-datepicker/dist/constants");
27
+ const to_resolved_date_js_1 = require("@icure/motss-app-datepicker/dist/helpers/to-resolved-date.js");
28
+ const constants_js_1 = require("@icure/motss-app-datepicker/dist/constants.js");
29
29
  const languages_1 = require("../../utils/languages");
30
30
  // @ts-ignore
31
31
  const lit_2 = require("lit");
@@ -1158,8 +1158,7 @@ class MetadataButtonBar extends lit_1.LitElement {
1158
1158
  const owner = (_b = this.metadata) === null || _b === void 0 ? void 0 : _b.owner;
1159
1159
  if (owner && !this.loadedOwners[owner]) {
1160
1160
  this.loadedOwners = Object.assign(Object.assign({}, this.loadedOwners), { [owner]: { id: owner, text: '', terms: [], label: {} } }); // Make sure we do not loop endlessly
1161
- this.ownersProvider &&
1162
- this.ownersProvider([], [owner]).then((availableOwners) => (this.loadedOwners = availableOwners.reduce((acc, o) => (Object.assign(Object.assign({}, acc), { [o.id]: o })), this.loadedOwners)));
1161
+ this.ownersProvider && this.ownersProvider([], [owner]).then((availableOwners) => (this.loadedOwners = availableOwners.reduce((acc, o) => (Object.assign(Object.assign({}, acc), { [o.id]: o })), this.loadedOwners)));
1163
1162
  }
1164
1163
  const forcedByMenu = this.displayOwnersMenu || this.displayLanguagesMenu || this.displayValueDateMenu || this.displayVersionsMenu;
1165
1164
  const discordantMetadata = (_d = (_c = this.metadata) === null || _c === void 0 ? void 0 : _c.discordantMetadata) === null || _d === void 0 ? void 0 : _d.call(_c);
@@ -1207,24 +1206,14 @@ class MetadataButtonBar extends lit_1.LitElement {
1207
1206
  ${this.displayValueDateMenu
1208
1207
  ? (0, lit_1.html) `
1209
1208
  <div id="menu" class="menu value-date-menu">
1210
- <app-date-picker
1211
- locale="${(_p = this.defaultLanguage) !== null && _p !== void 0 ? _p : 'en'}"
1212
- style=""
1213
- max="${constants_1.MAX_DATE}"
1214
- min="${(0, to_resolved_date_1.toResolvedDate)('1900-01-01')}"
1215
- @date-updated="${this.dateUpdated}"
1216
- ></app-date-picker>
1209
+ <app-date-picker locale="${(_p = this.defaultLanguage) !== null && _p !== void 0 ? _p : 'en'}" style="" max="${constants_js_1.MAX_DATE}" min="${(0, to_resolved_date_js_1.toResolvedDate)('1900-01-01')}" @date-updated="${this.dateUpdated}"></app-date-picker>
1217
1210
  </div>
1218
1211
  `
1219
1212
  : ''}
1220
1213
  </div>
1221
1214
  <div class="menu-container">
1222
1215
  <button
1223
- data-content="${this.revision === null
1224
- ? 'latest'
1225
- : this.revision
1226
- ? `rev-${this.revision.split('-')[0]} ${revisionDate ? `(${(0, date_fns_1.format)(new Date(revisionDate), 'yyyy-MM-dd')})` : ''}`
1227
- : ''}"
1216
+ data-content="${this.revision === null ? 'latest' : this.revision ? `rev-${this.revision.split('-')[0]} ${revisionDate ? `(${(0, date_fns_1.format)(new Date(revisionDate), 'yyyy-MM-dd')})` : ''}` : ''}"
1228
1217
  @click="${this.toggleVersionsMenu}"
1229
1218
  class="btn version ${forcedByVersion ? 'forced' : ''}"
1230
1219
  >
@@ -1 +1 @@
1
- {"version":3,"file":"metadata-buttons-bar.js","sourceRoot":"","sources":["../../../tmp/components/common/metadata-buttons-bar.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,6BAAsC;AACtC,qDAAmD;AAGnD,0CAAuG;AACvG,uCAAiC;AACjC,6CAAiD;AACjD,mFAA6E;AAE7E,6DAAwD;AACxD,qDAAoD;AAEpD,aAAa;AACb,6BAA0B;AAC1B,MAAM,OAAO,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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4D;AAC3D;IAAX,IAAA,wBAAQ,GAAE;;iEAAmE;AAClE;IAAX,IAAA,wBAAQ,GAAE;;yDAAoH;AAE5G;IAAlB,IAAA,qBAAK,GAAE;;4DAAoC;AACzB;IAAlB,IAAA,qBAAK,GAAE;;0DAA+B;AACpB;IAAlB,IAAA,qBAAK,GAAE;;0DAA6C;AAClC;IAAlB,IAAA,qBAAK,GAAE;;uDAA0D;AAE/C;IAAlB,IAAA,qBAAK,GAAE;;+DAAuC;AAC5B;IAAlB,IAAA,qBAAK,GAAE;;8DAAsC;AAC3B;IAAlB,IAAA,qBAAK,GAAE;;+DAAuC;AAC5B;IAAlB,IAAA,qBAAK,GAAE;;6DAAkC","sourcesContent":["import { html, LitElement } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { FieldMetadata, FieldValue } from '../model'\nimport { Suggestion, Version } from '../../generic'\nimport { calendarPatientPicto, i18nPicto, ownerPicto, searchPicto, versionPicto } from './styles/paths'\nimport { format } from 'date-fns'\nimport { anyDateToDate } from '../../utils/dates'\nimport { toResolvedDate } from 'app-datepicker/dist/helpers/to-resolved-date'\nimport { CustomEventDetail } from 'app-datepicker/dist/typings'\nimport { MAX_DATE } from 'app-datepicker/dist/constants'\nimport { languageName } from '../../utils/languages'\n\n// @ts-ignore\nimport { css } from 'lit';\nconst baseCss = css`@charset \"UTF-8\";\n:host {\n --bg-color-1: #f44336;\n}\n\n.ProseMirror {\n position: relative;\n width: 100%;\n word-wrap: break-word;\n white-space: pre-wrap;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n padding: 6px 8px 2px 8px;\n line-height: 1.2;\n color: #274768;\n font-size: 14px;\n font-weight: 400;\n outline: none;\n}\n.ProseMirror p:last-child,\n.ProseMirror h1:last-child,\n.ProseMirror h2:last-child,\n.ProseMirror h3:last-child,\n.ProseMirror h4:last-child,\n.ProseMirror h5:last-child,\n.ProseMirror h6:last-child {\n margin-bottom: 2px;\n}\n.ProseMirror p {\n margin-bottom: 1em;\n}\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n.ProseMirror li {\n position: relative;\n}\n.ProseMirror ul,\n.ProseMirror ol {\n padding-left: 30px;\n}\n.ProseMirror blockquote {\n padding-left: 1em;\n border-left: 3px solid #eee;\n margin-left: 0;\n margin-right: 0;\n}\n\n.ProseMirror-hideselection {\n caret-color: transparent;\n}\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n/* Make sure li selections wrap around markers */\nli.ProseMirror-selectednode {\n outline: none;\n}\nli.ProseMirror-selectednode :after {\n content: \"\";\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid #8cf;\n pointer-events: none;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n/* Add space around the hr to make clicking it easier */\n.ProseMirror-example-setup-style hr {\n padding: 2px 10px;\n border: none;\n margin: 1em 0;\n}\n.ProseMirror-example-setup-style hr:after {\n content: \"\";\n display: block;\n height: 1px;\n background: silver;\n line-height: 2px;\n}\n\n.ProseMirror-example-setup-style img {\n cursor: default;\n}\n\n.ProseMirror-prompt {\n background: white;\n padding: 5px 10px 5px 15px;\n border: 1px solid silver;\n position: fixed;\n border-radius: 3px;\n z-index: 11;\n box-shadow: -0.5px 2px 5px rgba(0, 0, 0, 0.2);\n}\n.ProseMirror-prompt h5 {\n margin: 0;\n font-weight: normal;\n font-size: 100%;\n color: #444;\n}\n.ProseMirror-prompt input[type=text],\n.ProseMirror-prompt textarea {\n background: #eee;\n border: none;\n outline: none;\n}\n.ProseMirror-prompt input[type=text] {\n padding: 0 4px;\n}\n\n.ProseMirror-prompt-close {\n position: absolute;\n left: 2px;\n top: 1px;\n color: #666;\n border: none;\n background: transparent;\n padding: 0;\n}\n.ProseMirror-prompt-close:after {\n content: \"✕\";\n font-size: 12px;\n}\n\n.ProseMirror-invalid {\n background: #ffc;\n border: 1px solid #cc7;\n border-radius: 4px;\n padding: 5px 10px;\n position: absolute;\n min-width: 10em;\n}\n\n.ProseMirror-prompt-buttons {\n margin-top: 5px;\n display: none;\n}\n\n#editor,\n.editor {\n color: rgb(101, 101, 101);\n background-clip: padding-box;\n border-radius: 4px;\n border: 2px solid rgba(0, 0, 0, 0.2);\n padding: 5px 0;\n display: flex;\n align-items: flex-end;\n}\n\n.icure-input {\n background: #edf2f7;\n border-radius: 8px;\n border: none;\n min-height: 28px;\n height: auto;\n display: flex;\n flex-flow: row nowrap;\n align-items: flex-start;\n justify-content: space-between;\n}\n\n#editor {\n background: transparent;\n border: none;\n padding: 0;\n flex-grow: 1;\n display: flex;\n align-items: stretch;\n}\n#editor.tokens-list .ProseMirror, #editor.styled-tokens-list .ProseMirror {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: flex-start;\n}\n#editor.tokens-list .ProseMirror li, #editor.styled-tokens-list .ProseMirror li {\n display: flex;\n flex-direction: row;\n border-radius: 8px;\n padding: 2px 4px;\n margin-right: 2px;\n background-color: #dadada;\n border-color: rgba(42, 61, 108, 0.44);\n min-height: 20px;\n}\n#editor.tokens-list .ProseMirror li span, #editor.styled-tokens-list .ProseMirror li span {\n display: inline-block;\n min-height: 18px;\n}\n#editor.tokens-list .ProseMirror li span br, #editor.styled-tokens-list .ProseMirror li span br {\n display: none;\n}\n#editor.items-list .ProseMirror {\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n align-items: flex-start;\n gap: 6px;\n}\n#editor.items-list .ProseMirror li {\n list-style-type: none;\n width: 100%;\n padding-bottom: 4px;\n border-bottom: 1px dotted rgba(128, 128, 128, 0.5098039216);\n}\n#editor.items-list .ProseMirror li:last-child {\n border-bottom: none;\n}\n\n#content {\n position: relative;\n padding: 0;\n}\n\n* {\n font-family: \"Roboto\", Helvetica, sans-serif;\n}\n\np {\n margin-top: 0;\n}\n\nh3 {\n color: #274768;\n margin-top: 0;\n}\n\n.icure-input-metadata-container {\n display: flex;\n}\n.icure-input-metadata-container .icure-metadata-container {\n display: flex;\n flex-grow: 1;\n padding: 0 4px;\n border: 1px solid #DDE3E7;\n border-left: none;\n border-radius: 0 6px 6px 0;\n outline: 0;\n box-sizing: border-box;\n}\n.icure-input-metadata-container .icure-metadata-container__validationError {\n border-color: red;\n}\n\n.extra {\n min-width: 20px;\n width: auto;\n height: 20px;\n transition: all 0.24s cubic-bezier(0.42, 0.01, 1, 0.62);\n}\n.extra:hover .info {\n display: none;\n}\n.extra:hover .buttons-container .menu-container .btn {\n animation: slideIn 0.24s ease-in forwards;\n pointer-events: none;\n display: unset !important;\n}\n.extra.forced .info, .extra.forced .extra .info.hidden {\n opacity: 0 !important;\n z-index: 0 !important;\n display: none;\n}\n.extra.forced .buttons-container .btn {\n opacity: 1 !important;\n display: unset !important;\n}\n.extra.forced:hover .buttons-container .menu-container .btn {\n animation: none;\n pointer-events: all;\n}\n.extra--metadataButtonsBar {\n height: 100%;\n display: flex;\n align-items: center;\n padding: 0 4px;\n}\n.extra .info {\n color: #809ab4;\n font-size: 15px;\n width: 100%;\n height: auto;\n overflow: hidden;\n pointer-events: none;\n text-align: center;\n}\n.extra .info span {\n font-weight: 700;\n}\n.extra .info.hidden {\n display: none;\n}\n.extra .buttons-container {\n display: flex;\n height: 20px;\n width: auto;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-end;\n transition: all 0.24s cubic-bezier(0.14, 0.69, 0.87, 0.54);\n z-index: 1000;\n}\n.extra .buttons-container .btn {\n border: none;\n background: transparent;\n position: relative;\n top: 0;\n display: none;\n opacity: 0;\n cursor: pointer;\n height: 20px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0;\n}\n.extra .buttons-container .btn svg {\n width: 15px;\n height: 15px;\n}\n.extra .buttons-container .btn svg path {\n fill: #809ab4;\n}\n.extra .buttons-container .btn.forced {\n opacity: 1 !important;\n display: unset !important;\n}\n.extra .buttons-container .btn.forced svg path {\n fill: crimson !important;\n}\n.extra .buttons-container .btn:focus, .extra .buttons-container .btn:focus-within {\n border: none;\n outline: none;\n}\n.extra .buttons-container .btn:hover svg path {\n fill: #274768;\n}\n.extra .buttons-container .menu-container .btn:hover::before {\n content: \"\";\n display: block;\n border-color: #274768 transparent transparent transparent;\n border-style: solid;\n border-width: 4px;\n position: absolute;\n top: -6px;\n}\n.extra .buttons-container .menu-container .btn:hover::after {\n content: attr(data-content);\n position: absolute;\n top: -21px;\n height: 16px;\n left: 50%;\n transform: translateX(-50%);\n border-radius: 8px;\n background: #274768;\n color: white;\n display: flex;\n flex-flow: row wrap;\n align-items: center;\n text-transform: capitalize;\n white-space: nowrap;\n padding: 0 12px;\n font-size: 12px;\n line-height: 0;\n}\n.extra .buttons-container .menu-container:last-child .btn {\n margin-right: 0;\n}\n\n@keyframes slideIn {\n 0% {\n top: 0;\n opacity: 0;\n pointer-events: none;\n }\n 100% {\n top: 0;\n opacity: 1;\n pointer-events: all;\n }\n}\n.menu-container {\n display: flex;\n align-items: center;\n height: fit-content;\n}\n.menu-container .item {\n height: 30px;\n width: 100%;\n background: transparent;\n border-radius: 4px;\n font-size: 14px;\n color: #274768;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n box-shadow: none;\n border: none;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n}\n.menu-container .item.existing {\n background-color: #BFE8EA;\n}\n.menu-container .item.selected {\n color: white;\n background-color: #084B83;\n}\n.menu-container .item:hover {\n background: #DCE7F2;\n color: #274768;\n font-weight: 500;\n border-radius: 4px;\n}\n\n.value-date-menu {\n width: unset !important;\n}\n\n.menu {\n display: flex;\n flex-direction: column;\n gap: 2px;\n position: absolute;\n top: 32px;\n right: -12px;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n border-radius: 8px;\n padding: 8px;\n width: 220px;\n min-height: 120px;\n max-height: 320px;\n overflow-y: scroll;\n}\n.menu .input-container {\n background: #edf2f7;\n border-radius: 4px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n height: 32px;\n margin-bottom: 4px;\n padding: 0 4px;\n}\n.menu .input-container:hover {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2);\n}\n.menu .input-container:focus-within {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2), 0 0 0 1px rgb(40, 151, 255);\n}\n.menu .input-container input {\n background: transparent;\n border: none;\n flex-grow: 1;\n height: 100%;\n}\n.menu .input-container input:focus {\n background: transparent;\n border: none;\n outline: none;\n}\n\n.menu-trigger:focus .menu {\n display: flex;\n}\n\nspan {\n position: relative;\n z-index: 1;\n}\nspan.date {\n margin-right: 1px;\n}\nspan.time {\n margin-left: 1px;\n}\nspan.measure {\n display: inline-block;\n margin-right: 1px;\n}\nspan.unit {\n margin-left: 1px;\n display: inline-block;\n}\nspan[data-content]:hover::after {\n position: absolute;\n content: attr(data-content);\n background: #274768;\n color: #ffffff;\n font-size: 9px;\n line-height: 12px;\n top: -12px;\n left: 0px;\n padding: 0px 2px;\n}\nspan[data-content]::before {\n position: absolute;\n content: \"\";\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: -1;\n opacity: 0.3;\n}\n\n.masked {\n display: none;\n}\n\n.companion {\n position: absolute;\n width: 15px;\n background-color: hsl(194, 100%, 50%);\n color: white;\n z-index: 20;\n padding: 0;\n text-align: center;\n font-size: 14px;\n font-weight: 500;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: 0 2px 2px 0;\n}\n.companion:hover {\n font-weight: 700;\n background: hsl(202, 100%, 50%);\n}\n\n*::selection {\n background-color: hsla(194, 100%, 50%, 0.2);\n}\n\n.suggestion-palette {\n position: absolute;\n z-index: 20;\n max-width: 380px;\n font-size: 11px;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 4px;\n border: none;\n border-radius: 8px;\n background: white;\n box-shadow: 0 1.1px 1.1px rgba(0, 0, 0, 0.022), 0 2.7px 2.7px rgba(0, 0, 0, 0.032), 0 5px 5px rgba(0, 0, 0, 0.04), 0 8.9px 8.9px rgba(0, 0, 0, 0.048), 0 16.7px 16.7px rgba(0, 0, 0, 0.058), 0 40px 40px rgba(0, 0, 0, 0.08);\n}\n.suggestion-palette ul {\n white-space: nowrap;\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n.suggestion-palette ul li:not(:first-child) svg.tab-icn,\n.suggestion-palette ul li:not(.focused) svg.return-icn, .suggestion-palette ul.focused li:first-child svg.tab-icn {\n height: 0;\n width: 0;\n transform: scale(0);\n opacity: 0;\n}\n.suggestion-palette ul li {\n padding: 0 8px;\n font-size: 11px;\n height: 20px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-radius: 4px;\n color: rgb(39, 71, 104);\n}\n.suggestion-palette ul li.focused {\n background-color: rgb(237, 242, 247);\n}\n.suggestion-palette ul li.focused svg.return-icn {\n animation: growIn 0.24s ease-in forwards;\n}\n.suggestion-palette ul li svg {\n height: 12px;\n width: 12px;\n border-radius: 4px;\n transform-origin: center center;\n}\n.suggestion-palette ul li svg path {\n fill: rgb(128, 154, 180);\n}\n\n@keyframes growIn {\n 0% {\n transform: scale(0.5);\n }\n 90% {\n transform: scale(1.1);\n }\n 100% {\n transform: scale(1);\n }\n}\nspan.code-count-1::after,\nspan.code-count-1::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n}\n\nspan.code-count-2::after,\nspan.code-count-2::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n /*background: repeating-linear-gradient(*/\n /*\t45deg,*/\n /*\tvar(--bg-code-color-1),*/\n /*\tvar(--bg-code-color-1) 10px,*/\n /*\tvar(--bg-code-color-2) 10px,*/\n /*\tvar(--bg-code-color-2) 20px*/\n /*);*/\n /* PAS STRIPES */\n background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);\n}\n\nspan.code-count-3::after,\nspan.code-count-3::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n background: repeating-linear-gradient(45deg, var(--bg-code-color-1), var(--bg-code-color-1) 10px, var(--bg-code-color-2) 10px, var(--bg-code-color-2) 20px);\n /* PAS STRIPES */\n /* background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);*/\n}\n\n.selected-option {\n padding: 2px;\n margin-right: 5px;\n}\n\n.options {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: calc(100% + 6px);\n left: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n width: auto;\n min-width: 100%;\n overflow-y: auto;\n padding: 2px;\n border-radius: 6px;\n}\n.options--subformView {\n top: 46px;\n min-width: unset;\n left: unset;\n right: 0;\n}\n\n.date-picker {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: calc(100% + 6px);\n left: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n width: 260px;\n overflow-y: auto;\n max-height: 280px;\n}\n\napp-date-picker {\n --app-primary: #084B83;\n --app-hover: #5b7da2;\n --app-selected-hover: #5b7da2;\n}\n\n.option {\n height: 28px;\n min-height: 28px;\n width: 100%;\n background: transparent;\n border-radius: 4px;\n font-size: 14px;\n color: #545454;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n box-shadow: none;\n border: none;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n padding: 4px 8px;\n -webkit-user-select: none; /* Safari */\n -ms-user-select: none; /* IE 10 and IE 11 */\n user-select: none; /* Standard syntax */\n cursor: pointer;\n}\n.option:hover {\n color: #656565;\n background-color: #ededed;\n}\n\n.select-arrow {\n border: none;\n background: 0px 0px;\n position: relative;\n top: 0px;\n opacity: 0.5;\n cursor: pointer;\n height: 20px;\n width: 10px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0px;\n}\n\n.hidden {\n display: none;\n}\n\n.container {\n position: relative;\n}\n\n.group {\n align-items: end;\n display: grid;\n}\n\n.subform {\n display: grid;\n position: relative;\n padding: 8px;\n border-radius: 6px;\n background-color: #e7f0fd;\n gap: 12px;\n}\n.subform__heading {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: auto;\n}\n.subform__heading__title {\n padding: 0;\n margin: 0;\n}\n.subform__addBtn, .subform__removeBtn {\n cursor: pointer;\n background-color: #084B83;\n color: white;\n height: 32px;\n padding: 0 16px;\n border-radius: 6px;\n border: none;\n outline: none;\n}\n.subform__addBtn:hover, .subform__removeBtn:hover {\n background-color: #3D87C5;\n}\n.subform__removeBtn {\n justify-self: end;\n border: 1px solid #DDE3E7;\n background-color: #FCFCFD;\n color: #084B83;\n}\n.subform__removeBtn:hover {\n background-color: #F2F2F2;\n}\n.subform__child {\n display: grid;\n grid-template-rows: auto;\n gap: 8px;\n padding: 8px;\n border-radius: 6px;\n background: white;\n border: 1px solid #3D87C5;\n}\n.subform__child__title {\n padding: 12px !important;\n border-radius: 6px;\n margin: 0;\n background-color: #BFE8EA;\n}\n.subform__child .subform {\n background: unset;\n margin: 0;\n padding: 0;\n}\n\n.icure-form {\n background-color: rgba(0, 0, 0, 0);\n display: grid;\n gap: 16px 6px;\n grid-template-columns: repeat(24, 1fr);\n}\n.icure-form hr {\n display: block;\n margin-top: 20px;\n border-top: 1px solid rgba(8, 75, 131, 0.13);\n margin-bottom: 20px;\n}\n.icure-form h2 {\n font-size: 14.4px;\n font-weight: 700;\n color: #084B83;\n padding: 2px;\n}\n.icure-form h3 {\n font-size: 13.2px;\n font-weight: 500;\n color: #084B83;\n padding: 6px;\n}\n.icure-form .group.bordered {\n background: #f6f6f6;\n border-radius: 12px;\n}\n\n.icure-form-field {\n display: grid;\n align-items: flex-start;\n}\n\n.error {\n color: red;\n font-size: 12px;\n margin-top: 4px;\n}\n\n.icure-text-field .icure-label-extra, .icure-button-group .icure-label-extra {\n display: flex;\n width: 100%;\n gap: 12px;\n}\n.icure-text-field .icure-label, .icure-button-group .icure-label {\n z-index: 1;\n pointer-events: none;\n line-height: 1.4em;\n cursor: text;\n font-size: 12px;\n left: 9px;\n color: #084B83;\n align-items: center;\n height: 28px;\n max-width: 85%;\n min-width: 0;\n}\n.icure-text-field .icure-label.float, .icure-button-group .icure-label.float {\n display: flex;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.icure-text-field {\n position: relative;\n width: 100%;\n}\n.icure-text-field > .icure-label {\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n}\n.icure-text-field > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n.icure-text-field > .icure-label.side {\n position: relative;\n}\n.icure-text-field > .icure-label.side.left {\n order: -1;\n margin-right: 1em;\n}\n.icure-text-field > .icure-label.side.right {\n order: 1;\n margin-left: 1em;\n}\n.icure-text-field .icure-input,\n.icure-text-field .input-container {\n padding: 8px;\n width: 100%;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n border-color: #DDE3E7;\n border-radius: 2px;\n box-sizing: border-box;\n outline: 0;\n font: inherit;\n font-size: 14px;\n line-height: 1.4em;\n display: flex;\n align-items: center;\n vertical-align: middle;\n position: relative;\n -webkit-appearance: none;\n background-color: #ffffff;\n color: #000000;\n}\n.icure-text-field .icure-input__validationError,\n.icure-text-field .input-container__validationError {\n border-color: red;\n}\n.icure-text-field .icure-input__withMetadata,\n.icure-text-field .input-container__withMetadata {\n border-radius: 6px 0 0 6px;\n}\n.icure-text-field .icure-input:focus, .icure-text-field .icure-input:focus-within,\n.icure-text-field .input-container:focus,\n.icure-text-field .input-container:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.icure-text-field .icure-input:hover,\n.icure-text-field .input-container:hover {\n border-color: rgba(0, 0, 0, 0.15);\n box-shadow: none;\n}\n.icure-text-field .icure-input:hover:focus, .icure-text-field .icure-input:hover:focus-within,\n.icure-text-field .input-container:hover:focus,\n.icure-text-field .input-container:hover:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.icure-text-field .icure-input .ProseMirror,\n.icure-text-field .input-container .ProseMirror {\n padding: 0;\n font-size: 14px;\n line-height: 1.4em;\n color: #000000;\n}\n.icure-text-field .icure-input .ProseMirror .date,\n.icure-text-field .input-container .ProseMirror .date {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror .time,\n.icure-text-field .input-container .ProseMirror .time {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror:focus .focused,\n.icure-text-field .input-container .ProseMirror:focus .focused {\n background-color: rgba(0, 0, 0, 0.05);\n border-radius: 3px;\n border-color: rgba(0, 0, 0, 0.1);\n}\n.icure-text-field .icure-input > svg,\n.icure-text-field .input-container > svg {\n opacity: 0.5;\n}\n.icure-text-field .icure-input > svg path,\n.icure-text-field .input-container > svg path {\n fill: #656565;\n}\n.icure-text-field .icure-input .extra,\n.icure-text-field .input-container .extra {\n height: 20px;\n}\n.icure-text-field .icure-input .extra > .info,\n.icure-text-field .input-container .extra > .info {\n color: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .btn svg path,\n.icure-text-field .input-container .extra .btn svg path {\n fill: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .btn svg path:hover,\n.icure-text-field .input-container .extra .btn svg path:hover {\n fill: #656565;\n opacity: 1;\n}\n\ninput[type=radio] {\n margin-top: -1px;\n vertical-align: middle;\n}\n\n.icure-checkbox:checked {\n accent-color: #06a070;\n}\n\n.icure-button {\n display: flex;\n height: 32px;\n padding: 0 16px;\n background-color: #084B83;\n color: white;\n border-radius: 6px;\n cursor: pointer;\n font-size: 14px;\n font-weight: normal;\n}\n.icure-button:hover {\n background-color: #3D87C5;\n}\n\n.icure-button-group {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.icure-button-group > div {\n display: grid;\n}\n.icure-button-group > div > div {\n display: flex;\n align-items: center;\n}\n.icure-button-group > div > div > .icure-button-group-label {\n z-index: 1;\n line-height: 1.4em;\n cursor: text;\n font-size: 12px;\n top: calc(1.4em + 1px);\n left: 9px;\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n color: #084B83;\n display: flex;\n align-items: center;\n height: 28px;\n max-width: 85%;\n min-width: 0;\n}\n.icure-button-group > div > div > .icure-button-group-label > span {\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding-right: 8px;\n}\n.icure-button-group > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n.icure-button-group > .icure-label {\n transform: translate(0, 0) scale(1);\n}\n.icure-button-group > .icure-label.above, .icure-button-group.has-content > .icure-label, .icure-button-group:focus > .icure-label, .icure-button-group:focus-within > .icure-label {\n font-weight: 500;\n height: 1.4em;\n}` \n\nexport class MetadataButtonBar extends LitElement {\n\t@property() valueId: string\n\t@property() metadata: FieldMetadata\n\t@property() revision: string\n\t@property() versions: Version<FieldValue>[]\n\t@property() defaultLanguage: string\n\t@property() selectedLanguage?: string\n\t@property() languages: { [iso: string]: string } = {}\n\t@property() existingLanguages?: string[]\n\t@property() displayedLabels: { [iso: string]: string } = {}\n\t@property() handleMetadataChanged?: (metadata: FieldMetadata, id?: string) => string | undefined = undefined\n\t@property() handleLanguageSelected?: (iso?: string) => void = undefined\n\t@property() handleRevisionSelected?: (rev?: string | null) => void = undefined\n\t@property() ownersProvider: (terms: string[], ids?: string[], specialties?: string[]) => Promise<Suggestion[]> = async () => []\n\n\t@state() protected displayOwnersMenu = false\n\t@state() protected ownerInputValue = ''\n\t@state() protected availableOwners: Suggestion[] = []\n\t@state() protected loadedOwners: { [id: string]: Suggestion } = {}\n\n\t@state() protected displayLanguagesMenu = false\n\t@state() protected displayVersionsMenu = false\n\t@state() protected displayValueDateMenu = false\n\t@state() protected languageInputValue = ''\n\n\tstatic get styles() {\n\t\treturn [baseCss]\n\t}\n\n\t_handleClickOutside(event: MouseEvent): void {\n\t\tif (!event.composedPath().includes(this)) {\n\t\t\tthis.displayVersionsMenu = false\n\t\t\tthis.displayLanguagesMenu = false\n\t\t\tthis.displayOwnersMenu = false\n\t\t\tthis.displayValueDateMenu = 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\trender() {\n\t\tconst revisionDate = this.versions.find((x) => x.revision === this.revision)?.modified\n\n\t\tconst owner = this.metadata?.owner\n\t\tif (owner && !this.loadedOwners[owner]) {\n\t\t\tthis.loadedOwners = { ...this.loadedOwners, [owner]: { id: owner, text: '', terms: [], label: {} } } // Make sure we do not loop endlessly\n\t\t\tthis.ownersProvider &&\n\t\t\t\tthis.ownersProvider([], [owner]).then((availableOwners) => (this.loadedOwners = availableOwners.reduce((acc, o) => ({ ...acc, [o.id]: o }), this.loadedOwners)))\n\t\t}\n\n\t\tconst forcedByMenu = this.displayOwnersMenu || this.displayLanguagesMenu || this.displayValueDateMenu || this.displayVersionsMenu\n\n\t\tconst discordantMetadata = this.metadata?.discordantMetadata?.()\n\n\t\tconst forcedByOwner = discordantMetadata?.owner !== undefined\n\t\tconst forcedByValueDate = discordantMetadata?.valueDate !== undefined\n\t\tconst forcedByLanguage = this.selectedLanguage && this.defaultLanguage !== this.selectedLanguage\n\t\tconst forcedByVersion = this.revision && this.revision !== this.versions?.[0]?.revision\n\n\t\treturn html` <div id=\"extra\" class=${'extra extra--metadataButtonsBar' + (forcedByMenu ? ' forced' : '')}>\n\t\t\t<div class=\"info ${forcedByOwner || forcedByLanguage || forcedByValueDate ? 'hidden' : ''}\">&#9432</div>\n\t\t\t<div class=\"buttons-container\">\n\t\t\t\t<div class=\"menu-container\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tdata-content=\"${(this.metadata?.owner ? this.loadedOwners[this.metadata?.owner]?.text : '') ?? ''}\"\n\t\t\t\t\t\t@click=\"${() => this.toggleOwnersMenu(this.metadata?.owner)}\"\n\t\t\t\t\t\tclass=\"btn menu-trigger author ${forcedByOwner ? 'forced' : ''}\"\n\t\t\t\t\t>\n\t\t\t\t\t\t${ownerPicto}\n\t\t\t\t\t</button>\n\t\t\t\t\t${\n\t\t\t\t\t\tthis.displayOwnersMenu\n\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t<div id=\"menu\" class=\"menu\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-container\">${searchPicto} <input id=\"ownerSearch\" @input=\"${this.searchOwner}\" /></div>\n\t\t\t\t\t\t\t\t\t\t${(this.availableOwners?.length ? this.availableOwners : Object.values(this.loadedOwners))?.map(\n\t\t\t\t\t\t\t\t\t\t\t(x) => html` <button\n\t\t\t\t\t\t\t\t\t\t\t\t@click=\"${() => this.handleOwnerButtonClicked(x.id)}\"\n\t\t\t\t\t\t\t\t\t\t\t\tid=\"${x.id}\"\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"${this.metadata?.owner && this.loadedOwners[this.metadata?.owner]?.text === x.text ? 'item selected' : 'item'}\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t${x.text}\n\t\t\t\t\t\t\t\t\t\t\t</button>`,\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t `\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"menu-container\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tdata-content=\"${this.metadata?.valueDate ? format(anyDateToDate(this.metadata.valueDate)!, 'yyyy-MM-dd HH:mm:ss').replace(/ 00:00:00$/, '') : ''}\"\n\t\t\t\t\t\tclass=\"btn date ${forcedByValueDate ? 'forced' : ''}\"\n\t\t\t\t\t\t@click=\"${() => this.toggleValueDateMenu()}\"\n\t\t\t\t\t>\n\t\t\t\t\t\t${calendarPatientPicto}\n\t\t\t\t\t</button>\n\t\t\t\t\t${\n\t\t\t\t\t\tthis.displayValueDateMenu\n\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t<div id=\"menu\" class=\"menu value-date-menu\">\n\t\t\t\t\t\t\t\t\t\t<app-date-picker\n\t\t\t\t\t\t\t\t\t\t\tlocale=\"${this.defaultLanguage ?? 'en'}\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"\"\n\t\t\t\t\t\t\t\t\t\t\tmax=\"${MAX_DATE}\"\n\t\t\t\t\t\t\t\t\t\t\tmin=\"${toResolvedDate('1900-01-01')}\"\n\t\t\t\t\t\t\t\t\t\t\t@date-updated=\"${this.dateUpdated}\"\n\t\t\t\t\t\t\t\t\t\t></app-date-picker>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t `\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"menu-container\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tdata-content=\"${\n\t\t\t\t\t\t\tthis.revision === null\n\t\t\t\t\t\t\t\t? 'latest'\n\t\t\t\t\t\t\t\t: this.revision\n\t\t\t\t\t\t\t\t? `rev-${this.revision.split('-')[0]} ${revisionDate ? `(${format(new Date(revisionDate), 'yyyy-MM-dd')})` : ''}`\n\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t@click=\"${this.toggleVersionsMenu}\"\n\t\t\t\t\t\tclass=\"btn version ${forcedByVersion ? 'forced' : ''}\"\n\t\t\t\t\t>\n\t\t\t\t\t\t${versionPicto}\n\t\t\t\t\t</button>\n\t\t\t\t\t${\n\t\t\t\t\t\tthis.displayVersionsMenu\n\t\t\t\t\t\t\t? html` <div id=\"menu\" class=\"menu\">\n\t\t\t\t\t\t\t\t\t${this.versions.map(\n\t\t\t\t\t\t\t\t\t\t(x) =>\n\t\t\t\t\t\t\t\t\t\t\thtml` <button class=\"item ${x.revision === this.revision ? 'item selected' : ''}\" @click=\"${() => this.handleRevisionButtonClicked(x.revision)}\">\n\t\t\t\t\t\t\t\t\t\t\t\t${x.revision == null ? 'Latest' : x.revision ?? ''} ${x.modified ? `(${format(new Date(x.modified), 'yyyy-MM-dd')})` : ''}\n\t\t\t\t\t\t\t\t\t\t\t</button>`,\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t </div>`\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"menu-container\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tdata-content=\"${this.selectedLanguage ? languageName(this.selectedLanguage) ?? this.selectedLanguage : languageName(this.defaultLanguage) ?? this.defaultLanguage}\"\n\t\t\t\t\t\t@click=\"${this.toggleLanguagesMenu}\"\n\t\t\t\t\t\tclass=\"btn menu-trigger language ${forcedByLanguage ? 'forced' : ''}\"\n\t\t\t\t\t>\n\t\t\t\t\t\t${i18nPicto}\n\t\t\t\t\t</button>\n\t\t\t\t\t${\n\t\t\t\t\t\tthis.displayLanguagesMenu\n\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t<div id=\"menu\" class=\"menu\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-container\">${searchPicto} <input id=\"languageSearch\" @input=\"${this.searchLanguage}\" /></div>\n\t\t\t\t\t\t\t\t\t\t${[this.defaultLanguage, ...Object.keys(this.languages).filter((x) => x !== this.defaultLanguage)]\n\t\t\t\t\t\t\t\t\t\t\t.filter((x) => !!x && (languageName(x) ?? this.languages[x] ?? x).toLowerCase().includes((this.languageInputValue ?? '').toLowerCase()))\n\t\t\t\t\t\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t\t\t\t\t\t(x) => html` <button\n\t\t\t\t\t\t\t\t\t\t\t\t\t@click=\"${() => this.handleLanguageButtonClicked(x)}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"${x}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"${(x === this.defaultLanguage && !this.selectedLanguage) || x === this.selectedLanguage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'item item selected'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: this.existingLanguages?.includes(x)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'item item existing'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'item'}\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t${x ? languageName(x) : ''}\n\t\t\t\t\t\t\t\t\t\t\t\t</button>`,\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t `\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>`\n\t}\n\n\ttoggleOwnersMenu(ownerId?: string) {\n\t\tthis.displayOwnersMenu = !this.displayOwnersMenu\n\t\tif (this.displayOwnersMenu) {\n\t\t\tthis.displayLanguagesMenu = false\n\t\t\tthis.displayVersionsMenu = false\n\t\t\tthis.displayValueDateMenu = false\n\n\t\t\tsetTimeout(() => {\n\t\t\t\t;(this.renderRoot.querySelector('#ownerSearch') as HTMLInputElement)?.focus()\n\t\t\t}, 0)\n\t\t}\n\t}\n\n\tsearchOwner(e: InputEvent) {\n\t\tconst text = (e.target as HTMLInputElement).value\n\t\tsetTimeout(async () => {\n\t\t\tif ((this.renderRoot.querySelector('#ownerSearch') as HTMLInputElement)?.value === text) {\n\t\t\t\tif (this.ownersProvider) {\n\t\t\t\t\tconst availableOwners = await this.ownersProvider(text.split(' '))\n\t\t\t\t\tconsole.log(availableOwners)\n\t\t\t\t\tthis.availableOwners = availableOwners\n\t\t\t\t}\n\t\t\t}\n\t\t}, 300)\n\t}\n\n\tsearchLanguage(e: InputEvent) {\n\t\tthis.languageInputValue = (e.target as HTMLInputElement).value\n\t}\n\n\thandleOwnerButtonClicked(id: string) {\n\t\tconst valueId = this.valueId\n\t\tthis.handleMetadataChanged && valueId && this.handleMetadataChanged({ label: this.metadata.label, owner: id })\n\t\tthis.displayOwnersMenu = false\n\t}\n\n\thandleLanguageButtonClicked(id: string) {\n\t\tthis.handleLanguageSelected?.(id)\n\t\tthis.displayOwnersMenu = false\n\t}\n\n\thandleRevisionButtonClicked(rev?: string | null) {\n\t\tthis.handleRevisionSelected?.(rev)\n\t\tthis.displayVersionsMenu = false\n\t}\n\n\ttoggleValueDateMenu() {\n\t\tthis.displayValueDateMenu = !this.displayValueDateMenu\n\t\tif (this.displayValueDateMenu) {\n\t\t\tthis.displayOwnersMenu = false\n\t\t\tthis.displayLanguagesMenu = false\n\t\t\tthis.displayVersionsMenu = false\n\t\t}\n\t}\n\n\tdateUpdated(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\t\t\tconst valueId = this.valueId\n\t\t\tthis.handleMetadataChanged && this.handleMetadataChanged({ label: this.metadata.label, valueDate: fuzzyDateValue * 1000000 }, valueId)\n\t\t\tthis.displayOwnersMenu = false\n\t\t}\n\t}\n\n\ttoggleLanguagesMenu() {\n\t\tthis.displayLanguagesMenu = !this.displayLanguagesMenu\n\t\tif (this.displayLanguagesMenu) {\n\t\t\tthis.displayOwnersMenu = false\n\t\t\tthis.displayVersionsMenu = false\n\t\t\tthis.displayValueDateMenu = false\n\t\t}\n\t}\n\n\ttoggleVersionsMenu() {\n\t\tthis.displayVersionsMenu = !this.displayVersionsMenu\n\t\tif (this.displayVersionsMenu) {\n\t\t\tthis.displayOwnersMenu = false\n\t\t\tthis.displayLanguagesMenu = false\n\t\t\tthis.displayValueDateMenu = false\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"file":"metadata-buttons-bar.js","sourceRoot":"","sources":["../../../tmp/components/common/metadata-buttons-bar.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,6BAAsC;AACtC,qDAAmD;AAGnD,0CAAuG;AACvG,uCAAiC;AACjC,6CAAiD;AACjD,sGAA6F;AAE7F,gFAAwE;AACxE,qDAAoD;AAEpD,aAAa;AACb,6BAA0B;AAC1B,MAAM,OAAO,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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K,GAAE;;+DAAuC;AAC5B;IAAlB,IAAA,qBAAK,GAAE;;6DAAkC","sourcesContent":["import { html, LitElement } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { FieldMetadata, FieldValue } from '../model'\nimport { Suggestion, Version } from '../../generic'\nimport { calendarPatientPicto, i18nPicto, ownerPicto, searchPicto, versionPicto } from './styles/paths'\nimport { format } from 'date-fns'\nimport { anyDateToDate } from '../../utils/dates'\nimport { toResolvedDate } from '@icure/motss-app-datepicker/dist/helpers/to-resolved-date.js'\nimport { CustomEventDetail } from '@icure/motss-app-datepicker/dist/typings.js'\nimport { MAX_DATE } from '@icure/motss-app-datepicker/dist/constants.js'\nimport { languageName } from '../../utils/languages'\n\n// @ts-ignore\nimport { css } from 'lit';\nconst baseCss = css`@charset \"UTF-8\";\n:host {\n --bg-color-1: #f44336;\n}\n\n.ProseMirror {\n position: relative;\n width: 100%;\n word-wrap: break-word;\n white-space: pre-wrap;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n padding: 6px 8px 2px 8px;\n line-height: 1.2;\n color: #274768;\n font-size: 14px;\n font-weight: 400;\n outline: none;\n}\n.ProseMirror p:last-child,\n.ProseMirror h1:last-child,\n.ProseMirror h2:last-child,\n.ProseMirror h3:last-child,\n.ProseMirror h4:last-child,\n.ProseMirror h5:last-child,\n.ProseMirror h6:last-child {\n margin-bottom: 2px;\n}\n.ProseMirror p {\n margin-bottom: 1em;\n}\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n.ProseMirror li {\n position: relative;\n}\n.ProseMirror ul,\n.ProseMirror ol {\n padding-left: 30px;\n}\n.ProseMirror blockquote {\n padding-left: 1em;\n border-left: 3px solid #eee;\n margin-left: 0;\n margin-right: 0;\n}\n\n.ProseMirror-hideselection {\n caret-color: transparent;\n}\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n/* Make sure li selections wrap around markers */\nli.ProseMirror-selectednode {\n outline: none;\n}\nli.ProseMirror-selectednode :after {\n content: \"\";\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid #8cf;\n pointer-events: none;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n/* Add space around the hr to make clicking it easier */\n.ProseMirror-example-setup-style hr {\n padding: 2px 10px;\n border: none;\n margin: 1em 0;\n}\n.ProseMirror-example-setup-style hr:after {\n content: \"\";\n display: block;\n height: 1px;\n background: silver;\n line-height: 2px;\n}\n\n.ProseMirror-example-setup-style img {\n cursor: default;\n}\n\n.ProseMirror-prompt {\n background: white;\n padding: 5px 10px 5px 15px;\n border: 1px solid silver;\n position: fixed;\n border-radius: 3px;\n z-index: 11;\n box-shadow: -0.5px 2px 5px rgba(0, 0, 0, 0.2);\n}\n.ProseMirror-prompt h5 {\n margin: 0;\n font-weight: normal;\n font-size: 100%;\n color: #444;\n}\n.ProseMirror-prompt input[type=text],\n.ProseMirror-prompt textarea {\n background: #eee;\n border: none;\n outline: none;\n}\n.ProseMirror-prompt input[type=text] {\n padding: 0 4px;\n}\n\n.ProseMirror-prompt-close {\n position: absolute;\n left: 2px;\n top: 1px;\n color: #666;\n border: none;\n background: transparent;\n padding: 0;\n}\n.ProseMirror-prompt-close:after {\n content: \"✕\";\n font-size: 12px;\n}\n\n.ProseMirror-invalid {\n background: #ffc;\n border: 1px solid #cc7;\n border-radius: 4px;\n padding: 5px 10px;\n position: absolute;\n min-width: 10em;\n}\n\n.ProseMirror-prompt-buttons {\n margin-top: 5px;\n display: none;\n}\n\n#editor,\n.editor {\n color: rgb(101, 101, 101);\n background-clip: padding-box;\n border-radius: 4px;\n border: 2px solid rgba(0, 0, 0, 0.2);\n padding: 5px 0;\n display: flex;\n align-items: flex-end;\n}\n\n.icure-input {\n background: #edf2f7;\n border-radius: 8px;\n border: none;\n min-height: 28px;\n height: auto;\n display: flex;\n flex-flow: row nowrap;\n align-items: flex-start;\n justify-content: space-between;\n}\n\n#editor {\n background: transparent;\n border: none;\n padding: 0;\n flex-grow: 1;\n display: flex;\n align-items: stretch;\n}\n#editor.tokens-list .ProseMirror, #editor.styled-tokens-list .ProseMirror {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: flex-start;\n}\n#editor.tokens-list .ProseMirror li, #editor.styled-tokens-list .ProseMirror li {\n display: flex;\n flex-direction: row;\n border-radius: 8px;\n padding: 2px 4px;\n margin-right: 2px;\n background-color: #dadada;\n border-color: rgba(42, 61, 108, 0.44);\n min-height: 20px;\n}\n#editor.tokens-list .ProseMirror li span, #editor.styled-tokens-list .ProseMirror li span {\n display: inline-block;\n min-height: 18px;\n}\n#editor.tokens-list .ProseMirror li span br, #editor.styled-tokens-list .ProseMirror li span br {\n display: none;\n}\n#editor.items-list .ProseMirror {\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n align-items: flex-start;\n gap: 6px;\n}\n#editor.items-list .ProseMirror li {\n list-style-type: none;\n width: 100%;\n padding-bottom: 4px;\n border-bottom: 1px dotted rgba(128, 128, 128, 0.5098039216);\n}\n#editor.items-list .ProseMirror li:last-child {\n border-bottom: none;\n}\n\n#content {\n position: relative;\n padding: 0;\n}\n\n* {\n font-family: \"Roboto\", Helvetica, sans-serif;\n}\n\np {\n margin-top: 0;\n}\n\nh3 {\n color: #274768;\n margin-top: 0;\n}\n\n.icure-input-metadata-container {\n display: flex;\n}\n.icure-input-metadata-container .icure-metadata-container {\n display: flex;\n flex-grow: 1;\n padding: 0 4px;\n border: 1px solid #DDE3E7;\n border-left: none;\n border-radius: 0 6px 6px 0;\n outline: 0;\n box-sizing: border-box;\n}\n.icure-input-metadata-container .icure-metadata-container__validationError {\n border-color: red;\n}\n\n.extra {\n min-width: 20px;\n width: auto;\n height: 20px;\n transition: all 0.24s cubic-bezier(0.42, 0.01, 1, 0.62);\n}\n.extra:hover .info {\n display: none;\n}\n.extra:hover .buttons-container .menu-container .btn {\n animation: slideIn 0.24s ease-in forwards;\n pointer-events: none;\n display: unset !important;\n}\n.extra.forced .info, .extra.forced .extra .info.hidden {\n opacity: 0 !important;\n z-index: 0 !important;\n display: none;\n}\n.extra.forced .buttons-container .btn {\n opacity: 1 !important;\n display: unset !important;\n}\n.extra.forced:hover .buttons-container .menu-container .btn {\n animation: none;\n pointer-events: all;\n}\n.extra--metadataButtonsBar {\n height: 100%;\n display: flex;\n align-items: center;\n padding: 0 4px;\n}\n.extra .info {\n color: #809ab4;\n font-size: 15px;\n width: 100%;\n height: auto;\n overflow: hidden;\n pointer-events: none;\n text-align: center;\n}\n.extra .info span {\n font-weight: 700;\n}\n.extra .info.hidden {\n display: none;\n}\n.extra .buttons-container {\n display: flex;\n height: 20px;\n width: auto;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-end;\n transition: all 0.24s cubic-bezier(0.14, 0.69, 0.87, 0.54);\n z-index: 1000;\n}\n.extra .buttons-container .btn {\n border: none;\n background: transparent;\n position: relative;\n top: 0;\n display: none;\n opacity: 0;\n cursor: pointer;\n height: 20px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0;\n}\n.extra .buttons-container .btn svg {\n width: 15px;\n height: 15px;\n}\n.extra .buttons-container .btn svg path {\n fill: #809ab4;\n}\n.extra .buttons-container .btn.forced {\n opacity: 1 !important;\n display: unset !important;\n}\n.extra .buttons-container .btn.forced svg path {\n fill: crimson !important;\n}\n.extra .buttons-container .btn:focus, .extra .buttons-container .btn:focus-within {\n border: none;\n outline: none;\n}\n.extra .buttons-container .btn:hover svg path {\n fill: #274768;\n}\n.extra .buttons-container .menu-container .btn:hover::before {\n content: \"\";\n display: block;\n border-color: #274768 transparent transparent transparent;\n border-style: solid;\n border-width: 4px;\n position: absolute;\n top: -6px;\n}\n.extra .buttons-container .menu-container .btn:hover::after {\n content: attr(data-content);\n position: absolute;\n top: -21px;\n height: 16px;\n left: 50%;\n transform: translateX(-50%);\n border-radius: 8px;\n background: #274768;\n color: white;\n display: flex;\n flex-flow: row wrap;\n align-items: center;\n text-transform: capitalize;\n white-space: nowrap;\n padding: 0 12px;\n font-size: 12px;\n line-height: 0;\n}\n.extra .buttons-container .menu-container:last-child .btn {\n margin-right: 0;\n}\n\n@keyframes slideIn {\n 0% {\n top: 0;\n opacity: 0;\n pointer-events: none;\n }\n 100% {\n top: 0;\n opacity: 1;\n pointer-events: all;\n }\n}\n.menu-container {\n display: flex;\n align-items: center;\n height: fit-content;\n}\n.menu-container .item {\n height: 30px;\n width: 100%;\n background: transparent;\n border-radius: 4px;\n font-size: 14px;\n color: #274768;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n box-shadow: none;\n border: none;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n}\n.menu-container .item.existing {\n background-color: #BFE8EA;\n}\n.menu-container .item.selected {\n color: white;\n background-color: #084B83;\n}\n.menu-container .item:hover {\n background: #DCE7F2;\n color: #274768;\n font-weight: 500;\n border-radius: 4px;\n}\n\n.value-date-menu {\n width: unset !important;\n}\n\n.menu {\n display: flex;\n flex-direction: column;\n gap: 2px;\n position: absolute;\n top: 32px;\n right: -12px;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n border-radius: 8px;\n padding: 8px;\n width: 220px;\n min-height: 120px;\n max-height: 320px;\n overflow-y: scroll;\n}\n.menu .input-container {\n background: #edf2f7;\n border-radius: 4px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n height: 32px;\n margin-bottom: 4px;\n padding: 0 4px;\n}\n.menu .input-container:hover {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2);\n}\n.menu .input-container:focus-within {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2), 0 0 0 1px rgb(40, 151, 255);\n}\n.menu .input-container input {\n background: transparent;\n border: none;\n flex-grow: 1;\n height: 100%;\n}\n.menu .input-container input:focus {\n background: transparent;\n border: none;\n outline: none;\n}\n\n.menu-trigger:focus .menu {\n display: flex;\n}\n\nspan {\n position: relative;\n z-index: 1;\n}\nspan.date {\n margin-right: 1px;\n}\nspan.time {\n margin-left: 1px;\n}\nspan.measure {\n display: inline-block;\n margin-right: 1px;\n}\nspan.unit {\n margin-left: 1px;\n display: inline-block;\n}\nspan[data-content]:hover::after {\n position: absolute;\n content: attr(data-content);\n background: #274768;\n color: #ffffff;\n font-size: 9px;\n line-height: 12px;\n top: -12px;\n left: 0px;\n padding: 0px 2px;\n}\nspan[data-content]::before {\n position: absolute;\n content: \"\";\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: -1;\n opacity: 0.3;\n}\n\n.masked {\n display: none;\n}\n\n.companion {\n position: absolute;\n width: 15px;\n background-color: hsl(194, 100%, 50%);\n color: white;\n z-index: 20;\n padding: 0;\n text-align: center;\n font-size: 14px;\n font-weight: 500;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: 0 2px 2px 0;\n}\n.companion:hover {\n font-weight: 700;\n background: hsl(202, 100%, 50%);\n}\n\n*::selection {\n background-color: hsla(194, 100%, 50%, 0.2);\n}\n\n.suggestion-palette {\n position: absolute;\n z-index: 20;\n max-width: 380px;\n font-size: 11px;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 4px;\n border: none;\n border-radius: 8px;\n background: white;\n box-shadow: 0 1.1px 1.1px rgba(0, 0, 0, 0.022), 0 2.7px 2.7px rgba(0, 0, 0, 0.032), 0 5px 5px rgba(0, 0, 0, 0.04), 0 8.9px 8.9px rgba(0, 0, 0, 0.048), 0 16.7px 16.7px rgba(0, 0, 0, 0.058), 0 40px 40px rgba(0, 0, 0, 0.08);\n}\n.suggestion-palette ul {\n white-space: nowrap;\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n.suggestion-palette ul li:not(:first-child) svg.tab-icn,\n.suggestion-palette ul li:not(.focused) svg.return-icn, .suggestion-palette ul.focused li:first-child svg.tab-icn {\n height: 0;\n width: 0;\n transform: scale(0);\n opacity: 0;\n}\n.suggestion-palette ul li {\n padding: 0 8px;\n font-size: 11px;\n height: 20px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-radius: 4px;\n color: rgb(39, 71, 104);\n}\n.suggestion-palette ul li.focused {\n background-color: rgb(237, 242, 247);\n}\n.suggestion-palette ul li.focused svg.return-icn {\n animation: growIn 0.24s ease-in forwards;\n}\n.suggestion-palette ul li svg {\n height: 12px;\n width: 12px;\n border-radius: 4px;\n transform-origin: center center;\n}\n.suggestion-palette ul li svg path {\n fill: rgb(128, 154, 180);\n}\n\n@keyframes growIn {\n 0% {\n transform: scale(0.5);\n }\n 90% {\n transform: scale(1.1);\n }\n 100% {\n transform: scale(1);\n }\n}\nspan.code-count-1::after,\nspan.code-count-1::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n}\n\nspan.code-count-2::after,\nspan.code-count-2::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n /*background: repeating-linear-gradient(*/\n /*\t45deg,*/\n /*\tvar(--bg-code-color-1),*/\n /*\tvar(--bg-code-color-1) 10px,*/\n /*\tvar(--bg-code-color-2) 10px,*/\n /*\tvar(--bg-code-color-2) 20px*/\n /*);*/\n /* PAS STRIPES */\n background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);\n}\n\nspan.code-count-3::after,\nspan.code-count-3::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n background: repeating-linear-gradient(45deg, var(--bg-code-color-1), var(--bg-code-color-1) 10px, var(--bg-code-color-2) 10px, var(--bg-code-color-2) 20px);\n /* PAS STRIPES */\n /* background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);*/\n}\n\n.selected-option {\n padding: 2px;\n margin-right: 5px;\n}\n\n.options {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: calc(100% + 6px);\n left: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n width: auto;\n min-width: 100%;\n overflow-y: auto;\n padding: 2px;\n border-radius: 6px;\n}\n.options--subformView {\n top: 46px;\n min-width: unset;\n left: unset;\n right: 0;\n}\n\n.date-picker {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: calc(100% + 6px);\n left: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n width: 260px;\n overflow-y: auto;\n max-height: 280px;\n}\n\napp-date-picker {\n --app-primary: #084B83;\n --app-hover: #5b7da2;\n --app-selected-hover: #5b7da2;\n}\n\n.option {\n height: 28px;\n min-height: 28px;\n width: 100%;\n background: transparent;\n border-radius: 4px;\n font-size: 14px;\n color: #545454;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n box-shadow: none;\n border: none;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n padding: 4px 8px;\n -webkit-user-select: none; /* Safari */\n -ms-user-select: none; /* IE 10 and IE 11 */\n user-select: none; /* Standard syntax */\n cursor: pointer;\n}\n.option:hover {\n color: #656565;\n background-color: #ededed;\n}\n\n.select-arrow {\n border: none;\n background: 0px 0px;\n position: relative;\n top: 0px;\n opacity: 0.5;\n cursor: pointer;\n height: 20px;\n width: 10px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0px;\n}\n\n.hidden {\n display: none;\n}\n\n.container {\n position: relative;\n}\n\n.group {\n align-items: end;\n display: grid;\n}\n\n.subform {\n display: grid;\n position: relative;\n padding: 8px;\n border-radius: 6px;\n background-color: #e7f0fd;\n gap: 12px;\n}\n.subform__heading {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: auto;\n}\n.subform__heading__title {\n padding: 0;\n margin: 0;\n}\n.subform__addBtn, .subform__removeBtn {\n cursor: pointer;\n background-color: #084B83;\n color: white;\n height: 32px;\n padding: 0 16px;\n border-radius: 6px;\n border: none;\n outline: none;\n}\n.subform__addBtn:hover, .subform__removeBtn:hover {\n background-color: #3D87C5;\n}\n.subform__removeBtn {\n justify-self: end;\n border: 1px solid #DDE3E7;\n background-color: #FCFCFD;\n color: #084B83;\n}\n.subform__removeBtn:hover {\n background-color: #F2F2F2;\n}\n.subform__child {\n display: grid;\n grid-template-rows: auto;\n gap: 8px;\n padding: 8px;\n border-radius: 6px;\n background: white;\n border: 1px solid #3D87C5;\n}\n.subform__child__title {\n padding: 12px !important;\n border-radius: 6px;\n margin: 0;\n background-color: #BFE8EA;\n}\n.subform__child .subform {\n background: unset;\n margin: 0;\n padding: 0;\n}\n\n.icure-form {\n background-color: rgba(0, 0, 0, 0);\n display: grid;\n gap: 16px 6px;\n grid-template-columns: repeat(24, 1fr);\n}\n.icure-form hr {\n display: block;\n margin-top: 20px;\n border-top: 1px solid rgba(8, 75, 131, 0.13);\n margin-bottom: 20px;\n}\n.icure-form h2 {\n font-size: 14.4px;\n font-weight: 700;\n color: #084B83;\n padding: 2px;\n}\n.icure-form h3 {\n font-size: 13.2px;\n font-weight: 500;\n color: #084B83;\n padding: 6px;\n}\n.icure-form .group.bordered {\n background: #f6f6f6;\n border-radius: 12px;\n}\n\n.icure-form-field {\n display: grid;\n align-items: flex-start;\n}\n\n.error {\n color: red;\n font-size: 12px;\n margin-top: 4px;\n}\n\n.icure-text-field .icure-label-extra, .icure-button-group .icure-label-extra {\n display: flex;\n width: 100%;\n gap: 12px;\n}\n.icure-text-field .icure-label, .icure-button-group .icure-label {\n z-index: 1;\n pointer-events: none;\n line-height: 1.4em;\n cursor: text;\n font-size: 12px;\n left: 9px;\n color: #084B83;\n align-items: center;\n height: 28px;\n max-width: 85%;\n min-width: 0;\n}\n.icure-text-field .icure-label.float, .icure-button-group .icure-label.float {\n display: flex;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.icure-text-field {\n position: relative;\n width: 100%;\n}\n.icure-text-field > .icure-label {\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n}\n.icure-text-field > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n.icure-text-field > .icure-label.side {\n position: relative;\n}\n.icure-text-field > .icure-label.side.left {\n order: -1;\n margin-right: 1em;\n}\n.icure-text-field > .icure-label.side.right {\n order: 1;\n margin-left: 1em;\n}\n.icure-text-field .icure-input,\n.icure-text-field .input-container {\n padding: 8px;\n width: 100%;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n border-color: #DDE3E7;\n border-radius: 2px;\n box-sizing: border-box;\n outline: 0;\n font: inherit;\n font-size: 14px;\n line-height: 1.4em;\n display: flex;\n align-items: center;\n vertical-align: middle;\n position: relative;\n -webkit-appearance: none;\n background-color: #ffffff;\n color: #000000;\n}\n.icure-text-field .icure-input__validationError,\n.icure-text-field .input-container__validationError {\n border-color: red;\n}\n.icure-text-field .icure-input__withMetadata,\n.icure-text-field .input-container__withMetadata {\n border-radius: 6px 0 0 6px;\n}\n.icure-text-field .icure-input:focus, .icure-text-field .icure-input:focus-within,\n.icure-text-field .input-container:focus,\n.icure-text-field .input-container:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.icure-text-field .icure-input:hover,\n.icure-text-field .input-container:hover {\n border-color: rgba(0, 0, 0, 0.15);\n box-shadow: none;\n}\n.icure-text-field .icure-input:hover:focus, .icure-text-field .icure-input:hover:focus-within,\n.icure-text-field .input-container:hover:focus,\n.icure-text-field .input-container:hover:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.icure-text-field .icure-input .ProseMirror,\n.icure-text-field .input-container .ProseMirror {\n padding: 0;\n font-size: 14px;\n line-height: 1.4em;\n color: #000000;\n}\n.icure-text-field .icure-input .ProseMirror .date,\n.icure-text-field .input-container .ProseMirror .date {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror .time,\n.icure-text-field .input-container .ProseMirror .time {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror:focus .focused,\n.icure-text-field .input-container .ProseMirror:focus .focused {\n background-color: rgba(0, 0, 0, 0.05);\n border-radius: 3px;\n border-color: rgba(0, 0, 0, 0.1);\n}\n.icure-text-field .icure-input > svg,\n.icure-text-field .input-container > svg {\n opacity: 0.5;\n}\n.icure-text-field .icure-input > svg path,\n.icure-text-field .input-container > svg path {\n fill: #656565;\n}\n.icure-text-field .icure-input .extra,\n.icure-text-field .input-container .extra {\n height: 20px;\n}\n.icure-text-field .icure-input .extra > .info,\n.icure-text-field .input-container .extra > .info {\n color: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .btn svg path,\n.icure-text-field .input-container .extra .btn svg path {\n fill: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .btn svg path:hover,\n.icure-text-field .input-container .extra .btn svg path:hover {\n fill: #656565;\n opacity: 1;\n}\n\ninput[type=radio] {\n margin-top: -1px;\n vertical-align: middle;\n}\n\n.icure-checkbox:checked {\n accent-color: #06a070;\n}\n\n.icure-button {\n display: flex;\n height: 32px;\n padding: 0 16px;\n background-color: #084B83;\n color: white;\n border-radius: 6px;\n cursor: pointer;\n font-size: 14px;\n font-weight: normal;\n}\n.icure-button:hover {\n background-color: #3D87C5;\n}\n\n.icure-button-group {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.icure-button-group > div {\n display: grid;\n}\n.icure-button-group > div > div {\n display: flex;\n align-items: center;\n}\n.icure-button-group > div > div > .icure-button-group-label {\n z-index: 1;\n line-height: 1.4em;\n cursor: text;\n font-size: 12px;\n top: calc(1.4em + 1px);\n left: 9px;\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n color: #084B83;\n display: flex;\n align-items: center;\n height: 28px;\n max-width: 85%;\n min-width: 0;\n}\n.icure-button-group > div > div > .icure-button-group-label > span {\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding-right: 8px;\n}\n.icure-button-group > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n.icure-button-group > .icure-label {\n transform: translate(0, 0) scale(1);\n}\n.icure-button-group > .icure-label.above, .icure-button-group.has-content > .icure-label, .icure-button-group:focus > .icure-label, .icure-button-group:focus-within > .icure-label {\n font-weight: 500;\n height: 1.4em;\n}` \n\nexport class MetadataButtonBar extends LitElement {\n\t@property() valueId: string\n\t@property() metadata: FieldMetadata\n\t@property() revision: string\n\t@property() versions: Version<FieldValue>[]\n\t@property() defaultLanguage: string\n\t@property() selectedLanguage?: string\n\t@property() languages: { [iso: string]: string } = {}\n\t@property() existingLanguages?: string[]\n\t@property() displayedLabels: { [iso: string]: string } = {}\n\t@property() handleMetadataChanged?: (metadata: FieldMetadata, id?: string) => string | undefined = undefined\n\t@property() handleLanguageSelected?: (iso?: string) => void = undefined\n\t@property() handleRevisionSelected?: (rev?: string | null) => void = undefined\n\t@property() ownersProvider: (terms: string[], ids?: string[], specialties?: string[]) => Promise<Suggestion[]> = async () => []\n\n\t@state() protected displayOwnersMenu = false\n\t@state() protected ownerInputValue = ''\n\t@state() protected availableOwners: Suggestion[] = []\n\t@state() protected loadedOwners: { [id: string]: Suggestion } = {}\n\n\t@state() protected displayLanguagesMenu = false\n\t@state() protected displayVersionsMenu = false\n\t@state() protected displayValueDateMenu = false\n\t@state() protected languageInputValue = ''\n\n\tstatic get styles() {\n\t\treturn [baseCss]\n\t}\n\n\t_handleClickOutside(event: MouseEvent): void {\n\t\tif (!event.composedPath().includes(this)) {\n\t\t\tthis.displayVersionsMenu = false\n\t\t\tthis.displayLanguagesMenu = false\n\t\t\tthis.displayOwnersMenu = false\n\t\t\tthis.displayValueDateMenu = 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\trender() {\n\t\tconst revisionDate = this.versions.find((x) => x.revision === this.revision)?.modified\n\n\t\tconst owner = this.metadata?.owner\n\t\tif (owner && !this.loadedOwners[owner]) {\n\t\t\tthis.loadedOwners = { ...this.loadedOwners, [owner]: { id: owner, text: '', terms: [], label: {} } } // Make sure we do not loop endlessly\n\t\t\tthis.ownersProvider && this.ownersProvider([], [owner]).then((availableOwners) => (this.loadedOwners = availableOwners.reduce((acc, o) => ({ ...acc, [o.id]: o }), this.loadedOwners)))\n\t\t}\n\n\t\tconst forcedByMenu = this.displayOwnersMenu || this.displayLanguagesMenu || this.displayValueDateMenu || this.displayVersionsMenu\n\n\t\tconst discordantMetadata = this.metadata?.discordantMetadata?.()\n\n\t\tconst forcedByOwner = discordantMetadata?.owner !== undefined\n\t\tconst forcedByValueDate = discordantMetadata?.valueDate !== undefined\n\t\tconst forcedByLanguage = this.selectedLanguage && this.defaultLanguage !== this.selectedLanguage\n\t\tconst forcedByVersion = this.revision && this.revision !== this.versions?.[0]?.revision\n\n\t\treturn html` <div id=\"extra\" class=${'extra extra--metadataButtonsBar' + (forcedByMenu ? ' forced' : '')}>\n\t\t\t<div class=\"info ${forcedByOwner || forcedByLanguage || forcedByValueDate ? 'hidden' : ''}\">&#9432</div>\n\t\t\t<div class=\"buttons-container\">\n\t\t\t\t<div class=\"menu-container\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tdata-content=\"${(this.metadata?.owner ? this.loadedOwners[this.metadata?.owner]?.text : '') ?? ''}\"\n\t\t\t\t\t\t@click=\"${() => this.toggleOwnersMenu(this.metadata?.owner)}\"\n\t\t\t\t\t\tclass=\"btn menu-trigger author ${forcedByOwner ? 'forced' : ''}\"\n\t\t\t\t\t>\n\t\t\t\t\t\t${ownerPicto}\n\t\t\t\t\t</button>\n\t\t\t\t\t${\n\t\t\t\t\t\tthis.displayOwnersMenu\n\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t<div id=\"menu\" class=\"menu\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-container\">${searchPicto} <input id=\"ownerSearch\" @input=\"${this.searchOwner}\" /></div>\n\t\t\t\t\t\t\t\t\t\t${(this.availableOwners?.length ? this.availableOwners : Object.values(this.loadedOwners))?.map(\n\t\t\t\t\t\t\t\t\t\t\t(x) => html` <button\n\t\t\t\t\t\t\t\t\t\t\t\t@click=\"${() => this.handleOwnerButtonClicked(x.id)}\"\n\t\t\t\t\t\t\t\t\t\t\t\tid=\"${x.id}\"\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"${this.metadata?.owner && this.loadedOwners[this.metadata?.owner]?.text === x.text ? 'item selected' : 'item'}\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t${x.text}\n\t\t\t\t\t\t\t\t\t\t\t</button>`,\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t `\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"menu-container\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tdata-content=\"${this.metadata?.valueDate ? format(anyDateToDate(this.metadata.valueDate)!, 'yyyy-MM-dd HH:mm:ss').replace(/ 00:00:00$/, '') : ''}\"\n\t\t\t\t\t\tclass=\"btn date ${forcedByValueDate ? 'forced' : ''}\"\n\t\t\t\t\t\t@click=\"${() => this.toggleValueDateMenu()}\"\n\t\t\t\t\t>\n\t\t\t\t\t\t${calendarPatientPicto}\n\t\t\t\t\t</button>\n\t\t\t\t\t${\n\t\t\t\t\t\tthis.displayValueDateMenu\n\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t<div id=\"menu\" class=\"menu value-date-menu\">\n\t\t\t\t\t\t\t\t\t\t<app-date-picker locale=\"${this.defaultLanguage ?? 'en'}\" style=\"\" max=\"${MAX_DATE}\" min=\"${toResolvedDate('1900-01-01')}\" @date-updated=\"${this.dateUpdated}\"></app-date-picker>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t `\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"menu-container\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tdata-content=\"${this.revision === null ? 'latest' : this.revision ? `rev-${this.revision.split('-')[0]} ${revisionDate ? `(${format(new Date(revisionDate), 'yyyy-MM-dd')})` : ''}` : ''}\"\n\t\t\t\t\t\t@click=\"${this.toggleVersionsMenu}\"\n\t\t\t\t\t\tclass=\"btn version ${forcedByVersion ? 'forced' : ''}\"\n\t\t\t\t\t>\n\t\t\t\t\t\t${versionPicto}\n\t\t\t\t\t</button>\n\t\t\t\t\t${\n\t\t\t\t\t\tthis.displayVersionsMenu\n\t\t\t\t\t\t\t? html` <div id=\"menu\" class=\"menu\">\n\t\t\t\t\t\t\t\t\t${this.versions.map(\n\t\t\t\t\t\t\t\t\t\t(x) =>\n\t\t\t\t\t\t\t\t\t\t\thtml` <button class=\"item ${x.revision === this.revision ? 'item selected' : ''}\" @click=\"${() => this.handleRevisionButtonClicked(x.revision)}\">\n\t\t\t\t\t\t\t\t\t\t\t\t${x.revision == null ? 'Latest' : x.revision ?? ''} ${x.modified ? `(${format(new Date(x.modified), 'yyyy-MM-dd')})` : ''}\n\t\t\t\t\t\t\t\t\t\t\t</button>`,\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t </div>`\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"menu-container\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tdata-content=\"${this.selectedLanguage ? languageName(this.selectedLanguage) ?? this.selectedLanguage : languageName(this.defaultLanguage) ?? this.defaultLanguage}\"\n\t\t\t\t\t\t@click=\"${this.toggleLanguagesMenu}\"\n\t\t\t\t\t\tclass=\"btn menu-trigger language ${forcedByLanguage ? 'forced' : ''}\"\n\t\t\t\t\t>\n\t\t\t\t\t\t${i18nPicto}\n\t\t\t\t\t</button>\n\t\t\t\t\t${\n\t\t\t\t\t\tthis.displayLanguagesMenu\n\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t<div id=\"menu\" class=\"menu\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-container\">${searchPicto} <input id=\"languageSearch\" @input=\"${this.searchLanguage}\" /></div>\n\t\t\t\t\t\t\t\t\t\t${[this.defaultLanguage, ...Object.keys(this.languages).filter((x) => x !== this.defaultLanguage)]\n\t\t\t\t\t\t\t\t\t\t\t.filter((x) => !!x && (languageName(x) ?? this.languages[x] ?? x).toLowerCase().includes((this.languageInputValue ?? '').toLowerCase()))\n\t\t\t\t\t\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t\t\t\t\t\t(x) => html` <button\n\t\t\t\t\t\t\t\t\t\t\t\t\t@click=\"${() => this.handleLanguageButtonClicked(x)}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"${x}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"${(x === this.defaultLanguage && !this.selectedLanguage) || x === this.selectedLanguage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'item item selected'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: this.existingLanguages?.includes(x)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'item item existing'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'item'}\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t${x ? languageName(x) : ''}\n\t\t\t\t\t\t\t\t\t\t\t\t</button>`,\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t `\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>`\n\t}\n\n\ttoggleOwnersMenu(ownerId?: string) {\n\t\tthis.displayOwnersMenu = !this.displayOwnersMenu\n\t\tif (this.displayOwnersMenu) {\n\t\t\tthis.displayLanguagesMenu = false\n\t\t\tthis.displayVersionsMenu = false\n\t\t\tthis.displayValueDateMenu = false\n\n\t\t\tsetTimeout(() => {\n\t\t\t\t;(this.renderRoot.querySelector('#ownerSearch') as HTMLInputElement)?.focus()\n\t\t\t}, 0)\n\t\t}\n\t}\n\n\tsearchOwner(e: InputEvent) {\n\t\tconst text = (e.target as HTMLInputElement).value\n\t\tsetTimeout(async () => {\n\t\t\tif ((this.renderRoot.querySelector('#ownerSearch') as HTMLInputElement)?.value === text) {\n\t\t\t\tif (this.ownersProvider) {\n\t\t\t\t\tconst availableOwners = await this.ownersProvider(text.split(' '))\n\t\t\t\t\tconsole.log(availableOwners)\n\t\t\t\t\tthis.availableOwners = availableOwners\n\t\t\t\t}\n\t\t\t}\n\t\t}, 300)\n\t}\n\n\tsearchLanguage(e: InputEvent) {\n\t\tthis.languageInputValue = (e.target as HTMLInputElement).value\n\t}\n\n\thandleOwnerButtonClicked(id: string) {\n\t\tconst valueId = this.valueId\n\t\tthis.handleMetadataChanged && valueId && this.handleMetadataChanged({ label: this.metadata.label, owner: id })\n\t\tthis.displayOwnersMenu = false\n\t}\n\n\thandleLanguageButtonClicked(id: string) {\n\t\tthis.handleLanguageSelected?.(id)\n\t\tthis.displayOwnersMenu = false\n\t}\n\n\thandleRevisionButtonClicked(rev?: string | null) {\n\t\tthis.handleRevisionSelected?.(rev)\n\t\tthis.displayVersionsMenu = false\n\t}\n\n\ttoggleValueDateMenu() {\n\t\tthis.displayValueDateMenu = !this.displayValueDateMenu\n\t\tif (this.displayValueDateMenu) {\n\t\t\tthis.displayOwnersMenu = false\n\t\t\tthis.displayLanguagesMenu = false\n\t\t\tthis.displayVersionsMenu = false\n\t\t}\n\t}\n\n\tdateUpdated(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\t\t\tconst valueId = this.valueId\n\t\t\tthis.handleMetadataChanged && this.handleMetadataChanged({ label: this.metadata.label, valueDate: fuzzyDateValue * 1000000 }, valueId)\n\t\t\tthis.displayOwnersMenu = false\n\t\t}\n\t}\n\n\ttoggleLanguagesMenu() {\n\t\tthis.displayLanguagesMenu = !this.displayLanguagesMenu\n\t\tif (this.displayLanguagesMenu) {\n\t\t\tthis.displayOwnersMenu = false\n\t\t\tthis.displayVersionsMenu = false\n\t\t\tthis.displayValueDateMenu = false\n\t\t}\n\t}\n\n\ttoggleVersionsMenu() {\n\t\tthis.displayVersionsMenu = !this.displayVersionsMenu\n\t\tif (this.displayVersionsMenu) {\n\t\t\tthis.displayOwnersMenu = false\n\t\t\tthis.displayLanguagesMenu = false\n\t\t\tthis.displayValueDateMenu = false\n\t\t}\n\t}\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { CSSResultGroup, TemplateResult } from 'lit';
2
- import 'app-datepicker';
3
- import { CustomEventDetail } from 'app-datepicker/dist/typings';
2
+ import '@icure/motss-app-datepicker.js';
3
+ import { CustomEventDetail } from '@icure/motss-app-datepicker/dist/typings.js';
4
4
  import { Field } from '../common';
5
5
  export declare class IcureDatePickerField extends Field {
6
6
  placeholder: string;
@@ -13,9 +13,9 @@ exports.IcureDatePickerField = void 0;
13
13
  const lit_1 = require("lit");
14
14
  const utils_1 = require("../common/utils");
15
15
  const decorators_js_1 = require("lit/decorators.js");
16
- require("app-datepicker");
17
- const constants_1 = require("app-datepicker/dist/constants");
18
- const to_resolved_date_1 = require("app-datepicker/dist/helpers/to-resolved-date");
16
+ require("@icure/motss-app-datepicker.js");
17
+ const constants_js_1 = require("@icure/motss-app-datepicker/dist/constants.js");
18
+ const to_resolved_date_js_1 = require("@icure/motss-app-datepicker/dist/helpers/to-resolved-date.js");
19
19
  const common_1 = require("../common");
20
20
  const paths_1 = require("../common/styles/paths");
21
21
  const utils_2 = require("../icure-form/fields/utils");
@@ -1163,8 +1163,8 @@ class IcureDatePickerField extends common_1.Field {
1163
1163
  <app-date-picker
1164
1164
  locale="${(_d = (_c = this.selectedLanguage) !== null && _c !== void 0 ? _c : this.defaultLanguage) !== null && _d !== void 0 ? _d : 'en'}"
1165
1165
  style=""
1166
- max="${constants_1.MAX_DATE}"
1167
- min="${(0, to_resolved_date_1.toResolvedDate)('1900-01-01')}"
1166
+ max="${constants_js_1.MAX_DATE}"
1167
+ min="${(0, to_resolved_date_js_1.toResolvedDate)('1900-01-01')}"
1168
1168
  @date-updated="${this.dateUpdated}"
1169
1169
  ></app-date-picker>
1170
1170
  </div>`
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/icure-date-picker/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6BAAmE;AACnE,2CAAgD;AAChD,qDAAmD;AACnD,0BAAuB;AAEvB,6DAAwD;AACxD,mFAA6E;AAC7E,sCAAiC;AACjC,kDAAkD;AAClD,sDAA+D;AAC/D,uCAAiC;AACjC,aAAa;AACb,6BAA0B;AAC1B,MAAM,OAAO,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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F,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;AA9FD,oDA8FC;AA5FY;IAAX,IAAA,wBAAQ,GAAE;;yDAAiB;AAET;IAAlB,IAAA,qBAAK,GAAE;;+DAAoC","sourcesContent":["import { CSSResultGroup, html, nothing, TemplateResult } from 'lit'\nimport { generateLabels } from '../common/utils'\nimport { property, state } from 'lit/decorators.js'\nimport 'app-datepicker'\nimport { CustomEventDetail } from 'app-datepicker/dist/typings'\nimport { MAX_DATE } from 'app-datepicker/dist/constants'\nimport { toResolvedDate } from '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:host {\n --bg-color-1: #f44336;\n}\n\n.ProseMirror {\n position: relative;\n width: 100%;\n word-wrap: break-word;\n white-space: pre-wrap;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n padding: 6px 8px 2px 8px;\n line-height: 1.2;\n color: #274768;\n font-size: 14px;\n font-weight: 400;\n outline: none;\n}\n.ProseMirror p:last-child,\n.ProseMirror h1:last-child,\n.ProseMirror h2:last-child,\n.ProseMirror h3:last-child,\n.ProseMirror h4:last-child,\n.ProseMirror h5:last-child,\n.ProseMirror h6:last-child {\n margin-bottom: 2px;\n}\n.ProseMirror p {\n margin-bottom: 1em;\n}\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n.ProseMirror li {\n position: relative;\n}\n.ProseMirror ul,\n.ProseMirror ol {\n padding-left: 30px;\n}\n.ProseMirror blockquote {\n padding-left: 1em;\n border-left: 3px solid #eee;\n margin-left: 0;\n margin-right: 0;\n}\n\n.ProseMirror-hideselection {\n caret-color: transparent;\n}\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n/* Make sure li selections wrap around markers */\nli.ProseMirror-selectednode {\n outline: none;\n}\nli.ProseMirror-selectednode :after {\n content: \"\";\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid #8cf;\n pointer-events: none;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n/* Add space around the hr to make clicking it easier */\n.ProseMirror-example-setup-style hr {\n padding: 2px 10px;\n border: none;\n margin: 1em 0;\n}\n.ProseMirror-example-setup-style hr:after {\n content: \"\";\n display: block;\n height: 1px;\n background: silver;\n line-height: 2px;\n}\n\n.ProseMirror-example-setup-style img {\n cursor: default;\n}\n\n.ProseMirror-prompt {\n background: white;\n padding: 5px 10px 5px 15px;\n border: 1px solid silver;\n position: fixed;\n border-radius: 3px;\n z-index: 11;\n box-shadow: -0.5px 2px 5px rgba(0, 0, 0, 0.2);\n}\n.ProseMirror-prompt h5 {\n margin: 0;\n font-weight: normal;\n font-size: 100%;\n color: #444;\n}\n.ProseMirror-prompt input[type=text],\n.ProseMirror-prompt textarea {\n background: #eee;\n border: none;\n outline: none;\n}\n.ProseMirror-prompt input[type=text] {\n padding: 0 4px;\n}\n\n.ProseMirror-prompt-close {\n position: absolute;\n left: 2px;\n top: 1px;\n color: #666;\n border: none;\n background: transparent;\n padding: 0;\n}\n.ProseMirror-prompt-close:after {\n content: \"✕\";\n font-size: 12px;\n}\n\n.ProseMirror-invalid {\n background: #ffc;\n border: 1px solid #cc7;\n border-radius: 4px;\n padding: 5px 10px;\n position: absolute;\n min-width: 10em;\n}\n\n.ProseMirror-prompt-buttons {\n margin-top: 5px;\n display: none;\n}\n\n#editor,\n.editor {\n color: rgb(101, 101, 101);\n background-clip: padding-box;\n border-radius: 4px;\n border: 2px solid rgba(0, 0, 0, 0.2);\n padding: 5px 0;\n display: flex;\n align-items: flex-end;\n}\n\n.icure-input {\n background: #edf2f7;\n border-radius: 8px;\n border: none;\n min-height: 28px;\n height: auto;\n display: flex;\n flex-flow: row nowrap;\n align-items: flex-start;\n justify-content: space-between;\n}\n\n#editor {\n background: transparent;\n border: none;\n padding: 0;\n flex-grow: 1;\n display: flex;\n align-items: stretch;\n}\n#editor.tokens-list .ProseMirror, #editor.styled-tokens-list .ProseMirror {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: flex-start;\n}\n#editor.tokens-list .ProseMirror li, #editor.styled-tokens-list .ProseMirror li {\n display: flex;\n flex-direction: row;\n border-radius: 8px;\n padding: 2px 4px;\n margin-right: 2px;\n background-color: #dadada;\n border-color: rgba(42, 61, 108, 0.44);\n min-height: 20px;\n}\n#editor.tokens-list .ProseMirror li span, #editor.styled-tokens-list .ProseMirror li span {\n display: inline-block;\n min-height: 18px;\n}\n#editor.tokens-list .ProseMirror li span br, #editor.styled-tokens-list .ProseMirror li span br {\n display: none;\n}\n#editor.items-list .ProseMirror {\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n align-items: flex-start;\n gap: 6px;\n}\n#editor.items-list .ProseMirror li {\n list-style-type: none;\n width: 100%;\n padding-bottom: 4px;\n border-bottom: 1px dotted rgba(128, 128, 128, 0.5098039216);\n}\n#editor.items-list .ProseMirror li:last-child {\n border-bottom: none;\n}\n\n#content {\n position: relative;\n padding: 0;\n}\n\n* {\n font-family: \"Roboto\", Helvetica, sans-serif;\n}\n\np {\n margin-top: 0;\n}\n\nh3 {\n color: #274768;\n margin-top: 0;\n}\n\n.icure-input-metadata-container {\n display: flex;\n}\n.icure-input-metadata-container .icure-metadata-container {\n display: flex;\n flex-grow: 1;\n padding: 0 4px;\n border: 1px solid #DDE3E7;\n border-left: none;\n border-radius: 0 6px 6px 0;\n outline: 0;\n box-sizing: border-box;\n}\n.icure-input-metadata-container .icure-metadata-container__validationError {\n border-color: red;\n}\n\n.extra {\n min-width: 20px;\n width: auto;\n height: 20px;\n transition: all 0.24s cubic-bezier(0.42, 0.01, 1, 0.62);\n}\n.extra:hover .info {\n display: none;\n}\n.extra:hover .buttons-container .menu-container .btn {\n animation: slideIn 0.24s ease-in forwards;\n pointer-events: none;\n display: unset !important;\n}\n.extra.forced .info, .extra.forced .extra .info.hidden {\n opacity: 0 !important;\n z-index: 0 !important;\n display: none;\n}\n.extra.forced .buttons-container .btn {\n opacity: 1 !important;\n display: unset !important;\n}\n.extra.forced:hover .buttons-container .menu-container .btn {\n animation: none;\n pointer-events: all;\n}\n.extra--metadataButtonsBar {\n height: 100%;\n display: flex;\n align-items: center;\n padding: 0 4px;\n}\n.extra .info {\n color: #809ab4;\n font-size: 15px;\n width: 100%;\n height: auto;\n overflow: hidden;\n pointer-events: none;\n text-align: center;\n}\n.extra .info span {\n font-weight: 700;\n}\n.extra .info.hidden {\n display: none;\n}\n.extra .buttons-container {\n display: flex;\n height: 20px;\n width: auto;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-end;\n transition: all 0.24s cubic-bezier(0.14, 0.69, 0.87, 0.54);\n z-index: 1000;\n}\n.extra .buttons-container .btn {\n border: none;\n background: transparent;\n position: relative;\n top: 0;\n display: none;\n opacity: 0;\n cursor: pointer;\n height: 20px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0;\n}\n.extra .buttons-container .btn svg {\n width: 15px;\n height: 15px;\n}\n.extra .buttons-container .btn svg path {\n fill: #809ab4;\n}\n.extra .buttons-container .btn.forced {\n opacity: 1 !important;\n display: unset !important;\n}\n.extra .buttons-container .btn.forced svg path {\n fill: crimson !important;\n}\n.extra .buttons-container .btn:focus, .extra .buttons-container .btn:focus-within {\n border: none;\n outline: none;\n}\n.extra .buttons-container .btn:hover svg path {\n fill: #274768;\n}\n.extra .buttons-container .menu-container .btn:hover::before {\n content: \"\";\n display: block;\n border-color: #274768 transparent transparent transparent;\n border-style: solid;\n border-width: 4px;\n position: absolute;\n top: -6px;\n}\n.extra .buttons-container .menu-container .btn:hover::after {\n content: attr(data-content);\n position: absolute;\n top: -21px;\n height: 16px;\n left: 50%;\n transform: translateX(-50%);\n border-radius: 8px;\n background: #274768;\n color: white;\n display: flex;\n flex-flow: row wrap;\n align-items: center;\n text-transform: capitalize;\n white-space: nowrap;\n padding: 0 12px;\n font-size: 12px;\n line-height: 0;\n}\n.extra .buttons-container .menu-container:last-child .btn {\n margin-right: 0;\n}\n\n@keyframes slideIn {\n 0% {\n top: 0;\n opacity: 0;\n pointer-events: none;\n }\n 100% {\n top: 0;\n opacity: 1;\n pointer-events: all;\n }\n}\n.menu-container {\n display: flex;\n align-items: center;\n height: fit-content;\n}\n.menu-container .item {\n height: 30px;\n width: 100%;\n background: transparent;\n border-radius: 4px;\n font-size: 14px;\n color: #274768;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n box-shadow: none;\n border: none;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n}\n.menu-container .item.existing {\n background-color: #BFE8EA;\n}\n.menu-container .item.selected {\n color: white;\n background-color: #084B83;\n}\n.menu-container .item:hover {\n background: #DCE7F2;\n color: #274768;\n font-weight: 500;\n border-radius: 4px;\n}\n\n.value-date-menu {\n width: unset !important;\n}\n\n.menu {\n display: flex;\n flex-direction: column;\n gap: 2px;\n position: absolute;\n top: 32px;\n right: -12px;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n border-radius: 8px;\n padding: 8px;\n width: 220px;\n min-height: 120px;\n max-height: 320px;\n overflow-y: scroll;\n}\n.menu .input-container {\n background: #edf2f7;\n border-radius: 4px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n height: 32px;\n margin-bottom: 4px;\n padding: 0 4px;\n}\n.menu .input-container:hover {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2);\n}\n.menu .input-container:focus-within {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2), 0 0 0 1px rgb(40, 151, 255);\n}\n.menu .input-container input {\n background: transparent;\n border: none;\n flex-grow: 1;\n height: 100%;\n}\n.menu .input-container input:focus {\n background: transparent;\n border: none;\n outline: none;\n}\n\n.menu-trigger:focus .menu {\n display: flex;\n}\n\nspan {\n position: relative;\n z-index: 1;\n}\nspan.date {\n margin-right: 1px;\n}\nspan.time {\n margin-left: 1px;\n}\nspan.measure {\n display: inline-block;\n margin-right: 1px;\n}\nspan.unit {\n margin-left: 1px;\n display: inline-block;\n}\nspan[data-content]:hover::after {\n position: absolute;\n content: attr(data-content);\n background: #274768;\n color: #ffffff;\n font-size: 9px;\n line-height: 12px;\n top: -12px;\n left: 0px;\n padding: 0px 2px;\n}\nspan[data-content]::before {\n position: absolute;\n content: \"\";\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: -1;\n opacity: 0.3;\n}\n\n.masked {\n display: none;\n}\n\n.companion {\n position: absolute;\n width: 15px;\n background-color: hsl(194, 100%, 50%);\n color: white;\n z-index: 20;\n padding: 0;\n text-align: center;\n font-size: 14px;\n font-weight: 500;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: 0 2px 2px 0;\n}\n.companion:hover {\n font-weight: 700;\n background: hsl(202, 100%, 50%);\n}\n\n*::selection {\n background-color: hsla(194, 100%, 50%, 0.2);\n}\n\n.suggestion-palette {\n position: absolute;\n z-index: 20;\n max-width: 380px;\n font-size: 11px;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 4px;\n border: none;\n border-radius: 8px;\n background: white;\n box-shadow: 0 1.1px 1.1px rgba(0, 0, 0, 0.022), 0 2.7px 2.7px rgba(0, 0, 0, 0.032), 0 5px 5px rgba(0, 0, 0, 0.04), 0 8.9px 8.9px rgba(0, 0, 0, 0.048), 0 16.7px 16.7px rgba(0, 0, 0, 0.058), 0 40px 40px rgba(0, 0, 0, 0.08);\n}\n.suggestion-palette ul {\n white-space: nowrap;\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n.suggestion-palette ul li:not(:first-child) svg.tab-icn,\n.suggestion-palette ul li:not(.focused) svg.return-icn, .suggestion-palette ul.focused li:first-child svg.tab-icn {\n height: 0;\n width: 0;\n transform: scale(0);\n opacity: 0;\n}\n.suggestion-palette ul li {\n padding: 0 8px;\n font-size: 11px;\n height: 20px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-radius: 4px;\n color: rgb(39, 71, 104);\n}\n.suggestion-palette ul li.focused {\n background-color: rgb(237, 242, 247);\n}\n.suggestion-palette ul li.focused svg.return-icn {\n animation: growIn 0.24s ease-in forwards;\n}\n.suggestion-palette ul li svg {\n height: 12px;\n width: 12px;\n border-radius: 4px;\n transform-origin: center center;\n}\n.suggestion-palette ul li svg path {\n fill: rgb(128, 154, 180);\n}\n\n@keyframes growIn {\n 0% {\n transform: scale(0.5);\n }\n 90% {\n transform: scale(1.1);\n }\n 100% {\n transform: scale(1);\n }\n}\nspan.code-count-1::after,\nspan.code-count-1::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n}\n\nspan.code-count-2::after,\nspan.code-count-2::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n /*background: repeating-linear-gradient(*/\n /*\t45deg,*/\n /*\tvar(--bg-code-color-1),*/\n /*\tvar(--bg-code-color-1) 10px,*/\n /*\tvar(--bg-code-color-2) 10px,*/\n /*\tvar(--bg-code-color-2) 20px*/\n /*);*/\n /* PAS STRIPES */\n background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);\n}\n\nspan.code-count-3::after,\nspan.code-count-3::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n background: repeating-linear-gradient(45deg, var(--bg-code-color-1), var(--bg-code-color-1) 10px, var(--bg-code-color-2) 10px, var(--bg-code-color-2) 20px);\n /* PAS STRIPES */\n /* background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);*/\n}\n\n.selected-option {\n padding: 2px;\n margin-right: 5px;\n}\n\n.options {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: calc(100% + 6px);\n left: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n width: auto;\n min-width: 100%;\n overflow-y: auto;\n padding: 2px;\n border-radius: 6px;\n}\n.options--subformView {\n top: 46px;\n min-width: unset;\n left: unset;\n right: 0;\n}\n\n.date-picker {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: calc(100% + 6px);\n left: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n width: 260px;\n overflow-y: auto;\n max-height: 280px;\n}\n\napp-date-picker {\n --app-primary: #084B83;\n --app-hover: #5b7da2;\n --app-selected-hover: #5b7da2;\n}\n\n.option {\n height: 28px;\n min-height: 28px;\n width: 100%;\n background: transparent;\n border-radius: 4px;\n font-size: 14px;\n color: #545454;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n box-shadow: none;\n border: none;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n padding: 4px 8px;\n -webkit-user-select: none; /* Safari */\n -ms-user-select: none; /* IE 10 and IE 11 */\n user-select: none; /* Standard syntax */\n cursor: pointer;\n}\n.option:hover {\n color: #656565;\n background-color: #ededed;\n}\n\n.select-arrow {\n border: none;\n background: 0px 0px;\n position: relative;\n top: 0px;\n opacity: 0.5;\n cursor: pointer;\n height: 20px;\n width: 10px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0px;\n}\n\n.hidden {\n display: none;\n}\n\n.container {\n position: relative;\n}\n\n.group {\n align-items: end;\n display: grid;\n}\n\n.subform {\n display: grid;\n position: relative;\n padding: 8px;\n border-radius: 6px;\n background-color: #e7f0fd;\n gap: 12px;\n}\n.subform__heading {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: auto;\n}\n.subform__heading__title {\n padding: 0;\n margin: 0;\n}\n.subform__addBtn, .subform__removeBtn {\n cursor: pointer;\n background-color: #084B83;\n color: white;\n height: 32px;\n padding: 0 16px;\n border-radius: 6px;\n border: none;\n outline: none;\n}\n.subform__addBtn:hover, .subform__removeBtn:hover {\n background-color: #3D87C5;\n}\n.subform__removeBtn {\n justify-self: end;\n border: 1px solid #DDE3E7;\n background-color: #FCFCFD;\n color: #084B83;\n}\n.subform__removeBtn:hover {\n background-color: #F2F2F2;\n}\n.subform__child {\n display: grid;\n grid-template-rows: auto;\n gap: 8px;\n padding: 8px;\n border-radius: 6px;\n background: white;\n border: 1px solid #3D87C5;\n}\n.subform__child__title {\n padding: 12px !important;\n border-radius: 6px;\n margin: 0;\n background-color: #BFE8EA;\n}\n.subform__child .subform {\n background: unset;\n margin: 0;\n padding: 0;\n}\n\n.icure-form {\n background-color: rgba(0, 0, 0, 0);\n display: grid;\n gap: 16px 6px;\n grid-template-columns: repeat(24, 1fr);\n}\n.icure-form hr {\n display: block;\n margin-top: 20px;\n border-top: 1px solid rgba(8, 75, 131, 0.13);\n margin-bottom: 20px;\n}\n.icure-form h2 {\n font-size: 14.4px;\n font-weight: 700;\n color: #084B83;\n padding: 2px;\n}\n.icure-form h3 {\n font-size: 13.2px;\n font-weight: 500;\n color: #084B83;\n padding: 6px;\n}\n.icure-form .group.bordered {\n background: #f6f6f6;\n border-radius: 12px;\n}\n\n.icure-form-field {\n display: grid;\n align-items: flex-start;\n}\n\n.error {\n color: red;\n font-size: 12px;\n margin-top: 4px;\n}\n\n.icure-text-field .icure-label-extra, .icure-button-group .icure-label-extra {\n display: flex;\n width: 100%;\n gap: 12px;\n}\n.icure-text-field .icure-label, .icure-button-group .icure-label {\n z-index: 1;\n pointer-events: none;\n line-height: 1.4em;\n cursor: text;\n font-size: 12px;\n left: 9px;\n color: #084B83;\n align-items: center;\n height: 28px;\n max-width: 85%;\n min-width: 0;\n}\n.icure-text-field .icure-label.float, .icure-button-group .icure-label.float {\n display: flex;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.icure-text-field {\n position: relative;\n width: 100%;\n}\n.icure-text-field > .icure-label {\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n}\n.icure-text-field > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n.icure-text-field > .icure-label.side {\n position: relative;\n}\n.icure-text-field > .icure-label.side.left {\n order: -1;\n margin-right: 1em;\n}\n.icure-text-field > .icure-label.side.right {\n order: 1;\n margin-left: 1em;\n}\n.icure-text-field .icure-input,\n.icure-text-field .input-container {\n padding: 8px;\n width: 100%;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n border-color: #DDE3E7;\n border-radius: 2px;\n box-sizing: border-box;\n outline: 0;\n font: inherit;\n font-size: 14px;\n line-height: 1.4em;\n display: flex;\n align-items: center;\n vertical-align: middle;\n position: relative;\n -webkit-appearance: none;\n background-color: #ffffff;\n color: #000000;\n}\n.icure-text-field .icure-input__validationError,\n.icure-text-field .input-container__validationError {\n border-color: red;\n}\n.icure-text-field .icure-input__withMetadata,\n.icure-text-field .input-container__withMetadata {\n border-radius: 6px 0 0 6px;\n}\n.icure-text-field .icure-input:focus, .icure-text-field .icure-input:focus-within,\n.icure-text-field .input-container:focus,\n.icure-text-field .input-container:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.icure-text-field .icure-input:hover,\n.icure-text-field .input-container:hover {\n border-color: rgba(0, 0, 0, 0.15);\n box-shadow: none;\n}\n.icure-text-field .icure-input:hover:focus, .icure-text-field .icure-input:hover:focus-within,\n.icure-text-field .input-container:hover:focus,\n.icure-text-field .input-container:hover:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.icure-text-field .icure-input .ProseMirror,\n.icure-text-field .input-container .ProseMirror {\n padding: 0;\n font-size: 14px;\n line-height: 1.4em;\n color: #000000;\n}\n.icure-text-field .icure-input .ProseMirror .date,\n.icure-text-field .input-container .ProseMirror .date {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror .time,\n.icure-text-field .input-container .ProseMirror .time {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror:focus .focused,\n.icure-text-field .input-container .ProseMirror:focus .focused {\n background-color: rgba(0, 0, 0, 0.05);\n border-radius: 3px;\n border-color: rgba(0, 0, 0, 0.1);\n}\n.icure-text-field .icure-input > svg,\n.icure-text-field .input-container > svg {\n opacity: 0.5;\n}\n.icure-text-field .icure-input > svg path,\n.icure-text-field .input-container > svg path {\n fill: #656565;\n}\n.icure-text-field .icure-input .extra,\n.icure-text-field .input-container .extra {\n height: 20px;\n}\n.icure-text-field .icure-input .extra > .info,\n.icure-text-field .input-container .extra > .info {\n color: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .btn svg path,\n.icure-text-field .input-container .extra .btn svg path {\n fill: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .btn svg path:hover,\n.icure-text-field .input-container .extra .btn svg path:hover {\n fill: #656565;\n opacity: 1;\n}\n\ninput[type=radio] {\n margin-top: -1px;\n vertical-align: middle;\n}\n\n.icure-checkbox:checked {\n accent-color: #06a070;\n}\n\n.icure-button {\n display: flex;\n height: 32px;\n padding: 0 16px;\n background-color: #084B83;\n color: white;\n border-radius: 6px;\n cursor: pointer;\n font-size: 14px;\n font-weight: normal;\n}\n.icure-button:hover {\n background-color: #3D87C5;\n}\n\n.icure-button-group {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.icure-button-group > div {\n display: grid;\n}\n.icure-button-group > div > div {\n display: flex;\n align-items: center;\n}\n.icure-button-group > div > div > .icure-button-group-label {\n z-index: 1;\n line-height: 1.4em;\n cursor: text;\n font-size: 12px;\n top: calc(1.4em + 1px);\n left: 9px;\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n color: #084B83;\n display: flex;\n align-items: center;\n height: 28px;\n max-width: 85%;\n min-width: 0;\n}\n.icure-button-group > div > div > .icure-button-group-label > span {\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding-right: 8px;\n}\n.icure-button-group > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n.icure-button-group > .icure-label {\n transform: translate(0, 0) scale(1);\n}\n.icure-button-group > .icure-label.above, .icure-button-group.has-content > .icure-label, .icure-button-group:focus > .icure-label, .icure-button-group:focus-within > .icure-label {\n font-weight: 500;\n height: 1.4em;\n}` \nimport { 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,6BAAmE;AACnE,2CAAgD;AAChD,qDAAmD;AACnD,0CAAuC;AAEvC,gFAAwE;AACxE,sGAA6F;AAC7F,sCAAiC;AACjC,kDAAkD;AAClD,sDAA+D;AAC/D,uCAAiC;AACjC,aAAa;AACb,6BAA0B;AAC1B,MAAM,OAAO,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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P,CAAC;QACD,IAAI,CAAC,iBAAiB,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAA;IACjD,CAAC;CACD;AA9FD,oDA8FC;AA5FY;IAAX,IAAA,wBAAQ,GAAE;;yDAAiB;AAET;IAAlB,IAAA,qBAAK,GAAE;;+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.js'\nimport { CustomEventDetail } from '@icure/motss-app-datepicker/dist/typings.js'\nimport { MAX_DATE } from '@icure/motss-app-datepicker/dist/constants.js'\nimport { toResolvedDate } from '@icure/motss-app-datepicker/dist/helpers/to-resolved-date.js'\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:host {\n --bg-color-1: #f44336;\n}\n\n.ProseMirror {\n position: relative;\n width: 100%;\n word-wrap: break-word;\n white-space: pre-wrap;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n padding: 6px 8px 2px 8px;\n line-height: 1.2;\n color: #274768;\n font-size: 14px;\n font-weight: 400;\n outline: none;\n}\n.ProseMirror p:last-child,\n.ProseMirror h1:last-child,\n.ProseMirror h2:last-child,\n.ProseMirror h3:last-child,\n.ProseMirror h4:last-child,\n.ProseMirror h5:last-child,\n.ProseMirror h6:last-child {\n margin-bottom: 2px;\n}\n.ProseMirror p {\n margin-bottom: 1em;\n}\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n.ProseMirror li {\n position: relative;\n}\n.ProseMirror ul,\n.ProseMirror ol {\n padding-left: 30px;\n}\n.ProseMirror blockquote {\n padding-left: 1em;\n border-left: 3px solid #eee;\n margin-left: 0;\n margin-right: 0;\n}\n\n.ProseMirror-hideselection {\n caret-color: transparent;\n}\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n/* Make sure li selections wrap around markers */\nli.ProseMirror-selectednode {\n outline: none;\n}\nli.ProseMirror-selectednode :after {\n content: \"\";\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid #8cf;\n pointer-events: none;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n/* Add space around the hr to make clicking it easier */\n.ProseMirror-example-setup-style hr {\n padding: 2px 10px;\n border: none;\n margin: 1em 0;\n}\n.ProseMirror-example-setup-style hr:after {\n content: \"\";\n display: block;\n height: 1px;\n background: silver;\n line-height: 2px;\n}\n\n.ProseMirror-example-setup-style img {\n cursor: default;\n}\n\n.ProseMirror-prompt {\n background: white;\n padding: 5px 10px 5px 15px;\n border: 1px solid silver;\n position: fixed;\n border-radius: 3px;\n z-index: 11;\n box-shadow: -0.5px 2px 5px rgba(0, 0, 0, 0.2);\n}\n.ProseMirror-prompt h5 {\n margin: 0;\n font-weight: normal;\n font-size: 100%;\n color: #444;\n}\n.ProseMirror-prompt input[type=text],\n.ProseMirror-prompt textarea {\n background: #eee;\n border: none;\n outline: none;\n}\n.ProseMirror-prompt input[type=text] {\n padding: 0 4px;\n}\n\n.ProseMirror-prompt-close {\n position: absolute;\n left: 2px;\n top: 1px;\n color: #666;\n border: none;\n background: transparent;\n padding: 0;\n}\n.ProseMirror-prompt-close:after {\n content: \"✕\";\n font-size: 12px;\n}\n\n.ProseMirror-invalid {\n background: #ffc;\n border: 1px solid #cc7;\n border-radius: 4px;\n padding: 5px 10px;\n position: absolute;\n min-width: 10em;\n}\n\n.ProseMirror-prompt-buttons {\n margin-top: 5px;\n display: none;\n}\n\n#editor,\n.editor {\n color: rgb(101, 101, 101);\n background-clip: padding-box;\n border-radius: 4px;\n border: 2px solid rgba(0, 0, 0, 0.2);\n padding: 5px 0;\n display: flex;\n align-items: flex-end;\n}\n\n.icure-input {\n background: #edf2f7;\n border-radius: 8px;\n border: none;\n min-height: 28px;\n height: auto;\n display: flex;\n flex-flow: row nowrap;\n align-items: flex-start;\n justify-content: space-between;\n}\n\n#editor {\n background: transparent;\n border: none;\n padding: 0;\n flex-grow: 1;\n display: flex;\n align-items: stretch;\n}\n#editor.tokens-list .ProseMirror, #editor.styled-tokens-list .ProseMirror {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: flex-start;\n}\n#editor.tokens-list .ProseMirror li, #editor.styled-tokens-list .ProseMirror li {\n display: flex;\n flex-direction: row;\n border-radius: 8px;\n padding: 2px 4px;\n margin-right: 2px;\n background-color: #dadada;\n border-color: rgba(42, 61, 108, 0.44);\n min-height: 20px;\n}\n#editor.tokens-list .ProseMirror li span, #editor.styled-tokens-list .ProseMirror li span {\n display: inline-block;\n min-height: 18px;\n}\n#editor.tokens-list .ProseMirror li span br, #editor.styled-tokens-list .ProseMirror li span br {\n display: none;\n}\n#editor.items-list .ProseMirror {\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n align-items: flex-start;\n gap: 6px;\n}\n#editor.items-list .ProseMirror li {\n list-style-type: none;\n width: 100%;\n padding-bottom: 4px;\n border-bottom: 1px dotted rgba(128, 128, 128, 0.5098039216);\n}\n#editor.items-list .ProseMirror li:last-child {\n border-bottom: none;\n}\n\n#content {\n position: relative;\n padding: 0;\n}\n\n* {\n font-family: \"Roboto\", Helvetica, sans-serif;\n}\n\np {\n margin-top: 0;\n}\n\nh3 {\n color: #274768;\n margin-top: 0;\n}\n\n.icure-input-metadata-container {\n display: flex;\n}\n.icure-input-metadata-container .icure-metadata-container {\n display: flex;\n flex-grow: 1;\n padding: 0 4px;\n border: 1px solid #DDE3E7;\n border-left: none;\n border-radius: 0 6px 6px 0;\n outline: 0;\n box-sizing: border-box;\n}\n.icure-input-metadata-container .icure-metadata-container__validationError {\n border-color: red;\n}\n\n.extra {\n min-width: 20px;\n width: auto;\n height: 20px;\n transition: all 0.24s cubic-bezier(0.42, 0.01, 1, 0.62);\n}\n.extra:hover .info {\n display: none;\n}\n.extra:hover .buttons-container .menu-container .btn {\n animation: slideIn 0.24s ease-in forwards;\n pointer-events: none;\n display: unset !important;\n}\n.extra.forced .info, .extra.forced .extra .info.hidden {\n opacity: 0 !important;\n z-index: 0 !important;\n display: none;\n}\n.extra.forced .buttons-container .btn {\n opacity: 1 !important;\n display: unset !important;\n}\n.extra.forced:hover .buttons-container .menu-container .btn {\n animation: none;\n pointer-events: all;\n}\n.extra--metadataButtonsBar {\n height: 100%;\n display: flex;\n align-items: center;\n padding: 0 4px;\n}\n.extra .info {\n color: #809ab4;\n font-size: 15px;\n width: 100%;\n height: auto;\n overflow: hidden;\n pointer-events: none;\n text-align: center;\n}\n.extra .info span {\n font-weight: 700;\n}\n.extra .info.hidden {\n display: none;\n}\n.extra .buttons-container {\n display: flex;\n height: 20px;\n width: auto;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-end;\n transition: all 0.24s cubic-bezier(0.14, 0.69, 0.87, 0.54);\n z-index: 1000;\n}\n.extra .buttons-container .btn {\n border: none;\n background: transparent;\n position: relative;\n top: 0;\n display: none;\n opacity: 0;\n cursor: pointer;\n height: 20px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0;\n}\n.extra .buttons-container .btn svg {\n width: 15px;\n height: 15px;\n}\n.extra .buttons-container .btn svg path {\n fill: #809ab4;\n}\n.extra .buttons-container .btn.forced {\n opacity: 1 !important;\n display: unset !important;\n}\n.extra .buttons-container .btn.forced svg path {\n fill: crimson !important;\n}\n.extra .buttons-container .btn:focus, .extra .buttons-container .btn:focus-within {\n border: none;\n outline: none;\n}\n.extra .buttons-container .btn:hover svg path {\n fill: #274768;\n}\n.extra .buttons-container .menu-container .btn:hover::before {\n content: \"\";\n display: block;\n border-color: #274768 transparent transparent transparent;\n border-style: solid;\n border-width: 4px;\n position: absolute;\n top: -6px;\n}\n.extra .buttons-container .menu-container .btn:hover::after {\n content: attr(data-content);\n position: absolute;\n top: -21px;\n height: 16px;\n left: 50%;\n transform: translateX(-50%);\n border-radius: 8px;\n background: #274768;\n color: white;\n display: flex;\n flex-flow: row wrap;\n align-items: center;\n text-transform: capitalize;\n white-space: nowrap;\n padding: 0 12px;\n font-size: 12px;\n line-height: 0;\n}\n.extra .buttons-container .menu-container:last-child .btn {\n margin-right: 0;\n}\n\n@keyframes slideIn {\n 0% {\n top: 0;\n opacity: 0;\n pointer-events: none;\n }\n 100% {\n top: 0;\n opacity: 1;\n pointer-events: all;\n }\n}\n.menu-container {\n display: flex;\n align-items: center;\n height: fit-content;\n}\n.menu-container .item {\n height: 30px;\n width: 100%;\n background: transparent;\n border-radius: 4px;\n font-size: 14px;\n color: #274768;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n box-shadow: none;\n border: none;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n}\n.menu-container .item.existing {\n background-color: #BFE8EA;\n}\n.menu-container .item.selected {\n color: white;\n background-color: #084B83;\n}\n.menu-container .item:hover {\n background: #DCE7F2;\n color: #274768;\n font-weight: 500;\n border-radius: 4px;\n}\n\n.value-date-menu {\n width: unset !important;\n}\n\n.menu {\n display: flex;\n flex-direction: column;\n gap: 2px;\n position: absolute;\n top: 32px;\n right: -12px;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n border-radius: 8px;\n padding: 8px;\n width: 220px;\n min-height: 120px;\n max-height: 320px;\n overflow-y: scroll;\n}\n.menu .input-container {\n background: #edf2f7;\n border-radius: 4px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n height: 32px;\n margin-bottom: 4px;\n padding: 0 4px;\n}\n.menu .input-container:hover {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2);\n}\n.menu .input-container:focus-within {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2), 0 0 0 1px rgb(40, 151, 255);\n}\n.menu .input-container input {\n background: transparent;\n border: none;\n flex-grow: 1;\n height: 100%;\n}\n.menu .input-container input:focus {\n background: transparent;\n border: none;\n outline: none;\n}\n\n.menu-trigger:focus .menu {\n display: flex;\n}\n\nspan {\n position: relative;\n z-index: 1;\n}\nspan.date {\n margin-right: 1px;\n}\nspan.time {\n margin-left: 1px;\n}\nspan.measure {\n display: inline-block;\n margin-right: 1px;\n}\nspan.unit {\n margin-left: 1px;\n display: inline-block;\n}\nspan[data-content]:hover::after {\n position: absolute;\n content: attr(data-content);\n background: #274768;\n color: #ffffff;\n font-size: 9px;\n line-height: 12px;\n top: -12px;\n left: 0px;\n padding: 0px 2px;\n}\nspan[data-content]::before {\n position: absolute;\n content: \"\";\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: -1;\n opacity: 0.3;\n}\n\n.masked {\n display: none;\n}\n\n.companion {\n position: absolute;\n width: 15px;\n background-color: hsl(194, 100%, 50%);\n color: white;\n z-index: 20;\n padding: 0;\n text-align: center;\n font-size: 14px;\n font-weight: 500;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: 0 2px 2px 0;\n}\n.companion:hover {\n font-weight: 700;\n background: hsl(202, 100%, 50%);\n}\n\n*::selection {\n background-color: hsla(194, 100%, 50%, 0.2);\n}\n\n.suggestion-palette {\n position: absolute;\n z-index: 20;\n max-width: 380px;\n font-size: 11px;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 4px;\n border: none;\n border-radius: 8px;\n background: white;\n box-shadow: 0 1.1px 1.1px rgba(0, 0, 0, 0.022), 0 2.7px 2.7px rgba(0, 0, 0, 0.032), 0 5px 5px rgba(0, 0, 0, 0.04), 0 8.9px 8.9px rgba(0, 0, 0, 0.048), 0 16.7px 16.7px rgba(0, 0, 0, 0.058), 0 40px 40px rgba(0, 0, 0, 0.08);\n}\n.suggestion-palette ul {\n white-space: nowrap;\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n.suggestion-palette ul li:not(:first-child) svg.tab-icn,\n.suggestion-palette ul li:not(.focused) svg.return-icn, .suggestion-palette ul.focused li:first-child svg.tab-icn {\n height: 0;\n width: 0;\n transform: scale(0);\n opacity: 0;\n}\n.suggestion-palette ul li {\n padding: 0 8px;\n font-size: 11px;\n height: 20px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-radius: 4px;\n color: rgb(39, 71, 104);\n}\n.suggestion-palette ul li.focused {\n background-color: rgb(237, 242, 247);\n}\n.suggestion-palette ul li.focused svg.return-icn {\n animation: growIn 0.24s ease-in forwards;\n}\n.suggestion-palette ul li svg {\n height: 12px;\n width: 12px;\n border-radius: 4px;\n transform-origin: center center;\n}\n.suggestion-palette ul li svg path {\n fill: rgb(128, 154, 180);\n}\n\n@keyframes growIn {\n 0% {\n transform: scale(0.5);\n }\n 90% {\n transform: scale(1.1);\n }\n 100% {\n transform: scale(1);\n }\n}\nspan.code-count-1::after,\nspan.code-count-1::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n}\n\nspan.code-count-2::after,\nspan.code-count-2::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n /*background: repeating-linear-gradient(*/\n /*\t45deg,*/\n /*\tvar(--bg-code-color-1),*/\n /*\tvar(--bg-code-color-1) 10px,*/\n /*\tvar(--bg-code-color-2) 10px,*/\n /*\tvar(--bg-code-color-2) 20px*/\n /*);*/\n /* PAS STRIPES */\n background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);\n}\n\nspan.code-count-3::after,\nspan.code-count-3::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n background: repeating-linear-gradient(45deg, var(--bg-code-color-1), var(--bg-code-color-1) 10px, var(--bg-code-color-2) 10px, var(--bg-code-color-2) 20px);\n /* PAS STRIPES */\n /* background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);*/\n}\n\n.selected-option {\n padding: 2px;\n margin-right: 5px;\n}\n\n.options {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: calc(100% + 6px);\n left: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n width: auto;\n min-width: 100%;\n overflow-y: auto;\n padding: 2px;\n border-radius: 6px;\n}\n.options--subformView {\n top: 46px;\n min-width: unset;\n left: unset;\n right: 0;\n}\n\n.date-picker {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: absolute;\n top: calc(100% + 6px);\n left: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n width: 260px;\n overflow-y: auto;\n max-height: 280px;\n}\n\napp-date-picker {\n --app-primary: #084B83;\n --app-hover: #5b7da2;\n --app-selected-hover: #5b7da2;\n}\n\n.option {\n height: 28px;\n min-height: 28px;\n width: 100%;\n background: transparent;\n border-radius: 4px;\n font-size: 14px;\n color: #545454;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n box-shadow: none;\n border: none;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n padding: 4px 8px;\n -webkit-user-select: none; /* Safari */\n -ms-user-select: none; /* IE 10 and IE 11 */\n user-select: none; /* Standard syntax */\n cursor: pointer;\n}\n.option:hover {\n color: #656565;\n background-color: #ededed;\n}\n\n.select-arrow {\n border: none;\n background: 0px 0px;\n position: relative;\n top: 0px;\n opacity: 0.5;\n cursor: pointer;\n height: 20px;\n width: 10px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0px;\n}\n\n.hidden {\n display: none;\n}\n\n.container {\n position: relative;\n}\n\n.group {\n align-items: end;\n display: grid;\n}\n\n.subform {\n display: grid;\n position: relative;\n padding: 8px;\n border-radius: 6px;\n background-color: #e7f0fd;\n gap: 12px;\n}\n.subform__heading {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: auto;\n}\n.subform__heading__title {\n padding: 0;\n margin: 0;\n}\n.subform__addBtn, .subform__removeBtn {\n cursor: pointer;\n background-color: #084B83;\n color: white;\n height: 32px;\n padding: 0 16px;\n border-radius: 6px;\n border: none;\n outline: none;\n}\n.subform__addBtn:hover, .subform__removeBtn:hover {\n background-color: #3D87C5;\n}\n.subform__removeBtn {\n justify-self: end;\n border: 1px solid #DDE3E7;\n background-color: #FCFCFD;\n color: #084B83;\n}\n.subform__removeBtn:hover {\n background-color: #F2F2F2;\n}\n.subform__child {\n display: grid;\n grid-template-rows: auto;\n gap: 8px;\n padding: 8px;\n border-radius: 6px;\n background: white;\n border: 1px solid #3D87C5;\n}\n.subform__child__title {\n padding: 12px !important;\n border-radius: 6px;\n margin: 0;\n background-color: #BFE8EA;\n}\n.subform__child .subform {\n background: unset;\n margin: 0;\n padding: 0;\n}\n\n.icure-form {\n background-color: rgba(0, 0, 0, 0);\n display: grid;\n gap: 16px 6px;\n grid-template-columns: repeat(24, 1fr);\n}\n.icure-form hr {\n display: block;\n margin-top: 20px;\n border-top: 1px solid rgba(8, 75, 131, 0.13);\n margin-bottom: 20px;\n}\n.icure-form h2 {\n font-size: 14.4px;\n font-weight: 700;\n color: #084B83;\n padding: 2px;\n}\n.icure-form h3 {\n font-size: 13.2px;\n font-weight: 500;\n color: #084B83;\n padding: 6px;\n}\n.icure-form .group.bordered {\n background: #f6f6f6;\n border-radius: 12px;\n}\n\n.icure-form-field {\n display: grid;\n align-items: flex-start;\n}\n\n.error {\n color: red;\n font-size: 12px;\n margin-top: 4px;\n}\n\n.icure-text-field .icure-label-extra, .icure-button-group .icure-label-extra {\n display: flex;\n width: 100%;\n gap: 12px;\n}\n.icure-text-field .icure-label, .icure-button-group .icure-label {\n z-index: 1;\n pointer-events: none;\n line-height: 1.4em;\n cursor: text;\n font-size: 12px;\n left: 9px;\n color: #084B83;\n align-items: center;\n height: 28px;\n max-width: 85%;\n min-width: 0;\n}\n.icure-text-field .icure-label.float, .icure-button-group .icure-label.float {\n display: flex;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.icure-text-field {\n position: relative;\n width: 100%;\n}\n.icure-text-field > .icure-label {\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n}\n.icure-text-field > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n.icure-text-field > .icure-label.side {\n position: relative;\n}\n.icure-text-field > .icure-label.side.left {\n order: -1;\n margin-right: 1em;\n}\n.icure-text-field > .icure-label.side.right {\n order: 1;\n margin-left: 1em;\n}\n.icure-text-field .icure-input,\n.icure-text-field .input-container {\n padding: 8px;\n width: 100%;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n border-color: #DDE3E7;\n border-radius: 2px;\n box-sizing: border-box;\n outline: 0;\n font: inherit;\n font-size: 14px;\n line-height: 1.4em;\n display: flex;\n align-items: center;\n vertical-align: middle;\n position: relative;\n -webkit-appearance: none;\n background-color: #ffffff;\n color: #000000;\n}\n.icure-text-field .icure-input__validationError,\n.icure-text-field .input-container__validationError {\n border-color: red;\n}\n.icure-text-field .icure-input__withMetadata,\n.icure-text-field .input-container__withMetadata {\n border-radius: 6px 0 0 6px;\n}\n.icure-text-field .icure-input:focus, .icure-text-field .icure-input:focus-within,\n.icure-text-field .input-container:focus,\n.icure-text-field .input-container:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.icure-text-field .icure-input:hover,\n.icure-text-field .input-container:hover {\n border-color: rgba(0, 0, 0, 0.15);\n box-shadow: none;\n}\n.icure-text-field .icure-input:hover:focus, .icure-text-field .icure-input:hover:focus-within,\n.icure-text-field .input-container:hover:focus,\n.icure-text-field .input-container:hover:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.icure-text-field .icure-input .ProseMirror,\n.icure-text-field .input-container .ProseMirror {\n padding: 0;\n font-size: 14px;\n line-height: 1.4em;\n color: #000000;\n}\n.icure-text-field .icure-input .ProseMirror .date,\n.icure-text-field .input-container .ProseMirror .date {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror .time,\n.icure-text-field .input-container .ProseMirror .time {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror:focus .focused,\n.icure-text-field .input-container .ProseMirror:focus .focused {\n background-color: rgba(0, 0, 0, 0.05);\n border-radius: 3px;\n border-color: rgba(0, 0, 0, 0.1);\n}\n.icure-text-field .icure-input > svg,\n.icure-text-field .input-container > svg {\n opacity: 0.5;\n}\n.icure-text-field .icure-input > svg path,\n.icure-text-field .input-container > svg path {\n fill: #656565;\n}\n.icure-text-field .icure-input .extra,\n.icure-text-field .input-container .extra {\n height: 20px;\n}\n.icure-text-field .icure-input .extra > .info,\n.icure-text-field .input-container .extra > .info {\n color: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .btn svg path,\n.icure-text-field .input-container .extra .btn svg path {\n fill: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .btn svg path:hover,\n.icure-text-field .input-container .extra .btn svg path:hover {\n fill: #656565;\n opacity: 1;\n}\n\ninput[type=radio] {\n margin-top: -1px;\n vertical-align: middle;\n}\n\n.icure-checkbox:checked {\n accent-color: #06a070;\n}\n\n.icure-button {\n display: flex;\n height: 32px;\n padding: 0 16px;\n background-color: #084B83;\n color: white;\n border-radius: 6px;\n cursor: pointer;\n font-size: 14px;\n font-weight: normal;\n}\n.icure-button:hover {\n background-color: #3D87C5;\n}\n\n.icure-button-group {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.icure-button-group > div {\n display: grid;\n}\n.icure-button-group > div > div {\n display: flex;\n align-items: center;\n}\n.icure-button-group > div > div > .icure-button-group-label {\n z-index: 1;\n line-height: 1.4em;\n cursor: text;\n font-size: 12px;\n top: calc(1.4em + 1px);\n left: 9px;\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n color: #084B83;\n display: flex;\n align-items: center;\n height: 28px;\n max-width: 85%;\n min-width: 0;\n}\n.icure-button-group > div > div > .icure-button-group-label > span {\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding-right: 8px;\n}\n.icure-button-group > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n.icure-button-group > .icure-label {\n transform: translate(0, 0) scale(1);\n}\n.icure-button-group > .icure-label.above, .icure-button-group.has-content > .icure-label, .icure-button-group:focus > .icure-label, .icure-button-group:focus-within > .icure-label {\n font-weight: 500;\n height: 1.4em;\n}` \nimport { 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"]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@icure/form",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "./lib/index.d.ts",
7
7
  "dependencies": {
8
+ "@icure/motss-app-datepicker": "^6.0.0-rc.33",
8
9
  "@webcomponents/webcomponentsjs": "^2.7.0",
9
- "app-datepicker": "^6.0.0-rc.33",
10
10
  "fast-deep-equal": "^3.1.3",
11
11
  "lit": "^3.1.3",
12
12
  "markdown-it": "^14.1.0",
@@ -1,3 +0,0 @@
1
- import { SchemaSpec } from 'prosemirror-model';
2
- export type ItemsListSchema = 'items-list';
3
- export declare function getItemsListSpec(): SchemaSpec;
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getItemsListSpec = void 0;
4
- const utils_1 = require("./utils");
5
- function getItemsListSpec() {
6
- return {
7
- nodes: (0, utils_1.reduceNodes)({
8
- doc: {
9
- content: 'paragraph*',
10
- parseDOM: [{ tag: 'ul' }],
11
- toDOM() {
12
- return ['ul', 0];
13
- },
14
- },
15
- paragraph: {
16
- content: 'inline*',
17
- group: 'block',
18
- parseDOM: [{ tag: 'li' }],
19
- toDOM() {
20
- return ['li', 0];
21
- },
22
- },
23
- text: {
24
- group: 'inline',
25
- },
26
- }),
27
- marks: {},
28
- };
29
- }
30
- exports.getItemsListSpec = getItemsListSpec;
31
- //# sourceMappingURL=items-list.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"items-list.js","sourceRoot":"","sources":["../../../../tmp/components/icure-text-field/schema/items-list.ts"],"names":[],"mappings":";;;AACA,mCAAqC;AAIrC,SAAgB,gBAAgB;IAC/B,OAAO;QACN,KAAK,EAAE,IAAA,mBAAW,EAAC;YAClB,GAAG,EAAE;gBACJ,OAAO,EAAE,YAAY;gBACrB,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;gBACzB,KAAK;oBACJ,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;gBACjB,CAAC;aACD;YAED,SAAS,EAAE;gBACV,OAAO,EAAE,SAAS;gBAClB,KAAK,EAAE,OAAO;gBACd,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;gBACzB,KAAK;oBACJ,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;gBACjB,CAAC;aACD;YAED,IAAI,EAAE;gBACL,KAAK,EAAE,QAAQ;aACf;SACD,CAAC;QACF,KAAK,EAAE,EAAE;KACT,CAAA;AACF,CAAC;AA1BD,4CA0BC","sourcesContent":["import { SchemaSpec } from 'prosemirror-model'\nimport { reduceNodes } from './utils'\n\nexport type ItemsListSchema = 'items-list'\n\nexport function getItemsListSpec(): SchemaSpec {\n\treturn {\n\t\tnodes: reduceNodes({\n\t\t\tdoc: {\n\t\t\t\tcontent: 'paragraph*',\n\t\t\t\tparseDOM: [{ tag: 'ul' }],\n\t\t\t\ttoDOM() {\n\t\t\t\t\treturn ['ul', 0]\n\t\t\t\t},\n\t\t\t},\n\n\t\t\tparagraph: {\n\t\t\t\tcontent: 'inline*',\n\t\t\t\tgroup: 'block',\n\t\t\t\tparseDOM: [{ tag: 'li' }],\n\t\t\t\ttoDOM() {\n\t\t\t\t\treturn ['li', 0]\n\t\t\t\t},\n\t\t\t},\n\n\t\t\ttext: {\n\t\t\t\tgroup: 'inline',\n\t\t\t},\n\t\t}),\n\t\tmarks: {},\n\t}\n}\n"]}
@@ -1 +0,0 @@
1
- export {};
@@ -1,321 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const fields_1 = require("../../icure-form/fields");
4
- const icure_button_group_1 = require("../../icure-button-group");
5
- const icure_date_picker_1 = require("../../icure-date-picker");
6
- const icure_dropdown_field_1 = require("../../icure-dropdown-field");
7
- const icure_form_1 = require("../../icure-form");
8
- const icure_label_1 = require("../../icure-label");
9
- const icure_text_field_1 = require("../../icure-text-field");
10
- // @ts-ignore
11
- const lit_1 = require("lit");
12
- const ehrLiteCss = (0, lit_1.css) `.icure-form {
13
- row-gap: 24px;
14
- }
15
-
16
- .icure-text-field, .icure-button-group {
17
- width: 100%;
18
- }
19
- .icure-text-field > .icure-label, .icure-button-group > .icure-label {
20
- color: #1D2235;
21
- font-size: 14px;
22
- font-weight: 400;
23
- }
24
- .icure-text-field > .icure-label > span, .icure-button-group > .icure-label > span {
25
- display: block;
26
- word-wrap: break-word;
27
- overflow: auto;
28
- font-weight: 400;
29
- }
30
- .icure-text-field > .icure-input, .icure-button-group > .icure-input {
31
- flex: 1 1 auto;
32
- width: auto;
33
- }
34
- .icure-text-field > .icure-label, .icure-button-group > .icure-label {
35
- transform: translate(0, 0) scale(1);
36
- }
37
- .icure-text-field .icure-input,
38
- .icure-text-field .input-container, .icure-button-group .icure-input,
39
- .icure-button-group .input-container {
40
- cursor: pointer;
41
- border-radius: 6px;
42
- padding: 4px 8px;
43
- width: 100%;
44
- box-sizing: border-box;
45
- border-width: 1px;
46
- border-style: solid;
47
- outline: 0;
48
- font: inherit;
49
- font-size: 13px;
50
- line-height: 1.4em;
51
- display: flex;
52
- align-items: center;
53
- vertical-align: middle;
54
- position: relative;
55
- -webkit-appearance: none;
56
- background-color: #ffffff;
57
- border-color: #DDE3E7;
58
- color: #1D2235;
59
- box-sizing: border-box;
60
- }
61
- .icure-text-field .icure-input:focus, .icure-text-field .icure-input:focus-within,
62
- .icure-text-field .input-container:focus,
63
- .icure-text-field .input-container:focus-within, .icure-button-group .icure-input:focus, .icure-button-group .icure-input:focus-within,
64
- .icure-button-group .input-container:focus,
65
- .icure-button-group .input-container:focus-within {
66
- box-shadow: 0px 0px 0px 2px rgba(61, 135, 197, 0.2);
67
- border-color: #084B83;
68
- }
69
- .icure-text-field .icure-input:hover,
70
- .icure-text-field .input-container:hover, .icure-button-group .icure-input:hover,
71
- .icure-button-group .input-container:hover {
72
- border-color: #084B83;
73
- box-shadow: none;
74
- }
75
- .icure-text-field .icure-input:hover:focus, .icure-text-field .icure-input:hover:focus-within,
76
- .icure-text-field .input-container:hover:focus,
77
- .icure-text-field .input-container:hover:focus-within, .icure-button-group .icure-input:hover:focus, .icure-button-group .icure-input:hover:focus-within,
78
- .icure-button-group .input-container:hover:focus,
79
- .icure-button-group .input-container:hover:focus-within {
80
- box-shadow: 0px 0px 0px 2px rgba(61, 135, 197, 0.2);
81
- border-color: #084B83;
82
- }
83
- .icure-text-field .icure-input .ProseMirror,
84
- .icure-text-field .input-container .ProseMirror, .icure-button-group .icure-input .ProseMirror,
85
- .icure-button-group .input-container .ProseMirror {
86
- padding: 0;
87
- font-size: 13px;
88
- line-height: 1.4em;
89
- color: #1D2235;
90
- }
91
- .icure-text-field .icure-input .ProseMirror .date,
92
- .icure-text-field .input-container .ProseMirror .date, .icure-button-group .icure-input .ProseMirror .date,
93
- .icure-button-group .input-container .ProseMirror .date {
94
- padding: 1px;
95
- }
96
- .icure-text-field .icure-input .ProseMirror .time,
97
- .icure-text-field .input-container .ProseMirror .time, .icure-button-group .icure-input .ProseMirror .time,
98
- .icure-button-group .input-container .ProseMirror .time {
99
- padding: 1px;
100
- }
101
- .icure-text-field .icure-input .ProseMirror:focus .focused, .icure-text-field .icure-input .ProseMirror:hover,
102
- .icure-text-field .input-container .ProseMirror:focus .focused,
103
- .icure-text-field .input-container .ProseMirror:hover, .icure-button-group .icure-input .ProseMirror:focus .focused, .icure-button-group .icure-input .ProseMirror:hover,
104
- .icure-button-group .input-container .ProseMirror:focus .focused,
105
- .icure-button-group .input-container .ProseMirror:hover {
106
- border-color: #084B83;
107
- }
108
- .icure-text-field .icure-input > svg,
109
- .icure-text-field .input-container > svg, .icure-button-group .icure-input > svg,
110
- .icure-button-group .input-container > svg {
111
- opacity: 0.5;
112
- }
113
- .icure-text-field .icure-input > svg path,
114
- .icure-text-field .input-container > svg path, .icure-button-group .icure-input > svg path,
115
- .icure-button-group .input-container > svg path {
116
- fill: #656565;
117
- }
118
- .icure-text-field .icure-input .extra,
119
- .icure-text-field .input-container .extra, .icure-button-group .icure-input .extra,
120
- .icure-button-group .input-container .extra {
121
- height: 20px;
122
- }
123
- .icure-text-field .icure-input .extra > .info,
124
- .icure-text-field .input-container .extra > .info, .icure-button-group .icure-input .extra > .info,
125
- .icure-button-group .input-container .extra > .info {
126
- color: #656565;
127
- opacity: 0.5;
128
- }
129
- .icure-text-field .icure-input .extra .buttons-container .btn svg path,
130
- .icure-text-field .input-container .extra .buttons-container .btn svg path, .icure-button-group .icure-input .extra .buttons-container .btn svg path,
131
- .icure-button-group .input-container .extra .buttons-container .btn svg path {
132
- fill: #656565;
133
- opacity: 0.5;
134
- }
135
- .icure-text-field .icure-input .extra .buttons-container .btn svg path:hover,
136
- .icure-text-field .input-container .extra .buttons-container .btn svg path:hover, .icure-button-group .icure-input .extra .buttons-container .btn svg path:hover,
137
- .icure-button-group .input-container .extra .buttons-container .btn svg path:hover {
138
- fill: #656565;
139
- opacity: 1;
140
- }
141
-
142
- input[type=radio] {
143
- margin-top: -1px;
144
- vertical-align: middle;
145
- }
146
-
147
- .icure-checkbox:hover {
148
- border-color: #DCE7F2;
149
- }
150
- .icure-checkbox:checked {
151
- accent-color: #084B83;
152
- }
153
-
154
- .icure-button-group > .icure-label {
155
- z-index: 1;
156
- pointer-events: none;
157
- line-height: 1.4em;
158
- cursor: text;
159
- font-size: 14px;
160
- top: calc(1.4em + 5px);
161
- left: 9px;
162
- color: #1D2235;
163
- align-items: center;
164
- height: 28px;
165
- max-width: 85%;
166
- min-width: 0;
167
- padding-bottom: 8px;
168
- }
169
- .icure-button-group > .icure-label > span {
170
- display: block;
171
- white-space: nowrap;
172
- text-overflow: ellipsis;
173
- overflow: hidden;
174
- padding-right: 8px;
175
- }
176
- .icure-button-group > div {
177
- display: grid;
178
- }
179
- .icure-button-group > div > div {
180
- display: flex;
181
- align-items: center;
182
- gap: 6px;
183
- }
184
- .icure-button-group > div > div > .icure-button-group-label {
185
- z-index: 1;
186
- line-height: 1.4em;
187
- cursor: text;
188
- font-size: 14px;
189
- top: calc(1.4em + 5px);
190
- left: 9px;
191
- transition: transform 0.2s ease-out, color 0.2s ease-out;
192
- color: #1D2235;
193
- display: flex;
194
- align-items: center;
195
- max-width: 85%;
196
- min-width: 0;
197
- }
198
- .icure-button-group > div > div > .icure-button-group-label > span {
199
- display: block;
200
- white-space: nowrap;
201
- text-overflow: ellipsis;
202
- overflow: hidden;
203
- padding-right: 8px;
204
- }
205
- .icure-button-group > .icure-input {
206
- flex: 1 1 auto;
207
- width: auto;
208
- }
209
-
210
- .icure-input #editor {
211
- color: #1D2235;
212
- }
213
- .icure-input #editor.tokens-list .ProseMirror li, .icure-input #editor.styled-tokens-list .ProseMirror li {
214
- background-color: #DCE7F2;
215
- }
216
- .icure-input #editor.tokens-list .ProseMirror li span:after, .icure-input #editor.styled-tokens-list .ProseMirror li span:after {
217
- background: transparent url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxu cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJPdXRsaW5lIiB2aWV3 Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iIzg4ODg4OCIgZmlsbD0iIzg4ODg4OCIg d2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiPjxwYXRoIGQ9Ik0xNiw4YTEsMSwwLDAs MC0xLjQxNCwwTDEyLDEwLjU4Niw5LjQxNCw4QTEsMSwwLDAsMCw4LDkuNDE0TDEw LjU4NiwxMiw4LDE0LjU4NkExLDEsMCwwLDAsOS40MTQsMTZMMTIsMTMuNDE0LDE0 LjU4NiwxNkExLDEsMCwwLDAsMTYsMTQuNTg2TDEzLjQxNCwxMiwxNiw5LjQxNEEx LDEsMCwwLDAsMTYsOFoiLz48cGF0aCBkPSJNMTIsMEExMiwxMiwwLDEsMCwyNCwx MiwxMi4wMTMsMTIuMDEzLDAsMCwwLDEyLDBabTAsMjJBMTAsMTAsMCwxLDEsMjIs MTIsMTAuMDExLDEwLjAxMSwwLDAsMSwxMiwyMloiLz48L3N2Zz4K") no-repeat center/16px;
218
- }
219
- .icure-input #editor.items-list .ProseMirror li {
220
- border-bottom: 1px dotted #8DA6BF;
221
- }
222
- .icure-input .extra {
223
- padding-right: 0;
224
- }
225
- .icure-input .select-arrow {
226
- opacity: 1;
227
- }
228
- .icure-input .select-arrow svg {
229
- width: 15px;
230
- height: 15px;
231
- }
232
- .icure-input .select-arrow svg path {
233
- fill: #9CA8B2;
234
- }
235
- .icure-input .options {
236
- padding: 2px;
237
- display: flex;
238
- flex-direction: column;
239
- align-items: flex-start;
240
- gap: 2px;
241
- border-radius: 6px;
242
- background: white;
243
- box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 9px 28px 0px rgba(0, 0, 0, 0.05);
244
- }
245
- .icure-input .options .option {
246
- height: auto;
247
- min-height: unset;
248
- display: flex;
249
- padding: 8px;
250
- align-items: center;
251
- align-self: stretch;
252
- border-radius: 4px;
253
- background: white;
254
- color: #1D2235;
255
- font-size: 12px;
256
- font-style: normal;
257
- font-weight: 400;
258
- line-height: normal;
259
- cursor: pointer;
260
- }
261
- .icure-input .options .option:hover {
262
- background: #DCE7F2;
263
- color: #084B83;
264
- }
265
- .icure-input:hover .select-arrow svg path, .icure-input:focus .select-arrow svg path {
266
- fill: #084B83;
267
- }`;
268
- class EhrLiteIcureButtonGroup extends icure_button_group_1.IcureButtonGroup {
269
- static get styles() {
270
- return [...icure_button_group_1.IcureButtonGroup.styles, ehrLiteCss];
271
- }
272
- }
273
- class EhrLiteIcureDatePickerField extends icure_date_picker_1.IcureDatePickerField {
274
- static get styles() {
275
- return [...icure_date_picker_1.IcureDatePickerField.styles, ehrLiteCss];
276
- }
277
- }
278
- class EhrLiteIcureDropdownField extends icure_dropdown_field_1.IcureDropdownField {
279
- static get styles() {
280
- return [...icure_dropdown_field_1.IcureDropdownField.styles, ehrLiteCss];
281
- }
282
- }
283
- class EhrLiteIcureForm extends icure_form_1.IcureForm {
284
- static get styles() {
285
- return [...icure_form_1.IcureForm.styles, ehrLiteCss];
286
- }
287
- }
288
- class EhrLiteIcureLabel extends icure_label_1.IcureLabel {
289
- static get styles() {
290
- return [...icure_label_1.IcureLabel.styles, ehrLiteCss];
291
- }
292
- }
293
- class EhrLiteIcureTextField extends icure_text_field_1.IcureTextField {
294
- static get styles() {
295
- return [...icure_text_field_1.IcureTextField.styles, ehrLiteCss];
296
- }
297
- }
298
- class EhrLiteLabel extends fields_1.Label {
299
- static get styles() {
300
- return [...fields_1.Label.styles, ehrLiteCss];
301
- }
302
- }
303
- customElements.define('icure-form-checkbox', fields_1.CheckBox);
304
- customElements.define('icure-form-date-picker', fields_1.DatePicker);
305
- customElements.define('icure-form-date-time-picker', fields_1.DateTimePicker);
306
- customElements.define('icure-form-dropdown-field', fields_1.DropdownField);
307
- customElements.define('icure-button-group', EhrLiteIcureButtonGroup);
308
- customElements.define('icure-date-picker-field', EhrLiteIcureDatePickerField);
309
- customElements.define('icure-dropdown-field', EhrLiteIcureDropdownField);
310
- customElements.define('icure-form', EhrLiteIcureForm);
311
- customElements.define('icure-label', EhrLiteIcureLabel);
312
- customElements.define('icure-text-field', EhrLiteIcureTextField);
313
- customElements.define('icure-form-items-list-field', fields_1.ItemsListField);
314
- customElements.define('icure-form-label', EhrLiteLabel);
315
- customElements.define('icure-form-measure-field', fields_1.MeasureField);
316
- customElements.define('icure-form-number-field', fields_1.NumberField);
317
- customElements.define('icure-form-radio-button', fields_1.RadioButton);
318
- customElements.define('icure-form-text-field', fields_1.TextField);
319
- customElements.define('icure-form-time-picker', fields_1.TimePicker);
320
- customElements.define('icure-form-token-field', fields_1.TokenField);
321
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../tmp/components/themes/ehr-lite/index.ts"],"names":[],"mappings":";;AAAA,oDAagC;AAChC,iEAA2D;AAC3D,+DAA8D;AAC9D,qEAA+D;AAC/D,iDAA4C;AAC5C,mDAA8C;AAC9C,6DAAuD;AAEvD,aAAa;AACb,6BAA0B;AAC1B,MAAM,UAAU,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+PpB,CAAA;AACF,MAAM,uBAAwB,SAAQ,qCAAgB;IACrD,MAAM,KAAK,MAAM;QAChB,OAAO,CAAC,GAAG,qCAAgB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IAChD,CAAC;CACD;AACD,MAAM,2BAA4B,SAAQ,wCAA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AAM,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,CAAA;AACxE,cAAc,CAAC,MAAM,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAA;AACrD,cAAc,CAAC,MAAM,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAA;AACvD,cAAc,CAAC,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,CAAA;AAChE,cAAc,CAAC,MAAM,CAAC,6BAA6B,EAAE,uBAAc,CAAC,CAAA;AACpE,cAAc,CAAC,MAAM,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAA;AACvD,cAAc,CAAC,MAAM,CAAC,0BAA0B,EAAE,qBAAY,CAAC,CAAA;AAC/D,cAAc,CAAC,MAAM,CAAC,yBAAyB,EAAE,oBAAW,CAAC,CAAA;AAC7D,cAAc,CAAC,MAAM,CAAC,yBAAyB,EAAE,oBAAW,CAAC,CAAA;AAC7D,cAAc,CAAC,MAAM,CAAC,uBAAuB,EAAE,kBAAS,CAAC,CAAA;AACzD,cAAc,CAAC,MAAM,CAAC,wBAAwB,EAAE,mBAAU,CAAC,CAAA;AAC3D,cAAc,CAAC,MAAM,CAAC,wBAAwB,EAAE,mBAAU,CAAC,CAAA","sourcesContent":["import {\n\tCheckBox,\n\tDatePicker,\n\tDateTimePicker,\n\tDropdownField,\n\tItemsListField,\n\tLabel,\n\tMeasureField,\n\tNumberField,\n\tRadioButton,\n\tTextField,\n\tTimePicker,\n\tTokenField,\n} from '../../icure-form/fields'\nimport { IcureButtonGroup } from '../../icure-button-group'\nimport { IcureDatePickerField } from '../../icure-date-picker'\nimport { IcureDropdownField } from '../../icure-dropdown-field'\nimport { IcureForm } from '../../icure-form'\nimport { IcureLabel } from '../../icure-label'\nimport { IcureTextField } from '../../icure-text-field'\n\n// @ts-ignore\nimport { css } from 'lit';\nconst ehrLiteCss = css`.icure-form {\n row-gap: 24px;\n}\n\n.icure-text-field, .icure-button-group {\n width: 100%;\n}\n.icure-text-field > .icure-label, .icure-button-group > .icure-label {\n color: #1D2235;\n font-size: 14px;\n font-weight: 400;\n}\n.icure-text-field > .icure-label > span, .icure-button-group > .icure-label > span {\n display: block;\n word-wrap: break-word;\n overflow: auto;\n font-weight: 400;\n}\n.icure-text-field > .icure-input, .icure-button-group > .icure-input {\n flex: 1 1 auto;\n width: auto;\n}\n.icure-text-field > .icure-label, .icure-button-group > .icure-label {\n transform: translate(0, 0) scale(1);\n}\n.icure-text-field .icure-input,\n.icure-text-field .input-container, .icure-button-group .icure-input,\n.icure-button-group .input-container {\n cursor: pointer;\n border-radius: 6px;\n padding: 4px 8px;\n width: 100%;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n outline: 0;\n font: inherit;\n font-size: 13px;\n line-height: 1.4em;\n display: flex;\n align-items: center;\n vertical-align: middle;\n position: relative;\n -webkit-appearance: none;\n background-color: #ffffff;\n border-color: #DDE3E7;\n color: #1D2235;\n box-sizing: border-box;\n}\n.icure-text-field .icure-input:focus, .icure-text-field .icure-input:focus-within,\n.icure-text-field .input-container:focus,\n.icure-text-field .input-container:focus-within, .icure-button-group .icure-input:focus, .icure-button-group .icure-input:focus-within,\n.icure-button-group .input-container:focus,\n.icure-button-group .input-container:focus-within {\n box-shadow: 0px 0px 0px 2px rgba(61, 135, 197, 0.2);\n border-color: #084B83;\n}\n.icure-text-field .icure-input:hover,\n.icure-text-field .input-container:hover, .icure-button-group .icure-input:hover,\n.icure-button-group .input-container:hover {\n border-color: #084B83;\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, .icure-button-group .icure-input:hover:focus, .icure-button-group .icure-input:hover:focus-within,\n.icure-button-group .input-container:hover:focus,\n.icure-button-group .input-container:hover:focus-within {\n box-shadow: 0px 0px 0px 2px rgba(61, 135, 197, 0.2);\n border-color: #084B83;\n}\n.icure-text-field .icure-input .ProseMirror,\n.icure-text-field .input-container .ProseMirror, .icure-button-group .icure-input .ProseMirror,\n.icure-button-group .input-container .ProseMirror {\n padding: 0;\n font-size: 13px;\n line-height: 1.4em;\n color: #1D2235;\n}\n.icure-text-field .icure-input .ProseMirror .date,\n.icure-text-field .input-container .ProseMirror .date, .icure-button-group .icure-input .ProseMirror .date,\n.icure-button-group .input-container .ProseMirror .date {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror .time,\n.icure-text-field .input-container .ProseMirror .time, .icure-button-group .icure-input .ProseMirror .time,\n.icure-button-group .input-container .ProseMirror .time {\n padding: 1px;\n}\n.icure-text-field .icure-input .ProseMirror:focus .focused, .icure-text-field .icure-input .ProseMirror:hover,\n.icure-text-field .input-container .ProseMirror:focus .focused,\n.icure-text-field .input-container .ProseMirror:hover, .icure-button-group .icure-input .ProseMirror:focus .focused, .icure-button-group .icure-input .ProseMirror:hover,\n.icure-button-group .input-container .ProseMirror:focus .focused,\n.icure-button-group .input-container .ProseMirror:hover {\n border-color: #084B83;\n}\n.icure-text-field .icure-input > svg,\n.icure-text-field .input-container > svg, .icure-button-group .icure-input > svg,\n.icure-button-group .input-container > svg {\n opacity: 0.5;\n}\n.icure-text-field .icure-input > svg path,\n.icure-text-field .input-container > svg path, .icure-button-group .icure-input > svg path,\n.icure-button-group .input-container > svg path {\n fill: #656565;\n}\n.icure-text-field .icure-input .extra,\n.icure-text-field .input-container .extra, .icure-button-group .icure-input .extra,\n.icure-button-group .input-container .extra {\n height: 20px;\n}\n.icure-text-field .icure-input .extra > .info,\n.icure-text-field .input-container .extra > .info, .icure-button-group .icure-input .extra > .info,\n.icure-button-group .input-container .extra > .info {\n color: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .buttons-container .btn svg path,\n.icure-text-field .input-container .extra .buttons-container .btn svg path, .icure-button-group .icure-input .extra .buttons-container .btn svg path,\n.icure-button-group .input-container .extra .buttons-container .btn svg path {\n fill: #656565;\n opacity: 0.5;\n}\n.icure-text-field .icure-input .extra .buttons-container .btn svg path:hover,\n.icure-text-field .input-container .extra .buttons-container .btn svg path:hover, .icure-button-group .icure-input .extra .buttons-container .btn svg path:hover,\n.icure-button-group .input-container .extra .buttons-container .btn svg path:hover {\n fill: #656565;\n opacity: 1;\n}\n\ninput[type=radio] {\n margin-top: -1px;\n vertical-align: middle;\n}\n\n.icure-checkbox:hover {\n border-color: #DCE7F2;\n}\n.icure-checkbox:checked {\n accent-color: #084B83;\n}\n\n.icure-button-group > .icure-label {\n z-index: 1;\n pointer-events: none;\n line-height: 1.4em;\n cursor: text;\n font-size: 14px;\n top: calc(1.4em + 5px);\n left: 9px;\n color: #1D2235;\n align-items: center;\n height: 28px;\n max-width: 85%;\n min-width: 0;\n padding-bottom: 8px;\n}\n.icure-button-group > .icure-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 > div {\n display: grid;\n}\n.icure-button-group > div > div {\n display: flex;\n align-items: center;\n gap: 6px;\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: 14px;\n top: calc(1.4em + 5px);\n left: 9px;\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n color: #1D2235;\n display: flex;\n align-items: center;\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\n.icure-input #editor {\n color: #1D2235;\n}\n.icure-input #editor.tokens-list .ProseMirror li, .icure-input #editor.styled-tokens-list .ProseMirror li {\n background-color: #DCE7F2;\n}\n.icure-input #editor.tokens-list .ProseMirror li span:after, .icure-input #editor.styled-tokens-list .ProseMirror li span:after {\n background: transparent url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxu cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJPdXRsaW5lIiB2aWV3 Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iIzg4ODg4OCIgZmlsbD0iIzg4ODg4OCIg d2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiPjxwYXRoIGQ9Ik0xNiw4YTEsMSwwLDAs MC0xLjQxNCwwTDEyLDEwLjU4Niw5LjQxNCw4QTEsMSwwLDAsMCw4LDkuNDE0TDEw LjU4NiwxMiw4LDE0LjU4NkExLDEsMCwwLDAsOS40MTQsMTZMMTIsMTMuNDE0LDE0 LjU4NiwxNkExLDEsMCwwLDAsMTYsMTQuNTg2TDEzLjQxNCwxMiwxNiw5LjQxNEEx LDEsMCwwLDAsMTYsOFoiLz48cGF0aCBkPSJNMTIsMEExMiwxMiwwLDEsMCwyNCwx MiwxMi4wMTMsMTIuMDEzLDAsMCwwLDEyLDBabTAsMjJBMTAsMTAsMCwxLDEsMjIs MTIsMTAuMDExLDEwLjAxMSwwLDAsMSwxMiwyMloiLz48L3N2Zz4K\") no-repeat center/16px;\n}\n.icure-input #editor.items-list .ProseMirror li {\n border-bottom: 1px dotted #8DA6BF;\n}\n.icure-input .extra {\n padding-right: 0;\n}\n.icure-input .select-arrow {\n opacity: 1;\n}\n.icure-input .select-arrow svg {\n width: 15px;\n height: 15px;\n}\n.icure-input .select-arrow svg path {\n fill: #9CA8B2;\n}\n.icure-input .options {\n padding: 2px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 2px;\n border-radius: 6px;\n background: white;\n box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 9px 28px 0px rgba(0, 0, 0, 0.05);\n}\n.icure-input .options .option {\n height: auto;\n min-height: unset;\n display: flex;\n padding: 8px;\n align-items: center;\n align-self: stretch;\n border-radius: 4px;\n background: white;\n color: #1D2235;\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n cursor: pointer;\n}\n.icure-input .options .option:hover {\n background: #DCE7F2;\n color: #084B83;\n}\n.icure-input:hover .select-arrow svg path, .icure-input:focus .select-arrow svg path {\n fill: #084B83;\n}` \nclass EhrLiteIcureButtonGroup extends IcureButtonGroup {\n\tstatic get styles() {\n\t\treturn [...IcureButtonGroup.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteIcureDatePickerField extends IcureDatePickerField {\n\tstatic get styles() {\n\t\treturn [...IcureDatePickerField.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteIcureDropdownField extends IcureDropdownField {\n\tstatic get styles() {\n\t\treturn [...IcureDropdownField.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteIcureForm extends IcureForm {\n\tstatic get styles() {\n\t\treturn [...IcureForm.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteIcureLabel extends IcureLabel {\n\tstatic get styles() {\n\t\treturn [...IcureLabel.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteIcureTextField extends IcureTextField {\n\tstatic get styles() {\n\t\treturn [...IcureTextField.styles, ehrLiteCss]\n\t}\n}\nclass EhrLiteLabel extends Label {\n\tstatic get styles() {\n\t\treturn [...Label.styles, ehrLiteCss]\n\t}\n}\n\ncustomElements.define('icure-form-checkbox', CheckBox)\ncustomElements.define('icure-form-date-picker', DatePicker)\ncustomElements.define('icure-form-date-time-picker', DateTimePicker)\ncustomElements.define('icure-form-dropdown-field', DropdownField)\ncustomElements.define('icure-button-group', EhrLiteIcureButtonGroup)\ncustomElements.define('icure-date-picker-field', EhrLiteIcureDatePickerField)\ncustomElements.define('icure-dropdown-field', EhrLiteIcureDropdownField)\ncustomElements.define('icure-form', EhrLiteIcureForm)\ncustomElements.define('icure-label', EhrLiteIcureLabel)\ncustomElements.define('icure-text-field', EhrLiteIcureTextField)\ncustomElements.define('icure-form-items-list-field', ItemsListField)\ncustomElements.define('icure-form-label', EhrLiteLabel)\ncustomElements.define('icure-form-measure-field', MeasureField)\ncustomElements.define('icure-form-number-field', NumberField)\ncustomElements.define('icure-form-radio-button', RadioButton)\ncustomElements.define('icure-form-text-field', TextField)\ncustomElements.define('icure-form-time-picker', TimePicker)\ncustomElements.define('icure-form-token-field', TokenField)\n"]}
@@ -1,16 +0,0 @@
1
- import { CodeStub, Content, Service } from '@icure/api';
2
- export declare function anyDateToDate(dateOrEpochOrLongCalendar?: Date | number): Date | undefined;
3
- export declare function dateToFuzzyDate(date: Date): number;
4
- export declare function anyDateToFuzzyDate(dateOrEpochOrLongCalendar: Date | number): number | undefined;
5
- export declare function currentTime(): string;
6
- export declare function currentDate(): string;
7
- export declare function currentDateTime(): string;
8
- export declare function isCodeEqual(c1: CodeStub, c2: CodeStub): boolean;
9
- export declare function areCodesEqual(c1s: CodeStub[], c2s: CodeStub[]): boolean;
10
- export declare function isServiceEqual(svc1: Service, svc2: Service): boolean;
11
- export declare function isContentEqual(content1: Content | undefined, content2: Content | undefined): boolean;
12
- export declare function isServiceContentEqual(content1: {
13
- [language: string]: Content;
14
- }, content2: {
15
- [language: string]: Content;
16
- }): boolean;
@@ -1,105 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.isServiceContentEqual = exports.isContentEqual = exports.isServiceEqual = exports.areCodesEqual = exports.isCodeEqual = exports.currentDateTime = exports.currentDate = exports.currentTime = exports.anyDateToFuzzyDate = exports.dateToFuzzyDate = exports.anyDateToDate = void 0;
7
- const parse_1 = __importDefault(require("date-fns/parse"));
8
- function anyDateToDate(dateOrEpochOrLongCalendar) {
9
- if (dateOrEpochOrLongCalendar instanceof Date) {
10
- return anyDateToDate(+dateOrEpochOrLongCalendar);
11
- }
12
- if (!dateOrEpochOrLongCalendar && dateOrEpochOrLongCalendar !== 0) {
13
- return undefined;
14
- }
15
- if (dateOrEpochOrLongCalendar >= 18000101 && dateOrEpochOrLongCalendar < 25400000) {
16
- return (0, parse_1.default)('' + dateOrEpochOrLongCalendar, 'yyyyMMdd', new Date());
17
- }
18
- else if (dateOrEpochOrLongCalendar >= 18000101000000) {
19
- return (0, parse_1.default)('' + dateOrEpochOrLongCalendar, 'yyyyMMddHHmmss', new Date());
20
- }
21
- else {
22
- return new Date(dateOrEpochOrLongCalendar);
23
- }
24
- }
25
- exports.anyDateToDate = anyDateToDate;
26
- function dateToFuzzyDate(date) {
27
- return parseInt(`${date.getFullYear()}${(date.getMonth() + 1).toString().padStart(2, '0')}${date.getDate().toString().padStart(2, '0')}${date.getHours().toString().padStart(2, '0')}:${date
28
- .getMinutes()
29
- .toString()
30
- .padStart(2, '0')}:${date.getSeconds().toString().padStart(2, '0')}`);
31
- }
32
- exports.dateToFuzzyDate = dateToFuzzyDate;
33
- function anyDateToFuzzyDate(dateOrEpochOrLongCalendar) {
34
- const date = anyDateToDate(dateOrEpochOrLongCalendar);
35
- if (!date) {
36
- return undefined;
37
- }
38
- return dateToFuzzyDate(date);
39
- }
40
- exports.anyDateToFuzzyDate = anyDateToFuzzyDate;
41
- function currentTime() {
42
- const now = new Date();
43
- return `${now.getHours().toString().padStart(2, '0')}:${now.getMinutes().toString().padStart(2, '0')}:${now.getSeconds().toString().padStart(2, '0')}`;
44
- }
45
- exports.currentTime = currentTime;
46
- function currentDate() {
47
- const now = new Date();
48
- return `${now.getDate().toString().padStart(2, '0')}/${(now.getMonth() + 1).toString().padStart(2, '0')}/${now.getFullYear()}`;
49
- }
50
- exports.currentDate = currentDate;
51
- function currentDateTime() {
52
- return `${currentDate()} ${currentTime()}`;
53
- }
54
- exports.currentDateTime = currentDateTime;
55
- function isCodeEqual(c1, c2) {
56
- var _a, _b;
57
- const idParts1 = (_a = c1.id) === null || _a === void 0 ? void 0 : _a.split('|');
58
- const idParts2 = (_b = c2.id) === null || _b === void 0 ? void 0 : _b.split('|');
59
- const type1 = c1.type || (idParts1 === null || idParts1 === void 0 ? void 0 : idParts1[0]);
60
- const type2 = c2.type || (idParts2 === null || idParts2 === void 0 ? void 0 : idParts2[0]);
61
- const code1 = c1.code || (idParts1 === null || idParts1 === void 0 ? void 0 : idParts1[1]);
62
- const code2 = c2.code || (idParts2 === null || idParts2 === void 0 ? void 0 : idParts2[1]);
63
- const version1 = c1.version || (idParts1 === null || idParts1 === void 0 ? void 0 : idParts1[2]);
64
- const version2 = c2.version || (idParts2 === null || idParts2 === void 0 ? void 0 : idParts2[2]);
65
- return type1 === type2 && code1 === code2 && version1 === version2;
66
- }
67
- exports.isCodeEqual = isCodeEqual;
68
- function areCodesEqual(c1s, c2s) {
69
- return c1s.every((c1) => c2s.some((c2) => isCodeEqual(c1, c2)) || false) && c2s.every((c2) => c1s.some((c1) => isCodeEqual(c1, c2)) || false);
70
- }
71
- exports.areCodesEqual = areCodesEqual;
72
- function isServiceEqual(svc1, svc2) {
73
- return (svc1.id === svc2.id && svc1.valueDate === svc2.valueDate && areCodesEqual(svc1.codes || [], svc2.codes || []) && isServiceContentEqual(svc1.content || {}, svc2.content || {}));
74
- }
75
- exports.isServiceEqual = isServiceEqual;
76
- function isContentEqual(content1, content2) {
77
- var _a, _b;
78
- if (!content1 && !content2) {
79
- return true;
80
- }
81
- if (!content1 || !content2) {
82
- return false;
83
- }
84
- return (((!content1.binaryValue && !content2.binaryValue) || content1.binaryValue === content2.binaryValue) &&
85
- (((content1.booleanValue === null || content1.booleanValue === undefined) && (content2.booleanValue === null || content2.booleanValue === undefined)) ||
86
- content1.booleanValue === content2.booleanValue) &&
87
- ((!content1.documentId && !content2.documentId) || content1.documentId === content2.documentId) &&
88
- (((content1.fuzzyDateValue === null || content1.fuzzyDateValue === undefined) && (content2.fuzzyDateValue === null || content2.fuzzyDateValue === undefined)) ||
89
- content1.fuzzyDateValue === content2.fuzzyDateValue) &&
90
- ((!content1.instantValue && !content2.instantValue) || content1.instantValue === content2.instantValue) &&
91
- ((!content1.measureValue && !content2.measureValue) || content1.measureValue === content2.measureValue) &&
92
- ((!content1.medicationValue && !content2.medicationValue) || content1.medicationValue === content2.medicationValue) &&
93
- ((!content1.stringValue && !content2.stringValue) || content1.stringValue === content2.stringValue) &&
94
- (((content1.numberValue === null || content1.numberValue === undefined) && (content2.numberValue === null || content2.numberValue === undefined)) ||
95
- content1.numberValue === content2.numberValue) &&
96
- ((!content1.compoundValue && !content2.compoundValue) ||
97
- ((((_a = content1.compoundValue) === null || _a === void 0 ? void 0 : _a.every((s1) => { var _a; return (_a = content2.compoundValue) === null || _a === void 0 ? void 0 : _a.some((s2) => isServiceEqual(s1, s2)); })) || false) &&
98
- (((_b = content2 === null || content2 === void 0 ? void 0 : content2.compoundValue) === null || _b === void 0 ? void 0 : _b.every((s2) => { var _a; return (_a = content1 === null || content1 === void 0 ? void 0 : content1.compoundValue) === null || _a === void 0 ? void 0 : _a.some((s1) => isServiceEqual(s1, s2)); })) || false))));
99
- }
100
- exports.isContentEqual = isContentEqual;
101
- function isServiceContentEqual(content1, content2) {
102
- return Object.keys(content1).reduce((isEqual, lng) => isEqual && isContentEqual(content1[lng], content2[lng]), true);
103
- }
104
- exports.isServiceContentEqual = isServiceContentEqual;
105
- //# sourceMappingURL=icure-utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"icure-utils.js","sourceRoot":"","sources":["../../tmp/utils/icure-utils.ts"],"names":[],"mappings":";;;;;;AAAA,2DAAkC;AAGlC,SAAgB,aAAa,CAAC,yBAAyC;IACtE,IAAI,yBAAyB,YAAY,IAAI,EAAE,CAAC;QAC/C,OAAO,aAAa,CAAC,CAAC,yBAAyB,CAAC,CAAA;IACjD,CAAC;IACD,IAAI,CAAC,yBAAyB,IAAI,yBAAyB,KAAK,CAAC,EAAE,CAAC;QACnE,OAAO,SAAS,CAAA;IACjB,CAAC;IACD,IAAI,yBAAyB,IAAI,QAAQ,IAAI,yBAAyB,GAAG,QAAQ,EAAE,CAAC;QACnF,OAAO,IAAA,eAAK,EAAC,EAAE,GAAG,yBAAyB,EAAE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,aAAa,0CAAE,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAA,EAAA,CAAC,KAAI,KAAK,CAAC,CAAC,CAAC,CACpH,CAAA;AACF,CAAC;AAxBD,wCAwBC;AAED,SAAgB,qBAAqB,CAAC,QAAyC,EAAE,QAAyC;IACzH,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC,OAAO,IAAI,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAe,CAAC,CAAA;AAChI,CAAC;AAFD,sDAEC","sourcesContent":["import parse from 'date-fns/parse'\nimport { CodeStub, Content, Service } from '@icure/api'\n\nexport function anyDateToDate(dateOrEpochOrLongCalendar?: Date | number): Date | undefined {\n\tif (dateOrEpochOrLongCalendar instanceof Date) {\n\t\treturn anyDateToDate(+dateOrEpochOrLongCalendar)\n\t}\n\tif (!dateOrEpochOrLongCalendar && dateOrEpochOrLongCalendar !== 0) {\n\t\treturn undefined\n\t}\n\tif (dateOrEpochOrLongCalendar >= 18000101 && dateOrEpochOrLongCalendar < 25400000) {\n\t\treturn parse('' + dateOrEpochOrLongCalendar, 'yyyyMMdd', new Date())\n\t} else if (dateOrEpochOrLongCalendar >= 18000101000000) {\n\t\treturn parse('' + dateOrEpochOrLongCalendar, 'yyyyMMddHHmmss', new Date())\n\t} else {\n\t\treturn new Date(dateOrEpochOrLongCalendar)\n\t}\n}\n\nexport function dateToFuzzyDate(date: Date): number {\n\treturn parseInt(\n\t\t`${date.getFullYear()}${(date.getMonth() + 1).toString().padStart(2, '0')}${date.getDate().toString().padStart(2, '0')}${date.getHours().toString().padStart(2, '0')}:${date\n\t\t\t.getMinutes()\n\t\t\t.toString()\n\t\t\t.padStart(2, '0')}:${date.getSeconds().toString().padStart(2, '0')}`,\n\t)\n}\n\nexport function anyDateToFuzzyDate(dateOrEpochOrLongCalendar: Date | number) {\n\tconst date = anyDateToDate(dateOrEpochOrLongCalendar)\n\tif (!date) {\n\t\treturn undefined\n\t}\n\treturn dateToFuzzyDate(date)\n}\n\nexport function currentTime() {\n\tconst now = new Date()\n\treturn `${now.getHours().toString().padStart(2, '0')}:${now.getMinutes().toString().padStart(2, '0')}:${now.getSeconds().toString().padStart(2, '0')}`\n}\n\nexport function currentDate() {\n\tconst now = new Date()\n\treturn `${now.getDate().toString().padStart(2, '0')}/${(now.getMonth() + 1).toString().padStart(2, '0')}/${now.getFullYear()}`\n}\n\nexport function currentDateTime() {\n\treturn `${currentDate()} ${currentTime()}`\n}\n\nexport function isCodeEqual(c1: CodeStub, c2: CodeStub): boolean {\n\tconst idParts1 = c1.id?.split('|')\n\tconst idParts2 = c2.id?.split('|')\n\tconst type1 = c1.type || idParts1?.[0]\n\tconst type2 = c2.type || idParts2?.[0]\n\tconst code1 = c1.code || idParts1?.[1]\n\tconst code2 = c2.code || idParts2?.[1]\n\tconst version1 = c1.version || idParts1?.[2]\n\tconst version2 = c2.version || idParts2?.[2]\n\treturn type1 === type2 && code1 === code2 && version1 === version2\n}\n\nexport function areCodesEqual(c1s: CodeStub[], c2s: CodeStub[]): boolean {\n\treturn c1s.every((c1) => c2s.some((c2) => isCodeEqual(c1, c2)) || false) && c2s.every((c2) => c1s.some((c1) => isCodeEqual(c1, c2)) || false)\n}\n\nexport function isServiceEqual(svc1: Service, svc2: Service): boolean {\n\treturn (\n\t\tsvc1.id === svc2.id && svc1.valueDate === svc2.valueDate && areCodesEqual(svc1.codes || [], svc2.codes || []) && isServiceContentEqual(svc1.content || {}, svc2.content || {})\n\t)\n}\n\nexport function isContentEqual(content1: Content | undefined, content2: Content | undefined): boolean {\n\tif (!content1 && !content2) {\n\t\treturn true\n\t}\n\tif (!content1 || !content2) {\n\t\treturn false\n\t}\n\treturn (\n\t\t((!content1.binaryValue && !content2.binaryValue) || content1.binaryValue === content2.binaryValue) &&\n\t\t(((content1.booleanValue === null || content1.booleanValue === undefined) && (content2.booleanValue === null || content2.booleanValue === undefined)) ||\n\t\t\tcontent1.booleanValue === content2.booleanValue) &&\n\t\t((!content1.documentId && !content2.documentId) || content1.documentId === content2.documentId) &&\n\t\t(((content1.fuzzyDateValue === null || content1.fuzzyDateValue === undefined) && (content2.fuzzyDateValue === null || content2.fuzzyDateValue === undefined)) ||\n\t\t\tcontent1.fuzzyDateValue === content2.fuzzyDateValue) &&\n\t\t((!content1.instantValue && !content2.instantValue) || content1.instantValue === content2.instantValue) &&\n\t\t((!content1.measureValue && !content2.measureValue) || content1.measureValue === content2.measureValue) &&\n\t\t((!content1.medicationValue && !content2.medicationValue) || content1.medicationValue === content2.medicationValue) &&\n\t\t((!content1.stringValue && !content2.stringValue) || content1.stringValue === content2.stringValue) &&\n\t\t(((content1.numberValue === null || content1.numberValue === undefined) && (content2.numberValue === null || content2.numberValue === undefined)) ||\n\t\t\tcontent1.numberValue === content2.numberValue) &&\n\t\t((!content1.compoundValue && !content2.compoundValue) ||\n\t\t\t((content1.compoundValue?.every((s1) => content2.compoundValue?.some((s2) => isServiceEqual(s1, s2))) || false) &&\n\t\t\t\t(content2?.compoundValue?.every((s2) => content1?.compoundValue?.some((s1) => isServiceEqual(s1, s2))) || false)))\n\t)\n}\n\nexport function isServiceContentEqual(content1: { [language: string]: Content }, content2: { [language: string]: Content }): boolean {\n\treturn Object.keys(content1).reduce((isEqual, lng) => isEqual && isContentEqual(content1[lng], content2[lng]), true as boolean)\n}\n"]}