@flanksource/clicky-ui 0.3.19 → 0.3.21

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 (450) hide show
  1. package/dist/components/ErrorWrapper.cjs +1 -1
  2. package/dist/components/ErrorWrapper.cjs.map +1 -1
  3. package/dist/components/ErrorWrapper.js +1 -1
  4. package/dist/components/ErrorWrapper.js.map +1 -1
  5. package/dist/components/UnitStepControls.cjs +55 -0
  6. package/dist/components/UnitStepControls.cjs.map +1 -0
  7. package/dist/components/UnitStepControls.d.ts +10 -0
  8. package/dist/components/UnitStepControls.d.ts.map +1 -0
  9. package/dist/components/UnitStepControls.js +55 -0
  10. package/dist/components/UnitStepControls.js.map +1 -0
  11. package/dist/components/json-schema-form-accordion-array.cjs +5 -73
  12. package/dist/components/json-schema-form-accordion-array.cjs.map +1 -1
  13. package/dist/components/json-schema-form-accordion-array.d.ts.map +1 -1
  14. package/dist/components/json-schema-form-accordion-array.js +3 -71
  15. package/dist/components/json-schema-form-accordion-array.js.map +1 -1
  16. package/dist/components/json-schema-form-array.cjs +6 -1
  17. package/dist/components/json-schema-form-array.cjs.map +1 -1
  18. package/dist/components/json-schema-form-array.d.ts.map +1 -1
  19. package/dist/components/json-schema-form-array.js +6 -1
  20. package/dist/components/json-schema-form-array.js.map +1 -1
  21. package/dist/components/json-schema-form-cards-array.cjs +96 -0
  22. package/dist/components/json-schema-form-cards-array.cjs.map +1 -0
  23. package/dist/components/json-schema-form-cards-array.d.ts +7 -0
  24. package/dist/components/json-schema-form-cards-array.d.ts.map +1 -0
  25. package/dist/components/json-schema-form-cards-array.js +96 -0
  26. package/dist/components/json-schema-form-cards-array.js.map +1 -0
  27. package/dist/components/json-schema-form-item-row.cjs +81 -0
  28. package/dist/components/json-schema-form-item-row.cjs.map +1 -0
  29. package/dist/components/json-schema-form-item-row.d.ts +19 -0
  30. package/dist/components/json-schema-form-item-row.d.ts.map +1 -0
  31. package/dist/components/json-schema-form-item-row.js +81 -0
  32. package/dist/components/json-schema-form-item-row.js.map +1 -0
  33. package/dist/components/json-schema-form-render.cjs +2 -2
  34. package/dist/components/json-schema-form-render.cjs.map +1 -1
  35. package/dist/components/json-schema-form-render.d.ts.map +1 -1
  36. package/dist/components/json-schema-form-render.js +2 -2
  37. package/dist/components/json-schema-form-render.js.map +1 -1
  38. package/dist/components/json-schema-form-resolve.cjs +1 -1
  39. package/dist/components/json-schema-form-resolve.cjs.map +1 -1
  40. package/dist/components/json-schema-form-resolve.js +1 -1
  41. package/dist/components/json-schema-form-resolve.js.map +1 -1
  42. package/dist/components/json-schema-form-tone.cjs +12 -0
  43. package/dist/components/json-schema-form-tone.cjs.map +1 -1
  44. package/dist/components/json-schema-form-tone.js +12 -0
  45. package/dist/components/json-schema-form-tone.js.map +1 -1
  46. package/dist/components/json-schema-form-types.d.ts +1 -1
  47. package/dist/components/json-schema-form-types.d.ts.map +1 -1
  48. package/dist/components/unit-form-extension.cjs +126 -0
  49. package/dist/components/unit-form-extension.cjs.map +1 -0
  50. package/dist/components/unit-form-extension.d.ts +8 -0
  51. package/dist/components/unit-form-extension.d.ts.map +1 -0
  52. package/dist/components/unit-form-extension.js +126 -0
  53. package/dist/components/unit-form-extension.js.map +1 -0
  54. package/dist/components.cjs +4 -0
  55. package/dist/components.cjs.map +1 -1
  56. package/dist/components.d.ts +1 -0
  57. package/dist/components.d.ts.map +1 -1
  58. package/dist/components.js +4 -0
  59. package/dist/components.js.map +1 -1
  60. package/dist/data/diagnostics/ErrorDetails.cjs +61 -8
  61. package/dist/data/diagnostics/ErrorDetails.cjs.map +1 -1
  62. package/dist/data/diagnostics/ErrorDetails.d.ts.map +1 -1
  63. package/dist/data/diagnostics/ErrorDetails.js +61 -8
  64. package/dist/data/diagnostics/ErrorDetails.js.map +1 -1
  65. package/dist/data/diagnostics/error-diagnostics.cjs +10 -4
  66. package/dist/data/diagnostics/error-diagnostics.cjs.map +1 -1
  67. package/dist/data/diagnostics/error-diagnostics.d.ts.map +1 -1
  68. package/dist/data/diagnostics/error-diagnostics.js +10 -4
  69. package/dist/data/diagnostics/error-diagnostics.js.map +1 -1
  70. package/dist/data/query-browser/QueryBrowser.cjs +12 -6
  71. package/dist/data/query-browser/QueryBrowser.cjs.map +1 -1
  72. package/dist/data/query-browser/QueryBrowser.d.ts.map +1 -1
  73. package/dist/data/query-browser/QueryBrowser.js +12 -6
  74. package/dist/data/query-browser/QueryBrowser.js.map +1 -1
  75. package/dist/data/query-browser/QueryBrowser.types.cjs +2 -1
  76. package/dist/data/query-browser/QueryBrowser.types.cjs.map +1 -1
  77. package/dist/data/query-browser/QueryBrowser.types.d.ts +16 -14
  78. package/dist/data/query-browser/QueryBrowser.types.d.ts.map +1 -1
  79. package/dist/data/query-browser/QueryBrowser.types.js +2 -1
  80. package/dist/data/query-browser/QueryBrowser.types.js.map +1 -1
  81. package/dist/data/version-info.cjs +3 -3
  82. package/dist/data/version-info.js +3 -3
  83. package/dist/index.cjs +4 -0
  84. package/dist/index.cjs.map +1 -1
  85. package/dist/index.js +4 -0
  86. package/dist/index.js.map +1 -1
  87. package/dist/lib/string.cjs +8 -0
  88. package/dist/lib/string.cjs.map +1 -1
  89. package/dist/lib/string.d.ts +1 -0
  90. package/dist/lib/string.d.ts.map +1 -1
  91. package/dist/lib/string.js +8 -0
  92. package/dist/lib/string.js.map +1 -1
  93. package/dist/profiles/catalogTree.cjs +133 -0
  94. package/dist/profiles/catalogTree.cjs.map +1 -0
  95. package/dist/profiles/catalogTree.d.ts +11 -0
  96. package/dist/profiles/catalogTree.d.ts.map +1 -0
  97. package/dist/profiles/catalogTree.js +133 -0
  98. package/dist/profiles/catalogTree.js.map +1 -0
  99. package/dist/profiles/connectionBrowserModel.cjs +185 -0
  100. package/dist/profiles/connectionBrowserModel.cjs.map +1 -0
  101. package/dist/profiles/connectionBrowserModel.d.ts +169 -0
  102. package/dist/profiles/connectionBrowserModel.d.ts.map +1 -0
  103. package/dist/profiles/connectionBrowserModel.js +185 -0
  104. package/dist/profiles/connectionBrowserModel.js.map +1 -0
  105. package/dist/profiles/connectionQueryWorkspace.cjs +185 -0
  106. package/dist/profiles/connectionQueryWorkspace.cjs.map +1 -0
  107. package/dist/profiles/connectionQueryWorkspace.d.ts +63 -0
  108. package/dist/profiles/connectionQueryWorkspace.d.ts.map +1 -0
  109. package/dist/profiles/connectionQueryWorkspace.js +185 -0
  110. package/dist/profiles/connectionQueryWorkspace.js.map +1 -0
  111. package/dist/profiles/connectionQueryWorkspaceModel.cjs +28 -0
  112. package/dist/profiles/connectionQueryWorkspaceModel.cjs.map +1 -0
  113. package/dist/profiles/connectionQueryWorkspaceModel.d.ts +38 -0
  114. package/dist/profiles/connectionQueryWorkspaceModel.d.ts.map +1 -0
  115. package/dist/profiles/connectionQueryWorkspaceModel.js +28 -0
  116. package/dist/profiles/connectionQueryWorkspaceModel.js.map +1 -0
  117. package/dist/profiles/esFieldValues.cjs +64 -0
  118. package/dist/profiles/esFieldValues.cjs.map +1 -0
  119. package/dist/profiles/esFieldValues.d.ts +48 -0
  120. package/dist/profiles/esFieldValues.d.ts.map +1 -0
  121. package/dist/profiles/esFieldValues.js +64 -0
  122. package/dist/profiles/esFieldValues.js.map +1 -0
  123. package/dist/profiles/esParamMappingModel.cjs +301 -0
  124. package/dist/profiles/esParamMappingModel.cjs.map +1 -0
  125. package/dist/profiles/esParamMappingModel.d.ts +37 -0
  126. package/dist/profiles/esParamMappingModel.d.ts.map +1 -0
  127. package/dist/profiles/esParamMappingModel.js +301 -0
  128. package/dist/profiles/esParamMappingModel.js.map +1 -0
  129. package/dist/profiles/esParamMappingPill.cjs +24 -0
  130. package/dist/profiles/esParamMappingPill.cjs.map +1 -0
  131. package/dist/profiles/esParamMappingPill.d.ts +13 -0
  132. package/dist/profiles/esParamMappingPill.d.ts.map +1 -0
  133. package/dist/profiles/esParamMappingPill.js +24 -0
  134. package/dist/profiles/esParamMappingPill.js.map +1 -0
  135. package/dist/profiles/esParamOperandExtension.cjs +75 -0
  136. package/dist/profiles/esParamOperandExtension.cjs.map +1 -0
  137. package/dist/profiles/esParamOperandExtension.d.ts +11 -0
  138. package/dist/profiles/esParamOperandExtension.d.ts.map +1 -0
  139. package/dist/profiles/esParamOperandExtension.js +75 -0
  140. package/dist/profiles/esParamOperandExtension.js.map +1 -0
  141. package/dist/profiles/esQueryBuilder.cjs +205 -0
  142. package/dist/profiles/esQueryBuilder.cjs.map +1 -0
  143. package/dist/profiles/esQueryBuilder.d.ts +35 -0
  144. package/dist/profiles/esQueryBuilder.d.ts.map +1 -0
  145. package/dist/profiles/esQueryBuilder.js +205 -0
  146. package/dist/profiles/esQueryBuilder.js.map +1 -0
  147. package/dist/profiles/esQueryBuilderExtension.cjs +23 -0
  148. package/dist/profiles/esQueryBuilderExtension.cjs.map +1 -0
  149. package/dist/profiles/esQueryBuilderExtension.d.ts +5 -0
  150. package/dist/profiles/esQueryBuilderExtension.d.ts.map +1 -0
  151. package/dist/profiles/esQueryBuilderExtension.js +23 -0
  152. package/dist/profiles/esQueryBuilderExtension.js.map +1 -0
  153. package/dist/profiles/esQueryBuilderForm.cjs +26 -0
  154. package/dist/profiles/esQueryBuilderForm.cjs.map +1 -0
  155. package/dist/profiles/esQueryBuilderForm.d.ts +18 -0
  156. package/dist/profiles/esQueryBuilderForm.d.ts.map +1 -0
  157. package/dist/profiles/esQueryBuilderForm.js +26 -0
  158. package/dist/profiles/esQueryBuilderForm.js.map +1 -0
  159. package/dist/profiles/esQueryBuilderModel.cjs +131 -0
  160. package/dist/profiles/esQueryBuilderModel.cjs.map +1 -0
  161. package/dist/profiles/esQueryBuilderModel.d.ts +108 -0
  162. package/dist/profiles/esQueryBuilderModel.d.ts.map +1 -0
  163. package/dist/profiles/esQueryBuilderModel.js +131 -0
  164. package/dist/profiles/esQueryBuilderModel.js.map +1 -0
  165. package/dist/profiles/esQueryClauseGroup.cjs +144 -0
  166. package/dist/profiles/esQueryClauseGroup.cjs.map +1 -0
  167. package/dist/profiles/esQueryClauseGroup.d.ts +10 -0
  168. package/dist/profiles/esQueryClauseGroup.d.ts.map +1 -0
  169. package/dist/profiles/esQueryClauseGroup.js +144 -0
  170. package/dist/profiles/esQueryClauseGroup.js.map +1 -0
  171. package/dist/profiles/esQueryCompile.cjs +47 -0
  172. package/dist/profiles/esQueryCompile.cjs.map +1 -0
  173. package/dist/profiles/esQueryCompile.d.ts +39 -0
  174. package/dist/profiles/esQueryCompile.d.ts.map +1 -0
  175. package/dist/profiles/esQueryCompile.js +47 -0
  176. package/dist/profiles/esQueryCompile.js.map +1 -0
  177. package/dist/profiles/esQueryConditionRow.cjs +168 -0
  178. package/dist/profiles/esQueryConditionRow.cjs.map +1 -0
  179. package/dist/profiles/esQueryConditionRow.d.ts +37 -0
  180. package/dist/profiles/esQueryConditionRow.d.ts.map +1 -0
  181. package/dist/profiles/esQueryConditionRow.js +168 -0
  182. package/dist/profiles/esQueryConditionRow.js.map +1 -0
  183. package/dist/profiles/esQueryGroupModel.cjs +12 -0
  184. package/dist/profiles/esQueryGroupModel.cjs.map +1 -0
  185. package/dist/profiles/esQueryGroupModel.d.ts +9 -0
  186. package/dist/profiles/esQueryGroupModel.d.ts.map +1 -0
  187. package/dist/profiles/esQueryGroupModel.js +12 -0
  188. package/dist/profiles/esQueryGroupModel.js.map +1 -0
  189. package/dist/profiles/esQueryOccur.cjs +16 -0
  190. package/dist/profiles/esQueryOccur.cjs.map +1 -0
  191. package/dist/profiles/esQueryOccur.d.ts +11 -0
  192. package/dist/profiles/esQueryOccur.d.ts.map +1 -0
  193. package/dist/profiles/esQueryOccur.js +16 -0
  194. package/dist/profiles/esQueryOccur.js.map +1 -0
  195. package/dist/profiles/esQueryOperandEditors.cjs +279 -0
  196. package/dist/profiles/esQueryOperandEditors.cjs.map +1 -0
  197. package/dist/profiles/esQueryOperandEditors.d.ts +24 -0
  198. package/dist/profiles/esQueryOperandEditors.d.ts.map +1 -0
  199. package/dist/profiles/esQueryOperandEditors.js +279 -0
  200. package/dist/profiles/esQueryOperandEditors.js.map +1 -0
  201. package/dist/profiles/esQueryOperandModel.cjs +28 -0
  202. package/dist/profiles/esQueryOperandModel.cjs.map +1 -0
  203. package/dist/profiles/esQueryOperandModel.d.ts +17 -0
  204. package/dist/profiles/esQueryOperandModel.d.ts.map +1 -0
  205. package/dist/profiles/esQueryOperandModel.js +28 -0
  206. package/dist/profiles/esQueryOperandModel.js.map +1 -0
  207. package/dist/profiles/esQueryOperators.cjs +165 -0
  208. package/dist/profiles/esQueryOperators.cjs.map +1 -0
  209. package/dist/profiles/esQueryOperators.d.ts +83 -0
  210. package/dist/profiles/esQueryOperators.d.ts.map +1 -0
  211. package/dist/profiles/esQueryOperators.js +165 -0
  212. package/dist/profiles/esQueryOperators.js.map +1 -0
  213. package/dist/profiles/esQueryOutputEditor.cjs +138 -0
  214. package/dist/profiles/esQueryOutputEditor.cjs.map +1 -0
  215. package/dist/profiles/esQueryOutputEditor.d.ts +7 -0
  216. package/dist/profiles/esQueryOutputEditor.d.ts.map +1 -0
  217. package/dist/profiles/esQueryOutputEditor.js +138 -0
  218. package/dist/profiles/esQueryOutputEditor.js.map +1 -0
  219. package/dist/profiles/esQueryOutputModel.cjs +16 -0
  220. package/dist/profiles/esQueryOutputModel.cjs.map +1 -0
  221. package/dist/profiles/esQueryOutputModel.d.ts +14 -0
  222. package/dist/profiles/esQueryOutputModel.d.ts.map +1 -0
  223. package/dist/profiles/esQueryOutputModel.js +16 -0
  224. package/dist/profiles/esQueryOutputModel.js.map +1 -0
  225. package/dist/profiles/esQueryPreview.cjs +30 -0
  226. package/dist/profiles/esQueryPreview.cjs.map +1 -0
  227. package/dist/profiles/esQueryPreview.d.ts +6 -0
  228. package/dist/profiles/esQueryPreview.d.ts.map +1 -0
  229. package/dist/profiles/esQueryPreview.js +30 -0
  230. package/dist/profiles/esQueryPreview.js.map +1 -0
  231. package/dist/profiles/esQuerySortEditor.cjs +143 -0
  232. package/dist/profiles/esQuerySortEditor.cjs.map +1 -0
  233. package/dist/profiles/esQuerySortEditor.d.ts +9 -0
  234. package/dist/profiles/esQuerySortEditor.d.ts.map +1 -0
  235. package/dist/profiles/esQuerySortEditor.js +143 -0
  236. package/dist/profiles/esQuerySortEditor.js.map +1 -0
  237. package/dist/profiles/esQuerySortModel.cjs +13 -0
  238. package/dist/profiles/esQuerySortModel.cjs.map +1 -0
  239. package/dist/profiles/esQuerySortModel.d.ts +4 -0
  240. package/dist/profiles/esQuerySortModel.d.ts.map +1 -0
  241. package/dist/profiles/esQuerySortModel.js +13 -0
  242. package/dist/profiles/esQuerySortModel.js.map +1 -0
  243. package/dist/profiles/esValueCombobox.cjs +86 -0
  244. package/dist/profiles/esValueCombobox.cjs.map +1 -0
  245. package/dist/profiles/esValueCombobox.d.ts +15 -0
  246. package/dist/profiles/esValueCombobox.d.ts.map +1 -0
  247. package/dist/profiles/esValueCombobox.js +86 -0
  248. package/dist/profiles/esValueCombobox.js.map +1 -0
  249. package/dist/profiles/jsonPathSample.cjs +75 -0
  250. package/dist/profiles/jsonPathSample.cjs.map +1 -0
  251. package/dist/profiles/jsonPathSample.d.ts +27 -0
  252. package/dist/profiles/jsonPathSample.d.ts.map +1 -0
  253. package/dist/profiles/jsonPathSample.js +75 -0
  254. package/dist/profiles/jsonPathSample.js.map +1 -0
  255. package/dist/profiles/jsonPathSampleRow.cjs +14 -0
  256. package/dist/profiles/jsonPathSampleRow.cjs.map +1 -0
  257. package/dist/profiles/jsonPathSampleRow.d.ts +6 -0
  258. package/dist/profiles/jsonPathSampleRow.d.ts.map +1 -0
  259. package/dist/profiles/jsonPathSampleRow.js +14 -0
  260. package/dist/profiles/jsonPathSampleRow.js.map +1 -0
  261. package/dist/profiles/profileApi.cjs +37 -0
  262. package/dist/profiles/profileApi.cjs.map +1 -0
  263. package/dist/profiles/profileApi.d.ts +32 -0
  264. package/dist/profiles/profileApi.d.ts.map +1 -0
  265. package/dist/profiles/profileApi.js +37 -0
  266. package/dist/profiles/profileApi.js.map +1 -0
  267. package/dist/profiles/profileBuilder.cjs +65 -0
  268. package/dist/profiles/profileBuilder.cjs.map +1 -0
  269. package/dist/profiles/profileBuilder.d.ts +11 -0
  270. package/dist/profiles/profileBuilder.d.ts.map +1 -0
  271. package/dist/profiles/profileBuilder.js +65 -0
  272. package/dist/profiles/profileBuilder.js.map +1 -0
  273. package/dist/profiles/profileBuilderExtension.cjs +25 -0
  274. package/dist/profiles/profileBuilderExtension.cjs.map +1 -0
  275. package/dist/profiles/profileBuilderExtension.d.ts +5 -0
  276. package/dist/profiles/profileBuilderExtension.d.ts.map +1 -0
  277. package/dist/profiles/profileBuilderExtension.js +25 -0
  278. package/dist/profiles/profileBuilderExtension.js.map +1 -0
  279. package/dist/profiles/profileBuilderWorkspace.cjs +368 -0
  280. package/dist/profiles/profileBuilderWorkspace.cjs.map +1 -0
  281. package/dist/profiles/profileBuilderWorkspace.d.ts +21 -0
  282. package/dist/profiles/profileBuilderWorkspace.d.ts.map +1 -0
  283. package/dist/profiles/profileBuilderWorkspace.js +368 -0
  284. package/dist/profiles/profileBuilderWorkspace.js.map +1 -0
  285. package/dist/profiles/profileColumnModel.cjs +23 -0
  286. package/dist/profiles/profileColumnModel.cjs.map +1 -0
  287. package/dist/profiles/profileColumnModel.d.ts +8 -0
  288. package/dist/profiles/profileColumnModel.d.ts.map +1 -0
  289. package/dist/profiles/profileColumnModel.js +23 -0
  290. package/dist/profiles/profileColumnModel.js.map +1 -0
  291. package/dist/profiles/profileColumnPicker.cjs +68 -0
  292. package/dist/profiles/profileColumnPicker.cjs.map +1 -0
  293. package/dist/profiles/profileColumnPicker.d.ts +11 -0
  294. package/dist/profiles/profileColumnPicker.d.ts.map +1 -0
  295. package/dist/profiles/profileColumnPicker.js +68 -0
  296. package/dist/profiles/profileColumnPicker.js.map +1 -0
  297. package/dist/profiles/profileEditor.cjs +386 -0
  298. package/dist/profiles/profileEditor.cjs.map +1 -0
  299. package/dist/profiles/profileEditor.d.ts +19 -0
  300. package/dist/profiles/profileEditor.d.ts.map +1 -0
  301. package/dist/profiles/profileEditor.js +386 -0
  302. package/dist/profiles/profileEditor.js.map +1 -0
  303. package/dist/profiles/profileEditorModel.cjs +181 -0
  304. package/dist/profiles/profileEditorModel.cjs.map +1 -0
  305. package/dist/profiles/profileEditorModel.d.ts +74 -0
  306. package/dist/profiles/profileEditorModel.d.ts.map +1 -0
  307. package/dist/profiles/profileEditorModel.js +181 -0
  308. package/dist/profiles/profileEditorModel.js.map +1 -0
  309. package/dist/profiles/profileEditorPreview.cjs +38 -0
  310. package/dist/profiles/profileEditorPreview.cjs.map +1 -0
  311. package/dist/profiles/profileEditorPreview.d.ts +12 -0
  312. package/dist/profiles/profileEditorPreview.d.ts.map +1 -0
  313. package/dist/profiles/profileEditorPreview.js +38 -0
  314. package/dist/profiles/profileEditorPreview.js.map +1 -0
  315. package/dist/profiles/profileEditorRail.cjs +46 -0
  316. package/dist/profiles/profileEditorRail.cjs.map +1 -0
  317. package/dist/profiles/profileEditorRail.d.ts +8 -0
  318. package/dist/profiles/profileEditorRail.d.ts.map +1 -0
  319. package/dist/profiles/profileEditorRail.js +46 -0
  320. package/dist/profiles/profileEditorRail.js.map +1 -0
  321. package/dist/profiles/profileEditorRaw.cjs +118 -0
  322. package/dist/profiles/profileEditorRaw.cjs.map +1 -0
  323. package/dist/profiles/profileEditorRaw.d.ts +7 -0
  324. package/dist/profiles/profileEditorRaw.d.ts.map +1 -0
  325. package/dist/profiles/profileEditorRaw.js +118 -0
  326. package/dist/profiles/profileEditorRaw.js.map +1 -0
  327. package/dist/profiles/profileEditorRoutes.cjs +7 -0
  328. package/dist/profiles/profileEditorRoutes.cjs.map +1 -0
  329. package/dist/profiles/profileEditorRoutes.d.ts +2 -0
  330. package/dist/profiles/profileEditorRoutes.d.ts.map +1 -0
  331. package/dist/profiles/profileEditorRoutes.js +7 -0
  332. package/dist/profiles/profileEditorRoutes.js.map +1 -0
  333. package/dist/profiles/profileEditorSections.cjs +213 -0
  334. package/dist/profiles/profileEditorSections.cjs.map +1 -0
  335. package/dist/profiles/profileEditorSections.d.ts +23 -0
  336. package/dist/profiles/profileEditorSections.d.ts.map +1 -0
  337. package/dist/profiles/profileEditorSections.js +213 -0
  338. package/dist/profiles/profileEditorSections.js.map +1 -0
  339. package/dist/profiles/profileFieldEditor.cjs +200 -0
  340. package/dist/profiles/profileFieldEditor.cjs.map +1 -0
  341. package/dist/profiles/profileFieldEditor.d.ts +34 -0
  342. package/dist/profiles/profileFieldEditor.d.ts.map +1 -0
  343. package/dist/profiles/profileFieldEditor.js +200 -0
  344. package/dist/profiles/profileFieldEditor.js.map +1 -0
  345. package/dist/profiles/profileFieldGrid.cjs +250 -0
  346. package/dist/profiles/profileFieldGrid.cjs.map +1 -0
  347. package/dist/profiles/profileFieldGrid.d.ts +20 -0
  348. package/dist/profiles/profileFieldGrid.d.ts.map +1 -0
  349. package/dist/profiles/profileFieldGrid.js +250 -0
  350. package/dist/profiles/profileFieldGrid.js.map +1 -0
  351. package/dist/profiles/profileFieldManager.cjs +103 -0
  352. package/dist/profiles/profileFieldManager.cjs.map +1 -0
  353. package/dist/profiles/profileFieldManager.d.ts +9 -0
  354. package/dist/profiles/profileFieldManager.d.ts.map +1 -0
  355. package/dist/profiles/profileFieldManager.js +103 -0
  356. package/dist/profiles/profileFieldManager.js.map +1 -0
  357. package/dist/profiles/profileFieldState.cjs +136 -0
  358. package/dist/profiles/profileFieldState.cjs.map +1 -0
  359. package/dist/profiles/profileFieldState.d.ts +41 -0
  360. package/dist/profiles/profileFieldState.d.ts.map +1 -0
  361. package/dist/profiles/profileFieldState.js +136 -0
  362. package/dist/profiles/profileFieldState.js.map +1 -0
  363. package/dist/profiles/profileFieldTypes.cjs +17 -0
  364. package/dist/profiles/profileFieldTypes.cjs.map +1 -0
  365. package/dist/profiles/profileFieldTypes.d.ts +8 -0
  366. package/dist/profiles/profileFieldTypes.d.ts.map +1 -0
  367. package/dist/profiles/profileFieldTypes.js +17 -0
  368. package/dist/profiles/profileFieldTypes.js.map +1 -0
  369. package/dist/profiles/profileParamModel.cjs +78 -0
  370. package/dist/profiles/profileParamModel.cjs.map +1 -0
  371. package/dist/profiles/profileParamModel.d.ts +3 -0
  372. package/dist/profiles/profileParamModel.d.ts.map +1 -0
  373. package/dist/profiles/profileParamModel.js +78 -0
  374. package/dist/profiles/profileParamModel.js.map +1 -0
  375. package/dist/profiles/profileSamplePayload.cjs +15 -0
  376. package/dist/profiles/profileSamplePayload.cjs.map +1 -0
  377. package/dist/profiles/profileSamplePayload.d.ts +13 -0
  378. package/dist/profiles/profileSamplePayload.d.ts.map +1 -0
  379. package/dist/profiles/profileSamplePayload.js +15 -0
  380. package/dist/profiles/profileSamplePayload.js.map +1 -0
  381. package/dist/profiles/profileWizard.cjs +257 -0
  382. package/dist/profiles/profileWizard.cjs.map +1 -0
  383. package/dist/profiles/profileWizard.d.ts +12 -0
  384. package/dist/profiles/profileWizard.d.ts.map +1 -0
  385. package/dist/profiles/profileWizard.js +257 -0
  386. package/dist/profiles/profileWizard.js.map +1 -0
  387. package/dist/profiles/profileWizardHelp.cjs +10 -0
  388. package/dist/profiles/profileWizardHelp.cjs.map +1 -0
  389. package/dist/profiles/profileWizardHelp.d.ts +13 -0
  390. package/dist/profiles/profileWizardHelp.d.ts.map +1 -0
  391. package/dist/profiles/profileWizardHelp.js +10 -0
  392. package/dist/profiles/profileWizardHelp.js.map +1 -0
  393. package/dist/profiles/profileWizardModel.cjs +198 -0
  394. package/dist/profiles/profileWizardModel.cjs.map +1 -0
  395. package/dist/profiles/profileWizardModel.d.ts +255 -0
  396. package/dist/profiles/profileWizardModel.d.ts.map +1 -0
  397. package/dist/profiles/profileWizardModel.js +198 -0
  398. package/dist/profiles/profileWizardModel.js.map +1 -0
  399. package/dist/profiles/profileWizardQueryStep.cjs +215 -0
  400. package/dist/profiles/profileWizardQueryStep.cjs.map +1 -0
  401. package/dist/profiles/profileWizardQueryStep.d.ts +18 -0
  402. package/dist/profiles/profileWizardQueryStep.d.ts.map +1 -0
  403. package/dist/profiles/profileWizardQueryStep.js +215 -0
  404. package/dist/profiles/profileWizardQueryStep.js.map +1 -0
  405. package/dist/profiles/profileWizardSteps.cjs +214 -0
  406. package/dist/profiles/profileWizardSteps.cjs.map +1 -0
  407. package/dist/profiles/profileWizardSteps.d.ts +35 -0
  408. package/dist/profiles/profileWizardSteps.d.ts.map +1 -0
  409. package/dist/profiles/profileWizardSteps.js +214 -0
  410. package/dist/profiles/profileWizardSteps.js.map +1 -0
  411. package/dist/profiles/profileYaml.cjs +19 -0
  412. package/dist/profiles/profileYaml.cjs.map +1 -0
  413. package/dist/profiles/profileYaml.d.ts +4 -0
  414. package/dist/profiles/profileYaml.d.ts.map +1 -0
  415. package/dist/profiles/profileYaml.js +19 -0
  416. package/dist/profiles/profileYaml.js.map +1 -0
  417. package/dist/profiles/prometheusResults.cjs +60 -0
  418. package/dist/profiles/prometheusResults.cjs.map +1 -0
  419. package/dist/profiles/prometheusResults.d.ts +7 -0
  420. package/dist/profiles/prometheusResults.d.ts.map +1 -0
  421. package/dist/profiles/prometheusResults.js +60 -0
  422. package/dist/profiles/prometheusResults.js.map +1 -0
  423. package/dist/profiles/queryRowLimits.cjs +82 -0
  424. package/dist/profiles/queryRowLimits.cjs.map +1 -0
  425. package/dist/profiles/queryRowLimits.d.ts +9 -0
  426. package/dist/profiles/queryRowLimits.d.ts.map +1 -0
  427. package/dist/profiles/queryRowLimits.js +82 -0
  428. package/dist/profiles/queryRowLimits.js.map +1 -0
  429. package/dist/profiles/queryRowLimitsModel.cjs +10 -0
  430. package/dist/profiles/queryRowLimitsModel.cjs.map +1 -0
  431. package/dist/profiles/queryRowLimitsModel.d.ts +9 -0
  432. package/dist/profiles/queryRowLimitsModel.d.ts.map +1 -0
  433. package/dist/profiles/queryRowLimitsModel.js +10 -0
  434. package/dist/profiles/queryRowLimitsModel.js.map +1 -0
  435. package/dist/profiles/queryTargetPicker.cjs +42 -0
  436. package/dist/profiles/queryTargetPicker.cjs.map +1 -0
  437. package/dist/profiles/queryTargetPicker.d.ts +8 -0
  438. package/dist/profiles/queryTargetPicker.d.ts.map +1 -0
  439. package/dist/profiles/queryTargetPicker.js +42 -0
  440. package/dist/profiles/queryTargetPicker.js.map +1 -0
  441. package/dist/profiles/testSchema.d.ts +3 -0
  442. package/dist/profiles/testSchema.d.ts.map +1 -0
  443. package/dist/profiles.cjs +223 -0
  444. package/dist/profiles.cjs.map +1 -0
  445. package/dist/profiles.d.ts +68 -0
  446. package/dist/profiles.d.ts.map +1 -0
  447. package/dist/profiles.js +223 -0
  448. package/dist/profiles.js.map +1 -0
  449. package/dist/styles.css +1 -1
  450. package/package.json +6 -1
@@ -0,0 +1,74 @@
1
+ import { JsonSchemaObject } from '../components/json-schema-form-types';
2
+ import { ProfileColumn, ProfileWizardDraft } from './profileWizardModel';
3
+ /**
4
+ * The schema the raw-YAML editor validates against. It is read through the
5
+ * configured accessor rather than bundled: the document is generated from
6
+ * commons-db's Go types and served by the host, so a copy here would drift.
7
+ */
8
+ export declare function profileEditorSchema(): JsonSchemaObject;
9
+ export declare const profileEditorSections: readonly [{
10
+ readonly id: "general";
11
+ readonly label: "General";
12
+ readonly hint: "Name, namespace, render mode";
13
+ }, {
14
+ readonly id: "source";
15
+ readonly label: "Source & Query";
16
+ readonly hint: "Provider, connection, sample";
17
+ }, {
18
+ readonly id: "columns";
19
+ readonly label: "Columns";
20
+ readonly hint: "Fields, labels, expressions";
21
+ }, {
22
+ readonly id: "parameters";
23
+ readonly label: "Parameters";
24
+ readonly hint: "Named query inputs";
25
+ }, {
26
+ readonly id: "advanced";
27
+ readonly label: "Advanced";
28
+ readonly hint: "Imports, aliases, processors, output";
29
+ }, {
30
+ readonly id: "raw";
31
+ readonly label: "Raw YAML";
32
+ readonly hint: "Edit the document directly";
33
+ }];
34
+ export type ProfileEditorSection = (typeof profileEditorSections)[number]["id"];
35
+ export declare const profileAdvancedKeys: string[];
36
+ export type ProfileSectionStatus = {
37
+ badge?: string | undefined;
38
+ attention?: boolean | undefined;
39
+ };
40
+ /**
41
+ * Rail annotations per section. The route replaced tabs with a vertical rail,
42
+ * which has room to say how much each section holds — so a stale sample or an
43
+ * empty column set is visible without opening the section.
44
+ */
45
+ export declare function profileEditorSectionStatus({ draft, availableColumns, sampleStale, }: {
46
+ draft: ProfileWizardDraft;
47
+ availableColumns: number;
48
+ sampleStale: boolean;
49
+ }): Record<ProfileEditorSection, ProfileSectionStatus>;
50
+ export declare function cloneProfileDraft(value: Record<string, unknown>): ProfileWizardDraft;
51
+ export declare function profileSchemaProjection(keys: string[]): JsonSchemaObject;
52
+ export declare function providerOptionsSchema(providerType: string): JsonSchemaObject;
53
+ export declare function providerTypes(): string[];
54
+ export declare function mergeProfileProjection(draft: ProfileWizardDraft, keys: string[], next: Record<string, unknown>): ProfileWizardDraft;
55
+ export declare function mergeSampledProfileColumns(configured: ProfileColumn[], sampled: ProfileColumn[]): ProfileColumn[];
56
+ export declare function resetProfileColumns(draft: ProfileWizardDraft, sampled: ProfileColumn[]): ProfileWizardDraft;
57
+ export declare function profileColumnResetState({ providerType, sampledColumnCount, sampleStale, }: {
58
+ providerType: string;
59
+ sampledColumnCount: number;
60
+ sampleStale: boolean;
61
+ }): {
62
+ visible: boolean;
63
+ disabled: boolean;
64
+ title: string;
65
+ };
66
+ export declare function profileSampleSignature(draft: ProfileWizardDraft): string;
67
+ export declare function validateProfileEditorDraft(draft: ProfileWizardDraft): string | null;
68
+ export declare function profileUpdateConflictTarget(error: string): string | null;
69
+ export declare function profileRoute(name: string): string;
70
+ /** Deep-linkable editor route for a profile surface (`profile-os2`). */
71
+ export declare function profileEditRoute(surfaceKey: string): string;
72
+ /** Surface key an edit route addresses, or null when the path is not one. */
73
+ export declare function profileEditSurfaceKey(pathname: string): string | null;
74
+ //# sourceMappingURL=profileEditorModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profileEditorModel.d.ts","sourceRoot":"","sources":["../../src/profiles/profileEditorModel.ts"],"names":[],"mappings":"AAAA,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AAgB,0BAA0B,CACxC,UAAU,EAAE,aAAa,EAAE,EAC3B,OAAO,EAAE,aAAa,EAAE,GACvB,aAAa,EAAE,CAQjB;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,kBAAkB,EACzB,OAAO,EAAE,aAAa,EAAE,GACvB,kBAAkB,CAKpB;AAED,wBAAgB,uBAAuB,CAAC,EACtC,YAAY,EACZ,kBAAkB,EAClB,WAAW,GACZ,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,OAAO,CAAC;CACtB;;;;EAuBA;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAKxE;AAED,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,kBAAkB,GACxB,MAAM,GAAG,IAAI,CAWf;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGxE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAajD;AAED,wEAAwE;AACxE,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,6EAA6E;AAC7E,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAErE"}
@@ -0,0 +1,181 @@
1
+ import { stripSurroundingDashes } from "../lib/string.js";
2
+ import { profileSchema } from "./profileApi.js";
3
+ import { validateProfileParams } from "./profileParamModel.js";
4
+ function profileEditorSchema() {
5
+ return profileSchema();
6
+ }
7
+ const profileEditorSections = [
8
+ { id: "general", label: "General", hint: "Name, namespace, render mode" },
9
+ { id: "source", label: "Source & Query", hint: "Provider, connection, sample" },
10
+ { id: "columns", label: "Columns", hint: "Fields, labels, expressions" },
11
+ { id: "parameters", label: "Parameters", hint: "Named query inputs" },
12
+ { id: "advanced", label: "Advanced", hint: "Imports, aliases, processors, output" },
13
+ { id: "raw", label: "Raw YAML", hint: "Edit the document directly" }
14
+ ];
15
+ const profileAdvancedKeys = ["imports", "aliases", "ignore", "processors", "output"];
16
+ function profileEditorSectionStatus({
17
+ draft,
18
+ availableColumns,
19
+ sampleStale
20
+ }) {
21
+ var _a, _b, _c, _d, _e;
22
+ const configured = ((_a = draft.columns) == null ? void 0 : _a.length) ?? 0;
23
+ const params = Array.isArray(draft.params) ? draft.params.length : 0;
24
+ const advanced = profileAdvancedKeys.filter(
25
+ (key) => Object.prototype.hasOwnProperty.call(draft, key)
26
+ ).length;
27
+ return {
28
+ general: { attention: !((_b = draft.profile) == null ? void 0 : _b.trim()) },
29
+ source: {
30
+ badge: ((_c = draft.provider) == null ? void 0 : _c.type) || void 0,
31
+ attention: sampleStale || !((_e = (_d = draft.provider) == null ? void 0 : _d.type) == null ? void 0 : _e.trim())
32
+ },
33
+ columns: {
34
+ badge: `${configured}/${Math.max(availableColumns, configured)}`,
35
+ attention: configured === 0
36
+ },
37
+ parameters: { badge: params ? String(params) : void 0 },
38
+ advanced: { badge: advanced ? String(advanced) : void 0 },
39
+ raw: {}
40
+ };
41
+ }
42
+ function cloneProfileDraft(value) {
43
+ return structuredClone(value);
44
+ }
45
+ function profileSchemaProjection(keys) {
46
+ const properties = Object.fromEntries(
47
+ keys.flatMap((key) => {
48
+ var _a;
49
+ const property = (_a = profileSchema().properties) == null ? void 0 : _a[key];
50
+ return property ? [[key, property]] : [];
51
+ })
52
+ );
53
+ return {
54
+ type: "object",
55
+ properties,
56
+ required: (profileSchema().required ?? []).filter((key) => keys.includes(key))
57
+ };
58
+ }
59
+ function providerOptionsSchema(providerType) {
60
+ var _a, _b;
61
+ const definition = (_a = profileSchema().$defs) == null ? void 0 : _a[providerType];
62
+ const options = (_b = definition == null ? void 0 : definition.properties) == null ? void 0 : _b.options;
63
+ if (!options || options.type !== "object") {
64
+ return { type: "object", properties: {}, additionalProperties: true };
65
+ }
66
+ return options;
67
+ }
68
+ function providerTypes() {
69
+ var _a, _b, _c, _d;
70
+ const values = (_d = (_c = (_b = (_a = profileSchema().properties) == null ? void 0 : _a.provider) == null ? void 0 : _b.properties) == null ? void 0 : _c.type) == null ? void 0 : _d.enum;
71
+ return Array.isArray(values) ? values.filter((value) => typeof value === "string") : [];
72
+ }
73
+ function mergeProfileProjection(draft, keys, next) {
74
+ const merged = { ...draft };
75
+ for (const key of keys) delete merged[key];
76
+ for (const key of keys) {
77
+ if (Object.prototype.hasOwnProperty.call(next, key)) merged[key] = next[key];
78
+ }
79
+ return merged;
80
+ }
81
+ function mergeSampledProfileColumns(configured, sampled) {
82
+ const configuredNames = new Set(configured.map((column) => column.name));
83
+ return [
84
+ ...configured.map((column) => ({ ...column })),
85
+ ...sampled.filter((column) => !configuredNames.has(column.name)).map((column) => ({ ...column }))
86
+ ];
87
+ }
88
+ function resetProfileColumns(draft, sampled) {
89
+ if (sampled.length === 0) {
90
+ throw new Error("Cannot reset profile columns without sampled columns");
91
+ }
92
+ return { ...draft, columns: structuredClone(sampled) };
93
+ }
94
+ function profileColumnResetState({
95
+ providerType,
96
+ sampledColumnCount,
97
+ sampleStale
98
+ }) {
99
+ if (providerType !== "opensearch") {
100
+ return { visible: false, disabled: true, title: "" };
101
+ }
102
+ if (sampledColumnCount === 0) {
103
+ return {
104
+ visible: true,
105
+ disabled: true,
106
+ title: "Run a sample before resetting columns"
107
+ };
108
+ }
109
+ if (sampleStale) {
110
+ return {
111
+ visible: true,
112
+ disabled: true,
113
+ title: "Run another sample for the current source and query"
114
+ };
115
+ }
116
+ return {
117
+ visible: true,
118
+ disabled: false,
119
+ title: "Replace configured columns with the latest sample"
120
+ };
121
+ }
122
+ function profileSampleSignature(draft) {
123
+ return JSON.stringify({
124
+ provider: draft.provider ?? {},
125
+ query: draft.query ?? ""
126
+ });
127
+ }
128
+ function validateProfileEditorDraft(draft) {
129
+ var _a, _b, _c, _d;
130
+ if (!((_a = draft.profile) == null ? void 0 : _a.trim())) return "Profile name is required";
131
+ if (!((_c = (_b = draft.provider) == null ? void 0 : _b.type) == null ? void 0 : _c.trim())) return "Provider type is required";
132
+ const names = /* @__PURE__ */ new Set();
133
+ for (const column of draft.columns ?? []) {
134
+ const name = column.name.trim();
135
+ if (!name) return "Every column needs a name";
136
+ if (names.has(name)) return `Column name "${name}" is duplicated`;
137
+ names.add(name);
138
+ }
139
+ return validateProfileParams(draft.params, (_d = draft.provider) == null ? void 0 : _d.type);
140
+ }
141
+ function profileUpdateConflictTarget(error) {
142
+ var _a;
143
+ if (!error.includes("PROFILE_NAME_CONFLICT")) return null;
144
+ return ((_a = error.match(/existing profile "([^"]+)"/)) == null ? void 0 : _a[1]) ?? null;
145
+ }
146
+ function profileRoute(name) {
147
+ const slug = stripSurroundingDashes(
148
+ Array.from(name.trim().toLowerCase()).map(
149
+ (character) => /[a-z0-9]/.test(character) ? character : /[ ._/-]/.test(character) ? "-" : ""
150
+ ).join("")
151
+ );
152
+ return `/profile-${slug}`;
153
+ }
154
+ function profileEditRoute(surfaceKey) {
155
+ return `/${surfaceKey}/edit`;
156
+ }
157
+ function profileEditSurfaceKey(pathname) {
158
+ var _a;
159
+ return ((_a = pathname.match(/^\/(profile-[^/]+)\/edit\/?$/)) == null ? void 0 : _a[1]) ?? null;
160
+ }
161
+ export {
162
+ cloneProfileDraft,
163
+ mergeProfileProjection,
164
+ mergeSampledProfileColumns,
165
+ profileAdvancedKeys,
166
+ profileColumnResetState,
167
+ profileEditRoute,
168
+ profileEditSurfaceKey,
169
+ profileEditorSchema,
170
+ profileEditorSectionStatus,
171
+ profileEditorSections,
172
+ profileRoute,
173
+ profileSampleSignature,
174
+ profileSchemaProjection,
175
+ profileUpdateConflictTarget,
176
+ providerOptionsSchema,
177
+ providerTypes,
178
+ resetProfileColumns,
179
+ validateProfileEditorDraft
180
+ };
181
+ //# sourceMappingURL=profileEditorModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profileEditorModel.js","sources":["../../src/profiles/profileEditorModel.ts"],"sourcesContent":["import type { JsonSchemaObject } from \"../components/json-schema-form-types\";\nimport { stripSurroundingDashes } from \"../lib/string\";\nimport { profileSchema } from \"./profileApi\";\nimport { validateProfileParams } from \"./profileParamModel\";\nimport type { ProfileColumn, ProfileWizardDraft } from \"./profileWizardModel\";\n\n/**\n * The schema the raw-YAML editor validates against. It is read through the\n * configured accessor rather than bundled: the document is generated from\n * commons-db's Go types and served by the host, so a copy here would drift.\n */\nexport function profileEditorSchema(): JsonSchemaObject {\n return profileSchema();\n}\n\nexport const profileEditorSections = [\n { id: \"general\", label: \"General\", hint: \"Name, namespace, render mode\" },\n { id: \"source\", label: \"Source & Query\", hint: \"Provider, connection, sample\" },\n { id: \"columns\", label: \"Columns\", hint: \"Fields, labels, expressions\" },\n { id: \"parameters\", label: \"Parameters\", hint: \"Named query inputs\" },\n { id: \"advanced\", label: \"Advanced\", hint: \"Imports, aliases, processors, output\" },\n { id: \"raw\", label: \"Raw YAML\", hint: \"Edit the document directly\" },\n] as const;\n\nexport type ProfileEditorSection = (typeof profileEditorSections)[number][\"id\"];\n\nexport const profileAdvancedKeys = [\"imports\", \"aliases\", \"ignore\", \"processors\", \"output\"];\n\nexport type ProfileSectionStatus = {\n badge?: string | undefined;\n attention?: boolean | undefined;\n};\n\n/**\n * Rail annotations per section. The route replaced tabs with a vertical rail,\n * which has room to say how much each section holds — so a stale sample or an\n * empty column set is visible without opening the section.\n */\nexport function profileEditorSectionStatus({\n draft,\n availableColumns,\n sampleStale,\n}: {\n draft: ProfileWizardDraft;\n availableColumns: number;\n sampleStale: boolean;\n}): Record<ProfileEditorSection, ProfileSectionStatus> {\n const configured = draft.columns?.length ?? 0;\n const params = Array.isArray(draft.params) ? draft.params.length : 0;\n const advanced = profileAdvancedKeys.filter((key) =>\n Object.prototype.hasOwnProperty.call(draft, key),\n ).length;\n return {\n general: { attention: !draft.profile?.trim() },\n source: {\n badge: draft.provider?.type || undefined,\n attention: sampleStale || !draft.provider?.type?.trim(),\n },\n columns: {\n badge: `${configured}/${Math.max(availableColumns, configured)}`,\n attention: configured === 0,\n },\n parameters: { badge: params ? String(params) : undefined },\n advanced: { badge: advanced ? String(advanced) : undefined },\n raw: {},\n };\n}\n\nexport function cloneProfileDraft(\n value: Record<string, unknown>,\n): ProfileWizardDraft {\n return structuredClone(value) as ProfileWizardDraft;\n}\n\nexport function profileSchemaProjection(keys: string[]): JsonSchemaObject {\n const properties = Object.fromEntries(\n keys.flatMap((key) => {\n const property = profileSchema().properties?.[key];\n return property ? [[key, property]] : [];\n }),\n );\n return {\n type: \"object\",\n properties,\n required: (profileSchema().required ?? []).filter((key) => keys.includes(key)),\n };\n}\n\nexport function providerOptionsSchema(providerType: string): JsonSchemaObject {\n const definition = profileSchema().$defs?.[providerType];\n const options = definition?.properties?.options;\n if (!options || options.type !== \"object\") {\n return { type: \"object\", properties: {}, additionalProperties: true };\n }\n return options as JsonSchemaObject;\n}\n\nexport function providerTypes(): string[] {\n const values = profileSchema().properties?.provider?.properties?.type?.enum;\n return Array.isArray(values)\n ? values.filter((value): value is string => typeof value === \"string\")\n : [];\n}\n\nexport function mergeProfileProjection(\n draft: ProfileWizardDraft,\n keys: string[],\n next: Record<string, unknown>,\n): ProfileWizardDraft {\n const merged = { ...draft };\n for (const key of keys) delete merged[key];\n for (const key of keys) {\n if (Object.prototype.hasOwnProperty.call(next, key)) merged[key] = next[key];\n }\n return merged;\n}\n\nexport function mergeSampledProfileColumns(\n configured: ProfileColumn[],\n sampled: ProfileColumn[],\n): ProfileColumn[] {\n const configuredNames = new Set(configured.map((column) => column.name));\n return [\n ...configured.map((column) => ({ ...column })),\n ...sampled\n .filter((column) => !configuredNames.has(column.name))\n .map((column) => ({ ...column })),\n ];\n}\n\nexport function resetProfileColumns(\n draft: ProfileWizardDraft,\n sampled: ProfileColumn[],\n): ProfileWizardDraft {\n if (sampled.length === 0) {\n throw new Error(\"Cannot reset profile columns without sampled columns\");\n }\n return { ...draft, columns: structuredClone(sampled) };\n}\n\nexport function profileColumnResetState({\n providerType,\n sampledColumnCount,\n sampleStale,\n}: {\n providerType: string;\n sampledColumnCount: number;\n sampleStale: boolean;\n}) {\n if (providerType !== \"opensearch\") {\n return { visible: false, disabled: true, title: \"\" };\n }\n if (sampledColumnCount === 0) {\n return {\n visible: true,\n disabled: true,\n title: \"Run a sample before resetting columns\",\n };\n }\n if (sampleStale) {\n return {\n visible: true,\n disabled: true,\n title: \"Run another sample for the current source and query\",\n };\n }\n return {\n visible: true,\n disabled: false,\n title: \"Replace configured columns with the latest sample\",\n };\n}\n\nexport function profileSampleSignature(draft: ProfileWizardDraft): string {\n return JSON.stringify({\n provider: draft.provider ?? {},\n query: draft.query ?? \"\",\n });\n}\n\nexport function validateProfileEditorDraft(\n draft: ProfileWizardDraft,\n): string | null {\n if (!draft.profile?.trim()) return \"Profile name is required\";\n if (!draft.provider?.type?.trim()) return \"Provider type is required\";\n const names = new Set<string>();\n for (const column of draft.columns ?? []) {\n const name = column.name.trim();\n if (!name) return \"Every column needs a name\";\n if (names.has(name)) return `Column name \"${name}\" is duplicated`;\n names.add(name);\n }\n return validateProfileParams(draft.params, draft.provider?.type);\n}\n\nexport function profileUpdateConflictTarget(error: string): string | null {\n if (!error.includes(\"PROFILE_NAME_CONFLICT\")) return null;\n return error.match(/existing profile \"([^\"]+)\"/)?.[1] ?? null;\n}\n\nexport function profileRoute(name: string): string {\n const slug = stripSurroundingDashes(\n Array.from(name.trim().toLowerCase())\n .map((character) =>\n /[a-z0-9]/.test(character)\n ? character\n : /[ ._/-]/.test(character)\n ? \"-\"\n : \"\",\n )\n .join(\"\"),\n );\n return `/profile-${slug}`;\n}\n\n/** Deep-linkable editor route for a profile surface (`profile-os2`). */\nexport function profileEditRoute(surfaceKey: string): string {\n return `/${surfaceKey}/edit`;\n}\n\n/** Surface key an edit route addresses, or null when the path is not one. */\nexport function profileEditSurfaceKey(pathname: string): string | null {\n return pathname.match(/^\\/(profile-[^/]+)\\/edit\\/?$/)?.[1] ?? null;\n}\n"],"names":[],"mappings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,OAAO,OAAO,KAAK,KAAA;AACzB,QAAI,CAAC,KAAM,QAAO;AAClB,QAAI,MAAM,IAAI,IAAI,EAAG,QAAO,gBAAgB,IAAI;AAChD,UAAM,IAAI,IAAI;AAAA,EAChB;AACA,SAAO,sBAAsB,MAAM,SAAQ,WAAM,aAAN,mBAAgB,IAAI;AACjE;AAEO,SAAS,4BAA4B,OAA8B;;AACxE,MAAI,CAAC,MAAM,SAAS,uBAAuB,EAAG,QAAO;AACrD,WAAO,WAAM,MAAM,4BAA4B,MAAxC,mBAA4C,OAAM;AAC3D;AAEO,SAAS,aAAa,MAAsB;AACjD,QAAM,OAAO;AAAA,IACX,MAAM,KAAK,KAAK,OAAO,YAAA,CAAa,EACjC;AAAA,MAAI,CAAC,cACJ,WAAW,KAAK,SAAS,IACrB,YACA,UAAU,KAAK,SAAS,IACtB,MACA;AAAA,IAAA,EAEP,KAAK,EAAE;AAAA,EAAA;AAEZ,SAAO,YAAY,IAAI;AACzB;AAGO,SAAS,iBAAiB,YAA4B;AAC3D,SAAO,IAAI,UAAU;AACvB;AAGO,SAAS,sBAAsB,UAAiC;;AACrE,WAAO,cAAS,MAAM,8BAA8B,MAA7C,mBAAiD,OAAM;AAChE;"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ function ProfileEditorPreview({
5
+ columns,
6
+ rows
7
+ }) {
8
+ const shown = columns.filter((column) => !column.hidden);
9
+ if (rows.length === 0 || shown.length === 0) {
10
+ return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "grid h-full place-items-center px-6 text-center text-xs text-muted-foreground", children: shown.length === 0 ? "No columns included yet." : "Run a sample in Source & Query to preview rows." });
11
+ }
12
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full border-collapse text-left", children: [
13
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "sticky top-0 bg-muted/60 backdrop-blur", children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: shown.map((column) => /* @__PURE__ */ jsxRuntime.jsx(
14
+ "th",
15
+ {
16
+ className: "whitespace-nowrap border-b border-border px-3 py-1 text-[11px] font-medium text-muted-foreground",
17
+ children: column.label ?? column.name
18
+ },
19
+ column.name
20
+ )) }) }),
21
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: rows.map((row, index) => /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "hover:bg-muted/40", children: shown.map((column) => /* @__PURE__ */ jsxRuntime.jsx(
22
+ "td",
23
+ {
24
+ className: "max-w-[24rem] truncate border-b border-border px-3 py-1 font-mono text-[11px]",
25
+ children: formatPreviewCell(
26
+ Object.prototype.hasOwnProperty.call(row, column.name) ? row[column.name] : column.source ? row[column.source] : void 0
27
+ )
28
+ },
29
+ column.name
30
+ )) }, index)) })
31
+ ] }) });
32
+ }
33
+ function formatPreviewCell(value) {
34
+ if (value === null || value === void 0) return "—";
35
+ return typeof value === "object" ? JSON.stringify(value) : String(value);
36
+ }
37
+ exports.ProfileEditorPreview = ProfileEditorPreview;
38
+ //# sourceMappingURL=profileEditorPreview.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profileEditorPreview.cjs","sources":["../../src/profiles/profileEditorPreview.tsx"],"sourcesContent":["import type { ProfileColumn } from \"./profileWizardModel\";\n\n/**\n * The configured columns applied to the rows returned by the last sample, so\n * the effect of including a field, relabelling it or hiding it is visible\n * without leaving the editor. Rows only exist after a sample runs — there is no\n * placeholder data, because a fabricated preview is worse than none.\n */\nexport function ProfileEditorPreview({\n columns,\n rows,\n}: {\n columns: ProfileColumn[];\n rows: Record<string, unknown>[];\n}) {\n const shown = columns.filter((column) => !column.hidden);\n\n if (rows.length === 0 || shown.length === 0) {\n return (\n <p className=\"grid h-full place-items-center px-6 text-center text-xs text-muted-foreground\">\n {shown.length === 0\n ? \"No columns included yet.\"\n : \"Run a sample in Source & Query to preview rows.\"}\n </p>\n );\n }\n\n return (\n <div className=\"min-h-0 overflow-auto\">\n <table className=\"w-full border-collapse text-left\">\n <thead className=\"sticky top-0 bg-muted/60 backdrop-blur\">\n <tr>\n {shown.map((column) => (\n <th\n key={column.name}\n className=\"whitespace-nowrap border-b border-border px-3 py-1 text-[11px] font-medium text-muted-foreground\"\n >\n {column.label ?? column.name}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows.map((row, index) => (\n <tr key={index} className=\"hover:bg-muted/40\">\n {shown.map((column) => (\n <td\n key={column.name}\n className=\"max-w-[24rem] truncate border-b border-border px-3 py-1 font-mono text-[11px]\"\n >\n {formatPreviewCell(\n Object.prototype.hasOwnProperty.call(row, column.name)\n ? row[column.name]\n : column.source\n ? row[column.source]\n : undefined,\n )}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n );\n}\n\nfunction formatPreviewCell(value: unknown): string {\n if (value === null || value === undefined) return \"—\";\n return typeof value === \"object\" ? JSON.stringify(value) : String(value);\n}\n"],"names":["jsx","jsxs"],"mappings":";;;AAQO,SAAS,qBAAqB;AAAA,EACnC;AAAA,EACA;AACF,GAGG;AACD,QAAM,QAAQ,QAAQ,OAAO,CAAC,WAAW,CAAC,OAAO,MAAM;AAEvD,MAAI,KAAK,WAAW,KAAK,MAAM,WAAW,GAAG;AAC3C,WACEA,+BAAC,OAAE,WAAU,iFACV,gBAAM,WAAW,IACd,6BACA,kDAAA,CACN;AAAA,EAEJ;AAEA,wCACG,OAAA,EAAI,WAAU,yBACb,UAAAC,2BAAAA,KAAC,SAAA,EAAM,WAAU,oCACf,UAAA;AAAA,IAAAD,2BAAAA,IAAC,SAAA,EAAM,WAAU,0CACf,UAAAA,2BAAAA,IAAC,QACE,UAAA,MAAM,IAAI,CAAC,WACVA,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QAEC,WAAU;AAAA,QAET,UAAA,OAAO,SAAS,OAAO;AAAA,MAAA;AAAA,MAHnB,OAAO;AAAA,IAAA,CAKf,GACH,EAAA,CACF;AAAA,IACAA,2BAAAA,IAAC,SAAA,EACE,UAAA,KAAK,IAAI,CAAC,KAAK,UACdA,2BAAAA,IAAC,MAAA,EAAe,WAAU,qBACvB,UAAA,MAAM,IAAI,CAAC,WACVA,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QAEC,WAAU;AAAA,QAET,UAAA;AAAA,UACC,OAAO,UAAU,eAAe,KAAK,KAAK,OAAO,IAAI,IACjD,IAAI,OAAO,IAAI,IACf,OAAO,SACL,IAAI,OAAO,MAAM,IACjB;AAAA,QAAA;AAAA,MACR;AAAA,MATK,OAAO;AAAA,IAAA,CAWf,EAAA,GAdM,KAeT,CACD,EAAA,CACH;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;AAEA,SAAS,kBAAkB,OAAwB;AACjD,MAAI,UAAU,QAAQ,UAAU,OAAW,QAAO;AAClD,SAAO,OAAO,UAAU,WAAW,KAAK,UAAU,KAAK,IAAI,OAAO,KAAK;AACzE;;"}
@@ -0,0 +1,12 @@
1
+ import { ProfileColumn } from './profileWizardModel';
2
+ /**
3
+ * The configured columns applied to the rows returned by the last sample, so
4
+ * the effect of including a field, relabelling it or hiding it is visible
5
+ * without leaving the editor. Rows only exist after a sample runs — there is no
6
+ * placeholder data, because a fabricated preview is worse than none.
7
+ */
8
+ export declare function ProfileEditorPreview({ columns, rows, }: {
9
+ columns: ProfileColumn[];
10
+ rows: Record<string, unknown>[];
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=profileEditorPreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profileEditorPreview.d.ts","sourceRoot":"","sources":["../../src/profiles/profileEditorPreview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,IAAI,GACL,EAAE;IACD,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;CACjC,2CAmDA"}
@@ -0,0 +1,38 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ function ProfileEditorPreview({
3
+ columns,
4
+ rows
5
+ }) {
6
+ const shown = columns.filter((column) => !column.hidden);
7
+ if (rows.length === 0 || shown.length === 0) {
8
+ return /* @__PURE__ */ jsx("p", { className: "grid h-full place-items-center px-6 text-center text-xs text-muted-foreground", children: shown.length === 0 ? "No columns included yet." : "Run a sample in Source & Query to preview rows." });
9
+ }
10
+ return /* @__PURE__ */ jsx("div", { className: "min-h-0 overflow-auto", children: /* @__PURE__ */ jsxs("table", { className: "w-full border-collapse text-left", children: [
11
+ /* @__PURE__ */ jsx("thead", { className: "sticky top-0 bg-muted/60 backdrop-blur", children: /* @__PURE__ */ jsx("tr", { children: shown.map((column) => /* @__PURE__ */ jsx(
12
+ "th",
13
+ {
14
+ className: "whitespace-nowrap border-b border-border px-3 py-1 text-[11px] font-medium text-muted-foreground",
15
+ children: column.label ?? column.name
16
+ },
17
+ column.name
18
+ )) }) }),
19
+ /* @__PURE__ */ jsx("tbody", { children: rows.map((row, index) => /* @__PURE__ */ jsx("tr", { className: "hover:bg-muted/40", children: shown.map((column) => /* @__PURE__ */ jsx(
20
+ "td",
21
+ {
22
+ className: "max-w-[24rem] truncate border-b border-border px-3 py-1 font-mono text-[11px]",
23
+ children: formatPreviewCell(
24
+ Object.prototype.hasOwnProperty.call(row, column.name) ? row[column.name] : column.source ? row[column.source] : void 0
25
+ )
26
+ },
27
+ column.name
28
+ )) }, index)) })
29
+ ] }) });
30
+ }
31
+ function formatPreviewCell(value) {
32
+ if (value === null || value === void 0) return "—";
33
+ return typeof value === "object" ? JSON.stringify(value) : String(value);
34
+ }
35
+ export {
36
+ ProfileEditorPreview
37
+ };
38
+ //# sourceMappingURL=profileEditorPreview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profileEditorPreview.js","sources":["../../src/profiles/profileEditorPreview.tsx"],"sourcesContent":["import type { ProfileColumn } from \"./profileWizardModel\";\n\n/**\n * The configured columns applied to the rows returned by the last sample, so\n * the effect of including a field, relabelling it or hiding it is visible\n * without leaving the editor. Rows only exist after a sample runs — there is no\n * placeholder data, because a fabricated preview is worse than none.\n */\nexport function ProfileEditorPreview({\n columns,\n rows,\n}: {\n columns: ProfileColumn[];\n rows: Record<string, unknown>[];\n}) {\n const shown = columns.filter((column) => !column.hidden);\n\n if (rows.length === 0 || shown.length === 0) {\n return (\n <p className=\"grid h-full place-items-center px-6 text-center text-xs text-muted-foreground\">\n {shown.length === 0\n ? \"No columns included yet.\"\n : \"Run a sample in Source & Query to preview rows.\"}\n </p>\n );\n }\n\n return (\n <div className=\"min-h-0 overflow-auto\">\n <table className=\"w-full border-collapse text-left\">\n <thead className=\"sticky top-0 bg-muted/60 backdrop-blur\">\n <tr>\n {shown.map((column) => (\n <th\n key={column.name}\n className=\"whitespace-nowrap border-b border-border px-3 py-1 text-[11px] font-medium text-muted-foreground\"\n >\n {column.label ?? column.name}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows.map((row, index) => (\n <tr key={index} className=\"hover:bg-muted/40\">\n {shown.map((column) => (\n <td\n key={column.name}\n className=\"max-w-[24rem] truncate border-b border-border px-3 py-1 font-mono text-[11px]\"\n >\n {formatPreviewCell(\n Object.prototype.hasOwnProperty.call(row, column.name)\n ? row[column.name]\n : column.source\n ? row[column.source]\n : undefined,\n )}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n );\n}\n\nfunction formatPreviewCell(value: unknown): string {\n if (value === null || value === undefined) return \"—\";\n return typeof value === \"object\" ? JSON.stringify(value) : String(value);\n}\n"],"names":[],"mappings":";AAQO,SAAS,qBAAqB;AAAA,EACnC;AAAA,EACA;AACF,GAGG;AACD,QAAM,QAAQ,QAAQ,OAAO,CAAC,WAAW,CAAC,OAAO,MAAM;AAEvD,MAAI,KAAK,WAAW,KAAK,MAAM,WAAW,GAAG;AAC3C,WACE,oBAAC,OAAE,WAAU,iFACV,gBAAM,WAAW,IACd,6BACA,kDAAA,CACN;AAAA,EAEJ;AAEA,6BACG,OAAA,EAAI,WAAU,yBACb,UAAA,qBAAC,SAAA,EAAM,WAAU,oCACf,UAAA;AAAA,IAAA,oBAAC,SAAA,EAAM,WAAU,0CACf,UAAA,oBAAC,QACE,UAAA,MAAM,IAAI,CAAC,WACV;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC,WAAU;AAAA,QAET,UAAA,OAAO,SAAS,OAAO;AAAA,MAAA;AAAA,MAHnB,OAAO;AAAA,IAAA,CAKf,GACH,EAAA,CACF;AAAA,IACA,oBAAC,SAAA,EACE,UAAA,KAAK,IAAI,CAAC,KAAK,UACd,oBAAC,MAAA,EAAe,WAAU,qBACvB,UAAA,MAAM,IAAI,CAAC,WACV;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC,WAAU;AAAA,QAET,UAAA;AAAA,UACC,OAAO,UAAU,eAAe,KAAK,KAAK,OAAO,IAAI,IACjD,IAAI,OAAO,IAAI,IACf,OAAO,SACL,IAAI,OAAO,MAAM,IACjB;AAAA,QAAA;AAAA,MACR;AAAA,MATK,OAAO;AAAA,IAAA,CAWf,EAAA,GAdM,KAeT,CACD,EAAA,CACH;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;AAEA,SAAS,kBAAkB,OAAwB;AACjD,MAAI,UAAU,QAAQ,UAAU,OAAW,QAAO;AAClD,SAAO,OAAO,UAAU,WAAW,KAAK,UAAU,KAAK,IAAI,OAAO,KAAK;AACzE;"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const profileEditorModel = require("./profileEditorModel.cjs");
5
+ function ProfileEditorRail({
6
+ value,
7
+ status,
8
+ onChange
9
+ }) {
10
+ return /* @__PURE__ */ jsxRuntime.jsx("nav", { className: "w-full overflow-auto p-2", "aria-label": "Profile sections", children: profileEditorModel.profileEditorSections.map((section) => {
11
+ const active = section.id === value;
12
+ const { badge, attention } = status[section.id];
13
+ return /* @__PURE__ */ jsxRuntime.jsxs(
14
+ "button",
15
+ {
16
+ type: "button",
17
+ "aria-current": active ? "page" : void 0,
18
+ className: `mb-0.5 flex w-full items-center gap-2 rounded-md px-2.5 py-2 text-left transition-colors ${active ? "bg-background shadow-sm ring-1 ring-border" : "hover:bg-background/70"}`,
19
+ onClick: () => onChange(section.id),
20
+ children: [
21
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0 flex-1", children: [
22
+ /* @__PURE__ */ jsxRuntime.jsx(
23
+ "span",
24
+ {
25
+ className: `block truncate text-sm ${active ? "font-medium text-foreground" : "text-foreground/80"}`,
26
+ children: section.label
27
+ }
28
+ ),
29
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate text-[11px] text-muted-foreground", children: section.hint })
30
+ ] }),
31
+ attention ? /* @__PURE__ */ jsxRuntime.jsx(
32
+ "span",
33
+ {
34
+ className: "size-1.5 shrink-0 rounded-full bg-warning",
35
+ title: "Needs attention"
36
+ }
37
+ ) : null,
38
+ badge ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground", children: badge }) : null
39
+ ]
40
+ },
41
+ section.id
42
+ );
43
+ }) });
44
+ }
45
+ exports.ProfileEditorRail = ProfileEditorRail;
46
+ //# sourceMappingURL=profileEditorRail.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profileEditorRail.cjs","sources":["../../src/profiles/profileEditorRail.tsx"],"sourcesContent":["import {\n profileEditorSections,\n type ProfileEditorSection,\n type ProfileSectionStatus,\n} from \"./profileEditorModel\";\n\n/** Vertical section nav for the editor route, in place of the modal's tabs. */\nexport function ProfileEditorRail({\n value,\n status,\n onChange,\n}: {\n value: ProfileEditorSection;\n status: Record<ProfileEditorSection, ProfileSectionStatus>;\n onChange: (section: ProfileEditorSection) => void;\n}) {\n return (\n <nav className=\"w-full overflow-auto p-2\" aria-label=\"Profile sections\">\n {profileEditorSections.map((section) => {\n const active = section.id === value;\n const { badge, attention } = status[section.id];\n return (\n <button\n key={section.id}\n type=\"button\"\n aria-current={active ? \"page\" : undefined}\n className={`mb-0.5 flex w-full items-center gap-2 rounded-md px-2.5 py-2 text-left transition-colors ${\n active ? \"bg-background shadow-sm ring-1 ring-border\" : \"hover:bg-background/70\"\n }`}\n onClick={() => onChange(section.id)}\n >\n <span className=\"min-w-0 flex-1\">\n <span\n className={`block truncate text-sm ${active ? \"font-medium text-foreground\" : \"text-foreground/80\"}`}\n >\n {section.label}\n </span>\n <span className=\"block truncate text-[11px] text-muted-foreground\">\n {section.hint}\n </span>\n </span>\n {attention ? (\n <span\n className=\"size-1.5 shrink-0 rounded-full bg-warning\"\n title=\"Needs attention\"\n />\n ) : null}\n {badge ? (\n <span className=\"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground\">\n {badge}\n </span>\n ) : null}\n </button>\n );\n })}\n </nav>\n );\n}\n"],"names":["jsx","profileEditorSections","jsxs"],"mappings":";;;;AAOO,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,SACEA,+BAAC,SAAI,WAAU,4BAA2B,cAAW,oBAClD,UAAAC,mBAAAA,sBAAsB,IAAI,CAAC,YAAY;AACtC,UAAM,SAAS,QAAQ,OAAO;AAC9B,UAAM,EAAE,OAAO,UAAA,IAAc,OAAO,QAAQ,EAAE;AAC9C,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QAEC,MAAK;AAAA,QACL,gBAAc,SAAS,SAAS;AAAA,QAChC,WAAW,4FACT,SAAS,+CAA+C,wBAC1D;AAAA,QACA,SAAS,MAAM,SAAS,QAAQ,EAAE;AAAA,QAElC,UAAA;AAAA,UAAAA,2BAAAA,KAAC,QAAA,EAAK,WAAU,kBACd,UAAA;AAAA,YAAAF,2BAAAA;AAAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAW,0BAA0B,SAAS,gCAAgC,oBAAoB;AAAA,gBAEjG,UAAA,QAAQ;AAAA,cAAA;AAAA,YAAA;AAAA,YAEXA,2BAAAA,IAAC,QAAA,EAAK,WAAU,oDACb,kBAAQ,KAAA,CACX;AAAA,UAAA,GACF;AAAA,UACC,YACCA,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAM;AAAA,YAAA;AAAA,UAAA,IAEN;AAAA,UACH,QACCA,2BAAAA,IAAC,QAAA,EAAK,WAAU,6EACb,iBACH,IACE;AAAA,QAAA;AAAA,MAAA;AAAA,MA5BC,QAAQ;AAAA,IAAA;AAAA,EA+BnB,CAAC,EAAA,CACH;AAEJ;;"}
@@ -0,0 +1,8 @@
1
+ import { ProfileEditorSection, ProfileSectionStatus } from './profileEditorModel';
2
+ /** Vertical section nav for the editor route, in place of the modal's tabs. */
3
+ export declare function ProfileEditorRail({ value, status, onChange, }: {
4
+ value: ProfileEditorSection;
5
+ status: Record<ProfileEditorSection, ProfileSectionStatus>;
6
+ onChange: (section: ProfileEditorSection) => void;
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=profileEditorRail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profileEditorRail.d.ts","sourceRoot":"","sources":["../../src/profiles/profileEditorRail.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAC;AAE9B,+EAA+E;AAC/E,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,MAAM,EACN,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,oBAAoB,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAC;IAC3D,QAAQ,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAC;CACnD,2CA0CA"}
@@ -0,0 +1,46 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { profileEditorSections } from "./profileEditorModel.js";
3
+ function ProfileEditorRail({
4
+ value,
5
+ status,
6
+ onChange
7
+ }) {
8
+ return /* @__PURE__ */ jsx("nav", { className: "w-full overflow-auto p-2", "aria-label": "Profile sections", children: profileEditorSections.map((section) => {
9
+ const active = section.id === value;
10
+ const { badge, attention } = status[section.id];
11
+ return /* @__PURE__ */ jsxs(
12
+ "button",
13
+ {
14
+ type: "button",
15
+ "aria-current": active ? "page" : void 0,
16
+ className: `mb-0.5 flex w-full items-center gap-2 rounded-md px-2.5 py-2 text-left transition-colors ${active ? "bg-background shadow-sm ring-1 ring-border" : "hover:bg-background/70"}`,
17
+ onClick: () => onChange(section.id),
18
+ children: [
19
+ /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
20
+ /* @__PURE__ */ jsx(
21
+ "span",
22
+ {
23
+ className: `block truncate text-sm ${active ? "font-medium text-foreground" : "text-foreground/80"}`,
24
+ children: section.label
25
+ }
26
+ ),
27
+ /* @__PURE__ */ jsx("span", { className: "block truncate text-[11px] text-muted-foreground", children: section.hint })
28
+ ] }),
29
+ attention ? /* @__PURE__ */ jsx(
30
+ "span",
31
+ {
32
+ className: "size-1.5 shrink-0 rounded-full bg-warning",
33
+ title: "Needs attention"
34
+ }
35
+ ) : null,
36
+ badge ? /* @__PURE__ */ jsx("span", { className: "shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground", children: badge }) : null
37
+ ]
38
+ },
39
+ section.id
40
+ );
41
+ }) });
42
+ }
43
+ export {
44
+ ProfileEditorRail
45
+ };
46
+ //# sourceMappingURL=profileEditorRail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profileEditorRail.js","sources":["../../src/profiles/profileEditorRail.tsx"],"sourcesContent":["import {\n profileEditorSections,\n type ProfileEditorSection,\n type ProfileSectionStatus,\n} from \"./profileEditorModel\";\n\n/** Vertical section nav for the editor route, in place of the modal's tabs. */\nexport function ProfileEditorRail({\n value,\n status,\n onChange,\n}: {\n value: ProfileEditorSection;\n status: Record<ProfileEditorSection, ProfileSectionStatus>;\n onChange: (section: ProfileEditorSection) => void;\n}) {\n return (\n <nav className=\"w-full overflow-auto p-2\" aria-label=\"Profile sections\">\n {profileEditorSections.map((section) => {\n const active = section.id === value;\n const { badge, attention } = status[section.id];\n return (\n <button\n key={section.id}\n type=\"button\"\n aria-current={active ? \"page\" : undefined}\n className={`mb-0.5 flex w-full items-center gap-2 rounded-md px-2.5 py-2 text-left transition-colors ${\n active ? \"bg-background shadow-sm ring-1 ring-border\" : \"hover:bg-background/70\"\n }`}\n onClick={() => onChange(section.id)}\n >\n <span className=\"min-w-0 flex-1\">\n <span\n className={`block truncate text-sm ${active ? \"font-medium text-foreground\" : \"text-foreground/80\"}`}\n >\n {section.label}\n </span>\n <span className=\"block truncate text-[11px] text-muted-foreground\">\n {section.hint}\n </span>\n </span>\n {attention ? (\n <span\n className=\"size-1.5 shrink-0 rounded-full bg-warning\"\n title=\"Needs attention\"\n />\n ) : null}\n {badge ? (\n <span className=\"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground\">\n {badge}\n </span>\n ) : null}\n </button>\n );\n })}\n </nav>\n );\n}\n"],"names":[],"mappings":";;AAOO,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,SACE,oBAAC,SAAI,WAAU,4BAA2B,cAAW,oBAClD,UAAA,sBAAsB,IAAI,CAAC,YAAY;AACtC,UAAM,SAAS,QAAQ,OAAO;AAC9B,UAAM,EAAE,OAAO,UAAA,IAAc,OAAO,QAAQ,EAAE;AAC9C,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC,MAAK;AAAA,QACL,gBAAc,SAAS,SAAS;AAAA,QAChC,WAAW,4FACT,SAAS,+CAA+C,wBAC1D;AAAA,QACA,SAAS,MAAM,SAAS,QAAQ,EAAE;AAAA,QAElC,UAAA;AAAA,UAAA,qBAAC,QAAA,EAAK,WAAU,kBACd,UAAA;AAAA,YAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAW,0BAA0B,SAAS,gCAAgC,oBAAoB;AAAA,gBAEjG,UAAA,QAAQ;AAAA,cAAA;AAAA,YAAA;AAAA,YAEX,oBAAC,QAAA,EAAK,WAAU,oDACb,kBAAQ,KAAA,CACX;AAAA,UAAA,GACF;AAAA,UACC,YACC;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAM;AAAA,YAAA;AAAA,UAAA,IAEN;AAAA,UACH,QACC,oBAAC,QAAA,EAAK,WAAU,6EACb,iBACH,IACE;AAAA,QAAA;AAAA,MAAA;AAAA,MA5BC,QAAQ;AAAA,IAAA;AAAA,EA+BnB,CAAC,EAAA,CACH;AAEJ;"}