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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (873) hide show
  1. package/README.md +53 -1
  2. package/dist/components/Description/AllowedValuesHelp.d.ts +20 -0
  3. package/dist/components/Description/AllowedValuesHelp.d.ts.map +1 -0
  4. package/dist/components/Description/AllowedValuesHelp.js +86 -0
  5. package/dist/components/Description/AllowedValuesHelp.js.map +1 -0
  6. package/dist/components/Description/describedControl.d.ts +54 -0
  7. package/dist/components/Description/describedControl.d.ts.map +1 -0
  8. package/dist/components/Description/describedControl.js +81 -0
  9. package/dist/components/Description/describedControl.js.map +1 -0
  10. package/dist/components/Description/index.d.ts.map +1 -1
  11. package/dist/components/Description/index.js +3 -2
  12. package/dist/components/Description/index.js.map +1 -1
  13. package/dist/components/colorValue/colorValue.d.ts +59 -0
  14. package/dist/components/colorValue/colorValue.d.ts.map +1 -0
  15. package/dist/components/colorValue/colorValue.js +245 -0
  16. package/dist/components/colorValue/colorValue.js.map +1 -0
  17. package/dist/components/colorValue/index.d.ts +34 -0
  18. package/dist/components/colorValue/index.d.ts.map +1 -0
  19. package/dist/components/colorValue/index.js +136 -0
  20. package/dist/components/colorValue/index.js.map +1 -0
  21. package/dist/components/colorValue/labels.d.ts +12 -0
  22. package/dist/components/colorValue/labels.d.ts.map +1 -0
  23. package/dist/components/colorValue/labels.js +11 -0
  24. package/dist/components/colorValue/labels.js.map +1 -0
  25. package/dist/components/composer/Composer.d.ts +1 -1
  26. package/dist/components/composer/Composer.d.ts.map +1 -1
  27. package/dist/components/composer/Composer.js +2 -2
  28. package/dist/components/composer/Composer.js.map +1 -1
  29. package/dist/components/dpqlEditor/DpqlEditor.d.ts.map +1 -1
  30. package/dist/components/dpqlEditor/DpqlEditor.js +156 -10
  31. package/dist/components/dpqlEditor/DpqlEditor.js.map +1 -1
  32. package/dist/components/dpqlEditor/dpqlCompletions.d.ts +39 -0
  33. package/dist/components/dpqlEditor/dpqlCompletions.d.ts.map +1 -0
  34. package/dist/components/dpqlEditor/dpqlCompletions.js +294 -0
  35. package/dist/components/dpqlEditor/dpqlCompletions.js.map +1 -0
  36. package/dist/components/dpqlEditor/dpqlHelpers.d.ts +54 -5
  37. package/dist/components/dpqlEditor/dpqlHelpers.d.ts.map +1 -1
  38. package/dist/components/dpqlEditor/dpqlHelpers.js +413 -63
  39. package/dist/components/dpqlEditor/dpqlHelpers.js.map +1 -1
  40. package/dist/components/dpqlEditor/dpqlInserter.d.ts.map +1 -1
  41. package/dist/components/dpqlEditor/dpqlInserter.js +67 -29
  42. package/dist/components/dpqlEditor/dpqlInserter.js.map +1 -1
  43. package/dist/components/dpqlEditor/dpqlTags.d.ts +17 -7
  44. package/dist/components/dpqlEditor/dpqlTags.d.ts.map +1 -1
  45. package/dist/components/dpqlEditor/dpqlTags.js +44 -17
  46. package/dist/components/dpqlEditor/dpqlTags.js.map +1 -1
  47. package/dist/components/dpqlEditor/types.d.ts +94 -8
  48. package/dist/components/dpqlEditor/types.d.ts.map +1 -1
  49. package/dist/components/dpqlEditor/useDpqlSession.d.ts +7 -2
  50. package/dist/components/dpqlEditor/useDpqlSession.d.ts.map +1 -1
  51. package/dist/components/dpqlEditor/useDpqlSession.js +49 -17
  52. package/dist/components/dpqlEditor/useDpqlSession.js.map +1 -1
  53. package/dist/components/form/engine/CompactRow.d.ts.map +1 -1
  54. package/dist/components/form/engine/CompactRow.js +322 -124
  55. package/dist/components/form/engine/CompactRow.js.map +1 -1
  56. package/dist/components/form/engine/CompactToolbar.d.ts.map +1 -1
  57. package/dist/components/form/engine/CompactToolbar.js +29 -3
  58. package/dist/components/form/engine/CompactToolbar.js.map +1 -1
  59. package/dist/components/form/engine/FormEngine.d.ts +66 -11
  60. package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
  61. package/dist/components/form/engine/FormEngine.js +570 -176
  62. package/dist/components/form/engine/FormEngine.js.map +1 -1
  63. package/dist/components/form/engine/HiddenFieldsNote.d.ts +28 -0
  64. package/dist/components/form/engine/HiddenFieldsNote.d.ts.map +1 -0
  65. package/dist/components/form/engine/HiddenFieldsNote.js +32 -0
  66. package/dist/components/form/engine/HiddenFieldsNote.js.map +1 -0
  67. package/dist/components/form/engine/OptionFieldMessages.d.ts.map +1 -1
  68. package/dist/components/form/engine/OptionFieldMessages.js +25 -3
  69. package/dist/components/form/engine/OptionFieldMessages.js.map +1 -1
  70. package/dist/components/form/engine/OptionsHelpDialog.d.ts.map +1 -1
  71. package/dist/components/form/engine/OptionsHelpDialog.js +19 -2
  72. package/dist/components/form/engine/OptionsHelpDialog.js.map +1 -1
  73. package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts +2 -2
  74. package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts.map +1 -1
  75. package/dist/components/form/engine/_structuredData/SchemaDataView.js +12 -6
  76. package/dist/components/form/engine/_structuredData/SchemaDataView.js.map +1 -1
  77. package/dist/components/form/engine/compactRowContext.d.ts +30 -1
  78. package/dist/components/form/engine/compactRowContext.d.ts.map +1 -1
  79. package/dist/components/form/engine/compactRowContext.js.map +1 -1
  80. package/dist/components/form/engine/compactRowStyles.d.ts +59 -22
  81. package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
  82. package/dist/components/form/engine/compactRowStyles.js +102 -55
  83. package/dist/components/form/engine/compactRowStyles.js.map +1 -1
  84. package/dist/components/form/engine/compactToolbarColors.d.ts +16 -0
  85. package/dist/components/form/engine/compactToolbarColors.d.ts.map +1 -0
  86. package/dist/components/form/engine/compactToolbarColors.js +21 -0
  87. package/dist/components/form/engine/compactToolbarColors.js.map +1 -0
  88. package/dist/components/form/engine/inheritProps.d.ts +29 -0
  89. package/dist/components/form/engine/inheritProps.d.ts.map +1 -0
  90. package/dist/components/form/engine/inheritProps.js +43 -0
  91. package/dist/components/form/engine/inheritProps.js.map +1 -0
  92. package/dist/components/form/engine/operatorSummary.d.ts +26 -0
  93. package/dist/components/form/engine/operatorSummary.d.ts.map +1 -0
  94. package/dist/components/form/engine/operatorSummary.js +35 -0
  95. package/dist/components/form/engine/operatorSummary.js.map +1 -0
  96. package/dist/components/form/engine/readFirst.d.ts +24 -8
  97. package/dist/components/form/engine/readFirst.d.ts.map +1 -1
  98. package/dist/components/form/engine/readFirst.js +77 -109
  99. package/dist/components/form/engine/readFirst.js.map +1 -1
  100. package/dist/components/form/engine/readFirstColors.d.ts +30 -0
  101. package/dist/components/form/engine/readFirstColors.d.ts.map +1 -0
  102. package/dist/components/form/engine/readFirstColors.js +51 -0
  103. package/dist/components/form/engine/readFirstColors.js.map +1 -0
  104. package/dist/components/form/engine/rowFocus.d.ts +2 -0
  105. package/dist/components/form/engine/rowFocus.d.ts.map +1 -1
  106. package/dist/components/form/engine/rowFocus.js +26 -3
  107. package/dist/components/form/engine/rowFocus.js.map +1 -1
  108. package/dist/components/form/engine/typeChoices.d.ts +1 -1
  109. package/dist/components/form/engine/variants/VariantCalmTable.d.ts.map +1 -1
  110. package/dist/components/form/engine/variants/VariantCalmTable.js +2 -1
  111. package/dist/components/form/engine/variants/VariantCalmTable.js.map +1 -1
  112. package/dist/components/form/engine/variants/VariantCards.d.ts.map +1 -1
  113. package/dist/components/form/engine/variants/VariantCards.js +2 -1
  114. package/dist/components/form/engine/variants/VariantCards.js.map +1 -1
  115. package/dist/components/form/engine/variants/VariantFocus.js +1 -1
  116. package/dist/components/form/engine/variants/VariantFocus.js.map +1 -1
  117. package/dist/components/form/engine/variants/VariantMinimal.d.ts.map +1 -1
  118. package/dist/components/form/engine/variants/VariantMinimal.js +2 -1
  119. package/dist/components/form/engine/variants/VariantMinimal.js.map +1 -1
  120. package/dist/components/form/engine/variants/variantParts.d.ts +1 -1
  121. package/dist/components/form/engine/variants/variantParts.d.ts.map +1 -1
  122. package/dist/components/form/engine/variants/variantParts.js +25 -17
  123. package/dist/components/form/engine/variants/variantParts.js.map +1 -1
  124. package/dist/components/form/expressions/DpqlRendering.d.ts +1 -1
  125. package/dist/components/form/expressions/DpqlRendering.d.ts.map +1 -1
  126. package/dist/components/form/expressions/DpqlRendering.js +7 -6
  127. package/dist/components/form/expressions/DpqlRendering.js.map +1 -1
  128. package/dist/components/form/expressions/ExpressionField.d.ts +67 -3
  129. package/dist/components/form/expressions/ExpressionField.d.ts.map +1 -1
  130. package/dist/components/form/expressions/ExpressionField.js +536 -114
  131. package/dist/components/form/expressions/ExpressionField.js.map +1 -1
  132. package/dist/components/form/expressions/argumentPresence.d.ts +14 -0
  133. package/dist/components/form/expressions/argumentPresence.d.ts.map +1 -1
  134. package/dist/components/form/expressions/argumentPresence.js +16 -1
  135. package/dist/components/form/expressions/argumentPresence.js.map +1 -1
  136. package/dist/components/form/expressions/builder/argumentDetail.d.ts.map +1 -1
  137. package/dist/components/form/expressions/builder/argumentDetail.js +4 -1
  138. package/dist/components/form/expressions/builder/argumentDetail.js.map +1 -1
  139. package/dist/components/form/expressions/builder/argumentLabel.d.ts.map +1 -1
  140. package/dist/components/form/expressions/builder/argumentLabel.js +30 -11
  141. package/dist/components/form/expressions/builder/argumentLabel.js.map +1 -1
  142. package/dist/components/form/expressions/builder/argumentWrapper.d.ts.map +1 -1
  143. package/dist/components/form/expressions/builder/argumentWrapper.js +3 -1
  144. package/dist/components/form/expressions/builder/argumentWrapper.js.map +1 -1
  145. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.d.ts +9 -0
  146. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.d.ts.map +1 -1
  147. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js +30 -27
  148. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js.map +1 -1
  149. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.d.ts +1 -1
  150. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.d.ts.map +1 -1
  151. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js +7 -5
  152. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js.map +1 -1
  153. package/dist/components/form/expressions/builder/index.d.ts +34 -2
  154. package/dist/components/form/expressions/builder/index.d.ts.map +1 -1
  155. package/dist/components/form/expressions/builder/index.js +170 -80
  156. package/dist/components/form/expressions/builder/index.js.map +1 -1
  157. package/dist/components/form/expressions/builder/item.d.ts +6 -2
  158. package/dist/components/form/expressions/builder/item.d.ts.map +1 -1
  159. package/dist/components/form/expressions/builder/item.js +19 -5
  160. package/dist/components/form/expressions/builder/item.js.map +1 -1
  161. package/dist/components/form/expressions/builder/renderTemplate.js +1 -1
  162. package/dist/components/form/expressions/builder/renderTemplate.js.map +1 -1
  163. package/dist/components/form/expressions/dpqlMockRecordPath.d.ts +11 -0
  164. package/dist/components/form/expressions/dpqlMockRecordPath.d.ts.map +1 -0
  165. package/dist/components/form/expressions/dpqlMockRecordPath.js +254 -0
  166. package/dist/components/form/expressions/dpqlMockRecordPath.js.map +1 -0
  167. package/dist/components/form/expressions/expressionOperands.d.ts +16 -0
  168. package/dist/components/form/expressions/expressionOperands.d.ts.map +1 -0
  169. package/dist/components/form/expressions/expressionOperands.js +97 -0
  170. package/dist/components/form/expressions/expressionOperands.js.map +1 -0
  171. package/dist/components/form/expressions/fieldPath.d.ts +24 -0
  172. package/dist/components/form/expressions/fieldPath.d.ts.map +1 -0
  173. package/dist/components/form/expressions/fieldPath.js +152 -0
  174. package/dist/components/form/expressions/fieldPath.js.map +1 -0
  175. package/dist/components/form/expressions/loneValue.d.ts +17 -0
  176. package/dist/components/form/expressions/loneValue.d.ts.map +1 -0
  177. package/dist/components/form/expressions/loneValue.js +33 -0
  178. package/dist/components/form/expressions/loneValue.js.map +1 -0
  179. package/dist/components/form/expressions/mockExpressions.d.ts.map +1 -1
  180. package/dist/components/form/expressions/mockExpressions.js +22 -5
  181. package/dist/components/form/expressions/mockExpressions.js.map +1 -1
  182. package/dist/components/form/expressions/renderExpressionToText.d.ts +2 -0
  183. package/dist/components/form/expressions/renderExpressionToText.d.ts.map +1 -1
  184. package/dist/components/form/expressions/renderExpressionToText.js +43 -10
  185. package/dist/components/form/expressions/renderExpressionToText.js.map +1 -1
  186. package/dist/components/form/expressions/textOfExpression.d.ts +18 -0
  187. package/dist/components/form/expressions/textOfExpression.d.ts.map +1 -0
  188. package/dist/components/form/expressions/textOfExpression.js +49 -0
  189. package/dist/components/form/expressions/textOfExpression.js.map +1 -0
  190. package/dist/components/form/expressions/types.d.ts +12 -0
  191. package/dist/components/form/expressions/types.d.ts.map +1 -1
  192. package/dist/components/form/expressions/types.js +6 -1
  193. package/dist/components/form/expressions/types.js.map +1 -1
  194. package/dist/components/form/expressions/useExpressionType.d.ts +26 -0
  195. package/dist/components/form/expressions/useExpressionType.d.ts.map +1 -0
  196. package/dist/components/form/expressions/useExpressionType.js +181 -0
  197. package/dist/components/form/expressions/useExpressionType.js.map +1 -0
  198. package/dist/components/form/expressions/useRenderExpression.d.ts.map +1 -1
  199. package/dist/components/form/expressions/useRenderExpression.js +13 -9
  200. package/dist/components/form/expressions/useRenderExpression.js.map +1 -1
  201. package/dist/components/form/expressions/wildcardExpressions.d.ts +27 -0
  202. package/dist/components/form/expressions/wildcardExpressions.d.ts.map +1 -0
  203. package/dist/components/form/expressions/wildcardExpressions.js +101 -0
  204. package/dist/components/form/expressions/wildcardExpressions.js.map +1 -0
  205. package/dist/components/form/fields/Field.d.ts.map +1 -1
  206. package/dist/components/form/fields/Field.js +43 -20
  207. package/dist/components/form/fields/Field.js.map +1 -1
  208. package/dist/components/form/fields/allowed-values/AllowedValues.d.ts.map +1 -1
  209. package/dist/components/form/fields/allowed-values/AllowedValues.js +39 -6
  210. package/dist/components/form/fields/allowed-values/AllowedValues.js.map +1 -1
  211. package/dist/components/form/fields/allowed-values/choicePicture.d.ts +37 -0
  212. package/dist/components/form/fields/allowed-values/choicePicture.d.ts.map +1 -0
  213. package/dist/components/form/fields/allowed-values/choicePicture.js +64 -0
  214. package/dist/components/form/fields/allowed-values/choicePicture.js.map +1 -0
  215. package/dist/components/form/fields/array/ArrayAuto.d.ts.map +1 -1
  216. package/dist/components/form/fields/array/ArrayAuto.js +24 -0
  217. package/dist/components/form/fields/array/ArrayAuto.js.map +1 -1
  218. package/dist/components/form/fields/array/ArrayAutoField.d.ts.map +1 -1
  219. package/dist/components/form/fields/array/ArrayAutoField.js +36 -13
  220. package/dist/components/form/fields/array/ArrayAutoField.js.map +1 -1
  221. package/dist/components/form/fields/auto/AutoFormField.d.ts +30 -1
  222. package/dist/components/form/fields/auto/AutoFormField.d.ts.map +1 -1
  223. package/dist/components/form/fields/auto/AutoFormField.js +119 -62
  224. package/dist/components/form/fields/auto/AutoFormField.js.map +1 -1
  225. package/dist/components/form/fields/auto/hostEditorValue.d.ts +30 -0
  226. package/dist/components/form/fields/auto/hostEditorValue.d.ts.map +1 -0
  227. package/dist/components/form/fields/auto/hostEditorValue.js +53 -0
  228. package/dist/components/form/fields/auto/hostEditorValue.js.map +1 -0
  229. package/dist/components/form/fields/binary/Binary.d.ts.map +1 -1
  230. package/dist/components/form/fields/binary/Binary.js +23 -3
  231. package/dist/components/form/fields/binary/Binary.js.map +1 -1
  232. package/dist/components/form/fields/boolean/Boolean.d.ts +5 -0
  233. package/dist/components/form/fields/boolean/Boolean.d.ts.map +1 -1
  234. package/dist/components/form/fields/boolean/Boolean.js +9 -1
  235. package/dist/components/form/fields/boolean/Boolean.js.map +1 -1
  236. package/dist/components/form/fields/color/Color.d.ts +103 -16
  237. package/dist/components/form/fields/color/Color.d.ts.map +1 -1
  238. package/dist/components/form/fields/color/Color.js +616 -16
  239. package/dist/components/form/fields/color/Color.js.map +1 -1
  240. package/dist/components/form/fields/emittedValues.d.ts +34 -3
  241. package/dist/components/form/fields/emittedValues.d.ts.map +1 -1
  242. package/dist/components/form/fields/emittedValues.js +24 -1
  243. package/dist/components/form/fields/emittedValues.js.map +1 -1
  244. package/dist/components/form/fields/file/File.d.ts +1 -1
  245. package/dist/components/form/fields/file/File.d.ts.map +1 -1
  246. package/dist/components/form/fields/file/File.js +4 -2
  247. package/dist/components/form/fields/file/File.js.map +1 -1
  248. package/dist/components/form/fields/long-string/LongString.d.ts.map +1 -1
  249. package/dist/components/form/fields/long-string/LongString.js +29 -8
  250. package/dist/components/form/fields/long-string/LongString.js.map +1 -1
  251. package/dist/components/form/fields/markdown/MarkdownView.js +1 -1
  252. package/dist/components/form/fields/multi-select/MultiSelectFormField.d.ts.map +1 -1
  253. package/dist/components/form/fields/multi-select/MultiSelectFormField.js +13 -9
  254. package/dist/components/form/fields/multi-select/MultiSelectFormField.js.map +1 -1
  255. package/dist/components/form/fields/number/Number.d.ts +6 -0
  256. package/dist/components/form/fields/number/Number.d.ts.map +1 -1
  257. package/dist/components/form/fields/number/Number.js +41 -6
  258. package/dist/components/form/fields/number/Number.js.map +1 -1
  259. package/dist/components/form/fields/object/Object.d.ts +1 -1
  260. package/dist/components/form/fields/object/Object.d.ts.map +1 -1
  261. package/dist/components/form/fields/object/Object.js +4 -2
  262. package/dist/components/form/fields/object/Object.js.map +1 -1
  263. package/dist/components/form/fields/pendingEdit.d.ts +52 -0
  264. package/dist/components/form/fields/pendingEdit.d.ts.map +1 -0
  265. package/dist/components/form/fields/pendingEdit.js +79 -0
  266. package/dist/components/form/fields/pendingEdit.js.map +1 -0
  267. package/dist/components/form/fields/radio-group/RadioGroup.d.ts.map +1 -1
  268. package/dist/components/form/fields/radio-group/RadioGroup.js +4 -3
  269. package/dist/components/form/fields/radio-group/RadioGroup.js.map +1 -1
  270. package/dist/components/form/fields/rich-text/RichText.d.ts +20 -1
  271. package/dist/components/form/fields/rich-text/RichText.d.ts.map +1 -1
  272. package/dist/components/form/fields/rich-text/RichText.js +382 -91
  273. package/dist/components/form/fields/rich-text/RichText.js.map +1 -1
  274. package/dist/components/form/fields/rich-text/useTemplateTags.d.ts +18 -0
  275. package/dist/components/form/fields/rich-text/useTemplateTags.d.ts.map +1 -0
  276. package/dist/components/form/fields/rich-text/useTemplateTags.js +80 -0
  277. package/dist/components/form/fields/rich-text/useTemplateTags.js.map +1 -0
  278. package/dist/components/form/fields/schema-definition/CatalogLeafForm.d.ts.map +1 -1
  279. package/dist/components/form/fields/schema-definition/CatalogLeafForm.js +4 -1
  280. package/dist/components/form/fields/schema-definition/CatalogLeafForm.js.map +1 -1
  281. package/dist/components/form/fields/schema-definition/CatalogNodeEditor.d.ts.map +1 -1
  282. package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js +20 -5
  283. package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js.map +1 -1
  284. package/dist/components/form/fields/schema-definition/TableEditor.d.ts.map +1 -1
  285. package/dist/components/form/fields/schema-definition/TableEditor.js +10 -2
  286. package/dist/components/form/fields/schema-definition/TableEditor.js.map +1 -1
  287. package/dist/components/form/fields/schema-definition/index.d.ts.map +1 -1
  288. package/dist/components/form/fields/schema-definition/index.js +8 -4
  289. package/dist/components/form/fields/schema-definition/index.js.map +1 -1
  290. package/dist/components/form/fields/select/Select.d.ts +10 -1
  291. package/dist/components/form/fields/select/Select.d.ts.map +1 -1
  292. package/dist/components/form/fields/select/Select.js +28 -14
  293. package/dist/components/form/fields/select/Select.js.map +1 -1
  294. package/dist/components/form/fields/select/SelectCollection.d.ts +5 -0
  295. package/dist/components/form/fields/select/SelectCollection.d.ts.map +1 -1
  296. package/dist/components/form/fields/select/SelectCollection.js +25 -12
  297. package/dist/components/form/fields/select/SelectCollection.js.map +1 -1
  298. package/dist/components/form/fields/select/unavailableRow.d.ts +23 -0
  299. package/dist/components/form/fields/select/unavailableRow.d.ts.map +1 -0
  300. package/dist/components/form/fields/select/unavailableRow.js +55 -0
  301. package/dist/components/form/fields/select/unavailableRow.js.map +1 -0
  302. package/dist/components/form/fields/template/ReadOnlyTemplateTag.d.ts +11 -5
  303. package/dist/components/form/fields/template/ReadOnlyTemplateTag.d.ts.map +1 -1
  304. package/dist/components/form/fields/template/ReadOnlyTemplateTag.js +21 -5
  305. package/dist/components/form/fields/template/ReadOnlyTemplateTag.js.map +1 -1
  306. package/dist/components/form/fields/template/TemplateBrowser.d.ts +16 -0
  307. package/dist/components/form/fields/template/TemplateBrowser.d.ts.map +1 -0
  308. package/dist/components/form/fields/template/TemplateBrowser.js +89 -0
  309. package/dist/components/form/fields/template/TemplateBrowser.js.map +1 -0
  310. package/dist/components/form/fields/template/TemplateField.d.ts +105 -1
  311. package/dist/components/form/fields/template/TemplateField.d.ts.map +1 -1
  312. package/dist/components/form/fields/template/TemplateField.js +678 -107
  313. package/dist/components/form/fields/template/TemplateField.js.map +1 -1
  314. package/dist/components/form/fields/template/TemplatePicker.d.ts +54 -0
  315. package/dist/components/form/fields/template/TemplatePicker.d.ts.map +1 -0
  316. package/dist/components/form/fields/template/TemplatePicker.js +451 -0
  317. package/dist/components/form/fields/template/TemplatePicker.js.map +1 -0
  318. package/dist/components/form/fields/template/TemplateText.d.ts +0 -17
  319. package/dist/components/form/fields/template/TemplateText.d.ts.map +1 -1
  320. package/dist/components/form/fields/template/TemplateText.js +22 -16
  321. package/dist/components/form/fields/template/TemplateText.js.map +1 -1
  322. package/dist/components/form/fields/template/referenceNames.d.ts +63 -0
  323. package/dist/components/form/fields/template/referenceNames.d.ts.map +1 -0
  324. package/dist/components/form/fields/template/referenceNames.js +69 -0
  325. package/dist/components/form/fields/template/referenceNames.js.map +1 -0
  326. package/dist/components/form/fields/template/writtenAsText.d.ts +61 -0
  327. package/dist/components/form/fields/template/writtenAsText.d.ts.map +1 -0
  328. package/dist/components/form/fields/template/writtenAsText.js +204 -0
  329. package/dist/components/form/fields/template/writtenAsText.js.map +1 -0
  330. package/dist/components/form/index.d.ts +12 -0
  331. package/dist/components/form/index.d.ts.map +1 -1
  332. package/dist/components/form/index.js +25 -1
  333. package/dist/components/form/index.js.map +1 -1
  334. package/dist/components/form/typeSentenceForm.d.ts +17 -0
  335. package/dist/components/form/typeSentenceForm.d.ts.map +1 -0
  336. package/dist/components/form/typeSentenceForm.js +54 -0
  337. package/dist/components/form/typeSentenceForm.js.map +1 -0
  338. package/dist/components/imageLightbox/ImageLightbox.d.ts.map +1 -1
  339. package/dist/components/imageLightbox/ImageLightbox.js +19 -7
  340. package/dist/components/imageLightbox/ImageLightbox.js.map +1 -1
  341. package/dist/components/log/Log.d.ts.map +1 -1
  342. package/dist/components/log/Log.js +20 -8
  343. package/dist/components/log/Log.js.map +1 -1
  344. package/dist/components/menu/Menu.d.ts.map +1 -1
  345. package/dist/components/menu/Menu.js +19 -10
  346. package/dist/components/menu/Menu.js.map +1 -1
  347. package/dist/components/smartEditor/CompletionMenu.d.ts +53 -0
  348. package/dist/components/smartEditor/CompletionMenu.d.ts.map +1 -0
  349. package/dist/components/smartEditor/CompletionMenu.js +302 -0
  350. package/dist/components/smartEditor/CompletionMenu.js.map +1 -0
  351. package/dist/components/smartEditor/MarkdownDoc.d.ts +1 -1
  352. package/dist/components/smartEditor/MarkdownDoc.js +3 -3
  353. package/dist/components/smartEditor/MarkdownDoc.js.map +1 -1
  354. package/dist/components/smartEditor/SmartEditor.d.ts.map +1 -1
  355. package/dist/components/smartEditor/SmartEditor.js +584 -190
  356. package/dist/components/smartEditor/SmartEditor.js.map +1 -1
  357. package/dist/components/smartEditor/completionStyle.d.ts +28 -0
  358. package/dist/components/smartEditor/completionStyle.d.ts.map +1 -0
  359. package/dist/components/smartEditor/completionStyle.js +79 -0
  360. package/dist/components/smartEditor/completionStyle.js.map +1 -0
  361. package/dist/components/smartEditor/contextTitle.d.ts +10 -0
  362. package/dist/components/smartEditor/contextTitle.d.ts.map +1 -0
  363. package/dist/components/smartEditor/contextTitle.js +21 -0
  364. package/dist/components/smartEditor/contextTitle.js.map +1 -0
  365. package/dist/components/smartEditor/editingAids.d.ts +64 -0
  366. package/dist/components/smartEditor/editingAids.d.ts.map +1 -0
  367. package/dist/components/smartEditor/editingAids.js +213 -0
  368. package/dist/components/smartEditor/editingAids.js.map +1 -0
  369. package/dist/components/smartEditor/index.d.ts +6 -1
  370. package/dist/components/smartEditor/index.d.ts.map +1 -1
  371. package/dist/components/smartEditor/index.js +19 -1
  372. package/dist/components/smartEditor/index.js.map +1 -1
  373. package/dist/components/smartEditor/templateCompletions.d.ts +98 -0
  374. package/dist/components/smartEditor/templateCompletions.d.ts.map +1 -0
  375. package/dist/components/smartEditor/templateCompletions.js +380 -0
  376. package/dist/components/smartEditor/templateCompletions.js.map +1 -0
  377. package/dist/components/smartEditor/typedReferences.d.ts +34 -0
  378. package/dist/components/smartEditor/typedReferences.d.ts.map +1 -0
  379. package/dist/components/smartEditor/typedReferences.js +179 -0
  380. package/dist/components/smartEditor/typedReferences.js.map +1 -0
  381. package/dist/components/smartEditor/types.d.ts +116 -2
  382. package/dist/components/smartEditor/types.d.ts.map +1 -1
  383. package/dist/components/smartEditor/useEditingAids.d.ts +38 -0
  384. package/dist/components/smartEditor/useEditingAids.d.ts.map +1 -0
  385. package/dist/components/smartEditor/useEditingAids.js +336 -0
  386. package/dist/components/smartEditor/useEditingAids.js.map +1 -0
  387. package/dist/components/smartEditor/useLspAutocomplete.d.ts +106 -3
  388. package/dist/components/smartEditor/useLspAutocomplete.d.ts.map +1 -1
  389. package/dist/components/smartEditor/useLspAutocomplete.js +562 -151
  390. package/dist/components/smartEditor/useLspAutocomplete.js.map +1 -1
  391. package/dist/components/smartEditor/useLspHover.d.ts +33 -7
  392. package/dist/components/smartEditor/useLspHover.d.ts.map +1 -1
  393. package/dist/components/smartEditor/useLspHover.js +364 -35
  394. package/dist/components/smartEditor/useLspHover.js.map +1 -1
  395. package/dist/components/smartEditor/useLspSemanticTokens.js +1 -1
  396. package/dist/components/smartEditor/useLspSemanticTokens.js.map +1 -1
  397. package/dist/components/smartEditor/useLspSession.d.ts +6 -0
  398. package/dist/components/smartEditor/useLspSession.d.ts.map +1 -1
  399. package/dist/components/smartEditor/useLspSession.js +7 -6
  400. package/dist/components/smartEditor/useLspSession.js.map +1 -1
  401. package/dist/components/smartEditor/useLspSignatureHelp.d.ts.map +1 -1
  402. package/dist/components/smartEditor/useLspSignatureHelp.js +6 -11
  403. package/dist/components/smartEditor/useLspSignatureHelp.js.map +1 -1
  404. package/dist/components/smartEditor/useTabCameIn.d.ts +10 -0
  405. package/dist/components/smartEditor/useTabCameIn.d.ts.map +1 -0
  406. package/dist/components/smartEditor/useTabCameIn.js +42 -0
  407. package/dist/components/smartEditor/useTabCameIn.js.map +1 -0
  408. package/dist/components/supportTicket/AttachmentChips.d.ts.map +1 -1
  409. package/dist/components/supportTicket/AttachmentChips.js +15 -5
  410. package/dist/components/supportTicket/AttachmentChips.js.map +1 -1
  411. package/dist/components/supportTicket/ReferencePicker.d.ts +9 -2
  412. package/dist/components/supportTicket/ReferencePicker.d.ts.map +1 -1
  413. package/dist/components/supportTicket/ReferencePicker.js +27 -6
  414. package/dist/components/supportTicket/ReferencePicker.js.map +1 -1
  415. package/dist/components/supportTicket/TicketHeader.d.ts +3 -4
  416. package/dist/components/supportTicket/TicketHeader.d.ts.map +1 -1
  417. package/dist/components/supportTicket/TicketHeader.js +20 -2
  418. package/dist/components/supportTicket/TicketHeader.js.map +1 -1
  419. package/dist/components/supportTicket/TicketMetaTags.d.ts +1 -1
  420. package/dist/components/ticketReferences/TicketReferences.d.ts.map +1 -1
  421. package/dist/components/ticketReferences/TicketReferences.js +9 -4
  422. package/dist/components/ticketReferences/TicketReferences.js.map +1 -1
  423. package/dist/components/ticketThread/TicketThread.d.ts.map +1 -1
  424. package/dist/components/ticketThread/TicketThread.js +38 -13
  425. package/dist/components/ticketThread/TicketThread.js.map +1 -1
  426. package/dist/helpers/allowedValues.d.ts +21 -0
  427. package/dist/helpers/allowedValues.d.ts.map +1 -1
  428. package/dist/helpers/allowedValues.js +40 -1
  429. package/dist/helpers/allowedValues.js.map +1 -1
  430. package/dist/helpers/descriptionTooltip.d.ts +46 -0
  431. package/dist/helpers/descriptionTooltip.d.ts.map +1 -0
  432. package/dist/helpers/descriptionTooltip.js +76 -0
  433. package/dist/helpers/descriptionTooltip.js.map +1 -0
  434. package/dist/helpers/domProps.d.ts +5 -0
  435. package/dist/helpers/domProps.d.ts.map +1 -0
  436. package/dist/helpers/domProps.js +47 -0
  437. package/dist/helpers/domProps.js.map +1 -0
  438. package/dist/helpers/expressions.d.ts +115 -4
  439. package/dist/helpers/expressions.d.ts.map +1 -1
  440. package/dist/helpers/expressions.js +247 -29
  441. package/dist/helpers/expressions.js.map +1 -1
  442. package/dist/helpers/hoveringPointer.d.ts +26 -0
  443. package/dist/helpers/hoveringPointer.d.ts.map +1 -0
  444. package/dist/helpers/hoveringPointer.js +29 -0
  445. package/dist/helpers/hoveringPointer.js.map +1 -0
  446. package/dist/helpers/markdownText.d.ts +14 -0
  447. package/dist/helpers/markdownText.d.ts.map +1 -0
  448. package/dist/helpers/markdownText.js +160 -0
  449. package/dist/helpers/markdownText.js.map +1 -0
  450. package/dist/helpers/noDescription.d.ts +9 -0
  451. package/dist/helpers/noDescription.d.ts.map +1 -0
  452. package/dist/helpers/noDescription.js +13 -0
  453. package/dist/helpers/noDescription.js.map +1 -0
  454. package/dist/helpers/optionUiTypes.d.ts +2 -2
  455. package/dist/helpers/qorusTypeCatalogue.d.ts +147 -0
  456. package/dist/helpers/qorusTypeCatalogue.d.ts.map +1 -0
  457. package/dist/helpers/qorusTypeCatalogue.js +505 -0
  458. package/dist/helpers/qorusTypeCatalogue.js.map +1 -0
  459. package/dist/helpers/readableColors.d.ts +36 -0
  460. package/dist/helpers/readableColors.d.ts.map +1 -0
  461. package/dist/helpers/readableColors.js +116 -0
  462. package/dist/helpers/readableColors.js.map +1 -0
  463. package/dist/helpers/recordFieldReference.d.ts +15 -0
  464. package/dist/helpers/recordFieldReference.d.ts.map +1 -0
  465. package/dist/helpers/recordFieldReference.js +89 -0
  466. package/dist/helpers/recordFieldReference.js.map +1 -0
  467. package/dist/helpers/templateCatalogue.d.ts +104 -0
  468. package/dist/helpers/templateCatalogue.d.ts.map +1 -0
  469. package/dist/helpers/templateCatalogue.js +116 -0
  470. package/dist/helpers/templateCatalogue.js.map +1 -0
  471. package/dist/helpers/templateCatalogueContext.d.ts +19 -0
  472. package/dist/helpers/templateCatalogueContext.d.ts.map +1 -0
  473. package/dist/helpers/templateCatalogueContext.js +31 -0
  474. package/dist/helpers/templateCatalogueContext.js.map +1 -0
  475. package/dist/helpers/templateItems.d.ts +2 -2
  476. package/dist/helpers/templateItems.d.ts.map +1 -1
  477. package/dist/helpers/templateItems.js +6 -4
  478. package/dist/helpers/templateItems.js.map +1 -1
  479. package/dist/helpers/templateText.d.ts +1 -0
  480. package/dist/helpers/templateText.d.ts.map +1 -1
  481. package/dist/helpers/templateText.js +7 -3
  482. package/dist/helpers/templateText.js.map +1 -1
  483. package/dist/helpers/templateTree.d.ts +248 -0
  484. package/dist/helpers/templateTree.d.ts.map +1 -0
  485. package/dist/helpers/templateTree.js +892 -0
  486. package/dist/helpers/templateTree.js.map +1 -0
  487. package/dist/helpers/templateType.d.ts +28 -0
  488. package/dist/helpers/templateType.d.ts.map +1 -0
  489. package/dist/helpers/templateType.js +30 -0
  490. package/dist/helpers/templateType.js.map +1 -0
  491. package/dist/helpers/templates.d.ts +86 -16
  492. package/dist/helpers/templates.d.ts.map +1 -1
  493. package/dist/helpers/templates.js +305 -45
  494. package/dist/helpers/templates.js.map +1 -1
  495. package/dist/helpers/validations.d.ts +27 -0
  496. package/dist/helpers/validations.d.ts.map +1 -1
  497. package/dist/helpers/validations.js +169 -39
  498. package/dist/helpers/validations.js.map +1 -1
  499. package/dist/helpers/webLink.d.ts +8 -0
  500. package/dist/helpers/webLink.d.ts.map +1 -0
  501. package/dist/helpers/webLink.js +29 -0
  502. package/dist/helpers/webLink.js.map +1 -0
  503. package/dist/hooks/useQorusTypes.d.ts +12 -17
  504. package/dist/hooks/useQorusTypes.d.ts.map +1 -1
  505. package/dist/hooks/useQorusTypes.js +44 -172
  506. package/dist/hooks/useQorusTypes.js.map +1 -1
  507. package/dist/hooks/useReadableIntentShade.d.ts +9 -0
  508. package/dist/hooks/useReadableIntentShade.d.ts.map +1 -0
  509. package/dist/hooks/useReadableIntentShade.js +23 -0
  510. package/dist/hooks/useReadableIntentShade.js.map +1 -0
  511. package/dist/hooks/useReadableOpacity.d.ts +6 -0
  512. package/dist/hooks/useReadableOpacity.d.ts.map +1 -0
  513. package/dist/hooks/useReadableOpacity.js +17 -0
  514. package/dist/hooks/useReadableOpacity.js.map +1 -0
  515. package/dist/index.d.ts +8 -0
  516. package/dist/index.d.ts.map +1 -1
  517. package/dist/index.js +24 -1
  518. package/dist/index.js.map +1 -1
  519. package/dist/tracking/ui/ExperimentCard.d.ts +1 -1
  520. package/dist/tracking/ui/ExperimentCard.d.ts.map +1 -1
  521. package/dist/tracking/ui/ExperimentCard.js +26 -10
  522. package/dist/tracking/ui/ExperimentCard.js.map +1 -1
  523. package/dist/tracking/ui/card.d.ts +2 -2
  524. package/dist/tracking/ui/card.d.ts.map +1 -1
  525. package/dist/tracking/ui/card.js +2 -2
  526. package/dist/tracking/ui/card.js.map +1 -1
  527. package/dist/tracking/ui/readable.d.ts +14 -0
  528. package/dist/tracking/ui/readable.d.ts.map +1 -0
  529. package/dist/tracking/ui/readable.js +60 -0
  530. package/dist/tracking/ui/readable.js.map +1 -0
  531. package/dist/utils/fetch.d.ts +9 -2
  532. package/dist/utils/fetch.d.ts.map +1 -1
  533. package/dist/utils/fetch.js +6 -5
  534. package/dist/utils/fetch.js.map +1 -1
  535. package/dist/utils/lspClient.types.d.ts +2 -0
  536. package/dist/utils/lspClient.types.d.ts.map +1 -1
  537. package/dist/utils/websocket.d.ts +65 -2
  538. package/dist/utils/websocket.d.ts.map +1 -1
  539. package/dist/utils/websocket.js +276 -44
  540. package/dist/utils/websocket.js.map +1 -1
  541. package/package.json +14 -6
  542. package/.claude/CLAUDE.md +0 -317
  543. package/.tasks/EXPORT_EXPRESSION_BUILDER.md +0 -38
  544. package/.tasks/EXPRESSION_BUILDER_REPORT.md +0 -149
  545. package/.tasks/EXPRESSION_FIELD_SEAMS.md +0 -66
  546. package/.tasks/FIELD_STACK_REPORT.md +0 -234
  547. package/.tasks/FORM_ENGINE_COMPACT_READ_FIRST.md +0 -558
  548. package/.tasks/FORM_ENGINE_EXPRESSIONS.md +0 -197
  549. package/.tasks/FORM_ENGINE_OPTIONS_SYNC.md +0 -95
  550. package/.tasks/FORM_FIELD_EXTRAS.md +0 -72
  551. package/.tasks/INDEX.md +0 -111
  552. package/.tasks/LSP_SHARED_CONNECTION.md +0 -75
  553. package/.tasks/QONSOLE_ASSIST_FEATURES.md +0 -306
  554. package/.tasks/RENDER_EXPRESSION_LSP.md +0 -159
  555. package/.tasks/REQRAFT_AUTO_FIELD.md +0 -176
  556. package/.tasks/SCHEMA_DEFINITION_FIELD.md +0 -250
  557. package/.tasks/SMART_EDITOR_CONTEXT_AND_POLISH.md +0 -340
  558. package/.tasks/SMART_EDITOR_LSP_FEATURES.md +0 -299
  559. package/.tasks/SMART_EDITOR_REVIEW_FOLLOWUPS.md +0 -280
  560. package/.tasks/SMART_EDITOR_UX_POLISH.md +0 -383
  561. package/.tasks/SMART_EDITOR_VISUAL_POLISH.md +0 -246
  562. package/.tasks/STORY_NETWORK_ISOLATION.md +0 -98
  563. package/.tasks/TEMPLATE_TOKEN_GRAMMAR.md +0 -72
  564. package/CODE_OF_CONDUCT.md +0 -105
  565. package/CONTRIBUTING.MD +0 -78
  566. package/SECURITY.md +0 -3
  567. package/chromatic.config.json +0 -5
  568. package/design/COMPACT_ENGINE_REDESIGN.md +0 -156
  569. package/design/COMPACT_INFO_DISPLAY.md +0 -87
  570. package/design/COMPACT_PARITY.md +0 -85
  571. package/design/EXPRESSION_BUILDER_REPORT_STRATEGY.md +0 -92
  572. package/design/FORM_ENGINE_COMPACT.md +0 -300
  573. package/design/FORM_ENGINE_COMPACT_UX_PLAN.md +0 -353
  574. package/design/FORM_ENGINE_EXPRESSIONS.md +0 -257
  575. package/design/FORM_ENGINE_FIELD_MIGRATION.md +0 -419
  576. package/design/IDE_INTEGRATION.md +0 -64
  577. package/design/RENDER_EXPRESSION_TRANSPORT.md +0 -156
  578. package/design/SELECT_DIALOG_FLOOR.md +0 -86
  579. package/design/SMART_EDITOR_UX.md +0 -438
  580. package/design/TRACKING.md +0 -290
  581. package/design/UNAVAILABLE_ALLOWED_VALUES.md +0 -226
  582. package/src/components/Description/index.tsx +0 -254
  583. package/src/components/Description/markdownRendererContext.tsx +0 -29
  584. package/src/components/FocusedEditing/index.tsx +0 -50
  585. package/src/components/codeSize/index.tsx +0 -79
  586. package/src/components/composer/Composer.stories.tsx +0 -238
  587. package/src/components/composer/Composer.tsx +0 -554
  588. package/src/components/composer/helpers.ts +0 -74
  589. package/src/components/composer/index.ts +0 -2
  590. package/src/components/dpqlEditor/DpqlEditor.stories.tsx +0 -1183
  591. package/src/components/dpqlEditor/DpqlEditor.tsx +0 -219
  592. package/src/components/dpqlEditor/dpqlHelpers.ts +0 -287
  593. package/src/components/dpqlEditor/dpqlInserter.ts +0 -121
  594. package/src/components/dpqlEditor/dpqlProbe.ts +0 -165
  595. package/src/components/dpqlEditor/dpqlTags.ts +0 -114
  596. package/src/components/dpqlEditor/index.ts +0 -41
  597. package/src/components/dpqlEditor/types.ts +0 -203
  598. package/src/components/dpqlEditor/useDpqlProbe.ts +0 -33
  599. package/src/components/dpqlEditor/useDpqlSession.ts +0 -411
  600. package/src/components/form/engine/CompactRow.tsx +0 -2620
  601. package/src/components/form/engine/CompactToolbar.tsx +0 -330
  602. package/src/components/form/engine/FormEngine.stories.tsx +0 -9920
  603. package/src/components/form/engine/FormEngine.tsx +0 -4569
  604. package/src/components/form/engine/FormEngineRemote.stories.tsx +0 -679
  605. package/src/components/form/engine/FormEngineStickyHeaders.stories.tsx +0 -331
  606. package/src/components/form/engine/FormFieldsSkeleton.tsx +0 -82
  607. package/src/components/form/engine/OptionFieldMessages.tsx +0 -477
  608. package/src/components/form/engine/OptionsHelpDialog.tsx +0 -29
  609. package/src/components/form/engine/__fixtures__/basicFormOptions.ts +0 -309
  610. package/src/components/form/engine/__fixtures__/fieldChromeOptions.ts +0 -45
  611. package/src/components/form/engine/_structuredData/SchemaDataView.stories.tsx +0 -233
  612. package/src/components/form/engine/_structuredData/SchemaDataView.tsx +0 -742
  613. package/src/components/form/engine/_structuredData/StructuredDataView.stories.tsx +0 -85
  614. package/src/components/form/engine/_structuredData/StructuredDataView.tsx +0 -75
  615. package/src/components/form/engine/_structuredData/structuredData.ts +0 -145
  616. package/src/components/form/engine/compactRowContext.ts +0 -148
  617. package/src/components/form/engine/compactRowStyles.ts +0 -898
  618. package/src/components/form/engine/compactToolbarContext.ts +0 -69
  619. package/src/components/form/engine/optionActions.ts +0 -128
  620. package/src/components/form/engine/optionsContext.ts +0 -24
  621. package/src/components/form/engine/readFirst.ts +0 -1077
  622. package/src/components/form/engine/rendererTypes.ts +0 -107
  623. package/src/components/form/engine/revealRow.ts +0 -123
  624. package/src/components/form/engine/rowFocus.ts +0 -101
  625. package/src/components/form/engine/rowMenuContext.ts +0 -159
  626. package/src/components/form/engine/rowOpenPicker.ts +0 -27
  627. package/src/components/form/engine/typeChoices.ts +0 -63
  628. package/src/components/form/engine/variants/FormEngineVariants.stories.tsx +0 -159
  629. package/src/components/form/engine/variants/VariantCalmTable.tsx +0 -244
  630. package/src/components/form/engine/variants/VariantCards.tsx +0 -212
  631. package/src/components/form/engine/variants/VariantFocus.tsx +0 -382
  632. package/src/components/form/engine/variants/VariantMinimal.tsx +0 -170
  633. package/src/components/form/engine/variants/focusDemo.ts +0 -145
  634. package/src/components/form/engine/variants/variantModel.ts +0 -223
  635. package/src/components/form/engine/variants/variantParts.tsx +0 -313
  636. package/src/components/form/expressions/DpqlRendering.tsx +0 -85
  637. package/src/components/form/expressions/ExpressionField.stories.tsx +0 -1395
  638. package/src/components/form/expressions/ExpressionField.tsx +0 -503
  639. package/src/components/form/expressions/argumentPresence.ts +0 -213
  640. package/src/components/form/expressions/builder/ExpressionBuilder.stories.tsx +0 -1683
  641. package/src/components/form/expressions/builder/argumentDetail.tsx +0 -17
  642. package/src/components/form/expressions/builder/argumentLabel.tsx +0 -146
  643. package/src/components/form/expressions/builder/argumentSlot.tsx +0 -101
  644. package/src/components/form/expressions/builder/argumentWrapper.tsx +0 -243
  645. package/src/components/form/expressions/builder/confirmMismatchedTypesModal.tsx +0 -120
  646. package/src/components/form/expressions/builder/confirmUnsupportedTypeModal.tsx +0 -69
  647. package/src/components/form/expressions/builder/index.tsx +0 -1545
  648. package/src/components/form/expressions/builder/item.tsx +0 -89
  649. package/src/components/form/expressions/builder/moveToPositionStrip.tsx +0 -156
  650. package/src/components/form/expressions/builder/renderTemplate.tsx +0 -42
  651. package/src/components/form/expressions/dpqlMockLanguage.ts +0 -566
  652. package/src/components/form/expressions/dpqlMockLsp.ts +0 -126
  653. package/src/components/form/expressions/mockExpressions.ts +0 -317
  654. package/src/components/form/expressions/renderExpressionToText.ts +0 -137
  655. package/src/components/form/expressions/types.ts +0 -110
  656. package/src/components/form/expressions/useExpressions.ts +0 -101
  657. package/src/components/form/expressions/useRenderExpression.ts +0 -165
  658. package/src/components/form/fields/Field.stories.tsx +0 -143
  659. package/src/components/form/fields/Field.tsx +0 -732
  660. package/src/components/form/fields/allowed-values/AllowedValues.tsx +0 -297
  661. package/src/components/form/fields/array/ArrayAuto.tsx +0 -237
  662. package/src/components/form/fields/array/ArrayAutoField.stories.tsx +0 -475
  663. package/src/components/form/fields/array/ArrayAutoField.tsx +0 -367
  664. package/src/components/form/fields/auto/AutoFormField.stories.tsx +0 -825
  665. package/src/components/form/fields/auto/AutoFormField.tsx +0 -1164
  666. package/src/components/form/fields/binary/Binary.stories.tsx +0 -122
  667. package/src/components/form/fields/binary/Binary.tsx +0 -91
  668. package/src/components/form/fields/boolean/Boolean.stories.tsx +0 -125
  669. package/src/components/form/fields/boolean/Boolean.tsx +0 -34
  670. package/src/components/form/fields/byte-size/ByteSize.stories.tsx +0 -87
  671. package/src/components/form/fields/byte-size/ByteSize.tsx +0 -58
  672. package/src/components/form/fields/color/Color.stories.tsx +0 -99
  673. package/src/components/form/fields/color/Color.tsx +0 -46
  674. package/src/components/form/fields/cron/Cron.stories.tsx +0 -68
  675. package/src/components/form/fields/cron/Cron.tsx +0 -80
  676. package/src/components/form/fields/date/Date.stories.tsx +0 -77
  677. package/src/components/form/fields/date/Date.tsx +0 -55
  678. package/src/components/form/fields/emittedValues.ts +0 -70
  679. package/src/components/form/fields/file/File.stories.tsx +0 -161
  680. package/src/components/form/fields/file/File.tsx +0 -227
  681. package/src/components/form/fields/long-string/LongString.stories.tsx +0 -120
  682. package/src/components/form/fields/long-string/LongString.tsx +0 -130
  683. package/src/components/form/fields/markdown/Markdown.stories.tsx +0 -76
  684. package/src/components/form/fields/markdown/Markdown.tsx +0 -81
  685. package/src/components/form/fields/markdown/MarkdownView.tsx +0 -222
  686. package/src/components/form/fields/multi-select/MultiSelectFormField.tsx +0 -139
  687. package/src/components/form/fields/number/Number.stories.tsx +0 -159
  688. package/src/components/form/fields/number/Number.tsx +0 -160
  689. package/src/components/form/fields/object/Object.stories.tsx +0 -398
  690. package/src/components/form/fields/object/Object.tsx +0 -255
  691. package/src/components/form/fields/radio-group/RadioGroup.stories.tsx +0 -95
  692. package/src/components/form/fields/radio-group/RadioGroup.tsx +0 -46
  693. package/src/components/form/fields/radio-group/images/java-96x128.png +0 -0
  694. package/src/components/form/fields/radio-group/images/python-129x128.png +0 -0
  695. package/src/components/form/fields/radio-group/images/qore-106x128.png +0 -0
  696. package/src/components/form/fields/rich-text/RichText.stories.tsx +0 -260
  697. package/src/components/form/fields/rich-text/RichText.tsx +0 -537
  698. package/src/components/form/fields/schema-definition/CatalogLeafForm.tsx +0 -242
  699. package/src/components/form/fields/schema-definition/CatalogNodeEditor.tsx +0 -758
  700. package/src/components/form/fields/schema-definition/Hint.tsx +0 -22
  701. package/src/components/form/fields/schema-definition/InlineValidationBanner.tsx +0 -138
  702. package/src/components/form/fields/schema-definition/Loader.tsx +0 -20
  703. package/src/components/form/fields/schema-definition/MigrationsTab.tsx +0 -187
  704. package/src/components/form/fields/schema-definition/SchemaDefinitionField.stories.tsx +0 -286
  705. package/src/components/form/fields/schema-definition/TableEditor.tsx +0 -155
  706. package/src/components/form/fields/schema-definition/TablesTab.tsx +0 -138
  707. package/src/components/form/fields/schema-definition/catalog.ts +0 -237
  708. package/src/components/form/fields/schema-definition/helpers.ts +0 -90
  709. package/src/components/form/fields/schema-definition/index.tsx +0 -418
  710. package/src/components/form/fields/schema-definition/mockCatalog.ts +0 -325
  711. package/src/components/form/fields/schema-definition/mockDefinition.ts +0 -111
  712. package/src/components/form/fields/schema-definition/referenceSuggestions.tsx +0 -152
  713. package/src/components/form/fields/schema-definition/starterTemplate.ts +0 -68
  714. package/src/components/form/fields/schema-definition/types.ts +0 -185
  715. package/src/components/form/fields/schema-definition/useSchemaOptionCatalog.ts +0 -49
  716. package/src/components/form/fields/select/Select.stories.tsx +0 -872
  717. package/src/components/form/fields/select/Select.tsx +0 -624
  718. package/src/components/form/fields/select/SelectCollection.tsx +0 -594
  719. package/src/components/form/fields/string/String.stories.tsx +0 -86
  720. package/src/components/form/fields/string/String.tsx +0 -43
  721. package/src/components/form/fields/template/ExampleValueModal.stories.tsx +0 -114
  722. package/src/components/form/fields/template/ExampleValueModal.tsx +0 -99
  723. package/src/components/form/fields/template/ReadOnlyTemplateTag.tsx +0 -47
  724. package/src/components/form/fields/template/TemplateField.stories.tsx +0 -1121
  725. package/src/components/form/fields/template/TemplateField.tsx +0 -1717
  726. package/src/components/form/fields/template/TemplateText.tsx +0 -115
  727. package/src/components/form/fields/template/__fixtures__/longExampleValue.ts +0 -7
  728. package/src/components/form/fields/template/__fixtures__/multiLevelTemplates.json +0 -147
  729. package/src/components/form/fields/template/__fixtures__/templates.json +0 -83
  730. package/src/components/form/fields/timeout/Timeout.stories.tsx +0 -228
  731. package/src/components/form/fields/timeout/Timeout.tsx +0 -87
  732. package/src/components/form/fields/url/Url.stories.tsx +0 -94
  733. package/src/components/form/fields/url/Url.tsx +0 -85
  734. package/src/components/form/index.tsx +0 -47
  735. package/src/components/imageLightbox/ImageLightbox.stories.tsx +0 -238
  736. package/src/components/imageLightbox/ImageLightbox.tsx +0 -236
  737. package/src/components/imageLightbox/index.ts +0 -1
  738. package/src/components/log/Log.stories.tsx +0 -333
  739. package/src/components/log/Log.tsx +0 -285
  740. package/src/components/menu/Menu.stories.tsx +0 -155
  741. package/src/components/menu/Menu.tsx +0 -312
  742. package/src/components/qonsoleSmartInput/QonsoleSmartInput.stories.tsx +0 -797
  743. package/src/components/qonsoleSmartInput/QonsoleSmartInput.tsx +0 -105
  744. package/src/components/qonsoleSmartInput/index.ts +0 -16
  745. package/src/components/qonsoleSmartInput/qonsoleInserter.ts +0 -77
  746. package/src/components/qonsoleSmartInput/types.ts +0 -133
  747. package/src/components/qonsoleSmartInput/useQonsoleSession.ts +0 -124
  748. package/src/components/searchFilterBar/SearchFilterBar.stories.tsx +0 -62
  749. package/src/components/searchFilterBar/SearchFilterBar.tsx +0 -144
  750. package/src/components/searchFilterBar/index.ts +0 -1
  751. package/src/components/smartEditor/MarkdownDoc.tsx +0 -190
  752. package/src/components/smartEditor/SmartEditor.stories.tsx +0 -475
  753. package/src/components/smartEditor/SmartEditor.tsx +0 -808
  754. package/src/components/smartEditor/__fixtures__/mockLspServer.ts +0 -205
  755. package/src/components/smartEditor/helpers.ts +0 -217
  756. package/src/components/smartEditor/index.ts +0 -35
  757. package/src/components/smartEditor/styling.ts +0 -45
  758. package/src/components/smartEditor/types.ts +0 -211
  759. package/src/components/smartEditor/useLspAutocomplete.ts +0 -758
  760. package/src/components/smartEditor/useLspDiagnosticDecorations.ts +0 -125
  761. package/src/components/smartEditor/useLspHover.ts +0 -230
  762. package/src/components/smartEditor/useLspSemanticTokens.ts +0 -298
  763. package/src/components/smartEditor/useLspSession.ts +0 -231
  764. package/src/components/smartEditor/useLspSignatureHelp.ts +0 -198
  765. package/src/components/supportTicket/AttachmentChips.stories.tsx +0 -171
  766. package/src/components/supportTicket/AttachmentChips.tsx +0 -147
  767. package/src/components/supportTicket/InterfaceReferenceTags.stories.tsx +0 -257
  768. package/src/components/supportTicket/InterfaceReferenceTags.tsx +0 -129
  769. package/src/components/supportTicket/ReferencePicker.stories.tsx +0 -584
  770. package/src/components/supportTicket/ReferencePicker.tsx +0 -563
  771. package/src/components/supportTicket/TicketConversation.stories.tsx +0 -121
  772. package/src/components/supportTicket/TicketHeader.stories.tsx +0 -183
  773. package/src/components/supportTicket/TicketHeader.tsx +0 -247
  774. package/src/components/supportTicket/TicketMetaTags.stories.tsx +0 -103
  775. package/src/components/supportTicket/TicketMetaTags.tsx +0 -85
  776. package/src/components/supportTicket/TicketReplyBox.stories.tsx +0 -354
  777. package/src/components/supportTicket/TicketReplyBox.tsx +0 -150
  778. package/src/components/supportTicket/__fixtures__/kindMarks.ts +0 -28
  779. package/src/components/supportTicket/attachmentAccess.ts +0 -97
  780. package/src/components/supportTicket/fileToAttachment.ts +0 -24
  781. package/src/components/supportTicket/index.ts +0 -10
  782. package/src/components/supportTicket/meta.ts +0 -206
  783. package/src/components/supportTicket/ticketModel.ts +0 -131
  784. package/src/components/supportTicket/useLoadedImages.ts +0 -73
  785. package/src/components/ticketReferences/TicketReferences.stories.tsx +0 -315
  786. package/src/components/ticketReferences/TicketReferences.tsx +0 -906
  787. package/src/components/ticketReferences/index.ts +0 -2
  788. package/src/components/ticketThread/TicketThread.stories.tsx +0 -829
  789. package/src/components/ticketThread/TicketThread.tsx +0 -719
  790. package/src/components/ticketThread/index.ts +0 -6
  791. package/src/contexts/FetchContext.tsx +0 -25
  792. package/src/contexts/ReqraftContext.tsx +0 -9
  793. package/src/contexts/StorageContext.tsx +0 -33
  794. package/src/global.d.ts +0 -4
  795. package/src/helpers/allowedValues.ts +0 -249
  796. package/src/helpers/choiceChip.ts +0 -227
  797. package/src/helpers/common.ts +0 -326
  798. package/src/helpers/dpqlDetection.ts +0 -209
  799. package/src/helpers/expressions.ts +0 -140
  800. package/src/helpers/optionUiTypes.ts +0 -199
  801. package/src/helpers/options.ts +0 -150
  802. package/src/helpers/providerValue.ts +0 -125
  803. package/src/helpers/scrollbar.ts +0 -32
  804. package/src/helpers/singleLineString.ts +0 -61
  805. package/src/helpers/templateItems.ts +0 -81
  806. package/src/helpers/templateText.ts +0 -350
  807. package/src/helpers/templates.ts +0 -602
  808. package/src/helpers/validations.ts +0 -2085
  809. package/src/hooks/useArgSchema.ts +0 -37
  810. package/src/hooks/useCoarsePointer.ts +0 -30
  811. package/src/hooks/useFetch/useFetch.stories.tsx +0 -379
  812. package/src/hooks/useFetch/useFetch.tsx +0 -154
  813. package/src/hooks/usePhoneViewport.ts +0 -34
  814. package/src/hooks/useQorusTypes.ts +0 -233
  815. package/src/hooks/useReqraftProperty.ts +0 -16
  816. package/src/hooks/useStorage/useStorage.stories.tsx +0 -168
  817. package/src/hooks/useStorage/useStorage.ts +0 -35
  818. package/src/hooks/useTemplates.ts +0 -123
  819. package/src/hooks/useValidation.ts +0 -9
  820. package/src/hooks/useWebSocket/useWebSocket.ts +0 -224
  821. package/src/hooks/useWebSocket/useWebsocket.stories.tsx +0 -640
  822. package/src/hooks/useWhyDidYouUpdate.ts +0 -38
  823. package/src/index.tsx +0 -86
  824. package/src/providers/FetchProvider.tsx +0 -40
  825. package/src/providers/ReqraftProvider.tsx +0 -52
  826. package/src/providers/StorageProvider.tsx +0 -131
  827. package/src/stores/currentUser/currentUser.stories.tsx +0 -100
  828. package/src/stores/currentUser/currentUser.tsx +0 -94
  829. package/src/stories/Data/fileFieldArgSchema.json +0 -86
  830. package/src/stories/Tests/utils.ts +0 -320
  831. package/src/stories/storyNetwork.ts +0 -92
  832. package/src/stories/tracking.tsx +0 -206
  833. package/src/tracking/browser/attach.ts +0 -186
  834. package/src/tracking/browser/env.ts +0 -78
  835. package/src/tracking/core/consent.ts +0 -37
  836. package/src/tracking/core/engagement.ts +0 -47
  837. package/src/tracking/core/experiments.ts +0 -258
  838. package/src/tracking/core/hash.ts +0 -26
  839. package/src/tracking/core/ids.ts +0 -25
  840. package/src/tracking/core/observable.ts +0 -23
  841. package/src/tracking/core/queue.ts +0 -131
  842. package/src/tracking/core/sections.ts +0 -166
  843. package/src/tracking/core/storage.ts +0 -69
  844. package/src/tracking/core/tracker.ts +0 -417
  845. package/src/tracking/core/types.ts +0 -162
  846. package/src/tracking/core/utm.ts +0 -23
  847. package/src/tracking/index.ts +0 -72
  848. package/src/tracking/markup.ts +0 -17
  849. package/src/tracking/react/Experiment.tsx +0 -44
  850. package/src/tracking/react/TrackingProvider.tsx +0 -56
  851. package/src/tracking/react/hooks.ts +0 -106
  852. package/src/tracking/react/index.ts +0 -13
  853. package/src/tracking/testing.ts +0 -108
  854. package/src/tracking/ui/ExperimentCard.stories.tsx +0 -296
  855. package/src/tracking/ui/ExperimentCard.tsx +0 -667
  856. package/src/tracking/ui/ExperimentsOverlay.stories.tsx +0 -155
  857. package/src/tracking/ui/ExperimentsOverlay.tsx +0 -437
  858. package/src/tracking/ui/anchor.ts +0 -180
  859. package/src/tracking/ui/card.ts +0 -464
  860. package/src/tracking/ui/client.ts +0 -117
  861. package/src/tracking/ui/index.ts +0 -77
  862. package/src/tracking/ui/types.ts +0 -110
  863. package/src/tracking/ui/useExperimentsAdmin.ts +0 -103
  864. package/src/types/Form.ts +0 -29
  865. package/src/types.ts +0 -14
  866. package/src/utils/datetime.ts +0 -10
  867. package/src/utils/fetch.ts +0 -457
  868. package/src/utils/lspClient.ts +0 -711
  869. package/src/utils/lspClient.types.ts +0 -211
  870. package/src/utils/queryUnlessCancelled.ts +0 -28
  871. package/src/utils/websocket.ts +0 -293
  872. package/vite.config.ts +0 -58
  873. package/vitest.config.ts +0 -69
@@ -97,10 +97,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
97
97
  return (mod && mod.__esModule) ? mod : { "default": mod };
98
98
  };
99
99
  Object.defineProperty(exports, "__esModule", { value: true });
100
- exports.FormEngine = exports.getTypeAndCanBeNull = exports.flattenOptions = exports.shouldEmitLocalValue = exports.agreementFromRebuild = exports.isMirrorOfValue = exports.fixOptions = exports.OptionsContext = exports.hasRequiredOptions = exports.getOptionFieldStorageType = exports.fixOperatorValue = exports.getType = exports.inheritedScopeFor = void 0;
100
+ exports.FormEngine = exports.getTypeAndCanBeNull = exports.flattenOptions = exports.shouldEmitLocalValue = exports.mergeOwnEdits = exports.takeHostsAttributes = exports.agreementFromRebuild = exports.isMirrorOfValue = exports.fixOptions = exports.OptionsContext = exports.hasRequiredOptions = exports.getOptionFieldStorageType = exports.fixOperatorValue = exports.getType = exports.inheritedScopeFor = void 0;
101
101
  var react_1 = require("react");
102
102
  var jsx_runtime_1 = require("react/jsx-runtime");
103
103
  var reqore_1 = require("@qoretechnologies/reqore");
104
+ var readFirstColors_1 = require("./readFirstColors");
105
+ var operatorSummary_1 = require("./operatorSummary");
106
+ var inheritProps_1 = require("./inheritProps");
107
+ var readableColors_1 = require("../../../helpers/readableColors");
104
108
  var colors_1 = require("@qoretechnologies/reqore/dist/helpers/colors");
105
109
  var argumentPresence_1 = require("../expressions/argumentPresence");
106
110
  var typeChoices_1 = require("./typeChoices");
@@ -118,6 +122,7 @@ var styled_components_1 = __importStar(require("styled-components"));
118
122
  var common_1 = require("../../../helpers/common");
119
123
  var options_1 = require("../../../helpers/options");
120
124
  var validations_1 = require("../../../helpers/validations");
125
+ var useCoarsePointer_1 = require("../../../hooks/useCoarsePointer");
121
126
  var useQorusTypes_1 = require("../../../hooks/useQorusTypes");
122
127
  var useTemplates_1 = require("../../../hooks/useTemplates");
123
128
  var fetch_1 = require("../../../utils/fetch");
@@ -132,50 +137,18 @@ var compactRowContext_1 = require("./compactRowContext");
132
137
  var compactRowStyles_1 = require("./compactRowStyles");
133
138
  var CompactToolbar_1 = require("./CompactToolbar");
134
139
  var compactToolbarContext_1 = require("./compactToolbarContext");
140
+ var HiddenFieldsNote_1 = require("./HiddenFieldsNote");
135
141
  var OptionFieldMessages_1 = require("./OptionFieldMessages");
136
142
  var optionsContext_1 = require("./optionsContext");
137
143
  var markdownRendererContext_1 = require("../../Description/markdownRendererContext");
138
144
  var OptionsHelpDialog_1 = require("./OptionsHelpDialog");
145
+ var typeSentenceForm_1 = require("../typeSentenceForm");
146
+ var referenceNames_1 = require("../fields/template/referenceNames");
147
+ var qorusTypeCatalogue_1 = require("../../../helpers/qorusTypeCatalogue");
148
+ var allowedValues_1 = require("../../../helpers/allowedValues");
149
+ var rowFocus_1 = require("./rowFocus");
139
150
  var optionUiTypes_1 = require("../../../helpers/optionUiTypes");
140
151
  var readFirst_1 = require("./readFirst");
141
- /**
142
- * Resolve a field's `inherit_props` map against the current available
143
- * options (plus any values inherited from an outer FormEngine scope),
144
- * producing a `{ propName: siblingValue }` hash suitable for spreading
145
- * onto the field's renderer.
146
- *
147
- * For each entry `<prop-name-on-renderer> -> <sibling-field-name>`, the
148
- * sibling's current value is forwarded under the receiving prop name.
149
- * Lookup order:
150
- * 1. `availableOptions[siblingName]?.value` — the field's local scope.
151
- * 2. `inheritedFromParent[siblingName]` — the bag threaded in by an
152
- * outer FormEngine (see the `inheritedFromParent` prop). Used when
153
- * a composite field's `arg_schema` sub-form needs to reach a value
154
- * on an ancestor scope — e.g. a service-method row's `body` picking
155
- * up `language` from the parent service form.
156
- * Missing siblings emit `undefined`, which the renderer's prop type can
157
- * treat as "no hint".
158
- *
159
- * Designed to be JSON-pure: no closures, no transformations. Renderers
160
- * decide how to use the forwarded value (e.g. the consumer-injected
161
- * `code-editor` renderer maps a `language: "qore"` prop to its
162
- * highlighter mode).
163
- *
164
- * Mirrored in qorus-ide `src/components/Field/systemOptions.tsx`; keep
165
- * the two in sync (see qorus-ide's `.claude/CLAUDE.md`).
166
- */
167
- var resolveInheritProps = function (inheritProps, availableOptions, inheritedFromParent) {
168
- var _a;
169
- if (!inheritProps)
170
- return {};
171
- var out = {};
172
- for (var propName in inheritProps) {
173
- var siblingName = inheritProps[propName];
174
- var localValue = (_a = availableOptions === null || availableOptions === void 0 ? void 0 : availableOptions[siblingName]) === null || _a === void 0 ? void 0 : _a.value;
175
- out[propName] = localValue !== undefined ? localValue : inheritedFromParent === null || inheritedFromParent === void 0 ? void 0 : inheritedFromParent[siblingName];
176
- }
177
- return out;
178
- };
179
152
  /** One shared "nothing came down from above" bag. See `inheritedScopeFor`. */
180
153
  var NO_INHERITED_SCOPE = Object.freeze({});
181
154
  /**
@@ -206,7 +179,7 @@ var NO_INHERITED_SCOPE = Object.freeze({});
206
179
  * @param inheritedFromParent the bag threaded in from an outer form
207
180
  */
208
181
  var inheritedScopeFor = function (inheritProps, availableOptions, inheritedFromParent) {
209
- var resolved = resolveInheritProps(inheritProps, availableOptions, inheritedFromParent);
182
+ var resolved = (0, inheritProps_1.resolveInheritProps)(inheritProps, availableOptions, inheritedFromParent);
210
183
  if (!Object.keys(resolved).length) {
211
184
  return inheritedFromParent !== null && inheritedFromParent !== void 0 ? inheritedFromParent : NO_INHERITED_SCOPE;
212
185
  }
@@ -228,7 +201,7 @@ var PositiveColorEffect = {
228
201
  glow: 'success',
229
202
  };
230
203
  // Compact (read-first) layout: flat label | value | action rows in collapsible
231
- // group panels; colours come in as props so the layout follows the Reqore theme.
204
+ // group panels; colors come in as props so the layout follows the Reqore theme.
232
205
  var StyledCompactWrap = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n flex-flow: column;\n gap: 10px;\n width: 100%;\n /* Allow the wrap to shrink inside flex/grid parents so its rows' ellipsis can\n engage instead of overflowing the container horizontally. */\n min-width: 0;\n max-width: 100%;\n\n /* Scroll ownership \u2014 see `compactScroll`.\n\n 'host' (the default): the page or panel around us already scrolls, so we\n must not cap our height and scroll our own body, or the reader gets two\n scrollbars in two styles and cannot tell which moves what.\n\n `overflow-x: clip`, NOT `hidden`: CSS coerces an `overflow-y: visible`\n to `auto` whenever the other axis is neither visible nor clip, which would\n leave this box a scroll container \u2014 the element stops scrolling only\n because `max-height: none` means nothing overflows, while `position:\n sticky` inside it still resolves against US instead of the host, so the\n toolbar silently stops pinning. `clip` keeps the horizontal guard without\n that coercion. */\n ", "\n\n /* Option logos (e.g. language images) render as <img> inside ReqoreIcon's\n square box; constrain them so portrait PNGs don't overflow the row. */\n .reqore-icon img {\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n"], ["\n display: flex;\n flex-flow: column;\n gap: 10px;\n width: 100%;\n /* Allow the wrap to shrink inside flex/grid parents so its rows' ellipsis can\n engage instead of overflowing the container horizontally. */\n min-width: 0;\n max-width: 100%;\n\n /* Scroll ownership \u2014 see \\`compactScroll\\`.\n\n 'host' (the default): the page or panel around us already scrolls, so we\n must not cap our height and scroll our own body, or the reader gets two\n scrollbars in two styles and cannot tell which moves what.\n\n \\`overflow-x: clip\\`, NOT \\`hidden\\`: CSS coerces an \\`overflow-y: visible\\`\n to \\`auto\\` whenever the other axis is neither visible nor clip, which would\n leave this box a scroll container \u2014 the element stops scrolling only\n because \\`max-height: none\\` means nothing overflows, while \\`position:\n sticky\\` inside it still resolves against US instead of the host, so the\n toolbar silently stops pinning. \\`clip\\` keeps the horizontal guard without\n that coercion. */\n ", "\n\n /* Option logos (e.g. language images) render as <img> inside ReqoreIcon's\n square box; constrain them so portrait PNGs don't overflow the row. */\n .reqore-icon img {\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n"])), function (_a) {
233
206
  var $ownScroll = _a.$ownScroll;
234
207
  return $ownScroll ? (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n /* 'own': we are the scroller. The sticky toolbar pins to whatever\n scrolls, so a host whose scrollport carries top padding would\n resolve sticky `top: 0` against its padding box and leave an\n unblurred strip above the toolbar. Scrolling in this unpadded box\n pins it flush. Cap at the host's available height, but do not grow\n to fill it \u2014 short forms still hug their content.\n\n `min-height: 0` is what lets a flex item shrink below its content\n so there is something to scroll; it belongs to this branch only. */\n min-height: 0;\n max-height: 100%;\n overflow-y: auto;\n overflow-x: hidden;\n "], ["\n /* 'own': we are the scroller. The sticky toolbar pins to whatever\n scrolls, so a host whose scrollport carries top padding would\n resolve sticky \\`top: 0\\` against its padding box and leave an\n unblurred strip above the toolbar. Scrolling in this unpadded box\n pins it flush. Cap at the host's available height, but do not grow\n to fill it \u2014 short forms still hug their content.\n\n \\`min-height: 0\\` is what lets a flex item shrink below its content\n so there is something to scroll; it belongs to this branch only. */\n min-height: 0;\n max-height: 100%;\n overflow-y: auto;\n overflow-x: hidden;\n "]))) : (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n /* `min-height: auto` is load-bearing, not a default: inside a column\n flex parent the shrink allowance above collapses this box to zero\n height while its rows paint outside it, so the form looks right but\n contributes nothing to layout \u2014 the host cannot size or scroll to\n it and anything below it stacks against nothing. */\n min-height: auto;\n max-height: none;\n overflow-y: visible;\n overflow-x: clip;\n "], ["\n /* \\`min-height: auto\\` is load-bearing, not a default: inside a column\n flex parent the shrink allowance above collapses this box to zero\n height while its rows paint outside it, so the form looks right but\n contributes nothing to layout \u2014 the host cannot size or scroll to\n it and anything below it stacks against nothing. */\n min-height: auto;\n max-height: none;\n overflow-y: visible;\n overflow-x: clip;\n "])));
@@ -431,6 +404,34 @@ var normalizeEmptyFieldValues = function (fields) {
431
404
  return acc;
432
405
  }, {});
433
406
  };
407
+ /**
408
+ * The value as a host can hand it back: each field as its value, and the fields that hold nothing left out.
409
+ *
410
+ * A report of the form's is recognised by what it says, not by how the host writes it back. A host that
411
+ * stores only the fields holding a value (the Qorus IDE's editors) hands a report back without its empty
412
+ * fields; one that stores a field under its own type (the IDE stores what an `int` field reported as a
413
+ * `string`) hands it back with that type. Compared field for field, type and all, the report never came
414
+ * back as itself:
415
+ * - the form took it for the host's own change and went back to it, losing what had been typed since, and
416
+ * the two chased each other's reports on every echo;
417
+ * - an edit back to a value reported before (A, then B, then A again), made as the echo of B arrived, was
418
+ * held back as made before the host's change, and the field went back to B (qorus#646: a template
419
+ * field's text, deleted back to its reference, kept the text in the IDE).
420
+ *
421
+ * For recognising a value only. Whether a rebuild adds anything is still read with the empty fields in
422
+ * (`isMirrorOfValue`): a new schema's empty required field is a row the form has to add.
423
+ */
424
+ var reportedValues = function (fields) {
425
+ return (0, reduce_1.default)(fields || {}, function (acc, field, name) {
426
+ var fieldValue = comparableField(field);
427
+ if (fieldValue !== undefined) {
428
+ acc[name] = fieldValue;
429
+ }
430
+ return acc;
431
+ }, {});
432
+ };
433
+ /** The same value, as a report coming back from a host is recognised. */
434
+ var sameReportedValue = function (a, b) { return (0, lodash_1.isEqual)(reportedValues(a), reportedValues(b)); };
434
435
  /**
435
436
  * Does this rebuild say anything the parent does not already hold?
436
437
  *
@@ -460,6 +461,118 @@ var agreementFromRebuild = function (fixedValue, value) {
460
461
  return (0, exports.isMirrorOfValue)(fixedValue, value) ? fixedValue : undefined;
461
462
  };
462
463
  exports.agreementFromRebuild = agreementFromRebuild;
464
+ /**
465
+ * A field as the form compares one host value with another: an empty field ('' or none, whatever its type) is
466
+ * the same as no field, and a field is its value, however it is written (`{ type, value }` or the bare value).
467
+ */
468
+ var comparableField = function (field) {
469
+ var fieldValue = field !== null && typeof field === 'object' && !Array.isArray(field) && 'value' in field ?
470
+ field.value
471
+ : field !== null && typeof field === 'object' && !Array.isArray(field) && 'type' in field ?
472
+ undefined
473
+ : field;
474
+ return fieldValue === '' ? undefined : fieldValue;
475
+ };
476
+ var sameField = function (a, b) {
477
+ return (0, lodash_1.isEqual)(comparableField(a), comparableField(b));
478
+ };
479
+ /** A field written as `{ type, value }`, not a bare value. */
480
+ var isTypedField = function (field) {
481
+ return field !== null &&
482
+ typeof field === 'object' &&
483
+ !Array.isArray(field) &&
484
+ typeof field.type === 'string';
485
+ };
486
+ /**
487
+ * The form's copy of a field, with everything the host changed beside its value since `base`: its type, whether
488
+ * it is an expression, its operator, or anything else it says. `own` itself where the host changed nothing.
489
+ *
490
+ * A report of the form's is recognised by its values, and a field's value is merged by its value (see
491
+ * `reportedValues`, `mergeOwnEdits`), so a change the host made to a field's type alone said nothing: the form
492
+ * kept its own type. The Qorus IDE makes an added field's whole number true or false, holding the same field
493
+ * `pos`; the form kept the `int` and drew `pos` as text on the Value tab, where a true or false field shows it on
494
+ * its Expression tab (qorus#646).
495
+ *
496
+ * Every key but `value` is compared, not a list of the ones known today: whatever a host writes into a field
497
+ * beside its value, a change of it is the host's. A key the host writes as it always has is not a change, so a
498
+ * host that stores a field under its own type does not change the form's (that is why the value alone is what
499
+ * recognises a report).
500
+ */
501
+ var withHostsAttributes = function (own, host, base) {
502
+ if (!isTypedField(own) || !isTypedField(host)) {
503
+ return own;
504
+ }
505
+ var hostField = host;
506
+ var baseField = isTypedField(base) ? base : {};
507
+ var ownField = own;
508
+ var taken;
509
+ new Set(__spreadArray(__spreadArray([], Object.keys(hostField), true), Object.keys(baseField), true)).forEach(function (key) {
510
+ var hosts = hostField[key];
511
+ if (key === 'value' || (0, lodash_1.isEqual)(hosts, baseField[key]) || (0, lodash_1.isEqual)(ownField[key], hosts)) {
512
+ return;
513
+ }
514
+ taken = taken !== null && taken !== void 0 ? taken : __assign({}, ownField);
515
+ if (hosts === undefined) {
516
+ delete taken[key];
517
+ }
518
+ else {
519
+ taken[key] = hosts;
520
+ }
521
+ });
522
+ return taken !== null && taken !== void 0 ? taken : own;
523
+ };
524
+ /**
525
+ * The form's copy with what the host changed beside each field's value since `base` taken (see
526
+ * `withHostsAttributes`). Returns `ours` itself when there is nothing the form's copy does not have already.
527
+ */
528
+ var takeHostsAttributes = function (theirs, ours, base) {
529
+ var _a;
530
+ var typed;
531
+ (0, lodash_1.forEach)(theirs || {}, function (host, name) {
532
+ var own = ours === null || ours === void 0 ? void 0 : ours[name];
533
+ var taken = withHostsAttributes(own, host, base === null || base === void 0 ? void 0 : base[name]);
534
+ if (taken !== own) {
535
+ typed = typed !== null && typed !== void 0 ? typed : __assign({}, (ours || {}));
536
+ typed[name] = taken;
537
+ }
538
+ });
539
+ return (_a = typed) !== null && _a !== void 0 ? _a : ours;
540
+ };
541
+ exports.takeHostsAttributes = takeHostsAttributes;
542
+ /**
543
+ * The host's change, with the form's own edits kept: a three-way merge of `theirs` (the `value` the host
544
+ * hands down now) and `ours` (the form's copy) against `base` (the `value` the form last saw).
545
+ *
546
+ * A field the form changed and the host did not keeps the form's value; every other field takes the host's,
547
+ * a field both changed included. The host and the form can change the value in the same commit - a host
548
+ * renaming something as the user's edit reaches the form - and taking either side whole lost the other's
549
+ * change; sending the form's copy over the host's change made the two trade places forever (qorus#646).
550
+ *
551
+ * Returns `theirs` itself when the form has nothing of its own to keep.
552
+ */
553
+ var mergeOwnEdits = function (theirs, ours, base) {
554
+ var _a;
555
+ var merged;
556
+ var names = new Set(__spreadArray(__spreadArray([], Object.keys(ours || {}), true), Object.keys(base || {}), true));
557
+ names.forEach(function (name) {
558
+ var own = ours === null || ours === void 0 ? void 0 : ours[name];
559
+ var before = base === null || base === void 0 ? void 0 : base[name];
560
+ var host = theirs === null || theirs === void 0 ? void 0 : theirs[name];
561
+ if (sameField(own, before) || !sameField(host, before) || sameField(host, own)) {
562
+ return;
563
+ }
564
+ merged = merged !== null && merged !== void 0 ? merged : __assign({}, (theirs || {}));
565
+ if (own === undefined) {
566
+ delete merged[name];
567
+ }
568
+ else {
569
+ // the form's value, with what the host changed beside it (its type, say)
570
+ merged[name] = withHostsAttributes(own, host, before);
571
+ }
572
+ });
573
+ return (_a = merged) !== null && _a !== void 0 ? _a : theirs;
574
+ };
575
+ exports.mergeOwnEdits = mergeOwnEdits;
463
576
  /**
464
577
  * Should the form report `localValue` to its parent as an answer?
465
578
  *
@@ -516,6 +629,8 @@ var getTypeAndCanBeNull = function (type, allowed_values, operatorData, operator
516
629
  exports.getTypeAndCanBeNull = getTypeAndCanBeNull;
517
630
  // Option types rendered full-width (IDE Options parity, commit 8e6b7781).
518
631
  var STRECHABLE_TYPES = new Set(['tool-catalog']);
632
+ /** How faded reqore draws a panel's title icon. */
633
+ var PANEL_TITLE_ICON_ALPHA = 0.7;
519
634
  var FormEngineImpl = function (_a) {
520
635
  var _b, _c, _d, _f, _g;
521
636
  var name = _a.name, uniqueName = _a.uniqueName, value = _a.value, onChange = _a.onChange, onSingleOptionsChange = _a.onSingleOptionsChange, onDependableOptionChange = _a.onDependableOptionChange, placeholder = _a.placeholder, noValueString = _a.noValueString, // eslint-disable-line @typescript-eslint/no-unused-vars
@@ -534,12 +649,14 @@ var FormEngineImpl = function (_a) {
534
649
  // been a no-op. Removing it from the API is a separate, breaking change —
535
650
  // every consumer passing it today already gets the flush layout by default.
536
651
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
537
- compactFlush = _k === void 0 ? false : _k, _l = _a.compactNested, compactNested = _l === void 0 ? false : _l, _m = _a.compactScroll, compactScroll = _m === void 0 ? 'host' : _m, compactPanelProps = _a.compactPanelProps, compactCollapsedGroupsProp = _a.compactCollapsedGroups, compactBoxLabels = _a.compactBoxLabels, _o = _a.compactStickyBoxHeaders, compactStickyBoxHeaders = _o === void 0 ? true : _o, _p = _a.compactStickyOffset, compactStickyOffset = _p === void 0 ? 0 : _p, _q = _a.compactToolbar, compactToolbar = _q === void 0 ? true : _q, _r = _a.commitMode, commitMode = _r === void 0 ? 'immediate' : _r, _s = _a.expandMode, expandMode = _s === void 0 ? 'single' : _s, onCommit = _a.onCommit, operatorsProp = _a.operators, groups = _a.groups, optionsLoader = _a.optionsLoader, onValidityChange = _a.onValidityChange, optionActions = _a.optionActions, _t = _a.optionActionsCollapse, optionActionsCollapse = _t === void 0 ? 'auto' : _t, componentOverrides = _a.componentOverrides, codePreviewRenderer = _a.codePreviewRenderer,
652
+ compactFlush = _k === void 0 ? false : _k, _l = _a.compactNested, compactNested = _l === void 0 ? false : _l, _m = _a.compactScroll, compactScroll = _m === void 0 ? 'host' : _m, compactPanelProps = _a.compactPanelProps, compactCollapsedGroupsProp = _a.compactCollapsedGroups, compactBoxLabels = _a.compactBoxLabels, _o = _a.compactStickyBoxHeaders, compactStickyBoxHeaders = _o === void 0 ? true : _o, _p = _a.compactStickyOffset, compactStickyOffset = _p === void 0 ? 0 : _p, _q = _a.compactToolbar, compactToolbar = _q === void 0 ? true : _q, _r = _a.commitMode, commitMode = _r === void 0 ? 'immediate' : _r, _s = _a.expandMode, expandMode = _s === void 0 ? 'single' : _s, onCommit = _a.onCommit, operatorsProp = _a.operators, groups = _a.groups, optionsLoader = _a.optionsLoader, onValidityChange = _a.onValidityChange, optionActions = _a.optionActions, _t = _a.optionActionsCollapse, optionActionsCollapse = _t === void 0 ? 'auto' : _t, componentOverrides = _a.componentOverrides, codePreviewRenderer = _a.codePreviewRenderer, readSummaries = _a.readSummaries, cardEditorTypes = _a.cardEditorTypes,
538
653
  // consumed by the wrapper below, which publishes it to every description this
539
654
  // form draws; destructured here only so it cannot reach `rest` and be spread
540
655
  // onto a DOM node
541
656
  _markdownRenderer = _a.markdownRenderer, // eslint-disable-line @typescript-eslint/no-unused-vars
542
- rendererOnlyUiTypes = _a.rendererOnlyUiTypes, templateAwareUiTypes = _a.templateAwareUiTypes, anyLikeUiTypes = _a.anyLikeUiTypes, inheritedFromParent = _a.inheritedFromParent, autoFocusFirstRequired = _a.autoFocusFirstRequired, expandFirstRequired = _a.expandFirstRequired, initialExpandedOptions = _a.initialExpandedOptions, maxFieldsShown = _a.maxFieldsShown, rest = __rest(_a, ["name", "uniqueName", "value", "onChange", "onSingleOptionsChange", "onDependableOptionChange", "placeholder", "noValueString", "isValid", "url", "customUrl", "operatorsUrl", "onOptionsLoaded", "recordRequiresSearchOptions", "readOnly", "onReadOnlyActivate", "allowTemplates", "interfaceContext", "templateFieldProps", "forceDropdown", "showTypeToggle", "compact", "compactFlush", "compactNested", "compactScroll", "compactPanelProps", "compactCollapsedGroups", "compactBoxLabels", "compactStickyBoxHeaders", "compactStickyOffset", "compactToolbar", "commitMode", "expandMode", "onCommit", "operators", "groups", "optionsLoader", "onValidityChange", "optionActions", "optionActionsCollapse", "componentOverrides", "codePreviewRenderer", "markdownRenderer", "rendererOnlyUiTypes", "templateAwareUiTypes", "anyLikeUiTypes", "inheritedFromParent", "autoFocusFirstRequired", "expandFirstRequired", "initialExpandedOptions", "maxFieldsShown"]);
657
+ rendererOnlyUiTypes = _a.rendererOnlyUiTypes, templateAwareUiTypes = _a.templateAwareUiTypes, anyLikeUiTypes = _a.anyLikeUiTypes, inheritedFromParent = _a.inheritedFromParent, autoFocusFirstRequired = _a.autoFocusFirstRequired, expandFirstRequired = _a.expandFirstRequired, initialExpandedOptions = _a.initialExpandedOptions, valueKey = _a.valueKey, maxFieldsShown = _a.maxFieldsShown,
658
+ // The form's own props, read here and never handed on to the collection drawn below (`{...rest}`).
659
+ optionsSchema = _a.options, stringTemplates = _a.stringTemplates, skeletonReason = _a.skeletonReason, rest = __rest(_a, ["name", "uniqueName", "value", "onChange", "onSingleOptionsChange", "onDependableOptionChange", "placeholder", "noValueString", "isValid", "url", "customUrl", "operatorsUrl", "onOptionsLoaded", "recordRequiresSearchOptions", "readOnly", "onReadOnlyActivate", "allowTemplates", "interfaceContext", "templateFieldProps", "forceDropdown", "showTypeToggle", "compact", "compactFlush", "compactNested", "compactScroll", "compactPanelProps", "compactCollapsedGroups", "compactBoxLabels", "compactStickyBoxHeaders", "compactStickyOffset", "compactToolbar", "commitMode", "expandMode", "onCommit", "operators", "groups", "optionsLoader", "onValidityChange", "optionActions", "optionActionsCollapse", "componentOverrides", "codePreviewRenderer", "readSummaries", "cardEditorTypes", "markdownRenderer", "rendererOnlyUiTypes", "templateAwareUiTypes", "anyLikeUiTypes", "inheritedFromParent", "autoFocusFirstRequired", "expandFirstRequired", "initialExpandedOptions", "valueKey", "maxFieldsShown", "options", "stringTemplates", "skeletonReason"]);
543
660
  // Built-ins + whatever the consumer declared for its own injected editors.
544
661
  var isRendererOnly = (0, react_2.useMemo)(function () { return (0, rendererTypes_1.createRendererOnlyUiTypeCheck)(rendererOnlyUiTypes); }, [JSON.stringify(rendererOnlyUiTypes)]);
545
662
  // Pointer CAPABILITY and viewport WIDTH are different questions and both
@@ -564,10 +681,22 @@ var FormEngineImpl = function (_a) {
564
681
  enters the component, so the header, the chips, the messages, the meter and
565
682
  the read-first summary cannot disagree about it: every one of them reads
566
683
  `options`, and none of them has to know the rule. */
567
- var _u = (0, react_2.useState)((rest === null || rest === void 0 ? void 0 : rest.options) || undefined), servedOptions = _u[0], setOptions = _u[1];
684
+ var _u = (0, react_2.useState)(optionsSchema || undefined), servedOptions = _u[0], setOptions = _u[1];
568
685
  var options = (0, react_2.useMemo)(function () { return (0, options_1.resolveDegenerateRequiredGroups)(servedOptions); }, [servedOptions]);
686
+ /* Whether the schema the form holds is the one in force: its host is not waiting behind the skeleton, and a
687
+ schema the host hands down has been taken in (`servedOptions` follows the `options` prop a render later).
688
+ Until then the value is neither pruned against the schema nor emitted. A host loading the schema hands an
689
+ empty or an earlier one meanwhile; read against that, every stored field was "not on this instance" and
690
+ was removed, so a Qog state opened before its options had loaded showed them empty and, once emitted,
691
+ lost them (qorus#646). */
692
+ var hostSchemaPending = !optionsLoader &&
693
+ !url &&
694
+ !customUrl &&
695
+ optionsSchema !== servedOptions &&
696
+ JSON.stringify(optionsSchema || undefined) !== JSON.stringify(servedOptions);
697
+ var schemaInForce = !rest.skeleton && !hostSchemaPending;
569
698
  // optionsLoader lifecycle: loading feeds the skeleton gate, error the banner.
570
- var _v = (0, react_2.useState)(!!optionsLoader && !(rest === null || rest === void 0 ? void 0 : rest.options)), optionsLoading = _v[0], setOptionsLoading = _v[1];
699
+ var _v = (0, react_2.useState)(!!optionsLoader && !optionsSchema), optionsLoading = _v[0], setOptionsLoading = _v[1];
571
700
  var _w = (0, react_2.useState)(), optionsError = _w[0], setOptionsError = _w[1];
572
701
  // Operators: prop-provided (compact) or fetched via operatorsUrl (dpql,
573
702
  // ported from IDE Options) — the fetch overrides the seeded prop value.
@@ -657,7 +786,13 @@ var FormEngineImpl = function (_a) {
657
786
  measurement below takes it as a dependency, and a dependency array is
658
787
  evaluated during render — a `const` declared further down would still be
659
788
  in its temporal dead zone. */
660
- var compactNarrow = !!compactWrapWidth && compactWrapWidth < 480;
789
+ /* The label column the rows are laid out with: measured from the labels (see below), the
790
+ default until it is. A form stacks its rows where its value column would be too narrow
791
+ beside it (`isCompactNarrow`), not at one form width whatever its labels are. */
792
+ var _9 = (0, react_2.useState)(compactRowStyles_1.COMPACT_LABEL_COL), compactLabelColumn = _9[0], setCompactLabelColumn = _9[1];
793
+ // the label column holds a finger's help button where the pointer is a finger (`labelAffordanceWidth`)
794
+ var coarsePointer = (0, useCoarsePointer_1.useCoarsePointer)();
795
+ var compactNarrow = !!compactWrapWidth && (0, compactRowStyles_1.isCompactNarrow)(compactWrapWidth, compactLabelColumn);
661
796
  /* How much pinned chrome sits above a status-box header.
662
797
 
663
798
  Sticky offsets do not compose on their own: everything pinned in one
@@ -672,7 +807,7 @@ var FormEngineImpl = function (_a) {
672
807
  a search row and a field picker that each hide themselves when they have
673
808
  nothing to say, and what is left wraps differently at every form width.
674
809
  Zero when this form draws no toolbar at all. */
675
- var _9 = (0, react_2.useState)(0), compactToolbarHeight = _9[0], setCompactToolbarHeight = _9[1];
810
+ var _10 = (0, react_2.useState)(0), compactToolbarHeight = _10[0], setCompactToolbarHeight = _10[1];
676
811
  (0, react_2.useLayoutEffect)(function () {
677
812
  var wrap = compactWrapNode;
678
813
  if (!compact || !wrap || compactNested || !compactStickyBoxHeaders) {
@@ -749,16 +884,19 @@ var FormEngineImpl = function (_a) {
749
884
  // survives at every label length. MAX still bounds how much room the NAME may
750
885
  // take, which is what it is for; the asterisk and the `?` are chrome that has
751
886
  // to fit beside it either way.
752
- var text = Math.max(compactRowStyles_1.LABEL_COL_MIN, Math.min(compactRowStyles_1.LABEL_COL_MAX, Math.round(widest)));
753
- wrap.style.setProperty(compactRowStyles_1.LABEL_COL_VAR, "".concat(text + compactRowStyles_1.LABEL_AFFORDANCE_WIDTH, "px"));
754
- }, [compact, options, theme, compactWrapNode]);
887
+ var text = Math.min(compactRowStyles_1.LABEL_COL_MAX, Math.round(widest));
888
+ // a finger's help button is wider than a mouse's (`labelAffordanceWidth`); a short name's column is the floor
889
+ var column = Math.max(compactRowStyles_1.LABEL_COLUMN_MIN, text + (0, compactRowStyles_1.labelAffordanceWidth)(coarsePointer));
890
+ wrap.style.setProperty(compactRowStyles_1.LABEL_COL_VAR, "".concat(column, "px"));
891
+ setCompactLabelColumn(column);
892
+ }, [compact, options, theme, compactWrapNode, coarsePointer]);
755
893
  // Editing rows pin min-height to the measured read row they replace, so the
756
894
  // toggle never shifts neighbours (height varies with chrome — measure it).
757
895
  var readRowHeights = (0, react_2.useRef)({});
758
896
  // Required-groups linkage: hovering a group chip highlights every member row;
759
897
  // clicking a sibling in the chip's popover scrolls to it and flashes it.
760
- var _10 = (0, react_2.useState)([]), highlightedOptions = _10[0], setHighlightedOptions = _10[1];
761
- var _11 = (0, react_2.useState)([]), flashedOptions = _11[0], setFlashedOptions = _11[1];
898
+ var _11 = (0, react_2.useState)([]), highlightedOptions = _11[0], setHighlightedOptions = _11[1];
899
+ var _12 = (0, react_2.useState)([]), flashedOptions = _12[0], setFlashedOptions = _12[1];
762
900
  var flashTimeout = (0, react_2.useRef)();
763
901
  var flashOptions = (0, react_2.useCallback)(function (optionNames, scrollToFirst) {
764
902
  if (scrollToFirst === void 0) { scrollToFirst = false; }
@@ -810,16 +948,16 @@ var FormEngineImpl = function (_a) {
810
948
  }
811
949
  });
812
950
  // Info panels auto-open on Tier-1 content; the per-row user override sticks.
813
- var _12 = (0, react_2.useState)({}), infoPanelOverrides = _12[0], setInfoPanelOverrides = _12[1];
951
+ var _13 = (0, react_2.useState)({}), infoPanelOverrides = _13[0], setInfoPanelOverrides = _13[1];
814
952
  // Toolbar filters affect the listed rows only — the meter reflects the full set.
815
- var _13 = (0, react_2.useState)(false), requiredOnly = _13[0], setRequiredOnly = _13[1];
816
- var _14 = (0, react_2.useState)(''), compactQuery = _14[0], setCompactQuery = _14[1];
953
+ var _14 = (0, react_2.useState)(false), requiredOnly = _14[0], setRequiredOnly = _14[1];
954
+ var _15 = (0, react_2.useState)(''), compactQuery = _15[0], setCompactQuery = _15[1];
817
955
  // Compact field sort (Fields menu → "Sort by"); 'schema' = declared order.
818
- var _15 = (0, react_2.useState)('schema'), compactSort = _15[0], setCompactSort = _15[1];
819
- var _16 = (0, react_2.useState)(function () { return ({
956
+ var _16 = (0, react_2.useState)('schema'), compactSort = _16[0], setCompactSort = _16[1];
957
+ var _17 = (0, react_2.useState)(function () { return ({
820
958
  fields: (0, exports.fixOptions)(value, options || {}, undefined, isRendererOnly),
821
959
  meta: undefined,
822
- }); }), localValue = _16[0], setLocalValue = _16[1];
960
+ }); }), localValue = _17[0], setLocalValue = _17[1];
823
961
  var originalValue = (0, react_2.useRef)();
824
962
  // Track the last value we emitted via onChange so we can skip re-applying fixOptions
825
963
  // when the parent echoes it back as the new value prop (controlled component loop prevention)
@@ -857,16 +995,52 @@ var FormEngineImpl = function (_a) {
857
995
  * reset the form to it: the field under the cursor went back a step and the keys typed since were lost
858
996
  * ("I have value" came out as "I he value" in a story under load).
859
997
  */
860
- var inFlight = (0, emittedValues_1.useEmittedValues)(function (a, b) {
861
- return (0, lodash_1.isEqual)(normalizeEmptyFieldValues(a), normalizeEmptyFieldValues(b));
862
- });
998
+ var inFlight = (0, emittedValues_1.useEmittedValues)(sameReportedValue);
999
+ /**
1000
+ * The `value` (and `valueKey`) as of the last commit: what a new `value` is a change from. The sync-down
1001
+ * merges the host's change against it, and the emit effect tells by it that the host changed the value in
1002
+ * the very commit it runs in. Updated by the last effect of each commit (below the sync-down).
1003
+ */
1004
+ var seenValue = (0, react_2.useRef)(value);
1005
+ var seenValueKey = (0, react_2.useRef)(valueKey);
1006
+ /** Whether `value` is the host's own change, made since the last commit: neither seen before nor a report of
1007
+ * this form's coming back. */
1008
+ var isHostsOwnChange = function () {
1009
+ return valueKey !== seenValueKey.current ||
1010
+ (!sameReportedValue(value, seenValue.current) &&
1011
+ !inFlight.includes(value) &&
1012
+ !sameReportedValue(value, lastEmittedValue.current));
1013
+ };
863
1014
  if (originalValue.current === undefined && (0, size_1.default)(value)) {
864
1015
  originalValue.current = localValue.fields;
865
1016
  }
866
1017
  var unavailableOptionsCount = (0, react_2.useRef)(0);
867
- var _17 = (0, useQorusTypes_1.useQorusTypes)(), compactValue = _17.compactValue, typesLoading = _17.loading;
868
- var templates = (0, useTemplates_1.useTemplates)(allowTemplates, rest.stringTemplates, interfaceContext);
1018
+ var _18 = (0, useQorusTypes_1.useQorusTypes)(), compactValue = _18.compactValue, typesLoading = _18.loading;
1019
+ // an option's type in words, while the form shows field types (qorus#646: it said the type's code, `<string>`)
1020
+ var typeName = (0, typeSentenceForm_1.useTypeName)();
1021
+ var templates = (0, useTemplates_1.useTemplates)(allowTemplates, stringTemplates, interfaceContext);
869
1022
  (0, react_2.useEffect)(function () {
1023
+ /* Nothing is emitted until the schema is in force (`schemaInForce`): read against the empty or earlier
1024
+ schema a host hands down while it loads its own, the value is no answer, and emitted it wiped a Qog
1025
+ state's stored options the moment the state was opened (qorus#646).
1026
+
1027
+ When it comes into force this check runs (it is a dependency). A host also shows the skeleton for other
1028
+ waits: qorus-ide shows it while the templates load, with the schema already there. The form completes the
1029
+ value meanwhile (a required field's default, e.g. the server's `created_by_user`), and nothing read it
1030
+ again when the skeleton cleared: the default was shown and never emitted, so never saved. A value that
1031
+ adds nothing still emits nothing. */
1032
+ if (!schemaInForce) {
1033
+ return;
1034
+ }
1035
+ /* The host changed the value in this same commit (effects run in order, and this one runs before the
1036
+ sync-down that takes the change in). The form's copy was made before that change: sent, it overwrote
1037
+ the host's change, the sync-down then took the host's value in, and the next commit sent that back -
1038
+ the form and the host traded places on every commit, forever (qorus#646: the Qorus IDE's OPC UA node
1039
+ editor, its namespace flipping between the old and the renamed one). The sync-down below merges the
1040
+ change with the form's own edits, and the next commit reports the result. */
1041
+ if (isHostsOwnChange()) {
1042
+ return;
1043
+ }
870
1044
  if (!(0, exports.shouldEmitLocalValue)({
871
1045
  localValue: localValue.fields,
872
1046
  value: value,
@@ -881,15 +1055,15 @@ var FormEngineImpl = function (_a) {
881
1055
  // Batched mode still emits every staged change (consumers may want to
882
1056
  // live-validate), but flags it as a draft — persistence waits for Save.
883
1057
  onChange === null || onChange === void 0 ? void 0 : onChange(name, toEmit, commitMode === 'batched' ? __assign(__assign({}, (meta || {})), { draft: true }) : meta);
884
- }, [JSON.stringify(localValue)]);
1058
+ }, [JSON.stringify(localValue), schemaInForce]);
885
1059
  (0, react_use_1.useUpdateEffect)(function () {
886
1060
  // When a loader owns the schema, ignore controlled `options` syncs so a
887
1061
  // late/undefined `options` prop can't clobber the loaded schema.
888
1062
  if (optionsLoader) {
889
1063
  return;
890
1064
  }
891
- setOptions(rest.options);
892
- }, [JSON.stringify(rest.options)]);
1065
+ setOptions(optionsSchema);
1066
+ }, [JSON.stringify(optionsSchema)]);
893
1067
  // Fetch the schema on mount and on loader identity change.
894
1068
  (0, react_2.useEffect)(function () {
895
1069
  if (!optionsLoader) {
@@ -1076,14 +1250,32 @@ var FormEngineImpl = function (_a) {
1076
1250
  // change and re-fixes forever (e.g. byte-size / expression / ruled string fields).
1077
1251
  // Note: compare fixedValue against value, not localValue.fields — localValue may have been
1078
1252
  // updated by nested FormEngine emissions, so comparing against it would never skip.
1079
- var normalizedValue = normalizeEmptyFieldValues(value);
1080
1253
  /* What this rebuild lets us agree with the parent on — `undefined` when it
1081
1254
  contributed something the parent has yet to learn. */
1082
1255
  var agreed = (0, exports.agreementFromRebuild)(fixedValue, value);
1256
+ // a different record: nothing of the previous one is carried into it (see `valueKey`)
1257
+ var sameRecord = valueKey === seenValueKey.current;
1083
1258
  // the echo of an emit still in flight - the last or an older one - is not the parent's change
1084
1259
  var echo = inFlight.isEcho(value);
1085
- if ((echo || (0, lodash_1.isEqual)(normalizedValue, normalizeEmptyFieldValues(lastEmittedValue.current))) &&
1086
- agreed !== undefined) {
1260
+ if (sameRecord && (echo || sameReportedValue(value, lastEmittedValue.current))) {
1261
+ /* The form's own report coming back. Whatever the rebuild adds - a schema that changed in the same
1262
+ commit, a field the host does not store - is added to the form's copy, never by going back to the
1263
+ report: the report may be older than edits made since (an echo of "a" arriving after "ab" was
1264
+ reported lost the "b"). Nothing changes when the form's copy has it all already. */
1265
+ var rebuild_1 = function (fields) {
1266
+ return (0, exports.fixOptions)(fields, options || {}, undefined, isRendererOnly);
1267
+ };
1268
+ if (!(0, lodash_1.isEqual)(rebuild_1(localValue.fields), localValue.fields)) {
1269
+ // the parent has to learn what the rebuild added
1270
+ mirroredValue.current = undefined;
1271
+ }
1272
+ /* What the host changed beside a field's value is taken (its type, say): the report is recognised by its
1273
+ values (see `takeHostsAttributes`). */
1274
+ var base_1 = seenValue.current;
1275
+ setLocalValue(function (current) {
1276
+ var rebuilt = rebuild_1((0, exports.takeHostsAttributes)(value, current.fields, base_1));
1277
+ return (0, lodash_1.isEqual)(rebuilt, current.fields) ? current : { fields: rebuilt, meta: current.meta };
1278
+ });
1087
1279
  return;
1088
1280
  }
1089
1281
  if (!originalValue.current && (0, size_1.default)(fixedValue)) {
@@ -1096,8 +1288,25 @@ var FormEngineImpl = function (_a) {
1096
1288
  if (agreed !== undefined) {
1097
1289
  lastEmittedValue.current = agreed;
1098
1290
  }
1099
- setLocalValue === null || setLocalValue === void 0 ? void 0 : setLocalValue({ fields: fixedValue, meta: undefined });
1100
- }, [JSON.stringify(options), JSON.stringify(value), isRendererOnly]);
1291
+ if (!sameRecord) {
1292
+ setLocalValue({ fields: fixedValue, meta: undefined });
1293
+ return;
1294
+ }
1295
+ // The host's change, with the form's own edits it did not touch kept (see `mergeOwnEdits`).
1296
+ var base = seenValue.current;
1297
+ setLocalValue(function (current) {
1298
+ var merged = (0, exports.mergeOwnEdits)(value, current.fields, base);
1299
+ return {
1300
+ fields: merged === value ? fixedValue : ((0, exports.fixOptions)(merged, options || {}, undefined, isRendererOnly)),
1301
+ meta: undefined,
1302
+ };
1303
+ });
1304
+ }, [JSON.stringify(options), JSON.stringify(value), isRendererOnly, valueKey]);
1305
+ // Last of the value effects: what the next commit's `value` is a change from.
1306
+ (0, react_2.useEffect)(function () {
1307
+ seenValue.current = value;
1308
+ seenValueKey.current = valueKey;
1309
+ });
1101
1310
  var handleValueChange = (0, react_2.useCallback)(function (optionName, val, _type, isFunction) {
1102
1311
  setLocalValue(function (_a) {
1103
1312
  var _b, _c;
@@ -1294,8 +1503,11 @@ var FormEngineImpl = function (_a) {
1294
1503
  var _a, _b;
1295
1504
  var option = fixedValue[optionName];
1296
1505
  if (!(options === null || options === void 0 ? void 0 : options[optionName])) {
1297
- unavailableOptionsCount.current += 1;
1298
- removeSelectedOption(optionName);
1506
+ // not on this instance - unless the schema is not yet the one in force (see `schemaInForce`)
1507
+ if (schemaInForce) {
1508
+ unavailableOptionsCount.current += 1;
1509
+ removeSelectedOption(optionName);
1510
+ }
1299
1511
  return newValue;
1300
1512
  }
1301
1513
  var rendererType = (0, exports.getType)((options[optionName].ui_type || options[optionName].type), operators, option === null || option === void 0 ? void 0 : option.op);
@@ -1315,6 +1527,7 @@ var FormEngineImpl = function (_a) {
1315
1527
  unavailableOptionsCount.current,
1316
1528
  JSON.stringify(operators),
1317
1529
  showInvalidOptionsOnly,
1530
+ schemaInForce,
1318
1531
  ]);
1319
1532
  // Per required-group: its member options, and which member (if any) already
1320
1533
  // satisfies it — drives the "One of" chips and the "covered by" notes.
@@ -1383,9 +1596,8 @@ var FormEngineImpl = function (_a) {
1383
1596
  var locked = [];
1384
1597
  (0, lodash_1.forEach)(options || {}, function (optionSchema, name) {
1385
1598
  (0, lodash_1.forEach)((optionSchema === null || optionSchema === void 0 ? void 0 : optionSchema.allowed_values) || [], function (allowedValue) {
1386
- var _a;
1387
1599
  if (!(0, OptionFieldMessages_1.getAllowedValueAvailability)(allowedValue, availableOptions, options || {}).available) {
1388
- locked.push("".concat(name, "\0").concat(JSON.stringify((_a = allowedValue === null || allowedValue === void 0 ? void 0 : allowedValue.value) === null || _a === void 0 ? void 0 : _a.value)));
1600
+ locked.push("".concat(name, "\0").concat(JSON.stringify((0, allowedValues_1.allowedValueOf)(allowedValue))));
1389
1601
  }
1390
1602
  });
1391
1603
  });
@@ -1445,12 +1657,15 @@ var FormEngineImpl = function (_a) {
1445
1657
  }, [JSON.stringify(options), JSON.stringify(fixedValue), JSON.stringify(availableOptions)]);
1446
1658
  var isOptionValid = (0, react_2.useCallback)(function (optionName, type, optionValue) {
1447
1659
  var _a, _b, _c, _d;
1448
- var isEmpty = optionValue === undefined || optionValue === '';
1449
- // An empty field locked by an unmet `depends_on` does not apply, so it is
1450
- // not missing — the same rule the read-first status follows.
1451
- if (isEmpty &&
1452
- ((!((_a = options === null || options === void 0 ? void 0 : options[optionName]) === null || _a === void 0 ? void 0 : _a.required) && !((_b = options === null || options === void 0 ? void 0 : options[optionName]) === null || _b === void 0 ? void 0 : _b.required_groups)) ||
1453
- dependencyLockedNames.includes(optionName))) {
1660
+ // the same "not set" the row's status reads: an empty list is no value
1661
+ var isEmpty = (0, readFirst_1.isOptionValueEmpty)(optionValue);
1662
+ // A field whose `depends_on` does not hold does not apply: it is hidden, and nothing in it can make the
1663
+ // form invalid - a value it holds is kept, and said in the form's note, valid or not (qorus#646).
1664
+ if (dependencyLockedNames.includes(optionName)) {
1665
+ return true;
1666
+ }
1667
+ // An empty field that is not required is not missing.
1668
+ if (isEmpty && !((_a = options === null || options === void 0 ? void 0 : options[optionName]) === null || _a === void 0 ? void 0 : _a.required) && !((_b = options === null || options === void 0 ? void 0 : options[optionName]) === null || _b === void 0 ? void 0 : _b.required_groups)) {
1454
1669
  return true;
1455
1670
  }
1456
1671
  return (0, validations_1.validateField)((0, exports.getType)(type), optionValue, __assign(__assign({ has_to_have_value: true, optionSchema: options, options: availableOptions }, options === null || options === void 0 ? void 0 : options[optionName]), {
@@ -1469,28 +1684,41 @@ var FormEngineImpl = function (_a) {
1469
1684
  ]);
1470
1685
  var getValidityData = (0, react_2.useCallback)(function () {
1471
1686
  var fields = (0, reduce_1.default)(availableOptions, function (result, option, optionName) {
1472
- var _a, _b, _c;
1687
+ var _a, _b, _c, _d;
1473
1688
  var type = (0, exports.getOptionFieldStorageType)(optionName, option.type, options, operators, option.op, isRendererOnly, optionHoldsExpression(option));
1474
1689
  var optionValue = option.value;
1475
1690
  var isRequired = (_a = options === null || options === void 0 ? void 0 : options[optionName]) === null || _a === void 0 ? void 0 : _a.required;
1476
1691
  var hasRequiredGroups = !!((_b = options === null || options === void 0 ? void 0 : options[optionName]) === null || _b === void 0 ? void 0 : _b.required_groups);
1477
- var isEmpty = optionValue === undefined || optionValue === '';
1692
+ // the same "not set" the row's status reads: an empty list is no value
1693
+ var isEmpty = (0, readFirst_1.isOptionValueEmpty)(optionValue);
1478
1694
  var validation;
1479
- /* A required field locked by an unmet `depends_on` does not apply
1480
- while it is locked: it is not in "Needs attention", and an empty one
1481
- does not make the form incomplete either. Otherwise a check whose
1482
- kind is Equals could never be saved, because Minimum — required for
1483
- Between alone — is empty; and a form whose only gaps are fields
1484
- nobody can fill in would say Incomplete with nothing to act on. A
1485
- locked field that still HOLDS a value is validated as before. */
1486
- if (isEmpty &&
1487
- ((!isRequired && !hasRequiredGroups) || dependencyLockedNames.includes(optionName))) {
1488
- validation = { isValid: true, reasons: [] };
1695
+ /* A field whose host gives its own reason (`invalid_reason`) is invalid while it does, whatever the
1696
+ field makes of its value: the host knows something the field cannot - that a field it names
1697
+ is not in the record, that text around a field is not a whole number - and says it in the field,
1698
+ in place of the field's own message (`getOptionFieldMessages`). */
1699
+ var hostReason = (_c = options === null || options === void 0 ? void 0 : options[optionName]) === null || _c === void 0 ? void 0 : _c.invalid_reason;
1700
+ if (hostReason) {
1701
+ validation = { isValid: false, reason: hostReason, reasons: [hostReason] };
1489
1702
  }
1490
1703
  else {
1491
- validation = (0, validations_1.validateFieldWithResult)((0, exports.getType)(type), optionValue, __assign(__assign({ has_to_have_value: true, optionSchema: options, options: availableOptions }, options === null || options === void 0 ? void 0 : options[optionName]), {
1492
- // The expression flag lives on the field value, not the schema.
1493
- isFunction: option.is_expression, hasOwnEditor: isRendererOnly((_c = options === null || options === void 0 ? void 0 : options[optionName]) === null || _c === void 0 ? void 0 : _c.ui_type) }));
1704
+ /* A required field locked by an unmet `depends_on` does not apply
1705
+ while it is locked: it is not in "Needs attention", and an empty one
1706
+ does not make the form incomplete either. Otherwise a check whose
1707
+ kind is Equals could never be saved, because Minimum — required for
1708
+ Between alone — is empty; and a form whose only gaps are fields
1709
+ nobody can fill in would say Incomplete with nothing to act on. A
1710
+ locked field that still HOLDS a value is validated as before. */
1711
+ if (dependencyLockedNames.includes(optionName) ||
1712
+ (isEmpty && !isRequired && !hasRequiredGroups)) {
1713
+ /* A field whose `depends_on` does not hold is hidden and does not apply: nothing in it makes the
1714
+ form invalid, empty or holding a value (kept, and said in the form's note - qorus#646). */
1715
+ validation = { isValid: true, reasons: [] };
1716
+ }
1717
+ else {
1718
+ validation = (0, validations_1.validateFieldWithResult)((0, exports.getType)(type), optionValue, __assign(__assign({ has_to_have_value: true, optionSchema: options, options: availableOptions }, options === null || options === void 0 ? void 0 : options[optionName]), {
1719
+ // The expression flag lives on the field value, not the schema.
1720
+ isFunction: option.is_expression, hasOwnEditor: isRendererOnly((_d = options === null || options === void 0 ? void 0 : options[optionName]) === null || _d === void 0 ? void 0 : _d.ui_type) }));
1721
+ }
1494
1722
  }
1495
1723
  result.push({
1496
1724
  fieldName: optionName,
@@ -1519,9 +1747,16 @@ var FormEngineImpl = function (_a) {
1519
1747
  (0, react_2.useEffect)(function () {
1520
1748
  onValidityChange === null || onValidityChange === void 0 ? void 0 : onValidityChange(optionsAreValid, validityData);
1521
1749
  }, [JSON.stringify(validityData)]);
1750
+ /* A field whose `depends_on` does not hold is not shown (qorus#646, David): it is not of use until it applies,
1751
+ so it is left out of the form - not shown waiting, locked - and appears once its dependency holds (and
1752
+ flashes - see `dependencyLockedNames`). Its value is kept; one it holds meanwhile is said in the form's
1753
+ note (`hiddenFieldsWithValues`). */
1522
1754
  var shownOptions = (0, react_2.useMemo)(function () {
1523
1755
  return (0, reduce_1.default)(availableOptions, function (newValue, option, optionName) {
1524
1756
  var _a;
1757
+ if (dependencyLockedNames.includes(optionName)) {
1758
+ return newValue;
1759
+ }
1525
1760
  if (showInvalidOptionsOnly &&
1526
1761
  isOptionValid(optionName, (0, exports.getOptionFieldStorageType)(optionName, option.type, options, operators, option.op, isRendererOnly, optionHoldsExpression(option)), option.value)) {
1527
1762
  return newValue;
@@ -1529,6 +1764,7 @@ var FormEngineImpl = function (_a) {
1529
1764
  return __assign(__assign({}, newValue), (_a = {}, _a[optionName] = option, _a));
1530
1765
  }, {});
1531
1766
  }, [
1767
+ dependencyLockedNames,
1532
1768
  showInvalidOptionsOnly,
1533
1769
  isRendererOnly,
1534
1770
  JSON.stringify(availableOptions),
@@ -1542,7 +1778,7 @@ var FormEngineImpl = function (_a) {
1542
1778
  var schemaMsgIntent = (0, react_2.useCallback)(function (name) {
1543
1779
  var _a;
1544
1780
  // Filtered, not raw: a message hidden by its own `when`/`unless` must not
1545
- // colour the row or push the field into "Needs attention" — the whole point
1781
+ // color the row or push the field into "Needs attention" — the whole point
1546
1782
  // of a conditional warning is that it is absent while it does not apply.
1547
1783
  var msgs = (0, OptionFieldMessages_1.getShownSchemaMessages)((_a = options === null || options === void 0 ? void 0 : options[name]) === null || _a === void 0 ? void 0 : _a.messages, availableOptions, options);
1548
1784
  if (msgs.some(function (m) { return m.intent === 'danger'; }))
@@ -1612,9 +1848,10 @@ var FormEngineImpl = function (_a) {
1612
1848
  }, [JSON.stringify(options), requiredGroupsInfo, getOptionStatus, dependencyLockedNames]);
1613
1849
  // How many fields are in the "Needs attention" box — drives the header link.
1614
1850
  var readFirstAttentionCount = (0, react_2.useMemo)(function () {
1615
- return Object.keys(availableOptions || {}).filter(function (name) { return getOptionBucket(name) === 'attention'; })
1616
- .length;
1617
- }, [JSON.stringify(availableOptions), getOptionBucket]);
1851
+ return Object.keys(availableOptions || {}).filter(
1852
+ // a hidden field (its `depends_on` does not hold) is not in the form, nor in its counts
1853
+ function (name) { return !dependencyLockedNames.includes(name) && getOptionBucket(name) === 'attention'; }).length;
1854
+ }, [JSON.stringify(availableOptions), getOptionBucket, dependencyLockedNames]);
1618
1855
  var getIntent = (0, react_2.useCallback)(
1619
1856
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1620
1857
  function (optName, type, optValue, _op) {
@@ -1663,14 +1900,35 @@ var FormEngineImpl = function (_a) {
1663
1900
  var handleOptionLabelClick = (0, react_2.useCallback)(function (optionName) {
1664
1901
  setShowHelpForOption(optionName);
1665
1902
  }, []);
1666
- var toggleExpandedOption = (0, react_2.useCallback)(function (optionName) {
1903
+ /** Whether the first-required scan below has opened its row, or is spent by the user's first move (see it). Only a
1904
+ * remount arms it again. */
1905
+ var hasAutoFocusedRef = (0, react_2.useRef)(false);
1906
+ /** The fields the first-required scan has looked at: it opens a field that needs an answer when the field first
1907
+ * appears in the form, not when one already there comes to need one. */
1908
+ var scannedFieldsRef = (0, react_2.useRef)(new Set());
1909
+ /* A row is opened or closed by what the user did to the row as it was drawn, never by flipping whatever the
1910
+ state is by the time React applies the update. A toggle read the direction from the latest state: the
1911
+ first-required scan opens its row with an update of its own, and a click on that row, drawn closed, landed on
1912
+ top of it and closed the row the user had just opened (qorus#646: the Qorus IDE's Schema "Draft Is Saved").
1913
+ Each of these does nothing to a row already in its state.
1914
+
1915
+ A row the user opens or closes is where they have chosen to work: the first-required scan, if it is still
1916
+ waiting for the focus to be free, does not run after either (qorus#646). */
1917
+ var expandOption = (0, react_2.useCallback)(function (optionName) {
1918
+ hasAutoFocusedRef.current = true;
1667
1919
  setExpandedOptions(function (prev) {
1668
- return prev.includes(optionName) ? prev.filter(function (name) { return name !== optionName; })
1920
+ return prev.includes(optionName) ? prev
1669
1921
  // single (default): opening a row collapses any other open one.
1670
1922
  : expandMode === 'single' ? [optionName]
1671
1923
  : __spreadArray(__spreadArray([], prev, true), [optionName], false);
1672
1924
  });
1673
1925
  }, [expandMode]);
1926
+ var collapseOption = (0, react_2.useCallback)(function (optionName) {
1927
+ hasAutoFocusedRef.current = true;
1928
+ setExpandedOptions(function (prev) {
1929
+ return prev.includes(optionName) ? prev.filter(function (name) { return name !== optionName; }) : prev;
1930
+ });
1931
+ }, []);
1674
1932
  // --- Caller-named starting rows (opt-in) ----------------------------------
1675
1933
  // `initialExpandedOptions` lets a consumer name the rows that must already
1676
1934
  // be open when the form first paints — the case where the expanded row is
@@ -1702,6 +1960,41 @@ var FormEngineImpl = function (_a) {
1702
1960
  setExpandedOptions(function (prev) { return __spreadArray(__spreadArray([], prev, true), toExpand.filter(function (name) { return !prev.includes(name); }), true); });
1703
1961
  }, [initialExpandedOptions, compact, availableOptions]);
1704
1962
  // --- First-attention-field autofocus (opt-in) -----------------------------
1963
+ /** The first row (of `names`, in order: every row by default) that needs an answer and can take one, if any: what
1964
+ * the first-required scan opens. */
1965
+ var firstAttentionRow = function (names) {
1966
+ if (names === void 0) { names = Object.keys(availableOptions); }
1967
+ return (0, readFirst_1.getFirstAttentionOptionName)(names, function (fieldName) {
1968
+ var schema = options === null || options === void 0 ? void 0 : options[fieldName];
1969
+ if (!schema) {
1970
+ return undefined;
1971
+ }
1972
+ return {
1973
+ focusable: !readOnly &&
1974
+ !schema.disabled &&
1975
+ !schema.readonly &&
1976
+ !dependencyLockedNames.includes(fieldName),
1977
+ // Single source of truth: the same bucket the read-first status boxes
1978
+ // show, so a filled-but-invalid required row is a target too.
1979
+ needsAttention: getOptionBucket(fieldName) === 'attention',
1980
+ };
1981
+ });
1982
+ };
1983
+ var openFirstAttentionRow = function (target) {
1984
+ if (target) {
1985
+ setExpandedOptions(function (prev) {
1986
+ return prev.includes(target) ? prev
1987
+ : expandMode === 'multi' ? __spreadArray(__spreadArray([], prev, true), [target], false)
1988
+ // `expandMode: 'single'` is a rule about what a CLICK does: opening a
1989
+ // row closes the one the reader last opened. It is not a licence to
1990
+ // close a row the HOST named through `initialExpandedOptions`. That
1991
+ // is an address — a statement about what the page is FOR, made before
1992
+ // the reader did anything — and this scan is a convenience layered on
1993
+ // top of it. Keep the named rows; replace only what a click could.
1994
+ : __spreadArray(__spreadArray([], prev.filter(function (name) { return initialExpandedOptions === null || initialExpandedOptions === void 0 ? void 0 : initialExpandedOptions.includes(name); }), true), [target], false);
1995
+ });
1996
+ }
1997
+ };
1705
1998
  // With `autoFocusFirstRequired`, drop the user straight into the first field
1706
1999
  // they must fix. We reuse the engine's own ordering (`availableOptions`), the
1707
2000
  // very same `getOptionBucket` the status boxes use to decide "needs attention"
@@ -1711,13 +2004,17 @@ var FormEngineImpl = function (_a) {
1711
2004
  // `expandedOptions` — the row's editor-focus effect does the rest. No DOM
1712
2005
  // scraping, no synthetic clicks, no polling.
1713
2006
  //
1714
- // Strictly one-shot: it fires the first time the form has focusable content
1715
- // (so an async-loaded schema is still covered — the empty first pass doesn't
1716
- // count), then never again for the life of this instance. A server-driven
1717
- // field update or an in-place schema reload will NOT re-grab focus; only a
1718
- // genuine remount (a fresh instance) auto-focuses again, which is the intended
1719
- // on-mount behaviour.
1720
- var hasAutoFocusedRef = (0, react_2.useRef)(false);
2007
+ // It opens one row for the life of this instance, keyed on a field's arrival: the first field that needs an
2008
+ // answer when it first appears in the form. A schema that arrives after the mount, or in pieces, is covered: the
2009
+ // fields of a later piece are looked at when they arrive, as long as the scan has opened nothing yet. A field
2010
+ // already in the form that comes to need an answer (a value edited, a server-driven update) is not a reason to
2011
+ // open it, nor to re-grab focus; only a genuine remount (a fresh instance) arms the scan again.
2012
+ //
2013
+ // It waits only for the user's first move. A form opened from a button mounts while that button holds the
2014
+ // focus, and the scan waits for it to be free - but the user does not wait: they open a row (which spends
2015
+ // the scan, `expandOption`) or come into the form from the keyboard (which runs it, below). Waiting
2016
+ // past that, the scan ran the first time the focus rested on nothing, which is the Done that closes the
2017
+ // user's row, and opened the next row that needed an answer by itself in the middle of their work.
1721
2018
  (0, react_2.useEffect)(function () {
1722
2019
  // Two decisions, one scan. Both open the row that needs attention;
1723
2020
  // `autoFocusFirstRequired` additionally promises the caret lands in it, and
@@ -1726,14 +2023,25 @@ var FormEngineImpl = function (_a) {
1726
2023
  // CompactRow's tap-to-edit rule, and it declines just as firmly to take one
1727
2024
  // that is already somewhere outside the row.
1728
2025
  var wantsFocus = !!autoFocusFirstRequired;
1729
- if ((!wantsFocus && !expandFirstRequired) || !compact || !options) {
2026
+ // the schema the form holds is the one in force: not one a skeleton stands for, nor one the host has replaced
2027
+ if ((!wantsFocus && !expandFirstRequired) || !compact || !options || !schemaInForce) {
1730
2028
  return;
1731
2029
  }
1732
2030
  if (hasAutoFocusedRef.current) {
1733
2031
  return;
1734
2032
  }
1735
2033
  var orderedNames = Object.keys(availableOptions);
1736
- if (!orderedNames.length) {
2034
+ // the fields that have appeared since the scan last looked: only they can be what it opens
2035
+ var arrived = orderedNames.filter(function (name) { return !scannedFieldsRef.current.has(name); });
2036
+ if (!arrived.length) {
2037
+ return;
2038
+ }
2039
+ /* Read on the form the schema makes: a required field the schema brings is added to the form's value by the
2040
+ sync-down, an effect, so the render after the schema arrives. Read before that, the form had no row for it:
2041
+ the scan found nothing to open and was spent, and the field's row stayed closed (qorus#646: the Qorus IDE's
2042
+ pipeline processor, whose required field mappings arrive with its schema). */
2043
+ var formTheSchemaMakes = (0, exports.fixOptions)(fixedValue, options, undefined, isRendererOnly);
2044
+ if (Object.keys(formTheSchemaMakes || {}).some(function (name) { return !(name in fixedValue); })) {
1737
2045
  return;
1738
2046
  }
1739
2047
  // Never grab focus from a control the user is already in — including a field
@@ -1752,55 +2060,107 @@ var FormEngineImpl = function (_a) {
1752
2060
  if (wantsFocus && active && active !== document.body) {
1753
2061
  return;
1754
2062
  }
1755
- var target = (0, readFirst_1.getFirstAttentionOptionName)(orderedNames, function (fieldName) {
1756
- var schema = options[fieldName];
1757
- if (!schema) {
1758
- return undefined;
1759
- }
1760
- return {
1761
- focusable: !readOnly &&
1762
- !schema.disabled &&
1763
- !schema.readonly &&
1764
- !dependencyLockedNames.includes(fieldName),
1765
- // Single source of truth: the same bucket the read-first status boxes
1766
- // show, so a filled-but-invalid required row is a target too.
1767
- needsAttention: getOptionBucket(fieldName) === 'attention',
1768
- };
1769
- });
1770
- // Mark done even when nothing needs attention, so later value edits or an
1771
- // in-place schema reload never re-scan or re-focus. Only a remount arms it
1772
- // again.
1773
- hasAutoFocusedRef.current = true;
1774
- if (target) {
1775
- setExpandedOptions(function (prev) {
1776
- return prev.includes(target) ? prev
1777
- : expandMode === 'multi' ? __spreadArray(__spreadArray([], prev, true), [target], false)
1778
- // `expandMode: 'single'` is a rule about what a CLICK does: opening a
1779
- // row closes the one the reader last opened. It is not a licence to
1780
- // close a row the HOST named through `initialExpandedOptions`. That
1781
- // is an address — a statement about what the page is FOR, made before
1782
- // the reader did anything — and this scan is a convenience layered on
1783
- // top of it. Keep the named rows; replace only what a click could.
1784
- : __spreadArray(__spreadArray([], prev.filter(function (name) { return initialExpandedOptions === null || initialExpandedOptions === void 0 ? void 0 : initialExpandedOptions.includes(name); }), true), [target], false);
1785
- });
2063
+ // Looked at: a field here now is not looked at again, whatever it comes to hold.
2064
+ orderedNames.forEach(function (name) { return scannedFieldsRef.current.add(name); });
2065
+ var target = firstAttentionRow(arrived);
2066
+ if (!target) {
2067
+ // nothing that arrived needs an answer: the scan waits for the fields still to come
2068
+ return;
1786
2069
  }
2070
+ hasAutoFocusedRef.current = true;
2071
+ openFirstAttentionRow(target);
1787
2072
  }, [
1788
2073
  autoFocusFirstRequired,
1789
2074
  expandFirstRequired,
1790
2075
  compact,
1791
2076
  options,
2077
+ schemaInForce,
1792
2078
  availableOptions,
2079
+ isRendererOnly,
1793
2080
  readOnly,
1794
2081
  dependencyLockedNames,
1795
2082
  getOptionBucket,
1796
2083
  expandMode,
1797
2084
  initialExpandedOptions,
1798
2085
  ]);
2086
+ /* The two first moves a user makes in a form opened from a button, while the scan above waits for the
2087
+ focus to be free:
2088
+ - pointing into the form (a click on a row, a field, the toolbar) is choosing where to work, and spends
2089
+ the scan, as opening a row does (`expandOption`);
2090
+ - coming into it from the keyboard (Tab from the button) chooses nothing, and runs the scan now: the user
2091
+ is put in the first row that needs an answer, once. Coming straight into a control they can type in
2092
+ (a field already open, the search box) is theirs, and spends the scan without moving them.
2093
+ Only while the scan still waits; it never runs twice. */
2094
+ var keyboardEntry = (0, react_2.useRef)();
2095
+ keyboardEntry.current = function (event) {
2096
+ if (hasAutoFocusedRef.current || !options || !Object.keys(availableOptions).length) {
2097
+ return;
2098
+ }
2099
+ var from = event.relatedTarget;
2100
+ if (from && (compactWrapNode === null || compactWrapNode === void 0 ? void 0 : compactWrapNode.contains(from))) {
2101
+ return;
2102
+ }
2103
+ hasAutoFocusedRef.current = true;
2104
+ var entered = event.target;
2105
+ if ((0, rowFocus_1.isTypingControl)(entered)) {
2106
+ return;
2107
+ }
2108
+ var target = firstAttentionRow();
2109
+ if (!target) {
2110
+ return;
2111
+ }
2112
+ // A row takes the caret only from nothing - never from an element the reader is on (see CompactRow) - so
2113
+ // the element the Tab landed on lets it go: the scan is what the reader came in for.
2114
+ entered.blur();
2115
+ openFirstAttentionRow(target);
2116
+ };
2117
+ (0, react_2.useEffect)(function () {
2118
+ if (!autoFocusFirstRequired || !compact || !compactWrapNode) {
2119
+ return undefined;
2120
+ }
2121
+ var onPointerDown = function () {
2122
+ hasAutoFocusedRef.current = true;
2123
+ };
2124
+ var onFocusIn = function (event) { var _a; return (_a = keyboardEntry.current) === null || _a === void 0 ? void 0 : _a.call(keyboardEntry, event); };
2125
+ // capture: the pointer is the user's choice before anything in the form answers it
2126
+ compactWrapNode.addEventListener('pointerdown', onPointerDown, true);
2127
+ compactWrapNode.addEventListener('focusin', onFocusIn);
2128
+ return function () {
2129
+ compactWrapNode.removeEventListener('pointerdown', onPointerDown, true);
2130
+ compactWrapNode.removeEventListener('focusin', onFocusIn);
2131
+ };
2132
+ }, [autoFocusFirstRequired, compact, compactWrapNode]);
1799
2133
  // Read-first completion summary (how many shown options have a value set),
1800
2134
  // surfaced as a progress meter at the top of the compact form.
1801
2135
  var readFirstCompletion = (0, react_2.useMemo)(function () {
1802
- return (0, readFirst_1.getReadFirstCompletion)(availableOptions, function (name) { return getOptionBucket(name) === 'attention'; });
1803
- }, [JSON.stringify(availableOptions), getOptionBucket]);
2136
+ return (0, readFirst_1.getReadFirstCompletion)(
2137
+ // a hidden field (its `depends_on` does not hold) is not in the form, nor in its meter
2138
+ (0, lodash_1.omit)(availableOptions, dependencyLockedNames), function (name) { return getOptionBucket(name) === 'attention'; });
2139
+ }, [JSON.stringify(availableOptions), getOptionBucket, dependencyLockedNames]);
2140
+ /* The hidden fields (their `depends_on` does not hold) that hold a value: kept, not dropped silently, so the form
2141
+ says so in a note - and whether the value is valid, as no field shows it (qorus#646, David). */
2142
+ var hiddenFieldsWithValues = (0, react_2.useMemo)(function () {
2143
+ return dependencyLockedNames
2144
+ .filter(function (name) { var _a; return !(0, readFirst_1.isOptionValueEmpty)((_a = availableOptions === null || availableOptions === void 0 ? void 0 : availableOptions[name]) === null || _a === void 0 ? void 0 : _a.value); })
2145
+ .map(function (name) {
2146
+ var field = availableOptions[name];
2147
+ var schema = options === null || options === void 0 ? void 0 : options[name];
2148
+ var type = (0, exports.getOptionFieldStorageType)(name, field.type, options, operators, field.op, isRendererOnly, optionHoldsExpression(field));
2149
+ var validation = (0, validations_1.validateFieldWithResult)((0, exports.getType)(type), field.value, __assign(__assign({ has_to_have_value: true, optionSchema: options, options: availableOptions }, schema), { isFunction: field.is_expression, hasOwnEditor: isRendererOnly(schema === null || schema === void 0 ? void 0 : schema.ui_type) }));
2150
+ return {
2151
+ name: name,
2152
+ label: (schema === null || schema === void 0 ? void 0 : schema.display_name) || name,
2153
+ conditions: (0, OptionFieldMessages_1.describeDependencies)(((schema === null || schema === void 0 ? void 0 : schema.depends_on) || []), options || {}),
2154
+ invalidReason: validation.isValid ? undefined : validation.reason,
2155
+ };
2156
+ });
2157
+ }, [
2158
+ dependencyLockedNames,
2159
+ JSON.stringify(availableOptions),
2160
+ JSON.stringify(options),
2161
+ JSON.stringify(operators),
2162
+ isRendererOnly,
2163
+ ]);
1804
2164
  var optionalFields = (0, react_2.useMemo)(function () {
1805
2165
  return Object.keys(filteredOptions).map(function (option) {
1806
2166
  var _a, _b, _c, _d, _f, _g;
@@ -1970,7 +2330,7 @@ var FormEngineImpl = function (_a) {
1970
2330
  (0, jsx_runtime_1.jsx)(reqore_1.ReqoreButton, { disabled: readOnly, icon: 'DeleteBinLine', effect: NegativeColorEffect, fixed: true, onClick: function () { return handleRemoveOperator(optionName, fixedValue, index); } })
1971
2331
  : null] }, index));
1972
2332
  }) }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreVerticalSpacer, { height: 5 })] })
1973
- : null, (0, react_1.createElement)(TemplateField_1.TemplateField, __assign({ fluid: true }, options === null || options === void 0 ? void 0 : options[optionName], resolveInheritProps((_c = options === null || options === void 0 ? void 0 : options[optionName]) === null || _c === void 0 ? void 0 : _c.inherit_props, availableOptions, inheritedFromParent), {
2333
+ : null, (0, react_1.createElement)(TemplateField_1.TemplateField, __assign({ fluid: true }, options === null || options === void 0 ? void 0 : options[optionName], (0, inheritProps_1.resolveInheritProps)((_c = options === null || options === void 0 ? void 0 : options[optionName]) === null || _c === void 0 ? void 0 : _c.inherit_props, availableOptions, inheritedFromParent), {
1974
2334
  // qorus#347-followup (scope forwarding): merge accumulated
1975
2335
  // inheritance (`inheritedFromParent`) with THIS field's freshly
1976
2336
  // resolved inherit_props, and pass down as a single bag so any
@@ -1999,6 +2359,9 @@ var FormEngineImpl = function (_a) {
1999
2359
  // reqraft: form-level expression fields get the Visual/Text shell
2000
2360
  // (DPQL text mode); opt out per-form via `templateFieldProps`.
2001
2361
  allowTextExpressions: true,
2362
+ // a form's options enter their value on tabs: Value · Expression · Visual, or Value · Template
2363
+ // where only templates are taken (qorus#646); opt out per-form via `templateFieldProps`
2364
+ valueTabs: true,
2002
2365
  // A fixed allowed-value field still needs its selector even when
2003
2366
  // arbitrary custom values are forbidden. TemplateField uses this
2004
2367
  // flag to decide whether to mount AutoFormField at all; treating
@@ -2043,11 +2406,13 @@ var FormEngineImpl = function (_a) {
2043
2406
  !(0, validations_1.hasAllDependenciesFullfilled)((_v = options === null || options === void 0 ? void 0 : options[optionName]) === null || _v === void 0 ? void 0 : _v.depends_on, availableOptions, options || {}), readOnly: readOnly, size: editorSize || rest.size, menuItems: (0, typeChoices_1.offersTypeChoices)(options === null || options === void 0 ? void 0 : options[optionName], anyLikeUiTypes) ?
2044
2407
  getCustomMenuTemplateItems(optionName)
2045
2408
  : undefined }, templateFieldProps, { forceDropdown: effectiveForceDropdown })), (0, jsx_runtime_1.jsx)(OptionFieldMessages_1.OptionFieldMessages, { schema: options || {}, allOptions: availableOptions, name: optionName, option: __assign({ type: resolvedType }, other), getType: getTypeForOption, isRendererOnly: isRendererOnly }), operators && (0, size_1.default)(operators) && (0, size_1.default)(other.op) ?
2046
- (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreVerticalSpacer, { height: 5 }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { size: 'small', children: (0, jsx_runtime_1.jsxs)(reqore_1.ReqoreTagGroup, { children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { size: 'small', labelKey: 'WHERE', label: optionName }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { size: 'small', labelKey: 'IS', label: operatorParts.join(' ') }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { size: 'small', intent: 'info', label: other.value ?
2047
- resolvedType === 'richtext' ?
2048
- (0, common_1.richtextToString)(other.value)
2049
- : JSON.stringify(other.value)
2050
- : '' })] }) })] })
2409
+ (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreVerticalSpacer, { height: 5 }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { size: 'small', className: 'options-operator-summary', children: (0, operatorSummary_1.operatorSummary)({
2410
+ label: (optionSchema === null || optionSchema === void 0 ? void 0 : optionSchema.display_name) || optionName,
2411
+ operatorKeys: operatorParts,
2412
+ operators: operators,
2413
+ value: other.value,
2414
+ shown: (0, readFirst_1.formatOptionValue)(__assign({ type: resolvedType }, other), optionSchema),
2415
+ }) })] })
2051
2416
  : null] }));
2052
2417
  }, [
2053
2418
  options,
@@ -2064,7 +2429,7 @@ var FormEngineImpl = function (_a) {
2064
2429
  fixedValue,
2065
2430
  // Depend on the specific `rest` values used, not the whole `rest` object
2066
2431
  // (which is a fresh `{...rest}` every render and would defeat the memo).
2067
- rest === null || rest === void 0 ? void 0 : rest.options,
2432
+ optionsSchema,
2068
2433
  rest === null || rest === void 0 ? void 0 : rest.size,
2069
2434
  handleValueChange,
2070
2435
  handleOperatorChange,
@@ -2076,11 +2441,11 @@ var FormEngineImpl = function (_a) {
2076
2441
  inheritedFromParent,
2077
2442
  ]);
2078
2443
  // Compact (read-first) rendering.
2079
- // Theme-derived colours so the flat-row layout adapts to light/dark/custom themes.
2444
+ // Theme-derived colors so the flat-row layout adapts to light/dark/custom themes.
2080
2445
  var cText = ((_b = theme === null || theme === void 0 ? void 0 : theme.text) === null || _b === void 0 ? void 0 : _b.color) || '#f1f0ee';
2081
- // Text emphasis tiers via reqore's readable-colour helper (key = full readable
2446
+ // Text emphasis tiers via reqore's readable-color helper (key = full readable
2082
2447
  // text, muted = its dimmed variant, faint = the dimmed variant softened
2083
- // further) instead of hand-rolled hex-alpha suffixes on the raw text colour.
2448
+ // further) instead of hand-rolled hex-alpha suffixes on the raw text color.
2084
2449
  var cKey = (0, colors_1.getReadableColor)(theme);
2085
2450
  var cMuted = (0, colors_1.getReadableColor)(theme, undefined, undefined, true);
2086
2451
  var cFaint = "".concat(cMuted, "99");
@@ -2090,6 +2455,15 @@ var FormEngineImpl = function (_a) {
2090
2455
  var cWarning = ((_d = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _d === void 0 ? void 0 : _d.warning) || '#ffdf34';
2091
2456
  var cInfo = ((_f = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _f === void 0 ? void 0 : _f.info) || '#3b8eea';
2092
2457
  var cSuccess = ((_g = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _g === void 0 ? void 0 : _g.success) || '#36b37e';
2458
+ // the rows' own words and marks, in colors that read on every surface a row is drawn on
2459
+ var rowInks = (0, react_2.useMemo)(function () { return (0, readFirstColors_1.getReadFirstInks)(theme); }, [theme]);
2460
+ // an option panel's short description, faint: as faint as it still reads in the theme
2461
+ var optionDescOpacity = (0, react_2.useMemo)(function () { return (0, readableColors_1.getReadableTextOpacity)(theme, 0.3); }, [theme]);
2462
+ /* an invalid option's mark in its panel's title: the danger, in the shade of it that stands out as reqore draws a
2463
+ title icon, at 70% (danger:lighten:5 was 2.9:1) */
2464
+ var invalidOptionIconColor = (0, react_2.useMemo)(function () {
2465
+ return (0, readableColors_1.getReadableShade)(cDanger, (0, readableColors_1.getThemeSurfaces)(theme), readableColors_1.READABLE_ICON, PANEL_TITLE_ICON_ALPHA);
2466
+ }, [theme, cDanger]);
2093
2467
  var cBg = (theme === null || theme === void 0 ? void 0 : theme.main) || '#181818';
2094
2468
  var cRowBg = (0, colors_1.changeDarkness)((0, colors_1.getMainBackgroundColor)(theme), 0.01);
2095
2469
  var cGroupLine = "".concat(cText, "1f");
@@ -2110,6 +2484,9 @@ var FormEngineImpl = function (_a) {
2110
2484
  focusedEditing: focusedEditing,
2111
2485
  showFieldTypes: showFieldTypes,
2112
2486
  codePreviewRenderer: codePreviewRenderer,
2487
+ codeEditor: componentOverrides === null || componentOverrides === void 0 ? void 0 : componentOverrides['code-editor'],
2488
+ readSummaries: readSummaries,
2489
+ cardEditorTypes: cardEditorTypes,
2113
2490
  showAllDescriptions: showAllDescriptions,
2114
2491
  expandedOptions: expandedOptions,
2115
2492
  highlightedOptions: highlightedOptions,
@@ -2124,7 +2501,8 @@ var FormEngineImpl = function (_a) {
2124
2501
  requiredGroupsInfo: requiredGroupsInfo,
2125
2502
  handleValueChange: handleValueChange,
2126
2503
  handleAddOptionalFieldChange: handleAddOptionalFieldChange,
2127
- toggleExpandedOption: toggleExpandedOption,
2504
+ expandOption: expandOption,
2505
+ collapseOption: collapseOption,
2128
2506
  flashOption: flashOption,
2129
2507
  hasOptionChanged: hasOptionChanged,
2130
2508
  handleOptionLabelClick: handleOptionLabelClick,
@@ -2147,6 +2525,7 @@ var FormEngineImpl = function (_a) {
2147
2525
  cWarning: cWarning,
2148
2526
  cInfo: cInfo,
2149
2527
  cBg: cBg,
2528
+ rowInks: rowInks,
2150
2529
  }); }, [
2151
2530
  templates.value,
2152
2531
  readOnly,
@@ -2157,6 +2536,9 @@ var FormEngineImpl = function (_a) {
2157
2536
  focusedEditing,
2158
2537
  showFieldTypes,
2159
2538
  codePreviewRenderer,
2539
+ componentOverrides,
2540
+ readSummaries,
2541
+ cardEditorTypes,
2160
2542
  showAllDescriptions,
2161
2543
  expandedOptions,
2162
2544
  highlightedOptions,
@@ -2171,7 +2553,8 @@ var FormEngineImpl = function (_a) {
2171
2553
  requiredGroupsInfo,
2172
2554
  handleValueChange,
2173
2555
  handleAddOptionalFieldChange,
2174
- toggleExpandedOption,
2556
+ expandOption,
2557
+ collapseOption,
2175
2558
  flashOption,
2176
2559
  hasOptionChanged,
2177
2560
  handleOptionLabelClick,
@@ -2194,6 +2577,7 @@ var FormEngineImpl = function (_a) {
2194
2577
  cWarning,
2195
2578
  cInfo,
2196
2579
  cBg,
2580
+ rowInks,
2197
2581
  ]);
2198
2582
  // `compactToolbar` resolved to a full object, so neither the context type nor
2199
2583
  // the toolbar itself has to re-default anything. `null` means no toolbar.
@@ -2571,7 +2955,7 @@ var FormEngineImpl = function (_a) {
2571
2955
  // "Covers"/"Covered by" chips already say which member satisfies it.
2572
2956
  if (requiredGroupsInfo.satisfiedBy[grp])
2573
2957
  return railed;
2574
- return ((0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledRequiredClusterBox, { className: 'options-readfirst-required-cluster', "$border": "".concat(cWarning, "33"), "$tint": "".concat(cWarning, "0d"), children: [(0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledRequiredClusterHeader, { "$color": cWarning, children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreIcon, { icon: 'LinkM', size: '11px', style: { color: cWarning } }), "One of the below is required"] }), railed] }, grp));
2958
+ return ((0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledRequiredClusterBox, { className: 'options-readfirst-required-cluster', "$border": "".concat(cWarning, "33"), "$tint": "".concat(cWarning, "0d"), children: [(0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledRequiredClusterHeader, { "$color": rowInks.warning, children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreIcon, { icon: 'LinkM', size: '11px', style: { color: rowInks.warning } }), "One of the below is required"] }), railed] }, grp));
2575
2959
  });
2576
2960
  };
2577
2961
  // One schema group inside a status box: its thin sub-label, the group's
@@ -2655,7 +3039,7 @@ var FormEngineImpl = function (_a) {
2655
3039
  visible` to `auto` unless the other axis is visible or
2656
3040
  clip, which would put the scrollport straight back. `clip`
2657
3041
  keeps the horizontal guard the row ellipsis relies on. */
2658
- overflowY: 'visible', overflowX: 'clip' }, compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.contentStyle), children: [(0, size_1.default)(groupKeys) === 0 || (readOnly && !bucketCount('set')) ?
3042
+ overflowY: 'visible', overflowX: 'clip' }, compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.contentStyle), children: [(0, jsx_runtime_1.jsx)(HiddenFieldsNote_1.HiddenFieldsNote, { fields: hiddenFieldsWithValues }), (0, size_1.default)(groupKeys) === 0 || (readOnly && !bucketCount('set')) ?
2659
3043
  (0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { flat: true, opaque: false, size: 'small', children: readOnly && !query ?
2660
3044
  'Nothing is set.'
2661
3045
  : 'No fields match the current filters.' })
@@ -2772,7 +3156,7 @@ var FormEngineImpl = function (_a) {
2772
3156
  })
2773
3157
  : null] }) }, box.key));
2774
3158
  })] })), commitMode === 'batched' && !readOnly && dirtyOptionNames.length ?
2775
- (0, jsx_runtime_1.jsx)(StyledCommitDock, { "$bg": cBg, "$border": cDivider, children: (0, jsx_runtime_1.jsxs)(reqore_1.ReqoreControlGroup, { className: 'options-readfirst-commitbar', verticalAlign: 'center', wrap: true, children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { size: 'tiny', minimal: true, flat: true, compact: true, effect: { uppercase: true, spaced: 1 }, intent: 'warning', icon: 'EditLine', label: "".concat(dirtyOptionNames.length, " unsaved change").concat(dirtyOptionNames.length === 1 ? '' : 's') }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreButton, { size: 'small', intent: 'success', icon: 'CheckLine', fixed: true, className: 'options-readfirst-save', disabled: !validityData.isValid, tooltip: validityData.isValid ?
3159
+ (0, jsx_runtime_1.jsx)(StyledCommitDock, { "$bg": cBg, "$border": cDivider, children: (0, jsx_runtime_1.jsxs)(reqore_1.ReqoreControlGroup, { className: 'options-readfirst-commitbar', verticalAlign: 'center', wrap: true, children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { size: 'tiny', minimal: true, flat: true, compact: true, effect: { uppercase: true, spaced: 1 }, intent: 'warning', icon: 'EditLine', label: "".concat(dirtyOptionNames.length, " unsaved change").concat(dirtyOptionNames.length === 1 ? '' : 's') }), validityData.isValid ? null : ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { size: 'tiny', minimal: true, flat: true, wrap: true, intent: 'danger', icon: 'ErrorWarningLine', className: 'options-readfirst-commit-blocked', label: (0, readFirst_1.describeBlockedSave)(validityData.invalidFields, options) })), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreButton, { size: 'small', intent: 'success', icon: 'CheckLine', fixed: true, className: 'options-readfirst-save', disabled: !validityData.isValid, tooltip: validityData.isValid ?
2776
3160
  'Apply the staged changes'
2777
3161
  : 'Resolve the invalid fields before saving', onClick: handleCommitClick, children: "Save" }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreButton, { size: 'small', minimal: true, flat: true, fixed: true, icon: 'HistoryLine', className: 'options-readfirst-discard', onClick: handleRevertChangesClick, children: "Discard" })] }) })
2778
3162
  : null] }) })] }) }) }));
@@ -2780,7 +3164,10 @@ var FormEngineImpl = function (_a) {
2780
3164
  /* Which of the seven waits is holding the form, in the order they are
2781
3165
  tested. Rendered as `data-wait` on the placeholder so a page can be asked
2782
3166
  what it is waiting FOR instead of only that it is waiting. */
2783
- var waitReason = rest.skeleton ? (rest.skeletonReason ? "host:".concat(rest.skeletonReason) : 'host')
3167
+ var waitReason = rest.skeleton ?
3168
+ skeletonReason ?
3169
+ "host:".concat(skeletonReason)
3170
+ : 'host'
2784
3171
  : templates.loading ? 'templates'
2785
3172
  : typesLoading ? 'types'
2786
3173
  : optionsLoading ? 'options'
@@ -2815,11 +3202,11 @@ var FormEngineImpl = function (_a) {
2815
3202
  'Showing invalid fields only. Click here again to show all fields.'
2816
3203
  : "".concat((0, size_1.default)(validityData.invalidFields) < 2 ? 'A field is not valid and requires' : "".concat((0, size_1.default)(validityData.invalidFields), " fields are not valid and require"), " attention. Click here to only show invalid fields.") })
2817
3204
  : null, unavailableOptionsCount.current ?
2818
- (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { intent: 'warning', opaque: false, size: 'small', margin: 'bottom', children: "".concat(unavailableOptionsCount.current, " fields(s) hidden because they are not supported on the current instance") }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreVerticalSpacer, { height: 10 })] })
2819
- : null, children, (0, size_1.default)(filteredOptions) >= 1 && !readOnly ?
3205
+ (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { intent: 'warning', opaque: false, size: 'small', margin: 'bottom', children: "".concat(unavailableOptionsCount.current, " ").concat(unavailableOptionsCount.current === 1 ? 'field' : 'fields', " hidden because they are not supported on the current instance") }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreVerticalSpacer, { height: 10 })] })
3206
+ : null, (0, jsx_runtime_1.jsx)(HiddenFieldsNote_1.HiddenFieldsNote, { fields: hiddenFieldsWithValues }), children, (0, size_1.default)(filteredOptions) >= 1 && !readOnly ?
2820
3207
  (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreVerticalSpacer, { height: 10 }), (0, jsx_runtime_1.jsx)(Select_1.SelectFormField, { items: optionalFields, onChange: function (val) { return handleAddOptionalFieldChange('options', val); }, placeholder: placeholder || 'More Options Available', minimal: true, icon: 'ListView', showDescription: false, fluid: true, size: rest.size })] })
2821
3208
  : null] })); }, sortButtonProps: { minimal: true }, showLayoutSwitch: false, style: { width: '100%' }, items: (0, map_1.default)(shownOptions, function (_a, optionName) {
2822
- var _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
3209
+ var _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
2823
3210
  var type = _a.type, other = __rest(_a, ["type"]);
2824
3211
  return ({
2825
3212
  label: ((_b = options[optionName]) === null || _b === void 0 ? void 0 : _b.display_name) || optionName,
@@ -2843,12 +3230,14 @@ var FormEngineImpl = function (_a) {
2843
3230
  content: ((0, jsx_runtime_1.jsx)(Description_1.Description, { longDescription: "".concat((_h = options[optionName]) === null || _h === void 0 ? void 0 : _h.short_desc).concat(((_j = options[optionName]) === null || _j === void 0 ? void 0 : _j.desc) ? '. Click to learn more.' : ''), margin: 'none' })),
2844
3231
  },
2845
3232
  description: showFieldTypes ?
2846
- "<".concat(options[optionName].ui_type || options[optionName].type).concat(((_k = options[optionName]) === null || _k === void 0 ? void 0 : _k.ui_element_type) ? "[".concat(options[optionName].ui_element_type, "]") : '', "> ").concat(options[optionName].short_desc || '')
3233
+ [(0, qorusTypeCatalogue_1.optionTypeWords)(options[optionName], typeName), options[optionName].short_desc]
3234
+ .filter(Boolean)
3235
+ .join(' · ')
2847
3236
  : options[optionName].short_desc || '',
2848
3237
  descriptionEffect: {
2849
3238
  textSize: '11px',
2850
- opacity: 0.3,
2851
- underline: ((_l = options[optionName]) === null || _l === void 0 ? void 0 : _l.desc) ? 'underline dotted #878787' : undefined,
3239
+ opacity: optionDescOpacity,
3240
+ underline: ((_k = options[optionName]) === null || _k === void 0 ? void 0 : _k.desc) ? 'underline dotted #878787' : undefined,
2852
3241
  },
2853
3242
  customTheme: {
2854
3243
  main: 'main:darken:1',
@@ -2857,7 +3246,7 @@ var FormEngineImpl = function (_a) {
2857
3246
  icon: !isOptionValid(optionName, type, other.value) ? 'SpamFill'
2858
3247
  : undefined,
2859
3248
  iconColor: !isOptionValid(optionName, type, other.value) ?
2860
- 'danger:lighten:5'
3249
+ invalidOptionIconColor
2861
3250
  : undefined,
2862
3251
  transparent: false,
2863
3252
  intent: getIntent(optionName, type, other.value, other.op),
@@ -2885,7 +3274,7 @@ var FormEngineImpl = function (_a) {
2885
3274
  menu: [
2886
3275
  !readOnly &&
2887
3276
  type !== 'code-editor' &&
2888
- (((_m = options[optionName]) === null || _m === void 0 ? void 0 : _m.ui_type) || ((_o = options[optionName]) === null || _o === void 0 ? void 0 : _o.type)) !==
3277
+ (((_l = options[optionName]) === null || _l === void 0 ? void 0 : _l.ui_type) || ((_m = options[optionName]) === null || _m === void 0 ? void 0 : _m.type)) !==
2889
3278
  'code-editor' && {
2890
3279
  label: 'Focused editing',
2891
3280
  icon: 'FullscreenLine',
@@ -2898,22 +3287,22 @@ var FormEngineImpl = function (_a) {
2898
3287
  icon: 'HistoryLine',
2899
3288
  className: 'options-item-revert',
2900
3289
  onClick: function () {
2901
- var _a, _b, _c, _d;
2902
- handleValueChange(optionName, (_b = (_a = originalValue.current) === null || _a === void 0 ? void 0 : _a[optionName]) === null || _b === void 0 ? void 0 : _b.value, (_d = (_c = originalValue.current) === null || _c === void 0 ? void 0 : _c[optionName]) === null || _d === void 0 ? void 0 : _d.type);
3290
+ var _a;
3291
+ handleValueChange.apply(void 0, __spreadArray([optionName], (0, argumentPresence_1.restoredFieldChange)((_a = originalValue.current) === null || _a === void 0 ? void 0 : _a[optionName]), false));
2903
3292
  },
2904
3293
  },
2905
3294
  !readOnly &&
2906
3295
  other.value &&
2907
3296
  !(0, lodash_1.isEqual)(other.value, (0, common_1.getDefaultValue)(options[optionName])) &&
2908
- !(((_p = options[optionName]) === null || _p === void 0 ? void 0 : _p.disabled) || ((_q = options[optionName]) === null || _q === void 0 ? void 0 : _q.readonly)) && {
3297
+ !(((_o = options[optionName]) === null || _o === void 0 ? void 0 : _o.disabled) || ((_p = options[optionName]) === null || _p === void 0 ? void 0 : _p.readonly)) && {
2909
3298
  label: 'Remove value',
2910
3299
  icon: 'CloseLine',
2911
3300
  className: 'options-item-remove',
2912
3301
  onClick: function () { return handleValueChange(optionName, undefined); },
2913
3302
  },
2914
3303
  !readOnly &&
2915
- !((_r = options[optionName]) === null || _r === void 0 ? void 0 : _r.preselected) &&
2916
- !((_s = options[optionName]) === null || _s === void 0 ? void 0 : _s.required) && {
3304
+ !((_q = options[optionName]) === null || _q === void 0 ? void 0 : _q.preselected) &&
3305
+ !((_r = options[optionName]) === null || _r === void 0 ? void 0 : _r.required) && {
2917
3306
  label: 'Remove option',
2918
3307
  icon: 'DeleteBinLine',
2919
3308
  intent: 'danger',
@@ -2929,8 +3318,8 @@ var FormEngineImpl = function (_a) {
2929
3318
  },
2930
3319
  ],
2931
3320
  }),
2932
- content: ((0, jsx_runtime_1.jsxs)(FocusedEditing_1.FocusedEditing, { isFullscreen: focusedEditing === optionName, onClose: function () { return setFocusedEditing(undefined); }, description: (_t = options[optionName]) === null || _t === void 0 ? void 0 : _t.display_name, intent: getIntent(optionName, type, other.value, other.op), children: [focusedEditing === optionName ?
2933
- (0, jsx_runtime_1.jsx)(Description_1.Description, { longDescription: (_u = options[optionName]) === null || _u === void 0 ? void 0 : _u.desc, shortDescription: (_v = options[optionName]) === null || _v === void 0 ? void 0 : _v.short_desc, longDescriptionShownByDefault: true })
3321
+ content: ((0, jsx_runtime_1.jsxs)(FocusedEditing_1.FocusedEditing, { isFullscreen: focusedEditing === optionName, onClose: function () { return setFocusedEditing(undefined); }, description: (_s = options[optionName]) === null || _s === void 0 ? void 0 : _s.display_name, intent: getIntent(optionName, type, other.value, other.op), children: [focusedEditing === optionName ?
3322
+ (0, jsx_runtime_1.jsx)(Description_1.Description, { longDescription: (_t = options[optionName]) === null || _t === void 0 ? void 0 : _t.desc, shortDescription: (_u = options[optionName]) === null || _u === void 0 ? void 0 : _u.short_desc, longDescriptionShownByDefault: true })
2934
3323
  : null, renderOption(optionName, __assign({ type: type }, other))] })),
2935
3324
  });
2936
3325
  }), defaultZoom: 1, zoomable: false, actions: __spreadArray(__spreadArray([], (rest.actions || []).map(function (action) { return (__assign(__assign({}, action), { minimal: true })); }), true), [
@@ -2967,8 +3356,13 @@ var FormEngineImpl = function (_a) {
2967
3356
  * a child of the row it belongs to. Threading a renderer to each of them by
2968
3357
  * hand is how one of them gets missed.
2969
3358
  */
2970
- var FormEngine = function (props) { return ((0, jsx_runtime_1.jsx)(markdownRendererContext_1.MarkdownRendererContext.Provider, { value: props.markdownRenderer, children: (0, jsx_runtime_1.jsx)(FormEngineImpl, __assign({}, props)) })); };
3359
+ var FormEngine = function (props) {
3360
+ // what the host knows of references beyond the catalogue, for every chip the form draws (qorus#646)
3361
+ var referenceNames = (0, react_2.useMemo)(function () { var _a; return (_a = props.templateReferences) !== null && _a !== void 0 ? _a : NO_REFERENCE_NAMES; }, [props.templateReferences]);
3362
+ return ((0, jsx_runtime_1.jsx)(markdownRendererContext_1.MarkdownRendererContext.Provider, { value: props.markdownRenderer, children: (0, jsx_runtime_1.jsx)(typeSentenceForm_1.TypeSentenceFormProvider, { children: (0, jsx_runtime_1.jsx)(referenceNames_1.TemplateReferenceNamesProvider, { value: referenceNames, children: (0, jsx_runtime_1.jsx)(FormEngineImpl, __assign({}, props)) }) }) }));
3363
+ };
2971
3364
  exports.FormEngine = FormEngine;
3365
+ var NO_REFERENCE_NAMES = {};
2972
3366
  exports.default = exports.FormEngine;
2973
3367
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
2974
3368
  //# sourceMappingURL=FormEngine.js.map