@looker/api-explorer 0.9.51 → 0.9.53

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 (397) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/e2e/diffScene.spec.ts +1 -1
  3. package/lib/ApiExplorer.js.map +1 -1
  4. package/lib/App.js.map +1 -1
  5. package/lib/StandaloneApiExplorer.js.map +1 -1
  6. package/lib/components/Banner/Banner.js.map +1 -1
  7. package/lib/components/DocActivityType/DocActivityType.js.map +1 -1
  8. package/lib/components/DocCode/DocCode.js.map +1 -1
  9. package/lib/components/DocMarkdown/DocMarkdown.js.map +1 -1
  10. package/lib/components/DocMarkdown/utils.js.map +1 -1
  11. package/lib/components/DocMethodSummary/DocMethodSummary.js.map +1 -1
  12. package/lib/components/DocMethodSummary/DocSummaryStatus.js.map +1 -1
  13. package/lib/components/DocMethodSummary/utils.js.map +1 -1
  14. package/lib/components/DocPseudo/DocParam.js.map +1 -1
  15. package/lib/components/DocPseudo/DocParams.js.map +1 -1
  16. package/lib/components/DocPseudo/DocPrimaryResponse.js.map +1 -1
  17. package/lib/components/DocPseudo/DocPseudo.js.map +1 -1
  18. package/lib/components/DocRateLimited/DocRateLimited.js.map +1 -1
  19. package/lib/components/DocReferences/DocReferences.js.map +1 -1
  20. package/lib/components/DocReferences/utils.js.map +1 -1
  21. package/lib/components/DocSDKs/DocDeclarations.js.map +1 -1
  22. package/lib/components/DocSDKs/DocSDKs.js.map +1 -1
  23. package/lib/components/DocSchema/DocSchema.js.map +1 -1
  24. package/lib/components/DocSdkUsage/DocSdkExampleCell.js.map +1 -1
  25. package/lib/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
  26. package/lib/components/DocSdkUsage/utils.js.map +1 -1
  27. package/lib/components/DocSource/DocSource.js.map +1 -1
  28. package/lib/components/DocStatus/DocStatus.js.map +1 -1
  29. package/lib/components/DocTitle/DocTitle.js.map +1 -1
  30. package/lib/components/DocTypeSummary/DocTypeSummary.js.map +1 -1
  31. package/lib/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
  32. package/lib/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.js.map +1 -1
  33. package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
  34. package/lib/components/ExploreType/ExploreProperty.js.map +1 -1
  35. package/lib/components/ExploreType/ExploreType.js.map +1 -1
  36. package/lib/components/ExploreType/exploreUtils.js.map +1 -1
  37. package/lib/components/Header/Header.js.map +1 -1
  38. package/lib/components/SelectorContainer/ApiSpecSelector.js.map +1 -1
  39. package/lib/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
  40. package/lib/components/SelectorContainer/SelectorContainer.js.map +1 -1
  41. package/lib/components/SelectorContainer/utils.js.map +1 -1
  42. package/lib/components/SideNav/SearchMessage.js.map +1 -1
  43. package/lib/components/SideNav/SideNav.js.map +1 -1
  44. package/lib/components/SideNav/SideNavMethodTags.js.map +1 -1
  45. package/lib/components/SideNav/SideNavMethods.js.map +1 -1
  46. package/lib/components/SideNav/SideNavTypeTags.js.map +1 -1
  47. package/lib/components/SideNav/SideNavTypes.js.map +1 -1
  48. package/lib/components/common/Loader.js.map +1 -1
  49. package/lib/components/common/common.js.map +1 -1
  50. package/lib/esm/ApiExplorer.js +55 -64
  51. package/lib/esm/ApiExplorer.js.map +1 -1
  52. package/lib/esm/App.js +9 -12
  53. package/lib/esm/App.js.map +1 -1
  54. package/lib/esm/StandaloneApiExplorer.js +20 -29
  55. package/lib/esm/StandaloneApiExplorer.js.map +1 -1
  56. package/lib/esm/components/Banner/Banner.js +8 -17
  57. package/lib/esm/components/Banner/Banner.js.map +1 -1
  58. package/lib/esm/components/Banner/index.js +1 -12
  59. package/lib/esm/components/Banner/index.js.map +1 -1
  60. package/lib/esm/components/DocActivityType/DocActivityType.js +7 -15
  61. package/lib/esm/components/DocActivityType/DocActivityType.js.map +1 -1
  62. package/lib/esm/components/DocActivityType/index.js +1 -12
  63. package/lib/esm/components/DocActivityType/index.js.map +1 -1
  64. package/lib/esm/components/DocCode/DocCode.js +9 -17
  65. package/lib/esm/components/DocCode/DocCode.js.map +1 -1
  66. package/lib/esm/components/DocCode/index.js +1 -12
  67. package/lib/esm/components/DocCode/index.js.map +1 -1
  68. package/lib/esm/components/DocMarkdown/DocMarkdown.js +13 -21
  69. package/lib/esm/components/DocMarkdown/DocMarkdown.js.map +1 -1
  70. package/lib/esm/components/DocMarkdown/index.js +1 -12
  71. package/lib/esm/components/DocMarkdown/index.js.map +1 -1
  72. package/lib/esm/components/DocMarkdown/utils.js +2 -10
  73. package/lib/esm/components/DocMarkdown/utils.js.map +1 -1
  74. package/lib/esm/components/DocMethodSummary/DocMethodSummary.js +15 -23
  75. package/lib/esm/components/DocMethodSummary/DocMethodSummary.js.map +1 -1
  76. package/lib/esm/components/DocMethodSummary/DocSummaryStatus.js +7 -15
  77. package/lib/esm/components/DocMethodSummary/DocSummaryStatus.js.map +1 -1
  78. package/lib/esm/components/DocMethodSummary/index.js +3 -26
  79. package/lib/esm/components/DocMethodSummary/index.js.map +1 -1
  80. package/lib/esm/components/DocMethodSummary/utils.js +18 -27
  81. package/lib/esm/components/DocMethodSummary/utils.js.map +1 -1
  82. package/lib/esm/components/DocPseudo/DocParam.js +7 -15
  83. package/lib/esm/components/DocPseudo/DocParam.js.map +1 -1
  84. package/lib/esm/components/DocPseudo/DocParams.js +5 -14
  85. package/lib/esm/components/DocPseudo/DocParams.js.map +1 -1
  86. package/lib/esm/components/DocPseudo/DocPrimaryResponse.js +5 -13
  87. package/lib/esm/components/DocPseudo/DocPrimaryResponse.js.map +1 -1
  88. package/lib/esm/components/DocPseudo/DocPseudo.js +9 -17
  89. package/lib/esm/components/DocPseudo/DocPseudo.js.map +1 -1
  90. package/lib/esm/components/DocPseudo/index.js +1 -12
  91. package/lib/esm/components/DocPseudo/index.js.map +1 -1
  92. package/lib/esm/components/DocRateLimited/DocRateLimited.js +5 -13
  93. package/lib/esm/components/DocRateLimited/DocRateLimited.js.map +1 -1
  94. package/lib/esm/components/DocRateLimited/index.js +1 -12
  95. package/lib/esm/components/DocRateLimited/index.js.map +1 -1
  96. package/lib/esm/components/DocReferences/DocReferences.js +10 -18
  97. package/lib/esm/components/DocReferences/DocReferences.js.map +1 -1
  98. package/lib/esm/components/DocReferences/index.js +1 -12
  99. package/lib/esm/components/DocReferences/index.js.map +1 -1
  100. package/lib/esm/components/DocReferences/utils.js +11 -19
  101. package/lib/esm/components/DocReferences/utils.js.map +1 -1
  102. package/lib/esm/components/DocSDKs/DocDeclarations.js +7 -15
  103. package/lib/esm/components/DocSDKs/DocDeclarations.js.map +1 -1
  104. package/lib/esm/components/DocSDKs/DocSDKs.js +21 -30
  105. package/lib/esm/components/DocSDKs/DocSDKs.js.map +1 -1
  106. package/lib/esm/components/DocSDKs/index.js +1 -12
  107. package/lib/esm/components/DocSDKs/index.js.map +1 -1
  108. package/lib/esm/components/DocSDKs/utils.js +3 -11
  109. package/lib/esm/components/DocSDKs/utils.js.map +1 -1
  110. package/lib/esm/components/DocSchema/DocSchema.js +7 -15
  111. package/lib/esm/components/DocSchema/DocSchema.js.map +1 -1
  112. package/lib/esm/components/DocSchema/index.js +1 -12
  113. package/lib/esm/components/DocSchema/index.js.map +1 -1
  114. package/lib/esm/components/DocSdkUsage/DocSdkExampleCell.js +6 -14
  115. package/lib/esm/components/DocSdkUsage/DocSdkExampleCell.js.map +1 -1
  116. package/lib/esm/components/DocSdkUsage/DocSdkUsage.js +38 -47
  117. package/lib/esm/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
  118. package/lib/esm/components/DocSdkUsage/index.js +1 -12
  119. package/lib/esm/components/DocSdkUsage/index.js.map +1 -1
  120. package/lib/esm/components/DocSdkUsage/utils.js +11 -24
  121. package/lib/esm/components/DocSdkUsage/utils.js.map +1 -1
  122. package/lib/esm/components/DocSource/DocSource.js +13 -21
  123. package/lib/esm/components/DocSource/DocSource.js.map +1 -1
  124. package/lib/esm/components/DocSource/index.js +1 -12
  125. package/lib/esm/components/DocSource/index.js.map +1 -1
  126. package/lib/esm/components/DocStatus/DocStatus.js +8 -16
  127. package/lib/esm/components/DocStatus/DocStatus.js.map +1 -1
  128. package/lib/esm/components/DocStatus/index.js +1 -12
  129. package/lib/esm/components/DocStatus/index.js.map +1 -1
  130. package/lib/esm/components/DocTitle/DocTitle.js +3 -11
  131. package/lib/esm/components/DocTitle/DocTitle.js.map +1 -1
  132. package/lib/esm/components/DocTitle/index.js +1 -12
  133. package/lib/esm/components/DocTitle/index.js.map +1 -1
  134. package/lib/esm/components/DocTypeSummary/DocTypeSummary.js +11 -19
  135. package/lib/esm/components/DocTypeSummary/DocTypeSummary.js.map +1 -1
  136. package/lib/esm/components/DocTypeSummary/index.js +1 -12
  137. package/lib/esm/components/DocTypeSummary/index.js.map +1 -1
  138. package/lib/esm/components/ErrorBoundary/ErrorBoundary.js +5 -14
  139. package/lib/esm/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
  140. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.js +11 -19
  141. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.js.map +1 -1
  142. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js +46 -54
  143. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
  144. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/index.js +1 -12
  145. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/index.js.map +1 -1
  146. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/index.js +1 -12
  147. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/index.js.map +1 -1
  148. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/index.js +1 -12
  149. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/index.js.map +1 -1
  150. package/lib/esm/components/ErrorBoundary/index.js +1 -12
  151. package/lib/esm/components/ErrorBoundary/index.js.map +1 -1
  152. package/lib/esm/components/ExploreType/ExploreProperty.js +48 -63
  153. package/lib/esm/components/ExploreType/ExploreProperty.js.map +1 -1
  154. package/lib/esm/components/ExploreType/ExploreType.js +23 -32
  155. package/lib/esm/components/ExploreType/ExploreType.js.map +1 -1
  156. package/lib/esm/components/ExploreType/exploreUtils.js +38 -51
  157. package/lib/esm/components/ExploreType/exploreUtils.js.map +1 -1
  158. package/lib/esm/components/ExploreType/index.js +3 -80
  159. package/lib/esm/components/ExploreType/index.js.map +1 -1
  160. package/lib/esm/components/Header/Header.js +20 -31
  161. package/lib/esm/components/Header/Header.js.map +1 -1
  162. package/lib/esm/components/Header/index.js +1 -24
  163. package/lib/esm/components/Header/index.js.map +1 -1
  164. package/lib/esm/components/Link/Link.js +3 -11
  165. package/lib/esm/components/Link/Link.js.map +1 -1
  166. package/lib/esm/components/Link/index.js +1 -12
  167. package/lib/esm/components/Link/index.js.map +1 -1
  168. package/lib/esm/components/SelectorContainer/ApiSpecSelector.js +11 -19
  169. package/lib/esm/components/SelectorContainer/ApiSpecSelector.js.map +1 -1
  170. package/lib/esm/components/SelectorContainer/SdkLanguageSelector.js +16 -25
  171. package/lib/esm/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
  172. package/lib/esm/components/SelectorContainer/SelectorContainer.js +16 -25
  173. package/lib/esm/components/SelectorContainer/SelectorContainer.js.map +1 -1
  174. package/lib/esm/components/SelectorContainer/index.js +1 -12
  175. package/lib/esm/components/SelectorContainer/index.js.map +1 -1
  176. package/lib/esm/components/SelectorContainer/utils.js +4 -11
  177. package/lib/esm/components/SelectorContainer/utils.js.map +1 -1
  178. package/lib/esm/components/SideNav/SearchMessage.js +8 -16
  179. package/lib/esm/components/SideNav/SearchMessage.js.map +1 -1
  180. package/lib/esm/components/SideNav/SideNav.js +41 -50
  181. package/lib/esm/components/SideNav/SideNav.js.map +1 -1
  182. package/lib/esm/components/SideNav/SideNavMethodTags.js +6 -14
  183. package/lib/esm/components/SideNav/SideNavMethodTags.js.map +1 -1
  184. package/lib/esm/components/SideNav/SideNavMethods.js +22 -32
  185. package/lib/esm/components/SideNav/SideNavMethods.js.map +1 -1
  186. package/lib/esm/components/SideNav/SideNavTypeTags.js +6 -14
  187. package/lib/esm/components/SideNav/SideNavTypeTags.js.map +1 -1
  188. package/lib/esm/components/SideNav/SideNavTypes.js +22 -32
  189. package/lib/esm/components/SideNav/SideNavTypes.js.map +1 -1
  190. package/lib/esm/components/SideNav/index.js +1 -12
  191. package/lib/esm/components/SideNav/index.js.map +1 -1
  192. package/lib/esm/components/SideNav/searchUtils.js +6 -15
  193. package/lib/esm/components/SideNav/searchUtils.js.map +1 -1
  194. package/lib/esm/components/common/Loader.js +8 -16
  195. package/lib/esm/components/common/Loader.js.map +1 -1
  196. package/lib/esm/components/common/common.js +11 -21
  197. package/lib/esm/components/common/common.js.map +1 -1
  198. package/lib/esm/components/common/index.js +2 -27
  199. package/lib/esm/components/common/index.js.map +1 -1
  200. package/lib/esm/components/index.js +22 -183
  201. package/lib/esm/components/index.js.map +1 -1
  202. package/lib/esm/index.js +5 -60
  203. package/lib/esm/index.js.map +1 -1
  204. package/lib/esm/routes/AppRouter.js +22 -30
  205. package/lib/esm/routes/AppRouter.js.map +1 -1
  206. package/lib/esm/routes/index.js +1 -12
  207. package/lib/esm/routes/index.js.map +1 -1
  208. package/lib/esm/scenes/DiffScene/DiffScene.js +43 -52
  209. package/lib/esm/scenes/DiffScene/DiffScene.js.map +1 -1
  210. package/lib/esm/scenes/DiffScene/DocDiff/DiffBanner.js +9 -17
  211. package/lib/esm/scenes/DiffScene/DocDiff/DiffBanner.js.map +1 -1
  212. package/lib/esm/scenes/DiffScene/DocDiff/DiffItem.js +33 -44
  213. package/lib/esm/scenes/DiffScene/DocDiff/DiffItem.js.map +1 -1
  214. package/lib/esm/scenes/DiffScene/DocDiff/DiffLegend.js +18 -26
  215. package/lib/esm/scenes/DiffScene/DocDiff/DiffLegend.js.map +1 -1
  216. package/lib/esm/scenes/DiffScene/DocDiff/DocDiff.js +11 -20
  217. package/lib/esm/scenes/DiffScene/DocDiff/DocDiff.js.map +1 -1
  218. package/lib/esm/scenes/DiffScene/DocDiff/docDiffUtils.js +5 -13
  219. package/lib/esm/scenes/DiffScene/DocDiff/docDiffUtils.js.map +1 -1
  220. package/lib/esm/scenes/DiffScene/DocDiff/index.js +1 -12
  221. package/lib/esm/scenes/DiffScene/DocDiff/index.js.map +1 -1
  222. package/lib/esm/scenes/DiffScene/diffUtils.js +8 -19
  223. package/lib/esm/scenes/DiffScene/diffUtils.js.map +1 -1
  224. package/lib/esm/scenes/DiffScene/index.js +1 -12
  225. package/lib/esm/scenes/DiffScene/index.js.map +1 -1
  226. package/lib/esm/scenes/ErrorDetailScene/ErrorDetailScene.js +11 -19
  227. package/lib/esm/scenes/ErrorDetailScene/ErrorDetailScene.js.map +1 -1
  228. package/lib/esm/scenes/ErrorDetailScene/index.js +1 -12
  229. package/lib/esm/scenes/ErrorDetailScene/index.js.map +1 -1
  230. package/lib/esm/scenes/HomeScene/HomeScene.js +9 -17
  231. package/lib/esm/scenes/HomeScene/HomeScene.js.map +1 -1
  232. package/lib/esm/scenes/HomeScene/index.js +1 -12
  233. package/lib/esm/scenes/HomeScene/index.js.map +1 -1
  234. package/lib/esm/scenes/MethodScene/MethodScene.js +47 -56
  235. package/lib/esm/scenes/MethodScene/MethodScene.js.map +1 -1
  236. package/lib/esm/scenes/MethodScene/components/DocOperation.js +12 -20
  237. package/lib/esm/scenes/MethodScene/components/DocOperation.js.map +1 -1
  238. package/lib/esm/scenes/MethodScene/components/DocRequestBody.js +7 -15
  239. package/lib/esm/scenes/MethodScene/components/DocRequestBody.js.map +1 -1
  240. package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponseTypes.js +11 -20
  241. package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponseTypes.js.map +1 -1
  242. package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponses.js +19 -28
  243. package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponses.js.map +1 -1
  244. package/lib/esm/scenes/MethodScene/components/DocResponses/index.js +1 -12
  245. package/lib/esm/scenes/MethodScene/components/DocResponses/index.js.map +1 -1
  246. package/lib/esm/scenes/MethodScene/components/DocResponses/utils.js +1 -8
  247. package/lib/esm/scenes/MethodScene/components/DocResponses/utils.js.map +1 -1
  248. package/lib/esm/scenes/MethodScene/components/index.js +3 -26
  249. package/lib/esm/scenes/MethodScene/components/index.js.map +1 -1
  250. package/lib/esm/scenes/MethodScene/index.js +1 -12
  251. package/lib/esm/scenes/MethodScene/index.js.map +1 -1
  252. package/lib/esm/scenes/MethodTagScene/MethodTagScene.js +31 -40
  253. package/lib/esm/scenes/MethodTagScene/MethodTagScene.js.map +1 -1
  254. package/lib/esm/scenes/MethodTagScene/index.js +1 -12
  255. package/lib/esm/scenes/MethodTagScene/index.js.map +1 -1
  256. package/lib/esm/scenes/MethodTagScene/utils.js +1 -8
  257. package/lib/esm/scenes/MethodTagScene/utils.js.map +1 -1
  258. package/lib/esm/scenes/TypeScene/TypeScene.js +20 -29
  259. package/lib/esm/scenes/TypeScene/TypeScene.js.map +1 -1
  260. package/lib/esm/scenes/TypeScene/index.js +1 -12
  261. package/lib/esm/scenes/TypeScene/index.js.map +1 -1
  262. package/lib/esm/scenes/TypeTagScene/TypeTagScene.js +30 -39
  263. package/lib/esm/scenes/TypeTagScene/TypeTagScene.js.map +1 -1
  264. package/lib/esm/scenes/TypeTagScene/index.js +1 -12
  265. package/lib/esm/scenes/TypeTagScene/index.js.map +1 -1
  266. package/lib/esm/scenes/TypeTagScene/utils.js +1 -8
  267. package/lib/esm/scenes/TypeTagScene/utils.js.map +1 -1
  268. package/lib/esm/scenes/index.js +6 -47
  269. package/lib/esm/scenes/index.js.map +1 -1
  270. package/lib/esm/scenes/utils/hooks/index.js +1 -12
  271. package/lib/esm/scenes/utils/hooks/index.js.map +1 -1
  272. package/lib/esm/scenes/utils/hooks/tagStoreSync.js +14 -21
  273. package/lib/esm/scenes/utils/hooks/tagStoreSync.js.map +1 -1
  274. package/lib/esm/scenes/utils/index.js +1 -12
  275. package/lib/esm/scenes/utils/index.js.map +1 -1
  276. package/lib/esm/state/index.js +4 -49
  277. package/lib/esm/state/index.js.map +1 -1
  278. package/lib/esm/state/lodes/index.js +2 -27
  279. package/lib/esm/state/lodes/index.js.map +1 -1
  280. package/lib/esm/state/lodes/sagas.js +10 -16
  281. package/lib/esm/state/lodes/sagas.js.map +1 -1
  282. package/lib/esm/state/lodes/selectors.js +2 -10
  283. package/lib/esm/state/lodes/selectors.js.map +1 -1
  284. package/lib/esm/state/lodes/slice.js +8 -19
  285. package/lib/esm/state/lodes/slice.js.map +1 -1
  286. package/lib/esm/state/settings/index.js +2 -27
  287. package/lib/esm/state/settings/index.js.map +1 -1
  288. package/lib/esm/state/settings/sagas.js +18 -24
  289. package/lib/esm/state/settings/sagas.js.map +1 -1
  290. package/lib/esm/state/settings/selectors.js +5 -16
  291. package/lib/esm/state/settings/selectors.js.map +1 -1
  292. package/lib/esm/state/settings/slice.js +11 -23
  293. package/lib/esm/state/settings/slice.js.map +1 -1
  294. package/lib/esm/state/specs/index.js +2 -27
  295. package/lib/esm/state/specs/index.js.map +1 -1
  296. package/lib/esm/state/specs/sagas.js +21 -25
  297. package/lib/esm/state/specs/sagas.js.map +1 -1
  298. package/lib/esm/state/specs/selectors.js +2 -10
  299. package/lib/esm/state/specs/selectors.js.map +1 -1
  300. package/lib/esm/state/specs/slice.js +8 -19
  301. package/lib/esm/state/specs/slice.js.map +1 -1
  302. package/lib/esm/state/store.js +13 -21
  303. package/lib/esm/state/store.js.map +1 -1
  304. package/lib/esm/test-data/declarations.js +1 -8
  305. package/lib/esm/test-data/declarations.js.map +1 -1
  306. package/lib/esm/test-data/examples.js +1 -8
  307. package/lib/esm/test-data/examples.js.map +1 -1
  308. package/lib/esm/test-data/index.js +4 -51
  309. package/lib/esm/test-data/index.js.map +1 -1
  310. package/lib/esm/test-data/sdkLanguages.js +2 -10
  311. package/lib/esm/test-data/sdkLanguages.js.map +1 -1
  312. package/lib/esm/test-data/specs.js +7 -18
  313. package/lib/esm/test-data/specs.js.map +1 -1
  314. package/lib/esm/test-utils/index.js +3 -38
  315. package/lib/esm/test-utils/index.js.map +1 -1
  316. package/lib/esm/test-utils/lodes.js +5 -12
  317. package/lib/esm/test-utils/lodes.js.map +1 -1
  318. package/lib/esm/test-utils/redux.js +25 -37
  319. package/lib/esm/test-utils/redux.js.map +1 -1
  320. package/lib/esm/test-utils/router.js +6 -15
  321. package/lib/esm/test-utils/router.js.map +1 -1
  322. package/lib/esm/utils/adaptorUtils.js +15 -26
  323. package/lib/esm/utils/adaptorUtils.js.map +1 -1
  324. package/lib/esm/utils/apixAdaptor.js +13 -22
  325. package/lib/esm/utils/apixAdaptor.js.map +1 -1
  326. package/lib/esm/utils/highlight.js +3 -11
  327. package/lib/esm/utils/highlight.js.map +1 -1
  328. package/lib/esm/utils/hooks/globalStoreSync.js +15 -22
  329. package/lib/esm/utils/hooks/globalStoreSync.js.map +1 -1
  330. package/lib/esm/utils/hooks/index.js +3 -26
  331. package/lib/esm/utils/hooks/index.js.map +1 -1
  332. package/lib/esm/utils/hooks/navigation.js +3 -10
  333. package/lib/esm/utils/hooks/navigation.js.map +1 -1
  334. package/lib/esm/utils/hooks/useQuery.js +5 -12
  335. package/lib/esm/utils/hooks/useQuery.js.map +1 -1
  336. package/lib/esm/utils/index.js +8 -101
  337. package/lib/esm/utils/index.js.map +1 -1
  338. package/lib/esm/utils/lodeUtils.js +2 -10
  339. package/lib/esm/utils/lodeUtils.js.map +1 -1
  340. package/lib/esm/utils/path.js +15 -32
  341. package/lib/esm/utils/path.js.map +1 -1
  342. package/lib/esm/utils/sdkLanguage.js +5 -14
  343. package/lib/esm/utils/sdkLanguage.js.map +1 -1
  344. package/lib/esm/utils/useWindowSize.js +4 -10
  345. package/lib/esm/utils/useWindowSize.js.map +1 -1
  346. package/lib/routes/AppRouter.js.map +1 -1
  347. package/lib/scenes/DiffScene/DiffScene.js.map +1 -1
  348. package/lib/scenes/DiffScene/DocDiff/DiffBanner.js.map +1 -1
  349. package/lib/scenes/DiffScene/DocDiff/DiffItem.js.map +1 -1
  350. package/lib/scenes/DiffScene/DocDiff/DiffLegend.js.map +1 -1
  351. package/lib/scenes/DiffScene/DocDiff/DocDiff.js.map +1 -1
  352. package/lib/scenes/DiffScene/DocDiff/docDiffUtils.js.map +1 -1
  353. package/lib/scenes/ErrorDetailScene/ErrorDetailScene.js.map +1 -1
  354. package/lib/scenes/HomeScene/HomeScene.js.map +1 -1
  355. package/lib/scenes/MethodScene/MethodScene.js.map +1 -1
  356. package/lib/scenes/MethodScene/components/DocOperation.js.map +1 -1
  357. package/lib/scenes/MethodScene/components/DocRequestBody.js.map +1 -1
  358. package/lib/scenes/MethodScene/components/DocResponses/DocResponseTypes.js.map +1 -1
  359. package/lib/scenes/MethodScene/components/DocResponses/DocResponses.js.map +1 -1
  360. package/lib/scenes/MethodTagScene/MethodTagScene.js.map +1 -1
  361. package/lib/scenes/MethodTagScene/utils.js.map +1 -1
  362. package/lib/scenes/TypeScene/TypeScene.js.map +1 -1
  363. package/lib/scenes/TypeTagScene/TypeTagScene.js.map +1 -1
  364. package/lib/scenes/TypeTagScene/utils.js.map +1 -1
  365. package/lib/scenes/utils/hooks/tagStoreSync.js.map +1 -1
  366. package/lib/state/lodes/sagas.js.map +1 -1
  367. package/lib/state/settings/sagas.js.map +1 -1
  368. package/lib/state/specs/sagas.js +2 -0
  369. package/lib/state/specs/sagas.js.map +1 -1
  370. package/lib/test-data/specs.js.map +1 -1
  371. package/lib/test-utils/redux.js.map +1 -1
  372. package/lib/test-utils/router.js.map +1 -1
  373. package/lib/utils/adaptorUtils.js.map +1 -1
  374. package/lib/utils/apixAdaptor.js.map +1 -1
  375. package/lib/utils/highlight.js.map +1 -1
  376. package/lib/utils/hooks/globalStoreSync.js.map +1 -1
  377. package/lib/utils/hooks/navigation.js.map +1 -1
  378. package/lib/utils/hooks/useQuery.js.map +1 -1
  379. package/lib/utils/lodeUtils.js.map +1 -1
  380. package/lib/utils/path.js.map +1 -1
  381. package/lib/utils/sdkLanguage.js.map +1 -1
  382. package/lib/utils/useWindowSize.js.map +1 -1
  383. package/package.json +9 -9
  384. package/public/Looker.4.0.json +5181 -1075
  385. package/public/versions.json +4 -10
  386. package/src/components/DocMarkdown/DocMarkdown.spec.tsx +10 -10
  387. package/src/components/DocMarkdown/utils.spec.ts +11 -11
  388. package/src/components/DocReferences/DocReferences.spec.tsx +6 -6
  389. package/src/components/ExploreType/ExploreType.spec.tsx +0 -12
  390. package/src/components/SelectorContainer/ApiSpecSelector.spec.tsx +2 -2
  391. package/src/components/SideNav/SideNav.spec.tsx +6 -6
  392. package/src/components/SideNav/SideNavMethodTags.spec.tsx +4 -4
  393. package/src/components/SideNav/SideNavMethods.spec.tsx +1 -1
  394. package/src/components/SideNav/SideNavTypeTags.spec.tsx +4 -4
  395. package/src/components/SideNav/SideNavTypes.spec.tsx +1 -1
  396. package/src/scenes/DiffScene/DocDiff/DocDiff.spec.tsx +1 -1
  397. package/src/state/specs/sagas.ts +4 -0
@@ -1 +1 @@
1
- {"version":3,"file":"MethodScene.js","names":["_react","_interopRequireWildcard","require","_components","_icons","_reactRouterDom","_runIt","_sdkCodegen","_reactRedux","_utils","_components2","_state","_components3","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","asyncGeneratorStep","gen","resolve","reject","_next","_throw","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","showRunIt","_ref","adaptor","data","localStorageGetItem","RunItFormKey","_x","MethodScene","_ref2","_query$get","api","getApixAdaptor","history","useHistory","navigate","useNavigation","sdkLanguage","useSelector","selectSdkLanguage","specKey","methodTag","methodName","useParams","toggle","setOn","useToggle","method","setMethod","useState","methods","seeTypes","typeRefs","customTypes","query","useQuery","errorCode","RunItButton","Button","ButtonOutline","docResponsesRef","useRef","useEffect","foundMethod","tags","concat","checkRunIt","_ref3","show","console","responses","current","window","setTimeout","scrollIntoView","runItToggle","createElement","color","iconBefore","Beaker","onClick","Fragment","ApixSection","Space","between","DocTitle","summary","DocSource","mb","gap","DocStatus","DocActivityType","DocRateLimited","DocOperation","DocMarkdown","source","description","DocSDKs","DocRequestBody","DocSdkUsage","DocReferences","typesUsed","Span","ref","DocResponses","DocSchema","object","schema","Aside","width","ExtendComponentsThemeProvider","themeCustomizations","colors","background","text","link","critical","RunIt","operationId","exports"],"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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAS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6B;IAC5BC,mBAAmB,EAAE;MACnBC,MAAM,EAAE;QACNC,UAAU,EAAE,SAAS;QACrBvH,GAAG,EAAE,SAAS;QACdwH,IAAI,EAAE,MAAM;QACZC,IAAI,EAAE,SAAS;QACfC,QAAQ,EAAE;MACZ;IACF;EAAE,GAEFvJ,MAAA,CAAAoB,OAAA,CAAA2F,aAAA,CAACzG,MAAA,CAAAkJ,KAAK;IACJ9F,OAAO,EAAEA,OAAQ;IACjB7B,GAAG,EAAEqD,MAAM,CAACuE,WAAY;IACxBjF,WAAW,EAAEA,WAAY;IACzBN,GAAG,EAAEA,GAAI;IACTgB,MAAM,EAAEA;EAAO,EACf,CAC4B,CAEnC,CACA;AAEP,CAAC;AAAAwE,OAAA,CAAA3F,WAAA,GAAAA,WAAA"}
1
+ {"version":3,"file":"MethodScene.js","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","_ref","_asyncToGenerator","adaptor","data","localStorageGetItem","_x","apply","arguments","MethodScene","_ref2","_query$get","api","history","navigate","sdkLanguage","specKey","methodTag","methodName","value","toggle","setOn","method","setMethod","methods","seeTypes","customTypes","query","errorCode","get","undefined","RunItButton","docResponsesRef","foundMethod","tags","concat","checkRunIt","_ref3","show","error","console","responses","current","window","setTimeout","scrollIntoView","runItToggle","createElement","color","iconBefore","onClick","Fragment","between","summary","mb","gap","source","description","typesUsed","ref","object","schema","width","themeCustomizations","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,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAC1D,SACEC,KAAK,EACLC,MAAM,EACNC,aAAa,EACbC,KAAK,EACLC,SAAS,EACTC,6BAA6B,EAC7BC,IAAI,QACC,oBAAoB;AAC3B,SAASC,MAAM,QAAQ,eAAe;AACtC,SAASC,UAAU,EAAEC,SAAS,QAAQ,kBAAkB;AACxD,SAASC,KAAK,EAAEC,YAAY,QAAQ,gBAAgB;AAEpD,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,WAAW,QAAQ,aAAa;AAGzC,SAASC,cAAc,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,aAAa;AACrE,SACEC,WAAW,EACXC,eAAe,EACfC,WAAW,EACXC,cAAc,EACdC,aAAa,EACbC,OAAO,EACPC,WAAW,EACXC,SAAS,EACTC,SAAS,EACTC,QAAQ,EACRC,SAAS,QACJ,kBAAkB;AACzB,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,YAAY,EAAEC,cAAc,EAAEC,YAAY,QAAQ,cAAc;AAYzE,IAAMC,SAAS;EAAA,IAAAC,IAAA,GAAAC,iBAAA,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AM,EAAEA;EAAO,CAChB,CAC4B,CAC1B,CAET,CAAC;AAEP,CAAC"}
@@ -1,38 +1,30 @@
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 => {
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 => {
13
6
  var {
14
7
  method
15
8
  } = _ref;
16
- return _react.default.createElement(_components.SpaceVertical, {
9
+ return React.createElement(SpaceVertical, {
17
10
  align: "start",
18
11
  mb: "large",
19
12
  gap: "xsmall"
20
- }, _react.default.createElement(_runIt.MethodBadge, {
13
+ }, React.createElement(MethodBadge, {
21
14
  type: method.httpMethod
22
- }, _react.default.createElement(_components2.DocPseudo, {
15
+ }, React.createElement(DocPseudo, {
23
16
  method: method
24
- })), _react.default.createElement(_runIt.MethodBadge, {
17
+ })), React.createElement(MethodBadge, {
25
18
  type: method.httpMethod
26
- }, _react.default.createElement(_components.Flex, {
19
+ }, React.createElement(Flex, {
27
20
  alignItems: "center"
28
- }, _react.default.createElement(_components.Text, {
21
+ }, React.createElement(Text, {
29
22
  fontSize: "xsmall",
30
23
  fontWeight: "semiBold",
31
24
  mr: "xxsmall"
32
- }, method.httpMethod), _react.default.createElement(_components.Code, {
25
+ }, method.httpMethod), React.createElement(Code, {
33
26
  fontSize: "small",
34
27
  fontWeight: "normal"
35
28
  }, method.endpoint))));
36
29
  };
37
- exports.DocOperation = DocOperation;
38
30
  //# sourceMappingURL=DocOperation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocOperation.js","names":["_react","_interopRequireDefault","require","_components","_runIt","_components2","obj","__esModule","default","DocOperation","_ref","method","createElement","SpaceVertical","align","mb","gap","MethodBadge","type","httpMethod","DocPseudo","Flex","alignItems","Text","fontSize","fontWeight","mr","Code","endpoint","exports"],"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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AAA+C,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAMxC,IAAMG,YAAmC,GAAGC,IAAA;EAAA,IAAC;IAAEC;EAAO,CAAC,GAAAD,IAAA;EAAA,OAC5DV,MAAA,CAAAQ,OAAA,CAAAI,aAAA,CAACT,WAAA,CAAAU,aAAa;IAACC,KAAK,EAAC,OAAO;IAACC,EAAE,EAAC,OAAO;IAACC,GAAG,EAAC;EAAQ,GAClDhB,MAAA,CAAAQ,OAAA,CAAAI,aAAA,CAACR,MAAA,CAAAa,WAAW;IAACC,IAAI,EAAEP,MAAM,CAACQ;EAAW,GACnCnB,MAAA,CAAAQ,OAAA,CAAAI,aAAA,CAACP,YAAA,CAAAe,SAAS;IAACT,MAAM,EAAEA;EAAO,EAAG,CACjB,EACdX,MAAA,CAAAQ,OAAA,CAAAI,aAAA,CAACR,MAAA,CAAAa,WAAW;IAACC,IAAI,EAAEP,MAAM,CAACQ;EAAW,GACnCnB,MAAA,CAAAQ,OAAA,CAAAI,aAAA,CAACT,WAAA,CAAAkB,IAAI;IAACC,UAAU,EAAC;EAAQ,GACvBtB,MAAA,CAAAQ,OAAA,CAAAI,aAAA,CAACT,WAAA,CAAAoB,IAAI;IAACC,QAAQ,EAAC,QAAQ;IAACC,UAAU,EAAC,UAAU;IAACC,EAAE,EAAC;EAAS,GACvDf,MAAM,CAACQ,UAAU,CACb,EACPnB,MAAA,CAAAQ,OAAA,CAAAI,aAAA,CAACT,WAAA,CAAAwB,IAAI;IAACH,QAAQ,EAAC,OAAO;IAACC,UAAU,EAAC;EAAQ,GACvCd,MAAM,CAACiB,QAAQ,CACX,CACF,CACK,CACA;AAAA,CACjB;AAAAC,OAAA,CAAApB,YAAA,GAAAA,YAAA"}
1
+ {"version":3,"file":"DocOperation.js","names":["React","Code","Flex","SpaceVertical","Text","MethodBadge","DocPseudo","DocOperation","_ref","method","createElement","align","mb","gap","type","httpMethod","alignItems","fontSize","fontWeight","mr","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,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,aAAa,EAAEC,IAAI,QAAQ,oBAAoB;AACpE,SAASC,WAAW,QAAQ,gBAAgB;AAE5C,SAASC,SAAS,QAAQ,qBAAqB;AAM/C,OAAO,IAAMC,YAAmC,GAAGC,IAAA;EAAA,IAAC;IAAEC;EAAO,CAAC,GAAAD,IAAA;EAAA,OAC5DR,KAAA,CAAAU,aAAA,CAACP,aAAa;IAACQ,KAAK,EAAC,OAAO;IAACC,EAAE,EAAC,OAAO;IAACC,GAAG,EAAC;EAAQ,GAClDb,KAAA,CAAAU,aAAA,CAACL,WAAW;IAACS,IAAI,EAAEL,MAAM,CAACM;EAAW,GACnCf,KAAA,CAAAU,aAAA,CAACJ,SAAS;IAACG,MAAM,EAAEA;EAAO,CAAE,CACjB,CAAC,EACdT,KAAA,CAAAU,aAAA,CAACL,WAAW;IAACS,IAAI,EAAEL,MAAM,CAACM;EAAW,GACnCf,KAAA,CAAAU,aAAA,CAACR,IAAI;IAACc,UAAU,EAAC;EAAQ,GACvBhB,KAAA,CAAAU,aAAA,CAACN,IAAI;IAACa,QAAQ,EAAC,QAAQ;IAACC,UAAU,EAAC,UAAU;IAACC,EAAE,EAAC;EAAS,GACvDV,MAAM,CAACM,UACJ,CAAC,EACPf,KAAA,CAAAU,aAAA,CAACT,IAAI;IAACgB,QAAQ,EAAC,OAAO;IAACC,UAAU,EAAC;EAAQ,GACvCT,MAAM,CAACW,QACJ,CACF,CACK,CACA,CAAC;AAAA,CACjB"}
@@ -1,30 +1,22 @@
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 => {
1
+ import React from 'react';
2
+ import { CollapserCard } from '@looker/run-it';
3
+ import { ExploreType } from '../../../components';
4
+ export var DocRequestBody = _ref => {
12
5
  var {
13
6
  method,
14
7
  api
15
8
  } = _ref;
16
9
  var bodies = method.bodyParams;
17
- if (bodies.length === 0) return _react.default.createElement(_react.default.Fragment, null);
10
+ if (bodies.length === 0) return React.createElement(React.Fragment, null);
18
11
  var header = bodies.length > 1 ? 'Request bodies' : 'Request body';
19
- return _react.default.createElement(_runIt.CollapserCard, {
12
+ return React.createElement(CollapserCard, {
20
13
  id: "bodies",
21
14
  heading: header
22
- }, _react.default.createElement(_react.default.Fragment, null, bodies.map(body => _react.default.createElement(_components.ExploreType, {
15
+ }, React.createElement(React.Fragment, null, bodies.map(body => React.createElement(ExploreType, {
23
16
  api: api,
24
17
  type: body.type,
25
18
  open: false,
26
19
  key: "body.".concat(body.name)
27
20
  }))));
28
21
  };
29
- exports.DocRequestBody = DocRequestBody;
30
22
  //# sourceMappingURL=DocRequestBody.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocRequestBody.js","names":["_react","_interopRequireDefault","require","_runIt","_components","obj","__esModule","default","DocRequestBody","_ref","method","api","bodies","bodyParams","length","createElement","Fragment","header","CollapserCard","id","heading","map","body","ExploreType","type","open","key","concat","name","exports"],"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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAAiD,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAW1C,IAAMG,cAAuC,GAAGC,IAAA,IAAqB;EAAA,IAApB;IAAEC,MAAM;IAAEC;EAAI,CAAC,GAAAF,IAAA;EACrE,IAAMG,MAAM,GAAGF,MAAM,CAACG,UAAU;EAChC,IAAID,MAAM,CAACE,MAAM,KAAK,CAAC,EAAE,OAAOd,MAAA,CAAAO,OAAA,CAAAQ,aAAA,CAAAf,MAAA,CAAAO,OAAA,CAAAS,QAAA,OAAK;EACrC,IAAMC,MAAM,GAAGL,MAAM,CAACE,MAAM,GAAG,CAAC,GAAG,gBAAgB,GAAG,cAAc;EAEpE,OACEd,MAAA,CAAAO,OAAA,CAAAQ,aAAA,CAACZ,MAAA,CAAAe,aAAa;IAACC,EAAE,EAAC,QAAQ;IAACC,OAAO,EAAEH;EAAO,GACzCjB,MAAA,CAAAO,OAAA,CAAAQ,aAAA,CAAAf,MAAA,CAAAO,OAAA,CAAAS,QAAA,QACGJ,MAAM,CAACS,GAAG,CAAEC,IAAI,IACftB,MAAA,CAAAO,OAAA,CAAAQ,aAAA,CAACX,WAAA,CAAAmB,WAAW;IACVZ,GAAG,EAAEA,GAAI;IACTa,IAAI,EAAEF,IAAI,CAACE,IAAK;IAChBC,IAAI,EAAE,KAAM;IACZC,GAAG,UAAAC,MAAA,CAAUL,IAAI,CAACM,IAAI;EAAG,EAE5B,CAAC,CACD,CACW;AAEpB,CAAC;AAAAC,OAAA,CAAArB,cAAA,GAAAA,cAAA"}
1
+ {"version":3,"file":"DocRequestBody.js","names":["React","CollapserCard","ExploreType","DocRequestBody","_ref","method","api","bodies","bodyParams","length","createElement","Fragment","header","id","heading","map","body","type","open","key","concat","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,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,aAAa,QAAQ,gBAAgB;AAC9C,SAASC,WAAW,QAAQ,qBAAqB;AAWjD,OAAO,IAAMC,cAAuC,GAAGC,IAAA,IAAqB;EAAA,IAApB;IAAEC,MAAM;IAAEC;EAAI,CAAC,GAAAF,IAAA;EACrE,IAAMG,MAAM,GAAGF,MAAM,CAACG,UAAU;EAChC,IAAID,MAAM,CAACE,MAAM,KAAK,CAAC,EAAE,OAAOT,KAAA,CAAAU,aAAA,CAAAV,KAAA,CAAAW,QAAA,MAAI,CAAC;EACrC,IAAMC,MAAM,GAAGL,MAAM,CAACE,MAAM,GAAG,CAAC,GAAG,gBAAgB,GAAG,cAAc;EAEpE,OACET,KAAA,CAAAU,aAAA,CAACT,aAAa;IAACY,EAAE,EAAC,QAAQ;IAACC,OAAO,EAAEF;EAAO,GACzCZ,KAAA,CAAAU,aAAA,CAAAV,KAAA,CAAAW,QAAA,QACGJ,MAAM,CAACQ,GAAG,CAAEC,IAAI,IACfhB,KAAA,CAAAU,aAAA,CAACR,WAAW;IACVI,GAAG,EAAEA,GAAI;IACTW,IAAI,EAAED,IAAI,CAACC,IAAK;IAChBC,IAAI,EAAE,KAAM;IACZC,GAAG,UAAAC,MAAA,CAAUJ,IAAI,CAACK,IAAI;EAAG,CAC1B,CACF,CACD,CACW,CAAC;AAEpB,CAAC"}
@@ -1,38 +1,30 @@
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 => {
1
+ import React, { useState, useEffect } from 'react';
2
+ import { ButtonToggle, ButtonItem } from '@looker/components';
3
+ import { ExploreType } from '../../../../components';
4
+ export var DocResponseTypes = _ref => {
13
5
  var {
14
6
  api,
15
7
  responses
16
8
  } = _ref;
17
9
  var mediaTypes = Object.keys(responses);
18
- var [selectedMediaType, setSelectedMediaType] = (0, _react.useState)(mediaTypes[0]);
19
- var [resps, setResps] = (0, _react.useState)(responses);
20
- (0, _react.useEffect)(() => {
10
+ var [selectedMediaType, setSelectedMediaType] = useState(mediaTypes[0]);
11
+ var [resps, setResps] = useState(responses);
12
+ useEffect(() => {
21
13
  setSelectedMediaType(mediaTypes[0]);
22
14
  setResps(responses);
23
15
  }, [responses, mediaTypes]);
24
- return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_components.ButtonToggle, {
16
+ return React.createElement(React.Fragment, null, React.createElement(ButtonToggle, {
25
17
  value: selectedMediaType,
26
18
  onChange: setSelectedMediaType,
27
19
  mt: "large",
28
20
  mb: "large"
29
- }, mediaTypes.map(mediaType => _react.default.createElement(_components.ButtonItem, {
21
+ }, mediaTypes.map(mediaType => React.createElement(ButtonItem, {
30
22
  key: mediaType
31
- }, mediaType))), _react.default.createElement("div", {
23
+ }, mediaType))), React.createElement("div", {
32
24
  style: {
33
25
  overflow: 'auto'
34
26
  }
35
- }, _react.default.createElement(_components2.ExploreType, {
27
+ }, React.createElement(ExploreType, {
36
28
  api: api,
37
29
  key: selectedMediaType,
38
30
  type: resps[selectedMediaType].type,
@@ -40,5 +32,4 @@ var DocResponseTypes = _ref => {
40
32
  maxDepth: 2
41
33
  })));
42
34
  };
43
- exports.DocResponseTypes = DocResponseTypes;
44
35
  //# sourceMappingURL=DocResponseTypes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocResponseTypes.js","names":["_react","_interopRequireWildcard","require","_components","_components2","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","DocResponseTypes","_ref","api","responses","mediaTypes","keys","selectedMediaType","setSelectedMediaType","useState","resps","setResps","useEffect","createElement","Fragment","ButtonToggle","value","onChange","mt","mb","map","mediaType","ButtonItem","style","overflow","ExploreType","type","link","maxDepth","exports"],"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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAOA,IAAAE,YAAA,GAAAF,OAAA;AAAoD,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAL,wBAAAS,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAA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M;IAEdJ,oBAAoB,CAACH,UAAU,CAAC,CAAC,CAAC,CAAC;IACnCM,QAAQ,CAACP,SAAS,CAAC;EACrB,CAAC,EAAE,CAACA,SAAS,EAAEC,UAAU,CAAC,CAAC;EAG3B,OACE/B,MAAA,CAAAY,OAAA,CAAA2B,aAAA,CAAAvC,MAAA,CAAAY,OAAA,CAAA4B,QAAA,QACExC,MAAA,CAAAY,OAAA,CAAA2B,aAAA,CAACpC,WAAA,CAAAsC,YAAY;IACXC,KAAK,EAAET,iBAAkB;IACzBU,QAAQ,EAAET,oBAAqB;IAC/BU,EAAE,EAAC,OAAO;IACVC,EAAE,EAAC;EAAO,GAETd,UAAU,CAACe,GAAG,CAAEC,SAAS,IACxB/C,MAAA,CAAAY,OAAA,CAAA2B,aAAA,CAACpC,WAAA,CAAA6C,UAAU;IAAC3B,GAAG,EAAE0B;EAAU,GAAEA,SAAS,CACvC,CAAC,CACW,EACf/C,MAAA,CAAAY,OAAA,CAAA2B,aAAA;IAAKU,KAAK,EAAE;MAAEC,QAAQ,EAAE;IAAO;EAAE,GAC/BlD,MAAA,CAAAY,OAAA,CAAA2B,aAAA,CAACnC,YAAA,CAAA+C,WAAW;IACVtB,GAAG,EAAEA,GAAI;IACTR,GAAG,EAAEY,iBAAkB;IACvBmB,IAAI,EAAEhB,KAAK,CAACH,iBAAiB,CAAC,CAACmB,IAAK;IACpCC,IAAI,EAAE,IAAK;IACXC,QAAQ,EAAE;EAAE,EACZ,CACE,CACL;AAEP,CAAC;AAAAC,OAAA,CAAA5B,gBAAA,GAAAA,gBAAA"}
1
+ {"version":3,"file":"DocResponseTypes.js","names":["React","useState","useEffect","ButtonToggle","ButtonItem","ExploreType","DocResponseTypes","_ref","api","responses","mediaTypes","Object","keys","selectedMediaType","setSelectedMediaType","resps","setResps","createElement","Fragment","value","onChange","mt","mb","map","mediaType","key","style","overflow","type","link","maxDepth"],"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,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAClD,SAASC,YAAY,EAAEC,UAAU,QAAQ,oBAAoB;AAO7D,SAASC,WAAW,QAAQ,wBAAwB;AAapD,OAAO,IAAMC,gBAAgB,GAAGC,IAAA,IAA+C;EAAA,IAA9C;IAAEC,GAAG;IAAEC;EAAiC,CAAC,GAAAF,IAAA;EACxE,IAAMG,UAAU,GAAGC,MAAM,CAACC,IAAI,CAACH,SAAS,CAAC;EACzC,IAAM,CAACI,iBAAiB,EAAEC,oBAAoB,CAAC,GAAGb,QAAQ,CAACS,UAAU,CAAC,CAAC,CAAC,CAAC;EACzE,IAAM,CAACK,KAAK,EAAEC,QAAQ,CAAC,GAAGf,QAAQ,CAACQ,SAAS,CAAC;EAE7CP,SAAS,CAAC,MAAM;IAEdY,oBAAoB,CAACJ,UAAU,CAAC,CAAC,CAAC,CAAC;IACnCM,QAAQ,CAACP,SAAS,CAAC;EACrB,CAAC,EAAE,CAACA,SAAS,EAAEC,UAAU,CAAC,CAAC;EAG3B,OACEV,KAAA,CAAAiB,aAAA,CAAAjB,KAAA,CAAAkB,QAAA,QACElB,KAAA,CAAAiB,aAAA,CAACd,YAAY;IACXgB,KAAK,EAAEN,iBAAkB;IACzBO,QAAQ,EAAEN,oBAAqB;IAC/BO,EAAE,EAAC,OAAO;IACVC,EAAE,EAAC;EAAO,GAETZ,UAAU,CAACa,GAAG,CAAEC,SAAS,IACxBxB,KAAA,CAAAiB,aAAA,CAACb,UAAU;IAACqB,GAAG,EAAED;EAAU,GAAEA,SAAsB,CACpD,CACW,CAAC,EACfxB,KAAA,CAAAiB,aAAA;IAAKS,KAAK,EAAE;MAAEC,QAAQ,EAAE;IAAO;EAAE,GAC/B3B,KAAA,CAAAiB,aAAA,CAACZ,WAAW;IACVG,GAAG,EAAEA,GAAI;IACTiB,GAAG,EAAEZ,iBAAkB;IACvBe,IAAI,EAAEb,KAAK,CAACF,iBAAiB,CAAC,CAACe,IAAK;IACpCC,IAAI,EAAE,IAAK;IACXC,QAAQ,EAAE;EAAE,CACb,CACE,CACL,CAAC;AAEP,CAAC"}
@@ -1,29 +1,21 @@
1
- "use strict";
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
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); } }
17
2
  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); }); }; }
18
- var DocResponses = _ref => {
3
+ import React, { useEffect, useState } from 'react';
4
+ import { Tabs2, Tab2 } from '@looker/components';
5
+ import { CollapserCard } from '@looker/run-it';
6
+ import { ErrorDoc } from '@looker/sdk-rtl';
7
+ import { apiErrorDisplayFetch, ExtMarkdown, getEnvAdaptor } from '@looker/extension-utils';
8
+ import { DocResponseTypes } from './DocResponseTypes';
9
+ import { buildResponseTree } from './utils';
10
+ export var DocResponses = _ref => {
19
11
  var {
20
12
  api,
21
13
  method,
22
14
  errorCode
23
15
  } = _ref;
24
- var [errorContent, setErrorContent] = (0, _react.useState)('');
16
+ var [errorContent, setErrorContent] = useState('');
25
17
  var responses = method.responses;
26
- var responseTree = (0, _utils.buildResponseTree)(responses);
18
+ var responseTree = buildResponseTree(responses);
27
19
  var tabNames = Object.keys(responseTree);
28
20
  var defaultTabId = tabNames[0];
29
21
  if (errorCode) {
@@ -34,13 +26,13 @@ var DocResponses = _ref => {
34
26
  }
35
27
  });
36
28
  }
37
- (0, _react.useEffect)(() => {
29
+ useEffect(() => {
38
30
  if (!errorCode) return;
39
31
  var getErrorContent = function () {
40
32
  var _ref2 = _asyncToGenerator(function* () {
41
33
  var docUrl = "/err/4.0/".concat(errorCode, "/").concat(method.httpMethod.toLocaleLowerCase()).concat(method.endpoint);
42
- var adaptor = (0, _extensionUtils.getEnvAdaptor)();
43
- var errDoc = new _sdkRtl.ErrorDoc(adaptor.sdk, _extensionUtils.apiErrorDisplayFetch);
34
+ var adaptor = getEnvAdaptor();
35
+ var errDoc = new ErrorDoc(adaptor.sdk, apiErrorDisplayFetch);
44
36
  var content = yield errDoc.content(docUrl);
45
37
  setErrorContent(content);
46
38
  });
@@ -50,26 +42,25 @@ var DocResponses = _ref => {
50
42
  }();
51
43
  getErrorContent();
52
44
  }, [errorCode]);
53
- if (responses.length === 0) return _react.default.createElement(_react.default.Fragment, null);
54
- return _react.default.createElement(_runIt.CollapserCard, {
45
+ if (responses.length === 0) return React.createElement(React.Fragment, null);
46
+ return React.createElement(CollapserCard, {
55
47
  heading: "Response Models",
56
48
  id: "response models"
57
- }, _react.default.createElement(_components.Tabs2, {
49
+ }, React.createElement(Tabs2, {
58
50
  defaultTabId: defaultTabId
59
51
  }, Object.entries(responseTree).map(_ref3 => {
60
52
  var [statusCode, response] = _ref3;
61
53
  var errorTab = errorCode && statusCode === defaultTabId;
62
- return _react.default.createElement(_components.Tab2, {
54
+ return React.createElement(Tab2, {
63
55
  key: statusCode,
64
56
  id: statusCode,
65
57
  label: statusCode
66
- }, _react.default.createElement(_DocResponseTypes.DocResponseTypes, {
58
+ }, React.createElement(DocResponseTypes, {
67
59
  api: api,
68
60
  responses: response
69
- }), errorContent && errorTab && _react.default.createElement(_extensionUtils.ExtMarkdown, {
61
+ }), errorContent && errorTab && React.createElement(ExtMarkdown, {
70
62
  source: errorContent
71
63
  }));
72
64
  })));
73
65
  };
74
- exports.DocResponses = DocResponses;
75
66
  //# sourceMappingURL=DocResponses.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocResponses.js","names":["_react","_interopRequireWildcard","require","_components","_runIt","_sdkRtl","_extensionUtils","_DocResponseTypes","_utils","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","asyncGeneratorStep","gen","resolve","reject","_next","_throw","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","DocResponses","_ref","api","method","errorCode","errorContent","setErrorContent","useState","responses","responseTree","buildResponseTree","tabNames","keys","defaultTabId","pattern","RegExp","concat","forEach","el","test","useEffect","getErrorContent","_ref2","docUrl","httpMethod","toLocaleLowerCase","endpoint","adaptor","getEnvAdaptor","errDoc","ErrorDoc","sdk","apiErrorDisplayFetch","content","length","createElement","Fragment","CollapserCard","heading","id","Tabs2","entries","map","_ref3","statusCode","response","errorTab","Tab2","label","DocResponseTypes","ExtMarkdown","source","exports"],"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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AACA,IA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AA,CAACpF,WAAA,CAAAyF,KAAK;IAAC3B,YAAY,EAAEA;EAAa,GAC/B3C,MAAM,CAACuE,OAAO,CAAChC,YAAY,CAAC,CAACiC,GAAG,CAACC,KAAA,IAA4B;IAAA,IAA3B,CAACC,UAAU,EAAEC,QAAQ,CAAC,GAAAF,KAAA;IACvD,IAAMG,QAAQ,GAAG1C,SAAS,IAAIwC,UAAU,KAAK/B,YAAY;IACzD,OACEjE,MAAA,CAAAgB,OAAA,CAAAuE,aAAA,CAACpF,WAAA,CAAAgG,IAAI;MAAC1E,GAAG,EAAEuE,UAAW;MAACL,EAAE,EAAEK,UAAW;MAACI,KAAK,EAAEJ;IAAW,GACvDhG,MAAA,CAAAgB,OAAA,CAAAuE,aAAA,CAAChF,iBAAA,CAAA8F,gBAAgB;MAAC/C,GAAG,EAAEA,GAAI;MAACM,SAAS,EAAEqC;IAAS,EAAG,EAClDxC,YAAY,IAAIyC,QAAQ,IACvBlG,MAAA,CAAAgB,OAAA,CAAAuE,aAAA,CAACjF,eAAA,CAAAgG,WAAW;MAACC,MAAM,EAAE9C;IAAa,EACnC,CACI;EAEX,CAAC,CAAC,CACI,CACM;AAEpB,CAAC;AAAA+C,OAAA,CAAApD,YAAA,GAAAA,YAAA"}
1
+ {"version":3,"file":"DocResponses.js","names":["React","useEffect","useState","Tabs2","Tab2","CollapserCard","ErrorDoc","apiErrorDisplayFetch","ExtMarkdown","getEnvAdaptor","DocResponseTypes","buildResponseTree","DocResponses","_ref","api","method","errorCode","errorContent","setErrorContent","responses","responseTree","tabNames","Object","keys","defaultTabId","pattern","RegExp","concat","forEach","el","test","getErrorContent","_ref2","_asyncToGenerator","docUrl","httpMethod","toLocaleLowerCase","endpoint","adaptor","errDoc","sdk","content","apply","arguments","length","createElement","Fragment","heading","id","entries","map","_ref3","statusCode","response","errorTab","key","label","source"],"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,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,KAAK,EAAEC,IAAI,QAAQ,oBAAoB;AAEhD,SAASC,aAAa,QAAQ,gBAAgB;AAC9C,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,SACEC,oBAAoB,EACpBC,WAAW,EACXC,aAAa,QACR,yBAAyB;AAEhC,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,iBAAiB,QAAQ,SAAS;AAY3C,OAAO,IAAMC,YAAY,GAAGC,IAAA,IAAmD;EAAA,IAAlD;IAAEC,GAAG;IAAEC,MAAM;IAAEC;EAA6B,CAAC,GAAAH,IAAA;EACxE,IAAM,CAACI,YAAY,EAAEC,eAAe,CAAC,GAAGhB,QAAQ,CAAC,EAAE,CAAC;EACpD,IAAMiB,SAAS,GAAGJ,MAAM,CAACI,SAAS;EAElC,IAAMC,YAAY,GAAGT,iBAAiB,CAACQ,SAAS,CAAC;EACjD,IAAME,QA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EAAC,iBAAiB;IAACC,EAAE,EAAC;EAAiB,GAC3DhD,KAAA,CAAA6C,aAAA,CAAC1C,KAAK;IAACqB,YAAY,EAAEA;EAAa,GAC/BF,MAAM,CAAC2B,OAAO,CAAC7B,YAAY,CAAC,CAAC8B,GAAG,CAACC,KAAA,IAA4B;IAAA,IAA3B,CAACC,UAAU,EAAEC,QAAQ,CAAC,GAAAF,KAAA;IACvD,IAAMG,QAAQ,GAAGtC,SAAS,IAAIoC,UAAU,KAAK5B,YAAY;IACzD,OACExB,KAAA,CAAA6C,aAAA,CAACzC,IAAI;MAACmD,GAAG,EAAEH,UAAW;MAACJ,EAAE,EAAEI,UAAW;MAACI,KAAK,EAAEJ;IAAW,GACvDpD,KAAA,CAAA6C,aAAA,CAACnC,gBAAgB;MAACI,GAAG,EAAEA,GAAI;MAACK,SAAS,EAAEkC;IAAS,CAAE,CAAC,EAClDpC,YAAY,IAAIqC,QAAQ,IACvBtD,KAAA,CAAA6C,aAAA,CAACrC,WAAW;MAACiD,MAAM,EAAExC;IAAa,CAAE,CAElC,CAAC;EAEX,CAAC,CACI,CACM,CAAC;AAEpB,CAAC"}
@@ -1,13 +1,2 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "DocResponses", {
7
- enumerable: true,
8
- get: function get() {
9
- return _DocResponses.DocResponses;
10
- }
11
- });
12
- var _DocResponses = require("./DocResponses");
1
+ export { DocResponses } from './DocResponses';
13
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_DocResponses","require"],"sources":["../../../../../../src/scenes/MethodScene/components/DocResponses/index.ts"],"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 */\nexport { DocResponses } from './DocResponses'\n"],"mappings":";;;;;;;;;;;AAyBA,IAAAA,aAAA,GAAAC,OAAA"}
1
+ {"version":3,"file":"index.js","names":["DocResponses"],"sources":["../../../../../../src/scenes/MethodScene/components/DocResponses/index.ts"],"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 */\nexport { DocResponses } from './DocResponses'\n"],"mappings":"AAyBA,SAASA,YAAY,QAAQ,gBAAgB"}
@@ -1,10 +1,4 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.buildResponseTree = void 0;
7
- var buildResponseTree = responses => {
1
+ export var buildResponseTree = responses => {
8
2
  var tree = {};
9
3
  Object.values(responses).forEach(response => {
10
4
  var node = "".concat(response.statusCode, ": ").concat(response.description);
@@ -13,5 +7,4 @@ var buildResponseTree = responses => {
13
7
  });
14
8
  return tree;
15
9
  };
16
- exports.buildResponseTree = buildResponseTree;
17
10
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["buildResponseTree","responses","tree","Object","values","forEach","response","node","concat","statusCode","description","mediaType","exports"],"sources":["../../../../../../src/scenes/MethodScene/components/DocResponses/utils.ts"],"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 { IMethodResponse, KeyedCollection } from '@looker/sdk-codegen'\n\n/**\n * Given an array of method responses, group them by statusCode. The value of each status code is a collection of\n * media types (keys) and responses (values)\n * @param responses An array of method responses\n */\nexport const buildResponseTree = (\n responses: IMethodResponse[]\n): KeyedCollection<KeyedCollection<IMethodResponse>> => {\n const tree = {}\n Object.values(responses).forEach((response) => {\n const node = `${response.statusCode}: ${response.description}`\n if (!(node in tree)) tree[node] = {}\n tree[node][response.mediaType] = response\n })\n return tree\n}\n"],"mappings":";;;;;;AAiCO,IAAMA,iBAAiB,GAC5BC,SAA4B,IAC0B;EACtD,IAAMC,IAAI,GAAG,CAAC,CAAC;EACfC,MAAM,CAACC,MAAM,CAACH,SAAS,CAAC,CAACI,OAAO,CAAEC,QAAQ,IAAK;IAC7C,IAAMC,IAAI,MAAAC,MAAA,CAAMF,QAAQ,CAACG,UAAU,QAAAD,MAAA,CAAKF,QAAQ,CAACI,WAAW,CAAE;IAC9D,IAAI,EAAEH,IAAI,IAAIL,IAAI,CAAC,EAAEA,IAAI,CAACK,IAAI,CAAC,GAAG,CAAC,CAAC;IACpCL,IAAI,CAACK,IAAI,CAAC,CAACD,QAAQ,CAACK,SAAS,CAAC,GAAGL,QAAQ;EAC3C,CAAC,CAAC;EACF,OAAOJ,IAAI;AACb,CAAC;AAAAU,OAAA,CAAAZ,iBAAA,GAAAA,iBAAA"}
1
+ {"version":3,"file":"utils.js","names":["buildResponseTree","responses","tree","Object","values","forEach","response","node","concat","statusCode","description","mediaType"],"sources":["../../../../../../src/scenes/MethodScene/components/DocResponses/utils.ts"],"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 { IMethodResponse, KeyedCollection } from '@looker/sdk-codegen'\n\n/**\n * Given an array of method responses, group them by statusCode. The value of each status code is a collection of\n * media types (keys) and responses (values)\n * @param responses An array of method responses\n */\nexport const buildResponseTree = (\n responses: IMethodResponse[]\n): KeyedCollection<KeyedCollection<IMethodResponse>> => {\n const tree = {}\n Object.values(responses).forEach((response) => {\n const node = `${response.statusCode}: ${response.description}`\n if (!(node in tree)) tree[node] = {}\n tree[node][response.mediaType] = response\n })\n return tree\n}\n"],"mappings":"AAiCA,OAAO,IAAMA,iBAAiB,GAC5BC,SAA4B,IAC0B;EACtD,IAAMC,IAAI,GAAG,CAAC,CAAC;EACfC,MAAM,CAACC,MAAM,CAACH,SAAS,CAAC,CAACI,OAAO,CAAEC,QAAQ,IAAK;IAC7C,IAAMC,IAAI,MAAAC,MAAA,CAAMF,QAAQ,CAACG,UAAU,QAAAD,MAAA,CAAKF,QAAQ,CAACI,WAAW,CAAE;IAC9D,IAAI,EAAEH,IAAI,IAAIL,IAAI,CAAC,EAAEA,IAAI,CAACK,IAAI,CAAC,GAAG,CAAC,CAAC;IACpCL,IAAI,CAACK,IAAI,CAAC,CAACD,QAAQ,CAACK,SAAS,CAAC,GAAGL,QAAQ;EAC3C,CAAC,CAAC;EACF,OAAOJ,IAAI;AACb,CAAC"}
@@ -1,27 +1,4 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "DocOperation", {
7
- enumerable: true,
8
- get: function get() {
9
- return _DocOperation.DocOperation;
10
- }
11
- });
12
- Object.defineProperty(exports, "DocRequestBody", {
13
- enumerable: true,
14
- get: function get() {
15
- return _DocRequestBody.DocRequestBody;
16
- }
17
- });
18
- Object.defineProperty(exports, "DocResponses", {
19
- enumerable: true,
20
- get: function get() {
21
- return _DocResponses.DocResponses;
22
- }
23
- });
24
- var _DocOperation = require("./DocOperation");
25
- var _DocRequestBody = require("./DocRequestBody");
26
- var _DocResponses = require("./DocResponses");
1
+ export { DocOperation } from './DocOperation';
2
+ export { DocRequestBody } from './DocRequestBody';
3
+ export { DocResponses } from './DocResponses';
27
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_DocOperation","require","_DocRequestBody","_DocResponses"],"sources":["../../../../../src/scenes/MethodScene/components/index.ts"],"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 */\nexport { DocOperation } from './DocOperation'\nexport { DocRequestBody } from './DocRequestBody'\nexport { DocResponses } from './DocResponses'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA"}
1
+ {"version":3,"file":"index.js","names":["DocOperation","DocRequestBody","DocResponses"],"sources":["../../../../../src/scenes/MethodScene/components/index.ts"],"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 */\nexport { DocOperation } from './DocOperation'\nexport { DocRequestBody } from './DocRequestBody'\nexport { DocResponses } from './DocResponses'\n"],"mappings":"AAyBA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,YAAY,QAAQ,gBAAgB"}
@@ -1,13 +1,2 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "MethodScene", {
7
- enumerable: true,
8
- get: function get() {
9
- return _MethodScene.MethodScene;
10
- }
11
- });
12
- var _MethodScene = require("./MethodScene");
1
+ export { MethodScene } from './MethodScene';
13
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_MethodScene","require"],"sources":["../../../../src/scenes/MethodScene/index.ts"],"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 */\nexport { MethodScene } from './MethodScene'\n"],"mappings":";;;;;;;;;;;AAyBA,IAAAA,YAAA,GAAAC,OAAA"}
1
+ {"version":3,"file":"index.js","names":["MethodScene"],"sources":["../../../../src/scenes/MethodScene/index.ts"],"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 */\nexport { MethodScene } from './MethodScene'\n"],"mappings":"AAyBA,SAASA,WAAW,QAAQ,eAAe"}