@looker/api-explorer 0.9.43-alpha.1648 → 0.9.43

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 (618) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/jest.config.js +4 -1
  3. package/lib/ApiExplorer.js +3 -33
  4. package/lib/ApiExplorer.js.map +1 -1
  5. package/lib/App.js +1 -12
  6. package/lib/App.js.map +1 -1
  7. package/lib/StandaloneApiExplorer.js +0 -17
  8. package/lib/StandaloneApiExplorer.js.map +1 -1
  9. package/lib/components/Banner/Banner.js +0 -14
  10. package/lib/components/Banner/Banner.js.map +1 -1
  11. package/lib/components/Banner/index.js +0 -1
  12. package/lib/components/Banner/index.js.map +1 -1
  13. package/lib/components/DocActivityType/DocActivityType.js +0 -5
  14. package/lib/components/DocActivityType/DocActivityType.js.map +1 -1
  15. package/lib/components/DocActivityType/index.js +0 -1
  16. package/lib/components/DocActivityType/index.js.map +1 -1
  17. package/lib/components/DocCode/DocCode.js +0 -8
  18. package/lib/components/DocCode/DocCode.js.map +1 -1
  19. package/lib/components/DocCode/index.js +0 -1
  20. package/lib/components/DocCode/index.js.map +1 -1
  21. package/lib/components/DocMarkdown/DocMarkdown.js +0 -12
  22. package/lib/components/DocMarkdown/DocMarkdown.js.map +1 -1
  23. package/lib/components/DocMarkdown/index.js +0 -1
  24. package/lib/components/DocMarkdown/index.js.map +1 -1
  25. package/lib/components/DocMarkdown/utils.js +0 -5
  26. package/lib/components/DocMarkdown/utils.js.map +1 -1
  27. package/lib/components/DocMethodSummary/DocMethodSummary.js +0 -8
  28. package/lib/components/DocMethodSummary/DocMethodSummary.js.map +1 -1
  29. package/lib/components/DocMethodSummary/DocSummaryStatus.js +0 -6
  30. package/lib/components/DocMethodSummary/DocSummaryStatus.js.map +1 -1
  31. package/lib/components/DocMethodSummary/index.js +0 -3
  32. package/lib/components/DocMethodSummary/index.js.map +1 -1
  33. package/lib/components/DocMethodSummary/utils.js +1 -25
  34. package/lib/components/DocMethodSummary/utils.js.map +1 -1
  35. package/lib/components/DocPseudo/DocParam.js +0 -6
  36. package/lib/components/DocPseudo/DocParam.js.map +1 -1
  37. package/lib/components/DocPseudo/DocParams.js +0 -6
  38. package/lib/components/DocPseudo/DocParams.js.map +1 -1
  39. package/lib/components/DocPseudo/DocPrimaryResponse.js +0 -5
  40. package/lib/components/DocPseudo/DocPrimaryResponse.js.map +1 -1
  41. package/lib/components/DocPseudo/DocPseudo.js +0 -7
  42. package/lib/components/DocPseudo/DocPseudo.js.map +1 -1
  43. package/lib/components/DocPseudo/index.js +0 -1
  44. package/lib/components/DocPseudo/index.js.map +1 -1
  45. package/lib/components/DocRateLimited/DocRateLimited.js +0 -5
  46. package/lib/components/DocRateLimited/DocRateLimited.js.map +1 -1
  47. package/lib/components/DocRateLimited/index.js +0 -1
  48. package/lib/components/DocRateLimited/index.js.map +1 -1
  49. package/lib/components/DocReferences/DocReferences.js +0 -8
  50. package/lib/components/DocReferences/DocReferences.js.map +1 -1
  51. package/lib/components/DocReferences/index.js +0 -1
  52. package/lib/components/DocReferences/index.js.map +1 -1
  53. package/lib/components/DocReferences/utils.js +0 -7
  54. package/lib/components/DocReferences/utils.js.map +1 -1
  55. package/lib/components/DocSDKs/DocDeclarations.js +0 -6
  56. package/lib/components/DocSDKs/DocDeclarations.js.map +1 -1
  57. package/lib/components/DocSDKs/DocSDKs.js +0 -15
  58. package/lib/components/DocSDKs/DocSDKs.js.map +1 -1
  59. package/lib/components/DocSDKs/index.js +0 -1
  60. package/lib/components/DocSDKs/index.js.map +1 -1
  61. package/lib/components/DocSDKs/utils.js +0 -4
  62. package/lib/components/DocSDKs/utils.js.map +1 -1
  63. package/lib/components/DocSchema/DocSchema.js +0 -6
  64. package/lib/components/DocSchema/DocSchema.js.map +1 -1
  65. package/lib/components/DocSchema/index.js +0 -1
  66. package/lib/components/DocSchema/index.js.map +1 -1
  67. package/lib/components/DocSdkUsage/DocSdkExampleCell.js +0 -6
  68. package/lib/components/DocSdkUsage/DocSdkExampleCell.js.map +1 -1
  69. package/lib/components/DocSdkUsage/DocSdkUsage.js +0 -14
  70. package/lib/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
  71. package/lib/components/DocSdkUsage/index.js +0 -1
  72. package/lib/components/DocSdkUsage/index.js.map +1 -1
  73. package/lib/components/DocSdkUsage/utils.js +2 -11
  74. package/lib/components/DocSdkUsage/utils.js.map +1 -1
  75. package/lib/components/DocSource/DocSource.js +0 -11
  76. package/lib/components/DocSource/DocSource.js.map +1 -1
  77. package/lib/components/DocSource/index.js +0 -1
  78. package/lib/components/DocSource/index.js.map +1 -1
  79. package/lib/components/DocStatus/DocStatus.js +0 -7
  80. package/lib/components/DocStatus/DocStatus.js.map +1 -1
  81. package/lib/components/DocStatus/index.js +0 -1
  82. package/lib/components/DocStatus/index.js.map +1 -1
  83. package/lib/components/DocTitle/DocTitle.js +1 -7
  84. package/lib/components/DocTitle/DocTitle.js.map +1 -1
  85. package/lib/components/DocTitle/index.js +0 -1
  86. package/lib/components/DocTitle/index.js.map +1 -1
  87. package/lib/components/DocTypeSummary/DocTypeSummary.js +0 -8
  88. package/lib/components/DocTypeSummary/DocTypeSummary.js.map +1 -1
  89. package/lib/components/DocTypeSummary/index.js +0 -1
  90. package/lib/components/DocTypeSummary/index.js.map +1 -1
  91. package/lib/components/ErrorBoundary/ErrorBoundary.js +0 -12
  92. package/lib/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
  93. package/lib/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.js +0 -9
  94. package/lib/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.js.map +1 -1
  95. package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js +0 -5
  96. package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
  97. package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/index.js +0 -1
  98. package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/index.js.map +1 -1
  99. package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/index.js +0 -1
  100. package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/index.js.map +1 -1
  101. package/lib/components/ErrorBoundary/components/SomethingWentWrong/index.js +0 -1
  102. package/lib/components/ErrorBoundary/components/SomethingWentWrong/index.js.map +1 -1
  103. package/lib/components/ErrorBoundary/index.js +0 -1
  104. package/lib/components/ErrorBoundary/index.js.map +1 -1
  105. package/lib/components/ExploreType/ExploreProperty.js +2 -33
  106. package/lib/components/ExploreType/ExploreProperty.js.map +1 -1
  107. package/lib/components/ExploreType/ExploreType.js +1 -13
  108. package/lib/components/ExploreType/ExploreType.js.map +1 -1
  109. package/lib/components/ExploreType/exploreUtils.js +1 -44
  110. package/lib/components/ExploreType/exploreUtils.js.map +1 -1
  111. package/lib/components/ExploreType/index.js +24 -27
  112. package/lib/components/ExploreType/index.js.map +1 -1
  113. package/lib/components/Header/Header.js +1 -12
  114. package/lib/components/Header/Header.js.map +1 -1
  115. package/lib/components/Header/index.js +6 -7
  116. package/lib/components/Header/index.js.map +1 -1
  117. package/lib/components/Link/Link.js +1 -5
  118. package/lib/components/Link/Link.js.map +1 -1
  119. package/lib/components/Link/index.js +0 -1
  120. package/lib/components/Link/index.js.map +1 -1
  121. package/lib/components/SelectorContainer/ApiSpecSelector.js +0 -11
  122. package/lib/components/SelectorContainer/ApiSpecSelector.js.map +1 -1
  123. package/lib/components/SelectorContainer/SdkLanguageSelector.js +0 -13
  124. package/lib/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
  125. package/lib/components/SelectorContainer/SelectorContainer.js +5 -19
  126. package/lib/components/SelectorContainer/SelectorContainer.js.map +1 -1
  127. package/lib/components/SelectorContainer/index.js +0 -1
  128. package/lib/components/SelectorContainer/index.js.map +1 -1
  129. package/lib/components/SelectorContainer/utils.js +0 -4
  130. package/lib/components/SelectorContainer/utils.js.map +1 -1
  131. package/lib/components/SideNav/SearchMessage.js +0 -6
  132. package/lib/components/SideNav/SearchMessage.js.map +1 -1
  133. package/lib/components/SideNav/SideNav.js +1 -30
  134. package/lib/components/SideNav/SideNav.js.map +1 -1
  135. package/lib/components/SideNav/SideNavMethodTags.js +1 -6
  136. package/lib/components/SideNav/SideNavMethodTags.js.map +1 -1
  137. package/lib/components/SideNav/SideNavMethods.js +0 -16
  138. package/lib/components/SideNav/SideNavMethods.js.map +1 -1
  139. package/lib/components/SideNav/SideNavTypeTags.js +1 -6
  140. package/lib/components/SideNav/SideNavTypeTags.js.map +1 -1
  141. package/lib/components/SideNav/SideNavTypes.js +1 -17
  142. package/lib/components/SideNav/SideNavTypes.js.map +1 -1
  143. package/lib/components/SideNav/index.js +0 -1
  144. package/lib/components/SideNav/index.js.map +1 -1
  145. package/lib/components/SideNav/searchUtils.js +1 -8
  146. package/lib/components/SideNav/searchUtils.js.map +1 -1
  147. package/lib/components/common/Loader.js +0 -5
  148. package/lib/components/common/Loader.js.map +1 -1
  149. package/lib/components/common/common.js +2 -13
  150. package/lib/components/common/common.js.map +1 -1
  151. package/lib/components/common/index.js +0 -4
  152. package/lib/components/common/index.js.map +1 -1
  153. package/lib/components/index.js +32 -54
  154. package/lib/components/index.js.map +1 -1
  155. package/lib/custom.d.js.map +1 -1
  156. package/lib/esm/ApiExplorer.js +65 -68
  157. package/lib/esm/ApiExplorer.js.map +1 -1
  158. package/lib/esm/App.js +11 -12
  159. package/lib/esm/App.js.map +1 -1
  160. package/lib/esm/StandaloneApiExplorer.js +29 -24
  161. package/lib/esm/StandaloneApiExplorer.js.map +1 -1
  162. package/lib/esm/components/Banner/Banner.js +17 -15
  163. package/lib/esm/components/Banner/Banner.js.map +1 -1
  164. package/lib/esm/components/Banner/index.js +12 -1
  165. package/lib/esm/components/Banner/index.js.map +1 -1
  166. package/lib/esm/components/DocActivityType/DocActivityType.js +15 -7
  167. package/lib/esm/components/DocActivityType/DocActivityType.js.map +1 -1
  168. package/lib/esm/components/DocActivityType/index.js +12 -1
  169. package/lib/esm/components/DocActivityType/index.js.map +1 -1
  170. package/lib/esm/components/DocCode/DocCode.js +17 -9
  171. package/lib/esm/components/DocCode/DocCode.js.map +1 -1
  172. package/lib/esm/components/DocCode/index.js +12 -1
  173. package/lib/esm/components/DocCode/index.js.map +1 -1
  174. package/lib/esm/components/DocMarkdown/DocMarkdown.js +21 -15
  175. package/lib/esm/components/DocMarkdown/DocMarkdown.js.map +1 -1
  176. package/lib/esm/components/DocMarkdown/index.js +12 -1
  177. package/lib/esm/components/DocMarkdown/index.js.map +1 -1
  178. package/lib/esm/components/DocMarkdown/utils.js +10 -3
  179. package/lib/esm/components/DocMarkdown/utils.js.map +1 -1
  180. package/lib/esm/components/DocMethodSummary/DocMethodSummary.js +23 -15
  181. package/lib/esm/components/DocMethodSummary/DocMethodSummary.js.map +1 -1
  182. package/lib/esm/components/DocMethodSummary/DocSummaryStatus.js +15 -7
  183. package/lib/esm/components/DocMethodSummary/DocSummaryStatus.js.map +1 -1
  184. package/lib/esm/components/DocMethodSummary/index.js +26 -3
  185. package/lib/esm/components/DocMethodSummary/index.js.map +1 -1
  186. package/lib/esm/components/DocMethodSummary/utils.js +28 -32
  187. package/lib/esm/components/DocMethodSummary/utils.js.map +1 -1
  188. package/lib/esm/components/DocPseudo/DocParam.js +15 -7
  189. package/lib/esm/components/DocPseudo/DocParam.js.map +1 -1
  190. package/lib/esm/components/DocPseudo/DocParams.js +14 -5
  191. package/lib/esm/components/DocPseudo/DocParams.js.map +1 -1
  192. package/lib/esm/components/DocPseudo/DocPrimaryResponse.js +13 -5
  193. package/lib/esm/components/DocPseudo/DocPrimaryResponse.js.map +1 -1
  194. package/lib/esm/components/DocPseudo/DocPseudo.js +17 -9
  195. package/lib/esm/components/DocPseudo/DocPseudo.js.map +1 -1
  196. package/lib/esm/components/DocPseudo/index.js +12 -1
  197. package/lib/esm/components/DocPseudo/index.js.map +1 -1
  198. package/lib/esm/components/DocRateLimited/DocRateLimited.js +13 -5
  199. package/lib/esm/components/DocRateLimited/DocRateLimited.js.map +1 -1
  200. package/lib/esm/components/DocRateLimited/index.js +12 -1
  201. package/lib/esm/components/DocRateLimited/index.js.map +1 -1
  202. package/lib/esm/components/DocReferences/DocReferences.js +18 -10
  203. package/lib/esm/components/DocReferences/DocReferences.js.map +1 -1
  204. package/lib/esm/components/DocReferences/index.js +12 -1
  205. package/lib/esm/components/DocReferences/index.js.map +1 -1
  206. package/lib/esm/components/DocReferences/utils.js +19 -11
  207. package/lib/esm/components/DocReferences/utils.js.map +1 -1
  208. package/lib/esm/components/DocSDKs/DocDeclarations.js +15 -7
  209. package/lib/esm/components/DocSDKs/DocDeclarations.js.map +1 -1
  210. package/lib/esm/components/DocSDKs/DocSDKs.js +29 -24
  211. package/lib/esm/components/DocSDKs/DocSDKs.js.map +1 -1
  212. package/lib/esm/components/DocSDKs/index.js +12 -1
  213. package/lib/esm/components/DocSDKs/index.js.map +1 -1
  214. package/lib/esm/components/DocSDKs/utils.js +11 -3
  215. package/lib/esm/components/DocSDKs/utils.js.map +1 -1
  216. package/lib/esm/components/DocSchema/DocSchema.js +15 -7
  217. package/lib/esm/components/DocSchema/DocSchema.js.map +1 -1
  218. package/lib/esm/components/DocSchema/index.js +12 -1
  219. package/lib/esm/components/DocSchema/index.js.map +1 -1
  220. package/lib/esm/components/DocSdkUsage/DocSdkExampleCell.js +14 -6
  221. package/lib/esm/components/DocSdkUsage/DocSdkExampleCell.js.map +1 -1
  222. package/lib/esm/components/DocSdkUsage/DocSdkUsage.js +47 -39
  223. package/lib/esm/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
  224. package/lib/esm/components/DocSdkUsage/index.js +12 -1
  225. package/lib/esm/components/DocSdkUsage/index.js.map +1 -1
  226. package/lib/esm/components/DocSdkUsage/utils.js +24 -13
  227. package/lib/esm/components/DocSdkUsage/utils.js.map +1 -1
  228. package/lib/esm/components/DocSource/DocSource.js +21 -15
  229. package/lib/esm/components/DocSource/DocSource.js.map +1 -1
  230. package/lib/esm/components/DocSource/index.js +12 -1
  231. package/lib/esm/components/DocSource/index.js.map +1 -1
  232. package/lib/esm/components/DocStatus/DocStatus.js +16 -8
  233. package/lib/esm/components/DocStatus/DocStatus.js.map +1 -1
  234. package/lib/esm/components/DocStatus/index.js +12 -1
  235. package/lib/esm/components/DocStatus/index.js.map +1 -1
  236. package/lib/esm/components/DocTitle/DocTitle.js +11 -4
  237. package/lib/esm/components/DocTitle/DocTitle.js.map +1 -1
  238. package/lib/esm/components/DocTitle/index.js +12 -1
  239. package/lib/esm/components/DocTitle/index.js.map +1 -1
  240. package/lib/esm/components/DocTypeSummary/DocTypeSummary.js +18 -12
  241. package/lib/esm/components/DocTypeSummary/DocTypeSummary.js.map +1 -1
  242. package/lib/esm/components/DocTypeSummary/index.js +12 -1
  243. package/lib/esm/components/DocTypeSummary/index.js.map +1 -1
  244. package/lib/esm/components/ErrorBoundary/ErrorBoundary.js +14 -11
  245. package/lib/esm/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
  246. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.js +19 -11
  247. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.js.map +1 -1
  248. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js +53 -47
  249. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
  250. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/index.js +12 -1
  251. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/index.js.map +1 -1
  252. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/index.js +12 -1
  253. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/index.js.map +1 -1
  254. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/index.js +12 -1
  255. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/index.js.map +1 -1
  256. package/lib/esm/components/ErrorBoundary/index.js +12 -1
  257. package/lib/esm/components/ErrorBoundary/index.js.map +1 -1
  258. package/lib/esm/components/ExploreType/ExploreProperty.js +63 -56
  259. package/lib/esm/components/ExploreType/ExploreProperty.js.map +1 -1
  260. package/lib/esm/components/ExploreType/ExploreType.js +32 -23
  261. package/lib/esm/components/ExploreType/ExploreType.js.map +1 -1
  262. package/lib/esm/components/ExploreType/exploreUtils.js +51 -57
  263. package/lib/esm/components/ExploreType/exploreUtils.js.map +1 -1
  264. package/lib/esm/components/ExploreType/index.js +80 -3
  265. package/lib/esm/components/ExploreType/index.js.map +1 -1
  266. package/lib/esm/components/Header/Header.js +31 -20
  267. package/lib/esm/components/Header/Header.js.map +1 -1
  268. package/lib/esm/components/Header/index.js +24 -1
  269. package/lib/esm/components/Header/index.js.map +1 -1
  270. package/lib/esm/components/Link/Link.js +12 -4
  271. package/lib/esm/components/Link/Link.js.map +1 -1
  272. package/lib/esm/components/Link/index.js +12 -1
  273. package/lib/esm/components/Link/index.js.map +1 -1
  274. package/lib/esm/components/SelectorContainer/ApiSpecSelector.js +19 -13
  275. package/lib/esm/components/SelectorContainer/ApiSpecSelector.js.map +1 -1
  276. package/lib/esm/components/SelectorContainer/SdkLanguageSelector.js +25 -18
  277. package/lib/esm/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
  278. package/lib/esm/components/SelectorContainer/SelectorContainer.js +29 -23
  279. package/lib/esm/components/SelectorContainer/SelectorContainer.js.map +1 -1
  280. package/lib/esm/components/SelectorContainer/index.js +12 -1
  281. package/lib/esm/components/SelectorContainer/index.js.map +1 -1
  282. package/lib/esm/components/SelectorContainer/utils.js +11 -5
  283. package/lib/esm/components/SelectorContainer/utils.js.map +1 -1
  284. package/lib/esm/components/SideNav/SearchMessage.js +16 -8
  285. package/lib/esm/components/SideNav/SearchMessage.js.map +1 -1
  286. package/lib/esm/components/SideNav/SideNav.js +50 -53
  287. package/lib/esm/components/SideNav/SideNav.js.map +1 -1
  288. package/lib/esm/components/SideNav/SideNavMethodTags.js +15 -7
  289. package/lib/esm/components/SideNav/SideNavMethodTags.js.map +1 -1
  290. package/lib/esm/components/SideNav/SideNavMethods.js +32 -26
  291. package/lib/esm/components/SideNav/SideNavMethods.js.map +1 -1
  292. package/lib/esm/components/SideNav/SideNavTypeTags.js +15 -7
  293. package/lib/esm/components/SideNav/SideNavTypeTags.js.map +1 -1
  294. package/lib/esm/components/SideNav/SideNavTypes.js +33 -27
  295. package/lib/esm/components/SideNav/SideNavTypes.js.map +1 -1
  296. package/lib/esm/components/SideNav/index.js +12 -1
  297. package/lib/esm/components/SideNav/index.js.map +1 -1
  298. package/lib/esm/components/SideNav/searchUtils.js +15 -6
  299. package/lib/esm/components/SideNav/searchUtils.js.map +1 -1
  300. package/lib/esm/components/common/Loader.js +16 -8
  301. package/lib/esm/components/common/Loader.js.map +1 -1
  302. package/lib/esm/components/common/common.js +21 -13
  303. package/lib/esm/components/common/common.js.map +1 -1
  304. package/lib/esm/components/common/index.js +27 -2
  305. package/lib/esm/components/common/index.js.map +1 -1
  306. package/lib/esm/components/index.js +183 -22
  307. package/lib/esm/components/index.js.map +1 -1
  308. package/lib/esm/index.js +60 -5
  309. package/lib/esm/index.js.map +1 -1
  310. package/lib/esm/routes/AppRouter.js +30 -22
  311. package/lib/esm/routes/AppRouter.js.map +1 -1
  312. package/lib/esm/routes/index.js +12 -1
  313. package/lib/esm/routes/index.js.map +1 -1
  314. package/lib/esm/scenes/DiffScene/DiffScene.js +52 -51
  315. package/lib/esm/scenes/DiffScene/DiffScene.js.map +1 -1
  316. package/lib/esm/scenes/DiffScene/DocDiff/DiffBanner.js +18 -10
  317. package/lib/esm/scenes/DiffScene/DocDiff/DiffBanner.js.map +1 -1
  318. package/lib/esm/scenes/DiffScene/DocDiff/DiffItem.js +44 -35
  319. package/lib/esm/scenes/DiffScene/DocDiff/DiffItem.js.map +1 -1
  320. package/lib/esm/scenes/DiffScene/DocDiff/DiffLegend.js +26 -18
  321. package/lib/esm/scenes/DiffScene/DocDiff/DiffLegend.js.map +1 -1
  322. package/lib/esm/scenes/DiffScene/DocDiff/DocDiff.js +20 -11
  323. package/lib/esm/scenes/DiffScene/DocDiff/DocDiff.js.map +1 -1
  324. package/lib/esm/scenes/DiffScene/DocDiff/docDiffUtils.js +13 -11
  325. package/lib/esm/scenes/DiffScene/DocDiff/docDiffUtils.js.map +1 -1
  326. package/lib/esm/scenes/DiffScene/DocDiff/index.js +12 -1
  327. package/lib/esm/scenes/DiffScene/DocDiff/index.js.map +1 -1
  328. package/lib/esm/scenes/DiffScene/diffUtils.js +19 -14
  329. package/lib/esm/scenes/DiffScene/diffUtils.js.map +1 -1
  330. package/lib/esm/scenes/DiffScene/index.js +12 -1
  331. package/lib/esm/scenes/DiffScene/index.js.map +1 -1
  332. package/lib/esm/scenes/ErrorDetailScene/ErrorDetailScene.js +19 -11
  333. package/lib/esm/scenes/ErrorDetailScene/ErrorDetailScene.js.map +1 -1
  334. package/lib/esm/scenes/ErrorDetailScene/index.js +12 -1
  335. package/lib/esm/scenes/ErrorDetailScene/index.js.map +1 -1
  336. package/lib/esm/scenes/HomeScene/HomeScene.js +20 -6
  337. package/lib/esm/scenes/HomeScene/HomeScene.js.map +1 -1
  338. package/lib/esm/scenes/HomeScene/index.js +12 -1
  339. package/lib/esm/scenes/HomeScene/index.js.map +1 -1
  340. package/lib/esm/scenes/MethodScene/MethodScene.js +56 -57
  341. package/lib/esm/scenes/MethodScene/MethodScene.js.map +1 -1
  342. package/lib/esm/scenes/MethodScene/components/DocOperation.js +20 -12
  343. package/lib/esm/scenes/MethodScene/components/DocOperation.js.map +1 -1
  344. package/lib/esm/scenes/MethodScene/components/DocRequestBody.js +15 -7
  345. package/lib/esm/scenes/MethodScene/components/DocRequestBody.js.map +1 -1
  346. package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponseTypes.js +20 -11
  347. package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponseTypes.js.map +1 -1
  348. package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponses.js +28 -26
  349. package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponses.js.map +1 -1
  350. package/lib/esm/scenes/MethodScene/components/DocResponses/index.js +12 -1
  351. package/lib/esm/scenes/MethodScene/components/DocResponses/index.js.map +1 -1
  352. package/lib/esm/scenes/MethodScene/components/DocResponses/utils.js +8 -1
  353. package/lib/esm/scenes/MethodScene/components/DocResponses/utils.js.map +1 -1
  354. package/lib/esm/scenes/MethodScene/components/index.js +26 -3
  355. package/lib/esm/scenes/MethodScene/components/index.js.map +1 -1
  356. package/lib/esm/scenes/MethodScene/index.js +12 -1
  357. package/lib/esm/scenes/MethodScene/index.js.map +1 -1
  358. package/lib/esm/scenes/MethodTagScene/MethodTagScene.js +40 -35
  359. package/lib/esm/scenes/MethodTagScene/MethodTagScene.js.map +1 -1
  360. package/lib/esm/scenes/MethodTagScene/index.js +12 -1
  361. package/lib/esm/scenes/MethodTagScene/index.js.map +1 -1
  362. package/lib/esm/scenes/MethodTagScene/utils.js +8 -1
  363. package/lib/esm/scenes/MethodTagScene/utils.js.map +1 -1
  364. package/lib/esm/scenes/TypeScene/TypeScene.js +29 -20
  365. package/lib/esm/scenes/TypeScene/TypeScene.js.map +1 -1
  366. package/lib/esm/scenes/TypeScene/index.js +12 -1
  367. package/lib/esm/scenes/TypeScene/index.js.map +1 -1
  368. package/lib/esm/scenes/TypeTagScene/TypeTagScene.js +39 -34
  369. package/lib/esm/scenes/TypeTagScene/TypeTagScene.js.map +1 -1
  370. package/lib/esm/scenes/TypeTagScene/index.js +12 -1
  371. package/lib/esm/scenes/TypeTagScene/index.js.map +1 -1
  372. package/lib/esm/scenes/TypeTagScene/utils.js +8 -1
  373. package/lib/esm/scenes/TypeTagScene/utils.js.map +1 -1
  374. package/lib/esm/scenes/index.js +47 -6
  375. package/lib/esm/scenes/index.js.map +1 -1
  376. package/lib/esm/scenes/utils/hooks/index.js +12 -1
  377. package/lib/esm/scenes/utils/hooks/index.js.map +1 -1
  378. package/lib/esm/scenes/utils/hooks/tagStoreSync.js +21 -15
  379. package/lib/esm/scenes/utils/hooks/tagStoreSync.js.map +1 -1
  380. package/lib/esm/scenes/utils/index.js +12 -1
  381. package/lib/esm/scenes/utils/index.js.map +1 -1
  382. package/lib/esm/state/index.js +49 -4
  383. package/lib/esm/state/index.js.map +1 -1
  384. package/lib/esm/state/lodes/index.js +27 -2
  385. package/lib/esm/state/lodes/index.js.map +1 -1
  386. package/lib/esm/state/lodes/sagas.js +15 -12
  387. package/lib/esm/state/lodes/sagas.js.map +1 -1
  388. package/lib/esm/state/lodes/selectors.js +10 -3
  389. package/lib/esm/state/lodes/selectors.js.map +1 -1
  390. package/lib/esm/state/lodes/slice.js +19 -11
  391. package/lib/esm/state/lodes/slice.js.map +1 -1
  392. package/lib/esm/state/settings/index.js +27 -2
  393. package/lib/esm/state/settings/index.js.map +1 -1
  394. package/lib/esm/state/settings/sagas.js +29 -32
  395. package/lib/esm/state/settings/sagas.js.map +1 -1
  396. package/lib/esm/state/settings/selectors.js +16 -6
  397. package/lib/esm/state/settings/selectors.js.map +1 -1
  398. package/lib/esm/state/settings/slice.js +27 -22
  399. package/lib/esm/state/settings/slice.js.map +1 -1
  400. package/lib/esm/state/specs/index.js +27 -2
  401. package/lib/esm/state/specs/index.js.map +1 -1
  402. package/lib/esm/state/specs/sagas.js +24 -25
  403. package/lib/esm/state/specs/sagas.js.map +1 -1
  404. package/lib/esm/state/specs/selectors.js +10 -3
  405. package/lib/esm/state/specs/selectors.js.map +1 -1
  406. package/lib/esm/state/specs/slice.js +19 -14
  407. package/lib/esm/state/specs/slice.js.map +1 -1
  408. package/lib/esm/state/store.js +25 -26
  409. package/lib/esm/state/store.js.map +1 -1
  410. package/lib/esm/test-data/declarations.js +24 -0
  411. package/lib/esm/test-data/declarations.js.map +1 -0
  412. package/lib/esm/test-data/examples.js +376 -0
  413. package/lib/esm/test-data/examples.js.map +1 -0
  414. package/lib/esm/test-data/index.js +52 -0
  415. package/lib/esm/test-data/index.js.map +1 -0
  416. package/lib/esm/test-data/sdkLanguages.js +19 -0
  417. package/lib/esm/test-data/sdkLanguages.js.map +1 -0
  418. package/lib/esm/test-data/specs.js +48 -0
  419. package/lib/esm/test-data/specs.js.map +1 -0
  420. package/lib/esm/test-utils/index.js +38 -3
  421. package/lib/esm/test-utils/index.js.map +1 -1
  422. package/lib/esm/test-utils/lodes.js +12 -5
  423. package/lib/esm/test-utils/lodes.js.map +1 -1
  424. package/lib/esm/test-utils/redux.js +41 -30
  425. package/lib/esm/test-utils/redux.js.map +1 -1
  426. package/lib/esm/test-utils/router.js +15 -6
  427. package/lib/esm/test-utils/router.js.map +1 -1
  428. package/lib/esm/utils/adaptorUtils.js +26 -33
  429. package/lib/esm/utils/adaptorUtils.js.map +1 -1
  430. package/lib/esm/utils/apixAdaptor.js +22 -22
  431. package/lib/esm/utils/apixAdaptor.js.map +1 -1
  432. package/lib/esm/utils/highlight.js +11 -6
  433. package/lib/esm/utils/highlight.js.map +1 -1
  434. package/lib/esm/utils/hooks/globalStoreSync.js +22 -18
  435. package/lib/esm/utils/hooks/globalStoreSync.js.map +1 -1
  436. package/lib/esm/utils/hooks/index.js +26 -3
  437. package/lib/esm/utils/hooks/index.js.map +1 -1
  438. package/lib/esm/utils/hooks/navigation.js +10 -13
  439. package/lib/esm/utils/hooks/navigation.js.map +1 -1
  440. package/lib/esm/utils/hooks/useQuery.js +12 -5
  441. package/lib/esm/utils/hooks/useQuery.js.map +1 -1
  442. package/lib/esm/utils/index.js +101 -8
  443. package/lib/esm/utils/index.js.map +1 -1
  444. package/lib/esm/utils/lodeUtils.js +10 -15
  445. package/lib/esm/utils/lodeUtils.js.map +1 -1
  446. package/lib/esm/utils/path.js +35 -31
  447. package/lib/esm/utils/path.js.map +1 -1
  448. package/lib/esm/utils/sdkLanguage.js +18 -12
  449. package/lib/esm/utils/sdkLanguage.js.map +1 -1
  450. package/lib/esm/utils/useWindowSize.js +10 -5
  451. package/lib/esm/utils/useWindowSize.js.map +1 -1
  452. package/lib/index.js +0 -10
  453. package/lib/index.js.map +1 -1
  454. package/lib/routes/AppRouter.js +0 -8
  455. package/lib/routes/AppRouter.js.map +1 -1
  456. package/lib/routes/index.js +0 -1
  457. package/lib/routes/index.js.map +1 -1
  458. package/lib/scenes/DiffScene/DiffScene.js +0 -22
  459. package/lib/scenes/DiffScene/DiffScene.js.map +1 -1
  460. package/lib/scenes/DiffScene/DocDiff/DiffBanner.js +1 -7
  461. package/lib/scenes/DiffScene/DocDiff/DiffBanner.js.map +1 -1
  462. package/lib/scenes/DiffScene/DocDiff/DiffItem.js +1 -20
  463. package/lib/scenes/DiffScene/DocDiff/DiffItem.js.map +1 -1
  464. package/lib/scenes/DiffScene/DocDiff/DiffLegend.js +0 -8
  465. package/lib/scenes/DiffScene/DocDiff/DiffLegend.js.map +1 -1
  466. package/lib/scenes/DiffScene/DocDiff/DocDiff.js +0 -7
  467. package/lib/scenes/DiffScene/DocDiff/DocDiff.js.map +1 -1
  468. package/lib/scenes/DiffScene/DocDiff/docDiffUtils.js +0 -11
  469. package/lib/scenes/DiffScene/DocDiff/docDiffUtils.js.map +1 -1
  470. package/lib/scenes/DiffScene/DocDiff/index.js +0 -1
  471. package/lib/scenes/DiffScene/DocDiff/index.js.map +1 -1
  472. package/lib/scenes/DiffScene/diffUtils.js +1 -14
  473. package/lib/scenes/DiffScene/diffUtils.js.map +1 -1
  474. package/lib/scenes/DiffScene/index.js +0 -1
  475. package/lib/scenes/DiffScene/index.js.map +1 -1
  476. package/lib/scenes/ErrorDetailScene/ErrorDetailScene.js +0 -8
  477. package/lib/scenes/ErrorDetailScene/ErrorDetailScene.js.map +1 -1
  478. package/lib/scenes/ErrorDetailScene/index.js +0 -1
  479. package/lib/scenes/ErrorDetailScene/index.js.map +1 -1
  480. package/lib/scenes/HomeScene/HomeScene.js +8 -8
  481. package/lib/scenes/HomeScene/HomeScene.js.map +1 -1
  482. package/lib/scenes/HomeScene/index.js +0 -1
  483. package/lib/scenes/HomeScene/index.js.map +1 -1
  484. package/lib/scenes/MethodScene/MethodScene.js +0 -26
  485. package/lib/scenes/MethodScene/MethodScene.js.map +1 -1
  486. package/lib/scenes/MethodScene/components/DocOperation.js +0 -7
  487. package/lib/scenes/MethodScene/components/DocOperation.js.map +1 -1
  488. package/lib/scenes/MethodScene/components/DocRequestBody.js +0 -6
  489. package/lib/scenes/MethodScene/components/DocRequestBody.js.map +1 -1
  490. package/lib/scenes/MethodScene/components/DocResponses/DocResponseTypes.js +0 -7
  491. package/lib/scenes/MethodScene/components/DocResponses/DocResponseTypes.js.map +1 -1
  492. package/lib/scenes/MethodScene/components/DocResponses/DocResponses.js +0 -18
  493. package/lib/scenes/MethodScene/components/DocResponses/DocResponses.js.map +1 -1
  494. package/lib/scenes/MethodScene/components/DocResponses/index.js +0 -1
  495. package/lib/scenes/MethodScene/components/DocResponses/index.js.map +1 -1
  496. package/lib/scenes/MethodScene/components/DocResponses/utils.js +0 -2
  497. package/lib/scenes/MethodScene/components/DocResponses/utils.js.map +1 -1
  498. package/lib/scenes/MethodScene/components/index.js +0 -3
  499. package/lib/scenes/MethodScene/components/index.js.map +1 -1
  500. package/lib/scenes/MethodScene/index.js +0 -1
  501. package/lib/scenes/MethodScene/index.js.map +1 -1
  502. package/lib/scenes/MethodTagScene/MethodTagScene.js +0 -17
  503. package/lib/scenes/MethodTagScene/MethodTagScene.js.map +1 -1
  504. package/lib/scenes/MethodTagScene/index.js +0 -1
  505. package/lib/scenes/MethodTagScene/index.js.map +1 -1
  506. package/lib/scenes/MethodTagScene/utils.js +0 -2
  507. package/lib/scenes/MethodTagScene/utils.js.map +1 -1
  508. package/lib/scenes/TypeScene/TypeScene.js +0 -10
  509. package/lib/scenes/TypeScene/TypeScene.js.map +1 -1
  510. package/lib/scenes/TypeScene/index.js +0 -1
  511. package/lib/scenes/TypeScene/index.js.map +1 -1
  512. package/lib/scenes/TypeTagScene/TypeTagScene.js +0 -17
  513. package/lib/scenes/TypeTagScene/TypeTagScene.js.map +1 -1
  514. package/lib/scenes/TypeTagScene/index.js +0 -1
  515. package/lib/scenes/TypeTagScene/index.js.map +1 -1
  516. package/lib/scenes/TypeTagScene/utils.js +0 -2
  517. package/lib/scenes/TypeTagScene/utils.js.map +1 -1
  518. package/lib/scenes/index.js +4 -10
  519. package/lib/scenes/index.js.map +1 -1
  520. package/lib/scenes/utils/hooks/index.js +0 -1
  521. package/lib/scenes/utils/hooks/index.js.map +1 -1
  522. package/lib/scenes/utils/hooks/tagStoreSync.js +0 -8
  523. package/lib/scenes/utils/hooks/tagStoreSync.js.map +1 -1
  524. package/lib/scenes/utils/index.js +0 -1
  525. package/lib/scenes/utils/index.js.map +1 -1
  526. package/lib/state/index.js +0 -8
  527. package/lib/state/index.js.map +1 -1
  528. package/lib/state/lodes/index.js +0 -4
  529. package/lib/state/lodes/index.js.map +1 -1
  530. package/lib/state/lodes/sagas.js +0 -6
  531. package/lib/state/lodes/sagas.js.map +1 -1
  532. package/lib/state/lodes/selectors.js +1 -6
  533. package/lib/state/lodes/selectors.js.map +1 -1
  534. package/lib/state/lodes/slice.d.ts +2 -2
  535. package/lib/state/lodes/slice.js +1 -8
  536. package/lib/state/lodes/slice.js.map +1 -1
  537. package/lib/state/settings/index.js +0 -4
  538. package/lib/state/settings/index.js.map +1 -1
  539. package/lib/state/settings/sagas.js +5 -18
  540. package/lib/state/settings/sagas.js.map +1 -1
  541. package/lib/state/settings/selectors.d.ts +1 -1
  542. package/lib/state/settings/selectors.js +1 -12
  543. package/lib/state/settings/selectors.js.map +1 -1
  544. package/lib/state/settings/slice.d.ts +3 -3
  545. package/lib/state/settings/slice.js +6 -20
  546. package/lib/state/settings/slice.js.map +1 -1
  547. package/lib/state/specs/index.js +0 -4
  548. package/lib/state/specs/index.js.map +1 -1
  549. package/lib/state/specs/sagas.js +0 -10
  550. package/lib/state/specs/sagas.js.map +1 -1
  551. package/lib/state/specs/selectors.js +1 -6
  552. package/lib/state/specs/selectors.js.map +1 -1
  553. package/lib/state/specs/slice.d.ts +2 -2
  554. package/lib/state/specs/slice.js +1 -11
  555. package/lib/state/specs/slice.js.map +1 -1
  556. package/lib/state/store.js +5 -20
  557. package/lib/state/store.js.map +1 -1
  558. package/lib/test-data/declarations.js.map +1 -1
  559. package/lib/test-data/examples.js.map +1 -1
  560. package/lib/test-data/index.js +0 -7
  561. package/lib/test-data/index.js.map +1 -1
  562. package/lib/test-data/sdkLanguages.js +1 -1
  563. package/lib/test-data/sdkLanguages.js.map +1 -1
  564. package/lib/test-data/specs.js +6 -19
  565. package/lib/test-data/specs.js.map +1 -1
  566. package/lib/test-utils/index.js +0 -6
  567. package/lib/test-utils/index.js.map +1 -1
  568. package/lib/test-utils/lodes.d.ts +1 -1
  569. package/lib/test-utils/lodes.js +0 -4
  570. package/lib/test-utils/lodes.js.map +1 -1
  571. package/lib/test-utils/redux.d.ts +2 -2
  572. package/lib/test-utils/redux.js +6 -25
  573. package/lib/test-utils/redux.js.map +1 -1
  574. package/lib/test-utils/router.d.ts +1 -1
  575. package/lib/test-utils/router.js +1 -9
  576. package/lib/test-utils/router.js.map +1 -1
  577. package/lib/utils/adaptorUtils.js +1 -31
  578. package/lib/utils/adaptorUtils.js.map +1 -1
  579. package/lib/utils/apixAdaptor.js +1 -20
  580. package/lib/utils/apixAdaptor.js.map +1 -1
  581. package/lib/utils/highlight.js +0 -7
  582. package/lib/utils/highlight.js.map +1 -1
  583. package/lib/utils/hooks/globalStoreSync.js +0 -10
  584. package/lib/utils/hooks/globalStoreSync.js.map +1 -1
  585. package/lib/utils/hooks/index.js +4 -7
  586. package/lib/utils/hooks/index.js.map +1 -1
  587. package/lib/utils/hooks/navigation.js +0 -14
  588. package/lib/utils/hooks/navigation.js.map +1 -1
  589. package/lib/utils/hooks/useQuery.js +0 -4
  590. package/lib/utils/hooks/useQuery.js.map +1 -1
  591. package/lib/utils/index.js +10 -22
  592. package/lib/utils/index.js.map +1 -1
  593. package/lib/utils/lodeUtils.js +0 -15
  594. package/lib/utils/lodeUtils.js.map +1 -1
  595. package/lib/utils/path.js +5 -33
  596. package/lib/utils/path.js.map +1 -1
  597. package/lib/utils/sdkLanguage.js +5 -16
  598. package/lib/utils/sdkLanguage.js.map +1 -1
  599. package/lib/utils/useWindowSize.js +0 -3
  600. package/lib/utils/useWindowSize.js.map +1 -1
  601. package/package.json +27 -26
  602. package/src/ApiExplorer.tsx +2 -2
  603. package/src/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.tsx +169 -168
  604. package/src/components/SelectorContainer/ApiSpecSelector.spec.tsx +4 -2
  605. package/src/components/SelectorContainer/SdkLanguageSelector.spec.tsx +1 -1
  606. package/src/components/SideNav/SideNav.spec.tsx +2 -2
  607. package/src/components/SideNav/SideNavMethods.spec.tsx +1 -1
  608. package/src/components/SideNav/SideNavTypes.spec.tsx +1 -1
  609. package/src/scenes/DiffScene/DocDiff/DiffBanner.tsx +1 -1
  610. package/src/scenes/HomeScene/HomeScene.tsx +10 -1
  611. package/src/scenes/MethodScene/components/DocResponses/DocResponses.spec.tsx +2 -2
  612. package/src/scenes/utils/hooks/tagStoreSync.spec.ts +4 -2
  613. package/src/state/store.ts +2 -2
  614. package/src/utils/hooks/globalStoreSync.spec.tsx +5 -3
  615. package/webpack.dev.config.js +6 -2
  616. package/dist/bundle.js +0 -3
  617. package/dist/bundle.js.LICENSE.txt +0 -115
  618. package/dist/bundle.js.map +0 -1
@@ -1,61 +1,62 @@
1
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
1
+ "use strict";
2
2
 
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.MethodScene = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _components = require("@looker/components");
9
+ var _icons = require("@looker/icons");
10
+ var _reactRouterDom = require("react-router-dom");
11
+ var _runIt = require("@looker/run-it");
12
+ var _sdkCodegen = require("@looker/sdk-codegen");
13
+ var _reactRedux = require("react-redux");
14
+ var _utils = require("../../utils");
15
+ var _components2 = require("../../components");
16
+ var _state = require("../../state");
17
+ var _components3 = require("./components");
18
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
20
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
3
21
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
4
-
5
- import React, { useState, useEffect, useRef } from 'react';
6
- import { Aside, Button, ButtonOutline, Space, useToggle, ExtendComponentsThemeProvider, Span } from '@looker/components';
7
- import { Beaker } from '@looker/icons';
8
- import { useHistory, useParams } from 'react-router-dom';
9
- import { RunIt, RunItFormKey } from '@looker/run-it';
10
- import { typeRefs } from '@looker/sdk-codegen';
11
- import { useSelector } from 'react-redux';
12
- import { getApixAdaptor, useNavigation, useQuery } from '../../utils';
13
- import { ApixSection, DocActivityType, DocMarkdown, DocRateLimited, DocReferences, DocSDKs, DocSdkUsage, DocSource, DocStatus, DocTitle, DocSchema } from '../../components';
14
- import { selectSdkLanguage } from '../../state';
15
- import { DocOperation, DocRequestBody, DocResponses } from './components';
16
-
17
22
  var showRunIt = function () {
18
23
  var _ref = _asyncToGenerator(function* (adaptor) {
19
- var data = yield adaptor.localStorageGetItem(RunItFormKey);
24
+ var data = yield adaptor.localStorageGetItem(_runIt.RunItFormKey);
20
25
  return !!data;
21
26
  });
22
-
23
27
  return function showRunIt(_x) {
24
28
  return _ref.apply(this, arguments);
25
29
  };
26
30
  }();
27
-
28
- export var MethodScene = _ref2 => {
31
+ var MethodScene = _ref2 => {
29
32
  var _query$get;
30
-
31
33
  var {
32
34
  api
33
35
  } = _ref2;
34
- var adaptor = getApixAdaptor();
35
- var history = useHistory();
36
+ var adaptor = (0, _utils.getApixAdaptor)();
37
+ var history = (0, _reactRouterDom.useHistory)();
36
38
  var {
37
39
  navigate
38
- } = useNavigation();
39
- var sdkLanguage = useSelector(selectSdkLanguage);
40
+ } = (0, _utils.useNavigation)();
41
+ var sdkLanguage = (0, _reactRedux.useSelector)(_state.selectSdkLanguage);
40
42
  var {
41
43
  specKey,
42
44
  methodTag,
43
45
  methodName
44
- } = useParams();
46
+ } = (0, _reactRouterDom.useParams)();
45
47
  var {
46
48
  value,
47
49
  toggle,
48
50
  setOn
49
- } = useToggle();
50
- var [method, setMethod] = useState(api.methods[methodName]);
51
- var seeTypes = typeRefs(api, method === null || method === void 0 ? void 0 : method.customTypes);
52
- var query = useQuery();
51
+ } = (0, _components.useToggle)();
52
+ var [method, setMethod] = (0, _react.useState)(api.methods[methodName]);
53
+ var seeTypes = (0, _sdkCodegen.typeRefs)(api, method === null || method === void 0 ? void 0 : method.customTypes);
54
+ var query = (0, _utils.useQuery)();
53
55
  var errorCode = (_query$get = query.get('e')) !== null && _query$get !== void 0 ? _query$get : undefined;
54
- var RunItButton = value ? Button : ButtonOutline;
55
- var docResponsesRef = useRef(null);
56
- useEffect(() => {
56
+ var RunItButton = value ? _components.Button : _components.ButtonOutline;
57
+ var docResponsesRef = (0, _react.useRef)(null);
58
+ (0, _react.useEffect)(() => {
57
59
  var foundMethod = api.methods[methodName];
58
-
59
60
  if (foundMethod) {
60
61
  setMethod(api.methods[methodName]);
61
62
  } else {
@@ -66,12 +67,11 @@ export var MethodScene = _ref2 => {
66
67
  }
67
68
  }
68
69
  }, [api, history, methodName, methodTag, specKey]);
69
- useEffect(() => {
70
+ (0, _react.useEffect)(() => {
70
71
  var checkRunIt = function () {
71
72
  var _ref3 = _asyncToGenerator(function* () {
72
73
  try {
73
74
  var show = yield showRunIt(adaptor);
74
-
75
75
  if (show) {
76
76
  setOn();
77
77
  }
@@ -79,15 +79,13 @@ export var MethodScene = _ref2 => {
79
79
  console.error(error);
80
80
  }
81
81
  });
82
-
83
82
  return function checkRunIt() {
84
83
  return _ref3.apply(this, arguments);
85
84
  };
86
85
  }();
87
-
88
86
  checkRunIt();
89
87
  }, [adaptor, setOn]);
90
- useEffect(() => {
88
+ (0, _react.useEffect)(() => {
91
89
  if (method !== null && method !== void 0 && method.responses && errorCode) {
92
90
  if (docResponsesRef.current) {
93
91
  window.setTimeout(() => {
@@ -96,52 +94,52 @@ export var MethodScene = _ref2 => {
96
94
  }
97
95
  }
98
96
  }, [method]);
99
- var runItToggle = React.createElement(RunItButton, {
97
+ var runItToggle = _react.default.createElement(RunItButton, {
100
98
  color: value ? 'key' : 'neutral',
101
- iconBefore: React.createElement(Beaker, null),
99
+ iconBefore: _react.default.createElement(_icons.Beaker, null),
102
100
  onClick: toggle
103
101
  }, "Run It");
104
- return React.createElement(React.Fragment, null, method && React.createElement(ApixSection, null, React.createElement(Space, {
102
+ return _react.default.createElement(_react.default.Fragment, null, method && _react.default.createElement(_components2.ApixSection, null, _react.default.createElement(_components.Space, {
105
103
  between: true
106
- }, React.createElement(Space, null, React.createElement(DocTitle, null, method.summary), React.createElement(DocSource, {
104
+ }, _react.default.createElement(_components.Space, null, _react.default.createElement(_components2.DocTitle, null, method.summary), _react.default.createElement(_components2.DocSource, {
107
105
  method: method
108
- })), runItToggle), React.createElement(Space, {
106
+ })), runItToggle), _react.default.createElement(_components.Space, {
109
107
  mb: "large",
110
108
  gap: "small"
111
- }, React.createElement(DocStatus, {
109
+ }, _react.default.createElement(_components2.DocStatus, {
112
110
  method: method
113
- }), React.createElement(DocActivityType, {
111
+ }), _react.default.createElement(_components2.DocActivityType, {
114
112
  method: method
115
- }), React.createElement(DocRateLimited, {
113
+ }), _react.default.createElement(_components2.DocRateLimited, {
116
114
  method: method
117
- })), React.createElement(DocOperation, {
115
+ })), _react.default.createElement(_components3.DocOperation, {
118
116
  method: method
119
- }), React.createElement(DocMarkdown, {
117
+ }), _react.default.createElement(_components2.DocMarkdown, {
120
118
  source: method.description,
121
119
  specKey: specKey
122
- }), React.createElement(DocSDKs, {
120
+ }), _react.default.createElement(_components2.DocSDKs, {
123
121
  api: api,
124
122
  method: method
125
- }), React.createElement(DocRequestBody, {
123
+ }), _react.default.createElement(_components3.DocRequestBody, {
126
124
  api: api,
127
125
  method: method
128
- }), React.createElement(DocSdkUsage, {
126
+ }), _react.default.createElement(_components2.DocSdkUsage, {
129
127
  method: method
130
- }), React.createElement(DocReferences, {
128
+ }), _react.default.createElement(_components2.DocReferences, {
131
129
  typesUsed: seeTypes,
132
130
  api: api,
133
131
  specKey: specKey
134
- }), React.createElement(Span, {
132
+ }), _react.default.createElement(_components.Span, {
135
133
  ref: docResponsesRef
136
- }, React.createElement(DocResponses, {
134
+ }, _react.default.createElement(_components3.DocResponses, {
137
135
  api: api,
138
136
  method: method,
139
137
  errorCode: errorCode
140
- })), React.createElement(DocSchema, {
138
+ })), _react.default.createElement(_components2.DocSchema, {
141
139
  object: method.schema
142
- })), value && React.createElement(Aside, {
140
+ })), value && _react.default.createElement(_components.Aside, {
143
141
  width: "50rem"
144
- }, React.createElement(ExtendComponentsThemeProvider, {
142
+ }, _react.default.createElement(_components.ExtendComponentsThemeProvider, {
145
143
  themeCustomizations: {
146
144
  colors: {
147
145
  background: '#262D33',
@@ -151,7 +149,7 @@ export var MethodScene = _ref2 => {
151
149
  critical: '#FF877C'
152
150
  }
153
151
  }
154
- }, React.createElement(RunIt, {
152
+ }, _react.default.createElement(_runIt.RunIt, {
155
153
  adaptor: adaptor,
156
154
  key: method.operationId,
157
155
  sdkLanguage: sdkLanguage,
@@ -159,4 +157,5 @@ export var MethodScene = _ref2 => {
159
157
  method: method
160
158
  }))));
161
159
  };
160
+ exports.MethodScene = MethodScene;
162
161
  //# sourceMappingURL=MethodScene.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/scenes/MethodScene/MethodScene.tsx"],"names":["React","useState","useEffect","useRef","Aside","Button","ButtonOutline","Space","useToggle","ExtendComponentsThemeProvider","Span","Beaker","useHistory","useParams","RunIt","RunItFormKey","typeRefs","useSelector","getApixAdaptor","useNavigation","useQuery","ApixSection","DocActivityType","DocMarkdown","DocRateLimited","DocReferences","DocSDKs","DocSdkUsage","DocSource","DocStatus","DocTitle","DocSchema","selectSdkLanguage","DocOperation","DocRequestBody","DocResponses","showRunIt","adaptor","data","localStorageGetItem","MethodScene","api","history","navigate","sdkLanguage","specKey","methodTag","methodName","value","toggle","setOn","method","setMethod","methods","seeTypes","customTypes","query","errorCode","get","undefined","RunItButton","docResponsesRef","foundMethod","tags","checkRunIt","show","error","console","responses","current","window","setTimeout","scrollIntoView","runItToggle","summary","description","schema","colors","background","key","text","link","critical","operationId"],"mappings":";;;;AA2BA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,EAAqCC,MAArC,QAAmD,OAAnD;AACA,SACEC,KADF,EAEEC,MAFF,EAGEC,aAHF,EAIEC,KAJF,EAKEC,SALF,EAMEC,6BANF,EAOEC,IAPF,QAQO,oBARP;AASA,SAASC,MAAT,QAAuB,eAAvB;AACA,SAASC,UAAT,EAAqBC,SAArB,QAAsC,kBAAtC;AACA,SAASC,KAAT,EAAgBC,YAAhB,QAAoC,gBAApC;AAEA,SAASC,QAAT,QAAyB,qBAAzB;AACA,SAASC,WAAT,QAA4B,aAA5B;AAGA,SAASC,cAAT,EAAyBC,aAAzB,EAAwCC,QAAxC,QAAwD,aAAxD;AACA,SACEC,WADF,EAEEC,eAFF,EAGEC,WAHF,EAIEC,cAJF,EAKEC,aALF,EAMEC,OANF,EAOEC,WAPF,EAQEC,SARF,EASEC,SATF,EAUEC,QAVF,EAWEC,SAXF,QAYO,kBAZP;AAaA,SAASC,iBAAT,QAAkC,aAAlC;AACA,SAASC,YAAT,EAAuBC,cAAvB,EAAuCC,YAAvC,QAA2D,cAA3D;;AAYA,IAAMC,SAAS;AAAA,+BAAG,WAAOC,OAAP,EAAwC;AACxD,QAAMC,IAAI,SAASD,OAAO,CAACE,mBAAR,CAA4BxB,YAA5B,CAAnB;AACA,WAAO,CAAC,CAACuB,IAAT;AACD,GAHc;;AAAA,kBAATF,SAAS;AAAA;AAAA;AAAA,GAAf;;AAKA,OAAO,IAAMI,WAAiC,GAAG,SAAa;AAAA;;AAAA,MAAZ;AAAEC,IAAAA;AAAF,GAAY;AAC5D,MAAMJ,OAAO,GAAGnB,cAAc,EAA9B;AACA,MAAMwB,OAAO,GAAG9B,UAAU,EAA1B;AACA,MAAM;AAAE+B,IAAAA;AAAF,MAAexB,aAAa,EAAlC;AACA,MAAMyB,WAAW,GAAG3B,WAAW,CAACe,iBAAD,CAA/B;AAC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A,OAAO,EAAE7C,OADX;AAEE,IAAA,GAAG,EAAEc,MAAM,CAACgC,WAFd;AAGE,IAAA,WAAW,EAAEvC,WAHf;AAIE,IAAA,GAAG,EAAEH,GAJP;AAKE,IAAA,MAAM,EAAEU;AALV,IAXF,CADF,CA5BJ,CADF;AAqDD,CApHM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react'\nimport React, { useState, useEffect, useRef } from 'react'\nimport {\n Aside,\n Button,\n ButtonOutline,\n Space,\n useToggle,\n ExtendComponentsThemeProvider,\n Span,\n} from '@looker/components'\nimport { Beaker } from '@looker/icons'\nimport { useHistory, useParams } from 'react-router-dom'\nimport { RunIt, RunItFormKey } from '@looker/run-it'\nimport type { ApiModel } from '@looker/sdk-codegen'\nimport { typeRefs } from '@looker/sdk-codegen'\nimport { useSelector } from 'react-redux'\nimport type { IEnvironmentAdaptor } from '@looker/extension-utils'\n\nimport { getApixAdaptor, useNavigation, useQuery } from '../../utils'\nimport {\n ApixSection,\n DocActivityType,\n DocMarkdown,\n DocRateLimited,\n DocReferences,\n DocSDKs,\n DocSdkUsage,\n DocSource,\n DocStatus,\n DocTitle,\n DocSchema,\n} from '../../components'\nimport { selectSdkLanguage } from '../../state'\nimport { DocOperation, DocRequestBody, DocResponses } from './components'\n\ninterface MethodSceneProps {\n api: ApiModel\n}\n\ninterface MethodSceneParams {\n methodName: string\n methodTag: string\n specKey: string\n}\n\nconst showRunIt = async (adaptor: IEnvironmentAdaptor) => {\n const data = await adaptor.localStorageGetItem(RunItFormKey)\n return !!data\n}\n\nexport const MethodScene: FC<MethodSceneProps> = ({ api }) => {\n const adaptor = getApixAdaptor()\n const history = useHistory()\n const { navigate } = useNavigation()\n const sdkLanguage = useSelector(selectSdkLanguage)\n const { specKey, methodTag, methodName } = useParams<MethodSceneParams>()\n const { value, toggle, setOn } = useToggle()\n const [method, setMethod] = useState(api.methods[methodName])\n const seeTypes = typeRefs(api, method?.customTypes)\n const query = useQuery()\n const errorCode = query.get('e') ?? undefined\n const RunItButton = value ? Button : ButtonOutline\n const docResponsesRef = useRef<HTMLElement>(null)\n\n useEffect(() => {\n const foundMethod = api.methods[methodName]\n if (foundMethod) {\n setMethod(api.methods[methodName])\n } else {\n // Invalid method\n if (api.tags[methodTag]) {\n // Found tag though\n navigate(`/${specKey}/methods/${methodTag}`)\n } else {\n navigate(`/${specKey}/methods`)\n }\n }\n }, [api, history, methodName, methodTag, specKey])\n\n useEffect(() => {\n const checkRunIt = async () => {\n try {\n const show = await showRunIt(adaptor)\n if (show) {\n setOn()\n }\n } catch (error) {\n console.error(error)\n }\n }\n checkRunIt()\n }, [adaptor, setOn])\n\n useEffect(() => {\n if (method?.responses && errorCode) {\n if (docResponsesRef.current) {\n window.setTimeout(() => {\n docResponsesRef.current!.scrollIntoView()\n }, 300)\n }\n }\n }, [method])\n\n const runItToggle = (\n <RunItButton\n color={value ? 'key' : 'neutral'}\n iconBefore={<Beaker />}\n onClick={toggle}\n >\n Run It\n </RunItButton>\n )\n\n return (\n <>\n {method && (\n <ApixSection>\n <Space between>\n <Space>\n <DocTitle>{method.summary}</DocTitle>\n <DocSource method={method} />\n </Space>\n {runItToggle}\n </Space>\n <Space mb=\"large\" gap=\"small\">\n <DocStatus method={method} />\n <DocActivityType method={method} />\n <DocRateLimited method={method} />\n </Space>\n <DocOperation method={method} />\n <DocMarkdown source={method.description} specKey={specKey} />\n <DocSDKs api={api} method={method} />\n <DocRequestBody api={api} method={method} />\n <DocSdkUsage method={method} />\n <DocReferences typesUsed={seeTypes} api={api} specKey={specKey} />\n <Span ref={docResponsesRef}>\n <DocResponses api={api} method={method} errorCode={errorCode} />\n </Span>\n <DocSchema object={method.schema} />\n </ApixSection>\n )}\n {value && (\n <Aside width=\"50rem\">\n <ExtendComponentsThemeProvider\n themeCustomizations={{\n colors: {\n background: '#262D33',\n key: '#8AB4F8',\n text: '#fff',\n link: '#8AB4F8',\n critical: '#FF877C',\n },\n }}\n >\n <RunIt\n adaptor={adaptor}\n key={method.operationId}\n sdkLanguage={sdkLanguage}\n api={api}\n method={method}\n />\n </ExtendComponentsThemeProvider>\n </Aside>\n )}\n </>\n )\n}\n"],"file":"MethodScene.js"}
1
+ {"version":3,"file":"MethodScene.js","names":["showRunIt","adaptor","data","localStorageGetItem","RunItFormKey","MethodScene","api","getApixAdaptor","history","useHistory","navigate","useNavigation","sdkLanguage","useSelector","selectSdkLanguage","specKey","methodTag","methodName","useParams","value","toggle","setOn","useToggle","method","setMethod","useState","methods","seeTypes","typeRefs","customTypes","query","useQuery","errorCode","get","undefined","RunItButton","Button","ButtonOutline","docResponsesRef","useRef","useEffect","foundMethod","tags","checkRunIt","show","error","console","responses","current","window","setTimeout","scrollIntoView","runItToggle","summary","description","schema","colors","background","key","text","link","critical","operationId"],"sources":["../../../../src/scenes/MethodScene/MethodScene.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react'\nimport React, { useState, useEffect, useRef } from 'react'\nimport {\n Aside,\n Button,\n ButtonOutline,\n Space,\n useToggle,\n ExtendComponentsThemeProvider,\n Span,\n} from '@looker/components'\nimport { Beaker } from '@looker/icons'\nimport { useHistory, useParams } from 'react-router-dom'\nimport { RunIt, RunItFormKey } from '@looker/run-it'\nimport type { ApiModel } from '@looker/sdk-codegen'\nimport { typeRefs } from '@looker/sdk-codegen'\nimport { useSelector } from 'react-redux'\nimport type { IEnvironmentAdaptor } from '@looker/extension-utils'\n\nimport { getApixAdaptor, useNavigation, useQuery } from '../../utils'\nimport {\n ApixSection,\n DocActivityType,\n DocMarkdown,\n DocRateLimited,\n DocReferences,\n DocSDKs,\n DocSdkUsage,\n DocSource,\n DocStatus,\n DocTitle,\n DocSchema,\n} from '../../components'\nimport { selectSdkLanguage } from '../../state'\nimport { DocOperation, DocRequestBody, DocResponses } from './components'\n\ninterface MethodSceneProps {\n api: ApiModel\n}\n\ninterface MethodSceneParams {\n methodName: string\n methodTag: string\n specKey: string\n}\n\nconst showRunIt = async (adaptor: IEnvironmentAdaptor) => {\n const data = await adaptor.localStorageGetItem(RunItFormKey)\n return !!data\n}\n\nexport const MethodScene: FC<MethodSceneProps> = ({ api }) => {\n const adaptor = getApixAdaptor()\n const history = useHistory()\n const { navigate } = useNavigation()\n const sdkLanguage = useSelector(selectSdkLanguage)\n const { specKey, methodTag, methodName } = useParams<MethodSceneParams>()\n const { value, toggle, setOn } = useToggle()\n const [method, setMethod] = useState(api.methods[methodName])\n const seeTypes = typeRefs(api, method?.customTypes)\n const query = useQuery()\n const errorCode = query.get('e') ?? undefined\n const RunItButton = value ? Button : ButtonOutline\n const docResponsesRef = useRef<HTMLElement>(null)\n\n useEffect(() => {\n const foundMethod = api.methods[methodName]\n if (foundMethod) {\n setMethod(api.methods[methodName])\n } else {\n // Invalid method\n if (api.tags[methodTag]) {\n // Found tag though\n navigate(`/${specKey}/methods/${methodTag}`)\n } else {\n navigate(`/${specKey}/methods`)\n }\n }\n }, [api, history, methodName, methodTag, specKey])\n\n useEffect(() => {\n const checkRunIt = async () => {\n try {\n const show = await showRunIt(adaptor)\n if (show) {\n setOn()\n }\n } catch (error) {\n console.error(error)\n }\n }\n checkRunIt()\n }, [adaptor, setOn])\n\n useEffect(() => {\n if (method?.responses && errorCode) {\n if (docResponsesRef.current) {\n window.setTimeout(() => {\n docResponsesRef.current!.scrollIntoView()\n }, 300)\n }\n }\n }, [method])\n\n const runItToggle = (\n <RunItButton\n color={value ? 'key' : 'neutral'}\n iconBefore={<Beaker />}\n onClick={toggle}\n >\n Run It\n </RunItButton>\n )\n\n return (\n <>\n {method && (\n <ApixSection>\n <Space between>\n <Space>\n <DocTitle>{method.summary}</DocTitle>\n <DocSource method={method} />\n </Space>\n {runItToggle}\n </Space>\n <Space mb=\"large\" gap=\"small\">\n <DocStatus method={method} />\n <DocActivityType method={method} />\n <DocRateLimited method={method} />\n </Space>\n <DocOperation method={method} />\n <DocMarkdown source={method.description} specKey={specKey} />\n <DocSDKs api={api} method={method} />\n <DocRequestBody api={api} method={method} />\n <DocSdkUsage method={method} />\n <DocReferences typesUsed={seeTypes} api={api} specKey={specKey} />\n <Span ref={docResponsesRef}>\n <DocResponses api={api} method={method} errorCode={errorCode} />\n </Span>\n <DocSchema object={method.schema} />\n </ApixSection>\n )}\n {value && (\n <Aside width=\"50rem\">\n <ExtendComponentsThemeProvider\n themeCustomizations={{\n colors: {\n background: '#262D33',\n key: '#8AB4F8',\n text: '#fff',\n link: '#8AB4F8',\n critical: '#FF877C',\n },\n }}\n >\n <RunIt\n adaptor={adaptor}\n key={method.operationId}\n sdkLanguage={sdkLanguage}\n api={api}\n method={method}\n />\n </ExtendComponentsThemeProvider>\n </Aside>\n )}\n </>\n )\n}\n"],"mappings":";;;;;;AA2BA;AACA;AASA;AACA;AACA;AAEA;AACA;AAGA;AACA;AAaA;AACA;AAAyE;AAAA;AAAA;AAAA;AAYzE,IAAMA,SAAS;EAAA,6BAAG,WAAOC,OAA4B,EAAK;IACxD,IAAMC,IAAI,SAASD,OAAO,CAACE,mBAAmB,CAACC,mBAAY,CAAC;IAC5D,OAAO,CAAC,CAACF,IAAI;EACf,CAAC;EAAA,gBAHKF,SAAS;IAAA;EAAA;AAAA,GAGd;AAEM,IAAMK,WAAiC,GAAG,SAAa;EAAA;EAAA,IAAZ;IAAEC;EAAI,CAAC;EACvD,IAAML,OAAO,GAAG,IAAAM,qBAAc,GAAE;EAChC,IAAMC,OAAO,GAAG,IAAAC,0BAAU,GAAE;EAC5B,IAAM;IAAEC;EAAS,CAAC,GAAG,IAAAC,oBAAa,GAAE;EACpC,IAAMC,WAAW,GAAG,IAAAC,uBAAW,EAACC,wBAAiB,CAAC;EAClD,IAAM;IAAEC,OAAO;IAAEC,SAAS;IAAEC;EAAW,CAAC,GAAG,IAAAC,yBAAS,GAAqB;EACzE,IAAM;IAAEC,KAAK;IAAEC,MAAM;IAAEC;EAAM,CAAC,GAAG,IAAA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AAC,oBAAO;IAAC,GAAG,EAAET,GAAI;IAAC,MAAM,EAAEiB;EAAO,EAAG,EACrC,6BAAC,2BAAc;IAAC,GAAG,EAAEjB,GAAI;IAAC,MAAM,EAAEiB;EAAO,EAAG,EAC5C,6BAAC,wBAAW;IAAC,MAAM,EAAEA;EAAO,EAAG,EAC/B,6BAAC,0BAAa;IAAC,SAAS,EAAEI,QAAS;IAAC,GAAG,EAAErB,GAAI;IAAC,OAAO,EAAES;EAAQ,EAAG,EAClE,6BAAC,gBAAI;IAAC,GAAG,EAAEuB;EAAgB,GACzB,6BAAC,yBAAY;IAAC,GAAG,EAAEhC,GAAI;IAAC,MAAM,EAAEiB,MAAO;IAAC,SAAS,EAAES;EAAU,EAAG,CAC3D,EACP,6BAAC,sBAAS;IAAC,MAAM,EAAET,MAAM,CAACgC;EAAO,EAAG,CAEvC,EACApC,KAAK,IACJ,6BAAC,iBAAK;IAAC,KAAK,EAAC;EAAO,GAClB,6BAAC,yCAA6B;IAC5B,mBAAmB,EAAE;MACnBqC,MAAM,EAAE;QACNC,UAAU,EAAE,SAAS;QACrBC,GAAG,EAAE,SAAS;QACdC,IAAI,EAAE,MAAM;QACZC,IAAI,EAAE,SAAS;QACfC,QAAQ,EAAE;MACZ;IACF;EAAE,GAEF,6BAAC,YAAK;IACJ,OAAO,EAAE5D,OAAQ;IACjB,GAAG,EAAEsB,MAAM,CAACuC,WAAY;IACxB,WAAW,EAAElD,WAAY;IACzB,GAAG,EAAEN,GAAI;IACT,MAAM,EAAEiB;EAAO,EACf,CAC4B,CAEnC,CACA;AAEP,CAAC;AAAA"}
@@ -1,30 +1,38 @@
1
- import React from 'react';
2
- import { Code, Flex, SpaceVertical, Text } from '@looker/components';
3
- import { MethodBadge } from '@looker/run-it';
4
- import { DocPseudo } from '../../../components';
5
- export var DocOperation = _ref => {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DocOperation = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _components = require("@looker/components");
9
+ var _runIt = require("@looker/run-it");
10
+ var _components2 = require("../../../components");
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ var DocOperation = _ref => {
6
13
  var {
7
14
  method
8
15
  } = _ref;
9
- return React.createElement(SpaceVertical, {
16
+ return _react.default.createElement(_components.SpaceVertical, {
10
17
  align: "start",
11
18
  mb: "large",
12
19
  gap: "xsmall"
13
- }, React.createElement(MethodBadge, {
20
+ }, _react.default.createElement(_runIt.MethodBadge, {
14
21
  type: method.httpMethod
15
- }, React.createElement(DocPseudo, {
22
+ }, _react.default.createElement(_components2.DocPseudo, {
16
23
  method: method
17
- })), React.createElement(MethodBadge, {
24
+ })), _react.default.createElement(_runIt.MethodBadge, {
18
25
  type: method.httpMethod
19
- }, React.createElement(Flex, {
26
+ }, _react.default.createElement(_components.Flex, {
20
27
  alignItems: "center"
21
- }, React.createElement(Text, {
28
+ }, _react.default.createElement(_components.Text, {
22
29
  fontSize: "xsmall",
23
30
  fontWeight: "semiBold",
24
31
  mr: "xxsmall"
25
- }, method.httpMethod), React.createElement(Code, {
32
+ }, method.httpMethod), _react.default.createElement(_components.Code, {
26
33
  fontSize: "small",
27
34
  fontWeight: "normal"
28
35
  }, method.endpoint))));
29
36
  };
37
+ exports.DocOperation = DocOperation;
30
38
  //# sourceMappingURL=DocOperation.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/scenes/MethodScene/components/DocOperation.tsx"],"names":["React","Code","Flex","SpaceVertical","Text","MethodBadge","DocPseudo","DocOperation","method","httpMethod","endpoint"],"mappings":"AA0BA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,IAAT,EAAeC,IAAf,EAAqBC,aAArB,EAAoCC,IAApC,QAAgD,oBAAhD;AACA,SAASC,WAAT,QAA4B,gBAA5B;AAEA,SAASC,SAAT,QAA0B,qBAA1B;AAMA,OAAO,IAAMC,YAAmC,GAAG;AAAA,MAAC;AAAEC,IAAAA;AAAF,GAAD;AAAA,SACjD,oBAAC,aAAD;AAAe,IAAA,KAAK,EAAC,OAArB;AAA6B,IAAA,EAAE,EAAC,OAAhC;AAAwC,IAAA,GAAG,EAAC;AAA5C,KACE,oBAAC,WAAD;AAAa,IAAA,IAAI,EAAEA,MAAM,CAACC;AAA1B,KACE,oBAAC,SAAD;AAAW,IAAA,MAAM,EAAED;AAAnB,IADF,CADF,EAIE,oBAAC,WAAD;AAAa,IAAA,IAAI,EAAEA,MAAM,CAACC;AAA1B,KACE,oBAAC,IAAD;AAAM,IAAA,UAAU,EAAC;AAAjB,KACE,oBAAC,IAAD;AAAM,IAAA,QAAQ,EAAC,QAAf;AAAwB,IAAA,UAAU,EAAC,UAAnC;AAA8C,IAAA,EAAE,EAAC;AAAjD,KACGD,MAAM,CAACC,UADV,CADF,EAIE,oBAAC,IAAD;AAAM,IAAA,QAAQ,EAAC,OAAf;AAAuB,IAAA,UAAU,EAAC;AAAlC,KACGD,MAAM,CAACE,QADV,CAJF,CADF,CAJF,CADiD;AAAA,CAA5C","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { FC } from 'react'\nimport React from 'react'\nimport type { IMethod } from '@looker/sdk-codegen'\nimport { Code, Flex, SpaceVertical, Text } from '@looker/components'\nimport { MethodBadge } from '@looker/run-it'\n\nimport { DocPseudo } from '../../../components'\n\ninterface DocOperationProps {\n method: IMethod\n}\n\nexport const DocOperation: FC<DocOperationProps> = ({ method }) => (\n <SpaceVertical align=\"start\" mb=\"large\" gap=\"xsmall\">\n <MethodBadge type={method.httpMethod}>\n <DocPseudo method={method} />\n </MethodBadge>\n <MethodBadge type={method.httpMethod}>\n <Flex alignItems=\"center\">\n <Text fontSize=\"xsmall\" fontWeight=\"semiBold\" mr=\"xxsmall\">\n {method.httpMethod}\n </Text>\n <Code fontSize=\"small\" fontWeight=\"normal\">\n {method.endpoint}\n </Code>\n </Flex>\n </MethodBadge>\n </SpaceVertical>\n)\n"],"file":"DocOperation.js"}
1
+ {"version":3,"file":"DocOperation.js","names":["DocOperation","method","httpMethod","endpoint"],"sources":["../../../../../src/scenes/MethodScene/components/DocOperation.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { FC } from 'react'\nimport React from 'react'\nimport type { IMethod } from '@looker/sdk-codegen'\nimport { Code, Flex, SpaceVertical, Text } from '@looker/components'\nimport { MethodBadge } from '@looker/run-it'\n\nimport { DocPseudo } from '../../../components'\n\ninterface DocOperationProps {\n method: IMethod\n}\n\nexport const DocOperation: FC<DocOperationProps> = ({ method }) => (\n <SpaceVertical align=\"start\" mb=\"large\" gap=\"xsmall\">\n <MethodBadge type={method.httpMethod}>\n <DocPseudo method={method} />\n </MethodBadge>\n <MethodBadge type={method.httpMethod}>\n <Flex alignItems=\"center\">\n <Text fontSize=\"xsmall\" fontWeight=\"semiBold\" mr=\"xxsmall\">\n {method.httpMethod}\n </Text>\n <Code fontSize=\"small\" fontWeight=\"normal\">\n {method.endpoint}\n </Code>\n </Flex>\n </MethodBadge>\n </SpaceVertical>\n)\n"],"mappings":";;;;;;AA0BA;AAEA;AACA;AAEA;AAA+C;AAMxC,IAAMA,YAAmC,GAAG;EAAA,IAAC;IAAEC;EAAO,CAAC;EAAA,OAC5D,6BAAC,yBAAa;IAAC,KAAK,EAAC,OAAO;IAAC,EAAE,EAAC,OAAO;IAAC,GAAG,EAAC;EAAQ,GAClD,6BAAC,kBAAW;IAAC,IAAI,EAAEA,MAAM,CAACC;EAAW,GACnC,6BAAC,sBAAS;IAAC,MAAM,EAAED;EAAO,EAAG,CACjB,EACd,6BAAC,kBAAW;IAAC,IAAI,EAAEA,MAAM,CAACC;EAAW,GACnC,6BAAC,gBAAI;IAAC,UAAU,EAAC;EAAQ,GACvB,6BAAC,gBAAI;IAAC,QAAQ,EAAC,QAAQ;IAAC,UAAU,EAAC,UAAU;IAAC,EAAE,EAAC;EAAS,GACvDD,MAAM,CAACC,UAAU,CACb,EACP,6BAAC,gBAAI;IAAC,QAAQ,EAAC,OAAO;IAAC,UAAU,EAAC;EAAQ,GACvCD,MAAM,CAACE,QAAQ,CACX,CACF,CACK,CACA;AAAA,CACjB;AAAA"}
@@ -1,22 +1,30 @@
1
- import React from 'react';
2
- import { CollapserCard } from '@looker/run-it';
3
- import { ExploreType } from '../../../components';
4
- export var DocRequestBody = _ref => {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DocRequestBody = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _runIt = require("@looker/run-it");
9
+ var _components = require("../../../components");
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ var DocRequestBody = _ref => {
5
12
  var {
6
13
  method,
7
14
  api
8
15
  } = _ref;
9
16
  var bodies = method.bodyParams;
10
- if (bodies.length === 0) return React.createElement(React.Fragment, null);
17
+ if (bodies.length === 0) return _react.default.createElement(_react.default.Fragment, null);
11
18
  var header = bodies.length > 1 ? 'Request bodies' : 'Request body';
12
- return React.createElement(CollapserCard, {
19
+ return _react.default.createElement(_runIt.CollapserCard, {
13
20
  id: "bodies",
14
21
  heading: header
15
- }, React.createElement(React.Fragment, null, bodies.map(body => React.createElement(ExploreType, {
22
+ }, _react.default.createElement(_react.default.Fragment, null, bodies.map(body => _react.default.createElement(_components.ExploreType, {
16
23
  api: api,
17
24
  type: body.type,
18
25
  open: false,
19
26
  key: "body.".concat(body.name)
20
27
  }))));
21
28
  };
29
+ exports.DocRequestBody = DocRequestBody;
22
30
  //# sourceMappingURL=DocRequestBody.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/scenes/MethodScene/components/DocRequestBody.tsx"],"names":["React","CollapserCard","ExploreType","DocRequestBody","method","api","bodies","bodyParams","length","header","map","body","type","name"],"mappings":"AA0BA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,aAAT,QAA8B,gBAA9B;AACA,SAASC,WAAT,QAA4B,qBAA5B;AAWA,OAAO,IAAMC,cAAuC,GAAG,QAAqB;AAAA,MAApB;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAAoB;AAC1E,MAAMC,MAAM,GAAGF,MAAM,CAACG,UAAtB;AACA,MAAID,MAAM,CAACE,MAAP,KAAkB,CAAtB,EAAyB,OAAO,yCAAP;AACzB,MAAMC,MAAM,GAAGH,MAAM,CAACE,MAAP,GAAgB,CAAhB,GAAoB,gBAApB,GAAuC,cAAtD;AAEA,SACE,oBAAC,aAAD;AAAe,IAAA,EAAE,EAAC,QAAlB;AAA2B,IAAA,OAAO,EAAEC;AAApC,KACE,0CACGH,MAAM,CAACI,GAAP,CAAYC,IAAD,IACV,oBAAC,WAAD;AACE,IAAA,GAAG,EAAEN,GADP;AAEE,IAAA,IAAI,EAAEM,IAAI,CAACC,IAFb;AAGE,IAAA,IAAI,EAAE,KAHR;AAIE,IAAA,GAAG,iBAAUD,IAAI,CAACE,IAAf;AAJL,IADD,CADH,CADF,CADF;AAcD,CAnBM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { FC } from 'react'\nimport React from 'react'\nimport type { ApiModel, IMethod } from '@looker/sdk-codegen'\nimport { CollapserCard } from '@looker/run-it'\nimport { ExploreType } from '../../../components'\n\ninterface DocRequestBodyProps {\n method: IMethod\n api: ApiModel\n}\n\n/**\n * If a method has request body parameters, display them\n * @param method to document\n */\nexport const DocRequestBody: FC<DocRequestBodyProps> = ({ method, api }) => {\n const bodies = method.bodyParams\n if (bodies.length === 0) return <></>\n const header = bodies.length > 1 ? 'Request bodies' : 'Request body'\n\n return (\n <CollapserCard id=\"bodies\" heading={header}>\n <>\n {bodies.map((body) => (\n <ExploreType\n api={api}\n type={body.type}\n open={false}\n key={`body.${body.name}`}\n />\n ))}\n </>\n </CollapserCard>\n )\n}\n"],"file":"DocRequestBody.js"}
1
+ {"version":3,"file":"DocRequestBody.js","names":["DocRequestBody","method","api","bodies","bodyParams","length","header","map","body","type","name"],"sources":["../../../../../src/scenes/MethodScene/components/DocRequestBody.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { FC } from 'react'\nimport React from 'react'\nimport type { ApiModel, IMethod } from '@looker/sdk-codegen'\nimport { CollapserCard } from '@looker/run-it'\nimport { ExploreType } from '../../../components'\n\ninterface DocRequestBodyProps {\n method: IMethod\n api: ApiModel\n}\n\n/**\n * If a method has request body parameters, display them\n * @param method to document\n */\nexport const DocRequestBody: FC<DocRequestBodyProps> = ({ method, api }) => {\n const bodies = method.bodyParams\n if (bodies.length === 0) return <></>\n const header = bodies.length > 1 ? 'Request bodies' : 'Request body'\n\n return (\n <CollapserCard id=\"bodies\" heading={header}>\n <>\n {bodies.map((body) => (\n <ExploreType\n api={api}\n type={body.type}\n open={false}\n key={`body.${body.name}`}\n />\n ))}\n </>\n </CollapserCard>\n )\n}\n"],"mappings":";;;;;;AA0BA;AAEA;AACA;AAAiD;AAW1C,IAAMA,cAAuC,GAAG,QAAqB;EAAA,IAApB;IAAEC,MAAM;IAAEC;EAAI,CAAC;EACrE,IAAMC,MAAM,GAAGF,MAAM,CAACG,UAAU;EAChC,IAAID,MAAM,CAACE,MAAM,KAAK,CAAC,EAAE,OAAO,2DAAK;EACrC,IAAMC,MAAM,GAAGH,MAAM,CAACE,MAAM,GAAG,CAAC,GAAG,gBAAgB,GAAG,cAAc;EAEpE,OACE,6BAAC,oBAAa;IAAC,EAAE,EAAC,QAAQ;IAAC,OAAO,EAAEC;EAAO,GACzC,4DACGH,MAAM,CAACI,GAAG,CAAEC,IAAI,IACf,6BAAC,uBAAW;IACV,GAAG,EAAEN,GAAI;IACT,IAAI,EAAEM,IAAI,CAACC,IAAK;IAChB,IAAI,EAAE,KAAM;IACZ,GAAG,iBAAUD,IAAI,CAACE,IAAI;EAAG,EAE5B,CAAC,CACD,CACW;AAEpB,CAAC;AAAA"}
@@ -1,30 +1,38 @@
1
- import React, { useState, useEffect } from 'react';
2
- import { ButtonToggle, ButtonItem } from '@looker/components';
3
- import { ExploreType } from '../../../../components';
4
- export var DocResponseTypes = _ref => {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DocResponseTypes = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _components = require("@looker/components");
9
+ var _components2 = require("../../../../components");
10
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
+ var DocResponseTypes = _ref => {
5
13
  var {
6
14
  api,
7
15
  responses
8
16
  } = _ref;
9
17
  var mediaTypes = Object.keys(responses);
10
- var [selectedMediaType, setSelectedMediaType] = useState(mediaTypes[0]);
11
- var [resps, setResps] = useState(responses);
12
- useEffect(() => {
18
+ var [selectedMediaType, setSelectedMediaType] = (0, _react.useState)(mediaTypes[0]);
19
+ var [resps, setResps] = (0, _react.useState)(responses);
20
+ (0, _react.useEffect)(() => {
13
21
  setSelectedMediaType(mediaTypes[0]);
14
22
  setResps(responses);
15
23
  }, [responses, mediaTypes]);
16
- return React.createElement(React.Fragment, null, React.createElement(ButtonToggle, {
24
+ return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_components.ButtonToggle, {
17
25
  value: selectedMediaType,
18
26
  onChange: setSelectedMediaType,
19
27
  mt: "large",
20
28
  mb: "large"
21
- }, mediaTypes.map(mediaType => React.createElement(ButtonItem, {
29
+ }, mediaTypes.map(mediaType => _react.default.createElement(_components.ButtonItem, {
22
30
  key: mediaType
23
- }, mediaType))), React.createElement("div", {
31
+ }, mediaType))), _react.default.createElement("div", {
24
32
  style: {
25
33
  overflow: 'auto'
26
34
  }
27
- }, React.createElement(ExploreType, {
35
+ }, _react.default.createElement(_components2.ExploreType, {
28
36
  api: api,
29
37
  key: selectedMediaType,
30
38
  type: resps[selectedMediaType].type,
@@ -32,4 +40,5 @@ export var DocResponseTypes = _ref => {
32
40
  maxDepth: 2
33
41
  })));
34
42
  };
43
+ exports.DocResponseTypes = DocResponseTypes;
35
44
  //# sourceMappingURL=DocResponseTypes.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/scenes/MethodScene/components/DocResponses/DocResponseTypes.tsx"],"names":["React","useState","useEffect","ButtonToggle","ButtonItem","ExploreType","DocResponseTypes","api","responses","mediaTypes","Object","keys","selectedMediaType","setSelectedMediaType","resps","setResps","map","mediaType","overflow","type"],"mappings":"AA0BA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,SAASC,YAAT,EAAuBC,UAAvB,QAAyC,oBAAzC;AAOA,SAASC,WAAT,QAA4B,wBAA5B;AAaA,OAAO,IAAMC,gBAAgB,GAAG,QAA+C;AAAA,MAA9C;AAAEC,IAAAA,GAAF;AAAOC,IAAAA;AAAP,GAA8C;AAC7E,MAAMC,UAAU,GAAGC,MAAM,CAACC,IAAP,CAAYH,SAAZ,CAAnB;AACA,MAAM,CAACI,iBAAD,EAAoBC,oBAApB,IAA4CZ,QAAQ,CAACQ,UAAU,CAAC,CAAD,CAAX,CAA1D;AACA,MAAM,CAACK,KAAD,EAAQC,QAAR,IAAoBd,QAAQ,CAACO,SAAD,CAAlC;AAEAN,EAAAA,SAAS,CAAC,MAAM;AAEdW,IAAAA,oBAAoB,CAACJ,UAAU,CAAC,CAAD,CAAX,CAApB;AACAM,IAAAA,QAAQ,CAACP,SAAD,CAAR;AACD,GAJQ,EAIN,CAACA,SAAD,EAAYC,UAAZ,CAJM,CAAT;AAOA,SACE,0CACE,oBAAC,YAAD;AACE,IAAA,KAAK,EAAEG,iBADT;AAEE,IAAA,QAAQ,EAAEC,oBAFZ;AAGE,IAAA,EAAE,EAAC,OAHL;AAIE,IAAA,EAAE,EAAC;AAJL,KAMGJ,UAAU,CAACO,GAAX,CAAgBC,SAAD,IACd,oBAAC,UAAD;AAAY,IAAA,GAAG,EAAEA;AAAjB,KAA6BA,SAA7B,CADD,CANH,CADF,EAWE;AAAK,IAAA,KAAK,EAAE;AAAEC,MAAAA,QAAQ,EAAE;AAAZ;AAAZ,KACE,oBAAC,WAAD;AACE,IAAA,GAAG,EAAEX,GADP;AAEE,IAAA,GAAG,EAAEK,iBAFP;AAGE,IAAA,IAAI,EAAEE,KAAK,CAACF,iBAAD,CAAL,CAAyBO,IAHjC;AAIE,IAAA,IAAI,EAAE,IAJR;AAKE,IAAA,QAAQ,EAAE;AALZ,IADF,CAXF,CADF;AAuBD,CAnCM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { useState, useEffect } from 'react'\nimport { ButtonToggle, ButtonItem } from '@looker/components'\nimport type {\n ApiModel,\n KeyedCollection,\n IMethodResponse,\n} from '@looker/sdk-codegen'\n\nimport { ExploreType } from '../../../../components'\n\ninterface DocResponseTypesProps {\n api: ApiModel\n /** responses to render */\n responses: KeyedCollection<IMethodResponse>\n}\n\n/**\n * Given a collection of media types (keys) and responses (values) for a response code, generate a group of buttons for\n * toggling media type and render the response\n * @param response\n */\nexport const DocResponseTypes = ({ api, responses }: DocResponseTypesProps) => {\n const mediaTypes = Object.keys(responses)\n const [selectedMediaType, setSelectedMediaType] = useState(mediaTypes[0])\n const [resps, setResps] = useState(responses)\n\n useEffect(() => {\n /** When new responses are passed, update the default selected media type */\n setSelectedMediaType(mediaTypes[0])\n setResps(responses)\n }, [responses, mediaTypes])\n\n // TODO: Account for endpoints with no responses (e.g. delete a custom cmd)\n return (\n <>\n <ButtonToggle\n value={selectedMediaType}\n onChange={setSelectedMediaType}\n mt=\"large\"\n mb=\"large\"\n >\n {mediaTypes.map((mediaType) => (\n <ButtonItem key={mediaType}>{mediaType}</ButtonItem>\n ))}\n </ButtonToggle>\n <div style={{ overflow: 'auto' }}>\n <ExploreType\n api={api}\n key={selectedMediaType}\n type={resps[selectedMediaType].type}\n link={true}\n maxDepth={2}\n />\n </div>\n </>\n )\n}\n"],"file":"DocResponseTypes.js"}
1
+ {"version":3,"file":"DocResponseTypes.js","names":["DocResponseTypes","api","responses","mediaTypes","Object","keys","selectedMediaType","setSelectedMediaType","useState","resps","setResps","useEffect","map","mediaType","overflow","type"],"sources":["../../../../../../src/scenes/MethodScene/components/DocResponses/DocResponseTypes.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { useState, useEffect } from 'react'\nimport { ButtonToggle, ButtonItem } from '@looker/components'\nimport type {\n ApiModel,\n KeyedCollection,\n IMethodResponse,\n} from '@looker/sdk-codegen'\n\nimport { ExploreType } from '../../../../components'\n\ninterface DocResponseTypesProps {\n api: ApiModel\n /** responses to render */\n responses: KeyedCollection<IMethodResponse>\n}\n\n/**\n * Given a collection of media types (keys) and responses (values) for a response code, generate a group of buttons for\n * toggling media type and render the response\n * @param response\n */\nexport const DocResponseTypes = ({ api, responses }: DocResponseTypesProps) => {\n const mediaTypes = Object.keys(responses)\n const [selectedMediaType, setSelectedMediaType] = useState(mediaTypes[0])\n const [resps, setResps] = useState(responses)\n\n useEffect(() => {\n /** When new responses are passed, update the default selected media type */\n setSelectedMediaType(mediaTypes[0])\n setResps(responses)\n }, [responses, mediaTypes])\n\n // TODO: Account for endpoints with no responses (e.g. delete a custom cmd)\n return (\n <>\n <ButtonToggle\n value={selectedMediaType}\n onChange={setSelectedMediaType}\n mt=\"large\"\n mb=\"large\"\n >\n {mediaTypes.map((mediaType) => (\n <ButtonItem key={mediaType}>{mediaType}</ButtonItem>\n ))}\n </ButtonToggle>\n <div style={{ overflow: 'auto' }}>\n <ExploreType\n api={api}\n key={selectedMediaType}\n type={resps[selectedMediaType].type}\n link={true}\n maxDepth={2}\n />\n </div>\n </>\n )\n}\n"],"mappings":";;;;;;AA0BA;AACA;AAOA;AAAoD;AAAA;AAa7C,IAAMA,gBAAgB,GAAG,QAA+C;EAAA,IAA9C;IAAEC,GAAG;IAAEC;EAAiC,CAAC;EACxE,IAAMC,UAAU,GAAGC,MAAM,CAACC,IAAI,CAACH,SAAS,CAAC;EACzC,IAAM,CAACI,iBAAiB,EAAEC,oBAAoB,CAAC,GAAG,IAAAC,eAAQ,EAACL,UAAU,CAAC,CAAC,CAAC,CAAC;EACzE,IAAM,CAACM,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAF,eAAQ,EAACN,SAAS,CAAC;EAE7C,IAAAS,gBAAS,EAAC,MAAM;IAEdJ,oBAAoB,CAACJ,UAAU,CAAC,CAAC,CAAC,CAAC;IACnCO,QAAQ,CAACR,SAAS,CAAC;EACrB,CAAC,EAAE,CAACA,SAAS,EAAEC,UAAU,CAAC,CAAC;EAG3B,OACE,4DACE,6BAAC,wBAAY;IACX,KAAK,EAAEG,iBAAkB;IACzB,QAAQ,EAAEC,oBAAqB;IAC/B,EAAE,EAAC,OAAO;IACV,EAAE,EAAC;EAAO,GAETJ,UAAU,CAACS,GAAG,CAAEC,SAAS,IACxB,6BAAC,sBAAU;IAAC,GAAG,EAAEA;EAAU,GAAEA,SAAS,CACvC,CAAC,CACW,EACf;IAAK,KAAK,EAAE;MAAEC,QAAQ,EAAE;IAAO;EAAE,GAC/B,6BAAC,wBAAW;IACV,GAAG,EAAEb,GAAI;IACT,GAAG,EAAEK,iBAAkB;IACvB,IAAI,EAAEG,KAAK,CAACH,iBAAiB,CAAC,CAACS,IAAK;IACpC,IAAI,EAAE,IAAK;IACX,QAAQ,EAAE;EAAE,EACZ,CACE,CACL;AAEP,CAAC;AAAA"}
@@ -1,26 +1,31 @@
1
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
1
+ "use strict";
2
2
 
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DocResponses = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _components = require("@looker/components");
9
+ var _runIt = require("@looker/run-it");
10
+ var _sdkRtl = require("@looker/sdk-rtl");
11
+ var _extensionUtils = require("@looker/extension-utils");
12
+ var _DocResponseTypes = require("./DocResponseTypes");
13
+ var _utils = require("./utils");
14
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
3
17
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
4
-
5
- import React, { useEffect, useState } from 'react';
6
- import { Tabs2, Tab2 } from '@looker/components';
7
- import { CollapserCard } from '@looker/run-it';
8
- import { ErrorDoc } from '@looker/sdk-rtl';
9
- import { apiErrorDisplayFetch, ExtMarkdown, getEnvAdaptor } from '@looker/extension-utils';
10
- import { DocResponseTypes } from './DocResponseTypes';
11
- import { buildResponseTree } from './utils';
12
- export var DocResponses = _ref => {
18
+ var DocResponses = _ref => {
13
19
  var {
14
20
  api,
15
21
  method,
16
22
  errorCode
17
23
  } = _ref;
18
- var [errorContent, setErrorContent] = useState('');
24
+ var [errorContent, setErrorContent] = (0, _react.useState)('');
19
25
  var responses = method.responses;
20
- var responseTree = buildResponseTree(responses);
26
+ var responseTree = (0, _utils.buildResponseTree)(responses);
21
27
  var tabNames = Object.keys(responseTree);
22
28
  var defaultTabId = tabNames[0];
23
-
24
29
  if (errorCode) {
25
30
  var pattern = new RegExp("".concat(errorCode, ": \\w+"));
26
31
  tabNames.forEach(el => {
@@ -29,45 +34,42 @@ export var DocResponses = _ref => {
29
34
  }
30
35
  });
31
36
  }
32
-
33
- useEffect(() => {
37
+ (0, _react.useEffect)(() => {
34
38
  if (!errorCode) return;
35
-
36
39
  var getErrorContent = function () {
37
40
  var _ref2 = _asyncToGenerator(function* () {
38
41
  var docUrl = "/err/4.0/".concat(errorCode, "/").concat(method.httpMethod.toLocaleLowerCase()).concat(method.endpoint);
39
- var adaptor = getEnvAdaptor();
40
- var errDoc = new ErrorDoc(adaptor.sdk, apiErrorDisplayFetch);
42
+ var adaptor = (0, _extensionUtils.getEnvAdaptor)();
43
+ var errDoc = new _sdkRtl.ErrorDoc(adaptor.sdk, _extensionUtils.apiErrorDisplayFetch);
41
44
  var content = yield errDoc.content(docUrl);
42
45
  setErrorContent(content);
43
46
  });
44
-
45
47
  return function getErrorContent() {
46
48
  return _ref2.apply(this, arguments);
47
49
  };
48
50
  }();
49
-
50
51
  getErrorContent();
51
52
  }, [errorCode]);
52
- if (responses.length === 0) return React.createElement(React.Fragment, null);
53
- return React.createElement(CollapserCard, {
53
+ if (responses.length === 0) return _react.default.createElement(_react.default.Fragment, null);
54
+ return _react.default.createElement(_runIt.CollapserCard, {
54
55
  heading: "Response Models",
55
56
  id: "response models"
56
- }, React.createElement(Tabs2, {
57
+ }, _react.default.createElement(_components.Tabs2, {
57
58
  defaultTabId: defaultTabId
58
59
  }, Object.entries(responseTree).map(_ref3 => {
59
60
  var [statusCode, response] = _ref3;
60
61
  var errorTab = errorCode && statusCode === defaultTabId;
61
- return React.createElement(Tab2, {
62
+ return _react.default.createElement(_components.Tab2, {
62
63
  key: statusCode,
63
64
  id: statusCode,
64
65
  label: statusCode
65
- }, React.createElement(DocResponseTypes, {
66
+ }, _react.default.createElement(_DocResponseTypes.DocResponseTypes, {
66
67
  api: api,
67
68
  responses: response
68
- }), errorContent && errorTab && React.createElement(ExtMarkdown, {
69
+ }), errorContent && errorTab && _react.default.createElement(_extensionUtils.ExtMarkdown, {
69
70
  source: errorContent
70
71
  }));
71
72
  })));
72
73
  };
74
+ exports.DocResponses = DocResponses;
73
75
  //# sourceMappingURL=DocResponses.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/scenes/MethodScene/components/DocResponses/DocResponses.tsx"],"names":["React","useEffect","useState","Tabs2","Tab2","CollapserCard","ErrorDoc","apiErrorDisplayFetch","ExtMarkdown","getEnvAdaptor","DocResponseTypes","buildResponseTree","DocResponses","api","method","errorCode","errorContent","setErrorContent","responses","responseTree","tabNames","Object","keys","defaultTabId","pattern","RegExp","forEach","el","test","getErrorContent","docUrl","httpMethod","toLocaleLowerCase","endpoint","adaptor","errDoc","sdk","content","length","entries","map","statusCode","response","errorTab"],"mappings":";;;;AA0BA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,KAAT,EAAgBC,IAAhB,QAA4B,oBAA5B;AAEA,SAASC,aAAT,QAA8B,gBAA9B;AACA,SAASC,QAAT,QAAyB,iBAAzB;AACA,SACEC,oBADF,EAEEC,WAFF,EAGEC,aAHF,QAIO,yBAJP;AAMA,SAASC,gBAAT,QAAiC,oBAAjC;AACA,SAASC,iBAAT,QAAkC,SAAlC;AAYA,OAAO,IAAMC,YAAY,GAAG,QAAmD;AAAA,MAAlD;AAAEC,IAAAA,GAAF;AAAOC,IAAAA,MAAP;AAAeC,IAAAA;AAAf,GAAkD;AAC7E,MAAM,CAACC,YAAD,EAAeC,eAAf,IAAkCf,QAAQ,CAAC,EAAD,CAAhD;AACA,MAAMgB,SAAS,GAAGJ,MAAM,CAACI,SAAzB;AAEA,MAAMC,YAAY,GAAGR,iBAAiB,CAACO,SAAD,CAAtC;AACA,MAAME,QAAQ,GAAGC,MAAM,CAACC,IAAP,CAAYH,YAAZ,CAAjB;AAEA,MAAII,YAAY,GAAGH,QAAQ,CAAC,CAAD,CAA3B;;AAEA,MAAIL,SAAJ,EAAe;AACb,QAAMS,OAAO,GAAG,IAAIC,MAAJ,WAAcV,SAAd,YAAhB;AACAK,IAAAA,QAAQ,CAACM,OAAT,CAAkBC,EAAD,IAAQ;AACvB,UAAIH,OAAO,CAACI,IAAR,CAAaD,EAAb,CAAJ,EAAsB;AACpBJ,QAAAA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YAAY,IAAI2B,QAAhB,IACC,oBAAC,WAAD;AAAa,MAAA,MAAM,EAAE3B;AAArB,MAHJ,CADF;AAQD,GAVA,CADH,CADF,CADF;AAiBD,CApDM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { useEffect, useState } from 'react'\nimport { Tabs2, Tab2 } from '@looker/components'\nimport type { ApiModel, IMethod } from '@looker/sdk-codegen'\nimport { CollapserCard } from '@looker/run-it'\nimport { ErrorDoc } from '@looker/sdk-rtl'\nimport {\n apiErrorDisplayFetch,\n ExtMarkdown,\n getEnvAdaptor,\n} from '@looker/extension-utils'\n\nimport { DocResponseTypes } from './DocResponseTypes'\nimport { buildResponseTree } from './utils'\n\ninterface DocResponsesProps {\n api: ApiModel\n method: IMethod\n /** error code to display */\n errorCode?: string\n}\n\n/**\n * Renders a tab list and tab panels for different method response types\n */\nexport const DocResponses = ({ api, method, errorCode }: DocResponsesProps) => {\n const [errorContent, setErrorContent] = useState('')\n const responses = method.responses\n\n const responseTree = buildResponseTree(responses)\n const tabNames = Object.keys(responseTree)\n\n let defaultTabId = tabNames[0]\n\n if (errorCode) {\n const pattern = new RegExp(`${errorCode}: \\\\w+`)\n tabNames.forEach((el) => {\n if (pattern.test(el)) {\n defaultTabId = el\n }\n })\n }\n\n useEffect(() => {\n if (!errorCode) return\n\n const getErrorContent = async () => {\n const docUrl = `/err/4.0/${errorCode}/${method.httpMethod.toLocaleLowerCase()}${\n method.endpoint\n }`\n const adaptor = getEnvAdaptor()\n const errDoc = new ErrorDoc(adaptor.sdk, apiErrorDisplayFetch)\n const content = await errDoc.content(docUrl)\n setErrorContent(content)\n }\n getErrorContent()\n }, [errorCode])\n\n if (responses.length === 0) return <></>\n\n return (\n <CollapserCard heading=\"Response Models\" id=\"response models\">\n <Tabs2 defaultTabId={defaultTabId}>\n {Object.entries(responseTree).map(([statusCode, response]) => {\n const errorTab = errorCode && statusCode === defaultTabId\n return (\n <Tab2 key={statusCode} id={statusCode} label={statusCode}>\n <DocResponseTypes api={api} responses={response} />\n {errorContent && errorTab && (\n <ExtMarkdown source={errorContent} />\n )}\n </Tab2>\n )\n })}\n </Tabs2>\n </CollapserCard>\n )\n}\n"],"file":"DocResponses.js"}
1
+ {"version":3,"file":"DocResponses.js","names":["DocResponses","api","method","errorCode","errorContent","setErrorContent","useState","responses","responseTree","buildResponseTree","tabNames","Object","keys","defaultTabId","pattern","RegExp","forEach","el","test","useEffect","getErrorContent","docUrl","httpMethod","toLocaleLowerCase","endpoint","adaptor","getEnvAdaptor","errDoc","ErrorDoc","sdk","apiErrorDisplayFetch","content","length","entries","map","statusCode","response","errorTab"],"sources":["../../../../../../src/scenes/MethodScene/components/DocResponses/DocResponses.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { useEffect, useState } from 'react'\nimport { Tabs2, Tab2 } from '@looker/components'\nimport type { ApiModel, IMethod } from '@looker/sdk-codegen'\nimport { CollapserCard } from '@looker/run-it'\nimport { ErrorDoc } from '@looker/sdk-rtl'\nimport {\n apiErrorDisplayFetch,\n ExtMarkdown,\n getEnvAdaptor,\n} from '@looker/extension-utils'\n\nimport { DocResponseTypes } from './DocResponseTypes'\nimport { buildResponseTree } from './utils'\n\ninterface DocResponsesProps {\n api: ApiModel\n method: IMethod\n /** error code to display */\n errorCode?: string\n}\n\n/**\n * Renders a tab list and tab panels for different method response types\n */\nexport const DocResponses = ({ api, method, errorCode }: DocResponsesProps) => {\n const [errorContent, setErrorContent] = useState('')\n const responses = method.responses\n\n const responseTree = buildResponseTree(responses)\n const tabNames = Object.keys(responseTree)\n\n let defaultTabId = tabNames[0]\n\n if (errorCode) {\n const pattern = new RegExp(`${errorCode}: \\\\w+`)\n tabNames.forEach((el) => {\n if (pattern.test(el)) {\n defaultTabId = el\n }\n })\n }\n\n useEffect(() => {\n if (!errorCode) return\n\n const getErrorContent = async () => {\n const docUrl = `/err/4.0/${errorCode}/${method.httpMethod.toLocaleLowerCase()}${\n method.endpoint\n }`\n const adaptor = getEnvAdaptor()\n const errDoc = new ErrorDoc(adaptor.sdk, apiErrorDisplayFetch)\n const content = await errDoc.content(docUrl)\n setErrorContent(content)\n }\n getErrorContent()\n }, [errorCode])\n\n if (responses.length === 0) return <></>\n\n return (\n <CollapserCard heading=\"Response Models\" id=\"response models\">\n <Tabs2 defaultTabId={defaultTabId}>\n {Object.entries(responseTree).map(([statusCode, response]) => {\n const errorTab = errorCode && statusCode === defaultTabId\n return (\n <Tab2 key={statusCode} id={statusCode} label={statusCode}>\n <DocResponseTypes api={api} responses={response} />\n {errorContent && errorTab && (\n <ExtMarkdown source={errorContent} />\n )}\n </Tab2>\n )\n })}\n </Tabs2>\n </CollapserCard>\n )\n}\n"],"mappings":";;;;;;AA0BA;AACA;AAEA;AACA;AACA;AAMA;AACA;AAA2C;AAAA;AAAA;AAAA;AAYpC,IAAMA,YAAY,GAAG,QAAmD;EAAA,IAAlD;IAAEC,GAAG;IAAEC,MAAM;IAAEC;EAA6B,CAAC;EACxE,IAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAG,IAAAC,eAAQ,EAAC,EAAE,CAAC;EACpD,IAAMC,SAAS,GAAGL,MAAM,CAACK,SAAS;EAElC,IAAMC,YAAY,GAAG,IAAAC,wBAAiB,EAACF,SAAS,CAAC;EACjD,IAAMG,QAAQ,GAAGC,MAAM,CAACC,IAAI,CAACJ,YAAY,CAAC;EAE1C,IAAIK,YAAY,GAAGH,QAAQ,CAAC,CAAC,CAAC;EAE9B,IAAIP,SAAS,EAAE;IACb,IAAMW,OAAO,GAAG,IAAIC,MAAM,WAAIZ,SAAS,YAAS;IAChDO,QAAQ,CAACM,OAAO,CAAEC,EAAE,IAAK;MACvB,IAAIH,OAAO,CAACI,IAAI,CAACD,EAAE,CAAC,EAAE;QACpBJ,YAAY,GAAGI,EAAE;MACnB;IACF,CAAC,CAAC;EACJ;EAEA,IAAAE,gBAAS,EA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