@api-client/ui 0.0.5 → 0.0.7

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 (323) hide show
  1. package/demo/elements/http/http-assertions.html +3 -0
  2. package/demo/elements/http/http-assertions.ts +1 -1
  3. package/demo/elements/http/http-flows.html +23 -0
  4. package/demo/elements/http/http-flows.ts +92 -0
  5. package/demo/elements/http/index.html +3 -0
  6. package/demo/pages/http-project/main.ts +5 -6
  7. package/dist/define/dialog/delete-cookie-action-dialog.d.ts +10 -0
  8. package/dist/define/dialog/delete-cookie-action-dialog.d.ts.map +1 -0
  9. package/dist/define/dialog/delete-cookie-action-dialog.js +14 -0
  10. package/dist/define/dialog/delete-cookie-action-dialog.js.map +1 -0
  11. package/dist/define/dialog/set-cookie-action-dialog.d.ts +10 -0
  12. package/dist/define/dialog/set-cookie-action-dialog.d.ts.map +1 -0
  13. package/dist/define/dialog/set-cookie-action-dialog.js +14 -0
  14. package/dist/define/dialog/set-cookie-action-dialog.js.map +1 -0
  15. package/dist/define/http/http-assertions.d.ts +1 -1
  16. package/dist/define/http/http-assertions.d.ts.map +1 -1
  17. package/dist/define/http/http-assertions.js +3 -3
  18. package/dist/define/http/http-assertions.js.map +1 -1
  19. package/dist/define/http/http-flows.d.ts +10 -0
  20. package/dist/define/http/http-flows.d.ts.map +1 -0
  21. package/dist/define/http/http-flows.js +13 -0
  22. package/dist/define/http/http-flows.js.map +1 -0
  23. package/dist/define/ui/ui-divider.d.ts +4 -1
  24. package/dist/define/ui/ui-divider.d.ts.map +1 -1
  25. package/dist/define/ui/ui-divider.js +11 -2
  26. package/dist/define/ui/ui-divider.js.map +1 -1
  27. package/dist/elements/ApiElement.d.ts +4 -0
  28. package/dist/elements/ApiElement.d.ts.map +1 -1
  29. package/dist/elements/ApiElement.js +6 -0
  30. package/dist/elements/ApiElement.js.map +1 -1
  31. package/dist/elements/amf/ApiAuthorizationEditor.element.js +1 -1
  32. package/dist/elements/amf/ApiAuthorizationEditor.element.js.map +1 -1
  33. package/dist/elements/amf/ApiOperationDocument.element.d.ts.map +1 -1
  34. package/dist/elements/amf/ApiOperationDocument.element.js +2 -1
  35. package/dist/elements/amf/ApiOperationDocument.element.js.map +1 -1
  36. package/dist/elements/amf/ApiRequest.element.js +1 -1
  37. package/dist/elements/amf/ApiRequest.element.js.map +1 -1
  38. package/dist/elements/amf/ApiRequestEditor.element.d.ts +0 -1
  39. package/dist/elements/amf/ApiRequestEditor.element.d.ts.map +1 -1
  40. package/dist/elements/amf/ApiRequestEditor.element.js +0 -3
  41. package/dist/elements/amf/ApiRequestEditor.element.js.map +1 -1
  42. package/dist/elements/authorization/ui/Authorization.d.ts +2 -1
  43. package/dist/elements/authorization/ui/Authorization.d.ts.map +1 -1
  44. package/dist/elements/authorization/ui/Authorization.js +0 -3
  45. package/dist/elements/authorization/ui/Authorization.js.map +1 -1
  46. package/dist/elements/dialog/DeleteCookieAction.element.d.ts +20 -0
  47. package/dist/elements/dialog/DeleteCookieAction.element.d.ts.map +1 -0
  48. package/dist/elements/dialog/DeleteCookieAction.element.js +93 -0
  49. package/dist/elements/dialog/DeleteCookieAction.element.js.map +1 -0
  50. package/dist/elements/dialog/DeleteCookieAction.styles.d.ts +3 -0
  51. package/dist/elements/dialog/DeleteCookieAction.styles.d.ts.map +1 -0
  52. package/dist/elements/dialog/DeleteCookieAction.styles.js +13 -0
  53. package/dist/elements/dialog/DeleteCookieAction.styles.js.map +1 -0
  54. package/dist/elements/dialog/Rename.d.ts +7 -6
  55. package/dist/elements/dialog/Rename.d.ts.map +1 -1
  56. package/dist/elements/dialog/Rename.js +7 -6
  57. package/dist/elements/dialog/Rename.js.map +1 -1
  58. package/dist/elements/dialog/SetCookieAction.element.d.ts +22 -0
  59. package/dist/elements/dialog/SetCookieAction.element.d.ts.map +1 -0
  60. package/dist/elements/dialog/SetCookieAction.element.js +173 -0
  61. package/dist/elements/dialog/SetCookieAction.element.js.map +1 -0
  62. package/dist/elements/environment/EnvironmentEditor.d.ts +24 -3
  63. package/dist/elements/environment/EnvironmentEditor.d.ts.map +1 -1
  64. package/dist/elements/environment/EnvironmentEditor.js +69 -23
  65. package/dist/elements/environment/EnvironmentEditor.js.map +1 -1
  66. package/dist/elements/environment/EnvironmentEditor.styles.d.ts.map +1 -1
  67. package/dist/elements/environment/EnvironmentEditor.styles.js +5 -0
  68. package/dist/elements/environment/EnvironmentEditor.styles.js.map +1 -1
  69. package/dist/elements/environment/ServerEditor.d.ts +3 -3
  70. package/dist/elements/environment/ServerEditor.d.ts.map +1 -1
  71. package/dist/elements/environment/ServerEditor.js +3 -6
  72. package/dist/elements/environment/ServerEditor.js.map +1 -1
  73. package/dist/elements/environment/VariablesEditor.d.ts +0 -1
  74. package/dist/elements/environment/VariablesEditor.d.ts.map +1 -1
  75. package/dist/elements/environment/VariablesEditor.js +3 -6
  76. package/dist/elements/environment/VariablesEditor.js.map +1 -1
  77. package/dist/elements/highlight/Prism.styles.d.ts.map +1 -1
  78. package/dist/elements/highlight/Prism.styles.js +12 -5
  79. package/dist/elements/highlight/Prism.styles.js.map +1 -1
  80. package/dist/elements/http/BodyEditor.d.ts +0 -4
  81. package/dist/elements/http/BodyEditor.d.ts.map +1 -1
  82. package/dist/elements/http/BodyEditor.js +10 -16
  83. package/dist/elements/http/BodyEditor.js.map +1 -1
  84. package/dist/elements/http/BodyMultipartEditor.d.ts +3 -16
  85. package/dist/elements/http/BodyMultipartEditor.d.ts.map +1 -1
  86. package/dist/elements/http/BodyMultipartEditor.js +3 -19
  87. package/dist/elements/http/BodyMultipartEditor.js.map +1 -1
  88. package/dist/elements/http/BodyTextEditor.d.ts +0 -1
  89. package/dist/elements/http/BodyTextEditor.d.ts.map +1 -1
  90. package/dist/elements/http/BodyTextEditor.js +0 -3
  91. package/dist/elements/http/BodyTextEditor.js.map +1 -1
  92. package/dist/elements/http/BodyUrlEncodedEditor.d.ts +3 -3
  93. package/dist/elements/http/BodyUrlEncodedEditor.d.ts.map +1 -1
  94. package/dist/elements/http/BodyUrlEncodedEditor.js +3 -5
  95. package/dist/elements/http/BodyUrlEncodedEditor.js.map +1 -1
  96. package/dist/elements/http/HeadersForm.d.ts +0 -4
  97. package/dist/elements/http/HeadersForm.d.ts.map +1 -1
  98. package/dist/elements/http/HeadersForm.js +0 -6
  99. package/dist/elements/http/HeadersForm.js.map +1 -1
  100. package/dist/elements/http/HttpAssertions.element.d.ts +55 -0
  101. package/dist/elements/http/HttpAssertions.element.d.ts.map +1 -0
  102. package/dist/elements/http/HttpAssertions.element.js +264 -0
  103. package/dist/elements/http/HttpAssertions.element.js.map +1 -0
  104. package/dist/elements/http/HttpAssertions.styles.d.ts.map +1 -1
  105. package/dist/elements/http/HttpAssertions.styles.js +7 -156
  106. package/dist/elements/http/HttpAssertions.styles.js.map +1 -1
  107. package/dist/elements/http/HttpFlows.common.d.ts +3 -0
  108. package/dist/elements/http/HttpFlows.common.d.ts.map +1 -0
  109. package/dist/elements/http/HttpFlows.common.js +181 -0
  110. package/dist/elements/http/HttpFlows.common.js.map +1 -0
  111. package/dist/elements/http/HttpFlows.element.d.ts +97 -0
  112. package/dist/elements/http/HttpFlows.element.d.ts.map +1 -0
  113. package/dist/elements/http/HttpFlows.element.js +684 -0
  114. package/dist/elements/http/HttpFlows.element.js.map +1 -0
  115. package/dist/elements/http/HttpFlows.styles.d.ts +3 -0
  116. package/dist/elements/http/HttpFlows.styles.d.ts.map +1 -0
  117. package/dist/elements/http/HttpFlows.styles.js +28 -0
  118. package/dist/elements/http/HttpFlows.styles.js.map +1 -0
  119. package/dist/elements/http/HttpFlowsUi.d.ts +172 -0
  120. package/dist/elements/http/HttpFlowsUi.d.ts.map +1 -0
  121. package/dist/elements/http/HttpFlowsUi.js +1256 -0
  122. package/dist/elements/http/HttpFlowsUi.js.map +1 -0
  123. package/dist/elements/http/RequestConfigElement.d.ts +0 -1
  124. package/dist/elements/http/RequestConfigElement.d.ts.map +1 -1
  125. package/dist/elements/http/RequestConfigElement.js +8 -11
  126. package/dist/elements/http/RequestConfigElement.js.map +1 -1
  127. package/dist/elements/http/RequestEditor.d.ts +10 -10
  128. package/dist/elements/http/RequestEditor.d.ts.map +1 -1
  129. package/dist/elements/http/RequestEditor.js +62 -23
  130. package/dist/elements/http/RequestEditor.js.map +1 -1
  131. package/dist/elements/http/UrlInput.d.ts +3 -3
  132. package/dist/elements/http/UrlInput.d.ts.map +1 -1
  133. package/dist/elements/http/UrlInput.js +2 -2
  134. package/dist/elements/http/UrlInput.js.map +1 -1
  135. package/dist/elements/http/UrlParamsForm.d.ts +0 -1
  136. package/dist/elements/http/UrlParamsForm.d.ts.map +1 -1
  137. package/dist/elements/http/UrlParamsForm.js +0 -3
  138. package/dist/elements/http/UrlParamsForm.js.map +1 -1
  139. package/dist/elements/layout/SplitView.styles.d.ts.map +1 -1
  140. package/dist/elements/layout/SplitView.styles.js +1 -0
  141. package/dist/elements/layout/SplitView.styles.js.map +1 -1
  142. package/dist/elements/navigation/AppNavigationItem.styles.d.ts.map +1 -1
  143. package/dist/elements/navigation/AppNavigationItem.styles.js +2 -0
  144. package/dist/elements/navigation/AppNavigationItem.styles.js.map +1 -1
  145. package/dist/elements/project/HttpProjectRequest.d.ts +2 -1
  146. package/dist/elements/project/HttpProjectRequest.d.ts.map +1 -1
  147. package/dist/elements/project/HttpProjectRequest.js +14 -5
  148. package/dist/elements/project/HttpProjectRequest.js.map +1 -1
  149. package/dist/elements/project/ProjectRunner.d.ts +0 -1
  150. package/dist/elements/project/ProjectRunner.d.ts.map +1 -1
  151. package/dist/elements/project/ProjectRunner.js +1 -4
  152. package/dist/elements/project/ProjectRunner.js.map +1 -1
  153. package/dist/elements/schema-design/AssociationFormElement.d.ts +0 -1
  154. package/dist/elements/schema-design/AssociationFormElement.d.ts.map +1 -1
  155. package/dist/elements/schema-design/AssociationFormElement.js +2 -5
  156. package/dist/elements/schema-design/AssociationFormElement.js.map +1 -1
  157. package/dist/elements/schema-design/DataEntityEditorElement.d.ts +2 -2
  158. package/dist/elements/schema-design/DataEntityEditorElement.d.ts.map +1 -1
  159. package/dist/elements/schema-design/DataEntityEditorElement.js +5 -5
  160. package/dist/elements/schema-design/DataEntityEditorElement.js.map +1 -1
  161. package/dist/elements/schema-design/DataSchemaDocument.d.ts +0 -1
  162. package/dist/elements/schema-design/DataSchemaDocument.d.ts.map +1 -1
  163. package/dist/elements/schema-design/DataSchemaDocument.js +4 -7
  164. package/dist/elements/schema-design/DataSchemaDocument.js.map +1 -1
  165. package/dist/elements/schema-design/EntityFormElement.d.ts +0 -1
  166. package/dist/elements/schema-design/EntityFormElement.d.ts.map +1 -1
  167. package/dist/elements/schema-design/EntityFormElement.js +4 -7
  168. package/dist/elements/schema-design/EntityFormElement.js.map +1 -1
  169. package/dist/elements/schema-design/PropertyFormElement.d.ts +1 -2
  170. package/dist/elements/schema-design/PropertyFormElement.d.ts.map +1 -1
  171. package/dist/elements/schema-design/PropertyFormElement.js +8 -11
  172. package/dist/elements/schema-design/PropertyFormElement.js.map +1 -1
  173. package/dist/pages/ApplicationScreen.d.ts +1 -1
  174. package/dist/pages/ApplicationScreen.d.ts.map +1 -1
  175. package/dist/pages/ApplicationScreen.js +1 -1
  176. package/dist/pages/ApplicationScreen.js.map +1 -1
  177. package/dist/pages/api-client/ApiClient.styles.d.ts.map +1 -1
  178. package/dist/pages/api-client/ApiClient.styles.js +22 -3
  179. package/dist/pages/api-client/ApiClient.styles.js.map +1 -1
  180. package/dist/pages/api-client/Authenticate.screen.d.ts +2 -0
  181. package/dist/pages/api-client/Authenticate.screen.d.ts.map +1 -1
  182. package/dist/pages/api-client/Authenticate.screen.js +19 -3
  183. package/dist/pages/api-client/Authenticate.screen.js.map +1 -1
  184. package/dist/pages/api-client/StoreConfig.screen.d.ts.map +1 -1
  185. package/dist/pages/api-client/StoreConfig.screen.js +4 -2
  186. package/dist/pages/api-client/StoreConfig.screen.js.map +1 -1
  187. package/dist/pages/api-client/StoreConfig.styles.d.ts.map +1 -1
  188. package/dist/pages/api-client/StoreConfig.styles.js +5 -0
  189. package/dist/pages/api-client/StoreConfig.styles.js.map +1 -1
  190. package/dist/pages/api-client/pages/Files.page.d.ts +1 -0
  191. package/dist/pages/api-client/pages/Files.page.d.ts.map +1 -1
  192. package/dist/pages/api-client/pages/Files.page.js +2 -1
  193. package/dist/pages/api-client/pages/Files.page.js.map +1 -1
  194. package/dist/pages/http-project/HttpProject.screen.d.ts +0 -8
  195. package/dist/pages/http-project/HttpProject.screen.d.ts.map +1 -1
  196. package/dist/pages/http-project/HttpProject.screen.js +14 -15
  197. package/dist/pages/http-project/HttpProject.screen.js.map +1 -1
  198. package/dist/pages/http-project/types.d.ts +8 -6
  199. package/dist/pages/http-project/types.d.ts.map +1 -1
  200. package/dist/pages/http-project/types.js.map +1 -1
  201. package/dist/styles/m3/surface.module.d.ts.map +1 -1
  202. package/dist/styles/m3/surface.module.js +11 -27
  203. package/dist/styles/m3/surface.module.js.map +1 -1
  204. package/dist/ui/UiElement.d.ts +4 -0
  205. package/dist/ui/UiElement.d.ts.map +1 -1
  206. package/dist/ui/UiElement.js +6 -0
  207. package/dist/ui/UiElement.js.map +1 -1
  208. package/dist/ui/button/SegmentedButton.styles.d.ts.map +1 -1
  209. package/dist/ui/button/SegmentedButton.styles.js +3 -1
  210. package/dist/ui/button/SegmentedButton.styles.js.map +1 -1
  211. package/dist/ui/dialog/UiDialog.d.ts +3 -0
  212. package/dist/ui/dialog/UiDialog.d.ts.map +1 -1
  213. package/dist/ui/dialog/UiDialog.js +3 -0
  214. package/dist/ui/dialog/UiDialog.js.map +1 -1
  215. package/dist/ui/effects/ripple.d.ts.map +1 -1
  216. package/dist/ui/effects/ripple.js +5 -1
  217. package/dist/ui/effects/ripple.js.map +1 -1
  218. package/dist/ui/icons/Icons.d.ts +3 -2
  219. package/dist/ui/icons/Icons.d.ts.map +1 -1
  220. package/dist/ui/icons/Icons.js +2 -1
  221. package/dist/ui/icons/Icons.js.map +1 -1
  222. package/dist/ui/input/CheckedElement.d.ts +1 -1
  223. package/dist/ui/input/CheckedElement.d.ts.map +1 -1
  224. package/dist/ui/input/CheckedElement.js +3 -3
  225. package/dist/ui/input/CheckedElement.js.map +1 -1
  226. package/dist/ui/input/Input.js +1 -1
  227. package/dist/ui/input/Input.js.map +1 -1
  228. package/dist/ui/list/{DividerElement.d.ts → UiDivider.element.d.ts} +6 -6
  229. package/dist/ui/list/UiDivider.element.d.ts.map +1 -0
  230. package/dist/ui/list/UiDivider.element.js +39 -0
  231. package/dist/ui/list/UiDivider.element.js.map +1 -0
  232. package/dist/ui/list/UiDivider.styles.d.ts +3 -0
  233. package/dist/ui/list/UiDivider.styles.d.ts.map +1 -0
  234. package/dist/ui/list/UiDivider.styles.js +49 -0
  235. package/dist/ui/list/UiDivider.styles.js.map +1 -0
  236. package/dist/ui/tabs/UiTabs.d.ts +13 -1
  237. package/dist/ui/tabs/UiTabs.d.ts.map +1 -1
  238. package/dist/ui/tabs/UiTabs.js +42 -13
  239. package/dist/ui/tabs/UiTabs.js.map +1 -1
  240. package/package.json +1 -1
  241. package/src/define/dialog/delete-cookie-action-dialog.ts +16 -0
  242. package/src/define/dialog/set-cookie-action-dialog.ts +16 -0
  243. package/src/define/http/http-assertions.ts +3 -3
  244. package/src/define/http/http-flows.ts +15 -0
  245. package/src/define/ui/ui-divider.ts +7 -2
  246. package/src/elements/ApiElement.ts +7 -0
  247. package/src/elements/amf/ApiAuthorizationEditor.element.ts +1 -1
  248. package/src/elements/amf/ApiOperationDocument.element.ts +2 -1
  249. package/src/elements/amf/ApiRequest.element.ts +1 -1
  250. package/src/elements/amf/ApiRequestEditor.element.ts +0 -4
  251. package/src/elements/authorization/ui/Authorization.ts +3 -5
  252. package/src/elements/dialog/DeleteCookieAction.element.ts +100 -0
  253. package/src/elements/dialog/DeleteCookieAction.styles.ts +14 -0
  254. package/src/elements/dialog/Rename.ts +8 -7
  255. package/src/elements/dialog/SetCookieAction.element.ts +183 -0
  256. package/src/elements/environment/EnvironmentEditor.styles.ts +5 -0
  257. package/src/elements/environment/EnvironmentEditor.ts +81 -22
  258. package/src/elements/environment/ServerEditor.ts +4 -8
  259. package/src/elements/environment/VariablesEditor.ts +3 -7
  260. package/src/elements/highlight/Prism.styles.ts +12 -5
  261. package/src/elements/http/BodyEditor.ts +10 -17
  262. package/src/elements/http/BodyMultipartEditor.ts +3 -20
  263. package/src/elements/http/BodyTextEditor.ts +0 -4
  264. package/src/elements/http/BodyUrlEncodedEditor.ts +5 -8
  265. package/src/elements/http/HeadersForm.ts +2 -9
  266. package/src/elements/http/HttpAssertions.element.ts +286 -0
  267. package/src/elements/http/HttpAssertions.styles.ts +7 -156
  268. package/src/elements/http/HttpFlows.common.ts +181 -0
  269. package/src/elements/http/HttpFlows.element.ts +722 -0
  270. package/src/elements/http/HttpFlows.styles.ts +29 -0
  271. package/src/elements/http/HttpFlowsUi.ts +1327 -0
  272. package/src/elements/http/RequestConfigElement.ts +10 -14
  273. package/src/elements/http/RequestEditor.ts +77 -35
  274. package/src/elements/http/UrlInput.ts +6 -6
  275. package/src/elements/http/UrlParamsForm.ts +2 -6
  276. package/src/elements/layout/SplitView.styles.ts +1 -0
  277. package/src/elements/navigation/AppNavigationItem.styles.ts +2 -0
  278. package/src/elements/project/HttpProjectRequest.ts +16 -5
  279. package/src/elements/project/ProjectRunner.ts +3 -7
  280. package/src/elements/schema-design/AssociationFormElement.ts +4 -8
  281. package/src/elements/schema-design/DataEntityEditorElement.ts +8 -8
  282. package/src/elements/schema-design/DataSchemaDocument.ts +5 -9
  283. package/src/elements/schema-design/EntityFormElement.ts +6 -10
  284. package/src/elements/schema-design/PropertyFormElement.ts +11 -15
  285. package/src/pages/ApplicationScreen.ts +1 -1
  286. package/src/pages/api-client/ApiClient.styles.ts +22 -3
  287. package/src/pages/api-client/Authenticate.screen.ts +19 -3
  288. package/src/pages/api-client/StoreConfig.screen.ts +4 -2
  289. package/src/pages/api-client/StoreConfig.styles.ts +5 -0
  290. package/src/pages/api-client/pages/Files.page.ts +2 -1
  291. package/src/pages/http-project/HttpProject.screen.ts +14 -26
  292. package/src/pages/http-project/types.ts +8 -6
  293. package/src/styles/m3/surface.module.ts +11 -27
  294. package/src/styles/m3/theme.css +36 -0
  295. package/src/styles/m3/tokens.css +11 -0
  296. package/src/ui/UiElement.ts +7 -0
  297. package/src/ui/button/SegmentedButton.styles.ts +3 -1
  298. package/src/ui/dialog/UiDialog.ts +3 -0
  299. package/src/ui/effects/ripple.ts +6 -1
  300. package/src/ui/icons/Icons.ts +3 -2
  301. package/src/ui/input/CheckedElement.ts +3 -3
  302. package/src/ui/input/Input.ts +1 -1
  303. package/src/ui/list/UiDivider.element.ts +41 -0
  304. package/src/ui/list/UiDivider.styles.ts +49 -0
  305. package/src/ui/tabs/UiTabs.ts +55 -13
  306. package/test/amf/authorization/OAuth2Method.test.ts +1 -1
  307. package/test/elements/http/HttpAssertions.test.ts +5 -6
  308. package/test/elements/http/HttpFlows.test.ts +485 -0
  309. package/dist/elements/http/HttpAssertions.d.ts +0 -114
  310. package/dist/elements/http/HttpAssertions.d.ts.map +0 -1
  311. package/dist/elements/http/HttpAssertions.js +0 -1146
  312. package/dist/elements/http/HttpAssertions.js.map +0 -1
  313. package/dist/elements/http/internals.d.ts +0 -150
  314. package/dist/elements/http/internals.d.ts.map +0 -1
  315. package/dist/elements/http/internals.js +0 -150
  316. package/dist/elements/http/internals.js.map +0 -1
  317. package/dist/ui/list/DividerElement.d.ts.map +0 -1
  318. package/dist/ui/list/DividerElement.js +0 -82
  319. package/dist/ui/list/DividerElement.js.map +0 -1
  320. package/src/elements/http/HttpAssertions.ts +0 -1187
  321. package/src/elements/http/internals.ts +0 -151
  322. package/src/http-client/docs/Files.md +0 -28
  323. package/src/ui/list/DividerElement.ts +0 -84
@@ -1 +1 @@
1
- {"version":3,"file":"ApiRequestEditor.element.js","sourceRoot":"","sources":["../../../src/elements/amf/ApiRequestEditor.element.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OA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IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDAAqB;AAShD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAGzC;AA6CQ;IAAR,KAAK,EAAE;wDAAqC;AAWjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAE1B","sourcesContent":["import { html, nothing, TemplateResult } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { \n uuidV4, \n Headers, \n ApiDefinitions, \n AmfShapes, \n EventUtils, \n Events as CoreEvents,\n Request,\n IRequest,\n IRequestProxyInit,\n HttpRequestKind,\n IProxyResult,\n IRequestLog,\n} from '@api-client/core/build/browser.js';\nimport { ensureContentType, generateHeaders } from \"../../amf/lib/Utils.js\";\nimport { cachePayloadValue, getPayloadValue, PayloadInfo, readCachePayloadValue } from \"../../amf/lib/PayloadUtils.js\";\nimport { applyUrlParameters, applyUrlVariables, computeEndpointUri, applyQueryParamStringToObject } from '../../amf/lib/UrlUtils.js';\nimport { AmfInputParser } from '../../amf/lib/AmfInputParser.js';\nimport * as InputCache from '../../amf/lib/InputCache.js';\nimport { Events } from '../../events/amf/Events.js';\nimport { EventTypes } from '../../events/amf/EventTypes.js';\nimport { EventTypes as UiEventTypes } from '../../events/EventTypes.js';\nimport { OperationParameter, PopulationInfo, SecuritySelectorListItem, ServerType } from '../../amf/types.js';\nimport { Oauth2Credentials } from '../authorization/types.js';\nimport BodyTextEditor from '../http/BodyTextEditor.js';\nimport BodyUrlEncodedEditor from '../http/BodyUrlEncodedEditor.js';\nimport { ifProperty } from '../../directives/if-property.js';\nimport ApiElement from '../ApiElement.js';\nimport type Input from '../../ui/input/Input.js';\nimport type RadioElement from '../../ui/input/RadioElement.js';\nimport { AmfParameters } from '../../amf/lib/AmfParameters.js';\nimport { UiDropdownListSelection } from '../../ui/list/UiDropdownList.js';\nimport { AmfSecurity } from '../../amf/lib/AmfSecurity.js';\nimport { SnackNotifications } from '../../ui/notification/SnackNotifications.js';\nimport '../../define/amf/api-authorization-editor.js';\nimport '../../define/amf/api-server-picker.js';\nimport '../../define/http/http-body-urlencoded-editor.js';\nimport '../../define/http/http-body-multipart-editor.js';\nimport '../../define/http/http-body-text-editor.js';\nimport '../../define/ui/ui-icon.js';\nimport '../../define/ui/ui-text-field.js';\nimport '../../define/ui/ui-switch.js';\nimport '../../define/ui/ui-button.js';\nimport '../../define/ui/ui-dropdown-list.js';\nimport '../../define/ui/ui-list.js';\nimport '../../define/ui/ui-list-item.js';\nimport '../../define/ui/ui-progress.js';\n\nexport const EventCategory = 'API Request editor';\n\n/**\n * @fires amfstoreopget - Dispatched when querying for an operation data\n * @fires amfstoreopgetparent - Dispatched when querying for an operation data for an endpoint\n * @fires amfstoreendpointget - Dispatched when querying for an endpoint data\n * @fires apistoreserverquery - Dispatched when querying for API servers\n * @fires amfstoreapiprotocols - Dispatched when querying for API protocols\n * @fires amfstoreapiversion - Dispatched when querying for API version\n * @fires response - Dispatched when the response was received by the editor.\n */\nexport default class ApiRequestEditor extends ApiElement {\n /** \n * The currently selected media type for the payloads.\n * @attribute\n */\n @property({ type: String, reflect: true, }) mimeType?: string;\n\n /**\n * When set it renders a label with the computed URL.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) urlLabel?: boolean;\n\n /**\n * When set it renders the URL input above the URL parameters.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) urlEditor?: boolean;\n\n /**\n * If set it computes `hasOptional` property and shows checkbox in the\n * form to show / hide optional properties.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) allowHideOptional?: boolean;\n\n /**\n * When set, renders \"add custom\" item button.\n * If the element is to be used without AMF model this should always\n * be enabled. Otherwise users won't be able to add a parameter.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) allowCustom?: boolean;\n\n /**\n * OAuth2 redirect URI.\n * This value **must** be set in order for OAuth 1/2 to work properly.\n * @attribute\n */\n @property({ type: String }) redirectUri?: string;\n\n /**\n * Final request URL including settings like `baseUri`, AMF\n * model settings and user provided parameters.\n * @attribute\n */\n @property({ type: String }) url?: string;\n\n /**\n * Holds the value of the currently selected server\n * Data type: URI\n * @attribute\n */\n @property({ type: String }) serverValue?: string;\n\n /**\n * Holds the type of the currently selected server\n * Values: `server` | `uri` | `custom`\n * @attribute\n */\n @property({ type: String }) serverType?: string;\n\n /**\n * Optional property to set\n * If true, the server selector is not rendered\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) noServerSelector?: boolean;\n\n /**\n * Optional property to set\n * If true, the server selector custom base URI option is rendered\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) allowCustomBaseUri?: boolean;\n \n /**\n * List of credentials source\n */\n @property({ type: Array }) credentialsSource?: Oauth2Credentials[];\n\n /** \n * The domain id key of the selected security\n * @attribute\n */\n @property({ type: String }) selectedSecurity?: string;\n\n /** \n * Optional. The parent endpoint id. When set it uses this value to query for the endpoint\n * instead of querying for a parent through the operation id.\n * Also, when `endpoint` is set and the `endpointId` match then it ignores querying for \n * the endpoint.\n * @attribute\n */\n @property({ type: String }) endpointId?: string;\n\n protected domainIdValue: string | undefined;\n\n /**\n * The domain id (AMF id) of the rendered operation.\n * @attribute\n */\n @property({ type: String, reflect: true })\n get domainId(): string | undefined {\n return this.domainIdValue;\n }\n\n set domainId(value: string | undefined) {\n const old = this.domainIdValue;\n /* istanbul ignore if */\n if (old === value) {\n return;\n }\n this.domainIdValue = value;\n this.requestUpdate('domainId', old);\n this.processDebounce();\n }\n\n protected endpointValue: ApiDefinitions.IApiEndPoint | undefined;\n\n\n get endpoint(): ApiDefinitions.IApiEndPoint | undefined {\n return this.endpointValue;\n }\n\n set endpoint(value: ApiDefinitions.IApiEndPoint | undefined) {\n const old = this.endpointValue;\n if (old === value) {\n return;\n }\n this.endpointValue = value;\n this.requestUpdate();\n this.readUrlData();\n this.notifyChange();\n }\n\n /**\n * The HTTP method name.\n */\n get httpMethod(): string | undefined {\n const op = this.operationValue;\n if (!op) {\n return undefined;\n }\n return op.method;\n }\n\n /**\n * A flag set when the request is being made.\n */\n @state() loadingRequest: boolean | undefined;\n\n protected baseUriValue: string | undefined;\n\n /**\n * A base URI for the API. To be set if RAML spec is missing `baseUri`\n * declaration and this produces invalid URL input. This information\n * is passed to the URL editor that prefixes the URL with `baseUri` value\n * if passed URL is a relative URL.\n * @attribute\n */\n @property({ type: String }) get baseUri(): string | undefined {\n return this.baseUriValue;\n }\n\n set baseUri(value: string | undefined) {\n const old = this.baseUriValue;\n if (old === value) {\n return;\n }\n this.baseUriValue = value;\n this.readUrlData();\n this.requestUpdate('baseUri', old);\n }\n\n protected serversValue: ApiDefinitions.IApiServer[] | undefined;\n\n /**\n * The computed list of servers.\n */\n get servers(): ApiDefinitions.IApiServer[] | undefined {\n return this.serversValue;\n }\n\n protected serverLocalValue: ApiDefinitions.IApiServer | undefined;\n\n get server(): ApiDefinitions.IApiServer | undefined {\n return this.serverLocalValue;\n }\n\n /**\n * This is the final computed value for the baseUri to propagate downwards\n * If baseUri is defined, return baseUri\n * Else, return the selectedServerValue if serverType is not `server`\n */\n get effectiveBaseUri(): string {\n if (this.baseUri) {\n return this.baseUri;\n }\n if (this.serverType !== 'server') {\n return this.serverValue as string;\n }\n return '';\n }\n\n /**\n * @return True when there is not enough servers to render the selector\n */\n get serverSelectorHidden(): boolean {\n const { serversCount = 0, noServerSelector = false, allowCustomBaseUri } = this;\n return noServerSelector || (!allowCustomBaseUri && serversCount < 2);\n }\n\n /** \n * The list of security list items to render.\n * An operation may have multiple security definition in an or/and fashion.\n * This allows to render the selector to pick the current security.\n */\n protected securityList: SecuritySelectorListItem[] | undefined;\n\n /**\n * The security requirement for the operation or undefined.\n */\n get security(): SecuritySelectorListItem[] | undefined {\n const items = this.securityList;\n if (Array.isArray(items) && items.length) {\n return items;\n }\n return undefined;\n }\n\n /**\n * The currently rendered payload, if any.\n */\n get payload(): ApiDefinitions.IApiPayload | undefined {\n const { payloads } = this;\n if (!payloads) {\n return undefined;\n }\n const { mimeType } = this;\n let payload: ApiDefinitions.IApiPayload | undefined;\n if (mimeType) {\n payload = payloads.find(i => i.mediaType === mimeType);\n }\n if (!payload) {\n [payload] = payloads;\n }\n return payload;\n }\n\n /**\n * The list of all possible payloads for this operation.\n */\n get payloads(): ApiDefinitions.IApiPayload[] | undefined {\n const operation = this.operationValue;\n if (!operation) {\n return undefined;\n }\n const { request } = operation;\n if (!request) {\n return undefined;\n }\n const { payloads } = request;\n if (!Array.isArray(payloads) || !payloads.length) {\n return undefined;\n }\n return payloads;\n }\n\n /**\n * @returns API defined base URI (current server + the endpoint)\n */\n get apiBaseUri(): string | undefined {\n const endpoint = this.endpointValue;\n const server = this.serverLocalValue;\n if (!server || !endpoint) {\n return undefined;\n }\n const { path = '' } = endpoint;\n let { url = '' } = server;\n if (url.endsWith('/')) {\n url = url.substr(0, url.length - 1);\n }\n return `${url}${path}`;\n }\n\n protected urlInvalidValue?: boolean;\n\n /**\n * True when the URL input is invalid.\n */\n get urlInvalid(): boolean | undefined {\n return this.urlInvalidValue;\n }\n\n protected protocolsValue: string[] | undefined;\n\n /**\n * The API's protocols.\n */\n get protocols(): string[] | undefined {\n return this.protocolsValue;\n }\n\n protected versionValue: string | undefined;\n\n /**\n * The API's version.\n */\n get version(): string | undefined {\n return this.versionValue;\n }\n\n queryDebouncerTimeout: number;\n\n /** \n * Set when the selection change, this is a JS object created form the \n * supportedOperation definition of the AMF graph.\n */\n protected operationValue?: ApiDefinitions.IApiOperation;\n\n /** \n * The list of parameter groups that are opened when `allowHideOptional` is set.\n */\n openedOptional: string[];\n\n protected debounceValue: unknown;\n\n protected urlSearchRegexpValue: RegExp | undefined;\n\n serversCount?: number;\n\n amfParameters: AmfParameters;\n\n /**\n * This is set while the HTTP request is being executed.\n * It allows to abort the request.\n */\n requestController?: AbortController;\n\n /**\n * @constructor\n */\n constructor() {\n super();\n /** \n * The timeout after which the `queryGraph()` function is called \n * in the debouncer.\n */\n this.queryDebouncerTimeout = 1;\n this.authRedirectChangedHandler = this.authRedirectChangedHandler.bind(this);\n this.populateAnnotatedFieldsHandler = this.populateAnnotatedFieldsHandler.bind(this);\n \n this.openedOptional = [];\n this.amfParameters = new AmfParameters(this);\n this.amfParameters.addEventListener('render', () => this.requestUpdate());\n this.amfParameters.addEventListener('change', () => this.notifyChange());\n this.amfParameters.addEventListener('paramchange', this.paramChangeHandler.bind(this) as EventListener);\n InputCache.registerLocal(this);\n this.graphChangeHandler = this.graphChangeHandler.bind(this);\n this.addEventListener(UiEventTypes.Http.Request.send, this.internalSendHandler.bind(this));\n }\n\n notifyChange(): void {\n this.dispatchEvent(new Event('change'));\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.processDebounce();\n this.amfParameters.globalCache = true;\n const node = this.eventsTarget;\n node.addEventListener(EventTypes.Store.graphChange, this.graphChangeHandler);\n node.addEventListener(EventTypes.Request.redirectUriChange, this.authRedirectChangedHandler as EventListener);\n node.addEventListener(EventTypes.Request.populateAnnotatedFields, this.populateAnnotatedFieldsHandler as EventListener);\n \n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n if (this.debounceValue) {\n clearTimeout(this.debounceValue as number);\n this.debounceValue = undefined;\n }\n const node = this.eventsTarget;\n node.removeEventListener(EventTypes.Store.graphChange, this.graphChangeHandler);\n node.removeEventListener(EventTypes.Request.redirectUriChange, this.authRedirectChangedHandler as EventListener);\n node.removeEventListener(EventTypes.Request.populateAnnotatedFields, this.populateAnnotatedFieldsHandler as EventListener);\n }\n\n /**\n * Handler for the event dispatched by the store when the graph model change.\n */\n protected graphChangeHandler(): void {\n this.processDebounce()\n }\n\n /**\n * Calls the `queryGraph()` function in a debouncer.\n */\n protected processDebounce(): void {\n if (this.debounceValue) {\n clearTimeout(this.debounceValue as number);\n }\n this.debounceValue = setTimeout(() => {\n this.debounceValue = undefined;\n this.processGraph();\n }, this.queryDebouncerTimeout);\n }\n\n /**\n * Reads the URL data from the ApiUrlDataModel library and sets local variables.\n */\n readUrlData(): void {\n this.updateServerParameters();\n this.orderPathParameters()\n this.computeUrlValue();\n }\n\n /**\n * It makes sure that the path parameters are rendered in order (server, endpoint) and in order of occurrence in the URL. \n */\n protected orderPathParameters(): void {\n const params = this.getOrderedPathParams();\n if (!params || !params.length) {\n return;\n }\n const { amfParameters } = this;\n amfParameters.parametersValue = amfParameters.parametersValue.filter(item => item.binding !== 'path');\n amfParameters.parametersValue = amfParameters.parametersValue.concat(params);\n }\n\n protected paramChangeHandler(e: CustomEvent<string>): void {\n this.paramChanged(e.detail);\n }\n\n /**\n * A function to be overwritten by child classes to execute an action when a parameter has changed.\n */\n protected paramChanged(key: string): void {\n this.computeUrlValue();\n this.validateUrl();\n const { amfParameters } = this;\n const param = amfParameters.parametersValue.find(p => p.paramId === key);\n if (param && param.binding === 'header' && (param.parameter.name || '').toLocaleLowerCase() === 'content-type') {\n const value = InputCache.get(this, param.paramId, true) as string;\n this.mimeType = value;\n }\n }\n\n /**\n * Computes the URL value for the current serves, selected server, and endpoint's path.\n */\n protected computeUrlValue(): void {\n const { effectiveBaseUri, server, protocols, version } = this;\n const endpoint = this.endpointValue;\n const result = computeEndpointUri({\n baseUri: effectiveBaseUri,\n server,\n endpoint,\n protocols,\n version,\n forceHttpProtocol: true,\n });\n const { amfParameters } = this;\n const params = amfParameters.parametersValue.map(p => p.parameter);\n const report = AmfInputParser.reportRequestInputs(params, InputCache.getStore(this, true), amfParameters.nilValues);\n let url = applyUrlVariables(result, report.path, true);\n url = applyUrlParameters(url, report.query, true);\n this.url = url;\n }\n\n /**\n * Checks if the current server has variables and update the parameters array\n */\n protected updateServerParameters(): void {\n const { server } = this;\n const source = 'server';\n const { amfParameters } = this;\n // clears previously set request parameters related to server configuration.\n amfParameters.parametersValue = amfParameters.parametersValue.filter(item => item.source !== source);\n if (!server || ['custom', 'uri'].includes(this.serverType || '')) {\n // we don't need to compute server variables for a custom URLs.\n return;\n }\n if (Array.isArray(server.variables) && server.variables.length) {\n server.variables.forEach((param) => {\n const item: OperationParameter = {\n binding: param.binding || '',\n paramId: param.id,\n parameter: param,\n source,\n };\n if (param.schema) {\n item.schema = param.schema;\n item.schemaId = param.schema.id;\n }\n amfParameters.parametersValue.push(item);\n });\n }\n }\n\n /**\n * Checks if the current endpoint has variables and requests them when needed.\n */\n protected updateEndpointParameters(): void {\n const source = 'endpoint';\n const { amfParameters } = this;\n // clears previously set request parameters related to server configuration.\n amfParameters.parametersValue = amfParameters.parametersValue.filter(item => item.source !== source);\n const endpoint = this.endpointValue;\n if (!endpoint) {\n // we don't need to compute endpoint variables for a custom URLs.\n return;\n }\n if (Array.isArray(endpoint.parameters) && endpoint.parameters.length) {\n endpoint.parameters.forEach((param) => {\n const item: OperationParameter = {\n binding: param.binding || '',\n paramId: param.id,\n parameter: param,\n source,\n };\n if (param.schema) {\n item.schema = param.schema;\n item.schemaId = param.schema.id;\n }\n amfParameters.parametersValue.push(item);\n });\n }\n }\n\n reset(): void {\n this.securityList = undefined;\n this.mimeType = undefined;\n this.amfParameters.parametersValue = [];\n }\n\n /**\n * Processes the selection of the domain id for an operation.\n */\n async processGraph(): Promise<void> {\n await this.queryEndpoint();\n await this.queryOperation();\n await this.queryServers();\n await this.queryProtocols();\n this.processEndpoint();\n this.processOperation();\n this.processSecurity();\n this.processPayload();\n this.computeUrlValue();\n this.readUrlData();\n this.notifyChange();\n }\n\n /**\n * Queries the store for the operation data, when needed.\n */\n async queryOperation(): Promise<void> {\n const { domainId } = this;\n if (!domainId || domainId === 'undefined') {\n // this.operationValue = undefined;\n return;\n }\n if (this.operationValue && this.operationValue.id === domainId) {\n // in case the operation model was provided via the property setter.\n return;\n }\n try {\n const endpointId = this.endpointValue && this.endpointValue.id;\n const info = await Events.Operation.get(this, domainId, endpointId);\n this.operationValue = info;\n } catch (e) {\n const ex = e as Error;\n Events.Telemetry.exception(this, ex.message, false);\n Events.Reporting.error(this, ex, `Unable to query for API operation data: ${ex.message}`, this.localName);\n }\n }\n\n /**\n * Queries the store for the endpoint data.\n * @returns {Promise<void>}\n */\n async queryEndpoint(): Promise<void> {\n const { domainId, endpointId } = this;\n if (!domainId || domainId === 'undefined') {\n // this.endpointValue = undefined;\n return;\n }\n if (this.endpointValue && this.endpointValue.id === endpointId) {\n // in case the endpoint model was provided via the property setter.\n return;\n }\n this.endpointValue = undefined;\n try {\n const info = await (endpointId ? Events.Endpoint.get(this, endpointId) : Events.Operation.getParent(this, domainId));\n this.endpointValue = info;\n } catch (e) {\n const ex = e as Error;\n Events.Telemetry.exception(this, ex.message, false);\n Events.Reporting.error(this, ex, `Unable to query for API endpoint data: ${ex.message}`, this.localName);\n }\n }\n\n /**\n * Queries for the current servers value.\n */\n async queryServers(): Promise<void> {\n const { domainId } = this;\n const endpointId = this.endpointValue && this.endpointValue.id;\n try {\n const info = await Events.Server.query(this, {\n endpointId,\n methodId: domainId,\n });\n this.serversValue = info || undefined;\n } catch (e) {\n const ex = e as Error;\n this.serversValue = undefined;\n Events.Telemetry.exception(this, ex.message, false);\n Events.Reporting.error(this, ex, `Unable to query for API servers: ${ex.message}`, this.localName);\n }\n }\n\n /**\n * Queries the API store for the API protocols list.\n */\n async queryProtocols(): Promise<void> {\n this.protocolsValue = undefined;\n try {\n const info = await Events.Api.protocols(this);\n this.protocolsValue = info;\n } catch (e) {\n const ex = e as Error;\n Events.Telemetry.exception(this, ex.message, false);\n Events.Reporting.error(this, ex, `Unable to query for API protocols list: ${ex.message}`, this.localName);\n }\n }\n\n /**\n * Searches for the current operation endpoint and sets variables from the endpoint definition.\n */\n protected processEndpoint(): void {\n this.updateEndpointParameters();\n this.computeUrlRegexp();\n }\n\n /**\n * Collects operations input parameters into a single object.\n */\n protected processOperation(): void {\n const source = 'request';\n const operation = this.operationValue;\n const { amfParameters } = this;\n // clears previously set request parameters (query, path, headers)\n amfParameters.parametersValue = amfParameters.parametersValue.filter(item => item.source !== source);\n if (!operation) {\n return;\n }\n const { request } = operation;\n if (!request) {\n return;\n }\n const uri: ApiDefinitions.IApiParameter[] = [];\n if (Array.isArray(request.uriParameters)) {\n // OAS has this weird thing where you can define URI parameters on the endpoint and the operation.\n // this eliminates the duplicates and merges the schemas\n request.uriParameters.forEach((param) => {\n if (!param.paramName) {\n uri.push(param);\n return;\n }\n const index = amfParameters.parametersValue.findIndex(p => p.binding === 'path' && p.parameter.paramName === param.paramName);\n if (index !== -1) {\n // remove the parameter that is being replaced by the local definition\n amfParameters.parametersValue.splice(index, 1);\n }\n uri.push(param);\n });\n }\n this.appendToParams(uri, source);\n this.appendToParams(request.queryParameters, source);\n this.appendToParams(request.headers, source);\n this.appendToParams(request.cookieParameters, source);\n }\n\n /**\n * Processes security information for the UI.\n */\n protected processSecurity(): void {\n const operation = this.operationValue;\n if (!operation) {\n return;\n }\n const { security } = operation;\n this.securityList = AmfSecurity.readSecurityList(security);\n const [first] = this.securityList;\n this.selectedSecurity = first ? first.security.id : undefined;\n }\n\n /**\n * Makes sure the correct mime type is selected for the current selection.\n */\n protected processPayload(): void {\n const operation = this.operationValue;\n if (!operation) {\n return;\n }\n const { request } = operation;\n if (!request) {\n return;\n }\n const { payloads = [] } = request;\n if (!payloads.length) {\n return;\n }\n let mime = this.mimeType;\n \n if (mime) {\n const has = payloads.find(p => p.mediaType === mime);\n if (!has) {\n mime = undefined;\n }\n }\n if (!mime) {\n const first = payloads.find(p => p.mediaType);\n if (first) {\n mime = first.mediaType;\n }\n }\n this.mimeType = mime;\n }\n\n /**\n * Appends a list of parameters to the list of rendered parameters\n */\n protected appendToParams(list: ApiDefinitions.IApiParameter[], source: string): void {\n const params = this.amfParameters.parametersValue;\n if (Array.isArray(list)) {\n list.forEach((param) => {\n params.push({\n paramId: param.id,\n parameter: param,\n binding: param.binding || '',\n source,\n schema: param.schema,\n schemaId: param.schema && param.schema.id ? param.schema.id : undefined,\n });\n });\n }\n }\n\n /**\n * A handler for the change event dispatched by the `raw` editor.\n */\n protected rawBodyChangeHandler(e: Event): void {\n const editor = e.target as BodyTextEditor;\n const { value, dataset } = editor;\n const { payloadId } = dataset;\n if (!payloadId) {\n return;\n }\n cachePayloadValue(payloadId, value as string);\n }\n\n /**\n * A handler for the change event dispatched by the \n * `urlEncode` editor.\n * Updated the local value, model, and notifies the change.\n */\n protected modelBodyEditorChangeHandler(e: Event): void {\n const editor = e.target as BodyUrlEncodedEditor;\n const { value, model, dataset } = editor;\n const { payloadId } = dataset;\n if (!payloadId) {\n return;\n }\n cachePayloadValue(payloadId, value as string, model);\n }\n\n protected handleAuthSelect(e: CustomEvent<UiDropdownListSelection>): void {\n const { item } = e.detail;\n const { id } = item.dataset;\n if (!id) {\n return;\n }\n this.selectedSecurity = id;\n this.requestUpdate();\n }\n\n /**\n * Handles send button click.\n * Depending on authorization validity it either sends the\n * request or forces authorization and sends the request.\n */\n protected sendHandler(): void {\n this.execute();\n }\n\n /**\n * To be called when the user want to execute the request but\n * authorization is invalid (missing values).\n * This function brings the auth panel to front and displays error toast\n */\n async authAndExecute(): Promise<void> {\n const { shadowRoot } = this;\n if (!shadowRoot) {\n throw new Error(`Invalid state. The element is not initialized.`);\n }\n\n const panel = shadowRoot.querySelector('api-authorization-editor');\n if (!panel) {\n throw new Error(`Invalid state. The authorization editor element was removed from the DOM.`);\n }\n await panel.authorize();\n const valid = panel.validate();\n if (valid) {\n this.execute();\n }\n }\n\n protected async proxyRequest(init: IRequestProxyInit): Promise<IProxyResult<IRequestLog> | undefined> {\n let result: IProxyResult<IRequestLog> | undefined;\n try {\n result = await CoreEvents.Transport.Core.request(init, this);\n } catch (e) {\n // ...\n }\n return result;\n }\n\n /**\n * Proxies the request to the endpoint using the core libraries.\n */\n async execute(): Promise<void> {\n if (this.loadingRequest) {\n this.abort();\n }\n Events.Telemetry.event(this, {\n category: EventCategory,\n action: 'request-execute',\n label: 'true'\n });\n const request = await this.serialize();\n const ctrl = new AbortController();\n this.requestController = ctrl;\n const init: IRequestProxyInit = {\n kind: HttpRequestKind,\n request: request.expects,\n authorization: request.authorization,\n signal: ctrl.signal,\n };\n this.loadingRequest = true;\n const result = await this.proxyRequest(init);\n this.loadingRequest = false;\n if (!result) {\n if (ctrl.signal.aborted) {\n return;\n }\n const message = `The request was not sent. Proxy not available.`;\n SnackNotifications.notify(message, { timeout: 2000, close: true });\n throw new Error(message);\n }\n this.dispatchEvent(new CustomEvent<IRequestLog>('response', { detail: result.result }));\n }\n\n /**\n * Uses the `requestController` to abort the ongoing HTTP request.\n */\n abort(): void {\n Events.Telemetry.event(this, {\n category: EventCategory,\n action: 'request-abort',\n label: 'true'\n });\n const { requestController } = this;\n if (!requestController) {\n return;\n }\n requestController.abort();\n this.requestController = undefined;\n this.loadingRequest = false;\n }\n\n /**\n * Event handler for abort click.\n */\n protected abortHandler(): void {\n this.abort();\n }\n\n /**\n * Serializes the state of the request editor into the `ApiConsoleRequest` object.\n */\n async serialize(): Promise<IRequest> {\n const op = this.operationValue;\n if (!op) {\n throw new Error(`No API operation defined on the editor`);\n }\n const method = (op.method || 'get').toUpperCase();\n const params: ApiDefinitions.IApiParameter[] = [];\n const { amfParameters } = this;\n amfParameters.parametersValue.forEach((item) => {\n const { parameter, enabled } = item;\n if (enabled === false) {\n return;\n }\n params.push(parameter);\n });\n const report = AmfInputParser.reportRequestInputs(params, InputCache.getStore(this, true), amfParameters.nilValues);\n const serverUrl = computeEndpointUri({\n baseUri: this.effectiveBaseUri,\n server: this.server,\n endpoint: this.endpointValue,\n protocols: this.protocols,\n forceHttpProtocol: true,\n });\n let url = applyUrlVariables(serverUrl, report.path, true);\n url = applyUrlParameters(url, report.query, true);\n const headers = generateHeaders(report.header);\n\n const instance = new Request();\n const expects = instance.getExpects();\n expects.method = method;\n expects.url = url;\n expects.headers = headers;\n \n if (!['GET', 'HEAD'].includes(method)) {\n let body: string | FormData | Blob | File | Buffer | ArrayBuffer | undefined;\n const { payload } = this;\n if (payload) {\n const info = readCachePayloadValue(payload.id);\n if (info && info.value) {\n body = info.value;\n }\n }\n if (body instanceof FormData) {\n const parser = new Headers(expects.headers);\n parser.delete('content-type');\n expects.headers = parser.toString();\n } else if (payload) {\n expects.headers = ensureContentType(expects.headers || '', payload.mediaType);\n }\n if (typeof body !== 'undefined') {\n await expects.writePayload(body);\n }\n }\n\n const result = instance.toJSON();\n\n const authElement = this.shadowRoot?.querySelector('api-authorization-editor');\n if (authElement) {\n const auth = authElement.serialize();\n result.authorization = auth;\n }\n return result;\n }\n\n /**\n * Handler for the `oauth2-redirect-uri-changed` custom event. Changes\n * the `redirectUri` property.\n */\n protected authRedirectChangedHandler(e: CustomEvent): void {\n this.redirectUri = e.detail.value;\n }\n\n /**\n * Handle event for populating annotated fields in the editor.\n */\n protected populateAnnotatedFieldsHandler(e: CustomEvent): void {\n const populationInfoArray: PopulationInfo[] = e.detail.values;\n const { parametersValue = [] } = this.amfParameters;\n const allAnnotated = parametersValue.filter(param => Array.isArray(param.parameter.customDomainProperties) && !!param.parameter.customDomainProperties.length);\n let update = false;\n populationInfoArray.forEach(({ annotationName, annotationValue, fieldValue }) => {\n allAnnotated.forEach((item) => {\n const { parameter, paramId } = item;\n const hasAnnotation = (parameter.customDomainProperties || []).some((prop) => prop.name === annotationName && (prop.extension as AmfShapes.IApiScalarNode).value === annotationValue);\n if (!hasAnnotation) {\n return;\n }\n InputCache.set(this, paramId, fieldValue, true);\n update = true;\n });\n });\n if (update) {\n this.requestUpdate();\n }\n /* @TODO populate values for the security schema. */\n }\n\n /**\n * Computes a current server value for selection made in the server selector.\n */\n protected updateServer(): void {\n const { serverValue, serverType, servers = [] } = this;\n if (serverType !== 'server') {\n this.serverLocalValue = undefined;\n } else {\n this.serverLocalValue = servers.find(server => server.url === serverValue);\n }\n this.readUrlData();\n this.computeUrlRegexp();\n }\n\n /**\n * Handler for the change dispatched from the server selector.\n */\n protected serverCountHandler(e: CustomEvent): void {\n const { value = 0 } = e.detail;\n this.serversCount = value;\n this.updateServer();\n this.requestUpdate();\n }\n\n /**\n * Handler for the change dispatched from the server selector.\n */\n protected serverHandler(e: CustomEvent): void {\n const { value, type } = e.detail;\n this.serverType = type;\n this.serverValue = value;\n this.updateServer();\n this.computeUrlRegexp();\n }\n\n /**\n * Computes a regexp for the base URI defined in the server to process URL input change\n * and set the `.urlSearchRegexpValue` value.\n * This should be computed only when a server and en endpoint change.\n */\n protected computeUrlRegexp(): void {\n const { effectiveBaseUri } = this;\n let value;\n if (effectiveBaseUri) {\n value = computeEndpointUri({\n baseUri: effectiveBaseUri,\n endpoint: this.endpointValue,\n forceHttpProtocol: true,\n });\n } else {\n value = this.apiBaseUri;\n }\n if (!value) {\n this.urlSearchRegexpValue = undefined;\n } else {\n value = value.replace('?', '\\\\?');\n value = value.replace(/(\\.|\\/)/g, '\\\\$1');\n value = value.replace(/{[\\w\\\\+]+}/g, '([a-zA-Z0-9\\\\$\\\\-_\\\\.~\\\\+!\\'\\\\(\\\\)\\\\*\\\\{\\\\}]+)');\n value += '.*';\n this.urlSearchRegexpValue = new RegExp(value);\n }\n }\n\n protected handleMediaTypeSelect(e: Event): void {\n const node = e.target as RadioElement;\n const { value } = node;\n this.mimeType = value;\n const ctParam = this.amfParameters.parametersValue.find(p => p.binding === 'header' && (p.parameter.name || '').toLocaleLowerCase() === 'content-type');\n if (ctParam) {\n InputCache.set(this, ctParam.paramId, value, true);\n }\n }\n\n protected async notifyResizeAfterUpdate(): Promise<void> {\n await this.updateComplete;\n this.dispatchEvent(new Event('resize', { bubbles: true, composed: true }));\n }\n\n /**\n * Toggles optional parameter groups.\n */\n protected handleOptionalToggle(e: Event): void {\n const node = e.target as HTMLElement;\n const { target } = node.dataset;\n if (!target) {\n return;\n }\n if (!Array.isArray(this.openedOptional)) {\n this.openedOptional = [];\n }\n if (this.openedOptional.includes(target)) {\n const index = this.openedOptional.indexOf(target);\n this.openedOptional.splice(index, 1);\n } else {\n this.openedOptional.push(target);\n }\n this.requestUpdate();\n this.notifyResizeAfterUpdate();\n }\n\n /**\n * When enabled it adds a new custom parameter to the request section defined in the source button.\n */\n protected addCustomHandler(e: Event): void {\n const button = e.currentTarget as HTMLElement;\n const { type } = button.dataset;\n if (!['query', 'header'].includes(type as string)) {\n return;\n }\n const id = uuidV4();\n const param: OperationParameter = {\n binding: type || '',\n source: 'custom',\n paramId: id,\n parameter: {\n id,\n required: true,\n binding: type,\n name: '',\n examples: [],\n payloads: [],\n customDomainProperties: [],\n types: [],\n },\n };\n this.amfParameters.parametersValue.push(param);\n this.requestUpdate();\n }\n\n /**\n * Updates path/query model from user input.\n *\n * @param e The change event\n */\n protected handleUrlEditorChange(e: Event): void {\n const { value } = e.target as Input;\n let matches;\n const uriRegexp = this.urlSearchRegexpValue;\n // parameters must be in order from server to the endpoint\n const pathParams = this.getOrderedPathParams();\n let changed = false;\n if (pathParams.length && uriRegexp) {\n matches = value.match(uriRegexp);\n if (matches) {\n matches.shift();\n changed = this.applyUriValues(matches, pathParams);\n }\n }\n const matchesNew = value.match(/[^&?]*?=[^&?]*/g);\n if (matchesNew) {\n const params: Record<string, string|string[]> = {};\n matchesNew.forEach((item) => applyQueryParamStringToObject(item, params));\n const qpChanged = this.applyQueryParamsValues(params);\n if (!changed) {\n changed = qpChanged;\n }\n }\n this.url = value;\n this.validateUrl();\n this.notifyChange();\n this.requestUpdate();\n }\n\n /**\n * Sets the value of `.urlInvalidValue` and therefore `urlInvalid` properties.\n */\n validateUrl(): void {\n this.urlInvalidValue = !this.readUrlValidity();\n this.requestUpdate();\n }\n\n /**\n * Validates the current URL value.\n * @returns True when the current URL is a valid URL.\n */\n protected readUrlValidity(): boolean {\n const { url } = this;\n if (!url) {\n return false;\n }\n if (typeof url !== 'string') {\n return false;\n }\n if (url.indexOf('{') !== -1 && url.indexOf('}') !== -1) {\n return false;\n }\n const { shadowRoot } = this;\n if (!shadowRoot) {\n return true;\n }\n const inputElement = shadowRoot.querySelector('.url-input') as Input;\n if (inputElement) {\n return inputElement.reportValidity();\n }\n return true;\n }\n\n /**\n * Reads the ordered list of path parameters from the server and the endpoint.\n */\n protected getOrderedPathParams(): OperationParameter[] {\n const result: OperationParameter[] = [];\n const { effectiveBaseUri } = this;\n let url;\n if (effectiveBaseUri) {\n url = computeEndpointUri({\n baseUri: effectiveBaseUri,\n endpoint: this.endpointValue,\n forceHttpProtocol: true,\n });\n } else {\n url = this.apiBaseUri;\n }\n if (!url) {\n return result;\n }\n const matches = url.match(/{[\\w\\\\+]+}/g);\n if (!matches) {\n return result;\n }\n const all = this.amfParameters.parametersValue;\n matches.forEach((tpl) => {\n const name = tpl.substr(1, tpl.length - 2);\n const param = all.find(p => p.binding === 'path' && p.parameter.name === name);\n if (param) {\n result.push(param);\n }\n });\n return result;\n }\n\n /**\n * Applies values from the `values` array to the uri parameters which names are in the `names` array.\n * Both lists are ordered list of parameters.\n *\n * @param values Values for the parameters\n * @param params List of path parameters.\n * @returns True when any parameter was changed.\n */\n protected applyUriValues(values: string[], params: OperationParameter[]): boolean {\n let changed = false;\n for (let i = 0, len = params.length; i < len; i++) {\n const value = values[i];\n if (value && value[0] === '{') {\n // This is still a variable\n continue;\n }\n const param = params[i];\n if (InputCache.get(this, param.paramId, true) !== value) {\n InputCache.set(this, param.paramId, value, true);\n changed = true;\n }\n }\n return changed;\n }\n\n /**\n * Applies query parameters values to the render list.\n *\n * @returns True when any parameter was changed.\n */\n protected applyQueryParamsValues(map: Record<string, string|string[]>): boolean {\n if (!map) {\n return false;\n }\n const keys = Object.keys(map);\n let changed = false;\n keys.forEach((key) => {\n const value = map[key];\n if (value && value[0] === '{') {\n // This is still a variable\n return;\n }\n const param = this.amfParameters.parametersValue.find(p => p.binding === 'query' && p.parameter.name === key);\n if (param) {\n if (InputCache.get(this, param.paramId, true) !== value) {\n InputCache.set(this, param.paramId, value, true);\n changed = true;\n }\n }\n });\n return changed;\n }\n\n protected internalSendHandler(e: Event): void {\n e.stopPropagation();\n this.execute();\n }\n\n /**\n * A handler for the change event on the authorization panel.\n */\n protected authorizationChangeHandler(): void {\n this.notifyChange();\n }\n\n override render(): TemplateResult {\n return html`\n <div class=\"content\">\n ${this.serverSelectorTemplate()}\n ${this.urlLabelTemplate()}\n ${this.renderUrlEditor()}\n ${this.parametersTemplate()}\n ${this.headersTemplate()}\n ${this.mediaTypeSelectorTemplate()}\n ${this.bodyTemplate()}\n ${this.authorizationTemplate()}\n ${this.formActionsTemplate()}\n </div>`;\n }\n\n /**\n * @return Template for the request URL label.\n */\n protected urlLabelTemplate(): TemplateResult | typeof nothing {\n const { urlLabel, url } = this;\n if (!urlLabel) {\n return nothing;\n }\n return html`<div class=\"url-label text-selectable\" title=\"Current request URL\">${url}</div>`;\n }\n\n protected authorizationTemplate(): TemplateResult | typeof nothing {\n const { security } = this;\n if (!security) {\n return nothing;\n }\n const { selectedSecurity, redirectUri, credentialsSource } = this;\n const rendered = security.find(i => i.security.id === selectedSecurity);\n if (!rendered) {\n return nothing;\n }\n return html`\n <section class=\"authorization params-section\">\n <div class=\"section-title\"><span class=\"label\">Credentials</span></div>\n ${security.length > 1 ? this.authorizationSelectorTemplate(security, rendered) : ''}\n <api-authorization-editor \n .security=\"${rendered.security}\"\n .oauth2RedirectUri=\"${redirectUri}\"\n .credentialsSource=\"${credentialsSource}\"\n @change=\"${this.authorizationChangeHandler}\"></api-authorization-editor>\n </section>\n `;\n }\n\n /**\n * @returns The template for the security drop down selector.\n */\n protected authorizationSelectorTemplate(security: SecuritySelectorListItem[], selected: SecuritySelectorListItem): TemplateResult {\n const finalValue = selected.labels.join(', ');\n return html`\n <ui-dropdown-list\n class=\"authorization-selector\"\n closeOnOutsideClick\n matchTriggerWidth\n @select=\"${this.handleAuthSelect}\"\n >\n <ui-text-field \n class=\"dropdown-trigger\" \n label=\"Authorization method\" \n readOnly \n name=\"authorization\"\n .value=\"${finalValue || ''}\" \n @select=\"${EventUtils.cancelEvent}\"\n >\n <ui-icon icon=\"arrowDropDown\" role=\"presentation\" slot=\"suffix\"></ui-icon>\n </ui-text-field>\n <ui-list slot=\"dropdown\" role=\"menu\" selector=\"[data-value]\" selectActive>\n ${security.map((item) => this.authorizationSelectorItemTemplate(item))}\n </ui-list>\n </ui-dropdown-list>\n `;\n }\n\n /**\n * @returns The template for the security drop down selector list item.\n */\n protected authorizationSelectorItemTemplate(info: SecuritySelectorListItem): TemplateResult {\n const { labels, types, security } = info;\n \n const label = labels.join(', ');\n const type = types.join(', ');\n const single = !type;\n return html`\n <ui-list-item \n role=\"menuitem\" \n lines=\"${single ? 'one' : 'two'}\"\n data-id=\"${security.id}\"\n >\n ${label}\n ${!single ? html`<div slot=\"supporting-text\">${type}</div>` : ''}\n </ui-list-item>\n `;\n }\n\n protected formActionsTemplate(): TemplateResult {\n const loading = this.loadingRequest;\n return html`\n <div class=\"action-bar\">\n ${loading ? this.abortButtonTemplate() : this.sendButtonTemplate()}\n <ui-progress ?hidden=\"${!loading}\" indeterminate class=\"request-progress\"></ui-progress>\n </div>`;\n }\n\n /**\n * Creates a template for the \"abort\" button.\n */\n protected abortButtonTemplate(): TemplateResult {\n return html`\n <ui-button\n class=\"send-button abort\"\n type=\"filled\"\n @click=\"${this.abortHandler}\"\n >Abort</ui-button>`;\n }\n\n /**\n * Creates a template for the \"send\" or \"auth and send\" button.\n */\n protected sendButtonTemplate(): TemplateResult {\n return html`\n <ui-button\n class=\"send-button\"\n type=\"filled\"\n @click=\"${this.sendHandler}\"\n >Send</ui-button>`;\n }\n\n /**\n * @return A template for the server selector\n */\n protected serverSelectorTemplate(): TemplateResult {\n const {\n serverType,\n serverValue,\n allowCustomBaseUri,\n serverSelectorHidden,\n domainId,\n } = this;\n return html`\n <api-server-picker\n ?hidden=\"${serverSelectorHidden}\"\n ?custom=\"${allowCustomBaseUri}\"\n .value=\"${serverValue}\"\n .type=\"${serverType as ServerType}\"\n .domainId=\"${domainId}\"\n domainType=\"operation\"\n auto\n @serverscountchanged=\"${this.serverCountHandler}\"\n @apiserverchanged=\"${this.serverHandler}\"\n >\n <slot name=\"custom-base-uri\" slot=\"custom-base-uri\"></slot>\n </api-server-picker>`;\n }\n\n /**\n * @return \n */\n protected parametersTemplate(): TemplateResult | typeof nothing {\n const qp: OperationParameter[] = [];\n const path: OperationParameter[] = [];\n // NOTE, the \"* Required field\" has been added after the a11y audit of API Console.\n let hasRequired = false;\n const { amfParameters } = this;\n amfParameters.parametersValue.forEach((item) => {\n if (!hasRequired && item.parameter && item.parameter.required) {\n hasRequired = true;\n }\n if (item.binding === 'query') {\n qp.push(item);\n } else if (item.binding === 'path') {\n path.push(item);\n }\n });\n const { allowCustom, openedOptional = [] } = this;\n if (!allowCustom && !qp.length && !path.length) {\n return nothing;\n }\n const pathOptions = Object.freeze({ required: true });\n const queryClasses = {\n 'query-params': true,\n 'hide-optional': !!this.allowHideOptional && !openedOptional.includes('query'),\n };\n return html`\n <section class=\"params-section parameter\">\n <div class=\"section-title\"><span class=\"label\">Parameters</span></div>\n ${hasRequired ? html`<p class=\"required-field\">* Required field</p>` : ''}\n <div class=\"path-params\">\n ${path.map(param => amfParameters.parameterTemplate(param, pathOptions))}\n </div>\n <div class=\"${classMap(queryClasses)}\">\n ${this.renderToggleOptional('query', qp)}\n ${qp.map(param => amfParameters.parameterTemplate(param))}\n ${allowCustom ? this.addCustomButtonTemplate('query') : ''}\n </div>\n </section>\n `;\n }\n\n protected headersTemplate(): TemplateResult | typeof nothing {\n const headers: OperationParameter[] = [];\n // NOTE, the \"* Required field\" has been added after the a11y audit of API Console.\n let hasRequired = false;\n const { amfParameters } = this;\n amfParameters.parametersValue.forEach((item) => {\n if (item.binding === 'header') {\n headers.push(item);\n if (!hasRequired && item.parameter && item.parameter.required) {\n hasRequired = true;\n }\n }\n });\n const { allowCustom, openedOptional = [] } = this;\n if (!allowCustom && !headers.length) {\n return nothing;\n }\n const classes = {\n 'header-params': true,\n 'hide-optional': !!this.allowHideOptional && !openedOptional.includes('header'),\n };\n return html`\n <section class=\"params-section header\" aria-label=\"HTTP headers\">\n <div class=\"section-title\"><span class=\"label\">Headers</span></div>\n ${hasRequired ? html`<p class=\"required-field\">* Required field</p>` : ''}\n ${this.renderToggleOptional('header', headers)}\n <div class=\"${classMap(classes)}\">\n ${headers.map(param => amfParameters.parameterTemplate(param))}\n ${allowCustom ? this.addCustomButtonTemplate('header') : ''}\n </div>\n </section>\n `;\n }\n\n /**\n * @returns The template for the add custom parameter button\n */\n protected addCustomButtonTemplate(type: string): TemplateResult {\n return html`\n <div class=\"add-custom-button\">\n <ui-button\n data-type=\"${type}\"\n title=\"Adds a new custom parameter to the request\"\n @click=\"${this.addCustomHandler}\"\n type=\"outlined\"\n >\n <ui-icon icon=\"add\" role=\"presentation\"></ui-icon>\n Add custom\n </ui-button>\n </div>\n `;\n }\n\n /**\n * @return The template for the payload's mime type selector.\n */\n protected mediaTypeSelectorTemplate(): TemplateResult | typeof nothing {\n const { payloads, mimeType } = this;\n if (!payloads || payloads.length === 1) {\n return nothing;\n }\n const mimes = payloads.map(p => p.mediaType);\n let index = mimes.indexOf(mimeType);\n if (index === -1) {\n index = 0;\n }\n\n return html`\n <div class=\"payload-mime-selector\">\n <span id=\"body-mime\" class=\"label-large\">Body media type</span>\n ${mimes.map((item) => html`\n <label class=\"label-large\">\n <ui-radio\n name=\"mediaTypeValue\"\n value=\"${item || ''}\"\n .checked=\"${item === mimeType}\"\n @change=\"${this.handleMediaTypeSelect}\"\n ></ui-radio>\n ${item}\n </label>\n `)}\n </div>\n `;\n }\n\n /**\n * @returns The template for the body editor. \n */\n protected bodyTemplate(): TemplateResult | typeof nothing {\n const { payload } = this;\n if (!payload) {\n return nothing;\n }\n const info = getPayloadValue(payload);\n const mimeType = payload.mediaType;\n let content: TemplateResult;\n if (mimeType === 'application/x-www-form-urlencoded') {\n content = this.formDataEditorTemplate(info, payload.id);\n } else if (mimeType === 'multipart/form-data') {\n content = this.multipartEditorTemplate(info, payload.id);\n } else {\n content = this.rawEditorTemplate(info, payload.id, mimeType);\n }\n return html`\n <section class=\"params-section body\" aria-label=\"HTTP body\">\n <div class=\"section-title\"><span class=\"label\">Body</span></div>\n ${content}\n </section>\n `;\n }\n\n /**\n * @returns The template for the editor that specializes in the URL encoded form data\n */\n protected formDataEditorTemplate(info: PayloadInfo, id: string): TemplateResult {\n const editorModel = info.model;\n const effectiveValue = Array.isArray(editorModel) && editorModel.length ? undefined : info.value;\n return html`\n <http-body-urlencoded-editor \n class=\"body-editor\"\n autoEncode\n .value=\"${ifProperty(effectiveValue)}\"\n .model=\"${ifProperty(editorModel)}\"\n data-payload-id=\"${id}\"\n @change=\"${this.modelBodyEditorChangeHandler}\"\n ></http-body-urlencoded-editor>\n `;\n }\n\n /**\n * @returns The template for the editor that specializes in the multipart form data\n */\n protected multipartEditorTemplate(info: PayloadInfo, id: string): TemplateResult {\n const editorModel = info.model;\n const effectiveValue = Array.isArray(editorModel) && editorModel.length ? undefined : info.value;\n return html`\n <http-body-multipart-editor \n class=\"body-editor\"\n .value=\"${ifProperty(effectiveValue)}\"\n .model=\"${ifProperty(editorModel)}\"\n data-payload-id=\"${id}\"\n @change=\"${this.modelBodyEditorChangeHandler}\"\n ></http-body-multipart-editor>\n `;\n }\n\n /**\n * @returns The template for the editor that specializes in any text data\n */\n protected rawEditorTemplate(info: PayloadInfo, id: string, mimeType?: string): TemplateResult {\n let schemas;\n if (Array.isArray(info.schemas) && info.schemas.length) {\n schemas = info.schemas;\n }\n return html`\n <http-body-text-editor\n class=\"body-editor\" \n .value=\"${info.value as string}\" \n .contentType=\"${mimeType}\"\n .schemas=\"${ifProperty(schemas)}\"\n data-payload-id=\"${id}\"\n @change=\"${this.rawBodyChangeHandler}\"\n ></http-body-text-editor>\n `;\n }\n\n /**\n * @param target The name of the target parameter group.\n * @param params The list of parameters. When all are required or empty it won't render then button.\n * @returns Template for the switch button to toggle visibility of the optional items.\n */\n protected renderToggleOptional(target: string, params: OperationParameter[]): TemplateResult | typeof nothing {\n const { openedOptional = [], allowHideOptional } = this;\n if (!allowHideOptional || !params || !params.length) {\n return nothing;\n }\n const optional = params.some(p => !!p.parameter && !p.parameter.required);\n if (!optional) {\n return nothing;\n }\n const checked = openedOptional.includes(target);\n return html`\n <div class=\"optional-checkbox\">\n <label class=\"label-large\">\n <ui-switch\n class=\"toggle-optional-switch\"\n .checked=\"${checked}\"\n @change=\"${this.handleOptionalToggle}\"\n title=\"Toggles optional parameters\"\n data-target=\"${target}\"\n name=\"toggleOptional\"\n aria-label=\"Toggle optional parameters\"\n ></ui-switch>\n Show optional parameters\n </label>\n </div>\n `;\n }\n\n /**\n * @returns A template for the URL editor.\n */\n protected renderUrlEditor(): TemplateResult | typeof nothing {\n const { urlEditor, url, urlInvalid } = this;\n if (!urlEditor) {\n return nothing;\n }\n return html`\n <div class=\"url-input-wrapper\">\n <ui-text-field \n name=\"url\" \n type=\"url\" \n class=\"url-input\"\n ?invalid=\"${urlInvalid}\"\n required\n invalidText=\"The URL is invalid\"\n .value=\"${url || ''}\"\n @change=\"${this.handleUrlEditorChange}\"\n @blur=\"${this.validateUrl}\"\n label=\"Request URL\"\n ></ui-text-field>\n </div>\n `;\n }\n}\n"]}
1
+ {"version":3,"file":"ApiRequestEditor.element.js","sourceRoot":"","sources":["../../../src/elements/amf/ApiRequestEditor.element.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EACL,MAAM,EACN,OAAO,EAGP,UAAU,EACV,MAAM,IAAI,UAAU,EACpB,OAAO,EAGP,eAAe,GAGhB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAe,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACvH,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,6BAA6B,EAAE,MA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,CAAC;qDAAuB;AAOtC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAAsB;AAOrB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAc;AAOb;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAAsB;AAOrB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDAAqB;AAOJ;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0DAA4B;AAO3B;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4DAA8B;AAK9C;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;2DAAyC;AAMvC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0DAA2B;AAS1B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDAAqB;AAShD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAGzC;AA6CQ;IAAR,KAAK,EAAE;wDAAqC;AAWjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAE1B","sourcesContent":["import { html, nothing, TemplateResult } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { \n uuidV4, \n Headers, \n ApiDefinitions, \n AmfShapes, \n EventUtils, \n Events as CoreEvents,\n Request,\n IRequest,\n IRequestProxyInit,\n HttpRequestKind,\n IProxyResult,\n IRequestLog,\n} from '@api-client/core/build/browser.js';\nimport { ensureContentType, generateHeaders } from \"../../amf/lib/Utils.js\";\nimport { cachePayloadValue, getPayloadValue, PayloadInfo, readCachePayloadValue } from \"../../amf/lib/PayloadUtils.js\";\nimport { applyUrlParameters, applyUrlVariables, computeEndpointUri, applyQueryParamStringToObject } from '../../amf/lib/UrlUtils.js';\nimport { AmfInputParser } from '../../amf/lib/AmfInputParser.js';\nimport * as InputCache from '../../amf/lib/InputCache.js';\nimport { Events } from '../../events/amf/Events.js';\nimport { EventTypes } from '../../events/amf/EventTypes.js';\nimport { EventTypes as UiEventTypes } from '../../events/EventTypes.js';\nimport { OperationParameter, PopulationInfo, SecuritySelectorListItem, ServerType } from '../../amf/types.js';\nimport { Oauth2Credentials } from '../authorization/types.js';\nimport BodyTextEditor from '../http/BodyTextEditor.js';\nimport BodyUrlEncodedEditor from '../http/BodyUrlEncodedEditor.js';\nimport { ifProperty } from '../../directives/if-property.js';\nimport ApiElement from '../ApiElement.js';\nimport type Input from '../../ui/input/Input.js';\nimport type RadioElement from '../../ui/input/RadioElement.js';\nimport { AmfParameters } from '../../amf/lib/AmfParameters.js';\nimport { UiDropdownListSelection } from '../../ui/list/UiDropdownList.js';\nimport { AmfSecurity } from '../../amf/lib/AmfSecurity.js';\nimport { SnackNotifications } from '../../ui/notification/SnackNotifications.js';\nimport '../../define/amf/api-authorization-editor.js';\nimport '../../define/amf/api-server-picker.js';\nimport '../../define/http/http-body-urlencoded-editor.js';\nimport '../../define/http/http-body-multipart-editor.js';\nimport '../../define/http/http-body-text-editor.js';\nimport '../../define/ui/ui-icon.js';\nimport '../../define/ui/ui-text-field.js';\nimport '../../define/ui/ui-switch.js';\nimport '../../define/ui/ui-button.js';\nimport '../../define/ui/ui-dropdown-list.js';\nimport '../../define/ui/ui-list.js';\nimport '../../define/ui/ui-list-item.js';\nimport '../../define/ui/ui-progress.js';\n\nexport const EventCategory = 'API Request editor';\n\n/**\n * @fires amfstoreopget - Dispatched when querying for an operation data\n * @fires amfstoreopgetparent - Dispatched when querying for an operation data for an endpoint\n * @fires amfstoreendpointget - Dispatched when querying for an endpoint data\n * @fires apistoreserverquery - Dispatched when querying for API servers\n * @fires amfstoreapiprotocols - Dispatched when querying for API protocols\n * @fires amfstoreapiversion - Dispatched when querying for API version\n * @fires response - Dispatched when the response was received by the editor.\n */\nexport default class ApiRequestEditor extends ApiElement {\n /** \n * The currently selected media type for the payloads.\n * @attribute\n */\n @property({ type: String, reflect: true, }) mimeType?: string;\n\n /**\n * When set it renders a label with the computed URL.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) urlLabel?: boolean;\n\n /**\n * When set it renders the URL input above the URL parameters.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) urlEditor?: boolean;\n\n /**\n * If set it computes `hasOptional` property and shows checkbox in the\n * form to show / hide optional properties.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) allowHideOptional?: boolean;\n\n /**\n * When set, renders \"add custom\" item button.\n * If the element is to be used without AMF model this should always\n * be enabled. Otherwise users won't be able to add a parameter.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) allowCustom?: boolean;\n\n /**\n * OAuth2 redirect URI.\n * This value **must** be set in order for OAuth 1/2 to work properly.\n * @attribute\n */\n @property({ type: String }) redirectUri?: string;\n\n /**\n * Final request URL including settings like `baseUri`, AMF\n * model settings and user provided parameters.\n * @attribute\n */\n @property({ type: String }) url?: string;\n\n /**\n * Holds the value of the currently selected server\n * Data type: URI\n * @attribute\n */\n @property({ type: String }) serverValue?: string;\n\n /**\n * Holds the type of the currently selected server\n * Values: `server` | `uri` | `custom`\n * @attribute\n */\n @property({ type: String }) serverType?: string;\n\n /**\n * Optional property to set\n * If true, the server selector is not rendered\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) noServerSelector?: boolean;\n\n /**\n * Optional property to set\n * If true, the server selector custom base URI option is rendered\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) allowCustomBaseUri?: boolean;\n \n /**\n * List of credentials source\n */\n @property({ type: Array }) credentialsSource?: Oauth2Credentials[];\n\n /** \n * The domain id key of the selected security\n * @attribute\n */\n @property({ type: String }) selectedSecurity?: string;\n\n /** \n * Optional. The parent endpoint id. When set it uses this value to query for the endpoint\n * instead of querying for a parent through the operation id.\n * Also, when `endpoint` is set and the `endpointId` match then it ignores querying for \n * the endpoint.\n * @attribute\n */\n @property({ type: String }) endpointId?: string;\n\n protected domainIdValue: string | undefined;\n\n /**\n * The domain id (AMF id) of the rendered operation.\n * @attribute\n */\n @property({ type: String, reflect: true })\n get domainId(): string | undefined {\n return this.domainIdValue;\n }\n\n set domainId(value: string | undefined) {\n const old = this.domainIdValue;\n /* istanbul ignore if */\n if (old === value) {\n return;\n }\n this.domainIdValue = value;\n this.requestUpdate('domainId', old);\n this.processDebounce();\n }\n\n protected endpointValue: ApiDefinitions.IApiEndPoint | undefined;\n\n\n get endpoint(): ApiDefinitions.IApiEndPoint | undefined {\n return this.endpointValue;\n }\n\n set endpoint(value: ApiDefinitions.IApiEndPoint | undefined) {\n const old = this.endpointValue;\n if (old === value) {\n return;\n }\n this.endpointValue = value;\n this.requestUpdate();\n this.readUrlData();\n this.notifyChange();\n }\n\n /**\n * The HTTP method name.\n */\n get httpMethod(): string | undefined {\n const op = this.operationValue;\n if (!op) {\n return undefined;\n }\n return op.method;\n }\n\n /**\n * A flag set when the request is being made.\n */\n @state() loadingRequest: boolean | undefined;\n\n protected baseUriValue: string | undefined;\n\n /**\n * A base URI for the API. To be set if RAML spec is missing `baseUri`\n * declaration and this produces invalid URL input. This information\n * is passed to the URL editor that prefixes the URL with `baseUri` value\n * if passed URL is a relative URL.\n * @attribute\n */\n @property({ type: String }) get baseUri(): string | undefined {\n return this.baseUriValue;\n }\n\n set baseUri(value: string | undefined) {\n const old = this.baseUriValue;\n if (old === value) {\n return;\n }\n this.baseUriValue = value;\n this.readUrlData();\n this.requestUpdate('baseUri', old);\n }\n\n protected serversValue: ApiDefinitions.IApiServer[] | undefined;\n\n /**\n * The computed list of servers.\n */\n get servers(): ApiDefinitions.IApiServer[] | undefined {\n return this.serversValue;\n }\n\n protected serverLocalValue: ApiDefinitions.IApiServer | undefined;\n\n get server(): ApiDefinitions.IApiServer | undefined {\n return this.serverLocalValue;\n }\n\n /**\n * This is the final computed value for the baseUri to propagate downwards\n * If baseUri is defined, return baseUri\n * Else, return the selectedServerValue if serverType is not `server`\n */\n get effectiveBaseUri(): string {\n if (this.baseUri) {\n return this.baseUri;\n }\n if (this.serverType !== 'server') {\n return this.serverValue as string;\n }\n return '';\n }\n\n /**\n * @return True when there is not enough servers to render the selector\n */\n get serverSelectorHidden(): boolean {\n const { serversCount = 0, noServerSelector = false, allowCustomBaseUri } = this;\n return noServerSelector || (!allowCustomBaseUri && serversCount < 2);\n }\n\n /** \n * The list of security list items to render.\n * An operation may have multiple security definition in an or/and fashion.\n * This allows to render the selector to pick the current security.\n */\n protected securityList: SecuritySelectorListItem[] | undefined;\n\n /**\n * The security requirement for the operation or undefined.\n */\n get security(): SecuritySelectorListItem[] | undefined {\n const items = this.securityList;\n if (Array.isArray(items) && items.length) {\n return items;\n }\n return undefined;\n }\n\n /**\n * The currently rendered payload, if any.\n */\n get payload(): ApiDefinitions.IApiPayload | undefined {\n const { payloads } = this;\n if (!payloads) {\n return undefined;\n }\n const { mimeType } = this;\n let payload: ApiDefinitions.IApiPayload | undefined;\n if (mimeType) {\n payload = payloads.find(i => i.mediaType === mimeType);\n }\n if (!payload) {\n [payload] = payloads;\n }\n return payload;\n }\n\n /**\n * The list of all possible payloads for this operation.\n */\n get payloads(): ApiDefinitions.IApiPayload[] | undefined {\n const operation = this.operationValue;\n if (!operation) {\n return undefined;\n }\n const { request } = operation;\n if (!request) {\n return undefined;\n }\n const { payloads } = request;\n if (!Array.isArray(payloads) || !payloads.length) {\n return undefined;\n }\n return payloads;\n }\n\n /**\n * @returns API defined base URI (current server + the endpoint)\n */\n get apiBaseUri(): string | undefined {\n const endpoint = this.endpointValue;\n const server = this.serverLocalValue;\n if (!server || !endpoint) {\n return undefined;\n }\n const { path = '' } = endpoint;\n let { url = '' } = server;\n if (url.endsWith('/')) {\n url = url.substr(0, url.length - 1);\n }\n return `${url}${path}`;\n }\n\n protected urlInvalidValue?: boolean;\n\n /**\n * True when the URL input is invalid.\n */\n get urlInvalid(): boolean | undefined {\n return this.urlInvalidValue;\n }\n\n protected protocolsValue: string[] | undefined;\n\n /**\n * The API's protocols.\n */\n get protocols(): string[] | undefined {\n return this.protocolsValue;\n }\n\n protected versionValue: string | undefined;\n\n /**\n * The API's version.\n */\n get version(): string | undefined {\n return this.versionValue;\n }\n\n queryDebouncerTimeout: number;\n\n /** \n * Set when the selection change, this is a JS object created form the \n * supportedOperation definition of the AMF graph.\n */\n protected operationValue?: ApiDefinitions.IApiOperation;\n\n /** \n * The list of parameter groups that are opened when `allowHideOptional` is set.\n */\n openedOptional: string[];\n\n protected debounceValue: unknown;\n\n protected urlSearchRegexpValue: RegExp | undefined;\n\n serversCount?: number;\n\n amfParameters: AmfParameters;\n\n /**\n * This is set while the HTTP request is being executed.\n * It allows to abort the request.\n */\n requestController?: AbortController;\n\n /**\n * @constructor\n */\n constructor() {\n super();\n /** \n * The timeout after which the `queryGraph()` function is called \n * in the debouncer.\n */\n this.queryDebouncerTimeout = 1;\n this.authRedirectChangedHandler = this.authRedirectChangedHandler.bind(this);\n this.populateAnnotatedFieldsHandler = this.populateAnnotatedFieldsHandler.bind(this);\n \n this.openedOptional = [];\n this.amfParameters = new AmfParameters(this);\n this.amfParameters.addEventListener('render', () => this.requestUpdate());\n this.amfParameters.addEventListener('change', () => this.notifyChange());\n this.amfParameters.addEventListener('paramchange', this.paramChangeHandler.bind(this) as EventListener);\n InputCache.registerLocal(this);\n this.graphChangeHandler = this.graphChangeHandler.bind(this);\n this.addEventListener(UiEventTypes.Http.Request.send, this.internalSendHandler.bind(this));\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.processDebounce();\n this.amfParameters.globalCache = true;\n const node = this.eventsTarget;\n node.addEventListener(EventTypes.Store.graphChange, this.graphChangeHandler);\n node.addEventListener(EventTypes.Request.redirectUriChange, this.authRedirectChangedHandler as EventListener);\n node.addEventListener(EventTypes.Request.populateAnnotatedFields, this.populateAnnotatedFieldsHandler as EventListener);\n \n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n if (this.debounceValue) {\n clearTimeout(this.debounceValue as number);\n this.debounceValue = undefined;\n }\n const node = this.eventsTarget;\n node.removeEventListener(EventTypes.Store.graphChange, this.graphChangeHandler);\n node.removeEventListener(EventTypes.Request.redirectUriChange, this.authRedirectChangedHandler as EventListener);\n node.removeEventListener(EventTypes.Request.populateAnnotatedFields, this.populateAnnotatedFieldsHandler as EventListener);\n }\n\n /**\n * Handler for the event dispatched by the store when the graph model change.\n */\n protected graphChangeHandler(): void {\n this.processDebounce()\n }\n\n /**\n * Calls the `queryGraph()` function in a debouncer.\n */\n protected processDebounce(): void {\n if (this.debounceValue) {\n clearTimeout(this.debounceValue as number);\n }\n this.debounceValue = setTimeout(() => {\n this.debounceValue = undefined;\n this.processGraph();\n }, this.queryDebouncerTimeout);\n }\n\n /**\n * Reads the URL data from the ApiUrlDataModel library and sets local variables.\n */\n readUrlData(): void {\n this.updateServerParameters();\n this.orderPathParameters()\n this.computeUrlValue();\n }\n\n /**\n * It makes sure that the path parameters are rendered in order (server, endpoint) and in order of occurrence in the URL. \n */\n protected orderPathParameters(): void {\n const params = this.getOrderedPathParams();\n if (!params || !params.length) {\n return;\n }\n const { amfParameters } = this;\n amfParameters.parametersValue = amfParameters.parametersValue.filter(item => item.binding !== 'path');\n amfParameters.parametersValue = amfParameters.parametersValue.concat(params);\n }\n\n protected paramChangeHandler(e: CustomEvent<string>): void {\n this.paramChanged(e.detail);\n }\n\n /**\n * A function to be overwritten by child classes to execute an action when a parameter has changed.\n */\n protected paramChanged(key: string): void {\n this.computeUrlValue();\n this.validateUrl();\n const { amfParameters } = this;\n const param = amfParameters.parametersValue.find(p => p.paramId === key);\n if (param && param.binding === 'header' && (param.parameter.name || '').toLocaleLowerCase() === 'content-type') {\n const value = InputCache.get(this, param.paramId, true) as string;\n this.mimeType = value;\n }\n }\n\n /**\n * Computes the URL value for the current serves, selected server, and endpoint's path.\n */\n protected computeUrlValue(): void {\n const { effectiveBaseUri, server, protocols, version } = this;\n const endpoint = this.endpointValue;\n const result = computeEndpointUri({\n baseUri: effectiveBaseUri,\n server,\n endpoint,\n protocols,\n version,\n forceHttpProtocol: true,\n });\n const { amfParameters } = this;\n const params = amfParameters.parametersValue.map(p => p.parameter);\n const report = AmfInputParser.reportRequestInputs(params, InputCache.getStore(this, true), amfParameters.nilValues);\n let url = applyUrlVariables(result, report.path, true);\n url = applyUrlParameters(url, report.query, true);\n this.url = url;\n }\n\n /**\n * Checks if the current server has variables and update the parameters array\n */\n protected updateServerParameters(): void {\n const { server } = this;\n const source = 'server';\n const { amfParameters } = this;\n // clears previously set request parameters related to server configuration.\n amfParameters.parametersValue = amfParameters.parametersValue.filter(item => item.source !== source);\n if (!server || ['custom', 'uri'].includes(this.serverType || '')) {\n // we don't need to compute server variables for a custom URLs.\n return;\n }\n if (Array.isArray(server.variables) && server.variables.length) {\n server.variables.forEach((param) => {\n const item: OperationParameter = {\n binding: param.binding || '',\n paramId: param.id,\n parameter: param,\n source,\n };\n if (param.schema) {\n item.schema = param.schema;\n item.schemaId = param.schema.id;\n }\n amfParameters.parametersValue.push(item);\n });\n }\n }\n\n /**\n * Checks if the current endpoint has variables and requests them when needed.\n */\n protected updateEndpointParameters(): void {\n const source = 'endpoint';\n const { amfParameters } = this;\n // clears previously set request parameters related to server configuration.\n amfParameters.parametersValue = amfParameters.parametersValue.filter(item => item.source !== source);\n const endpoint = this.endpointValue;\n if (!endpoint) {\n // we don't need to compute endpoint variables for a custom URLs.\n return;\n }\n if (Array.isArray(endpoint.parameters) && endpoint.parameters.length) {\n endpoint.parameters.forEach((param) => {\n const item: OperationParameter = {\n binding: param.binding || '',\n paramId: param.id,\n parameter: param,\n source,\n };\n if (param.schema) {\n item.schema = param.schema;\n item.schemaId = param.schema.id;\n }\n amfParameters.parametersValue.push(item);\n });\n }\n }\n\n reset(): void {\n this.securityList = undefined;\n this.mimeType = undefined;\n this.amfParameters.parametersValue = [];\n }\n\n /**\n * Processes the selection of the domain id for an operation.\n */\n async processGraph(): Promise<void> {\n await this.queryEndpoint();\n await this.queryOperation();\n await this.queryServers();\n await this.queryProtocols();\n this.processEndpoint();\n this.processOperation();\n this.processSecurity();\n this.processPayload();\n this.computeUrlValue();\n this.readUrlData();\n this.notifyChange();\n }\n\n /**\n * Queries the store for the operation data, when needed.\n */\n async queryOperation(): Promise<void> {\n const { domainId } = this;\n if (!domainId || domainId === 'undefined') {\n // this.operationValue = undefined;\n return;\n }\n if (this.operationValue && this.operationValue.id === domainId) {\n // in case the operation model was provided via the property setter.\n return;\n }\n try {\n const endpointId = this.endpointValue && this.endpointValue.id;\n const info = await Events.Operation.get(this, domainId, endpointId);\n this.operationValue = info;\n } catch (e) {\n const ex = e as Error;\n Events.Telemetry.exception(this, ex.message, false);\n Events.Reporting.error(this, ex, `Unable to query for API operation data: ${ex.message}`, this.localName);\n }\n }\n\n /**\n * Queries the store for the endpoint data.\n * @returns {Promise<void>}\n */\n async queryEndpoint(): Promise<void> {\n const { domainId, endpointId } = this;\n if (!domainId || domainId === 'undefined') {\n // this.endpointValue = undefined;\n return;\n }\n if (this.endpointValue && this.endpointValue.id === endpointId) {\n // in case the endpoint model was provided via the property setter.\n return;\n }\n this.endpointValue = undefined;\n try {\n const info = await (endpointId ? Events.Endpoint.get(this, endpointId) : Events.Operation.getParent(this, domainId));\n this.endpointValue = info;\n } catch (e) {\n const ex = e as Error;\n Events.Telemetry.exception(this, ex.message, false);\n Events.Reporting.error(this, ex, `Unable to query for API endpoint data: ${ex.message}`, this.localName);\n }\n }\n\n /**\n * Queries for the current servers value.\n */\n async queryServers(): Promise<void> {\n const { domainId } = this;\n const endpointId = this.endpointValue && this.endpointValue.id;\n try {\n const info = await Events.Server.query(this, {\n endpointId,\n methodId: domainId,\n });\n this.serversValue = info || undefined;\n } catch (e) {\n const ex = e as Error;\n this.serversValue = undefined;\n Events.Telemetry.exception(this, ex.message, false);\n Events.Reporting.error(this, ex, `Unable to query for API servers: ${ex.message}`, this.localName);\n }\n }\n\n /**\n * Queries the API store for the API protocols list.\n */\n async queryProtocols(): Promise<void> {\n this.protocolsValue = undefined;\n try {\n const info = await Events.Api.protocols(this);\n this.protocolsValue = info;\n } catch (e) {\n const ex = e as Error;\n Events.Telemetry.exception(this, ex.message, false);\n Events.Reporting.error(this, ex, `Unable to query for API protocols list: ${ex.message}`, this.localName);\n }\n }\n\n /**\n * Searches for the current operation endpoint and sets variables from the endpoint definition.\n */\n protected processEndpoint(): void {\n this.updateEndpointParameters();\n this.computeUrlRegexp();\n }\n\n /**\n * Collects operations input parameters into a single object.\n */\n protected processOperation(): void {\n const source = 'request';\n const operation = this.operationValue;\n const { amfParameters } = this;\n // clears previously set request parameters (query, path, headers)\n amfParameters.parametersValue = amfParameters.parametersValue.filter(item => item.source !== source);\n if (!operation) {\n return;\n }\n const { request } = operation;\n if (!request) {\n return;\n }\n const uri: ApiDefinitions.IApiParameter[] = [];\n if (Array.isArray(request.uriParameters)) {\n // OAS has this weird thing where you can define URI parameters on the endpoint and the operation.\n // this eliminates the duplicates and merges the schemas\n request.uriParameters.forEach((param) => {\n if (!param.paramName) {\n uri.push(param);\n return;\n }\n const index = amfParameters.parametersValue.findIndex(p => p.binding === 'path' && p.parameter.paramName === param.paramName);\n if (index !== -1) {\n // remove the parameter that is being replaced by the local definition\n amfParameters.parametersValue.splice(index, 1);\n }\n uri.push(param);\n });\n }\n this.appendToParams(uri, source);\n this.appendToParams(request.queryParameters, source);\n this.appendToParams(request.headers, source);\n this.appendToParams(request.cookieParameters, source);\n }\n\n /**\n * Processes security information for the UI.\n */\n protected processSecurity(): void {\n const operation = this.operationValue;\n if (!operation) {\n return;\n }\n const { security } = operation;\n this.securityList = AmfSecurity.readSecurityList(security);\n const [first] = this.securityList;\n this.selectedSecurity = first ? first.security.id : undefined;\n }\n\n /**\n * Makes sure the correct mime type is selected for the current selection.\n */\n protected processPayload(): void {\n const operation = this.operationValue;\n if (!operation) {\n return;\n }\n const { request } = operation;\n if (!request) {\n return;\n }\n const { payloads = [] } = request;\n if (!payloads.length) {\n return;\n }\n let mime = this.mimeType;\n \n if (mime) {\n const has = payloads.find(p => p.mediaType === mime);\n if (!has) {\n mime = undefined;\n }\n }\n if (!mime) {\n const first = payloads.find(p => p.mediaType);\n if (first) {\n mime = first.mediaType;\n }\n }\n this.mimeType = mime;\n }\n\n /**\n * Appends a list of parameters to the list of rendered parameters\n */\n protected appendToParams(list: ApiDefinitions.IApiParameter[], source: string): void {\n const params = this.amfParameters.parametersValue;\n if (Array.isArray(list)) {\n list.forEach((param) => {\n params.push({\n paramId: param.id,\n parameter: param,\n binding: param.binding || '',\n source,\n schema: param.schema,\n schemaId: param.schema && param.schema.id ? param.schema.id : undefined,\n });\n });\n }\n }\n\n /**\n * A handler for the change event dispatched by the `raw` editor.\n */\n protected rawBodyChangeHandler(e: Event): void {\n const editor = e.target as BodyTextEditor;\n const { value, dataset } = editor;\n const { payloadId } = dataset;\n if (!payloadId) {\n return;\n }\n cachePayloadValue(payloadId, value as string);\n }\n\n /**\n * A handler for the change event dispatched by the \n * `urlEncode` editor.\n * Updated the local value, model, and notifies the change.\n */\n protected modelBodyEditorChangeHandler(e: Event): void {\n const editor = e.target as BodyUrlEncodedEditor;\n const { value, model, dataset } = editor;\n const { payloadId } = dataset;\n if (!payloadId) {\n return;\n }\n cachePayloadValue(payloadId, value as string, model);\n }\n\n protected handleAuthSelect(e: CustomEvent<UiDropdownListSelection>): void {\n const { item } = e.detail;\n const { id } = item.dataset;\n if (!id) {\n return;\n }\n this.selectedSecurity = id;\n this.requestUpdate();\n }\n\n /**\n * Handles send button click.\n * Depending on authorization validity it either sends the\n * request or forces authorization and sends the request.\n */\n protected sendHandler(): void {\n this.execute();\n }\n\n /**\n * To be called when the user want to execute the request but\n * authorization is invalid (missing values).\n * This function brings the auth panel to front and displays error toast\n */\n async authAndExecute(): Promise<void> {\n const { shadowRoot } = this;\n if (!shadowRoot) {\n throw new Error(`Invalid state. The element is not initialized.`);\n }\n\n const panel = shadowRoot.querySelector('api-authorization-editor');\n if (!panel) {\n throw new Error(`Invalid state. The authorization editor element was removed from the DOM.`);\n }\n await panel.authorize();\n const valid = panel.validate();\n if (valid) {\n this.execute();\n }\n }\n\n protected async proxyRequest(init: IRequestProxyInit): Promise<IProxyResult<IRequestLog> | undefined> {\n let result: IProxyResult<IRequestLog> | undefined;\n try {\n result = await CoreEvents.Transport.Core.request(init, this);\n } catch (e) {\n // ...\n }\n return result;\n }\n\n /**\n * Proxies the request to the endpoint using the core libraries.\n */\n async execute(): Promise<void> {\n if (this.loadingRequest) {\n this.abort();\n }\n Events.Telemetry.event(this, {\n category: EventCategory,\n action: 'request-execute',\n label: 'true'\n });\n const request = await this.serialize();\n const ctrl = new AbortController();\n this.requestController = ctrl;\n const init: IRequestProxyInit = {\n kind: HttpRequestKind,\n request: request.expects,\n authorization: request.authorization,\n signal: ctrl.signal,\n };\n this.loadingRequest = true;\n const result = await this.proxyRequest(init);\n this.loadingRequest = false;\n if (!result) {\n if (ctrl.signal.aborted) {\n return;\n }\n const message = `The request was not sent. Proxy not available.`;\n SnackNotifications.notify(message, { timeout: 2000, close: true });\n throw new Error(message);\n }\n this.dispatchEvent(new CustomEvent<IRequestLog>('response', { detail: result.result }));\n }\n\n /**\n * Uses the `requestController` to abort the ongoing HTTP request.\n */\n abort(): void {\n Events.Telemetry.event(this, {\n category: EventCategory,\n action: 'request-abort',\n label: 'true'\n });\n const { requestController } = this;\n if (!requestController) {\n return;\n }\n requestController.abort();\n this.requestController = undefined;\n this.loadingRequest = false;\n }\n\n /**\n * Event handler for abort click.\n */\n protected abortHandler(): void {\n this.abort();\n }\n\n /**\n * Serializes the state of the request editor into the `ApiConsoleRequest` object.\n */\n async serialize(): Promise<IRequest> {\n const op = this.operationValue;\n if (!op) {\n throw new Error(`No API operation defined on the editor`);\n }\n const method = (op.method || 'get').toUpperCase();\n const params: ApiDefinitions.IApiParameter[] = [];\n const { amfParameters } = this;\n amfParameters.parametersValue.forEach((item) => {\n const { parameter, enabled } = item;\n if (enabled === false) {\n return;\n }\n params.push(parameter);\n });\n const report = AmfInputParser.reportRequestInputs(params, InputCache.getStore(this, true), amfParameters.nilValues);\n const serverUrl = computeEndpointUri({\n baseUri: this.effectiveBaseUri,\n server: this.server,\n endpoint: this.endpointValue,\n protocols: this.protocols,\n forceHttpProtocol: true,\n });\n let url = applyUrlVariables(serverUrl, report.path, true);\n url = applyUrlParameters(url, report.query, true);\n const headers = generateHeaders(report.header);\n\n const instance = new Request();\n const expects = instance.getExpects();\n expects.method = method;\n expects.url = url;\n expects.headers = headers;\n \n if (!['GET', 'HEAD'].includes(method)) {\n let body: string | FormData | Blob | File | Buffer | ArrayBuffer | undefined;\n const { payload } = this;\n if (payload) {\n const info = readCachePayloadValue(payload.id);\n if (info && info.value) {\n body = info.value;\n }\n }\n if (body instanceof FormData) {\n const parser = new Headers(expects.headers);\n parser.delete('content-type');\n expects.headers = parser.toString();\n } else if (payload) {\n expects.headers = ensureContentType(expects.headers || '', payload.mediaType);\n }\n if (typeof body !== 'undefined') {\n await expects.writePayload(body);\n }\n }\n\n const result = instance.toJSON();\n\n const authElement = this.shadowRoot?.querySelector('api-authorization-editor');\n if (authElement) {\n const auth = authElement.serialize();\n result.authorization = auth;\n }\n return result;\n }\n\n /**\n * Handler for the `oauth2-redirect-uri-changed` custom event. Changes\n * the `redirectUri` property.\n */\n protected authRedirectChangedHandler(e: CustomEvent): void {\n this.redirectUri = e.detail.value;\n }\n\n /**\n * Handle event for populating annotated fields in the editor.\n */\n protected populateAnnotatedFieldsHandler(e: CustomEvent): void {\n const populationInfoArray: PopulationInfo[] = e.detail.values;\n const { parametersValue = [] } = this.amfParameters;\n const allAnnotated = parametersValue.filter(param => Array.isArray(param.parameter.customDomainProperties) && !!param.parameter.customDomainProperties.length);\n let update = false;\n populationInfoArray.forEach(({ annotationName, annotationValue, fieldValue }) => {\n allAnnotated.forEach((item) => {\n const { parameter, paramId } = item;\n const hasAnnotation = (parameter.customDomainProperties || []).some((prop) => prop.name === annotationName && (prop.extension as AmfShapes.IApiScalarNode).value === annotationValue);\n if (!hasAnnotation) {\n return;\n }\n InputCache.set(this, paramId, fieldValue, true);\n update = true;\n });\n });\n if (update) {\n this.requestUpdate();\n }\n /* @TODO populate values for the security schema. */\n }\n\n /**\n * Computes a current server value for selection made in the server selector.\n */\n protected updateServer(): void {\n const { serverValue, serverType, servers = [] } = this;\n if (serverType !== 'server') {\n this.serverLocalValue = undefined;\n } else {\n this.serverLocalValue = servers.find(server => server.url === serverValue);\n }\n this.readUrlData();\n this.computeUrlRegexp();\n }\n\n /**\n * Handler for the change dispatched from the server selector.\n */\n protected serverCountHandler(e: CustomEvent): void {\n const { value = 0 } = e.detail;\n this.serversCount = value;\n this.updateServer();\n this.requestUpdate();\n }\n\n /**\n * Handler for the change dispatched from the server selector.\n */\n protected serverHandler(e: CustomEvent): void {\n const { value, type } = e.detail;\n this.serverType = type;\n this.serverValue = value;\n this.updateServer();\n this.computeUrlRegexp();\n }\n\n /**\n * Computes a regexp for the base URI defined in the server to process URL input change\n * and set the `.urlSearchRegexpValue` value.\n * This should be computed only when a server and en endpoint change.\n */\n protected computeUrlRegexp(): void {\n const { effectiveBaseUri } = this;\n let value;\n if (effectiveBaseUri) {\n value = computeEndpointUri({\n baseUri: effectiveBaseUri,\n endpoint: this.endpointValue,\n forceHttpProtocol: true,\n });\n } else {\n value = this.apiBaseUri;\n }\n if (!value) {\n this.urlSearchRegexpValue = undefined;\n } else {\n value = value.replace('?', '\\\\?');\n value = value.replace(/(\\.|\\/)/g, '\\\\$1');\n value = value.replace(/{[\\w\\\\+]+}/g, '([a-zA-Z0-9\\\\$\\\\-_\\\\.~\\\\+!\\'\\\\(\\\\)\\\\*\\\\{\\\\}]+)');\n value += '.*';\n this.urlSearchRegexpValue = new RegExp(value);\n }\n }\n\n protected handleMediaTypeSelect(e: Event): void {\n const node = e.target as RadioElement;\n const { value } = node;\n this.mimeType = value;\n const ctParam = this.amfParameters.parametersValue.find(p => p.binding === 'header' && (p.parameter.name || '').toLocaleLowerCase() === 'content-type');\n if (ctParam) {\n InputCache.set(this, ctParam.paramId, value, true);\n }\n }\n\n protected async notifyResizeAfterUpdate(): Promise<void> {\n await this.updateComplete;\n this.dispatchEvent(new Event('resize', { bubbles: true, composed: true }));\n }\n\n /**\n * Toggles optional parameter groups.\n */\n protected handleOptionalToggle(e: Event): void {\n const node = e.target as HTMLElement;\n const { target } = node.dataset;\n if (!target) {\n return;\n }\n if (!Array.isArray(this.openedOptional)) {\n this.openedOptional = [];\n }\n if (this.openedOptional.includes(target)) {\n const index = this.openedOptional.indexOf(target);\n this.openedOptional.splice(index, 1);\n } else {\n this.openedOptional.push(target);\n }\n this.requestUpdate();\n this.notifyResizeAfterUpdate();\n }\n\n /**\n * When enabled it adds a new custom parameter to the request section defined in the source button.\n */\n protected addCustomHandler(e: Event): void {\n const button = e.currentTarget as HTMLElement;\n const { type } = button.dataset;\n if (!['query', 'header'].includes(type as string)) {\n return;\n }\n const id = uuidV4();\n const param: OperationParameter = {\n binding: type || '',\n source: 'custom',\n paramId: id,\n parameter: {\n id,\n required: true,\n binding: type,\n name: '',\n examples: [],\n payloads: [],\n customDomainProperties: [],\n types: [],\n },\n };\n this.amfParameters.parametersValue.push(param);\n this.requestUpdate();\n }\n\n /**\n * Updates path/query model from user input.\n *\n * @param e The change event\n */\n protected handleUrlEditorChange(e: Event): void {\n const { value } = e.target as Input;\n let matches;\n const uriRegexp = this.urlSearchRegexpValue;\n // parameters must be in order from server to the endpoint\n const pathParams = this.getOrderedPathParams();\n let changed = false;\n if (pathParams.length && uriRegexp) {\n matches = value.match(uriRegexp);\n if (matches) {\n matches.shift();\n changed = this.applyUriValues(matches, pathParams);\n }\n }\n const matchesNew = value.match(/[^&?]*?=[^&?]*/g);\n if (matchesNew) {\n const params: Record<string, string|string[]> = {};\n matchesNew.forEach((item) => applyQueryParamStringToObject(item, params));\n const qpChanged = this.applyQueryParamsValues(params);\n if (!changed) {\n changed = qpChanged;\n }\n }\n this.url = value;\n this.validateUrl();\n this.notifyChange();\n this.requestUpdate();\n }\n\n /**\n * Sets the value of `.urlInvalidValue` and therefore `urlInvalid` properties.\n */\n validateUrl(): void {\n this.urlInvalidValue = !this.readUrlValidity();\n this.requestUpdate();\n }\n\n /**\n * Validates the current URL value.\n * @returns True when the current URL is a valid URL.\n */\n protected readUrlValidity(): boolean {\n const { url } = this;\n if (!url) {\n return false;\n }\n if (typeof url !== 'string') {\n return false;\n }\n if (url.indexOf('{') !== -1 && url.indexOf('}') !== -1) {\n return false;\n }\n const { shadowRoot } = this;\n if (!shadowRoot) {\n return true;\n }\n const inputElement = shadowRoot.querySelector('.url-input') as Input;\n if (inputElement) {\n return inputElement.reportValidity();\n }\n return true;\n }\n\n /**\n * Reads the ordered list of path parameters from the server and the endpoint.\n */\n protected getOrderedPathParams(): OperationParameter[] {\n const result: OperationParameter[] = [];\n const { effectiveBaseUri } = this;\n let url;\n if (effectiveBaseUri) {\n url = computeEndpointUri({\n baseUri: effectiveBaseUri,\n endpoint: this.endpointValue,\n forceHttpProtocol: true,\n });\n } else {\n url = this.apiBaseUri;\n }\n if (!url) {\n return result;\n }\n const matches = url.match(/{[\\w\\\\+]+}/g);\n if (!matches) {\n return result;\n }\n const all = this.amfParameters.parametersValue;\n matches.forEach((tpl) => {\n const name = tpl.substr(1, tpl.length - 2);\n const param = all.find(p => p.binding === 'path' && p.parameter.name === name);\n if (param) {\n result.push(param);\n }\n });\n return result;\n }\n\n /**\n * Applies values from the `values` array to the uri parameters which names are in the `names` array.\n * Both lists are ordered list of parameters.\n *\n * @param values Values for the parameters\n * @param params List of path parameters.\n * @returns True when any parameter was changed.\n */\n protected applyUriValues(values: string[], params: OperationParameter[]): boolean {\n let changed = false;\n for (let i = 0, len = params.length; i < len; i++) {\n const value = values[i];\n if (value && value[0] === '{') {\n // This is still a variable\n continue;\n }\n const param = params[i];\n if (InputCache.get(this, param.paramId, true) !== value) {\n InputCache.set(this, param.paramId, value, true);\n changed = true;\n }\n }\n return changed;\n }\n\n /**\n * Applies query parameters values to the render list.\n *\n * @returns True when any parameter was changed.\n */\n protected applyQueryParamsValues(map: Record<string, string|string[]>): boolean {\n if (!map) {\n return false;\n }\n const keys = Object.keys(map);\n let changed = false;\n keys.forEach((key) => {\n const value = map[key];\n if (value && value[0] === '{') {\n // This is still a variable\n return;\n }\n const param = this.amfParameters.parametersValue.find(p => p.binding === 'query' && p.parameter.name === key);\n if (param) {\n if (InputCache.get(this, param.paramId, true) !== value) {\n InputCache.set(this, param.paramId, value, true);\n changed = true;\n }\n }\n });\n return changed;\n }\n\n protected internalSendHandler(e: Event): void {\n e.stopPropagation();\n this.execute();\n }\n\n /**\n * A handler for the change event on the authorization panel.\n */\n protected authorizationChangeHandler(): void {\n this.notifyChange();\n }\n\n override render(): TemplateResult {\n return html`\n <div class=\"content\">\n ${this.serverSelectorTemplate()}\n ${this.urlLabelTemplate()}\n ${this.renderUrlEditor()}\n ${this.parametersTemplate()}\n ${this.headersTemplate()}\n ${this.mediaTypeSelectorTemplate()}\n ${this.bodyTemplate()}\n ${this.authorizationTemplate()}\n ${this.formActionsTemplate()}\n </div>`;\n }\n\n /**\n * @return Template for the request URL label.\n */\n protected urlLabelTemplate(): TemplateResult | typeof nothing {\n const { urlLabel, url } = this;\n if (!urlLabel) {\n return nothing;\n }\n return html`<div class=\"url-label text-selectable\" title=\"Current request URL\">${url}</div>`;\n }\n\n protected authorizationTemplate(): TemplateResult | typeof nothing {\n const { security } = this;\n if (!security) {\n return nothing;\n }\n const { selectedSecurity, redirectUri, credentialsSource } = this;\n const rendered = security.find(i => i.security.id === selectedSecurity);\n if (!rendered) {\n return nothing;\n }\n return html`\n <section class=\"authorization params-section\">\n <div class=\"section-title\"><span class=\"label\">Credentials</span></div>\n ${security.length > 1 ? this.authorizationSelectorTemplate(security, rendered) : ''}\n <api-authorization-editor \n .security=\"${rendered.security}\"\n .oauth2RedirectUri=\"${redirectUri}\"\n .credentialsSource=\"${credentialsSource}\"\n @change=\"${this.authorizationChangeHandler}\"></api-authorization-editor>\n </section>\n `;\n }\n\n /**\n * @returns The template for the security drop down selector.\n */\n protected authorizationSelectorTemplate(security: SecuritySelectorListItem[], selected: SecuritySelectorListItem): TemplateResult {\n const finalValue = selected.labels.join(', ');\n return html`\n <ui-dropdown-list\n class=\"authorization-selector\"\n closeOnOutsideClick\n matchTriggerWidth\n @select=\"${this.handleAuthSelect}\"\n >\n <ui-text-field \n class=\"dropdown-trigger\" \n label=\"Authorization method\" \n readOnly \n name=\"authorization\"\n .value=\"${finalValue || ''}\" \n @select=\"${EventUtils.cancelEvent}\"\n >\n <ui-icon icon=\"arrowDropDown\" role=\"presentation\" slot=\"suffix\"></ui-icon>\n </ui-text-field>\n <ui-list slot=\"dropdown\" role=\"menu\" selector=\"[data-value]\" selectActive>\n ${security.map((item) => this.authorizationSelectorItemTemplate(item))}\n </ui-list>\n </ui-dropdown-list>\n `;\n }\n\n /**\n * @returns The template for the security drop down selector list item.\n */\n protected authorizationSelectorItemTemplate(info: SecuritySelectorListItem): TemplateResult {\n const { labels, types, security } = info;\n \n const label = labels.join(', ');\n const type = types.join(', ');\n const single = !type;\n return html`\n <ui-list-item \n role=\"menuitem\" \n lines=\"${single ? 'one' : 'two'}\"\n data-id=\"${security.id}\"\n >\n ${label}\n ${!single ? html`<div slot=\"supporting-text\">${type}</div>` : ''}\n </ui-list-item>\n `;\n }\n\n protected formActionsTemplate(): TemplateResult {\n const loading = this.loadingRequest;\n return html`\n <div class=\"action-bar\">\n ${loading ? this.abortButtonTemplate() : this.sendButtonTemplate()}\n <ui-progress ?hidden=\"${!loading}\" indeterminate class=\"request-progress\"></ui-progress>\n </div>`;\n }\n\n /**\n * Creates a template for the \"abort\" button.\n */\n protected abortButtonTemplate(): TemplateResult {\n return html`\n <ui-button\n class=\"send-button abort\"\n type=\"filled\"\n @click=\"${this.abortHandler}\"\n >Abort</ui-button>`;\n }\n\n /**\n * Creates a template for the \"send\" or \"auth and send\" button.\n */\n protected sendButtonTemplate(): TemplateResult {\n return html`\n <ui-button\n class=\"send-button\"\n type=\"filled\"\n @click=\"${this.sendHandler}\"\n >Send</ui-button>`;\n }\n\n /**\n * @return A template for the server selector\n */\n protected serverSelectorTemplate(): TemplateResult {\n const {\n serverType,\n serverValue,\n allowCustomBaseUri,\n serverSelectorHidden,\n domainId,\n } = this;\n return html`\n <api-server-picker\n ?hidden=\"${serverSelectorHidden}\"\n ?custom=\"${allowCustomBaseUri}\"\n .value=\"${serverValue}\"\n .type=\"${serverType as ServerType}\"\n .domainId=\"${domainId}\"\n domainType=\"operation\"\n auto\n @serverscountchanged=\"${this.serverCountHandler}\"\n @apiserverchanged=\"${this.serverHandler}\"\n >\n <slot name=\"custom-base-uri\" slot=\"custom-base-uri\"></slot>\n </api-server-picker>`;\n }\n\n /**\n * @return \n */\n protected parametersTemplate(): TemplateResult | typeof nothing {\n const qp: OperationParameter[] = [];\n const path: OperationParameter[] = [];\n // NOTE, the \"* Required field\" has been added after the a11y audit of API Console.\n let hasRequired = false;\n const { amfParameters } = this;\n amfParameters.parametersValue.forEach((item) => {\n if (!hasRequired && item.parameter && item.parameter.required) {\n hasRequired = true;\n }\n if (item.binding === 'query') {\n qp.push(item);\n } else if (item.binding === 'path') {\n path.push(item);\n }\n });\n const { allowCustom, openedOptional = [] } = this;\n if (!allowCustom && !qp.length && !path.length) {\n return nothing;\n }\n const pathOptions = Object.freeze({ required: true });\n const queryClasses = {\n 'query-params': true,\n 'hide-optional': !!this.allowHideOptional && !openedOptional.includes('query'),\n };\n return html`\n <section class=\"params-section parameter\">\n <div class=\"section-title\"><span class=\"label\">Parameters</span></div>\n ${hasRequired ? html`<p class=\"required-field\">* Required field</p>` : ''}\n <div class=\"path-params\">\n ${path.map(param => amfParameters.parameterTemplate(param, pathOptions))}\n </div>\n <div class=\"${classMap(queryClasses)}\">\n ${this.renderToggleOptional('query', qp)}\n ${qp.map(param => amfParameters.parameterTemplate(param))}\n ${allowCustom ? this.addCustomButtonTemplate('query') : ''}\n </div>\n </section>\n `;\n }\n\n protected headersTemplate(): TemplateResult | typeof nothing {\n const headers: OperationParameter[] = [];\n // NOTE, the \"* Required field\" has been added after the a11y audit of API Console.\n let hasRequired = false;\n const { amfParameters } = this;\n amfParameters.parametersValue.forEach((item) => {\n if (item.binding === 'header') {\n headers.push(item);\n if (!hasRequired && item.parameter && item.parameter.required) {\n hasRequired = true;\n }\n }\n });\n const { allowCustom, openedOptional = [] } = this;\n if (!allowCustom && !headers.length) {\n return nothing;\n }\n const classes = {\n 'header-params': true,\n 'hide-optional': !!this.allowHideOptional && !openedOptional.includes('header'),\n };\n return html`\n <section class=\"params-section header\" aria-label=\"HTTP headers\">\n <div class=\"section-title\"><span class=\"label\">Headers</span></div>\n ${hasRequired ? html`<p class=\"required-field\">* Required field</p>` : ''}\n ${this.renderToggleOptional('header', headers)}\n <div class=\"${classMap(classes)}\">\n ${headers.map(param => amfParameters.parameterTemplate(param))}\n ${allowCustom ? this.addCustomButtonTemplate('header') : ''}\n </div>\n </section>\n `;\n }\n\n /**\n * @returns The template for the add custom parameter button\n */\n protected addCustomButtonTemplate(type: string): TemplateResult {\n return html`\n <div class=\"add-custom-button\">\n <ui-button\n data-type=\"${type}\"\n title=\"Adds a new custom parameter to the request\"\n @click=\"${this.addCustomHandler}\"\n type=\"outlined\"\n >\n <ui-icon icon=\"add\" role=\"presentation\"></ui-icon>\n Add custom\n </ui-button>\n </div>\n `;\n }\n\n /**\n * @return The template for the payload's mime type selector.\n */\n protected mediaTypeSelectorTemplate(): TemplateResult | typeof nothing {\n const { payloads, mimeType } = this;\n if (!payloads || payloads.length === 1) {\n return nothing;\n }\n const mimes = payloads.map(p => p.mediaType);\n let index = mimes.indexOf(mimeType);\n if (index === -1) {\n index = 0;\n }\n\n return html`\n <div class=\"payload-mime-selector\">\n <span id=\"body-mime\" class=\"label-large\">Body media type</span>\n ${mimes.map((item) => html`\n <label class=\"label-large\">\n <ui-radio\n name=\"mediaTypeValue\"\n value=\"${item || ''}\"\n .checked=\"${item === mimeType}\"\n @change=\"${this.handleMediaTypeSelect}\"\n ></ui-radio>\n ${item}\n </label>\n `)}\n </div>\n `;\n }\n\n /**\n * @returns The template for the body editor. \n */\n protected bodyTemplate(): TemplateResult | typeof nothing {\n const { payload } = this;\n if (!payload) {\n return nothing;\n }\n const info = getPayloadValue(payload);\n const mimeType = payload.mediaType;\n let content: TemplateResult;\n if (mimeType === 'application/x-www-form-urlencoded') {\n content = this.formDataEditorTemplate(info, payload.id);\n } else if (mimeType === 'multipart/form-data') {\n content = this.multipartEditorTemplate(info, payload.id);\n } else {\n content = this.rawEditorTemplate(info, payload.id, mimeType);\n }\n return html`\n <section class=\"params-section body\" aria-label=\"HTTP body\">\n <div class=\"section-title\"><span class=\"label\">Body</span></div>\n ${content}\n </section>\n `;\n }\n\n /**\n * @returns The template for the editor that specializes in the URL encoded form data\n */\n protected formDataEditorTemplate(info: PayloadInfo, id: string): TemplateResult {\n const editorModel = info.model;\n const effectiveValue = Array.isArray(editorModel) && editorModel.length ? undefined : info.value;\n return html`\n <http-body-urlencoded-editor \n class=\"body-editor\"\n autoEncode\n .value=\"${ifProperty(effectiveValue)}\"\n .model=\"${ifProperty(editorModel)}\"\n data-payload-id=\"${id}\"\n @change=\"${this.modelBodyEditorChangeHandler}\"\n ></http-body-urlencoded-editor>\n `;\n }\n\n /**\n * @returns The template for the editor that specializes in the multipart form data\n */\n protected multipartEditorTemplate(info: PayloadInfo, id: string): TemplateResult {\n const editorModel = info.model;\n const effectiveValue = Array.isArray(editorModel) && editorModel.length ? undefined : info.value;\n return html`\n <http-body-multipart-editor \n class=\"body-editor\"\n .value=\"${ifProperty(effectiveValue)}\"\n .model=\"${ifProperty(editorModel)}\"\n data-payload-id=\"${id}\"\n @change=\"${this.modelBodyEditorChangeHandler}\"\n ></http-body-multipart-editor>\n `;\n }\n\n /**\n * @returns The template for the editor that specializes in any text data\n */\n protected rawEditorTemplate(info: PayloadInfo, id: string, mimeType?: string): TemplateResult {\n let schemas;\n if (Array.isArray(info.schemas) && info.schemas.length) {\n schemas = info.schemas;\n }\n return html`\n <http-body-text-editor\n class=\"body-editor\" \n .value=\"${info.value as string}\" \n .contentType=\"${mimeType}\"\n .schemas=\"${ifProperty(schemas)}\"\n data-payload-id=\"${id}\"\n @change=\"${this.rawBodyChangeHandler}\"\n ></http-body-text-editor>\n `;\n }\n\n /**\n * @param target The name of the target parameter group.\n * @param params The list of parameters. When all are required or empty it won't render then button.\n * @returns Template for the switch button to toggle visibility of the optional items.\n */\n protected renderToggleOptional(target: string, params: OperationParameter[]): TemplateResult | typeof nothing {\n const { openedOptional = [], allowHideOptional } = this;\n if (!allowHideOptional || !params || !params.length) {\n return nothing;\n }\n const optional = params.some(p => !!p.parameter && !p.parameter.required);\n if (!optional) {\n return nothing;\n }\n const checked = openedOptional.includes(target);\n return html`\n <div class=\"optional-checkbox\">\n <label class=\"label-large\">\n <ui-switch\n class=\"toggle-optional-switch\"\n .checked=\"${checked}\"\n @change=\"${this.handleOptionalToggle}\"\n title=\"Toggles optional parameters\"\n data-target=\"${target}\"\n name=\"toggleOptional\"\n aria-label=\"Toggle optional parameters\"\n ></ui-switch>\n Show optional parameters\n </label>\n </div>\n `;\n }\n\n /**\n * @returns A template for the URL editor.\n */\n protected renderUrlEditor(): TemplateResult | typeof nothing {\n const { urlEditor, url, urlInvalid } = this;\n if (!urlEditor) {\n return nothing;\n }\n return html`\n <div class=\"url-input-wrapper\">\n <ui-text-field \n name=\"url\" \n type=\"url\" \n class=\"url-input\"\n ?invalid=\"${urlInvalid}\"\n required\n invalidText=\"The URL is invalid\"\n .value=\"${url || ''}\"\n @change=\"${this.handleUrlEditorChange}\"\n @blur=\"${this.validateUrl}\"\n label=\"Request URL\"\n ></ui-text-field>\n </div>\n `;\n }\n}\n"]}
@@ -37,10 +37,12 @@ export declare class Authorization extends ApiElement {
37
37
  authorizing: boolean;
38
38
  /**
39
39
  * Whether the UI should render the toggle button to toggle the enabled state of the security scheme
40
+ * @attribute
40
41
  */
41
42
  canToggle?: boolean;
42
43
  /**
43
44
  * Whether the UI should render the delete button
45
+ * @attribute
44
46
  */
45
47
  canDelete?: boolean;
46
48
  /**
@@ -48,7 +50,6 @@ export declare class Authorization extends ApiElement {
48
50
  * This does noting when `authorization` is not set.
49
51
  */
50
52
  toggleEnabled(): void;
51
- notifyChange(): void;
52
53
  protected handleDelete(): void;
53
54
  /**
54
55
  * Performs the authorization.
@@ -1 +1 @@
1
- {"version":3,"file":"Authorization.d.ts","sourceRoot":"","sources":["../../../../src/elements/authorization/ui/Authorization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAQ,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAGpD,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAG7C,OAAO,sCAAsC,CAAC;AAC9C,OAAO,iCAAiC,CAAC;AACzC,OAAO,+BAA+B,CAAC;AAEvC;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,UAAU;IAC3C;;OAEG;IACkB,SAAS,CAAC,IAAI,EAAG,eAAe,CAAC;IAEtD;;;OAGG;IACyB,aAAa,CAAC,EAAE,qBAAqB,CAAC;IAElE;;;OAGG;IACyC,QAAQ,UAAS;IAE7D;;;OAGG;IACyC,QAAQ,UAAS;IAE7D;;;OAGG;IACyC,WAAW,UAAS;IAEhE;;OAEG;IAC0B,SAAS,CAAC,EAAE,OAAO,CAAC;IAEjD;;OAEG;IAC0B,SAAS,CAAC,EAAE,OAAO,CAAC;IAEjD;;;OAGG;IACH,aAAa,IAAI,IAAI;IAUrB,YAAY,IAAI,IAAI;IAIpB,SAAS,CAAC,YAAY,IAAI,IAAI;IAI9B;;;;OAIG;IACG,SAAS,IAAI,OAAO,CAAC,OAAO,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C,YAAY,IAAI,cAAc,GAAG,OAAO,OAAO;IAkBzD,SAAS,CAAC,cAAc,IAAI,cAAc;IAM1C,SAAS,CAAC,kBAAkB,CAAC,aAAa,EAAE,qBAAqB,GAAG,cAAc,GAAG,OAAO,OAAO;IAenG,SAAS,CAAC,WAAW,CAAC,aAAa,EAAE,qBAAqB,GAAG,cAAc;IAQ3E,SAAS,CAAC,kBAAkB,IAAI,cAAc,GAAG,OAAO,OAAO;CAgBhE"}
@@ -45,9 +45,6 @@ export class Authorization extends ApiElement {
45
45
  this.requestUpdate();
46
46
  this.notifyChange();
47
47
  }
48
- notifyChange() {
49
- this.dispatchEvent(new Event('change'));
50
- }
51
48
  handleDelete() {
52
49
  this.dispatchEvent(new Event('delete'));
53
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Authorization.js","sourceRoot":"","sources":["../../../../src/elements/authorization/ui/Authorization.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,sCAAsC,CAAC;AAC9C,OAAO,iCAAiC,CAAC;AACzC,OAAO,+BAA+B,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,OAAO,aAAc,SAAQ,UAAU;IAA7C;;QAYE;;;WAGG;QACyC,aAAQ,GAAG,KAAK,CAAC;QAE7D;;;WAGG;QACyC,aAAQ,GAAG,KAAK,CAAC;QAE7D;;;WAGG;QACyC,gBAAW,GAAG,KAAK,CAAC;IAkHlE,CAAC;IAtGC;;;OAGG;IACH,aAAa;QACX,MAAM,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC;QAC/B,IAAI,CAAC,aAAa,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O,EAAE,CAAC;gDAAqB","sourcesContent":["import { IRequestAuthorization } from \"@api-client/core/build/browser.js\";\nimport { html, nothing, TemplateResult } from \"lit\";\nimport { property, query } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport ApiElement from \"../../ApiElement.js\";\nimport { authTypeToLabel } from \"../AuthLabels.js\";\nimport Input from \"../../../ui/input/Input.js\";\nimport '../../../define/ui/ui-icon-button.js';\nimport '../../../define/ui/ui-switch.js';\nimport '../../../define/ui/ui-icon.js';\n\n/**\n * An authorization element renders an UI allowing the user to provide client credentials.\n * \n * @fires delete - When the user requests to delete this authorization.\n * @fires change - When authorization values have changed via a user interaction.\n */\nexport class Authorization extends ApiElement {\n /**\n * The form element in the UI.\n */\n @query('form', true) protected form!: HTMLFormElement;\n\n /**\n * The request authorization object keeping the config.\n * @attribute\n */\n @property({ type: Object }) authorization?: IRequestAuthorization;\n\n /**\n * Whether the UI is in the disabled state.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * Whether the UI is in the read only state.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) readOnly = false;\n\n /**\n * Whether the element is currently authorizing the user.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) authorizing = false;\n\n /**\n * Whether the UI should render the toggle button to toggle the enabled state of the security scheme\n */\n @property({ type: Boolean }) canToggle?: boolean;\n\n /**\n * Whether the UI should render the delete button\n */\n @property({ type: Boolean }) canDelete?: boolean;\n\n /**\n * Toggles this authorization method enabled state.\n * This does noting when `authorization` is not set.\n */\n toggleEnabled(): void {\n const { authorization } = this;\n if (!authorization) {\n return;\n }\n authorization.enabled = !authorization.enabled;\n this.requestUpdate();\n this.notifyChange();\n }\n\n notifyChange(): void {\n this.dispatchEvent(new Event('change'));\n }\n\n protected handleDelete(): void {\n this.dispatchEvent(new Event('delete'))\n }\n\n /**\n * Performs the authorization.\n * This only applies to methods that have any authorization to perform\n * like Oauth 2.\n */\n async authorize(): Promise<unknown> {\n return null;\n }\n\n /**\n * @returns True when the element is valid.\n */\n checkValidity(): boolean {\n const { elements } = this.form;\n return !Array.from(elements).some(node => !(node as Input).checkValidity());\n }\n\n protected renderHeader(): TemplateResult | typeof nothing {\n const { authorization } = this;\n if (!authorization) {\n return nothing;\n }\n const classes = {\n 'auth-header': true,\n centered: !this.canDelete && !this.canToggle,\n };\n return html`\n <div class=\"${classMap(classes)}\">\n ${this.renderToggleSwitch(authorization)}\n ${this.renderTitle(authorization)}\n ${this.renderDeleteButton()}\n </div>\n `;\n }\n\n protected renderAuthInfo(): TemplateResult {\n return html`\n <p class=\"auth-info\">Note that the authorization header will be added when the request is sent. We encourage you to use variables to insert sensitive data.</p>\n `;\n }\n\n protected renderToggleSwitch(authorization: IRequestAuthorization): TemplateResult | typeof nothing {\n const { canToggle } = this;\n if (!canToggle) {\n return nothing;\n }\n return html`\n <ui-switch \n .checked=\"${!!authorization.enabled}\" \n @change=\"${this.toggleEnabled}\" \n aria-label=\"Toggle this authorization\"\n ?disabled=\"${this.readOnly || this.disabled}\"\n ></ui-switch>\n `;\n }\n\n protected renderTitle(authorization: IRequestAuthorization): TemplateResult {\n const { type } = authorization;\n const label = authTypeToLabel(type || '');\n return html`\n <span class=\"auth-title\">${label}</span>\n `;\n }\n\n protected renderDeleteButton(): TemplateResult | typeof nothing {\n const { canDelete } = this;\n if (!canDelete) {\n return nothing;\n }\n return html`\n <ui-icon-button \n aria-label=\"Delete this authorization\"\n title=\"Removes this authorization definition\" \n @click=\"${this.handleDelete}\"\n ?disabled=\"${this.readOnly}\"\n >\n <ui-icon icon=\"deleteOutline\" role=\"presentation\"></ui-icon>\n </ui-icon-button>\n `;\n }\n}\n"]}
1
+ {"version":3,"file":"Authorization.js","sourceRoot":"","sources":["../../../../src/elements/authorization/ui/Authorization.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,KAAK,E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QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDAAuC;AAMtB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAAkB;AAMjB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAAkB;AAMjB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDAAqB;AAMnC;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAAqB;AAMpB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAAqB","sourcesContent":["import { IRequestAuthorization } from \"@api-client/core/build/browser.js\";\nimport { html, nothing, TemplateResult } from \"lit\";\nimport { property, query } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport ApiElement from \"../../ApiElement.js\";\nimport { authTypeToLabel } from \"../AuthLabels.js\";\nimport Input from \"../../../ui/input/Input.js\";\nimport '../../../define/ui/ui-icon-button.js';\nimport '../../../define/ui/ui-switch.js';\nimport '../../../define/ui/ui-icon.js';\n\n/**\n * An authorization element renders an UI allowing the user to provide client credentials.\n * \n * @fires delete - When the user requests to delete this authorization.\n * @fires change - When authorization values have changed via a user interaction.\n */\nexport class Authorization extends ApiElement {\n /**\n * The form element in the UI.\n */\n @query('form', true) protected form!: HTMLFormElement;\n\n /**\n * The request authorization object keeping the config.\n * @attribute\n */\n @property({ type: Object }) authorization?: IRequestAuthorization;\n\n /**\n * Whether the UI is in the disabled state.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * Whether the UI is in the read only state.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) readOnly = false;\n\n /**\n * Whether the element is currently authorizing the user.\n * @attribute\n */\n @property({ type: Boolean, reflect: true }) authorizing = false;\n\n /**\n * Whether the UI should render the toggle button to toggle the enabled state of the security scheme\n * @attribute\n */\n @property({ type: Boolean }) canToggle?: boolean;\n\n /**\n * Whether the UI should render the delete button\n * @attribute\n */\n @property({ type: Boolean }) canDelete?: boolean;\n\n /**\n * Toggles this authorization method enabled state.\n * This does noting when `authorization` is not set.\n */\n toggleEnabled(): void {\n const { authorization } = this;\n if (!authorization) {\n return;\n }\n authorization.enabled = !authorization.enabled;\n this.requestUpdate();\n this.notifyChange();\n }\n \n protected handleDelete(): void {\n this.dispatchEvent(new Event('delete'))\n }\n\n /**\n * Performs the authorization.\n * This only applies to methods that have any authorization to perform\n * like Oauth 2.\n */\n async authorize(): Promise<unknown> {\n return null;\n }\n\n /**\n * @returns True when the element is valid.\n */\n checkValidity(): boolean {\n const { elements } = this.form;\n return !Array.from(elements).some(node => !(node as Input).checkValidity());\n }\n\n protected renderHeader(): TemplateResult | typeof nothing {\n const { authorization } = this;\n if (!authorization) {\n return nothing;\n }\n const classes = {\n 'auth-header': true,\n centered: !this.canDelete && !this.canToggle,\n };\n return html`\n <div class=\"${classMap(classes)}\">\n ${this.renderToggleSwitch(authorization)}\n ${this.renderTitle(authorization)}\n ${this.renderDeleteButton()}\n </div>\n `;\n }\n\n protected renderAuthInfo(): TemplateResult {\n return html`\n <p class=\"auth-info\">Note that the authorization header will be added when the request is sent. We encourage you to use variables to insert sensitive data.</p>\n `;\n }\n\n protected renderToggleSwitch(authorization: IRequestAuthorization): TemplateResult | typeof nothing {\n const { canToggle } = this;\n if (!canToggle) {\n return nothing;\n }\n return html`\n <ui-switch \n .checked=\"${!!authorization.enabled}\" \n @change=\"${this.toggleEnabled}\" \n aria-label=\"Toggle this authorization\"\n ?disabled=\"${this.readOnly || this.disabled}\"\n ></ui-switch>\n `;\n }\n\n protected renderTitle(authorization: IRequestAuthorization): TemplateResult {\n const { type } = authorization;\n const label = authTypeToLabel(type || '');\n return html`\n <span class=\"auth-title\">${label}</span>\n `;\n }\n\n protected renderDeleteButton(): TemplateResult | typeof nothing {\n const { canDelete } = this;\n if (!canDelete) {\n return nothing;\n }\n return html`\n <ui-icon-button \n aria-label=\"Delete this authorization\"\n title=\"Removes this authorization definition\" \n @click=\"${this.handleDelete}\"\n ?disabled=\"${this.readOnly}\"\n >\n <ui-icon icon=\"deleteOutline\" role=\"presentation\"></ui-icon>\n </ui-icon-button>\n `;\n }\n}\n"]}
@@ -0,0 +1,20 @@
1
+ import { TemplateResult, PropertyValues } from 'lit';
2
+ import { IDeleteCookieStep } from "@api-client/core/build/browser.js";
3
+ import UiDialog from "../../ui/dialog/UiDialog.js";
4
+ import '../../define/ui/ui-text-field.js';
5
+ /**
6
+ * A dialog used by the Flow builder to configure the Delete Cookie action.
7
+ */
8
+ export default class DeleteCookieAction extends UiDialog {
9
+ step?: IDeleteCookieStep;
10
+ dialogValue: IDeleteCookieStep;
11
+ constructor();
12
+ protected willUpdate(cp: PropertyValues<this>): void;
13
+ protected setupDialogValue(): void;
14
+ protected handleUrlChange(e: Event): void;
15
+ protected handleNameChange(e: Event): void;
16
+ renderIcon(): TemplateResult;
17
+ renderTitle(): TemplateResult;
18
+ renderBody(): TemplateResult;
19
+ }
20
+ //# sourceMappingURL=DeleteCookieAction.element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeleteCookieAction.element.d.ts","sourceRoot":"","sources":["../../../src/elements/dialog/DeleteCookieAction.element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAC;AAI3D,OAAO,EAAE,iBAAiB,EAAoB,MAAM,mCAAmC,CAAC;AACxF,OAAO,QAAQ,MAAM,6BAA6B,CAAC;AAEnD,OAAO,kCAAkC,CAAC;AAE1C;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,QAAQ;IAC1B,IAAI,CAAC,EAAE,iBAAiB,CAAC;IAE5C,WAAW,EAAE,iBAAiB,CAAmC;;cAQvD,UAAU,CAAC,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAO7D,SAAS,CAAC,gBAAgB,IAAI,IAAI;IASlC,SAAS,CAAC,eAAe,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI;IAKzC,SAAS,CAAC,gBAAgB,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI;IAKjC,UAAU,IAAI,cAAc;IAU5B,WAAW,IAAI,cAAc;IAU7B,UAAU,IAAI,cAAc;CA8BtC"}