@qoretechnologies/reqraft 0.10.78 → 0.10.79-pr.145.g447ecec

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 (619) hide show
  1. package/dist/components/Description/AllowedValuesHelp.d.ts +7 -7
  2. package/dist/components/Description/AllowedValuesHelp.d.ts.map +1 -1
  3. package/dist/components/Description/AllowedValuesHelp.js +13 -10
  4. package/dist/components/Description/AllowedValuesHelp.js.map +1 -1
  5. package/dist/components/Description/describedControl.d.ts +1 -1
  6. package/dist/components/Description/describedControl.js +1 -1
  7. package/dist/components/Description/index.d.ts.map +1 -1
  8. package/dist/components/Description/index.js +22 -4
  9. package/dist/components/Description/index.js.map +1 -1
  10. package/dist/components/FocusedEditing/index.d.ts.map +1 -1
  11. package/dist/components/FocusedEditing/index.js +3 -1
  12. package/dist/components/FocusedEditing/index.js.map +1 -1
  13. package/dist/components/codeSize/index.d.ts +11 -3
  14. package/dist/components/codeSize/index.d.ts.map +1 -1
  15. package/dist/components/codeSize/index.js +24 -8
  16. package/dist/components/codeSize/index.js.map +1 -1
  17. package/dist/components/colorValue/colorValue.d.ts +4 -4
  18. package/dist/components/colorValue/colorValue.d.ts.map +1 -1
  19. package/dist/components/colorValue/colorValue.js +32 -41
  20. package/dist/components/colorValue/colorValue.js.map +1 -1
  21. package/dist/components/colorValue/index.js +1 -1
  22. package/dist/components/colorValue/index.js.map +1 -1
  23. package/dist/components/composer/Composer.d.ts +18 -2
  24. package/dist/components/composer/Composer.d.ts.map +1 -1
  25. package/dist/components/composer/Composer.js +57 -29
  26. package/dist/components/composer/Composer.js.map +1 -1
  27. package/dist/components/composer/labels.d.ts +24 -0
  28. package/dist/components/composer/labels.d.ts.map +1 -0
  29. package/dist/components/composer/labels.js +16 -0
  30. package/dist/components/composer/labels.js.map +1 -0
  31. package/dist/components/dpqlEditor/DpqlEditor.js +3 -3
  32. package/dist/components/dpqlEditor/DpqlEditor.js.map +1 -1
  33. package/dist/components/dpqlEditor/dpqlCompletions.d.ts +4 -4
  34. package/dist/components/dpqlEditor/dpqlCompletions.d.ts.map +1 -1
  35. package/dist/components/dpqlEditor/dpqlCompletions.js +10 -10
  36. package/dist/components/dpqlEditor/dpqlCompletions.js.map +1 -1
  37. package/dist/components/dpqlEditor/dpqlHelpers.d.ts +2 -2
  38. package/dist/components/dpqlEditor/dpqlHelpers.js +6 -6
  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 +1 -2
  42. package/dist/components/dpqlEditor/dpqlInserter.js.map +1 -1
  43. package/dist/components/dpqlEditor/dpqlTags.d.ts +1 -1
  44. package/dist/components/dpqlEditor/dpqlTags.js +4 -4
  45. package/dist/components/dpqlEditor/dpqlTags.js.map +1 -1
  46. package/dist/components/dpqlEditor/types.d.ts +7 -7
  47. package/dist/components/dpqlEditor/useDpqlSession.d.ts +1 -1
  48. package/dist/components/dpqlEditor/useDpqlSession.d.ts.map +1 -1
  49. package/dist/components/dpqlEditor/useDpqlSession.js +2 -2
  50. package/dist/components/dpqlEditor/useDpqlSession.js.map +1 -1
  51. package/dist/components/form/engine/CompactRow.d.ts.map +1 -1
  52. package/dist/components/form/engine/CompactRow.js +243 -87
  53. package/dist/components/form/engine/CompactRow.js.map +1 -1
  54. package/dist/components/form/engine/CompactToolbar.d.ts.map +1 -1
  55. package/dist/components/form/engine/CompactToolbar.js +73 -21
  56. package/dist/components/form/engine/CompactToolbar.js.map +1 -1
  57. package/dist/components/form/engine/DefaultsNote.d.ts +32 -0
  58. package/dist/components/form/engine/DefaultsNote.d.ts.map +1 -0
  59. package/dist/components/form/engine/DefaultsNote.js +33 -0
  60. package/dist/components/form/engine/DefaultsNote.js.map +1 -0
  61. package/dist/components/form/engine/FieldMessageDetails.d.ts +17 -0
  62. package/dist/components/form/engine/FieldMessageDetails.d.ts.map +1 -0
  63. package/dist/components/form/engine/FieldMessageDetails.js +24 -0
  64. package/dist/components/form/engine/FieldMessageDetails.js.map +1 -0
  65. package/dist/components/form/engine/FormEngine.d.ts +125 -5
  66. package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
  67. package/dist/components/form/engine/FormEngine.js +800 -257
  68. package/dist/components/form/engine/FormEngine.js.map +1 -1
  69. package/dist/components/form/engine/FormFieldsSkeleton.d.ts +1 -1
  70. package/dist/components/form/engine/HiddenFieldsNote.d.ts +1 -1
  71. package/dist/components/form/engine/HiddenFieldsNote.js +1 -1
  72. package/dist/components/form/engine/ItemAttention.d.ts +12 -0
  73. package/dist/components/form/engine/ItemAttention.d.ts.map +1 -0
  74. package/dist/components/form/engine/ItemAttention.js +33 -0
  75. package/dist/components/form/engine/ItemAttention.js.map +1 -0
  76. package/dist/components/form/engine/OptionFieldMessages.d.ts +35 -2
  77. package/dist/components/form/engine/OptionFieldMessages.d.ts.map +1 -1
  78. package/dist/components/form/engine/OptionFieldMessages.js +46 -10
  79. package/dist/components/form/engine/OptionFieldMessages.js.map +1 -1
  80. package/dist/components/form/engine/OptionsHelpDialog.js +3 -3
  81. package/dist/components/form/engine/OptionsHelpDialog.js.map +1 -1
  82. package/dist/components/form/engine/ReadReveal.d.ts +26 -0
  83. package/dist/components/form/engine/ReadReveal.d.ts.map +1 -0
  84. package/dist/components/form/engine/ReadReveal.js +52 -0
  85. package/dist/components/form/engine/ReadReveal.js.map +1 -0
  86. package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts +11 -1
  87. package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts.map +1 -1
  88. package/dist/components/form/engine/_structuredData/SchemaDataView.js +96 -19
  89. package/dist/components/form/engine/_structuredData/SchemaDataView.js.map +1 -1
  90. package/dist/components/form/engine/cardHeaderPin.d.ts +59 -0
  91. package/dist/components/form/engine/cardHeaderPin.d.ts.map +1 -0
  92. package/dist/components/form/engine/cardHeaderPin.js +137 -0
  93. package/dist/components/form/engine/cardHeaderPin.js.map +1 -0
  94. package/dist/components/form/engine/compactRowContext.d.ts +19 -3
  95. package/dist/components/form/engine/compactRowContext.d.ts.map +1 -1
  96. package/dist/components/form/engine/compactRowContext.js.map +1 -1
  97. package/dist/components/form/engine/compactRowStyles.d.ts +32 -6
  98. package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
  99. package/dist/components/form/engine/compactRowStyles.js +128 -60
  100. package/dist/components/form/engine/compactRowStyles.js.map +1 -1
  101. package/dist/components/form/engine/compactToolbarColors.d.ts +1 -1
  102. package/dist/components/form/engine/compactToolbarColors.js +1 -1
  103. package/dist/components/form/engine/compactToolbarContext.d.ts +9 -0
  104. package/dist/components/form/engine/compactToolbarContext.d.ts.map +1 -1
  105. package/dist/components/form/engine/compactToolbarContext.js.map +1 -1
  106. package/dist/components/form/engine/formAppearance.d.ts +96 -0
  107. package/dist/components/form/engine/formAppearance.d.ts.map +1 -0
  108. package/dist/components/form/engine/formAppearance.js +156 -0
  109. package/dist/components/form/engine/formAppearance.js.map +1 -0
  110. package/dist/components/form/engine/operatorSummary.d.ts +2 -2
  111. package/dist/components/form/engine/operatorSummary.js +2 -2
  112. package/dist/components/form/engine/readFirst.d.ts +47 -3
  113. package/dist/components/form/engine/readFirst.d.ts.map +1 -1
  114. package/dist/components/form/engine/readFirst.js +43 -9
  115. package/dist/components/form/engine/readFirst.js.map +1 -1
  116. package/dist/components/form/engine/readFirstColors.d.ts +1 -1
  117. package/dist/components/form/engine/readFirstColors.js +1 -1
  118. package/dist/components/form/engine/revealRow.d.ts +20 -4
  119. package/dist/components/form/engine/revealRow.d.ts.map +1 -1
  120. package/dist/components/form/engine/revealRow.js +37 -8
  121. package/dist/components/form/engine/revealRow.js.map +1 -1
  122. package/dist/components/form/engine/rowFocus.d.ts +9 -1
  123. package/dist/components/form/engine/rowFocus.d.ts.map +1 -1
  124. package/dist/components/form/engine/rowFocus.js +17 -4
  125. package/dist/components/form/engine/rowFocus.js.map +1 -1
  126. package/dist/components/form/engine/rowLabelled.d.ts +9 -0
  127. package/dist/components/form/engine/rowLabelled.d.ts.map +1 -0
  128. package/dist/components/form/engine/rowLabelled.js +12 -0
  129. package/dist/components/form/engine/rowLabelled.js.map +1 -0
  130. package/dist/components/form/engine/rowPlaces.d.ts +43 -0
  131. package/dist/components/form/engine/rowPlaces.d.ts.map +1 -0
  132. package/dist/components/form/engine/rowPlaces.js +163 -0
  133. package/dist/components/form/engine/rowPlaces.js.map +1 -0
  134. package/dist/components/form/engine/variants/focusDemo.js +1 -1
  135. package/dist/components/form/engine/variants/focusDemo.js.map +1 -1
  136. package/dist/components/form/engine/variants/variantModel.d.ts +1 -1
  137. package/dist/components/form/engine/variants/variantModel.d.ts.map +1 -1
  138. package/dist/components/form/engine/variants/variantModel.js +2 -2
  139. package/dist/components/form/engine/variants/variantModel.js.map +1 -1
  140. package/dist/components/form/engine/variants/variantParts.js +3 -2
  141. package/dist/components/form/engine/variants/variantParts.js.map +1 -1
  142. package/dist/components/form/expressions/DpqlRendering.d.ts.map +1 -1
  143. package/dist/components/form/expressions/DpqlRendering.js +5 -3
  144. package/dist/components/form/expressions/DpqlRendering.js.map +1 -1
  145. package/dist/components/form/expressions/ExpressionField.d.ts +9 -11
  146. package/dist/components/form/expressions/ExpressionField.d.ts.map +1 -1
  147. package/dist/components/form/expressions/ExpressionField.js +26 -24
  148. package/dist/components/form/expressions/ExpressionField.js.map +1 -1
  149. package/dist/components/form/expressions/argumentPresence.d.ts +1 -1
  150. package/dist/components/form/expressions/argumentPresence.js +1 -1
  151. package/dist/components/form/expressions/builder/argumentDetail.d.ts.map +1 -1
  152. package/dist/components/form/expressions/builder/argumentDetail.js +5 -2
  153. package/dist/components/form/expressions/builder/argumentDetail.js.map +1 -1
  154. package/dist/components/form/expressions/builder/argumentLabel.d.ts +4 -2
  155. package/dist/components/form/expressions/builder/argumentLabel.d.ts.map +1 -1
  156. package/dist/components/form/expressions/builder/argumentLabel.js +69 -29
  157. package/dist/components/form/expressions/builder/argumentLabel.js.map +1 -1
  158. package/dist/components/form/expressions/builder/argumentSlot.d.ts.map +1 -1
  159. package/dist/components/form/expressions/builder/argumentSlot.js +3 -2
  160. package/dist/components/form/expressions/builder/argumentSlot.js.map +1 -1
  161. package/dist/components/form/expressions/builder/argumentWrapper.d.ts.map +1 -1
  162. package/dist/components/form/expressions/builder/argumentWrapper.js +11 -7
  163. package/dist/components/form/expressions/builder/argumentWrapper.js.map +1 -1
  164. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.d.ts +1 -1
  165. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.d.ts.map +1 -1
  166. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js +15 -10
  167. package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js.map +1 -1
  168. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.d.ts.map +1 -1
  169. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js +4 -2
  170. package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js.map +1 -1
  171. package/dist/components/form/expressions/builder/index.d.ts +9 -4
  172. package/dist/components/form/expressions/builder/index.d.ts.map +1 -1
  173. package/dist/components/form/expressions/builder/index.js +120 -75
  174. package/dist/components/form/expressions/builder/index.js.map +1 -1
  175. package/dist/components/form/expressions/builder/item.d.ts.map +1 -1
  176. package/dist/components/form/expressions/builder/item.js +4 -2
  177. package/dist/components/form/expressions/builder/item.js.map +1 -1
  178. package/dist/components/form/expressions/builder/moveToPositionStrip.d.ts +1 -1
  179. package/dist/components/form/expressions/builder/moveToPositionStrip.d.ts.map +1 -1
  180. package/dist/components/form/expressions/builder/moveToPositionStrip.js +8 -7
  181. package/dist/components/form/expressions/builder/moveToPositionStrip.js.map +1 -1
  182. package/dist/components/form/expressions/builder/renderTemplate.d.ts.map +1 -1
  183. package/dist/components/form/expressions/builder/renderTemplate.js +3 -1
  184. package/dist/components/form/expressions/builder/renderTemplate.js.map +1 -1
  185. package/dist/components/form/expressions/dpqlMockRecordPath.js +2 -2
  186. package/dist/components/form/expressions/dpqlMockRecordPath.js.map +1 -1
  187. package/dist/components/form/expressions/expressionOperands.js +1 -1
  188. package/dist/components/form/expressions/fieldPath.js +1 -1
  189. package/dist/components/form/expressions/fieldPath.js.map +1 -1
  190. package/dist/components/form/expressions/labels.d.ts +143 -0
  191. package/dist/components/form/expressions/labels.d.ts.map +1 -0
  192. package/dist/components/form/expressions/labels.js +123 -0
  193. package/dist/components/form/expressions/labels.js.map +1 -0
  194. package/dist/components/form/expressions/loneValue.d.ts +1 -1
  195. package/dist/components/form/expressions/loneValue.js +1 -1
  196. package/dist/components/form/expressions/mockExpressions.js +2 -2
  197. package/dist/components/form/expressions/mockExpressions.js.map +1 -1
  198. package/dist/components/form/expressions/renderExpressionToText.d.ts.map +1 -1
  199. package/dist/components/form/expressions/renderExpressionToText.js +16 -1
  200. package/dist/components/form/expressions/renderExpressionToText.js.map +1 -1
  201. package/dist/components/form/expressions/types.d.ts +2 -2
  202. package/dist/components/form/expressions/useExpressionType.js +1 -1
  203. package/dist/components/form/expressions/useExpressionType.js.map +1 -1
  204. package/dist/components/form/fields/ChoiceGroupHeading.d.ts +22 -0
  205. package/dist/components/form/fields/ChoiceGroupHeading.d.ts.map +1 -0
  206. package/dist/components/form/fields/ChoiceGroupHeading.js +40 -0
  207. package/dist/components/form/fields/ChoiceGroupHeading.js.map +1 -0
  208. package/dist/components/form/fields/Field.d.ts +9 -2
  209. package/dist/components/form/fields/Field.d.ts.map +1 -1
  210. package/dist/components/form/fields/Field.js +20 -15
  211. package/dist/components/form/fields/Field.js.map +1 -1
  212. package/dist/components/form/fields/allowed-values/AllowedValues.d.ts +11 -1
  213. package/dist/components/form/fields/allowed-values/AllowedValues.d.ts.map +1 -1
  214. package/dist/components/form/fields/allowed-values/AllowedValues.js +42 -18
  215. package/dist/components/form/fields/allowed-values/AllowedValues.js.map +1 -1
  216. package/dist/components/form/fields/allowed-values/choicePicture.d.ts +3 -3
  217. package/dist/components/form/fields/allowed-values/choicePicture.js +3 -3
  218. package/dist/components/form/fields/allowed-values/savedValues.d.ts +30 -0
  219. package/dist/components/form/fields/allowed-values/savedValues.d.ts.map +1 -0
  220. package/dist/components/form/fields/allowed-values/savedValues.js +39 -0
  221. package/dist/components/form/fields/allowed-values/savedValues.js.map +1 -0
  222. package/dist/components/form/fields/array/ArrayAuto.d.ts.map +1 -1
  223. package/dist/components/form/fields/array/ArrayAuto.js +32 -15
  224. package/dist/components/form/fields/array/ArrayAuto.js.map +1 -1
  225. package/dist/components/form/fields/array/ArrayAutoField.d.ts.map +1 -1
  226. package/dist/components/form/fields/array/ArrayAutoField.js +22 -20
  227. package/dist/components/form/fields/array/ArrayAutoField.js.map +1 -1
  228. package/dist/components/form/fields/auto/AutoFormField.d.ts +12 -1
  229. package/dist/components/form/fields/auto/AutoFormField.d.ts.map +1 -1
  230. package/dist/components/form/fields/auto/AutoFormField.js +59 -29
  231. package/dist/components/form/fields/auto/AutoFormField.js.map +1 -1
  232. package/dist/components/form/fields/auto/hostEditorValue.d.ts +1 -1
  233. package/dist/components/form/fields/auto/hostEditorValue.js +1 -1
  234. package/dist/components/form/fields/binary/Binary.d.ts.map +1 -1
  235. package/dist/components/form/fields/binary/Binary.js +7 -2
  236. package/dist/components/form/fields/binary/Binary.js.map +1 -1
  237. package/dist/components/form/fields/boolean/Boolean.d.ts +8 -2
  238. package/dist/components/form/fields/boolean/Boolean.d.ts.map +1 -1
  239. package/dist/components/form/fields/boolean/Boolean.js +9 -3
  240. package/dist/components/form/fields/boolean/Boolean.js.map +1 -1
  241. package/dist/components/form/fields/codeFont.d.ts +12 -0
  242. package/dist/components/form/fields/codeFont.d.ts.map +1 -0
  243. package/dist/components/form/fields/codeFont.js +26 -0
  244. package/dist/components/form/fields/codeFont.js.map +1 -0
  245. package/dist/components/form/fields/color/Color.d.ts +1 -1
  246. package/dist/components/form/fields/color/Color.d.ts.map +1 -1
  247. package/dist/components/form/fields/color/Color.js +12 -10
  248. package/dist/components/form/fields/color/Color.js.map +1 -1
  249. package/dist/components/form/fields/date/Date.d.ts +7 -1
  250. package/dist/components/form/fields/date/Date.d.ts.map +1 -1
  251. package/dist/components/form/fields/date/Date.js +4 -2
  252. package/dist/components/form/fields/date/Date.js.map +1 -1
  253. package/dist/components/form/fields/emittedValues.d.ts +1 -1
  254. package/dist/components/form/fields/emittedValues.js +1 -1
  255. package/dist/components/form/fields/file/File.d.ts +1 -1
  256. package/dist/components/form/fields/file/File.d.ts.map +1 -1
  257. package/dist/components/form/fields/file/File.js +18 -6
  258. package/dist/components/form/fields/file/File.js.map +1 -1
  259. package/dist/components/form/fields/labels.d.ts +81 -0
  260. package/dist/components/form/fields/labels.d.ts.map +1 -0
  261. package/dist/components/form/fields/labels.js +52 -0
  262. package/dist/components/form/fields/labels.js.map +1 -0
  263. package/dist/components/form/fields/long-string/LongString.d.ts +7 -1
  264. package/dist/components/form/fields/long-string/LongString.d.ts.map +1 -1
  265. package/dist/components/form/fields/long-string/LongString.js +19 -9
  266. package/dist/components/form/fields/long-string/LongString.js.map +1 -1
  267. package/dist/components/form/fields/markdown/Markdown.d.ts.map +1 -1
  268. package/dist/components/form/fields/markdown/Markdown.js +3 -1
  269. package/dist/components/form/fields/markdown/Markdown.js.map +1 -1
  270. package/dist/components/form/fields/multi-select/MultiSelectFormField.js +1 -1
  271. package/dist/components/form/fields/multi-select/MultiSelectFormField.js.map +1 -1
  272. package/dist/components/form/fields/number/Number.d.ts +6 -3
  273. package/dist/components/form/fields/number/Number.d.ts.map +1 -1
  274. package/dist/components/form/fields/number/Number.js +24 -10
  275. package/dist/components/form/fields/number/Number.js.map +1 -1
  276. package/dist/components/form/fields/object/Object.d.ts +36 -1
  277. package/dist/components/form/fields/object/Object.d.ts.map +1 -1
  278. package/dist/components/form/fields/object/Object.js +145 -19
  279. package/dist/components/form/fields/object/Object.js.map +1 -1
  280. package/dist/components/form/fields/pendingEdit.d.ts +1 -1
  281. package/dist/components/form/fields/pendingEdit.js +1 -1
  282. package/dist/components/form/fields/radio-group/RadioGroup.d.ts.map +1 -1
  283. package/dist/components/form/fields/radio-group/RadioGroup.js +13 -7
  284. package/dist/components/form/fields/radio-group/RadioGroup.js.map +1 -1
  285. package/dist/components/form/fields/rich-text/RichText.d.ts +1 -1
  286. package/dist/components/form/fields/rich-text/RichText.d.ts.map +1 -1
  287. package/dist/components/form/fields/rich-text/RichText.js +15 -12
  288. package/dist/components/form/fields/rich-text/RichText.js.map +1 -1
  289. package/dist/components/form/fields/rich-text/useTemplateTags.d.ts +3 -1
  290. package/dist/components/form/fields/rich-text/useTemplateTags.d.ts.map +1 -1
  291. package/dist/components/form/fields/rich-text/useTemplateTags.js +9 -3
  292. package/dist/components/form/fields/rich-text/useTemplateTags.js.map +1 -1
  293. package/dist/components/form/fields/schema-definition/CatalogLeafForm.d.ts.map +1 -1
  294. package/dist/components/form/fields/schema-definition/CatalogLeafForm.js +11 -9
  295. package/dist/components/form/fields/schema-definition/CatalogLeafForm.js.map +1 -1
  296. package/dist/components/form/fields/schema-definition/CatalogNodeEditor.d.ts +1 -1
  297. package/dist/components/form/fields/schema-definition/CatalogNodeEditor.d.ts.map +1 -1
  298. package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js +42 -30
  299. package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js.map +1 -1
  300. package/dist/components/form/fields/schema-definition/Hint.d.ts +4 -3
  301. package/dist/components/form/fields/schema-definition/Hint.d.ts.map +1 -1
  302. package/dist/components/form/fields/schema-definition/Hint.js +10 -2
  303. package/dist/components/form/fields/schema-definition/Hint.js.map +1 -1
  304. package/dist/components/form/fields/schema-definition/InlineValidationBanner.d.ts.map +1 -1
  305. package/dist/components/form/fields/schema-definition/InlineValidationBanner.js +3 -1
  306. package/dist/components/form/fields/schema-definition/InlineValidationBanner.js.map +1 -1
  307. package/dist/components/form/fields/schema-definition/Loader.d.ts.map +1 -1
  308. package/dist/components/form/fields/schema-definition/Loader.js +4 -2
  309. package/dist/components/form/fields/schema-definition/Loader.js.map +1 -1
  310. package/dist/components/form/fields/schema-definition/MigrationsTab.d.ts.map +1 -1
  311. package/dist/components/form/fields/schema-definition/MigrationsTab.js +31 -26
  312. package/dist/components/form/fields/schema-definition/MigrationsTab.js.map +1 -1
  313. package/dist/components/form/fields/schema-definition/TableEditor.d.ts.map +1 -1
  314. package/dist/components/form/fields/schema-definition/TableEditor.js +3 -1
  315. package/dist/components/form/fields/schema-definition/TableEditor.js.map +1 -1
  316. package/dist/components/form/fields/schema-definition/TablesTab.d.ts.map +1 -1
  317. package/dist/components/form/fields/schema-definition/TablesTab.js +25 -23
  318. package/dist/components/form/fields/schema-definition/TablesTab.js.map +1 -1
  319. package/dist/components/form/fields/schema-definition/index.d.ts.map +1 -1
  320. package/dist/components/form/fields/schema-definition/index.js +21 -15
  321. package/dist/components/form/fields/schema-definition/index.js.map +1 -1
  322. package/dist/components/form/fields/schema-definition/labels.d.ts +123 -0
  323. package/dist/components/form/fields/schema-definition/labels.d.ts.map +1 -0
  324. package/dist/components/form/fields/schema-definition/labels.js +113 -0
  325. package/dist/components/form/fields/schema-definition/labels.js.map +1 -0
  326. package/dist/components/form/fields/schema-definition/mockCatalog.d.ts +1 -1
  327. package/dist/components/form/fields/schema-definition/referenceSuggestions.d.ts +1 -1
  328. package/dist/components/form/fields/schema-definition/types.d.ts +2 -2
  329. package/dist/components/form/fields/schema-definition/types.js +1 -1
  330. package/dist/components/form/fields/select/Select.d.ts +11 -5
  331. package/dist/components/form/fields/select/Select.d.ts.map +1 -1
  332. package/dist/components/form/fields/select/Select.js +18 -11
  333. package/dist/components/form/fields/select/Select.js.map +1 -1
  334. package/dist/components/form/fields/select/SelectCollection.d.ts +28 -3
  335. package/dist/components/form/fields/select/SelectCollection.d.ts.map +1 -1
  336. package/dist/components/form/fields/select/SelectCollection.js +40 -9
  337. package/dist/components/form/fields/select/SelectCollection.js.map +1 -1
  338. package/dist/components/form/fields/select/unavailableRow.d.ts +1 -1
  339. package/dist/components/form/fields/select/unavailableRow.js +1 -1
  340. package/dist/components/form/fields/template/ExampleValueModal.d.ts.map +1 -1
  341. package/dist/components/form/fields/template/ExampleValueModal.js +4 -1
  342. package/dist/components/form/fields/template/ExampleValueModal.js.map +1 -1
  343. package/dist/components/form/fields/template/TemplateBrowser.d.ts.map +1 -1
  344. package/dist/components/form/fields/template/TemplateBrowser.js +6 -4
  345. package/dist/components/form/fields/template/TemplateBrowser.js.map +1 -1
  346. package/dist/components/form/fields/template/TemplateField.d.ts +24 -5
  347. package/dist/components/form/fields/template/TemplateField.d.ts.map +1 -1
  348. package/dist/components/form/fields/template/TemplateField.js +117 -99
  349. package/dist/components/form/fields/template/TemplateField.js.map +1 -1
  350. package/dist/components/form/fields/template/TemplatePicker.d.ts +9 -3
  351. package/dist/components/form/fields/template/TemplatePicker.d.ts.map +1 -1
  352. package/dist/components/form/fields/template/TemplatePicker.js +62 -34
  353. package/dist/components/form/fields/template/TemplatePicker.js.map +1 -1
  354. package/dist/components/form/fields/template/referenceNames.d.ts +2 -2
  355. package/dist/components/form/fields/template/templatesListProps.d.ts +11 -0
  356. package/dist/components/form/fields/template/templatesListProps.d.ts.map +1 -0
  357. package/dist/components/form/fields/template/templatesListProps.js +37 -0
  358. package/dist/components/form/fields/template/templatesListProps.js.map +1 -0
  359. package/dist/components/form/fields/template/writtenAsText.d.ts +2 -2
  360. package/dist/components/form/fields/template/writtenAsText.js +2 -2
  361. package/dist/components/form/index.d.ts +2 -0
  362. package/dist/components/form/index.d.ts.map +1 -1
  363. package/dist/components/form/index.js +2 -0
  364. package/dist/components/form/index.js.map +1 -1
  365. package/dist/components/form/typeSentenceForm.js +1 -1
  366. package/dist/components/imageLightbox/ImageLightbox.d.ts.map +1 -1
  367. package/dist/components/imageLightbox/ImageLightbox.js +11 -7
  368. package/dist/components/imageLightbox/ImageLightbox.js.map +1 -1
  369. package/dist/components/log/Log.d.ts +1 -1
  370. package/dist/components/log/Log.d.ts.map +1 -1
  371. package/dist/components/log/Log.js +22 -19
  372. package/dist/components/log/Log.js.map +1 -1
  373. package/dist/components/log/labels.d.ts +25 -0
  374. package/dist/components/log/labels.d.ts.map +1 -0
  375. package/dist/components/log/labels.js +22 -0
  376. package/dist/components/log/labels.js.map +1 -0
  377. package/dist/components/menu/Menu.d.ts.map +1 -1
  378. package/dist/components/menu/Menu.js +3 -1
  379. package/dist/components/menu/Menu.js.map +1 -1
  380. package/dist/components/qonsoleSmartInput/useQonsoleSession.d.ts.map +1 -1
  381. package/dist/components/qonsoleSmartInput/useQonsoleSession.js +3 -2
  382. package/dist/components/qonsoleSmartInput/useQonsoleSession.js.map +1 -1
  383. package/dist/components/smartEditor/CompletionMenu.d.ts +1 -1
  384. package/dist/components/smartEditor/CompletionMenu.d.ts.map +1 -1
  385. package/dist/components/smartEditor/CompletionMenu.js +25 -19
  386. package/dist/components/smartEditor/CompletionMenu.js.map +1 -1
  387. package/dist/components/smartEditor/SmartEditor.d.ts.map +1 -1
  388. package/dist/components/smartEditor/SmartEditor.js +21 -23
  389. package/dist/components/smartEditor/SmartEditor.js.map +1 -1
  390. package/dist/components/smartEditor/caretBox.d.ts +1 -1
  391. package/dist/components/smartEditor/caretBox.js +1 -1
  392. package/dist/components/smartEditor/completionStyle.d.ts +21 -6
  393. package/dist/components/smartEditor/completionStyle.d.ts.map +1 -1
  394. package/dist/components/smartEditor/completionStyle.js +46 -23
  395. package/dist/components/smartEditor/completionStyle.js.map +1 -1
  396. package/dist/components/smartEditor/contextTitle.d.ts +2 -2
  397. package/dist/components/smartEditor/contextTitle.js +2 -2
  398. package/dist/components/smartEditor/editingAids.d.ts +2 -2
  399. package/dist/components/smartEditor/editingAids.js +2 -2
  400. package/dist/components/smartEditor/index.js +1 -1
  401. package/dist/components/smartEditor/index.js.map +1 -1
  402. package/dist/components/smartEditor/templateCompletions.d.ts +7 -7
  403. package/dist/components/smartEditor/templateCompletions.d.ts.map +1 -1
  404. package/dist/components/smartEditor/templateCompletions.js +14 -15
  405. package/dist/components/smartEditor/templateCompletions.js.map +1 -1
  406. package/dist/components/smartEditor/typedReferences.d.ts +1 -1
  407. package/dist/components/smartEditor/typedReferences.js +3 -3
  408. package/dist/components/smartEditor/typedReferences.js.map +1 -1
  409. package/dist/components/smartEditor/types.d.ts +8 -8
  410. package/dist/components/smartEditor/useEditingAids.js +1 -1
  411. package/dist/components/smartEditor/useEditingAids.js.map +1 -1
  412. package/dist/components/smartEditor/useLspAutocomplete.d.ts +9 -4
  413. package/dist/components/smartEditor/useLspAutocomplete.d.ts.map +1 -1
  414. package/dist/components/smartEditor/useLspAutocomplete.js +92 -38
  415. package/dist/components/smartEditor/useLspAutocomplete.js.map +1 -1
  416. package/dist/components/smartEditor/useLspHover.d.ts.map +1 -1
  417. package/dist/components/smartEditor/useLspHover.js +4 -5
  418. package/dist/components/smartEditor/useLspHover.js.map +1 -1
  419. package/dist/components/smartEditor/useTabCameIn.d.ts +1 -1
  420. package/dist/components/smartEditor/useTabCameIn.js +1 -1
  421. package/dist/components/supportTicket/AttachmentChips.d.ts.map +1 -1
  422. package/dist/components/supportTicket/AttachmentChips.js +5 -3
  423. package/dist/components/supportTicket/AttachmentChips.js.map +1 -1
  424. package/dist/components/supportTicket/InterfaceReferenceTags.d.ts +10 -3
  425. package/dist/components/supportTicket/InterfaceReferenceTags.d.ts.map +1 -1
  426. package/dist/components/supportTicket/InterfaceReferenceTags.js +9 -8
  427. package/dist/components/supportTicket/InterfaceReferenceTags.js.map +1 -1
  428. package/dist/components/supportTicket/ReferencePicker.d.ts +3 -2
  429. package/dist/components/supportTicket/ReferencePicker.d.ts.map +1 -1
  430. package/dist/components/supportTicket/ReferencePicker.js +36 -26
  431. package/dist/components/supportTicket/ReferencePicker.js.map +1 -1
  432. package/dist/components/supportTicket/TicketHeader.d.ts.map +1 -1
  433. package/dist/components/supportTicket/TicketHeader.js +6 -3
  434. package/dist/components/supportTicket/TicketHeader.js.map +1 -1
  435. package/dist/components/supportTicket/TicketMetaTags.d.ts +19 -12
  436. package/dist/components/supportTicket/TicketMetaTags.d.ts.map +1 -1
  437. package/dist/components/supportTicket/TicketMetaTags.js +57 -6
  438. package/dist/components/supportTicket/TicketMetaTags.js.map +1 -1
  439. package/dist/components/supportTicket/TicketReplyBox.d.ts +3 -2
  440. package/dist/components/supportTicket/TicketReplyBox.d.ts.map +1 -1
  441. package/dist/components/supportTicket/TicketReplyBox.js +41 -19
  442. package/dist/components/supportTicket/TicketReplyBox.js.map +1 -1
  443. package/dist/components/supportTicket/WorkspaceAccessStatus.d.ts +10 -2
  444. package/dist/components/supportTicket/WorkspaceAccessStatus.d.ts.map +1 -1
  445. package/dist/components/supportTicket/WorkspaceAccessStatus.js +45 -17
  446. package/dist/components/supportTicket/WorkspaceAccessStatus.js.map +1 -1
  447. package/dist/components/supportTicket/accessMeta.d.ts +6 -1
  448. package/dist/components/supportTicket/accessMeta.d.ts.map +1 -1
  449. package/dist/components/supportTicket/accessMeta.js +83 -65
  450. package/dist/components/supportTicket/accessMeta.js.map +1 -1
  451. package/dist/components/supportTicket/attachmentAccess.d.ts.map +1 -1
  452. package/dist/components/supportTicket/attachmentAccess.js +14 -26
  453. package/dist/components/supportTicket/attachmentAccess.js.map +1 -1
  454. package/dist/components/supportTicket/fileToAttachment.d.ts.map +1 -1
  455. package/dist/components/supportTicket/fileToAttachment.js +4 -1
  456. package/dist/components/supportTicket/fileToAttachment.js.map +1 -1
  457. package/dist/components/supportTicket/labels.d.ts +159 -0
  458. package/dist/components/supportTicket/labels.d.ts.map +1 -0
  459. package/dist/components/supportTicket/labels.js +216 -0
  460. package/dist/components/supportTicket/labels.js.map +1 -0
  461. package/dist/components/supportTicket/meta.d.ts +35 -6
  462. package/dist/components/supportTicket/meta.d.ts.map +1 -1
  463. package/dist/components/supportTicket/meta.js +100 -73
  464. package/dist/components/supportTicket/meta.js.map +1 -1
  465. package/dist/components/supportTicket/ticketAttentionInks.d.ts +23 -0
  466. package/dist/components/supportTicket/ticketAttentionInks.d.ts.map +1 -0
  467. package/dist/components/supportTicket/ticketAttentionInks.js +42 -0
  468. package/dist/components/supportTicket/ticketAttentionInks.js.map +1 -0
  469. package/dist/components/supportTicket/ticketModel.d.ts +6 -2
  470. package/dist/components/supportTicket/ticketModel.d.ts.map +1 -1
  471. package/dist/components/supportTicket/useLoadedImages.d.ts +10 -0
  472. package/dist/components/supportTicket/useLoadedImages.d.ts.map +1 -1
  473. package/dist/components/supportTicket/useLoadedImages.js +64 -1
  474. package/dist/components/supportTicket/useLoadedImages.js.map +1 -1
  475. package/dist/components/ticketReferences/TicketReferences.d.ts.map +1 -1
  476. package/dist/components/ticketReferences/TicketReferences.js +57 -46
  477. package/dist/components/ticketReferences/TicketReferences.js.map +1 -1
  478. package/dist/components/ticketThread/TicketThread.d.ts +22 -2
  479. package/dist/components/ticketThread/TicketThread.d.ts.map +1 -1
  480. package/dist/components/ticketThread/TicketThread.js +61 -39
  481. package/dist/components/ticketThread/TicketThread.js.map +1 -1
  482. package/dist/components/ticketThread/index.d.ts +1 -1
  483. package/dist/components/ticketThread/index.d.ts.map +1 -1
  484. package/dist/components/ticketThread/index.js +2 -1
  485. package/dist/components/ticketThread/index.js.map +1 -1
  486. package/dist/helpers/allowedValues.d.ts +1 -1
  487. package/dist/helpers/allowedValues.d.ts.map +1 -1
  488. package/dist/helpers/allowedValues.js +12 -5
  489. package/dist/helpers/allowedValues.js.map +1 -1
  490. package/dist/helpers/common.d.ts +4 -0
  491. package/dist/helpers/common.d.ts.map +1 -1
  492. package/dist/helpers/common.js +11 -7
  493. package/dist/helpers/common.js.map +1 -1
  494. package/dist/helpers/domProps.js +1 -1
  495. package/dist/helpers/expressions.d.ts +7 -7
  496. package/dist/helpers/expressions.d.ts.map +1 -1
  497. package/dist/helpers/expressions.js +15 -20
  498. package/dist/helpers/expressions.js.map +1 -1
  499. package/dist/helpers/fieldDescription.d.ts +16 -0
  500. package/dist/helpers/fieldDescription.d.ts.map +1 -0
  501. package/dist/helpers/fieldDescription.js +40 -0
  502. package/dist/helpers/fieldDescription.js.map +1 -0
  503. package/dist/helpers/hoveringPointer.d.ts +1 -1
  504. package/dist/helpers/hoveringPointer.js +1 -1
  505. package/dist/helpers/markdownText.d.ts +9 -0
  506. package/dist/helpers/markdownText.d.ts.map +1 -1
  507. package/dist/helpers/markdownText.js +50 -3
  508. package/dist/helpers/markdownText.js.map +1 -1
  509. package/dist/helpers/noDescription.d.ts +9 -5
  510. package/dist/helpers/noDescription.d.ts.map +1 -1
  511. package/dist/helpers/noDescription.js +18 -7
  512. package/dist/helpers/noDescription.js.map +1 -1
  513. package/dist/helpers/optionUiTypes.d.ts +3 -3
  514. package/dist/helpers/options.d.ts +2 -2
  515. package/dist/helpers/options.d.ts.map +1 -1
  516. package/dist/helpers/options.js +11 -8
  517. package/dist/helpers/options.js.map +1 -1
  518. package/dist/helpers/qorusTypeCatalogue.d.ts +9 -9
  519. package/dist/helpers/qorusTypeCatalogue.js +11 -11
  520. package/dist/helpers/qorusTypeCatalogue.js.map +1 -1
  521. package/dist/helpers/readableColors.d.ts +9 -1
  522. package/dist/helpers/readableColors.d.ts.map +1 -1
  523. package/dist/helpers/readableColors.js +13 -2
  524. package/dist/helpers/readableColors.js.map +1 -1
  525. package/dist/helpers/recordFieldReference.js +1 -1
  526. package/dist/helpers/recordFieldReference.js.map +1 -1
  527. package/dist/helpers/reqraftLabels.d.ts +129 -7
  528. package/dist/helpers/reqraftLabels.d.ts.map +1 -1
  529. package/dist/helpers/reqraftLabels.js +101 -21
  530. package/dist/helpers/reqraftLabels.js.map +1 -1
  531. package/dist/helpers/sentenceCase.d.ts +9 -0
  532. package/dist/helpers/sentenceCase.d.ts.map +1 -0
  533. package/dist/helpers/sentenceCase.js +22 -0
  534. package/dist/helpers/sentenceCase.js.map +1 -0
  535. package/dist/helpers/singleLineString.d.ts.map +1 -1
  536. package/dist/helpers/singleLineString.js +1 -0
  537. package/dist/helpers/singleLineString.js.map +1 -1
  538. package/dist/helpers/templateCatalogue.d.ts +2 -2
  539. package/dist/helpers/templateCatalogue.js +3 -3
  540. package/dist/helpers/templateCatalogueContext.d.ts +1 -1
  541. package/dist/helpers/templateCatalogueContext.js +1 -1
  542. package/dist/helpers/templateItems.d.ts +15 -1
  543. package/dist/helpers/templateItems.d.ts.map +1 -1
  544. package/dist/helpers/templateItems.js +59 -2
  545. package/dist/helpers/templateItems.js.map +1 -1
  546. package/dist/helpers/templateListLabels.d.ts +9 -0
  547. package/dist/helpers/templateListLabels.d.ts.map +1 -1
  548. package/dist/helpers/templateListLabels.js +10 -0
  549. package/dist/helpers/templateListLabels.js.map +1 -1
  550. package/dist/helpers/templateTree.d.ts +9 -9
  551. package/dist/helpers/templateTree.js +14 -14
  552. package/dist/helpers/templateType.d.ts +1 -1
  553. package/dist/helpers/templateType.js +1 -1
  554. package/dist/helpers/templates.d.ts +53 -9
  555. package/dist/helpers/templates.d.ts.map +1 -1
  556. package/dist/helpers/templates.js +165 -44
  557. package/dist/helpers/templates.js.map +1 -1
  558. package/dist/helpers/validationLabels.d.ts +193 -0
  559. package/dist/helpers/validationLabels.d.ts.map +1 -0
  560. package/dist/helpers/validationLabels.js +213 -0
  561. package/dist/helpers/validationLabels.js.map +1 -0
  562. package/dist/helpers/validations.d.ts +16 -4
  563. package/dist/helpers/validations.d.ts.map +1 -1
  564. package/dist/helpers/validations.js +211 -209
  565. package/dist/helpers/validations.js.map +1 -1
  566. package/dist/helpers/webLink.d.ts +2 -2
  567. package/dist/helpers/webLink.js +2 -2
  568. package/dist/hooks/useDestructiveButtonProps.d.ts +22 -0
  569. package/dist/hooks/useDestructiveButtonProps.d.ts.map +1 -0
  570. package/dist/hooks/useDestructiveButtonProps.js +46 -0
  571. package/dist/hooks/useDestructiveButtonProps.js.map +1 -0
  572. package/dist/hooks/useEqualValue.d.ts +14 -0
  573. package/dist/hooks/useEqualValue.d.ts.map +1 -0
  574. package/dist/hooks/useEqualValue.js +27 -0
  575. package/dist/hooks/useEqualValue.js.map +1 -0
  576. package/dist/hooks/useFetch/useFetch.js +1 -1
  577. package/dist/hooks/useReadableIntentShade.d.ts +1 -1
  578. package/dist/hooks/useReadableIntentShade.js +1 -1
  579. package/dist/hooks/useReadableOpacity.d.ts +1 -1
  580. package/dist/hooks/useReadableOpacity.js +1 -1
  581. package/dist/hooks/useTemplates.d.ts +0 -7
  582. package/dist/hooks/useTemplates.d.ts.map +1 -1
  583. package/dist/hooks/useTemplates.js +25 -12
  584. package/dist/hooks/useTemplates.js.map +1 -1
  585. package/dist/hooks/useWebSocket/useWebSocket.d.ts.map +1 -1
  586. package/dist/hooks/useWebSocket/useWebSocket.js +6 -5
  587. package/dist/hooks/useWebSocket/useWebSocket.js.map +1 -1
  588. package/dist/index.d.ts +4 -0
  589. package/dist/index.d.ts.map +1 -1
  590. package/dist/index.js +20 -3
  591. package/dist/index.js.map +1 -1
  592. package/dist/providers/StorageProvider.d.ts +1 -1
  593. package/dist/providers/StorageProvider.js +1 -1
  594. package/dist/stores/currentUser/currentUser.d.ts +5 -5
  595. package/dist/stores/currentUser/currentUser.d.ts.map +1 -1
  596. package/dist/tracking/ui/ExperimentCard.d.ts +3 -3
  597. package/dist/tracking/ui/ExperimentCard.d.ts.map +1 -1
  598. package/dist/tracking/ui/ExperimentCard.js +34 -46
  599. package/dist/tracking/ui/ExperimentCard.js.map +1 -1
  600. package/dist/tracking/ui/ExperimentsOverlay.d.ts +3 -3
  601. package/dist/tracking/ui/ExperimentsOverlay.d.ts.map +1 -1
  602. package/dist/tracking/ui/ExperimentsOverlay.js +8 -6
  603. package/dist/tracking/ui/ExperimentsOverlay.js.map +1 -1
  604. package/dist/tracking/ui/card.d.ts +9 -13
  605. package/dist/tracking/ui/card.d.ts.map +1 -1
  606. package/dist/tracking/ui/card.js +96 -107
  607. package/dist/tracking/ui/card.js.map +1 -1
  608. package/dist/tracking/ui/client.d.ts +0 -6
  609. package/dist/tracking/ui/client.d.ts.map +1 -1
  610. package/dist/tracking/ui/client.js +9 -2
  611. package/dist/tracking/ui/client.js.map +1 -1
  612. package/dist/tracking/ui/labels.d.ts +198 -0
  613. package/dist/tracking/ui/labels.d.ts.map +1 -0
  614. package/dist/tracking/ui/labels.js +171 -0
  615. package/dist/tracking/ui/labels.js.map +1 -0
  616. package/dist/tracking/ui/readable.js +1 -1
  617. package/dist/utils/fetch.d.ts +1 -1
  618. package/dist/utils/fetch.js +1 -1
  619. package/package.json +2 -1
@@ -112,6 +112,7 @@ var typeChoices_1 = require("./typeChoices");
112
112
  var optionActions_1 = require("./optionActions");
113
113
  var rendererTypes_1 = require("./rendererTypes");
114
114
  var revealRow_1 = require("./revealRow");
115
+ var rowFocus_1 = require("./rowFocus");
115
116
  var emittedValues_1 = require("../fields/emittedValues");
116
117
  var lodash_1 = require("lodash");
117
118
  var map_1 = __importDefault(require("lodash/map"));
@@ -120,17 +121,21 @@ var size_1 = __importDefault(require("lodash/size"));
120
121
  var react_2 = __importStar(require("react"));
121
122
  var react_use_1 = require("react-use");
122
123
  var styled_components_1 = __importStar(require("styled-components"));
124
+ var fieldDescription_1 = require("../../../helpers/fieldDescription");
123
125
  var common_1 = require("../../../helpers/common");
124
126
  var options_1 = require("../../../helpers/options");
125
127
  var validations_1 = require("../../../helpers/validations");
126
128
  var useCoarsePointer_1 = require("../../../hooks/useCoarsePointer");
127
129
  var useQorusTypes_1 = require("../../../hooks/useQorusTypes");
128
130
  var useTemplates_1 = require("../../../hooks/useTemplates");
131
+ var useEqualValue_1 = require("../../../hooks/useEqualValue");
129
132
  var fetch_1 = require("../../../utils/fetch");
130
133
  var queryUnlessCancelled_1 = require("../../../utils/queryUnlessCancelled");
131
134
  var Description_1 = require("../../Description");
132
135
  var FocusedEditing_1 = require("../../FocusedEditing");
133
136
  var Select_1 = require("../fields/select/Select");
137
+ var FieldMessageDetails_1 = require("./FieldMessageDetails");
138
+ var ReadReveal_1 = require("./ReadReveal");
134
139
  var TemplateField_1 = require("../fields/template/TemplateField");
135
140
  var CompactRow_1 = require("./CompactRow");
136
141
  var FormFieldsSkeleton_1 = require("./FormFieldsSkeleton");
@@ -138,19 +143,40 @@ var compactRowContext_1 = require("./compactRowContext");
138
143
  var compactRowStyles_1 = require("./compactRowStyles");
139
144
  var CompactToolbar_1 = require("./CompactToolbar");
140
145
  var compactToolbarContext_1 = require("./compactToolbarContext");
146
+ var DefaultsNote_1 = require("./DefaultsNote");
141
147
  var HiddenFieldsNote_1 = require("./HiddenFieldsNote");
142
148
  var OptionFieldMessages_1 = require("./OptionFieldMessages");
143
149
  var optionsContext_1 = require("./optionsContext");
144
150
  var markdownRendererContext_1 = require("../../Description/markdownRendererContext");
145
151
  var OptionsHelpDialog_1 = require("./OptionsHelpDialog");
152
+ var formAppearance_1 = require("./formAppearance");
146
153
  var typeSentenceForm_1 = require("../typeSentenceForm");
147
154
  var referenceNames_1 = require("../fields/template/referenceNames");
148
155
  var qorusTypeCatalogue_1 = require("../../../helpers/qorusTypeCatalogue");
149
156
  var allowedValues_1 = require("../../../helpers/allowedValues");
150
- var rowFocus_1 = require("./rowFocus");
157
+ var rowFocus_2 = require("./rowFocus");
151
158
  var optionUiTypes_1 = require("../../../helpers/optionUiTypes");
152
159
  var readFirst_1 = require("./readFirst");
160
+ var rowPlaces_1 = require("./rowPlaces");
153
161
  /** One shared "nothing came down from above" bag. See `inheritedScopeFor`. */
162
+ /**
163
+ * Which field holds each absorbed one: `{ language: 'source' }` where `source` declares `absorb_fields:
164
+ * ['language']`. Only a sibling that exists and is not spoken for already; a schema naming a missing field must not make
165
+ * a field disappear. The rows and the default line's "Change" read the same map, so a field with no row of its own is
166
+ * changed in the row that holds it.
167
+ */
168
+ var getAbsorbingHosts = function (options) {
169
+ var absorbedBy = {};
170
+ (0, lodash_1.forEach)(options, function (option, optionName) {
171
+ var _a;
172
+ (_a = option === null || option === void 0 ? void 0 : option.absorb_fields) === null || _a === void 0 ? void 0 : _a.forEach(function (absorbedName) {
173
+ if ((options === null || options === void 0 ? void 0 : options[absorbedName]) && !absorbedBy[absorbedName]) {
174
+ absorbedBy[absorbedName] = optionName;
175
+ }
176
+ });
177
+ });
178
+ return absorbedBy;
179
+ };
154
180
  var NO_INHERITED_SCOPE = Object.freeze({});
155
181
  /**
156
182
  * The inheritance bag ONE field forwards to any `arg_schema` sub-form it hosts:
@@ -451,8 +477,8 @@ var normalizeEmptyFieldValues = function (fields) {
451
477
  * - the form took it for the host's own change and went back to it, losing what had been typed since, and
452
478
  * the two chased each other's reports on every echo;
453
479
  * - an edit back to a value reported before (A, then B, then A again), made as the echo of B arrived, was
454
- * held back as made before the host's change, and the field went back to B (qorus#646: a template
455
- * field's text, deleted back to its reference, kept the text in the IDE).
480
+ * held back as made before the host's change, and the field went back to B (a template field's text,
481
+ * deleted back to its reference, kept the text in the IDE).
456
482
  *
457
483
  * For recognising a value only. Whether a rebuild adds anything is still read with the empty fields in
458
484
  * (`isMirrorOfValue`): a new schema's empty required field is a row the form has to add.
@@ -527,7 +553,7 @@ var isTypedField = function (field) {
527
553
  * `reportedValues`, `mergeOwnEdits`), so a change the host made to a field's type alone said nothing: the form
528
554
  * kept its own type. The Qorus IDE makes an added field's whole number true or false, holding the same field
529
555
  * `pos`; the form kept the `int` and drew `pos` as text on the Value tab, where a true or false field shows it on
530
- * its Expression tab (qorus#646).
556
+ * its Expression tab.
531
557
  *
532
558
  * Every key but `value` is compared, not a list of the ones known today: whatever a host writes into a field
533
559
  * 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
@@ -582,7 +608,7 @@ exports.takeHostsAttributes = takeHostsAttributes;
582
608
  * A field the form changed and the host did not keeps the form's value; every other field takes the host's,
583
609
  * a field both changed included. The host and the form can change the value in the same commit - a host
584
610
  * renaming something as the user's edit reaches the form - and taking either side whole lost the other's
585
- * change; sending the form's copy over the host's change made the two trade places forever (qorus#646).
611
+ * change; sending the form's copy over the host's change made the two trade places forever.
586
612
  *
587
613
  * Returns `theirs` itself when the form has nothing of its own to keep.
588
614
  */
@@ -667,33 +693,47 @@ exports.getTypeAndCanBeNull = getTypeAndCanBeNull;
667
693
  var STRECHABLE_TYPES = new Set(['tool-catalog']);
668
694
  /** How faded reqore draws a panel's title icon. */
669
695
  var PANEL_TITLE_ICON_ALPHA = 0.7;
696
+ /** No rows: one array, so a form with none hands its rows the same one every render. */
697
+ var NO_OPTION_NAMES = [];
670
698
  var FormEngineImpl = function (_a) {
671
699
  var _b, _c, _d, _f, _g;
672
700
  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
673
701
  isValid = _a.isValid, // eslint-disable-line @typescript-eslint/no-unused-vars
674
702
  url = _a.url, customUrl = _a.customUrl, operatorsUrl = _a.operatorsUrl, onOptionsLoaded = _a.onOptionsLoaded, recordRequiresSearchOptions = _a.recordRequiresSearchOptions, readOnly = _a.readOnly, onReadOnlyActivate = _a.onReadOnlyActivate, _h = _a.allowTemplates, allowTemplates = _h === void 0 ? true : _h, interfaceContext = _a.interfaceContext, templateFieldProps = _a.templateFieldProps, forceDropdown = _a.forceDropdown, _j = _a.showTypeToggle, showTypeToggle = _j === void 0 ? true : _j, compact = _a.compact,
703
+ // Read through the context `FormEngine` provides (resolved there against an
704
+ // inherited appearance); destructured only to keep it out of `rest`.
705
+ _appearance = _a.appearance, // eslint-disable-line @typescript-eslint/no-unused-vars
675
706
  // Destructured only to keep it out of `rest` (and so off the DOM). The gutter
676
707
  // this prop documents was never implemented: it was passed to the wrap as
677
708
  // `$flush`, whose styled template had no interpolation slot, so it has always
678
709
  // been a no-op. Removing it from the API is a separate, breaking change —
679
710
  // every consumer passing it today already gets the flush layout by default.
680
711
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
681
- _k = _a.compactFlush,
712
+ _k = _a.compactFlush, // eslint-disable-line @typescript-eslint/no-unused-vars
682
713
  // Destructured only to keep it out of `rest` (and so off the DOM). The gutter
683
714
  // this prop documents was never implemented: it was passed to the wrap as
684
715
  // `$flush`, whose styled template had no interpolation slot, so it has always
685
716
  // been a no-op. Removing it from the API is a separate, breaking change —
686
717
  // every consumer passing it today already gets the flush layout by default.
687
718
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
688
- 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,
719
+ 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.revealRequired, revealRequired = _o === void 0 ? false : _o, focusAttentionRequest = _a.focusAttentionRequest, onAttentionChange = _a.onAttentionChange, outsideAttention = _a.outsideAttention, _p = _a.compactStickyBoxHeaders, compactStickyBoxHeaders = _p === void 0 ? true : _p, _q = _a.compactStickyCardHeaders, compactStickyCardHeaders = _q === void 0 ? true : _q, _r = _a.compactStickyOffset, compactStickyOffset = _r === void 0 ? 0 : _r, _s = _a.compactToolbar, compactToolbar = _s === void 0 ? true : _s, _t = _a.commitMode, commitMode = _t === void 0 ? 'immediate' : _t, _u = _a.expandMode, expandMode = _u === void 0 ? 'single' : _u, onCommit = _a.onCommit, operatorsProp = _a.operators, groups = _a.groups, optionsLoader = _a.optionsLoader, onValidityChange = _a.onValidityChange, optionActionsProp = _a.optionActions, _v = _a.optionActionsCollapse, optionActionsCollapse = _v === void 0 ? 'auto' : _v, componentOverridesProp = _a.componentOverrides, codePreviewRenderer = _a.codePreviewRenderer, readSummariesProp = _a.readSummaries, cardEditorTypesProp = _a.cardEditorTypes,
689
720
  // consumed by the wrapper below, which publishes it to every description this
690
721
  // form draws; destructured here only so it cannot reach `rest` and be spread
691
722
  // onto a DOM node
692
723
  _markdownRenderer = _a.markdownRenderer, // eslint-disable-line @typescript-eslint/no-unused-vars
693
- rendererOnlyUiTypes = _a.rendererOnlyUiTypes, templateAwareUiTypes = _a.templateAwareUiTypes, anyLikeUiTypes = _a.anyLikeUiTypes, inheritedFromParent = _a.inheritedFromParent, autoFocusFirstRequired = _a.autoFocusFirstRequired, expandFirstRequired = _a.expandFirstRequired, initialExpandedOptions = _a.initialExpandedOptions, expandOptionsRequest = _a.expandOptionsRequest, valueKey = _a.valueKey, maxFieldsShown = _a.maxFieldsShown,
724
+ rendererOnlyUiTypes = _a.rendererOnlyUiTypes, templateAwareUiTypes = _a.templateAwareUiTypes, anyLikeUiTypes = _a.anyLikeUiTypes, inheritedFromParent = _a.inheritedFromParent, autoFocusFirstRequired = _a.autoFocusFirstRequired, expandFirstRequired = _a.expandFirstRequired, initialExpandedOptions = _a.initialExpandedOptions, expandOptionsRequest = _a.expandOptionsRequest, alwaysExpandedOptionsProp = _a.alwaysExpandedOptions, valueKey = _a.valueKey, maxFieldsShown = _a.maxFieldsShown,
694
725
  // The form's own props, read here and never handed on to the collection drawn below (`{...rest}`).
695
- 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", "expandOptionsRequest", "valueKey", "maxFieldsShown", "options", "stringTemplates", "skeletonReason"]);
726
+ 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", "appearance", "compactFlush", "compactNested", "compactScroll", "compactPanelProps", "compactCollapsedGroups", "compactBoxLabels", "revealRequired", "focusAttentionRequest", "onAttentionChange", "outsideAttention", "compactStickyBoxHeaders", "compactStickyCardHeaders", "compactStickyOffset", "compactToolbar", "commitMode", "expandMode", "onCommit", "operators", "groups", "optionsLoader", "onValidityChange", "optionActions", "optionActionsCollapse", "componentOverrides", "codePreviewRenderer", "readSummaries", "cardEditorTypes", "markdownRenderer", "rendererOnlyUiTypes", "templateAwareUiTypes", "anyLikeUiTypes", "inheritedFromParent", "autoFocusFirstRequired", "expandFirstRequired", "initialExpandedOptions", "expandOptionsRequest", "alwaysExpandedOptions", "valueKey", "maxFieldsShown", "options", "stringTemplates", "skeletonReason"]);
696
727
  var feWords = (0, reqraftLabels_1.useReqraftLabels)().formEngine;
728
+ /* A host's lists and maps, as the same reference while they say the same thing: a host that writes them as
729
+ literals in its render handed a new one every time, and the rows' context was rebuilt with each (useEqualValue). */
730
+ var optionActions = (0, useEqualValue_1.useEqualValue)(optionActionsProp);
731
+ var componentOverrides = (0, useEqualValue_1.useEqualValue)(componentOverridesProp);
732
+ var readSummaries = (0, useEqualValue_1.useEqualValue)(readSummariesProp);
733
+ var cardEditorTypes = (0, useEqualValue_1.useEqualValue)(cardEditorTypesProp);
734
+ var alwaysExpandedOptionsList = (0, useEqualValue_1.useEqualValue)(alwaysExpandedOptionsProp);
735
+ /** The rows that stay open (`alwaysExpandedOptions`), in a compact form. */
736
+ var alwaysExpandedOptions = (compact && alwaysExpandedOptionsList) || NO_OPTION_NAMES;
697
737
  // Built-ins + whatever the consumer declared for its own injected editors.
698
738
  var isRendererOnly = (0, react_2.useMemo)(function () { return (0, rendererTypes_1.createRendererOnlyUiTypeCheck)(rendererOnlyUiTypes); }, [JSON.stringify(rendererOnlyUiTypes)]);
699
739
  // Pointer CAPABILITY and viewport WIDTH are different questions and both
@@ -718,14 +758,14 @@ var FormEngineImpl = function (_a) {
718
758
  enters the component, so the header, the chips, the messages, the meter and
719
759
  the read-first summary cannot disagree about it: every one of them reads
720
760
  `options`, and none of them has to know the rule. */
721
- var _u = (0, react_2.useState)(optionsSchema || undefined), servedOptions = _u[0], setOptions = _u[1];
761
+ var _w = (0, react_2.useState)(optionsSchema || undefined), servedOptions = _w[0], setOptions = _w[1];
722
762
  var options = (0, react_2.useMemo)(function () { return (0, options_1.resolveDegenerateRequiredGroups)(servedOptions); }, [servedOptions]);
723
763
  /* Whether the schema the form holds is the one in force: its host is not waiting behind the skeleton, and a
724
764
  schema the host hands down has been taken in (`servedOptions` follows the `options` prop a render later).
725
765
  Until then the value is neither pruned against the schema nor emitted. A host loading the schema hands an
726
766
  empty or an earlier one meanwhile; read against that, every stored field was "not on this instance" and
727
767
  was removed, so a Qog state opened before its options had loaded showed them empty and, once emitted,
728
- lost them (qorus#646). */
768
+ lost them. */
729
769
  var hostSchemaPending = !optionsLoader &&
730
770
  !url &&
731
771
  !customUrl &&
@@ -733,31 +773,61 @@ var FormEngineImpl = function (_a) {
733
773
  JSON.stringify(optionsSchema || undefined) !== JSON.stringify(servedOptions);
734
774
  var schemaInForce = !rest.skeleton && !hostSchemaPending;
735
775
  // optionsLoader lifecycle: loading feeds the skeleton gate, error the banner.
736
- var _v = (0, react_2.useState)(!!optionsLoader && !optionsSchema), optionsLoading = _v[0], setOptionsLoading = _v[1];
737
- var _w = (0, react_2.useState)(), optionsError = _w[0], setOptionsError = _w[1];
776
+ var _x = (0, react_2.useState)(!!optionsLoader && !optionsSchema), optionsLoading = _x[0], setOptionsLoading = _x[1];
777
+ var _y = (0, react_2.useState)(), optionsError = _y[0], setOptionsError = _y[1];
738
778
  // Operators: prop-provided (compact) or fetched via operatorsUrl (dpql,
739
779
  // ported from IDE Options) — the fetch overrides the seeded prop value.
740
- var _x = (0, react_2.useState)(operatorsProp), operators = _x[0], setOperators = _x[1];
780
+ var _z = (0, react_2.useState)(operatorsProp), operators = _z[0], setOperators = _z[1];
741
781
  // Remote-fetch loading (ported from IDE Options); only relevant when one of
742
782
  // the fetch urls is set — schema-as-props consumers never see the skeleton.
743
- var _y = (0, react_2.useState)(!!(url || customUrl || operatorsUrl)), loading = _y[0], setLoading = _y[1];
783
+ var _0 = (0, react_2.useState)(!!(url || customUrl || operatorsUrl)), loading = _0[0], setLoading = _0[1];
744
784
  var confirmAction = (0, reqore_1.useReqoreProperty)('confirmAction');
745
785
  var theme = (0, reqore_1.useReqoreTheme)();
746
- var _z = (0, react_2.useState)(), focusedEditing = _z[0], setFocusedEditing = _z[1];
747
- var _0 = (0, react_2.useState)(false), showFieldTypes = _0[0], setShowFieldTypes = _0[1];
786
+ var calm = (0, formAppearance_1.useIsCalmForm)();
787
+ var _1 = (0, react_2.useState)(), focusedEditing = _1[0], setFocusedEditing = _1[1];
788
+ var _2 = (0, react_2.useState)(false), showFieldTypes = _2[0], setShowFieldTypes = _2[1];
748
789
  // Global toggle (toolbar ⓘ): reveal the short-description info panel on every
749
790
  // field that has a short_desc. Per-row ⓘ overrides still win over it.
750
791
  // Global field-info visibility, tri-state: `undefined` = default (critical
751
792
  // messages auto-open, the rest closed); `true` = show all; `false` = hide all
752
793
  // (even message fields). The toolbar ⓘ drives it.
753
- var _1 = (0, react_2.useState)(undefined), showAllDescriptions = _1[0], setShowAllDescriptions = _1[1];
754
- var _2 = (0, react_2.useState)(), showHelpForOption = _2[0], setShowHelpForOption = _2[1];
755
- var _3 = (0, react_2.useState)(false), showInvalidOptionsOnly = _3[0], setShowInvalidOptionsOnly = _3[1];
794
+ var _3 = (0, react_2.useState)(undefined), showAllDescriptions = _3[0], setShowAllDescriptions = _3[1];
795
+ var _4 = (0, react_2.useState)(), showHelpForOption = _4[0], setShowHelpForOption = _4[1];
796
+ var _5 = (0, react_2.useState)(false), showInvalidOptionsOnly = _5[0], setShowInvalidOptionsOnly = _5[1];
756
797
  // Which options are expanded into their editor (several can be open at once).
757
- var _4 = (0, react_2.useState)([]), expandedOptions = _4[0], setExpandedOptions = _4[1];
798
+ var _6 = (0, react_2.useState)([]), expandedOptions = _6[0], setExpandedOptionsState = _6[1];
799
+ /** The rows that stay open, read by every change to the open rows. */
800
+ var alwaysExpandedRef = (0, react_2.useRef)(alwaysExpandedOptions);
801
+ alwaysExpandedRef.current = alwaysExpandedOptions;
802
+ /** Every change to the open rows goes through here: a row that stays open, once open, is never closed by one. */
803
+ var setExpandedOptions = (0, react_2.useCallback)(function (update) {
804
+ setExpandedOptionsState(function (prev) {
805
+ var next = typeof update === 'function' ? update(prev) : update;
806
+ var kept = alwaysExpandedRef.current.filter(function (name) { return prev.includes(name) && !next.includes(name); });
807
+ return kept.length ? __spreadArray(__spreadArray([], next, true), kept, true) : next;
808
+ });
809
+ }, []);
810
+ // The fields the person has opened and left. An empty required field becomes a
811
+ // fault only then (or after a submit attempt, `revealRequired`): a form nobody has
812
+ // touched is not already wrong.
813
+ var _7 = (0, react_2.useState)([]), visitedOptions = _7[0], setVisitedOptions = _7[1];
814
+ /* The fields the person chose to change from their default ("Uses Qore · Change"): ordinary rows from then on
815
+ (`DefaultsNote`). */
816
+ var _8 = (0, react_2.useState)([]), changedDefaults = _8[0], setChangedDefaults = _8[1];
817
+ var lastExpandedOptions = (0, react_2.useRef)([]);
818
+ (0, react_2.useEffect)(function () {
819
+ var left = lastExpandedOptions.current.filter(function (name) { return !expandedOptions.includes(name); });
820
+ lastExpandedOptions.current = expandedOptions;
821
+ if (left.length) {
822
+ setVisitedOptions(function (prev) {
823
+ var added = left.filter(function (name) { return !prev.includes(name); });
824
+ return added.length ? __spreadArray(__spreadArray([], prev, true), added, true) : prev;
825
+ });
826
+ }
827
+ }, [expandedOptions]);
758
828
  /** Status boxes whose "N more fields" control the reader has opened. Keyed by
759
829
  box so opening Optional does not also unfold Set. */
760
- var _5 = (0, react_2.useState)([]), expandedMoreBoxes = _5[0], setExpandedMoreBoxes = _5[1];
830
+ var _9 = (0, react_2.useState)([]), expandedMoreBoxes = _9[0], setExpandedMoreBoxes = _9[1];
761
831
  // --- Reveal a status box's content when it is opened ----------------------
762
832
  //
763
833
  // The status boxes stack, so the last one ("Optional", which holds every
@@ -773,7 +843,7 @@ var FormEngineImpl = function (_a) {
773
843
  // box has not grown and there is nothing to scroll to. A layout effect runs
774
844
  // after the DOM is updated and before paint, which makes the reveal
775
845
  // deterministic instead of a guessed delay.
776
- var _6 = (0, react_2.useState)(undefined), openedStatusBox = _6[0], setOpenedStatusBox = _6[1];
846
+ var _10 = (0, react_2.useState)(undefined), openedStatusBox = _10[0], setOpenedStatusBox = _10[1];
777
847
  var statusBoxRefs = (0, react_2.useRef)({});
778
848
  (0, react_2.useLayoutEffect)(function () {
779
849
  var _a, _b;
@@ -802,15 +872,19 @@ var FormEngineImpl = function (_a) {
802
872
  // stays put when its status flips (e.g. becomes valid) instead of jumping to
803
873
  // another box mid-edit and stealing focus. Keyed by option name.
804
874
  var settledBucket = (0, react_2.useRef)({});
875
+ // Each row's own node, drawn into once and moved between the boxes (`rowPlaces`)
876
+ var rowHosts = (0, rowPlaces_1.useRowHosts)();
877
+ // Which boxes are open, so a collapsed box's rows are not drawn (`rowPlaces`)
878
+ var openBoxes = (0, rowPlaces_1.useOpenBoxes)();
805
879
  // Measured form width (not viewport — the form lives in drawers/panels of
806
880
  // arbitrary width) drives the stacked narrow layout.
807
- var _7 = (0, react_use_1.useMeasure)(), compactWrapRef = _7[0], compactWrapWidth = _7[1].width;
881
+ var _11 = (0, react_use_1.useMeasure)(), compactWrapRef = _11[0], compactWrapWidth = _11[1].width;
808
882
  // Own handle on the scroll wrap (useMeasure's ref is a callback, no `.current`)
809
883
  // so the label-column measurement can publish its CSS var on the element. It's
810
884
  // STATE, not a ref: the wrap mounts only after the loading-skeleton gate
811
885
  // resolves, so the measurement effect must re-run when the node appears — a
812
886
  // ref wouldn't retrigger it.
813
- var _8 = (0, react_2.useState)(null), compactWrapNode = _8[0], setCompactWrapNode = _8[1];
887
+ var _12 = (0, react_2.useState)(null), compactWrapNode = _12[0], setCompactWrapNode = _12[1];
814
888
  // Ref mirror of the wrap node for callbacks that must not re-create when it
815
889
  // mounts (flashOptions reads it inside a rAF).
816
890
  var compactWrapNodeRef = (0, react_2.useRef)(null);
@@ -826,10 +900,32 @@ var FormEngineImpl = function (_a) {
826
900
  /* The label column the rows are laid out with: measured from the labels (see below), the
827
901
  default until it is. A form stacks its rows where its value column would be too narrow
828
902
  beside it (`isCompactNarrow`), not at one form width whatever its labels are. */
829
- var _9 = (0, react_2.useState)(compactRowStyles_1.COMPACT_LABEL_COL), compactLabelColumn = _9[0], setCompactLabelColumn = _9[1];
903
+ var _13 = (0, react_2.useState)(compactRowStyles_1.COMPACT_LABEL_COL), compactLabelColumn = _13[0], setCompactLabelColumn = _13[1];
830
904
  // the label column holds a finger's help button where the pointer is a finger (`labelAffordanceWidth`)
831
905
  var coarsePointer = (0, useCoarsePointer_1.useCoarsePointer)();
832
- var compactNarrow = !!compactWrapWidth && (0, compactRowStyles_1.isCompactNarrow)(compactWrapWidth, compactLabelColumn);
906
+ /* The wrap's width as it is laid out the moment it mounts, read before it is first drawn.
907
+ `useMeasure` reports only from a ResizeObserver, after the browser's next layout, so until
908
+ then the width was 0 and a narrow form drew its first frames as a wide one: on a 190px form
909
+ a 220px name column, and the editor of an open row in a 0px column past the row's right edge.
910
+ Anything opened in those frames was laid out there - a picker focused as the form appeared
911
+ had its list closed as hidden. The observer's figure takes over once it has one. */
912
+ var _14 = (0, react_2.useState)(0), mountedWrapWidth = _14[0], setMountedWrapWidth = _14[1];
913
+ (0, react_2.useLayoutEffect)(function () {
914
+ if (!compactWrapNode) {
915
+ return;
916
+ }
917
+ var style = getComputedStyle(compactWrapNode);
918
+ var contentWidth = compactWrapNode.clientWidth -
919
+ (parseFloat(style.paddingLeft) || 0) -
920
+ (parseFloat(style.paddingRight) || 0);
921
+ setMountedWrapWidth(function (current) { return (current === contentWidth ? current : contentWidth); });
922
+ }, [compactWrapNode]);
923
+ var compactLaidOutWidth = compactWrapWidth || mountedWrapWidth;
924
+ var compactNarrow = !!compactLaidOutWidth && (0, compactRowStyles_1.isCompactNarrow)(compactLaidOutWidth, compactLabelColumn);
925
+ // a stacked form too narrow for an open row's label beside its actions (`isCompactCramped`)
926
+ var compactNarrowClass = compactNarrow ?
927
+ "readfirst-narrow".concat((0, compactRowStyles_1.isCompactCramped)(compactLaidOutWidth) ? ' readfirst-cramped' : '')
928
+ : '';
833
929
  /* How much pinned chrome sits above a status-box header.
834
930
 
835
931
  Sticky offsets do not compose on their own: everything pinned in one
@@ -844,7 +940,7 @@ var FormEngineImpl = function (_a) {
844
940
  a search row and a field picker that each hide themselves when they have
845
941
  nothing to say, and what is left wraps differently at every form width.
846
942
  Zero when this form draws no toolbar at all. */
847
- var _10 = (0, react_2.useState)(0), compactToolbarHeight = _10[0], setCompactToolbarHeight = _10[1];
943
+ var _15 = (0, react_2.useState)(0), compactToolbarHeight = _15[0], setCompactToolbarHeight = _15[1];
848
944
  (0, react_2.useLayoutEffect)(function () {
849
945
  var wrap = compactWrapNode;
850
946
  if (!compact || !wrap || compactNested || !compactStickyBoxHeaders) {
@@ -865,7 +961,11 @@ var FormEngineImpl = function (_a) {
865
961
  header's height below the top edge with nothing under it. Read from
866
962
  the element rather than from the props that produced it, so every
867
963
  route to that decision is accounted for. */
868
- var pinned = getComputedStyle(header).position === 'sticky';
964
+ /* A Reqore that pins a header only while its panel is clearly taller than its scroller
965
+ (reqore#715) says whether it pins in `data-pins-header`, and decides it
966
+ after it has measured, so the toolbar was not sticky yet when this first read it. */
967
+ var says = header.getAttribute('data-pins-header');
968
+ var pinned = says !== null ? says === 'true' : getComputedStyle(header).position === 'sticky';
869
969
  var next = pinned ? Math.round(header.getBoundingClientRect().height) : 0;
870
970
  return prev === next ? prev : next;
871
971
  });
@@ -873,17 +973,53 @@ var FormEngineImpl = function (_a) {
873
973
  read();
874
974
  /* jsdom and older engines have no ResizeObserver; the one-shot read above
875
975
  still gives the right answer for a form whose toolbar never reflows. */
876
- if (typeof ResizeObserver === 'undefined') {
877
- return undefined;
878
- }
879
- var observer = new ResizeObserver(read);
880
- observer.observe(header);
881
- return function () { return observer.disconnect(); };
976
+ var observer = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(read);
977
+ observer === null || observer === void 0 ? void 0 : observer.observe(header);
978
+ /* The pin can change without the toolbar's size changing: Reqore measures first and pins
979
+ after, and pins no more once the form is short. */
980
+ var pinWatch = typeof MutationObserver === 'undefined' ? undefined : new MutationObserver(read);
981
+ pinWatch === null || pinWatch === void 0 ? void 0 : pinWatch.observe(header, { attributes: true, attributeFilter: ['data-pins-header'] });
982
+ return function () {
983
+ observer === null || observer === void 0 ? void 0 : observer.disconnect();
984
+ pinWatch === null || pinWatch === void 0 ? void 0 : pinWatch.disconnect();
985
+ };
882
986
  /* `compactNarrow` is a dependency, not decoration: crossing the width
883
987
  breakpoint takes the pin OFF the toolbar without changing its height, so
884
988
  the ResizeObserver never fires and a stale 124px would go on offsetting
885
989
  the box headers below a toolbar that is no longer there. */
886
990
  }, [compact, compactNested, compactStickyBoxHeaders, compactNarrow, compactWrapNode, options]);
991
+ /* The color a calm form sits on, for its pinned toolbar's glass.
992
+
993
+ A calm form has no surface of its own, so the toolbar has to paint one to
994
+ keep the rows that scroll under it from showing through the meter and the
995
+ search — and it has to be the host's color, or it draws a band across the
996
+ form before anything has moved. The host is whatever paints first above the
997
+ form: the page, a drawer's panel surface, a card. Read once it mounts (and
998
+ when the theme changes), not assumed from the theme's main color. */
999
+ var _16 = (0, react_2.useState)(), compactHostColour = _16[0], setCompactHostColour = _16[1];
1000
+ (0, react_2.useLayoutEffect)(function () {
1001
+ if (!calm || !compact || compactNested || !compactWrapNode) {
1002
+ setCompactHostColour(undefined);
1003
+ return;
1004
+ }
1005
+ var _loop_1 = function (node) {
1006
+ var _a = (getComputedStyle(node).backgroundColor.match(/[\d.]+/g) || [])
1007
+ .slice(0, 4)
1008
+ .map(Number), r = _a[0], g = _a[1], b = _a[2], _b = _a[3], alpha = _b === void 0 ? 1 : _b;
1009
+ if (alpha > 0 && b !== undefined) {
1010
+ setCompactHostColour(function (prev) {
1011
+ return (prev === null || prev === void 0 ? void 0 : prev[0]) === r && (prev === null || prev === void 0 ? void 0 : prev[1]) === g && (prev === null || prev === void 0 ? void 0 : prev[2]) === b ? prev : [r, g, b];
1012
+ });
1013
+ return { value: void 0 };
1014
+ }
1015
+ };
1016
+ for (var node = compactWrapNode.parentElement; node; node = node.parentElement) {
1017
+ var state_1 = _loop_1(node);
1018
+ if (typeof state_1 === "object")
1019
+ return state_1.value;
1020
+ }
1021
+ setCompactHostColour(undefined);
1022
+ }, [calm, compact, compactNested, compactWrapNode, theme]);
887
1023
  // Global label-column sizing: size the label column to the WIDEST field label
888
1024
  // across the whole form, clamped to [MIN, MAX], and publish it as a CSS var on
889
1025
  // the scroll wrap. Both the grid column and the value-surface offsets read the
@@ -932,9 +1068,18 @@ var FormEngineImpl = function (_a) {
932
1068
  var readRowHeights = (0, react_2.useRef)({});
933
1069
  // Required-groups linkage: hovering a group chip highlights every member row;
934
1070
  // clicking a sibling in the chip's popover scrolls to it and flashes it.
935
- var _11 = (0, react_2.useState)([]), highlightedOptions = _11[0], setHighlightedOptions = _11[1];
936
- var _12 = (0, react_2.useState)([]), flashedOptions = _12[0], setFlashedOptions = _12[1];
937
- var flashTimeout = (0, react_2.useRef)();
1071
+ var _17 = (0, react_2.useState)([]), highlightedOptions = _17[0], setHighlightedOptions = _17[1];
1072
+ /* The rows flashing, and which time this is. A flash is a CSS animation that plays once when its class is set
1073
+ and ends on the row's own background, so nothing takes the class off again: a timer did, 1.4s later, and that
1074
+ update came from no event at all, so React reported it (and the context it changed, once for every row reading
1075
+ it) as an update a test had not waited for - a thousand times a story in the IDE's API schema forms.
1076
+ `generation` says which time it is, so a row that flashes again starts its animation again (`CompactRow`). */
1077
+ var _18 = (0, react_2.useState)({
1078
+ names: [],
1079
+ generation: 0,
1080
+ }), flash = _18[0], setFlash = _18[1];
1081
+ var flashedOptions = flash.names;
1082
+ var flashGeneration = flash.generation;
938
1083
  var flashOptions = (0, react_2.useCallback)(function (optionNames, scrollToFirst) {
939
1084
  if (scrollToFirst === void 0) { scrollToFirst = false; }
940
1085
  if (scrollToFirst && optionNames[0]) {
@@ -959,42 +1104,40 @@ var FormEngineImpl = function (_a) {
959
1104
  }
960
1105
  });
961
1106
  }
962
- setFlashedOptions(optionNames);
963
- clearTimeout(flashTimeout.current);
964
- flashTimeout.current = setTimeout(function () { return setFlashedOptions([]); }, 1400);
1107
+ setFlash(function (current) { return ({ names: optionNames, generation: current.generation + 1 }); });
965
1108
  }, []);
966
1109
  var flashOption = (0, react_2.useCallback)(function (optionName) { return flashOptions([optionName], true); }, [flashOptions]);
967
- (0, react_2.useEffect)(function () { return function () { return clearTimeout(flashTimeout.current); }; }, []);
968
1110
  // Follow a field across panels: when its status bucket changes — e.g. you fill
969
1111
  // an optional field and it jumps to Set / Needs attention — scroll to its new
970
1112
  // row and flash it so it's easy to keep track of. `settledBucket` holds each
971
- // field's current panel (frozen while the field is being edited, it re-buckets
972
- // on collapse), so diffing it after every render catches the move the instant it
973
- // lands in the new panel. Runs every render; the diff is cheap and only fires a
974
- // scroll on an ACTUAL move of a non-expanded field.
1113
+ // field's current panel, so diffing it after every render catches the move the
1114
+ // instant it lands in the new panel. A field being edited moves as its value
1115
+ // does - the first character typed into an empty required field takes it to Set,
1116
+ // the caret with it (`rowPlaces`) - and is followed the same way. Runs every
1117
+ // render; the diff is cheap and only fires a scroll on an ACTUAL move.
975
1118
  var prevSettledBucket = (0, react_2.useRef)({});
976
1119
  (0, react_2.useEffect)(function () {
977
1120
  if (!compact)
978
1121
  return;
979
1122
  var cur = settledBucket.current;
980
1123
  var prev = prevSettledBucket.current;
981
- var moved = Object.keys(cur).find(function (name) { return prev[name] && prev[name] !== cur[name] && !expandedOptions.includes(name); });
1124
+ var moved = Object.keys(cur).find(function (name) { return prev[name] && prev[name] !== cur[name]; });
982
1125
  prevSettledBucket.current = __assign({}, cur);
983
1126
  if (moved) {
984
1127
  flashOptions([moved], true);
985
1128
  }
986
1129
  });
987
1130
  // Info panels auto-open on Tier-1 content; the per-row user override sticks.
988
- var _13 = (0, react_2.useState)({}), infoPanelOverrides = _13[0], setInfoPanelOverrides = _13[1];
1131
+ var _19 = (0, react_2.useState)({}), infoPanelOverrides = _19[0], setInfoPanelOverrides = _19[1];
989
1132
  // Toolbar filters affect the listed rows only — the meter reflects the full set.
990
- var _14 = (0, react_2.useState)(false), requiredOnly = _14[0], setRequiredOnly = _14[1];
991
- var _15 = (0, react_2.useState)(''), compactQuery = _15[0], setCompactQuery = _15[1];
1133
+ var _20 = (0, react_2.useState)(false), requiredOnly = _20[0], setRequiredOnly = _20[1];
1134
+ var _21 = (0, react_2.useState)(''), compactQuery = _21[0], setCompactQuery = _21[1];
992
1135
  // Compact field sort (Fields menu → "Sort by"); 'schema' = declared order.
993
- var _16 = (0, react_2.useState)('schema'), compactSort = _16[0], setCompactSort = _16[1];
994
- var _17 = (0, react_2.useState)(function () { return ({
1136
+ var _22 = (0, react_2.useState)('schema'), compactSort = _22[0], setCompactSort = _22[1];
1137
+ var _23 = (0, react_2.useState)(function () { return ({
995
1138
  fields: (0, exports.fixOptions)(value, options || {}, undefined, isRendererOnly),
996
1139
  meta: undefined,
997
- }); }), localValue = _17[0], setLocalValue = _17[1];
1140
+ }); }), localValue = _23[0], setLocalValue = _23[1];
998
1141
  var originalValue = (0, react_2.useRef)();
999
1142
  // Track the last value we emitted via onChange so we can skip re-applying fixOptions
1000
1143
  // when the parent echoes it back as the new value prop (controlled component loop prevention)
@@ -1052,14 +1195,14 @@ var FormEngineImpl = function (_a) {
1052
1195
  originalValue.current = localValue.fields;
1053
1196
  }
1054
1197
  var unavailableOptionsCount = (0, react_2.useRef)(0);
1055
- var _18 = (0, useQorusTypes_1.useQorusTypes)(), compactValue = _18.compactValue, typesLoading = _18.loading;
1056
- // an option's type in words, while the form shows field types (qorus#646: it said the type's code, `<string>`)
1198
+ var _24 = (0, useQorusTypes_1.useQorusTypes)(), compactValue = _24.compactValue, typesLoading = _24.loading;
1199
+ // an option's type in words, while the form shows field types (it said the type's code, `<string>`)
1057
1200
  var typeName = (0, typeSentenceForm_1.useTypeName)();
1058
1201
  var templates = (0, useTemplates_1.useTemplates)(allowTemplates, stringTemplates, interfaceContext);
1059
1202
  (0, react_2.useEffect)(function () {
1060
1203
  /* Nothing is emitted until the schema is in force (`schemaInForce`): read against the empty or earlier
1061
1204
  schema a host hands down while it loads its own, the value is no answer, and emitted it wiped a Qog
1062
- state's stored options the moment the state was opened (qorus#646).
1205
+ state's stored options the moment the state was opened.
1063
1206
 
1064
1207
  When it comes into force this check runs (it is a dependency). A host also shows the skeleton for other
1065
1208
  waits: qorus-ide shows it while the templates load, with the schema already there. The form completes the
@@ -1072,7 +1215,7 @@ var FormEngineImpl = function (_a) {
1072
1215
  /* The host changed the value in this same commit (effects run in order, and this one runs before the
1073
1216
  sync-down that takes the change in). The form's copy was made before that change: sent, it overwrote
1074
1217
  the host's change, the sync-down then took the host's value in, and the next commit sent that back -
1075
- the form and the host traded places on every commit, forever (qorus#646: the Qorus IDE's OPC UA node
1218
+ the form and the host traded places on every commit, forever (the Qorus IDE's OPC UA node
1076
1219
  editor, its namespace flipping between the old and the renamed one). The sync-down below merges the
1077
1220
  change with the form's own edits, and the next commit reports the result. */
1078
1221
  if (isHostsOwnChange()) {
@@ -1566,6 +1709,9 @@ var FormEngineImpl = function (_a) {
1566
1709
  showInvalidOptionsOnly,
1567
1710
  schemaInForce,
1568
1711
  ]);
1712
+ /* The schema and the values, as one value while neither changes: every row reads it through a selector
1713
+ (`OptionFieldMessages`), and a new object on each render of the form asked every row again. */
1714
+ var optionsContextValue = (0, react_2.useMemo)(function () { return ({ schema: options, value: availableOptions }); }, [options, availableOptions]);
1569
1715
  // Per required-group: its member options, and which member (if any) already
1570
1716
  // satisfies it — drives the "One of" chips and the "covered by" notes.
1571
1717
  var requiredGroupsInfo = (0, react_2.useMemo)(function () {
@@ -1697,7 +1843,7 @@ var FormEngineImpl = function (_a) {
1697
1843
  // the same "not set" the row's status reads: an empty list is no value
1698
1844
  var isEmpty = (0, readFirst_1.isOptionValueEmpty)(optionValue);
1699
1845
  // A field whose `depends_on` does not hold does not apply: it is hidden, and nothing in it can make the
1700
- // form invalid - a value it holds is kept, and said in the form's note, valid or not (qorus#646).
1846
+ // form invalid - a value it holds is kept, and said in the form's note, valid or not.
1701
1847
  if (dependencyLockedNames.includes(optionName)) {
1702
1848
  return true;
1703
1849
  }
@@ -1748,7 +1894,7 @@ var FormEngineImpl = function (_a) {
1748
1894
  if (dependencyLockedNames.includes(optionName) ||
1749
1895
  (isEmpty && !isRequired && !hasRequiredGroups)) {
1750
1896
  /* A field whose `depends_on` does not hold is hidden and does not apply: nothing in it makes the
1751
- form invalid, empty or holding a value (kept, and said in the form's note - qorus#646). */
1897
+ form invalid, empty or holding a value (kept, and said in the form's note). */
1752
1898
  validation = { isValid: true, reasons: [] };
1753
1899
  }
1754
1900
  else {
@@ -1784,7 +1930,7 @@ var FormEngineImpl = function (_a) {
1784
1930
  (0, react_2.useEffect)(function () {
1785
1931
  onValidityChange === null || onValidityChange === void 0 ? void 0 : onValidityChange(optionsAreValid, validityData);
1786
1932
  }, [JSON.stringify(validityData)]);
1787
- /* A field whose `depends_on` does not hold is not shown (qorus#646, David): it is not of use until it applies,
1933
+ /* A field whose `depends_on` does not hold is not shown: it is not of use until it applies,
1788
1934
  so it is left out of the form - not shown waiting, locked - and appears once its dependency holds (and
1789
1935
  flashes - see `dependencyLockedNames`). Its value is kept; one it holds meanwhile is said in the form's
1790
1936
  note (`hiddenFieldsWithValues`). */
@@ -1795,6 +1941,11 @@ var FormEngineImpl = function (_a) {
1795
1941
  return newValue;
1796
1942
  }
1797
1943
  if (showInvalidOptionsOnly &&
1944
+ // An open row stays while the reader is in it, as its box does
1945
+ // (`stableBucketOf`): the first character typed into an empty required
1946
+ // field makes it valid, and hiding it then would pull the field out
1947
+ // from under the caret mid-word.
1948
+ !expandedOptions.includes(optionName) &&
1798
1949
  isOptionValid(optionName, (0, exports.getOptionFieldStorageType)(optionName, option.type, options, operators, option.op, isRendererOnly, optionHoldsExpression(option)), option.value)) {
1799
1950
  return newValue;
1800
1951
  }
@@ -1803,6 +1954,7 @@ var FormEngineImpl = function (_a) {
1803
1954
  }, [
1804
1955
  dependencyLockedNames,
1805
1956
  showInvalidOptionsOnly,
1957
+ expandedOptions,
1806
1958
  isRendererOnly,
1807
1959
  JSON.stringify(availableOptions),
1808
1960
  JSON.stringify(options),
@@ -1858,8 +2010,17 @@ var FormEngineImpl = function (_a) {
1858
2010
  covered: covered,
1859
2011
  invalid: invalid,
1860
2012
  warned: msgIntent === 'warning',
2013
+ // a one-of member, once anyone has been to its group (`hasBeenToTheField`)
2014
+ visited: (0, readFirst_1.hasBeenToTheField)(name, {
2015
+ visitedOptions: visitedOptions,
2016
+ revealRequired: revealRequired,
2017
+ requiredGroups: reqGroups,
2018
+ groupMembers: requiredGroupsInfo.members,
2019
+ }),
1861
2020
  });
1862
2021
  }, [
2022
+ revealRequired,
2023
+ visitedOptions,
1863
2024
  isRendererOnly,
1864
2025
  JSON.stringify(options),
1865
2026
  JSON.stringify(availableOptions),
@@ -1889,6 +2050,37 @@ var FormEngineImpl = function (_a) {
1889
2050
  // a hidden field (its `depends_on` does not hold) is not in the form, nor in its counts
1890
2051
  function (name) { return !dependencyLockedNames.includes(name) && getOptionBucket(name) === 'attention'; }).length;
1891
2052
  }, [JSON.stringify(availableOptions), getOptionBucket, dependencyLockedNames]);
2053
+ // How many of those are faults rather than only still to fill in (`pending`). Zero
2054
+ // on a new form, so its first box reads "To fill in" without amber.
2055
+ var readFirstAttentionFaultCount = (0, react_2.useMemo)(function () {
2056
+ return Object.keys(availableOptions || {}).filter(function (name) { return getOptionBucket(name) === 'attention' && getOptionStatus(name) !== 'pending'; }).length;
2057
+ }, [JSON.stringify(availableOptions), getOptionBucket, getOptionStatus]);
2058
+ /* Fields whose value fails but that are not in the first box: an optional field its host says is wrong
2059
+ (`invalid_reason`) stays among the optional ones. They make the form "Incomplete", so the readiness line counts
2060
+ them with the faults: it said "Incomplete" and nothing else, with nothing to tell the reader what. */
2061
+ var readFirstFaultsOutsideBox = (0, react_2.useMemo)(function () {
2062
+ return validityData.invalidFields.filter(function (_a) {
2063
+ var fieldName = _a.fieldName;
2064
+ return !!(availableOptions === null || availableOptions === void 0 ? void 0 : availableOptions[fieldName]) &&
2065
+ !dependencyLockedNames.includes(fieldName) &&
2066
+ getOptionBucket(fieldName) !== 'attention';
2067
+ }).length;
2068
+ }, [validityData, JSON.stringify(availableOptions), dependencyLockedNames, getOptionBucket]);
2069
+ // The same two numbers, to a host that draws its own submit control from them.
2070
+ var onAttentionChangeRef = (0, react_2.useRef)(onAttentionChange);
2071
+ onAttentionChangeRef.current = onAttentionChange;
2072
+ // What the host found wrong outside the fields: in the line and in what the host is told.
2073
+ var outsideAttentionCount = Math.max(0, (_b = outsideAttention === null || outsideAttention === void 0 ? void 0 : outsideAttention.count) !== null && _b !== void 0 ? _b : 0);
2074
+ (0, react_2.useEffect)(function () {
2075
+ var _a;
2076
+ /* The line's numbers, to the one: a field its host says is wrong outside the first box (`readFirstFaultsOutsideBox`)
2077
+ is counted in the line, and so in what the host is told - the host's submit read ready while the line said
2078
+ "Incomplete · 1 need attention". */
2079
+ (_a = onAttentionChangeRef.current) === null || _a === void 0 ? void 0 : _a.call(onAttentionChangeRef, {
2080
+ count: readFirstAttentionCount + readFirstFaultsOutsideBox + outsideAttentionCount,
2081
+ faults: readFirstAttentionFaultCount + readFirstFaultsOutsideBox + outsideAttentionCount,
2082
+ });
2083
+ }, [readFirstAttentionCount, readFirstAttentionFaultCount, readFirstFaultsOutsideBox, outsideAttentionCount]);
1892
2084
  var getIntent = (0, react_2.useCallback)(
1893
2085
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1894
2086
  function (optName, type, optValue, _op) {
@@ -1946,11 +2138,11 @@ var FormEngineImpl = function (_a) {
1946
2138
  /* A row is opened or closed by what the user did to the row as it was drawn, never by flipping whatever the
1947
2139
  state is by the time React applies the update. A toggle read the direction from the latest state: the
1948
2140
  first-required scan opens its row with an update of its own, and a click on that row, drawn closed, landed on
1949
- top of it and closed the row the user had just opened (qorus#646: the Qorus IDE's Schema "Draft Is Saved").
2141
+ top of it and closed the row the user had just opened (the Qorus IDE's Schema "Draft Is Saved").
1950
2142
  Each of these does nothing to a row already in its state.
1951
2143
 
1952
2144
  A row the user opens or closes is where they have chosen to work: the first-required scan, if it is still
1953
- waiting for the focus to be free, does not run after either (qorus#646). */
2145
+ waiting for the focus to be free, does not run after either. */
1954
2146
  var expandOption = (0, react_2.useCallback)(function (optionName) {
1955
2147
  hasAutoFocusedRef.current = true;
1956
2148
  setExpandedOptions(function (prev) {
@@ -1960,7 +2152,22 @@ var FormEngineImpl = function (_a) {
1960
2152
  : __spreadArray(__spreadArray([], prev, true), [optionName], false);
1961
2153
  });
1962
2154
  }, [expandMode]);
2155
+ /* Which field holds each absorbed one (`absorb_fields`): a code field's language has no row of its own. */
2156
+ var absorbingHosts = (0, react_2.useMemo)(function () { return getAbsorbingHosts(options); }, [options]);
2157
+ /* "Change" on a default (`DefaultsNote`): the field becomes an ordinary row, opened to be changed. A field another
2158
+ absorbs has no row to open (a code field's language is chosen in the code field's row), so the row that holds it
2159
+ is opened, where its control is. Opening its own name opened nothing, and the line went away. */
2160
+ var changeDefault = (0, react_2.useCallback)(function (optionName) {
2161
+ var _a;
2162
+ setChangedDefaults(function (current) {
2163
+ return current.includes(optionName) ? current : __spreadArray(__spreadArray([], current, true), [optionName], false);
2164
+ });
2165
+ expandOption((_a = absorbingHosts[optionName]) !== null && _a !== void 0 ? _a : optionName);
2166
+ }, [expandOption, absorbingHosts]);
1963
2167
  var collapseOption = (0, react_2.useCallback)(function (optionName) {
2168
+ if (alwaysExpandedRef.current.includes(optionName)) {
2169
+ return;
2170
+ }
1964
2171
  hasAutoFocusedRef.current = true;
1965
2172
  setExpandedOptions(function (prev) {
1966
2173
  return prev.includes(optionName) ? prev.filter(function (name) { return name !== optionName; }) : prev;
@@ -1996,6 +2203,22 @@ var FormEngineImpl = function (_a) {
1996
2203
  hasAppliedInitialExpansionRef.current = true;
1997
2204
  setExpandedOptions(function (prev) { return __spreadArray(__spreadArray([], prev, true), toExpand.filter(function (name) { return !prev.includes(name); }), true); });
1998
2205
  }, [initialExpandedOptions, compact, availableOptions]);
2206
+ // --- Rows that stay open (opt-in) ----------------------------------------
2207
+ // Opened before the form paints, as soon as the schema holds them (it can arrive in pieces), and kept open by
2208
+ // `setExpandedOptions` and `collapseOption`.
2209
+ (0, react_2.useLayoutEffect)(function () {
2210
+ if (!alwaysExpandedOptions.length) {
2211
+ return;
2212
+ }
2213
+ var names = Object.keys(availableOptions);
2214
+ var toOpen = alwaysExpandedOptions.filter(function (name) { return names.includes(name); });
2215
+ if (toOpen.length) {
2216
+ setExpandedOptionsState(function (prev) {
2217
+ var missing = toOpen.filter(function (name) { return !prev.includes(name); });
2218
+ return missing.length ? __spreadArray(__spreadArray([], prev, true), missing, true) : prev;
2219
+ });
2220
+ }
2221
+ }, [alwaysExpandedOptions, availableOptions]);
1999
2222
  // --- Host-requested rows (opt-in) ----------------------------------------
2000
2223
  // Each new key opens the rows it names; a key already answered is not answered again. Waits, as the starting
2001
2224
  // rows do, for a schema that does not yet hold a named row.
@@ -2095,8 +2318,8 @@ var FormEngineImpl = function (_a) {
2095
2318
  }
2096
2319
  /* Read on the form the schema makes: a required field the schema brings is added to the form's value by the
2097
2320
  sync-down, an effect, so the render after the schema arrives. Read before that, the form had no row for it:
2098
- the scan found nothing to open and was spent, and the field's row stayed closed (qorus#646: the Qorus IDE's
2099
- pipeline processor, whose required field mappings arrive with its schema). */
2321
+ the scan found nothing to open and was spent, and the field's row stayed closed (the Qorus IDE's pipeline
2322
+ processor, whose required field mappings arrive with its schema). */
2100
2323
  var formTheSchemaMakes = (0, exports.fixOptions)(fixedValue, options, undefined, isRendererOnly);
2101
2324
  if (Object.keys(formTheSchemaMakes || {}).some(function (name) { return !(name in fixedValue); })) {
2102
2325
  return;
@@ -2159,7 +2382,7 @@ var FormEngineImpl = function (_a) {
2159
2382
  }
2160
2383
  hasAutoFocusedRef.current = true;
2161
2384
  var entered = event.target;
2162
- if ((0, rowFocus_1.isTypingControl)(entered)) {
2385
+ if ((0, rowFocus_2.isTypingControl)(entered)) {
2163
2386
  return;
2164
2387
  }
2165
2388
  var target = firstAttentionRow();
@@ -2187,6 +2410,48 @@ var FormEngineImpl = function (_a) {
2187
2410
  compactWrapNode.removeEventListener('focusin', onFocusIn);
2188
2411
  };
2189
2412
  }, [autoFocusFirstRequired, compact, compactWrapNode]);
2413
+ // A submit that could not go is answered with where to type: each new
2414
+ // `focusAttentionRequest` opens the first field that needs attention and puts the
2415
+ // caret in it. The host's submit button holds the caret at that moment, and an open
2416
+ // row never takes a caret held outside it (CompactRow), so the button lets go of it
2417
+ // here first; the person asked to submit, and this is the answer to that. It picks
2418
+ // the field the arrival scan above would (`firstAttentionRow`), and spends that scan:
2419
+ // the person has been taken to a field now.
2420
+ var lastFocusRequest = (0, react_2.useRef)(focusAttentionRequest);
2421
+ (0, react_2.useEffect)(function () {
2422
+ var _a;
2423
+ if (focusAttentionRequest === lastFocusRequest.current) {
2424
+ return;
2425
+ }
2426
+ lastFocusRequest.current = focusAttentionRequest;
2427
+ if (!focusAttentionRequest || !compact || !options) {
2428
+ return;
2429
+ }
2430
+ var target = firstAttentionRow();
2431
+ if (!target) {
2432
+ return;
2433
+ }
2434
+ hasAutoFocusedRef.current = true;
2435
+ var wrap = compactWrapNodeRef.current;
2436
+ var active = document.activeElement;
2437
+ if (active && active !== document.body && !(wrap === null || wrap === void 0 ? void 0 : wrap.contains(active))) {
2438
+ active.blur();
2439
+ }
2440
+ if (!expandedOptions.includes(target)) {
2441
+ // The row's own open effect reveals it and takes the caret.
2442
+ openFirstAttentionRow(target);
2443
+ return;
2444
+ }
2445
+ // Already open (the field the form opened on arrival): its open effect has run,
2446
+ // so the caret goes to its control here.
2447
+ var row = wrap === null || wrap === void 0 ? void 0 : wrap.querySelector("[data-field=\"".concat(target, "\"]"));
2448
+ if (row) {
2449
+ (0, revealRow_1.revealRow)(row, 'auto');
2450
+ (_a = (0, rowFocus_1.findRowFocusTarget)(row.querySelector('.options-readfirst-row-editor'), {
2451
+ textEntryOnly: row.classList.contains('options-readfirst-card'),
2452
+ })) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true });
2453
+ }
2454
+ }, [focusAttentionRequest]);
2190
2455
  // Read-first completion summary (how many shown options have a value set),
2191
2456
  // surfaced as a progress meter at the top of the compact form.
2192
2457
  var readFirstCompletion = (0, react_2.useMemo)(function () {
@@ -2195,7 +2460,7 @@ var FormEngineImpl = function (_a) {
2195
2460
  (0, lodash_1.omit)(availableOptions, dependencyLockedNames), function (name) { return getOptionBucket(name) === 'attention'; });
2196
2461
  }, [JSON.stringify(availableOptions), getOptionBucket, dependencyLockedNames]);
2197
2462
  /* The hidden fields (their `depends_on` does not hold) that hold a value: kept, not dropped silently, so the form
2198
- says so in a note - and whether the value is valid, as no field shows it (qorus#646, David). */
2463
+ says so in a note - and whether the value is valid, as no field shows it. */
2199
2464
  var hiddenFieldsWithValues = (0, react_2.useMemo)(function () {
2200
2465
  return dependencyLockedNames
2201
2466
  .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); })
@@ -2284,7 +2549,7 @@ var FormEngineImpl = function (_a) {
2284
2549
  // The info panel below the row keeps showing schema messages while editing —
2285
2550
  // rendering them in the editor too would balloon a one-line edit.
2286
2551
  suppressSchemaMessages) {
2287
- var _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
2552
+ var _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
2288
2553
  var type = _a.type, other = __rest(_a, ["type"]);
2289
2554
  var operatorParts = (0, common_1.fixOperatorValue)(other.op);
2290
2555
  // The RENDERER type for this row — which editor mounts. Distinct from the
@@ -2361,11 +2626,11 @@ var FormEngineImpl = function (_a) {
2361
2626
  if (!schemaMsgs.length)
2362
2627
  return null;
2363
2628
  var items = schemaMsgs.map(function (_a, index) {
2364
- var intent = _a.intent, title = _a.title, content = _a.content;
2365
- return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { intent: intent, title: title, opaque: false, size: 'small',
2629
+ var intent = _a.intent, title = _a.title, content = _a.content, details = _a.details, detailsName = _a.detailsName;
2630
+ return ((0, jsx_runtime_1.jsxs)(reqore_1.ReqoreMessage, { intent: (0, formAppearance_1.calmNoteIntent)(intent, calm), title: title, opaque: false, size: 'small',
2366
2631
  // Compact: flat (no border) to match the read-row info panels;
2367
2632
  // classic forms keep the bordered, bottom-margined message.
2368
- flat: compact || undefined, margin: compact ? undefined : 'bottom', children: content }, title || index));
2633
+ flat: compact || undefined, margin: compact ? undefined : 'bottom', children: [content, details ? (0, jsx_runtime_1.jsx)(FieldMessageDetails_1.FieldMessageDetails, { details: details, name: detailsName }) : null] }, title || index));
2369
2634
  });
2370
2635
  // Compact: stack them in a 4px-gap panel so a field's messages look
2371
2636
  // identical whether the row is collapsed (read panel) or expanded.
@@ -2388,7 +2653,7 @@ var FormEngineImpl = function (_a) {
2388
2653
  : null] }, index));
2389
2654
  }) }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreVerticalSpacer, { height: 5 })] })
2390
2655
  : 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), {
2391
- // qorus#347-followup (scope forwarding): merge accumulated
2656
+ // scope forwarding: merge accumulated
2392
2657
  // inheritance (`inheritedFromParent`) with THIS field's freshly
2393
2658
  // resolved inherit_props, and pass down as a single bag so any
2394
2659
  // nested `arg_schema` sub-form (mounted by AutoFormField for
@@ -2417,7 +2682,7 @@ var FormEngineImpl = function (_a) {
2417
2682
  // (DPQL text mode); opt out per-form via `templateFieldProps`.
2418
2683
  allowTextExpressions: true,
2419
2684
  // a form's options enter their value on tabs: Value · Expression · Visual, or Value · Template
2420
- // where only templates are taken (qorus#646); opt out per-form via `templateFieldProps`
2685
+ // where only templates are taken; opt out per-form via `templateFieldProps`
2421
2686
  valueTabs: true,
2422
2687
  // A fixed allowed-value field still needs its selector even when
2423
2688
  // arbitrary custom values are forbidden. TemplateField uses this
@@ -2452,17 +2717,20 @@ var FormEngineImpl = function (_a) {
2452
2717
  // Identity-stable on purpose: the typed fields debounce on
2453
2718
  // `[localValue, onChange]` — an inline lambda resets the pending emit
2454
2719
  // every render and the typed value can starve.
2455
- handleValueChange, key: optionName, arg_schema: (_m = options === null || options === void 0 ? void 0 : options[optionName]) === null || _m === void 0 ? void 0 : _m.arg_schema, value: expressionAwareValue, isFunction: optionHoldsExpression(other), isDefaultFunction: ((_o = options === null || options === void 0 ? void 0 : options[optionName]) === null || _o === void 0 ? void 0 : _o.default_view) === 'expression', sensitive: (_p = options === null || options === void 0 ? void 0 : options[optionName]) === null || _p === void 0 ? void 0 : _p.sensitive, default_value: (0, common_1.getDefaultValue)(options === null || options === void 0 ? void 0 : options[optionName]), isDefaultTemplate: ((_q = options === null || options === void 0 ? void 0 : options[optionName]) === null || _q === void 0 ? void 0 : _q.default_view) === 'template', allowed_values: (_r = options === null || options === void 0 ? void 0 : options[optionName]) === null || _r === void 0 ? void 0 : _r.allowed_values, allowed_values_creatable: (_s = options === null || options === void 0 ? void 0 : options[optionName]) === null || _s === void 0 ? void 0 : _s.allowed_values_creatable, disabled: ((_t = options === null || options === void 0 ? void 0 : options[optionName]) === null || _t === void 0 ? void 0 : _t.disabled) ||
2720
+ handleValueChange, key: optionName, arg_schema: (_m = options === null || options === void 0 ? void 0 : options[optionName]) === null || _m === void 0 ? void 0 : _m.arg_schema, value: expressionAwareValue, isFunction: optionHoldsExpression(other), isDefaultFunction: ((_o = options === null || options === void 0 ? void 0 : options[optionName]) === null || _o === void 0 ? void 0 : _o.default_view) === 'expression', sensitive: (_p = options === null || options === void 0 ? void 0 : options[optionName]) === null || _p === void 0 ? void 0 : _p.sensitive, default_value: (0, common_1.getDefaultValue)(options === null || options === void 0 ? void 0 : options[optionName]), isDefaultTemplate: ((_q = options === null || options === void 0 ? void 0 : options[optionName]) === null || _q === void 0 ? void 0 : _q.default_view) === 'template', allowed_values: (_r = options === null || options === void 0 ? void 0 : options[optionName]) === null || _r === void 0 ? void 0 : _r.allowed_values, allowed_values_creatable: (_s = options === null || options === void 0 ? void 0 : options[optionName]) === null || _s === void 0 ? void 0 : _s.allowed_values_creatable, allowed_values_groups: (_t = options === null || options === void 0 ? void 0 : options[optionName]) === null || _t === void 0 ? void 0 : _t.allowed_values_groups, templateLabel: (_u = options === null || options === void 0 ? void 0 : options[optionName]) === null || _u === void 0 ? void 0 : _u.template_label, templateTooltip: (_v = options === null || options === void 0 ? void 0 : options[optionName]) === null || _v === void 0 ? void 0 : _v.template_tooltip, disabled: ((_w = options === null || options === void 0 ? void 0 : options[optionName]) === null || _w === void 0 ? void 0 : _w.disabled) ||
2456
2721
  (
2457
2722
  // a system-owned field states that as `readonly`; only the older
2458
2723
  // compat projection also sent `disabled`, so honouring only
2459
2724
  // `disabled` rendered an editable control for a value the user
2460
2725
  // cannot change (see CompactRow's `fieldReadonly`)
2461
- (_u = options === null || options === void 0 ? void 0 : options[optionName]) === null || _u === void 0 ? void 0 : _u.readonly) ||
2726
+ (_x = options === null || options === void 0 ? void 0 : options[optionName]) === null || _x === void 0 ? void 0 : _x.readonly) ||
2462
2727
  readOnly ||
2463
- !(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) ?
2728
+ !(0, validations_1.hasAllDependenciesFullfilled)((_y = options === null || options === void 0 ? void 0 : options[optionName]) === null || _y === void 0 ? void 0 : _y.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) ?
2464
2729
  getCustomMenuTemplateItems(optionName)
2465
- : 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) ?
2730
+ : 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,
2731
+ // Open is not left: a field the form opened for typing (the first empty
2732
+ // one, on a new form) says what it needs without already being wrong.
2733
+ requirementPending: !(revealRequired || visitedOptions.includes(optionName)) }), operators && (0, size_1.default)(operators) && (0, size_1.default)(other.op) ?
2466
2734
  (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)({
2467
2735
  label: (optionSchema === null || optionSchema === void 0 ? void 0 : optionSchema.display_name) || optionName,
2468
2736
  operatorKeys: operatorParts,
@@ -2496,10 +2764,12 @@ var FormEngineImpl = function (_a) {
2496
2764
  getTypeForOption,
2497
2765
  inheritedScopes,
2498
2766
  inheritedFromParent,
2767
+ revealRequired,
2768
+ visitedOptions,
2499
2769
  ]);
2500
2770
  // Compact (read-first) rendering.
2501
2771
  // Theme-derived colors so the flat-row layout adapts to light/dark/custom themes.
2502
- var cText = ((_b = theme === null || theme === void 0 ? void 0 : theme.text) === null || _b === void 0 ? void 0 : _b.color) || '#f1f0ee';
2772
+ var cText = (0, formAppearance_1.getThemeTextColour)(theme, '#f1f0ee');
2503
2773
  // Text emphasis tiers via reqore's readable-color helper (key = full readable
2504
2774
  // text, muted = its dimmed variant, faint = the dimmed variant softened
2505
2775
  // further) instead of hand-rolled hex-alpha suffixes on the raw text color.
@@ -2508,8 +2778,10 @@ var FormEngineImpl = function (_a) {
2508
2778
  var cFaint = "".concat(cMuted, "99");
2509
2779
  var cDivider = "".concat(cText, "14");
2510
2780
  var cHover = "".concat(cText, "0d");
2511
- var cDanger = ((_c = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _c === void 0 ? void 0 : _c.danger) || '#e35a5a';
2512
- var cWarning = ((_d = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _d === void 0 ? void 0 : _d.warning) || '#ffdf34';
2781
+ // Calm: the intents as words that read on the section surface, not the
2782
+ // theme's fills (see `getCalmIntentText`). Dots and edges take them too.
2783
+ var cDanger = calm ? (0, formAppearance_1.getCalmIntentText)(theme, 'danger') : ((_c = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _c === void 0 ? void 0 : _c.danger) || '#e35a5a';
2784
+ var cWarning = calm ? (0, formAppearance_1.getCalmIntentText)(theme, 'warning') : ((_d = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _d === void 0 ? void 0 : _d.warning) || '#ffdf34';
2513
2785
  var cInfo = ((_f = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _f === void 0 ? void 0 : _f.info) || '#3b8eea';
2514
2786
  var cSuccess = ((_g = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _g === void 0 ? void 0 : _g.success) || '#36b37e';
2515
2787
  // the rows' own words and marks, in colors that read on every surface a row is drawn on
@@ -2527,6 +2799,14 @@ var FormEngineImpl = function (_a) {
2527
2799
  // The "N more fields" row's dashed edge. Well above the divider tint: this
2528
2800
  // one is an affordance the reader has to notice, not a hairline between rows.
2529
2801
  var cMoreBorder = "".concat(cText, "4d");
2802
+ // Calm: the section surface and its hairline, from the theme's panel (the
2803
+ // same surface and edge Reqore gives the section panels themselves).
2804
+ var cPanel = (0, formAppearance_1.getCalmPanelSurface)(theme);
2805
+ var cHairline = (0, formAppearance_1.getCalmPanelHairline)(theme);
2806
+ /* An open field's card pins its heading while its long body is read (`compactStickyCardHeaders`), on the surface
2807
+ the status box headers pin on. A nested sub-form's card sits in the parent's card, whose heading pins instead. */
2808
+ var stickyCardHeaders = compact && compactStickyCardHeaders && !compactNested;
2809
+ var pinnedHeaderSurface = calm ? cPanel : (0, colors_1.getMainBackgroundColor)(theme);
2530
2810
  // The closure surface the extracted CompactRow reads through context. Refs and
2531
2811
  // setters are stable; the state/memo/handler fields change identity as they do
2532
2812
  // today, so a row re-renders exactly when its inputs do.
@@ -2544,10 +2824,17 @@ var FormEngineImpl = function (_a) {
2544
2824
  codeEditor: componentOverrides === null || componentOverrides === void 0 ? void 0 : componentOverrides['code-editor'],
2545
2825
  readSummaries: readSummaries,
2546
2826
  cardEditorTypes: cardEditorTypes,
2827
+ stickyCardHeaders: stickyCardHeaders,
2828
+ stickyHostOffset: compactStickyOffset,
2829
+ pinnedHeaderSurface: pinnedHeaderSurface,
2547
2830
  showAllDescriptions: showAllDescriptions,
2548
2831
  expandedOptions: expandedOptions,
2832
+ alwaysExpandedOptions: alwaysExpandedOptions,
2833
+ visitedOptions: visitedOptions,
2834
+ revealRequired: revealRequired,
2549
2835
  highlightedOptions: highlightedOptions,
2550
2836
  flashedOptions: flashedOptions,
2837
+ flashGeneration: flashGeneration,
2551
2838
  infoPanelOverrides: infoPanelOverrides,
2552
2839
  setHighlightedOptions: setHighlightedOptions,
2553
2840
  setInfoPanelOverrides: setInfoPanelOverrides,
@@ -2596,10 +2883,17 @@ var FormEngineImpl = function (_a) {
2596
2883
  componentOverrides,
2597
2884
  readSummaries,
2598
2885
  cardEditorTypes,
2886
+ stickyCardHeaders,
2887
+ compactStickyOffset,
2888
+ pinnedHeaderSurface,
2599
2889
  showAllDescriptions,
2600
2890
  expandedOptions,
2891
+ alwaysExpandedOptions,
2892
+ visitedOptions,
2893
+ revealRequired,
2601
2894
  highlightedOptions,
2602
2895
  flashedOptions,
2896
+ flashGeneration,
2603
2897
  infoPanelOverrides,
2604
2898
  setHighlightedOptions,
2605
2899
  setInfoPanelOverrides,
@@ -2641,13 +2935,22 @@ var FormEngineImpl = function (_a) {
2641
2935
  var compactToolbarParts = (0, react_2.useMemo)(function () {
2642
2936
  if (compactToolbar === false)
2643
2937
  return null;
2938
+ // A calm sub-form nested in a row (a list item, a hash field) draws only its
2939
+ // fields. Its readiness is said once, by the item it sits in, and each row
2940
+ // says what it lacks; a search over two to six fields helps nobody, and one
2941
+ // per item stacked a second search box under the form's own for every item.
2942
+ if (calm && compactNested)
2943
+ return null;
2644
2944
  var all = { completion: true, search: true, fields: true, help: true };
2645
2945
  return compactToolbar === true ? all : __assign(__assign({}, all), compactToolbar);
2646
- }, [JSON.stringify(compactToolbar)]);
2946
+ }, [JSON.stringify(compactToolbar), calm, compactNested]);
2647
2947
  var compactToolbarContextValue = (0, react_2.useMemo)(function () { return ({
2648
2948
  readOnly: readOnly,
2649
2949
  invalidCount: (0, size_1.default)(validityData.invalidFields),
2650
- attentionCount: readFirstAttentionCount,
2950
+ attentionCount: readFirstAttentionCount + readFirstFaultsOutsideBox,
2951
+ attentionFaultCount: readFirstAttentionFaultCount + readFirstFaultsOutsideBox,
2952
+ outsideAttentionCount: outsideAttentionCount,
2953
+ onRevealOutside: outsideAttention === null || outsideAttention === void 0 ? void 0 : outsideAttention.onReveal,
2651
2954
  completion: readFirstCompletion,
2652
2955
  showInvalidOnly: showInvalidOptionsOnly,
2653
2956
  onToggleInvalidOnly: handleToggleInvalidOnly,
@@ -2694,6 +2997,8 @@ var FormEngineImpl = function (_a) {
2694
2997
  onReadOnlyActivate,
2695
2998
  validityData,
2696
2999
  readFirstAttentionCount,
3000
+ readFirstAttentionFaultCount,
3001
+ readFirstFaultsOutsideBox,
2697
3002
  readFirstCompletion,
2698
3003
  showInvalidOptionsOnly,
2699
3004
  handleToggleInvalidOnly,
@@ -2723,8 +3028,22 @@ var FormEngineImpl = function (_a) {
2723
3028
  // removes it, and then the header carries just the consumer's own actions.
2724
3029
  var compactHeaderActions = (0, react_2.useMemo)(function () { return __spreadArray(__spreadArray([], (compactToolbarParts ? [{ as: CompactToolbar_1.CompactToolbar, responsive: false }] : []), true), ((compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.actions) || []), true); }, [compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.actions, compactToolbarParts]);
2725
3030
  var renderCompact = function () {
2726
- var _a, _b, _c, _d;
2727
- var headerBg = "".concat((0, colors_1.changeDarkness)((0, colors_1.getMainBackgroundColor)(theme), 0.02)).concat((0, colors_1.percentToHexAlpha)(88));
3031
+ var _a, _b, _c, _d, _f;
3032
+ /* The rows of this render, each drawn at the stage into its own node; the boxes draw places for them
3033
+ (`renderRow`). A row that changes box is moved, not drawn anew (`rowPlaces`). */
3034
+ var stagedRows = new Map();
3035
+ // Whether the box being drawn shows its rows: a collapsed one keeps only their places (`useOpenBoxes`)
3036
+ var drawingRows = true;
3037
+ // Calm: the host's own color (see `compactHostColour`), so the pinned
3038
+ // toolbar is invisible until something scrolls under it - and opaque, so
3039
+ // what scrolls under it does not read through. At 88% with a blur the rows
3040
+ // still showed through crisply around the readiness line and the search
3041
+ // wherever the blur did not apply (headless captures, a browser or a
3042
+ // compositor without backdrop-filter): the blur was never something to
3043
+ // count on, the host's color is.
3044
+ var headerBg = calm && compactHostColour ? "rgb(".concat(compactHostColour.join(', '), ")")
3045
+ : calm ? (0, colors_1.getMainBackgroundColor)(theme)
3046
+ : "".concat((0, colors_1.changeDarkness)((0, colors_1.getMainBackgroundColor)(theme), 0.02)).concat((0, colors_1.percentToHexAlpha)(88));
2728
3047
  // Toolbar filters narrow the listed rows; the meter reflects the full set.
2729
3048
  var query = compactQuery.trim().toLowerCase();
2730
3049
  var matchesQuery = function (optionName) { var _a; return !query || (((_a = options === null || options === void 0 ? void 0 : options[optionName]) === null || _a === void 0 ? void 0 : _a.display_name) || optionName).toLowerCase().includes(query); };
@@ -2754,23 +3073,11 @@ var FormEngineImpl = function (_a) {
2754
3073
  // skipped. Dropping them from the buckets instead would leave the meter
2755
3074
  // ("13/18 set", computed from `availableOptions`) disagreeing with the box
2756
3075
  // badge beside it, which counts row entries.
2757
- var absorbedBy = {};
2758
- (0, lodash_1.forEach)(options, function (option, optionName) {
2759
- var absorb = option === null || option === void 0 ? void 0 : option.absorb_fields;
2760
- // A read-only form absorbs nothing. A host row shows an absorbed
2761
- // sibling only inside its EDITOR, and a read view never opens one — so
2762
- // the language a code field had absorbed would be nowhere on the page.
2763
- // Every set field gets a row of its own instead.
2764
- if (!(absorb === null || absorb === void 0 ? void 0 : absorb.length) || readOnly)
2765
- return;
2766
- absorb.forEach(function (absorbedName) {
2767
- // Only absorb a sibling that exists and is not already spoken for; a
2768
- // schema naming a missing field must not make the field disappear.
2769
- if ((options === null || options === void 0 ? void 0 : options[absorbedName]) && !absorbedBy[absorbedName]) {
2770
- absorbedBy[absorbedName] = optionName;
2771
- }
2772
- });
2773
- });
3076
+ // A read-only form absorbs nothing. A host row shows an absorbed
3077
+ // sibling only inside its EDITOR, and a read view never opens one — so
3078
+ // the language a code field had absorbed would be nowhere on the page.
3079
+ // Every set field gets a row of its own instead.
3080
+ var absorbedBy = readOnly ? {} : absorbingHosts;
2774
3081
  // Group the options by their raw `group` key, remembering the order groups
2775
3082
  // first appear in the schema. Each row carries a `hidden` flag.
2776
3083
  var groupOrder = [];
@@ -2858,20 +3165,32 @@ var FormEngineImpl = function (_a) {
2858
3165
  set: [],
2859
3166
  optional: [],
2860
3167
  };
2861
- // Freeze the box of any field currently being edited (or whose one-of group
2862
- // has an edited member) to its last settled box — so finishing an edit that
2863
- // flips its status doesn't remount it in another box and steal focus.
2864
- var stableBucketOf = function (entry) {
3168
+ /* A box a row being edited cannot move into: a closed one - collapsed on screen, by the form or the reader,
3169
+ or not drawn yet and to be drawn collapsed (Optional, with no search). The row's place there is not in the
3170
+ page, so the row would leave it, and the caret with it. */
3171
+ var boxIsClosed = function (box) {
2865
3172
  var _a;
3173
+ if (readOnly || (calm && compactNested))
3174
+ return false;
3175
+ if ((_a = statusBoxRefs.current[box]) === null || _a === void 0 ? void 0 : _a.isConnected)
3176
+ return !openBoxes.isShown(box);
3177
+ return (compactCollapsedGroupsProp !== null && compactCollapsedGroupsProp !== void 0 ? compactCollapsedGroupsProp : ['optional']).includes(box) && !query;
3178
+ };
3179
+ /* A row's box is what it holds now - the one rule the box headers, the readiness line, the meter and the
3180
+ host's numbers count by (`getOptionBucket`). A row being edited moves with it: it is the same row in its new
3181
+ box, its editor and caret kept (`rowPlaces`), where it was kept in the box it was opened in, and counted
3182
+ elsewhere. Into a closed box it does not move until it is closed: an optional value cleared
3183
+ as it is edited stays under the caret, not in a collapsed Optional box. `settledBucket` is the box a row is
3184
+ shown in, which is what follows a field across the boxes (the flash below). */
3185
+ var stableBucketOf = function (entry) {
2866
3186
  var fresh = getOptionBucket(entry.name, entry.hidden);
2867
- var groupBeingEdited = !entry.hidden &&
2868
- (((_a = options === null || options === void 0 ? void 0 : options[entry.name]) === null || _a === void 0 ? void 0 : _a.required_groups) || []).some(function (g) {
2869
- return (requiredGroupsInfo.members[g] || []).some(function (m) { return expandedOptions.includes(m); });
2870
- });
2871
- if (!entry.hidden && (expandedOptions.includes(entry.name) || groupBeingEdited)) {
2872
- var memo = settledBucket.current[entry.name];
2873
- if (memo)
2874
- return memo;
3187
+ var shownIn = settledBucket.current[entry.name];
3188
+ if (shownIn &&
3189
+ shownIn !== fresh &&
3190
+ !entry.hidden &&
3191
+ expandedOptions.includes(entry.name) &&
3192
+ boxIsClosed(fresh)) {
3193
+ return shownIn;
2875
3194
  }
2876
3195
  settledBucket.current[entry.name] = fresh;
2877
3196
  return fresh;
@@ -2887,11 +3206,47 @@ var FormEngineImpl = function (_a) {
2887
3206
  return fresh;
2888
3207
  return fresh === 'optional' ? undefined : 'set';
2889
3208
  };
3209
+ /* A field the person never touched whose value is its default is not something they set: it is said under the
3210
+ form ("Uses Qore · Change", `DefaultsNote`), not listed as "Set". Not a field
3211
+ they have been to, opened, or chose to change; not one nobody can change, one whose value is an expression,
3212
+ or a structured value (a hash or a list, which its row summarises). */
3213
+ var defaultEntries = [];
3214
+ var isUntouchedDefault = function (name) {
3215
+ var schema = options === null || options === void 0 ? void 0 : options[name];
3216
+ if (!schema ||
3217
+ !('default_value' in schema) ||
3218
+ // a field nobody can change is a row, which says why (its lock)
3219
+ schema.disabled ||
3220
+ schema.readonly ||
3221
+ changedDefaults.includes(name) ||
3222
+ expandedOptions.includes(name) ||
3223
+ visitedOptions.includes(name)) {
3224
+ return false;
3225
+ }
3226
+ var fallback = (0, common_1.getDefaultValue)(schema);
3227
+ var field = availableOptions === null || availableOptions === void 0 ? void 0 : availableOptions[name];
3228
+ if (fallback === undefined || fallback === null || fallback === '' || !field) {
3229
+ return false;
3230
+ }
3231
+ if (field.is_expression) {
3232
+ return false;
3233
+ }
3234
+ /* A plain value only (text, a number, yes / no, a choice): "Uses 3 fields for Connection" would say
3235
+ nothing that a hash or a list's own row does not say better. */
3236
+ if (typeof fallback === 'object') {
3237
+ return false;
3238
+ }
3239
+ return (0, lodash_1.isEqual)(field.value, fallback);
3240
+ };
2890
3241
  groupKeys.forEach(function (groupName) {
2891
3242
  grouped[groupName].forEach(function (entry) {
2892
3243
  var b = readBucketOf(entry);
2893
3244
  if (!b)
2894
3245
  return;
3246
+ if (b === 'set' && !entry.hidden && isUntouchedDefault(entry.name)) {
3247
+ defaultEntries.push(entry);
3248
+ return;
3249
+ }
2895
3250
  if (!buckets[b][groupName]) {
2896
3251
  buckets[b][groupName] = [];
2897
3252
  bucketGroups[b].push(groupName);
@@ -2953,21 +3308,29 @@ var FormEngineImpl = function (_a) {
2953
3308
  var stickyBoxHeaders = compactStickyBoxHeaders && !compactNested;
2954
3309
  var boxStickyOffset = compactStickyOffset + compactToolbarHeight;
2955
3310
  var STATUS_BOXES = [
2956
- {
2957
- key: 'attention',
2958
- label: (_a = compactBoxLabels === null || compactBoxLabels === void 0 ? void 0 : compactBoxLabels.attention) !== null && _a !== void 0 ? _a : feWords.boxAttention,
2959
- intent: 'warning',
2960
- icon: 'ErrorWarningLine',
2961
- },
3311
+ // The first box is amber only once something in it is a fault. On a new form it
3312
+ // holds the required fields still to fill in, which is not yet anything wrong.
3313
+ readFirstAttentionFaultCount ?
3314
+ {
3315
+ key: 'attention',
3316
+ label: (_a = compactBoxLabels === null || compactBoxLabels === void 0 ? void 0 : compactBoxLabels.attention) !== null && _a !== void 0 ? _a : feWords.boxAttention,
3317
+ intent: 'warning',
3318
+ icon: 'ErrorWarningLine',
3319
+ }
3320
+ : {
3321
+ key: 'attention',
3322
+ label: (_b = compactBoxLabels === null || compactBoxLabels === void 0 ? void 0 : compactBoxLabels.pending) !== null && _b !== void 0 ? _b : feWords.boxPending,
3323
+ icon: 'CheckboxBlankCircleLine',
3324
+ },
2962
3325
  {
2963
3326
  key: 'set',
2964
- label: (_b = compactBoxLabels === null || compactBoxLabels === void 0 ? void 0 : compactBoxLabels.set) !== null && _b !== void 0 ? _b : feWords.boxSet,
3327
+ label: (_c = compactBoxLabels === null || compactBoxLabels === void 0 ? void 0 : compactBoxLabels.set) !== null && _c !== void 0 ? _c : feWords.boxSet,
2965
3328
  intent: 'success',
2966
3329
  icon: 'CheckLine',
2967
3330
  },
2968
3331
  {
2969
3332
  key: 'optional',
2970
- label: (_c = compactBoxLabels === null || compactBoxLabels === void 0 ? void 0 : compactBoxLabels.optional) !== null && _c !== void 0 ? _c : feWords.boxOptional,
3333
+ label: (_d = compactBoxLabels === null || compactBoxLabels === void 0 ? void 0 : compactBoxLabels.optional) !== null && _d !== void 0 ? _d : feWords.boxOptional,
2971
3334
  icon: 'CheckboxBlankCircleLine',
2972
3335
  },
2973
3336
  ];
@@ -2981,7 +3344,17 @@ var FormEngineImpl = function (_a) {
2981
3344
  return Object.keys(absorbedBy).filter(function (absorbedName) { return absorbedBy[absorbedName] === hostName; });
2982
3345
  };
2983
3346
  var renderGroupRows = function (names) {
2984
- var renderRow = function (entry, clustered, clusterFirst, clusterLast) { return ((0, jsx_runtime_1.jsx)(CompactRow_1.CompactRow, { optionName: entry.name, optionField: entry.hidden ?
3347
+ var renderRow = function (entry, clustered, clusterFirst, clusterLast) {
3348
+ // a row is in one place at a time
3349
+ if (stagedRows.has(entry.name))
3350
+ return null;
3351
+ var host = rowHosts.hostFor(entry.name);
3352
+ if (drawingRows) {
3353
+ stagedRows.set(entry.name, (0, rowPlaces_1.stagedRow)(drawRow(entry, clustered, clusterFirst, clusterLast), host, entry.name));
3354
+ }
3355
+ return (0, jsx_runtime_1.jsx)(rowPlaces_1.RowPlace, { host: host }, entry.name);
3356
+ };
3357
+ var drawRow = function (entry, clustered, clusterFirst, clusterLast) { return ((0, jsx_runtime_1.jsx)(CompactRow_1.CompactRow, { optionName: entry.name, optionField: entry.hidden ?
2985
3358
  {
2986
3359
  type: getOptionSchemaStorageType(options === null || options === void 0 ? void 0 : options[entry.name], isRendererOnly),
2987
3360
  value: undefined,
@@ -3017,7 +3390,13 @@ var FormEngineImpl = function (_a) {
3017
3390
  // "Covers"/"Covered by" chips already say which member satisfies it.
3018
3391
  if (requiredGroupsInfo.satisfiedBy[grp])
3019
3392
  return railed;
3020
- 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 } }), feWords.oneOfRequired] }), railed] }, grp));
3393
+ // Amber once someone has been to the group (or a submit was attempted); until
3394
+ // then it is still to fill in, in the quiet color, like its members.
3395
+ var clusterVisited = memberEntries.some(function (e) { return getOptionStatus(e.name) !== 'pending'; });
3396
+ var clusterColor = clusterVisited ? cWarning : cMuted;
3397
+ // its words and mark: the same color, in the shade of it that reads on the tint
3398
+ var clusterInk = clusterVisited ? rowInks.warning : rowInks.mutedReason;
3399
+ return ((0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledRequiredClusterBox, { className: 'options-readfirst-required-cluster', "$border": "".concat(clusterColor, "33"), "$tint": "".concat(clusterColor, "0d"), "$calm": calm, children: [(0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledRequiredClusterHeader, { className: 'options-readfirst-required-cluster-header', "$color": clusterInk, "$calm": calm, children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreIcon, { icon: 'LinkM', size: calm ? '13px' : '11px', style: { color: clusterInk } }), feWords.oneOfRequired] }), railed] }, grp));
3021
3400
  });
3022
3401
  };
3023
3402
  // One schema group inside a status box: its thin sub-label, the group's
@@ -3028,32 +3407,115 @@ var FormEngineImpl = function (_a) {
3028
3407
  can be split across the shown and folded halves of a capped box, and its
3029
3408
  label must appear above whichever half holds its first row. */
3030
3409
  var renderBoxGroup = function (boxKey, groupName, only) {
3031
- var groupConfig = groups === null || groups === void 0 ? void 0 : groups[groupName];
3032
3410
  var rows = only ?
3033
3411
  (buckets[boxKey][groupName] || []).filter(function (entry) { return only.has(entry.name); })
3034
3412
  : buckets[boxKey][groupName];
3035
3413
  if (only && !rows.length) {
3036
3414
  return null;
3037
3415
  }
3416
+ return renderGroupBlock(groupName, rows);
3417
+ };
3418
+ /** A group's sub-label, subtitle and rows. `key` tells two halves of one
3419
+ group apart when both render in the same body. */
3420
+ var renderGroupBlock = function (groupName, rows, key) {
3421
+ if (key === void 0) { key = groupName; }
3422
+ var groupConfig = groups === null || groups === void 0 ? void 0 : groups[groupName];
3038
3423
  return ((0, jsx_runtime_1.jsxs)(react_2.default.Fragment, { children: [showGroupSubLabel(groupName) ?
3039
- (0, jsx_runtime_1.jsx)(compactRowStyles_1.StyledStatusBoxGroupLabel, { children: (0, readFirst_1.getOptionGroupLabel)(groupName, groups) })
3424
+ (0, jsx_runtime_1.jsx)(compactRowStyles_1.StyledStatusBoxGroupLabel, { className: 'options-readfirst-group-label', "$calm": calm, "$color": cKey, children: (0, readFirst_1.getOptionGroupLabel)(groupName, groups) })
3040
3425
  : null, showGroupSubLabel(groupName) && (groupConfig === null || groupConfig === void 0 ? void 0 : groupConfig.subtitle) ?
3041
- (0, jsx_runtime_1.jsx)(reqore_1.ReqoreP, { size: 'small', effect: { opacity: 0.6 }, style: {
3042
- marginTop: 2,
3043
- marginBottom: 8,
3044
- marginLeft: compactRowStyles_1.GROUP_INDENT,
3045
- paddingRight: 10,
3046
- }, children: groupConfig.subtitle })
3047
- : null, renderGroupRows(rows)] }, groupName));
3426
+ (0, jsx_runtime_1.jsx)(reqore_1.ReqoreP, { className: 'options-readfirst-group-subtitle', size: 'small', effect: { opacity: 0.6 }, style: calm ?
3427
+ // Under the calm heading, at the rows' inset; the space below
3428
+ // it is the next row's own padding.
3429
+ { margin: 0, padding: "2px ".concat(compactRowStyles_1.CALM_INSET, " 4px") }
3430
+ : {
3431
+ marginTop: 2,
3432
+ marginBottom: 8,
3433
+ marginLeft: compactRowStyles_1.GROUP_INDENT,
3434
+ paddingRight: 10,
3435
+ }, children: groupConfig.subtitle })
3436
+ : null, renderGroupRows(rows)] }, key));
3437
+ };
3438
+ /** The "N more fields" control: a quiet last row of the body it folds. */
3439
+ var renderMoreRow = function (boxKey, count, open) { return ((0, jsx_runtime_1.jsxs)("button", { type: 'button', className: 'readfirst-row readfirst-more-row options-readfirst-more', "aria-expanded": open, onClick: function () {
3440
+ return setExpandedMoreBoxes(function (prev) {
3441
+ return prev.includes(boxKey) ? prev.filter(function (k) { return k !== boxKey; }) : __spreadArray(__spreadArray([], prev, true), [boxKey], false);
3442
+ });
3443
+ }, children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreP, { size: 'small', effect: { opacity: 0.8 }, children: open ? feWords.showFewer : feWords.moreFields(count, boxKey === 'optional') }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreIcon, { icon: 'ArrowDownSLine', size: 'small', className: 'readfirst-more-chevron', effect: { opacity: 0.8 } })] })); };
3444
+ var groupBodyProps = {
3445
+ $calm: calm,
3446
+ $hairline: cHairline,
3447
+ $divider: cDivider,
3448
+ $hover: cHover,
3449
+ // The keyboard's ring in the one ring color every control shares; amber said a good row was at fault
3450
+ $focus: (0, readableColors_1.getFocusRingColor)(theme),
3451
+ // Calm: the text color's wash, as a hovered row has; amber would say the group is wrong (a satisfied one
3452
+ // stayed amber under the pointer)
3453
+ $groupHighlight: calm ? cHover : "".concat(cWarning, "1f"),
3454
+ $success: cSuccess,
3455
+ $rowBg: cRowBg,
3456
+ $lineColor: cGroupLine,
3457
+ $moreBorder: cMoreBorder,
3458
+ };
3459
+ /* Calm, nested in a row (a list item, a hash field's sub-form): the item is
3460
+ already the card, so its fields sit in it directly instead of in status
3461
+ boxes, which drew a card inside the card. In schema order, so a row does
3462
+ not move to another box under the caret as it is filled; a row that lacks
3463
+ a value still says so where the value would be. The fields nobody has
3464
+ added fold behind one quiet last row, the same control a capped box ends
3465
+ with — and when nothing else is listed they ARE the form, so they show. */
3466
+ var renderNestedRows = function () {
3467
+ // Fields with no named group are one list here. The engine files them under
3468
+ // two synthetic keys (the required ones and the rest), which the boxes
3469
+ // never showed; in one list that split put a set Description above an
3470
+ // empty Method Name. Named groups keep their sub-labels and their order.
3471
+ var UNLABELLED = '';
3472
+ var keyOf = function (groupName) { return (showGroupSubLabel(groupName) ? groupName : UNLABELLED); };
3473
+ var nestedKeys = (0, lodash_1.uniq)(groupKeys.map(keyOf));
3474
+ var listedByGroup = {};
3475
+ var addableByGroup = {};
3476
+ groupKeys.forEach(function (groupName) {
3477
+ grouped[groupName].forEach(function (entry) {
3478
+ var _a;
3479
+ var target = entry.hidden ? addableByGroup : listedByGroup;
3480
+ (target[_a = keyOf(groupName)] || (target[_a] = [])).push(entry);
3481
+ });
3482
+ });
3483
+ // In the schema's order, not the order the values arrived in.
3484
+ var schemaOrder = Object.keys(options || {});
3485
+ var bySchema = function (a, b) {
3486
+ return schemaOrder.indexOf(a.name) - schemaOrder.indexOf(b.name);
3487
+ };
3488
+ (0, lodash_1.forEach)(listedByGroup, function (rows) { return rows.sort(bySchema); });
3489
+ (0, lodash_1.forEach)(addableByGroup, function (rows) { return rows.sort(bySchema); });
3490
+ var renderNestedGroup = function (key, rows, half) {
3491
+ return key === UNLABELLED ?
3492
+ (0, jsx_runtime_1.jsx)(react_2.default.Fragment, { children: renderGroupRows(rows) }, "".concat(half, "-fields"))
3493
+ : renderGroupBlock(key, rows, "".concat(half, "-").concat(key));
3494
+ };
3495
+ var listedGroups = nestedKeys.filter(function (key) { var _a; return (_a = listedByGroup[key]) === null || _a === void 0 ? void 0 : _a.length; });
3496
+ var addableGroups = nestedKeys.filter(function (key) { var _a; return (_a = addableByGroup[key]) === null || _a === void 0 ? void 0 : _a.length; });
3497
+ var addableCount = addableGroups.reduce(function (total, key) { return total + addableByGroup[key].length; }, 0);
3498
+ var folds = listedGroups.length > 0;
3499
+ var addableOpen = !folds || expandedMoreBoxes.includes('optional');
3500
+ return ((0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledGroupBody, __assign({}, groupBodyProps, { className: "readfirst-nested-list ".concat(compactNarrowClass).trim(), children: [listedGroups.map(function (key) { return renderNestedGroup(key, listedByGroup[key], 'listed'); }), folds && addableCount ? renderMoreRow('optional', addableCount, addableOpen) : null, addableOpen ?
3501
+ addableGroups.map(function (key) { return renderNestedGroup(key, addableByGroup[key], 'addable'); })
3502
+ : null] })));
3048
3503
  };
3049
- return ((0, jsx_runtime_1.jsx)(optionsContext_1.OptionsContext.Provider, { value: { schema: options, value: availableOptions }, children: (0, jsx_runtime_1.jsx)(compactRowContext_1.CompactRowContext.Provider, { value: compactRowContextValue, children: (0, jsx_runtime_1.jsxs)(reqore_1.ReqoreErrorBoundary, { children: [showHelpForOption && ((0, jsx_runtime_1.jsx)(OptionsHelpDialog_1.OptionsHelpDialog, { onClose: function () { return setShowHelpForOption(undefined); }, option: options[showHelpForOption] })), (0, jsx_runtime_1.jsx)(compactToolbarContext_1.CompactToolbarContext.Provider, { value: compactToolbarContextValue, children: (0, jsx_runtime_1.jsxs)(StyledCompactWrap, { ref: setCompactWrap, className: 'options-readfirst-scroll', "$ownScroll": compactScroll === 'own' && !compactNested, children: [(0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledCompactPanel
3504
+ return ((0, jsx_runtime_1.jsx)(optionsContext_1.OptionsContext.Provider, { value: optionsContextValue, children: (0, jsx_runtime_1.jsx)(compactRowContext_1.CompactRowContext.Provider, { value: compactRowContextValue, children: (0, jsx_runtime_1.jsxs)(reqore_1.ReqoreErrorBoundary, { children: [showHelpForOption && ((0, jsx_runtime_1.jsx)(OptionsHelpDialog_1.OptionsHelpDialog, { onClose: function () { return setShowHelpForOption(undefined); }, option: options[showHelpForOption] })), (0, jsx_runtime_1.jsx)(compactToolbarContext_1.CompactToolbarContext.Provider, { value: compactToolbarContextValue, children: (0, jsx_runtime_1.jsxs)(StyledCompactWrap, { ref: setCompactWrap, className: 'options-readfirst-scroll', "$ownScroll": compactScroll === 'own' && !compactNested, children: [(0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledCompactPanel
3050
3505
  // Mirrors the toolbar's own search-row gate: when no search
3051
3506
  // row renders, the header is a thin strip and sits tight to
3052
3507
  // the first status box (see StyledCompactPanel).
3053
- , __assign({ "$tightHeader": !((compactToolbarParts === null || compactToolbarParts === void 0 ? void 0 : compactToolbarParts.search) && (0, size_1.default)(options) > 1), "$headerBg": compactNested ? 'transparent' : headerBg, "$nested": compactNested, "$stickyBoxes": compactStickyBoxHeaders && !compactNested, "$stackHeader": compactNarrow &&
3508
+ , __assign({ "$tightHeader": !((compactToolbarParts === null || compactToolbarParts === void 0 ? void 0 : compactToolbarParts.search) && (0, size_1.default)(options) > 1), "$headerBg": compactNested ? 'transparent' : headerBg, "$nested": compactNested, "$calm": calm, "$stickyBoxes": compactStickyBoxHeaders || stickyCardHeaders, "$letPin": !compactNested, "$stackHeader": compactNarrow &&
3054
3509
  !!((compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.label) ||
3055
3510
  (compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.icon) ||
3056
- ((_d = compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.actions) === null || _d === void 0 ? void 0 : _d.length)), flat: true, raised: true, minimal: true,
3511
+ ((_f = compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.actions) === null || _f === void 0 ? void 0 : _f.length)), flat: true,
3512
+ // Calm: no surface and no lift at all. A theme that gives
3513
+ // panels a surface of their own (Reqore's `theme.panel`) would
3514
+ // otherwise paint this wrapper as a card around the section
3515
+ // cards inside it. Transparent and un-raised, Reqore also drops
3516
+ // the wrapper's horizontal padding, so the readiness line, the
3517
+ // search and the sections share one left edge with the host.
3518
+ raised: !calm, minimal: true, transparent: calm || undefined,
3057
3519
  // No panel background: the form sits transparently on whatever
3058
3520
  // hosts it (page, drawer, or — for an arg_schema field — the
3059
3521
  // parent's edit card) instead of stacking its own dark surface.
@@ -3105,117 +3567,187 @@ var FormEngineImpl = function (_a) {
3105
3567
  (0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { flat: true, opaque: false, size: 'small', children: readOnly && !query ? feWords.nothingSet : feWords.noFieldsMatch })
3106
3568
  : null, readOnly ?
3107
3569
  bucketCount('set') ?
3108
- (0, jsx_runtime_1.jsx)("div", { className: 'options-readfirst-read', style: { padding: '4px 4px 6px' }, children: (0, jsx_runtime_1.jsx)(compactRowStyles_1.StyledGroupBody, { "$divider": cDivider, "$hover": cHover, "$focus": cWarning, "$success": cSuccess, "$rowBg": cRowBg, "$lineColor": cGroupLine, "$moreBorder": cMoreBorder, className: compactNarrow ? 'readfirst-narrow' : undefined, children: bucketGroups.set.map(function (groupName) { return renderBoxGroup('set', groupName); }) }) })
3570
+ (0, jsx_runtime_1.jsx)("div", { className: 'options-readfirst-read', style: { padding: calm ? 0 : '4px 4px 6px' }, children: (0, jsx_runtime_1.jsx)(compactRowStyles_1.StyledGroupBody, __assign({}, groupBodyProps, { className: "readfirst-read-list ".concat(compactNarrowClass).trim(), children: bucketGroups.set.map(function (groupName) { return renderBoxGroup('set', groupName); }) })) })
3109
3571
  : null
3110
- : STATUS_BOXES.map(function (box) {
3111
- var groupsInBox = bucketGroups[box.key];
3112
- var count = bucketCount(box.key);
3113
- if (!count)
3114
- return null;
3115
- var hasPreselectedRows = boxHasPreselectedRows(box.key);
3116
- var wouldCollapse = compactCollapsedGroups.includes(box.key) &&
3117
- !query &&
3118
- !(box.key === 'optional' && onlyOptionalRows && !collapsedGroupsRequested);
3119
- // Only a box that was opened SOLELY to reveal a preselected
3120
- // row splits its body; a box that renders open anyway shows
3121
- // all of its groups as before.
3122
- var splitForPreselected = wouldCollapse && hasPreselectedRows;
3123
- // Which rows this box shows, and which fold away, decided at
3124
- // ROW level because `maxFieldsShown` counts fields — a
3125
- // group-level split can only ever cut at a group boundary.
3126
- // Group order is preserved so the visible rows read in the
3127
- // same order they would if nothing were folded.
3128
- var orderedRows = groupsInBox.flatMap(function (groupName) { return buckets[box.key][groupName] || []; });
3129
- // Optional's own rule first: a box opened solely to reveal
3130
- // preselected rows offers those, not an arbitrary first-N.
3131
- var candidateRows = splitForPreselected ? orderedRows.filter(isPreselectedRow) : orderedRows;
3132
- // …then the cap applies to whatever that left.
3133
- var capped = maxFieldsShown !== undefined && candidateRows.length > maxFieldsShown;
3134
- var shownRows = capped ? candidateRows.slice(0, maxFieldsShown) : candidateRows;
3135
- var shownRowSet = new Set(shownRows.map(function (entry) { return entry.name; }));
3136
- // Everything the box holds that is not on show. Once the
3137
- // reader asks for more they get the whole box — withholding
3138
- // the non-preselected remainder behind a second control is
3139
- // the same defect one level down.
3140
- var deferredRowSet = new Set(orderedRows
3141
- .filter(function (entry) { return !shownRowSet.has(entry.name); })
3142
- .map(function (entry) { return entry.name; }));
3143
- var deferredCount = deferredRowSet.size;
3144
- var shownGroups = groupsInBox.filter(function (groupName) {
3145
- return (buckets[box.key][groupName] || []).some(function (entry) {
3146
- return shownRowSet.has(entry.name);
3572
+ : calm && compactNested ? renderNestedRows()
3573
+ : STATUS_BOXES.map(function (box) {
3574
+ var groupsInBox = bucketGroups[box.key];
3575
+ var count = bucketCount(box.key);
3576
+ if (!count)
3577
+ return null;
3578
+ /* A row being edited is on show in the box it is in: neither the preselected split
3579
+ nor a cap folds it away (it moves only into an open box - `boxIsClosed`). */
3580
+ var isOpenRow = function (entry) { return expandedOptions.includes(entry.name); };
3581
+ var hasPreselectedRows = boxHasPreselectedRows(box.key);
3582
+ var wouldCollapse = compactCollapsedGroups.includes(box.key) &&
3583
+ !query &&
3584
+ !(box.key === 'optional' && onlyOptionalRows && !collapsedGroupsRequested);
3585
+ // Only a box that was opened SOLELY to reveal a preselected
3586
+ // row splits its body; a box that renders open anyway shows
3587
+ // all of its groups as before.
3588
+ var splitForPreselected = wouldCollapse && hasPreselectedRows;
3589
+ var opensCollapsed = wouldCollapse && !hasPreselectedRows;
3590
+ // Its rows are drawn while it is open: as the form opens it, or as the reader just
3591
+ // did (the reveal below needs them in the box it scrolls to), or as its content says
3592
+ drawingRows = openBoxes.drawsRows(box.key, !opensCollapsed || openedStatusBox === box.key);
3593
+ // Which rows this box shows, and which fold away, decided at
3594
+ // ROW level because `maxFieldsShown` counts fields — a
3595
+ // group-level split can only ever cut at a group boundary.
3596
+ // Group order is preserved so the visible rows read in the
3597
+ // same order they would if nothing were folded.
3598
+ var orderedRows = groupsInBox.flatMap(function (groupName) { return buckets[box.key][groupName] || []; });
3599
+ // The number in the box's header counts the rows in it: what they
3600
+ // hold now, as the line and the host count them (a field being
3601
+ // edited moves box with its value - `stableBucketOf`).
3602
+ var headerCount = readOnly ? count : (orderedRows.filter(function (entry) { return getOptionBucket(entry.name, entry.hidden) === box.key; }).length);
3603
+ // Optional's own rule first: a box opened solely to reveal
3604
+ // preselected rows offers those, not an arbitrary first-N.
3605
+ var candidateRows = splitForPreselected ?
3606
+ orderedRows.filter(function (entry) { return isPreselectedRow(entry) || isOpenRow(entry); })
3607
+ : orderedRows;
3608
+ // …then the cap applies to whatever that left - but for a row being edited.
3609
+ var capped = maxFieldsShown !== undefined && candidateRows.length > maxFieldsShown;
3610
+ var shownRows = capped ?
3611
+ candidateRows.filter(function (entry, index) { return index < maxFieldsShown || isOpenRow(entry); })
3612
+ : candidateRows;
3613
+ var shownRowSet = new Set(shownRows.map(function (entry) { return entry.name; }));
3614
+ // Everything the box holds that is not on show. Once the
3615
+ // reader asks for more they get the whole box — withholding
3616
+ // the non-preselected remainder behind a second control is
3617
+ // the same defect one level down.
3618
+ var deferredRowSet = new Set(orderedRows
3619
+ .filter(function (entry) { return !shownRowSet.has(entry.name); })
3620
+ .map(function (entry) { return entry.name; }));
3621
+ var deferredCount = deferredRowSet.size;
3622
+ var shownGroups = groupsInBox.filter(function (groupName) {
3623
+ return (buckets[box.key][groupName] || []).some(function (entry) {
3624
+ return shownRowSet.has(entry.name);
3625
+ });
3147
3626
  });
3627
+ var deferredGroups = groupsInBox.filter(function (groupName) {
3628
+ return (buckets[box.key][groupName] || []).some(function (entry) { return !shownRowSet.has(entry.name); });
3629
+ });
3630
+ var moreOpen = Boolean(query) || expandedMoreBoxes.includes(box.key);
3631
+ var accent = box.key === 'attention' && readFirstAttentionFaultCount ? cWarning
3632
+ : box.key === 'set' ? cSuccess
3633
+ : cMuted;
3634
+ // The muted "Optional" box reads as a quieter, recessed
3635
+ // surface — a touch darker than the page rather than the
3636
+ // faint grey tint the accent would give.
3637
+ // Calm: every box is the same panel — no recessed one.
3638
+ var boxBg = box.key === 'optional' && !calm ?
3639
+ (0, colors_1.changeDarkness)((0, colors_1.getMainBackgroundColor)(theme), 0.06)
3640
+ : undefined;
3641
+ return ((0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledStatusBox, { "$accent": accent, "$bg": boxBg, "$calm": calm, "$surface": stickyBoxHeaders ?
3642
+ calm ? cPanel
3643
+ : (0, colors_1.getMainBackgroundColor)(theme)
3644
+ : undefined, ref: function (node) {
3645
+ statusBoxRefs.current[box.key] = node;
3646
+ },
3647
+ // Opening arms the reveal; collapsing disarms it, so a
3648
+ // close never scrolls.
3649
+ onCollapseChange: function (collapsed) {
3650
+ return setOpenedStatusBox(collapsed ? undefined : box.key);
3651
+ },
3652
+ // Calm: an ordinary panel — Reqore paints the theme's
3653
+ // panel surface and its hairline edge. The header stays
3654
+ // minimal (no surface or rule of its own); the first
3655
+ // row's hairline is the line under it.
3656
+ flat: !calm, minimal: true,
3657
+ /* The header stays on screen while its own box is
3658
+ being read — see `compactStickyBoxHeaders`. Sticky
3659
+ is bounded by its containing block, so the header
3660
+ leaves with its box and only one is ever pinned. */
3661
+ stickyHeader: stickyBoxHeaders, stickyHeaderOffset: stickyBoxHeaders ? boxStickyOffset : undefined, "$letPin": !stickyBoxHeaders, collapseButtonProps: { flat: true, minimal: true, size: 'small' }, collapsible: true,
3662
+ // Which boxes start closed is the consumer's call
3663
+ // (`compactCollapsedGroups`, default `['optional']`: the
3664
+ // Optional box holds every not-yet-added field, so a form
3665
+ // opens on what is in use). Two rules override it:
3666
+ //
3667
+ // A SEARCH forces every box open — ReqorePanel unmounts
3668
+ // collapsed content, so a match inside a closed box would
3669
+ // be unreachable. (isCollapsed is the panel's controllable
3670
+ // state; manual toggling still works with no query set.)
3671
+ //
3672
+ // The Optional box stays open when it is the ONLY box,
3673
+ // because collapsing it renders a card that looks empty and
3674
+ // broken: an auth profile's Authorization block, whose nine
3675
+ // requirement fields are all optional, showed as a titled
3676
+ // card containing one collapsed "Optional 9" strip and
3677
+ // nothing else. This does not generalise to the other two —
3678
+ // a lone Set box collapsed is a deliberate ask, and its
3679
+ // header still reports what is in there.
3680
+ //
3681
+ // A PRESELECTED row overrides it too: the schema asked
3682
+ // for that field to be visible on a new form, so the
3683
+ // box it lands in opens. The groups it does NOT appear
3684
+ // in stay behind an inner collapse below, so opening
3685
+ // the box reveals the preselected fields without also
3686
+ // dumping every not-yet-added optional field on the
3687
+ // author.
3688
+ isCollapsed: opensCollapsed, label: calm ?
3689
+ // One status dot and a word — and only where a
3690
+ // person is needed. The count is a quiet number.
3691
+ (0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledGroupHeader, { "$calm": true, children: [box.key === 'attention' && readFirstAttentionFaultCount ?
3692
+ (0, jsx_runtime_1.jsx)(compactRowStyles_1.StyledStatusDot, { className: 'options-readfirst-group-dot', "$color": cWarning, "aria-hidden": true })
3693
+ : null, (0, jsx_runtime_1.jsx)(reqore_1.ReqoreP, { effect: { weight: 'bold' }, size: 'normal', children: box.label }), headerCount ?
3694
+ (0, jsx_runtime_1.jsx)(reqore_1.ReqoreSpan, { className: 'options-readfirst-group-count', size: 'small', effect: { opacity: 0.65 }, children: headerCount })
3695
+ : null] })
3696
+ : (0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledGroupHeader, { children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreP, { effect: { weight: 'bold' }, size: 'normal', children: box.label }), headerCount ?
3697
+ (0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { size: 'small', minimal: true, compact: true, intent: box.intent, label: String(headerCount) })
3698
+ : null] }), icon: calm ? undefined : box.icon,
3699
+ /* ONE left edge: the title and the rows start where Reqore puts them.
3700
+ Reqore pads the title bar and the padded content by the same amount
3701
+ at their sides - its size's padding, or as much as clears the
3702
+ corner (#715) - and the rows add nothing to it: a calm body draws
3703
+ its rows full-bleed and takes their inset back (`$boxCorners`);
3704
+ a classic row's text sits its own padding into its pill, and the
3705
+ icon that starts the title moves in by as much. Neither knows what
3706
+ Reqore pads by: a title padded for the corner and rows padded by a
3707
+ number of their own were two edges (22px and 17px under a 14px
3708
+ corner). */
3709
+ iconProps: calm ? undefined : { style: { marginLeft: compactRowStyles_1.COMPACT_ROW_PAD_X } }, className: 'options-readfirst-group', contentStyle: calm ?
3710
+ {
3711
+ paddingTop: 0,
3712
+ paddingBottom: 0,
3713
+ // the rows' bands and hairlines reach the box's edges, its
3714
+ // corners too, and no further
3715
+ overflow: 'clip',
3716
+ borderBottomLeftRadius: 'inherit',
3717
+ borderBottomRightRadius: 'inherit',
3718
+ }
3719
+ : {
3720
+ paddingTop: 4,
3721
+ paddingBottom: 6,
3722
+ /* Reqore's body is `overflow: auto`, a scrollport that never scrolls here and
3723
+ that anything pinned inside it would pin to instead of the page. `clip`
3724
+ keeps the horizontal guard (see the form's body), `flow-root` the
3725
+ formatting context the `auto` gave. */
3726
+ overflowY: 'visible',
3727
+ overflowX: 'clip',
3728
+ display: 'flow-root',
3729
+ }, children: [(0, jsx_runtime_1.jsx)(rowPlaces_1.OpenBoxMark, { box: box.key, onShown: openBoxes.onShown }), (0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledGroupBody, __assign({}, groupBodyProps, { "$boxCorners": true, className: compactNarrowClass || undefined, children: [shownGroups.map(function (groupName) {
3730
+ return renderBoxGroup(box.key, groupName, shownRowSet);
3731
+ }), deferredCount ? renderMoreRow(box.key, deferredCount, moreOpen) : null, deferredCount && moreOpen ?
3732
+ deferredGroups.map(function (groupName) {
3733
+ return renderBoxGroup(box.key, groupName, deferredRowSet);
3734
+ })
3735
+ : null] }))] }, box.key));
3736
+ }), (0, jsx_runtime_1.jsx)(DefaultsNote_1.DefaultsNote, { fields: (0, lodash_1.sortBy)(defaultEntries, function (_a) {
3737
+ var name = _a.name;
3738
+ return Object.keys(options || {}).indexOf(name);
3739
+ }).map(function (_a) {
3740
+ var _b, _c, _d, _f, _g;
3741
+ var name = _a.name;
3742
+ return ({
3743
+ name: name,
3744
+ label: ((_b = options === null || options === void 0 ? void 0 : options[name]) === null || _b === void 0 ? void 0 : _b.display_name) || name,
3745
+ value: ((_c = options === null || options === void 0 ? void 0 : options[name]) === null || _c === void 0 ? void 0 : _c.default_value_display_name) ||
3746
+ (0, readFirst_1.formatOptionValue)(availableOptions === null || availableOptions === void 0 ? void 0 : availableOptions[name], options === null || options === void 0 ? void 0 : options[name]),
3747
+ choice: !!((_f = (_d = options === null || options === void 0 ? void 0 : options[name]) === null || _d === void 0 ? void 0 : _d.allowed_values) === null || _f === void 0 ? void 0 : _f.length),
3748
+ description: (_g = options === null || options === void 0 ? void 0 : options[name]) === null || _g === void 0 ? void 0 : _g.default_value_desc,
3148
3749
  });
3149
- var deferredGroups = groupsInBox.filter(function (groupName) {
3150
- return (buckets[box.key][groupName] || []).some(function (entry) { return !shownRowSet.has(entry.name); });
3151
- });
3152
- var moreOpen = Boolean(query) || expandedMoreBoxes.includes(box.key);
3153
- var accent = box.key === 'attention' ? cWarning
3154
- : box.key === 'set' ? cSuccess
3155
- : cMuted;
3156
- // The muted "Optional" box reads as a quieter, recessed
3157
- // surface — a touch darker than the page rather than the
3158
- // faint grey tint the accent would give.
3159
- var boxBg = box.key === 'optional' ?
3160
- (0, colors_1.changeDarkness)((0, colors_1.getMainBackgroundColor)(theme), 0.06)
3161
- : undefined;
3162
- return ((0, jsx_runtime_1.jsx)(compactRowStyles_1.StyledStatusBox, { "$accent": accent, "$bg": boxBg, "$surface": stickyBoxHeaders ? (0, colors_1.getMainBackgroundColor)(theme) : undefined, ref: function (node) {
3163
- statusBoxRefs.current[box.key] = node;
3164
- },
3165
- // Opening arms the reveal; collapsing disarms it, so a
3166
- // close never scrolls.
3167
- onCollapseChange: function (collapsed) {
3168
- return setOpenedStatusBox(collapsed ? undefined : box.key);
3169
- }, flat: true, minimal: true,
3170
- /* The header stays on screen while its own box is
3171
- being read — see `compactStickyBoxHeaders`. Sticky
3172
- is bounded by its containing block, so the header
3173
- leaves with its box and only one is ever pinned. */
3174
- stickyHeader: stickyBoxHeaders, stickyHeaderOffset: stickyBoxHeaders ? boxStickyOffset : undefined, collapseButtonProps: { flat: true, minimal: true, size: 'small' }, collapsible: true,
3175
- // Which boxes start closed is the consumer's call
3176
- // (`compactCollapsedGroups`, default `['optional']`: the
3177
- // Optional box holds every not-yet-added field, so a form
3178
- // opens on what is in use). Two rules override it:
3179
- //
3180
- // A SEARCH forces every box open — ReqorePanel unmounts
3181
- // collapsed content, so a match inside a closed box would
3182
- // be unreachable. (isCollapsed is the panel's controllable
3183
- // state; manual toggling still works with no query set.)
3184
- //
3185
- // The Optional box stays open when it is the ONLY box,
3186
- // because collapsing it renders a card that looks empty and
3187
- // broken: an auth profile's Authorization block, whose nine
3188
- // requirement fields are all optional, showed as a titled
3189
- // card containing one collapsed "Optional 9" strip and
3190
- // nothing else. This does not generalise to the other two —
3191
- // a lone Set box collapsed is a deliberate ask, and its
3192
- // header still reports what is in there.
3193
- //
3194
- // A PRESELECTED row overrides it too: the schema asked
3195
- // for that field to be visible on a new form, so the
3196
- // box it lands in opens. The groups it does NOT appear
3197
- // in stay behind an inner collapse below, so opening
3198
- // the box reveals the preselected fields without also
3199
- // dumping every not-yet-added optional field on the
3200
- // author.
3201
- isCollapsed: wouldCollapse && !hasPreselectedRows, label: (0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledGroupHeader, { children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreP, { effect: { weight: 'bold' }, size: 'normal', children: box.label }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { size: 'small', minimal: true, compact: true, intent: box.intent, label: String(count) })] }), icon: box.icon, className: 'options-readfirst-group', padded: false, contentStyle: { padding: '4px 4px 6px' }, children: (0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledGroupBody, { "$divider": cDivider, "$hover": cHover, "$focus": cWarning, "$success": cSuccess, "$rowBg": cRowBg, "$lineColor": cGroupLine, "$moreBorder": cMoreBorder, className: compactNarrow ? 'readfirst-narrow' : undefined, children: [shownGroups.map(function (groupName) {
3202
- return renderBoxGroup(box.key, groupName, shownRowSet);
3203
- }), deferredCount ?
3204
- (0, jsx_runtime_1.jsxs)("button", { type: 'button', className: 'readfirst-row readfirst-more-row options-readfirst-more', "aria-expanded": moreOpen, onClick: function () {
3205
- return setExpandedMoreBoxes(function (prev) {
3206
- return prev.includes(box.key) ?
3207
- prev.filter(function (k) { return k !== box.key; })
3208
- : __spreadArray(__spreadArray([], prev, true), [box.key], false);
3209
- });
3210
- }, children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreP, { size: 'small', effect: { opacity: 0.8 }, children: moreOpen ?
3211
- feWords.showFewer
3212
- : feWords.moreFields(deferredCount, box.key === 'optional') }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreIcon, { icon: 'ArrowDownSLine', size: 'small', className: 'readfirst-more-chevron', effect: { opacity: 0.8 } })] })
3213
- : null, deferredCount && moreOpen ?
3214
- deferredGroups.map(function (groupName) {
3215
- return renderBoxGroup(box.key, groupName, deferredRowSet);
3216
- })
3217
- : null] }) }, box.key));
3218
- })] })), commitMode === 'batched' && !readOnly && dirtyOptionNames.length ?
3750
+ }), color: cMuted, onChange: readOnly ? undefined : changeDefault })] })), (0, jsx_runtime_1.jsx)(rowPlaces_1.RowStage, { rows: Array.from(stagedRows.values()) }), commitMode === 'batched' && !readOnly && dirtyOptionNames.length ?
3219
3751
  (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: feWords.unsavedChanges(dirtyOptionNames.length) }), 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 ? feWords.applyChanges : feWords.resolveInvalid, onClick: handleCommitClick, children: feWords.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: feWords.discard })] }) })
3220
3752
  : null] }) })] }) }) }));
3221
3753
  };
@@ -3251,8 +3783,8 @@ var FormEngineImpl = function (_a) {
3251
3783
  if (compact) {
3252
3784
  return renderCompact();
3253
3785
  }
3254
- return ((0, jsx_runtime_1.jsx)(optionsContext_1.OptionsContext.Provider, { value: { schema: options, value: availableOptions }, children: (0, jsx_runtime_1.jsxs)(reqore_1.ReqoreErrorBoundary, { children: [showHelpForOption && ((0, jsx_runtime_1.jsx)(OptionsHelpDialog_1.OptionsHelpDialog, { onClose: function () { return setShowHelpForOption(undefined); }, option: options[showHelpForOption] })), recordRequiresSearchOptions && !readOnly ?
3255
- (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { intent: 'info', children: feWords.searchOptionsRequired }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreVerticalSpacer, { height: 10 })] })
3786
+ return ((0, jsx_runtime_1.jsx)(optionsContext_1.OptionsContext.Provider, { value: optionsContextValue, children: (0, jsx_runtime_1.jsxs)(reqore_1.ReqoreErrorBoundary, { children: [showHelpForOption && ((0, jsx_runtime_1.jsx)(OptionsHelpDialog_1.OptionsHelpDialog, { onClose: function () { return setShowHelpForOption(undefined); }, option: options[showHelpForOption] })), recordRequiresSearchOptions && !readOnly ?
3787
+ (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { intent: (0, formAppearance_1.calmNoteIntent)('info', calm), children: feWords.searchOptionsRequired }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreVerticalSpacer, { height: 10 })] })
3256
3788
  : null, (0, jsx_runtime_1.jsx)(reqore_1.ReqoreCollection, __assign({ minColumnWidth: '350px', flat: true, padded: false, minimal: true }, rest, { label: compact ? undefined : rest.label, responsiveTitle: false, inputProps: {
3257
3789
  disabled: (0, size_1.default)(availableOptions) < 2,
3258
3790
  }, labelSize: 4, filterable: 'filterable' in rest ? rest.filterable : !compact, sortable: 'sortable' in rest ? rest.sortable : !compact && (0, size_1.default)(availableOptions) > 1, defaultSortBy: null, contentRenderer: function (children) { return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, size_1.default)(validityData.invalidFields) && !readOnly ?
@@ -3264,7 +3796,7 @@ var FormEngineImpl = function (_a) {
3264
3796
  : null, (0, jsx_runtime_1.jsx)(HiddenFieldsNote_1.HiddenFieldsNote, { fields: hiddenFieldsWithValues }), children, (0, size_1.default)(filteredOptions) >= 1 && !readOnly ?
3265
3797
  (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 || feWords.moreOptions, minimal: true, icon: 'ListView', showDescription: false, fluid: true, size: rest.size })] })
3266
3798
  : null] })); }, sortButtonProps: { minimal: true }, showLayoutSwitch: false, style: { width: '100%' }, items: (0, map_1.default)(shownOptions, function (_a, optionName) {
3267
- var _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
3799
+ var _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
3268
3800
  var type = _a.type, other = __rest(_a, ["type"]);
3269
3801
  return ({
3270
3802
  label: ((_b = options[optionName]) === null || _b === void 0 ? void 0 : _b.display_name) || optionName,
@@ -3280,12 +3812,14 @@ var FormEngineImpl = function (_a) {
3280
3812
  cursor: 'help',
3281
3813
  }
3282
3814
  : undefined,
3283
- onClick: ((_f = options[optionName]) === null || _f === void 0 ? void 0 : _f.desc) ? function () { return handleOptionLabelClick(optionName); } : undefined,
3815
+ onClick: (0, fieldDescription_1.fieldHasLongDescription)(options[optionName]) ?
3816
+ function () { return handleOptionLabelClick(optionName); }
3817
+ : undefined,
3284
3818
  },
3285
- showLabelTooltip: !!((_g = options[optionName]) === null || _g === void 0 ? void 0 : _g.short_desc),
3819
+ showLabelTooltip: !!((_f = options[optionName]) === null || _f === void 0 ? void 0 : _f.short_desc),
3286
3820
  customLabelTooltip: {
3287
3821
  delay: 300,
3288
- 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) ? feWords.clickToLearnMore : ''), margin: 'none' })),
3822
+ content: ((0, jsx_runtime_1.jsx)(Description_1.Description, { longDescription: "".concat((_g = options[optionName]) === null || _g === void 0 ? void 0 : _g.short_desc).concat((0, fieldDescription_1.fieldHasLongDescription)(options[optionName]) ? feWords.clickToLearnMore : ''), margin: 'none' })),
3289
3823
  },
3290
3824
  description: showFieldTypes ?
3291
3825
  [(0, qorusTypeCatalogue_1.optionTypeWords)(options[optionName], typeName), options[optionName].short_desc]
@@ -3295,7 +3829,7 @@ var FormEngineImpl = function (_a) {
3295
3829
  descriptionEffect: {
3296
3830
  textSize: '11px',
3297
3831
  opacity: optionDescOpacity,
3298
- underline: ((_k = options[optionName]) === null || _k === void 0 ? void 0 : _k.desc) ? 'underline dotted #878787' : undefined,
3832
+ underline: (0, fieldDescription_1.fieldHasLongDescription)(options[optionName]) ? 'underline dotted #878787' : undefined,
3299
3833
  },
3300
3834
  customTheme: {
3301
3835
  main: 'main:darken:1',
@@ -3332,7 +3866,7 @@ var FormEngineImpl = function (_a) {
3332
3866
  menu: [
3333
3867
  !readOnly &&
3334
3868
  type !== 'code-editor' &&
3335
- (((_l = options[optionName]) === null || _l === void 0 ? void 0 : _l.ui_type) || ((_m = options[optionName]) === null || _m === void 0 ? void 0 : _m.type)) !==
3869
+ (((_h = options[optionName]) === null || _h === void 0 ? void 0 : _h.ui_type) || ((_j = options[optionName]) === null || _j === void 0 ? void 0 : _j.type)) !==
3336
3870
  'code-editor' && {
3337
3871
  label: feWords.focusedEditing,
3338
3872
  icon: 'FullscreenLine',
@@ -3352,15 +3886,15 @@ var FormEngineImpl = function (_a) {
3352
3886
  !readOnly &&
3353
3887
  other.value &&
3354
3888
  !(0, lodash_1.isEqual)(other.value, (0, common_1.getDefaultValue)(options[optionName])) &&
3355
- !(((_o = options[optionName]) === null || _o === void 0 ? void 0 : _o.disabled) || ((_p = options[optionName]) === null || _p === void 0 ? void 0 : _p.readonly)) && {
3889
+ !(((_k = options[optionName]) === null || _k === void 0 ? void 0 : _k.disabled) || ((_l = options[optionName]) === null || _l === void 0 ? void 0 : _l.readonly)) && {
3356
3890
  label: feWords.removeValue,
3357
3891
  icon: 'CloseLine',
3358
3892
  className: 'options-item-remove',
3359
3893
  onClick: function () { return handleValueChange(optionName, undefined); },
3360
3894
  },
3361
3895
  !readOnly &&
3362
- !((_q = options[optionName]) === null || _q === void 0 ? void 0 : _q.preselected) &&
3363
- !((_r = options[optionName]) === null || _r === void 0 ? void 0 : _r.required) && {
3896
+ !((_m = options[optionName]) === null || _m === void 0 ? void 0 : _m.preselected) &&
3897
+ !((_o = options[optionName]) === null || _o === void 0 ? void 0 : _o.required) && {
3364
3898
  label: feWords.removeOption,
3365
3899
  icon: 'DeleteBinLine',
3366
3900
  intent: 'danger',
@@ -3376,8 +3910,8 @@ var FormEngineImpl = function (_a) {
3376
3910
  },
3377
3911
  ],
3378
3912
  }),
3379
- 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 ?
3380
- (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 })
3913
+ content: ((0, jsx_runtime_1.jsxs)(FocusedEditing_1.FocusedEditing, { isFullscreen: focusedEditing === optionName, onClose: function () { return setFocusedEditing(undefined); }, description: (_p = options[optionName]) === null || _p === void 0 ? void 0 : _p.display_name, intent: getIntent(optionName, type, other.value, other.op), children: [focusedEditing === optionName ?
3914
+ (0, jsx_runtime_1.jsx)(Description_1.Description, { longDescription: (_q = options[optionName]) === null || _q === void 0 ? void 0 : _q.desc, shortDescription: (_r = options[optionName]) === null || _r === void 0 ? void 0 : _r.short_desc, longDescriptionShownByDefault: true })
3381
3915
  : null, renderOption(optionName, __assign({ type: type }, other))] })),
3382
3916
  });
3383
3917
  }), defaultZoom: 1, zoomable: false, actions: __spreadArray(__spreadArray([], (rest.actions || []).map(function (action) { return (__assign(__assign({}, action), { minimal: true })); }), true), [
@@ -3415,9 +3949,18 @@ var FormEngineImpl = function (_a) {
3415
3949
  * hand is how one of them gets missed.
3416
3950
  */
3417
3951
  var FormEngine = function (props) {
3418
- // what the host knows of references beyond the catalogue, for every chip the form draws (qorus#646)
3952
+ var _a, _b;
3953
+ // The form's own `appearance` wins; without one it follows the form (or the
3954
+ // host's provider) it sits in, so a nested sub-form never changes look
3955
+ // halfway down its parent.
3956
+ var inherited = (0, formAppearance_1.useFormAppearance)();
3957
+ var appearance = (_a = props.appearance) !== null && _a !== void 0 ? _a : inherited;
3958
+ // where a read row's reveal sits: the form's own, else the form's it sits in
3959
+ var inheritedRevealPlacement = (0, ReadReveal_1.useReadRevealPlacement)();
3960
+ var readRevealPlacement = (_b = props.readRevealPlacement) !== null && _b !== void 0 ? _b : inheritedRevealPlacement;
3961
+ // what the host knows of references beyond the catalogue, for every chip the form draws
3419
3962
  var referenceNames = (0, react_2.useMemo)(function () { var _a; return (_a = props.templateReferences) !== null && _a !== void 0 ? _a : NO_REFERENCE_NAMES; }, [props.templateReferences]);
3420
- 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)) }) }) }));
3963
+ return ((0, jsx_runtime_1.jsx)(markdownRendererContext_1.MarkdownRendererContext.Provider, { value: props.markdownRenderer, children: (0, jsx_runtime_1.jsx)(formAppearance_1.FormAppearanceProvider, { value: appearance, children: (0, jsx_runtime_1.jsx)(ReadReveal_1.ReadRevealPlacementProvider, { value: readRevealPlacement, 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)) }) }) }) }) }));
3421
3964
  };
3422
3965
  exports.FormEngine = FormEngine;
3423
3966
  var NO_REFERENCE_NAMES = {};