@qoretechnologies/reqraft 0.10.66-pr.145.gcb1e59d → 0.10.66

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 (913) 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 +420 -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 +336 -243
  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 +20 -57
  58. package/dist/components/form/engine/CompactToolbar.js.map +1 -1
  59. package/dist/components/form/engine/FormEngine.d.ts +67 -59
  60. package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
  61. package/dist/components/form/engine/FormEngine.js +606 -409
  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 +2 -18
  68. package/dist/components/form/engine/OptionFieldMessages.d.ts.map +1 -1
  69. package/dist/components/form/engine/OptionFieldMessages.js +28 -25
  70. package/dist/components/form/engine/OptionFieldMessages.js.map +1 -1
  71. package/dist/components/form/engine/OptionsHelpDialog.d.ts.map +1 -1
  72. package/dist/components/form/engine/OptionsHelpDialog.js +19 -2
  73. package/dist/components/form/engine/OptionsHelpDialog.js.map +1 -1
  74. package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts +2 -2
  75. package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts.map +1 -1
  76. package/dist/components/form/engine/_structuredData/SchemaDataView.js +11 -31
  77. package/dist/components/form/engine/_structuredData/SchemaDataView.js.map +1 -1
  78. package/dist/components/form/engine/compactRowContext.d.ts +30 -6
  79. package/dist/components/form/engine/compactRowContext.d.ts.map +1 -1
  80. package/dist/components/form/engine/compactRowContext.js.map +1 -1
  81. package/dist/components/form/engine/compactRowStyles.d.ts +56 -31
  82. package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
  83. package/dist/components/form/engine/compactRowStyles.js +121 -110
  84. package/dist/components/form/engine/compactRowStyles.js.map +1 -1
  85. package/dist/components/form/engine/compactToolbarColors.d.ts +16 -0
  86. package/dist/components/form/engine/compactToolbarColors.d.ts.map +1 -0
  87. package/dist/components/form/engine/compactToolbarColors.js +21 -0
  88. package/dist/components/form/engine/compactToolbarColors.js.map +1 -0
  89. package/dist/components/form/engine/compactToolbarContext.d.ts +0 -3
  90. package/dist/components/form/engine/compactToolbarContext.d.ts.map +1 -1
  91. package/dist/components/form/engine/compactToolbarContext.js.map +1 -1
  92. package/dist/components/form/engine/inheritProps.d.ts +29 -0
  93. package/dist/components/form/engine/inheritProps.d.ts.map +1 -0
  94. package/dist/components/form/engine/inheritProps.js +43 -0
  95. package/dist/components/form/engine/inheritProps.js.map +1 -0
  96. package/dist/components/form/engine/operatorSummary.d.ts +26 -0
  97. package/dist/components/form/engine/operatorSummary.d.ts.map +1 -0
  98. package/dist/components/form/engine/operatorSummary.js +35 -0
  99. package/dist/components/form/engine/operatorSummary.js.map +1 -0
  100. package/dist/components/form/engine/readFirst.d.ts +26 -22
  101. package/dist/components/form/engine/readFirst.d.ts.map +1 -1
  102. package/dist/components/form/engine/readFirst.js +79 -115
  103. package/dist/components/form/engine/readFirst.js.map +1 -1
  104. package/dist/components/form/engine/readFirstColors.d.ts +30 -0
  105. package/dist/components/form/engine/readFirstColors.d.ts.map +1 -0
  106. package/dist/components/form/engine/readFirstColors.js +51 -0
  107. package/dist/components/form/engine/readFirstColors.js.map +1 -0
  108. package/dist/components/form/engine/rowFocus.d.ts +3 -9
  109. package/dist/components/form/engine/rowFocus.d.ts.map +1 -1
  110. package/dist/components/form/engine/rowFocus.js +30 -19
  111. package/dist/components/form/engine/rowFocus.js.map +1 -1
  112. package/dist/components/form/engine/typeChoices.d.ts +1 -1
  113. package/dist/components/form/engine/variants/VariantCalmTable.d.ts.map +1 -1
  114. package/dist/components/form/engine/variants/VariantCalmTable.js +2 -1
  115. package/dist/components/form/engine/variants/VariantCalmTable.js.map +1 -1
  116. package/dist/components/form/engine/variants/VariantCards.d.ts.map +1 -1
  117. package/dist/components/form/engine/variants/VariantCards.js +2 -1
  118. package/dist/components/form/engine/variants/VariantCards.js.map +1 -1
  119. package/dist/components/form/engine/variants/VariantFocus.js +1 -1
  120. package/dist/components/form/engine/variants/VariantFocus.js.map +1 -1
  121. package/dist/components/form/engine/variants/VariantMinimal.d.ts.map +1 -1
  122. package/dist/components/form/engine/variants/VariantMinimal.js +2 -1
  123. package/dist/components/form/engine/variants/VariantMinimal.js.map +1 -1
  124. package/dist/components/form/engine/variants/variantParts.d.ts +1 -1
  125. package/dist/components/form/engine/variants/variantParts.d.ts.map +1 -1
  126. package/dist/components/form/engine/variants/variantParts.js +25 -17
  127. package/dist/components/form/engine/variants/variantParts.js.map +1 -1
  128. package/dist/components/form/expressions/DpqlRendering.d.ts +1 -1
  129. package/dist/components/form/expressions/DpqlRendering.d.ts.map +1 -1
  130. package/dist/components/form/expressions/DpqlRendering.js +7 -6
  131. package/dist/components/form/expressions/DpqlRendering.js.map +1 -1
  132. package/dist/components/form/expressions/ExpressionField.d.ts +67 -3
  133. package/dist/components/form/expressions/ExpressionField.d.ts.map +1 -1
  134. package/dist/components/form/expressions/ExpressionField.js +536 -114
  135. package/dist/components/form/expressions/ExpressionField.js.map +1 -1
  136. package/dist/components/form/expressions/argumentPresence.d.ts +14 -0
  137. package/dist/components/form/expressions/argumentPresence.d.ts.map +1 -1
  138. package/dist/components/form/expressions/argumentPresence.js +16 -1
  139. package/dist/components/form/expressions/argumentPresence.js.map +1 -1
  140. package/dist/components/form/expressions/builder/argumentDetail.d.ts.map +1 -1
  141. package/dist/components/form/expressions/builder/argumentDetail.js +4 -1
  142. package/dist/components/form/expressions/builder/argumentDetail.js.map +1 -1
  143. package/dist/components/form/expressions/builder/argumentLabel.d.ts.map +1 -1
  144. package/dist/components/form/expressions/builder/argumentLabel.js +30 -11
  145. package/dist/components/form/expressions/builder/argumentLabel.js.map +1 -1
  146. package/dist/components/form/expressions/builder/argumentWrapper.d.ts.map +1 -1
  147. package/dist/components/form/expressions/builder/argumentWrapper.js +3 -1
  148. package/dist/components/form/expressions/builder/argumentWrapper.js.map +1 -1
  149. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.d.ts +9 -0
  150. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.d.ts.map +1 -1
  151. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js +30 -27
  152. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js.map +1 -1
  153. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.d.ts +1 -1
  154. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.d.ts.map +1 -1
  155. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js +7 -5
  156. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js.map +1 -1
  157. package/dist/components/form/expressions/builder/index.d.ts +34 -2
  158. package/dist/components/form/expressions/builder/index.d.ts.map +1 -1
  159. package/dist/components/form/expressions/builder/index.js +170 -80
  160. package/dist/components/form/expressions/builder/index.js.map +1 -1
  161. package/dist/components/form/expressions/builder/item.d.ts +6 -2
  162. package/dist/components/form/expressions/builder/item.d.ts.map +1 -1
  163. package/dist/components/form/expressions/builder/item.js +19 -5
  164. package/dist/components/form/expressions/builder/item.js.map +1 -1
  165. package/dist/components/form/expressions/builder/renderTemplate.js +1 -1
  166. package/dist/components/form/expressions/builder/renderTemplate.js.map +1 -1
  167. package/dist/components/form/expressions/dpqlMockRecordPath.d.ts +11 -0
  168. package/dist/components/form/expressions/dpqlMockRecordPath.d.ts.map +1 -0
  169. package/dist/components/form/expressions/dpqlMockRecordPath.js +254 -0
  170. package/dist/components/form/expressions/dpqlMockRecordPath.js.map +1 -0
  171. package/dist/components/form/expressions/expressionOperands.d.ts +16 -0
  172. package/dist/components/form/expressions/expressionOperands.d.ts.map +1 -0
  173. package/dist/components/form/expressions/expressionOperands.js +97 -0
  174. package/dist/components/form/expressions/expressionOperands.js.map +1 -0
  175. package/dist/components/form/expressions/fieldPath.d.ts +24 -0
  176. package/dist/components/form/expressions/fieldPath.d.ts.map +1 -0
  177. package/dist/components/form/expressions/fieldPath.js +152 -0
  178. package/dist/components/form/expressions/fieldPath.js.map +1 -0
  179. package/dist/components/form/expressions/loneValue.d.ts +17 -0
  180. package/dist/components/form/expressions/loneValue.d.ts.map +1 -0
  181. package/dist/components/form/expressions/loneValue.js +33 -0
  182. package/dist/components/form/expressions/loneValue.js.map +1 -0
  183. package/dist/components/form/expressions/mockExpressions.d.ts.map +1 -1
  184. package/dist/components/form/expressions/mockExpressions.js +22 -5
  185. package/dist/components/form/expressions/mockExpressions.js.map +1 -1
  186. package/dist/components/form/expressions/renderExpressionToText.d.ts +2 -0
  187. package/dist/components/form/expressions/renderExpressionToText.d.ts.map +1 -1
  188. package/dist/components/form/expressions/renderExpressionToText.js +37 -25
  189. package/dist/components/form/expressions/renderExpressionToText.js.map +1 -1
  190. package/dist/components/form/expressions/textOfExpression.d.ts +18 -0
  191. package/dist/components/form/expressions/textOfExpression.d.ts.map +1 -0
  192. package/dist/components/form/expressions/textOfExpression.js +49 -0
  193. package/dist/components/form/expressions/textOfExpression.js.map +1 -0
  194. package/dist/components/form/expressions/types.d.ts +12 -0
  195. package/dist/components/form/expressions/types.d.ts.map +1 -1
  196. package/dist/components/form/expressions/types.js +6 -1
  197. package/dist/components/form/expressions/types.js.map +1 -1
  198. package/dist/components/form/expressions/useExpressionType.d.ts +26 -0
  199. package/dist/components/form/expressions/useExpressionType.d.ts.map +1 -0
  200. package/dist/components/form/expressions/useExpressionType.js +181 -0
  201. package/dist/components/form/expressions/useExpressionType.js.map +1 -0
  202. package/dist/components/form/expressions/useRenderExpression.d.ts.map +1 -1
  203. package/dist/components/form/expressions/useRenderExpression.js +13 -9
  204. package/dist/components/form/expressions/useRenderExpression.js.map +1 -1
  205. package/dist/components/form/expressions/wildcardExpressions.d.ts +27 -0
  206. package/dist/components/form/expressions/wildcardExpressions.d.ts.map +1 -0
  207. package/dist/components/form/expressions/wildcardExpressions.js +101 -0
  208. package/dist/components/form/expressions/wildcardExpressions.js.map +1 -0
  209. package/dist/components/form/fields/Field.d.ts.map +1 -1
  210. package/dist/components/form/fields/Field.js +39 -18
  211. package/dist/components/form/fields/Field.js.map +1 -1
  212. package/dist/components/form/fields/allowed-values/AllowedValues.d.ts +0 -7
  213. package/dist/components/form/fields/allowed-values/AllowedValues.d.ts.map +1 -1
  214. package/dist/components/form/fields/allowed-values/AllowedValues.js +46 -35
  215. package/dist/components/form/fields/allowed-values/AllowedValues.js.map +1 -1
  216. package/dist/components/form/fields/allowed-values/choicePicture.d.ts +37 -0
  217. package/dist/components/form/fields/allowed-values/choicePicture.d.ts.map +1 -0
  218. package/dist/components/form/fields/allowed-values/choicePicture.js +64 -0
  219. package/dist/components/form/fields/allowed-values/choicePicture.js.map +1 -0
  220. package/dist/components/form/fields/array/ArrayAuto.d.ts.map +1 -1
  221. package/dist/components/form/fields/array/ArrayAuto.js +24 -0
  222. package/dist/components/form/fields/array/ArrayAuto.js.map +1 -1
  223. package/dist/components/form/fields/array/ArrayAutoField.d.ts.map +1 -1
  224. package/dist/components/form/fields/array/ArrayAutoField.js +36 -13
  225. package/dist/components/form/fields/array/ArrayAutoField.js.map +1 -1
  226. package/dist/components/form/fields/auto/AutoFormField.d.ts +30 -1
  227. package/dist/components/form/fields/auto/AutoFormField.d.ts.map +1 -1
  228. package/dist/components/form/fields/auto/AutoFormField.js +123 -79
  229. package/dist/components/form/fields/auto/AutoFormField.js.map +1 -1
  230. package/dist/components/form/fields/auto/hostEditorValue.d.ts +30 -0
  231. package/dist/components/form/fields/auto/hostEditorValue.d.ts.map +1 -0
  232. package/dist/components/form/fields/auto/hostEditorValue.js +53 -0
  233. package/dist/components/form/fields/auto/hostEditorValue.js.map +1 -0
  234. package/dist/components/form/fields/binary/Binary.d.ts.map +1 -1
  235. package/dist/components/form/fields/binary/Binary.js +23 -3
  236. package/dist/components/form/fields/binary/Binary.js.map +1 -1
  237. package/dist/components/form/fields/boolean/Boolean.d.ts +5 -0
  238. package/dist/components/form/fields/boolean/Boolean.d.ts.map +1 -1
  239. package/dist/components/form/fields/boolean/Boolean.js +9 -1
  240. package/dist/components/form/fields/boolean/Boolean.js.map +1 -1
  241. package/dist/components/form/fields/color/Color.d.ts +103 -16
  242. package/dist/components/form/fields/color/Color.d.ts.map +1 -1
  243. package/dist/components/form/fields/color/Color.js +616 -16
  244. package/dist/components/form/fields/color/Color.js.map +1 -1
  245. package/dist/components/form/fields/emittedValues.d.ts +34 -3
  246. package/dist/components/form/fields/emittedValues.d.ts.map +1 -1
  247. package/dist/components/form/fields/emittedValues.js +24 -1
  248. package/dist/components/form/fields/emittedValues.js.map +1 -1
  249. package/dist/components/form/fields/file/File.d.ts +1 -1
  250. package/dist/components/form/fields/file/File.d.ts.map +1 -1
  251. package/dist/components/form/fields/file/File.js +4 -2
  252. package/dist/components/form/fields/file/File.js.map +1 -1
  253. package/dist/components/form/fields/long-string/LongString.d.ts +1 -7
  254. package/dist/components/form/fields/long-string/LongString.d.ts.map +1 -1
  255. package/dist/components/form/fields/long-string/LongString.js +30 -13
  256. package/dist/components/form/fields/long-string/LongString.js.map +1 -1
  257. package/dist/components/form/fields/markdown/MarkdownView.js +1 -1
  258. package/dist/components/form/fields/multi-select/MultiSelectFormField.d.ts.map +1 -1
  259. package/dist/components/form/fields/multi-select/MultiSelectFormField.js +10 -7
  260. package/dist/components/form/fields/multi-select/MultiSelectFormField.js.map +1 -1
  261. package/dist/components/form/fields/number/Number.d.ts +7 -4
  262. package/dist/components/form/fields/number/Number.d.ts.map +1 -1
  263. package/dist/components/form/fields/number/Number.js +45 -18
  264. package/dist/components/form/fields/number/Number.js.map +1 -1
  265. package/dist/components/form/fields/object/Object.d.ts +1 -1
  266. package/dist/components/form/fields/object/Object.d.ts.map +1 -1
  267. package/dist/components/form/fields/object/Object.js +4 -2
  268. package/dist/components/form/fields/object/Object.js.map +1 -1
  269. package/dist/components/form/fields/pendingEdit.d.ts +52 -0
  270. package/dist/components/form/fields/pendingEdit.d.ts.map +1 -0
  271. package/dist/components/form/fields/pendingEdit.js +79 -0
  272. package/dist/components/form/fields/pendingEdit.js.map +1 -0
  273. package/dist/components/form/fields/radio-group/RadioGroup.d.ts.map +1 -1
  274. package/dist/components/form/fields/radio-group/RadioGroup.js +8 -13
  275. package/dist/components/form/fields/radio-group/RadioGroup.js.map +1 -1
  276. package/dist/components/form/fields/rich-text/RichText.d.ts +20 -1
  277. package/dist/components/form/fields/rich-text/RichText.d.ts.map +1 -1
  278. package/dist/components/form/fields/rich-text/RichText.js +426 -91
  279. package/dist/components/form/fields/rich-text/RichText.js.map +1 -1
  280. package/dist/components/form/fields/rich-text/useTemplateTags.d.ts +18 -0
  281. package/dist/components/form/fields/rich-text/useTemplateTags.d.ts.map +1 -0
  282. package/dist/components/form/fields/rich-text/useTemplateTags.js +80 -0
  283. package/dist/components/form/fields/rich-text/useTemplateTags.js.map +1 -0
  284. package/dist/components/form/fields/schema-definition/CatalogLeafForm.d.ts.map +1 -1
  285. package/dist/components/form/fields/schema-definition/CatalogLeafForm.js +4 -1
  286. package/dist/components/form/fields/schema-definition/CatalogLeafForm.js.map +1 -1
  287. package/dist/components/form/fields/schema-definition/CatalogNodeEditor.d.ts.map +1 -1
  288. package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js +20 -5
  289. package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js.map +1 -1
  290. package/dist/components/form/fields/schema-definition/TableEditor.d.ts.map +1 -1
  291. package/dist/components/form/fields/schema-definition/TableEditor.js +10 -2
  292. package/dist/components/form/fields/schema-definition/TableEditor.js.map +1 -1
  293. package/dist/components/form/fields/schema-definition/index.d.ts.map +1 -1
  294. package/dist/components/form/fields/schema-definition/index.js +8 -4
  295. package/dist/components/form/fields/schema-definition/index.js.map +1 -1
  296. package/dist/components/form/fields/select/Select.d.ts +10 -1
  297. package/dist/components/form/fields/select/Select.d.ts.map +1 -1
  298. package/dist/components/form/fields/select/Select.js +28 -14
  299. package/dist/components/form/fields/select/Select.js.map +1 -1
  300. package/dist/components/form/fields/select/SelectCollection.d.ts +5 -0
  301. package/dist/components/form/fields/select/SelectCollection.d.ts.map +1 -1
  302. package/dist/components/form/fields/select/SelectCollection.js +25 -12
  303. package/dist/components/form/fields/select/SelectCollection.js.map +1 -1
  304. package/dist/components/form/fields/select/unavailableRow.d.ts +23 -0
  305. package/dist/components/form/fields/select/unavailableRow.d.ts.map +1 -0
  306. package/dist/components/form/fields/select/unavailableRow.js +55 -0
  307. package/dist/components/form/fields/select/unavailableRow.js.map +1 -0
  308. package/dist/components/form/fields/template/ReadOnlyTemplateTag.d.ts +11 -5
  309. package/dist/components/form/fields/template/ReadOnlyTemplateTag.d.ts.map +1 -1
  310. package/dist/components/form/fields/template/ReadOnlyTemplateTag.js +21 -5
  311. package/dist/components/form/fields/template/ReadOnlyTemplateTag.js.map +1 -1
  312. package/dist/components/form/fields/template/TemplateBrowser.d.ts +16 -0
  313. package/dist/components/form/fields/template/TemplateBrowser.d.ts.map +1 -0
  314. package/dist/components/form/fields/template/TemplateBrowser.js +89 -0
  315. package/dist/components/form/fields/template/TemplateBrowser.js.map +1 -0
  316. package/dist/components/form/fields/template/TemplateField.d.ts +105 -1
  317. package/dist/components/form/fields/template/TemplateField.d.ts.map +1 -1
  318. package/dist/components/form/fields/template/TemplateField.js +706 -168
  319. package/dist/components/form/fields/template/TemplateField.js.map +1 -1
  320. package/dist/components/form/fields/template/TemplatePicker.d.ts +54 -0
  321. package/dist/components/form/fields/template/TemplatePicker.d.ts.map +1 -0
  322. package/dist/components/form/fields/template/TemplatePicker.js +459 -0
  323. package/dist/components/form/fields/template/TemplatePicker.js.map +1 -0
  324. package/dist/components/form/fields/template/TemplateText.d.ts +0 -17
  325. package/dist/components/form/fields/template/TemplateText.d.ts.map +1 -1
  326. package/dist/components/form/fields/template/TemplateText.js +22 -16
  327. package/dist/components/form/fields/template/TemplateText.js.map +1 -1
  328. package/dist/components/form/fields/template/referenceNames.d.ts +63 -0
  329. package/dist/components/form/fields/template/referenceNames.d.ts.map +1 -0
  330. package/dist/components/form/fields/template/referenceNames.js +69 -0
  331. package/dist/components/form/fields/template/referenceNames.js.map +1 -0
  332. package/dist/components/form/fields/template/writtenAsText.d.ts +61 -0
  333. package/dist/components/form/fields/template/writtenAsText.d.ts.map +1 -0
  334. package/dist/components/form/fields/template/writtenAsText.js +204 -0
  335. package/dist/components/form/fields/template/writtenAsText.js.map +1 -0
  336. package/dist/components/form/index.d.ts +12 -2
  337. package/dist/components/form/index.d.ts.map +1 -1
  338. package/dist/components/form/index.js +25 -3
  339. package/dist/components/form/index.js.map +1 -1
  340. package/dist/components/form/typeSentenceForm.d.ts +17 -0
  341. package/dist/components/form/typeSentenceForm.d.ts.map +1 -0
  342. package/dist/components/form/typeSentenceForm.js +54 -0
  343. package/dist/components/form/typeSentenceForm.js.map +1 -0
  344. package/dist/components/imageLightbox/ImageLightbox.d.ts.map +1 -1
  345. package/dist/components/imageLightbox/ImageLightbox.js +19 -9
  346. package/dist/components/imageLightbox/ImageLightbox.js.map +1 -1
  347. package/dist/components/log/Log.d.ts.map +1 -1
  348. package/dist/components/log/Log.js +20 -8
  349. package/dist/components/log/Log.js.map +1 -1
  350. package/dist/components/menu/Menu.d.ts.map +1 -1
  351. package/dist/components/menu/Menu.js +19 -10
  352. package/dist/components/menu/Menu.js.map +1 -1
  353. package/dist/components/smartEditor/CompletionMenu.d.ts +53 -0
  354. package/dist/components/smartEditor/CompletionMenu.d.ts.map +1 -0
  355. package/dist/components/smartEditor/CompletionMenu.js +302 -0
  356. package/dist/components/smartEditor/CompletionMenu.js.map +1 -0
  357. package/dist/components/smartEditor/MarkdownDoc.d.ts +1 -1
  358. package/dist/components/smartEditor/MarkdownDoc.js +3 -3
  359. package/dist/components/smartEditor/MarkdownDoc.js.map +1 -1
  360. package/dist/components/smartEditor/SmartEditor.d.ts.map +1 -1
  361. package/dist/components/smartEditor/SmartEditor.js +616 -190
  362. package/dist/components/smartEditor/SmartEditor.js.map +1 -1
  363. package/dist/components/smartEditor/completionStyle.d.ts +28 -0
  364. package/dist/components/smartEditor/completionStyle.d.ts.map +1 -0
  365. package/dist/components/smartEditor/completionStyle.js +79 -0
  366. package/dist/components/smartEditor/completionStyle.js.map +1 -0
  367. package/dist/components/smartEditor/contextTitle.d.ts +10 -0
  368. package/dist/components/smartEditor/contextTitle.d.ts.map +1 -0
  369. package/dist/components/smartEditor/contextTitle.js +21 -0
  370. package/dist/components/smartEditor/contextTitle.js.map +1 -0
  371. package/dist/components/smartEditor/editingAids.d.ts +64 -0
  372. package/dist/components/smartEditor/editingAids.d.ts.map +1 -0
  373. package/dist/components/smartEditor/editingAids.js +213 -0
  374. package/dist/components/smartEditor/editingAids.js.map +1 -0
  375. package/dist/components/smartEditor/index.d.ts +6 -1
  376. package/dist/components/smartEditor/index.d.ts.map +1 -1
  377. package/dist/components/smartEditor/index.js +19 -1
  378. package/dist/components/smartEditor/index.js.map +1 -1
  379. package/dist/components/smartEditor/templateCompletions.d.ts +98 -0
  380. package/dist/components/smartEditor/templateCompletions.d.ts.map +1 -0
  381. package/dist/components/smartEditor/templateCompletions.js +380 -0
  382. package/dist/components/smartEditor/templateCompletions.js.map +1 -0
  383. package/dist/components/smartEditor/typedReferences.d.ts +34 -0
  384. package/dist/components/smartEditor/typedReferences.d.ts.map +1 -0
  385. package/dist/components/smartEditor/typedReferences.js +179 -0
  386. package/dist/components/smartEditor/typedReferences.js.map +1 -0
  387. package/dist/components/smartEditor/types.d.ts +116 -2
  388. package/dist/components/smartEditor/types.d.ts.map +1 -1
  389. package/dist/components/smartEditor/useEditingAids.d.ts +38 -0
  390. package/dist/components/smartEditor/useEditingAids.d.ts.map +1 -0
  391. package/dist/components/smartEditor/useEditingAids.js +392 -0
  392. package/dist/components/smartEditor/useEditingAids.js.map +1 -0
  393. package/dist/components/smartEditor/useLspAutocomplete.d.ts +106 -3
  394. package/dist/components/smartEditor/useLspAutocomplete.d.ts.map +1 -1
  395. package/dist/components/smartEditor/useLspAutocomplete.js +592 -149
  396. package/dist/components/smartEditor/useLspAutocomplete.js.map +1 -1
  397. package/dist/components/smartEditor/useLspHover.d.ts +33 -7
  398. package/dist/components/smartEditor/useLspHover.d.ts.map +1 -1
  399. package/dist/components/smartEditor/useLspHover.js +364 -35
  400. package/dist/components/smartEditor/useLspHover.js.map +1 -1
  401. package/dist/components/smartEditor/useLspSemanticTokens.js +1 -1
  402. package/dist/components/smartEditor/useLspSemanticTokens.js.map +1 -1
  403. package/dist/components/smartEditor/useLspSession.d.ts +6 -0
  404. package/dist/components/smartEditor/useLspSession.d.ts.map +1 -1
  405. package/dist/components/smartEditor/useLspSession.js +7 -6
  406. package/dist/components/smartEditor/useLspSession.js.map +1 -1
  407. package/dist/components/smartEditor/useLspSignatureHelp.d.ts.map +1 -1
  408. package/dist/components/smartEditor/useLspSignatureHelp.js +6 -11
  409. package/dist/components/smartEditor/useLspSignatureHelp.js.map +1 -1
  410. package/dist/components/smartEditor/useTabCameIn.d.ts +10 -0
  411. package/dist/components/smartEditor/useTabCameIn.d.ts.map +1 -0
  412. package/dist/components/smartEditor/useTabCameIn.js +42 -0
  413. package/dist/components/smartEditor/useTabCameIn.js.map +1 -0
  414. package/dist/components/supportTicket/AttachmentChips.d.ts.map +1 -1
  415. package/dist/components/supportTicket/AttachmentChips.js +15 -5
  416. package/dist/components/supportTicket/AttachmentChips.js.map +1 -1
  417. package/dist/components/supportTicket/InterfaceReferenceTags.d.ts +2 -3
  418. package/dist/components/supportTicket/InterfaceReferenceTags.d.ts.map +1 -1
  419. package/dist/components/supportTicket/InterfaceReferenceTags.js.map +1 -1
  420. package/dist/components/supportTicket/ReferencePicker.d.ts +9 -3
  421. package/dist/components/supportTicket/ReferencePicker.d.ts.map +1 -1
  422. package/dist/components/supportTicket/ReferencePicker.js +38 -23
  423. package/dist/components/supportTicket/ReferencePicker.js.map +1 -1
  424. package/dist/components/supportTicket/TicketHeader.d.ts +3 -4
  425. package/dist/components/supportTicket/TicketHeader.d.ts.map +1 -1
  426. package/dist/components/supportTicket/TicketHeader.js +21 -6
  427. package/dist/components/supportTicket/TicketHeader.js.map +1 -1
  428. package/dist/components/supportTicket/TicketMetaTags.d.ts +1 -1
  429. package/dist/components/supportTicket/TicketReplyBox.d.ts.map +1 -1
  430. package/dist/components/supportTicket/TicketReplyBox.js +10 -29
  431. package/dist/components/supportTicket/TicketReplyBox.js.map +1 -1
  432. package/dist/components/supportTicket/useLoadedImages.d.ts +0 -10
  433. package/dist/components/supportTicket/useLoadedImages.d.ts.map +1 -1
  434. package/dist/components/supportTicket/useLoadedImages.js +1 -63
  435. package/dist/components/supportTicket/useLoadedImages.js.map +1 -1
  436. package/dist/components/ticketReferences/TicketReferences.d.ts.map +1 -1
  437. package/dist/components/ticketReferences/TicketReferences.js +10 -9
  438. package/dist/components/ticketReferences/TicketReferences.js.map +1 -1
  439. package/dist/components/ticketThread/TicketThread.d.ts.map +1 -1
  440. package/dist/components/ticketThread/TicketThread.js +52 -21
  441. package/dist/components/ticketThread/TicketThread.js.map +1 -1
  442. package/dist/helpers/allowedValues.d.ts +21 -12
  443. package/dist/helpers/allowedValues.d.ts.map +1 -1
  444. package/dist/helpers/allowedValues.js +40 -20
  445. package/dist/helpers/allowedValues.js.map +1 -1
  446. package/dist/helpers/descriptionTooltip.d.ts +46 -0
  447. package/dist/helpers/descriptionTooltip.d.ts.map +1 -0
  448. package/dist/helpers/descriptionTooltip.js +76 -0
  449. package/dist/helpers/descriptionTooltip.js.map +1 -0
  450. package/dist/helpers/domProps.d.ts +5 -0
  451. package/dist/helpers/domProps.d.ts.map +1 -0
  452. package/dist/helpers/domProps.js +47 -0
  453. package/dist/helpers/domProps.js.map +1 -0
  454. package/dist/helpers/expressions.d.ts +115 -4
  455. package/dist/helpers/expressions.d.ts.map +1 -1
  456. package/dist/helpers/expressions.js +247 -29
  457. package/dist/helpers/expressions.js.map +1 -1
  458. package/dist/helpers/hoveringPointer.d.ts +26 -0
  459. package/dist/helpers/hoveringPointer.d.ts.map +1 -0
  460. package/dist/helpers/hoveringPointer.js +29 -0
  461. package/dist/helpers/hoveringPointer.js.map +1 -0
  462. package/dist/helpers/markdownText.d.ts +14 -0
  463. package/dist/helpers/markdownText.d.ts.map +1 -0
  464. package/dist/helpers/markdownText.js +160 -0
  465. package/dist/helpers/markdownText.js.map +1 -0
  466. package/dist/helpers/noDescription.d.ts +9 -0
  467. package/dist/helpers/noDescription.d.ts.map +1 -0
  468. package/dist/helpers/noDescription.js +13 -0
  469. package/dist/helpers/noDescription.js.map +1 -0
  470. package/dist/helpers/optionUiTypes.d.ts +2 -2
  471. package/dist/helpers/qorusTypeCatalogue.d.ts +147 -0
  472. package/dist/helpers/qorusTypeCatalogue.d.ts.map +1 -0
  473. package/dist/helpers/qorusTypeCatalogue.js +505 -0
  474. package/dist/helpers/qorusTypeCatalogue.js.map +1 -0
  475. package/dist/helpers/readableColors.d.ts +36 -0
  476. package/dist/helpers/readableColors.d.ts.map +1 -0
  477. package/dist/helpers/readableColors.js +116 -0
  478. package/dist/helpers/readableColors.js.map +1 -0
  479. package/dist/helpers/recordFieldReference.d.ts +15 -0
  480. package/dist/helpers/recordFieldReference.d.ts.map +1 -0
  481. package/dist/helpers/recordFieldReference.js +89 -0
  482. package/dist/helpers/recordFieldReference.js.map +1 -0
  483. package/dist/helpers/singleLineString.d.ts.map +1 -1
  484. package/dist/helpers/singleLineString.js +0 -1
  485. package/dist/helpers/singleLineString.js.map +1 -1
  486. package/dist/helpers/templateCatalogue.d.ts +104 -0
  487. package/dist/helpers/templateCatalogue.d.ts.map +1 -0
  488. package/dist/helpers/templateCatalogue.js +116 -0
  489. package/dist/helpers/templateCatalogue.js.map +1 -0
  490. package/dist/helpers/templateCatalogueContext.d.ts +19 -0
  491. package/dist/helpers/templateCatalogueContext.d.ts.map +1 -0
  492. package/dist/helpers/templateCatalogueContext.js +31 -0
  493. package/dist/helpers/templateCatalogueContext.js.map +1 -0
  494. package/dist/helpers/templateItems.d.ts +2 -2
  495. package/dist/helpers/templateItems.d.ts.map +1 -1
  496. package/dist/helpers/templateItems.js +6 -4
  497. package/dist/helpers/templateItems.js.map +1 -1
  498. package/dist/helpers/templateText.d.ts +1 -0
  499. package/dist/helpers/templateText.d.ts.map +1 -1
  500. package/dist/helpers/templateText.js +7 -3
  501. package/dist/helpers/templateText.js.map +1 -1
  502. package/dist/helpers/templateTree.d.ts +248 -0
  503. package/dist/helpers/templateTree.d.ts.map +1 -0
  504. package/dist/helpers/templateTree.js +892 -0
  505. package/dist/helpers/templateTree.js.map +1 -0
  506. package/dist/helpers/templateType.d.ts +28 -0
  507. package/dist/helpers/templateType.d.ts.map +1 -0
  508. package/dist/helpers/templateType.js +30 -0
  509. package/dist/helpers/templateType.js.map +1 -0
  510. package/dist/helpers/templates.d.ts +86 -16
  511. package/dist/helpers/templates.d.ts.map +1 -1
  512. package/dist/helpers/templates.js +305 -45
  513. package/dist/helpers/templates.js.map +1 -1
  514. package/dist/helpers/validations.d.ts +27 -0
  515. package/dist/helpers/validations.d.ts.map +1 -1
  516. package/dist/helpers/validations.js +169 -39
  517. package/dist/helpers/validations.js.map +1 -1
  518. package/dist/helpers/webLink.d.ts +8 -0
  519. package/dist/helpers/webLink.d.ts.map +1 -0
  520. package/dist/helpers/webLink.js +29 -0
  521. package/dist/helpers/webLink.js.map +1 -0
  522. package/dist/hooks/useQorusTypes.d.ts +12 -17
  523. package/dist/hooks/useQorusTypes.d.ts.map +1 -1
  524. package/dist/hooks/useQorusTypes.js +44 -172
  525. package/dist/hooks/useQorusTypes.js.map +1 -1
  526. package/dist/hooks/useReadableIntentShade.d.ts +9 -0
  527. package/dist/hooks/useReadableIntentShade.d.ts.map +1 -0
  528. package/dist/hooks/useReadableIntentShade.js +23 -0
  529. package/dist/hooks/useReadableIntentShade.js.map +1 -0
  530. package/dist/hooks/useReadableOpacity.d.ts +6 -0
  531. package/dist/hooks/useReadableOpacity.d.ts.map +1 -0
  532. package/dist/hooks/useReadableOpacity.js +17 -0
  533. package/dist/hooks/useReadableOpacity.js.map +1 -0
  534. package/dist/index.d.ts +8 -0
  535. package/dist/index.d.ts.map +1 -1
  536. package/dist/index.js +24 -1
  537. package/dist/index.js.map +1 -1
  538. package/dist/tracking/ui/ExperimentCard.d.ts +1 -1
  539. package/dist/tracking/ui/ExperimentCard.d.ts.map +1 -1
  540. package/dist/tracking/ui/ExperimentCard.js +26 -10
  541. package/dist/tracking/ui/ExperimentCard.js.map +1 -1
  542. package/dist/tracking/ui/card.d.ts +2 -2
  543. package/dist/tracking/ui/card.d.ts.map +1 -1
  544. package/dist/tracking/ui/card.js +2 -2
  545. package/dist/tracking/ui/card.js.map +1 -1
  546. package/dist/tracking/ui/readable.d.ts +14 -0
  547. package/dist/tracking/ui/readable.d.ts.map +1 -0
  548. package/dist/tracking/ui/readable.js +60 -0
  549. package/dist/tracking/ui/readable.js.map +1 -0
  550. package/dist/utils/fetch.d.ts +9 -2
  551. package/dist/utils/fetch.d.ts.map +1 -1
  552. package/dist/utils/fetch.js +6 -5
  553. package/dist/utils/fetch.js.map +1 -1
  554. package/dist/utils/lspClient.types.d.ts +2 -0
  555. package/dist/utils/lspClient.types.d.ts.map +1 -1
  556. package/dist/utils/websocket.d.ts +65 -2
  557. package/dist/utils/websocket.d.ts.map +1 -1
  558. package/dist/utils/websocket.js +276 -44
  559. package/dist/utils/websocket.js.map +1 -1
  560. package/package.json +14 -6
  561. package/.claude/CLAUDE.md +0 -317
  562. package/.tasks/EXPORT_EXPRESSION_BUILDER.md +0 -38
  563. package/.tasks/EXPRESSION_BUILDER_REPORT.md +0 -149
  564. package/.tasks/EXPRESSION_FIELD_SEAMS.md +0 -66
  565. package/.tasks/FIELD_STACK_REPORT.md +0 -234
  566. package/.tasks/FORM_ENGINE_COMPACT_READ_FIRST.md +0 -558
  567. package/.tasks/FORM_ENGINE_EXPRESSIONS.md +0 -197
  568. package/.tasks/FORM_ENGINE_OPTIONS_SYNC.md +0 -95
  569. package/.tasks/FORM_FIELD_EXTRAS.md +0 -72
  570. package/.tasks/INDEX.md +0 -111
  571. package/.tasks/LSP_SHARED_CONNECTION.md +0 -75
  572. package/.tasks/QONSOLE_ASSIST_FEATURES.md +0 -306
  573. package/.tasks/RENDER_EXPRESSION_LSP.md +0 -159
  574. package/.tasks/REQRAFT_AUTO_FIELD.md +0 -176
  575. package/.tasks/SCHEMA_DEFINITION_FIELD.md +0 -250
  576. package/.tasks/SMART_EDITOR_CONTEXT_AND_POLISH.md +0 -340
  577. package/.tasks/SMART_EDITOR_LSP_FEATURES.md +0 -299
  578. package/.tasks/SMART_EDITOR_REVIEW_FOLLOWUPS.md +0 -280
  579. package/.tasks/SMART_EDITOR_UX_POLISH.md +0 -383
  580. package/.tasks/SMART_EDITOR_VISUAL_POLISH.md +0 -246
  581. package/.tasks/STORY_NETWORK_ISOLATION.md +0 -98
  582. package/.tasks/TEMPLATE_TOKEN_GRAMMAR.md +0 -72
  583. package/CODE_OF_CONDUCT.md +0 -105
  584. package/CONTRIBUTING.MD +0 -78
  585. package/SECURITY.md +0 -3
  586. package/chromatic.config.json +0 -5
  587. package/design/COMPACT_ENGINE_REDESIGN.md +0 -156
  588. package/design/COMPACT_INFO_DISPLAY.md +0 -87
  589. package/design/COMPACT_PARITY.md +0 -85
  590. package/design/EXPRESSION_BUILDER_REPORT_STRATEGY.md +0 -92
  591. package/design/FORM_ENGINE_COMPACT.md +0 -300
  592. package/design/FORM_ENGINE_COMPACT_UX_PLAN.md +0 -353
  593. package/design/FORM_ENGINE_EXPRESSIONS.md +0 -257
  594. package/design/FORM_ENGINE_FIELD_MIGRATION.md +0 -419
  595. package/design/IDE_INTEGRATION.md +0 -64
  596. package/design/RENDER_EXPRESSION_TRANSPORT.md +0 -156
  597. package/design/SELECT_DIALOG_FLOOR.md +0 -86
  598. package/design/SMART_EDITOR_UX.md +0 -438
  599. package/design/TRACKING.md +0 -290
  600. package/design/UNAVAILABLE_ALLOWED_VALUES.md +0 -226
  601. package/dist/components/form/engine/formAppearance.d.ts +0 -49
  602. package/dist/components/form/engine/formAppearance.d.ts.map +0 -1
  603. package/dist/components/form/engine/formAppearance.js +0 -50
  604. package/dist/components/form/engine/formAppearance.js.map +0 -1
  605. package/dist/components/form/fields/ChoiceGroupHeading.d.ts +0 -21
  606. package/dist/components/form/fields/ChoiceGroupHeading.d.ts.map +0 -1
  607. package/dist/components/form/fields/ChoiceGroupHeading.js +0 -33
  608. package/dist/components/form/fields/ChoiceGroupHeading.js.map +0 -1
  609. package/dist/components/form/fields/allowed-values/savedValues.d.ts +0 -30
  610. package/dist/components/form/fields/allowed-values/savedValues.d.ts.map +0 -1
  611. package/dist/components/form/fields/allowed-values/savedValues.js +0 -39
  612. package/dist/components/form/fields/allowed-values/savedValues.js.map +0 -1
  613. package/dist/helpers/fieldDescription.d.ts +0 -16
  614. package/dist/helpers/fieldDescription.d.ts.map +0 -1
  615. package/dist/helpers/fieldDescription.js +0 -40
  616. package/dist/helpers/fieldDescription.js.map +0 -1
  617. package/src/components/Description/index.tsx +0 -254
  618. package/src/components/Description/markdownRendererContext.tsx +0 -29
  619. package/src/components/FocusedEditing/index.tsx +0 -50
  620. package/src/components/codeSize/index.tsx +0 -79
  621. package/src/components/composer/Composer.stories.tsx +0 -238
  622. package/src/components/composer/Composer.tsx +0 -554
  623. package/src/components/composer/helpers.ts +0 -74
  624. package/src/components/composer/index.ts +0 -2
  625. package/src/components/dpqlEditor/DpqlEditor.stories.tsx +0 -1183
  626. package/src/components/dpqlEditor/DpqlEditor.tsx +0 -219
  627. package/src/components/dpqlEditor/dpqlHelpers.ts +0 -287
  628. package/src/components/dpqlEditor/dpqlInserter.ts +0 -121
  629. package/src/components/dpqlEditor/dpqlProbe.ts +0 -165
  630. package/src/components/dpqlEditor/dpqlTags.ts +0 -114
  631. package/src/components/dpqlEditor/index.ts +0 -41
  632. package/src/components/dpqlEditor/types.ts +0 -203
  633. package/src/components/dpqlEditor/useDpqlProbe.ts +0 -33
  634. package/src/components/dpqlEditor/useDpqlSession.ts +0 -411
  635. package/src/components/form/engine/CompactRow.tsx +0 -2740
  636. package/src/components/form/engine/CompactToolbar.tsx +0 -399
  637. package/src/components/form/engine/FormEngine.stories.tsx +0 -9934
  638. package/src/components/form/engine/FormEngine.tsx +0 -4891
  639. package/src/components/form/engine/FormEngineAppearance.stories.tsx +0 -609
  640. package/src/components/form/engine/FormEngineRemote.stories.tsx +0 -679
  641. package/src/components/form/engine/FormEngineStickyHeaders.stories.tsx +0 -335
  642. package/src/components/form/engine/FormFieldsSkeleton.tsx +0 -82
  643. package/src/components/form/engine/OptionFieldMessages.tsx +0 -548
  644. package/src/components/form/engine/OptionsHelpDialog.tsx +0 -29
  645. package/src/components/form/engine/__fixtures__/basicFormOptions.ts +0 -309
  646. package/src/components/form/engine/__fixtures__/fieldChromeOptions.ts +0 -45
  647. package/src/components/form/engine/_structuredData/SchemaDataView.stories.tsx +0 -233
  648. package/src/components/form/engine/_structuredData/SchemaDataView.tsx +0 -755
  649. package/src/components/form/engine/_structuredData/StructuredDataView.stories.tsx +0 -85
  650. package/src/components/form/engine/_structuredData/StructuredDataView.tsx +0 -75
  651. package/src/components/form/engine/_structuredData/structuredData.ts +0 -145
  652. package/src/components/form/engine/compactRowContext.ts +0 -153
  653. package/src/components/form/engine/compactRowStyles.ts +0 -1087
  654. package/src/components/form/engine/compactToolbarContext.ts +0 -72
  655. package/src/components/form/engine/formAppearance.ts +0 -79
  656. package/src/components/form/engine/optionActions.ts +0 -128
  657. package/src/components/form/engine/optionsContext.ts +0 -24
  658. package/src/components/form/engine/readFirst.ts +0 -1090
  659. package/src/components/form/engine/rendererTypes.ts +0 -107
  660. package/src/components/form/engine/revealRow.ts +0 -123
  661. package/src/components/form/engine/rowFocus.ts +0 -112
  662. package/src/components/form/engine/rowMenuContext.ts +0 -159
  663. package/src/components/form/engine/rowOpenPicker.ts +0 -27
  664. package/src/components/form/engine/typeChoices.ts +0 -63
  665. package/src/components/form/engine/variants/FormEngineVariants.stories.tsx +0 -159
  666. package/src/components/form/engine/variants/VariantCalmTable.tsx +0 -244
  667. package/src/components/form/engine/variants/VariantCards.tsx +0 -212
  668. package/src/components/form/engine/variants/VariantFocus.tsx +0 -382
  669. package/src/components/form/engine/variants/VariantMinimal.tsx +0 -170
  670. package/src/components/form/engine/variants/focusDemo.ts +0 -145
  671. package/src/components/form/engine/variants/variantModel.ts +0 -223
  672. package/src/components/form/engine/variants/variantParts.tsx +0 -313
  673. package/src/components/form/expressions/DpqlRendering.tsx +0 -85
  674. package/src/components/form/expressions/ExpressionField.stories.tsx +0 -1395
  675. package/src/components/form/expressions/ExpressionField.tsx +0 -503
  676. package/src/components/form/expressions/argumentPresence.ts +0 -213
  677. package/src/components/form/expressions/builder/ExpressionBuilder.stories.tsx +0 -1683
  678. package/src/components/form/expressions/builder/argumentDetail.tsx +0 -17
  679. package/src/components/form/expressions/builder/argumentLabel.tsx +0 -146
  680. package/src/components/form/expressions/builder/argumentSlot.tsx +0 -101
  681. package/src/components/form/expressions/builder/argumentWrapper.tsx +0 -243
  682. package/src/components/form/expressions/builder/confirmMismatchedTypesModal.tsx +0 -120
  683. package/src/components/form/expressions/builder/confirmUnsupportedTypeModal.tsx +0 -69
  684. package/src/components/form/expressions/builder/index.tsx +0 -1545
  685. package/src/components/form/expressions/builder/item.tsx +0 -89
  686. package/src/components/form/expressions/builder/moveToPositionStrip.tsx +0 -156
  687. package/src/components/form/expressions/builder/renderTemplate.tsx +0 -42
  688. package/src/components/form/expressions/dpqlMockLanguage.ts +0 -566
  689. package/src/components/form/expressions/dpqlMockLsp.ts +0 -126
  690. package/src/components/form/expressions/mockExpressions.ts +0 -317
  691. package/src/components/form/expressions/renderExpressionToText.ts +0 -152
  692. package/src/components/form/expressions/types.ts +0 -110
  693. package/src/components/form/expressions/useExpressions.ts +0 -101
  694. package/src/components/form/expressions/useRenderExpression.ts +0 -165
  695. package/src/components/form/fields/ChoiceGroupHeading.tsx +0 -38
  696. package/src/components/form/fields/Field.stories.tsx +0 -143
  697. package/src/components/form/fields/Field.tsx +0 -734
  698. package/src/components/form/fields/allowed-values/AllowedValues.tsx +0 -321
  699. package/src/components/form/fields/allowed-values/savedValues.ts +0 -64
  700. package/src/components/form/fields/array/ArrayAuto.tsx +0 -237
  701. package/src/components/form/fields/array/ArrayAutoField.stories.tsx +0 -475
  702. package/src/components/form/fields/array/ArrayAutoField.tsx +0 -367
  703. package/src/components/form/fields/auto/AutoFormField.stories.tsx +0 -825
  704. package/src/components/form/fields/auto/AutoFormField.tsx +0 -1183
  705. package/src/components/form/fields/binary/Binary.stories.tsx +0 -122
  706. package/src/components/form/fields/binary/Binary.tsx +0 -91
  707. package/src/components/form/fields/boolean/Boolean.stories.tsx +0 -125
  708. package/src/components/form/fields/boolean/Boolean.tsx +0 -34
  709. package/src/components/form/fields/byte-size/ByteSize.stories.tsx +0 -87
  710. package/src/components/form/fields/byte-size/ByteSize.tsx +0 -58
  711. package/src/components/form/fields/color/Color.stories.tsx +0 -99
  712. package/src/components/form/fields/color/Color.tsx +0 -46
  713. package/src/components/form/fields/cron/Cron.stories.tsx +0 -68
  714. package/src/components/form/fields/cron/Cron.tsx +0 -80
  715. package/src/components/form/fields/date/Date.stories.tsx +0 -77
  716. package/src/components/form/fields/date/Date.tsx +0 -55
  717. package/src/components/form/fields/emittedValues.ts +0 -70
  718. package/src/components/form/fields/file/File.stories.tsx +0 -161
  719. package/src/components/form/fields/file/File.tsx +0 -227
  720. package/src/components/form/fields/long-string/LongString.stories.tsx +0 -147
  721. package/src/components/form/fields/long-string/LongString.tsx +0 -141
  722. package/src/components/form/fields/markdown/Markdown.stories.tsx +0 -76
  723. package/src/components/form/fields/markdown/Markdown.tsx +0 -81
  724. package/src/components/form/fields/markdown/MarkdownView.tsx +0 -222
  725. package/src/components/form/fields/multi-select/MultiSelectFormField.tsx +0 -140
  726. package/src/components/form/fields/number/Number.stories.tsx +0 -159
  727. package/src/components/form/fields/number/Number.tsx +0 -175
  728. package/src/components/form/fields/object/Object.stories.tsx +0 -398
  729. package/src/components/form/fields/object/Object.tsx +0 -255
  730. package/src/components/form/fields/radio-group/RadioGroup.stories.tsx +0 -95
  731. package/src/components/form/fields/radio-group/RadioGroup.tsx +0 -52
  732. package/src/components/form/fields/radio-group/images/java-96x128.png +0 -0
  733. package/src/components/form/fields/radio-group/images/python-129x128.png +0 -0
  734. package/src/components/form/fields/radio-group/images/qore-106x128.png +0 -0
  735. package/src/components/form/fields/rich-text/RichText.stories.tsx +0 -260
  736. package/src/components/form/fields/rich-text/RichText.tsx +0 -537
  737. package/src/components/form/fields/schema-definition/CatalogLeafForm.tsx +0 -242
  738. package/src/components/form/fields/schema-definition/CatalogNodeEditor.tsx +0 -758
  739. package/src/components/form/fields/schema-definition/Hint.tsx +0 -22
  740. package/src/components/form/fields/schema-definition/InlineValidationBanner.tsx +0 -138
  741. package/src/components/form/fields/schema-definition/Loader.tsx +0 -20
  742. package/src/components/form/fields/schema-definition/MigrationsTab.tsx +0 -187
  743. package/src/components/form/fields/schema-definition/SchemaDefinitionField.stories.tsx +0 -286
  744. package/src/components/form/fields/schema-definition/TableEditor.tsx +0 -155
  745. package/src/components/form/fields/schema-definition/TablesTab.tsx +0 -138
  746. package/src/components/form/fields/schema-definition/catalog.ts +0 -237
  747. package/src/components/form/fields/schema-definition/helpers.ts +0 -90
  748. package/src/components/form/fields/schema-definition/index.tsx +0 -418
  749. package/src/components/form/fields/schema-definition/mockCatalog.ts +0 -325
  750. package/src/components/form/fields/schema-definition/mockDefinition.ts +0 -111
  751. package/src/components/form/fields/schema-definition/referenceSuggestions.tsx +0 -152
  752. package/src/components/form/fields/schema-definition/starterTemplate.ts +0 -68
  753. package/src/components/form/fields/schema-definition/types.ts +0 -185
  754. package/src/components/form/fields/schema-definition/useSchemaOptionCatalog.ts +0 -49
  755. package/src/components/form/fields/select/Select.stories.tsx +0 -872
  756. package/src/components/form/fields/select/Select.tsx +0 -624
  757. package/src/components/form/fields/select/SelectCollection.tsx +0 -594
  758. package/src/components/form/fields/string/String.stories.tsx +0 -86
  759. package/src/components/form/fields/string/String.tsx +0 -43
  760. package/src/components/form/fields/template/ExampleValueModal.stories.tsx +0 -114
  761. package/src/components/form/fields/template/ExampleValueModal.tsx +0 -99
  762. package/src/components/form/fields/template/ReadOnlyTemplateTag.tsx +0 -47
  763. package/src/components/form/fields/template/TemplateField.stories.tsx +0 -1121
  764. package/src/components/form/fields/template/TemplateField.tsx +0 -1749
  765. package/src/components/form/fields/template/TemplateText.tsx +0 -115
  766. package/src/components/form/fields/template/__fixtures__/longExampleValue.ts +0 -7
  767. package/src/components/form/fields/template/__fixtures__/multiLevelTemplates.json +0 -147
  768. package/src/components/form/fields/template/__fixtures__/templates.json +0 -83
  769. package/src/components/form/fields/timeout/Timeout.stories.tsx +0 -228
  770. package/src/components/form/fields/timeout/Timeout.tsx +0 -87
  771. package/src/components/form/fields/url/Url.stories.tsx +0 -94
  772. package/src/components/form/fields/url/Url.tsx +0 -85
  773. package/src/components/form/index.tsx +0 -49
  774. package/src/components/imageLightbox/ImageLightbox.stories.tsx +0 -238
  775. package/src/components/imageLightbox/ImageLightbox.tsx +0 -238
  776. package/src/components/imageLightbox/index.ts +0 -1
  777. package/src/components/log/Log.stories.tsx +0 -333
  778. package/src/components/log/Log.tsx +0 -285
  779. package/src/components/menu/Menu.stories.tsx +0 -155
  780. package/src/components/menu/Menu.tsx +0 -312
  781. package/src/components/qonsoleSmartInput/QonsoleSmartInput.stories.tsx +0 -797
  782. package/src/components/qonsoleSmartInput/QonsoleSmartInput.tsx +0 -105
  783. package/src/components/qonsoleSmartInput/index.ts +0 -16
  784. package/src/components/qonsoleSmartInput/qonsoleInserter.ts +0 -77
  785. package/src/components/qonsoleSmartInput/types.ts +0 -133
  786. package/src/components/qonsoleSmartInput/useQonsoleSession.ts +0 -124
  787. package/src/components/searchFilterBar/SearchFilterBar.stories.tsx +0 -62
  788. package/src/components/searchFilterBar/SearchFilterBar.tsx +0 -144
  789. package/src/components/searchFilterBar/index.ts +0 -1
  790. package/src/components/smartEditor/MarkdownDoc.tsx +0 -190
  791. package/src/components/smartEditor/SmartEditor.stories.tsx +0 -475
  792. package/src/components/smartEditor/SmartEditor.tsx +0 -808
  793. package/src/components/smartEditor/__fixtures__/mockLspServer.ts +0 -205
  794. package/src/components/smartEditor/helpers.ts +0 -217
  795. package/src/components/smartEditor/index.ts +0 -35
  796. package/src/components/smartEditor/styling.ts +0 -45
  797. package/src/components/smartEditor/types.ts +0 -211
  798. package/src/components/smartEditor/useLspAutocomplete.ts +0 -758
  799. package/src/components/smartEditor/useLspDiagnosticDecorations.ts +0 -125
  800. package/src/components/smartEditor/useLspHover.ts +0 -230
  801. package/src/components/smartEditor/useLspSemanticTokens.ts +0 -298
  802. package/src/components/smartEditor/useLspSession.ts +0 -231
  803. package/src/components/smartEditor/useLspSignatureHelp.ts +0 -198
  804. package/src/components/supportTicket/AttachmentChips.stories.tsx +0 -171
  805. package/src/components/supportTicket/AttachmentChips.tsx +0 -147
  806. package/src/components/supportTicket/InterfaceReferenceTags.stories.tsx +0 -257
  807. package/src/components/supportTicket/InterfaceReferenceTags.tsx +0 -130
  808. package/src/components/supportTicket/ReferencePicker.stories.tsx +0 -580
  809. package/src/components/supportTicket/ReferencePicker.tsx +0 -573
  810. package/src/components/supportTicket/TicketConversation.stories.tsx +0 -120
  811. package/src/components/supportTicket/TicketHeader.stories.tsx +0 -183
  812. package/src/components/supportTicket/TicketHeader.tsx +0 -248
  813. package/src/components/supportTicket/TicketMetaTags.stories.tsx +0 -103
  814. package/src/components/supportTicket/TicketMetaTags.tsx +0 -85
  815. package/src/components/supportTicket/TicketReplyBox.stories.tsx +0 -357
  816. package/src/components/supportTicket/TicketReplyBox.tsx +0 -172
  817. package/src/components/supportTicket/__fixtures__/kindMarks.ts +0 -28
  818. package/src/components/supportTicket/attachmentAccess.ts +0 -97
  819. package/src/components/supportTicket/fileToAttachment.ts +0 -24
  820. package/src/components/supportTicket/index.ts +0 -10
  821. package/src/components/supportTicket/meta.ts +0 -206
  822. package/src/components/supportTicket/ticketModel.ts +0 -131
  823. package/src/components/supportTicket/useLoadedImages.ts +0 -93
  824. package/src/components/ticketReferences/TicketReferences.stories.tsx +0 -341
  825. package/src/components/ticketReferences/TicketReferences.tsx +0 -914
  826. package/src/components/ticketReferences/index.ts +0 -2
  827. package/src/components/ticketThread/TicketThread.stories.tsx +0 -898
  828. package/src/components/ticketThread/TicketThread.tsx +0 -706
  829. package/src/components/ticketThread/index.ts +0 -6
  830. package/src/contexts/FetchContext.tsx +0 -25
  831. package/src/contexts/ReqraftContext.tsx +0 -9
  832. package/src/contexts/StorageContext.tsx +0 -33
  833. package/src/global.d.ts +0 -4
  834. package/src/helpers/allowedValues.ts +0 -268
  835. package/src/helpers/choiceChip.ts +0 -227
  836. package/src/helpers/common.ts +0 -326
  837. package/src/helpers/dpqlDetection.ts +0 -209
  838. package/src/helpers/expressions.ts +0 -140
  839. package/src/helpers/fieldDescription.ts +0 -39
  840. package/src/helpers/optionUiTypes.ts +0 -199
  841. package/src/helpers/options.ts +0 -150
  842. package/src/helpers/providerValue.ts +0 -125
  843. package/src/helpers/scrollbar.ts +0 -32
  844. package/src/helpers/singleLineString.ts +0 -62
  845. package/src/helpers/templateItems.ts +0 -81
  846. package/src/helpers/templateText.ts +0 -350
  847. package/src/helpers/templates.ts +0 -602
  848. package/src/helpers/validations.ts +0 -2085
  849. package/src/hooks/useArgSchema.ts +0 -37
  850. package/src/hooks/useCoarsePointer.ts +0 -30
  851. package/src/hooks/useFetch/useFetch.stories.tsx +0 -379
  852. package/src/hooks/useFetch/useFetch.tsx +0 -154
  853. package/src/hooks/usePhoneViewport.ts +0 -34
  854. package/src/hooks/useQorusTypes.ts +0 -233
  855. package/src/hooks/useReqraftProperty.ts +0 -16
  856. package/src/hooks/useStorage/useStorage.stories.tsx +0 -168
  857. package/src/hooks/useStorage/useStorage.ts +0 -35
  858. package/src/hooks/useTemplates.ts +0 -123
  859. package/src/hooks/useValidation.ts +0 -9
  860. package/src/hooks/useWebSocket/useWebSocket.ts +0 -224
  861. package/src/hooks/useWebSocket/useWebsocket.stories.tsx +0 -640
  862. package/src/hooks/useWhyDidYouUpdate.ts +0 -38
  863. package/src/index.tsx +0 -86
  864. package/src/providers/FetchProvider.tsx +0 -40
  865. package/src/providers/ReqraftProvider.tsx +0 -52
  866. package/src/providers/StorageProvider.tsx +0 -131
  867. package/src/stores/currentUser/currentUser.stories.tsx +0 -100
  868. package/src/stores/currentUser/currentUser.tsx +0 -94
  869. package/src/stories/Data/fileFieldArgSchema.json +0 -86
  870. package/src/stories/Tests/utils.ts +0 -320
  871. package/src/stories/storyNetwork.ts +0 -92
  872. package/src/stories/tracking.tsx +0 -206
  873. package/src/tracking/browser/attach.ts +0 -186
  874. package/src/tracking/browser/env.ts +0 -78
  875. package/src/tracking/core/consent.ts +0 -37
  876. package/src/tracking/core/engagement.ts +0 -47
  877. package/src/tracking/core/experiments.ts +0 -258
  878. package/src/tracking/core/hash.ts +0 -26
  879. package/src/tracking/core/ids.ts +0 -25
  880. package/src/tracking/core/observable.ts +0 -23
  881. package/src/tracking/core/queue.ts +0 -131
  882. package/src/tracking/core/sections.ts +0 -166
  883. package/src/tracking/core/storage.ts +0 -69
  884. package/src/tracking/core/tracker.ts +0 -417
  885. package/src/tracking/core/types.ts +0 -162
  886. package/src/tracking/core/utm.ts +0 -23
  887. package/src/tracking/index.ts +0 -72
  888. package/src/tracking/markup.ts +0 -17
  889. package/src/tracking/react/Experiment.tsx +0 -44
  890. package/src/tracking/react/TrackingProvider.tsx +0 -56
  891. package/src/tracking/react/hooks.ts +0 -106
  892. package/src/tracking/react/index.ts +0 -13
  893. package/src/tracking/testing.ts +0 -108
  894. package/src/tracking/ui/ExperimentCard.stories.tsx +0 -296
  895. package/src/tracking/ui/ExperimentCard.tsx +0 -667
  896. package/src/tracking/ui/ExperimentsOverlay.stories.tsx +0 -155
  897. package/src/tracking/ui/ExperimentsOverlay.tsx +0 -437
  898. package/src/tracking/ui/anchor.ts +0 -180
  899. package/src/tracking/ui/card.ts +0 -464
  900. package/src/tracking/ui/client.ts +0 -117
  901. package/src/tracking/ui/index.ts +0 -77
  902. package/src/tracking/ui/types.ts +0 -110
  903. package/src/tracking/ui/useExperimentsAdmin.ts +0 -103
  904. package/src/types/Form.ts +0 -29
  905. package/src/types.ts +0 -14
  906. package/src/utils/datetime.ts +0 -10
  907. package/src/utils/fetch.ts +0 -457
  908. package/src/utils/lspClient.ts +0 -711
  909. package/src/utils/lspClient.types.ts +0 -211
  910. package/src/utils/queryUnlessCancelled.ts +0 -28
  911. package/src/utils/websocket.ts +0 -293
  912. package/vite.config.ts +0 -58
  913. package/vitest.config.ts +0 -69
@@ -9,23 +9,36 @@ var slate_1 = require("slate");
9
9
  var slate_react_1 = require("slate-react");
10
10
  var helpers_1 = require("../smartEditor/helpers");
11
11
  var dpqlHelpers_1 = require("./dpqlHelpers");
12
+ var templateCompletions_1 = require("../smartEditor/templateCompletions");
13
+ /** The word typed before the caret: a sigil (`@`, `$`) and what a name or a template goes on with after it. */
14
+ var TYPED_WORD = /[@$]?[\w.:{}-]*$/;
12
15
  /**
13
- * Walk back from the cursor to find the start of the partial token the
14
- * user typed. Matches the same heuristic the generic
15
- * `useLspAutocomplete.findTokenStart` uses internally — duplicated here
16
- * because the inserter runs at completion-accept time and needs to slice
17
- * the partial token before inserting the chosen completion.
16
+ * What is typed before the caret in the text it is in: what a pick may take the place of. Never anything across a
17
+ * chip: read from the whole text, the word before a caret just after a chip was the chip's own text
18
+ * (`$record:{pos}`), and a pick deleted the chip - an operator picked after `pos` took its place (qorus#646,
19
+ * David's review).
18
20
  */
19
- function findTokenStart(plainText, cursorOffset) {
20
- var i = cursorOffset - 1;
21
- while (i >= 0 && /[\w.:{}-]/.test(plainText[i])) {
22
- i--;
21
+ var typedBeforeCaret = function (editor) {
22
+ var _a;
23
+ var at = (_a = editor.selection) === null || _a === void 0 ? void 0 : _a.anchor;
24
+ if (!at) {
25
+ return '';
23
26
  }
24
- if (i >= 0 && /[@$]/.test(plainText[i])) {
25
- i--;
27
+ try {
28
+ var node = slate_1.Editor.node(editor, at.path)[0];
29
+ return typeof node.text === 'string' ?
30
+ node.text.slice(0, at.offset)
31
+ : '';
32
+ }
33
+ catch (_b) {
34
+ // a path the editor no longer has: nothing was typed there
35
+ return '';
26
36
  }
27
- return i + 1;
28
- }
37
+ };
38
+ /** An operator that joins two values (`==`, `&&`, `between`): written with a space on each side. */
39
+ var isJoiningOperator = function (item) {
40
+ return (item.kind === 14 || item.kind === 24) && !!item.label && !/^[[{.(!]/.test(item.label);
41
+ };
29
42
  /**
30
43
  * DPQL completion inserter. For tag completions (`@field` / `$template:…`),
31
44
  * inserts a Slate tag element so the value renders as an interactive chip.
@@ -37,7 +50,7 @@ function findTokenStart(plainText, cursorOffset) {
37
50
  * spec). Without `textEdit`, fall back to the find-token-start heuristic.
38
51
  */
39
52
  var dpqlCompletionInserter = function (item, editor, ctx) {
40
- var _a, _b, _c;
53
+ var _a, _b, _c, _d, _e;
41
54
  var ed = editor;
42
55
  var rawValue = (_c = (_b = (_a = item.textEdit) === null || _a === void 0 ? void 0 : _a.newText) !== null && _b !== void 0 ? _b : item.insertText) !== null && _c !== void 0 ? _c : item.label;
43
56
  // Expand LSP snippets (`insertTextFormat === 2`) so function templates
@@ -72,7 +85,7 @@ var dpqlCompletionInserter = function (item, editor, ctx) {
72
85
  try {
73
86
  slate_react_1.ReactEditor.focus(ed);
74
87
  }
75
- catch (_d) {
88
+ catch (_f) {
76
89
  // Editor may not be focusable in this render cycle.
77
90
  }
78
91
  return;
@@ -82,20 +95,23 @@ var dpqlCompletionInserter = function (item, editor, ctx) {
82
95
  // inserting at the cursor.
83
96
  if (!ed.selection)
84
97
  return;
85
- var charsToDelete;
86
- if (item.textEdit) {
87
- var startOffset = (0, helpers_1.lspPositionToOffset)(ctx.plainText, item.textEdit.range.start);
88
- charsToDelete = Math.max(0, ctx.cursorOffset - startOffset);
89
- }
90
- else {
91
- // Heuristic fallback — same logic the old DPQL inserter used.
92
- var tokenStart = findTokenStart(ctx.plainText, ctx.cursorOffset);
93
- charsToDelete = Math.max(0, ctx.cursorOffset - tokenStart);
98
+ // what the pick takes the place of: what was typed for it, in the text the caret is in
99
+ var typed = typedBeforeCaret(ed);
100
+ var charsToDelete = Math.min(typed.length, item.textEdit ?
101
+ Math.max(0, ctx.cursorOffset - (0, helpers_1.lspPositionToOffset)(ctx.plainText, item.textEdit.range.start))
102
+ : ((_e = (_d = TYPED_WORD.exec(typed)) === null || _d === void 0 ? void 0 : _d[0].length) !== null && _e !== void 0 ? _e : 0));
103
+ /* A reference picked after a chip it goes on from (`$data:receive_order` and `.` typed after it) is the one
104
+ reference: it takes the chip's place as well as what was typed (`chipExtendedBy`). */
105
+ var extended = (0, dpqlHelpers_1.isTagCompletion)(insertValue) ? (0, templateCompletions_1.chipExtendedBy)(ed, typed, insertValue) : undefined;
106
+ var deleted = extended ? typed.length : charsToDelete;
107
+ if (deleted > 0) {
108
+ var at = ed.selection.anchor;
109
+ slate_1.Transforms.delete(ed, {
110
+ at: { anchor: { path: at.path, offset: at.offset - deleted }, focus: at },
111
+ });
94
112
  }
95
- if (charsToDelete > 0) {
96
- for (var i = 0; i < charsToDelete; i++) {
97
- slate_1.Editor.deleteBackward(ed, { unit: 'character' });
98
- }
113
+ if (extended) {
114
+ slate_1.Transforms.removeNodes(ed, { at: extended });
99
115
  }
100
116
  if ((0, dpqlHelpers_1.isTagCompletion)(insertValue)) {
101
117
  var tagElement = {
@@ -107,15 +123,37 @@ var dpqlCompletionInserter = function (item, editor, ctx) {
107
123
  slate_1.Transforms.insertNodes(ed, tagElement);
108
124
  slate_1.Transforms.move(ed);
109
125
  }
126
+ else if (isJoiningOperator(item)) {
127
+ // an operator after a value is written apart from it, and from the value that follows it: `pos == `
128
+ var before = typedBeforeCaret(ed);
129
+ var joined = /\s$/.test(before) || (!before && !hasChipBefore(ed)) ? '' : ' ';
130
+ slate_1.Transforms.insertText(ed, "".concat(joined).concat(insertValue, " "));
131
+ }
110
132
  else {
111
133
  slate_1.Transforms.insertText(ed, insertValue);
112
134
  }
113
135
  try {
114
136
  slate_react_1.ReactEditor.focus(ed);
115
137
  }
116
- catch (_e) {
138
+ catch (_g) {
117
139
  // Editor may not be focused.
118
140
  }
119
141
  };
120
142
  exports.dpqlCompletionInserter = dpqlCompletionInserter;
143
+ /** Whether a chip is just before the caret, in the text the caret starts: a value an operator is written apart from. */
144
+ var hasChipBefore = function (editor) {
145
+ var _a, _b;
146
+ var at = (_a = editor.selection) === null || _a === void 0 ? void 0 : _a.anchor;
147
+ if (!at || at.offset !== 0) {
148
+ return false;
149
+ }
150
+ try {
151
+ var previous = slate_1.Editor.previous(editor, { at: at.path });
152
+ return ((_b = previous === null || previous === void 0 ? void 0 : previous[0]) === null || _b === void 0 ? void 0 : _b.type) === 'tag';
153
+ }
154
+ catch (_c) {
155
+ // nothing before it
156
+ return false;
157
+ }
158
+ };
121
159
  //# sourceMappingURL=dpqlInserter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dpqlInserter.js","sourceRoot":"","sources":["../../../src/components/dpqlEditor/dpqlInserter.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,uEAAuE;AACvE,yEAAyE;AACzE,sEAAsE;;;AAEtE,+BAAuD;AAEvD,2CAA0C;AAC1C,kDAA4E;AAE5E,6CAA6D;AAE7D;;;;;;GAMG;AACH,SAAS,cAAc,CAAC,SAAiB,EAAE,YAAoB;IAC7D,IAAI,CAAC,GAAG,YAAY,GAAG,CAAC,CAAC;IACzB,OAAO,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAChD,CAAC,EAAE,CAAC;IACN,CAAC;IACD,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACxC,CAAC,EAAE,CAAC;IACN,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,CAAC;AACf,CAAC;AAED;;;;;;;;;GASG;AACI,IAAM,sBAAsB,GAAwB,UAAC,IAAI,EAAE,MAAM,EAAE,GAAG;;IAC3E,IAAM,EAAE,GAAG,MAAkD,CAAC;IAC9D,IAAM,QAAQ,GAAG,MAAA,MAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,OAAO,mCAAI,IAAI,CAAC,UAAU,mCAAI,IAAI,CAAC,KAAK,CAAC;IACzE,uEAAuE;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U,CAAC,UAAU,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,CAAC;QACH,yBAAW,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC;IAAC,WAAM,CAAC;QACP,6BAA6B;IAC/B,CAAC;AACH,CAAC,CAAC;AA3FW,QAAA,sBAAsB,0BA2FjC;AAEF,wHAAwH;AACxH,IAAM,aAAa,GAAG,UAAC,MAAgD;;IACrE,IAAM,EAAE,GAAG,MAAA,MAAM,CAAC,SAAS,0CAAE,MAAM,CAAC;IACpC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,CAAC;QACH,IAAM,QAAQ,GAAG,cAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QAC1D,OAAO,CAAA,MAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,CAAC,CAAmC,0CAAE,IAAI,MAAK,KAAK,CAAC;IAC1E,CAAC;IAAC,WAAM,CAAC;QACP,oBAAoB;QACpB,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC"}
@@ -1,5 +1,7 @@
1
1
  import { IReqoreTagProps } from '@qoretechnologies/reqore/dist/components/Tag';
2
2
  import { IReqoreFormTemplates } from '@qoretechnologies/reqore/dist/components/Textarea';
3
+ import { IDescriptionTooltipOptions } from '../../helpers/descriptionTooltip';
4
+ import { TTypeSentenceForm } from '../../helpers/qorusTypeCatalogue';
3
5
  import { ISlateElement } from '../smartEditor/types';
4
6
  import { IDpqlFieldMeta } from './useDpqlSession';
5
7
  /** Color scheme for tag rendering, keyed by template prefix. */
@@ -21,13 +23,11 @@ export declare const FIELD_REF_COLOR: {
21
23
  export declare const getTemplatePrefixColor: (value: string) => string;
22
24
  export interface IDpqlTagRendererOptions {
23
25
  /**
24
- * Color template (`$…`) tags with the `info` intent instead of the per-prefix
25
- * palette. For read-only render surfaces (the Explain panel) that mirror
26
- * qorus-ide, where template tags are uniformly `info`. The server's
27
- * `renderExpression` carries no built-in / event-trigger metadata (verified
28
- * against the live LSP), so `info` is the whole scheme here — there's nothing
29
- * to promote to qorus purple / success. The editable editor omits this and
30
- * keeps the per-prefix palette for telling prefixes apart at a glance.
26
+ * Draw a template (`$…`) chip as every other template chip is drawn - in a value's text, a template field, a
27
+ * read row (`getTemplateTagStyle`): `info`, or the catalogue entry's built-in (`custom1`) or event-trigger
28
+ * (`success`) intent. The default (qorus#646, David's review: a template picked on a value's Value tab was blue
29
+ * there and gray on its Expression tab). `false` keeps the per-prefix palette (`TEMPLATE_COLORS`), which drew a
30
+ * prefix it did not list (`$record:`) gray.
31
31
  */
32
32
  templateTagsUseIntent?: boolean;
33
33
  /**
@@ -37,6 +37,16 @@ export interface IDpqlTagRendererOptions {
37
37
  * that is not found keeps its path.
38
38
  */
39
39
  templates?: IReqoreFormTemplates;
40
+ /**
41
+ * How the editor shows a description's card (`useDescriptionTooltips`): a field's and a template's
42
+ * description is markdown, drawn as the template list draws it, and opened by a tap on a touch screen.
43
+ */
44
+ descriptions?: IDescriptionTooltipOptions;
45
+ /**
46
+ * What a type is called inside a sentence (`useQorusTypes().getTypeSentenceForm`): a field's and a template's
47
+ * hover says its type in words with it. Without it, the built-in catalogue's words.
48
+ */
49
+ typeSentenceForm?: TTypeSentenceForm;
40
50
  }
41
51
  /**
42
52
  * Build the `tagRenderer` callback for DpqlEditor. Closes over the live
@@ -1 +1 @@
1
- {"version":3,"file":"dpqlTags.d.ts","sourceRoot":"","sources":["../../../src/components/dpqlEditor/dpqlTags.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AAEzF,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB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AA;CAAE,CAe3C,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;CAIlC,CAAC;AAEF,eAAO,MAAM,eAAe;;;;CAI3B,CAAC;AAEF,eAAO,MAAM,sBAAsB,UAAW,MAAM,KAAG,MAItD,CAAC;AAEF,MAAM,WAAW,uBAAuB;IACtC;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC;;;OAGG;IACH,YAAY,CAAC,EAAE,0BAA0B,CAAC;IAC1C;;;OAGG;IACH,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;CACtC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,EACzC,OAAO,GAAE,uBAA4B,SAqCxB,aAAa,KAAG,eAAe,CA4C7C"}
@@ -15,7 +15,13 @@ var __assign = (this && this.__assign) || function () {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.makeDpqlTagRenderer = exports.getTemplatePrefixColor = exports.FIELD_REF_COLOR = exports.DEFAULT_TEMPLATE_COLOR = exports.TEMPLATE_COLORS = void 0;
18
+ var noDescription_1 = require("../../helpers/noDescription");
19
+ var descriptionTooltip_1 = require("../../helpers/descriptionTooltip");
20
+ var qorusTypeCatalogue_1 = require("../../helpers/qorusTypeCatalogue");
18
21
  var templates_1 = require("../../helpers/templates");
22
+ var recordFieldReference_1 = require("../../helpers/recordFieldReference");
23
+ var templateText_1 = require("../../helpers/templateText");
24
+ var dpqlHelpers_1 = require("./dpqlHelpers");
19
25
  /** Color scheme for tag rendering, keyed by template prefix. */
20
26
  exports.TEMPLATE_COLORS = {
21
27
  data: { bg: 'rgba(56, 132, 244, 0.22)', border: 'rgba(56, 132, 244, 0.55)', fg: '#7bb8ff' },
@@ -55,31 +61,52 @@ exports.getTemplatePrefixColor = getTemplatePrefixColor;
55
61
  */
56
62
  function makeDpqlTagRenderer(fieldMeta, options) {
57
63
  if (options === void 0) { options = {}; }
58
- return function (tag) {
64
+ /**
65
+ * A template's chip, as every view draws it: its catalogue name and description, else `<key>: <path>`. A field
66
+ * gives its own hover (`field`): the record's description of it, or none, so that the server's hover is the one
67
+ * shown and the chip's text is not repeated as its tooltip.
68
+ */
69
+ var templateChip = function (template, field) {
59
70
  var _a, _b;
71
+ var named = options.templates && (0, templates_1.describeTemplateReference)(options.templates, template);
72
+ return __assign(__assign(__assign(__assign(__assign({}, templates_1.REFERENCE_CHIP_PROPS), { icon: 'ExchangeDollarLine' }), ((named === null || named === void 0 ? void 0 : named.item) ? { label: named.label }
73
+ : field ? { label: (0, templateText_1.templateChipLabel)(options.templates, template) }
74
+ : {})), ((named === null || named === void 0 ? void 0 : named.item) ?
75
+ {
76
+ tooltip: (0, templates_1.templateTooltip)(options.templates, template, (_a = options.descriptions) !== null && _a !== void 0 ? _a : {}, options.typeSentenceForm),
77
+ }
78
+ : field ? { tooltip: field.tooltip }
79
+ : {})), (options.templateTagsUseIntent === false ?
80
+ { color: (0, exports.getTemplatePrefixColor)(template) }
81
+ : (0, templates_1.getTemplateTagStyle)((_b = named === null || named === void 0 ? void 0 : named.item) === null || _b === void 0 ? void 0 : _b.metadata)));
82
+ };
83
+ return function (tag) {
84
+ var _a, _b, _c, _d, _e;
60
85
  var tagValue = (_a = tag.value) === null || _a === void 0 ? void 0 : _a.toString();
61
86
  if (!tagValue)
62
87
  return {};
63
- if (tagValue.startsWith('@')) {
64
- var fieldName = tagValue.slice(1);
88
+ /* A field, `@name`, quoted `@"order-id"` or with its accessors `@orders[*].id`, is a field of the record: the
89
+ same record field a value holds as `$record:{orders[*].id}`, and drawn as that chip - its color, its icon
90
+ and its label, `record: orders[*].id` (qorus#646, David: one chip for one record field). The record's own
91
+ description of the field is its hover where the catalogue does not describe it. */
92
+ var fieldName = (0, dpqlHelpers_1.dpqlFieldName)(tagValue);
93
+ if (fieldName !== undefined) {
65
94
  var meta = fieldMeta[fieldName];
66
- var tooltip = meta
67
- ? "".concat(meta.display_name || fieldName).concat(((_b = meta.type) === null || _b === void 0 ? void 0 : _b.name) ? " (".concat(meta.type.name, ")") : '').concat(meta.short_desc ? "\n".concat(meta.short_desc) : '')
95
+ /* the field's name heads the card, and under it what kind of value it is, in words, and its description:
96
+ its type was said raw, "Order ID (int)" (qorus#646) */
97
+ var typeSentenceForm = (_b = options.typeSentenceForm) !== null && _b !== void 0 ? _b : qorusTypeCatalogue_1.builtInTypeSentenceForm;
98
+ var tooltip = meta ?
99
+ (0, descriptionTooltip_1.descriptionTooltip)(
100
+ // what the field is, or why nothing says so (qorus#646)
101
+ (0, templates_1.describedWithType)(((_c = meta.short_desc) === null || _c === void 0 ? void 0 : _c.trim()) ? meta.short_desc : noDescription_1.NO_FIELD_DESCRIPTION, typeSentenceForm((_d = meta.type) === null || _d === void 0 ? void 0 : _d.name)), (_e = options.descriptions) !== null && _e !== void 0 ? _e : {}, meta.display_name || fieldName)
68
102
  : undefined;
69
- return {
70
- icon: 'Database2Line',
71
- color: exports.FIELD_REF_COLOR.fg,
72
- tooltip: tooltip,
73
- label: (meta === null || meta === void 0 ? void 0 : meta.display_name) || fieldName,
74
- };
103
+ var template = (0, recordFieldReference_1.recordTemplateOfReference)(tagValue);
104
+ return template ?
105
+ templateChip(template, { tooltip: tooltip })
106
+ : __assign(__assign(__assign({}, templates_1.REFERENCE_CHIP_PROPS), { icon: 'ExchangeDollarLine', label: fieldName, tooltip: tooltip }), (0, templates_1.getTemplateTagStyle)(undefined));
75
107
  }
76
108
  if (tagValue.startsWith('$')) {
77
- var named = options.templates && (0, templates_1.describeTemplateReference)(options.templates, tagValue);
78
- return __assign(__assign({ icon: 'ExchangeDollarLine' }, ((named === null || named === void 0 ? void 0 : named.item) ?
79
- { label: named.label, tooltip: (0, templates_1.templateTooltip)(options.templates, tagValue) }
80
- : {})), (options.templateTagsUseIntent
81
- ? { intent: 'info' }
82
- : { color: (0, exports.getTemplatePrefixColor)(tagValue) }));
109
+ return templateChip(tagValue);
83
110
  }
84
111
  return {};
85
112
  };
@@ -1 +1 @@
1
- {"version":3,"file":"dpqlTags.js","sourceRoot":"","sources":["../../../src/components/dpqlEditor/dpqlTags.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,wEAAwE;AACxE,mDAAmD;;;;;;;;;;;;;;AAInD,qDAAqF;AAIrF,gEAAgE;AACnD,QAAA,eAAe,GAGxB;IACF,IAAI,EAAS,EAAE,EAAE,EAAE,0BAA0B,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,EAAE,SAAS,EAAE;IAClG,KAAK,EAAQ,EAAE,EAAE,EAAE,0BAA0B,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,EAAE,SAAS,EAAE;IAClG,SAAS,EAAI,EAAE,EAAE,EAAE,0BAA0B,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,EAAE,SAAS,EAAE;IAClG,MAAM,EAAO,EAAE,EAAE,EAAE,0BAA0B,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,EAAE,SAAS,EAAE;IAClG,OAAO,EAAM,EAAE,EAAE,EAAE,0BAA0B,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,EAAE,SAAS,EAAE;IAClG,SAAS,EAAI,EAAE,EAAE,EAAE,0BAA0B,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,EAAE,SAAS,EAAE;IAClG,QAAQ,EAAK,EAAE,EAAE,EAAE,0BAA0B,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,EAAE,SAAS,EAAE;IAClG,OAAO,EAAM,EAAE,EAAE,EAAE,0BAA0B,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,EAAE,SAAS,EAAE;IAClG,MAAM,EAAO,EAAE,EAAE,EAAE,0BAA0B,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,EAAE,SAAS,EAAE;IAClG,IAAI,EAAS,EAAE,EAAE,EA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O,EAAE,CAAC;IACZ,CAAC,CAAC;AACJ,CAAC;AAnFD,kDAmFC"}
@@ -1,5 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { IReqoreFormTemplates } from '@qoretechnologies/reqore/dist/components/Textarea';
3
+ import { TSizes } from '@qoretechnologies/reqore/dist/constants/sizes';
4
+ import type { ITemplateCatalogue, ITemplateFieldContext } from '../../helpers/templateCatalogue';
5
+ import type { ILspDiagnostic } from '../../utils/lspClient.types';
6
+ import type { ISmartEditorDiagnosticAction } from '../smartEditor/types';
3
7
  export type { ISlateElement, ISlateText, TSlateNode, } from '../smartEditor/types';
4
8
  /** Result of a `dpql/parse` request — DPQL-specific custom LSP method. */
5
9
  export interface IDpqlParseResult {
@@ -26,6 +30,22 @@ export interface IDpqlParseResult {
26
30
  text: string;
27
31
  description?: string;
28
32
  };
33
+ /**
34
+ * How the server reads the expression as a condition, when the request asked (`condition: true`):
35
+ * `condition` (it gives true or false), `truthiness` (a number, a list, a hash: true unless it is zero or
36
+ * empty), `not_a_condition` (text, a date or a time), `unknown` (a result it cannot tell). A server that
37
+ * does not know the question leaves it out.
38
+ */
39
+ condition_reading?: 'condition' | 'truthiness' | 'not_a_condition' | 'unknown';
40
+ /**
41
+ * With `condition`: each part of the expression's `&&`, `||` and `!`, at any depth, with the type it gives
42
+ * and how a condition reads it - in the server's walk order (qorus#646). `condition_reading` is the worst of
43
+ * the expression's own reading and its parts'.
44
+ */
45
+ parts?: Array<{
46
+ type: string;
47
+ reading: 'condition' | 'truthiness' | 'not_a_condition' | 'unknown';
48
+ }>;
29
49
  diagnostics: Array<{
30
50
  range: {
31
51
  start: {
@@ -43,6 +63,14 @@ export interface IDpqlParseResult {
43
63
  source?: string;
44
64
  }>;
45
65
  }
66
+ /** What else a `dpql/parse` asks. */
67
+ export interface IDpqlParseOptions {
68
+ /**
69
+ * The expression is a condition: ask how the server reads it as one (`condition: true`) instead of
70
+ * whether it fits a type; the target type is not sent.
71
+ */
72
+ condition?: boolean;
73
+ }
46
74
  /** A record's fields for `dpql/setContext`: each field's type (or types) and an optional description. */
47
75
  export type TDpqlFields = Record<string, {
48
76
  type: string | string[];
@@ -84,28 +112,39 @@ export interface IDpqlEditorProps {
84
112
  * fields); pass e.g. `'200px'` for a taller multi-line code editor.
85
113
  */
86
114
  height?: string;
115
+ /**
116
+ * The size the text is drawn at, as a field of that size draws it - and the chips in it with it. A host
117
+ * drawing the same value as another field (an expression's Value and Expression tabs) gives both one size,
118
+ * so a reference is the same chip in either (qorus#646). The editor's own when not given.
119
+ */
120
+ size?: TSizes;
87
121
  /** Read-only mode. */
88
122
  readOnly?: boolean;
123
+ /** `off`: a line does not wrap; the text scrolls sideways inside its box. Default `on`. */
124
+ wordWrap?: 'on' | 'off';
125
+ /** The tallest the text's box grows; the text scrolls within it past that. Unlimited when not given. */
126
+ maxHeight?: string;
127
+ /** Each line's number before it, as a code editor shows them. Default off. */
128
+ lineNumbers?: boolean;
89
129
  /**
90
130
  * Whether to render diagnostic underlines. Default `true`. Set `false`
91
131
  * for display-only surfaces whose text is not valid DPQL — e.g. the
92
132
  * expression "Explain" panel (server rendering shown through the editor
93
- * for template chips + LSP token colours). See `ISmartEditorProps`.
133
+ * for template chips + LSP token colors). See `ISmartEditorProps`.
94
134
  */
95
135
  showDiagnostics?: boolean;
96
136
  /** Whether to show hover popovers (`textDocument/hover`). Default `true`. */
97
137
  enableHover?: boolean;
98
138
  /**
99
- * Color template (`$…`) tags with the `info` intent instead of the per-prefix
100
- * palette — for read-only render surfaces (the Explain panel) that mirror
101
- * qorus-ide's uniform `info` template styling. Default `false` (per-prefix
102
- * palette, the editor's at-a-glance prefix coloring).
139
+ * Draw a template (`$…`) chip as every other template chip is drawn (`getTemplateTagStyle`: `info`, or the
140
+ * catalogue entry's built-in or event-trigger intent). Default `true` (qorus#646): a template was blue in a
141
+ * value's text and gray in an expression's. `false` keeps the per-prefix palette (`TEMPLATE_COLORS`).
103
142
  */
104
143
  templateTagsUseIntent?: boolean;
105
144
  /**
106
145
  * The overlay shown while the language server connects. Forwarded to
107
146
  * `SmartEditor`; pass `null` to show the text without one — a read-only
108
- * rendering already has its text, and only its colours wait for the server.
147
+ * rendering already has its text, and only its colors wait for the server.
109
148
  */
110
149
  loadingIndicator?: React.ReactNode;
111
150
  /**
@@ -113,8 +152,50 @@ export interface IDpqlEditorProps {
113
152
  * is labelled by its catalogue name. See `IDpqlTagRendererOptions.templates`.
114
153
  */
115
154
  templates?: IReqoreFormTemplates;
155
+ /**
156
+ * The field's template catalogue (qorus#646): the template contexts it can use, each with its keys and whether it
157
+ * can be used whole. Asked of the language server (`dpql/templateCatalogue`) when not given; a server that does
158
+ * not know the request leaves the field with its own templates.
159
+ */
160
+ templateCatalogue?: ITemplateCatalogue;
161
+ /**
162
+ * Where the field is (`field_context`): its interface, its Qog and state, its record. Sent with the document's
163
+ * context and its catalogue request, so the server offers only the templates valid there.
164
+ */
165
+ fieldContext?: ITemplateFieldContext;
166
+ /**
167
+ * What can be done about one of the server's diagnostics, where the host can do it: a button beside what is said
168
+ * of it (a Qog's "Declare it" for a variable it does not declare, `qog_variable_undeclared`).
169
+ */
170
+ diagnosticAction?: (diagnostic: ILspDiagnostic) => ISmartEditorDiagnosticAction | undefined;
171
+ /**
172
+ * Whether the field's templates can be browsed as their catalogue nests them - their groups, a record's members -
173
+ * in the template picker, from a button beside the text (qorus#646, David's review: a DPQL field offered no
174
+ * hierarchy). A template chosen there is put in at the caret, where a value can go. On by default where the
175
+ * editor has templates and can be edited. A click in the empty text, a click on a chip and a group's row in the
176
+ * completion list open the same picker.
177
+ */
178
+ browseTemplates?: boolean;
116
179
  /** Called when the editor loses focus. */
117
180
  onBlur?: () => void;
181
+ /**
182
+ * Called once when there is no language server to talk to (connecting failed): the editor can show the
183
+ * text but not parse, serialize or complete it, so a host that needs those offers what works without it.
184
+ */
185
+ onUnavailable?: () => void;
186
+ /**
187
+ * Called once the language server can parse and write this editor's text: its session is connected and
188
+ * its context bound. A host that parses or serializes through the editor's ref waits for this rather
189
+ * than asking earlier, when the answer is "nothing parsed".
190
+ */
191
+ onReady?: () => void;
192
+ /**
193
+ * A click, a tap or Tab into the text asks what can be written at the caret, and the one completion list
194
+ * opens there: the server's completion, with the field's templates where a value can be written (qorus#646,
195
+ * David's decision). On by default where the editor has templates; an expression's Text view turns it on
196
+ * always.
197
+ */
198
+ completeOnClick?: boolean;
118
199
  /**
119
200
  * Opt-in to server-driven plain-text → Slate parsing via the LSP's
120
201
  * `dpql/toRichtext` custom method. When `true`, the editor calls
@@ -210,9 +291,14 @@ export interface IDpqlEditorRef {
210
291
  * `targetType` asks the server, in the same round trip, whether the
211
292
  * expression's result can satisfy that type — see `coercion_may_fail` on
212
293
  * the result. Omit it to ask only whether the text parses.
294
+ *
295
+ * `condition` asks instead how the server reads the expression as a condition (`condition_reading`).
296
+ */
297
+ parse: (text: string, targetType?: string, options?: IDpqlParseOptions) => Promise<IDpqlParseResult>;
298
+ /**
299
+ * Serialize an expression AST back to DPQL text via `dpql/serialize`: '' while the session has no client,
300
+ * and rejected, with the server's reason, when the server refuses to write the value.
213
301
  */
214
- parse: (text: string, targetType?: string) => Promise<IDpqlParseResult>;
215
- /** Serialize an expression AST back to DPQL text via `dpql/serialize`. */
216
302
  serialize: (expression: Record<string, any>) => Promise<string>;
217
303
  }
218
304
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/dpqlEditor/types.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AAEzF,YAAY,EACV,aAAa,EACb,UAAU,EACV,UAAU,GACX,MAAM,sBAAsB,CAAC;AAE9B,0EAA0E;AAC1E,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACvC,gEAAgE;IAChE,aAAa,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,EAAE,MAAM,OAAO,CAAC;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,KAAK,CAAC;YAAE,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC,CAAC;IACjF;;;;;;;;OAQG;IACH,KAAK,EAAE,CACL,IAAI,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,iBAAiB,KACxB,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC/B;;;OAGG;IACH,SAAS,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACjE"}
@@ -1,15 +1,20 @@
1
1
  import { ILspDiagnostic } from '../../utils/lspClient.types';
2
2
  import { IUseLspSessionResult } from '../smartEditor/useLspSession';
3
- import { IDpqlParseResult, TDpqlFields, TDpqlFsmContext } from './types';
3
+ import { IDpqlParseOptions, IDpqlParseResult, TDpqlFields, TDpqlFsmContext } from './types';
4
+ import type { ITemplateFieldContext } from '../../helpers/templateCatalogue';
4
5
  export interface IDpqlFieldMeta {
5
6
  display_name?: string;
6
7
  short_desc?: string;
7
8
  desc?: string;
9
+ /** Its type's name, and the fields of a field that is a record of its own (`@contact.email`). */
8
10
  type?: {
9
11
  name?: string;
12
+ fields?: Record<string, IDpqlFieldMeta>;
10
13
  };
11
14
  }
12
15
  export interface IUseDpqlSessionOptions {
16
+ /** Where the field is (`field_context`), sent with each context binding (qorus#646). */
17
+ fieldContext?: ITemplateFieldContext;
13
18
  /** Provider spec — `@<app>/<action>`, `datasource:name`, `connection:name`, or factory string. */
14
19
  provider?: string;
15
20
  /** Record type — `'record'` (default), `'create'`, or `'update'`. */
@@ -47,7 +52,7 @@ export interface IUseDpqlSessionResult {
47
52
  * `dpql/parse` — DPQL text → expression AST, and, when `targetType` is
48
53
  * given, whether that result can satisfy the type the field declares.
49
54
  */
50
- parse: (text: string, targetType?: string) => Promise<IDpqlParseResult>;
55
+ parse: (text: string, targetType?: string, options?: IDpqlParseOptions) => Promise<IDpqlParseResult>;
51
56
  /** `dpql/serialize` — expression AST → DPQL text. */
52
57
  serialize: (expression: Record<string, any>) => Promise<string>;
53
58
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"useDpqlSession.d.ts","sourceRoot":"","sources":["../../../src/components/dpqlEditor/useDpqlSession.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAiB,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAEzE,MAAM,WAAW,cAAc;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAsB;IACrC,kGAAkG;IAClG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yFAAyF;IACzF,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAED,MAAM,WAAW,qBAAqB;IACpC,sEAAsE;IACtE,OAAO,EAAE,oBAAoB,CAAC;IAC9B,oEAA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