udp-react-enterprise-component-library 27.0.0-next.12 → 27.0.0-next.13

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 (540) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/UI/fluent-web-components/UdpIconPicker.d.ts +4 -1
  3. package/dist/UI/fluent-web-components/UdpIconPicker.d.ts.map +1 -1
  4. package/dist/UI/fluent-web-components/UdpIconPicker.js +2 -2
  5. package/dist/UI/fluent-web-components/UdpIconPicker.js.map +1 -1
  6. package/dist/UI/fluent-web-components/UdpIconPicker.mjs +32 -28
  7. package/dist/UI/fluent-web-components/UdpIconPicker.mjs.map +1 -1
  8. package/dist/UI/fluent-web-components/UdpLink.d.ts +6 -0
  9. package/dist/UI/fluent-web-components/UdpLink.d.ts.map +1 -1
  10. package/dist/UI/fluent-web-components/UdpLink.js.map +1 -1
  11. package/dist/UI/fluent-web-components/UdpLink.mjs.map +1 -1
  12. package/dist/UI/fluent-web-components/types.d.ts +2 -0
  13. package/dist/UI/fluent-web-components/types.d.ts.map +1 -1
  14. package/dist/UI/widgets/library/InquiryFindRecordsWidget/InquiryFindRecordsWidget.d.ts +16 -3
  15. package/dist/UI/widgets/library/InquiryFindRecordsWidget/InquiryFindRecordsWidget.d.ts.map +1 -1
  16. package/dist/UI/widgets/library/InquiryFindRecordsWidget/InquiryFindRecordsWidget.js +36 -13
  17. package/dist/UI/widgets/library/InquiryFindRecordsWidget/InquiryFindRecordsWidget.js.map +1 -1
  18. package/dist/UI/widgets/library/InquiryFindRecordsWidget/InquiryFindRecordsWidget.mjs +119 -62
  19. package/dist/UI/widgets/library/InquiryFindRecordsWidget/InquiryFindRecordsWidget.mjs.map +1 -1
  20. package/dist/UI/widgets/library/InquiryFindRecordsWidget/index.mjs +3 -2
  21. package/dist/UI/widgets/library/InquiryRecentRecordsWidget/InquiryRecentRecordsWidget.d.ts +9 -2
  22. package/dist/UI/widgets/library/InquiryRecentRecordsWidget/InquiryRecentRecordsWidget.d.ts.map +1 -1
  23. package/dist/UI/widgets/library/InquiryRecentRecordsWidget/InquiryRecentRecordsWidget.js +18 -18
  24. package/dist/UI/widgets/library/InquiryRecentRecordsWidget/InquiryRecentRecordsWidget.js.map +1 -1
  25. package/dist/UI/widgets/library/InquiryRecentRecordsWidget/InquiryRecentRecordsWidget.mjs +79 -67
  26. package/dist/UI/widgets/library/InquiryRecentRecordsWidget/InquiryRecentRecordsWidget.mjs.map +1 -1
  27. package/dist/UI/widgets/library/InquiryRemindersWidget/InquiryRemindersWidget.d.ts +8 -2
  28. package/dist/UI/widgets/library/InquiryRemindersWidget/InquiryRemindersWidget.d.ts.map +1 -1
  29. package/dist/UI/widgets/library/InquiryRemindersWidget/InquiryRemindersWidget.js +32 -16
  30. package/dist/UI/widgets/library/InquiryRemindersWidget/InquiryRemindersWidget.js.map +1 -1
  31. package/dist/UI/widgets/library/InquiryRemindersWidget/InquiryRemindersWidget.mjs +129 -102
  32. package/dist/UI/widgets/library/InquiryRemindersWidget/InquiryRemindersWidget.mjs.map +1 -1
  33. package/dist/UI/widgets/library/InquiryRemindersWidget/reminderRowModel.d.ts +3 -2
  34. package/dist/UI/widgets/library/InquiryRemindersWidget/reminderRowModel.d.ts.map +1 -1
  35. package/dist/UI/widgets/library/InquiryRemindersWidget/reminderRowModel.js +11 -12
  36. package/dist/UI/widgets/library/InquiryRemindersWidget/reminderRowModel.js.map +1 -1
  37. package/dist/UI/widgets/library/InquiryRemindersWidget/reminderRowModel.mjs +6 -4
  38. package/dist/UI/widgets/library/InquiryRemindersWidget/reminderRowModel.mjs.map +1 -1
  39. package/dist/UI/widgets/library/InquiryRemindersWidget/useInquiryReminders.d.ts +2 -19
  40. package/dist/UI/widgets/library/InquiryRemindersWidget/useInquiryReminders.d.ts.map +1 -1
  41. package/dist/UI/widgets/library/InquiryRemindersWidget/useInquiryReminders.js +4 -5
  42. package/dist/UI/widgets/library/InquiryRemindersWidget/useInquiryReminders.js.map +1 -1
  43. package/dist/UI/widgets/library/InquiryRemindersWidget/useInquiryReminders.mjs +5 -4
  44. package/dist/UI/widgets/library/InquiryRemindersWidget/useInquiryReminders.mjs.map +1 -1
  45. package/dist/actionPanels/index.d.ts +0 -2
  46. package/dist/actionPanels/index.d.ts.map +1 -1
  47. package/dist/actionPanels/index.js +0 -2
  48. package/dist/actionPanels/index.js.map +1 -1
  49. package/dist/actionPanels/panelActionFields.d.ts +9 -26
  50. package/dist/actionPanels/panelActionFields.d.ts.map +1 -1
  51. package/dist/actionPanels/panelActionFields.js +32 -55
  52. package/dist/actionPanels/panelActionFields.js.map +1 -1
  53. package/dist/actionPanels/panelActionFields.mjs +159 -375
  54. package/dist/actionPanels/panelActionFields.mjs.map +1 -1
  55. package/dist/actionPanels/panelOperations.d.ts +15 -41
  56. package/dist/actionPanels/panelOperations.d.ts.map +1 -1
  57. package/dist/actionPanels/panelOperations.js +51 -89
  58. package/dist/actionPanels/panelOperations.js.map +1 -1
  59. package/dist/actionPanels/panelOperations.mjs +37 -92
  60. package/dist/actionPanels/panelOperations.mjs.map +1 -1
  61. package/dist/domain/actionPanel/actionTypeMeta.d.ts +15 -2
  62. package/dist/domain/actionPanel/actionTypeMeta.d.ts.map +1 -1
  63. package/dist/domain/actionPanel/actionTypeMeta.js +21 -2
  64. package/dist/domain/actionPanel/actionTypeMeta.js.map +1 -1
  65. package/dist/domain/actionPanel/actionTypeMeta.mjs +18 -3
  66. package/dist/domain/actionPanel/actionTypeMeta.mjs.map +1 -1
  67. package/dist/domain/actionPanel/buttonOrder.d.ts +67 -0
  68. package/dist/domain/actionPanel/buttonOrder.d.ts.map +1 -0
  69. package/dist/domain/actionPanel/buttonOrder.js +105 -0
  70. package/dist/domain/actionPanel/buttonOrder.js.map +1 -0
  71. package/dist/domain/actionPanel/buttonOrder.mjs +90 -0
  72. package/dist/domain/actionPanel/buttonOrder.mjs.map +1 -0
  73. package/dist/domain/actionPanel/index.d.ts +1 -0
  74. package/dist/domain/actionPanel/index.d.ts.map +1 -1
  75. package/dist/domain/actionPanel/index.js +1 -0
  76. package/dist/domain/actionPanel/index.js.map +1 -1
  77. package/dist/domain/actionPanel/index.mjs +4 -3
  78. package/dist/domain/actionPanel/serialize.d.ts +6 -2
  79. package/dist/domain/actionPanel/serialize.d.ts.map +1 -1
  80. package/dist/domain/actionPanel/serialize.js +10 -3
  81. package/dist/domain/actionPanel/serialize.js.map +1 -1
  82. package/dist/domain/actionPanel/serialize.mjs +7 -3
  83. package/dist/domain/actionPanel/serialize.mjs.map +1 -1
  84. package/dist/domain/actionPanel/types.d.ts +24 -8
  85. package/dist/domain/actionPanel/types.d.ts.map +1 -1
  86. package/dist/domain/actionPanel/types.js.map +1 -1
  87. package/dist/domain/actionPanel/types.mjs.map +1 -1
  88. package/dist/domain/inquiryTree/describe.d.ts +15 -3
  89. package/dist/domain/inquiryTree/describe.d.ts.map +1 -1
  90. package/dist/domain/inquiryTree/describe.js +32 -28
  91. package/dist/domain/inquiryTree/describe.js.map +1 -1
  92. package/dist/domain/inquiryTree/describe.mjs +34 -16
  93. package/dist/domain/inquiryTree/describe.mjs.map +1 -1
  94. package/dist/domain/inquiryTree/displayTree.d.ts +75 -97
  95. package/dist/domain/inquiryTree/displayTree.d.ts.map +1 -1
  96. package/dist/domain/inquiryTree/displayTree.js +418 -551
  97. package/dist/domain/inquiryTree/displayTree.js.map +1 -1
  98. package/dist/domain/inquiryTree/displayTree.mjs +345 -414
  99. package/dist/domain/inquiryTree/displayTree.mjs.map +1 -1
  100. package/dist/domain/inquiryTree/groups.d.ts +2 -0
  101. package/dist/domain/inquiryTree/groups.d.ts.map +1 -1
  102. package/dist/domain/inquiryTree/groups.js.map +1 -1
  103. package/dist/domain/inquiryTree/groups.mjs.map +1 -1
  104. package/dist/domain/inquiryTree/index.d.ts +1 -1
  105. package/dist/domain/inquiryTree/index.d.ts.map +1 -1
  106. package/dist/domain/inquiryTree/index.js +1 -1
  107. package/dist/domain/inquiryTree/index.js.map +1 -1
  108. package/dist/domain/inquiryTree/index.mjs +12 -12
  109. package/dist/domain/inquiryTree/lazyLoad.d.ts +20 -129
  110. package/dist/domain/inquiryTree/lazyLoad.d.ts.map +1 -1
  111. package/dist/domain/inquiryTree/lazyLoad.js +48 -233
  112. package/dist/domain/inquiryTree/lazyLoad.js.map +1 -1
  113. package/dist/domain/inquiryTree/lazyLoad.mjs +32 -187
  114. package/dist/domain/inquiryTree/lazyLoad.mjs.map +1 -1
  115. package/dist/domain/inquiryTree/legalChildren.d.ts +13 -14
  116. package/dist/domain/inquiryTree/legalChildren.d.ts.map +1 -1
  117. package/dist/domain/inquiryTree/legalChildren.js +21 -42
  118. package/dist/domain/inquiryTree/legalChildren.js.map +1 -1
  119. package/dist/domain/inquiryTree/legalChildren.mjs +19 -37
  120. package/dist/domain/inquiryTree/legalChildren.mjs.map +1 -1
  121. package/dist/domain/inquiryTree/names.d.ts +38 -0
  122. package/dist/domain/inquiryTree/names.d.ts.map +1 -0
  123. package/dist/domain/inquiryTree/names.js +64 -0
  124. package/dist/domain/inquiryTree/names.js.map +1 -0
  125. package/dist/domain/inquiryTree/names.mjs +56 -0
  126. package/dist/domain/inquiryTree/names.mjs.map +1 -0
  127. package/dist/domain/inquiryTree/operations.d.ts +6 -2
  128. package/dist/domain/inquiryTree/operations.d.ts.map +1 -1
  129. package/dist/domain/inquiryTree/operations.js +17 -16
  130. package/dist/domain/inquiryTree/operations.js.map +1 -1
  131. package/dist/domain/inquiryTree/operations.mjs +14 -11
  132. package/dist/domain/inquiryTree/operations.mjs.map +1 -1
  133. package/dist/domain/inquiryTree/rules.d.ts +3 -4
  134. package/dist/domain/inquiryTree/rules.d.ts.map +1 -1
  135. package/dist/domain/inquiryTree/rules.js +3 -13
  136. package/dist/domain/inquiryTree/rules.js.map +1 -1
  137. package/dist/domain/inquiryTree/rules.mjs +3 -9
  138. package/dist/domain/inquiryTree/rules.mjs.map +1 -1
  139. package/dist/domain/inquiryTree/runtime.d.ts +23 -16
  140. package/dist/domain/inquiryTree/runtime.d.ts.map +1 -1
  141. package/dist/domain/inquiryTree/runtime.js +46 -54
  142. package/dist/domain/inquiryTree/runtime.js.map +1 -1
  143. package/dist/domain/inquiryTree/runtime.mjs +31 -26
  144. package/dist/domain/inquiryTree/runtime.mjs.map +1 -1
  145. package/dist/domain/inquiryTree/serialize.d.ts +20 -29
  146. package/dist/domain/inquiryTree/serialize.d.ts.map +1 -1
  147. package/dist/domain/inquiryTree/serialize.js +93 -205
  148. package/dist/domain/inquiryTree/serialize.js.map +1 -1
  149. package/dist/domain/inquiryTree/serialize.mjs +89 -180
  150. package/dist/domain/inquiryTree/serialize.mjs.map +1 -1
  151. package/dist/domain/inquiryTree/types.d.ts +146 -65
  152. package/dist/domain/inquiryTree/types.d.ts.map +1 -1
  153. package/dist/domain/inquiryTree/types.js +5 -0
  154. package/dist/domain/inquiryTree/types.js.map +1 -1
  155. package/dist/domain/inquiryTree/types.mjs +3 -1
  156. package/dist/domain/inquiryTree/types.mjs.map +1 -1
  157. package/dist/domain/inquiryTree/validate.d.ts +9 -2
  158. package/dist/domain/inquiryTree/validate.d.ts.map +1 -1
  159. package/dist/domain/inquiryTree/validate.js +30 -58
  160. package/dist/domain/inquiryTree/validate.js.map +1 -1
  161. package/dist/domain/inquiryTree/validate.mjs +29 -44
  162. package/dist/domain/inquiryTree/validate.mjs.map +1 -1
  163. package/dist/domain/inquiryTree/view.d.ts +8 -12
  164. package/dist/domain/inquiryTree/view.d.ts.map +1 -1
  165. package/dist/domain/inquiryTree/view.js +40 -66
  166. package/dist/domain/inquiryTree/view.js.map +1 -1
  167. package/dist/domain/inquiryTree/view.mjs +30 -60
  168. package/dist/domain/inquiryTree/view.mjs.map +1 -1
  169. package/dist/domain/inquiryTree/waveLoad.d.ts +32 -48
  170. package/dist/domain/inquiryTree/waveLoad.d.ts.map +1 -1
  171. package/dist/domain/inquiryTree/waveLoad.js +75 -90
  172. package/dist/domain/inquiryTree/waveLoad.js.map +1 -1
  173. package/dist/domain/inquiryTree/waveLoad.mjs +54 -60
  174. package/dist/domain/inquiryTree/waveLoad.mjs.map +1 -1
  175. package/dist/domain/inquiryTree/wireString.d.ts +5 -0
  176. package/dist/domain/inquiryTree/wireString.d.ts.map +1 -1
  177. package/dist/domain/inquiryTree/wireString.js +11 -0
  178. package/dist/domain/inquiryTree/wireString.js.map +1 -1
  179. package/dist/domain/inquiryTree/wireString.mjs +10 -1
  180. package/dist/domain/inquiryTree/wireString.mjs.map +1 -1
  181. package/dist/domain/nodeView/index.mjs +2 -2
  182. package/dist/domain/nodeView/model.d.ts +35 -30
  183. package/dist/domain/nodeView/model.d.ts.map +1 -1
  184. package/dist/domain/nodeView/model.js +108 -69
  185. package/dist/domain/nodeView/model.js.map +1 -1
  186. package/dist/domain/nodeView/model.mjs +86 -36
  187. package/dist/domain/nodeView/model.mjs.map +1 -1
  188. package/dist/icons/legacyIconNames.d.ts.map +1 -1
  189. package/dist/icons/legacyIconNames.js +46 -1
  190. package/dist/icons/legacyIconNames.js.map +1 -1
  191. package/dist/icons/legacyIconNames.mjs +46 -1
  192. package/dist/icons/legacyIconNames.mjs.map +1 -1
  193. package/dist/index.mjs +10 -12
  194. package/dist/inquiry/Inquiry.d.ts +3 -0
  195. package/dist/inquiry/Inquiry.d.ts.map +1 -1
  196. package/dist/inquiry/Inquiry.js +3 -0
  197. package/dist/inquiry/Inquiry.js.map +1 -1
  198. package/dist/inquiry/Inquiry.mjs +3 -0
  199. package/dist/inquiry/Inquiry.mjs.map +1 -1
  200. package/dist/inquiry/v2/InquiryV2.d.ts +8 -6
  201. package/dist/inquiry/v2/InquiryV2.d.ts.map +1 -1
  202. package/dist/inquiry/v2/InquiryV2.js +45 -24
  203. package/dist/inquiry/v2/InquiryV2.js.map +1 -1
  204. package/dist/inquiry/v2/InquiryV2.mjs +108 -61
  205. package/dist/inquiry/v2/InquiryV2.mjs.map +1 -1
  206. package/dist/inquiry/v2/InquiryV2.module.css +60 -15
  207. package/dist/inquiry/v2/InquiryWorkspace.d.ts +9 -9
  208. package/dist/inquiry/v2/InquiryWorkspace.d.ts.map +1 -1
  209. package/dist/inquiry/v2/InquiryWorkspace.js +531 -408
  210. package/dist/inquiry/v2/InquiryWorkspace.js.map +1 -1
  211. package/dist/inquiry/v2/InquiryWorkspace.mjs +524 -408
  212. package/dist/inquiry/v2/InquiryWorkspace.mjs.map +1 -1
  213. package/dist/inquiry/v2/ai/InquiryV2Copilot.d.ts +3 -2
  214. package/dist/inquiry/v2/ai/InquiryV2Copilot.d.ts.map +1 -1
  215. package/dist/inquiry/v2/ai/InquiryV2Copilot.js +20 -37
  216. package/dist/inquiry/v2/ai/InquiryV2Copilot.js.map +1 -1
  217. package/dist/inquiry/v2/ai/InquiryV2Copilot.mjs +19 -31
  218. package/dist/inquiry/v2/ai/InquiryV2Copilot.mjs.map +1 -1
  219. package/dist/inquiry/v2/ai/copilotModel.d.ts +6 -14
  220. package/dist/inquiry/v2/ai/copilotModel.d.ts.map +1 -1
  221. package/dist/inquiry/v2/ai/copilotModel.js +35 -87
  222. package/dist/inquiry/v2/ai/copilotModel.js.map +1 -1
  223. package/dist/inquiry/v2/ai/copilotModel.mjs +23 -47
  224. package/dist/inquiry/v2/ai/copilotModel.mjs.map +1 -1
  225. package/dist/inquiry/v2/api/queries.d.ts +46 -73
  226. package/dist/inquiry/v2/api/queries.d.ts.map +1 -1
  227. package/dist/inquiry/v2/api/queries.js +151 -210
  228. package/dist/inquiry/v2/api/queries.js.map +1 -1
  229. package/dist/inquiry/v2/api/queries.mjs +227 -183
  230. package/dist/inquiry/v2/api/queries.mjs.map +1 -1
  231. package/dist/inquiry/v2/capabilities/actions/ActionsCapability.d.ts.map +1 -1
  232. package/dist/inquiry/v2/capabilities/actions/ActionsCapability.js +103 -32
  233. package/dist/inquiry/v2/capabilities/actions/ActionsCapability.js.map +1 -1
  234. package/dist/inquiry/v2/capabilities/actions/ActionsCapability.mjs +92 -32
  235. package/dist/inquiry/v2/capabilities/actions/ActionsCapability.mjs.map +1 -1
  236. package/dist/inquiry/v2/capabilities/actions/ActionsCapability.module.css +8 -1
  237. package/dist/inquiry/v2/capabilities/actions/EntityFormSurface.d.ts +20 -16
  238. package/dist/inquiry/v2/capabilities/actions/EntityFormSurface.d.ts.map +1 -1
  239. package/dist/inquiry/v2/capabilities/actions/EntityFormSurface.js +111 -68
  240. package/dist/inquiry/v2/capabilities/actions/EntityFormSurface.js.map +1 -1
  241. package/dist/inquiry/v2/capabilities/actions/EntityFormSurface.mjs +108 -142
  242. package/dist/inquiry/v2/capabilities/actions/EntityFormSurface.mjs.map +1 -1
  243. package/dist/inquiry/v2/capabilities/actions/RetrieveSurface.mjs +1 -1
  244. package/dist/inquiry/v2/capabilities/actions/actionModel.d.ts +66 -50
  245. package/dist/inquiry/v2/capabilities/actions/actionModel.d.ts.map +1 -1
  246. package/dist/inquiry/v2/capabilities/actions/actionModel.js +141 -66
  247. package/dist/inquiry/v2/capabilities/actions/actionModel.js.map +1 -1
  248. package/dist/inquiry/v2/capabilities/actions/actionModel.mjs +115 -53
  249. package/dist/inquiry/v2/capabilities/actions/actionModel.mjs.map +1 -1
  250. package/dist/inquiry/v2/capabilities/actions/parentKeyDefaults.d.ts +26 -0
  251. package/dist/inquiry/v2/capabilities/actions/parentKeyDefaults.d.ts.map +1 -0
  252. package/dist/inquiry/v2/capabilities/actions/parentKeyDefaults.js +36 -0
  253. package/dist/inquiry/v2/capabilities/actions/parentKeyDefaults.js.map +1 -0
  254. package/dist/inquiry/v2/capabilities/actions/parentKeyDefaults.mjs +41 -0
  255. package/dist/inquiry/v2/capabilities/actions/parentKeyDefaults.mjs.map +1 -0
  256. package/dist/inquiry/v2/capabilities/actions/runAction.d.ts +3 -2
  257. package/dist/inquiry/v2/capabilities/actions/runAction.d.ts.map +1 -1
  258. package/dist/inquiry/v2/capabilities/actions/runAction.js +27 -23
  259. package/dist/inquiry/v2/capabilities/actions/runAction.js.map +1 -1
  260. package/dist/inquiry/v2/capabilities/actions/runAction.mjs +26 -20
  261. package/dist/inquiry/v2/capabilities/actions/runAction.mjs.map +1 -1
  262. package/dist/inquiry/v2/capabilities/actions/useHeaderFold.d.ts +20 -0
  263. package/dist/inquiry/v2/capabilities/actions/useHeaderFold.d.ts.map +1 -0
  264. package/dist/inquiry/v2/capabilities/actions/useHeaderFold.js +112 -0
  265. package/dist/inquiry/v2/capabilities/actions/useHeaderFold.js.map +1 -0
  266. package/dist/inquiry/v2/capabilities/actions/useHeaderFold.mjs +118 -0
  267. package/dist/inquiry/v2/capabilities/actions/useHeaderFold.mjs.map +1 -0
  268. package/dist/inquiry/v2/capabilities/actions/useSheetPanel.d.ts +25 -1
  269. package/dist/inquiry/v2/capabilities/actions/useSheetPanel.d.ts.map +1 -1
  270. package/dist/inquiry/v2/capabilities/actions/useSheetPanel.js +7 -4
  271. package/dist/inquiry/v2/capabilities/actions/useSheetPanel.js.map +1 -1
  272. package/dist/inquiry/v2/capabilities/actions/useSheetPanel.mjs +9 -4
  273. package/dist/inquiry/v2/capabilities/actions/useSheetPanel.mjs.map +1 -1
  274. package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.d.ts +5 -3
  275. package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.d.ts.map +1 -1
  276. package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.js +11 -8
  277. package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.js.map +1 -1
  278. package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.mjs +13 -7
  279. package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.mjs.map +1 -1
  280. package/dist/inquiry/v2/capabilities/alerts/AlertsCapability.module.css +4 -4
  281. package/dist/inquiry/v2/capabilities/header/HeaderCapability.d.ts +1 -1
  282. package/dist/inquiry/v2/capabilities/header/HeaderCapability.d.ts.map +1 -1
  283. package/dist/inquiry/v2/capabilities/header/HeaderCapability.js +20 -17
  284. package/dist/inquiry/v2/capabilities/header/HeaderCapability.js.map +1 -1
  285. package/dist/inquiry/v2/capabilities/header/HeaderCapability.mjs +101 -111
  286. package/dist/inquiry/v2/capabilities/header/HeaderCapability.mjs.map +1 -1
  287. package/dist/inquiry/v2/capabilities/header/HeaderCapability.module.css +9 -6
  288. package/dist/inquiry/v2/capabilities/tabs/TabsCapability.d.ts +2 -1
  289. package/dist/inquiry/v2/capabilities/tabs/TabsCapability.d.ts.map +1 -1
  290. package/dist/inquiry/v2/capabilities/tabs/TabsCapability.js +9 -2
  291. package/dist/inquiry/v2/capabilities/tabs/TabsCapability.js.map +1 -1
  292. package/dist/inquiry/v2/capabilities/tabs/TabsCapability.mjs +18 -15
  293. package/dist/inquiry/v2/capabilities/tabs/TabsCapability.mjs.map +1 -1
  294. package/dist/inquiry/v2/index.d.ts +0 -1
  295. package/dist/inquiry/v2/index.d.ts.map +1 -1
  296. package/dist/inquiry/v2/index.js.map +1 -1
  297. package/dist/inquiry/v2/kernel/ActionRunnerContext.d.ts +3 -3
  298. package/dist/inquiry/v2/kernel/ActionRunnerContext.d.ts.map +1 -1
  299. package/dist/inquiry/v2/kernel/ActionRunnerContext.js +11 -5
  300. package/dist/inquiry/v2/kernel/ActionRunnerContext.js.map +1 -1
  301. package/dist/inquiry/v2/kernel/ActionRunnerContext.mjs +15 -12
  302. package/dist/inquiry/v2/kernel/ActionRunnerContext.mjs.map +1 -1
  303. package/dist/inquiry/v2/kernel/ReadOnlyContext.d.ts +3 -0
  304. package/dist/inquiry/v2/kernel/ReadOnlyContext.d.ts.map +1 -0
  305. package/dist/inquiry/v2/kernel/ReadOnlyContext.js +14 -0
  306. package/dist/inquiry/v2/kernel/ReadOnlyContext.js.map +1 -0
  307. package/dist/inquiry/v2/kernel/ReadOnlyContext.mjs +20 -0
  308. package/dist/inquiry/v2/kernel/ReadOnlyContext.mjs.map +1 -0
  309. package/dist/inquiry/v2/kernel/RecordContext.d.ts +2 -0
  310. package/dist/inquiry/v2/kernel/RecordContext.d.ts.map +1 -1
  311. package/dist/inquiry/v2/kernel/RecordContext.js.map +1 -1
  312. package/dist/inquiry/v2/kernel/RecordContext.mjs.map +1 -1
  313. package/dist/inquiry/v2/kernel/UdpNodeView.d.ts.map +1 -1
  314. package/dist/inquiry/v2/kernel/UdpNodeView.js +18 -13
  315. package/dist/inquiry/v2/kernel/UdpNodeView.js.map +1 -1
  316. package/dist/inquiry/v2/kernel/UdpNodeView.mjs +177 -140
  317. package/dist/inquiry/v2/kernel/UdpNodeView.mjs.map +1 -1
  318. package/dist/inquiry/v2/kernel/UdpNodeView.module.css +56 -5
  319. package/dist/inquiry/v2/kernel/capabilities.d.ts +0 -2
  320. package/dist/inquiry/v2/kernel/capabilities.d.ts.map +1 -1
  321. package/dist/inquiry/v2/kernel/capabilities.js.map +1 -1
  322. package/dist/inquiry/v2/kernel/capabilities.mjs.map +1 -1
  323. package/dist/inquiry/v2/landing/InquiryExplorePage.d.ts +26 -37
  324. package/dist/inquiry/v2/landing/InquiryExplorePage.d.ts.map +1 -1
  325. package/dist/inquiry/v2/landing/InquiryExplorePage.js +48 -57
  326. package/dist/inquiry/v2/landing/InquiryExplorePage.js.map +1 -1
  327. package/dist/inquiry/v2/landing/InquiryExplorePage.mjs +102 -106
  328. package/dist/inquiry/v2/landing/InquiryExplorePage.mjs.map +1 -1
  329. package/dist/inquiry/v2/landing/InquiryExplorePage.module.css +58 -6
  330. package/dist/inquiry/v2/landing/InquiryLanding.d.ts +3 -3
  331. package/dist/inquiry/v2/landing/InquiryLanding.d.ts.map +1 -1
  332. package/dist/inquiry/v2/landing/InquiryLanding.js +8 -3
  333. package/dist/inquiry/v2/landing/InquiryLanding.js.map +1 -1
  334. package/dist/inquiry/v2/landing/InquiryLanding.mjs +51 -35
  335. package/dist/inquiry/v2/landing/InquiryLanding.mjs.map +1 -1
  336. package/dist/inquiry/v2/landing/InquiryLanding.module.css +8 -0
  337. package/dist/inquiry/v2/page/UdpPageRenderer.d.ts +5 -1
  338. package/dist/inquiry/v2/page/UdpPageRenderer.d.ts.map +1 -1
  339. package/dist/inquiry/v2/page/UdpPageRenderer.js +13 -1
  340. package/dist/inquiry/v2/page/UdpPageRenderer.js.map +1 -1
  341. package/dist/inquiry/v2/page/UdpPageRenderer.mjs +36 -7
  342. package/dist/inquiry/v2/page/UdpPageRenderer.mjs.map +1 -1
  343. package/dist/inquiry/v2/search/InquirySearchPanel.d.ts +1 -7
  344. package/dist/inquiry/v2/search/InquirySearchPanel.d.ts.map +1 -1
  345. package/dist/inquiry/v2/search/InquirySearchPanel.js +6 -13
  346. package/dist/inquiry/v2/search/InquirySearchPanel.js.map +1 -1
  347. package/dist/inquiry/v2/search/InquirySearchPanel.mjs +4 -8
  348. package/dist/inquiry/v2/search/InquirySearchPanel.mjs.map +1 -1
  349. package/dist/inquiry/v2/search/RecordFinder.d.ts +30 -1
  350. package/dist/inquiry/v2/search/RecordFinder.d.ts.map +1 -1
  351. package/dist/inquiry/v2/search/RecordFinder.js +43 -20
  352. package/dist/inquiry/v2/search/RecordFinder.js.map +1 -1
  353. package/dist/inquiry/v2/search/RecordFinder.mjs +68 -42
  354. package/dist/inquiry/v2/search/RecordFinder.mjs.map +1 -1
  355. package/dist/inquiry/v2/search/index.d.ts +3 -3
  356. package/dist/inquiry/v2/search/index.d.ts.map +1 -1
  357. package/dist/inquiry/v2/search/index.js +1 -1
  358. package/dist/inquiry/v2/search/index.js.map +1 -1
  359. package/dist/inquiry/v2/search/searchModel.d.ts +130 -23
  360. package/dist/inquiry/v2/search/searchModel.d.ts.map +1 -1
  361. package/dist/inquiry/v2/search/searchModel.js +237 -36
  362. package/dist/inquiry/v2/search/searchModel.js.map +1 -1
  363. package/dist/inquiry/v2/search/searchModel.mjs +207 -34
  364. package/dist/inquiry/v2/search/searchModel.mjs.map +1 -1
  365. package/dist/inquiry/v2/search/useInquirySearch.d.ts.map +1 -1
  366. package/dist/inquiry/v2/search/useInquirySearch.js +46 -19
  367. package/dist/inquiry/v2/search/useInquirySearch.js.map +1 -1
  368. package/dist/inquiry/v2/search/useInquirySearch.mjs +83 -84
  369. package/dist/inquiry/v2/search/useInquirySearch.mjs.map +1 -1
  370. package/dist/inquiry/v2/tree/InquiryFluentTreeMenu.d.ts +4 -1
  371. package/dist/inquiry/v2/tree/InquiryFluentTreeMenu.d.ts.map +1 -1
  372. package/dist/inquiry/v2/tree/InquiryFluentTreeMenu.js +174 -166
  373. package/dist/inquiry/v2/tree/InquiryFluentTreeMenu.js.map +1 -1
  374. package/dist/inquiry/v2/tree/InquiryFluentTreeMenu.mjs +343 -325
  375. package/dist/inquiry/v2/tree/InquiryFluentTreeMenu.mjs.map +1 -1
  376. package/dist/inquiry/v2/tree/InquiryMenuToolbar.d.ts +3 -1
  377. package/dist/inquiry/v2/tree/InquiryMenuToolbar.d.ts.map +1 -1
  378. package/dist/inquiry/v2/tree/InquiryMenuToolbar.js +8 -7
  379. package/dist/inquiry/v2/tree/InquiryMenuToolbar.js.map +1 -1
  380. package/dist/inquiry/v2/tree/InquiryMenuToolbar.mjs +68 -72
  381. package/dist/inquiry/v2/tree/InquiryMenuToolbar.mjs.map +1 -1
  382. package/dist/inquiry/v2/tree/LoadRecordDialog.d.ts +3 -3
  383. package/dist/inquiry/v2/tree/LoadRecordDialog.d.ts.map +1 -1
  384. package/dist/inquiry/v2/tree/LoadRecordDialog.js +12 -7
  385. package/dist/inquiry/v2/tree/LoadRecordDialog.js.map +1 -1
  386. package/dist/inquiry/v2/tree/LoadRecordDialog.mjs +48 -33
  387. package/dist/inquiry/v2/tree/LoadRecordDialog.mjs.map +1 -1
  388. package/dist/inquiry/v2/tree/NodeList.d.ts.map +1 -1
  389. package/dist/inquiry/v2/tree/NodeList.js +17 -6
  390. package/dist/inquiry/v2/tree/NodeList.js.map +1 -1
  391. package/dist/inquiry/v2/tree/NodeList.mjs +49 -36
  392. package/dist/inquiry/v2/tree/NodeList.mjs.map +1 -1
  393. package/dist/inquiry/v2/tree/arrivalModel.d.ts +15 -0
  394. package/dist/inquiry/v2/tree/arrivalModel.d.ts.map +1 -1
  395. package/dist/inquiry/v2/tree/arrivalModel.js +14 -1
  396. package/dist/inquiry/v2/tree/arrivalModel.js.map +1 -1
  397. package/dist/inquiry/v2/tree/arrivalModel.mjs +12 -1
  398. package/dist/inquiry/v2/tree/arrivalModel.mjs.map +1 -1
  399. package/dist/inquiry/v2/tree/branchRefreshModel.d.ts +32 -0
  400. package/dist/inquiry/v2/tree/branchRefreshModel.d.ts.map +1 -0
  401. package/dist/inquiry/v2/tree/branchRefreshModel.js +62 -0
  402. package/dist/inquiry/v2/tree/branchRefreshModel.js.map +1 -0
  403. package/dist/inquiry/v2/tree/branchRefreshModel.mjs +60 -0
  404. package/dist/inquiry/v2/tree/branchRefreshModel.mjs.map +1 -0
  405. package/dist/inquiry/v2/tree/droppedPageModel.d.ts +23 -1
  406. package/dist/inquiry/v2/tree/droppedPageModel.d.ts.map +1 -1
  407. package/dist/inquiry/v2/tree/droppedPageModel.js +53 -26
  408. package/dist/inquiry/v2/tree/droppedPageModel.js.map +1 -1
  409. package/dist/inquiry/v2/tree/droppedPageModel.mjs +48 -20
  410. package/dist/inquiry/v2/tree/droppedPageModel.mjs.map +1 -1
  411. package/dist/inquiry/v2/tree/fluentTreeMenu/treeMenuVisuals.d.ts +7 -12
  412. package/dist/inquiry/v2/tree/fluentTreeMenu/treeMenuVisuals.d.ts.map +1 -1
  413. package/dist/inquiry/v2/tree/fluentTreeMenu/treeMenuVisuals.js +44 -15
  414. package/dist/inquiry/v2/tree/fluentTreeMenu/treeMenuVisuals.js.map +1 -1
  415. package/dist/inquiry/v2/tree/fluentTreeMenu/treeMenuVisuals.mjs +34 -15
  416. package/dist/inquiry/v2/tree/fluentTreeMenu/treeMenuVisuals.mjs.map +1 -1
  417. package/dist/inquiry/v2/tree/fluentTreeMenu/useAggregateBadges.d.ts.map +1 -1
  418. package/dist/inquiry/v2/tree/fluentTreeMenu/useAggregateBadges.js +7 -18
  419. package/dist/inquiry/v2/tree/fluentTreeMenu/useAggregateBadges.js.map +1 -1
  420. package/dist/inquiry/v2/tree/fluentTreeMenu/useAggregateBadges.mjs +6 -14
  421. package/dist/inquiry/v2/tree/fluentTreeMenu/useAggregateBadges.mjs.map +1 -1
  422. package/dist/inquiry/v2/tree/fluentTreeMenu/useChildCountBadges.d.ts +20 -16
  423. package/dist/inquiry/v2/tree/fluentTreeMenu/useChildCountBadges.d.ts.map +1 -1
  424. package/dist/inquiry/v2/tree/fluentTreeMenu/useChildCountBadges.js +77 -55
  425. package/dist/inquiry/v2/tree/fluentTreeMenu/useChildCountBadges.js.map +1 -1
  426. package/dist/inquiry/v2/tree/fluentTreeMenu/useChildCountBadges.mjs +85 -106
  427. package/dist/inquiry/v2/tree/fluentTreeMenu/useChildCountBadges.mjs.map +1 -1
  428. package/dist/inquiry/v2/tree/lineageModel.d.ts +18 -1
  429. package/dist/inquiry/v2/tree/lineageModel.d.ts.map +1 -1
  430. package/dist/inquiry/v2/tree/lineageModel.js +71 -2
  431. package/dist/inquiry/v2/tree/lineageModel.js.map +1 -1
  432. package/dist/inquiry/v2/tree/lineageModel.mjs +53 -3
  433. package/dist/inquiry/v2/tree/lineageModel.mjs.map +1 -1
  434. package/dist/inquiry/v2/tree/menuRebuildModel.d.ts +10 -27
  435. package/dist/inquiry/v2/tree/menuRebuildModel.d.ts.map +1 -1
  436. package/dist/inquiry/v2/tree/menuRebuildModel.js +8 -58
  437. package/dist/inquiry/v2/tree/menuRebuildModel.js.map +1 -1
  438. package/dist/inquiry/v2/tree/menuRebuildModel.mjs +8 -51
  439. package/dist/inquiry/v2/tree/menuRebuildModel.mjs.map +1 -1
  440. package/dist/inquiry/v2/tree/pagedChildrenModel.d.ts +26 -0
  441. package/dist/inquiry/v2/tree/pagedChildrenModel.d.ts.map +1 -0
  442. package/dist/inquiry/v2/tree/pagedChildrenModel.js +56 -0
  443. package/dist/inquiry/v2/tree/pagedChildrenModel.js.map +1 -0
  444. package/dist/inquiry/v2/tree/pagedChildrenModel.mjs +43 -0
  445. package/dist/inquiry/v2/tree/pagedChildrenModel.mjs.map +1 -0
  446. package/dist/inquiry/v2/tree/rootRemovalModel.d.ts +7 -0
  447. package/dist/inquiry/v2/tree/rootRemovalModel.d.ts.map +1 -1
  448. package/dist/inquiry/v2/tree/rootRemovalModel.js +31 -5
  449. package/dist/inquiry/v2/tree/rootRemovalModel.js.map +1 -1
  450. package/dist/inquiry/v2/tree/rootRemovalModel.mjs +21 -4
  451. package/dist/inquiry/v2/tree/rootRemovalModel.mjs.map +1 -1
  452. package/dist/inquiry/v2/tree/treeFilterModel.d.ts +0 -2
  453. package/dist/inquiry/v2/tree/treeFilterModel.d.ts.map +1 -1
  454. package/dist/inquiry/v2/tree/treeFilterModel.js +0 -7
  455. package/dist/inquiry/v2/tree/treeFilterModel.js.map +1 -1
  456. package/dist/inquiry/v2/tree/treeFilterModel.mjs.map +1 -1
  457. package/dist/inquiry/v2/tree/useInquiryMenu.d.ts +16 -7
  458. package/dist/inquiry/v2/tree/useInquiryMenu.d.ts.map +1 -1
  459. package/dist/inquiry/v2/tree/useInquiryMenu.js +401 -163
  460. package/dist/inquiry/v2/tree/useInquiryMenu.js.map +1 -1
  461. package/dist/inquiry/v2/tree/useInquiryMenu.mjs +511 -310
  462. package/dist/inquiry/v2/tree/useInquiryMenu.mjs.map +1 -1
  463. package/dist/inquiry/v2/tree/waveLoader.d.ts +10 -11
  464. package/dist/inquiry/v2/tree/waveLoader.d.ts.map +1 -1
  465. package/dist/inquiry/v2/tree/waveLoader.js +78 -72
  466. package/dist/inquiry/v2/tree/waveLoader.js.map +1 -1
  467. package/dist/inquiry/v2/tree/waveLoader.mjs +79 -68
  468. package/dist/inquiry/v2/tree/waveLoader.mjs.map +1 -1
  469. package/dist/inquiry/v2/widgets/listRow.module.css +27 -0
  470. package/dist/inquiry/v2/widgets/widgetRowModel.d.ts +6 -2
  471. package/dist/inquiry/v2/widgets/widgetRowModel.d.ts.map +1 -1
  472. package/dist/inquiry/v2/widgets/widgetRowModel.js +49 -14
  473. package/dist/inquiry/v2/widgets/widgetRowModel.js.map +1 -1
  474. package/dist/inquiry/v2/widgets/widgetRowModel.mjs +36 -12
  475. package/dist/inquiry/v2/widgets/widgetRowModel.mjs.map +1 -1
  476. package/dist/maintenance/UdpTaggedRecordsPage.mjs +1 -1
  477. package/dist/maintenance/api/lookupApi.mjs +1 -1
  478. package/dist/maintenance/api/tagsApi.mjs +1 -1
  479. package/dist/maintenance/config/nodeDefaults.d.ts.map +1 -1
  480. package/dist/maintenance/config/nodeDefaults.js +16 -5
  481. package/dist/maintenance/config/nodeDefaults.js.map +1 -1
  482. package/dist/maintenance/config/nodeDefaults.mjs +14 -5
  483. package/dist/maintenance/config/nodeDefaults.mjs.map +1 -1
  484. package/dist/maintenance/config/useEntityConfig.mjs +1 -1
  485. package/dist/maintenance/config/useLinkedLabels.mjs +1 -1
  486. package/dist/maintenance/grid/MaintenanceGrid.mjs +1 -1
  487. package/dist/maintenance/metadata/useEntityMetadata.mjs +1 -1
  488. package/dist/maintenance/record/ChildTab.mjs +1 -1
  489. package/dist/maintenance/record/DeleteRecordDialog.mjs +1 -1
  490. package/dist/maintenance/record/LinkRecordsSheet.mjs +1 -1
  491. package/dist/maintenance/record/RecordFacts.mjs +1 -1
  492. package/dist/maintenance/record/RecordSheet.mjs +2 -2
  493. package/dist/maintenance/record/displayValue.mjs +1 -1
  494. package/dist/maintenance/record/stampDisplayText.mjs +1 -1
  495. package/dist/maintenance/settings/useEntityCatalog.mjs +1 -1
  496. package/dist/maintenanceEngine/tableBrowser/TableColumnDefs.d.ts +4 -5
  497. package/dist/maintenanceEngine/tableBrowser/TableColumnDefs.d.ts.map +1 -1
  498. package/dist/stores/inquiryStore.d.ts +2 -1
  499. package/dist/stores/inquiryStore.d.ts.map +1 -1
  500. package/dist/stores/inquiryStore.js +4 -3
  501. package/dist/stores/inquiryStore.js.map +1 -1
  502. package/dist/stores/inquiryStore.mjs +18 -11
  503. package/dist/stores/inquiryStore.mjs.map +1 -1
  504. package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.d.ts.map +1 -1
  505. package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.js +1 -1
  506. package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.js.map +1 -1
  507. package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.mjs +2 -1
  508. package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.mjs.map +1 -1
  509. package/dist/udp/pages/UdpMaintenanceEnginePage/components/EntitiyTimeLine.mjs +1 -1
  510. package/dist/udp/utilities/useDateStringColumnDef.d.ts +1 -1
  511. package/dist/utilities/i18n/locales/es-US.json +23 -5
  512. package/dist/utilities/i18n/locales/es-US.mjs +24 -4
  513. package/dist/utilities/i18n/locales/fr-CA.json +23 -5
  514. package/dist/utilities/i18n/locales/fr-CA.mjs +24 -4
  515. package/package.json +30 -18
  516. package/dist/actionPanels/PanelActionForm.d.ts +0 -56
  517. package/dist/actionPanels/PanelActionForm.d.ts.map +0 -1
  518. package/dist/actionPanels/PanelActionForm.js +0 -30
  519. package/dist/actionPanels/PanelActionForm.js.map +0 -1
  520. package/dist/actionPanels/PanelActionForm.mjs +0 -168
  521. package/dist/actionPanels/PanelActionForm.mjs.map +0 -1
  522. package/dist/actionPanels/PanelEditor.d.ts +0 -44
  523. package/dist/actionPanels/PanelEditor.d.ts.map +0 -1
  524. package/dist/actionPanels/PanelEditor.js +0 -78
  525. package/dist/actionPanels/PanelEditor.js.map +0 -1
  526. package/dist/actionPanels/PanelEditor.mjs +0 -345
  527. package/dist/actionPanels/PanelEditor.mjs.map +0 -1
  528. package/dist/actionPanels/panelActionFields.module.css +0 -18
  529. package/dist/domain/inquiryTree/ruleBindings.d.ts +0 -10
  530. package/dist/domain/inquiryTree/ruleBindings.d.ts.map +0 -1
  531. package/dist/domain/inquiryTree/ruleBindings.js +0 -20
  532. package/dist/domain/inquiryTree/ruleBindings.js.map +0 -1
  533. package/dist/domain/inquiryTree/ruleBindings.mjs +0 -21
  534. package/dist/domain/inquiryTree/ruleBindings.mjs.map +0 -1
  535. package/dist/inquiry/v2/kernel/readOnlyModel.d.ts +0 -17
  536. package/dist/inquiry/v2/kernel/readOnlyModel.d.ts.map +0 -1
  537. package/dist/inquiry/v2/kernel/readOnlyModel.js +0 -19
  538. package/dist/inquiry/v2/kernel/readOnlyModel.js.map +0 -1
  539. package/dist/inquiry/v2/kernel/readOnlyModel.mjs +0 -21
  540. package/dist/inquiry/v2/kernel/readOnlyModel.mjs.map +0 -1
@@ -1,94 +1,28 @@
1
+ import { resolveIconName } from "../icons/legacyIconNames.mjs";
1
2
  import { ActionType } from "../domain/actionPanel/types.mjs";
2
3
  import { ACTION_TYPE_META, actionTypeLabel } from "../domain/actionPanel/actionTypeMeta.mjs";
4
+ import { panelButtonOrder } from "../domain/actionPanel/buttonOrder.mjs";
3
5
  //#region src/actionPanels/panelOperations.ts
4
6
  /**
5
- * Pure logic behind the action-panel editors: grouping, reordering, new-button
7
+ * Pure logic behind the action-panel editors: group names, new-button
6
8
  * defaults, action-type switching and the one-line behaviour summary.
7
9
  *
8
10
  * No React, no HTTP — kept separate from the components so the rules that are
9
11
  * easy to get wrong (what a type change clears, where a page id is stored) are
10
12
  * unit-tested by `pnpm test:domain` rather than eyeballed in a browser.
11
13
  */
12
- /** UI label for the `groupName === null` tail. Never persisted. */
13
- const UNGROUPED_LABEL = "Ungrouped";
14
- /** Shown in place of an empty action name. */
15
- const UNTITLED_BUTTON_LABEL = "Untitled action";
16
14
  /**
17
15
  * Identity for React keys and single-expand tracking. Persisted rows have an
18
- * association id; unsaved ones fall back to their position, which the mutating
19
- * helpers below deliberately keep stable (reordering rewrites `sequence`, never
20
- * the array order).
16
+ * association id; unsaved ones fall back to their position, which reordering
17
+ * keeps stable (moveButtonInOrder rewrites `sequence`, never the array order).
21
18
  */
22
19
  const buttonKey = (button, index) => button.panelActionId ?? `index:${index}`;
23
20
  const isNamedGroup = (groupName) => typeof groupName === "string" && groupName.trim() !== "";
24
- const bySequence = (a, b) => a.button.sequence - b.button.sequence || a.index - b.index;
25
21
  /**
26
- * Group order = first appearance in sequence order, ungrouped last. Mirrors the
27
- * inquiry runtime's Actions popover, which renders same-named buttons as one
28
- * section sorted by `sequence` within it.
22
+ * Distinct group names already used in the panel, in the canonical button
23
+ * order — the order the runtime's actions menu sections them in.
29
24
  */
30
- const groupButtons = (panel) => {
31
- const ordered = (panel?.buttons ?? []).map((button, index) => ({
32
- button,
33
- index
34
- })).sort(bySequence);
35
- const groups = [];
36
- const named = /* @__PURE__ */ new Map();
37
- let ungrouped;
38
- for (const entry of ordered) {
39
- const groupName = entry.button.groupName;
40
- if (!isNamedGroup(groupName)) {
41
- if (!ungrouped) ungrouped = {
42
- groupName: null,
43
- buttons: []
44
- };
45
- ungrouped.buttons.push(entry);
46
- continue;
47
- }
48
- let group = named.get(groupName);
49
- if (!group) {
50
- group = {
51
- groupName,
52
- buttons: []
53
- };
54
- named.set(groupName, group);
55
- groups.push(group);
56
- }
57
- group.buttons.push(entry);
58
- }
59
- if (ungrouped) groups.push(ungrouped);
60
- return groups;
61
- };
62
- /** Distinct group names already used in the panel, in section order. */
63
- const panelGroupNames = (panel) => groupButtons(panel).map((group) => group.groupName).filter(isNamedGroup);
64
- /**
65
- * Move a button one slot within its group and renumber `sequence` across the
66
- * whole panel from the flattened group order, so what the editor shows is what
67
- * `sequence` says. Array order is untouched (keys stay stable). Returns the
68
- * same panel when the move is not possible.
69
- */
70
- const moveButton = (panel, index, direction) => {
71
- const groups = groupButtons(panel);
72
- const group = groups.find((candidate) => candidate.buttons.some((entry) => entry.index === index));
73
- if (!group) return panel;
74
- const from = group.buttons.findIndex((entry) => entry.index === index);
75
- const to = direction === "up" ? from - 1 : from + 1;
76
- if (to < 0 || to >= group.buttons.length) return panel;
77
- const reordered = group.buttons.slice();
78
- [reordered[from], reordered[to]] = [reordered[to], reordered[from]];
79
- const flattened = groups.flatMap((candidate) => candidate === group ? reordered : candidate.buttons);
80
- const buttons = panel.buttons.slice();
81
- flattened.forEach((entry, position) => {
82
- buttons[entry.index] = {
83
- ...entry.button,
84
- sequence: position + 1
85
- };
86
- });
87
- return {
88
- ...panel,
89
- buttons
90
- };
91
- };
25
+ const panelGroupNames = (panel) => [...new Set(panelButtonOrder(panel).map((index) => panel.buttons[index].groupName).filter(isNamedGroup))];
92
26
  /** A brand-new, unsaved button appended to the end of the panel. */
93
27
  const newPanelButton = (panel) => {
94
28
  const lastSequence = (panel?.buttons ?? []).reduce((max, button) => Math.max(max, button.sequence), 0);
@@ -134,17 +68,30 @@ const withoutPageId = (parameters) => {
134
68
  return Object.keys(rest).length ? rest : null;
135
69
  };
136
70
  /**
137
- * Switch action type, keeping name / icon / flags / rules. `value` survives
138
- * only when both types put the same thing in it (legacy behaviour: leaving the
139
- * API group clears it), and `parameters.pageId` only when the new type still
140
- * opens a page.
71
+ * Whether a button's icon is still its type's own (or none at all) — an icon
72
+ * nobody chose, which follows the type when the type changes.
73
+ */
74
+ const iconIsTypeDefault = (button) => {
75
+ const icon = resolveIconName(button.icon?.name, void 0, button.icon?.fluentName);
76
+ return !icon || icon === "apps" || icon === ACTION_TYPE_META[button.action.actionTypeId]?.iconName;
77
+ };
78
+ /**
79
+ * Switch action type, keeping name / flags / rules, and an icon the author
80
+ * chose (an unchosen one becomes the new type's). `value` survives only when
81
+ * both types put the same thing in it (legacy behaviour: leaving the API group
82
+ * clears it), and `parameters.pageId` only when the new type still opens a page.
141
83
  */
142
84
  const changeActionType = (button, actionTypeId) => {
143
85
  const fromSlot = valueSlot(valueKindOf(button));
144
86
  const toKind = ACTION_TYPE_META[actionTypeId]?.valueKind ?? "none";
145
87
  const keepValue = fromSlot !== null && fromSlot === valueSlot(toKind);
88
+ const typeIcon = ACTION_TYPE_META[actionTypeId]?.iconName;
146
89
  return {
147
90
  ...button,
91
+ icon: typeIcon && iconIsTypeDefault(button) ? {
92
+ name: typeIcon,
93
+ type: null
94
+ } : button.icon,
148
95
  action: {
149
96
  ...button.action,
150
97
  actionTypeId,
@@ -184,25 +131,23 @@ const setButtonPageId = (button, pageId) => {
184
131
  }
185
132
  };
186
133
  };
187
- /** Write the API method into `value`. */
188
- const setButtonApiMethodId = (button, apiMethodId) => ({
189
- ...button,
190
- action: {
191
- ...button.action,
192
- value: apiMethodId
193
- }
194
- });
195
134
  /**
196
- * Write the workflow into `value` — the field v1 Tree Builder wrote and the
197
- * runtime's Start workflow reads (`workflow/{value}/start`).
135
+ * Write `value`: the API method for the API types, the workflow for Start
136
+ * workflow (the field v1 Tree Builder wrote and the runtime reads,
137
+ * `workflow/{value}/start`), the text for the text types.
198
138
  */
199
- const setButtonWorkflowId = (button, workflowId) => ({
139
+ const setButtonValue = (button, value) => ({
200
140
  ...button,
201
141
  action: {
202
142
  ...button.action,
203
- value: workflowId
143
+ value
204
144
  }
205
145
  });
146
+ /** The page option a button points at — under either id legacy persisted. */
147
+ const findButtonPage = (pages, button) => {
148
+ const pageId = buttonPageId(button);
149
+ return pageId ? pages?.find((page) => pageOptionId(page) === pageId || page.pageId === pageId) : void 0;
150
+ };
206
151
  const MAX_SUMMARY_VALUE = 48;
207
152
  const truncate = (value) => value.length > MAX_SUMMARY_VALUE ? `${value.slice(0, MAX_SUMMARY_VALUE - 1)}…` : value;
208
153
  /**
@@ -220,7 +165,7 @@ const describeButton = (button, lookups = {}) => {
220
165
  }
221
166
  if (usesPage(kind)) {
222
167
  const pageId = buttonPageId(button);
223
- const name = pageId ? lookups.pages?.find((page) => pageOptionId(page) === pageId || page.pageId === pageId)?.name : void 0;
168
+ const name = findButtonPage(lookups.pages, button)?.name;
224
169
  parts.push(name ? `Page: ${name}` : pageId ? "Page not found" : "No page");
225
170
  }
226
171
  if (kind === "text") {
@@ -235,6 +180,6 @@ const describeButton = (button, lookups = {}) => {
235
180
  return parts.join(" · ");
236
181
  };
237
182
  //#endregion
238
- export { UNGROUPED_LABEL, UNTITLED_BUTTON_LABEL, buttonKey, buttonPageId, changeActionType, describeButton, groupButtons, moveButton, newPanelButton, pageOptionId, panelGroupNames, setButtonApiMethodId, setButtonPageId, setButtonWorkflowId, usesPage, valueKindOf };
183
+ export { buttonKey, buttonPageId, changeActionType, describeButton, findButtonPage, newPanelButton, pageOptionId, panelGroupNames, setButtonPageId, setButtonValue, usesPage, valueKindOf };
239
184
 
240
185
  //# sourceMappingURL=panelOperations.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"panelOperations.mjs","names":["ACTION_TYPE_META","ActionValueKind","actionTypeLabel","ActionType","Panel","PanelButton","ActionLookups","PageOption","UNGROUPED_LABEL","UNTITLED_BUTTON_LABEL","buttonKey","button","index","panelActionId","GroupedPanelButton","PanelButtonGroup","groupName","buttons","isNamedGroup","trim","bySequence","a","b","sequence","groupButtons","panel","ordered","map","sort","groups","named","Map","ungrouped","entry","push","group","get","set","panelGroupNames","filter","moveButton","direction","find","candidate","some","from","findIndex","to","length","reordered","slice","flattened","flatMap","forEach","position","newPanelButton","lastSequence","reduce","max","Math","action","actionId","name","actionTypeId","ExecuteApi","value","parameters","rules","provenance","isProductAction","isGlobalAction","icon","iconName","type","enabled","isPrimary","hideAction","valueKindOf","valueKind","valueSlot","kind","usesPage","withoutPageId","pageId","undefined","rest","Object","keys","changeActionType","fromSlot","toKind","keepValue","pageOptionId","page","parentPageId","buttonPageId","fromParameters","setButtonPageId","Record","setButtonApiMethodId","apiMethodId","setButtonWorkflowId","workflowId","MAX_SUMMARY_VALUE","truncate","describeButton","lookups","parts","apiMethods","method","pages","valueLabel","toLowerCase","workflows","workflow","join"],"sources":["../../src/actionPanels/panelOperations.ts"],"sourcesContent":["/**\n * Pure logic behind the action-panel editors: grouping, reordering, new-button\n * defaults, action-type switching and the one-line behaviour summary.\n *\n * No React, no HTTP — kept separate from the components so the rules that are\n * easy to get wrong (what a type change clears, where a page id is stored) are\n * unit-tested by `pnpm test:domain` rather than eyeballed in a browser.\n */\nimport {\n ACTION_TYPE_META,\n ActionValueKind,\n actionTypeLabel\n} from '../domain/actionPanel/actionTypeMeta';\nimport { ActionType, Panel, PanelButton } from '../domain/actionPanel/types';\nimport { ActionLookups, PageOption } from './types';\n\n/** UI label for the `groupName === null` tail. Never persisted. */\nexport const UNGROUPED_LABEL = 'Ungrouped';\n\n/** Shown in place of an empty action name. */\nexport const UNTITLED_BUTTON_LABEL = 'Untitled action';\n\n/**\n * Identity for React keys and single-expand tracking. Persisted rows have an\n * association id; unsaved ones fall back to their position, which the mutating\n * helpers below deliberately keep stable (reordering rewrites `sequence`, never\n * the array order).\n */\nexport const buttonKey = (button: PanelButton, index: number): string =>\n button.panelActionId ?? `index:${index}`;\n\n/** A button paired with its position in `panel.buttons`. */\nexport interface GroupedPanelButton {\n button: PanelButton;\n /** Position in `panel.buttons` — what the mutating helpers address. */\n index: number;\n}\n\n/** One group section: same `groupName`, ordered by `sequence`. */\nexport interface PanelButtonGroup {\n /** null ⇒ the ungrouped tail. */\n groupName: string | null;\n buttons: GroupedPanelButton[];\n}\n\nconst isNamedGroup = (groupName: string | null): groupName is string =>\n typeof groupName === 'string' && groupName.trim() !== '';\n\nconst bySequence = (a: GroupedPanelButton, b: GroupedPanelButton): number =>\n a.button.sequence - b.button.sequence || a.index - b.index;\n\n/**\n * Group order = first appearance in sequence order, ungrouped last. Mirrors the\n * inquiry runtime's Actions popover, which renders same-named buttons as one\n * section sorted by `sequence` within it.\n */\nexport const groupButtons = (panel: Panel): PanelButtonGroup[] => {\n const ordered = (panel?.buttons ?? [])\n .map((button, index) => ({ button, index }))\n .sort(bySequence);\n\n const groups: PanelButtonGroup[] = [];\n const named = new Map<string, PanelButtonGroup>();\n let ungrouped: PanelButtonGroup | undefined;\n\n for (const entry of ordered) {\n const groupName = entry.button.groupName;\n if (!isNamedGroup(groupName)) {\n if (!ungrouped) ungrouped = { groupName: null, buttons: [] };\n ungrouped.buttons.push(entry);\n continue;\n }\n let group = named.get(groupName);\n if (!group) {\n group = { groupName, buttons: [] };\n named.set(groupName, group);\n groups.push(group);\n }\n group.buttons.push(entry);\n }\n if (ungrouped) groups.push(ungrouped);\n return groups;\n};\n\n/** Distinct group names already used in the panel, in section order. */\nexport const panelGroupNames = (panel: Panel): string[] =>\n groupButtons(panel)\n .map((group) => group.groupName)\n .filter(isNamedGroup);\n\n/**\n * Move a button one slot within its group and renumber `sequence` across the\n * whole panel from the flattened group order, so what the editor shows is what\n * `sequence` says. Array order is untouched (keys stay stable). Returns the\n * same panel when the move is not possible.\n */\nexport const moveButton = (\n panel: Panel,\n index: number,\n direction: 'up' | 'down'\n): Panel => {\n const groups = groupButtons(panel);\n const group = groups.find((candidate) =>\n candidate.buttons.some((entry) => entry.index === index)\n );\n if (!group) return panel;\n\n const from = group.buttons.findIndex((entry) => entry.index === index);\n const to = direction === 'up' ? from - 1 : from + 1;\n if (to < 0 || to >= group.buttons.length) return panel;\n\n const reordered = group.buttons.slice();\n [reordered[from], reordered[to]] = [reordered[to], reordered[from]];\n\n const flattened = groups.flatMap((candidate) =>\n candidate === group ? reordered : candidate.buttons\n );\n const buttons = panel.buttons.slice();\n flattened.forEach((entry, position) => {\n buttons[entry.index] = { ...entry.button, sequence: position + 1 };\n });\n return { ...panel, buttons };\n};\n\n/** A brand-new, unsaved button appended to the end of the panel. */\nexport const newPanelButton = (panel: Panel): PanelButton => {\n const lastSequence = (panel?.buttons ?? []).reduce(\n (max, button) => Math.max(max, button.sequence),\n 0\n );\n return {\n action: {\n actionId: null,\n name: '',\n actionTypeId: ActionType.ExecuteApi,\n value: null,\n parameters: null,\n rules: [],\n provenance: { isProductAction: false, isGlobalAction: false }\n },\n icon: {\n name: ACTION_TYPE_META[ActionType.ExecuteApi].iconName,\n type: null\n },\n groupName: null,\n sequence: lastSequence + 1,\n enabled: true,\n isPrimary: false,\n hideAction: false\n };\n};\n\n/** Which value control this button's action type needs. */\nexport const valueKindOf = (button: PanelButton): ActionValueKind =>\n ACTION_TYPE_META[button?.action?.actionTypeId]?.valueKind ?? 'none';\n\n/** What `ActionConfig.value` holds for a value kind — null ⇒ nothing. */\nconst valueSlot = (\n kind: ActionValueKind\n): 'apiMethod' | 'text' | 'workflow' | null => {\n if (kind === 'api' || kind === 'apiAndPage') return 'apiMethod';\n if (kind === 'text') return 'text';\n if (kind === 'workflow') return 'workflow';\n return null;\n};\n\n/** Does this value kind carry a page in `parameters.pageId`? */\nexport const usesPage = (kind: ActionValueKind): boolean =>\n kind === 'page' || kind === 'apiAndPage';\n\nconst withoutPageId = (\n parameters: PanelButton['action']['parameters']\n): PanelButton['action']['parameters'] => {\n if (!parameters || parameters.pageId === undefined) return parameters ?? null;\n const rest = { ...parameters };\n delete rest.pageId;\n return Object.keys(rest).length ? rest : null;\n};\n\n/**\n * Switch action type, keeping name / icon / flags / rules. `value` survives\n * only when both types put the same thing in it (legacy behaviour: leaving the\n * API group clears it), and `parameters.pageId` only when the new type still\n * opens a page.\n */\nexport const changeActionType = (\n button: PanelButton,\n actionTypeId: ActionType\n): PanelButton => {\n const fromSlot = valueSlot(valueKindOf(button));\n const toKind = ACTION_TYPE_META[actionTypeId]?.valueKind ?? 'none';\n const keepValue = fromSlot !== null && fromSlot === valueSlot(toKind);\n return {\n ...button,\n action: {\n ...button.action,\n actionTypeId,\n value: keepValue ? button.action.value : null,\n parameters: usesPage(toKind)\n ? button.action.parameters\n : withoutPageId(button.action.parameters)\n }\n };\n};\n\n/** The id persisted for a page — legacy rule: the parent page wins. */\nexport const pageOptionId = (page: PageOption): string =>\n page.parentPageId || page.pageId;\n\n/**\n * Page currently selected on a button. `parameters.pageId` is authoritative\n * (that is what the runtime reads); legacy split-screen rows written by the old\n * sheet kept the page in `value`, so those still resolve.\n */\nexport const buttonPageId = (button: PanelButton): string | null => {\n const fromParameters = button.action.parameters?.pageId;\n if (typeof fromParameters === 'string' && fromParameters)\n return fromParameters;\n if (valueKindOf(button) === 'page' && button.action.value)\n return button.action.value;\n return null;\n};\n\n/**\n * Write the page into `parameters.pageId`. `value` is deliberately left alone:\n * for the split-screen types the captured wire data keeps the page in\n * `parameters` and `value` empty, and for Create/Update/Retrieve `value` is the\n * API method.\n */\nexport const setButtonPageId = (\n button: PanelButton,\n pageId: string | null\n): PanelButton => {\n const parameters: { pageId?: string } & Record<string, unknown> = {\n ...(button.action.parameters ?? {})\n };\n if (pageId) parameters.pageId = pageId;\n else delete parameters.pageId;\n return {\n ...button,\n action: {\n ...button.action,\n parameters: Object.keys(parameters).length ? parameters : null\n }\n };\n};\n\n/** Write the API method into `value`. */\nexport const setButtonApiMethodId = (\n button: PanelButton,\n apiMethodId: string | null\n): PanelButton => ({\n ...button,\n action: { ...button.action, value: apiMethodId }\n});\n\n/**\n * Write the workflow into `value` — the field v1 Tree Builder wrote and the\n * runtime's Start workflow reads (`workflow/{value}/start`).\n */\nexport const setButtonWorkflowId = (\n button: PanelButton,\n workflowId: string | null\n): PanelButton => ({\n ...button,\n action: { ...button.action, value: workflowId }\n});\n\nconst MAX_SUMMARY_VALUE = 48;\n\nconst truncate = (value: string): string =>\n value.length > MAX_SUMMARY_VALUE\n ? `${value.slice(0, MAX_SUMMARY_VALUE - 1)}…`\n : value;\n\n/**\n * One-line summary of what a button does: type label plus resolved lookup\n * names. Never renders a raw guid — an id with no matching lookup row reads as\n * \"not found\" so a broken reference is visible.\n */\nexport const describeButton = (\n button: PanelButton,\n lookups: ActionLookups = {}\n): string => {\n const kind = valueKindOf(button);\n const parts = [actionTypeLabel(button.action.actionTypeId)];\n\n if (kind === 'api' || kind === 'apiAndPage') {\n const apiMethodId = button.action.value;\n const name = apiMethodId\n ? lookups.apiMethods?.find(\n (method) => method.apiMethodId === apiMethodId\n )?.name\n : undefined;\n parts.push(\n name\n ? `API: ${name}`\n : apiMethodId\n ? 'API method not found'\n : 'No API method'\n );\n }\n\n if (usesPage(kind)) {\n const pageId = buttonPageId(button);\n const name = pageId\n ? lookups.pages?.find(\n (page) => pageOptionId(page) === pageId || page.pageId === pageId\n )?.name\n : undefined;\n parts.push(\n name ? `Page: ${name}` : pageId ? 'Page not found' : 'No page'\n );\n }\n\n if (kind === 'text') {\n const valueLabel =\n ACTION_TYPE_META[button.action.actionTypeId]?.valueLabel ?? 'Value';\n parts.push(\n button.action.value\n ? truncate(button.action.value)\n : `No ${valueLabel.toLowerCase()}`\n );\n }\n\n if (kind === 'workflow') {\n const workflowId = button.action.value;\n const name = workflowId\n ? lookups.workflows?.find((workflow) => workflow.workflowId === workflowId)\n ?.name\n : undefined;\n parts.push(\n name\n ? `Workflow: ${name}`\n : workflowId\n ? 'Workflow not found'\n : 'No workflow'\n );\n }\n\n return parts.join(' · ');\n};\n"],"mappings":";;;;;;;;;;;;AAiBA,MAAaQ,kBAAkB;;AAG/B,MAAaC,wBAAwB;;;;;;;AAQrC,MAAaC,aAAaC,QAAqBC,UAC7CD,OAAOE,iBAAiB,SAASD;AAgBnC,MAAMM,gBAAgBF,cACpB,OAAOA,cAAc,YAAYA,UAAUG,MAAM,KAAK;AAExD,MAAMC,cAAcC,GAAuBC,MACzCD,EAAEV,OAAOY,WAAWD,EAAEX,OAAOY,YAAYF,EAAET,QAAQU,EAAEV;;;;;;AAOvD,MAAaY,gBAAgBC,UAAqC;CAChE,MAAMC,WAAWD,OAAOR,WAAW,EAAE,EAClCU,KAAKhB,QAAQC,WAAW;EAAED;EAAQC;EAAO,EAAE,CAC3CgB,KAAKR,WAAW;CAEnB,MAAMS,SAA6B,EAAE;CACrC,MAAMC,wBAAQ,IAAIC,KAA+B;CACjD,IAAIC;AAEJ,MAAK,MAAMC,SAASP,SAAS;EAC3B,MAAMV,YAAYiB,MAAMtB,OAAOK;AAC/B,MAAI,CAACE,aAAaF,UAAU,EAAE;AAC5B,OAAI,CAACgB,UAAWA,aAAY;IAAEhB,WAAW;IAAMC,SAAS,EAAA;IAAI;AAC5De,aAAUf,QAAQiB,KAAKD,MAAM;AAC7B;;EAEF,IAAIE,QAAQL,MAAMM,IAAIpB,UAAU;AAChC,MAAI,CAACmB,OAAO;AACVA,WAAQ;IAAEnB;IAAWC,SAAS,EAAA;IAAI;AAClCa,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E,MACjBmE,WAAWA,OAAOT,gBAAgBA,YACpC,EAAEtC,OACHsB,KAAAA;AACJuB,QAAMzE,KACJ4B,OACI,QAAQA,SACRsC,cACE,yBACA,gBACP;;AAGH,KAAInB,SAASD,KAAK,EAAE;EAClB,MAAMG,SAASY,aAAapF,OAAO;EACnC,MAAMmD,OAAOqB,SACTuB,QAAQI,OAAOpE,MACZmD,SAASD,aAAaC,KAAK,KAAKV,UAAUU,KAAKV,WAAWA,OAC5D,EAAErB,OACHsB,KAAAA;AACJuB,QAAMzE,KACJ4B,OAAO,SAASA,SAASqB,SAAS,mBAAmB,UACtD;;AAGH,KAAIH,SAAS,QAAQ;EACnB,MAAM+B,aACJ/G,iBAAiBW,OAAOiD,OAAOG,eAAegD,cAAc;AAC9DJ,QAAMzE,KACJvB,OAAOiD,OAAOK,QACVuC,SAAS7F,OAAOiD,OAAOK,MAAM,GAC7B,MAAM8C,WAAWC,aAAa,GACnC;;AAGH,KAAIhC,SAAS,YAAY;EACvB,MAAMsB,aAAa3F,OAAOiD,OAAOK;EACjC,MAAMH,OAAOwC,aACTI,QAAQO,WAAWvE,MAAMwE,aAAaA,SAASZ,eAAeA,WAAW,EACrExC,OACJsB,KAAAA;AACJuB,QAAMzE,KACJ4B,OACI,aAAaA,SACbwC,aACE,uBACA,cACP;;AAGH,QAAOK,MAAMQ,KAAK,MAAM"}
1
+ {"version":3,"file":"panelOperations.mjs","names":["ACTION_TYPE_META","ActionValueKind","GENERIC_ACTION_ICON","actionTypeLabel","resolveIconName","panelButtonOrder","ActionType","Panel","PanelButton","ActionLookups","PageOption","buttonKey","button","index","panelActionId","isNamedGroup","groupName","trim","panelGroupNames","panel","Set","map","buttons","filter","newPanelButton","lastSequence","reduce","max","Math","sequence","action","actionId","name","actionTypeId","ExecuteApi","value","parameters","rules","provenance","isProductAction","isGlobalAction","icon","iconName","type","enabled","isPrimary","hideAction","valueKindOf","valueKind","valueSlot","kind","usesPage","withoutPageId","pageId","undefined","rest","Object","keys","length","iconIsTypeDefault","fluentName","changeActionType","fromSlot","toKind","keepValue","typeIcon","pageOptionId","page","parentPageId","buttonPageId","fromParameters","setButtonPageId","Record","setButtonValue","findButtonPage","pages","find","MAX_SUMMARY_VALUE","truncate","slice","describeButton","lookups","parts","apiMethodId","apiMethods","method","push","valueLabel","toLowerCase","workflowId","workflows","workflow","join"],"sources":["../../src/actionPanels/panelOperations.ts"],"sourcesContent":["/**\n * Pure logic behind the action-panel editors: group names, new-button\n * defaults, action-type switching and the one-line behaviour summary.\n *\n * No React, no HTTP — kept separate from the components so the rules that are\n * easy to get wrong (what a type change clears, where a page id is stored) are\n * unit-tested by `pnpm test:domain` rather than eyeballed in a browser.\n */\nimport {\n ACTION_TYPE_META,\n ActionValueKind,\n GENERIC_ACTION_ICON,\n actionTypeLabel\n} from '../domain/actionPanel/actionTypeMeta';\nimport { resolveIconName } from '../icons/legacyIconNames';\nimport { panelButtonOrder } from '../domain/actionPanel/buttonOrder';\nimport { ActionType, Panel, PanelButton } from '../domain/actionPanel/types';\nimport { ActionLookups, PageOption } from './types';\n\n/**\n * Identity for React keys and single-expand tracking. Persisted rows have an\n * association id; unsaved ones fall back to their position, which reordering\n * keeps stable (moveButtonInOrder rewrites `sequence`, never the array order).\n */\nexport const buttonKey = (button: PanelButton, index: number): string =>\n button.panelActionId ?? `index:${index}`;\n\nconst isNamedGroup = (groupName: string | null): groupName is string =>\n typeof groupName === 'string' && groupName.trim() !== '';\n\n/**\n * Distinct group names already used in the panel, in the canonical button\n * order — the order the runtime's actions menu sections them in.\n */\nexport const panelGroupNames = (panel: Panel): string[] => [\n ...new Set(\n panelButtonOrder(panel)\n .map((index) => panel.buttons[index].groupName)\n .filter(isNamedGroup)\n )\n];\n\n/** A brand-new, unsaved button appended to the end of the panel. */\nexport const newPanelButton = (panel: Panel): PanelButton => {\n const lastSequence = (panel?.buttons ?? []).reduce(\n (max, button) => Math.max(max, button.sequence),\n 0\n );\n return {\n action: {\n actionId: null,\n name: '',\n actionTypeId: ActionType.ExecuteApi,\n value: null,\n parameters: null,\n rules: [],\n provenance: { isProductAction: false, isGlobalAction: false }\n },\n icon: {\n name: ACTION_TYPE_META[ActionType.ExecuteApi].iconName,\n type: null\n },\n groupName: null,\n sequence: lastSequence + 1,\n enabled: true,\n isPrimary: false,\n hideAction: false\n };\n};\n\n/** Which value control this button's action type needs. */\nexport const valueKindOf = (button: PanelButton): ActionValueKind =>\n ACTION_TYPE_META[button?.action?.actionTypeId]?.valueKind ?? 'none';\n\n/** What `ActionConfig.value` holds for a value kind — null ⇒ nothing. */\nconst valueSlot = (\n kind: ActionValueKind\n): 'apiMethod' | 'text' | 'workflow' | null => {\n if (kind === 'api' || kind === 'apiAndPage') return 'apiMethod';\n if (kind === 'text') return 'text';\n if (kind === 'workflow') return 'workflow';\n return null;\n};\n\n/** Does this value kind carry a page in `parameters.pageId`? */\nexport const usesPage = (kind: ActionValueKind): boolean =>\n kind === 'page' || kind === 'apiAndPage';\n\nconst withoutPageId = (\n parameters: PanelButton['action']['parameters']\n): PanelButton['action']['parameters'] => {\n if (!parameters || parameters.pageId === undefined) return parameters ?? null;\n const rest = { ...parameters };\n delete rest.pageId;\n return Object.keys(rest).length ? rest : null;\n};\n\n/**\n * Whether a button's icon is still its type's own (or none at all) — an icon\n * nobody chose, which follows the type when the type changes.\n */\nconst iconIsTypeDefault = (button: PanelButton): boolean => {\n const icon = resolveIconName(button.icon?.name, undefined, button.icon?.fluentName);\n return (\n !icon ||\n icon === GENERIC_ACTION_ICON ||\n icon === ACTION_TYPE_META[button.action.actionTypeId]?.iconName\n );\n};\n\n/**\n * Switch action type, keeping name / flags / rules, and an icon the author\n * chose (an unchosen one becomes the new type's). `value` survives only when\n * both types put the same thing in it (legacy behaviour: leaving the API group\n * clears it), and `parameters.pageId` only when the new type still opens a page.\n */\nexport const changeActionType = (\n button: PanelButton,\n actionTypeId: ActionType\n): PanelButton => {\n const fromSlot = valueSlot(valueKindOf(button));\n const toKind = ACTION_TYPE_META[actionTypeId]?.valueKind ?? 'none';\n const keepValue = fromSlot !== null && fromSlot === valueSlot(toKind);\n const typeIcon = ACTION_TYPE_META[actionTypeId]?.iconName;\n return {\n ...button,\n icon:\n typeIcon && iconIsTypeDefault(button)\n ? { name: typeIcon, type: null }\n : button.icon,\n action: {\n ...button.action,\n actionTypeId,\n value: keepValue ? button.action.value : null,\n parameters: usesPage(toKind)\n ? button.action.parameters\n : withoutPageId(button.action.parameters)\n }\n };\n};\n\n/** The id persisted for a page — legacy rule: the parent page wins. */\nexport const pageOptionId = (page: PageOption): string =>\n page.parentPageId || page.pageId;\n\n/**\n * Page currently selected on a button. `parameters.pageId` is authoritative\n * (that is what the runtime reads); legacy split-screen rows written by the old\n * sheet kept the page in `value`, so those still resolve.\n */\nexport const buttonPageId = (button: PanelButton): string | null => {\n const fromParameters = button.action.parameters?.pageId;\n if (typeof fromParameters === 'string' && fromParameters)\n return fromParameters;\n if (valueKindOf(button) === 'page' && button.action.value)\n return button.action.value;\n return null;\n};\n\n/**\n * Write the page into `parameters.pageId`. `value` is deliberately left alone:\n * for the split-screen types the captured wire data keeps the page in\n * `parameters` and `value` empty, and for Create/Update/Retrieve `value` is the\n * API method.\n */\nexport const setButtonPageId = (\n button: PanelButton,\n pageId: string | null\n): PanelButton => {\n const parameters: { pageId?: string } & Record<string, unknown> = {\n ...(button.action.parameters ?? {})\n };\n if (pageId) parameters.pageId = pageId;\n else delete parameters.pageId;\n return {\n ...button,\n action: {\n ...button.action,\n parameters: Object.keys(parameters).length ? parameters : null\n }\n };\n};\n\n/**\n * Write `value`: the API method for the API types, the workflow for Start\n * workflow (the field v1 Tree Builder wrote and the runtime reads,\n * `workflow/{value}/start`), the text for the text types.\n */\nexport const setButtonValue = (\n button: PanelButton,\n value: string | null\n): PanelButton => ({\n ...button,\n action: { ...button.action, value }\n});\n\n/** The page option a button points at — under either id legacy persisted. */\nexport const findButtonPage = (\n pages: PageOption[] | null | undefined,\n button: PanelButton\n): PageOption | undefined => {\n const pageId = buttonPageId(button);\n return pageId\n ? pages?.find(\n (page) => pageOptionId(page) === pageId || page.pageId === pageId\n )\n : undefined;\n};\n\nconst MAX_SUMMARY_VALUE = 48;\n\nconst truncate = (value: string): string =>\n value.length > MAX_SUMMARY_VALUE\n ? `${value.slice(0, MAX_SUMMARY_VALUE - 1)}…`\n : value;\n\n/**\n * One-line summary of what a button does: type label plus resolved lookup\n * names. Never renders a raw guid — an id with no matching lookup row reads as\n * \"not found\" so a broken reference is visible.\n */\nexport const describeButton = (\n button: PanelButton,\n lookups: ActionLookups = {}\n): string => {\n const kind = valueKindOf(button);\n const parts = [actionTypeLabel(button.action.actionTypeId)];\n\n if (kind === 'api' || kind === 'apiAndPage') {\n const apiMethodId = button.action.value;\n const name = apiMethodId\n ? lookups.apiMethods?.find(\n (method) => method.apiMethodId === apiMethodId\n )?.name\n : undefined;\n parts.push(\n name\n ? `API: ${name}`\n : apiMethodId\n ? 'API method not found'\n : 'No API method'\n );\n }\n\n if (usesPage(kind)) {\n const pageId = buttonPageId(button);\n const name = findButtonPage(lookups.pages, button)?.name;\n parts.push(\n name ? `Page: ${name}` : pageId ? 'Page not found' : 'No page'\n );\n }\n\n if (kind === 'text') {\n const valueLabel =\n ACTION_TYPE_META[button.action.actionTypeId]?.valueLabel ?? 'Value';\n parts.push(\n button.action.value\n ? truncate(button.action.value)\n : `No ${valueLabel.toLowerCase()}`\n );\n }\n\n if (kind === 'workflow') {\n const workflowId = button.action.value;\n const name = workflowId\n ? lookups.workflows?.find((workflow) => workflow.workflowId === workflowId)\n ?.name\n : undefined;\n parts.push(\n name\n ? `Workflow: ${name}`\n : workflowId\n ? 'Workflow not found'\n : 'No workflow'\n );\n }\n\n return parts.join(' · ');\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAwBA,MAAaW,aAAaC,QAAqBC,UAC7CD,OAAOE,iBAAiB,SAASD;AAEnC,MAAME,gBAAgBC,cACpB,OAAOA,cAAc,YAAYA,UAAUC,MAAM,KAAK;;;;;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,YAAY;EACvB,MAAMuC,aAAa7E,OAAOkB,OAAOK;EACjC,MAAMH,OAAOyD,aACTR,QAAQS,WAAWd,MAAMe,aAAaA,SAASF,eAAeA,WAAW,EACrEzD,OACJsB,KAAAA;AACJ4B,QAAMI,KACJtD,OACI,aAAaA,SACbyD,aACE,uBACA,cACP;;AAGH,QAAOP,MAAMU,KAAK,MAAM"}
@@ -14,8 +14,12 @@ export interface ActionTypeMeta {
14
14
  }
15
15
  /** Complete metadata for every offered action type. */
16
16
  export declare const ACTION_TYPE_META: Record<ActionType, ActionTypeMeta>;
17
- /** Label for a persisted `actionTypeId`, including ids we do not offer. */
18
- export declare const actionTypeLabel: (actionTypeId: ActionType) => string;
17
+ /**
18
+ * Label for a persisted `actionTypeId`: an offered type's label, else the
19
+ * runtime `NodeActionEnums` name in sentence case ("Open maintenance engine"),
20
+ * else "Action type N" for an unknown id, or "Action" when there is no id.
21
+ */
22
+ export declare const actionTypeLabel: (actionTypeId?: number) => string;
19
23
  /** Rendered when nothing better can be resolved. */
20
24
  export declare const GENERIC_ACTION_ICON = "apps";
21
25
  /**
@@ -44,6 +48,15 @@ export interface PanelButtonIconSource {
44
48
  * rather than the anonymous tile.
45
49
  */
46
50
  export declare const resolvePanelButtonIcon: (button: PanelButtonIconSource) => string;
51
+ /**
52
+ * A button's visible (and accessible) name: the action's own name, else its
53
+ * type's label, so a button is never nameless. The one rule Inquiry's header
54
+ * buttons and Tree Builder's button list share.
55
+ */
56
+ export declare const actionButtonLabel: (action: {
57
+ name?: string;
58
+ actionTypeId?: number;
59
+ }) => string;
47
60
  /** Every offered action type paired with its metadata, in offered order. */
48
61
  export declare const actionTypeOptions: () => readonly (ActionTypeMeta & {
49
62
  actionTypeId: ActionType;
@@ -1 +1 @@
1
- {"version":3,"file":"actionTypeMeta.d.ts","sourceRoot":"","sources":["../../../src/domain/actionPanel/actionTypeMeta.ts"],"names":[],"mappings":"AAaA,OAAO,EAAgB,UAAU,EAAE,MAAM,SAAS,CAAC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,6DAA6D;AAC7D,MAAM,MAAM,eAAe,GACvB,KAAK,GACL,YAAY,GACZ,MAAM,GACN,MAAM,GACN,UAAU,GACV,MAAM,CAAC;AAEX,MAAM,WAAW,cAAc;IAC7B,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC;IACjB,iEAAiE;IACjE,SAAS,EAAE,eAAe,CAAC;IAC3B,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,uDAAuD;AACvD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,UAAU,EAAE,cAAc,CAqE/D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,mCAS3B,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,mBAAmB,SAAS,CAAC;AAE1C;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;IACnE,MAAM,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;CAC/D;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,2CAYlC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;YAI+B,CAAC;AAE9D,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB;;IAMzB,CAAC"}
@@ -11,6 +11,7 @@
11
11
  * always carries meaning.
12
12
  */
13
13
  import { resolveIconName } from '../../icons/legacyIconNames';
14
+ import { NodeActionEnums } from '../../enums/unitySystemEnums';
14
15
  import { ACTION_TYPES, ActionType } from './types';
15
16
  export { isRegistryIconName, LEGACY_ICON_MAP } from '../../icons/legacyIconNames';
16
17
  /** Complete metadata for every offered action type. */
@@ -84,11 +85,20 @@ export const ACTION_TYPE_META = {
84
85
  valueLabel: 'Function name'
85
86
  }
86
87
  };
87
- /** Label for a persisted `actionTypeId`, including ids we do not offer. */
88
+ /**
89
+ * Label for a persisted `actionTypeId`: an offered type's label, else the
90
+ * runtime `NodeActionEnums` name in sentence case ("Open maintenance engine"),
91
+ * else "Action type N" for an unknown id, or "Action" when there is no id.
92
+ */
88
93
  export const actionTypeLabel = (actionTypeId) => {
89
94
  var _a;
90
95
  var _b;
91
- return (_b = (_a = ACTION_TYPE_META[actionTypeId]) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : `Action type ${actionTypeId}`;
96
+ if (actionTypeId == null)
97
+ return 'Action';
98
+ const runtimeName = NodeActionEnums[actionTypeId];
99
+ return ((_b = (_a = ACTION_TYPE_META[actionTypeId]) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : (runtimeName
100
+ ? runtimeName.charAt(0) + runtimeName.slice(1).replace(/_/g, ' ').toLowerCase()
101
+ : `Action type ${actionTypeId}`));
92
102
  };
93
103
  /** Rendered when nothing better can be resolved. */
94
104
  export const GENERIC_ACTION_ICON = 'apps';
@@ -111,6 +121,15 @@ export const resolvePanelButtonIcon = (button) => {
111
121
  const typeIcon = (_d = ACTION_TYPE_META[(_c = button === null || button === void 0 ? void 0 : button.action) === null || _c === void 0 ? void 0 : _c.actionTypeId]) === null || _d === void 0 ? void 0 : _d.iconName;
112
122
  return typeIcon !== null && typeIcon !== void 0 ? typeIcon : GENERIC_ACTION_ICON;
113
123
  };
124
+ /**
125
+ * A button's visible (and accessible) name: the action's own name, else its
126
+ * type's label, so a button is never nameless. The one rule Inquiry's header
127
+ * buttons and Tree Builder's button list share.
128
+ */
129
+ export const actionButtonLabel = (action) => {
130
+ var _a;
131
+ return ((_a = action.name) === null || _a === void 0 ? void 0 : _a.trim()) || actionTypeLabel(action.actionTypeId);
132
+ };
114
133
  /** Every offered action type paired with its metadata, in offered order. */
115
134
  export const actionTypeOptions = () => ACTION_TYPES.map((actionTypeId) => (Object.assign({ actionTypeId }, ACTION_TYPE_META[actionTypeId])));
116
135
  //# sourceMappingURL=actionTypeMeta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"actionTypeMeta.js","sourceRoot":"","sources":["../../../src/domain/actionPanel/actionTypeMeta.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,EACL,kBAAkB,EAClB,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAsBrC,uDAAuD;AACvD,MAAM,CAAC,MAAM,gBAAgB,GAAuC;IAClE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;QACvB,KAAK,EAAE,aAAa;QACpB,QAAQ,EAAE,OAAO;QACjB,SAAS,EAAE,KAAK;KACjB;IACD,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE;QAC1B,KAAK,EAAE,gBAAgB;QACvB,QAAQ,EAAE,aAAa;QACvB,SAAS,EAAE,UAAU;KACtB;IACD,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;QACnB,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE,YAAY;QACtB,SAAS,EAAE,YAAY;KACxB;IACD,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;QACnB,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE,MAAM;QAChB,SAAS,EAAE,YAAY;KACxB;IACD,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;QACnB,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,KAAK;KACjB;IACD,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QACrB,KAAK,EAAE,UAAU;QACjB,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,YAAY;KACxB;IACD,CAAC,UAAU,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E,OAAO,MAAM,CAAC;IAC5D,MAAM,QAAQ,GACZ,MAAA,gBAAgB,CAAC,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,0CAAE,YAA0B,CAAC,0CAAE,QAAQ,CAAC;IACzE,OAAO,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,mBAAmB,CAAC;AAAA,CACxC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,MAGjC,EAAU,EAAE;;WACX,CAAA,MAAA,MAAM,CAAC,IAAI,0CAAE,IAAI,EAAE,KAAI,eAAe,CAAC,MAAM,CAAC,YAAY,CAAC;CAAA,CAAC;AAE9D,4EAA4E;AAC5E,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAE5B,EAAE,CACL,YAAY,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,iBACjC,YAAY,IACT,gBAAgB,CAAC,YAAY,CAAC,EACjC,CAAC,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { NodeActionEnums } from "../../enums/unitySystemEnums.mjs";
1
2
  import { resolveIconName } from "../../icons/legacyIconNames.mjs";
2
3
  import { ACTION_TYPES, ActionType } from "./types.mjs";
3
4
  //#region src/domain/actionPanel/actionTypeMeta.ts
@@ -84,8 +85,16 @@ const ACTION_TYPE_META = {
84
85
  valueLabel: "Function name"
85
86
  }
86
87
  };
87
- /** Label for a persisted `actionTypeId`, including ids we do not offer. */
88
- const actionTypeLabel = (actionTypeId) => ACTION_TYPE_META[actionTypeId]?.label ?? `Action type ${actionTypeId}`;
88
+ /**
89
+ * Label for a persisted `actionTypeId`: an offered type's label, else the
90
+ * runtime `NodeActionEnums` name in sentence case ("Open maintenance engine"),
91
+ * else "Action type N" for an unknown id, or "Action" when there is no id.
92
+ */
93
+ const actionTypeLabel = (actionTypeId) => {
94
+ if (actionTypeId == null) return "Action";
95
+ const runtimeName = NodeActionEnums[actionTypeId];
96
+ return ACTION_TYPE_META[actionTypeId]?.label ?? (runtimeName ? runtimeName.charAt(0) + runtimeName.slice(1).replace(/_/g, " ").toLowerCase() : `Action type ${actionTypeId}`);
97
+ };
89
98
  /** Rendered when nothing better can be resolved. */
90
99
  const GENERIC_ACTION_ICON = "apps";
91
100
  /**
@@ -104,12 +113,18 @@ const resolvePanelButtonIcon = (button) => {
104
113
  if (chosen && chosen !== "apps") return chosen;
105
114
  return ACTION_TYPE_META[button?.action?.actionTypeId]?.iconName ?? "apps";
106
115
  };
116
+ /**
117
+ * A button's visible (and accessible) name: the action's own name, else its
118
+ * type's label, so a button is never nameless. The one rule Inquiry's header
119
+ * buttons and Tree Builder's button list share.
120
+ */
121
+ const actionButtonLabel = (action) => action.name?.trim() || actionTypeLabel(action.actionTypeId);
107
122
  /** Every offered action type paired with its metadata, in offered order. */
108
123
  const actionTypeOptions = () => ACTION_TYPES.map((actionTypeId) => ({
109
124
  actionTypeId,
110
125
  ...ACTION_TYPE_META[actionTypeId]
111
126
  }));
112
127
  //#endregion
113
- export { ACTION_TYPE_META, GENERIC_ACTION_ICON, actionTypeLabel, actionTypeOptions, resolvePanelButtonIcon };
128
+ export { ACTION_TYPE_META, GENERIC_ACTION_ICON, actionButtonLabel, actionTypeLabel, actionTypeOptions, resolvePanelButtonIcon };
114
129
 
115
130
  //# sourceMappingURL=actionTypeMeta.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"actionTypeMeta.mjs","names":["resolveIconName","ACTION_TYPES","ActionType","isRegistryIconName","LEGACY_ICON_MAP","ActionValueKind","ActionTypeMeta","label","iconName","valueKind","valueLabel","ACTION_TYPE_META","Record","ExecuteApi","StartWorkflow","Create","Update","Delete","Retrieve","Redirect","OpenExternalLink","OpenPageSplitScreen","OpenShellSplitScreen","OpenNotes","OpenReminders","ExecuteFunction","actionTypeLabel","actionTypeId","GENERIC_ACTION_ICON","PanelButtonIconSource","icon","name","fluentName","action","resolvePanelButtonIcon","button","chosen","undefined","typeIcon","actionTypeOptions","map"],"sources":["../../../src/domain/actionPanel/actionTypeMeta.ts"],"sourcesContent":["/**\n * Presentation metadata for action types, and icon-name resolution for panel\n * buttons.\n *\n * Two independent naming worlds meet here:\n * - the stencil icon registry (kebab-case names `udp-fluent-icon` can render)\n * - the LEGACY Fluent React icon names actually persisted in tenant panel\n * rows (`SplitIcon`, `ReminderTimeIcon`, `PictureTileIcon`, …)\n * `resolvePanelButtonIcon` bridges them through the shared `resolveIconName`,\n * falling back to an icon derived from what the action *does* so a button\n * always carries meaning.\n */\nimport { resolveIconName } from '../../icons/legacyIconNames';\nimport { ACTION_TYPES, ActionType } from './types';\n\nexport {\n isRegistryIconName,\n LEGACY_ICON_MAP\n} from '../../icons/legacyIconNames';\n\n/** Which value control an action type needs in an editor. */\nexport type ActionValueKind =\n | 'api'\n | 'apiAndPage'\n | 'page'\n | 'text'\n | 'workflow'\n | 'none';\n\nexport interface ActionTypeMeta {\n /** Sentence-case author-facing label. */\n label: string;\n /** Stencil icon-registry name representing the action type. */\n iconName: string;\n /** What `ActionConfig.value` (and `parameters.pageId`) holds. */\n valueKind: ActionValueKind;\n /** Field label for the `text` kinds. */\n valueLabel?: string;\n}\n\n/** Complete metadata for every offered action type. */\nexport const ACTION_TYPE_META: Record<ActionType, ActionTypeMeta> = {\n [ActionType.ExecuteApi]: {\n label: 'Execute API',\n iconName: 'flash',\n valueKind: 'api'\n },\n [ActionType.StartWorkflow]: {\n label: 'Start workflow',\n iconName: 'branch-fork',\n valueKind: 'workflow'\n },\n [ActionType.Create]: {\n label: 'Create',\n iconName: 'add-circle',\n valueKind: 'apiAndPage'\n },\n [ActionType.Update]: {\n label: 'Update',\n iconName: 'edit',\n valueKind: 'apiAndPage'\n },\n [ActionType.Delete]: {\n label: 'Delete',\n iconName: 'delete',\n valueKind: 'api'\n },\n [ActionType.Retrieve]: {\n label: 'Retrieve',\n iconName: 'search',\n valueKind: 'apiAndPage'\n },\n [ActionType.Redirect]: {\n label: 'Redirect',\n iconName: 'arrow-return',\n valueKind: 'text',\n valueLabel: 'Path'\n },\n [ActionType.OpenExternalLink]: {\n label: 'Open external link',\n iconName: 'globe',\n valueKind: 'text',\n valueLabel: 'URL'\n },\n [ActionType.OpenPageSplitScreen]: {\n label: 'Open page split screen',\n iconName: 'board-split',\n valueKind: 'page'\n },\n [ActionType.OpenShellSplitScreen]: {\n label: 'Open shell split screen',\n iconName: 'panel-right-expand',\n valueKind: 'page'\n },\n [ActionType.OpenNotes]: {\n label: 'Open notes',\n iconName: 'notebook',\n valueKind: 'none'\n },\n [ActionType.OpenReminders]: {\n label: 'Open reminders',\n iconName: 'clock',\n valueKind: 'none'\n },\n [ActionType.ExecuteFunction]: {\n label: 'Execute function',\n iconName: 'play',\n valueKind: 'text',\n valueLabel: 'Function name'\n }\n};\n\n/** Label for a persisted `actionTypeId`, including ids we do not offer. */\nexport const actionTypeLabel = (actionTypeId: ActionType): string =>\n ACTION_TYPE_META[actionTypeId]?.label ?? `Action type ${actionTypeId}`;\n\n/** Rendered when nothing better can be resolved. */\nexport const GENERIC_ACTION_ICON = 'apps';\n\n/**\n * The minimum a button needs for icon resolution: the stored icon and what\n * the action does. `PanelButton` (the editor's shape) satisfies it, and so\n * does the Inquiry wire's `PanelActionWire` — one resolver, both worlds.\n */\nexport interface PanelButtonIconSource {\n icon?: { name?: string | null; fluentName?: string | null } | null;\n action?: { actionTypeId?: ActionType | number | null } | null;\n}\n\n/**\n * Icon name to render for a panel button, in precedence order:\n * 1. the stored icon, through `resolveIconName` — UNLESS it resolves to\n * `GENERIC_ACTION_ICON`, which carries no meaning\n * 2. the icon for what the action does (its action type)\n * 3. the generic fallback — only when the action type is unknown too\n *\n * The generic icon is never allowed to beat the type icon: a stored `apps`\n * means \"nobody chose an icon\", so a Delete button still shows the delete icon\n * rather than the anonymous tile.\n */\nexport const resolvePanelButtonIcon = (\n button: PanelButtonIconSource\n): string => {\n const chosen = resolveIconName(\n button?.icon?.name,\n undefined,\n button?.icon?.fluentName\n );\n if (chosen && chosen !== GENERIC_ACTION_ICON) return chosen;\n const typeIcon =\n ACTION_TYPE_META[button?.action?.actionTypeId as ActionType]?.iconName;\n return typeIcon ?? GENERIC_ACTION_ICON;\n};\n\n/** Every offered action type paired with its metadata, in offered order. */\nexport const actionTypeOptions = (): readonly (ActionTypeMeta & {\n actionTypeId: ActionType;\n})[] =>\n ACTION_TYPES.map((actionTypeId) => ({\n actionTypeId,\n ...ACTION_TYPE_META[actionTypeId]\n }));\n"],"mappings":";;;;;;;;;;;;;;;;AAyCA,MAAaW,mBAAuD;EACjET,WAAWW,aAAa;EACvBN,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWY,gBAAgB;EAC1BP,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWa,SAAS;EACnBR,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWc,SAAS;EACnBT,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWe,SAAS;EACnBV,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWgB,WAAW;EACrBX,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWiB,WAAW;EACrBZ,OAAO;EACPC,UAAU;EACVC,WAAW;EACXC,YAAY;EACb;EACAR,WAAWkB,mBAAmB;EAC7Bb,OAAO;EACPC,UAAU;EACVC,WAAW;EACXC,YAAY;EACb;EACAR,WAAWmB,sBAAsB;EAChCd,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWoB,uBAAuB;EACjCf,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWqB,YAAY;EACtBhB,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWsB,gBAAgB;EAC1BjB,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWuB,kBAAkB;EAC5BlB,OAAO;EACPC,UAAU;EACVC,WAAW;EACXC,YAAY;EACd;CACD;;AAGD,MAAagB,mBAAmBC,iBAC9BhB,iBAAiBgB,eAAepB,SAAS,eAAeoB;;AAG1D,MAAaC,sBAAsB;;;;;;;;;;;;AAuBnC,MAAaM,0BACXC,WACW;CACX,MAAMC,SAASpC,gBACbmC,QAAQL,MAAMC,MACdM,KAAAA,GACAF,QAAQL,MAAME,WACf;AACD,KAAII,UAAUA,WAAAA,OAAgC,QAAOA;AAGrD,QADEzB,iBAAiBwB,QAAQF,QAAQN,eAA6BnB,YAAAA;;;AAKlE,MAAa+B,0BAGXtC,aAAauC,KAAKb,kBAAkB;CAClCA;CACA,GAAGhB,iBAAiBgB;CACrB,EAAE"}
1
+ {"version":3,"file":"actionTypeMeta.mjs","names":["resolveIconName","NodeActionEnums","ACTION_TYPES","ActionType","isRegistryIconName","LEGACY_ICON_MAP","ActionValueKind","ActionTypeMeta","label","iconName","valueKind","valueLabel","ACTION_TYPE_META","Record","ExecuteApi","StartWorkflow","Create","Update","Delete","Retrieve","Redirect","OpenExternalLink","OpenPageSplitScreen","OpenShellSplitScreen","OpenNotes","OpenReminders","ExecuteFunction","actionTypeLabel","actionTypeId","runtimeName","charAt","slice","replace","toLowerCase","GENERIC_ACTION_ICON","PanelButtonIconSource","icon","name","fluentName","action","resolvePanelButtonIcon","button","chosen","undefined","typeIcon","actionButtonLabel","trim","actionTypeOptions","map"],"sources":["../../../src/domain/actionPanel/actionTypeMeta.ts"],"sourcesContent":["/**\n * Presentation metadata for action types, and icon-name resolution for panel\n * buttons.\n *\n * Two independent naming worlds meet here:\n * - the stencil icon registry (kebab-case names `udp-fluent-icon` can render)\n * - the LEGACY Fluent React icon names actually persisted in tenant panel\n * rows (`SplitIcon`, `ReminderTimeIcon`, `PictureTileIcon`, …)\n * `resolvePanelButtonIcon` bridges them through the shared `resolveIconName`,\n * falling back to an icon derived from what the action *does* so a button\n * always carries meaning.\n */\nimport { resolveIconName } from '../../icons/legacyIconNames';\nimport { NodeActionEnums } from '../../enums/unitySystemEnums';\nimport { ACTION_TYPES, ActionType } from './types';\n\nexport {\n isRegistryIconName,\n LEGACY_ICON_MAP\n} from '../../icons/legacyIconNames';\n\n/** Which value control an action type needs in an editor. */\nexport type ActionValueKind =\n | 'api'\n | 'apiAndPage'\n | 'page'\n | 'text'\n | 'workflow'\n | 'none';\n\nexport interface ActionTypeMeta {\n /** Sentence-case author-facing label. */\n label: string;\n /** Stencil icon-registry name representing the action type. */\n iconName: string;\n /** What `ActionConfig.value` (and `parameters.pageId`) holds. */\n valueKind: ActionValueKind;\n /** Field label for the `text` kinds. */\n valueLabel?: string;\n}\n\n/** Complete metadata for every offered action type. */\nexport const ACTION_TYPE_META: Record<ActionType, ActionTypeMeta> = {\n [ActionType.ExecuteApi]: {\n label: 'Execute API',\n iconName: 'flash',\n valueKind: 'api'\n },\n [ActionType.StartWorkflow]: {\n label: 'Start workflow',\n iconName: 'branch-fork',\n valueKind: 'workflow'\n },\n [ActionType.Create]: {\n label: 'Create',\n iconName: 'add-circle',\n valueKind: 'apiAndPage'\n },\n [ActionType.Update]: {\n label: 'Update',\n iconName: 'edit',\n valueKind: 'apiAndPage'\n },\n [ActionType.Delete]: {\n label: 'Delete',\n iconName: 'delete',\n valueKind: 'api'\n },\n [ActionType.Retrieve]: {\n label: 'Retrieve',\n iconName: 'search',\n valueKind: 'apiAndPage'\n },\n [ActionType.Redirect]: {\n label: 'Redirect',\n iconName: 'arrow-return',\n valueKind: 'text',\n valueLabel: 'Path'\n },\n [ActionType.OpenExternalLink]: {\n label: 'Open external link',\n iconName: 'globe',\n valueKind: 'text',\n valueLabel: 'URL'\n },\n [ActionType.OpenPageSplitScreen]: {\n label: 'Open page split screen',\n iconName: 'board-split',\n valueKind: 'page'\n },\n [ActionType.OpenShellSplitScreen]: {\n label: 'Open shell split screen',\n iconName: 'panel-right-expand',\n valueKind: 'page'\n },\n [ActionType.OpenNotes]: {\n label: 'Open notes',\n iconName: 'notebook',\n valueKind: 'none'\n },\n [ActionType.OpenReminders]: {\n label: 'Open reminders',\n iconName: 'clock',\n valueKind: 'none'\n },\n [ActionType.ExecuteFunction]: {\n label: 'Execute function',\n iconName: 'play',\n valueKind: 'text',\n valueLabel: 'Function name'\n }\n};\n\n/**\n * Label for a persisted `actionTypeId`: an offered type's label, else the\n * runtime `NodeActionEnums` name in sentence case (\"Open maintenance engine\"),\n * else \"Action type N\" for an unknown id, or \"Action\" when there is no id.\n */\nexport const actionTypeLabel = (actionTypeId?: number | null): string => {\n if (actionTypeId == null) return 'Action';\n const runtimeName: string | undefined = NodeActionEnums[actionTypeId];\n return (\n ACTION_TYPE_META[actionTypeId as ActionType]?.label ??\n (runtimeName\n ? runtimeName.charAt(0) + runtimeName.slice(1).replace(/_/g, ' ').toLowerCase()\n : `Action type ${actionTypeId}`)\n );\n};\n\n/** Rendered when nothing better can be resolved. */\nexport const GENERIC_ACTION_ICON = 'apps';\n\n/**\n * The minimum a button needs for icon resolution: the stored icon and what\n * the action does. `PanelButton` (the editor's shape) satisfies it, and so\n * does the Inquiry wire's `PanelActionWire` — one resolver, both worlds.\n */\nexport interface PanelButtonIconSource {\n icon?: { name?: string | null; fluentName?: string | null } | null;\n action?: { actionTypeId?: ActionType | number | null } | null;\n}\n\n/**\n * Icon name to render for a panel button, in precedence order:\n * 1. the stored icon, through `resolveIconName` — UNLESS it resolves to\n * `GENERIC_ACTION_ICON`, which carries no meaning\n * 2. the icon for what the action does (its action type)\n * 3. the generic fallback — only when the action type is unknown too\n *\n * The generic icon is never allowed to beat the type icon: a stored `apps`\n * means \"nobody chose an icon\", so a Delete button still shows the delete icon\n * rather than the anonymous tile.\n */\nexport const resolvePanelButtonIcon = (\n button: PanelButtonIconSource\n): string => {\n const chosen = resolveIconName(\n button?.icon?.name,\n undefined,\n button?.icon?.fluentName\n );\n if (chosen && chosen !== GENERIC_ACTION_ICON) return chosen;\n const typeIcon =\n ACTION_TYPE_META[button?.action?.actionTypeId as ActionType]?.iconName;\n return typeIcon ?? GENERIC_ACTION_ICON;\n};\n\n/**\n * A button's visible (and accessible) name: the action's own name, else its\n * type's label, so a button is never nameless. The one rule Inquiry's header\n * buttons and Tree Builder's button list share.\n */\nexport const actionButtonLabel = (action: {\n name?: string | null;\n actionTypeId?: number | null;\n}): string =>\n action.name?.trim() || actionTypeLabel(action.actionTypeId);\n\n/** Every offered action type paired with its metadata, in offered order. */\nexport const actionTypeOptions = (): readonly (ActionTypeMeta & {\n actionTypeId: ActionType;\n})[] =>\n ACTION_TYPES.map((actionTypeId) => ({\n actionTypeId,\n ...ACTION_TYPE_META[actionTypeId]\n }));\n"],"mappings":";;;;;;;;;;;;;;;;;AA0CA,MAAaY,mBAAuD;EACjET,WAAWW,aAAa;EACvBN,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWY,gBAAgB;EAC1BP,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWa,SAAS;EACnBR,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWc,SAAS;EACnBT,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWe,SAAS;EACnBV,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWgB,WAAW;EACrBX,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWiB,WAAW;EACrBZ,OAAO;EACPC,UAAU;EACVC,WAAW;EACXC,YAAY;EACb;EACAR,WAAWkB,mBAAmB;EAC7Bb,OAAO;EACPC,UAAU;EACVC,WAAW;EACXC,YAAY;EACb;EACAR,WAAWmB,sBAAsB;EAChCd,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWoB,uBAAuB;EACjCf,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWqB,YAAY;EACtBhB,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWsB,gBAAgB;EAC1BjB,OAAO;EACPC,UAAU;EACVC,WAAW;EACZ;EACAP,WAAWuB,kBAAkB;EAC5BlB,OAAO;EACPC,UAAU;EACVC,WAAW;EACXC,YAAY;EACd;CACD;;;;;;AAOD,MAAagB,mBAAmBC,iBAAyC;AACvE,KAAIA,gBAAgB,KAAM,QAAO;CACjC,MAAMC,cAAkC5B,gBAAgB2B;AACxD,QACEhB,iBAAiBgB,eAA6BpB,UAC7CqB,cACGA,YAAYC,OAAO,EAAE,GAAGD,YAAYE,MAAM,EAAE,CAACC,QAAQ,MAAM,IAAI,CAACC,aAAa,GAC7E,eAAeL;;;AAKvB,MAAaM,sBAAsB;;;;;;;;;;;;AAuBnC,MAAaM,0BACXC,WACW;CACX,MAAMC,SAAS1C,gBACbyC,QAAQL,MAAMC,MACdM,KAAAA,GACAF,QAAQL,MAAME,WACf;AACD,KAAII,UAAUA,WAAAA,OAAgC,QAAOA;AAGrD,QADE9B,iBAAiB6B,QAAQF,QAAQX,eAA6BnB,YAAAA;;;;;;;AASlE,MAAaoC,qBAAqBN,WAIhCA,OAAOF,MAAMS,MAAM,IAAInB,gBAAgBY,OAAOX,aAAa;;AAG7D,MAAamB,0BAGX7C,aAAa8C,KAAKpB,kBAAkB;CAClCA;CACA,GAAGhB,iBAAiBgB;CACrB,EAAE"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * THE order of a level's header buttons. Inquiry v2's header
3
+ * (resolveHeaderActions) and the Tree Builder's button list both sort by it, so
4
+ * the builder lists exactly what the runtime renders; the header's overflow
5
+ * menu then sections this order by `groupName` (assignMenuSections).
6
+ *
7
+ * The key, most significant first:
8
+ * 1. The panel's index among the level's attachments — v1 rendered each
9
+ * panel's buttons together (ActionPanelPlacement.jsx).
10
+ * 2. The button's menu group (case-insensitive; ungrouped is a group of its
11
+ * own), ranked by its lowest `sequence`, then by its first appearance in
12
+ * the tree read — the read's array order is the database's row order, not
13
+ * an authored one, so it only breaks a tie. Legacy panels restart
14
+ * `sequence` per group (Account 1..14, then Workflow 1..6): every group
15
+ * ties at 1 and they keep v1's stored-array order. A panel the builder
16
+ * writes numbers its buttons 1..n in display order (moveButtonInOrder), so
17
+ * its groups rank as shown. Groups never interleave.
18
+ * 3. `sequence` within the group.
19
+ * 4. The button's position in the TREE READ's copy of its panel: v1 rendered
20
+ * `panelActions` in that array order, and the product's panels store many
21
+ * buttons at one sequence. The panel library lists the same panel's buttons
22
+ * in another order, so an editor holding the library copy takes positions
23
+ * from the tree read's (`treeReadPositions`). A button that copy does not
24
+ * hold yet (a new one) sorts after those it does.
25
+ * 5. Name, then action id — a total order.
26
+ */
27
+ import { Panel, PanelButton } from './types';
28
+ export interface ButtonOrderKey {
29
+ /** The panel's index among the level's panel attachments. */
30
+ panelIndex: number;
31
+ /** The lowest `sequence` in the button's group in its panel. */
32
+ groupSequence: number;
33
+ /** First tree-read position of the button's group in its panel. */
34
+ groupRank: number;
35
+ /** The button's group (buttonGroupKey). */
36
+ group: string;
37
+ sequence: number;
38
+ /** Index in the tree read's copy of the panel; NOT_IN_READ when absent. */
39
+ position: number;
40
+ /** The action's name, trimmed. */
41
+ name: string;
42
+ actionId: string;
43
+ }
44
+ /** Where a button sits in the tree read's copy of its panel. */
45
+ export type ButtonPosition = (button: PanelButton, index: number) => number;
46
+ /** A button's menu group: its trimmed, lower-cased name; '' when ungrouped. */
47
+ export declare const buttonGroupKey: (button: Pick<PanelButton, "groupName">) => string;
48
+ /**
49
+ * Positions from the tree read's copy of a panel, matching a button by its
50
+ * association id, else its action id.
51
+ */
52
+ export declare const treeReadPositions: (read: Panel) => ButtonPosition;
53
+ /** Array.sort comparator over ButtonOrderKey — a total order. */
54
+ export declare const compareButtonOrder: (a: ButtonOrderKey, b: ButtonOrderKey) => number;
55
+ /** Every button's key, by index into `panel.buttons`. */
56
+ export declare const panelOrderKeys: (panel: Panel, panelIndex?: number, positionOf?: ButtonPosition) => ButtonOrderKey[];
57
+ /** Indexes into `panel.buttons`, in the canonical order. */
58
+ export declare const panelButtonOrder: (panel: Panel, positionOf?: ButtonPosition) => number[];
59
+ /**
60
+ * Move the button at `index` one slot within its menu group, then number the
61
+ * whole panel 1..n in the new display order — so `sequence` alone says the
62
+ * order (group ranks included) whatever row order the database returns. A
63
+ * move never leaves its group. Array order is kept (callers address buttons
64
+ * by index). Returns the same panel when the move is not possible.
65
+ */
66
+ export declare const moveButtonInOrder: (panel: Panel, index: number, direction: "down" | "up", positionOf?: ButtonPosition) => Panel;
67
+ //# sourceMappingURL=buttonOrder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buttonOrder.d.ts","sourceRoot":"","sources":["../../../src/domain/actionPanel/buttonOrder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,WAAW,cAAc;IAC7B,6DAA6D;IAC7D,UAAU,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,aAAa,EAAE,MAAM,CAAC;IACtB,mEAAmE;IACnE,SAAS,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;IACjB,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,gEAAgE;AAChE,MAAM,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;AAgB5E,+EAA+E;AAC/E,eAAO,MAAM,cAAc,oDAE8B,CAAC;AAE1D;;;GAGG;AACH,eAAO,MAAM,iBAAiB,iCAY7B,CAAC;AAEF,mEAAiE;AACjE,eAAO,MAAM,kBAAkB,kDAWO,CAAC;AAEvC,yDAAyD;AACzD,eAAO,MAAM,cAAc,sFAgC1B,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,gBAAgB,yDAQ5B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,+FAyB7B,CAAC"}