@icure/form 1.0.12 → 1.0.13

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 (380) hide show
  1. package/package.json +12 -12
  2. package/{components → src/components}/index.d.ts +0 -0
  3. package/{components → src/components}/index.js +5 -1
  4. package/src/components/index.js.map +1 -0
  5. package/{components → src/components}/iqr-form/fields/datePicker.d.ts +0 -0
  6. package/{components → src/components}/iqr-form/fields/datePicker.js +5 -5
  7. package/src/components/iqr-form/fields/datePicker.js.map +1 -0
  8. package/{components → src/components}/iqr-form/fields/dateTimePicker.d.ts +0 -0
  9. package/{components → src/components}/iqr-form/fields/dateTimePicker.js +5 -5
  10. package/src/components/iqr-form/fields/dateTimePicker.js.map +1 -0
  11. package/{components → src/components}/iqr-form/fields/measureField.d.ts +0 -0
  12. package/{components → src/components}/iqr-form/fields/measureField.js +4 -4
  13. package/src/components/iqr-form/fields/measureField.js.map +1 -0
  14. package/{components → src/components}/iqr-form/fields/multipleChoice.d.ts +0 -0
  15. package/{components → src/components}/iqr-form/fields/multipleChoice.js +4 -4
  16. package/src/components/iqr-form/fields/multipleChoice.js.map +1 -0
  17. package/{components → src/components}/iqr-form/fields/numberField.d.ts +0 -0
  18. package/{components → src/components}/iqr-form/fields/numberField.js +4 -4
  19. package/src/components/iqr-form/fields/numberField.js.map +1 -0
  20. package/{components → src/components}/iqr-form/fields/textfield.d.ts +0 -0
  21. package/{components → src/components}/iqr-form/fields/textfield.js +38 -35
  22. package/src/components/iqr-form/fields/textfield.js.map +1 -0
  23. package/{components → src/components}/iqr-form/fields/timePicker.d.ts +0 -0
  24. package/{components → src/components}/iqr-form/fields/timePicker.js +5 -5
  25. package/src/components/iqr-form/fields/timePicker.js.map +1 -0
  26. package/{components → src/components}/iqr-form/index.d.ts +0 -0
  27. package/src/components/iqr-form/index.js +89 -0
  28. package/src/components/iqr-form/index.js.map +1 -0
  29. package/{components → src/components}/iqr-form/legacy/Content.d.ts +0 -0
  30. package/{components → src/components}/iqr-form/legacy/Content.js +0 -0
  31. package/src/components/iqr-form/legacy/Content.js.map +1 -0
  32. package/{components → src/components}/iqr-form/legacy/Data.d.ts +0 -0
  33. package/{components → src/components}/iqr-form/legacy/Data.js +0 -0
  34. package/src/components/iqr-form/legacy/Data.js.map +1 -0
  35. package/{components → src/components}/iqr-form/legacy/Editor.d.ts +0 -0
  36. package/{components → src/components}/iqr-form/legacy/Editor.js +0 -0
  37. package/src/components/iqr-form/legacy/Editor.js.map +1 -0
  38. package/{components → src/components}/iqr-form/legacy/FormColumn.d.ts +0 -0
  39. package/{components → src/components}/iqr-form/legacy/FormColumn.js +0 -0
  40. package/src/components/iqr-form/legacy/FormColumn.js.map +1 -0
  41. package/{components → src/components}/iqr-form/legacy/FormDataOption.d.ts +0 -0
  42. package/{components → src/components}/iqr-form/legacy/FormDataOption.js +0 -0
  43. package/src/components/iqr-form/legacy/FormDataOption.js.map +1 -0
  44. package/{components → src/components}/iqr-form/legacy/FormLayout.d.ts +0 -0
  45. package/{components → src/components}/iqr-form/legacy/FormLayout.js +0 -0
  46. package/src/components/iqr-form/legacy/FormLayout.js.map +1 -0
  47. package/{components → src/components}/iqr-form/legacy/FormLayoutData.d.ts +0 -0
  48. package/{components → src/components}/iqr-form/legacy/FormLayoutData.js +0 -0
  49. package/src/components/iqr-form/legacy/FormLayoutData.js.map +1 -0
  50. package/{components → src/components}/iqr-form/legacy/FormPlanning.d.ts +0 -0
  51. package/{components → src/components}/iqr-form/legacy/FormPlanning.js +0 -0
  52. package/src/components/iqr-form/legacy/FormPlanning.js.map +1 -0
  53. package/{components → src/components}/iqr-form/legacy/FormSection.d.ts +0 -0
  54. package/{components → src/components}/iqr-form/legacy/FormSection.js +0 -0
  55. package/src/components/iqr-form/legacy/FormSection.js.map +1 -0
  56. package/{components → src/components}/iqr-form/legacy/Formula.d.ts +0 -0
  57. package/{components → src/components}/iqr-form/legacy/Formula.js +0 -0
  58. package/src/components/iqr-form/legacy/Formula.js.map +1 -0
  59. package/{components → src/components}/iqr-form/legacy/GuiCode.d.ts +0 -0
  60. package/{components → src/components}/iqr-form/legacy/GuiCode.js +0 -0
  61. package/src/components/iqr-form/legacy/GuiCode.js.map +1 -0
  62. package/{components → src/components}/iqr-form/legacy/GuiCodeType.d.ts +0 -0
  63. package/{components → src/components}/iqr-form/legacy/GuiCodeType.js +0 -0
  64. package/src/components/iqr-form/legacy/GuiCodeType.js.map +1 -0
  65. package/{components → src/components}/iqr-form/legacy/Suggest.d.ts +0 -0
  66. package/{components → src/components}/iqr-form/legacy/Suggest.js +0 -0
  67. package/src/components/iqr-form/legacy/Suggest.js.map +1 -0
  68. package/{components → src/components}/iqr-form/legacy/Tag.d.ts +0 -0
  69. package/{components → src/components}/iqr-form/legacy/Tag.js +0 -0
  70. package/src/components/iqr-form/legacy/Tag.js.map +1 -0
  71. package/{components → src/components}/iqr-form/model/index.d.ts +0 -0
  72. package/{components → src/components}/iqr-form/model/index.js +0 -0
  73. package/src/components/iqr-form/model/index.js.map +1 -0
  74. package/{components → src/components}/iqr-form/renderer/cards.d.ts +0 -0
  75. package/src/components/iqr-form/renderer/cards.js +55 -0
  76. package/src/components/iqr-form/renderer/cards.js.map +1 -0
  77. package/{components → src/components}/iqr-form/renderer/form.d.ts +0 -0
  78. package/{components → src/components}/iqr-form/renderer/form.js +28 -28
  79. package/src/components/iqr-form/renderer/form.js.map +1 -0
  80. package/{components → src/components}/iqr-form/renderer/index.d.ts +0 -0
  81. package/{components → src/components}/iqr-form/renderer/index.js +0 -0
  82. package/src/components/iqr-form/renderer/index.js.map +1 -0
  83. package/{components → src/components}/iqr-form/utils.d.ts +0 -0
  84. package/{components → src/components}/iqr-form/utils.js +4 -4
  85. package/src/components/iqr-form/utils.js.map +1 -0
  86. package/{components → src/components}/iqr-form-loader/fieldsValuesProviders.d.ts +0 -0
  87. package/{components → src/components}/iqr-form-loader/fieldsValuesProviders.js +7 -7
  88. package/src/components/iqr-form-loader/fieldsValuesProviders.js.map +1 -0
  89. package/{components → src/components}/iqr-form-loader/formValuesContainer.d.ts +0 -0
  90. package/{components → src/components}/iqr-form-loader/formValuesContainer.js +7 -7
  91. package/src/components/iqr-form-loader/formValuesContainer.js.map +1 -0
  92. package/{components → src/components}/iqr-form-loader/index.d.ts +0 -0
  93. package/{components → src/components}/iqr-form-loader/index.js +5 -1
  94. package/src/components/iqr-form-loader/index.js.map +1 -0
  95. package/{components → src/components}/iqr-form-loader/models.d.ts +0 -0
  96. package/{components → src/components}/iqr-form-loader/models.js +0 -0
  97. package/src/components/iqr-form-loader/models.js.map +1 -0
  98. package/{components → src/components}/iqr-text-field/index.d.ts +0 -0
  99. package/src/components/iqr-text-field/index.js +490 -0
  100. package/src/components/iqr-text-field/index.js.map +1 -0
  101. package/{components → src/components}/iqr-text-field/plugin/caret-fix-plugin.d.ts +0 -0
  102. package/{components → src/components}/iqr-text-field/plugin/caret-fix-plugin.js +0 -0
  103. package/src/components/iqr-text-field/plugin/caret-fix-plugin.js.map +1 -0
  104. package/{components → src/components}/iqr-text-field/plugin/has-content-class-plugin.d.ts +0 -0
  105. package/{components → src/components}/iqr-text-field/plugin/has-content-class-plugin.js +0 -0
  106. package/src/components/iqr-text-field/plugin/has-content-class-plugin.js.map +1 -0
  107. package/{components → src/components}/iqr-text-field/plugin/mask-plugin.d.ts +0 -0
  108. package/{components → src/components}/iqr-text-field/plugin/mask-plugin.js +0 -0
  109. package/src/components/iqr-text-field/plugin/mask-plugin.js.map +1 -0
  110. package/{components → src/components}/iqr-text-field/plugin/regexp-plugin.d.ts +0 -0
  111. package/{components → src/components}/iqr-text-field/plugin/regexp-plugin.js +0 -0
  112. package/src/components/iqr-text-field/plugin/regexp-plugin.js.map +1 -0
  113. package/{components → src/components}/iqr-text-field/prosemirror-commands.d.ts +0 -0
  114. package/{components → src/components}/iqr-text-field/prosemirror-commands.js +2 -2
  115. package/src/components/iqr-text-field/prosemirror-commands.js.map +1 -0
  116. package/{components → src/components}/iqr-text-field/prosemirror-utils.d.ts +0 -0
  117. package/{components → src/components}/iqr-text-field/prosemirror-utils.js +0 -0
  118. package/src/components/iqr-text-field/prosemirror-utils.js.map +1 -0
  119. package/{components → src/components}/iqr-text-field/schema/common-marks.d.ts +0 -0
  120. package/{components → src/components}/iqr-text-field/schema/common-marks.js +0 -0
  121. package/src/components/iqr-text-field/schema/common-marks.js.map +1 -0
  122. package/{components → src/components}/iqr-text-field/schema/date-time-schema.d.ts +0 -0
  123. package/{components → src/components}/iqr-text-field/schema/date-time-schema.js +0 -0
  124. package/src/components/iqr-text-field/schema/date-time-schema.js.map +1 -0
  125. package/{components → src/components}/iqr-text-field/schema/decimal-schema.d.ts +0 -0
  126. package/{components → src/components}/iqr-text-field/schema/decimal-schema.js +0 -0
  127. package/src/components/iqr-text-field/schema/decimal-schema.js.map +1 -0
  128. package/{components → src/components}/iqr-text-field/schema/index.d.ts +0 -0
  129. package/{components → src/components}/iqr-text-field/schema/index.js +7 -7
  130. package/src/components/iqr-text-field/schema/index.js.map +1 -0
  131. package/{components → src/components}/iqr-text-field/schema/markdown-schema.d.ts +0 -0
  132. package/{components → src/components}/iqr-text-field/schema/markdown-schema.js +2 -2
  133. package/src/components/iqr-text-field/schema/markdown-schema.js.map +1 -0
  134. package/{components → src/components}/iqr-text-field/schema/measure-schema.d.ts +0 -0
  135. package/{components → src/components}/iqr-text-field/schema/measure-schema.js +0 -0
  136. package/src/components/iqr-text-field/schema/measure-schema.js.map +1 -0
  137. package/{components → src/components}/iqr-text-field/schema/token-schema.d.ts +0 -0
  138. package/{components → src/components}/iqr-text-field/schema/token-schema.js +2 -2
  139. package/src/components/iqr-text-field/schema/token-schema.js.map +1 -0
  140. package/{components → src/components}/iqr-text-field/schema/utils.d.ts +0 -0
  141. package/{components → src/components}/iqr-text-field/schema/utils.js +0 -0
  142. package/src/components/iqr-text-field/schema/utils.js.map +1 -0
  143. package/{components → src/components}/iqr-text-field/selection-companion.d.ts +0 -0
  144. package/{components → src/components}/iqr-text-field/selection-companion.js +0 -0
  145. package/src/components/iqr-text-field/selection-companion.js.map +1 -0
  146. package/{components → src/components}/iqr-text-field/styles/paths.d.ts +0 -0
  147. package/{components → src/components}/iqr-text-field/styles/paths.js +5 -5
  148. package/src/components/iqr-text-field/styles/paths.js.map +1 -0
  149. package/{components → src/components}/iqr-text-field/suggestion-palette.d.ts +0 -0
  150. package/{components → src/components}/iqr-text-field/suggestion-palette.js +1 -1
  151. package/src/components/iqr-text-field/suggestion-palette.js.map +1 -0
  152. package/{index.d.ts → src/index.d.ts} +0 -0
  153. package/{index.js → src/index.js} +5 -1
  154. package/src/index.js.map +1 -0
  155. package/{utils → src/utils}/icure-utils.d.ts +0 -0
  156. package/{utils → src/utils}/icure-utils.js +3 -3
  157. package/src/utils/icure-utils.js.map +1 -0
  158. package/{utils → src/utils}/languages.d.ts +0 -0
  159. package/{utils → src/utils}/languages.js +0 -0
  160. package/src/utils/languages.js.map +1 -0
  161. package/{utils → src/utils}/no-lodash.d.ts +0 -0
  162. package/{utils → src/utils}/no-lodash.js +0 -0
  163. package/src/utils/no-lodash.js.map +1 -0
  164. package/tmp/components/index.d.ts +2 -0
  165. package/tmp/components/index.js +19 -0
  166. package/tmp/components/index.js.map +1 -0
  167. package/tmp/components/iqr-form/fields/datePicker.d.ts +10 -0
  168. package/tmp/components/iqr-form/fields/datePicker.js +57 -0
  169. package/tmp/components/iqr-form/fields/datePicker.js.map +1 -0
  170. package/tmp/components/iqr-form/fields/dateTimePicker.d.ts +10 -0
  171. package/tmp/components/iqr-form/fields/dateTimePicker.js +49 -0
  172. package/tmp/components/iqr-form/fields/dateTimePicker.js.map +1 -0
  173. package/tmp/components/iqr-form/fields/measureField.d.ts +8 -0
  174. package/tmp/components/iqr-form/fields/measureField.js +44 -0
  175. package/tmp/components/iqr-form/fields/measureField.js.map +1 -0
  176. package/tmp/components/iqr-form/fields/multipleChoice.d.ts +8 -0
  177. package/tmp/components/iqr-form/fields/multipleChoice.js +44 -0
  178. package/tmp/components/iqr-form/fields/multipleChoice.js.map +1 -0
  179. package/tmp/components/iqr-form/fields/numberField.d.ts +8 -0
  180. package/tmp/components/iqr-form/fields/numberField.js +44 -0
  181. package/tmp/components/iqr-form/fields/numberField.js.map +1 -0
  182. package/tmp/components/iqr-form/fields/textfield.d.ts +1 -0
  183. package/tmp/components/iqr-form/fields/textfield.js +142 -0
  184. package/tmp/components/iqr-form/fields/textfield.js.map +1 -0
  185. package/tmp/components/iqr-form/fields/timePicker.d.ts +10 -0
  186. package/tmp/components/iqr-form/fields/timePicker.js +49 -0
  187. package/tmp/components/iqr-form/fields/timePicker.js.map +1 -0
  188. package/tmp/components/iqr-form/index.d.ts +7 -0
  189. package/{components → tmp/components}/iqr-form/index.js +10 -10
  190. package/tmp/components/iqr-form/index.js.map +1 -0
  191. package/tmp/components/iqr-form/legacy/Content.d.ts +28 -0
  192. package/tmp/components/iqr-form/legacy/Content.js +30 -0
  193. package/tmp/components/iqr-form/legacy/Content.js.map +1 -0
  194. package/tmp/components/iqr-form/legacy/Data.d.ts +14 -0
  195. package/tmp/components/iqr-form/legacy/Data.js +21 -0
  196. package/tmp/components/iqr-form/legacy/Data.js.map +1 -0
  197. package/tmp/components/iqr-form/legacy/Editor.d.ts +34 -0
  198. package/tmp/components/iqr-form/legacy/Editor.js +19 -0
  199. package/tmp/components/iqr-form/legacy/Editor.js.map +1 -0
  200. package/tmp/components/iqr-form/legacy/FormColumn.d.ts +18 -0
  201. package/tmp/components/iqr-form/legacy/FormColumn.js +10 -0
  202. package/tmp/components/iqr-form/legacy/FormColumn.js.map +1 -0
  203. package/tmp/components/iqr-form/legacy/FormDataOption.d.ts +16 -0
  204. package/tmp/components/iqr-form/legacy/FormDataOption.js +21 -0
  205. package/tmp/components/iqr-form/legacy/FormDataOption.js.map +1 -0
  206. package/tmp/components/iqr-form/legacy/FormLayout.d.ts +25 -0
  207. package/tmp/components/iqr-form/legacy/FormLayout.js +10 -0
  208. package/tmp/components/iqr-form/legacy/FormLayout.js.map +1 -0
  209. package/tmp/components/iqr-form/legacy/FormLayoutData.d.ts +42 -0
  210. package/tmp/components/iqr-form/legacy/FormLayoutData.js +10 -0
  211. package/tmp/components/iqr-form/legacy/FormLayoutData.js.map +1 -0
  212. package/tmp/components/iqr-form/legacy/FormPlanning.d.ts +22 -0
  213. package/tmp/components/iqr-form/legacy/FormPlanning.js +21 -0
  214. package/tmp/components/iqr-form/legacy/FormPlanning.js.map +1 -0
  215. package/tmp/components/iqr-form/legacy/FormSection.d.ts +19 -0
  216. package/tmp/components/iqr-form/legacy/FormSection.js +10 -0
  217. package/tmp/components/iqr-form/legacy/FormSection.js.map +1 -0
  218. package/tmp/components/iqr-form/legacy/Formula.d.ts +27 -0
  219. package/tmp/components/iqr-form/legacy/Formula.js +32 -0
  220. package/tmp/components/iqr-form/legacy/Formula.js.map +1 -0
  221. package/tmp/components/iqr-form/legacy/GuiCode.d.ts +16 -0
  222. package/tmp/components/iqr-form/legacy/GuiCode.js +21 -0
  223. package/tmp/components/iqr-form/legacy/GuiCode.js.map +1 -0
  224. package/tmp/components/iqr-form/legacy/GuiCodeType.d.ts +15 -0
  225. package/tmp/components/iqr-form/legacy/GuiCodeType.js +21 -0
  226. package/tmp/components/iqr-form/legacy/GuiCodeType.js.map +1 -0
  227. package/tmp/components/iqr-form/legacy/Suggest.d.ts +19 -0
  228. package/tmp/components/iqr-form/legacy/Suggest.js +21 -0
  229. package/tmp/components/iqr-form/legacy/Suggest.js.map +1 -0
  230. package/tmp/components/iqr-form/legacy/Tag.d.ts +16 -0
  231. package/tmp/components/iqr-form/legacy/Tag.js +21 -0
  232. package/tmp/components/iqr-form/legacy/Tag.js.map +1 -0
  233. package/tmp/components/iqr-form/model/index.d.ts +96 -0
  234. package/tmp/components/iqr-form/model/index.js +120 -0
  235. package/tmp/components/iqr-form/model/index.js.map +1 -0
  236. package/tmp/components/iqr-form/renderer/cards.d.ts +2 -0
  237. package/tmp/components/iqr-form/renderer/cards.js +55 -0
  238. package/tmp/components/iqr-form/renderer/cards.js.map +1 -0
  239. package/tmp/components/iqr-form/renderer/form.d.ts +2 -0
  240. package/tmp/components/iqr-form/renderer/form.js +93 -0
  241. package/tmp/components/iqr-form/renderer/form.js.map +1 -0
  242. package/tmp/components/iqr-form/renderer/index.d.ts +6 -0
  243. package/tmp/components/iqr-form/renderer/index.js +3 -0
  244. package/tmp/components/iqr-form/renderer/index.js.map +1 -0
  245. package/tmp/components/iqr-form/utils.d.ts +5 -0
  246. package/tmp/components/iqr-form/utils.js +91 -0
  247. package/tmp/components/iqr-form/utils.js.map +1 -0
  248. package/tmp/components/iqr-form-loader/fieldsValuesProviders.d.ts +13 -0
  249. package/tmp/components/iqr-form-loader/fieldsValuesProviders.js +47 -0
  250. package/tmp/components/iqr-form-loader/fieldsValuesProviders.js.map +1 -0
  251. package/tmp/components/iqr-form-loader/formValuesContainer.d.ts +33 -0
  252. package/tmp/components/iqr-form-loader/formValuesContainer.js +111 -0
  253. package/tmp/components/iqr-form-loader/formValuesContainer.js.map +1 -0
  254. package/tmp/components/iqr-form-loader/index.d.ts +3 -0
  255. package/tmp/components/iqr-form-loader/index.js +20 -0
  256. package/tmp/components/iqr-form-loader/index.js.map +1 -0
  257. package/tmp/components/iqr-form-loader/models.d.ts +14 -0
  258. package/tmp/components/iqr-form-loader/models.js +3 -0
  259. package/tmp/components/iqr-form-loader/models.js.map +1 -0
  260. package/tmp/components/iqr-text-field/index.d.ts +26 -0
  261. package/{components → tmp/components}/iqr-text-field/index.js +65 -63
  262. package/tmp/components/iqr-text-field/index.js.map +1 -0
  263. package/tmp/components/iqr-text-field/plugin/caret-fix-plugin.d.ts +2 -0
  264. package/tmp/components/iqr-text-field/plugin/caret-fix-plugin.js +29 -0
  265. package/tmp/components/iqr-text-field/plugin/caret-fix-plugin.js.map +1 -0
  266. package/tmp/components/iqr-text-field/plugin/has-content-class-plugin.d.ts +2 -0
  267. package/tmp/components/iqr-text-field/plugin/has-content-class-plugin.js +22 -0
  268. package/tmp/components/iqr-text-field/plugin/has-content-class-plugin.js.map +1 -0
  269. package/tmp/components/iqr-text-field/plugin/mask-plugin.d.ts +2 -0
  270. package/tmp/components/iqr-text-field/plugin/mask-plugin.js +152 -0
  271. package/tmp/components/iqr-text-field/plugin/mask-plugin.js.map +1 -0
  272. package/tmp/components/iqr-text-field/plugin/regexp-plugin.d.ts +2 -0
  273. package/tmp/components/iqr-text-field/plugin/regexp-plugin.js +51 -0
  274. package/tmp/components/iqr-text-field/plugin/regexp-plugin.js.map +1 -0
  275. package/tmp/components/iqr-text-field/prosemirror-commands.d.ts +6 -0
  276. package/tmp/components/iqr-text-field/prosemirror-commands.js +54 -0
  277. package/tmp/components/iqr-text-field/prosemirror-commands.js.map +1 -0
  278. package/tmp/components/iqr-text-field/prosemirror-utils.d.ts +5 -0
  279. package/tmp/components/iqr-text-field/prosemirror-utils.js +16 -0
  280. package/tmp/components/iqr-text-field/prosemirror-utils.js.map +1 -0
  281. package/tmp/components/iqr-text-field/schema/common-marks.d.ts +10 -0
  282. package/tmp/components/iqr-text-field/schema/common-marks.js +94 -0
  283. package/tmp/components/iqr-text-field/schema/common-marks.js.map +1 -0
  284. package/tmp/components/iqr-text-field/schema/date-time-schema.d.ts +7 -0
  285. package/tmp/components/iqr-text-field/schema/date-time-schema.js +89 -0
  286. package/tmp/components/iqr-text-field/schema/date-time-schema.js.map +1 -0
  287. package/tmp/components/iqr-text-field/schema/decimal-schema.d.ts +3 -0
  288. package/tmp/components/iqr-text-field/schema/decimal-schema.js +28 -0
  289. package/tmp/components/iqr-text-field/schema/decimal-schema.js.map +1 -0
  290. package/tmp/components/iqr-text-field/schema/index.d.ts +11 -0
  291. package/tmp/components/iqr-text-field/schema/index.js +26 -0
  292. package/tmp/components/iqr-text-field/schema/index.js.map +1 -0
  293. package/tmp/components/iqr-text-field/schema/markdown-schema.d.ts +8 -0
  294. package/tmp/components/iqr-text-field/schema/markdown-schema.js +173 -0
  295. package/tmp/components/iqr-text-field/schema/markdown-schema.js.map +1 -0
  296. package/tmp/components/iqr-text-field/schema/measure-schema.d.ts +3 -0
  297. package/tmp/components/iqr-text-field/schema/measure-schema.js +36 -0
  298. package/tmp/components/iqr-text-field/schema/measure-schema.js.map +1 -0
  299. package/tmp/components/iqr-text-field/schema/token-schema.d.ts +6 -0
  300. package/tmp/components/iqr-text-field/schema/token-schema.js +40 -0
  301. package/tmp/components/iqr-text-field/schema/token-schema.js.map +1 -0
  302. package/tmp/components/iqr-text-field/schema/utils.d.ts +11 -0
  303. package/tmp/components/iqr-text-field/schema/utils.js +12 -0
  304. package/tmp/components/iqr-text-field/schema/utils.js.map +1 -0
  305. package/tmp/components/iqr-text-field/selection-companion.d.ts +11 -0
  306. package/tmp/components/iqr-text-field/selection-companion.js +54 -0
  307. package/tmp/components/iqr-text-field/selection-companion.js.map +1 -0
  308. package/tmp/components/iqr-text-field/styles/paths.d.ts +5 -0
  309. package/tmp/components/iqr-text-field/styles/paths.js +37 -0
  310. package/tmp/components/iqr-text-field/styles/paths.js.map +1 -0
  311. package/tmp/components/iqr-text-field/suggestion-palette.d.ts +31 -0
  312. package/tmp/components/iqr-text-field/suggestion-palette.js +169 -0
  313. package/tmp/components/iqr-text-field/suggestion-palette.js.map +1 -0
  314. package/tmp/index.d.ts +1 -0
  315. package/tmp/index.js +18 -0
  316. package/tmp/index.js.map +1 -0
  317. package/tmp/utils/icure-utils.d.ts +19 -0
  318. package/tmp/utils/icure-utils.js +106 -0
  319. package/tmp/utils/icure-utils.js.map +1 -0
  320. package/tmp/utils/languages.d.ts +8 -0
  321. package/tmp/utils/languages.js +15 -0
  322. package/tmp/utils/languages.js.map +1 -0
  323. package/tmp/utils/no-lodash.d.ts +5 -0
  324. package/tmp/utils/no-lodash.js +25 -0
  325. package/tmp/utils/no-lodash.js.map +1 -0
  326. package/components/index.js.map +0 -1
  327. package/components/iqr-form/fields/datePicker.js.map +0 -1
  328. package/components/iqr-form/fields/dateTimePicker.js.map +0 -1
  329. package/components/iqr-form/fields/measureField.js.map +0 -1
  330. package/components/iqr-form/fields/multipleChoice.js.map +0 -1
  331. package/components/iqr-form/fields/numberField.js.map +0 -1
  332. package/components/iqr-form/fields/textfield.js.map +0 -1
  333. package/components/iqr-form/fields/timePicker.js.map +0 -1
  334. package/components/iqr-form/index.js.map +0 -1
  335. package/components/iqr-form/legacy/Content.js.map +0 -1
  336. package/components/iqr-form/legacy/Data.js.map +0 -1
  337. package/components/iqr-form/legacy/Editor.js.map +0 -1
  338. package/components/iqr-form/legacy/FormColumn.js.map +0 -1
  339. package/components/iqr-form/legacy/FormDataOption.js.map +0 -1
  340. package/components/iqr-form/legacy/FormLayout.js.map +0 -1
  341. package/components/iqr-form/legacy/FormLayoutData.js.map +0 -1
  342. package/components/iqr-form/legacy/FormPlanning.js.map +0 -1
  343. package/components/iqr-form/legacy/FormSection.js.map +0 -1
  344. package/components/iqr-form/legacy/Formula.js.map +0 -1
  345. package/components/iqr-form/legacy/GuiCode.js.map +0 -1
  346. package/components/iqr-form/legacy/GuiCodeType.js.map +0 -1
  347. package/components/iqr-form/legacy/Suggest.js.map +0 -1
  348. package/components/iqr-form/legacy/Tag.js.map +0 -1
  349. package/components/iqr-form/model/index.js.map +0 -1
  350. package/components/iqr-form/renderer/cards.js +0 -55
  351. package/components/iqr-form/renderer/cards.js.map +0 -1
  352. package/components/iqr-form/renderer/form.js.map +0 -1
  353. package/components/iqr-form/renderer/index.js.map +0 -1
  354. package/components/iqr-form/utils.js.map +0 -1
  355. package/components/iqr-form-loader/fieldsValuesProviders.js.map +0 -1
  356. package/components/iqr-form-loader/formValuesContainer.js.map +0 -1
  357. package/components/iqr-form-loader/index.js.map +0 -1
  358. package/components/iqr-form-loader/models.js.map +0 -1
  359. package/components/iqr-text-field/index.js.map +0 -1
  360. package/components/iqr-text-field/plugin/caret-fix-plugin.js.map +0 -1
  361. package/components/iqr-text-field/plugin/has-content-class-plugin.js.map +0 -1
  362. package/components/iqr-text-field/plugin/mask-plugin.js.map +0 -1
  363. package/components/iqr-text-field/plugin/regexp-plugin.js.map +0 -1
  364. package/components/iqr-text-field/prosemirror-commands.js.map +0 -1
  365. package/components/iqr-text-field/prosemirror-utils.js.map +0 -1
  366. package/components/iqr-text-field/schema/common-marks.js.map +0 -1
  367. package/components/iqr-text-field/schema/date-time-schema.js.map +0 -1
  368. package/components/iqr-text-field/schema/decimal-schema.js.map +0 -1
  369. package/components/iqr-text-field/schema/index.js.map +0 -1
  370. package/components/iqr-text-field/schema/markdown-schema.js.map +0 -1
  371. package/components/iqr-text-field/schema/measure-schema.js.map +0 -1
  372. package/components/iqr-text-field/schema/token-schema.js.map +0 -1
  373. package/components/iqr-text-field/schema/utils.js.map +0 -1
  374. package/components/iqr-text-field/selection-companion.js.map +0 -1
  375. package/components/iqr-text-field/styles/paths.js.map +0 -1
  376. package/components/iqr-text-field/suggestion-palette.js.map +0 -1
  377. package/index.js.map +0 -1
  378. package/utils/icure-utils.js.map +0 -1
  379. package/utils/languages.js.map +0 -1
  380. package/utils/no-lodash.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-schema.js","sourceRoot":"","sources":["../../../../../tmp/components/iqr-text-field/schema/markdown-schema.ts"],"names":[],"mappings":";;;AACA,mCAAkD;AAClD,iDAAyC;AAMzC,SAAgB,eAAe,CAC9B,IAAmC,EACnC,eAAoE,EACpE,aAAsE;IAEtE,MAAM,aAAa,GAA6C,CAAC,GAAW,EAAE,IAAc,EAAE,EAAE;QAC/F,gDAAgD;QAChD,OAAO,GAAG,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,OAAO,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,KAAK,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAA;IACrK,CAAC,CAAA;IACD,MAAM,aAA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AAE;gBACX,MAAM,EAAE,IAAI;gBACZ,KAAK,EAAE,QAAQ;gBACf,UAAU,EAAE,KAAK;gBACjB,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;gBACzB,KAAK;oBACJ,OAAO,CAAC,IAAI,CAAC,CAAA;gBACd,CAAC;aACD;SACD,EACD,aAAa,CACb;QACD,KAAK,EAAE,IAAA,mBAAW,EAAC,IAAA,uBAAQ,EAAC,eAAe,EAAE,aAAa,CAAC,EAAE,aAAa,CAAC;KAC3E,CAAA;AACF,CAAC;AA1LD,0CA0LC"}
@@ -0,0 +1,3 @@
1
+ import { SchemaSpec } from 'prosemirror-model';
2
+ export declare type MeasureSchema = 'measure';
3
+ export declare function getMeasureSpec(): SchemaSpec;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getMeasureSpec = void 0;
4
+ function getMeasureSpec() {
5
+ return {
6
+ topNode: 'paragraph',
7
+ nodes: {
8
+ paragraph: {
9
+ content: 'decimal unit',
10
+ },
11
+ decimal: {
12
+ content: 'inline*',
13
+ group: 'block',
14
+ parseDOM: [{ tag: 'span' }],
15
+ toDOM() {
16
+ return ['span', { class: 'measure' }, 0];
17
+ },
18
+ regexp: '[,.0-9-]',
19
+ },
20
+ unit: {
21
+ content: 'inline*',
22
+ group: 'block',
23
+ parseDOM: [{ tag: 'span' }],
24
+ toDOM() {
25
+ return ['span', { class: 'unit' }, 0];
26
+ },
27
+ },
28
+ text: {
29
+ group: 'inline',
30
+ },
31
+ },
32
+ marks: {},
33
+ };
34
+ }
35
+ exports.getMeasureSpec = getMeasureSpec;
36
+ //# sourceMappingURL=measure-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measure-schema.js","sourceRoot":"","sources":["../../../../../tmp/components/iqr-text-field/schema/measure-schema.ts"],"names":[],"mappings":";;;AAIA,SAAgB,cAAc;IAC7B,OAAO;QACN,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE;YACN,SAAS,EAAE;gBACV,OAAO,EAAE,cAAc;aACvB;YAED,OAAO,EAAE;gBACR,OAAO,EAAE,SAAS;gBAClB,KAAK,EAAE,OAAO;gBACd,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC;gBAC3B,KAAK;oBACJ,OAAO,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC,CAAA;gBACzC,CAAC;gBACD,MAAM,EAAE,UAAU;aAClB;YAED,IAAI,EAAE;gBACL,OAAO,EAAE,SAAS;gBAClB,KAAK,EAAE,OAAO;gBACd,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC;gBAC3B,KAAK;oBACJ,OAAO,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,CAAA;gBACtC,CAAC;aACD;YAED,IAAI,EAAE;gBACL,KAAK,EAAE,QAAQ;aACf;SACD;QACD,KAAK,EAAE,EAAE;KACT,CAAA;AACF,CAAC;AAjCD,wCAiCC"}
@@ -0,0 +1,6 @@
1
+ import { SchemaSpec } from 'prosemirror-model';
2
+ export declare type TokensSchema = 'tokens-list' | 'styled-tokens-list' | 'tokens-list-with-codes' | 'styled-tokens-list-with-codes';
3
+ export declare function getTokensSpec(type: TokensSchema, contentProvider: (codes: {
4
+ type: string;
5
+ code: string;
6
+ }[]) => string, colorProvider: (type: string, code: string, isCode: boolean) => string): SchemaSpec;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTokensSpec = void 0;
4
+ const utils_1 = require("./utils");
5
+ const common_marks_1 = require("./common-marks");
6
+ function getTokensSpec(type, contentProvider, colorProvider) {
7
+ const marksSelector = (key) => {
8
+ // noinspection RedundantConditionalExpressionJS
9
+ return key !== 'link' && ['styled-tokens-list', 'styled-tokens-list-with-codes'].includes(type)
10
+ ? true
11
+ : key === 'link' && ['tokens-list-with-codes', 'styled-text-with-codes']
12
+ ? true
13
+ : false;
14
+ };
15
+ return {
16
+ nodes: (0, utils_1.reduceNodes)({
17
+ doc: {
18
+ content: 'token+',
19
+ parseDOM: [{ tag: 'ul' }],
20
+ toDOM() {
21
+ return ['ul', 0];
22
+ },
23
+ },
24
+ token: {
25
+ content: 'inline*',
26
+ group: 'block',
27
+ parseDOM: [{ tag: 'li' }],
28
+ toDOM() {
29
+ return ['li', 0];
30
+ },
31
+ },
32
+ text: {
33
+ group: 'inline',
34
+ },
35
+ }),
36
+ marks: (0, utils_1.reduceMarks)((0, common_marks_1.getMarks)(contentProvider, colorProvider), marksSelector),
37
+ };
38
+ }
39
+ exports.getTokensSpec = getTokensSpec;
40
+ //# sourceMappingURL=token-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-schema.js","sourceRoot":"","sources":["../../../../../tmp/components/iqr-text-field/schema/token-schema.ts"],"names":[],"mappings":";;;AACA,mCAAkD;AAClD,iDAAyC;AAIzC,SAAgB,aAAa,CAC5B,IAAkB,EAClB,eAAoE,EACpE,aAAsE;IAEtE,MAAM,aAAa,GAA6C,CAAC,GAAW,EAAE,EAAE;QAC/E,gDAAgD;QAChD,OAAO,GAAG,KAAK,MAAM,IAAI,CAAC,oBAAoB,EAAE,+BAA+B,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC9F,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,GAAG,KAAK,MAAM,IAAI,CAAC,wBAAwB,EAAE,wBAAwB,CAAC;gBACxE,CAAC,CAAC,IAAI;gBACN,CAAC,CAAC,KAAK,CAAA;IACT,CAAC,CAAA;IACD,OAAO;QACN,KAAK,EAAE,IAAA,mBAAW,EAAC;YAClB,GAAG,EAAE;gBACJ,OAAO,EAAE,QAAQ;gBACjB,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;gBACzB,KAAK;oBACJ,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;gBACjB,CAAC;aACD;YAED,KAAK,EAAE;gBACN,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,IAAA,mBAAW,EAAC,IAAA,uBAAQ,EAAC,eAAe,EAAE,aAAa,CAAC,EAAE,aAAa,CAAC;KAC3E,CAAA;AACF,CAAC;AAtCD,sCAsCC"}
@@ -0,0 +1,11 @@
1
+ import { MarkSpec, NodeSpec } from 'prosemirror-model';
2
+ export declare function reduceNodes(nodes: {
3
+ [key: string]: NodeSpec;
4
+ }, selector?: (key: string, spec: NodeSpec) => boolean): {
5
+ [key: string]: NodeSpec;
6
+ };
7
+ export declare function reduceMarks(marks: {
8
+ [key: string]: MarkSpec;
9
+ }, selector?: (key: string, spec: MarkSpec) => boolean): {
10
+ [key: string]: MarkSpec;
11
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.reduceMarks = exports.reduceNodes = void 0;
4
+ function reduceNodes(nodes, selector = () => true) {
5
+ return Object.keys(nodes).reduce((r, k) => (selector(k, nodes[k]) ? Object.assign(r, { [k]: nodes[k] }) : r), {});
6
+ }
7
+ exports.reduceNodes = reduceNodes;
8
+ function reduceMarks(marks, selector = () => true) {
9
+ return Object.keys(marks).reduce((r, k) => (selector(k, marks[k]) ? Object.assign(r, { [k]: marks[k] }) : r), {});
10
+ }
11
+ exports.reduceMarks = reduceMarks;
12
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../tmp/components/iqr-text-field/schema/utils.ts"],"names":[],"mappings":";;;AAEA,SAAgB,WAAW,CAAC,KAAkC,EAAE,WAAqD,GAAG,EAAE,CAAC,IAAI;IAC9H,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAiC,CAAC,CAAA;AACjJ,CAAC;AAFD,kCAEC;AAED,SAAgB,WAAW,CAAC,KAAkC,EAAE,WAAqD,GAAG,EAAE,CAAC,IAAI;IAC9H,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAiC,CAAC,CAAA;AACjJ,CAAC;AAFD,kCAEC"}
@@ -0,0 +1,11 @@
1
+ import { EditorView } from 'prosemirror-view';
2
+ import { EditorState } from 'prosemirror-state';
3
+ export declare class SelectionCompanion {
4
+ private readonly companion;
5
+ private delay;
6
+ private lastTime;
7
+ constructor(view: EditorView, delay: () => boolean);
8
+ update(view: EditorView, lastState?: EditorState): void;
9
+ private display;
10
+ destroy(): void;
11
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SelectionCompanion = void 0;
4
+ class SelectionCompanion {
5
+ constructor(view, delay) {
6
+ var _a, _b;
7
+ this.delay = () => false;
8
+ this.lastTime = 0;
9
+ this.companion = document.createElement('div');
10
+ this.companion.className = 'companion';
11
+ (_b = (_a = view.dom) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.appendChild(this.companion);
12
+ this.delay = delay;
13
+ this.update(view, undefined);
14
+ }
15
+ update(view, lastState) {
16
+ const state = view.state;
17
+ // Don't do anything if the document/selection didn't change
18
+ if (lastState && lastState.doc.eq(state.doc) && lastState.selection.eq(state.selection)) {
19
+ return;
20
+ }
21
+ // Hide the companion if the selection is empty
22
+ if (state.selection.empty) {
23
+ this.companion.style.display = 'none';
24
+ return;
25
+ }
26
+ // Otherwise, reposition it and update its content
27
+ const { to } = state.selection;
28
+ // These are in screen coordinates
29
+ const end = view.coordsAtPos(to);
30
+ this.display(end, (this.lastTime = +new Date()));
31
+ }
32
+ display(pos, time) {
33
+ var _a;
34
+ if (time !== this.lastTime)
35
+ return;
36
+ if (this.delay()) {
37
+ setTimeout(() => this.display(pos, time), 100);
38
+ return;
39
+ }
40
+ this.companion.style.display = '';
41
+ const box = (_a = this.companion.offsetParent) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
42
+ if (box) {
43
+ this.companion.style.left = pos.right - box.left + 'px';
44
+ this.companion.style.top = pos.top - box.top - 2 + 'px';
45
+ this.companion.style.height = pos.bottom - pos.top + 2 + 'px';
46
+ this.companion.textContent = '+';
47
+ }
48
+ }
49
+ destroy() {
50
+ this.companion.remove();
51
+ }
52
+ }
53
+ exports.SelectionCompanion = SelectionCompanion;
54
+ //# sourceMappingURL=selection-companion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection-companion.js","sourceRoot":"","sources":["../../../../tmp/components/iqr-text-field/selection-companion.ts"],"names":[],"mappings":";;;AAGA,MAAa,kBAAkB;IAK9B,YAAY,IAAgB,EAAE,KAAoB;;QAH1C,UAAK,GAAkB,GAAG,EAA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E,EAAE;YACjB,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,CAAC,CAAA;YAC9C,OAAM;SACN;QACD,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAA;QACjC,MAAM,GAAG,GAAG,MAAA,IAAI,CAAC,SAAS,CAAC,YAAY,0CAAE,qBAAqB,EAAE,CAAA;QAChE,IAAI,GAAG,EAAE;YACR,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,GAAG,IAAI,CAAA;YACvD,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,IAAI,CAAA;YACvD,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,IAAI,CAAA;YAC7D,IAAI,CAAC,SAAS,CAAC,WAAW,GAAG,GAAG,CAAA;SAChC;IACF,CAAC;IAED,OAAO;QACN,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAA;IACxB,CAAC;CACD;AAvDD,gDAuDC"}
@@ -0,0 +1,5 @@
1
+ export declare const searchPicto: import("lit-html").TemplateResult<1>;
2
+ export declare const ownerPicto: import("lit-html").TemplateResult<1>;
3
+ export declare const i18nPicto: import("lit-html").TemplateResult<1>;
4
+ export declare const versionPicto: import("lit-html").TemplateResult<1>;
5
+ export declare const datePicto: import("lit-html").TemplateResult<1>;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.datePicto = exports.versionPicto = exports.i18nPicto = exports.ownerPicto = exports.searchPicto = void 0;
4
+ const lit_1 = require("lit");
5
+ exports.searchPicto = (0, lit_1.html) `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
6
+ <path
7
+ d="M12.9167 11.6667H12.2583L12.025 11.4417C12.8417 10.4917 13.3333 9.25833 13.3333 7.91667C13.3333 4.925 10.9083 2.5 7.91667 2.5C4.925 2.5 2.5 4.925 2.5 7.91667C2.5 10.9083 4.925 13.3333 7.91667 13.3333C9.25833 13.3333 10.4917 12.8417 11.4417 12.025L11.6667 12.2583V12.9167L15.8333 17.075L17.075 15.8333L12.9167 11.6667ZM7.91667 11.6667C5.84167 11.6667 4.16667 9.99167 4.16667 7.91667C4.16667 5.84167 5.84167 4.16667 7.91667 4.16667C9.99167 4.16667 11.6667 5.84167 11.6667 7.91667C11.6667 9.99167 9.99167 11.6667 7.91667 11.6667Z"
8
+ fill="#809AB4"
9
+ />
10
+ </svg>`;
11
+ exports.ownerPicto = (0, lit_1.html) `<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
12
+ <path
13
+ fill-rule="evenodd"
14
+ clip-rule="evenodd"
15
+ d="M10 5C10 7.76142 7.76142 10 5 10C2.23858 10 0 7.76142 0 5C0 2.23858 2.23858 0 5 0C7.76142 0 10 2.23858 10 5ZM7 3C7 4.10457 6.10457 5 5 5C3.89543 5 3 4.10457 3 3C3 1.89543 3.89543 1 5 1C6.10457 1 7 1.89543 7 3ZM5.00001 9C6.53071 9 7.8606 8.1402 8.53306 6.8772C7.62844 6.33518 6.37946 6 5.00001 6C3.62055 6 2.37158 6.33517 1.46695 6.87719C2.13941 8.14019 3.4693 9 5.00001 9Z"
16
+ />
17
+ </svg>`;
18
+ exports.i18nPicto = (0, lit_1.html) `<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
19
+ <path
20
+ d="M5 0C2.2379 0 0 2.2379 0 5C0 7.7621 2.2379 10 5 10C7.7621 10 10 7.7621 10 5C10 2.2379 7.7621 0 5 0ZM9.03226 5C9.03226 5.45363 8.95363 5.89113 8.81452 6.29839H8.40524C8.31855 6.29839 8.23589 6.26411 8.1754 6.20161L7.53024 5.54435C7.43952 5.45161 7.43952 5.3004 7.53226 5.20766L7.78427 4.95565V4.78024C7.78427 4.71976 7.76008 4.66129 7.71774 4.61895L7.52823 4.42944C7.48589 4.3871 7.42742 4.3629 7.36694 4.3629H7.04435C6.91935 4.3629 6.81653 4.26008 6.81653 4.13508C6.81653 4.0746 6.84073 4.01613 6.88306 3.97379L7.07258 3.78427C7.11492 3.74194 7.17339 3.71774 7.23387 3.71774H7.87903C8.00403 3.71774 8.10685 3.61492 8.10685 3.48992V3.3004C8.10685 3.1754 8.00403 3.07258 7.87903 3.07258H7.13911C6.96169 3.07258 6.81653 3.21774 6.81653 3.39516V3.48589C6.81653 3.625 6.72782 3.74798 6.59677 3.79234L5.95968 4.00403C5.89315 4.02621 5.84879 4.08669 5.84879 4.15726V4.20161C5.84879 4.29032 5.77621 4.3629 5.6875 4.3629H5.36492C5.27621 4.3629 5.20363 4.29032 5.20363 4.20161C5.20363 4.1129 5.13105 4.04032 5.04234 4.04032H4.97984C4.91935 4.04032 4.8629 4.0746 4.83468 4.12903L4.64516 4.50605C4.59073 4.61492 4.47984 4.68347 4.35685 4.68347H3.91129C3.73387 4.68347 3.58871 4.53831 3.58871 4.36089V3.85081C3.58871 3.76613 3.62298 3.68347 3.68347 3.62298L4.08871 3.21774C4.18145 3.125 4.23387 2.99798 4.23387 2.86492C4.23387 2.79637 4.27823 2.73387 4.34476 2.71169L5.15121 2.44355C5.18548 2.43145 5.21573 2.41331 5.23992 2.38911L5.78024 1.84879C5.82258 1.80645 5.84677 1.74798 5.84677 1.6875C5.84677 1.5625 5.74395 1.45968 5.61895 1.45968H5.20161L4.87903 1.78226V1.94355C4.87903 2.03226 4.80645 2.10484 4.71774 2.10484H4.39516C4.30645 2.10484 4.23387 2.03226 4.23387 1.94355V1.54032C4.23387 1.48992 4.25806 1.44153 4.29839 1.41129L4.88105 0.97379C4.91935 0.971774 4.95766 0.967742 4.99597 0.967742C7.22379 0.967742 9.03226 2.77621 9.03226 5ZM2.62298 2.84476C2.62298 2.78427 2.64718 2.72581 2.68952 2.68347L3.20161 2.17137C3.24395 2.12903 3.30242 2.10484 3.3629 2.10484C3.4879 2.10484 3.59073 2.20766 3.59073 2.33266V2.65524C3.59073 2.71573 3.56653 2.77419 3.52419 2.81653L3.33468 3.00605C3.29234 3.04839 3.23387 3.07258 3.17339 3.07258H2.85081C2.72581 3.07258 2.62298 2.96976 2.62298 2.84476ZM5.20363 9.02218V8.87903C5.20363 8.70161 5.05847 8.55645 4.88105 8.55645H4.47379C4.25605 8.55645 3.93548 8.4496 3.76008 8.31855L3.3125 7.98185C3.08065 7.80847 2.94556 7.53629 2.94556 7.24798V6.76613C2.94556 6.44355 3.11492 6.14516 3.39113 5.97984L4.25605 5.46169C4.39919 5.37702 4.5625 5.33065 4.72782 5.33065H5.35685C5.57661 5.33065 5.78831 5.40927 5.95363 5.5504L6.8246 6.29839H7.19355C7.36492 6.29839 7.52823 6.36694 7.64919 6.4879L7.99798 6.83669C8.06653 6.90524 8.16129 6.94355 8.25806 6.94355H8.52823C7.875 8.13105 6.6371 8.9496 5.20363 9.02218Z"
21
+ />
22
+ </svg>`;
23
+ exports.versionPicto = (0, lit_1.html) `<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
24
+ <path
25
+ fill-rule="evenodd"
26
+ clip-rule="evenodd"
27
+ d="M5 10C7.76141 10 10 7.76142 10 5C10 2.23858 7.76141 0 5 0C2.23859 0 0 2.23858 0 5C0 7.76142 2.23859 10 5 10ZM3.5 3.33172C3.03394 3.16698 2.70001 2.72249 2.70001 2.2C2.70001 1.53726 3.23727 1 3.90002 1C4.56274 1 5.10001 1.53726 5.10001 2.2C5.10001 2.72249 4.76608 3.16698 4.30002 3.33172V5.04041C4.73386 4.59767 5.31354 4.29838 5.96133 4.22028C6.12021 3.74364 6.56998 3.4 7.10001 3.4C7.76276 3.4 8.30002 3.93726 8.30002 4.6C8.30002 5.26274 7.76276 5.8 7.10001 5.8C6.58722 5.8 6.14957 5.47836 5.97775 5.02583C5.13132 5.16293 4.46295 5.8313 4.32584 6.67775C4.77838 6.84955 5.10001 7.28722 5.10001 7.8C5.10001 8.46274 4.56274 9 3.90002 9C3.23727 9 2.70001 8.46274 2.70001 7.8C2.70001 7.27751 3.03394 6.83302 3.5 6.66828V3.33172ZM3.5 7.8C3.5 7.58001 3.67758 7.4015 3.89722 7.4H3.9028C4.12241 7.4015 4.29999 7.58001 4.29999 7.8C4.29999 8.0209 4.12091 8.2 3.89999 8.2C3.67908 8.2 3.5 8.0209 3.5 7.8ZM6.70001 4.59555V4.60446C6.70239 4.82333 6.88055 5.00001 7.09998 5.00001C7.32089 5.00001 7.5 4.82092 7.5 4.60001C7.5 4.37909 7.32089 4.2 7.09998 4.2C6.88055 4.2 6.70239 4.37669 6.70001 4.59555ZM3.89999 2.6C4.12091 2.6 4.29999 2.42091 4.29999 2.2C4.29999 1.97909 4.12091 1.8 3.89999 1.8C3.67908 1.8 3.5 1.97909 3.5 2.2C3.5 2.42091 3.67908 2.6 3.89999 2.6Z"
28
+ />
29
+ </svg>`;
30
+ exports.datePicto = (0, lit_1.html) `<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
31
+ <path
32
+ fill-rule="evenodd"
33
+ clip-rule="evenodd"
34
+ d="M2 0C0.895431 0 0 0.89543 0 2V8C0 9.10457 0.89543 10 2 10H8C9.10457 10 10 9.10457 10 8V2C10 0.895431 9.10457 0 8 0H2ZM1 3V8C1 8.55229 1.44772 9 2 9H8C8.55229 9 9 8.55229 9 8V3H1ZM8 8H5V5H8V8Z"
35
+ />
36
+ </svg>`;
37
+ //# sourceMappingURL=paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../../../tmp/components/iqr-text-field/styles/paths.ts"],"names":[],"mappings":";;;AAAA,6BAA0B;AAEb,QAAA,WAAW,GAAG,IAAA,UAAI,EAAA;;;;;OAKxB,CAAA;AAEM,QAAA,UAAU,GAAG,IAAA,UAAI,EAAA;;;;;;OAMvB,CAAA;AAEM,QAAA,SAAS,GAAG,IAAA,UAAI,EAAA;;;;OAItB,CAAA;AAEM,QAAA,YAAY,GAAG,IAAA,UAAI,EAAA;;;;;;OAMzB,CAAA;AAEM,QAAA,SAAS,GAAG,IAAA,UAAI,EAAA;;;;;;OAMtB,CAAA"}
@@ -0,0 +1,31 @@
1
+ import { EditorView } from 'prosemirror-view';
2
+ import { EditorState, Transaction } from 'prosemirror-state';
3
+ import { Schema } from 'prosemirror-model';
4
+ export declare type Suggestion = {
5
+ id: string;
6
+ code: string;
7
+ text: string;
8
+ terms: string[];
9
+ };
10
+ export declare class SuggestionPalette {
11
+ private readonly palette;
12
+ private delay;
13
+ private lastTime;
14
+ private suggestionProvider;
15
+ private previousFingerprint?;
16
+ private suggestionStopWordsProvider;
17
+ private currentFocus?;
18
+ private hasFocus;
19
+ private suggestions;
20
+ private schema;
21
+ constructor(schema: Schema, view: EditorView, suggestionProvider: (terms: string[]) => Promise<Suggestion[]>, suggestionStopWordsProvider: () => Set<string>, delay?: () => boolean);
22
+ focusItem(idx?: number): void;
23
+ focus(): boolean;
24
+ focusOrInsert(view: EditorView, transactionProvider: (from: number, to: number, sug: Suggestion) => Promise<Transaction | undefined>): boolean;
25
+ insert(view: EditorView, transactionProvider: (from: number, to: number, sug: Suggestion) => Promise<Transaction | undefined>): boolean;
26
+ arrowUp(): boolean;
27
+ arrowDown(): boolean;
28
+ update(view: EditorView, lastState?: EditorState): void;
29
+ private display;
30
+ destroy(): void;
31
+ }
@@ -0,0 +1,169 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.SuggestionPalette = void 0;
16
+ const fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
17
+ class SuggestionPalette {
18
+ constructor(schema, view, suggestionProvider, suggestionStopWordsProvider, delay) {
19
+ var _a, _b;
20
+ this.delay = () => false;
21
+ this.lastTime = 0;
22
+ this.hasFocus = false;
23
+ this.suggestions = [];
24
+ this.schema = schema;
25
+ this.suggestionStopWordsProvider = suggestionStopWordsProvider;
26
+ this.suggestionProvider = suggestionProvider;
27
+ this.palette = document.createElement('div');
28
+ this.palette.className = 'suggestion-palette';
29
+ (_b = (_a = view.dom) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.appendChild(this.palette);
30
+ delay && (this.delay = delay);
31
+ this.update(view, undefined);
32
+ }
33
+ focusItem(idx) {
34
+ const ul = this.palette.getElementsByTagName('ul')[0];
35
+ if (ul) {
36
+ ul.classList.add('focused');
37
+ const lis = ul.getElementsByTagName('li');
38
+ this.currentFocus !== undefined && lis[this.currentFocus].classList.remove('focused');
39
+ idx !== undefined && lis[idx].classList.add('focused');
40
+ this.currentFocus = idx;
41
+ }
42
+ }
43
+ focus() {
44
+ if (this.palette.style.display === 'none')
45
+ return false;
46
+ this.hasFocus = true;
47
+ this.focusItem(0);
48
+ return true;
49
+ }
50
+ focusOrInsert(view, transactionProvider) {
51
+ if (this.palette.style.display === 'none')
52
+ return false;
53
+ return this.hasFocus ? this.insert(view, transactionProvider) : this.focus();
54
+ }
55
+ insert(view, transactionProvider) {
56
+ if (this.palette.style.display === 'none' || !this.hasFocus || this.currentFocus === undefined)
57
+ return false;
58
+ const sug = this.suggestions[this.currentFocus];
59
+ if (sug) {
60
+ const sel = view.state.selection;
61
+ const stopWords = this.suggestionStopWordsProvider();
62
+ let length = sug.terms.join(' ').length - 1;
63
+ while (sel.to - length >= 0 &&
64
+ !(0, fast_deep_equal_1.default)(view.state.doc
65
+ .textBetween(sel.to - length, sel.to)
66
+ .split(/\s+/)
67
+ .filter((x) => !stopWords.has(x)), sug.terms)) {
68
+ length++;
69
+ }
70
+ if (length > sel.to) {
71
+ length = sug.terms.join(' ').length;
72
+ while (sel.to - length >= 0 && !view.state.doc.textBetween(sel.to - length, sel.to).startsWith(sug.terms[0])) {
73
+ length++;
74
+ }
75
+ }
76
+ if (length <= sel.to) {
77
+ transactionProvider(sel.to - length, sel.to, sug).then((tr) => tr && view.dispatch(tr.scrollIntoView()));
78
+ }
79
+ this.palette.style.display = 'none';
80
+ return true;
81
+ }
82
+ return false;
83
+ }
84
+ arrowUp() {
85
+ if (!this.hasFocus)
86
+ return false;
87
+ this.currentFocus && this.focusItem(this.currentFocus - 1);
88
+ return true;
89
+ }
90
+ arrowDown() {
91
+ if (!this.hasFocus)
92
+ return false;
93
+ this.currentFocus !== undefined && this.currentFocus < this.palette.getElementsByTagName('ul')[0].childElementCount - 1 && this.focusItem(this.currentFocus + 1);
94
+ return true;
95
+ }
96
+ update(view, lastState) {
97
+ const state = view.state;
98
+ // Hide the palette if the selection is not empty
99
+ this.focusItem(undefined);
100
+ this.hasFocus = false;
101
+ if (!state.selection.empty) {
102
+ this.palette.style.display = 'none';
103
+ return;
104
+ }
105
+ const $pos = state.selection.$head;
106
+ if ((lastState === null || lastState === void 0 ? void 0 : lastState.doc.textContent) === state.doc.textContent) {
107
+ this.palette.style.display = 'none';
108
+ return;
109
+ }
110
+ const text = state.doc.textBetween($pos.pos && $pos.depth ? $pos.before() + 1 : 0, $pos.pos);
111
+ const words = text.split(/\s+/);
112
+ const lastWordDelta = Math.min(words
113
+ .concat()
114
+ .reverse()
115
+ .reduce((d, w) => (d < 0 ? d : w.length ? -d - w.length : d + 1), 0), -1);
116
+ console.log('lwd', lastWordDelta);
117
+ if ($pos.pos > 1 && state.doc.rangeHasMark($pos.pos + lastWordDelta, $pos.pos, this.schema.marks['link'])) {
118
+ console.log('Skip suggestion');
119
+ this.palette.style.display = 'none';
120
+ return;
121
+ }
122
+ const terms = words.filter((x) => x.length > 2 && !this.suggestionStopWordsProvider().has(x));
123
+ const lastTerms = terms.length > 3 ? terms.slice(length - 3) : terms;
124
+ const fingerprint = lastTerms.join(' ');
125
+ const { to } = state.selection;
126
+ if (this.previousFingerprint !== fingerprint) {
127
+ this.previousFingerprint = fingerprint;
128
+ setTimeout(() => __awaiter(this, void 0, void 0, function* () {
129
+ if (this.previousFingerprint !== fingerprint)
130
+ return;
131
+ const res = yield this.suggestionProvider(lastTerms);
132
+ this.suggestions = res;
133
+ if (res.length) {
134
+ this.palette.innerHTML = `<ul>${res
135
+ .map((x) => `<li id="${x.id}" data-code="${x.code}">${x.text}<div class="icn-container"><svg class="tab-icn" viewBox="0 0 24 24"><path d="M12.29 8.12L15.17 11H2c-.55 0-1 .45-1 1s.45 1 1 1h13.17l-2.88 2.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41L13.7 6.7c-.39-.39-1.02-.39-1.41 0-.38.39-.39 1.03 0 1.42zM20 7v10c0 .55.45 1 1 1s1-.45 1-1V7c0-.55-.45-1-1-1s-1 .45-1 1z"/></svg><svg class="return-icn" viewBox="0 0 24 24"><path d="M19 8v3H5.83l2.88-2.88c.39-.39.39-1.02 0-1.41-.39-.39-1.02-.39-1.41 0L2.71 11.3c-.39.39-.39 1.02 0 1.41L7.3 17.3c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L5.83 13H20c.55 0 1-.45 1-1V8c0-.55-.45-1-1-1s-1 .45-1 1z"/></svg></div></li>`)
136
+ .join('\n')}</ul>`;
137
+ // These are in screen coordinates
138
+ const end = view.coordsAtPos(to);
139
+ const start = view.coordsAtPos(Math.max(0, to - terms[terms.length - 1].length));
140
+ this.display(start.left > end.left ? end : start, (this.lastTime = +new Date()));
141
+ }
142
+ else {
143
+ this.palette.style.display = 'none';
144
+ }
145
+ }), 30);
146
+ }
147
+ }
148
+ display(pos, time) {
149
+ var _a;
150
+ if (time !== this.lastTime)
151
+ return;
152
+ if (this.delay()) {
153
+ setTimeout(() => this.display(pos, time), 100);
154
+ return;
155
+ }
156
+ this.palette.style.display = '';
157
+ const box = (_a = this.palette.offsetParent) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
158
+ const palBox = this.palette.getBoundingClientRect();
159
+ if (box) {
160
+ this.palette.style.left = Math.max(0, Math.min(pos.left - box.left - 12, box.width - palBox.width)) + 'px';
161
+ this.palette.style.top = pos.bottom - box.top + 4 + 'px';
162
+ }
163
+ }
164
+ destroy() {
165
+ this.palette.remove();
166
+ }
167
+ }
168
+ exports.SuggestionPalette = SuggestionPalette;
169
+ //# sourceMappingURL=suggestion-palette.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suggestion-palette.js","sourceRoot":"","sources":["../../../../tmp/components/iqr-text-field/suggestion-palette.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sEAAmC;AAQnC,MAAa,iBAAiB;IAa7B,YACC,MAAc,EACd,IAAgB,EAChB,kBAA8D,EAC9D,2BAA8C,EAC9C,KAAqB;;QAhBd,UAAK,GAAkB,GAAG,EAAE,CAAC,KAAK,CAAA;QAClC,aAAQ,GAAG,CAAC,CAAA;QAMZ,aAAQ,GAAG,KAAK,CAAA;QAChB,gBAAW,GAAiB,EAAE,CAAA;QAUrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,2BAA2B,GAAG,2BAA2B,CAAA;QAC9D,IAAI,CAAC,kBAAkB,GAAG,kBA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AAI,CAAC,OAAO,CAAC,YAAY,0CAAE,qBAAqB,EAAE,CAAA;QAC9D,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAA;QACnD,IAAI,GAAG,EAAE;YACR,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,EAAE,EAAE,GAAG,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAA;YAC1G,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,IAAI,CAAA;SACxD;IACF,CAAC;IAED,OAAO;QACN,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAA;IACtB,CAAC;CACD;AA5LD,8CA4LC"}
package/tmp/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './components';
package/tmp/index.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./components"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../tmp/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B"}
@@ -0,0 +1,19 @@
1
+ import { CodeStub, Contact, Content, Service } from '@icure/api';
2
+ import { Field } from '../components/iqr-form/model';
3
+ import { ServicesHistory } from '../components/iqr-form-loader';
4
+ import { FormValuesContainer } from '../components/iqr-form-loader';
5
+ import { VersionedMeta, VersionedValue } from '../components';
6
+ export declare function fuzzyDate(epochOrLongCalendar?: number): Date | undefined;
7
+ export declare function isCodeEqual(c1: CodeStub, c2: CodeStub): boolean;
8
+ export declare function areCodesEqual(c1s: CodeStub[], c2s: CodeStub[]): boolean;
9
+ export declare function isServiceEqual(svc1: Service, svc2: Service): boolean;
10
+ export declare function isContentEqual(content1: Content, content2: Content): boolean;
11
+ export declare function isServiceContentEqual(content1: {
12
+ [language: string]: Content;
13
+ }, content2: {
14
+ [language: string]: Content;
15
+ }): boolean;
16
+ export declare function convertServicesToVersionedValues(versions: ServicesHistory, extractValueFromContent: (content: Content) => string): VersionedValue[];
17
+ export declare function convertServicesToVersionedMetas(versions: ServicesHistory): VersionedMeta[];
18
+ export declare function getVersions(formsValueContainer: FormValuesContainer, field: Field): ServicesHistory;
19
+ export declare function setServices(ctc: Contact, newServices: Service[], modifiedServices: Service[]): Contact;