@icure/form 1.0.8 → 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 (343) hide show
  1. package/package.json +14 -14
  2. package/{components → src/components}/index.d.ts +0 -0
  3. package/{components → src/components}/index.js +6 -1
  4. package/src/components/index.js.map +1 -0
  5. package/src/components/iqr-form/fields/datePicker.d.ts +10 -0
  6. package/{components → src/components}/iqr-form/fields/datePicker.js +27 -12
  7. package/src/components/iqr-form/fields/datePicker.js.map +1 -0
  8. package/src/components/iqr-form/fields/dateTimePicker.d.ts +10 -0
  9. package/{components → src/components}/iqr-form/fields/dateTimePicker.js +19 -12
  10. package/src/components/iqr-form/fields/dateTimePicker.js.map +1 -0
  11. package/src/components/iqr-form/fields/measureField.d.ts +8 -0
  12. package/{components → src/components}/iqr-form/fields/measureField.js +14 -12
  13. package/src/components/iqr-form/fields/measureField.js.map +1 -0
  14. package/src/components/iqr-form/fields/multipleChoice.d.ts +8 -0
  15. package/{components → src/components}/iqr-form/fields/multipleChoice.js +14 -12
  16. package/src/components/iqr-form/fields/multipleChoice.js.map +1 -0
  17. package/src/components/iqr-form/fields/numberField.d.ts +8 -0
  18. package/{components → src/components}/iqr-form/fields/numberField.js +14 -12
  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/src/components/iqr-form/fields/textfield.js +142 -0
  22. package/src/components/iqr-form/fields/textfield.js.map +1 -0
  23. package/src/components/iqr-form/fields/timePicker.d.ts +10 -0
  24. package/{components → src/components}/iqr-form/fields/timePicker.js +19 -12
  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/src/components/iqr-form/legacy/Content.d.ts +28 -0
  30. package/src/components/iqr-form/legacy/Content.js +30 -0
  31. package/src/components/iqr-form/legacy/Content.js.map +1 -0
  32. package/src/components/iqr-form/legacy/Data.d.ts +14 -0
  33. package/src/components/iqr-form/legacy/Data.js +21 -0
  34. package/src/components/iqr-form/legacy/Data.js.map +1 -0
  35. package/src/components/iqr-form/legacy/Editor.d.ts +34 -0
  36. package/src/components/iqr-form/legacy/Editor.js +19 -0
  37. package/src/components/iqr-form/legacy/Editor.js.map +1 -0
  38. package/src/components/iqr-form/legacy/FormColumn.d.ts +18 -0
  39. package/src/components/iqr-form/legacy/FormColumn.js +10 -0
  40. package/src/components/iqr-form/legacy/FormColumn.js.map +1 -0
  41. package/src/components/iqr-form/legacy/FormDataOption.d.ts +16 -0
  42. package/src/components/iqr-form/legacy/FormDataOption.js +21 -0
  43. package/src/components/iqr-form/legacy/FormDataOption.js.map +1 -0
  44. package/src/components/iqr-form/legacy/FormLayout.d.ts +25 -0
  45. package/src/components/iqr-form/legacy/FormLayout.js +10 -0
  46. package/src/components/iqr-form/legacy/FormLayout.js.map +1 -0
  47. package/src/components/iqr-form/legacy/FormLayoutData.d.ts +42 -0
  48. package/src/components/iqr-form/legacy/FormLayoutData.js +10 -0
  49. package/src/components/iqr-form/legacy/FormLayoutData.js.map +1 -0
  50. package/src/components/iqr-form/legacy/FormPlanning.d.ts +22 -0
  51. package/src/components/iqr-form/legacy/FormPlanning.js +21 -0
  52. package/src/components/iqr-form/legacy/FormPlanning.js.map +1 -0
  53. package/src/components/iqr-form/legacy/FormSection.d.ts +19 -0
  54. package/src/components/iqr-form/legacy/FormSection.js +10 -0
  55. package/src/components/iqr-form/legacy/FormSection.js.map +1 -0
  56. package/src/components/iqr-form/legacy/Formula.d.ts +27 -0
  57. package/src/components/iqr-form/legacy/Formula.js +32 -0
  58. package/src/components/iqr-form/legacy/Formula.js.map +1 -0
  59. package/src/components/iqr-form/legacy/GuiCode.d.ts +16 -0
  60. package/src/components/iqr-form/legacy/GuiCode.js +21 -0
  61. package/src/components/iqr-form/legacy/GuiCode.js.map +1 -0
  62. package/src/components/iqr-form/legacy/GuiCodeType.d.ts +15 -0
  63. package/src/components/iqr-form/legacy/GuiCodeType.js +21 -0
  64. package/src/components/iqr-form/legacy/GuiCodeType.js.map +1 -0
  65. package/src/components/iqr-form/legacy/Suggest.d.ts +19 -0
  66. package/src/components/iqr-form/legacy/Suggest.js +21 -0
  67. package/src/components/iqr-form/legacy/Suggest.js.map +1 -0
  68. package/src/components/iqr-form/legacy/Tag.d.ts +16 -0
  69. package/src/components/iqr-form/legacy/Tag.js +21 -0
  70. package/src/components/iqr-form/legacy/Tag.js.map +1 -0
  71. package/{components → src/components}/iqr-form/model/index.d.ts +36 -18
  72. package/{components → src/components}/iqr-form/model/index.js +9 -3
  73. package/src/components/iqr-form/model/index.js.map +1 -0
  74. package/{components → src/components}/iqr-form/renderer/cards.d.ts +1 -1
  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 +1 -1
  78. package/src/components/iqr-form/renderer/form.js +93 -0
  79. package/src/components/iqr-form/renderer/form.js.map +1 -0
  80. package/src/components/iqr-form/renderer/index.d.ts +6 -0
  81. package/{components → src/components}/iqr-form/renderer/index.js +1 -0
  82. package/src/components/iqr-form/renderer/index.js.map +1 -0
  83. package/src/components/iqr-form/utils.d.ts +5 -0
  84. package/src/components/iqr-form/utils.js +91 -0
  85. package/src/components/iqr-form/utils.js.map +1 -0
  86. package/src/components/iqr-form-loader/fieldsValuesProviders.d.ts +13 -0
  87. package/src/components/iqr-form-loader/fieldsValuesProviders.js +47 -0
  88. package/src/components/iqr-form-loader/fieldsValuesProviders.js.map +1 -0
  89. package/src/components/iqr-form-loader/formValuesContainer.d.ts +33 -0
  90. package/src/components/iqr-form-loader/formValuesContainer.js +111 -0
  91. package/src/components/iqr-form-loader/formValuesContainer.js.map +1 -0
  92. package/src/components/iqr-form-loader/index.d.ts +3 -0
  93. package/src/components/iqr-form-loader/index.js +20 -0
  94. package/src/components/iqr-form-loader/index.js.map +1 -0
  95. package/src/components/iqr-form-loader/models.d.ts +14 -0
  96. package/src/components/iqr-form-loader/models.js +3 -0
  97. package/src/components/iqr-form-loader/models.js.map +1 -0
  98. package/src/components/iqr-text-field/index.d.ts +26 -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/src/components/iqr-text-field/plugin/caret-fix-plugin.d.ts +2 -0
  102. package/{components → src/components}/iqr-text-field/plugin/caret-fix-plugin.js +11 -6
  103. package/src/components/iqr-text-field/plugin/caret-fix-plugin.js.map +1 -0
  104. package/src/components/iqr-text-field/plugin/has-content-class-plugin.d.ts +2 -0
  105. package/{components → src/components}/iqr-text-field/plugin/has-content-class-plugin.js +8 -5
  106. package/src/components/iqr-text-field/plugin/has-content-class-plugin.js.map +1 -0
  107. package/src/components/iqr-text-field/plugin/mask-plugin.d.ts +2 -0
  108. package/{components → src/components}/iqr-text-field/plugin/mask-plugin.js +20 -12
  109. package/src/components/iqr-text-field/plugin/mask-plugin.js.map +1 -0
  110. package/src/components/iqr-text-field/plugin/regexp-plugin.d.ts +2 -0
  111. package/{components → src/components}/iqr-text-field/plugin/regexp-plugin.js +8 -4
  112. package/src/components/iqr-text-field/plugin/regexp-plugin.js.map +1 -0
  113. package/src/components/iqr-text-field/prosemirror-commands.d.ts +6 -0
  114. package/{components → src/components}/iqr-text-field/prosemirror-commands.js +7 -5
  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 +1 -1
  117. package/{components → src/components}/iqr-text-field/prosemirror-utils.js +2 -1
  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 +1 -1
  120. package/src/components/iqr-text-field/schema/common-marks.js +94 -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 +14 -13
  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 +5 -4
  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 +6 -6
  129. package/src/components/iqr-text-field/schema/index.js +26 -0
  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 +67 -33
  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 +6 -5
  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 +12 -8
  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 +1 -1
  141. package/{components → src/components}/iqr-text-field/schema/utils.js +3 -2
  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 +2 -2
  144. package/{components → src/components}/iqr-text-field/selection-companion.js +14 -12
  145. package/src/components/iqr-text-field/selection-companion.js.map +1 -0
  146. package/src/components/iqr-text-field/styles/paths.d.ts +5 -0
  147. package/src/components/iqr-text-field/styles/paths.js +37 -0
  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 +13 -15
  150. package/{components → src/components}/iqr-text-field/suggestion-palette.js +52 -22
  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} +6 -1
  154. package/src/index.js.map +1 -0
  155. package/src/utils/icure-utils.d.ts +19 -0
  156. package/src/utils/icure-utils.js +106 -0
  157. package/src/utils/icure-utils.js.map +1 -0
  158. package/src/utils/languages.d.ts +8 -0
  159. package/src/utils/languages.js +15 -0
  160. package/src/utils/languages.js.map +1 -0
  161. package/src/utils/no-lodash.d.ts +5 -0
  162. package/src/utils/no-lodash.js +25 -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 +28 -22
  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 +340 -178
  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/iqr-form/fields/datePicker.d.ts +0 -8
  327. package/components/iqr-form/fields/dateTimePicker.d.ts +0 -8
  328. package/components/iqr-form/fields/measureField.d.ts +0 -8
  329. package/components/iqr-form/fields/multipleChoice.d.ts +0 -8
  330. package/components/iqr-form/fields/numberField.d.ts +0 -8
  331. package/components/iqr-form/fields/textfield.js +0 -86
  332. package/components/iqr-form/fields/timePicker.d.ts +0 -8
  333. package/components/iqr-form/renderer/cards.js +0 -44
  334. package/components/iqr-form/renderer/form.js +0 -45
  335. package/components/iqr-form/renderer/index.d.ts +0 -3
  336. package/components/iqr-text-field/index.d.ts +0 -2
  337. package/components/iqr-text-field/plugin/caret-fix-plugin.d.ts +0 -2
  338. package/components/iqr-text-field/plugin/has-content-class-plugin.d.ts +0 -2
  339. package/components/iqr-text-field/plugin/mask-plugin.d.ts +0 -2
  340. package/components/iqr-text-field/plugin/regexp-plugin.d.ts +0 -2
  341. package/components/iqr-text-field/prosemirror-commands.d.ts +0 -4
  342. package/components/iqr-text-field/schema/common-marks.js +0 -90
  343. package/components/iqr-text-field/schema/index.js +0 -18
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.maskPlugin = void 0;
4
4
  const prosemirror_state_1 = require("prosemirror-state");
5
5
  const prosemirror_view_1 = require("prosemirror-view");
6
- const maskPlugin = () => {
6
+ const maskPlugin = function () {
7
7
  const maskText = ($pos, text, mask, tr, setSelection = true) => {
8
8
  const textFromBeginning = $pos.parent.textBetween(0, $pos.parentOffset) + text;
9
9
  const trailingText = $pos.parent.textBetween($pos.parentOffset, $pos.parent.content.size);
@@ -15,8 +15,12 @@ const maskPlugin = () => {
15
15
  completed = true;
16
16
  }
17
17
  for (let i = 0; i < mask.length && i < t.length; i++) {
18
- if (mask[i] === '.' && t[i].normalize("NFD").replace(/[\u0300-\u036f]/g, "").match(/\w|-/) ||
19
- mask[i] === '-' && t[i].match(/\d/)) {
18
+ if ((mask[i] === '.' &&
19
+ t[i]
20
+ .normalize('NFD')
21
+ .replace(/[\u0300-\u036f]/g, '')
22
+ .match(/\w|-/)) ||
23
+ (mask[i] === '-' && t[i].match(/\d/))) {
20
24
  //skip
21
25
  }
22
26
  else {
@@ -36,7 +40,7 @@ const maskPlugin = () => {
36
40
  }
37
41
  const tail = t.length > mask.length ? t.substring(mask.length) : '';
38
42
  t = t.substring(0, mask.length);
39
- let trail = t.length < mask.length ? mask.substring(t.length) : '';
43
+ const trail = t.length < mask.length ? mask.substring(t.length) : '';
40
44
  if (t === textFromBeginning && trail === trailingText) {
41
45
  return undefined;
42
46
  }
@@ -48,7 +52,7 @@ const maskPlugin = () => {
48
52
  else {
49
53
  tr = tr.setSelection(prosemirror_state_1.TextSelection.create(tr.doc, Math.min(currentSel.$anchor.pos, tr.doc.content.size - 1), Math.min(currentSel.$head.pos, tr.doc.content.size - 1)));
50
54
  }
51
- tr.setMeta("tailText", tail);
55
+ tr.setMeta('tailText', tail);
52
56
  return tr;
53
57
  };
54
58
  function applyDocMasks(state) {
@@ -78,7 +82,7 @@ const maskPlugin = () => {
78
82
  }
79
83
  return new prosemirror_state_1.Plugin({
80
84
  view: (v) => {
81
- let tr = applyDocMasks(v.state);
85
+ const tr = applyDocMasks(v.state);
82
86
  if (tr)
83
87
  v.updateState(v.state.apply(tr));
84
88
  return {};
@@ -100,9 +104,7 @@ const maskPlugin = () => {
100
104
  }
101
105
  }
102
106
  }
103
- return prosemirror_view_1.DecorationSet.create(state.doc, [
104
- prosemirror_view_1.Decoration.node(start - 1, start - 1 + node.nodeSize, { class: "focused" })
105
- ]);
107
+ return prosemirror_view_1.DecorationSet.create(state.doc, [prosemirror_view_1.Decoration.node(start - 1, start - 1 + node.nodeSize, { class: 'focused' })]);
106
108
  }
107
109
  return undefined;
108
110
  },
@@ -115,7 +117,12 @@ const maskPlugin = () => {
115
117
  const regexp = $from.parent.type.spec.regexp;
116
118
  if (!mask)
117
119
  return false;
118
- const tr = maskText($from, regexp && regexp.length ? text.split('').filter(x => x.match(new RegExp(regexp))).join('') : text, mask, state.tr);
120
+ const tr = maskText($from, regexp && regexp.length
121
+ ? text
122
+ .split('')
123
+ .filter((x) => x.match(new RegExp(regexp)))
124
+ .join('')
125
+ : text, mask, state.tr);
119
126
  if (tr) {
120
127
  const tail = tr.getMeta('tailText');
121
128
  if (tail === null || tail === void 0 ? void 0 : tail.length) {
@@ -134,11 +141,12 @@ const maskPlugin = () => {
134
141
  return true;
135
142
  }
136
143
  return false;
137
- }
144
+ },
138
145
  },
139
146
  appendTransaction: (transactions, oldState, newState) => {
140
147
  return applyDocMasks(newState);
141
- }
148
+ },
142
149
  });
143
150
  };
144
151
  exports.maskPlugin = maskPlugin;
152
+ //# sourceMappingURL=mask-plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mask-plugin.js","sourceRoot":"","sources":["../../../../../src/components/iqr-text-field/plugin/mask-plugin.ts"],"names":[],"mappings":";;;AAAA,yDAAmF;AAEnF,uDAAwE;AAEjE,MAAM,UAAU,GAAG;IACzB,MAAM,QAAQ,GAAG,CAAC,IAAiB,EAAE,IAAY,EAAE,IAAY,EAAE,EAAe,EAAE,YAAY,GAAG,IAAI,EAAE,EAAE;QACxG,MAAM,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAA;QAC9E,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QAEzF,IAAI,CAAC,GAAG,iBAAiB,CAAA;QACzB,IAAI,IAAI,GAAG,CAAC,CAAA;QACZ,IAAI,SAAS,GAAG,KAAK,CAAA;QAErB,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;YACnB,CAAC,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;YAC/C,SAAS,GAAG,IAAI,CAAA;SAChB;QAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACrD,IACC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG;gBACf,CAAC,CAAC,CAAC,CAAC;qBACF,SAAS,CAAC,KAAK,CAAC;qBAChB,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;qBAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;gBACjB,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CA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G,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;4BAC5C,IAAI,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;gCAC1E,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;6BACpD;iCAAM,IAAI,QAAQ,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;gCAC3E,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAA;6BAC7C;yBACD;qBACD;oBACD,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;oBACjB,OAAO,IAAI,CAAA;iBACX;gBACD,OAAO,KAAK,CAAA;YACb,CAAC;SACD;QACD,iBAAiB,EAAE,CAAC,YAAgC,EAAE,QAAqB,EAAE,QAAqB,EAAE,EAAE;YACrG,OAAO,aAAa,CAAC,QAAQ,CAAC,CAAA;QAC/B,CAAC;KACD,CAAC,CAAA;AACH,CAAC,CAAA;AA5JY,QAAA,UAAU,cA4JtB"}
@@ -0,0 +1,2 @@
1
+ import { Plugin } from 'prosemirror-state';
2
+ export declare const regexpPlugin: () => Plugin;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.regexpPlugin = void 0;
4
4
  const prosemirror_state_1 = require("prosemirror-state");
5
- const regexpPlugin = () => {
5
+ const regexpPlugin = function () {
6
6
  return new prosemirror_state_1.Plugin({
7
7
  props: {
8
8
  handleTextInput: (view, from, to, text) => {
@@ -14,7 +14,10 @@ const regexpPlugin = () => {
14
14
  const regexp = $from.parent.type.spec.regexp;
15
15
  if (mask || !regexp)
16
16
  return false; // Will be handled by mask plugin
17
- const allowedCharacters = text.split('').filter(x => x.match(new RegExp(regexp))).join('');
17
+ const allowedCharacters = text
18
+ .split('')
19
+ .filter((x) => x.match(new RegExp(regexp)))
20
+ .join('');
18
21
  if (allowedCharacters === text)
19
22
  return false;
20
23
  let tr = state.tr;
@@ -40,8 +43,9 @@ const regexpPlugin = () => {
40
43
  }
41
44
  view.dispatch(tr);
42
45
  return true;
43
- }
44
- }
46
+ },
47
+ },
45
48
  });
46
49
  };
47
50
  exports.regexpPlugin = regexpPlugin;
51
+ //# sourceMappingURL=regexp-plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"regexp-plugin.js","sourceRoot":"","sources":["../../../../../src/components/iqr-text-field/plugin/regexp-plugin.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AAElD,MAAM,YAAY,GAAG;IAC3B,OAAO,IAAI,0BAAM,CAAC;QACjB,KAAK,EAAE;YACN,eAAe,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE;gBACzC,IAAI,IAAI,CAAC,SAAS;oBAAE,OAAO,KAAK,CAAA;gBAEhC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;gBACxB,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;gBACrC,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAA;gBACxC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAA;gBAE5C,IAAI,IAAI,IAAI,CAAC,MAAM;oBAAE,OAAO,KAAK,CAAA,CAAC,iCAAiC;gBAEnE,MAAM,iBAAiB,GAAG,IAAI;qBAC5B,KAAK,CAAC,EAAE,CAAC;qBACT,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,K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CAAC,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAA;gCAClD,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,iCAAa,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;gCAChH,MAAK;6BACL;4BACD,OAAO,EAAE,CAAA;yBACT;qBACD;iBACD;gBACD,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;gBAEjB,OAAO,IAAI,CAAA;YACZ,CAAC;SACD;KACD,CAAC,CAAA;AACH,CAAC,CAAA;AA/CY,QAAA,YAAY,gBA+CxB"}
@@ -0,0 +1,6 @@
1
+ import { NodeType } from 'prosemirror-model';
2
+ import { EditorState, Transaction } from 'prosemirror-state';
3
+ export declare function wrapInIfNeeded(nodeType: NodeType, attrs?: {
4
+ [key: string]: unknown;
5
+ }): (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
6
+ export declare function unwrapFrom(nodeType: NodeType): (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
@@ -15,15 +15,15 @@ function wrapInIfNeeded(nodeType, attrs) {
15
15
  if (!range) {
16
16
  return false;
17
17
  }
18
- let same = range.$from.sharedDepth(to);
18
+ const same = range.$from.sharedDepth(to);
19
19
  if (same) {
20
20
  const pos = $from.before(same);
21
21
  if (((_b = (_a = prosemirror_state_1.NodeSelection.create(state.doc, pos).$from) === null || _a === void 0 ? void 0 : _a.node()) === null || _b === void 0 ? void 0 : _b.type) === nodeType) {
22
22
  return false;
23
23
  }
24
24
  }
25
- const wrapping = range && prosemirror_transform_1.findWrapping(range, nodeType, attrs);
26
- if (!wrapping)
25
+ const wrapping = range && (0, prosemirror_transform_1.findWrapping)(range, nodeType, attrs);
26
+ if (!wrapping || !range)
27
27
  return false;
28
28
  if (dispatch)
29
29
  dispatch(state.tr.wrap(range, wrapping).scrollIntoView());
@@ -34,15 +34,16 @@ exports.wrapInIfNeeded = wrapInIfNeeded;
34
34
  // :: (NodeType, ?Object) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool
35
35
  // Wrap the selection in a node of the given type with the given
36
36
  // attributes.
37
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
37
38
  function unwrapFrom(nodeType) {
38
39
  return function (state, dispatch) {
39
40
  const { $from, $to } = state.selection;
40
41
  const range = $from.blockRange($to);
41
- const depth = range && prosemirror_transform_1.liftTarget(range);
42
+ const depth = range && (0, prosemirror_transform_1.liftTarget)(range);
42
43
  if (depth === null || depth === undefined) {
43
44
  return false;
44
45
  }
45
- let gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);
46
+ const gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);
46
47
  const frag = prosemirror_model_1.Fragment.from($from.node());
47
48
  if (dispatch)
48
49
  dispatch(state.tr.replaceRange(gapStart, gapEnd, new prosemirror_model_1.Slice(frag, 0, 0)).scrollIntoView());
@@ -50,3 +51,4 @@ function unwrapFrom(nodeType) {
50
51
  };
51
52
  }
52
53
  exports.unwrapFrom = unwrapFrom;
54
+ //# sourceMappingURL=prosemirror-commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prosemirror-commands.js","sourceRoot":"","sources":["../../../../src/components/iqr-text-field/prosemirror-commands.ts"],"names":[],"mappings":";;;AAAA,iEAAgE;AAChE,yDAA6D;AAC7D,yDAA2E;AAE3E,qFAAqF;AACrF,gEAAgE;AAChE,cAAc;AACd,SAAgB,cAAc,CAAC,QAAkB,EAAE,KAAkC;IACpF,OAAO,UAAU,KAAkB,EAAE,QAAoC;;QACxE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC,SAAS,CAAA;QAC1C,MAAM,K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E;YAC1C,OAAO,KAAK,CAAA;SACZ;QAED,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,EACvC,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAA;QAC9B,MAAM,IAAI,GAAG,4BAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAA;QAExC,IAAI,QAAQ;YAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,yBAAK,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAA;QACvG,OAAO,IAAI,CAAA;IACZ,CAAC,CAAA;AACF,CAAC;AAjBD,gCAiBC"}
@@ -1,4 +1,4 @@
1
- import { MarkSpec } from "prosemirror-model";
1
+ import { MarkSpec } from 'prosemirror-model';
2
2
  import OrderedMap = require('orderedmap');
3
3
  export declare function hasMark(ms: {
4
4
  [key: string]: MarkSpec;
@@ -6,10 +6,11 @@ function hasMark(ms, mark) {
6
6
  return false;
7
7
  }
8
8
  if (!!ms.get) {
9
- return !!(ms.get(mark));
9
+ return !!ms.get(mark);
10
10
  }
11
11
  else {
12
12
  return !!ms[mark];
13
13
  }
14
14
  }
15
15
  exports.hasMark = hasMark;
16
+ //# sourceMappingURL=prosemirror-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prosemirror-utils.js","sourceRoot":"","sources":["../../../../src/components/iqr-text-field/prosemirror-utils.ts"],"names":[],"mappings":";;;AAGA,SAAgB,OAAO,CAAC,EAAyE,EAAE,IAAY;IAC9G,IAAI,CAAC,EAAE,EAAE;QACR,OAAO,KAAK,CAAA;KACZ;IACD,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE;QACb,OAAO,CAAC,CAAE,EAA2B,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;KAC/C;SAAM;QACN,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;KACjB;AACF,CAAC;AATD,0BASC"}
@@ -1,4 +1,4 @@
1
- import { MarkSpec } from "prosemirror-model";
1
+ import { MarkSpec } from 'prosemirror-model';
2
2
  export declare const colors: {
3
3
  [key: string]: [string, string];
4
4
  };
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getMarks = exports.colors = void 0;
4
+ exports.colors = {
5
+ I: ['#F44336', 'white'],
6
+ II: ['#E91E63', 'white'],
7
+ III: ['#9C27B0', 'white'],
8
+ IV: ['#673AB7', 'white'],
9
+ V: ['#009688', 'white'],
10
+ VI: ['#4CAF50', 'white'],
11
+ VII: ['#8BC34A', 'white'],
12
+ VIII: ['#03A9F4', 'white'],
13
+ IX: ['#00BCD4', 'white'],
14
+ X: ['#FFC107', 'black'],
15
+ XI: ['#FF9800', 'black'],
16
+ XII: ['#FF5722', 'white'],
17
+ XIII: ['#795548', 'white'],
18
+ XIV: ['#3949AB', 'white'],
19
+ XV: ['#C0CA33', 'black'],
20
+ XVI: ['#07F87F', 'black'],
21
+ XVII: ['#FF6262', 'white'],
22
+ XVIII: ['#718792', 'white'],
23
+ XIX: ['#00ECB9', 'black'],
24
+ XX: ['#FF20A3', 'black'],
25
+ XXI: ['#FFCE38', 'black'],
26
+ XXII: ['#721F01', 'white'],
27
+ };
28
+ const getColor = (c) => exports.colors[c] || [c, 'white'];
29
+ function getMarks(contentProvider, colorProvider) {
30
+ return {
31
+ em: {
32
+ parseDOM: [{ tag: 'i' }, { tag: 'em' }, { style: 'font-style', getAttrs: (value) => value === 'italic' && null }],
33
+ toDOM() {
34
+ return ['em'];
35
+ },
36
+ },
37
+ strong: {
38
+ parseDOM: [{ tag: 'b' }, { tag: 'strong' }, { style: 'font-weight', getAttrs: (value) => /^(bold(er)?|[5-9]\d{2,})$/.test(value) && null }],
39
+ toDOM() {
40
+ return ['strong'];
41
+ },
42
+ },
43
+ link: {
44
+ attrs: {
45
+ href: {},
46
+ title: { default: null },
47
+ },
48
+ inclusive: false,
49
+ parseDOM: [
50
+ {
51
+ tag: 'span[data-href]',
52
+ getAttrs(dom) {
53
+ const el = dom;
54
+ return { href: el.dataset.href, title: el.dataset.title };
55
+ },
56
+ },
57
+ ],
58
+ toDOM(node) {
59
+ const urls = node.attrs.href;
60
+ if (urls) {
61
+ const refs = urls.split(',').map((url) => {
62
+ const pos = url.indexOf('://');
63
+ const protocol = url.substring(0, pos);
64
+ const code = url.substring(pos + 3);
65
+ const parts = protocol.split('-');
66
+ const category = parts[0];
67
+ const type = parts[1];
68
+ return { category, type, code };
69
+ });
70
+ const codes = refs.filter((x) => x.category === 'c');
71
+ const ilinks = refs.filter((x) => x.category === 'i');
72
+ const classes = (refs.some((x) => x.category === 'x') ? ['ext-link'] : []).concat(codes.length ? [`code-count-${codes.length}`] : []);
73
+ const dataAttributes = (codes.length ? [{ 'data-content': contentProvider(codes) }] : []).concat(ilinks.map((c, idx) => ({ [`data-link-color-${idx}`]: colorProvider(c.type, c.code, false) })));
74
+ const styles = codes.map((c, idx) => {
75
+ const color = getColor(colorProvider(c.type, c.code, true));
76
+ return `--bg-code-color-${idx + 1}: ${color[0]}; --text-code-color-${idx + 1}: ${color[1]};`;
77
+ });
78
+ return [
79
+ 'span',
80
+ dataAttributes.reduce((acc, da) => Object.assign(da, acc), {
81
+ ['data-href']: node.attrs.href,
82
+ ['data-title']: node.attrs.title,
83
+ class: classes.join(' '),
84
+ style: styles.join(''),
85
+ }),
86
+ ];
87
+ }
88
+ return ['span', { ['data-href']: node.attrs.href, ['data-title']: node.attrs.title }];
89
+ },
90
+ },
91
+ };
92
+ }
93
+ exports.getMarks = getMarks;
94
+ //# sourceMappingURL=common-marks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common-marks.js","sourceRoot":"","sources":["../../../../../src/components/iqr-text-field/schema/common-marks.ts"],"names":[],"mappings":";;;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;YACtF,CAAC;SACD;KACD,CAAA;AACF,CAAC;AA7ED,4BA6EC"}
@@ -16,13 +16,13 @@ function getDateSpec() {
16
16
  return ['span', 0];
17
17
  },
18
18
  regexp: '[0-9]',
19
- mask: '--/--/----'
19
+ mask: '--/--/----',
20
20
  },
21
21
  text: {
22
- group: 'inline'
23
- }
22
+ group: 'inline',
23
+ },
24
24
  },
25
- marks: {}
25
+ marks: {},
26
26
  };
27
27
  }
28
28
  exports.getDateSpec = getDateSpec;
@@ -41,13 +41,13 @@ function getTimeSpec() {
41
41
  return ['span', 0];
42
42
  },
43
43
  regexp: '[0-9]',
44
- mask: '--:--:--'
44
+ mask: '--:--:--',
45
45
  },
46
46
  text: {
47
- group: 'inline'
48
- }
47
+ group: 'inline',
48
+ },
49
49
  },
50
- marks: {}
50
+ marks: {},
51
51
  };
52
52
  }
53
53
  exports.getTimeSpec = getTimeSpec;
@@ -66,7 +66,7 @@ function getDateTimeSpec() {
66
66
  return ['span', { class: 'date' }, 0];
67
67
  },
68
68
  regexp: '[0-9]',
69
- mask: '--/--/----'
69
+ mask: '--/--/----',
70
70
  },
71
71
  time: {
72
72
  content: 'inline*',
@@ -76,13 +76,14 @@ function getDateTimeSpec() {
76
76
  return ['span', { class: 'time' }, 0];
77
77
  },
78
78
  regexp: '[0-9]',
79
- mask: '--:--:--'
79
+ mask: '--:--:--',
80
80
  },
81
81
  text: {
82
- group: 'inline'
83
- }
82
+ group: 'inline',
83
+ },
84
84
  },
85
- marks: {}
85
+ marks: {},
86
86
  };
87
87
  }
88
88
  exports.getDateTimeSpec = getDateTimeSpec;
89
+ //# sourceMappingURL=date-time-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-time-schema.js","sourceRoot":"","sources":["../../../../../src/components/iqr-text-field/schema/date-time-schema.ts"],"names":[],"mappings":";;;AAMA,SAAgB,WAAW;IAC1B,OAAO;QACN,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE;YACN,SAAS,EAAE;gBACV,OA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,CAAC;gBACD,MAAM,EAAE,OAAO;gBACf,IAAI,EAAE,YAAY;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;gBACD,MAAM,EAAE,OAAO;gBACf,IAAI,EAAE,UAAU;aAChB;YAED,IAAI,EAAE;gBACL,KAAK,EAAE,QAAQ;aACf;SACD;QACD,KAAK,EAAE,EAAE;KACT,CAAA;AACF,CAAC;AApCD,0CAoCC"}
@@ -15,13 +15,14 @@ function getDecimalSpec() {
15
15
  toDOM() {
16
16
  return ['span', 0];
17
17
  },
18
- regexp: '[,. 0-9-]'
18
+ regexp: '[,. 0-9-]',
19
19
  },
20
20
  text: {
21
- group: 'inline'
22
- }
21
+ group: 'inline',
22
+ },
23
23
  },
24
- marks: {}
24
+ marks: {},
25
25
  };
26
26
  }
27
27
  exports.getDecimalSpec = getDecimalSpec;
28
+ //# sourceMappingURL=decimal-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decimal-schema.js","sourceRoot":"","sources":["../../../../../src/components/iqr-text-field/schema/decimal-schema.ts"],"names":[],"mappings":";;;AAIA,SAAgB,cAAc;IAC7B,OAAO;QACN,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE;YACN,SAAS,EAAE;gBACV,OAAO,EAAE,SAAS;aAClB;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,CAAC,CAAC,CAAA;gBACnB,CAAC;gBACD,MAAM,EAAE,WAAW;aACnB;YAED,IAAI,EAAE;gBACL,KAAK,EAAE,QAAQ;aACf;SACD;QACD,KAAK,EAAE,EAAE;KACT,CAAA;AACF,CAAC;AAxBD,wCAwBC"}
@@ -1,11 +1,11 @@
1
1
  import { Schema } from 'prosemirror-model';
2
- import { DocumentSchema, InlineSchema, StyledSchema } from "./markdown-schema";
3
- import { DateSchema, DateTimeSchema, TimeSchema } from "./date-time-schema";
4
- import { TokensSchema } from "./token-schema";
5
- import { MeasureSchema } from "./measure-schema";
6
- import { DecimalSchema } from "./decimal-schema";
2
+ import { DocumentSchema, InlineSchema, StyledSchema } from './markdown-schema';
3
+ import { DateSchema, DateTimeSchema, TimeSchema } from './date-time-schema';
4
+ import { TokensSchema } from './token-schema';
5
+ import { MeasureSchema } from './measure-schema';
6
+ import { DecimalSchema } from './decimal-schema';
7
7
  export declare type IqrTextFieldSchema = DocumentSchema | TokensSchema | StyledSchema | InlineSchema | DateSchema | TimeSchema | DateTimeSchema | DecimalSchema | MeasureSchema;
8
8
  export declare function createSchema(type: IqrTextFieldSchema, colorProvider: (type: string, code: string, isCode: boolean) => string, contentProvider: (codes: {
9
9
  type: string;
10
10
  code: string;
11
- }[]) => string): Schema<any, any>;
11
+ }[]) => string): Schema;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createSchema = void 0;
4
+ const prosemirror_model_1 = require("prosemirror-model");
5
+ const markdown_schema_1 = require("./markdown-schema");
6
+ const date_time_schema_1 = require("./date-time-schema");
7
+ const token_schema_1 = require("./token-schema");
8
+ const measure_schema_1 = require("./measure-schema");
9
+ const decimal_schema_1 = require("./decimal-schema");
10
+ function createSchema(type, colorProvider, contentProvider) {
11
+ return new prosemirror_model_1.Schema(type === 'decimal'
12
+ ? (0, decimal_schema_1.getDecimalSpec)()
13
+ : type === 'measure'
14
+ ? (0, measure_schema_1.getMeasureSpec)()
15
+ : type === 'date'
16
+ ? (0, date_time_schema_1.getDateSpec)()
17
+ : type === 'time'
18
+ ? (0, date_time_schema_1.getTimeSpec)()
19
+ : type === 'date-time'
20
+ ? (0, date_time_schema_1.getDateTimeSpec)()
21
+ : type === 'tokens-list' || type === 'styled-tokens-list' || type === 'tokens-list-with-codes' || type === 'styled-tokens-list-with-codes'
22
+ ? (0, token_schema_1.getTokensSpec)(type, contentProvider, colorProvider)
23
+ : (0, markdown_schema_1.getMarkdownSpec)(type, contentProvider, colorProvider));
24
+ }
25
+ exports.createSchema = createSchema;
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/iqr-text-field/schema/index.ts"],"names":[],"mappings":";;;AAAA,yDAA0C;AAC1C,uDAA+F;AAC/F,yDAAsH;AACtH,iDAA4D;AAC5D,qDAAgE;AAChE,qDAAgE;AAIhE,SAAgB,YAAY,CAC3B,IAAwB,EACxB,aAAsE,EACtE,eAAoE;IAEpE,OAAO,IAAI,0BAAM,CAChB,IAAI,KAAK,SAAS;QACjB,CAAC,CAAC,IAAA,+BAAc,GAAE;QAClB,CAAC,CAAC,IAAI,KAAK,SAAS;YACpB,CAAC,CAAC,IAAA,+BAAc,GAAE;YAClB,CAAC,CAAC,IAAI,KAAK,MAAM;gBACjB,CAAC,CAAC,IAAA,8BAAW,GAAE;gBACf,CAAC,CAAC,IAAI,KAAK,MAAM;oBACjB,CAAC,CAAC,IAAA,8BAAW,GAAE;oBACf,CAAC,CAAC,IAAI,KAAK,WAAW;wBACtB,CAAC,CAAC,IAAA,kCAAe,GAAE;wBACnB,CAAC,CAAC,IAAI,KAAK,aAAa,IAAI,IAAI,KAAK,oBAAoB,IAAI,IAAI,KAAK,wBAAwB,IAAI,IAAI,KAAK,+BAA+B;4BAC1I,CAAC,CAAC,IAAA,4BAAa,EAAC,IAAI,EAAE,eAAe,EAAE,aAAa,CAAC;4BACrD,CAAC,CAAC,IAAA,iCAAe,EAAC,IAAI,EAAE,eAAe,EAAE,aAAa,CAAC,CACxD,CAAA;AACF,CAAC;AApBD,oCAoBC"}