@icure/form 1.1.0 → 1.1.10

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 (251) hide show
  1. package/.eslintrc +34 -0
  2. package/.prettierrc +8 -0
  3. package/.yarn/plugins/@yarnpkg/plugin-version.cjs +550 -0
  4. package/.yarn/versions/76a58acc.yml +0 -0
  5. package/.yarn/versions/c3ca09e7.yml +0 -0
  6. package/lib/components/common/index.d.ts +4 -0
  7. package/lib/components/common/index.js.map +1 -0
  8. package/lib/components/common/labelizedField.d.ts +8 -0
  9. package/{components/iqr-form/fields/multipleChoice.js → lib/components/common/labelizedField.js} +24 -24
  10. package/lib/components/common/labelizedField.js.map +1 -0
  11. package/lib/components/common/optionsField.d.ts +10 -0
  12. package/lib/components/common/optionsField.js +56 -0
  13. package/lib/components/common/optionsField.js.map +1 -0
  14. package/lib/components/common/stylizedField.d.ts +4 -0
  15. package/lib/components/common/stylizedField.js +801 -0
  16. package/lib/components/common/stylizedField.js.map +1 -0
  17. package/lib/components/common/translatedField.d.ts +8 -0
  18. package/{components/iqr-form/fields/timePicker.js → lib/components/common/translatedField.js} +22 -27
  19. package/lib/components/common/translatedField.js.map +1 -0
  20. package/lib/components/common/valuedField.d.ts +10 -0
  21. package/{components/iqr-form/fields/numberField.js → lib/components/common/valuedField.js} +18 -26
  22. package/lib/components/common/valuedField.js.map +1 -0
  23. package/lib/components/index.d.ts +6 -0
  24. package/{components → lib/components}/index.js +4 -0
  25. package/lib/components/index.js.map +1 -0
  26. package/lib/components/iqr-dropdown/index.d.ts +1 -0
  27. package/lib/components/iqr-dropdown/index.js +129 -0
  28. package/lib/components/iqr-dropdown/index.js.map +1 -0
  29. package/lib/components/iqr-form/fields/checkbox.d.ts +8 -0
  30. package/lib/components/iqr-form/fields/checkbox.js +50 -0
  31. package/lib/components/iqr-form/fields/checkbox.js.map +1 -0
  32. package/lib/components/iqr-form/fields/datePicker.d.ts +24 -0
  33. package/lib/components/iqr-form/fields/datePicker.js +101 -0
  34. package/lib/components/iqr-form/fields/datePicker.js.map +1 -0
  35. package/lib/components/iqr-form/fields/dateTimePicker.d.ts +24 -0
  36. package/lib/components/iqr-form/fields/dateTimePicker.js +100 -0
  37. package/lib/components/iqr-form/fields/dateTimePicker.js.map +1 -0
  38. package/lib/components/iqr-form/fields/dropdown.d.ts +10 -0
  39. package/lib/components/iqr-form/fields/dropdown.js +64 -0
  40. package/lib/components/iqr-form/fields/dropdown.js.map +1 -0
  41. package/lib/components/iqr-form/fields/label.d.ts +7 -0
  42. package/lib/components/iqr-form/fields/label.js +23 -0
  43. package/lib/components/iqr-form/fields/label.js.map +1 -0
  44. package/lib/components/iqr-form/fields/measureField.d.ts +25 -0
  45. package/lib/components/iqr-form/fields/measureField.js +107 -0
  46. package/lib/components/iqr-form/fields/measureField.js.map +1 -0
  47. package/lib/components/iqr-form/fields/multipleChoice.d.ts +15 -0
  48. package/lib/components/iqr-form/fields/multipleChoice.js +87 -0
  49. package/lib/components/iqr-form/fields/multipleChoice.js.map +1 -0
  50. package/lib/components/iqr-form/fields/numberField.d.ts +24 -0
  51. package/lib/components/iqr-form/fields/numberField.js +100 -0
  52. package/lib/components/iqr-form/fields/numberField.js.map +1 -0
  53. package/lib/components/iqr-form/fields/radioButton.d.ts +8 -0
  54. package/lib/components/iqr-form/fields/radioButton.js +50 -0
  55. package/lib/components/iqr-form/fields/radioButton.js.map +1 -0
  56. package/{components → lib/components}/iqr-form/fields/textfield.js +66 -37
  57. package/lib/components/iqr-form/fields/textfield.js.map +1 -0
  58. package/lib/components/iqr-form/fields/timePicker.d.ts +15 -0
  59. package/lib/components/iqr-form/fields/timePicker.js +90 -0
  60. package/lib/components/iqr-form/fields/timePicker.js.map +1 -0
  61. package/{components → lib/components}/iqr-form/index.d.ts +4 -0
  62. package/{components → lib/components}/iqr-form/index.js +40 -37
  63. package/lib/components/iqr-form/index.js.map +1 -0
  64. package/lib/components/iqr-form/model/index.d.ts +130 -0
  65. package/lib/components/iqr-form/model/index.js +164 -0
  66. package/lib/components/iqr-form/model/index.js.map +1 -0
  67. package/{components → lib/components}/iqr-form/renderer/cards.js +23 -9
  68. package/lib/components/iqr-form/renderer/cards.js.map +1 -0
  69. package/{components → lib/components}/iqr-form/renderer/form.d.ts +1 -0
  70. package/lib/components/iqr-form/renderer/form.js +240 -0
  71. package/lib/components/iqr-form/renderer/form.js.map +1 -0
  72. package/lib/components/iqr-form/renderer/index.d.ts +7 -0
  73. package/lib/components/iqr-form/renderer/index.js +3 -0
  74. package/lib/components/iqr-form/renderer/index.js.map +1 -0
  75. package/lib/components/iqr-form-loader/fieldsMapper.d.ts +3 -0
  76. package/lib/components/iqr-form-loader/fieldsMapper.js +16 -0
  77. package/lib/components/iqr-form-loader/fieldsMapper.js.map +1 -0
  78. package/lib/components/iqr-form-loader/fieldsValuesProviders.d.ts +38 -0
  79. package/lib/components/iqr-form-loader/fieldsValuesProviders.js +122 -0
  80. package/lib/components/iqr-form-loader/fieldsValuesProviders.js.map +1 -0
  81. package/{components → lib/components}/iqr-form-loader/formValuesContainer.d.ts +12 -4
  82. package/{components → lib/components}/iqr-form-loader/formValuesContainer.js +52 -3
  83. package/lib/components/iqr-form-loader/formValuesContainer.js.map +1 -0
  84. package/{components → lib/components}/iqr-form-loader/models.d.ts +1 -1
  85. package/lib/components/iqr-label/index.d.ts +1 -0
  86. package/lib/components/iqr-label/index.js +16 -0
  87. package/lib/components/iqr-label/index.js.map +1 -0
  88. package/lib/components/iqr-label/utils.d.ts +4 -0
  89. package/lib/components/iqr-label/utils.js +19 -0
  90. package/lib/components/iqr-label/utils.js.map +1 -0
  91. package/lib/components/iqr-radio-button-group/index.d.ts +1 -0
  92. package/lib/components/iqr-radio-button-group/index.js +807 -0
  93. package/lib/components/iqr-radio-button-group/index.js.map +1 -0
  94. package/{components → lib/components}/iqr-text-field/index.d.ts +10 -0
  95. package/{components → lib/components}/iqr-text-field/index.js +295 -191
  96. package/lib/components/iqr-text-field/index.js.map +1 -0
  97. package/{components → lib/components}/iqr-text-field/plugin/has-content-class-plugin.d.ts +1 -1
  98. package/{components → lib/components}/iqr-text-field/plugin/mask-plugin.js.map +1 -1
  99. package/{components → lib/components}/iqr-text-field/prosemirror-utils.d.ts +1 -1
  100. package/{components → lib/components}/iqr-text-field/prosemirror-utils.js.map +1 -1
  101. package/{components → lib/components}/iqr-text-field/schema/date-time-schema.d.ts +3 -3
  102. package/{components → lib/components}/iqr-text-field/schema/decimal-schema.d.ts +1 -1
  103. package/{components → lib/components}/iqr-text-field/schema/index.d.ts +1 -1
  104. package/{components → lib/components}/iqr-text-field/schema/markdown-schema.d.ts +3 -3
  105. package/{components → lib/components}/iqr-text-field/schema/measure-schema.d.ts +1 -1
  106. package/{components → lib/components}/iqr-text-field/schema/measure-schema.js +2 -1
  107. package/lib/components/iqr-text-field/schema/measure-schema.js.map +1 -0
  108. package/{components → lib/components}/iqr-text-field/schema/token-schema.d.ts +1 -1
  109. package/{components → lib/components}/iqr-text-field/styles/paths.d.ts +2 -0
  110. package/{components → lib/components}/iqr-text-field/styles/paths.js +7 -1
  111. package/lib/components/iqr-text-field/styles/paths.js.map +1 -0
  112. package/{components → lib/components}/iqr-text-field/suggestion-palette.d.ts +1 -1
  113. package/lib/package.json +32 -0
  114. package/{utils → lib/utils}/icure-utils.d.ts +3 -0
  115. package/{utils → lib/utils}/icure-utils.js +15 -1
  116. package/lib/utils/icure-utils.js.map +1 -0
  117. package/package.json +96 -19
  118. package/stats.json +1 -0
  119. package/tsconfig.tmp.json +39 -0
  120. package/components/index.d.ts +0 -2
  121. package/components/index.js.map +0 -1
  122. package/components/iqr-form/fields/datePicker.d.ts +0 -10
  123. package/components/iqr-form/fields/datePicker.js +0 -57
  124. package/components/iqr-form/fields/datePicker.js.map +0 -1
  125. package/components/iqr-form/fields/dateTimePicker.d.ts +0 -10
  126. package/components/iqr-form/fields/dateTimePicker.js +0 -49
  127. package/components/iqr-form/fields/dateTimePicker.js.map +0 -1
  128. package/components/iqr-form/fields/measureField.d.ts +0 -8
  129. package/components/iqr-form/fields/measureField.js +0 -44
  130. package/components/iqr-form/fields/measureField.js.map +0 -1
  131. package/components/iqr-form/fields/multipleChoice.d.ts +0 -8
  132. package/components/iqr-form/fields/multipleChoice.js.map +0 -1
  133. package/components/iqr-form/fields/numberField.d.ts +0 -8
  134. package/components/iqr-form/fields/numberField.js.map +0 -1
  135. package/components/iqr-form/fields/textfield.js.map +0 -1
  136. package/components/iqr-form/fields/timePicker.d.ts +0 -10
  137. package/components/iqr-form/fields/timePicker.js.map +0 -1
  138. package/components/iqr-form/index.js.map +0 -1
  139. package/components/iqr-form/model/index.d.ts +0 -96
  140. package/components/iqr-form/model/index.js +0 -120
  141. package/components/iqr-form/model/index.js.map +0 -1
  142. package/components/iqr-form/renderer/cards.js.map +0 -1
  143. package/components/iqr-form/renderer/form.js +0 -93
  144. package/components/iqr-form/renderer/form.js.map +0 -1
  145. package/components/iqr-form/renderer/index.d.ts +0 -6
  146. package/components/iqr-form/renderer/index.js.map +0 -1
  147. package/components/iqr-form-loader/fieldsValuesProviders.d.ts +0 -13
  148. package/components/iqr-form-loader/fieldsValuesProviders.js +0 -49
  149. package/components/iqr-form-loader/fieldsValuesProviders.js.map +0 -1
  150. package/components/iqr-form-loader/formValuesContainer.js.map +0 -1
  151. package/components/iqr-text-field/index.js.map +0 -1
  152. package/components/iqr-text-field/schema/measure-schema.js.map +0 -1
  153. package/components/iqr-text-field/styles/paths.js.map +0 -1
  154. package/utils/icure-utils.js.map +0 -1
  155. /package/{components/iqr-form/renderer → lib/components/common}/index.js +0 -0
  156. /package/{components → lib/components}/iqr-form/fields/textfield.d.ts +0 -0
  157. /package/{components → lib/components}/iqr-form/legacy/Content.d.ts +0 -0
  158. /package/{components → lib/components}/iqr-form/legacy/Content.js +0 -0
  159. /package/{components → lib/components}/iqr-form/legacy/Content.js.map +0 -0
  160. /package/{components → lib/components}/iqr-form/legacy/Data.d.ts +0 -0
  161. /package/{components → lib/components}/iqr-form/legacy/Data.js +0 -0
  162. /package/{components → lib/components}/iqr-form/legacy/Data.js.map +0 -0
  163. /package/{components → lib/components}/iqr-form/legacy/Editor.d.ts +0 -0
  164. /package/{components → lib/components}/iqr-form/legacy/Editor.js +0 -0
  165. /package/{components → lib/components}/iqr-form/legacy/Editor.js.map +0 -0
  166. /package/{components → lib/components}/iqr-form/legacy/FormColumn.d.ts +0 -0
  167. /package/{components → lib/components}/iqr-form/legacy/FormColumn.js +0 -0
  168. /package/{components → lib/components}/iqr-form/legacy/FormColumn.js.map +0 -0
  169. /package/{components → lib/components}/iqr-form/legacy/FormDataOption.d.ts +0 -0
  170. /package/{components → lib/components}/iqr-form/legacy/FormDataOption.js +0 -0
  171. /package/{components → lib/components}/iqr-form/legacy/FormDataOption.js.map +0 -0
  172. /package/{components → lib/components}/iqr-form/legacy/FormLayout.d.ts +0 -0
  173. /package/{components → lib/components}/iqr-form/legacy/FormLayout.js +0 -0
  174. /package/{components → lib/components}/iqr-form/legacy/FormLayout.js.map +0 -0
  175. /package/{components → lib/components}/iqr-form/legacy/FormLayoutData.d.ts +0 -0
  176. /package/{components → lib/components}/iqr-form/legacy/FormLayoutData.js +0 -0
  177. /package/{components → lib/components}/iqr-form/legacy/FormLayoutData.js.map +0 -0
  178. /package/{components → lib/components}/iqr-form/legacy/FormPlanning.d.ts +0 -0
  179. /package/{components → lib/components}/iqr-form/legacy/FormPlanning.js +0 -0
  180. /package/{components → lib/components}/iqr-form/legacy/FormPlanning.js.map +0 -0
  181. /package/{components → lib/components}/iqr-form/legacy/FormSection.d.ts +0 -0
  182. /package/{components → lib/components}/iqr-form/legacy/FormSection.js +0 -0
  183. /package/{components → lib/components}/iqr-form/legacy/FormSection.js.map +0 -0
  184. /package/{components → lib/components}/iqr-form/legacy/Formula.d.ts +0 -0
  185. /package/{components → lib/components}/iqr-form/legacy/Formula.js +0 -0
  186. /package/{components → lib/components}/iqr-form/legacy/Formula.js.map +0 -0
  187. /package/{components → lib/components}/iqr-form/legacy/GuiCode.d.ts +0 -0
  188. /package/{components → lib/components}/iqr-form/legacy/GuiCode.js +0 -0
  189. /package/{components → lib/components}/iqr-form/legacy/GuiCode.js.map +0 -0
  190. /package/{components → lib/components}/iqr-form/legacy/GuiCodeType.d.ts +0 -0
  191. /package/{components → lib/components}/iqr-form/legacy/GuiCodeType.js +0 -0
  192. /package/{components → lib/components}/iqr-form/legacy/GuiCodeType.js.map +0 -0
  193. /package/{components → lib/components}/iqr-form/legacy/Suggest.d.ts +0 -0
  194. /package/{components → lib/components}/iqr-form/legacy/Suggest.js +0 -0
  195. /package/{components → lib/components}/iqr-form/legacy/Suggest.js.map +0 -0
  196. /package/{components → lib/components}/iqr-form/legacy/Tag.d.ts +0 -0
  197. /package/{components → lib/components}/iqr-form/legacy/Tag.js +0 -0
  198. /package/{components → lib/components}/iqr-form/legacy/Tag.js.map +0 -0
  199. /package/{components → lib/components}/iqr-form/renderer/cards.d.ts +0 -0
  200. /package/{components → lib/components}/iqr-form/utils.d.ts +0 -0
  201. /package/{components → lib/components}/iqr-form/utils.js +0 -0
  202. /package/{components → lib/components}/iqr-form/utils.js.map +0 -0
  203. /package/{components → lib/components}/iqr-form-loader/index.d.ts +0 -0
  204. /package/{components → lib/components}/iqr-form-loader/index.js +0 -0
  205. /package/{components → lib/components}/iqr-form-loader/index.js.map +0 -0
  206. /package/{components → lib/components}/iqr-form-loader/models.js +0 -0
  207. /package/{components → lib/components}/iqr-form-loader/models.js.map +0 -0
  208. /package/{components → lib/components}/iqr-text-field/plugin/caret-fix-plugin.d.ts +0 -0
  209. /package/{components → lib/components}/iqr-text-field/plugin/caret-fix-plugin.js +0 -0
  210. /package/{components → lib/components}/iqr-text-field/plugin/caret-fix-plugin.js.map +0 -0
  211. /package/{components → lib/components}/iqr-text-field/plugin/has-content-class-plugin.js +0 -0
  212. /package/{components → lib/components}/iqr-text-field/plugin/has-content-class-plugin.js.map +0 -0
  213. /package/{components → lib/components}/iqr-text-field/plugin/mask-plugin.d.ts +0 -0
  214. /package/{components → lib/components}/iqr-text-field/plugin/mask-plugin.js +0 -0
  215. /package/{components → lib/components}/iqr-text-field/plugin/regexp-plugin.d.ts +0 -0
  216. /package/{components → lib/components}/iqr-text-field/plugin/regexp-plugin.js +0 -0
  217. /package/{components → lib/components}/iqr-text-field/plugin/regexp-plugin.js.map +0 -0
  218. /package/{components → lib/components}/iqr-text-field/prosemirror-commands.d.ts +0 -0
  219. /package/{components → lib/components}/iqr-text-field/prosemirror-commands.js +0 -0
  220. /package/{components → lib/components}/iqr-text-field/prosemirror-commands.js.map +0 -0
  221. /package/{components → lib/components}/iqr-text-field/prosemirror-utils.js +0 -0
  222. /package/{components → lib/components}/iqr-text-field/schema/common-marks.d.ts +0 -0
  223. /package/{components → lib/components}/iqr-text-field/schema/common-marks.js +0 -0
  224. /package/{components → lib/components}/iqr-text-field/schema/common-marks.js.map +0 -0
  225. /package/{components → lib/components}/iqr-text-field/schema/date-time-schema.js +0 -0
  226. /package/{components → lib/components}/iqr-text-field/schema/date-time-schema.js.map +0 -0
  227. /package/{components → lib/components}/iqr-text-field/schema/decimal-schema.js +0 -0
  228. /package/{components → lib/components}/iqr-text-field/schema/decimal-schema.js.map +0 -0
  229. /package/{components → lib/components}/iqr-text-field/schema/index.js +0 -0
  230. /package/{components → lib/components}/iqr-text-field/schema/index.js.map +0 -0
  231. /package/{components → lib/components}/iqr-text-field/schema/markdown-schema.js +0 -0
  232. /package/{components → lib/components}/iqr-text-field/schema/markdown-schema.js.map +0 -0
  233. /package/{components → lib/components}/iqr-text-field/schema/token-schema.js +0 -0
  234. /package/{components → lib/components}/iqr-text-field/schema/token-schema.js.map +0 -0
  235. /package/{components → lib/components}/iqr-text-field/schema/utils.d.ts +0 -0
  236. /package/{components → lib/components}/iqr-text-field/schema/utils.js +0 -0
  237. /package/{components → lib/components}/iqr-text-field/schema/utils.js.map +0 -0
  238. /package/{components → lib/components}/iqr-text-field/selection-companion.d.ts +0 -0
  239. /package/{components → lib/components}/iqr-text-field/selection-companion.js +0 -0
  240. /package/{components → lib/components}/iqr-text-field/selection-companion.js.map +0 -0
  241. /package/{components → lib/components}/iqr-text-field/suggestion-palette.js +0 -0
  242. /package/{components → lib/components}/iqr-text-field/suggestion-palette.js.map +0 -0
  243. /package/{index.d.ts → lib/index.d.ts} +0 -0
  244. /package/{index.js → lib/index.js} +0 -0
  245. /package/{index.js.map → lib/index.js.map} +0 -0
  246. /package/{utils → lib/utils}/languages.d.ts +0 -0
  247. /package/{utils → lib/utils}/languages.js +0 -0
  248. /package/{utils → lib/utils}/languages.js.map +0 -0
  249. /package/{utils → lib/utils}/no-lodash.d.ts +0 -0
  250. /package/{utils → lib/utils}/no-lodash.js +0 -0
  251. /package/{utils → lib/utils}/no-lodash.js.map +0 -0
@@ -0,0 +1,807 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const lit_1 = require("lit");
13
+ const decorators_js_1 = require("lit/decorators.js");
14
+ // @ts-ignore
15
+ const lit_2 = require("lit");
16
+ const baseCss = (0, lit_2.css) `@charset "UTF-8";
17
+ :host {
18
+ --bg-color-1: #F44336;
19
+ }
20
+
21
+ .ProseMirror {
22
+ position: relative;
23
+ }
24
+
25
+ .ProseMirror {
26
+ word-wrap: break-word;
27
+ white-space: pre-wrap;
28
+ -webkit-font-variant-ligatures: none;
29
+ font-variant-ligatures: none;
30
+ font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
31
+ }
32
+
33
+ .ProseMirror pre {
34
+ white-space: pre-wrap;
35
+ }
36
+
37
+ .ProseMirror li {
38
+ position: relative;
39
+ }
40
+
41
+ .ProseMirror-hideselection *::selection {
42
+ background: transparent;
43
+ }
44
+
45
+ .ProseMirror-hideselection *::-moz-selection {
46
+ background: transparent;
47
+ }
48
+
49
+ .ProseMirror-hideselection {
50
+ caret-color: transparent;
51
+ }
52
+
53
+ .ProseMirror-selectednode {
54
+ outline: 2px solid #8cf;
55
+ }
56
+
57
+ /* Make sure li selections wrap around markers */
58
+ li.ProseMirror-selectednode {
59
+ outline: none;
60
+ }
61
+
62
+ li.ProseMirror-selectednode:after {
63
+ content: "";
64
+ position: absolute;
65
+ left: -32px;
66
+ right: -2px;
67
+ top: -2px;
68
+ bottom: -2px;
69
+ border: 2px solid #8cf;
70
+ pointer-events: none;
71
+ }
72
+
73
+ .ProseMirror-gapcursor {
74
+ display: none;
75
+ pointer-events: none;
76
+ position: absolute;
77
+ }
78
+
79
+ .ProseMirror-gapcursor:after {
80
+ content: "";
81
+ display: block;
82
+ position: absolute;
83
+ top: -2px;
84
+ width: 20px;
85
+ border-top: 1px solid black;
86
+ animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
87
+ }
88
+
89
+ @keyframes ProseMirror-cursor-blink {
90
+ to {
91
+ visibility: hidden;
92
+ }
93
+ }
94
+ .ProseMirror-focused .ProseMirror-gapcursor {
95
+ display: block;
96
+ }
97
+
98
+ /* Add space around the hr to make clicking it easier */
99
+ .ProseMirror-example-setup-style hr {
100
+ padding: 2px 10px;
101
+ border: none;
102
+ margin: 1em 0;
103
+ }
104
+
105
+ .ProseMirror-example-setup-style hr:after {
106
+ content: "";
107
+ display: block;
108
+ height: 1px;
109
+ background: silver;
110
+ line-height: 2px;
111
+ }
112
+
113
+ .ProseMirror ul, .ProseMirror ol {
114
+ padding-left: 30px;
115
+ }
116
+
117
+ .ProseMirror blockquote {
118
+ padding-left: 1em;
119
+ border-left: 3px solid #eee;
120
+ margin-left: 0;
121
+ margin-right: 0;
122
+ }
123
+
124
+ .ProseMirror-example-setup-style img {
125
+ cursor: default;
126
+ }
127
+
128
+ .ProseMirror-prompt {
129
+ background: white;
130
+ padding: 5px 10px 5px 15px;
131
+ border: 1px solid silver;
132
+ position: fixed;
133
+ border-radius: 3px;
134
+ z-index: 11;
135
+ box-shadow: -0.5px 2px 5px rgba(0, 0, 0, 0.2);
136
+ }
137
+
138
+ .ProseMirror-prompt h5 {
139
+ margin: 0;
140
+ font-weight: normal;
141
+ font-size: 100%;
142
+ color: #444;
143
+ }
144
+
145
+ .ProseMirror-prompt input[type=text],
146
+ .ProseMirror-prompt textarea {
147
+ background: #eee;
148
+ border: none;
149
+ outline: none;
150
+ }
151
+
152
+ .ProseMirror-prompt input[type=text] {
153
+ padding: 0 4px;
154
+ }
155
+
156
+ .ProseMirror-prompt-close {
157
+ position: absolute;
158
+ left: 2px;
159
+ top: 1px;
160
+ color: #666;
161
+ border: none;
162
+ background: transparent;
163
+ padding: 0;
164
+ }
165
+
166
+ .ProseMirror-prompt-close:after {
167
+ content: "✕";
168
+ font-size: 12px;
169
+ }
170
+
171
+ .ProseMirror-invalid {
172
+ background: #ffc;
173
+ border: 1px solid #cc7;
174
+ border-radius: 4px;
175
+ padding: 5px 10px;
176
+ position: absolute;
177
+ min-width: 10em;
178
+ }
179
+
180
+ .ProseMirror-prompt-buttons {
181
+ margin-top: 5px;
182
+ display: none;
183
+ }
184
+
185
+ #editor, .editor {
186
+ color: black;
187
+ background-clip: padding-box;
188
+ border-radius: 4px;
189
+ border: 2px solid rgba(0, 0, 0, 0.2);
190
+ padding: 5px 0;
191
+ }
192
+
193
+ .ProseMirror p:last-child,
194
+ .ProseMirror h1:last-child,
195
+ .ProseMirror h2:last-child,
196
+ .ProseMirror h3:last-child,
197
+ .ProseMirror h4:last-child,
198
+ .ProseMirror h5:last-child,
199
+ .ProseMirror h6:last-child {
200
+ margin-bottom: 2px;
201
+ }
202
+
203
+ .ProseMirror {
204
+ padding: 6px 8px 2px 8px;
205
+ line-height: 1.2;
206
+ color: #274768;
207
+ font-size: 14px;
208
+ font-weight: 400;
209
+ outline: none;
210
+ }
211
+
212
+ .ProseMirror p {
213
+ margin-bottom: 1em;
214
+ }
215
+
216
+ .iqr-input {
217
+ background: #EDF2F7;
218
+ border-radius: 8px;
219
+ border: none;
220
+ min-height: 28px;
221
+ height: auto;
222
+ display: flex;
223
+ flex-flow: row nowrap;
224
+ align-items: flex-start;
225
+ justify-content: space-between;
226
+ }
227
+
228
+ #editor {
229
+ background: transparent;
230
+ border: none;
231
+ padding: 0;
232
+ flex-grow: 1;
233
+ }
234
+
235
+ #content {
236
+ position: relative;
237
+ padding: 0;
238
+ }
239
+
240
+ * {
241
+ font-family: "Roboto", Helvetica, sans-serif;
242
+ }
243
+
244
+ p {
245
+ margin-top: 0;
246
+ }
247
+
248
+ h3 {
249
+ color: #274768;
250
+ margin-top: 0;
251
+ }
252
+
253
+ .extra {
254
+ flex-shrink: 0;
255
+ height: 28px;
256
+ display: flex;
257
+ flex-flow: row nowrap;
258
+ align-items: center;
259
+ padding: 0 8px;
260
+ transition: all 0.24s cubic-bezier(0.42, 0.01, 1, 0.62);
261
+ }
262
+
263
+ .extra > .info {
264
+ color: #809AB4;
265
+ font-size: 12px;
266
+ width: 100%;
267
+ height: auto;
268
+ overflow: hidden;
269
+ pointer-events: none;
270
+ text-align: right;
271
+ }
272
+
273
+ .extra > .info > span {
274
+ font-weight: 700;
275
+ }
276
+
277
+ .extra .buttons-container {
278
+ display: flex;
279
+ height: 100%;
280
+ flex-flow: row nowrap;
281
+ align-items: center;
282
+ justify-content: flex-end;
283
+ width: 0;
284
+ transition: all 0.24s cubic-bezier(0.14, 0.69, 0.87, 0.54);
285
+ }
286
+
287
+ .extra:hover .buttons-container .menu-container .btn {
288
+ animation: slideIn 0.24s ease-in forwards;
289
+ pointer-events: none;
290
+ }
291
+
292
+ .extra:hover .buttons-container .menu-container .btn {
293
+ animation-delay: 0.24s;
294
+ }
295
+
296
+ .extra:hover .buttons-container .menu-container:hover .btn {
297
+ animation-delay: 0.04s;
298
+ }
299
+
300
+ .extra.forced:hover .buttons-container .menu-container .btn {
301
+ animation: none;
302
+ pointer-events: all;
303
+ }
304
+
305
+ .extra.forced .buttons-container .btn {
306
+ opacity: 1 !important;
307
+ }
308
+
309
+ .extra.forced .info {
310
+ opacity: 0 !important;
311
+ }
312
+
313
+ .extra:hover .info {
314
+ opacity: 0 !important;
315
+ z-index: 0 !important;
316
+ }
317
+
318
+ .extra .buttons-container .btn {
319
+ border: none;
320
+ background: transparent;
321
+ position: relative;
322
+ top: 0;
323
+ opacity: 0;
324
+ cursor: pointer;
325
+ height: 20px;
326
+ width: 10px;
327
+ margin-left: 4px;
328
+ margin-right: 4px;
329
+ padding: 0;
330
+ }
331
+
332
+ .extra .buttons-container .menu-container:last-child .btn {
333
+ margin-right: 0;
334
+ }
335
+
336
+ .extra .buttons-container .btn svg path {
337
+ fill: #809AB4;
338
+ }
339
+
340
+ .extra .buttons-container .btn:hover svg path {
341
+ fill: #274768;
342
+ }
343
+
344
+ .extra .buttons-container .menu-container .btn:hover::after {
345
+ content: attr(data-content);
346
+ position: absolute;
347
+ top: -22px;
348
+ height: 16px;
349
+ left: 50%;
350
+ transform: translateX(-50%);
351
+ border-radius: 8px;
352
+ background: #274768;
353
+ color: white;
354
+ display: flex;
355
+ flex-flow: row wrap;
356
+ align-items: center;
357
+ text-transform: capitalize;
358
+ white-space: nowrap;
359
+ padding: 0 12px;
360
+ font-size: 12px;
361
+ line-height: 0;
362
+ }
363
+
364
+ .extra .buttons-container .btn:focus, .extra .buttons-container .btn:focus-within {
365
+ border: none;
366
+ outline: none;
367
+ }
368
+
369
+ .extra .buttons-container .menu-container .btn:hover::before {
370
+ content: "";
371
+ display: block;
372
+ border-color: #274768 transparent transparent transparent;
373
+ border-style: solid;
374
+ border-width: 4px;
375
+ position: absolute;
376
+ top: -6px;
377
+ }
378
+
379
+ @keyframes slideIn {
380
+ 0% {
381
+ top: 12px;
382
+ pointer-events: none;
383
+ }
384
+ 100% {
385
+ top: 0;
386
+ opacity: 1;
387
+ pointer-events: all;
388
+ }
389
+ }
390
+ .menu-container {
391
+ position: relative;
392
+ display: flex;
393
+ align-items: center;
394
+ height: 100%;
395
+ }
396
+
397
+ .menu {
398
+ display: block;
399
+ position: absolute;
400
+ top: 20px;
401
+ right: 0;
402
+ z-index: 2;
403
+ background: #fff;
404
+ box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);
405
+ border-radius: 8px;
406
+ padding: 8px;
407
+ width: 220px;
408
+ min-height: 120px;
409
+ max-height: 320px;
410
+ overflow-y: scroll;
411
+ }
412
+
413
+ .menu .input-container {
414
+ background: #EDF2F7;
415
+ border-radius: 4px;
416
+ display: flex;
417
+ flex-flow: row nowrap;
418
+ align-items: center;
419
+ justify-content: flex-start;
420
+ height: 32px;
421
+ margin-bottom: 4px;
422
+ padding: 0 4px;
423
+ }
424
+
425
+ .menu .input-container:hover {
426
+ box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2);
427
+ }
428
+
429
+ .menu .input-container:focus-within {
430
+ box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2), 0 0 0 1px rgb(40, 151, 255);
431
+ }
432
+
433
+ .menu .input-container input {
434
+ background: transparent;
435
+ border: none;
436
+ flex-grow: 1;
437
+ height: 100%;
438
+ }
439
+
440
+ .menu .input-container input:focus {
441
+ background: transparent;
442
+ border: none;
443
+ outline: none;
444
+ }
445
+
446
+ .menu-trigger:focus .menu {
447
+ display: block;
448
+ }
449
+
450
+ .menu-container .item {
451
+ height: 22px;
452
+ width: 100%;
453
+ background: transparent;
454
+ border-radius: 4px;
455
+ font-size: 14px;
456
+ color: #274768;
457
+ display: flex;
458
+ flex-flow: row nowrap;
459
+ align-items: center;
460
+ justify-content: flex-start;
461
+ box-shadow: none;
462
+ border: none;
463
+ white-space: nowrap;
464
+ overflow-x: hidden;
465
+ text-overflow: ellipsis;
466
+ }
467
+
468
+ .menu-container .item:hover {
469
+ background: #F5F9FD;
470
+ font-weight: 500;
471
+ border-radius: 4px;
472
+ }
473
+
474
+ span {
475
+ position: relative;
476
+ z-index: 1;
477
+ }
478
+
479
+ span.date {
480
+ margin-right: 1px;
481
+ }
482
+
483
+ span.time {
484
+ margin-left: 1px;
485
+ }
486
+
487
+ span.measure {
488
+ display: inline-block;
489
+ margin-right: 1px;
490
+ }
491
+
492
+ span.unit {
493
+ margin-left: 1px;
494
+ display: inline-block;
495
+ }
496
+
497
+ span[data-content]:hover::after {
498
+ position: absolute;
499
+ content: attr(data-content);
500
+ background: #274768;
501
+ color: #FFFFFF;
502
+ font-size: 9px;
503
+ line-height: 12px;
504
+ top: -12px;
505
+ left: 0px;
506
+ padding: 0px 2px;
507
+ }
508
+
509
+ span[data-content]::before {
510
+ position: absolute;
511
+ content: "";
512
+ top: 0;
513
+ left: 0;
514
+ width: 100%;
515
+ height: 100%;
516
+ z-index: -1;
517
+ opacity: 0.3;
518
+ }
519
+
520
+ .masked {
521
+ display: none;
522
+ }
523
+
524
+ .companion {
525
+ position: absolute;
526
+ width: 15px;
527
+ background-color: hsl(194, 100%, 50%);
528
+ color: white;
529
+ z-index: 20;
530
+ padding: 0;
531
+ text-align: center;
532
+ font-size: 14px;
533
+ font-weight: 500;
534
+ display: flex;
535
+ align-items: center;
536
+ justify-content: center;
537
+ cursor: pointer;
538
+ border-radius: 0 2px 2px 0;
539
+ }
540
+
541
+ .companion:hover {
542
+ font-weight: 700;
543
+ background: hsl(202, 100%, 50%);
544
+ }
545
+
546
+ *::selection {
547
+ background-color: hsla(194, 100%, 50%, 0.2);
548
+ }
549
+
550
+ .suggestion-palette {
551
+ position: absolute;
552
+ z-index: 20;
553
+ max-width: 380px;
554
+ font-size: 11px;
555
+ overflow: hidden;
556
+ text-overflow: ellipsis;
557
+ padding: 4px;
558
+ border: none;
559
+ border-radius: 8px;
560
+ background: white;
561
+ 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);
562
+ }
563
+
564
+ .suggestion-palette ul {
565
+ white-space: nowrap;
566
+ list-style-type: none;
567
+ margin: 0;
568
+ padding: 0;
569
+ }
570
+
571
+ .suggestion-palette ul li {
572
+ padding: 0 8px;
573
+ font-size: 11px;
574
+ height: 20px;
575
+ box-sizing: border-box;
576
+ display: flex;
577
+ align-items: center;
578
+ justify-content: space-between;
579
+ border-radius: 4px;
580
+ color: rgb(39, 71, 104);
581
+ }
582
+ .suggestion-palette ul li svg {
583
+ height: 12px;
584
+ width: 12px;
585
+ border-radius: 4px;
586
+ transform-origin: center center;
587
+ }
588
+ .suggestion-palette ul li svg path {
589
+ fill: rgb(128, 154, 180);
590
+ }
591
+
592
+ .suggestion-palette ul li:not(:first-child) svg.tab-icn, .suggestion-palette ul li:not(.focused) svg.return-icn, .suggestion-palette ul.focused li:first-child svg.tab-icn {
593
+ height: 0;
594
+ width: 0;
595
+ transform: scale(0);
596
+ opacity: 0;
597
+ }
598
+
599
+ .suggestion-palette ul li.focused {
600
+ background-color: rgb(237, 242, 247);
601
+ }
602
+
603
+ .suggestion-palette ul li.focused svg.return-icn {
604
+ animation: growIn 0.24s ease-in forwards;
605
+ }
606
+
607
+ @keyframes growIn {
608
+ 0% {
609
+ transform: scale(0.5);
610
+ }
611
+ 90% {
612
+ transform: scale(1.1);
613
+ }
614
+ 100% {
615
+ transform: scale(1);
616
+ }
617
+ }
618
+ span.code-count-1::after, span.code-count-1::before {
619
+ background: var(--bg-code-color-1);
620
+ color: var(--text-code-color-1);
621
+ }
622
+
623
+ span.code-count-2::after, span.code-count-2::before {
624
+ background: var(--bg-code-color-1);
625
+ color: var(--text-code-color-1);
626
+ /* STRIPES */
627
+ /*background: repeating-linear-gradient(*/
628
+ /* 45deg,*/
629
+ /* var(--bg-code-color-1),*/
630
+ /* var(--bg-code-color-1) 10px,*/
631
+ /* var(--bg-code-color-2) 10px,*/
632
+ /* var(--bg-code-color-2) 20px*/
633
+ /*);*/
634
+ /* PAS STRIPES */
635
+ background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);
636
+ }
637
+
638
+ span.code-count-3::after, span.code-count-3::before {
639
+ background: var(--bg-code-color-1);
640
+ color: var(--text-code-color-1);
641
+ /* STRIPES */
642
+ 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);
643
+ /* PAS STRIPES */
644
+ /* background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);*/
645
+ }
646
+
647
+ .selected-option {
648
+ padding: 2px;
649
+ margin-right: 5px;
650
+ }`;
651
+ // @ts-ignore
652
+ const kendoCss = (0, lit_2.css) `input[type=radio] {
653
+ margin-top: -1px;
654
+ vertical-align: middle;
655
+ }
656
+
657
+ .iqr-checkbox:checked {
658
+ accent-color: #06a070;
659
+ }
660
+
661
+ .iqr-text-field {
662
+ position: relative;
663
+ padding-top: 1.4em;
664
+ display: flex;
665
+ flex-wrap: wrap;
666
+ justify-content: stretch;
667
+ }
668
+ .iqr-text-field > .iqr-label {
669
+ z-index: 1;
670
+ pointer-events: none;
671
+ position: absolute;
672
+ line-height: 1.4em;
673
+ cursor: text;
674
+ font-size: 14px;
675
+ top: calc( 1.4em + 5px );
676
+ left: 9px;
677
+ transition: transform 0.2s ease-out, color 0.2s ease-out;
678
+ color: #656565;
679
+ display: flex;
680
+ align-items: center;
681
+ height: 28px;
682
+ max-width: 55%;
683
+ min-width: 0;
684
+ }
685
+ .iqr-text-field > .iqr-label > span {
686
+ display: block;
687
+ white-space: nowrap;
688
+ text-overflow: ellipsis;
689
+ overflow: hidden;
690
+ padding-right: 8px;
691
+ }
692
+ .iqr-text-field > div {
693
+ display: flex;
694
+ align-items: center;
695
+ }
696
+ .iqr-text-field > div > .iqr-radio-button-label {
697
+ z-index: 1;
698
+ pointer-events: none;
699
+ line-height: 1.4em;
700
+ cursor: text;
701
+ font-size: 14px;
702
+ top: calc( 1.4em + 5px );
703
+ left: 9px;
704
+ transition: transform 0.2s ease-out, color 0.2s ease-out;
705
+ color: #656565;
706
+ display: flex;
707
+ align-items: center;
708
+ height: 28px;
709
+ max-width: 100%;
710
+ min-width: 0;
711
+ }
712
+ .iqr-text-field > div > .iqr-radio-button-label > span {
713
+ display: block;
714
+ white-space: nowrap;
715
+ text-overflow: ellipsis;
716
+ overflow: hidden;
717
+ padding-right: 8px;
718
+ }
719
+ .iqr-text-field > .iqr-input {
720
+ flex: 1 1 auto;
721
+ width: auto;
722
+ }
723
+ .iqr-text-field > .iqr-label {
724
+ transform: translate(0, 0) scale(1);
725
+ }
726
+ .iqr-text-field > .iqr-label.above, .iqr-text-field.has-content > .iqr-label, .iqr-text-field:focus > .iqr-label, .iqr-text-field:focus-within > .iqr-label {
727
+ transform: translate(-8px, -4px) translate(-1px, -1.4em) translate(0%, 0%) scale(1);
728
+ font-weight: 500;
729
+ height: 1.4em;
730
+ max-width: 100%;
731
+ }`;
732
+ const api_1 = require("@icure/api");
733
+ const utils_1 = require("../iqr-label/utils");
734
+ const optionsField_1 = require("../common/optionsField");
735
+ class IqrRadioButtonGroup extends optionsField_1.OptionsField {
736
+ constructor() {
737
+ super(...arguments);
738
+ this.type = 'radio';
739
+ this.inputValues = [];
740
+ this.VALUES_SEPARATOR = '|';
741
+ }
742
+ //override
743
+ static get styles() {
744
+ return [baseCss, kendoCss];
745
+ }
746
+ checkboxChange() {
747
+ var _a, _b;
748
+ if (this.handleValueChanged) {
749
+ const inputs = Array.from(((_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('input')) || []).filter((input) => input.checked);
750
+ const value = inputs.map((i) => Array.from(i.labels || []).map((label) => label.textContent)).join(this.VALUES_SEPARATOR);
751
+ (_b = this.handleValueChanged) === null || _b === void 0 ? void 0 : _b.call(this, this.displayedLanguage || this.defaultLanguage || 'en', {
752
+ asString: value,
753
+ content: new api_1.Content({
754
+ stringValue: value,
755
+ }),
756
+ }, undefined, [
757
+ ...(this.options || [])
758
+ .filter((option) => inputs.find((i) => i.id === option.id))
759
+ .map((option) => !(option instanceof api_1.CodeStub) ? new api_1.CodeStub({ id: 'CUSTOM_OPTION|' + option.id + '|1', type: 'CUSTOM_OPTION', code: option.id, version: '1' }) : option),
760
+ ]);
761
+ }
762
+ }
763
+ render() {
764
+ var _a, _b, _c;
765
+ return (0, lit_1.html) `
766
+ <div class="iqr-text-field">
767
+ ${(0, utils_1.generateLabel)((_a = this.label) !== null && _a !== void 0 ? _a : '', (_b = this.labelPosition) !== null && _b !== void 0 ? _b : 'float', this.translationProvider)}
768
+ ${(_c = this.options) === null || _c === void 0 ? void 0 : _c.map((x) => {
769
+ var _a;
770
+ const text = !(x instanceof api_1.CodeStub) ? this.translateText(x.text) || '' : this.translateText(((_a = x === null || x === void 0 ? void 0 : x.label) === null || _a === void 0 ? void 0 : _a[this.displayedLanguage || this.defaultLanguage || 'en']) || '');
771
+ return (0, lit_1.html) `<div>
772
+ <input
773
+ class="iqr-checkbox"
774
+ type="${this.type}"
775
+ id="${x.id}"
776
+ name="${this.label}"
777
+ value="${!(x instanceof api_1.CodeStub) ? x.id : x.code}"
778
+ .checked=${this.inputValues.includes(text)}
779
+ @change=${this.checkboxChange}
780
+ text="${text}"
781
+ /><label class="iqr-radio-button-label" for="${x.id}"><span>${text}</span></label>
782
+ </div>`;
783
+ })}
784
+ </div>
785
+ `;
786
+ }
787
+ firstUpdated() {
788
+ var _a, _b, _c;
789
+ const providedValue = this.valueProvider && this.valueProvider();
790
+ const displayedVersionedValue = (_b = (_a = providedValue === null || providedValue === void 0 ? void 0 : providedValue.versions) === null || _a === void 0 ? void 0 : _a.find((version) => version.value)) === null || _b === void 0 ? void 0 : _b.value;
791
+ if (displayedVersionedValue && ((_c = Object.keys(displayedVersionedValue)) === null || _c === void 0 ? void 0 : _c.length)) {
792
+ this.inputValues = displayedVersionedValue[Object.keys(displayedVersionedValue)[0]].split(this.VALUES_SEPARATOR);
793
+ }
794
+ else if (this.value)
795
+ this.inputValues = this.value.split(this.VALUES_SEPARATOR);
796
+ }
797
+ }
798
+ __decorate([
799
+ (0, decorators_js_1.property)(),
800
+ __metadata("design:type", String)
801
+ ], IqrRadioButtonGroup.prototype, "type", void 0);
802
+ __decorate([
803
+ (0, decorators_js_1.state)(),
804
+ __metadata("design:type", Array)
805
+ ], IqrRadioButtonGroup.prototype, "inputValues", void 0);
806
+ customElements.define('iqr-radio-button', IqrRadioButtonGroup);
807
+ //# sourceMappingURL=index.js.map