@qoretechnologies/reqraft 0.10.65 → 0.10.66-pr.137.ga1983bf

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 (873) hide show
  1. package/README.md +53 -1
  2. package/dist/components/Description/AllowedValuesHelp.d.ts +20 -0
  3. package/dist/components/Description/AllowedValuesHelp.d.ts.map +1 -0
  4. package/dist/components/Description/AllowedValuesHelp.js +86 -0
  5. package/dist/components/Description/AllowedValuesHelp.js.map +1 -0
  6. package/dist/components/Description/describedControl.d.ts +54 -0
  7. package/dist/components/Description/describedControl.d.ts.map +1 -0
  8. package/dist/components/Description/describedControl.js +81 -0
  9. package/dist/components/Description/describedControl.js.map +1 -0
  10. package/dist/components/Description/index.d.ts.map +1 -1
  11. package/dist/components/Description/index.js +3 -2
  12. package/dist/components/Description/index.js.map +1 -1
  13. package/dist/components/colorValue/colorValue.d.ts +59 -0
  14. package/dist/components/colorValue/colorValue.d.ts.map +1 -0
  15. package/dist/components/colorValue/colorValue.js +245 -0
  16. package/dist/components/colorValue/colorValue.js.map +1 -0
  17. package/dist/components/colorValue/index.d.ts +34 -0
  18. package/dist/components/colorValue/index.d.ts.map +1 -0
  19. package/dist/components/colorValue/index.js +136 -0
  20. package/dist/components/colorValue/index.js.map +1 -0
  21. package/dist/components/colorValue/labels.d.ts +12 -0
  22. package/dist/components/colorValue/labels.d.ts.map +1 -0
  23. package/dist/components/colorValue/labels.js +11 -0
  24. package/dist/components/colorValue/labels.js.map +1 -0
  25. package/dist/components/composer/Composer.d.ts +1 -1
  26. package/dist/components/composer/Composer.d.ts.map +1 -1
  27. package/dist/components/composer/Composer.js +2 -2
  28. package/dist/components/composer/Composer.js.map +1 -1
  29. package/dist/components/dpqlEditor/DpqlEditor.d.ts.map +1 -1
  30. package/dist/components/dpqlEditor/DpqlEditor.js +156 -10
  31. package/dist/components/dpqlEditor/DpqlEditor.js.map +1 -1
  32. package/dist/components/dpqlEditor/dpqlCompletions.d.ts +39 -0
  33. package/dist/components/dpqlEditor/dpqlCompletions.d.ts.map +1 -0
  34. package/dist/components/dpqlEditor/dpqlCompletions.js +294 -0
  35. package/dist/components/dpqlEditor/dpqlCompletions.js.map +1 -0
  36. package/dist/components/dpqlEditor/dpqlHelpers.d.ts +54 -5
  37. package/dist/components/dpqlEditor/dpqlHelpers.d.ts.map +1 -1
  38. package/dist/components/dpqlEditor/dpqlHelpers.js +413 -63
  39. package/dist/components/dpqlEditor/dpqlHelpers.js.map +1 -1
  40. package/dist/components/dpqlEditor/dpqlInserter.d.ts.map +1 -1
  41. package/dist/components/dpqlEditor/dpqlInserter.js +67 -29
  42. package/dist/components/dpqlEditor/dpqlInserter.js.map +1 -1
  43. package/dist/components/dpqlEditor/dpqlTags.d.ts +17 -7
  44. package/dist/components/dpqlEditor/dpqlTags.d.ts.map +1 -1
  45. package/dist/components/dpqlEditor/dpqlTags.js +44 -17
  46. package/dist/components/dpqlEditor/dpqlTags.js.map +1 -1
  47. package/dist/components/dpqlEditor/types.d.ts +94 -8
  48. package/dist/components/dpqlEditor/types.d.ts.map +1 -1
  49. package/dist/components/dpqlEditor/useDpqlSession.d.ts +7 -2
  50. package/dist/components/dpqlEditor/useDpqlSession.d.ts.map +1 -1
  51. package/dist/components/dpqlEditor/useDpqlSession.js +49 -17
  52. package/dist/components/dpqlEditor/useDpqlSession.js.map +1 -1
  53. package/dist/components/form/engine/CompactRow.d.ts.map +1 -1
  54. package/dist/components/form/engine/CompactRow.js +322 -124
  55. package/dist/components/form/engine/CompactRow.js.map +1 -1
  56. package/dist/components/form/engine/CompactToolbar.d.ts.map +1 -1
  57. package/dist/components/form/engine/CompactToolbar.js +29 -3
  58. package/dist/components/form/engine/CompactToolbar.js.map +1 -1
  59. package/dist/components/form/engine/FormEngine.d.ts +66 -11
  60. package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
  61. package/dist/components/form/engine/FormEngine.js +570 -176
  62. package/dist/components/form/engine/FormEngine.js.map +1 -1
  63. package/dist/components/form/engine/HiddenFieldsNote.d.ts +28 -0
  64. package/dist/components/form/engine/HiddenFieldsNote.d.ts.map +1 -0
  65. package/dist/components/form/engine/HiddenFieldsNote.js +32 -0
  66. package/dist/components/form/engine/HiddenFieldsNote.js.map +1 -0
  67. package/dist/components/form/engine/OptionFieldMessages.d.ts.map +1 -1
  68. package/dist/components/form/engine/OptionFieldMessages.js +25 -3
  69. package/dist/components/form/engine/OptionFieldMessages.js.map +1 -1
  70. package/dist/components/form/engine/OptionsHelpDialog.d.ts.map +1 -1
  71. package/dist/components/form/engine/OptionsHelpDialog.js +19 -2
  72. package/dist/components/form/engine/OptionsHelpDialog.js.map +1 -1
  73. package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts +2 -2
  74. package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts.map +1 -1
  75. package/dist/components/form/engine/_structuredData/SchemaDataView.js +12 -6
  76. package/dist/components/form/engine/_structuredData/SchemaDataView.js.map +1 -1
  77. package/dist/components/form/engine/compactRowContext.d.ts +30 -1
  78. package/dist/components/form/engine/compactRowContext.d.ts.map +1 -1
  79. package/dist/components/form/engine/compactRowContext.js.map +1 -1
  80. package/dist/components/form/engine/compactRowStyles.d.ts +59 -22
  81. package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
  82. package/dist/components/form/engine/compactRowStyles.js +102 -55
  83. package/dist/components/form/engine/compactRowStyles.js.map +1 -1
  84. package/dist/components/form/engine/compactToolbarColors.d.ts +16 -0
  85. package/dist/components/form/engine/compactToolbarColors.d.ts.map +1 -0
  86. package/dist/components/form/engine/compactToolbarColors.js +21 -0
  87. package/dist/components/form/engine/compactToolbarColors.js.map +1 -0
  88. package/dist/components/form/engine/inheritProps.d.ts +29 -0
  89. package/dist/components/form/engine/inheritProps.d.ts.map +1 -0
  90. package/dist/components/form/engine/inheritProps.js +43 -0
  91. package/dist/components/form/engine/inheritProps.js.map +1 -0
  92. package/dist/components/form/engine/operatorSummary.d.ts +26 -0
  93. package/dist/components/form/engine/operatorSummary.d.ts.map +1 -0
  94. package/dist/components/form/engine/operatorSummary.js +35 -0
  95. package/dist/components/form/engine/operatorSummary.js.map +1 -0
  96. package/dist/components/form/engine/readFirst.d.ts +24 -8
  97. package/dist/components/form/engine/readFirst.d.ts.map +1 -1
  98. package/dist/components/form/engine/readFirst.js +77 -109
  99. package/dist/components/form/engine/readFirst.js.map +1 -1
  100. package/dist/components/form/engine/readFirstColors.d.ts +30 -0
  101. package/dist/components/form/engine/readFirstColors.d.ts.map +1 -0
  102. package/dist/components/form/engine/readFirstColors.js +51 -0
  103. package/dist/components/form/engine/readFirstColors.js.map +1 -0
  104. package/dist/components/form/engine/rowFocus.d.ts +2 -0
  105. package/dist/components/form/engine/rowFocus.d.ts.map +1 -1
  106. package/dist/components/form/engine/rowFocus.js +26 -3
  107. package/dist/components/form/engine/rowFocus.js.map +1 -1
  108. package/dist/components/form/engine/typeChoices.d.ts +1 -1
  109. package/dist/components/form/engine/variants/VariantCalmTable.d.ts.map +1 -1
  110. package/dist/components/form/engine/variants/VariantCalmTable.js +2 -1
  111. package/dist/components/form/engine/variants/VariantCalmTable.js.map +1 -1
  112. package/dist/components/form/engine/variants/VariantCards.d.ts.map +1 -1
  113. package/dist/components/form/engine/variants/VariantCards.js +2 -1
  114. package/dist/components/form/engine/variants/VariantCards.js.map +1 -1
  115. package/dist/components/form/engine/variants/VariantFocus.js +1 -1
  116. package/dist/components/form/engine/variants/VariantFocus.js.map +1 -1
  117. package/dist/components/form/engine/variants/VariantMinimal.d.ts.map +1 -1
  118. package/dist/components/form/engine/variants/VariantMinimal.js +2 -1
  119. package/dist/components/form/engine/variants/VariantMinimal.js.map +1 -1
  120. package/dist/components/form/engine/variants/variantParts.d.ts +1 -1
  121. package/dist/components/form/engine/variants/variantParts.d.ts.map +1 -1
  122. package/dist/components/form/engine/variants/variantParts.js +25 -17
  123. package/dist/components/form/engine/variants/variantParts.js.map +1 -1
  124. package/dist/components/form/expressions/DpqlRendering.d.ts +1 -1
  125. package/dist/components/form/expressions/DpqlRendering.d.ts.map +1 -1
  126. package/dist/components/form/expressions/DpqlRendering.js +7 -6
  127. package/dist/components/form/expressions/DpqlRendering.js.map +1 -1
  128. package/dist/components/form/expressions/ExpressionField.d.ts +67 -3
  129. package/dist/components/form/expressions/ExpressionField.d.ts.map +1 -1
  130. package/dist/components/form/expressions/ExpressionField.js +536 -114
  131. package/dist/components/form/expressions/ExpressionField.js.map +1 -1
  132. package/dist/components/form/expressions/argumentPresence.d.ts +14 -0
  133. package/dist/components/form/expressions/argumentPresence.d.ts.map +1 -1
  134. package/dist/components/form/expressions/argumentPresence.js +16 -1
  135. package/dist/components/form/expressions/argumentPresence.js.map +1 -1
  136. package/dist/components/form/expressions/builder/argumentDetail.d.ts.map +1 -1
  137. package/dist/components/form/expressions/builder/argumentDetail.js +4 -1
  138. package/dist/components/form/expressions/builder/argumentDetail.js.map +1 -1
  139. package/dist/components/form/expressions/builder/argumentLabel.d.ts.map +1 -1
  140. package/dist/components/form/expressions/builder/argumentLabel.js +30 -11
  141. package/dist/components/form/expressions/builder/argumentLabel.js.map +1 -1
  142. package/dist/components/form/expressions/builder/argumentWrapper.d.ts.map +1 -1
  143. package/dist/components/form/expressions/builder/argumentWrapper.js +3 -1
  144. package/dist/components/form/expressions/builder/argumentWrapper.js.map +1 -1
  145. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.d.ts +9 -0
  146. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.d.ts.map +1 -1
  147. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js +30 -27
  148. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js.map +1 -1
  149. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.d.ts +1 -1
  150. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.d.ts.map +1 -1
  151. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js +7 -5
  152. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js.map +1 -1
  153. package/dist/components/form/expressions/builder/index.d.ts +34 -2
  154. package/dist/components/form/expressions/builder/index.d.ts.map +1 -1
  155. package/dist/components/form/expressions/builder/index.js +170 -80
  156. package/dist/components/form/expressions/builder/index.js.map +1 -1
  157. package/dist/components/form/expressions/builder/item.d.ts +6 -2
  158. package/dist/components/form/expressions/builder/item.d.ts.map +1 -1
  159. package/dist/components/form/expressions/builder/item.js +19 -5
  160. package/dist/components/form/expressions/builder/item.js.map +1 -1
  161. package/dist/components/form/expressions/builder/renderTemplate.js +1 -1
  162. package/dist/components/form/expressions/builder/renderTemplate.js.map +1 -1
  163. package/dist/components/form/expressions/dpqlMockRecordPath.d.ts +11 -0
  164. package/dist/components/form/expressions/dpqlMockRecordPath.d.ts.map +1 -0
  165. package/dist/components/form/expressions/dpqlMockRecordPath.js +254 -0
  166. package/dist/components/form/expressions/dpqlMockRecordPath.js.map +1 -0
  167. package/dist/components/form/expressions/expressionOperands.d.ts +16 -0
  168. package/dist/components/form/expressions/expressionOperands.d.ts.map +1 -0
  169. package/dist/components/form/expressions/expressionOperands.js +97 -0
  170. package/dist/components/form/expressions/expressionOperands.js.map +1 -0
  171. package/dist/components/form/expressions/fieldPath.d.ts +24 -0
  172. package/dist/components/form/expressions/fieldPath.d.ts.map +1 -0
  173. package/dist/components/form/expressions/fieldPath.js +152 -0
  174. package/dist/components/form/expressions/fieldPath.js.map +1 -0
  175. package/dist/components/form/expressions/loneValue.d.ts +17 -0
  176. package/dist/components/form/expressions/loneValue.d.ts.map +1 -0
  177. package/dist/components/form/expressions/loneValue.js +33 -0
  178. package/dist/components/form/expressions/loneValue.js.map +1 -0
  179. package/dist/components/form/expressions/mockExpressions.d.ts.map +1 -1
  180. package/dist/components/form/expressions/mockExpressions.js +22 -5
  181. package/dist/components/form/expressions/mockExpressions.js.map +1 -1
  182. package/dist/components/form/expressions/renderExpressionToText.d.ts +2 -0
  183. package/dist/components/form/expressions/renderExpressionToText.d.ts.map +1 -1
  184. package/dist/components/form/expressions/renderExpressionToText.js +43 -10
  185. package/dist/components/form/expressions/renderExpressionToText.js.map +1 -1
  186. package/dist/components/form/expressions/textOfExpression.d.ts +18 -0
  187. package/dist/components/form/expressions/textOfExpression.d.ts.map +1 -0
  188. package/dist/components/form/expressions/textOfExpression.js +49 -0
  189. package/dist/components/form/expressions/textOfExpression.js.map +1 -0
  190. package/dist/components/form/expressions/types.d.ts +12 -0
  191. package/dist/components/form/expressions/types.d.ts.map +1 -1
  192. package/dist/components/form/expressions/types.js +6 -1
  193. package/dist/components/form/expressions/types.js.map +1 -1
  194. package/dist/components/form/expressions/useExpressionType.d.ts +26 -0
  195. package/dist/components/form/expressions/useExpressionType.d.ts.map +1 -0
  196. package/dist/components/form/expressions/useExpressionType.js +181 -0
  197. package/dist/components/form/expressions/useExpressionType.js.map +1 -0
  198. package/dist/components/form/expressions/useRenderExpression.d.ts.map +1 -1
  199. package/dist/components/form/expressions/useRenderExpression.js +13 -9
  200. package/dist/components/form/expressions/useRenderExpression.js.map +1 -1
  201. package/dist/components/form/expressions/wildcardExpressions.d.ts +27 -0
  202. package/dist/components/form/expressions/wildcardExpressions.d.ts.map +1 -0
  203. package/dist/components/form/expressions/wildcardExpressions.js +101 -0
  204. package/dist/components/form/expressions/wildcardExpressions.js.map +1 -0
  205. package/dist/components/form/fields/Field.d.ts.map +1 -1
  206. package/dist/components/form/fields/Field.js +43 -20
  207. package/dist/components/form/fields/Field.js.map +1 -1
  208. package/dist/components/form/fields/allowed-values/AllowedValues.d.ts.map +1 -1
  209. package/dist/components/form/fields/allowed-values/AllowedValues.js +39 -6
  210. package/dist/components/form/fields/allowed-values/AllowedValues.js.map +1 -1
  211. package/dist/components/form/fields/allowed-values/choicePicture.d.ts +37 -0
  212. package/dist/components/form/fields/allowed-values/choicePicture.d.ts.map +1 -0
  213. package/dist/components/form/fields/allowed-values/choicePicture.js +64 -0
  214. package/dist/components/form/fields/allowed-values/choicePicture.js.map +1 -0
  215. package/dist/components/form/fields/array/ArrayAuto.d.ts.map +1 -1
  216. package/dist/components/form/fields/array/ArrayAuto.js +24 -0
  217. package/dist/components/form/fields/array/ArrayAuto.js.map +1 -1
  218. package/dist/components/form/fields/array/ArrayAutoField.d.ts.map +1 -1
  219. package/dist/components/form/fields/array/ArrayAutoField.js +36 -13
  220. package/dist/components/form/fields/array/ArrayAutoField.js.map +1 -1
  221. package/dist/components/form/fields/auto/AutoFormField.d.ts +30 -1
  222. package/dist/components/form/fields/auto/AutoFormField.d.ts.map +1 -1
  223. package/dist/components/form/fields/auto/AutoFormField.js +119 -62
  224. package/dist/components/form/fields/auto/AutoFormField.js.map +1 -1
  225. package/dist/components/form/fields/auto/hostEditorValue.d.ts +30 -0
  226. package/dist/components/form/fields/auto/hostEditorValue.d.ts.map +1 -0
  227. package/dist/components/form/fields/auto/hostEditorValue.js +53 -0
  228. package/dist/components/form/fields/auto/hostEditorValue.js.map +1 -0
  229. package/dist/components/form/fields/binary/Binary.d.ts.map +1 -1
  230. package/dist/components/form/fields/binary/Binary.js +23 -3
  231. package/dist/components/form/fields/binary/Binary.js.map +1 -1
  232. package/dist/components/form/fields/boolean/Boolean.d.ts +5 -0
  233. package/dist/components/form/fields/boolean/Boolean.d.ts.map +1 -1
  234. package/dist/components/form/fields/boolean/Boolean.js +9 -1
  235. package/dist/components/form/fields/boolean/Boolean.js.map +1 -1
  236. package/dist/components/form/fields/color/Color.d.ts +103 -16
  237. package/dist/components/form/fields/color/Color.d.ts.map +1 -1
  238. package/dist/components/form/fields/color/Color.js +616 -16
  239. package/dist/components/form/fields/color/Color.js.map +1 -1
  240. package/dist/components/form/fields/emittedValues.d.ts +34 -3
  241. package/dist/components/form/fields/emittedValues.d.ts.map +1 -1
  242. package/dist/components/form/fields/emittedValues.js +24 -1
  243. package/dist/components/form/fields/emittedValues.js.map +1 -1
  244. package/dist/components/form/fields/file/File.d.ts +1 -1
  245. package/dist/components/form/fields/file/File.d.ts.map +1 -1
  246. package/dist/components/form/fields/file/File.js +4 -2
  247. package/dist/components/form/fields/file/File.js.map +1 -1
  248. package/dist/components/form/fields/long-string/LongString.d.ts.map +1 -1
  249. package/dist/components/form/fields/long-string/LongString.js +29 -8
  250. package/dist/components/form/fields/long-string/LongString.js.map +1 -1
  251. package/dist/components/form/fields/markdown/MarkdownView.js +1 -1
  252. package/dist/components/form/fields/multi-select/MultiSelectFormField.d.ts.map +1 -1
  253. package/dist/components/form/fields/multi-select/MultiSelectFormField.js +13 -9
  254. package/dist/components/form/fields/multi-select/MultiSelectFormField.js.map +1 -1
  255. package/dist/components/form/fields/number/Number.d.ts +6 -0
  256. package/dist/components/form/fields/number/Number.d.ts.map +1 -1
  257. package/dist/components/form/fields/number/Number.js +41 -6
  258. package/dist/components/form/fields/number/Number.js.map +1 -1
  259. package/dist/components/form/fields/object/Object.d.ts +1 -1
  260. package/dist/components/form/fields/object/Object.d.ts.map +1 -1
  261. package/dist/components/form/fields/object/Object.js +4 -2
  262. package/dist/components/form/fields/object/Object.js.map +1 -1
  263. package/dist/components/form/fields/pendingEdit.d.ts +52 -0
  264. package/dist/components/form/fields/pendingEdit.d.ts.map +1 -0
  265. package/dist/components/form/fields/pendingEdit.js +79 -0
  266. package/dist/components/form/fields/pendingEdit.js.map +1 -0
  267. package/dist/components/form/fields/radio-group/RadioGroup.d.ts.map +1 -1
  268. package/dist/components/form/fields/radio-group/RadioGroup.js +4 -3
  269. package/dist/components/form/fields/radio-group/RadioGroup.js.map +1 -1
  270. package/dist/components/form/fields/rich-text/RichText.d.ts +20 -1
  271. package/dist/components/form/fields/rich-text/RichText.d.ts.map +1 -1
  272. package/dist/components/form/fields/rich-text/RichText.js +382 -91
  273. package/dist/components/form/fields/rich-text/RichText.js.map +1 -1
  274. package/dist/components/form/fields/rich-text/useTemplateTags.d.ts +18 -0
  275. package/dist/components/form/fields/rich-text/useTemplateTags.d.ts.map +1 -0
  276. package/dist/components/form/fields/rich-text/useTemplateTags.js +80 -0
  277. package/dist/components/form/fields/rich-text/useTemplateTags.js.map +1 -0
  278. package/dist/components/form/fields/schema-definition/CatalogLeafForm.d.ts.map +1 -1
  279. package/dist/components/form/fields/schema-definition/CatalogLeafForm.js +4 -1
  280. package/dist/components/form/fields/schema-definition/CatalogLeafForm.js.map +1 -1
  281. package/dist/components/form/fields/schema-definition/CatalogNodeEditor.d.ts.map +1 -1
  282. package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js +20 -5
  283. package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js.map +1 -1
  284. package/dist/components/form/fields/schema-definition/TableEditor.d.ts.map +1 -1
  285. package/dist/components/form/fields/schema-definition/TableEditor.js +10 -2
  286. package/dist/components/form/fields/schema-definition/TableEditor.js.map +1 -1
  287. package/dist/components/form/fields/schema-definition/index.d.ts.map +1 -1
  288. package/dist/components/form/fields/schema-definition/index.js +8 -4
  289. package/dist/components/form/fields/schema-definition/index.js.map +1 -1
  290. package/dist/components/form/fields/select/Select.d.ts +10 -1
  291. package/dist/components/form/fields/select/Select.d.ts.map +1 -1
  292. package/dist/components/form/fields/select/Select.js +28 -14
  293. package/dist/components/form/fields/select/Select.js.map +1 -1
  294. package/dist/components/form/fields/select/SelectCollection.d.ts +5 -0
  295. package/dist/components/form/fields/select/SelectCollection.d.ts.map +1 -1
  296. package/dist/components/form/fields/select/SelectCollection.js +25 -12
  297. package/dist/components/form/fields/select/SelectCollection.js.map +1 -1
  298. package/dist/components/form/fields/select/unavailableRow.d.ts +23 -0
  299. package/dist/components/form/fields/select/unavailableRow.d.ts.map +1 -0
  300. package/dist/components/form/fields/select/unavailableRow.js +55 -0
  301. package/dist/components/form/fields/select/unavailableRow.js.map +1 -0
  302. package/dist/components/form/fields/template/ReadOnlyTemplateTag.d.ts +11 -5
  303. package/dist/components/form/fields/template/ReadOnlyTemplateTag.d.ts.map +1 -1
  304. package/dist/components/form/fields/template/ReadOnlyTemplateTag.js +21 -5
  305. package/dist/components/form/fields/template/ReadOnlyTemplateTag.js.map +1 -1
  306. package/dist/components/form/fields/template/TemplateBrowser.d.ts +16 -0
  307. package/dist/components/form/fields/template/TemplateBrowser.d.ts.map +1 -0
  308. package/dist/components/form/fields/template/TemplateBrowser.js +89 -0
  309. package/dist/components/form/fields/template/TemplateBrowser.js.map +1 -0
  310. package/dist/components/form/fields/template/TemplateField.d.ts +105 -1
  311. package/dist/components/form/fields/template/TemplateField.d.ts.map +1 -1
  312. package/dist/components/form/fields/template/TemplateField.js +678 -107
  313. package/dist/components/form/fields/template/TemplateField.js.map +1 -1
  314. package/dist/components/form/fields/template/TemplatePicker.d.ts +54 -0
  315. package/dist/components/form/fields/template/TemplatePicker.d.ts.map +1 -0
  316. package/dist/components/form/fields/template/TemplatePicker.js +451 -0
  317. package/dist/components/form/fields/template/TemplatePicker.js.map +1 -0
  318. package/dist/components/form/fields/template/TemplateText.d.ts +0 -17
  319. package/dist/components/form/fields/template/TemplateText.d.ts.map +1 -1
  320. package/dist/components/form/fields/template/TemplateText.js +22 -16
  321. package/dist/components/form/fields/template/TemplateText.js.map +1 -1
  322. package/dist/components/form/fields/template/referenceNames.d.ts +63 -0
  323. package/dist/components/form/fields/template/referenceNames.d.ts.map +1 -0
  324. package/dist/components/form/fields/template/referenceNames.js +69 -0
  325. package/dist/components/form/fields/template/referenceNames.js.map +1 -0
  326. package/dist/components/form/fields/template/writtenAsText.d.ts +61 -0
  327. package/dist/components/form/fields/template/writtenAsText.d.ts.map +1 -0
  328. package/dist/components/form/fields/template/writtenAsText.js +204 -0
  329. package/dist/components/form/fields/template/writtenAsText.js.map +1 -0
  330. package/dist/components/form/index.d.ts +12 -0
  331. package/dist/components/form/index.d.ts.map +1 -1
  332. package/dist/components/form/index.js +25 -1
  333. package/dist/components/form/index.js.map +1 -1
  334. package/dist/components/form/typeSentenceForm.d.ts +17 -0
  335. package/dist/components/form/typeSentenceForm.d.ts.map +1 -0
  336. package/dist/components/form/typeSentenceForm.js +54 -0
  337. package/dist/components/form/typeSentenceForm.js.map +1 -0
  338. package/dist/components/imageLightbox/ImageLightbox.d.ts.map +1 -1
  339. package/dist/components/imageLightbox/ImageLightbox.js +19 -7
  340. package/dist/components/imageLightbox/ImageLightbox.js.map +1 -1
  341. package/dist/components/log/Log.d.ts.map +1 -1
  342. package/dist/components/log/Log.js +20 -8
  343. package/dist/components/log/Log.js.map +1 -1
  344. package/dist/components/menu/Menu.d.ts.map +1 -1
  345. package/dist/components/menu/Menu.js +19 -10
  346. package/dist/components/menu/Menu.js.map +1 -1
  347. package/dist/components/smartEditor/CompletionMenu.d.ts +53 -0
  348. package/dist/components/smartEditor/CompletionMenu.d.ts.map +1 -0
  349. package/dist/components/smartEditor/CompletionMenu.js +302 -0
  350. package/dist/components/smartEditor/CompletionMenu.js.map +1 -0
  351. package/dist/components/smartEditor/MarkdownDoc.d.ts +1 -1
  352. package/dist/components/smartEditor/MarkdownDoc.js +3 -3
  353. package/dist/components/smartEditor/MarkdownDoc.js.map +1 -1
  354. package/dist/components/smartEditor/SmartEditor.d.ts.map +1 -1
  355. package/dist/components/smartEditor/SmartEditor.js +584 -190
  356. package/dist/components/smartEditor/SmartEditor.js.map +1 -1
  357. package/dist/components/smartEditor/completionStyle.d.ts +28 -0
  358. package/dist/components/smartEditor/completionStyle.d.ts.map +1 -0
  359. package/dist/components/smartEditor/completionStyle.js +79 -0
  360. package/dist/components/smartEditor/completionStyle.js.map +1 -0
  361. package/dist/components/smartEditor/contextTitle.d.ts +10 -0
  362. package/dist/components/smartEditor/contextTitle.d.ts.map +1 -0
  363. package/dist/components/smartEditor/contextTitle.js +21 -0
  364. package/dist/components/smartEditor/contextTitle.js.map +1 -0
  365. package/dist/components/smartEditor/editingAids.d.ts +64 -0
  366. package/dist/components/smartEditor/editingAids.d.ts.map +1 -0
  367. package/dist/components/smartEditor/editingAids.js +213 -0
  368. package/dist/components/smartEditor/editingAids.js.map +1 -0
  369. package/dist/components/smartEditor/index.d.ts +6 -1
  370. package/dist/components/smartEditor/index.d.ts.map +1 -1
  371. package/dist/components/smartEditor/index.js +19 -1
  372. package/dist/components/smartEditor/index.js.map +1 -1
  373. package/dist/components/smartEditor/templateCompletions.d.ts +98 -0
  374. package/dist/components/smartEditor/templateCompletions.d.ts.map +1 -0
  375. package/dist/components/smartEditor/templateCompletions.js +380 -0
  376. package/dist/components/smartEditor/templateCompletions.js.map +1 -0
  377. package/dist/components/smartEditor/typedReferences.d.ts +34 -0
  378. package/dist/components/smartEditor/typedReferences.d.ts.map +1 -0
  379. package/dist/components/smartEditor/typedReferences.js +179 -0
  380. package/dist/components/smartEditor/typedReferences.js.map +1 -0
  381. package/dist/components/smartEditor/types.d.ts +116 -2
  382. package/dist/components/smartEditor/types.d.ts.map +1 -1
  383. package/dist/components/smartEditor/useEditingAids.d.ts +38 -0
  384. package/dist/components/smartEditor/useEditingAids.d.ts.map +1 -0
  385. package/dist/components/smartEditor/useEditingAids.js +336 -0
  386. package/dist/components/smartEditor/useEditingAids.js.map +1 -0
  387. package/dist/components/smartEditor/useLspAutocomplete.d.ts +106 -3
  388. package/dist/components/smartEditor/useLspAutocomplete.d.ts.map +1 -1
  389. package/dist/components/smartEditor/useLspAutocomplete.js +562 -151
  390. package/dist/components/smartEditor/useLspAutocomplete.js.map +1 -1
  391. package/dist/components/smartEditor/useLspHover.d.ts +33 -7
  392. package/dist/components/smartEditor/useLspHover.d.ts.map +1 -1
  393. package/dist/components/smartEditor/useLspHover.js +364 -35
  394. package/dist/components/smartEditor/useLspHover.js.map +1 -1
  395. package/dist/components/smartEditor/useLspSemanticTokens.js +1 -1
  396. package/dist/components/smartEditor/useLspSemanticTokens.js.map +1 -1
  397. package/dist/components/smartEditor/useLspSession.d.ts +6 -0
  398. package/dist/components/smartEditor/useLspSession.d.ts.map +1 -1
  399. package/dist/components/smartEditor/useLspSession.js +7 -6
  400. package/dist/components/smartEditor/useLspSession.js.map +1 -1
  401. package/dist/components/smartEditor/useLspSignatureHelp.d.ts.map +1 -1
  402. package/dist/components/smartEditor/useLspSignatureHelp.js +6 -11
  403. package/dist/components/smartEditor/useLspSignatureHelp.js.map +1 -1
  404. package/dist/components/smartEditor/useTabCameIn.d.ts +10 -0
  405. package/dist/components/smartEditor/useTabCameIn.d.ts.map +1 -0
  406. package/dist/components/smartEditor/useTabCameIn.js +42 -0
  407. package/dist/components/smartEditor/useTabCameIn.js.map +1 -0
  408. package/dist/components/supportTicket/AttachmentChips.d.ts.map +1 -1
  409. package/dist/components/supportTicket/AttachmentChips.js +15 -5
  410. package/dist/components/supportTicket/AttachmentChips.js.map +1 -1
  411. package/dist/components/supportTicket/ReferencePicker.d.ts +9 -2
  412. package/dist/components/supportTicket/ReferencePicker.d.ts.map +1 -1
  413. package/dist/components/supportTicket/ReferencePicker.js +27 -6
  414. package/dist/components/supportTicket/ReferencePicker.js.map +1 -1
  415. package/dist/components/supportTicket/TicketHeader.d.ts +3 -4
  416. package/dist/components/supportTicket/TicketHeader.d.ts.map +1 -1
  417. package/dist/components/supportTicket/TicketHeader.js +20 -2
  418. package/dist/components/supportTicket/TicketHeader.js.map +1 -1
  419. package/dist/components/supportTicket/TicketMetaTags.d.ts +1 -1
  420. package/dist/components/ticketReferences/TicketReferences.d.ts.map +1 -1
  421. package/dist/components/ticketReferences/TicketReferences.js +9 -4
  422. package/dist/components/ticketReferences/TicketReferences.js.map +1 -1
  423. package/dist/components/ticketThread/TicketThread.d.ts.map +1 -1
  424. package/dist/components/ticketThread/TicketThread.js +38 -13
  425. package/dist/components/ticketThread/TicketThread.js.map +1 -1
  426. package/dist/helpers/allowedValues.d.ts +21 -0
  427. package/dist/helpers/allowedValues.d.ts.map +1 -1
  428. package/dist/helpers/allowedValues.js +40 -1
  429. package/dist/helpers/allowedValues.js.map +1 -1
  430. package/dist/helpers/descriptionTooltip.d.ts +46 -0
  431. package/dist/helpers/descriptionTooltip.d.ts.map +1 -0
  432. package/dist/helpers/descriptionTooltip.js +76 -0
  433. package/dist/helpers/descriptionTooltip.js.map +1 -0
  434. package/dist/helpers/domProps.d.ts +5 -0
  435. package/dist/helpers/domProps.d.ts.map +1 -0
  436. package/dist/helpers/domProps.js +47 -0
  437. package/dist/helpers/domProps.js.map +1 -0
  438. package/dist/helpers/expressions.d.ts +115 -4
  439. package/dist/helpers/expressions.d.ts.map +1 -1
  440. package/dist/helpers/expressions.js +247 -29
  441. package/dist/helpers/expressions.js.map +1 -1
  442. package/dist/helpers/hoveringPointer.d.ts +26 -0
  443. package/dist/helpers/hoveringPointer.d.ts.map +1 -0
  444. package/dist/helpers/hoveringPointer.js +29 -0
  445. package/dist/helpers/hoveringPointer.js.map +1 -0
  446. package/dist/helpers/markdownText.d.ts +14 -0
  447. package/dist/helpers/markdownText.d.ts.map +1 -0
  448. package/dist/helpers/markdownText.js +160 -0
  449. package/dist/helpers/markdownText.js.map +1 -0
  450. package/dist/helpers/noDescription.d.ts +9 -0
  451. package/dist/helpers/noDescription.d.ts.map +1 -0
  452. package/dist/helpers/noDescription.js +13 -0
  453. package/dist/helpers/noDescription.js.map +1 -0
  454. package/dist/helpers/optionUiTypes.d.ts +2 -2
  455. package/dist/helpers/qorusTypeCatalogue.d.ts +147 -0
  456. package/dist/helpers/qorusTypeCatalogue.d.ts.map +1 -0
  457. package/dist/helpers/qorusTypeCatalogue.js +505 -0
  458. package/dist/helpers/qorusTypeCatalogue.js.map +1 -0
  459. package/dist/helpers/readableColors.d.ts +36 -0
  460. package/dist/helpers/readableColors.d.ts.map +1 -0
  461. package/dist/helpers/readableColors.js +116 -0
  462. package/dist/helpers/readableColors.js.map +1 -0
  463. package/dist/helpers/recordFieldReference.d.ts +15 -0
  464. package/dist/helpers/recordFieldReference.d.ts.map +1 -0
  465. package/dist/helpers/recordFieldReference.js +89 -0
  466. package/dist/helpers/recordFieldReference.js.map +1 -0
  467. package/dist/helpers/templateCatalogue.d.ts +104 -0
  468. package/dist/helpers/templateCatalogue.d.ts.map +1 -0
  469. package/dist/helpers/templateCatalogue.js +116 -0
  470. package/dist/helpers/templateCatalogue.js.map +1 -0
  471. package/dist/helpers/templateCatalogueContext.d.ts +19 -0
  472. package/dist/helpers/templateCatalogueContext.d.ts.map +1 -0
  473. package/dist/helpers/templateCatalogueContext.js +31 -0
  474. package/dist/helpers/templateCatalogueContext.js.map +1 -0
  475. package/dist/helpers/templateItems.d.ts +2 -2
  476. package/dist/helpers/templateItems.d.ts.map +1 -1
  477. package/dist/helpers/templateItems.js +6 -4
  478. package/dist/helpers/templateItems.js.map +1 -1
  479. package/dist/helpers/templateText.d.ts +1 -0
  480. package/dist/helpers/templateText.d.ts.map +1 -1
  481. package/dist/helpers/templateText.js +7 -3
  482. package/dist/helpers/templateText.js.map +1 -1
  483. package/dist/helpers/templateTree.d.ts +248 -0
  484. package/dist/helpers/templateTree.d.ts.map +1 -0
  485. package/dist/helpers/templateTree.js +892 -0
  486. package/dist/helpers/templateTree.js.map +1 -0
  487. package/dist/helpers/templateType.d.ts +28 -0
  488. package/dist/helpers/templateType.d.ts.map +1 -0
  489. package/dist/helpers/templateType.js +30 -0
  490. package/dist/helpers/templateType.js.map +1 -0
  491. package/dist/helpers/templates.d.ts +86 -16
  492. package/dist/helpers/templates.d.ts.map +1 -1
  493. package/dist/helpers/templates.js +305 -45
  494. package/dist/helpers/templates.js.map +1 -1
  495. package/dist/helpers/validations.d.ts +27 -0
  496. package/dist/helpers/validations.d.ts.map +1 -1
  497. package/dist/helpers/validations.js +169 -39
  498. package/dist/helpers/validations.js.map +1 -1
  499. package/dist/helpers/webLink.d.ts +8 -0
  500. package/dist/helpers/webLink.d.ts.map +1 -0
  501. package/dist/helpers/webLink.js +29 -0
  502. package/dist/helpers/webLink.js.map +1 -0
  503. package/dist/hooks/useQorusTypes.d.ts +12 -17
  504. package/dist/hooks/useQorusTypes.d.ts.map +1 -1
  505. package/dist/hooks/useQorusTypes.js +44 -172
  506. package/dist/hooks/useQorusTypes.js.map +1 -1
  507. package/dist/hooks/useReadableIntentShade.d.ts +9 -0
  508. package/dist/hooks/useReadableIntentShade.d.ts.map +1 -0
  509. package/dist/hooks/useReadableIntentShade.js +23 -0
  510. package/dist/hooks/useReadableIntentShade.js.map +1 -0
  511. package/dist/hooks/useReadableOpacity.d.ts +6 -0
  512. package/dist/hooks/useReadableOpacity.d.ts.map +1 -0
  513. package/dist/hooks/useReadableOpacity.js +17 -0
  514. package/dist/hooks/useReadableOpacity.js.map +1 -0
  515. package/dist/index.d.ts +8 -0
  516. package/dist/index.d.ts.map +1 -1
  517. package/dist/index.js +24 -1
  518. package/dist/index.js.map +1 -1
  519. package/dist/tracking/ui/ExperimentCard.d.ts +1 -1
  520. package/dist/tracking/ui/ExperimentCard.d.ts.map +1 -1
  521. package/dist/tracking/ui/ExperimentCard.js +26 -10
  522. package/dist/tracking/ui/ExperimentCard.js.map +1 -1
  523. package/dist/tracking/ui/card.d.ts +2 -2
  524. package/dist/tracking/ui/card.d.ts.map +1 -1
  525. package/dist/tracking/ui/card.js +2 -2
  526. package/dist/tracking/ui/card.js.map +1 -1
  527. package/dist/tracking/ui/readable.d.ts +14 -0
  528. package/dist/tracking/ui/readable.d.ts.map +1 -0
  529. package/dist/tracking/ui/readable.js +60 -0
  530. package/dist/tracking/ui/readable.js.map +1 -0
  531. package/dist/utils/fetch.d.ts +9 -2
  532. package/dist/utils/fetch.d.ts.map +1 -1
  533. package/dist/utils/fetch.js +6 -5
  534. package/dist/utils/fetch.js.map +1 -1
  535. package/dist/utils/lspClient.types.d.ts +2 -0
  536. package/dist/utils/lspClient.types.d.ts.map +1 -1
  537. package/dist/utils/websocket.d.ts +65 -2
  538. package/dist/utils/websocket.d.ts.map +1 -1
  539. package/dist/utils/websocket.js +276 -44
  540. package/dist/utils/websocket.js.map +1 -1
  541. package/package.json +14 -6
  542. package/.claude/CLAUDE.md +0 -317
  543. package/.tasks/EXPORT_EXPRESSION_BUILDER.md +0 -38
  544. package/.tasks/EXPRESSION_BUILDER_REPORT.md +0 -149
  545. package/.tasks/EXPRESSION_FIELD_SEAMS.md +0 -66
  546. package/.tasks/FIELD_STACK_REPORT.md +0 -234
  547. package/.tasks/FORM_ENGINE_COMPACT_READ_FIRST.md +0 -558
  548. package/.tasks/FORM_ENGINE_EXPRESSIONS.md +0 -197
  549. package/.tasks/FORM_ENGINE_OPTIONS_SYNC.md +0 -95
  550. package/.tasks/FORM_FIELD_EXTRAS.md +0 -72
  551. package/.tasks/INDEX.md +0 -111
  552. package/.tasks/LSP_SHARED_CONNECTION.md +0 -75
  553. package/.tasks/QONSOLE_ASSIST_FEATURES.md +0 -306
  554. package/.tasks/RENDER_EXPRESSION_LSP.md +0 -159
  555. package/.tasks/REQRAFT_AUTO_FIELD.md +0 -176
  556. package/.tasks/SCHEMA_DEFINITION_FIELD.md +0 -250
  557. package/.tasks/SMART_EDITOR_CONTEXT_AND_POLISH.md +0 -340
  558. package/.tasks/SMART_EDITOR_LSP_FEATURES.md +0 -299
  559. package/.tasks/SMART_EDITOR_REVIEW_FOLLOWUPS.md +0 -280
  560. package/.tasks/SMART_EDITOR_UX_POLISH.md +0 -383
  561. package/.tasks/SMART_EDITOR_VISUAL_POLISH.md +0 -246
  562. package/.tasks/STORY_NETWORK_ISOLATION.md +0 -98
  563. package/.tasks/TEMPLATE_TOKEN_GRAMMAR.md +0 -72
  564. package/CODE_OF_CONDUCT.md +0 -105
  565. package/CONTRIBUTING.MD +0 -78
  566. package/SECURITY.md +0 -3
  567. package/chromatic.config.json +0 -5
  568. package/design/COMPACT_ENGINE_REDESIGN.md +0 -156
  569. package/design/COMPACT_INFO_DISPLAY.md +0 -87
  570. package/design/COMPACT_PARITY.md +0 -85
  571. package/design/EXPRESSION_BUILDER_REPORT_STRATEGY.md +0 -92
  572. package/design/FORM_ENGINE_COMPACT.md +0 -300
  573. package/design/FORM_ENGINE_COMPACT_UX_PLAN.md +0 -353
  574. package/design/FORM_ENGINE_EXPRESSIONS.md +0 -257
  575. package/design/FORM_ENGINE_FIELD_MIGRATION.md +0 -419
  576. package/design/IDE_INTEGRATION.md +0 -64
  577. package/design/RENDER_EXPRESSION_TRANSPORT.md +0 -156
  578. package/design/SELECT_DIALOG_FLOOR.md +0 -86
  579. package/design/SMART_EDITOR_UX.md +0 -438
  580. package/design/TRACKING.md +0 -290
  581. package/design/UNAVAILABLE_ALLOWED_VALUES.md +0 -226
  582. package/src/components/Description/index.tsx +0 -254
  583. package/src/components/Description/markdownRendererContext.tsx +0 -29
  584. package/src/components/FocusedEditing/index.tsx +0 -50
  585. package/src/components/codeSize/index.tsx +0 -79
  586. package/src/components/composer/Composer.stories.tsx +0 -238
  587. package/src/components/composer/Composer.tsx +0 -554
  588. package/src/components/composer/helpers.ts +0 -74
  589. package/src/components/composer/index.ts +0 -2
  590. package/src/components/dpqlEditor/DpqlEditor.stories.tsx +0 -1183
  591. package/src/components/dpqlEditor/DpqlEditor.tsx +0 -219
  592. package/src/components/dpqlEditor/dpqlHelpers.ts +0 -287
  593. package/src/components/dpqlEditor/dpqlInserter.ts +0 -121
  594. package/src/components/dpqlEditor/dpqlProbe.ts +0 -165
  595. package/src/components/dpqlEditor/dpqlTags.ts +0 -114
  596. package/src/components/dpqlEditor/index.ts +0 -41
  597. package/src/components/dpqlEditor/types.ts +0 -203
  598. package/src/components/dpqlEditor/useDpqlProbe.ts +0 -33
  599. package/src/components/dpqlEditor/useDpqlSession.ts +0 -411
  600. package/src/components/form/engine/CompactRow.tsx +0 -2620
  601. package/src/components/form/engine/CompactToolbar.tsx +0 -330
  602. package/src/components/form/engine/FormEngine.stories.tsx +0 -9920
  603. package/src/components/form/engine/FormEngine.tsx +0 -4569
  604. package/src/components/form/engine/FormEngineRemote.stories.tsx +0 -679
  605. package/src/components/form/engine/FormEngineStickyHeaders.stories.tsx +0 -331
  606. package/src/components/form/engine/FormFieldsSkeleton.tsx +0 -82
  607. package/src/components/form/engine/OptionFieldMessages.tsx +0 -477
  608. package/src/components/form/engine/OptionsHelpDialog.tsx +0 -29
  609. package/src/components/form/engine/__fixtures__/basicFormOptions.ts +0 -309
  610. package/src/components/form/engine/__fixtures__/fieldChromeOptions.ts +0 -45
  611. package/src/components/form/engine/_structuredData/SchemaDataView.stories.tsx +0 -233
  612. package/src/components/form/engine/_structuredData/SchemaDataView.tsx +0 -742
  613. package/src/components/form/engine/_structuredData/StructuredDataView.stories.tsx +0 -85
  614. package/src/components/form/engine/_structuredData/StructuredDataView.tsx +0 -75
  615. package/src/components/form/engine/_structuredData/structuredData.ts +0 -145
  616. package/src/components/form/engine/compactRowContext.ts +0 -148
  617. package/src/components/form/engine/compactRowStyles.ts +0 -898
  618. package/src/components/form/engine/compactToolbarContext.ts +0 -69
  619. package/src/components/form/engine/optionActions.ts +0 -128
  620. package/src/components/form/engine/optionsContext.ts +0 -24
  621. package/src/components/form/engine/readFirst.ts +0 -1077
  622. package/src/components/form/engine/rendererTypes.ts +0 -107
  623. package/src/components/form/engine/revealRow.ts +0 -123
  624. package/src/components/form/engine/rowFocus.ts +0 -101
  625. package/src/components/form/engine/rowMenuContext.ts +0 -159
  626. package/src/components/form/engine/rowOpenPicker.ts +0 -27
  627. package/src/components/form/engine/typeChoices.ts +0 -63
  628. package/src/components/form/engine/variants/FormEngineVariants.stories.tsx +0 -159
  629. package/src/components/form/engine/variants/VariantCalmTable.tsx +0 -244
  630. package/src/components/form/engine/variants/VariantCards.tsx +0 -212
  631. package/src/components/form/engine/variants/VariantFocus.tsx +0 -382
  632. package/src/components/form/engine/variants/VariantMinimal.tsx +0 -170
  633. package/src/components/form/engine/variants/focusDemo.ts +0 -145
  634. package/src/components/form/engine/variants/variantModel.ts +0 -223
  635. package/src/components/form/engine/variants/variantParts.tsx +0 -313
  636. package/src/components/form/expressions/DpqlRendering.tsx +0 -85
  637. package/src/components/form/expressions/ExpressionField.stories.tsx +0 -1395
  638. package/src/components/form/expressions/ExpressionField.tsx +0 -503
  639. package/src/components/form/expressions/argumentPresence.ts +0 -213
  640. package/src/components/form/expressions/builder/ExpressionBuilder.stories.tsx +0 -1683
  641. package/src/components/form/expressions/builder/argumentDetail.tsx +0 -17
  642. package/src/components/form/expressions/builder/argumentLabel.tsx +0 -146
  643. package/src/components/form/expressions/builder/argumentSlot.tsx +0 -101
  644. package/src/components/form/expressions/builder/argumentWrapper.tsx +0 -243
  645. package/src/components/form/expressions/builder/confirmMismatchedTypesModal.tsx +0 -120
  646. package/src/components/form/expressions/builder/confirmUnsupportedTypeModal.tsx +0 -69
  647. package/src/components/form/expressions/builder/index.tsx +0 -1545
  648. package/src/components/form/expressions/builder/item.tsx +0 -89
  649. package/src/components/form/expressions/builder/moveToPositionStrip.tsx +0 -156
  650. package/src/components/form/expressions/builder/renderTemplate.tsx +0 -42
  651. package/src/components/form/expressions/dpqlMockLanguage.ts +0 -566
  652. package/src/components/form/expressions/dpqlMockLsp.ts +0 -126
  653. package/src/components/form/expressions/mockExpressions.ts +0 -317
  654. package/src/components/form/expressions/renderExpressionToText.ts +0 -137
  655. package/src/components/form/expressions/types.ts +0 -110
  656. package/src/components/form/expressions/useExpressions.ts +0 -101
  657. package/src/components/form/expressions/useRenderExpression.ts +0 -165
  658. package/src/components/form/fields/Field.stories.tsx +0 -143
  659. package/src/components/form/fields/Field.tsx +0 -732
  660. package/src/components/form/fields/allowed-values/AllowedValues.tsx +0 -297
  661. package/src/components/form/fields/array/ArrayAuto.tsx +0 -237
  662. package/src/components/form/fields/array/ArrayAutoField.stories.tsx +0 -475
  663. package/src/components/form/fields/array/ArrayAutoField.tsx +0 -367
  664. package/src/components/form/fields/auto/AutoFormField.stories.tsx +0 -825
  665. package/src/components/form/fields/auto/AutoFormField.tsx +0 -1164
  666. package/src/components/form/fields/binary/Binary.stories.tsx +0 -122
  667. package/src/components/form/fields/binary/Binary.tsx +0 -91
  668. package/src/components/form/fields/boolean/Boolean.stories.tsx +0 -125
  669. package/src/components/form/fields/boolean/Boolean.tsx +0 -34
  670. package/src/components/form/fields/byte-size/ByteSize.stories.tsx +0 -87
  671. package/src/components/form/fields/byte-size/ByteSize.tsx +0 -58
  672. package/src/components/form/fields/color/Color.stories.tsx +0 -99
  673. package/src/components/form/fields/color/Color.tsx +0 -46
  674. package/src/components/form/fields/cron/Cron.stories.tsx +0 -68
  675. package/src/components/form/fields/cron/Cron.tsx +0 -80
  676. package/src/components/form/fields/date/Date.stories.tsx +0 -77
  677. package/src/components/form/fields/date/Date.tsx +0 -55
  678. package/src/components/form/fields/emittedValues.ts +0 -70
  679. package/src/components/form/fields/file/File.stories.tsx +0 -161
  680. package/src/components/form/fields/file/File.tsx +0 -227
  681. package/src/components/form/fields/long-string/LongString.stories.tsx +0 -120
  682. package/src/components/form/fields/long-string/LongString.tsx +0 -130
  683. package/src/components/form/fields/markdown/Markdown.stories.tsx +0 -76
  684. package/src/components/form/fields/markdown/Markdown.tsx +0 -81
  685. package/src/components/form/fields/markdown/MarkdownView.tsx +0 -222
  686. package/src/components/form/fields/multi-select/MultiSelectFormField.tsx +0 -139
  687. package/src/components/form/fields/number/Number.stories.tsx +0 -159
  688. package/src/components/form/fields/number/Number.tsx +0 -160
  689. package/src/components/form/fields/object/Object.stories.tsx +0 -398
  690. package/src/components/form/fields/object/Object.tsx +0 -255
  691. package/src/components/form/fields/radio-group/RadioGroup.stories.tsx +0 -95
  692. package/src/components/form/fields/radio-group/RadioGroup.tsx +0 -46
  693. package/src/components/form/fields/radio-group/images/java-96x128.png +0 -0
  694. package/src/components/form/fields/radio-group/images/python-129x128.png +0 -0
  695. package/src/components/form/fields/radio-group/images/qore-106x128.png +0 -0
  696. package/src/components/form/fields/rich-text/RichText.stories.tsx +0 -260
  697. package/src/components/form/fields/rich-text/RichText.tsx +0 -537
  698. package/src/components/form/fields/schema-definition/CatalogLeafForm.tsx +0 -242
  699. package/src/components/form/fields/schema-definition/CatalogNodeEditor.tsx +0 -758
  700. package/src/components/form/fields/schema-definition/Hint.tsx +0 -22
  701. package/src/components/form/fields/schema-definition/InlineValidationBanner.tsx +0 -138
  702. package/src/components/form/fields/schema-definition/Loader.tsx +0 -20
  703. package/src/components/form/fields/schema-definition/MigrationsTab.tsx +0 -187
  704. package/src/components/form/fields/schema-definition/SchemaDefinitionField.stories.tsx +0 -286
  705. package/src/components/form/fields/schema-definition/TableEditor.tsx +0 -155
  706. package/src/components/form/fields/schema-definition/TablesTab.tsx +0 -138
  707. package/src/components/form/fields/schema-definition/catalog.ts +0 -237
  708. package/src/components/form/fields/schema-definition/helpers.ts +0 -90
  709. package/src/components/form/fields/schema-definition/index.tsx +0 -418
  710. package/src/components/form/fields/schema-definition/mockCatalog.ts +0 -325
  711. package/src/components/form/fields/schema-definition/mockDefinition.ts +0 -111
  712. package/src/components/form/fields/schema-definition/referenceSuggestions.tsx +0 -152
  713. package/src/components/form/fields/schema-definition/starterTemplate.ts +0 -68
  714. package/src/components/form/fields/schema-definition/types.ts +0 -185
  715. package/src/components/form/fields/schema-definition/useSchemaOptionCatalog.ts +0 -49
  716. package/src/components/form/fields/select/Select.stories.tsx +0 -872
  717. package/src/components/form/fields/select/Select.tsx +0 -624
  718. package/src/components/form/fields/select/SelectCollection.tsx +0 -594
  719. package/src/components/form/fields/string/String.stories.tsx +0 -86
  720. package/src/components/form/fields/string/String.tsx +0 -43
  721. package/src/components/form/fields/template/ExampleValueModal.stories.tsx +0 -114
  722. package/src/components/form/fields/template/ExampleValueModal.tsx +0 -99
  723. package/src/components/form/fields/template/ReadOnlyTemplateTag.tsx +0 -47
  724. package/src/components/form/fields/template/TemplateField.stories.tsx +0 -1121
  725. package/src/components/form/fields/template/TemplateField.tsx +0 -1717
  726. package/src/components/form/fields/template/TemplateText.tsx +0 -115
  727. package/src/components/form/fields/template/__fixtures__/longExampleValue.ts +0 -7
  728. package/src/components/form/fields/template/__fixtures__/multiLevelTemplates.json +0 -147
  729. package/src/components/form/fields/template/__fixtures__/templates.json +0 -83
  730. package/src/components/form/fields/timeout/Timeout.stories.tsx +0 -228
  731. package/src/components/form/fields/timeout/Timeout.tsx +0 -87
  732. package/src/components/form/fields/url/Url.stories.tsx +0 -94
  733. package/src/components/form/fields/url/Url.tsx +0 -85
  734. package/src/components/form/index.tsx +0 -47
  735. package/src/components/imageLightbox/ImageLightbox.stories.tsx +0 -238
  736. package/src/components/imageLightbox/ImageLightbox.tsx +0 -236
  737. package/src/components/imageLightbox/index.ts +0 -1
  738. package/src/components/log/Log.stories.tsx +0 -333
  739. package/src/components/log/Log.tsx +0 -285
  740. package/src/components/menu/Menu.stories.tsx +0 -155
  741. package/src/components/menu/Menu.tsx +0 -312
  742. package/src/components/qonsoleSmartInput/QonsoleSmartInput.stories.tsx +0 -797
  743. package/src/components/qonsoleSmartInput/QonsoleSmartInput.tsx +0 -105
  744. package/src/components/qonsoleSmartInput/index.ts +0 -16
  745. package/src/components/qonsoleSmartInput/qonsoleInserter.ts +0 -77
  746. package/src/components/qonsoleSmartInput/types.ts +0 -133
  747. package/src/components/qonsoleSmartInput/useQonsoleSession.ts +0 -124
  748. package/src/components/searchFilterBar/SearchFilterBar.stories.tsx +0 -62
  749. package/src/components/searchFilterBar/SearchFilterBar.tsx +0 -144
  750. package/src/components/searchFilterBar/index.ts +0 -1
  751. package/src/components/smartEditor/MarkdownDoc.tsx +0 -190
  752. package/src/components/smartEditor/SmartEditor.stories.tsx +0 -475
  753. package/src/components/smartEditor/SmartEditor.tsx +0 -808
  754. package/src/components/smartEditor/__fixtures__/mockLspServer.ts +0 -205
  755. package/src/components/smartEditor/helpers.ts +0 -217
  756. package/src/components/smartEditor/index.ts +0 -35
  757. package/src/components/smartEditor/styling.ts +0 -45
  758. package/src/components/smartEditor/types.ts +0 -211
  759. package/src/components/smartEditor/useLspAutocomplete.ts +0 -758
  760. package/src/components/smartEditor/useLspDiagnosticDecorations.ts +0 -125
  761. package/src/components/smartEditor/useLspHover.ts +0 -230
  762. package/src/components/smartEditor/useLspSemanticTokens.ts +0 -298
  763. package/src/components/smartEditor/useLspSession.ts +0 -231
  764. package/src/components/smartEditor/useLspSignatureHelp.ts +0 -198
  765. package/src/components/supportTicket/AttachmentChips.stories.tsx +0 -171
  766. package/src/components/supportTicket/AttachmentChips.tsx +0 -147
  767. package/src/components/supportTicket/InterfaceReferenceTags.stories.tsx +0 -257
  768. package/src/components/supportTicket/InterfaceReferenceTags.tsx +0 -129
  769. package/src/components/supportTicket/ReferencePicker.stories.tsx +0 -584
  770. package/src/components/supportTicket/ReferencePicker.tsx +0 -563
  771. package/src/components/supportTicket/TicketConversation.stories.tsx +0 -121
  772. package/src/components/supportTicket/TicketHeader.stories.tsx +0 -183
  773. package/src/components/supportTicket/TicketHeader.tsx +0 -247
  774. package/src/components/supportTicket/TicketMetaTags.stories.tsx +0 -103
  775. package/src/components/supportTicket/TicketMetaTags.tsx +0 -85
  776. package/src/components/supportTicket/TicketReplyBox.stories.tsx +0 -354
  777. package/src/components/supportTicket/TicketReplyBox.tsx +0 -150
  778. package/src/components/supportTicket/__fixtures__/kindMarks.ts +0 -28
  779. package/src/components/supportTicket/attachmentAccess.ts +0 -97
  780. package/src/components/supportTicket/fileToAttachment.ts +0 -24
  781. package/src/components/supportTicket/index.ts +0 -10
  782. package/src/components/supportTicket/meta.ts +0 -206
  783. package/src/components/supportTicket/ticketModel.ts +0 -131
  784. package/src/components/supportTicket/useLoadedImages.ts +0 -73
  785. package/src/components/ticketReferences/TicketReferences.stories.tsx +0 -315
  786. package/src/components/ticketReferences/TicketReferences.tsx +0 -906
  787. package/src/components/ticketReferences/index.ts +0 -2
  788. package/src/components/ticketThread/TicketThread.stories.tsx +0 -829
  789. package/src/components/ticketThread/TicketThread.tsx +0 -719
  790. package/src/components/ticketThread/index.ts +0 -6
  791. package/src/contexts/FetchContext.tsx +0 -25
  792. package/src/contexts/ReqraftContext.tsx +0 -9
  793. package/src/contexts/StorageContext.tsx +0 -33
  794. package/src/global.d.ts +0 -4
  795. package/src/helpers/allowedValues.ts +0 -249
  796. package/src/helpers/choiceChip.ts +0 -227
  797. package/src/helpers/common.ts +0 -326
  798. package/src/helpers/dpqlDetection.ts +0 -209
  799. package/src/helpers/expressions.ts +0 -140
  800. package/src/helpers/optionUiTypes.ts +0 -199
  801. package/src/helpers/options.ts +0 -150
  802. package/src/helpers/providerValue.ts +0 -125
  803. package/src/helpers/scrollbar.ts +0 -32
  804. package/src/helpers/singleLineString.ts +0 -61
  805. package/src/helpers/templateItems.ts +0 -81
  806. package/src/helpers/templateText.ts +0 -350
  807. package/src/helpers/templates.ts +0 -602
  808. package/src/helpers/validations.ts +0 -2085
  809. package/src/hooks/useArgSchema.ts +0 -37
  810. package/src/hooks/useCoarsePointer.ts +0 -30
  811. package/src/hooks/useFetch/useFetch.stories.tsx +0 -379
  812. package/src/hooks/useFetch/useFetch.tsx +0 -154
  813. package/src/hooks/usePhoneViewport.ts +0 -34
  814. package/src/hooks/useQorusTypes.ts +0 -233
  815. package/src/hooks/useReqraftProperty.ts +0 -16
  816. package/src/hooks/useStorage/useStorage.stories.tsx +0 -168
  817. package/src/hooks/useStorage/useStorage.ts +0 -35
  818. package/src/hooks/useTemplates.ts +0 -123
  819. package/src/hooks/useValidation.ts +0 -9
  820. package/src/hooks/useWebSocket/useWebSocket.ts +0 -224
  821. package/src/hooks/useWebSocket/useWebsocket.stories.tsx +0 -640
  822. package/src/hooks/useWhyDidYouUpdate.ts +0 -38
  823. package/src/index.tsx +0 -86
  824. package/src/providers/FetchProvider.tsx +0 -40
  825. package/src/providers/ReqraftProvider.tsx +0 -52
  826. package/src/providers/StorageProvider.tsx +0 -131
  827. package/src/stores/currentUser/currentUser.stories.tsx +0 -100
  828. package/src/stores/currentUser/currentUser.tsx +0 -94
  829. package/src/stories/Data/fileFieldArgSchema.json +0 -86
  830. package/src/stories/Tests/utils.ts +0 -320
  831. package/src/stories/storyNetwork.ts +0 -92
  832. package/src/stories/tracking.tsx +0 -206
  833. package/src/tracking/browser/attach.ts +0 -186
  834. package/src/tracking/browser/env.ts +0 -78
  835. package/src/tracking/core/consent.ts +0 -37
  836. package/src/tracking/core/engagement.ts +0 -47
  837. package/src/tracking/core/experiments.ts +0 -258
  838. package/src/tracking/core/hash.ts +0 -26
  839. package/src/tracking/core/ids.ts +0 -25
  840. package/src/tracking/core/observable.ts +0 -23
  841. package/src/tracking/core/queue.ts +0 -131
  842. package/src/tracking/core/sections.ts +0 -166
  843. package/src/tracking/core/storage.ts +0 -69
  844. package/src/tracking/core/tracker.ts +0 -417
  845. package/src/tracking/core/types.ts +0 -162
  846. package/src/tracking/core/utm.ts +0 -23
  847. package/src/tracking/index.ts +0 -72
  848. package/src/tracking/markup.ts +0 -17
  849. package/src/tracking/react/Experiment.tsx +0 -44
  850. package/src/tracking/react/TrackingProvider.tsx +0 -56
  851. package/src/tracking/react/hooks.ts +0 -106
  852. package/src/tracking/react/index.ts +0 -13
  853. package/src/tracking/testing.ts +0 -108
  854. package/src/tracking/ui/ExperimentCard.stories.tsx +0 -296
  855. package/src/tracking/ui/ExperimentCard.tsx +0 -667
  856. package/src/tracking/ui/ExperimentsOverlay.stories.tsx +0 -155
  857. package/src/tracking/ui/ExperimentsOverlay.tsx +0 -437
  858. package/src/tracking/ui/anchor.ts +0 -180
  859. package/src/tracking/ui/card.ts +0 -464
  860. package/src/tracking/ui/client.ts +0 -117
  861. package/src/tracking/ui/index.ts +0 -77
  862. package/src/tracking/ui/types.ts +0 -110
  863. package/src/tracking/ui/useExperimentsAdmin.ts +0 -103
  864. package/src/types/Form.ts +0 -29
  865. package/src/types.ts +0 -14
  866. package/src/utils/datetime.ts +0 -10
  867. package/src/utils/fetch.ts +0 -457
  868. package/src/utils/lspClient.ts +0 -711
  869. package/src/utils/lspClient.types.ts +0 -211
  870. package/src/utils/queryUnlessCancelled.ts +0 -28
  871. package/src/utils/websocket.ts +0 -293
  872. package/vite.config.ts +0 -58
  873. package/vitest.config.ts +0 -69
@@ -2,11 +2,29 @@
2
2
  // Copyright 2026 Qore Technologies, s.r.o.
3
3
  // Public surface of the SmartEditor primitive.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.offsetToLspPosition = exports.mapCompletionKindToIcon = exports.lspPositionToOffset = exports.defaultToSlateNodes = exports.defaultSlateConverter = exports.defaultSelectionToOffset = exports.defaultFromSlateNodes = exports.useLspSession = exports.useLspAutocomplete = exports.SmartEditor = void 0;
5
+ exports.offsetToLspPosition = exports.mapCompletionKindToIcon = exports.lspPositionToOffset = exports.defaultToSlateNodes = exports.defaultSlateConverter = exports.defaultSelectionToOffset = exports.defaultFromSlateNodes = exports.useLspSession = exports.templateCompletionItems = exports.templateChipInserter = exports.templateKind = exports.TEMPLATE_KIND = exports.styleTemplateItems = exports.kindBadge = exports.FIELD_KIND = exports.COMPLETION_LIST_THEME = exports.COMPLETION_ITEM_STYLE = exports.CompletionMenu = exports.CompletionList = exports.useLspAutocomplete = exports.useCompletionKeys = exports.toDropdownItems = exports.groupCompletionItems = exports.SmartEditor = void 0;
6
6
  var SmartEditor_1 = require("./SmartEditor");
7
7
  Object.defineProperty(exports, "SmartEditor", { enumerable: true, get: function () { return SmartEditor_1.SmartEditor; } });
8
8
  var useLspAutocomplete_1 = require("./useLspAutocomplete");
9
+ Object.defineProperty(exports, "groupCompletionItems", { enumerable: true, get: function () { return useLspAutocomplete_1.groupCompletionItems; } });
10
+ Object.defineProperty(exports, "toDropdownItems", { enumerable: true, get: function () { return useLspAutocomplete_1.toDropdownItems; } });
11
+ Object.defineProperty(exports, "useCompletionKeys", { enumerable: true, get: function () { return useLspAutocomplete_1.useCompletionKeys; } });
9
12
  Object.defineProperty(exports, "useLspAutocomplete", { enumerable: true, get: function () { return useLspAutocomplete_1.useLspAutocomplete; } });
13
+ // the one look and the two lists a field offers what can be written in (qorus#646)
14
+ var CompletionMenu_1 = require("./CompletionMenu");
15
+ Object.defineProperty(exports, "CompletionList", { enumerable: true, get: function () { return CompletionMenu_1.CompletionList; } });
16
+ Object.defineProperty(exports, "CompletionMenu", { enumerable: true, get: function () { return CompletionMenu_1.CompletionMenu; } });
17
+ var completionStyle_1 = require("./completionStyle");
18
+ Object.defineProperty(exports, "COMPLETION_ITEM_STYLE", { enumerable: true, get: function () { return completionStyle_1.COMPLETION_ITEM_STYLE; } });
19
+ Object.defineProperty(exports, "COMPLETION_LIST_THEME", { enumerable: true, get: function () { return completionStyle_1.COMPLETION_LIST_THEME; } });
20
+ Object.defineProperty(exports, "FIELD_KIND", { enumerable: true, get: function () { return completionStyle_1.FIELD_KIND; } });
21
+ Object.defineProperty(exports, "kindBadge", { enumerable: true, get: function () { return completionStyle_1.kindBadge; } });
22
+ Object.defineProperty(exports, "styleTemplateItems", { enumerable: true, get: function () { return completionStyle_1.styleTemplateItems; } });
23
+ Object.defineProperty(exports, "TEMPLATE_KIND", { enumerable: true, get: function () { return completionStyle_1.TEMPLATE_KIND; } });
24
+ Object.defineProperty(exports, "templateKind", { enumerable: true, get: function () { return completionStyle_1.templateKind; } });
25
+ var templateCompletions_1 = require("./templateCompletions");
26
+ Object.defineProperty(exports, "templateChipInserter", { enumerable: true, get: function () { return templateCompletions_1.templateChipInserter; } });
27
+ Object.defineProperty(exports, "templateCompletionItems", { enumerable: true, get: function () { return templateCompletions_1.templateCompletionItems; } });
10
28
  var useLspSession_1 = require("./useLspSession");
11
29
  Object.defineProperty(exports, "useLspSession", { enumerable: true, get: function () { return useLspSession_1.useLspSession; } });
12
30
  var helpers_1 = require("./helpers");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/smartEditor/index.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,+CAA+C;;;AAE/C,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AAOpB,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAK3B,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,qCAQmB;AAPjB,gHAAA,qBAAqB,OAAA;AACrB,mHAAA,wBAAwB,OAAA;AACxB,gHAAA,qBAAqB,OAAA;AACrB,8GAAA,mBAAmB,OAAA;AACnB,8GAAA,mBAAmB,OAAA;AACnB,kHAAA,uBAAuB,OAAA;AACvB,8GAAA,mBAAmB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/smartEditor/index.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,+CAA+C;;;AAE/C,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AAQpB,2DAK8B;AAJ5B,0HAAA,oBAAoB,OAAA;AACpB,qHAAA,eAAe,OAAA;AACf,uHAAA,iBAAiB,OAAA;AACjB,wHAAA,kBAAkB,OAAA;AAEpB,mFAAmF;AACnF,mDAAkE;AAAzD,gHAAA,cAAc,OAAA;AAAE,gHAAA,cAAc,OAAA;AAEvC,qDAQ2B;AAPzB,wHAAA,qBAAqB,OAAA;AACrB,wHAAA,qBAAqB,OAAA;AACrB,6GAAA,UAAU,OAAA;AACV,4GAAA,SAAS,OAAA;AACT,qHAAA,kBAAkB,OAAA;AAClB,gHAAA,aAAa,OAAA;AACb,+GAAA,YAAY,OAAA;AAEd,6DAAsF;AAA7E,2HAAA,oBAAoB,OAAA;AAAE,8HAAA,uBAAuB,OAAA;AAKtD,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,qCAQmB;AAPjB,gHAAA,qBAAqB,OAAA;AACrB,mHAAA,wBAAwB,OAAA;AACxB,gHAAA,qBAAqB,OAAA;AACrB,8GAAA,mBAAmB,OAAA;AACnB,8GAAA,mBAAmB,OAAA;AACnB,kHAAA,uBAAuB,OAAA;AACvB,8GAAA,mBAAmB,OAAA"}
@@ -0,0 +1,98 @@
1
+ import { IReqoreFormTemplates } from '@qoretechnologies/reqore/dist/components/Textarea';
2
+ import { BaseEditor, Path } from 'slate';
3
+ import { TTypeLabel } from '../../helpers/qorusTypeCatalogue';
4
+ import { ITemplateNode, TTemplateIntent } from '../../helpers/templateTree';
5
+ import { ILspCompletionItem } from '../../utils/lspClient.types';
6
+ import { TCompletionInserter } from './types';
7
+ type TTemplateItem = {
8
+ label?: unknown;
9
+ value?: unknown;
10
+ badge?: unknown;
11
+ /** The template's type and base type (`templateType`). */
12
+ metadata?: Record<string, unknown>;
13
+ description?: unknown;
14
+ /** Where it comes from, as the host says (`withTemplateSources`): the first thing its row's detail says. */
15
+ source?: unknown;
16
+ items?: TTemplateItem[];
17
+ };
18
+ /**
19
+ * The catalogue with each template marked with where it comes from, as the host says (the IDE: the app action
20
+ * that captures it): the template picker showed it beside the template held, and every list of templates shows it
21
+ * in the template's row (qorus#646). `sourceOf` answers for a template, not a group; nothing is changed where it
22
+ * says nothing.
23
+ */
24
+ export declare const withTemplateSources: <T extends {
25
+ items?: unknown[];
26
+ }>(templates: T, sourceOf?: (template: TTemplateItem) => string | undefined) => T;
27
+ /**
28
+ * A field's templates as completion items, for `$` typed in a value's text (qorus#646): every template that can
29
+ * be written, wherever it sits in the catalogue - found by what is typed after the `$`, in the one completion
30
+ * list typing opens (`CompletionMenu`). Browsing the catalogue as a tree is the browse list's
31
+ * (`TemplateBrowser`). A record's field (`$record:{name}`) is a Field, anything else a Variable; the groups it
32
+ * is in and its type's name (`typeLabel`) are its detail (after where it comes from, when the host says), its
33
+ * description its documentation.
34
+ */
35
+ export declare const templateCompletionItems: (templates?: IReqoreFormTemplates, typeLabel?: TTypeLabel) => ILspCompletionItem[];
36
+ /**
37
+ * Inserts a template chosen from the completion list as the chip it is, in place of what was typed for it: the `$`
38
+ * or `@` that opened the list and the word after it. The `@` stayed in front of the chip (qorus#646, David's
39
+ * review): only a `$` was taken away.
40
+ */
41
+ /**
42
+ * Writes a completion as text in the place of what is typed of it (or of the chip it replaces): the reference of
43
+ * a context, a state or a record taken to go on into (`$data:`, `$data:receive_order.`), which is completed on.
44
+ */
45
+ export declare const templateTextInserter: TCompletionInserter;
46
+ export declare const templateChipInserter: TCompletionInserter;
47
+ /** What is typed before the caret in the text it is in: never anything across a chip. */
48
+ export declare const typedInTheText: (editor: BaseEditor) => string;
49
+ /**
50
+ * The chip a pick goes on from, where what is typed after it continues its reference (qorus#646, David's review):
51
+ * a state's chip (`$data:receive_order`) and `.` typed after it, then Event type picked, is the one reference
52
+ * `$data:{receive_order.event_type}` - the pick takes the chip's place as well as the `.`. It was put in after the
53
+ * chip, and the text read `$data:receive_order$data:{receive_order.event_type}`. Undefined where nothing but a
54
+ * `.` or `[` and a name is typed straight after a chip whose reference the pick's starts with.
55
+ */
56
+ export declare const chipExtendedBy: (editor: BaseEditor, typedBefore: string, value: string) => Path | undefined;
57
+ /** What a template row carries for the list (`ILspCompletionItem.data`): the node it is and how it is drawn. */
58
+ export interface ITemplateRowData {
59
+ /** The node it is (`ITemplateNode.id`). */
60
+ templateNodeId?: string;
61
+ /** Taking it opens the picker at its members rather than writing it: a group no reference names. */
62
+ opens?: boolean;
63
+ /**
64
+ * Taking it writes its reference as text and lists what is in it, as typing goes on into it: a context
65
+ * (`$data:`), a state or a record (`$data:receive_order.`). Never a chip: a chip is a whole reference.
66
+ */
67
+ continues?: boolean;
68
+ /** What "Use" writes for a group taken whole: its value (`$data:{receive_order}`). */
69
+ wholeValue?: string;
70
+ /** A group that can also be taken whole (a record, a Qog state's data): its row's "Use" writes it. */
71
+ takesWhole?: boolean;
72
+ /** The row that opens the picker at the top of the field's templates. */
73
+ browseAll?: boolean;
74
+ /** The section of the list it is listed in. */
75
+ section?: string;
76
+ /** What it is (State data, Context...) and its type, named: its badges; its kind's badge in its chip's color. */
77
+ kindLabel?: string;
78
+ kindIntent?: TTemplateIntent;
79
+ typeLabel?: string;
80
+ }
81
+ /** The label of the row that opens the picker at the top of the field's templates. */
82
+ export declare const BROWSE_ALL_TEMPLATES = "Browse all templates";
83
+ /**
84
+ * The rows typing a reference offers (`$`, `$data:`, `$data:receive_order.`, `@na`): the nodes of the field's
85
+ * templates and fields it reaches (`searchTemplateReferences`) - a group is a row that opens the picker at its
86
+ * members - each saying where it is ("in Receive order"), not what group it is in as if that were what it is.
87
+ * Nothing that does not go on from what is typed is listed (qorus#646, David's review).
88
+ */
89
+ export declare const templateSearchItems: (roots: ITemplateNode[], typed: string, typeLabel?: TTypeLabel, wholeRecords?: boolean) => ILspCompletionItem[];
90
+ /** The row that opens the picker at the top of the field's templates: every template, browsed as they nest. */
91
+ export declare const browseAllTemplatesItem: () => ILspCompletionItem;
92
+ /**
93
+ * What the list says where a template context is written and nothing is listed in it (qorus#646, David's review:
94
+ * a context picked was left as an unfinished template, the list gone): what to write next, the list held open.
95
+ */
96
+ export declare const unlistedContextMessage: (before: string) => string | undefined;
97
+ export {};
98
+ //# sourceMappingURL=templateCompletions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templateCompletions.d.ts","sourceRoot":"","sources":["../../../src/components/smartEditor/templateCompletions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AACzF,OAAO,EAAE,UAAU,EAAU,IAAI,EAAc,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAoB,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAEhF,OAAO,EACL,aAAa,EAUb,eAAe,EAEhB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAM9C,KAAK,aAAa,GAAG;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4GAA4G;IAC5G,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;CACzB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;YAAwB,OAAO,EAAE;cACpD,CAAC,aACD,CAAC,QAAQ,EAAE,aAAa,KAAK,MAAM,GAAG,SAAS,KACzD,CAaF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,eACtB,oBAAoB,cACrB,UAAU,KACpB,kBAAkB,EA+BpB,CAAC;AASF;;;;GAIG;AACH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,mBA0BlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,mBAyClC,CAAC;AAUF,yFAAyF;AACzF,eAAO,MAAM,cAAc,WAAY,UAAU,KAAG,MAcnD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,WACjB,UAAU,eACL,MAAM,SACZ,MAAM,KACZ,IAAI,GAAG,SAsBT,CAAC;AAEF,gHAAgH;AAChH,MAAM,WAAW,gBAAgB;IAC/B,2CAA2C;IAC3C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oGAAoG;IACpG,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sFAAsF;IACtF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sGAAsG;IACtG,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yEAAyE;IACzE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iHAAiH;IACjH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,sFAAsF;AACtF,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,UACvB,aAAa,EAAE,SACf,MAAM,cACF,UAAU,iBAEN,OAAO,KACrB,kBAAkB,EAyDpB,CAAC;AAyEF,+GAA+G;AAC/G,eAAO,MAAM,sBAAsB,QAAO,kBAUxC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,sBAAsB,WAAY,MAAM,KAAG,MAAM,GAAG,SAMhE,CAAC"}
@@ -0,0 +1,380 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
14
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
15
+ if (ar || !(i in from)) {
16
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
17
+ ar[i] = from[i];
18
+ }
19
+ }
20
+ return to.concat(ar || Array.prototype.slice.call(from));
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.unlistedContextMessage = exports.browseAllTemplatesItem = exports.templateSearchItems = exports.BROWSE_ALL_TEMPLATES = exports.chipExtendedBy = exports.typedInTheText = exports.templateChipInserter = exports.templateTextInserter = exports.templateCompletionItems = exports.withTemplateSources = void 0;
24
+ var slate_1 = require("slate");
25
+ var slate_react_1 = require("slate-react");
26
+ var qorusTypeCatalogue_1 = require("../../helpers/qorusTypeCatalogue");
27
+ var templateType_1 = require("../../helpers/templateType");
28
+ var templateTree_1 = require("../../helpers/templateTree");
29
+ /** LSP completion kinds the list draws a field and a template with (`COMPLETION_KIND_CHIPS`). */
30
+ var FIELD_KIND = 5;
31
+ var TEMPLATE_KIND = 6;
32
+ /**
33
+ * The catalogue with each template marked with where it comes from, as the host says (the IDE: the app action
34
+ * that captures it): the template picker showed it beside the template held, and every list of templates shows it
35
+ * in the template's row (qorus#646). `sourceOf` answers for a template, not a group; nothing is changed where it
36
+ * says nothing.
37
+ */
38
+ var withTemplateSources = function (templates, sourceOf) {
39
+ if (!templates || !sourceOf)
40
+ return templates;
41
+ var mark = function (list) {
42
+ return list === null || list === void 0 ? void 0 : list.map(function (item) {
43
+ var source = typeof item.value === 'string' && item.value ? sourceOf(item) : undefined;
44
+ // `items` only on a group: a list draws a row with an `items` key and no members as disabled
45
+ return __assign(__assign(__assign({}, item), (Array.isArray(item.items) ? { items: mark(item.items) } : {})), (source ? { source: source } : {}));
46
+ });
47
+ };
48
+ return __assign(__assign({}, templates), { items: mark(templates.items) });
49
+ };
50
+ exports.withTemplateSources = withTemplateSources;
51
+ /**
52
+ * A field's templates as completion items, for `$` typed in a value's text (qorus#646): every template that can
53
+ * be written, wherever it sits in the catalogue - found by what is typed after the `$`, in the one completion
54
+ * list typing opens (`CompletionMenu`). Browsing the catalogue as a tree is the browse list's
55
+ * (`TemplateBrowser`). A record's field (`$record:{name}`) is a Field, anything else a Variable; the groups it
56
+ * is in and its type's name (`typeLabel`) are its detail (after where it comes from, when the host says), its
57
+ * description its documentation.
58
+ */
59
+ var templateCompletionItems = function (templates, typeLabel) {
60
+ if (typeLabel === void 0) { typeLabel = qorusTypeCatalogue_1.builtInTypeLabel; }
61
+ var items = [];
62
+ var seen = new Set();
63
+ var walk = function (list, trail) {
64
+ for (var _i = 0, _a = list !== null && list !== void 0 ? list : []; _i < _a.length; _i++) {
65
+ var item = _a[_i];
66
+ var label = typeof item.label === 'string' && item.label ? item.label : undefined;
67
+ if (typeof item.value === 'string' && item.value && !seen.has(item.value)) {
68
+ seen.add(item.value);
69
+ var where = trail.join(' › ');
70
+ // the template's type, named: never its code (qorus#646)
71
+ var templateTypeName = (0, templateType_1.templateType)(item);
72
+ var type = templateTypeName ? typeLabel(templateTypeName, (0, templateType_1.templateBaseType)(item)) : undefined;
73
+ var source = typeof item.source === 'string' ? item.source : undefined;
74
+ items.push({
75
+ label: label !== null && label !== void 0 ? label : item.value,
76
+ kind: item.value.startsWith('$record:') ? FIELD_KIND : TEMPLATE_KIND,
77
+ detail: [source, where, type].filter(Boolean).join(' · ') || undefined,
78
+ documentation: typeof item.description === 'string' && item.description.trim() ?
79
+ { kind: 'markdown', value: item.description }
80
+ : undefined,
81
+ insertText: item.value,
82
+ filterText: "".concat(item.value, " ").concat(label !== null && label !== void 0 ? label : ''),
83
+ });
84
+ }
85
+ if (Array.isArray(item.items))
86
+ walk(item.items, label ? __spreadArray(__spreadArray([], trail, true), [label], false) : trail);
87
+ }
88
+ };
89
+ walk(templates === null || templates === void 0 ? void 0 : templates.items, []);
90
+ return items;
91
+ };
92
+ exports.templateCompletionItems = templateCompletionItems;
93
+ /**
94
+ * The signs a template is asked for by, as it is typed: `$`, as a template is written, and `@`, as a field is
95
+ * named in an expression - the list opens on either (`useLspAutocomplete`'s sigil tokens), so the template chosen
96
+ * takes either's place.
97
+ */
98
+ var TEMPLATE_SIGILS = new Set(['$', '@']);
99
+ /**
100
+ * Inserts a template chosen from the completion list as the chip it is, in place of what was typed for it: the `$`
101
+ * or `@` that opened the list and the word after it. The `@` stayed in front of the chip (qorus#646, David's
102
+ * review): only a `$` was taken away.
103
+ */
104
+ /**
105
+ * Writes a completion as text in the place of what is typed of it (or of the chip it replaces): the reference of
106
+ * a context, a state or a record taken to go on into (`$data:`, `$data:receive_order.`), which is completed on.
107
+ */
108
+ var templateTextInserter = function (item, editor, ctx) {
109
+ var _a, _b, _c;
110
+ var value = (_a = item.insertText) !== null && _a !== void 0 ? _a : item.label;
111
+ if (ctx.replacementPath) {
112
+ slate_1.Editor.withoutNormalizing(editor, function () {
113
+ slate_1.Transforms.removeNodes(editor, { at: ctx.replacementPath });
114
+ slate_1.Transforms.insertNodes(editor, { text: value }, {
115
+ at: ctx.replacementPath,
116
+ select: true,
117
+ });
118
+ });
119
+ focusEditor(editor);
120
+ return;
121
+ }
122
+ if (editor.selection) {
123
+ var typed = (0, exports.typedInTheText)(editor);
124
+ var written = (_c = (_b = /[$@][\w.:{}[\]*-]*$/.exec(typed)) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : '';
125
+ var extended = (0, exports.chipExtendedBy)(editor, typed, value);
126
+ for (var left = extended ? typed.length : written.length; left > 0; left--) {
127
+ slate_1.Editor.deleteBackward(editor, { unit: 'character' });
128
+ }
129
+ if (extended) {
130
+ slate_1.Transforms.removeNodes(editor, { at: extended });
131
+ }
132
+ }
133
+ slate_1.Transforms.insertText(editor, value);
134
+ focusEditor(editor);
135
+ };
136
+ exports.templateTextInserter = templateTextInserter;
137
+ var templateChipInserter = function (item, editor, ctx) {
138
+ var _a;
139
+ var value = (_a = item.insertText) !== null && _a !== void 0 ? _a : item.label;
140
+ if (ctx.replacementPath) {
141
+ // a chip clicked and replaced: the pick takes its place
142
+ slate_1.Editor.withoutNormalizing(editor, function () {
143
+ slate_1.Transforms.removeNodes(editor, { at: ctx.replacementPath });
144
+ slate_1.Transforms.insertNodes(editor, { type: 'tag', value: value, label: item.label, children: [{ text: '' }] }, { at: ctx.replacementPath, select: true });
145
+ });
146
+ slate_1.Transforms.move(editor);
147
+ focusEditor(editor);
148
+ return;
149
+ }
150
+ if (editor.selection) {
151
+ var start = ctx.cursorOffset - 1;
152
+ while (start >= 0 && /[\w.:{}-]/.test(ctx.plainText[start]))
153
+ start--;
154
+ if (!(start >= 0 && TEMPLATE_SIGILS.has(ctx.plainText[start])))
155
+ start++;
156
+ var typed = (0, exports.typedInTheText)(editor);
157
+ var extended = (0, exports.chipExtendedBy)(editor, typed, value);
158
+ for (var left = Math.min(ctx.cursorOffset - start, extended ? typed.length : Infinity); left > 0; left--) {
159
+ slate_1.Editor.deleteBackward(editor, { unit: 'character' });
160
+ }
161
+ if (extended) {
162
+ slate_1.Transforms.removeNodes(editor, { at: extended });
163
+ }
164
+ }
165
+ slate_1.Transforms.insertNodes(editor, {
166
+ type: 'tag',
167
+ value: value,
168
+ label: item.label,
169
+ children: [{ text: '' }],
170
+ });
171
+ slate_1.Transforms.move(editor);
172
+ focusEditor(editor);
173
+ };
174
+ exports.templateChipInserter = templateChipInserter;
175
+ var focusEditor = function (editor) {
176
+ try {
177
+ slate_react_1.ReactEditor.focus(editor);
178
+ }
179
+ catch (_a) {
180
+ // the editor is not in the document
181
+ }
182
+ };
183
+ /** What is typed before the caret in the text it is in: never anything across a chip. */
184
+ var typedInTheText = function (editor) {
185
+ var _a;
186
+ var at = (_a = editor.selection) === null || _a === void 0 ? void 0 : _a.anchor;
187
+ if (!at) {
188
+ return '';
189
+ }
190
+ try {
191
+ var node = slate_1.Editor.node(editor, at.path)[0];
192
+ return typeof node.text === 'string' ?
193
+ node.text.slice(0, at.offset)
194
+ : '';
195
+ }
196
+ catch (_b) {
197
+ // a path the editor no longer has: nothing was typed there
198
+ return '';
199
+ }
200
+ };
201
+ exports.typedInTheText = typedInTheText;
202
+ /**
203
+ * The chip a pick goes on from, where what is typed after it continues its reference (qorus#646, David's review):
204
+ * a state's chip (`$data:receive_order`) and `.` typed after it, then Event type picked, is the one reference
205
+ * `$data:{receive_order.event_type}` - the pick takes the chip's place as well as the `.`. It was put in after the
206
+ * chip, and the text read `$data:receive_order$data:{receive_order.event_type}`. Undefined where nothing but a
207
+ * `.` or `[` and a name is typed straight after a chip whose reference the pick's starts with.
208
+ */
209
+ var chipExtendedBy = function (editor, typedBefore, value) {
210
+ var _a, _b;
211
+ var at = (_a = editor.selection) === null || _a === void 0 ? void 0 : _a.anchor;
212
+ var continuation = (_b = /^[.[][^\s]*$/.exec(typedBefore)) === null || _b === void 0 ? void 0 : _b[0];
213
+ if (!at || !continuation || at.path.length < 2 || at.path[at.path.length - 1] === 0) {
214
+ return undefined;
215
+ }
216
+ var chipPath = __spreadArray(__spreadArray([], at.path.slice(0, -1), true), [at.path[at.path.length - 1] - 1], false);
217
+ try {
218
+ var chip = slate_1.Editor.node(editor, chipPath)[0];
219
+ var chipValue = chip.type === 'tag' ?
220
+ chip.value
221
+ : undefined;
222
+ if (typeof chipValue !== 'string') {
223
+ return undefined;
224
+ }
225
+ var goesOn = (0, templateTree_1.unbracedReference)("".concat(chipValue).concat(continuation)).toLowerCase();
226
+ return (0, templateTree_1.unbracedReference)(value).toLowerCase().startsWith(goesOn) ? chipPath : undefined;
227
+ }
228
+ catch (_c) {
229
+ // no node before the text: nothing is gone on from
230
+ return undefined;
231
+ }
232
+ };
233
+ exports.chipExtendedBy = chipExtendedBy;
234
+ /** The label of the row that opens the picker at the top of the field's templates. */
235
+ exports.BROWSE_ALL_TEMPLATES = 'Browse all templates';
236
+ /**
237
+ * The rows typing a reference offers (`$`, `$data:`, `$data:receive_order.`, `@na`): the nodes of the field's
238
+ * templates and fields it reaches (`searchTemplateReferences`) - a group is a row that opens the picker at its
239
+ * members - each saying where it is ("in Receive order"), not what group it is in as if that were what it is.
240
+ * Nothing that does not go on from what is typed is listed (qorus#646, David's review).
241
+ */
242
+ var templateSearchItems = function (roots, typed, typeLabel,
243
+ /** Whether the value takes a record: a context, a state or a record is then offered whole too (`Use`). */
244
+ wholeRecords) {
245
+ if (typeLabel === void 0) { typeLabel = qorusTypeCatalogue_1.builtInTypeLabel; }
246
+ /* A `$` and a context's name being written: the contexts it starts, each written and gone on from - then, from
247
+ two letters on, the templates named so (qorus#646, David: "`$` → contexts", each level filtered by what is
248
+ typed of it). */
249
+ var context = /^\$([\w-]*)$/.exec(typed);
250
+ if (context) {
251
+ var partial = context[1];
252
+ var wanted_1 = partial.toLowerCase();
253
+ var named = partial.length >= 2 ?
254
+ (0, templateTree_1.allTemplateNodes)(roots).filter(function (node) {
255
+ var _a;
256
+ return !!node.value &&
257
+ !((_a = node.children) === null || _a === void 0 ? void 0 : _a.length) &&
258
+ // a context of free keys is its context's row, above
259
+ !node.writesKey &&
260
+ node.label
261
+ .toLowerCase()
262
+ .split(/[^\p{L}\p{N}]+/u)
263
+ .some(function (word) { return word.startsWith(wanted_1); });
264
+ })
265
+ : [];
266
+ return onceEach(__spreadArray(__spreadArray([], (0, templateTree_1.templateContextsOf)(roots, partial, wholeRecords).map(function (node) {
267
+ return templateRow(node, typeLabel);
268
+ }), true), named.map(function (node) { return templateRow(node, typeLabel); }), true));
269
+ }
270
+ /* A context of free keys (`$dynamic:*`) is completed by writing its key: no row stands for its keys once its
271
+ context is written - the list says to write the key (`unlistedContextMessage`). A context Qorus reads whole
272
+ is offered whole first, `$data:*`, where the value takes a record (qorus#646, David's review). */
273
+ var inContext = /^(\$[\w-]+:)(\*?)$/.exec(typed);
274
+ var known = roots.length > 0 &&
275
+ (0, templateTree_1.allTemplateNodes)(roots).some(function (node) { return (0, templateTree_1.templateContextOf)(node.reference) === (inContext === null || inContext === void 0 ? void 0 : inContext[1]); });
276
+ // what the field's catalogue says of the context, where it has one (`withTemplateCatalogue`); else as Qorus reads it
277
+ var catalogued = inContext ?
278
+ (0, templateTree_1.templateContextsOf)(roots, inContext[1].slice(1, -1)).find(function (node) { return node.reference === inContext[1] && node.catalogue; })
279
+ : undefined;
280
+ var readWhole = catalogued ?
281
+ !!catalogued.catalogue.use_whole
282
+ : !!inContext && templateTree_1.WHOLE_TEMPLATE_CONTEXTS.has(inContext[1].slice(1, -1));
283
+ var whole = inContext && known && wholeRecords !== false && readWhole ?
284
+ [wholeContextRow(inContext[1])]
285
+ : [];
286
+ return onceEach(__spreadArray(__spreadArray([], whole, true), (0, templateTree_1.searchTemplateReferences)(roots, typed)
287
+ .filter(function (node) { return !node.writesKey; })
288
+ .map(function (node) { return templateRow(node, typeLabel); }), true));
289
+ };
290
+ exports.templateSearchItems = templateSearchItems;
291
+ /* Each reference once: a template a field lists in a group of its own (Context Data) and its catalogue lists in its
292
+ context is one row, the first. */
293
+ var onceEach = function (rows) {
294
+ var seen = new Set();
295
+ return rows.filter(function (row) {
296
+ var _a;
297
+ var written = (0, templateTree_1.unbracedReference)((_a = row.insertText) !== null && _a !== void 0 ? _a : row.label);
298
+ if (seen.has(written)) {
299
+ return false;
300
+ }
301
+ seen.add(written);
302
+ return true;
303
+ });
304
+ };
305
+ /** The row for the whole of a context, `$data:*`: written as its chip. */
306
+ var wholeContextRow = function (context) { return ({
307
+ label: (0, templateTree_1.wholeContextValue)(context),
308
+ kind: TEMPLATE_KIND,
309
+ detail: "all of ".concat(context),
310
+ insertText: (0, templateTree_1.wholeContextValue)(context),
311
+ filterText: (0, templateTree_1.wholeContextValue)(context),
312
+ data: { whole: true, section: 'Templates', kindLabel: 'Template context' },
313
+ }); };
314
+ /** A node's row in the completion list. */
315
+ var templateRow = function (node, typeLabel) {
316
+ var _a, _b, _c, _d, _e;
317
+ var group = !!((_a = node.children) === null || _a === void 0 ? void 0 : _a.length) || !!node.loadChildren;
318
+ // a context written to go on into it (`$local:`): of the field's own templates, or of its catalogue
319
+ var isContext = node.id.startsWith('context:') || (!!node.catalogue && /^\$[\w-]+:$/.test((_b = node.reference) !== null && _b !== void 0 ? _b : ''));
320
+ /* A group that a reference names - a context, a state, a record - is gone on into as it is typed: taken, its
321
+ reference is written and what is in it is listed (qorus#646, David: "accepting an intermediate level continues
322
+ to the next level"). A group no reference names (Context Data) opens the picker at its members. */
323
+ var continuation = isContext ? node.reference
324
+ : group && node.reference && /^(?:\$[^:]*:.|@.)/.test(node.reference) ? "".concat(node.reference, ".")
325
+ : undefined;
326
+ var kindLabel = isContext ? 'Template context' : templateTree_1.TEMPLATE_NODE_KIND_LABELS[node.kind];
327
+ var type = node.type ? typeLabel(node.type, node.baseType) : undefined;
328
+ var where = node.trail.length ? "in ".concat(node.trail.join(' › ')) : undefined;
329
+ var data = {
330
+ templateNodeId: node.id,
331
+ opens: group && !continuation,
332
+ continues: !!continuation,
333
+ // a context of keys written freely has none listed, and is taken whole all the same (`$dynamic:*`)
334
+ takesWhole: (group || isContext) && !!node.takesWhole,
335
+ wholeValue: (group || isContext) && node.takesWhole ? node.value : undefined,
336
+ section: node.kind === 'field' ? templateTree_1.RECORD_FIELDS_LABEL : 'Templates',
337
+ kindLabel: kindLabel,
338
+ kindIntent: (0, templateTree_1.templateNodeIntent)(node),
339
+ typeLabel: type,
340
+ };
341
+ /* Under its name: where it is, what it is and where it comes from - in the row, never a hover over its edge
342
+ (qorus#646, David's review). */
343
+ var said = [where, node.description, node.source ? "from ".concat(node.source) : undefined].filter(Boolean);
344
+ return {
345
+ label: node.label,
346
+ kind: node.kind === 'field' ? FIELD_KIND : TEMPLATE_KIND,
347
+ detail: said.length ? said.join(' · ') : undefined,
348
+ insertText: (_d = (_c = continuation !== null && continuation !== void 0 ? continuation : node.value) !== null && _c !== void 0 ? _c : node.reference) !== null && _d !== void 0 ? _d : node.label,
349
+ // narrowed as it is typed by its reference: `$data:receive_order.ev` keeps Event type
350
+ filterText: (_e = node.reference) !== null && _e !== void 0 ? _e : node.label,
351
+ data: data,
352
+ };
353
+ };
354
+ /** The row that opens the picker at the top of the field's templates: every template, browsed as they nest. */
355
+ var browseAllTemplatesItem = function () { return ({
356
+ label: exports.BROWSE_ALL_TEMPLATES,
357
+ kind: 19,
358
+ insertText: '',
359
+ filterText: '',
360
+ documentation: {
361
+ kind: 'markdown',
362
+ value: 'Every template and field this value can use, by group.',
363
+ },
364
+ data: { browseAll: true, section: '' },
365
+ }); };
366
+ exports.browseAllTemplatesItem = browseAllTemplatesItem;
367
+ /**
368
+ * What the list says where a template context is written and nothing is listed in it (qorus#646, David's review:
369
+ * a context picked was left as an unfinished template, the list gone): what to write next, the list held open.
370
+ */
371
+ var unlistedContextMessage = function (before) {
372
+ var _a;
373
+ var context = (_a = /(\$[\w-]+:)[\w.]*$/.exec(before)) === null || _a === void 0 ? void 0 : _a[1];
374
+ // said with the rows there are (the whole of it, Browse all templates) or in their place: true either way
375
+ return context ?
376
+ "Write what ".concat(context, " refers to after the ':', or pick from the list")
377
+ : undefined;
378
+ };
379
+ exports.unlistedContextMessage = unlistedContextMessage;
380
+ //# sourceMappingURL=templateCompletions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templateCompletions.js","sourceRoot":"","sources":["../../../src/components/smartEditor/templateCompletions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA,+BAA6D;AAC7D,2CAA0C;AAC1C,uEAAgF;AAChF,2DAA4E;AAC5E,2DAaoC;AAIpC,iGAAiG;AACjG,IAAM,UAAU,GAAG,CAAC,CAAC;AACrB,IAAM,aAAa,GAAG,CAAC,CAAC;AAcxB;;;;;GAKG;AACI,IAAM,mBAAmB,GAAG,UACjC,SAAY,EACZ,QAA0D;I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,CAAC;AAEF,+GAA+G;AACxG,IAAM,sBAAsB,GAAG,cAA0B,OAAA,CAAC;IAC/D,KAAK,EAAE,4BAAoB;IAC3B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,EAAE;IACd,aAAa,EAAE;QACb,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,wDAAwD;KAChE;IACD,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAA6B;CAClE,CAAC,EAV8D,CAU9D,CAAC;AAVU,QAAA,sBAAsB,0BAUhC;AAEH;;;GAGG;AACI,IAAM,sBAAsB,GAAG,UAAC,MAAc;;IACnD,IAAM,OAAO,GAAG,MAAA,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,0CAAG,CAAC,CAAC,CAAC;IACvD,0GAA0G;IAC1G,OAAO,OAAO,CAAC,CAAC;QACZ,qBAAc,OAAO,oDAAiD;QACxE,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC,CAAC;AANW,QAAA,sBAAsB,0BAMjC"}
@@ -0,0 +1,34 @@
1
+ import { Editor } from 'slate';
2
+ import { ISlateConverter, ISlateElement, TSlateNode } from './types';
3
+ export interface IRechippedParagraph {
4
+ /** The paragraph's children, with the references typed in it drawn as chips. */
5
+ children: TSlateNode[];
6
+ /** Where the caret goes in them: the same place in the text. */
7
+ caret?: {
8
+ path: number[];
9
+ offset: number;
10
+ };
11
+ }
12
+ /**
13
+ * The paragraph at `index`, its typed references drawn as chips - or `undefined` when there is none to draw.
14
+ *
15
+ * A reference is typed out in full when the converter reads one where the paragraph has plain text. With a
16
+ * `caret` (the plain-text offset of the caret in the paragraph), only a reference the caret has left is drawn:
17
+ * the converter says the character typed right after it ends it (`endsReference`) - a space or an operator, not
18
+ * a `.` that goes on to a sub-field. One still being typed is left as text; drawn as a chip mid-word, the rest of
19
+ * the word could not be typed into it. Without a caret (the editor has been left) every one is drawn.
20
+ */
21
+ export declare const rechipTypedReferences: (converter: ISlateConverter, paragraph: ISlateElement, index: number, caret?: number, keepAsText?: (reference: string) => boolean) => IRechippedParagraph | undefined;
22
+ /**
23
+ * Draws the paragraph at `index` as `rechipped` has it: its typed references as chips, the text the same, the caret
24
+ * where `rechipped` puts it.
25
+ */
26
+ export declare const drawRechipped: (editor: Editor, index: number, rechipped: IRechippedParagraph) => void;
27
+ /**
28
+ * Draws every reference typed out in full in the editor as its chip - those that name nothing the field is given
29
+ * stay text (`keepAsText`) - as leaving the field does, and as Enter or Tab does where the list has nothing more to
30
+ * offer (a context of free keys and its key, `$static:order.id`: qorus#646). With `caretParagraph`, only that
31
+ * paragraph, the caret put at its end. Whether anything was drawn.
32
+ */
33
+ export declare const commitTypedReferences: (editor: Editor, converter: ISlateConverter, keepAsText?: (reference: string) => boolean, caretParagraph?: number) => boolean;
34
+ //# sourceMappingURL=typedReferences.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typedReferences.d.ts","sourceRoot":"","sources":["../../../src/components/smartEditor/typedReferences.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAc,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAc,UAAU,EAAE,MAAM,SAAS,CAAC;AA+EjF,MAAM,WAAW,mBAAmB;IAClC,gFAAgF;IAChF,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,gEAAgE;IAChE,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,cACrB,eAAe,aACf,aAAa,SACjB,MAAM,UACL,MAAM,eACD,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,KAC1C,mBAAmB,GAAG,SA6BxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,WAAY,MAAM,SAAS,MAAM,aAAa,mBAAmB,SAa1F,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,WACxB,MAAM,aACH,eAAe,eACb,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,mBAC1B,MAAM,KACtB,OAcF,CAAC"}