@qoretechnologies/reqraft 0.10.62 → 0.10.63-pr.142.g0b675cd

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 (736) hide show
  1. package/README.md +21 -1
  2. package/dist/components/Description/describedControl.d.ts +48 -0
  3. package/dist/components/Description/describedControl.d.ts.map +1 -0
  4. package/dist/components/Description/describedControl.js +81 -0
  5. package/dist/components/Description/describedControl.js.map +1 -0
  6. package/dist/components/Description/index.d.ts.map +1 -1
  7. package/dist/components/Description/index.js +3 -2
  8. package/dist/components/Description/index.js.map +1 -1
  9. package/dist/components/colorValue/colorValue.d.ts +59 -0
  10. package/dist/components/colorValue/colorValue.d.ts.map +1 -0
  11. package/dist/components/colorValue/colorValue.js +245 -0
  12. package/dist/components/colorValue/colorValue.js.map +1 -0
  13. package/dist/components/colorValue/index.d.ts +34 -0
  14. package/dist/components/colorValue/index.d.ts.map +1 -0
  15. package/dist/components/colorValue/index.js +136 -0
  16. package/dist/components/colorValue/index.js.map +1 -0
  17. package/dist/components/colorValue/labels.d.ts +12 -0
  18. package/dist/components/colorValue/labels.d.ts.map +1 -0
  19. package/dist/components/colorValue/labels.js +11 -0
  20. package/dist/components/colorValue/labels.js.map +1 -0
  21. package/dist/components/composer/Composer.d.ts +1 -1
  22. package/dist/components/composer/Composer.d.ts.map +1 -1
  23. package/dist/components/composer/Composer.js +2 -2
  24. package/dist/components/composer/Composer.js.map +1 -1
  25. package/dist/components/dpqlEditor/DpqlEditor.d.ts.map +1 -1
  26. package/dist/components/dpqlEditor/DpqlEditor.js +25 -5
  27. package/dist/components/dpqlEditor/DpqlEditor.js.map +1 -1
  28. package/dist/components/dpqlEditor/dpqlHelpers.d.ts +10 -1
  29. package/dist/components/dpqlEditor/dpqlHelpers.d.ts.map +1 -1
  30. package/dist/components/dpqlEditor/dpqlHelpers.js +30 -13
  31. package/dist/components/dpqlEditor/dpqlHelpers.js.map +1 -1
  32. package/dist/components/dpqlEditor/dpqlTags.d.ts +11 -7
  33. package/dist/components/dpqlEditor/dpqlTags.d.ts.map +1 -1
  34. package/dist/components/dpqlEditor/dpqlTags.js +11 -6
  35. package/dist/components/dpqlEditor/dpqlTags.js.map +1 -1
  36. package/dist/components/dpqlEditor/types.d.ts +47 -8
  37. package/dist/components/dpqlEditor/types.d.ts.map +1 -1
  38. package/dist/components/dpqlEditor/useDpqlSession.d.ts +2 -2
  39. package/dist/components/dpqlEditor/useDpqlSession.d.ts.map +1 -1
  40. package/dist/components/dpqlEditor/useDpqlSession.js +16 -7
  41. package/dist/components/dpqlEditor/useDpqlSession.js.map +1 -1
  42. package/dist/components/form/engine/CompactRow.d.ts.map +1 -1
  43. package/dist/components/form/engine/CompactRow.js +151 -83
  44. package/dist/components/form/engine/CompactRow.js.map +1 -1
  45. package/dist/components/form/engine/CompactToolbar.d.ts.map +1 -1
  46. package/dist/components/form/engine/CompactToolbar.js +29 -3
  47. package/dist/components/form/engine/CompactToolbar.js.map +1 -1
  48. package/dist/components/form/engine/FormEngine.d.ts +34 -1
  49. package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
  50. package/dist/components/form/engine/FormEngine.js +487 -87
  51. package/dist/components/form/engine/FormEngine.js.map +1 -1
  52. package/dist/components/form/engine/HiddenFieldsNote.d.ts +28 -0
  53. package/dist/components/form/engine/HiddenFieldsNote.d.ts.map +1 -0
  54. package/dist/components/form/engine/HiddenFieldsNote.js +32 -0
  55. package/dist/components/form/engine/HiddenFieldsNote.js.map +1 -0
  56. package/dist/components/form/engine/OptionFieldMessages.d.ts.map +1 -1
  57. package/dist/components/form/engine/OptionFieldMessages.js +24 -3
  58. package/dist/components/form/engine/OptionFieldMessages.js.map +1 -1
  59. package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts +2 -2
  60. package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts.map +1 -1
  61. package/dist/components/form/engine/_structuredData/SchemaDataView.js +12 -6
  62. package/dist/components/form/engine/_structuredData/SchemaDataView.js.map +1 -1
  63. package/dist/components/form/engine/compactRowContext.d.ts +19 -0
  64. package/dist/components/form/engine/compactRowContext.d.ts.map +1 -1
  65. package/dist/components/form/engine/compactRowContext.js.map +1 -1
  66. package/dist/components/form/engine/compactRowStyles.d.ts +0 -1
  67. package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
  68. package/dist/components/form/engine/compactRowStyles.js +12 -20
  69. package/dist/components/form/engine/compactRowStyles.js.map +1 -1
  70. package/dist/components/form/engine/compactToolbarColors.d.ts +16 -0
  71. package/dist/components/form/engine/compactToolbarColors.d.ts.map +1 -0
  72. package/dist/components/form/engine/compactToolbarColors.js +21 -0
  73. package/dist/components/form/engine/compactToolbarColors.js.map +1 -0
  74. package/dist/components/form/engine/readFirst.d.ts +24 -8
  75. package/dist/components/form/engine/readFirst.d.ts.map +1 -1
  76. package/dist/components/form/engine/readFirst.js +77 -109
  77. package/dist/components/form/engine/readFirst.js.map +1 -1
  78. package/dist/components/form/engine/readFirstColors.d.ts +30 -0
  79. package/dist/components/form/engine/readFirstColors.d.ts.map +1 -0
  80. package/dist/components/form/engine/readFirstColors.js +51 -0
  81. package/dist/components/form/engine/readFirstColors.js.map +1 -0
  82. package/dist/components/form/engine/rowFocus.d.ts +2 -0
  83. package/dist/components/form/engine/rowFocus.d.ts.map +1 -1
  84. package/dist/components/form/engine/rowFocus.js +26 -3
  85. package/dist/components/form/engine/rowFocus.js.map +1 -1
  86. package/dist/components/form/engine/typeChoices.d.ts +1 -1
  87. package/dist/components/form/engine/variants/VariantCalmTable.d.ts.map +1 -1
  88. package/dist/components/form/engine/variants/VariantCalmTable.js +2 -1
  89. package/dist/components/form/engine/variants/VariantCalmTable.js.map +1 -1
  90. package/dist/components/form/engine/variants/VariantCards.d.ts.map +1 -1
  91. package/dist/components/form/engine/variants/VariantCards.js +2 -1
  92. package/dist/components/form/engine/variants/VariantCards.js.map +1 -1
  93. package/dist/components/form/engine/variants/VariantFocus.js +1 -1
  94. package/dist/components/form/engine/variants/VariantFocus.js.map +1 -1
  95. package/dist/components/form/engine/variants/VariantMinimal.d.ts.map +1 -1
  96. package/dist/components/form/engine/variants/VariantMinimal.js +2 -1
  97. package/dist/components/form/engine/variants/VariantMinimal.js.map +1 -1
  98. package/dist/components/form/engine/variants/variantParts.d.ts +1 -1
  99. package/dist/components/form/engine/variants/variantParts.d.ts.map +1 -1
  100. package/dist/components/form/engine/variants/variantParts.js +25 -17
  101. package/dist/components/form/engine/variants/variantParts.js.map +1 -1
  102. package/dist/components/form/expressions/DpqlRendering.d.ts +1 -1
  103. package/dist/components/form/expressions/DpqlRendering.d.ts.map +1 -1
  104. package/dist/components/form/expressions/DpqlRendering.js +3 -3
  105. package/dist/components/form/expressions/DpqlRendering.js.map +1 -1
  106. package/dist/components/form/expressions/ExpressionField.d.ts +41 -3
  107. package/dist/components/form/expressions/ExpressionField.d.ts.map +1 -1
  108. package/dist/components/form/expressions/ExpressionField.js +396 -99
  109. package/dist/components/form/expressions/ExpressionField.js.map +1 -1
  110. package/dist/components/form/expressions/builder/argumentDetail.d.ts.map +1 -1
  111. package/dist/components/form/expressions/builder/argumentDetail.js +4 -1
  112. package/dist/components/form/expressions/builder/argumentDetail.js.map +1 -1
  113. package/dist/components/form/expressions/builder/argumentLabel.d.ts.map +1 -1
  114. package/dist/components/form/expressions/builder/argumentLabel.js +27 -9
  115. package/dist/components/form/expressions/builder/argumentLabel.js.map +1 -1
  116. package/dist/components/form/expressions/builder/argumentWrapper.d.ts.map +1 -1
  117. package/dist/components/form/expressions/builder/argumentWrapper.js +4 -2
  118. package/dist/components/form/expressions/builder/argumentWrapper.js.map +1 -1
  119. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.d.ts.map +1 -1
  120. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js +5 -4
  121. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js.map +1 -1
  122. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.d.ts +1 -1
  123. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.d.ts.map +1 -1
  124. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js +6 -3
  125. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js.map +1 -1
  126. package/dist/components/form/expressions/builder/index.d.ts +24 -2
  127. package/dist/components/form/expressions/builder/index.d.ts.map +1 -1
  128. package/dist/components/form/expressions/builder/index.js +121 -77
  129. package/dist/components/form/expressions/builder/index.js.map +1 -1
  130. package/dist/components/form/expressions/builder/item.d.ts +6 -2
  131. package/dist/components/form/expressions/builder/item.d.ts.map +1 -1
  132. package/dist/components/form/expressions/builder/item.js +19 -5
  133. package/dist/components/form/expressions/builder/item.js.map +1 -1
  134. package/dist/components/form/expressions/builder/renderTemplate.js +1 -1
  135. package/dist/components/form/expressions/builder/renderTemplate.js.map +1 -1
  136. package/dist/components/form/expressions/expressionOperands.d.ts +16 -0
  137. package/dist/components/form/expressions/expressionOperands.d.ts.map +1 -0
  138. package/dist/components/form/expressions/expressionOperands.js +97 -0
  139. package/dist/components/form/expressions/expressionOperands.js.map +1 -0
  140. package/dist/components/form/expressions/mockExpressions.d.ts.map +1 -1
  141. package/dist/components/form/expressions/mockExpressions.js +22 -5
  142. package/dist/components/form/expressions/mockExpressions.js.map +1 -1
  143. package/dist/components/form/expressions/renderExpressionToText.d.ts +2 -0
  144. package/dist/components/form/expressions/renderExpressionToText.d.ts.map +1 -1
  145. package/dist/components/form/expressions/renderExpressionToText.js +35 -9
  146. package/dist/components/form/expressions/renderExpressionToText.js.map +1 -1
  147. package/dist/components/form/expressions/textOfExpression.d.ts +18 -0
  148. package/dist/components/form/expressions/textOfExpression.d.ts.map +1 -0
  149. package/dist/components/form/expressions/textOfExpression.js +37 -0
  150. package/dist/components/form/expressions/textOfExpression.js.map +1 -0
  151. package/dist/components/form/expressions/useExpressionType.d.ts +26 -0
  152. package/dist/components/form/expressions/useExpressionType.d.ts.map +1 -0
  153. package/dist/components/form/expressions/useExpressionType.js +181 -0
  154. package/dist/components/form/expressions/useExpressionType.js.map +1 -0
  155. package/dist/components/form/expressions/useRenderExpression.d.ts.map +1 -1
  156. package/dist/components/form/expressions/useRenderExpression.js +7 -7
  157. package/dist/components/form/expressions/useRenderExpression.js.map +1 -1
  158. package/dist/components/form/fields/Field.d.ts.map +1 -1
  159. package/dist/components/form/fields/Field.js +20 -7
  160. package/dist/components/form/fields/Field.js.map +1 -1
  161. package/dist/components/form/fields/allowed-values/AllowedValues.d.ts.map +1 -1
  162. package/dist/components/form/fields/allowed-values/AllowedValues.js +17 -4
  163. package/dist/components/form/fields/allowed-values/AllowedValues.js.map +1 -1
  164. package/dist/components/form/fields/array/ArrayAuto.d.ts.map +1 -1
  165. package/dist/components/form/fields/array/ArrayAuto.js +24 -0
  166. package/dist/components/form/fields/array/ArrayAuto.js.map +1 -1
  167. package/dist/components/form/fields/array/ArrayAutoField.d.ts.map +1 -1
  168. package/dist/components/form/fields/array/ArrayAutoField.js +36 -13
  169. package/dist/components/form/fields/array/ArrayAutoField.js.map +1 -1
  170. package/dist/components/form/fields/auto/AutoFormField.d.ts +20 -1
  171. package/dist/components/form/fields/auto/AutoFormField.d.ts.map +1 -1
  172. package/dist/components/form/fields/auto/AutoFormField.js +81 -36
  173. package/dist/components/form/fields/auto/AutoFormField.js.map +1 -1
  174. package/dist/components/form/fields/auto/hostEditorValue.d.ts +30 -0
  175. package/dist/components/form/fields/auto/hostEditorValue.d.ts.map +1 -0
  176. package/dist/components/form/fields/auto/hostEditorValue.js +53 -0
  177. package/dist/components/form/fields/auto/hostEditorValue.js.map +1 -0
  178. package/dist/components/form/fields/binary/Binary.d.ts.map +1 -1
  179. package/dist/components/form/fields/binary/Binary.js +23 -3
  180. package/dist/components/form/fields/binary/Binary.js.map +1 -1
  181. package/dist/components/form/fields/boolean/Boolean.d.ts +5 -0
  182. package/dist/components/form/fields/boolean/Boolean.d.ts.map +1 -1
  183. package/dist/components/form/fields/boolean/Boolean.js +9 -1
  184. package/dist/components/form/fields/boolean/Boolean.js.map +1 -1
  185. package/dist/components/form/fields/color/Color.d.ts +103 -16
  186. package/dist/components/form/fields/color/Color.d.ts.map +1 -1
  187. package/dist/components/form/fields/color/Color.js +611 -16
  188. package/dist/components/form/fields/color/Color.js.map +1 -1
  189. package/dist/components/form/fields/emittedValues.d.ts +34 -3
  190. package/dist/components/form/fields/emittedValues.d.ts.map +1 -1
  191. package/dist/components/form/fields/emittedValues.js +24 -1
  192. package/dist/components/form/fields/emittedValues.js.map +1 -1
  193. package/dist/components/form/fields/file/File.d.ts +1 -1
  194. package/dist/components/form/fields/file/File.d.ts.map +1 -1
  195. package/dist/components/form/fields/file/File.js +4 -2
  196. package/dist/components/form/fields/file/File.js.map +1 -1
  197. package/dist/components/form/fields/long-string/LongString.d.ts.map +1 -1
  198. package/dist/components/form/fields/long-string/LongString.js +17 -3
  199. package/dist/components/form/fields/long-string/LongString.js.map +1 -1
  200. package/dist/components/form/fields/markdown/MarkdownView.js +1 -1
  201. package/dist/components/form/fields/multi-select/MultiSelectFormField.d.ts.map +1 -1
  202. package/dist/components/form/fields/multi-select/MultiSelectFormField.js +4 -1
  203. package/dist/components/form/fields/multi-select/MultiSelectFormField.js.map +1 -1
  204. package/dist/components/form/fields/number/Number.d.ts +6 -0
  205. package/dist/components/form/fields/number/Number.d.ts.map +1 -1
  206. package/dist/components/form/fields/number/Number.js +41 -6
  207. package/dist/components/form/fields/number/Number.js.map +1 -1
  208. package/dist/components/form/fields/object/Object.d.ts +1 -1
  209. package/dist/components/form/fields/object/Object.d.ts.map +1 -1
  210. package/dist/components/form/fields/object/Object.js +4 -2
  211. package/dist/components/form/fields/object/Object.js.map +1 -1
  212. package/dist/components/form/fields/pendingEdit.d.ts +52 -0
  213. package/dist/components/form/fields/pendingEdit.d.ts.map +1 -0
  214. package/dist/components/form/fields/pendingEdit.js +79 -0
  215. package/dist/components/form/fields/pendingEdit.js.map +1 -0
  216. package/dist/components/form/fields/rich-text/RichText.d.ts +8 -1
  217. package/dist/components/form/fields/rich-text/RichText.d.ts.map +1 -1
  218. package/dist/components/form/fields/rich-text/RichText.js +190 -81
  219. package/dist/components/form/fields/rich-text/RichText.js.map +1 -1
  220. package/dist/components/form/fields/rich-text/useTemplateTags.d.ts +18 -0
  221. package/dist/components/form/fields/rich-text/useTemplateTags.d.ts.map +1 -0
  222. package/dist/components/form/fields/rich-text/useTemplateTags.js +49 -0
  223. package/dist/components/form/fields/rich-text/useTemplateTags.js.map +1 -0
  224. package/dist/components/form/fields/schema-definition/CatalogLeafForm.d.ts.map +1 -1
  225. package/dist/components/form/fields/schema-definition/CatalogLeafForm.js +4 -1
  226. package/dist/components/form/fields/schema-definition/CatalogLeafForm.js.map +1 -1
  227. package/dist/components/form/fields/schema-definition/CatalogNodeEditor.d.ts.map +1 -1
  228. package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js +20 -5
  229. package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js.map +1 -1
  230. package/dist/components/form/fields/schema-definition/TableEditor.d.ts.map +1 -1
  231. package/dist/components/form/fields/schema-definition/TableEditor.js +10 -2
  232. package/dist/components/form/fields/schema-definition/TableEditor.js.map +1 -1
  233. package/dist/components/form/fields/schema-definition/index.d.ts.map +1 -1
  234. package/dist/components/form/fields/schema-definition/index.js +8 -4
  235. package/dist/components/form/fields/schema-definition/index.js.map +1 -1
  236. package/dist/components/form/fields/select/Select.d.ts +2 -0
  237. package/dist/components/form/fields/select/Select.d.ts.map +1 -1
  238. package/dist/components/form/fields/select/Select.js +19 -10
  239. package/dist/components/form/fields/select/Select.js.map +1 -1
  240. package/dist/components/form/fields/select/SelectCollection.d.ts.map +1 -1
  241. package/dist/components/form/fields/select/SelectCollection.js +8 -2
  242. package/dist/components/form/fields/select/SelectCollection.js.map +1 -1
  243. package/dist/components/form/fields/select/unavailableRow.d.ts +23 -0
  244. package/dist/components/form/fields/select/unavailableRow.d.ts.map +1 -0
  245. package/dist/components/form/fields/select/unavailableRow.js +55 -0
  246. package/dist/components/form/fields/select/unavailableRow.js.map +1 -0
  247. package/dist/components/form/fields/template/ReadOnlyTemplateTag.d.ts +5 -5
  248. package/dist/components/form/fields/template/ReadOnlyTemplateTag.d.ts.map +1 -1
  249. package/dist/components/form/fields/template/ReadOnlyTemplateTag.js +11 -4
  250. package/dist/components/form/fields/template/ReadOnlyTemplateTag.js.map +1 -1
  251. package/dist/components/form/fields/template/TemplateBrowser.d.ts +22 -0
  252. package/dist/components/form/fields/template/TemplateBrowser.d.ts.map +1 -0
  253. package/dist/components/form/fields/template/TemplateBrowser.js +54 -0
  254. package/dist/components/form/fields/template/TemplateBrowser.js.map +1 -0
  255. package/dist/components/form/fields/template/TemplateField.d.ts +83 -1
  256. package/dist/components/form/fields/template/TemplateField.d.ts.map +1 -1
  257. package/dist/components/form/fields/template/TemplateField.js +535 -85
  258. package/dist/components/form/fields/template/TemplateField.js.map +1 -1
  259. package/dist/components/form/fields/template/TemplateText.d.ts +0 -17
  260. package/dist/components/form/fields/template/TemplateText.d.ts.map +1 -1
  261. package/dist/components/form/fields/template/TemplateText.js +8 -4
  262. package/dist/components/form/fields/template/TemplateText.js.map +1 -1
  263. package/dist/components/form/fields/template/writtenAsText.d.ts +55 -0
  264. package/dist/components/form/fields/template/writtenAsText.d.ts.map +1 -0
  265. package/dist/components/form/fields/template/writtenAsText.js +188 -0
  266. package/dist/components/form/fields/template/writtenAsText.js.map +1 -0
  267. package/dist/components/form/index.d.ts +10 -0
  268. package/dist/components/form/index.d.ts.map +1 -1
  269. package/dist/components/form/index.js +23 -1
  270. package/dist/components/form/index.js.map +1 -1
  271. package/dist/components/imageLightbox/ImageLightbox.d.ts.map +1 -1
  272. package/dist/components/imageLightbox/ImageLightbox.js +19 -7
  273. package/dist/components/imageLightbox/ImageLightbox.js.map +1 -1
  274. package/dist/components/log/Log.d.ts.map +1 -1
  275. package/dist/components/log/Log.js +15 -7
  276. package/dist/components/log/Log.js.map +1 -1
  277. package/dist/components/menu/Menu.d.ts.map +1 -1
  278. package/dist/components/menu/Menu.js +19 -10
  279. package/dist/components/menu/Menu.js.map +1 -1
  280. package/dist/components/smartEditor/CompletionMenu.d.ts +43 -0
  281. package/dist/components/smartEditor/CompletionMenu.d.ts.map +1 -0
  282. package/dist/components/smartEditor/CompletionMenu.js +196 -0
  283. package/dist/components/smartEditor/CompletionMenu.js.map +1 -0
  284. package/dist/components/smartEditor/MarkdownDoc.d.ts +1 -1
  285. package/dist/components/smartEditor/MarkdownDoc.js +1 -1
  286. package/dist/components/smartEditor/MarkdownDoc.js.map +1 -1
  287. package/dist/components/smartEditor/SmartEditor.d.ts.map +1 -1
  288. package/dist/components/smartEditor/SmartEditor.js +51 -136
  289. package/dist/components/smartEditor/SmartEditor.js.map +1 -1
  290. package/dist/components/smartEditor/completionStyle.d.ts +27 -0
  291. package/dist/components/smartEditor/completionStyle.d.ts.map +1 -0
  292. package/dist/components/smartEditor/completionStyle.js +66 -0
  293. package/dist/components/smartEditor/completionStyle.js.map +1 -0
  294. package/dist/components/smartEditor/index.d.ts +5 -1
  295. package/dist/components/smartEditor/index.d.ts.map +1 -1
  296. package/dist/components/smartEditor/index.js +19 -1
  297. package/dist/components/smartEditor/index.js.map +1 -1
  298. package/dist/components/smartEditor/templateCompletions.d.ts +18 -0
  299. package/dist/components/smartEditor/templateCompletions.d.ts.map +1 -0
  300. package/dist/components/smartEditor/templateCompletions.js +94 -0
  301. package/dist/components/smartEditor/templateCompletions.js.map +1 -0
  302. package/dist/components/smartEditor/types.d.ts +12 -1
  303. package/dist/components/smartEditor/types.d.ts.map +1 -1
  304. package/dist/components/smartEditor/useLspAutocomplete.d.ts +32 -0
  305. package/dist/components/smartEditor/useLspAutocomplete.d.ts.map +1 -1
  306. package/dist/components/smartEditor/useLspAutocomplete.js +228 -118
  307. package/dist/components/smartEditor/useLspAutocomplete.js.map +1 -1
  308. package/dist/components/smartEditor/useLspHover.d.ts +22 -7
  309. package/dist/components/smartEditor/useLspHover.d.ts.map +1 -1
  310. package/dist/components/smartEditor/useLspHover.js +86 -17
  311. package/dist/components/smartEditor/useLspHover.js.map +1 -1
  312. package/dist/components/smartEditor/useLspSemanticTokens.js +1 -1
  313. package/dist/components/smartEditor/useLspSemanticTokens.js.map +1 -1
  314. package/dist/components/smartEditor/useLspSession.d.ts +6 -0
  315. package/dist/components/smartEditor/useLspSession.d.ts.map +1 -1
  316. package/dist/components/smartEditor/useLspSession.js +7 -6
  317. package/dist/components/smartEditor/useLspSession.js.map +1 -1
  318. package/dist/components/supportTicket/AttachmentChips.d.ts.map +1 -1
  319. package/dist/components/supportTicket/AttachmentChips.js +15 -5
  320. package/dist/components/supportTicket/AttachmentChips.js.map +1 -1
  321. package/dist/components/supportTicket/ReferencePicker.d.ts +9 -2
  322. package/dist/components/supportTicket/ReferencePicker.d.ts.map +1 -1
  323. package/dist/components/supportTicket/ReferencePicker.js +27 -6
  324. package/dist/components/supportTicket/ReferencePicker.js.map +1 -1
  325. package/dist/components/supportTicket/TicketHeader.d.ts +3 -4
  326. package/dist/components/supportTicket/TicketHeader.d.ts.map +1 -1
  327. package/dist/components/supportTicket/TicketHeader.js +20 -2
  328. package/dist/components/supportTicket/TicketHeader.js.map +1 -1
  329. package/dist/components/supportTicket/TicketMetaTags.d.ts +1 -1
  330. package/dist/components/ticketReferences/TicketReferences.d.ts.map +1 -1
  331. package/dist/components/ticketReferences/TicketReferences.js +9 -4
  332. package/dist/components/ticketReferences/TicketReferences.js.map +1 -1
  333. package/dist/components/ticketThread/TicketThread.d.ts.map +1 -1
  334. package/dist/components/ticketThread/TicketThread.js +36 -11
  335. package/dist/components/ticketThread/TicketThread.js.map +1 -1
  336. package/dist/helpers/descriptionTooltip.d.ts +43 -0
  337. package/dist/helpers/descriptionTooltip.d.ts.map +1 -0
  338. package/dist/helpers/descriptionTooltip.js +70 -0
  339. package/dist/helpers/descriptionTooltip.js.map +1 -0
  340. package/dist/helpers/domProps.d.ts +5 -0
  341. package/dist/helpers/domProps.d.ts.map +1 -0
  342. package/dist/helpers/domProps.js +47 -0
  343. package/dist/helpers/domProps.js.map +1 -0
  344. package/dist/helpers/expressions.d.ts +107 -2
  345. package/dist/helpers/expressions.d.ts.map +1 -1
  346. package/dist/helpers/expressions.js +223 -8
  347. package/dist/helpers/expressions.js.map +1 -1
  348. package/dist/helpers/hoveringPointer.d.ts +26 -0
  349. package/dist/helpers/hoveringPointer.d.ts.map +1 -0
  350. package/dist/helpers/hoveringPointer.js +29 -0
  351. package/dist/helpers/hoveringPointer.js.map +1 -0
  352. package/dist/helpers/markdownText.d.ts +14 -0
  353. package/dist/helpers/markdownText.d.ts.map +1 -0
  354. package/dist/helpers/markdownText.js +160 -0
  355. package/dist/helpers/markdownText.js.map +1 -0
  356. package/dist/helpers/qorusTypeCatalogue.d.ts +53 -0
  357. package/dist/helpers/qorusTypeCatalogue.d.ts.map +1 -0
  358. package/dist/helpers/qorusTypeCatalogue.js +262 -0
  359. package/dist/helpers/qorusTypeCatalogue.js.map +1 -0
  360. package/dist/helpers/readableColors.d.ts +36 -0
  361. package/dist/helpers/readableColors.d.ts.map +1 -0
  362. package/dist/helpers/readableColors.js +116 -0
  363. package/dist/helpers/readableColors.js.map +1 -0
  364. package/dist/helpers/templateItems.d.ts +2 -2
  365. package/dist/helpers/templateItems.d.ts.map +1 -1
  366. package/dist/helpers/templateItems.js +6 -4
  367. package/dist/helpers/templateItems.js.map +1 -1
  368. package/dist/helpers/templates.d.ts +26 -1
  369. package/dist/helpers/templates.d.ts.map +1 -1
  370. package/dist/helpers/templates.js +41 -6
  371. package/dist/helpers/templates.js.map +1 -1
  372. package/dist/helpers/validations.d.ts +9 -0
  373. package/dist/helpers/validations.d.ts.map +1 -1
  374. package/dist/helpers/validations.js +139 -33
  375. package/dist/helpers/validations.js.map +1 -1
  376. package/dist/hooks/useQorusTypes.d.ts +7 -15
  377. package/dist/hooks/useQorusTypes.d.ts.map +1 -1
  378. package/dist/hooks/useQorusTypes.js +25 -166
  379. package/dist/hooks/useQorusTypes.js.map +1 -1
  380. package/dist/hooks/useReadableIntentShade.d.ts +9 -0
  381. package/dist/hooks/useReadableIntentShade.d.ts.map +1 -0
  382. package/dist/hooks/useReadableIntentShade.js +23 -0
  383. package/dist/hooks/useReadableIntentShade.js.map +1 -0
  384. package/dist/hooks/useReadableOpacity.d.ts +6 -0
  385. package/dist/hooks/useReadableOpacity.d.ts.map +1 -0
  386. package/dist/hooks/useReadableOpacity.js +17 -0
  387. package/dist/hooks/useReadableOpacity.js.map +1 -0
  388. package/dist/index.d.ts +1 -0
  389. package/dist/index.d.ts.map +1 -1
  390. package/dist/index.js +1 -0
  391. package/dist/index.js.map +1 -1
  392. package/dist/tracking/ui/ExperimentCard.d.ts +1 -1
  393. package/dist/tracking/ui/ExperimentCard.d.ts.map +1 -1
  394. package/dist/tracking/ui/ExperimentCard.js +26 -10
  395. package/dist/tracking/ui/ExperimentCard.js.map +1 -1
  396. package/dist/tracking/ui/card.d.ts +2 -2
  397. package/dist/tracking/ui/card.d.ts.map +1 -1
  398. package/dist/tracking/ui/card.js +2 -2
  399. package/dist/tracking/ui/card.js.map +1 -1
  400. package/dist/tracking/ui/readable.d.ts +14 -0
  401. package/dist/tracking/ui/readable.d.ts.map +1 -0
  402. package/dist/tracking/ui/readable.js +60 -0
  403. package/dist/tracking/ui/readable.js.map +1 -0
  404. package/package.json +14 -5
  405. package/.claude/CLAUDE.md +0 -317
  406. package/.tasks/EXPORT_EXPRESSION_BUILDER.md +0 -38
  407. package/.tasks/EXPRESSION_BUILDER_REPORT.md +0 -149
  408. package/.tasks/EXPRESSION_FIELD_SEAMS.md +0 -66
  409. package/.tasks/FIELD_STACK_REPORT.md +0 -234
  410. package/.tasks/FORM_ENGINE_COMPACT_READ_FIRST.md +0 -558
  411. package/.tasks/FORM_ENGINE_EXPRESSIONS.md +0 -197
  412. package/.tasks/FORM_ENGINE_OPTIONS_SYNC.md +0 -95
  413. package/.tasks/FORM_FIELD_EXTRAS.md +0 -72
  414. package/.tasks/INDEX.md +0 -111
  415. package/.tasks/LSP_SHARED_CONNECTION.md +0 -75
  416. package/.tasks/QONSOLE_ASSIST_FEATURES.md +0 -306
  417. package/.tasks/RENDER_EXPRESSION_LSP.md +0 -159
  418. package/.tasks/REQRAFT_AUTO_FIELD.md +0 -176
  419. package/.tasks/SCHEMA_DEFINITION_FIELD.md +0 -250
  420. package/.tasks/SMART_EDITOR_CONTEXT_AND_POLISH.md +0 -340
  421. package/.tasks/SMART_EDITOR_LSP_FEATURES.md +0 -299
  422. package/.tasks/SMART_EDITOR_REVIEW_FOLLOWUPS.md +0 -280
  423. package/.tasks/SMART_EDITOR_UX_POLISH.md +0 -383
  424. package/.tasks/SMART_EDITOR_VISUAL_POLISH.md +0 -246
  425. package/.tasks/STORY_NETWORK_ISOLATION.md +0 -98
  426. package/.tasks/TEMPLATE_TOKEN_GRAMMAR.md +0 -72
  427. package/CODE_OF_CONDUCT.md +0 -105
  428. package/CONTRIBUTING.MD +0 -78
  429. package/SECURITY.md +0 -3
  430. package/chromatic.config.json +0 -5
  431. package/design/COMPACT_ENGINE_REDESIGN.md +0 -156
  432. package/design/COMPACT_INFO_DISPLAY.md +0 -87
  433. package/design/COMPACT_PARITY.md +0 -85
  434. package/design/EXPRESSION_BUILDER_REPORT_STRATEGY.md +0 -92
  435. package/design/FORM_ENGINE_COMPACT.md +0 -300
  436. package/design/FORM_ENGINE_COMPACT_UX_PLAN.md +0 -353
  437. package/design/FORM_ENGINE_EXPRESSIONS.md +0 -257
  438. package/design/FORM_ENGINE_FIELD_MIGRATION.md +0 -419
  439. package/design/IDE_INTEGRATION.md +0 -64
  440. package/design/RENDER_EXPRESSION_TRANSPORT.md +0 -156
  441. package/design/SELECT_DIALOG_FLOOR.md +0 -86
  442. package/design/SMART_EDITOR_UX.md +0 -438
  443. package/design/TRACKING.md +0 -290
  444. package/design/UNAVAILABLE_ALLOWED_VALUES.md +0 -226
  445. package/src/components/Description/index.tsx +0 -254
  446. package/src/components/Description/markdownRendererContext.tsx +0 -29
  447. package/src/components/FocusedEditing/index.tsx +0 -50
  448. package/src/components/codeSize/index.tsx +0 -79
  449. package/src/components/composer/Composer.stories.tsx +0 -238
  450. package/src/components/composer/Composer.tsx +0 -554
  451. package/src/components/composer/helpers.ts +0 -74
  452. package/src/components/composer/index.ts +0 -2
  453. package/src/components/dpqlEditor/DpqlEditor.stories.tsx +0 -1183
  454. package/src/components/dpqlEditor/DpqlEditor.tsx +0 -219
  455. package/src/components/dpqlEditor/dpqlHelpers.ts +0 -287
  456. package/src/components/dpqlEditor/dpqlInserter.ts +0 -121
  457. package/src/components/dpqlEditor/dpqlProbe.ts +0 -165
  458. package/src/components/dpqlEditor/dpqlTags.ts +0 -114
  459. package/src/components/dpqlEditor/index.ts +0 -41
  460. package/src/components/dpqlEditor/types.ts +0 -203
  461. package/src/components/dpqlEditor/useDpqlProbe.ts +0 -33
  462. package/src/components/dpqlEditor/useDpqlSession.ts +0 -411
  463. package/src/components/form/engine/CompactRow.tsx +0 -2620
  464. package/src/components/form/engine/CompactToolbar.tsx +0 -330
  465. package/src/components/form/engine/FormEngine.stories.tsx +0 -9920
  466. package/src/components/form/engine/FormEngine.tsx +0 -4569
  467. package/src/components/form/engine/FormEngineRemote.stories.tsx +0 -679
  468. package/src/components/form/engine/FormEngineStickyHeaders.stories.tsx +0 -331
  469. package/src/components/form/engine/FormFieldsSkeleton.tsx +0 -82
  470. package/src/components/form/engine/OptionFieldMessages.tsx +0 -477
  471. package/src/components/form/engine/OptionsHelpDialog.tsx +0 -29
  472. package/src/components/form/engine/__fixtures__/basicFormOptions.ts +0 -309
  473. package/src/components/form/engine/__fixtures__/fieldChromeOptions.ts +0 -45
  474. package/src/components/form/engine/_structuredData/SchemaDataView.stories.tsx +0 -233
  475. package/src/components/form/engine/_structuredData/SchemaDataView.tsx +0 -742
  476. package/src/components/form/engine/_structuredData/StructuredDataView.stories.tsx +0 -85
  477. package/src/components/form/engine/_structuredData/StructuredDataView.tsx +0 -75
  478. package/src/components/form/engine/_structuredData/structuredData.ts +0 -145
  479. package/src/components/form/engine/compactRowContext.ts +0 -148
  480. package/src/components/form/engine/compactRowStyles.ts +0 -898
  481. package/src/components/form/engine/compactToolbarContext.ts +0 -69
  482. package/src/components/form/engine/optionActions.ts +0 -128
  483. package/src/components/form/engine/optionsContext.ts +0 -24
  484. package/src/components/form/engine/readFirst.ts +0 -1077
  485. package/src/components/form/engine/rendererTypes.ts +0 -107
  486. package/src/components/form/engine/revealRow.ts +0 -123
  487. package/src/components/form/engine/rowFocus.ts +0 -101
  488. package/src/components/form/engine/rowMenuContext.ts +0 -159
  489. package/src/components/form/engine/rowOpenPicker.ts +0 -27
  490. package/src/components/form/engine/typeChoices.ts +0 -63
  491. package/src/components/form/engine/variants/FormEngineVariants.stories.tsx +0 -159
  492. package/src/components/form/engine/variants/VariantCalmTable.tsx +0 -244
  493. package/src/components/form/engine/variants/VariantCards.tsx +0 -212
  494. package/src/components/form/engine/variants/VariantFocus.tsx +0 -382
  495. package/src/components/form/engine/variants/VariantMinimal.tsx +0 -170
  496. package/src/components/form/engine/variants/focusDemo.ts +0 -145
  497. package/src/components/form/engine/variants/variantModel.ts +0 -223
  498. package/src/components/form/engine/variants/variantParts.tsx +0 -313
  499. package/src/components/form/expressions/DpqlRendering.tsx +0 -85
  500. package/src/components/form/expressions/ExpressionField.stories.tsx +0 -1395
  501. package/src/components/form/expressions/ExpressionField.tsx +0 -503
  502. package/src/components/form/expressions/argumentPresence.ts +0 -213
  503. package/src/components/form/expressions/builder/ExpressionBuilder.stories.tsx +0 -1683
  504. package/src/components/form/expressions/builder/argumentDetail.tsx +0 -17
  505. package/src/components/form/expressions/builder/argumentLabel.tsx +0 -146
  506. package/src/components/form/expressions/builder/argumentSlot.tsx +0 -101
  507. package/src/components/form/expressions/builder/argumentWrapper.tsx +0 -243
  508. package/src/components/form/expressions/builder/confirmMismatchedTypesModal.tsx +0 -120
  509. package/src/components/form/expressions/builder/confirmUnsupportedTypeModal.tsx +0 -69
  510. package/src/components/form/expressions/builder/index.tsx +0 -1545
  511. package/src/components/form/expressions/builder/item.tsx +0 -89
  512. package/src/components/form/expressions/builder/moveToPositionStrip.tsx +0 -156
  513. package/src/components/form/expressions/builder/renderTemplate.tsx +0 -42
  514. package/src/components/form/expressions/dpqlMockLanguage.ts +0 -566
  515. package/src/components/form/expressions/dpqlMockLsp.ts +0 -126
  516. package/src/components/form/expressions/mockExpressions.ts +0 -317
  517. package/src/components/form/expressions/renderExpressionToText.ts +0 -137
  518. package/src/components/form/expressions/types.ts +0 -110
  519. package/src/components/form/expressions/useExpressions.ts +0 -101
  520. package/src/components/form/expressions/useRenderExpression.ts +0 -165
  521. package/src/components/form/fields/Field.stories.tsx +0 -143
  522. package/src/components/form/fields/Field.tsx +0 -732
  523. package/src/components/form/fields/allowed-values/AllowedValues.tsx +0 -297
  524. package/src/components/form/fields/array/ArrayAuto.tsx +0 -237
  525. package/src/components/form/fields/array/ArrayAutoField.stories.tsx +0 -475
  526. package/src/components/form/fields/array/ArrayAutoField.tsx +0 -367
  527. package/src/components/form/fields/auto/AutoFormField.stories.tsx +0 -825
  528. package/src/components/form/fields/auto/AutoFormField.tsx +0 -1164
  529. package/src/components/form/fields/binary/Binary.stories.tsx +0 -122
  530. package/src/components/form/fields/binary/Binary.tsx +0 -91
  531. package/src/components/form/fields/boolean/Boolean.stories.tsx +0 -125
  532. package/src/components/form/fields/boolean/Boolean.tsx +0 -34
  533. package/src/components/form/fields/byte-size/ByteSize.stories.tsx +0 -87
  534. package/src/components/form/fields/byte-size/ByteSize.tsx +0 -58
  535. package/src/components/form/fields/color/Color.stories.tsx +0 -99
  536. package/src/components/form/fields/color/Color.tsx +0 -46
  537. package/src/components/form/fields/cron/Cron.stories.tsx +0 -68
  538. package/src/components/form/fields/cron/Cron.tsx +0 -80
  539. package/src/components/form/fields/date/Date.stories.tsx +0 -77
  540. package/src/components/form/fields/date/Date.tsx +0 -55
  541. package/src/components/form/fields/emittedValues.ts +0 -70
  542. package/src/components/form/fields/file/File.stories.tsx +0 -161
  543. package/src/components/form/fields/file/File.tsx +0 -227
  544. package/src/components/form/fields/long-string/LongString.stories.tsx +0 -120
  545. package/src/components/form/fields/long-string/LongString.tsx +0 -130
  546. package/src/components/form/fields/markdown/Markdown.stories.tsx +0 -76
  547. package/src/components/form/fields/markdown/Markdown.tsx +0 -81
  548. package/src/components/form/fields/markdown/MarkdownView.tsx +0 -222
  549. package/src/components/form/fields/multi-select/MultiSelectFormField.tsx +0 -139
  550. package/src/components/form/fields/number/Number.stories.tsx +0 -159
  551. package/src/components/form/fields/number/Number.tsx +0 -160
  552. package/src/components/form/fields/object/Object.stories.tsx +0 -398
  553. package/src/components/form/fields/object/Object.tsx +0 -255
  554. package/src/components/form/fields/radio-group/RadioGroup.stories.tsx +0 -95
  555. package/src/components/form/fields/radio-group/RadioGroup.tsx +0 -46
  556. package/src/components/form/fields/radio-group/images/java-96x128.png +0 -0
  557. package/src/components/form/fields/radio-group/images/python-129x128.png +0 -0
  558. package/src/components/form/fields/radio-group/images/qore-106x128.png +0 -0
  559. package/src/components/form/fields/rich-text/RichText.stories.tsx +0 -260
  560. package/src/components/form/fields/rich-text/RichText.tsx +0 -537
  561. package/src/components/form/fields/schema-definition/CatalogLeafForm.tsx +0 -242
  562. package/src/components/form/fields/schema-definition/CatalogNodeEditor.tsx +0 -758
  563. package/src/components/form/fields/schema-definition/Hint.tsx +0 -22
  564. package/src/components/form/fields/schema-definition/InlineValidationBanner.tsx +0 -138
  565. package/src/components/form/fields/schema-definition/Loader.tsx +0 -20
  566. package/src/components/form/fields/schema-definition/MigrationsTab.tsx +0 -187
  567. package/src/components/form/fields/schema-definition/SchemaDefinitionField.stories.tsx +0 -286
  568. package/src/components/form/fields/schema-definition/TableEditor.tsx +0 -155
  569. package/src/components/form/fields/schema-definition/TablesTab.tsx +0 -138
  570. package/src/components/form/fields/schema-definition/catalog.ts +0 -237
  571. package/src/components/form/fields/schema-definition/helpers.ts +0 -90
  572. package/src/components/form/fields/schema-definition/index.tsx +0 -418
  573. package/src/components/form/fields/schema-definition/mockCatalog.ts +0 -325
  574. package/src/components/form/fields/schema-definition/mockDefinition.ts +0 -111
  575. package/src/components/form/fields/schema-definition/referenceSuggestions.tsx +0 -152
  576. package/src/components/form/fields/schema-definition/starterTemplate.ts +0 -68
  577. package/src/components/form/fields/schema-definition/types.ts +0 -185
  578. package/src/components/form/fields/schema-definition/useSchemaOptionCatalog.ts +0 -49
  579. package/src/components/form/fields/select/Select.stories.tsx +0 -872
  580. package/src/components/form/fields/select/Select.tsx +0 -624
  581. package/src/components/form/fields/select/SelectCollection.tsx +0 -594
  582. package/src/components/form/fields/string/String.stories.tsx +0 -86
  583. package/src/components/form/fields/string/String.tsx +0 -43
  584. package/src/components/form/fields/template/ExampleValueModal.stories.tsx +0 -114
  585. package/src/components/form/fields/template/ExampleValueModal.tsx +0 -99
  586. package/src/components/form/fields/template/ReadOnlyTemplateTag.tsx +0 -47
  587. package/src/components/form/fields/template/TemplateField.stories.tsx +0 -1121
  588. package/src/components/form/fields/template/TemplateField.tsx +0 -1717
  589. package/src/components/form/fields/template/TemplateText.tsx +0 -115
  590. package/src/components/form/fields/template/__fixtures__/longExampleValue.ts +0 -7
  591. package/src/components/form/fields/template/__fixtures__/multiLevelTemplates.json +0 -147
  592. package/src/components/form/fields/template/__fixtures__/templates.json +0 -83
  593. package/src/components/form/fields/timeout/Timeout.stories.tsx +0 -228
  594. package/src/components/form/fields/timeout/Timeout.tsx +0 -87
  595. package/src/components/form/fields/url/Url.stories.tsx +0 -94
  596. package/src/components/form/fields/url/Url.tsx +0 -85
  597. package/src/components/form/index.tsx +0 -47
  598. package/src/components/imageLightbox/ImageLightbox.stories.tsx +0 -238
  599. package/src/components/imageLightbox/ImageLightbox.tsx +0 -236
  600. package/src/components/imageLightbox/index.ts +0 -1
  601. package/src/components/log/Log.stories.tsx +0 -333
  602. package/src/components/log/Log.tsx +0 -285
  603. package/src/components/menu/Menu.stories.tsx +0 -155
  604. package/src/components/menu/Menu.tsx +0 -312
  605. package/src/components/qonsoleSmartInput/QonsoleSmartInput.stories.tsx +0 -797
  606. package/src/components/qonsoleSmartInput/QonsoleSmartInput.tsx +0 -105
  607. package/src/components/qonsoleSmartInput/index.ts +0 -16
  608. package/src/components/qonsoleSmartInput/qonsoleInserter.ts +0 -77
  609. package/src/components/qonsoleSmartInput/types.ts +0 -133
  610. package/src/components/qonsoleSmartInput/useQonsoleSession.ts +0 -124
  611. package/src/components/searchFilterBar/SearchFilterBar.stories.tsx +0 -62
  612. package/src/components/searchFilterBar/SearchFilterBar.tsx +0 -144
  613. package/src/components/searchFilterBar/index.ts +0 -1
  614. package/src/components/smartEditor/MarkdownDoc.tsx +0 -190
  615. package/src/components/smartEditor/SmartEditor.stories.tsx +0 -475
  616. package/src/components/smartEditor/SmartEditor.tsx +0 -808
  617. package/src/components/smartEditor/__fixtures__/mockLspServer.ts +0 -205
  618. package/src/components/smartEditor/helpers.ts +0 -217
  619. package/src/components/smartEditor/index.ts +0 -35
  620. package/src/components/smartEditor/styling.ts +0 -45
  621. package/src/components/smartEditor/types.ts +0 -211
  622. package/src/components/smartEditor/useLspAutocomplete.ts +0 -758
  623. package/src/components/smartEditor/useLspDiagnosticDecorations.ts +0 -125
  624. package/src/components/smartEditor/useLspHover.ts +0 -230
  625. package/src/components/smartEditor/useLspSemanticTokens.ts +0 -298
  626. package/src/components/smartEditor/useLspSession.ts +0 -231
  627. package/src/components/smartEditor/useLspSignatureHelp.ts +0 -198
  628. package/src/components/supportTicket/AttachmentChips.stories.tsx +0 -171
  629. package/src/components/supportTicket/AttachmentChips.tsx +0 -147
  630. package/src/components/supportTicket/InterfaceReferenceTags.stories.tsx +0 -257
  631. package/src/components/supportTicket/InterfaceReferenceTags.tsx +0 -129
  632. package/src/components/supportTicket/ReferencePicker.stories.tsx +0 -584
  633. package/src/components/supportTicket/ReferencePicker.tsx +0 -563
  634. package/src/components/supportTicket/TicketConversation.stories.tsx +0 -121
  635. package/src/components/supportTicket/TicketHeader.stories.tsx +0 -183
  636. package/src/components/supportTicket/TicketHeader.tsx +0 -247
  637. package/src/components/supportTicket/TicketMetaTags.stories.tsx +0 -103
  638. package/src/components/supportTicket/TicketMetaTags.tsx +0 -85
  639. package/src/components/supportTicket/TicketReplyBox.stories.tsx +0 -354
  640. package/src/components/supportTicket/TicketReplyBox.tsx +0 -150
  641. package/src/components/supportTicket/__fixtures__/kindMarks.ts +0 -28
  642. package/src/components/supportTicket/attachmentAccess.ts +0 -97
  643. package/src/components/supportTicket/fileToAttachment.ts +0 -24
  644. package/src/components/supportTicket/index.ts +0 -10
  645. package/src/components/supportTicket/meta.ts +0 -206
  646. package/src/components/supportTicket/ticketModel.ts +0 -131
  647. package/src/components/supportTicket/useLoadedImages.ts +0 -73
  648. package/src/components/ticketReferences/TicketReferences.stories.tsx +0 -315
  649. package/src/components/ticketReferences/TicketReferences.tsx +0 -906
  650. package/src/components/ticketReferences/index.ts +0 -2
  651. package/src/components/ticketThread/TicketThread.stories.tsx +0 -829
  652. package/src/components/ticketThread/TicketThread.tsx +0 -719
  653. package/src/components/ticketThread/index.ts +0 -6
  654. package/src/contexts/FetchContext.tsx +0 -25
  655. package/src/contexts/ReqraftContext.tsx +0 -9
  656. package/src/contexts/StorageContext.tsx +0 -33
  657. package/src/global.d.ts +0 -4
  658. package/src/helpers/allowedValues.ts +0 -249
  659. package/src/helpers/choiceChip.ts +0 -227
  660. package/src/helpers/common.ts +0 -326
  661. package/src/helpers/dpqlDetection.ts +0 -209
  662. package/src/helpers/expressions.ts +0 -140
  663. package/src/helpers/optionUiTypes.ts +0 -199
  664. package/src/helpers/options.ts +0 -150
  665. package/src/helpers/providerValue.ts +0 -125
  666. package/src/helpers/scrollbar.ts +0 -32
  667. package/src/helpers/singleLineString.ts +0 -61
  668. package/src/helpers/templateItems.ts +0 -81
  669. package/src/helpers/templateText.ts +0 -350
  670. package/src/helpers/templates.ts +0 -602
  671. package/src/helpers/validations.ts +0 -2085
  672. package/src/hooks/useArgSchema.ts +0 -37
  673. package/src/hooks/useCoarsePointer.ts +0 -30
  674. package/src/hooks/useFetch/useFetch.stories.tsx +0 -379
  675. package/src/hooks/useFetch/useFetch.tsx +0 -154
  676. package/src/hooks/usePhoneViewport.ts +0 -34
  677. package/src/hooks/useQorusTypes.ts +0 -233
  678. package/src/hooks/useReqraftProperty.ts +0 -16
  679. package/src/hooks/useStorage/useStorage.stories.tsx +0 -168
  680. package/src/hooks/useStorage/useStorage.ts +0 -35
  681. package/src/hooks/useTemplates.ts +0 -123
  682. package/src/hooks/useValidation.ts +0 -9
  683. package/src/hooks/useWebSocket/useWebSocket.ts +0 -224
  684. package/src/hooks/useWebSocket/useWebsocket.stories.tsx +0 -640
  685. package/src/hooks/useWhyDidYouUpdate.ts +0 -38
  686. package/src/index.tsx +0 -86
  687. package/src/providers/FetchProvider.tsx +0 -40
  688. package/src/providers/ReqraftProvider.tsx +0 -52
  689. package/src/providers/StorageProvider.tsx +0 -131
  690. package/src/stores/currentUser/currentUser.stories.tsx +0 -100
  691. package/src/stores/currentUser/currentUser.tsx +0 -94
  692. package/src/stories/Data/fileFieldArgSchema.json +0 -86
  693. package/src/stories/Tests/utils.ts +0 -320
  694. package/src/stories/storyNetwork.ts +0 -92
  695. package/src/stories/tracking.tsx +0 -206
  696. package/src/tracking/browser/attach.ts +0 -186
  697. package/src/tracking/browser/env.ts +0 -78
  698. package/src/tracking/core/consent.ts +0 -37
  699. package/src/tracking/core/engagement.ts +0 -47
  700. package/src/tracking/core/experiments.ts +0 -258
  701. package/src/tracking/core/hash.ts +0 -26
  702. package/src/tracking/core/ids.ts +0 -25
  703. package/src/tracking/core/observable.ts +0 -23
  704. package/src/tracking/core/queue.ts +0 -131
  705. package/src/tracking/core/sections.ts +0 -166
  706. package/src/tracking/core/storage.ts +0 -69
  707. package/src/tracking/core/tracker.ts +0 -417
  708. package/src/tracking/core/types.ts +0 -162
  709. package/src/tracking/core/utm.ts +0 -23
  710. package/src/tracking/index.ts +0 -72
  711. package/src/tracking/markup.ts +0 -17
  712. package/src/tracking/react/Experiment.tsx +0 -44
  713. package/src/tracking/react/TrackingProvider.tsx +0 -56
  714. package/src/tracking/react/hooks.ts +0 -106
  715. package/src/tracking/react/index.ts +0 -13
  716. package/src/tracking/testing.ts +0 -108
  717. package/src/tracking/ui/ExperimentCard.stories.tsx +0 -296
  718. package/src/tracking/ui/ExperimentCard.tsx +0 -667
  719. package/src/tracking/ui/ExperimentsOverlay.stories.tsx +0 -155
  720. package/src/tracking/ui/ExperimentsOverlay.tsx +0 -437
  721. package/src/tracking/ui/anchor.ts +0 -180
  722. package/src/tracking/ui/card.ts +0 -464
  723. package/src/tracking/ui/client.ts +0 -117
  724. package/src/tracking/ui/index.ts +0 -77
  725. package/src/tracking/ui/types.ts +0 -110
  726. package/src/tracking/ui/useExperimentsAdmin.ts +0 -103
  727. package/src/types/Form.ts +0 -29
  728. package/src/types.ts +0 -14
  729. package/src/utils/datetime.ts +0 -10
  730. package/src/utils/fetch.ts +0 -457
  731. package/src/utils/lspClient.ts +0 -711
  732. package/src/utils/lspClient.types.ts +0 -211
  733. package/src/utils/queryUnlessCancelled.ts +0 -28
  734. package/src/utils/websocket.ts +0 -293
  735. package/vite.config.ts +0 -58
  736. package/vitest.config.ts +0 -69
@@ -1,719 +0,0 @@
1
- import {
2
- ReqoreBubble,
3
- ReqoreBubbleGroup,
4
- ReqoreButton,
5
- ReqoreControlGroup,
6
- ReqoreEmptyState,
7
- ReqoreIcon,
8
- ReqoreP,
9
- ReqoreSkeleton,
10
- ReqoreTimeAgo,
11
- useReqoreTheme,
12
- } from '@qoretechnologies/reqore';
13
- import { getReadableColor } from '@qoretechnologies/reqore/dist/helpers/colors';
14
- import { IReqoreIconName } from '@qoretechnologies/reqore/dist/types/icons';
15
- import { rgba } from 'polished';
16
- import { ComponentProps, useEffect, useMemo, useRef, useState } from 'react';
17
- import ReactMarkdown from 'react-markdown';
18
- import styled from 'styled-components';
19
- import { formatBytes, isImage } from '../../helpers/common';
20
- import { ImageLightbox } from '../imageLightbox';
21
- import {
22
- IInterfaceReference,
23
- InterfaceReferenceTags,
24
- TResolveInterfaceIcon,
25
- TTicketMessageAuthor,
26
- TTicketViewerRole,
27
- } from '../supportTicket';
28
-
29
- /*
30
- * Shared support-ticket conversation thread, used by every Qorus surface that
31
- * shows a ticket: the qorus-ide customer view, the admin-portal staff queue, and
32
- * the Qonsole `support-ticket` renderer. Presentational — data in, callbacks out
33
- * — so each consumer keeps its own fetch/websocket wiring.
34
- *
35
- * Rendered as a comment feed: an avatar beside a bordered, accent-tinted card per
36
- * message, each hugging its own side. Built on Reqore's `ReqoreBubble` (which
37
- * supplies the avatar, the bold author label, the alignment and the tint), so the
38
- * accent follows whatever the host app themes `custom1` to rather than a colour
39
- * baked in here. Interface references render via the shared
40
- * `InterfaceReferenceTags`; the status/priority/category vocabularies live in
41
- * `../supportTicket/meta`.
42
- *
43
- * Runs of consecutive messages are wrapped in a `ReqoreBubbleGroup`, which prints
44
- * one time under the last card of each same-side run instead of one per card — a
45
- * burst of replies reads as a single moment.
46
- *
47
- * The `viewerRole` decides which side "you" sit on and how staff-only internal
48
- * notes render: the customer view never receives internal notes (the server
49
- * filters them) and sees staff under a masked "Qorus Support" label; the staff
50
- * view puts staff on the right and paints internal notes amber so they can never
51
- * be mistaken for a customer-visible reply. System messages render as a centered
52
- * muted line, not a card.
53
- */
54
-
55
- export interface ITicketThreadAttachment {
56
- attachment_id: string;
57
- filename: string;
58
- content_type: string;
59
- size_bytes: number;
60
- }
61
-
62
- export interface ITicketThreadMessage {
63
- message_id: string;
64
- author_type: TTicketMessageAuthor;
65
- author_id: string;
66
- body: string;
67
- internal?: boolean;
68
- created: string;
69
- attachments?: ITicketThreadAttachment[];
70
- /** Qorus interfaces this message references, as `{kind, name}` snapshots. */
71
- referenced_interfaces?: IInterfaceReference[];
72
- }
73
-
74
- export interface ITicketThreadProps {
75
- messages: ITicketThreadMessage[];
76
- /** which side "you" sit on + how internal notes render. */
77
- viewerRole?: TTicketViewerRole;
78
- loading?: boolean;
79
- /** download an attachment (the consumer wires this to its API). */
80
- onDownloadAttachment?: (attachmentId: string, filename: string) => void;
81
- /**
82
- * Fetch an image attachment's bytes as an object URL, for the inline thumbnail +
83
- * click-to-enlarge preview. Omitted ⇒ image attachments fall back to the same
84
- * download chip as every other file, so the thread degrades rather than breaks
85
- * where a consumer hasn't wired it. Non-image attachments never use it.
86
- */
87
- fetchAttachmentUrl?: (attachmentId: string) => Promise<string>;
88
- /** resolve a per-kind icon for a referenced interface: a font icon, or a mark
89
- * `{ icon, image }` whose image (e.g. the Qog logo) is drawn once it loads, with
90
- * the font icon before that and instead of it if it fails. Consumers with their
91
- * own icon vocabulary (e.g. the qorus-ide IDE) pass one; when omitted, a built-in
92
- * per-kind default is used so every surface shows consistent chips. */
93
- resolveInterfaceIcon?: TResolveInterfaceIcon;
94
- /** Draw the kind's image ahead of a reference's own logo on the reference chips;
95
- * see `preferKindImage` on `InterfaceReferenceTags`. Off by default. */
96
- preferKindImage?: boolean;
97
- /** open a referenced interface; reference chips are static when omitted (e.g. the staff
98
- * view, which can't reach the customer's instance, leaves this out). */
99
- onInterfaceClick?: (reference: IInterfaceReference) => void;
100
- /** The TICKET's own references (picked when filing). Echoed as chips on the opening
101
- * message so the conversation carries them too — when they lived only in the header
102
- * rail + References tab, readers looked for them in the thread and concluded the
103
- * ticket had none. Deduped against the opening message's own message-level refs. */
104
- ticketReferences?: IInterfaceReference[];
105
- }
106
-
107
- interface IAuthorMeta {
108
- icon: IReqoreIconName;
109
- }
110
-
111
- const AUTHOR_META: Record<TTicketMessageAuthor, IAuthorMeta> = {
112
- customer: { icon: 'User3Line' },
113
- staff: { icon: 'CustomerService2Line' },
114
- system: { icon: 'InformationLine' },
115
- };
116
-
117
- // Both sides share one accent: the side, the avatar and the author label already
118
- // carry who is speaking, which frees colour to mean "internal note" and nothing
119
- // else. `custom1` is a theme slot, so each host app supplies its own hue.
120
- const ACCENT: ComponentProps<typeof ReqoreBubble>['customTheme'] = { main: 'custom1' };
121
-
122
- /** Avatar glyph; an internal note carries the "not visible to the customer" eye. */
123
- const authorIcon = (message: ITicketThreadMessage): IReqoreIconName =>
124
- message.internal ? 'EyeOffLine' : AUTHOR_META[message.author_type].icon;
125
-
126
-
127
- /** The label above a message. The customer view masks staff identity as "Qorus
128
- * Support"; the staff view shows the real author with a role prefix. Internal
129
- * notes always label as "Internal note" regardless of viewer. */
130
- const authorLabel = (message: ITicketThreadMessage, viewerRole: TTicketViewerRole): string => {
131
- if (message.internal) {
132
- return 'Internal note';
133
- }
134
- if (viewerRole === 'customer') {
135
- return message.author_type === 'customer' ? 'You' : 'Qorus Support';
136
- }
137
- return `${message.author_type === 'staff' ? 'Support' : 'Customer'} · ${message.author_id}`;
138
- };
139
-
140
- /**
141
- * DOM id of a message in the rendered thread.
142
- *
143
- * Exported rather than inlined so that anything wanting to reveal a message — a
144
- * "show in chat" action on a reference, a deep link — derives the id from the same
145
- * function the thread renders with. Two copies of the same template string is exactly
146
- * how that contract silently breaks when one side is renamed.
147
- */
148
- export const ticketMessageDomId = (messageId: string): string => `ticket-message-${messageId}`;
149
-
150
- const StyledThread = styled.div`
151
- display: flex;
152
- flex-direction: column;
153
- gap: 12px;
154
- width: 100%;
155
-
156
- /*
157
- * A thread too short to fill its scroller sits at the BOTTOM, against the
158
- * composer, the way every chat surface behaves — otherwise the first reply
159
- * floats at the top of a tall drawer with dead space beneath it, and each new
160
- * message appears further from the box you just typed in.
161
- *
162
- * The auto top margin does the pushing rather than 'justify-content: flex-end':
163
- * with flex-end, once the thread outgrows the scroller the overflow spills past
164
- * the top edge and those first messages cannot be scrolled back into view. An
165
- * auto margin only consumes FREE space, so it collapses to zero the moment the
166
- * content overflows and normal scrolling is preserved.
167
- *
168
- * min-height needs a definite height on the scroll parent to resolve; where a
169
- * consumer doesn't provide one it simply computes to auto and the thread keeps
170
- * its natural top-aligned flow.
171
- */
172
- min-height: 100%;
173
-
174
- > *:first-child {
175
- margin-top: auto;
176
- }
177
- `;
178
-
179
- // The loading placeholder: pulsing skeleton "bubbles" alternating sides, so the
180
- // wait previews the thread it's about to become rather than a bare spinner. Built
181
- // from reqore's `ReqoreSkeleton` — the shape (avatar circle + a short label line +
182
- // N body lines) mirrors a real message. Sizes vary so it doesn't read as a grid.
183
- const SKELETON_BUBBLES: { self: boolean; lines: number; width: number }[] = [
184
- { self: false, lines: 2, width: 58 },
185
- { self: true, lines: 1, width: 42 },
186
- { self: true, lines: 3, width: 64 },
187
- { self: false, lines: 2, width: 50 },
188
- { self: false, lines: 1, width: 46 },
189
- { self: true, lines: 2, width: 60 },
190
- { self: false, lines: 3, width: 54 },
191
- ];
192
-
193
- /*
194
- * The skeleton fills the height from the TOP, unlike a real thread, which sits at the
195
- * bottom against the composer. The bottom-pin is right for real messages — a short
196
- * conversation belongs next to the box you type in — but a placeholder inheriting it
197
- * clusters a few bubbles at the bottom under a large empty gap, which reads as a
198
- * broken render rather than "loading". A loading skeleton grows top-down, the
199
- * universal convention, so it occupies the space it's given no matter how tall.
200
- */
201
- const StyledSkeletonThread = styled.div`
202
- display: flex;
203
- flex-direction: column;
204
- gap: 12px;
205
- width: 100%;
206
- min-height: 100%;
207
- /* A real message carries its own bubble, so it never touches the host's edge.
208
- The skeleton is bare bars, and without this its avatars and lines were
209
- pressed flat against the border of whatever holds the thread — which reads
210
- as a clipped render rather than as loading. border-box so the padding comes
211
- out of the 100% rather than adding to it. */
212
- box-sizing: border-box;
213
- padding: 12px;
214
- `;
215
-
216
- const StyledSkeletonRow = styled.div<{ $self: boolean }>`
217
- display: flex;
218
- gap: 10px;
219
- align-items: flex-start;
220
- justify-content: ${({ $self }) => ($self ? 'flex-end' : 'flex-start')};
221
- `;
222
-
223
- // Content stays left-aligned even on a right-side row — like a real bubble, where
224
- // the label sits top-left however the bubble is aligned; the row positions the
225
- // whole block, this just lays the lines out within it.
226
- const StyledSkeletonLines = styled.div`
227
- display: flex;
228
- flex-direction: column;
229
- gap: 6px;
230
- align-items: flex-start;
231
- `;
232
-
233
- const ConversationSkeleton = () => (
234
- <StyledSkeletonThread aria-busy='true' aria-label='Loading conversation'>
235
- {SKELETON_BUBBLES.map((bubble, index) => {
236
- const avatar = <ReqoreSkeleton circle width='30px' height='30px' />;
237
- return (
238
- <StyledSkeletonRow key={index} $self={bubble.self}>
239
- {!bubble.self && avatar}
240
- <StyledSkeletonLines style={{ width: `${bubble.width}%` }}>
241
- <ReqoreSkeleton width='38%' height='10px' />
242
- {Array.from({ length: bubble.lines }).map((_, line) => (
243
- <ReqoreSkeleton
244
- key={line}
245
- width={line === bubble.lines - 1 ? '72%' : '100%'}
246
- height='8px'
247
- />
248
- ))}
249
- </StyledSkeletonLines>
250
- {bubble.self && avatar}
251
- </StyledSkeletonRow>
252
- );
253
- })}
254
- </StyledSkeletonThread>
255
- );
256
-
257
- // Debosses the empty state: washes the icon + title back with opacity (kept
258
- // theme-agnostic) and adds a faint light edge below, so "No messages yet" reads
259
- // as pressed into the surface rather than announced.
260
- const StyledEmpty = styled.div`
261
- /*
262
- * Centre the placeholder in the space it's given rather than letting it sit at the
263
- * top. Like the thread, this fills its scroll parent (min-height: 100%, which needs a
264
- * definite height to resolve — the drawer body provides one; where a consumer doesn't,
265
- * it collapses to auto and the state keeps its natural top-aligned flow).
266
- */
267
- min-height: 100%;
268
- display: flex;
269
- flex-direction: column;
270
- align-items: center;
271
- justify-content: center;
272
-
273
- .reqore-icon {
274
- opacity: 0.28;
275
- }
276
- h1,
277
- h2,
278
- h3,
279
- h4,
280
- h5,
281
- h6 {
282
- opacity: 0.4;
283
- text-shadow: 0 1px 0 rgba(255, 255, 255, 0.07);
284
- }
285
- `;
286
-
287
- // System messages read as a centered muted note between cards; the nested rule
288
- // flattens react-markdown's own <p> margins so it sits on one line.
289
- const StyledSystemRow = styled.div`
290
- display: flex;
291
- align-items: center;
292
- justify-content: center;
293
- gap: 6px;
294
- font-size: 11px;
295
- opacity: 0.55;
296
- text-align: center;
297
- p {
298
- margin: 0;
299
- }
300
- `;
301
-
302
- interface IStyledMarkdownProps {
303
- $color: string;
304
- $emphasis: string;
305
- $code: string;
306
- $link: string;
307
- }
308
-
309
- // The message body, washed a step below the bright author name in the card's
310
- // header so the two read as different things; in-body **bold** lifts back toward
311
- // full strength as emphasis. Every colour derives from the active Reqore theme
312
- // rather than a hardcoded hex, so the thread reads correctly on any host app.
313
- const StyledMarkdown = styled.div<IStyledMarkdownProps>`
314
- color: ${({ $color }) => $color};
315
- word-break: break-word;
316
-
317
- > *:first-child {
318
- margin-top: 0;
319
- }
320
- > *:last-child {
321
- margin-bottom: 0;
322
- }
323
-
324
- p {
325
- margin: 0 0 6px;
326
- }
327
- strong {
328
- color: ${({ $emphasis }) => $emphasis};
329
- font-weight: 600;
330
- }
331
- ul,
332
- ol {
333
- margin: 4px 0;
334
- padding-left: 18px;
335
- }
336
- li {
337
- margin: 2px 0;
338
- }
339
- code {
340
- font-family: monospace;
341
- background: ${({ $code }) => $code};
342
- padding: 1px 5px;
343
- border-radius: 4px;
344
- }
345
- pre {
346
- margin: 6px 0;
347
- padding: 8px 10px;
348
- background: rgba(0, 0, 0, 0.35);
349
- border-radius: 4px;
350
- overflow-x: auto;
351
- }
352
- pre code {
353
- background: none;
354
- padding: 0;
355
- white-space: pre;
356
- }
357
- a {
358
- color: ${({ $link }) => $link};
359
- text-decoration: none;
360
- }
361
- a:hover {
362
- text-decoration: underline;
363
- }
364
- `;
365
-
366
- /** A message body rendered as markdown, tinted from the active theme. */
367
- const MessageBody = ({ children }: { children: string }) => {
368
- const theme = useReqoreTheme();
369
- const readable = getReadableColor(theme);
370
- const link = theme.intents?.info ?? readable;
371
- return (
372
- <StyledMarkdown
373
- $color={rgba(readable, 0.72)}
374
- $emphasis={rgba(readable, 0.95)}
375
- $code={rgba(readable, 0.1)}
376
- $link={link}
377
- >
378
- <ReactMarkdown>{children}</ReactMarkdown>
379
- </StyledMarkdown>
380
- );
381
- };
382
-
383
- /** A file attachment as a download chip — the fallback for every non-image, and for
384
- * images when no `fetchAttachmentUrl` is wired. */
385
- const AttachmentChip = ({
386
- attachment,
387
- onDownloadAttachment,
388
- }: {
389
- attachment: ITicketThreadAttachment;
390
- onDownloadAttachment?: (attachmentId: string, filename: string) => void;
391
- }) => (
392
- <ReqoreButton
393
- icon='Download2Line'
394
- size='small'
395
- flat
396
- badge={formatBytes(attachment.size_bytes)}
397
- tooltip={`${attachment.content_type} · download`}
398
- onClick={() => onDownloadAttachment?.(attachment.attachment_id, attachment.filename)}
399
- >
400
- {attachment.filename}
401
- </ReqoreButton>
402
- );
403
-
404
- const StyledThumb = styled.button`
405
- appearance: none;
406
- padding: 0;
407
- border: 1px solid ${rgba('#ffffff', 0.12)};
408
- border-radius: 8px;
409
- overflow: hidden;
410
- background: ${rgba('#000000', 0.25)};
411
- cursor: zoom-in;
412
- line-height: 0;
413
- display: block;
414
-
415
- img {
416
- display: block;
417
- max-width: 240px;
418
- max-height: 200px;
419
- object-fit: cover;
420
- }
421
- `;
422
-
423
- /**
424
- * An image attachment as a thumbnail; clicking it opens the shared `ImageLightbox`
425
- * (owned by `AttachmentList`, which knows the whole image set for paging). The bytes
426
- * come from `fetchAttachmentUrl`, so until they arrive a skeleton holds the space, and
427
- * if the fetch fails the attachment degrades to the same download chip as any other
428
- * file rather than showing a broken image.
429
- */
430
- const ImageThumb = ({
431
- attachment,
432
- fetchAttachmentUrl,
433
- onOpen,
434
- onDownloadAttachment,
435
- }: {
436
- attachment: ITicketThreadAttachment;
437
- fetchAttachmentUrl: (attachmentId: string) => Promise<string>;
438
- onOpen: () => void;
439
- onDownloadAttachment?: (attachmentId: string, filename: string) => void;
440
- }) => {
441
- const [url, setUrl] = useState<string | null>(null);
442
- const [failed, setFailed] = useState<boolean>(false);
443
-
444
- useEffect(() => {
445
- let alive = true;
446
- fetchAttachmentUrl(attachment.attachment_id)
447
- .then((resolved) => alive && setUrl(resolved))
448
- .catch(() => alive && setFailed(true));
449
- return () => {
450
- alive = false;
451
- };
452
- }, [attachment.attachment_id]);
453
-
454
- if (failed) {
455
- return <AttachmentChip attachment={attachment} onDownloadAttachment={onDownloadAttachment} />;
456
- }
457
- if (!url) {
458
- return <ReqoreSkeleton width='180px' height='120px' />;
459
- }
460
- return (
461
- <StyledThumb type='button' title={`${attachment.filename} — click to enlarge`} onClick={onOpen}>
462
- <img src={url} alt={attachment.filename} />
463
- </StyledThumb>
464
- );
465
- };
466
-
467
- /**
468
- * A message's attachments, split into two rows: previewable images as a row of
469
- * thumbnails, and everything else as a row of download chips beneath.
470
- *
471
- * They can't share one wrapping row — a thumbnail is ~120px tall and a chip ~26px, so
472
- * mixed together the chips wrap raggedly around the image and the group reads as
473
- * broken. Grouping by kind keeps each row uniform. Images only preview when a
474
- * `fetchAttachmentUrl` is wired; without it they're files like any other and fall into
475
- * the chip row.
476
- */
477
- const AttachmentList = ({
478
- attachments,
479
- fetchAttachmentUrl,
480
- onDownloadAttachment,
481
- }: {
482
- attachments: ITicketThreadAttachment[];
483
- fetchAttachmentUrl?: (attachmentId: string) => Promise<string>;
484
- onDownloadAttachment?: (attachmentId: string, filename: string) => void;
485
- }) => {
486
- const previewable = Boolean(fetchAttachmentUrl);
487
- const images = previewable ? attachments.filter((a) => isImage(a.content_type)) : [];
488
- const imageIds = new Set(images.map((a) => a.attachment_id));
489
- const files = attachments.filter((a) => !imageIds.has(a.attachment_id));
490
- // which image the shared lightbox is showing; null = closed
491
- const [openIndex, setOpenIndex] = useState<number | null>(null);
492
-
493
- return (
494
- <ReqoreControlGroup vertical gapSize='small' style={{ marginTop: 8 }}>
495
- {images.length ? (
496
- <ReqoreControlGroup wrap gapSize='small' verticalAlign='flex-start'>
497
- {images.map((attachment, index) => (
498
- <ImageThumb
499
- key={attachment.attachment_id}
500
- attachment={attachment}
501
- fetchAttachmentUrl={fetchAttachmentUrl!}
502
- onOpen={() => setOpenIndex(index)}
503
- onDownloadAttachment={onDownloadAttachment}
504
- />
505
- ))}
506
- </ReqoreControlGroup>
507
- ) : null}
508
- {files.length ? (
509
- <ReqoreControlGroup wrap gapSize='small'>
510
- {files.map((attachment) => (
511
- <AttachmentChip
512
- key={attachment.attachment_id}
513
- attachment={attachment}
514
- onDownloadAttachment={onDownloadAttachment}
515
- />
516
- ))}
517
- </ReqoreControlGroup>
518
- ) : null}
519
- {openIndex !== null && fetchAttachmentUrl ? (
520
- <ImageLightbox
521
- images={images}
522
- index={openIndex}
523
- onIndex={setOpenIndex}
524
- onClose={() => setOpenIndex(null)}
525
- fetchAttachmentUrl={fetchAttachmentUrl}
526
- onDownload={onDownloadAttachment}
527
- />
528
- ) : null}
529
- </ReqoreControlGroup>
530
- );
531
- };
532
-
533
- type TThreadSegment =
534
- | { kind: 'system'; message: ITicketThreadMessage }
535
- | { kind: 'bubbles'; messages: ITicketThreadMessage[] };
536
-
537
- /** Split the thread into centred system lines and runs of consecutive non-system
538
- * messages — each run becomes one `ReqoreBubbleGroup`, which is what collapses a
539
- * same-side burst onto a single timestamp. */
540
- const toSegments = (messages: ITicketThreadMessage[]): TThreadSegment[] => {
541
- const segments: TThreadSegment[] = [];
542
-
543
- for (const message of messages) {
544
- if (message.author_type === 'system') {
545
- segments.push({ kind: 'system', message });
546
- continue;
547
- }
548
- const last = segments[segments.length - 1];
549
- if (last?.kind === 'bubbles') {
550
- last.messages.push(message);
551
- } else {
552
- segments.push({ kind: 'bubbles', messages: [message] });
553
- }
554
- }
555
-
556
- return segments;
557
- };
558
-
559
- export const TicketThread = ({
560
- messages,
561
- viewerRole = 'customer',
562
- loading,
563
- onDownloadAttachment,
564
- fetchAttachmentUrl,
565
- resolveInterfaceIcon,
566
- preferKindImage,
567
- onInterfaceClick,
568
- ticketReferences,
569
- }: ITicketThreadProps) => {
570
- // Open scrolled to the newest message, and follow new arrivals down — a thread is read
571
- // from the bottom, like any chat. Keyed on the message COUNT so it fires on open and when
572
- // a reply lands, not on every re-render (which would fight a user who has scrolled up to
573
- // read history). Scrolls the nearest scrollable ancestor (the drawer body) straight to its
574
- // end rather than scrollIntoView on a sentinel — scrollIntoView also drags any outer scroll
575
- // container around and stops one bottom-padding short of the real end.
576
- const threadRef = useRef<HTMLDivElement>(null);
577
- useEffect(() => {
578
- // Find the thread's OWN scroll container — the nearest ancestor that actually scrolls
579
- // (overflow-y auto/scroll), not merely the first one that currently overflows. A short
580
- // thread's container fits its content, so a "does it overflow?" test would walk straight
581
- // past it and scroll the whole page/panel to the bottom instead.
582
- let scroller = threadRef.current?.parentElement ?? null;
583
- while (scroller) {
584
- const overflowY = getComputedStyle(scroller).overflowY;
585
- if (overflowY === 'auto' || overflowY === 'scroll') {
586
- break;
587
- }
588
- scroller = scroller.parentElement;
589
- }
590
- if (scroller) {
591
- scroller.scrollTop = scroller.scrollHeight;
592
- }
593
- }, [messages.length]);
594
-
595
- // Segment the flat message list into system rows + author-grouped bubble runs once per
596
- // message change — not on every re-render (scroll, hover and resize all re-render this).
597
- const segments = useMemo(() => toSegments(messages), [messages]);
598
-
599
- // The opening (description) message — the ticket's own references echo on it, deduped
600
- // against any refs that message carries itself, so the intent still has ONE authoritative
601
- // home (the References tab) but the conversation no longer reads as reference-free.
602
- const openingMessageId = useMemo(
603
- () => messages.find((m) => m.author_type !== 'system')?.message_id,
604
- [messages]
605
- );
606
- const openingRefs = useMemo(() => {
607
- if (!ticketReferences?.length) {
608
- return undefined;
609
- }
610
- const opening = messages.find((m) => m.message_id === openingMessageId);
611
- const seen = new Set<string>();
612
- return [...ticketReferences, ...(opening?.referenced_interfaces ?? [])].filter((ref) => {
613
- const key = `${ref.interface_kind}:${ref.interface_name}`;
614
- if (seen.has(key)) {
615
- return false;
616
- }
617
- seen.add(key);
618
- return true;
619
- });
620
- }, [ticketReferences, messages, openingMessageId]);
621
-
622
- const refsFor = (message: ITicketThreadMessage): IInterfaceReference[] | undefined =>
623
- message.message_id === openingMessageId && openingRefs
624
- ? openingRefs
625
- : message.referenced_interfaces;
626
-
627
- // Only the FIRST load gets the skeleton. A refetch while messages are already on
628
- // screen must leave them there: every send triggers one (and, where the thread is
629
- // live, so does the other party sending), and blanking a conversation you are
630
- // reading — replacing it with pulsing placeholders — is the single worst moment to
631
- // do it. The new message simply appears when the refetch resolves.
632
- if (loading && !messages.length) {
633
- return <ConversationSkeleton />;
634
- }
635
-
636
- if (!messages.length) {
637
- return (
638
- <StyledEmpty>
639
- <ReqoreEmptyState icon='Chat3Line' title='No messages yet' flat transparent />
640
- </StyledEmpty>
641
- );
642
- }
643
-
644
- return (
645
- <StyledThread ref={threadRef}>
646
- {segments.map((segment, index) =>
647
- segment.kind === 'system' ? (
648
- <StyledSystemRow
649
- key={segment.message.message_id}
650
- id={ticketMessageDomId(segment.message.message_id)}
651
- >
652
- <ReqoreIcon icon='InformationLine' size='tiny' />
653
- <ReactMarkdown>{segment.message.body}</ReactMarkdown>
654
- </StyledSystemRow>
655
- ) : (
656
- <ReqoreBubbleGroup key={`group-${index}`}>
657
- {segment.messages.map((message) => (
658
- <ReqoreBubble
659
- key={message.message_id}
660
- // anchor for "show in chat"; ReqoreBubble forwards unknown props to
661
- // its DOM node, so this lands on the rendered element
662
- id={ticketMessageDomId(message.message_id)}
663
- size='small'
664
- maxWidth='76%'
665
- align={message.author_type === viewerRole ? 'right' : 'left'}
666
- avatar={{ icon: authorIcon(message) }}
667
- label={authorLabel(message, viewerRole)}
668
- timestamp={message.created ? <ReqoreTimeAgo time={message.created} /> : undefined}
669
- // Own messages read as info-blue, the other party's as the purple
670
- // accent — so the two sides of the conversation are told apart by
671
- // colour as well as by side, and "which of these did I write?" is
672
- // answerable at a glance. Deliberately keyed off `viewerRole`, so it
673
- // stays correct on the staff surface too (staff replies are the blue
674
- // ones there). Internal notes keep their warning intent and are not
675
- // re-tinted — they are neither side of the conversation.
676
- intent={
677
- message.internal
678
- ? 'warning'
679
- : message.author_type === viewerRole
680
- ? 'info'
681
- : undefined
682
- }
683
- customTheme={
684
- message.internal || message.author_type === viewerRole ? undefined : ACCENT
685
- }
686
- flat={false}
687
- minimal
688
- >
689
- <MessageBody>{message.body}</MessageBody>
690
- {message.attachments?.length ? (
691
- <AttachmentList
692
- attachments={message.attachments}
693
- fetchAttachmentUrl={fetchAttachmentUrl}
694
- onDownloadAttachment={onDownloadAttachment}
695
- />
696
- ) : null}
697
- {refsFor(message)?.length ? (
698
- <div style={{ marginTop: 8 }}>
699
- <InterfaceReferenceTags
700
- size='tiny'
701
- customTheme={ACCENT}
702
- references={refsFor(message)}
703
- resolveInterfaceIcon={resolveInterfaceIcon}
704
- preferKindImage={preferKindImage}
705
- onInterfaceClick={onInterfaceClick}
706
- />
707
- </div>
708
- ) : null}
709
- </ReqoreBubble>
710
- ))}
711
- </ReqoreBubbleGroup>
712
- )
713
- )}
714
- <ReqoreP size='tiny' effect={{ opacity: 0.5, textAlign: 'center' }}>
715
- {messages.length} message{messages.length === 1 ? '' : 's'}
716
- </ReqoreP>
717
- </StyledThread>
718
- );
719
- };