@looker/api-explorer 0.9.19 → 0.9.25

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 (699) hide show
  1. package/CHANGELOG.md +135 -1
  2. package/e2e/e2e.spec.ts +6 -5
  3. package/lib/ApiExplorer.d.ts +7 -38
  4. package/lib/ApiExplorer.js +90 -71
  5. package/lib/ApiExplorer.js.map +1 -1
  6. package/lib/App.d.ts +1 -0
  7. package/lib/App.js +29 -0
  8. package/lib/App.js.map +1 -0
  9. package/lib/StandaloneApiExplorer.d.ts +1 -1
  10. package/lib/StandaloneApiExplorer.js +10 -21
  11. package/lib/StandaloneApiExplorer.js.map +1 -1
  12. package/lib/components/DocActivityType/DocActivityType.d.ts +2 -2
  13. package/lib/components/DocActivityType/DocActivityType.js.map +1 -1
  14. package/lib/components/DocCode/DocCode.d.ts +1 -1
  15. package/lib/components/DocCode/DocCode.js +6 -10
  16. package/lib/components/DocCode/DocCode.js.map +1 -1
  17. package/lib/components/DocMarkdown/DocMarkdown.d.ts +1 -1
  18. package/lib/components/DocMarkdown/DocMarkdown.js +13 -15
  19. package/lib/components/DocMarkdown/DocMarkdown.js.map +1 -1
  20. package/lib/components/DocMethodSummary/DocMethodSummary.d.ts +2 -2
  21. package/lib/components/DocMethodSummary/DocMethodSummary.js +1 -1
  22. package/lib/components/DocMethodSummary/DocMethodSummary.js.map +1 -1
  23. package/lib/components/DocMethodSummary/DocSummaryStatus.d.ts +2 -3
  24. package/lib/components/DocMethodSummary/DocSummaryStatus.js +3 -3
  25. package/lib/components/DocMethodSummary/DocSummaryStatus.js.map +1 -1
  26. package/lib/components/DocMethodSummary/index.d.ts +1 -0
  27. package/lib/components/DocMethodSummary/index.js +8 -0
  28. package/lib/components/DocMethodSummary/index.js.map +1 -1
  29. package/lib/components/DocMethodSummary/utils.d.ts +2 -1
  30. package/lib/components/DocMethodSummary/utils.js +24 -15
  31. package/lib/components/DocMethodSummary/utils.js.map +1 -1
  32. package/lib/components/DocPseudo/DocParam.d.ts +2 -2
  33. package/lib/components/DocPseudo/DocParam.js.map +1 -1
  34. package/lib/components/DocPseudo/DocParams.d.ts +2 -2
  35. package/lib/components/DocPseudo/DocParams.js.map +1 -1
  36. package/lib/components/DocPseudo/DocPrimaryResponse.d.ts +2 -2
  37. package/lib/components/DocPseudo/DocPrimaryResponse.js.map +1 -1
  38. package/lib/components/DocPseudo/DocPseudo.d.ts +2 -2
  39. package/lib/components/DocPseudo/DocPseudo.js.map +1 -1
  40. package/lib/components/DocRateLimited/DocRateLimited.d.ts +2 -2
  41. package/lib/components/DocRateLimited/DocRateLimited.js.map +1 -1
  42. package/lib/components/DocReferences/DocReferences.d.ts +2 -2
  43. package/lib/components/DocReferences/DocReferences.js +7 -11
  44. package/lib/components/DocReferences/DocReferences.js.map +1 -1
  45. package/lib/components/DocReferences/utils.d.ts +2 -2
  46. package/lib/components/DocReferences/utils.js +2 -28
  47. package/lib/components/DocReferences/utils.js.map +1 -1
  48. package/lib/components/DocResponses/DocResponseTypes.d.ts +3 -2
  49. package/lib/components/DocResponses/DocResponseTypes.js +3 -1
  50. package/lib/components/DocResponses/DocResponseTypes.js.map +1 -1
  51. package/lib/components/DocResponses/DocResponses.d.ts +3 -2
  52. package/lib/components/DocResponses/DocResponses.js +2 -0
  53. package/lib/components/DocResponses/DocResponses.js.map +1 -1
  54. package/lib/components/DocResponses/utils.d.ts +1 -1
  55. package/lib/components/DocResponses/utils.js.map +1 -1
  56. package/lib/components/DocSDKs/DocDeclarations.d.ts +2 -2
  57. package/lib/components/DocSDKs/DocDeclarations.js.map +1 -1
  58. package/lib/components/DocSDKs/DocSDKs.d.ts +2 -2
  59. package/lib/components/DocSDKs/DocSDKs.js +1 -1
  60. package/lib/components/DocSDKs/DocSDKs.js.map +1 -1
  61. package/lib/components/DocSDKs/utils.d.ts +1 -1
  62. package/lib/components/DocSDKs/utils.js.map +1 -1
  63. package/lib/components/DocSchema/DocSchema.d.ts +1 -1
  64. package/lib/components/DocSchema/DocSchema.js.map +1 -1
  65. package/lib/components/DocSdkUsage/DocSdkExampleCell.d.ts +1 -1
  66. package/lib/components/DocSdkUsage/DocSdkExampleCell.js.map +1 -1
  67. package/lib/components/DocSdkUsage/DocSdkUsage.d.ts +2 -2
  68. package/lib/components/DocSdkUsage/DocSdkUsage.js +4 -7
  69. package/lib/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
  70. package/lib/components/DocSdkUsage/utils.d.ts +2 -2
  71. package/lib/components/DocSdkUsage/utils.js.map +1 -1
  72. package/lib/components/DocSource/DocSource.d.ts +2 -2
  73. package/lib/components/DocSource/DocSource.js +5 -7
  74. package/lib/components/DocSource/DocSource.js.map +1 -1
  75. package/lib/components/DocStatus/DocStatus.d.ts +2 -2
  76. package/lib/components/DocStatus/DocStatus.js.map +1 -1
  77. package/lib/components/DocTitle/DocTitle.d.ts +1 -1
  78. package/lib/components/DocTitle/DocTitle.js.map +1 -1
  79. package/lib/components/DocTypeSummary/DocTypeSummary.d.ts +7 -0
  80. package/lib/components/DocTypeSummary/DocTypeSummary.js +52 -0
  81. package/lib/components/DocTypeSummary/DocTypeSummary.js.map +1 -0
  82. package/lib/components/DocTypeSummary/index.d.ts +1 -0
  83. package/lib/components/DocTypeSummary/index.js +14 -0
  84. package/lib/components/DocTypeSummary/index.js.map +1 -0
  85. package/lib/components/ErrorBoundary/ErrorBoundary.js +1 -1
  86. package/lib/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
  87. package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.d.ts +1 -1
  88. package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js +152 -8
  89. package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
  90. package/lib/components/ExploreType/ExploreProperty.d.ts +10 -7
  91. package/lib/components/ExploreType/ExploreProperty.js +14 -3
  92. package/lib/components/ExploreType/ExploreProperty.js.map +1 -1
  93. package/lib/components/ExploreType/ExploreType.d.ts +4 -2
  94. package/lib/components/ExploreType/ExploreType.js +9 -5
  95. package/lib/components/ExploreType/ExploreType.js.map +1 -1
  96. package/lib/components/ExploreType/exploreUtils.d.ts +2 -2
  97. package/lib/components/ExploreType/exploreUtils.js.map +1 -1
  98. package/lib/components/Header/Header.d.ts +5 -4
  99. package/lib/components/Header/Header.js +4 -2
  100. package/lib/components/Header/Header.js.map +1 -1
  101. package/lib/components/Header/index.d.ts +1 -1
  102. package/lib/components/Header/index.js +6 -0
  103. package/lib/components/Header/index.js.map +1 -1
  104. package/lib/components/SelectorContainer/ApiSpecSelector.d.ts +3 -3
  105. package/lib/components/SelectorContainer/ApiSpecSelector.js +3 -1
  106. package/lib/components/SelectorContainer/ApiSpecSelector.js.map +1 -1
  107. package/lib/components/SelectorContainer/SdkLanguageSelector.d.ts +1 -1
  108. package/lib/components/SelectorContainer/SdkLanguageSelector.js +7 -17
  109. package/lib/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
  110. package/lib/components/SelectorContainer/SelectorContainer.d.ts +5 -4
  111. package/lib/components/SelectorContainer/SelectorContainer.js +11 -3
  112. package/lib/components/SelectorContainer/SelectorContainer.js.map +1 -1
  113. package/lib/components/SideNav/SearchMessage.d.ts +2 -2
  114. package/lib/components/SideNav/SearchMessage.js.map +1 -1
  115. package/lib/components/SideNav/SideNav.d.ts +3 -3
  116. package/lib/components/SideNav/SideNav.js +93 -56
  117. package/lib/components/SideNav/SideNav.js.map +1 -1
  118. package/lib/components/SideNav/SideNavMethodTags.d.ts +10 -0
  119. package/lib/components/SideNav/{SideNavTags.js → SideNavMethodTags.js} +6 -6
  120. package/lib/components/SideNav/SideNavMethodTags.js.map +1 -0
  121. package/lib/components/SideNav/SideNavMethods.d.ts +5 -4
  122. package/lib/components/SideNav/SideNavMethods.js +9 -11
  123. package/lib/components/SideNav/SideNavMethods.js.map +1 -1
  124. package/lib/components/SideNav/SideNavTypeTags.d.ts +10 -0
  125. package/lib/components/SideNav/SideNavTypeTags.js +42 -0
  126. package/lib/components/SideNav/SideNavTypeTags.js.map +1 -0
  127. package/lib/components/SideNav/SideNavTypes.d.ts +8 -5
  128. package/lib/components/SideNav/SideNavTypes.js +83 -32
  129. package/lib/components/SideNav/SideNavTypes.js.map +1 -1
  130. package/lib/components/SideNav/searchUtils.d.ts +2 -2
  131. package/lib/components/SideNav/searchUtils.js +1 -1
  132. package/lib/components/SideNav/searchUtils.js.map +1 -1
  133. package/lib/components/common/Loader.d.ts +2 -2
  134. package/lib/components/common/Loader.js.map +1 -1
  135. package/lib/components/common/common.d.ts +2 -2
  136. package/lib/components/common/common.js +2 -1
  137. package/lib/components/common/common.js.map +1 -1
  138. package/lib/components/index.d.ts +4 -2
  139. package/lib/components/index.js +28 -0
  140. package/lib/components/index.js.map +1 -1
  141. package/lib/esm/ApiExplorer.js +94 -77
  142. package/lib/esm/ApiExplorer.js.map +1 -1
  143. package/lib/esm/App.js +19 -0
  144. package/lib/esm/App.js.map +1 -0
  145. package/lib/esm/StandaloneApiExplorer.js +9 -18
  146. package/lib/esm/StandaloneApiExplorer.js.map +1 -1
  147. package/lib/esm/components/DocActivityType/DocActivityType.js.map +1 -1
  148. package/lib/esm/components/DocCode/DocCode.js +5 -8
  149. package/lib/esm/components/DocCode/DocCode.js.map +1 -1
  150. package/lib/esm/components/DocMarkdown/DocMarkdown.js +10 -12
  151. package/lib/esm/components/DocMarkdown/DocMarkdown.js.map +1 -1
  152. package/lib/esm/components/DocMethodSummary/DocMethodSummary.js +1 -1
  153. package/lib/esm/components/DocMethodSummary/DocMethodSummary.js.map +1 -1
  154. package/lib/esm/components/DocMethodSummary/DocSummaryStatus.js +3 -3
  155. package/lib/esm/components/DocMethodSummary/DocSummaryStatus.js.map +1 -1
  156. package/lib/esm/components/DocMethodSummary/index.js +1 -0
  157. package/lib/esm/components/DocMethodSummary/index.js.map +1 -1
  158. package/lib/esm/components/DocMethodSummary/utils.js +24 -15
  159. package/lib/esm/components/DocMethodSummary/utils.js.map +1 -1
  160. package/lib/esm/components/DocPseudo/DocParam.js.map +1 -1
  161. package/lib/esm/components/DocPseudo/DocParams.js.map +1 -1
  162. package/lib/esm/components/DocPseudo/DocPrimaryResponse.js.map +1 -1
  163. package/lib/esm/components/DocPseudo/DocPseudo.js.map +1 -1
  164. package/lib/esm/components/DocRateLimited/DocRateLimited.js.map +1 -1
  165. package/lib/esm/components/DocReferences/DocReferences.js +5 -8
  166. package/lib/esm/components/DocReferences/DocReferences.js.map +1 -1
  167. package/lib/esm/components/DocReferences/utils.js +1 -24
  168. package/lib/esm/components/DocReferences/utils.js.map +1 -1
  169. package/lib/esm/components/DocResponses/DocResponseTypes.js +3 -1
  170. package/lib/esm/components/DocResponses/DocResponseTypes.js.map +1 -1
  171. package/lib/esm/components/DocResponses/DocResponses.js +2 -0
  172. package/lib/esm/components/DocResponses/DocResponses.js.map +1 -1
  173. package/lib/esm/components/DocResponses/utils.js.map +1 -1
  174. package/lib/esm/components/DocSDKs/DocDeclarations.js.map +1 -1
  175. package/lib/esm/components/DocSDKs/DocSDKs.js +2 -2
  176. package/lib/esm/components/DocSDKs/DocSDKs.js.map +1 -1
  177. package/lib/esm/components/DocSDKs/utils.js.map +1 -1
  178. package/lib/esm/components/DocSchema/DocSchema.js.map +1 -1
  179. package/lib/esm/components/DocSdkUsage/DocSdkExampleCell.js.map +1 -1
  180. package/lib/esm/components/DocSdkUsage/DocSdkUsage.js +6 -8
  181. package/lib/esm/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
  182. package/lib/esm/components/DocSdkUsage/utils.js.map +1 -1
  183. package/lib/esm/components/DocSource/DocSource.js +4 -5
  184. package/lib/esm/components/DocSource/DocSource.js.map +1 -1
  185. package/lib/esm/components/DocStatus/DocStatus.js.map +1 -1
  186. package/lib/esm/components/DocTitle/DocTitle.js.map +1 -1
  187. package/lib/esm/components/DocTypeSummary/DocTypeSummary.js +38 -0
  188. package/lib/esm/components/DocTypeSummary/DocTypeSummary.js.map +1 -0
  189. package/lib/esm/components/DocTypeSummary/index.js +2 -0
  190. package/lib/{state/action_creators.js.map → esm/components/DocTypeSummary/index.js.map} +1 -1
  191. package/lib/esm/components/ErrorBoundary/ErrorBoundary.js +1 -1
  192. package/lib/esm/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
  193. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js +153 -6
  194. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
  195. package/lib/esm/components/ExploreType/ExploreProperty.js +14 -3
  196. package/lib/esm/components/ExploreType/ExploreProperty.js.map +1 -1
  197. package/lib/esm/components/ExploreType/ExploreType.js +8 -4
  198. package/lib/esm/components/ExploreType/ExploreType.js.map +1 -1
  199. package/lib/esm/components/ExploreType/exploreUtils.js.map +1 -1
  200. package/lib/esm/components/Header/Header.js +2 -1
  201. package/lib/esm/components/Header/Header.js.map +1 -1
  202. package/lib/esm/components/Header/index.js +1 -1
  203. package/lib/esm/components/Header/index.js.map +1 -1
  204. package/lib/esm/components/SelectorContainer/ApiSpecSelector.js +4 -2
  205. package/lib/esm/components/SelectorContainer/ApiSpecSelector.js.map +1 -1
  206. package/lib/esm/components/SelectorContainer/SdkLanguageSelector.js +7 -12
  207. package/lib/esm/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
  208. package/lib/esm/components/SelectorContainer/SelectorContainer.js +11 -3
  209. package/lib/esm/components/SelectorContainer/SelectorContainer.js.map +1 -1
  210. package/lib/esm/components/SideNav/SearchMessage.js.map +1 -1
  211. package/lib/esm/components/SideNav/SideNav.js +95 -57
  212. package/lib/esm/components/SideNav/SideNav.js.map +1 -1
  213. package/lib/esm/components/SideNav/{SideNavTags.js → SideNavMethodTags.js} +4 -4
  214. package/lib/esm/components/SideNav/SideNavMethodTags.js.map +1 -0
  215. package/lib/esm/components/SideNav/SideNavMethods.js +9 -12
  216. package/lib/esm/components/SideNav/SideNavMethods.js.map +1 -1
  217. package/lib/esm/components/SideNav/SideNavTypeTags.js +29 -0
  218. package/lib/esm/components/SideNav/SideNavTypeTags.js.map +1 -0
  219. package/lib/esm/components/SideNav/SideNavTypes.js +84 -33
  220. package/lib/esm/components/SideNav/SideNavTypes.js.map +1 -1
  221. package/lib/esm/components/SideNav/searchUtils.js +1 -1
  222. package/lib/esm/components/SideNav/searchUtils.js.map +1 -1
  223. package/lib/esm/components/common/Loader.js.map +1 -1
  224. package/lib/esm/components/common/common.js +2 -1
  225. package/lib/esm/components/common/common.js.map +1 -1
  226. package/lib/esm/components/index.js +4 -2
  227. package/lib/esm/components/index.js.map +1 -1
  228. package/lib/esm/index.js +4 -18
  229. package/lib/esm/index.js.map +1 -1
  230. package/lib/esm/reducers/index.js +0 -1
  231. package/lib/esm/reducers/index.js.map +1 -1
  232. package/lib/esm/reducers/spec/actions.js.map +1 -1
  233. package/lib/esm/reducers/spec/reducer.js.map +1 -1
  234. package/lib/esm/reducers/spec/utils.js +7 -1
  235. package/lib/esm/reducers/spec/utils.js.map +1 -1
  236. package/lib/esm/routes/AppRouter.js +13 -15
  237. package/lib/esm/routes/AppRouter.js.map +1 -1
  238. package/lib/esm/scenes/DiffScene/DiffScene.js +65 -11
  239. package/lib/esm/scenes/DiffScene/DiffScene.js.map +1 -1
  240. package/lib/esm/scenes/DiffScene/DocDiff/DiffBanner.js.map +1 -1
  241. package/lib/esm/scenes/DiffScene/DocDiff/DiffItem.js +2 -2
  242. package/lib/esm/scenes/DiffScene/DocDiff/DiffItem.js.map +1 -1
  243. package/lib/esm/scenes/DiffScene/DocDiff/DiffLegend.js.map +1 -1
  244. package/lib/esm/scenes/DiffScene/DocDiff/DocDiff.js.map +1 -1
  245. package/lib/esm/scenes/DiffScene/DocDiff/docDiffUtils.js.map +1 -1
  246. package/lib/esm/scenes/DiffScene/diffUtils.js.map +1 -1
  247. package/lib/esm/scenes/HomeScene/HomeScene.js.map +1 -1
  248. package/lib/esm/scenes/MethodScene/MethodScene.js +41 -23
  249. package/lib/esm/scenes/MethodScene/MethodScene.js.map +1 -1
  250. package/lib/esm/scenes/MethodScene/components/DocOperation.js.map +1 -1
  251. package/lib/esm/scenes/MethodScene/components/DocRequestBody.js +3 -1
  252. package/lib/esm/scenes/MethodScene/components/DocRequestBody.js.map +1 -1
  253. package/lib/esm/scenes/{TagScene/TagScene.js → MethodTagScene/MethodTagScene.js} +16 -11
  254. package/lib/esm/scenes/MethodTagScene/MethodTagScene.js.map +1 -0
  255. package/lib/esm/scenes/MethodTagScene/index.js +2 -0
  256. package/lib/{state/reducers.js.map → esm/scenes/MethodTagScene/index.js.map} +1 -1
  257. package/lib/esm/scenes/{TagScene → MethodTagScene}/utils.js +0 -0
  258. package/lib/esm/scenes/MethodTagScene/utils.js.map +1 -0
  259. package/lib/esm/scenes/TypeScene/TypeScene.js +14 -7
  260. package/lib/esm/scenes/TypeScene/TypeScene.js.map +1 -1
  261. package/lib/esm/scenes/TypeTagScene/TypeTagScene.js +57 -0
  262. package/lib/esm/scenes/TypeTagScene/TypeTagScene.js.map +1 -0
  263. package/lib/esm/scenes/TypeTagScene/index.js +2 -0
  264. package/lib/esm/scenes/TypeTagScene/index.js.map +1 -0
  265. package/lib/esm/scenes/TypeTagScene/utils.js +8 -0
  266. package/lib/esm/scenes/TypeTagScene/utils.js.map +1 -0
  267. package/lib/esm/scenes/index.js +2 -1
  268. package/lib/esm/scenes/index.js.map +1 -1
  269. package/lib/esm/state/index.js +2 -3
  270. package/lib/esm/state/index.js.map +1 -1
  271. package/lib/esm/state/lodes/index.js +3 -0
  272. package/lib/esm/state/lodes/index.js.map +1 -0
  273. package/lib/esm/state/lodes/sagas.js +25 -0
  274. package/lib/esm/state/lodes/sagas.js.map +1 -0
  275. package/lib/esm/state/lodes/selectors.js +5 -0
  276. package/lib/esm/state/lodes/selectors.js.map +1 -0
  277. package/lib/esm/state/lodes/slice.js +30 -0
  278. package/lib/esm/state/lodes/slice.js.map +1 -0
  279. package/lib/esm/state/settings/index.js +1 -1
  280. package/lib/esm/state/settings/index.js.map +1 -1
  281. package/lib/esm/state/settings/sagas.js +59 -0
  282. package/lib/esm/state/settings/sagas.js.map +1 -0
  283. package/lib/esm/state/settings/selectors.js +6 -1
  284. package/lib/esm/state/settings/selectors.js.map +1 -1
  285. package/lib/esm/state/settings/slice.js +50 -0
  286. package/lib/esm/state/settings/slice.js.map +1 -0
  287. package/lib/esm/state/store.js +13 -3
  288. package/lib/esm/state/store.js.map +1 -1
  289. package/lib/esm/test-utils/index.js +3 -4
  290. package/lib/esm/test-utils/index.js.map +1 -1
  291. package/lib/esm/test-utils/lodes.js +12 -0
  292. package/lib/esm/test-utils/lodes.js.map +1 -0
  293. package/lib/esm/test-utils/redux.js +30 -15
  294. package/lib/esm/test-utils/redux.js.map +1 -1
  295. package/lib/esm/test-utils/router.js.map +1 -1
  296. package/lib/esm/utils/index.js +1 -2
  297. package/lib/esm/utils/index.js.map +1 -1
  298. package/lib/esm/utils/lodeUtils.js +3 -7
  299. package/lib/esm/utils/lodeUtils.js.map +1 -1
  300. package/lib/esm/utils/path.js +32 -1
  301. package/lib/esm/utils/path.js.map +1 -1
  302. package/lib/index.d.ts +4 -1
  303. package/lib/index.js +52 -23
  304. package/lib/index.js.map +1 -1
  305. package/lib/reducers/index.d.ts +0 -1
  306. package/lib/reducers/index.js +0 -13
  307. package/lib/reducers/index.js.map +1 -1
  308. package/lib/reducers/spec/actions.d.ts +1 -1
  309. package/lib/reducers/spec/actions.js.map +1 -1
  310. package/lib/reducers/spec/reducer.d.ts +2 -2
  311. package/lib/reducers/spec/reducer.js.map +1 -1
  312. package/lib/reducers/spec/utils.d.ts +3 -3
  313. package/lib/reducers/spec/utils.js +7 -1
  314. package/lib/reducers/spec/utils.js.map +1 -1
  315. package/lib/routes/AppRouter.d.ts +5 -5
  316. package/lib/routes/AppRouter.js +12 -17
  317. package/lib/routes/AppRouter.js.map +1 -1
  318. package/lib/scenes/DiffScene/DiffScene.d.ts +2 -2
  319. package/lib/scenes/DiffScene/DiffScene.js +65 -11
  320. package/lib/scenes/DiffScene/DiffScene.js.map +1 -1
  321. package/lib/scenes/DiffScene/DocDiff/DiffBanner.d.ts +2 -2
  322. package/lib/scenes/DiffScene/DocDiff/DiffBanner.js.map +1 -1
  323. package/lib/scenes/DiffScene/DocDiff/DiffItem.d.ts +3 -3
  324. package/lib/scenes/DiffScene/DocDiff/DiffItem.js +1 -1
  325. package/lib/scenes/DiffScene/DocDiff/DiffItem.js.map +1 -1
  326. package/lib/scenes/DiffScene/DocDiff/DiffLegend.d.ts +2 -2
  327. package/lib/scenes/DiffScene/DocDiff/DiffLegend.js.map +1 -1
  328. package/lib/scenes/DiffScene/DocDiff/DocDiff.d.ts +2 -2
  329. package/lib/scenes/DiffScene/DocDiff/DocDiff.js.map +1 -1
  330. package/lib/scenes/DiffScene/DocDiff/docDiffUtils.d.ts +1 -1
  331. package/lib/scenes/DiffScene/DocDiff/docDiffUtils.js.map +1 -1
  332. package/lib/scenes/DiffScene/diffUtils.d.ts +1 -1
  333. package/lib/scenes/DiffScene/diffUtils.js.map +1 -1
  334. package/lib/scenes/HomeScene/HomeScene.d.ts +2 -2
  335. package/lib/scenes/HomeScene/HomeScene.js.map +1 -1
  336. package/lib/scenes/MethodScene/MethodScene.d.ts +5 -5
  337. package/lib/scenes/MethodScene/MethodScene.js +37 -20
  338. package/lib/scenes/MethodScene/MethodScene.js.map +1 -1
  339. package/lib/scenes/MethodScene/components/DocOperation.d.ts +2 -2
  340. package/lib/scenes/MethodScene/components/DocOperation.js.map +1 -1
  341. package/lib/scenes/MethodScene/components/DocRequestBody.d.ts +3 -2
  342. package/lib/scenes/MethodScene/components/DocRequestBody.js +3 -1
  343. package/lib/scenes/MethodScene/components/DocRequestBody.js.map +1 -1
  344. package/lib/scenes/MethodTagScene/MethodTagScene.d.ts +7 -0
  345. package/lib/scenes/{TagScene/TagScene.js → MethodTagScene/MethodTagScene.js} +19 -14
  346. package/lib/scenes/MethodTagScene/MethodTagScene.js.map +1 -0
  347. package/lib/scenes/MethodTagScene/index.d.ts +1 -0
  348. package/lib/scenes/MethodTagScene/index.js +14 -0
  349. package/lib/{context/search/SearchContext.js.map → scenes/MethodTagScene/index.js.map} +1 -1
  350. package/lib/scenes/{TagScene → MethodTagScene}/utils.d.ts +1 -1
  351. package/lib/scenes/{TagScene → MethodTagScene}/utils.js +0 -0
  352. package/lib/{context/lode/index.js.map → scenes/MethodTagScene/utils.js.map} +1 -1
  353. package/lib/scenes/TypeScene/TypeScene.d.ts +2 -2
  354. package/lib/scenes/TypeScene/TypeScene.js +16 -7
  355. package/lib/scenes/TypeScene/TypeScene.js.map +1 -1
  356. package/lib/scenes/TypeTagScene/TypeTagScene.d.ts +7 -0
  357. package/lib/scenes/TypeTagScene/TypeTagScene.js +76 -0
  358. package/lib/scenes/TypeTagScene/TypeTagScene.js.map +1 -0
  359. package/lib/scenes/TypeTagScene/index.d.ts +1 -0
  360. package/lib/scenes/TypeTagScene/index.js +14 -0
  361. package/lib/{esm/state/settings/actions.js.map → scenes/TypeTagScene/index.js.map} +1 -1
  362. package/lib/scenes/TypeTagScene/utils.d.ts +2 -0
  363. package/lib/scenes/TypeTagScene/utils.js +17 -0
  364. package/lib/scenes/TypeTagScene/utils.js.map +1 -0
  365. package/lib/scenes/index.d.ts +2 -1
  366. package/lib/scenes/index.js +11 -3
  367. package/lib/scenes/index.js.map +1 -1
  368. package/lib/state/index.d.ts +2 -2
  369. package/lib/state/index.js +15 -16
  370. package/lib/state/index.js.map +1 -1
  371. package/lib/state/lodes/index.d.ts +2 -0
  372. package/lib/{reducers/search → state/lodes}/index.js +8 -8
  373. package/lib/state/lodes/index.js.map +1 -0
  374. package/lib/state/lodes/sagas.d.ts +1 -0
  375. package/lib/state/lodes/sagas.js +34 -0
  376. package/lib/state/lodes/sagas.js.map +1 -0
  377. package/lib/state/lodes/selectors.d.ts +3 -0
  378. package/lib/state/lodes/selectors.js +17 -0
  379. package/lib/state/lodes/selectors.js.map +1 -0
  380. package/lib/state/lodes/slice.d.ts +29 -0
  381. package/lib/state/lodes/slice.js +45 -0
  382. package/lib/state/lodes/slice.js.map +1 -0
  383. package/lib/state/settings/index.d.ts +1 -1
  384. package/lib/state/settings/index.js +8 -8
  385. package/lib/state/settings/index.js.map +1 -1
  386. package/lib/state/settings/sagas.d.ts +1 -0
  387. package/lib/state/settings/sagas.js +69 -0
  388. package/lib/state/settings/sagas.js.map +1 -0
  389. package/lib/state/settings/selectors.d.ts +5 -2
  390. package/lib/state/settings/selectors.js +17 -3
  391. package/lib/state/settings/selectors.js.map +1 -1
  392. package/lib/state/settings/slice.d.ts +42 -0
  393. package/lib/state/settings/slice.js +69 -0
  394. package/lib/state/settings/slice.js.map +1 -0
  395. package/lib/state/store.d.ts +10 -6
  396. package/lib/state/store.js +15 -5
  397. package/lib/state/store.js.map +1 -1
  398. package/lib/test-data/declarations.js +24 -0
  399. package/lib/test-data/declarations.js.map +1 -0
  400. package/lib/test-data/examples.js.map +1 -1
  401. package/lib/test-data/index.js +23 -0
  402. package/lib/test-data/index.js.map +1 -1
  403. package/lib/test-data/specs.js.map +1 -1
  404. package/lib/test-utils/index.d.ts +3 -4
  405. package/lib/test-utils/index.js +33 -56
  406. package/lib/test-utils/index.js.map +1 -1
  407. package/lib/test-utils/lodes.d.ts +4 -0
  408. package/lib/test-utils/lodes.js +23 -0
  409. package/lib/test-utils/lodes.js.map +1 -0
  410. package/lib/test-utils/redux.d.ts +16 -12
  411. package/lib/test-utils/redux.js +36 -17
  412. package/lib/test-utils/redux.js.map +1 -1
  413. package/lib/test-utils/router.d.ts +2 -2
  414. package/lib/test-utils/router.js.map +1 -1
  415. package/lib/utils/highlight.d.ts +1 -0
  416. package/lib/utils/index.d.ts +1 -2
  417. package/lib/utils/index.js +6 -23
  418. package/lib/utils/index.js.map +1 -1
  419. package/lib/utils/lodeUtils.d.ts +3 -3
  420. package/lib/utils/lodeUtils.js +3 -7
  421. package/lib/utils/lodeUtils.js.map +1 -1
  422. package/lib/utils/path.d.ts +3 -1
  423. package/lib/utils/path.js +36 -2
  424. package/lib/utils/path.js.map +1 -1
  425. package/package.json +22 -16
  426. package/public/Looker.3.1.json +1343 -412
  427. package/public/Looker.4.0.json +3305 -661
  428. package/src/ApiExplorer.tsx +158 -99
  429. package/src/{index.tsx → App.tsx} +1 -1
  430. package/src/StandaloneApiExplorer.tsx +13 -25
  431. package/src/components/DocActivityType/DocActivityType.tsx +3 -2
  432. package/src/components/DocCode/DocCode.tsx +7 -6
  433. package/src/components/DocMarkdown/DocMarkdown.spec.tsx +16 -11
  434. package/src/components/DocMarkdown/DocMarkdown.tsx +11 -9
  435. package/src/components/DocMethodSummary/DocMethodSummary.spec.tsx +2 -2
  436. package/src/components/DocMethodSummary/DocMethodSummary.tsx +4 -3
  437. package/src/components/DocMethodSummary/DocSummaryStatus.spec.tsx +5 -5
  438. package/src/components/DocMethodSummary/DocSummaryStatus.tsx +5 -7
  439. package/src/components/DocMethodSummary/index.tsx +1 -0
  440. package/src/components/DocMethodSummary/utils.spec.tsx +7 -7
  441. package/src/components/DocMethodSummary/utils.tsx +17 -23
  442. package/src/components/DocPseudo/DocParam.tsx +3 -2
  443. package/src/components/DocPseudo/DocParams.tsx +3 -2
  444. package/src/components/DocPseudo/DocPrimaryResponse.tsx +3 -2
  445. package/src/components/DocPseudo/DocPseudo.tsx +3 -2
  446. package/src/components/DocRateLimited/DocRateLimited.tsx +3 -2
  447. package/src/components/DocReferences/DocReferences.spec.tsx +19 -8
  448. package/src/components/DocReferences/DocReferences.tsx +10 -10
  449. package/src/components/DocReferences/utils.spec.tsx +1 -13
  450. package/src/components/DocReferences/utils.tsx +2 -36
  451. package/src/components/DocResponses/DocResponseTypes.tsx +15 -4
  452. package/src/components/DocResponses/DocResponses.spec.tsx +1 -1
  453. package/src/components/DocResponses/DocResponses.tsx +6 -4
  454. package/src/components/DocResponses/utils.ts +1 -1
  455. package/src/components/DocSDKs/DocDeclarations.tsx +3 -2
  456. package/src/components/DocSDKs/DocSDKs.spec.tsx +12 -5
  457. package/src/components/DocSDKs/DocSDKs.tsx +6 -5
  458. package/src/components/DocSDKs/utils.ts +1 -1
  459. package/src/components/DocSchema/DocSchema.tsx +2 -1
  460. package/src/components/DocSdkUsage/DocSdkExampleCell.tsx +2 -1
  461. package/src/components/DocSdkUsage/DocSdkUsage.spec.tsx +2 -2
  462. package/src/components/DocSdkUsage/DocSdkUsage.tsx +9 -7
  463. package/src/components/DocSdkUsage/utils.ts +4 -2
  464. package/src/components/DocSource/DocSource.spec.tsx +2 -1
  465. package/src/components/DocSource/DocSource.tsx +7 -4
  466. package/src/components/DocStatus/DocStatus.spec.tsx +1 -1
  467. package/src/components/DocStatus/DocStatus.tsx +3 -2
  468. package/src/components/DocTitle/DocTitle.tsx +2 -1
  469. package/src/{state/settings/reducer.spec.ts → components/DocTypeSummary/DocTypeSummary.spec.tsx} +15 -14
  470. package/src/components/DocTypeSummary/DocTypeSummary.tsx +64 -0
  471. package/src/{state/action_creators.ts → components/DocTypeSummary/index.tsx} +1 -1
  472. package/src/components/ErrorBoundary/ErrorBoundary.spec.tsx +11 -9
  473. package/src/components/ErrorBoundary/ErrorBoundary.tsx +1 -1
  474. package/src/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.spec.tsx +6 -5
  475. package/src/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.tsx +170 -6
  476. package/src/components/ExploreType/ExploreProperty.spec.tsx +15 -6
  477. package/src/components/ExploreType/ExploreProperty.tsx +26 -12
  478. package/src/components/ExploreType/ExploreType.spec.tsx +15 -31
  479. package/src/components/ExploreType/ExploreType.tsx +13 -6
  480. package/src/components/ExploreType/exploreUtils.tsx +3 -2
  481. package/src/components/Header/Header.spec.tsx +29 -37
  482. package/src/components/Header/Header.tsx +7 -4
  483. package/src/components/Header/index.ts +1 -1
  484. package/src/components/SelectorContainer/ApiSpecSelector.spec.tsx +12 -2
  485. package/src/components/SelectorContainer/ApiSpecSelector.tsx +9 -5
  486. package/src/components/SelectorContainer/SdkLanguageSelector.spec.tsx +13 -7
  487. package/src/components/SelectorContainer/SdkLanguageSelector.tsx +7 -14
  488. package/src/components/SelectorContainer/SelectorContainer.spec.tsx +19 -25
  489. package/src/components/SelectorContainer/SelectorContainer.tsx +8 -5
  490. package/src/components/SideNav/SearchMessage.tsx +3 -2
  491. package/src/components/SideNav/SideNav.spec.tsx +28 -39
  492. package/src/components/SideNav/SideNav.tsx +102 -68
  493. package/src/components/SideNav/{SideNavTags.spec.tsx → SideNavMethodTags.spec.tsx} +10 -8
  494. package/src/components/SideNav/{SideNavTags.tsx → SideNavMethodTags.tsx} +2 -2
  495. package/src/components/SideNav/SideNavMethods.spec.tsx +9 -5
  496. package/src/components/SideNav/SideNavMethods.tsx +12 -12
  497. package/src/components/SideNav/SideNavTypeTags.spec.tsx +79 -0
  498. package/src/{context/lode/LodeContext.ts → components/SideNav/SideNavTypeTags.tsx} +26 -11
  499. package/src/components/SideNav/SideNavTypes.spec.tsx +13 -6
  500. package/src/components/SideNav/SideNavTypes.tsx +94 -43
  501. package/src/components/SideNav/{searchUtils.tsx → searchUtils.ts} +3 -3
  502. package/src/components/common/Loader.tsx +3 -2
  503. package/src/components/common/common.tsx +5 -3
  504. package/src/components/index.ts +4 -2
  505. package/src/{context/envAdaptor/index.ts → index.ts} +4 -4
  506. package/src/reducers/index.ts +0 -1
  507. package/src/reducers/spec/actions.ts +1 -1
  508. package/src/reducers/spec/reducer.spec.ts +2 -1
  509. package/src/reducers/spec/reducer.ts +5 -3
  510. package/src/reducers/spec/utils.spec.ts +1 -1
  511. package/src/reducers/spec/utils.ts +9 -4
  512. package/src/routes/AppRouter.tsx +22 -17
  513. package/src/scenes/DiffScene/DiffScene.tsx +44 -13
  514. package/src/scenes/DiffScene/DocDiff/DiffBanner.tsx +3 -2
  515. package/src/scenes/DiffScene/DocDiff/DiffItem.spec.tsx +2 -1
  516. package/src/scenes/DiffScene/DocDiff/DiffItem.tsx +6 -5
  517. package/src/scenes/DiffScene/DocDiff/DiffLegend.tsx +3 -2
  518. package/src/scenes/DiffScene/DocDiff/DocDiff.tsx +3 -2
  519. package/src/scenes/DiffScene/DocDiff/docDiffUtils.tsx +2 -7
  520. package/src/scenes/DiffScene/diffUtils.spec.ts +2 -1
  521. package/src/scenes/DiffScene/diffUtils.ts +2 -2
  522. package/src/scenes/HomeScene/HomeScene.tsx +3 -2
  523. package/src/scenes/MethodScene/MethodScene.tsx +66 -43
  524. package/src/scenes/MethodScene/components/DocOperation.tsx +3 -2
  525. package/src/scenes/MethodScene/components/DocRequestBody.spec.tsx +2 -2
  526. package/src/scenes/MethodScene/components/DocRequestBody.tsx +6 -3
  527. package/src/scenes/{TagScene/TagScene.spec.tsx → MethodTagScene/MethodTagScene.spec.tsx} +5 -5
  528. package/src/scenes/{TagScene/TagScene.tsx → MethodTagScene/MethodTagScene.tsx} +23 -16
  529. package/src/{hooks → scenes/MethodTagScene}/index.ts +1 -1
  530. package/src/scenes/{TagScene → MethodTagScene}/utils.spec.ts +1 -1
  531. package/src/scenes/{TagScene → MethodTagScene}/utils.ts +1 -1
  532. package/src/scenes/TypeScene/TypeScene.tsx +36 -24
  533. package/src/scenes/TypeTagScene/TypeTagScene.spec.tsx +103 -0
  534. package/src/scenes/TypeTagScene/TypeTagScene.tsx +93 -0
  535. package/src/scenes/{TagScene → TypeTagScene}/index.ts +1 -1
  536. package/src/{state/reducers.ts → scenes/TypeTagScene/utils.spec.ts} +8 -7
  537. package/src/{hooks/use_actions_hook.ts → scenes/TypeTagScene/utils.ts} +13 -10
  538. package/src/scenes/index.ts +2 -1
  539. package/src/state/index.ts +2 -2
  540. package/src/{reducers/search → state/lodes}/index.ts +2 -2
  541. package/src/state/lodes/sagas.spec.ts +92 -0
  542. package/src/state/{settings/reducer.ts → lodes/sagas.ts} +23 -21
  543. package/src/state/{settings/action_creators.spec.ts → lodes/selectors.spec.ts} +15 -10
  544. package/src/state/{settings/actions.ts → lodes/selectors.ts} +7 -9
  545. package/src/state/lodes/slice.ts +69 -0
  546. package/src/state/settings/index.ts +1 -1
  547. package/src/state/settings/sagas.spec.ts +121 -0
  548. package/src/state/settings/sagas.ts +79 -0
  549. package/src/state/settings/selectors.spec.ts +16 -9
  550. package/src/state/settings/selectors.ts +14 -3
  551. package/src/state/settings/slice.ts +94 -0
  552. package/src/state/store.ts +22 -8
  553. package/src/{reducers/search/actions.ts → test-data/declarations.ts} +16 -15
  554. package/src/test-data/examples.ts +1 -1
  555. package/src/test-data/index.ts +1 -0
  556. package/src/test-data/specs.ts +2 -1
  557. package/src/test-utils/index.ts +3 -14
  558. package/src/{context/search/SearchContext.ts → test-utils/lodes.tsx} +15 -16
  559. package/src/test-utils/redux.tsx +46 -26
  560. package/src/test-utils/router.tsx +3 -2
  561. package/src/utils/index.ts +7 -2
  562. package/src/utils/lodeUtils.ts +5 -7
  563. package/src/utils/path.spec.ts +17 -3
  564. package/src/utils/path.ts +54 -4
  565. package/webpack.dev.config.js +3 -0
  566. package/webpack.prod.config.js +4 -0
  567. package/lib/components/SideNav/SearchCriteriaSelector.d.ts +0 -2
  568. package/lib/components/SideNav/SearchCriteriaSelector.js +0 -57
  569. package/lib/components/SideNav/SearchCriteriaSelector.js.map +0 -1
  570. package/lib/components/SideNav/SideNavTags.d.ts +0 -9
  571. package/lib/components/SideNav/SideNavTags.js.map +0 -1
  572. package/lib/context/envAdaptor/EnvAdaptorContext.d.ts +0 -7
  573. package/lib/context/envAdaptor/EnvAdaptorContext.js +0 -18
  574. package/lib/context/envAdaptor/EnvAdaptorContext.js.map +0 -1
  575. package/lib/context/envAdaptor/index.d.ts +0 -1
  576. package/lib/context/envAdaptor/index.js +0 -20
  577. package/lib/context/envAdaptor/index.js.map +0 -1
  578. package/lib/context/index.d.ts +0 -3
  579. package/lib/context/index.js +0 -48
  580. package/lib/context/index.js.map +0 -1
  581. package/lib/context/lode/LodeContext.d.ts +0 -9
  582. package/lib/context/lode/LodeContext.js +0 -21
  583. package/lib/context/lode/LodeContext.js.map +0 -1
  584. package/lib/context/lode/index.d.ts +0 -1
  585. package/lib/context/lode/index.js +0 -20
  586. package/lib/context/search/SearchContext.d.ts +0 -9
  587. package/lib/context/search/SearchContext.js +0 -19
  588. package/lib/context/search/index.d.ts +0 -1
  589. package/lib/context/search/index.js +0 -20
  590. package/lib/context/search/index.js.map +0 -1
  591. package/lib/esm/components/SideNav/SearchCriteriaSelector.js +0 -38
  592. package/lib/esm/components/SideNav/SearchCriteriaSelector.js.map +0 -1
  593. package/lib/esm/components/SideNav/SideNavTags.js.map +0 -1
  594. package/lib/esm/context/envAdaptor/EnvAdaptorContext.js +0 -7
  595. package/lib/esm/context/envAdaptor/EnvAdaptorContext.js.map +0 -1
  596. package/lib/esm/context/envAdaptor/index.js +0 -2
  597. package/lib/esm/context/envAdaptor/index.js.map +0 -1
  598. package/lib/esm/context/index.js +0 -4
  599. package/lib/esm/context/index.js.map +0 -1
  600. package/lib/esm/context/lode/LodeContext.js +0 -11
  601. package/lib/esm/context/lode/LodeContext.js.map +0 -1
  602. package/lib/esm/context/lode/index.js +0 -2
  603. package/lib/esm/context/lode/index.js.map +0 -1
  604. package/lib/esm/context/search/SearchContext.js +0 -8
  605. package/lib/esm/context/search/SearchContext.js.map +0 -1
  606. package/lib/esm/context/search/index.js +0 -2
  607. package/lib/esm/context/search/index.js.map +0 -1
  608. package/lib/esm/hooks/index.js +0 -2
  609. package/lib/esm/hooks/index.js.map +0 -1
  610. package/lib/esm/hooks/use_actions_hook.js +0 -11
  611. package/lib/esm/hooks/use_actions_hook.js.map +0 -1
  612. package/lib/esm/reducers/search/actions.js +0 -13
  613. package/lib/esm/reducers/search/actions.js.map +0 -1
  614. package/lib/esm/reducers/search/index.js +0 -3
  615. package/lib/esm/reducers/search/index.js.map +0 -1
  616. package/lib/esm/reducers/search/reducer.js +0 -31
  617. package/lib/esm/reducers/search/reducer.js.map +0 -1
  618. package/lib/esm/scenes/MethodScene/utils.js +0 -72
  619. package/lib/esm/scenes/MethodScene/utils.js.map +0 -1
  620. package/lib/esm/scenes/TagScene/TagScene.js.map +0 -1
  621. package/lib/esm/scenes/TagScene/index.js +0 -2
  622. package/lib/esm/scenes/TagScene/index.js.map +0 -1
  623. package/lib/esm/scenes/TagScene/utils.js.map +0 -1
  624. package/lib/esm/state/action_creators.js +0 -2
  625. package/lib/esm/state/action_creators.js.map +0 -1
  626. package/lib/esm/state/reducers.js +0 -6
  627. package/lib/esm/state/reducers.js.map +0 -1
  628. package/lib/esm/state/settings/action_creators.js +0 -6
  629. package/lib/esm/state/settings/action_creators.js.map +0 -1
  630. package/lib/esm/state/settings/actions.js +0 -6
  631. package/lib/esm/state/settings/reducer.js +0 -19
  632. package/lib/esm/state/settings/reducer.js.map +0 -1
  633. package/lib/esm/test-utils/render_with_lode.js +0 -19
  634. package/lib/esm/test-utils/render_with_lode.js.map +0 -1
  635. package/lib/esm/test-utils/render_with_search.js +0 -34
  636. package/lib/esm/test-utils/render_with_search.js.map +0 -1
  637. package/lib/esm/utils/envAdaptor.js +0 -68
  638. package/lib/esm/utils/envAdaptor.js.map +0 -1
  639. package/lib/hooks/index.d.ts +0 -1
  640. package/lib/hooks/index.js +0 -14
  641. package/lib/hooks/index.js.map +0 -1
  642. package/lib/hooks/use_actions_hook.d.ts +0 -2
  643. package/lib/hooks/use_actions_hook.js +0 -24
  644. package/lib/hooks/use_actions_hook.js.map +0 -1
  645. package/lib/reducers/search/actions.d.ts +0 -4
  646. package/lib/reducers/search/actions.js +0 -25
  647. package/lib/reducers/search/actions.js.map +0 -1
  648. package/lib/reducers/search/index.d.ts +0 -2
  649. package/lib/reducers/search/index.js.map +0 -1
  650. package/lib/reducers/search/reducer.d.ts +0 -11
  651. package/lib/reducers/search/reducer.js +0 -43
  652. package/lib/reducers/search/reducer.js.map +0 -1
  653. package/lib/scenes/MethodScene/utils.d.ts +0 -3
  654. package/lib/scenes/MethodScene/utils.js +0 -81
  655. package/lib/scenes/MethodScene/utils.js.map +0 -1
  656. package/lib/scenes/TagScene/TagScene.d.ts +0 -7
  657. package/lib/scenes/TagScene/TagScene.js.map +0 -1
  658. package/lib/scenes/TagScene/index.d.ts +0 -1
  659. package/lib/scenes/TagScene/index.js +0 -14
  660. package/lib/scenes/TagScene/index.js.map +0 -1
  661. package/lib/scenes/TagScene/utils.js.map +0 -1
  662. package/lib/state/action_creators.d.ts +0 -1
  663. package/lib/state/action_creators.js +0 -19
  664. package/lib/state/reducers.d.ts +0 -4
  665. package/lib/state/reducers.js +0 -16
  666. package/lib/state/settings/action_creators.d.ts +0 -2
  667. package/lib/state/settings/action_creators.js +0 -16
  668. package/lib/state/settings/action_creators.js.map +0 -1
  669. package/lib/state/settings/actions.d.ts +0 -8
  670. package/lib/state/settings/actions.js +0 -13
  671. package/lib/state/settings/actions.js.map +0 -1
  672. package/lib/state/settings/reducer.d.ts +0 -6
  673. package/lib/state/settings/reducer.js +0 -31
  674. package/lib/state/settings/reducer.js.map +0 -1
  675. package/lib/test-utils/render_with_lode.d.ts +0 -9
  676. package/lib/test-utils/render_with_lode.js +0 -36
  677. package/lib/test-utils/render_with_lode.js.map +0 -1
  678. package/lib/test-utils/render_with_search.d.ts +0 -4
  679. package/lib/test-utils/render_with_search.js +0 -52
  680. package/lib/test-utils/render_with_search.js.map +0 -1
  681. package/lib/utils/envAdaptor.d.ts +0 -27
  682. package/lib/utils/envAdaptor.js +0 -81
  683. package/lib/utils/envAdaptor.js.map +0 -1
  684. package/src/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/somethingWentWrong.svg +0 -45
  685. package/src/components/SideNav/SearchCriteriaSelector.tsx +0 -75
  686. package/src/context/envAdaptor/EnvAdaptorContext.ts +0 -38
  687. package/src/context/index.ts +0 -28
  688. package/src/context/lode/index.ts +0 -26
  689. package/src/context/search/index.ts +0 -26
  690. package/src/reducers/search/actions.spec.ts +0 -50
  691. package/src/reducers/search/reducer.spec.ts +0 -72
  692. package/src/reducers/search/reducer.ts +0 -66
  693. package/src/scenes/MethodScene/utils.spec.ts +0 -95
  694. package/src/scenes/MethodScene/utils.ts +0 -121
  695. package/src/state/settings/action_creators.ts +0 -33
  696. package/src/test-utils/render_with_lode.tsx +0 -74
  697. package/src/test-utils/render_with_search.tsx +0 -69
  698. package/src/utils/envAdaptor.spec.ts +0 -53
  699. package/src/utils/envAdaptor.ts +0 -120
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/DocPseudo/DocPrimaryResponse.tsx"],"names":["DocPrimaryResponse","response","description","mediaType","type","name"],"mappings":";;;;;;;AA0BA;;AACA;;;;AAMO,IAAMA,kBAA+C,GAAG;AAAA,MAAC;AAC9DC,IAAAA;AAD8D,GAAD;AAAA,SAG7D,6BAAC,mBAAD;AAAS,IAAA,OAAO,YAAKA,QAAQ,CAACC,WAAd,cAA6BD,QAAQ,CAACE,SAAtC;AAAhB,KACE,2CAAOF,QAAQ,CAACG,IAAT,CAAcC,IAArB,CADF,CAH6D;AAAA,CAAxD","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 { IMethodResponse } from '@looker/sdk-codegen'\nimport React, { FC } from 'react'\nimport { Tooltip } from '@looker/components'\n\nexport interface DocPrimaryResponseProps {\n response: IMethodResponse\n}\n\nexport const DocPrimaryResponse: FC<DocPrimaryResponseProps> = ({\n response,\n}) => (\n <Tooltip content={`${response.description} ${response.mediaType}`}>\n <span>{response.type.name}</span>\n </Tooltip>\n)\n"],"file":"DocPrimaryResponse.js"}
1
+ {"version":3,"sources":["../../../src/components/DocPseudo/DocPrimaryResponse.tsx"],"names":["DocPrimaryResponse","response","description","mediaType","type","name"],"mappings":";;;;;;;AA2BA;;AACA;;;;AAMO,IAAMA,kBAA+C,GAAG;AAAA,MAAC;AAC9DC,IAAAA;AAD8D,GAAD;AAAA,SAG7D,6BAAC,mBAAD;AAAS,IAAA,OAAO,YAAKA,QAAQ,CAACC,WAAd,cAA6BD,QAAQ,CAACE,SAAtC;AAAhB,KACE,2CAAOF,QAAQ,CAACG,IAAT,CAAcC,IAArB,CADF,CAH6D;AAAA,CAAxD","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 { IMethodResponse } from '@looker/sdk-codegen'\nimport type { FC } from 'react'\nimport React from 'react'\nimport { Tooltip } from '@looker/components'\n\nexport interface DocPrimaryResponseProps {\n response: IMethodResponse\n}\n\nexport const DocPrimaryResponse: FC<DocPrimaryResponseProps> = ({\n response,\n}) => (\n <Tooltip content={`${response.description} ${response.mediaType}`}>\n <span>{response.type.name}</span>\n </Tooltip>\n)\n"],"file":"DocPrimaryResponse.js"}
@@ -1,5 +1,5 @@
1
- import { FC } from 'react';
2
- import { IMethod } from '@looker/sdk-codegen';
1
+ import type { FC } from 'react';
2
+ import type { IMethod } from '@looker/sdk-codegen';
3
3
  export interface PseudoProps {
4
4
  method: IMethod;
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/DocPseudo/DocPseudo.tsx"],"names":["DocPseudo","method","args","allParams","resType","primaryResponse","operationId"],"mappings":";;;;;;;AA0BA;;AACA;;AAGA;;AACA;;;;AAMO,IAAMA,SAA0B,GAAG,QAAgB;AAAA,MAAf;AAAEC,IAAAA;AAAF,GAAe;AACxD,MAAMC,IAAI,GAAGD,MAAM,CAACE,SAApB;AACA,MAAMC,OAAO,GAAGH,MAAM,CAACI,eAAvB;AAEA,SACE,6BAAC,gBAAD;AAAM,IAAA,UAAU,EAAC;AAAjB,KACE,6BAAC,gBAAD;AAAM,IAAA,QAAQ,EAAC,OAAf;AAAuB,IAAA,UAAU,EAAC;AAAlC,eACMJ,MAAM,CAACK,WADb,QAEE,6BAAC,oBAAD;AAAW,IAAA,UAAU,EAAEJ;AAAvB,IAFF,EAGG,KAHH,EAIE,6BAAC,sCAAD;AAAoB,IAAA,QAAQ,EAAEE;AAA9B,IAJF,CADF,CADF;AAUD,CAdM","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, { FC } from 'react'\nimport { Code, Flex } from '@looker/components'\nimport { IMethod } from '@looker/sdk-codegen'\n\nimport { DocPrimaryResponse } from './DocPrimaryResponse'\nimport { DocParams } from './DocParams'\n\nexport interface PseudoProps {\n method: IMethod\n}\n\nexport const DocPseudo: FC<PseudoProps> = ({ method }) => {\n const args = method.allParams\n const resType = method.primaryResponse\n\n return (\n <Flex alignItems=\"flex-start\">\n <Code fontSize=\"small\" fontWeight=\"normal\">\n {`${method.operationId}(`}\n <DocParams parameters={args} />\n {'): '}\n <DocPrimaryResponse response={resType} />\n </Code>\n </Flex>\n )\n}\n"],"file":"DocPseudo.js"}
1
+ {"version":3,"sources":["../../../src/components/DocPseudo/DocPseudo.tsx"],"names":["DocPseudo","method","args","allParams","resType","primaryResponse","operationId"],"mappings":";;;;;;;AA2BA;;AACA;;AAGA;;AACA;;;;AAMO,IAAMA,SAA0B,GAAG,QAAgB;AAAA,MAAf;AAAEC,IAAAA;AAAF,GAAe;AACxD,MAAMC,IAAI,GAAGD,MAAM,CAACE,SAApB;AACA,MAAMC,OAAO,GAAGH,MAAM,CAACI,eAAvB;AAEA,SACE,6BAAC,gBAAD;AAAM,IAAA,UAAU,EAAC;AAAjB,KACE,6BAAC,gBAAD;AAAM,IAAA,QAAQ,EAAC,OAAf;AAAuB,IAAA,UAAU,EAAC;AAAlC,eACMJ,MAAM,CAACK,WADb,QAEE,6BAAC,oBAAD;AAAW,IAAA,UAAU,EAAEJ;AAAvB,IAFF,EAGG,KAHH,EAIE,6BAAC,sCAAD;AAAoB,IAAA,QAAQ,EAAEE;AAA9B,IAJF,CADF,CADF;AAUD,CAdM","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 from 'react'\nimport { Code, Flex } from '@looker/components'\nimport type { IMethod } from '@looker/sdk-codegen'\n\nimport { DocPrimaryResponse } from './DocPrimaryResponse'\nimport { DocParams } from './DocParams'\n\nexport interface PseudoProps {\n method: IMethod\n}\n\nexport const DocPseudo: FC<PseudoProps> = ({ method }) => {\n const args = method.allParams\n const resType = method.primaryResponse\n\n return (\n <Flex alignItems=\"flex-start\">\n <Code fontSize=\"small\" fontWeight=\"normal\">\n {`${method.operationId}(`}\n <DocParams parameters={args} />\n {'): '}\n <DocPrimaryResponse response={resType} />\n </Code>\n </Flex>\n )\n}\n"],"file":"DocPseudo.js"}
@@ -1,5 +1,5 @@
1
- import { FC } from 'react';
2
- import { IMethod } from '@looker/sdk-codegen';
1
+ import type { FC } from 'react';
2
+ import type { IMethod } from '@looker/sdk-codegen';
3
3
  interface DocRateLimitedProps {
4
4
  method: IMethod;
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/DocRateLimited/DocRateLimited.tsx"],"names":["DocRateLimited","method","rateLimited"],"mappings":";;;;;;;AAyBA;;AACA;;;;AAMO,IAAMA,cAAuC,GAAG;AAAA,MAAC;AAAEC,IAAAA;AAAF,GAAD;AAAA,SACrD,4DACGA,MAAM,CAACC,WAAP,IACC,4DACE,6BAAC,mBAAD;AAAS,IAAA,SAAS,EAAC,MAAnB;AAA0B,IAAA,OAAO,EAAE;AAAnC,KACE,6BAAC,gBAAD;AAAM,IAAA,KAAK,EAAC;AAAZ,KAAmC,cAAnC,CADF,CADF,CAFJ,CADqD;AAAA,CAAhD","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 React, { FC } from 'react'\nimport { Code, Tooltip } from '@looker/components'\nimport { IMethod } from '@looker/sdk-codegen'\n\ninterface DocRateLimitedProps {\n method: IMethod\n}\nexport const DocRateLimited: FC<DocRateLimitedProps> = ({ method }) => (\n <>\n {method.rateLimited && (\n <>\n <Tooltip textAlign=\"left\" content={'This endpoint is rate limited.'}>\n <Code color=\"palette.charcoal500\">{'rate_limited'}</Code>\n </Tooltip>\n </>\n )}\n </>\n)\n"],"file":"DocRateLimited.js"}
1
+ {"version":3,"sources":["../../../src/components/DocRateLimited/DocRateLimited.tsx"],"names":["DocRateLimited","method","rateLimited"],"mappings":";;;;;;;AA0BA;;AACA;;;;AAMO,IAAMA,cAAuC,GAAG;AAAA,MAAC;AAAEC,IAAAA;AAAF,GAAD;AAAA,SACrD,4DACGA,MAAM,CAACC,WAAP,IACC,4DACE,6BAAC,mBAAD;AAAS,IAAA,SAAS,EAAC,MAAnB;AAA0B,IAAA,OAAO,EAAE;AAAnC,KACE,6BAAC,gBAAD;AAAM,IAAA,KAAK,EAAC;AAAZ,KAAmC,cAAnC,CADF,CADF,CAFJ,CADqD;AAAA,CAAhD","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 { Code, Tooltip } from '@looker/components'\nimport type { IMethod } from '@looker/sdk-codegen'\n\ninterface DocRateLimitedProps {\n method: IMethod\n}\nexport const DocRateLimited: FC<DocRateLimitedProps> = ({ method }) => (\n <>\n {method.rateLimited && (\n <>\n <Tooltip textAlign=\"left\" content={'This endpoint is rate limited.'}>\n <Code color=\"palette.charcoal500\">{'rate_limited'}</Code>\n </Tooltip>\n </>\n )}\n </>\n)\n"],"file":"DocRateLimited.js"}
@@ -1,5 +1,5 @@
1
- import { FC } from 'react';
2
- import { ApiModel, IMethod, IType } from '@looker/sdk-codegen';
1
+ import type { FC } from 'react';
2
+ import type { ApiModel, IMethod, IType } from '@looker/sdk-codegen';
3
3
  interface DocReferencesProps {
4
4
  typesUsed: IType[];
5
5
  methodsUsedBy?: IMethod[];
@@ -5,17 +5,17 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.DocReferences = void 0;
7
7
 
8
- var _react = _interopRequireWildcard(require("react"));
8
+ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _runIt = require("@looker/run-it");
11
11
 
12
- var _context = require("../../context");
12
+ var _reactRedux = require("react-redux");
13
13
 
14
- var _utils = require("./utils");
14
+ var _state = require("../../state");
15
15
 
16
- 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); }
16
+ var _utils = require("./utils");
17
17
 
18
- 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; }
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
 
20
20
  var DocReferences = _ref => {
21
21
  var {
@@ -25,16 +25,12 @@ var DocReferences = _ref => {
25
25
  methodsUsedBy = [],
26
26
  typesUsedBy = []
27
27
  } = _ref;
28
- var {
29
- searchSettings: {
30
- pattern
31
- }
32
- } = (0, _react.useContext)(_context.SearchContext);
28
+ var searchPattern = (0, _reactRedux.useSelector)(_state.selectSearchPattern);
33
29
  if (typesUsed.length === 0 && methodsUsedBy.length === 0 && typesUsedBy.length === 0) return _react.default.createElement(_react.default.Fragment, null);
34
30
  return _react.default.createElement(_runIt.CollapserCard, {
35
31
  heading: "References",
36
32
  id: "references"
37
- }, _react.default.createElement(_react.default.Fragment, null, (0, _utils.DocReferenceItems)('Referenced Types:', typesUsed, api, specKey, pattern), (0, _utils.DocReferenceItems)('Used by types:', typesUsedBy, api, specKey, pattern), (0, _utils.DocReferenceItems)('Used by methods:', methodsUsedBy, api, specKey, pattern)));
33
+ }, _react.default.createElement(_react.default.Fragment, null, (0, _utils.DocReferenceItems)('Referenced Types:', typesUsed, api, specKey, searchPattern), (0, _utils.DocReferenceItems)('Used by types:', typesUsedBy, api, specKey, searchPattern), (0, _utils.DocReferenceItems)('Used by methods:', methodsUsedBy, api, specKey, searchPattern)));
38
34
  };
39
35
 
40
36
  exports.DocReferences = DocReferences;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/DocReferences/DocReferences.tsx"],"names":["DocReferences","typesUsed","specKey","api","methodsUsedBy","typesUsedBy","searchSettings","pattern","SearchContext","length"],"mappings":";;;;;;;AA0BA;;AAGA;;AACA;;AACA;;;;;;AAaO,IAAMA,aAAqC,GAAG,QAM/C;AAAA,MANgD;AACpDC,IAAAA,SADoD;AAEpDC,IAAAA,OAFoD;AAGpDC,IAAAA,GAHoD;AAIpDC,IAAAA,aAAa,GAAG,EAJoC;AAKpDC,IAAAA,WAAW,GAAG;AALsC,GAMhD;AACJ,MAAM;AACJC,IAAAA,cAAc,EAAE;AAAEC,MAAAA;AAAF;AADZ,MAEF,uBAAWC,sBAAX,CAFJ;AAIA,MACEP,SAAS,CAACQ,MAAV,KAAqB,CAArB,IACAL,aAAa,CAACK,MAAd,KAAyB,CADzB,IAEAJ,WAAW,CAACI,MAAZ,KAAuB,CAHzB,EAKE,OAAO,2DAAP;AAEF,SACE,6BAAC,oBAAD;AAAe,IAAA,OAAO,EAAC,YAAvB;AAAoC,IAAA,EAAE,EAAC;AAAvC,KACE,4DACG,8BACC,mBADD,EAECR,SAFD,EAGCE,GAHD,EAICD,OAJD,EAKCK,OALD,CADH,EAQG,8BACC,gBADD,EAECF,WAFD,EAGCF,GAHD,EAICD,OAJD,EAKCK,OALD,CARH,EAeG,8BACC,kBADD,EAECH,aAFD,EAGCD,GAHD,EAICD,OAJD,EAKCK,OALD,CAfH,CADF,CADF;AA2BD,CA7CM","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, { FC, useContext } from 'react'\nimport { ApiModel, IMethod, IType } from '@looker/sdk-codegen'\n\nimport { CollapserCard } from '@looker/run-it'\nimport { SearchContext } from '../../context'\nimport { DocReferenceItems } from './utils'\n\ninterface DocReferencesProps {\n typesUsed: IType[]\n methodsUsedBy?: IMethod[]\n typesUsedBy?: IType[]\n specKey: string\n api: ApiModel\n}\n\n/**\n * It renders links to the given types and/or methods references\n */\nexport const DocReferences: FC<DocReferencesProps> = ({\n typesUsed,\n specKey,\n api,\n methodsUsedBy = [],\n typesUsedBy = [],\n}) => {\n const {\n searchSettings: { pattern },\n } = useContext(SearchContext)\n\n if (\n typesUsed.length === 0 &&\n methodsUsedBy.length === 0 &&\n typesUsedBy.length === 0\n )\n return <></>\n\n return (\n <CollapserCard heading=\"References\" id=\"references\">\n <>\n {DocReferenceItems(\n 'Referenced Types:',\n typesUsed,\n api,\n specKey,\n pattern\n )}\n {DocReferenceItems(\n 'Used by types:',\n typesUsedBy,\n api,\n specKey,\n pattern\n )}\n {DocReferenceItems(\n 'Used by methods:',\n methodsUsedBy,\n api,\n specKey,\n pattern\n )}\n </>\n </CollapserCard>\n )\n}\n"],"file":"DocReferences.js"}
1
+ {"version":3,"sources":["../../../src/components/DocReferences/DocReferences.tsx"],"names":["DocReferences","typesUsed","specKey","api","methodsUsedBy","typesUsedBy","searchPattern","selectSearchPattern","length"],"mappings":";;;;;;;AA2BA;;AAEA;;AAEA;;AACA;;AACA;;;;AAaO,IAAMA,aAAqC,GAAG,QAM/C;AAAA,MANgD;AACpDC,IAAAA,SADoD;AAEpDC,IAAAA,OAFoD;AAGpDC,IAAAA,GAHoD;AAIpDC,IAAAA,aAAa,GAAG,EAJoC;AAKpDC,IAAAA,WAAW,GAAG;AALsC,GAMhD;AACJ,MAAMC,aAAa,GAAG,6BAAYC,0BAAZ,CAAtB;AAEA,MACEN,SAAS,CAACO,MAAV,KAAqB,CAArB,IACAJ,aAAa,CAACI,MAAd,KAAyB,CADzB,IAEAH,WAAW,CAACG,MAAZ,KAAuB,CAHzB,EAKE,OAAO,2DAAP;AAEF,SACE,6BAAC,oBAAD;AAAe,IAAA,OAAO,EAAC,YAAvB;AAAoC,IAAA,EAAE,EAAC;AAAvC,KACE,4DACG,8BACC,mBADD,EAECP,SAFD,EAGCE,GAHD,EAICD,OAJD,EAKCI,aALD,CADH,EAQG,8BACC,gBADD,EAECD,WAFD,EAGCF,GAHD,EAICD,OAJD,EAKCI,aALD,CARH,EAeG,8BACC,kBADD,EAECF,aAFD,EAGCD,GAHD,EAICD,OAJD,EAKCI,aALD,CAfH,CADF,CADF;AA2BD,CA3CM","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 from 'react'\nimport type { ApiModel, IMethod, IType } from '@looker/sdk-codegen'\nimport { CollapserCard } from '@looker/run-it'\n\nimport { useSelector } from 'react-redux'\nimport { selectSearchPattern } from '../../state'\nimport { DocReferenceItems } from './utils'\n\ninterface DocReferencesProps {\n typesUsed: IType[]\n methodsUsedBy?: IMethod[]\n typesUsedBy?: IType[]\n specKey: string\n api: ApiModel\n}\n\n/**\n * It renders links to the given types and/or methods references\n */\nexport const DocReferences: FC<DocReferencesProps> = ({\n typesUsed,\n specKey,\n api,\n methodsUsedBy = [],\n typesUsedBy = [],\n}) => {\n const searchPattern = useSelector(selectSearchPattern)\n\n if (\n typesUsed.length === 0 &&\n methodsUsedBy.length === 0 &&\n typesUsedBy.length === 0\n )\n return <></>\n\n return (\n <CollapserCard heading=\"References\" id=\"references\">\n <>\n {DocReferenceItems(\n 'Referenced Types:',\n typesUsed,\n api,\n specKey,\n searchPattern\n )}\n {DocReferenceItems(\n 'Used by types:',\n typesUsedBy,\n api,\n specKey,\n searchPattern\n )}\n {DocReferenceItems(\n 'Used by methods:',\n methodsUsedBy,\n api,\n specKey,\n searchPattern\n )}\n </>\n </CollapserCard>\n )\n}\n"],"file":"DocReferences.js"}
@@ -1,3 +1,3 @@
1
- import { ApiModel, IMethod, IType } from '@looker/sdk-codegen';
2
- export declare const buildPath: (api: ApiModel, item: IMethod | IType, specKey: string) => string;
1
+ /// <reference types="react" />
2
+ import type { ApiModel, IMethod, IType } from '@looker/sdk-codegen';
3
3
  export declare const DocReferenceItems: (heading: string, items: (IType | IMethod)[], api: ApiModel, specKey: string, pattern: string) => JSX.Element;
@@ -3,12 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.DocReferenceItems = exports.buildPath = void 0;
6
+ exports.DocReferenceItems = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _sdkCodegen = require("@looker/sdk-codegen");
11
-
12
10
  var _reactRouterDom = require("react-router-dom");
13
11
 
14
12
  var _runIt = require("@looker/run-it");
@@ -17,30 +15,6 @@ var _utils = require("../../utils");
17
15
 
18
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
17
 
20
- var getTag = (api, methodName) => {
21
- return Object.entries(api.tags).filter(_ref => {
22
- var [, methods] = _ref;
23
- return methodName in methods;
24
- }).map(_ref2 => {
25
- var [methodTag] = _ref2;
26
- return methodTag;
27
- })[0];
28
- };
29
-
30
- var buildPath = (api, item, specKey) => {
31
- var path;
32
-
33
- if (item instanceof _sdkCodegen.Method) {
34
- path = (0, _utils.buildMethodPath)(specKey, getTag(api, item.name), item.name);
35
- } else {
36
- path = (0, _utils.buildTypePath)(specKey, item.name);
37
- }
38
-
39
- return path;
40
- };
41
-
42
- exports.buildPath = buildPath;
43
-
44
18
  var DocReferenceItems = (heading, items, api, specKey, pattern) => {
45
19
  if (items.length === 0) return _react.default.createElement(_react.default.Fragment, null);
46
20
  return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_runIt.RunItHeading, {
@@ -49,7 +23,7 @@ var DocReferenceItems = (heading, items, api, specKey, pattern) => {
49
23
  className: "doc-link",
50
24
  key: item.name
51
25
  }, index ? ', ' : '', _react.default.createElement(_reactRouterDom.Link, {
52
- to: buildPath(api, item, specKey)
26
+ to: (0, _utils.buildPath)(api, item, specKey)
53
27
  }, (0, _utils.highlightHTML)(pattern, item.name)))));
54
28
  };
55
29
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/DocReferences/utils.tsx"],"names":["getTag","api","methodName","Object","entries","tags","filter","methods","map","methodTag","buildPath","item","specKey","path","Method","name","DocReferenceItems","heading","items","pattern","length","index"],"mappings":";;;;;;;AAyBA;;AACA;;AACA;;AACA;;AACA;;;;AAQA,IAAMA,MAAM,GAAG,CAACC,GAAD,EAAgBC,UAAhB,KAAuC;AAEpD,SAAOC,MAAM,CAACC,OAAP,CAAeH,GAAG,CAACI,IAAnB,EACJC,MADI,CACG;AAAA,QAAC,GAAGC,OAAH,CAAD;AAAA,WAAiBL,UAAU,IAAIK,OAA/B;AAAA,GADH,EAEJC,GAFI,CAEA;AAAA,QAAC,CAACC,SAAD,CAAD;AAAA,WAAiBA,SAAjB;AAAA,GAFA,EAE4B,CAF5B,CAAP;AAGD,CALD;;AAcO,IAAMC,SAAS,GAAG,CACvBT,GADuB,EAEvBU,IAFuB,EAGvBC,OAHuB,KAIpB;AACH,MAAIC,IAAJ;;AACA,MAAIF,IAAI,YAAYG,kBAApB,EAA4B;AAC1BD,IAAAA,IAAI,GAAG,4BAAgBD,OAAhB,EAAyBZ,MAAM,CAACC,GAAD,EAAMU,IAAI,CAACI,IAAX,CAA/B,EAAiDJ,IAAI,CAACI,IAAtD,CAAP;AACD,GAFD,MAEO;AACLF,IAAAA,IAAI,GAAG,0BAAcD,OAAd,EAAuBD,IAAI,CAACI,IAA5B,CAAP;AACD;;AACD,SAAOF,IAAP;AACD,CAZM;;;;AAiBA,IAAMG,iBAAiB,GAAG,CAC/BC,OAD+B,EAE/BC,KAF+B,EAG/BjB,GAH+B,EAI/BW,OAJ+B,EAK/BO,OAL+B,KAM5B;AACH,MAAID,KAAK,CAACE,MAAN,KAAiB,CAArB,EAAwB,OAAO,2DAAP;AAExB,SACE,4DACE,6BAAC,mBAAD;AAAc,IAAA,EAAE,EAAC;AAAjB,KAAuBH,OAAvB,CADF,EAEGC,KAAK,CAACV,GAAN,CAAU,CAACG,IAAD,EAAOU,KAAP,KACT;AAAM,IAAA,SAAS,EAAC,UAAhB;AAA2B,IAAA,GAAG,EAAEV,IAAI,CAACI;AAArC,KACGM,KAAK,GAAG,IAAH,GAAU,EADlB,EAEE,6BAAC,oBAAD;AAAM,IAAA,EAAE,EAAEX,SAAS,CAACT,GAAD,EAAMU,IAAN,EAAYC,OAAZ;AAAnB,KACG,0BAAcO,OAAd,EAAuBR,IAAI,CAACI,IAA5B,CADH,CAFF,CADD,CAFH,CADF;AAaD,CAtBM","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 React from 'react'\nimport { ApiModel, IMethod, IType, Method } from '@looker/sdk-codegen'\nimport { Link } from 'react-router-dom'\nimport { RunItHeading } from '@looker/run-it'\nimport { buildMethodPath, buildTypePath, highlightHTML } from '../../utils'\n\n/**\n * Returns the tag for a given method name\n * @param api Parsed api\n * @param methodName SDK method name\n * @returns Corresponding tag\n */\nconst getTag = (api: ApiModel, methodName: string) => {\n // Find tag containing methodName\n return Object.entries(api.tags)\n .filter(([, methods]) => methodName in methods)\n .map(([methodTag]) => methodTag)[0]\n}\n\n/**\n * Builds a path matching MethodScene or TypeScene route\n * @param api\n * @param item A method or type item\n * @param specKey A string to identify the spec in the url\n * @returns a method or type path\n */\nexport const buildPath = (\n api: ApiModel,\n item: IMethod | IType,\n specKey: string\n) => {\n let path\n if (item instanceof Method) {\n path = buildMethodPath(specKey, getTag(api, item.name), item.name)\n } else {\n path = buildTypePath(specKey, item.name)\n }\n return path\n}\n\n/**\n * Renders a heading and links to all item types\n */\nexport const DocReferenceItems = (\n heading: string,\n items: (IType | IMethod)[],\n api: ApiModel,\n specKey: string,\n pattern: string\n) => {\n if (items.length === 0) return <></>\n\n return (\n <>\n <RunItHeading as=\"h4\">{heading}</RunItHeading>\n {items.map((item, index) => (\n <span className=\"doc-link\" key={item.name}>\n {index ? ', ' : ''}\n <Link to={buildPath(api, item, specKey)}>\n {highlightHTML(pattern, item.name)}\n </Link>\n </span>\n ))}\n </>\n )\n}\n"],"file":"utils.js"}
1
+ {"version":3,"sources":["../../../src/components/DocReferences/utils.tsx"],"names":["DocReferenceItems","heading","items","api","specKey","pattern","length","map","item","index","name"],"mappings":";;;;;;;AAyBA;;AAEA;;AACA;;AACA;;;;AAKO,IAAMA,iBAAiB,GAAG,CAC/BC,OAD+B,EAE/BC,KAF+B,EAG/BC,GAH+B,EAI/BC,OAJ+B,EAK/BC,OAL+B,KAM5B;AACH,MAAIH,KAAK,CAACI,MAAN,KAAiB,CAArB,EAAwB,OAAO,2DAAP;AAExB,SACE,4DACE,6BAAC,mBAAD;AAAc,IAAA,EAAE,EAAC;AAAjB,KAAuBL,OAAvB,CADF,EAEGC,KAAK,CAACK,GAAN,CAAU,CAACC,IAAD,EAAOC,KAAP,KACT;AAAM,IAAA,SAAS,EAAC,UAAhB;AAA2B,IAAA,GAAG,EAAED,IAAI,CAACE;AAArC,KACGD,KAAK,GAAG,IAAH,GAAU,EADlB,EAEE,6BAAC,oBAAD;AAAM,IAAA,EAAE,EAAE,sBAAUN,GAAV,EAAeK,IAAf,EAAqBJ,OAArB;AAAV,KACG,0BAAcC,OAAd,EAAuBG,IAAI,CAACE,IAA5B,CADH,CAFF,CADD,CAFH,CADF;AAaD,CAtBM","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 React from 'react'\nimport type { ApiModel, IMethod, IType } from '@looker/sdk-codegen'\nimport { Link } from 'react-router-dom'\nimport { RunItHeading } from '@looker/run-it'\nimport { buildPath, highlightHTML } from '../../utils'\n\n/**\n * Renders a heading and links to all item types\n */\nexport const DocReferenceItems = (\n heading: string,\n items: (IType | IMethod)[],\n api: ApiModel,\n specKey: string,\n pattern: string\n) => {\n if (items.length === 0) return <></>\n\n return (\n <>\n <RunItHeading as=\"h4\">{heading}</RunItHeading>\n {items.map((item, index) => (\n <span className=\"doc-link\" key={item.name}>\n {index ? ', ' : ''}\n <Link to={buildPath(api, item, specKey)}>\n {highlightHTML(pattern, item.name)}\n </Link>\n </span>\n ))}\n </>\n )\n}\n"],"file":"utils.js"}
@@ -1,6 +1,7 @@
1
- import { FC } from 'react';
2
- import { KeyedCollection, IMethodResponse } from '@looker/sdk-codegen';
1
+ import type { FC } from 'react';
2
+ import type { ApiModel, KeyedCollection, IMethodResponse } from '@looker/sdk-codegen';
3
3
  interface DocResponseTypesProps {
4
+ api: ApiModel;
4
5
  responses: KeyedCollection<IMethodResponse>;
5
6
  }
6
7
  export declare const DocResponseTypes: FC<DocResponseTypesProps>;
@@ -17,6 +17,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
17
17
 
18
18
  var DocResponseTypes = _ref => {
19
19
  var {
20
+ api,
20
21
  responses
21
22
  } = _ref;
22
23
  var mediaTypes = Object.keys(responses);
@@ -25,7 +26,7 @@ var DocResponseTypes = _ref => {
25
26
  (0, _react.useEffect)(() => {
26
27
  setSelectedMediaType(mediaTypes[0]);
27
28
  setResps(responses);
28
- }, [responses]);
29
+ }, [responses, mediaTypes]);
29
30
  return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_components.ButtonToggle, {
30
31
  value: selectedMediaType,
31
32
  onChange: setSelectedMediaType,
@@ -38,6 +39,7 @@ var DocResponseTypes = _ref => {
38
39
  overflow: 'auto'
39
40
  }
40
41
  }, _react.default.createElement(_.ExploreType, {
42
+ api: api,
41
43
  key: selectedMediaType,
42
44
  type: resps[selectedMediaType].type,
43
45
  link: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/DocResponses/DocResponseTypes.tsx"],"names":["DocResponseTypes","responses","mediaTypes","Object","keys","selectedMediaType","setSelectedMediaType","resps","setResps","map","mediaType","overflow","type"],"mappings":";;;;;;;AAyBA;;AACA;;AAGA;;;;;;AAWO,IAAMA,gBAA2C,GAAG,QAAmB;AAAA,MAAlB;AAAEC,IAAAA;AAAF,GAAkB;AAC5E,MAAMC,UAAU,GAAGC,MAAM,CAACC,IAAP,CAAYH,SAAZ,CAAnB;AACA,MAAM,CAACI,iBAAD,EAAoBC,oBAApB,IAA4C,qBAASJ,UAAU,CAAC,CAAD,CAAnB,CAAlD;AACA,MAAM,CAACK,KAAD,EAAQC,QAAR,IAAoB,qBAASP,SAAT,CAA1B;AAEA,wBAAU,MAAM;AAEdK,IAAAA,oBAAoB,CAACJ,UAAU,CAAC,CAAD,CAAX,CAApB;AACAM,IAAAA,QAAQ,CAACP,SAAD,CAAR;AACD,GAJD,EAIG,CAACA,SAAD,CAJH;AAOA,SACE,4DACE,6BAAC,wBAAD;AACE,IAAA,KAAK,EAAEI,iBADT;AAEE,IAAA,QAAQ,EAAEC,oBAFZ;AAGE,IAAA,EAAE,EAAC,OAHL;AAIE,IAAA,EAAE,EAAC;AAJL,KAMGJ,UAAU,CAACO,GAAX,CAAgBC,SAAD,IACd,6BAAC,sBAAD;AAAY,IAAA,GAAG,EAAEA;AAAjB,KAA6BA,SAA7B,CADD,CANH,CADF,EAWE;AAAK,IAAA,KAAK,EAAE;AAAEC,MAAAA,QAAQ,EAAE;AAAZ;AAAZ,KACE,6BAAC,aAAD;AACE,IAAA,GAAG,EAAEN,iBADP;AAEE,IAAA,IAAI,EAAEE,KAAK,CAACF,iBAAD,CAAL,CAAyBO,IAFjC;AAGE,IAAA,IAAI,EAAE,IAHR;AAIE,IAAA,QAAQ,EAAE;AAJZ,IADF,CAXF,CADF;AAsBD,CAlCM","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 React, { FC, useState, useEffect } from 'react'\nimport { ButtonToggle, ButtonItem } from '@looker/components'\nimport { KeyedCollection, IMethodResponse } from '@looker/sdk-codegen'\n\nimport { ExploreType } from '..'\n\ninterface DocResponseTypesProps {\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: FC<DocResponseTypesProps> = ({ responses }) => {\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])\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 key={selectedMediaType}\n type={resps[selectedMediaType].type}\n link={true}\n maxDepth={2}\n />\n </div>\n </>\n )\n}\n"],"file":"DocResponseTypes.js"}
1
+ {"version":3,"sources":["../../../src/components/DocResponses/DocResponseTypes.tsx"],"names":["DocResponseTypes","api","responses","mediaTypes","Object","keys","selectedMediaType","setSelectedMediaType","resps","setResps","map","mediaType","overflow","type"],"mappings":";;;;;;;AA2BA;;AACA;;AAOA;;;;;;AAYO,IAAMA,gBAA2C,GAAG,QAGrD;AAAA,MAHsD;AAC1DC,IAAAA,GAD0D;AAE1DC,IAAAA;AAF0D,GAGtD;AACJ,MAAMC,UAAU,GAAGC,MAAM,CAACC,IAAP,CAAYH,SAAZ,CAAnB;AACA,MAAM,CAACI,iBAAD,EAAoBC,oBAApB,IAA4C,qBAASJ,UAAU,CAAC,CAAD,CAAnB,CAAlD;AACA,MAAM,CAACK,KAAD,EAAQC,QAAR,IAAoB,qBAASP,SAAT,CAA1B;AAEA,wBAAU,MAAM;AAEdK,IAAAA,oBAAoB,CAACJ,UAAU,CAAC,CAAD,CAAX,CAApB;AACAM,IAAAA,QAAQ,CAACP,SAAD,CAAR;AACD,GAJD,EAIG,CAACA,SAAD,EAAYC,UAAZ,CAJH;AAOA,SACE,4DACE,6BAAC,wBAAD;AACE,IAAA,KAAK,EAAEG,iBADT;AAEE,IAAA,QAAQ,EAAEC,oBAFZ;AAGE,IAAA,EAAE,EAAC,OAHL;AAIE,IAAA,EAAE,EAAC;AAJL,KAMGJ,UAAU,CAACO,GAAX,CAAgBC,SAAD,IACd,6BAAC,sBAAD;AAAY,IAAA,GAAG,EAAEA;AAAjB,KAA6BA,SAA7B,CADD,CANH,CADF,EAWE;AAAK,IAAA,KAAK,EAAE;AAAEC,MAAAA,QAAQ,EAAE;AAAZ;AAAZ,KACE,6BAAC,aAAD;AACE,IAAA,GAAG,EAAEX,GADP;AAEE,IAAA,GAAG,EAAEK,iBAFP;AAGE,IAAA,IAAI,EAAEE,KAAK,CAACF,iBAAD,CAAL,CAAyBO,IAHjC;AAIE,IAAA,IAAI,EAAE,IAJR;AAKE,IAAA,QAAQ,EAAE;AALZ,IADF,CAXF,CADF;AAuBD,CAtCM","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 } 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 '..'\n\ninterface DocResponseTypesProps {\n api: ApiModel\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: FC<DocResponseTypesProps> = ({\n api,\n responses,\n}) => {\n const mediaTypes = Object.keys(responses)\n const [selectedMediaType, setSelectedMediaType] = useState(mediaTypes[0])\n const [resps, setResps] = useState(responses)\n\n useEffect(() => {\n /** When new responses are passed, update the default selected media type */\n setSelectedMediaType(mediaTypes[0])\n setResps(responses)\n }, [responses, mediaTypes])\n\n // TODO: Account for endpoints with no responses (e.g. delete a custom cmd)\n return (\n <>\n <ButtonToggle\n value={selectedMediaType}\n onChange={setSelectedMediaType}\n mt=\"large\"\n mb=\"large\"\n >\n {mediaTypes.map((mediaType) => (\n <ButtonItem key={mediaType}>{mediaType}</ButtonItem>\n ))}\n </ButtonToggle>\n <div style={{ overflow: 'auto' }}>\n <ExploreType\n api={api}\n key={selectedMediaType}\n type={resps[selectedMediaType].type}\n link={true}\n maxDepth={2}\n />\n </div>\n </>\n )\n}\n"],"file":"DocResponseTypes.js"}
@@ -1,7 +1,8 @@
1
- import { FC } from 'react';
2
- import { IMethodResponse } from '@looker/sdk-codegen';
1
+ import type { FC } from 'react';
2
+ import type { IMethodResponse, ApiModel } from '@looker/sdk-codegen';
3
3
  interface DocResponsesProps {
4
4
  responses: IMethodResponse[];
5
+ api: ApiModel;
5
6
  }
6
7
  export declare const DocResponses: FC<DocResponsesProps>;
7
8
  export {};
@@ -21,6 +21,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
21
21
 
22
22
  var DocResponses = _ref => {
23
23
  var {
24
+ api,
24
25
  responses
25
26
  } = _ref;
26
27
  var tabs = (0, _components.useTabs)();
@@ -36,6 +37,7 @@ var DocResponses = _ref => {
36
37
  }), Object.values(responseTree).map((responses, index) => _react.default.createElement(_components.TabPanel, {
37
38
  key: index
38
39
  }, _react.default.createElement(_DocResponseTypes.DocResponseTypes, {
40
+ api: api,
39
41
  responses: responses
40
42
  }))))));
41
43
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/DocResponses/DocResponses.tsx"],"names":["DocResponses","responses","tabs","length","responseTree","Object","keys","map","statusCode","index","values"],"mappings":";;;;;;;AA0BA;;AACA;;AAGA;;AACA;;AACA;;;;;;AASO,IAAMA,YAAmC,GAAG,QAAmB;AAAA,MAAlB;AAAEC,IAAAA;AAAF,GAAkB;AACpE,MAAMC,IAAI,GAAG,0BAAb;AAEA,MAAID,SAAS,CAACE,MAAV,KAAqB,CAAzB,EAA4B,OAAO,2DAAP;AAE5B,MAAMC,YAAY,GAAG,8BAAkBH,SAAlB,CAArB;AAEA,SACE,6BAAC,oBAAD;AAAe,IAAA,OAAO,EAAC,iBAAvB;AAAyC,IAAA,EAAE,EAAC;AAA5C,KACE,4DACE,6BAAC,mBAAD,EAAaC,IAAb,EACGG,MAAM,CAACC,IAAP,CAAYF,YAAZ,EAA0BG,GAA1B,CAA8B,CAACC,UAAD,EAAaC,KAAb,KAC7B,6BAAC,eAAD;AAAK,IAAA,GAAG,EAAEA;AAAV,KAAkBD,UAAlB,CADD,CADH,CADF,EAME,6BAAC,qBAAD,eAAeN,IAAf;AAAqB,IAAA,EAAE,EAAC;AAAxB,MACGG,MAAM,CAACK,MAAP,CAAcN,YAAd,EAA4BG,GAA5B,CAAgC,CAACN,SAAD,EAAYQ,KAAZ,KAC/B,6BAAC,oBAAD;AAAU,IAAA,GAAG,EAAEA;AAAf,KACE,6BAAC,kCAAD;AAAkB,IAAA,SAAS,EAAER;AAA7B,IADF,CADD,CADH,CANF,CADF,CADF;AAkBD,CAzBM","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, { FC } from 'react'\nimport { Tab, TabList, TabPanel, TabPanels, useTabs } from '@looker/components'\nimport { IMethodResponse } from '@looker/sdk-codegen'\n\nimport { CollapserCard } from '@looker/run-it'\nimport { DocResponseTypes } from './DocResponseTypes'\nimport { buildResponseTree } from './utils'\n\ninterface DocResponsesProps {\n responses: IMethodResponse[]\n}\n\n/**\n * Renders a tab list and tab panels for different method response types\n */\nexport const DocResponses: FC<DocResponsesProps> = ({ responses }) => {\n const tabs = useTabs()\n\n if (responses.length === 0) return <></>\n\n const responseTree = buildResponseTree(responses)\n\n return (\n <CollapserCard heading=\"Response Models\" id=\"response models\">\n <>\n <TabList {...tabs}>\n {Object.keys(responseTree).map((statusCode, index) => (\n <Tab key={index}>{statusCode}</Tab>\n ))}\n </TabList>\n <TabPanels {...tabs} pt=\"0\">\n {Object.values(responseTree).map((responses, index) => (\n <TabPanel key={index}>\n <DocResponseTypes responses={responses} />\n </TabPanel>\n ))}\n </TabPanels>\n </>\n </CollapserCard>\n )\n}\n"],"file":"DocResponses.js"}
1
+ {"version":3,"sources":["../../../src/components/DocResponses/DocResponses.tsx"],"names":["DocResponses","api","responses","tabs","length","responseTree","Object","keys","map","statusCode","index","values"],"mappings":";;;;;;;AA2BA;;AACA;;AAGA;;AACA;;AACA;;;;;;AAUO,IAAMA,YAAmC,GAAG,QAAwB;AAAA,MAAvB;AAAEC,IAAAA,GAAF;AAAOC,IAAAA;AAAP,GAAuB;AACzE,MAAMC,IAAI,GAAG,0BAAb;AAEA,MAAID,SAAS,CAACE,MAAV,KAAqB,CAAzB,EAA4B,OAAO,2DAAP;AAE5B,MAAMC,YAAY,GAAG,8BAAkBH,SAAlB,CAArB;AAEA,SACE,6BAAC,oBAAD;AAAe,IAAA,OAAO,EAAC,iBAAvB;AAAyC,IAAA,EAAE,EAAC;AAA5C,KACE,4DACE,6BAAC,mBAAD,EAAaC,IAAb,EACGG,MAAM,CAACC,IAAP,CAAYF,YAAZ,EAA0BG,GAA1B,CAA8B,CAACC,UAAD,EAAaC,KAAb,KAC7B,6BAAC,eAAD;AAAK,IAAA,GAAG,EAAEA;AAAV,KAAkBD,UAAlB,CADD,CADH,CADF,EAME,6BAAC,qBAAD,eAAeN,IAAf;AAAqB,IAAA,EAAE,EAAC;AAAxB,MACGG,MAAM,CAACK,MAAP,CAAcN,YAAd,EAA4BG,GAA5B,CAAgC,CAACN,SAAD,EAAYQ,KAAZ,KAC/B,6BAAC,oBAAD;AAAU,IAAA,GAAG,EAAEA;AAAf,KACE,6BAAC,kCAAD;AAAkB,IAAA,GAAG,EAAET,GAAvB;AAA4B,IAAA,SAAS,EAAEC;AAAvC,IADF,CADD,CADH,CANF,CADF,CADF;AAkBD,CAzBM","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 from 'react'\nimport { Tab, TabList, TabPanel, TabPanels, useTabs } from '@looker/components'\nimport type { IMethodResponse, ApiModel } from '@looker/sdk-codegen'\n\nimport { CollapserCard } from '@looker/run-it'\nimport { DocResponseTypes } from './DocResponseTypes'\nimport { buildResponseTree } from './utils'\n\ninterface DocResponsesProps {\n responses: IMethodResponse[]\n api: ApiModel\n}\n\n/**\n * Renders a tab list and tab panels for different method response types\n */\nexport const DocResponses: FC<DocResponsesProps> = ({ api, responses }) => {\n const tabs = useTabs()\n\n if (responses.length === 0) return <></>\n\n const responseTree = buildResponseTree(responses)\n\n return (\n <CollapserCard heading=\"Response Models\" id=\"response models\">\n <>\n <TabList {...tabs}>\n {Object.keys(responseTree).map((statusCode, index) => (\n <Tab key={index}>{statusCode}</Tab>\n ))}\n </TabList>\n <TabPanels {...tabs} pt=\"0\">\n {Object.values(responseTree).map((responses, index) => (\n <TabPanel key={index}>\n <DocResponseTypes api={api} responses={responses} />\n </TabPanel>\n ))}\n </TabPanels>\n </>\n </CollapserCard>\n )\n}\n"],"file":"DocResponses.js"}
@@ -1,2 +1,2 @@
1
- import { IMethodResponse, KeyedCollection } from '@looker/sdk-codegen';
1
+ import type { IMethodResponse, KeyedCollection } from '@looker/sdk-codegen';
2
2
  export declare const buildResponseTree: (responses: IMethodResponse[]) => KeyedCollection<KeyedCollection<IMethodResponse>>;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/DocResponses/utils.ts"],"names":["buildResponseTree","responses","tree","Object","values","forEach","response","node","statusCode","description","mediaType"],"mappings":";;;;;;;AAiCO,IAAMA,iBAAiB,GAC5BC,SAD+B,IAEuB;AACtD,MAAMC,IAAI,GAAG,EAAb;AACAC,EAAAA,MAAM,CAACC,MAAP,CAAcH,SAAd,EAAyBI,OAAzB,CAAkCC,QAAD,IAAc;AAC7C,QAAMC,IAAI,aAAMD,QAAQ,CAACE,UAAf,eAA8BF,QAAQ,CAACG,WAAvC,CAAV;AACA,QAAI,EAAEF,IAAI,IAAIL,IAAV,CAAJ,EAAqBA,IAAI,CAACK,IAAD,CAAJ,GAAa,EAAb;AACrBL,IAAAA,IAAI,CAACK,IAAD,CAAJ,CAAWD,QAAQ,CAACI,SAApB,IAAiCJ,QAAjC;AACD,GAJD;AAKA,SAAOJ,IAAP;AACD,CAVM","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 { 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"],"file":"utils.js"}
1
+ {"version":3,"sources":["../../../src/components/DocResponses/utils.ts"],"names":["buildResponseTree","responses","tree","Object","values","forEach","response","node","statusCode","description","mediaType"],"mappings":";;;;;;;AAiCO,IAAMA,iBAAiB,GAC5BC,SAD+B,IAEuB;AACtD,MAAMC,IAAI,GAAG,EAAb;AACAC,EAAAA,MAAM,CAACC,MAAP,CAAcH,SAAd,EAAyBI,OAAzB,CAAkCC,QAAD,IAAc;AAC7C,QAAMC,IAAI,aAAMD,QAAQ,CAACE,UAAf,eAA8BF,QAAQ,CAACG,WAAvC,CAAV;AACA,QAAI,EAAEF,IAAI,IAAIL,IAAV,CAAJ,EAAqBA,IAAI,CAACK,IAAD,CAAJ,GAAa,EAAb;AACrBL,IAAAA,IAAI,CAACK,IAAD,CAAJ,CAAWD,QAAQ,CAACI,SAApB,IAAiCJ,QAAjC;AACD,GAJD;AAKA,SAAOJ,IAAP;AACD,CAVM","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"],"file":"utils.js"}
@@ -1,5 +1,5 @@
1
- import { KeyedCollection } from '@looker/sdk-codegen';
2
- import { FC } from 'react';
1
+ import type { KeyedCollection } from '@looker/sdk-codegen';
2
+ import type { FC } from 'react';
3
3
  interface DocDeclarationsProps {
4
4
  declarations: KeyedCollection<string>;
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/DocSDKs/DocDeclarations.tsx"],"names":["DocDeclarations","declarations","tabs","Object","keys","map","language","entries","code"],"mappings":";;;;;;;AAyBA;;AAEA;;AACA;;;;;;AAUO,IAAMA,eAAyC,GAAG,QAAsB;AAAA,MAArB;AAAEC,IAAAA;AAAF,GAAqB;AAC7E,MAAMC,IAAI,GAAG,0BAAb;AAEA,SACE,4DACE,6BAAC,mBAAD,EAAaA,IAAb,EACGC,MAAM,CAACC,IAAP,CAAYH,YAAZ,EAA0BI,GAA1B,CAA+BC,QAAD,IAC7B,6BAAC,eAAD;AAAK,IAAA,GAAG,EAAEA;AAAV,KAAqBA,QAArB,CADD,CADH,CADF,EAME,6BAAC,qBAAD,eAAeJ,IAAf;AAAqB,IAAA,EAAE,EAAC;AAAxB,MACGC,MAAM,CAACI,OAAP,CAAeN,YAAf,EAA6BI,GAA7B,CAAiC;AAAA,QAAC,CAACC,QAAD,EAAWE,IAAX,CAAD;AAAA,WAChC,6BAAC,oBAAD;AAAU,MAAA,GAAG,EAAEF;AAAf,OACE,6BAAC,gBAAD;AAAS,MAAA,QAAQ,EAAEA,QAAnB;AAA6B,MAAA,IAAI,EAAEE;AAAnC,MADF,CADgC;AAAA,GAAjC,CADH,CANF,CADF;AAgBD,CAnBM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { Tab, TabList, TabPanel, TabPanels, useTabs } from '@looker/components'\nimport { KeyedCollection } from '@looker/sdk-codegen'\nimport React, { FC } from 'react'\nimport { DocCode } from '../DocCode'\n\ninterface DocDeclarationsProps {\n declarations: KeyedCollection<string>\n}\n\n/**\n * Renders all provided declarations\n * @param declarations A collection of SDK declarations in various languages\n */\nexport const DocDeclarations: FC<DocDeclarationsProps> = ({ declarations }) => {\n const tabs = useTabs()\n\n return (\n <>\n <TabList {...tabs}>\n {Object.keys(declarations).map((language) => (\n <Tab key={language}>{language}</Tab>\n ))}\n </TabList>\n <TabPanels {...tabs} pt=\"0\">\n {Object.entries(declarations).map(([language, code]) => (\n <TabPanel key={language}>\n <DocCode language={language} code={code} />\n </TabPanel>\n ))}\n </TabPanels>\n </>\n )\n}\n"],"file":"DocDeclarations.js"}
1
+ {"version":3,"sources":["../../../src/components/DocSDKs/DocDeclarations.tsx"],"names":["DocDeclarations","declarations","tabs","Object","keys","map","language","entries","code"],"mappings":";;;;;;;AAyBA;;AAGA;;AACA;;;;;;AAUO,IAAMA,eAAyC,GAAG,QAAsB;AAAA,MAArB;AAAEC,IAAAA;AAAF,GAAqB;AAC7E,MAAMC,IAAI,GAAG,0BAAb;AAEA,SACE,4DACE,6BAAC,mBAAD,EAAaA,IAAb,EACGC,MAAM,CAACC,IAAP,CAAYH,YAAZ,EAA0BI,GAA1B,CAA+BC,QAAD,IAC7B,6BAAC,eAAD;AAAK,IAAA,GAAG,EAAEA;AAAV,KAAqBA,QAArB,CADD,CADH,CADF,EAME,6BAAC,qBAAD,eAAeJ,IAAf;AAAqB,IAAA,EAAE,EAAC;AAAxB,MACGC,MAAM,CAACI,OAAP,CAAeN,YAAf,EAA6BI,GAA7B,CAAiC;AAAA,QAAC,CAACC,QAAD,EAAWE,IAAX,CAAD;AAAA,WAChC,6BAAC,oBAAD;AAAU,MAAA,GAAG,EAAEF;AAAf,OACE,6BAAC,gBAAD;AAAS,MAAA,QAAQ,EAAEA,QAAnB;AAA6B,MAAA,IAAI,EAAEE;AAAnC,MADF,CADgC;AAAA,GAAjC,CADH,CANF,CADF;AAgBD,CAnBM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { Tab, TabList, TabPanel, TabPanels, useTabs } from '@looker/components'\nimport type { KeyedCollection } from '@looker/sdk-codegen'\nimport type { FC } from 'react'\nimport React from 'react'\nimport { DocCode } from '../DocCode'\n\ninterface DocDeclarationsProps {\n declarations: KeyedCollection<string>\n}\n\n/**\n * Renders all provided declarations\n * @param declarations A collection of SDK declarations in various languages\n */\nexport const DocDeclarations: FC<DocDeclarationsProps> = ({ declarations }) => {\n const tabs = useTabs()\n\n return (\n <>\n <TabList {...tabs}>\n {Object.keys(declarations).map((language) => (\n <Tab key={language}>{language}</Tab>\n ))}\n </TabList>\n <TabPanels {...tabs} pt=\"0\">\n {Object.entries(declarations).map(([language, code]) => (\n <TabPanel key={language}>\n <DocCode language={language} code={code} />\n </TabPanel>\n ))}\n </TabPanels>\n </>\n )\n}\n"],"file":"DocDeclarations.js"}
@@ -1,5 +1,5 @@
1
- import { FC } from 'react';
2
- import { IMethod, IType, ApiModel } from '@looker/sdk-codegen';
1
+ import type { FC } from 'react';
2
+ import type { IMethod, IType, ApiModel } from '@looker/sdk-codegen';
3
3
  interface LanguageSDKProps {
4
4
  api: ApiModel;
5
5
  method?: IMethod;
@@ -44,7 +44,7 @@ var DocSDKs = _ref2 => {
44
44
  method,
45
45
  type
46
46
  } = _ref2;
47
- var sdkLanguage = (0, _reactRedux.useSelector)(_state.getSelectedSdkLanguage);
47
+ var sdkLanguage = (0, _reactRedux.useSelector)(_state.selectSdkLanguage);
48
48
  var generators = (0, _runIt.getGenerators)(api);
49
49
  var [item, setItem] = (0, _react.useState)(method ? (0, _utils.noComment)(method) : type);
50
50
  var [declarations, setDeclarations] = (0, _react.useState)(getDeclarations(generators, sdkLanguage, item));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/DocSDKs/DocSDKs.tsx"],"names":["getDeclarations","generators","sdkLanguage","item","declarations","Object","entries","forEach","language","gen","code","Method","declareMethod","declareType","DocSDKs","api","method","type","getSelectedSdkLanguage","setItem","setDeclarations","header","setHeader","languages","keys","length","values"],"mappings":";;;;;;;AA0BA;;AACA;;AACA;;AAQA;;AAEA;;AACA;;AACA;;AACA;;;;;;AAWA,IAAMA,eAAe,GAAG,CACtBC,UADsB,EAEtBC,WAFsB,EAGtBC,IAHsB,KAInB;AACH,MAAMC,YAAqC,GAAG,EAA9C;AACAC,EAAAA,MAAM,CAACC,OAAP,CAAeL,UAAf,EAA2BM,OAA3B,CAAmC,QAAqB;AAAA,QAApB,CAACC,QAAD,EAAWC,GAAX,CAAoB;;AACtD,QAAIP,WAAW,KAAK,KAAhB,IAAyBM,QAAQ,KAAKN,WAA1C,EAAuD;AACrD,UAAMQ,IAAI,GACRP,IAAI,YAAYQ,kBAAhB,GACIF,GAAG,CAACG,aAAJ,CAAkB,EAAlB,EAAsBT,IAAtB,CADJ,GAEIM,GAAG,CAACI,WAAJ,CAAgB,EAAhB,EAAoBV,IAApB,CAHN;AAIAC,MAAAA,YAAY,CAACI,QAAD,CAAZ,GAAyBE,IAAzB;AACD;AACF,GARD;AASA,SAAON,YAAP;AACD,CAhBD;;AAqBO,IAAMU,OAA6B,GAAG,SAA2B;AAAA,MAA1B;AAAEC,IAAAA,GAAF;AAAOC,IAAAA,MAAP;AAAeC,IAAAA;AAAf,GAA0B;AACtE,MAAMf,WAAW,GAAG,6BAAYgB,6BAAZ,CAApB;AACA,MAAMjB,UAAU,GAAG,0BAAcc,GAAd,CAAnB;AACA,MAAM,CAACZ,IAAD,EAAOgB,OAAP,IAAkB,qBAASH,MAAM,GAAG,sBAAUA,MAAV,CAAH,GAAuBC,IAAtC,CAAxB;AACA,MAAM,CAACb,YAAD,EAAegB,eAAf,IAAkC,qBACtCpB,eAAe,CAACC,UAAD,EAAaC,WAAb,EAA0BC,IAA1B,CADuB,CAAxC;AAGA,MAAM,CAACkB,MAAD,EAASC,SAAT,IAAsB,+BAAYpB,WAAZ,kBAA5B;AAEA,wBAAU,MAAM;AACdiB,IAAAA,OAAO,CAACH,MAAM,GAAG,sBAAUA,MAAV,CAAH,GAAuBC,IAA9B,CAAP;AACD,GAFD,EAEG,CAACD,MAAD,EAASC,IAAT,CAFH;AAIA,wBAAU,MAAM;AACd,QAAMb,YAAY,GAAGJ,eAAe,CAACC,UAAD,EAAaC,WAAb,EAA0BC,IAA1B,CAApC;AACAiB,IAAAA,eAAe,CAAChB,YAAD,CAAf;AACA,QAAMmB,SAAS,GAAGlB,MAAM,CAACmB,IAAP,CAAYpB,YAAZ,CAAlB;;AACA,QAAImB,SAAS,CAACE,MAAV,GAAmB,CAAvB,EAA0B;AACxBH,MAAAA,SAAS,CAAC,cAAD,CAAT;AACD,KAFD,MAEO;AACLA,MAAAA,SAAS,WAAIC,SAAS,CAAC,CAAD,CAAb,kBAAT;AACD;AACF,GATD,EASG,CAACrB,WAAD,EAAcC,IAAd,CATH;AAWA,SACE,6BAAC,oBAAD;AAAe,IAAA,OAAO,EAAEkB,MAAxB;AAAgC,IAAA,EAAE,EAAC;AAAnC,KACGhB,MAAM,CAACmB,IAAP,CAAYpB,YAAZ,EAA0BqB,MAA1B,GAAmC,CAAnC,GACC,6BAAC,gCAAD;AAAiB,IAAA,YAAY,EAAErB;AAA/B,IADD,GAGC,6BAAC,gBAAD;AACE,IAAA,QAAQ,EAAEC,MAAM,CAACmB,IAAP,CAAYpB,YAAZ,EAA0B,CAA1B,CADZ;AAEE,IAAA,IAAI,EAAEC,MAAM,CAACqB,MAAP,CAActB,YAAd,EAA4B,CAA5B;AAFR,IAJJ,CADF;AAYD,CApCM","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, { FC, useState, useEffect } from 'react'\nimport { useSelector } from 'react-redux'\nimport {\n IMethod,\n IType,\n ApiModel,\n KeyedCollection,\n CodeGen,\n Method,\n} from '@looker/sdk-codegen'\nimport { CollapserCard, getGenerators } from '@looker/run-it'\n\nimport { DocCode } from '../DocCode'\nimport { getSelectedSdkLanguage } from '../../state'\nimport { noComment } from './utils'\nimport { DocDeclarations } from './DocDeclarations'\n\ninterface LanguageSDKProps {\n /** API spec */\n api: ApiModel\n /** An SDK method */\n method?: IMethod\n /** An SDK type */\n type?: IType\n}\n\nconst getDeclarations = (\n generators: KeyedCollection<CodeGen>,\n sdkLanguage: string,\n item: IMethod | IType\n) => {\n const declarations: KeyedCollection<string> = {}\n Object.entries(generators).forEach(([language, gen]) => {\n if (sdkLanguage === 'All' || language === sdkLanguage) {\n const code =\n item instanceof Method\n ? gen.declareMethod('', item as IMethod)\n : gen.declareType('', item as IType)\n declarations[language] = code\n }\n })\n return declarations\n}\n\n/**\n * Given a method or a type, it renders its SDK declaration in all supported languages.\n */\nexport const DocSDKs: FC<LanguageSDKProps> = ({ api, method, type }) => {\n const sdkLanguage = useSelector(getSelectedSdkLanguage)\n const generators = getGenerators(api)\n const [item, setItem] = useState(method ? noComment(method) : type!)\n const [declarations, setDeclarations] = useState(\n getDeclarations(generators, sdkLanguage, item)\n )\n const [header, setHeader] = useState(`${sdkLanguage} Declaration`)\n\n useEffect(() => {\n setItem(method ? noComment(method) : type!)\n }, [method, type])\n\n useEffect(() => {\n const declarations = getDeclarations(generators, sdkLanguage, item)\n setDeclarations(declarations)\n const languages = Object.keys(declarations)\n if (languages.length > 1) {\n setHeader('Declarations')\n } else {\n setHeader(`${languages[0]} Declaration`)\n }\n }, [sdkLanguage, item])\n\n return (\n <CollapserCard heading={header} id=\"sdk declarations\">\n {Object.keys(declarations).length > 1 ? (\n <DocDeclarations declarations={declarations} />\n ) : (\n <DocCode\n language={Object.keys(declarations)[0]}\n code={Object.values(declarations)[0]}\n />\n )}\n </CollapserCard>\n )\n}\n"],"file":"DocSDKs.js"}
1
+ {"version":3,"sources":["../../../src/components/DocSDKs/DocSDKs.tsx"],"names":["getDeclarations","generators","sdkLanguage","item","declarations","Object","entries","forEach","language","gen","code","Method","declareMethod","declareType","DocSDKs","api","method","type","selectSdkLanguage","setItem","setDeclarations","header","setHeader","languages","keys","length","values"],"mappings":";;;;;;;AA2BA;;AACA;;AAQA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;AAWA,IAAMA,eAAe,GAAG,CACtBC,UADsB,EAEtBC,WAFsB,EAGtBC,IAHsB,KAInB;AACH,MAAMC,YAAqC,GAAG,EAA9C;AACAC,EAAAA,MAAM,CAACC,OAAP,CAAeL,UAAf,EAA2BM,OAA3B,CAAmC,QAAqB;AAAA,QAApB,CAACC,QAAD,EAAWC,GAAX,CAAoB;;AACtD,QAAIP,WAAW,KAAK,KAAhB,IAAyBM,QAAQ,KAAKN,WAA1C,EAAuD;AACrD,UAAMQ,IAAI,GACRP,IAAI,YAAYQ,kBAAhB,GACIF,GAAG,CAACG,aAAJ,CAAkB,EAAlB,EAAsBT,IAAtB,CADJ,GAEIM,GAAG,CAACI,WAAJ,CAAgB,EAAhB,EAAoBV,IAApB,CAHN;AAIAC,MAAAA,YAAY,CAACI,QAAD,CAAZ,GAAyBE,IAAzB;AACD;AACF,GARD;AASA,SAAON,YAAP;AACD,CAhBD;;AAqBO,IAAMU,OAA6B,GAAG,SAA2B;AAAA,MAA1B;AAAEC,IAAAA,GAAF;AAAOC,IAAAA,MAAP;AAAeC,IAAAA;AAAf,GAA0B;AACtE,MAAMf,WAAW,GAAG,6BAAYgB,wBAAZ,CAApB;AACA,MAAMjB,UAAU,GAAG,0BAAcc,GAAd,CAAnB;AACA,MAAM,CAACZ,IAAD,EAAOgB,OAAP,IAAkB,qBAASH,MAAM,GAAG,sBAAUA,MAAV,CAAH,GAAuBC,IAAtC,CAAxB;AACA,MAAM,CAACb,YAAD,EAAegB,eAAf,IAAkC,qBACtCpB,eAAe,CAACC,UAAD,EAAaC,WAAb,EAA0BC,IAA1B,CADuB,CAAxC;AAGA,MAAM,CAACkB,MAAD,EAASC,SAAT,IAAsB,+BAAYpB,WAAZ,kBAA5B;AAEA,wBAAU,MAAM;AACdiB,IAAAA,OAAO,CAACH,MAAM,GAAG,sBAAUA,MAAV,CAAH,GAAuBC,IAA9B,CAAP;AACD,GAFD,EAEG,CAACD,MAAD,EAASC,IAAT,CAFH;AAIA,wBAAU,MAAM;AACd,QAAMb,YAAY,GAAGJ,eAAe,CAACC,UAAD,EAAaC,WAAb,EAA0BC,IAA1B,CAApC;AACAiB,IAAAA,eAAe,CAAChB,YAAD,CAAf;AACA,QAAMmB,SAAS,GAAGlB,MAAM,CAACmB,IAAP,CAAYpB,YAAZ,CAAlB;;AACA,QAAImB,SAAS,CAACE,MAAV,GAAmB,CAAvB,EAA0B;AACxBH,MAAAA,SAAS,CAAC,cAAD,CAAT;AACD,KAFD,MAEO;AACLA,MAAAA,SAAS,WAAIC,SAAS,CAAC,CAAD,CAAb,kBAAT;AACD;AACF,GATD,EASG,CAACrB,WAAD,EAAcC,IAAd,CATH;AAWA,SACE,6BAAC,oBAAD;AAAe,IAAA,OAAO,EAAEkB,MAAxB;AAAgC,IAAA,EAAE,EAAC;AAAnC,KACGhB,MAAM,CAACmB,IAAP,CAAYpB,YAAZ,EAA0BqB,MAA1B,GAAmC,CAAnC,GACC,6BAAC,gCAAD;AAAiB,IAAA,YAAY,EAAErB;AAA/B,IADD,GAGC,6BAAC,gBAAD;AACE,IAAA,QAAQ,EAAEC,MAAM,CAACmB,IAAP,CAAYpB,YAAZ,EAA0B,CAA1B,CADZ;AAEE,IAAA,IAAI,EAAEC,MAAM,CAACqB,MAAP,CAActB,YAAd,EAA4B,CAA5B;AAFR,IAJJ,CADF;AAYD,CApCM","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 } from 'react'\nimport { useSelector } from 'react-redux'\nimport type {\n IMethod,\n IType,\n ApiModel,\n KeyedCollection,\n CodeGen,\n} from '@looker/sdk-codegen'\nimport { Method } from '@looker/sdk-codegen'\nimport { CollapserCard, getGenerators } from '@looker/run-it'\n\nimport { DocCode } from '../DocCode'\nimport { selectSdkLanguage } from '../../state'\nimport { noComment } from './utils'\nimport { DocDeclarations } from './DocDeclarations'\n\ninterface LanguageSDKProps {\n /** API spec */\n api: ApiModel\n /** An SDK method */\n method?: IMethod\n /** An SDK type */\n type?: IType\n}\n\nconst getDeclarations = (\n generators: KeyedCollection<CodeGen>,\n sdkLanguage: string,\n item: IMethod | IType\n) => {\n const declarations: KeyedCollection<string> = {}\n Object.entries(generators).forEach(([language, gen]) => {\n if (sdkLanguage === 'All' || language === sdkLanguage) {\n const code =\n item instanceof Method\n ? gen.declareMethod('', item as IMethod)\n : gen.declareType('', item as IType)\n declarations[language] = code\n }\n })\n return declarations\n}\n\n/**\n * Given a method or a type, it renders its SDK declaration in all supported languages.\n */\nexport const DocSDKs: FC<LanguageSDKProps> = ({ api, method, type }) => {\n const sdkLanguage = useSelector(selectSdkLanguage)\n const generators = getGenerators(api)\n const [item, setItem] = useState(method ? noComment(method) : type!)\n const [declarations, setDeclarations] = useState(\n getDeclarations(generators, sdkLanguage, item)\n )\n const [header, setHeader] = useState(`${sdkLanguage} Declaration`)\n\n useEffect(() => {\n setItem(method ? noComment(method) : type!)\n }, [method, type])\n\n useEffect(() => {\n const declarations = getDeclarations(generators, sdkLanguage, item)\n setDeclarations(declarations)\n const languages = Object.keys(declarations)\n if (languages.length > 1) {\n setHeader('Declarations')\n } else {\n setHeader(`${languages[0]} Declaration`)\n }\n }, [sdkLanguage, item])\n\n return (\n <CollapserCard heading={header} id=\"sdk declarations\">\n {Object.keys(declarations).length > 1 ? (\n <DocDeclarations declarations={declarations} />\n ) : (\n <DocCode\n language={Object.keys(declarations)[0]}\n code={Object.values(declarations)[0]}\n />\n )}\n </CollapserCard>\n )\n}\n"],"file":"DocSDKs.js"}
@@ -1,2 +1,2 @@
1
- import { IMethod } from '@looker/sdk-codegen';
1
+ import type { IMethod } from '@looker/sdk-codegen';
2
2
  export declare const noComment: (method: IMethod) => IMethod;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/DocSDKs/utils.ts"],"names":["noComment","method","copy","description"],"mappings":";;;;;;;AA0BA;;;;AAMO,IAAMA,SAAS,GAAIC,MAAD,IAA8B;AACrD,MAAMC,IAAI,GAAG,oBAAMD,MAAN,CAAb;AACAC,EAAAA,IAAI,CAACC,WAAL,GAAmB,EAAnB;AACA,SAAOD,IAAP;AACD,CAJM","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 { IMethod } from '@looker/sdk-codegen'\nimport clone from 'lodash/clone'\n\n/**\n * Given a method create a copy and remove its description\n * @param method An SDK method\n */\nexport const noComment = (method: IMethod): IMethod => {\n const copy = clone(method)\n copy.description = ''\n return copy\n}\n"],"file":"utils.js"}
1
+ {"version":3,"sources":["../../../src/components/DocSDKs/utils.ts"],"names":["noComment","method","copy","description"],"mappings":";;;;;;;AA0BA;;;;AAMO,IAAMA,SAAS,GAAIC,MAAD,IAA8B;AACrD,MAAMC,IAAI,GAAG,oBAAMD,MAAN,CAAb;AACAC,EAAAA,IAAI,CAACC,WAAL,GAAmB,EAAnB;AACA,SAAOD,IAAP;AACD,CAJM","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 { IMethod } from '@looker/sdk-codegen'\nimport clone from 'lodash/clone'\n\n/**\n * Given a method create a copy and remove its description\n * @param method An SDK method\n */\nexport const noComment = (method: IMethod): IMethod => {\n const copy = clone(method)\n copy.description = ''\n return copy\n}\n"],"file":"utils.js"}
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import type { FC } from 'react';
2
2
  interface DocSchemaProps {
3
3
  object: any;
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/DocSchema/DocSchema.tsx"],"names":["DocSchema","object","json","JSON","stringify"],"mappings":";;;;;;;AA0BA;;AAEA;;AACA;;;;AASO,IAAMA,SAA6B,GAAG,QAAgB;AAAA,MAAf;AAAEC,IAAAA;AAAF,GAAe;AAC3D,MAAI,CAACA,MAAL,EAAa,OAAO,2DAAP;AACb,MAAMC,IAAI,GAAGC,IAAI,CAACC,SAAL,CAAeH,MAAf,EAAuB,IAAvB,EAA6B,CAA7B,CAAb;AAEA,SACE,6BAAC,oBAAD;AACE,IAAA,OAAO,EAAC,iBADV;AAEE,IAAA,WAAW,EAAE,KAFf;AAGE,IAAA,EAAE,EAAC;AAHL,KAKE,4DACE,6BAAC,uBAAD;AAAa,IAAA,QAAQ,EAAC,MAAtB;AAA6B,IAAA,IAAI,EAAEC;AAAnC,IADF,CALF,CADF;AAWD,CAfM","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, { FC } from 'react'\n\nimport { CodeDisplay } from '@looker/code-editor'\nimport { CollapserCard } from '@looker/run-it'\n\ninterface DocSchemaProps {\n object: any\n}\n\n/**\n * It renders links to the given types and/or methods references\n */\nexport const DocSchema: FC<DocSchemaProps> = ({ object }) => {\n if (!object) return <></>\n const json = JSON.stringify(object, null, 2)\n\n return (\n <CollapserCard\n heading=\"Original Schema\"\n defaultOpen={false}\n id=\"original schema\"\n >\n <>\n <CodeDisplay language=\"json\" code={json} />\n </>\n </CollapserCard>\n )\n}\n"],"file":"DocSchema.js"}
1
+ {"version":3,"sources":["../../../src/components/DocSchema/DocSchema.tsx"],"names":["DocSchema","object","json","JSON","stringify"],"mappings":";;;;;;;AA2BA;;AAEA;;AACA;;;;AASO,IAAMA,SAA6B,GAAG,QAAgB;AAAA,MAAf;AAAEC,IAAAA;AAAF,GAAe;AAC3D,MAAI,CAACA,MAAL,EAAa,OAAO,2DAAP;AACb,MAAMC,IAAI,GAAGC,IAAI,CAACC,SAAL,CAAeH,MAAf,EAAuB,IAAvB,EAA6B,CAA7B,CAAb;AAEA,SACE,6BAAC,oBAAD;AACE,IAAA,OAAO,EAAC,iBADV;AAEE,IAAA,WAAW,EAAE,KAFf;AAGE,IAAA,EAAE,EAAC;AAHL,KAKE,4DACE,6BAAC,uBAAD;AAAa,IAAA,QAAQ,EAAC,MAAtB;AAA6B,IAAA,IAAI,EAAEC;AAAnC,IADF,CALF,CADF;AAWD,CAfM","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 from 'react'\n\nimport { CodeDisplay } from '@looker/code-editor'\nimport { CollapserCard } from '@looker/run-it'\n\ninterface DocSchemaProps {\n object: any\n}\n\n/**\n * It renders links to the given types and/or methods references\n */\nexport const DocSchema: FC<DocSchemaProps> = ({ object }) => {\n if (!object) return <></>\n const json = JSON.stringify(object, null, 2)\n\n return (\n <CollapserCard\n heading=\"Original Schema\"\n defaultOpen={false}\n id=\"original schema\"\n >\n <>\n <CodeDisplay language=\"json\" code={json} />\n </>\n </CollapserCard>\n )\n}\n"],"file":"DocSchema.js"}
@@ -1,2 +1,2 @@
1
- import { FC, PropsWithChildren } from 'react';
1
+ import type { FC, PropsWithChildren } from 'react';
2
2
  export declare const DocSdkExampleCell: FC<PropsWithChildren<any>>;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/DocSdkUsage/DocSdkExampleCell.tsx"],"names":["DocSdkExampleCell","props","borderBottom","hideBorderBottom","overflow","width","display","children"],"mappings":";;;;;;;AAyBA;;AACA;;AAEA;;;;AAEO,IAAMA,iBAA6C,GAAIC,KAAD,IAC3D,6BAAC,yBAAD;AACE,EAAA,KAAK,EAAE;AAAEC,IAAAA,YAAY,EAAE,qCAAyBD,KAAK,CAACE,gBAA/B;AAAhB;AADT,GAGE,6BAAC,gBAAD;AAAM,EAAA,KAAK,EAAE;AAAEC,IAAAA,QAAQ,EAAE,QAAZ;AAAsBC,IAAAA,KAAK,EAAE,MAA7B;AAAqCC,IAAAA,OAAO,EAAE;AAA9C;AAAb,GACGL,KAAK,CAACM,QADT,CAHF,CADK","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 React, { FC, PropsWithChildren } from 'react'\nimport { DataTableCell, Span } from '@looker/components'\n\nimport { getTableItemBottomBorder } from './utils'\n\nexport const DocSdkExampleCell: FC<PropsWithChildren<any>> = (props) => (\n <DataTableCell\n style={{ borderBottom: getTableItemBottomBorder(props.hideBorderBottom) }}\n >\n <Span style={{ overflow: 'hidden', width: '100%', display: 'block' }}>\n {props.children}\n </Span>\n </DataTableCell>\n)\n"],"file":"DocSdkExampleCell.js"}
1
+ {"version":3,"sources":["../../../src/components/DocSdkUsage/DocSdkExampleCell.tsx"],"names":["DocSdkExampleCell","props","borderBottom","hideBorderBottom","overflow","width","display","children"],"mappings":";;;;;;;AA0BA;;AACA;;AAEA;;;;AAEO,IAAMA,iBAA6C,GAAIC,KAAD,IAC3D,6BAAC,yBAAD;AACE,EAAA,KAAK,EAAE;AAAEC,IAAAA,YAAY,EAAE,qCAAyBD,KAAK,CAACE,gBAA/B;AAAhB;AADT,GAGE,6BAAC,gBAAD;AAAM,EAAA,KAAK,EAAE;AAAEC,IAAAA,QAAQ,EAAE,QAAZ;AAAsBC,IAAAA,KAAK,EAAE,MAA7B;AAAqCC,IAAAA,OAAO,EAAE;AAA9C;AAAb,GACGL,KAAK,CAACM,QADT,CAHF,CADK","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, PropsWithChildren } from 'react'\nimport React from 'react'\nimport { DataTableCell, Span } from '@looker/components'\n\nimport { getTableItemBottomBorder } from './utils'\n\nexport const DocSdkExampleCell: FC<PropsWithChildren<any>> = (props) => (\n <DataTableCell\n style={{ borderBottom: getTableItemBottomBorder(props.hideBorderBottom) }}\n >\n <Span style={{ overflow: 'hidden', width: '100%', display: 'block' }}>\n {props.children}\n </Span>\n </DataTableCell>\n)\n"],"file":"DocSdkExampleCell.js"}
@@ -1,5 +1,5 @@
1
- import { FC } from 'react';
2
- import { IMethod } from '@looker/sdk-codegen';
1
+ import type { FC } from 'react';
2
+ import type { IMethod } from '@looker/sdk-codegen';
3
3
  interface DocSdkUsageProps {
4
4
  method: IMethod;
5
5
  }
@@ -19,8 +19,6 @@ var _reactRedux = require("react-redux");
19
19
 
20
20
  var _state = require("../../state");
21
21
 
22
- var _context = require("../../context");
23
-
24
22
  var _utils = require("./utils");
25
23
 
26
24
  var _DocSdkExampleCell = require("./DocSdkExampleCell");
@@ -33,15 +31,14 @@ var DocSdkUsage = _ref => {
33
31
  var {
34
32
  method
35
33
  } = _ref;
36
- var {
37
- examples
38
- } = (0, _react.useContext)(_context.LodeContext);
39
- var sdkLanguage = (0, _reactRedux.useSelector)(_state.getSelectedSdkLanguage);
40
- var languages = (0, _sdkCodegen.findExampleLanguages)(examples, method.name);
34
+ var examples = (0, _reactRedux.useSelector)(_state.selectExamplesLode);
35
+ var sdkLanguage = (0, _reactRedux.useSelector)(_state.selectSdkLanguage);
41
36
  var [page, setPage] = (0, _react.useState)(1);
42
37
  (0, _react.useEffect)(() => {
43
38
  setPage(1);
44
39
  }, [method]);
40
+ if (!examples) return _react.default.createElement(_react.default.Fragment, null);
41
+ var languages = (0, _sdkCodegen.findExampleLanguages)(examples, method.name);
45
42
  if (languages.length === 0) return _react.default.createElement(_react.default.Fragment, null);
46
43
  languages = (0, _utils.sortLanguagesByPreference)(languages, sdkLanguage);
47
44
  var {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/DocSdkUsage/DocSdkUsage.tsx"],"names":["DocSdkUsage","method","examples","LodeContext","sdkLanguage","getSelectedSdkLanguage","languages","name","page","setPage","length","pageExamples","pageLimit","paginate","operationId","exampleColumns","map","exampleRow","i","isEmptyItem","filename","EMPTY_STRING","isLastItem","PER_PAGE_COUNT","nextItemEmpty","hidden","permalink","language","description","line","nextPage"],"mappings":";;;;;;;AAyBA;;AACA;;AAUA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AAOA;;;;;;AAUO,IAAMA,WAAiC,GAAG,QAAgB;AAAA,MAAf;AAAEC,IAAAA;AAAF,GAAe;AAC/D,MAAM;AAAEC,IAAAA;AAAF,MAAe,uBAAWC,oBAAX,CAArB;AACA,MAAMC,WAAW,GAAG,6BAAYC,6BAAZ,CAApB;AACA,MAAIC,SAAS,GAAG,sCAAqBJ,QAArB,EAA+BD,MAAM,CAACM,IAAtC,CAAhB;AACA,MAAM,CAACC,IAAD,EAAOC,OAAP,IAAkB,qBAAS,CAAT,CAAxB;AAEA,wBAAU,MAAM;AACdA,IAAAA,OAAO,CAAC,CAAD,CAAP;AACD,GAFD,EAEG,CAACR,MAAD,CAFH;AAIA,MAAIK,SAAS,CAACI,MAAV,KAAqB,CAAzB,EAA4B,OAAO,2DAAP;AAE5BJ,EAAAA,SAAS,GAAG,sCAA0BA,SAA1B,EAAqCF,WAArC,CAAZ;AAEA,MAAM;AAAEO,IAAAA,YAAF;AAAgBC,IAAAA,SAAhB;AAA2BC,IAAAA;AAA3B,MAAwC,oCAC5CP,SAD4C,EAE5CJ,QAF4C,EAG5CD,MAAM,CAACa,WAHqC,EAI5CN,IAJ4C,CAA9C;AAOA,MAAIG,YAAY,CAACD,MAAb,KAAwB,CAA5B,EAA+B,OAAO,2DAAP;AAE/B,SACE,6BAAC,oBAAD;AAAe,IAAA,EAAE,EAAC,UAAlB;AAA6B,IAAA,OAAO,EAAC;AAArC,KACE,6BAAC,gBAAD;AAAM,IAAA,MAAM,EAAC,MAAb;AAAoB,IAAA,EAAE,EAAC,OAAvB;AAA+B,IAAA,EAAE,EAAC,QAAlC;AAA2C,IAAA,EAAE,EAAC;AAA9C,KACE,6BAAC,qBAAD;AAAW,IAAA,OAAO,EAAC,cAAnB;AAAkC,IAAA,OAAO,EAAEK;AAA3C,KACGJ,YAAY,CAACK,GAAb,CAAiB,CAACC,UAAD,EAAaC,CAAb,KAAmB;AAAA;;AACnC,QAAMC,WAAW,GAAGF,UAAU,CAACG,QAAX,KAAwBC,mBAA5C;AACA,QAAMC,UAAU,GACd,CAACJ,CAAC,GAAG,CAAL,IAAUK,qBAAV,KAA6B,CAA7B,IAAkCL,CAAC,GAAG,CAAJ,KAAUP,YAAY,CAACD,MAD3D;AAEA,QAAMc,aAAa,GAAG,kBAAAb,YAAY,CAACO,CAAC,GAAG,CAAL,CAAZ,gEAAqBE,QAArB,MAAkCC,mBAAxD;AACA,QAAMI,MAAM,GAAGN,WAAW,IAAIG,UAAf,IAA6BE,aAA5C;AACA,WACE,6BAAC,yBAAD;AACE,MAAA,EAAE,EAAEP,UAAU,CAACS,SADjB;AAEE,MAAA,GAAG,EAAET,UAAU,CAACS;AAFlB,OAIE,6BAAC,oCAAD;AAAmB,MAAA,gBAAgB,EAAED;AAArC,OACE,6BAAC,iBAAD;AAAO,MAAA,GAAG,EAAC;AAAX,OACG,CAACN,WAAD,IACC,6BAAC,gBAAD;AACE,MAAA,IAAI,EAAE,6BAAC,gCAAD,OADR;AAEE,MAAA,KAAK,EAAC,OAFR;AAGE,MAAA,IAAI,EAAC;AAHP,MAFJ,EAQE,6BAAC,gBAAD;AACE,MAAA,IAAI,EAAEF,UAAU,CAACS,SADnB;AAEE,MAAA,MAAM,EAAE,QAFV;AAGE,MAAA,IAAI,EAAC;AAHP,OAKGT,UAAU,CAACG,QALd,CARF,CADF,CAJF,EAsBE,6BAAC,oCAAD;AAAmB,MAAA,gBAAgB,EAAEK;AAArC,OACGR,UAAU,CAACU,QADd,CAtBF,EAyBE,6BAAC,oCAAD;AAAmB,MAAA,gBAAgB,EAAEF;AAArC,OACGR,UAAU,CAACW,WADd,CAzBF,EA4BE,6BAAC,oCAAD;AAAmB,MAAA,gBAAgB,EAAEH;AAArC,OACGR,UAAU,CAACY,IADd,CA5BF,CADF;AAkCD,GAxCA,CADH,CADF,EA4CGhB,QAAQ,IACP,6BAAC,eAAD;AAAK,IAAA,SAAS,EAAC;AAAf,KACE,6BAAC,sBAAD;AACE,IAAA,OAAO,EAAEL,IADX;AAEE,IAAA,KAAK,EAAEI,SAFT;AAGE,IAAA,QAAQ,EAAGkB,QAAD,IAAc;AACtBrB,MAAAA,OAAO,CAACqB,QAAD,CAAP;AACD;AALH,IADF,CA7CJ,CADF,CADF;AA4DD,CAnFM","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 React, { FC, useContext, useState, useEffect } from 'react'\nimport {\n Box,\n Card,\n DataTable,\n DataTableItem,\n Icon,\n Link,\n Space,\n Pagination,\n} from '@looker/components'\nimport { findExampleLanguages, IMethod } from '@looker/sdk-codegen'\nimport { CollapserCard } from '@looker/run-it'\nimport { InsertDriveFile } from '@styled-icons/material-outlined/InsertDriveFile'\nimport { useSelector } from 'react-redux'\n\nimport { getSelectedSdkLanguage } from '../../state'\nimport { LodeContext } from '../../context'\nimport {\n exampleColumns,\n EMPTY_STRING,\n prepareExampleDataTable,\n PER_PAGE_COUNT,\n sortLanguagesByPreference,\n} from './utils'\nimport { DocSdkExampleCell } from './DocSdkExampleCell'\n\ninterface DocSdkUsageProps {\n method: IMethod\n}\n\n/**\n * Given an SDK method, searches the examples index for its usages in various languages and renders\n * links to the source files\n */\nexport const DocSdkUsage: FC<DocSdkUsageProps> = ({ method }) => {\n const { examples } = useContext(LodeContext)\n const sdkLanguage = useSelector(getSelectedSdkLanguage)\n let languages = findExampleLanguages(examples, method.name)\n const [page, setPage] = useState(1)\n\n useEffect(() => {\n setPage(1)\n }, [method])\n\n if (languages.length === 0) return <></>\n\n languages = sortLanguagesByPreference(languages, sdkLanguage)\n\n const { pageExamples, pageLimit, paginate } = prepareExampleDataTable(\n languages,\n examples,\n method.operationId,\n page\n )\n\n if (pageExamples.length === 0) return <></>\n\n return (\n <CollapserCard id=\"examples\" heading=\"SDK Examples\">\n <Card height=\"auto\" px=\"small\" py=\"xsmall\" mt=\"small\">\n <DataTable caption=\"SDK Examples\" columns={exampleColumns}>\n {pageExamples.map((exampleRow, i) => {\n const isEmptyItem = exampleRow.filename === EMPTY_STRING\n const isLastItem =\n (i + 1) % PER_PAGE_COUNT === 0 || i + 1 === pageExamples.length\n const nextItemEmpty = pageExamples[i + 1]?.filename === EMPTY_STRING\n const hidden = isEmptyItem || isLastItem || nextItemEmpty\n return (\n <DataTableItem\n id={exampleRow.permalink}\n key={exampleRow.permalink}\n >\n <DocSdkExampleCell hideBorderBottom={hidden}>\n <Space gap=\"xsmall\">\n {!isEmptyItem && (\n <Icon\n icon={<InsertDriveFile />}\n color=\"text1\"\n size=\"small\"\n />\n )}\n <Link\n href={exampleRow.permalink}\n target={'_blank'}\n role=\"link\"\n >\n {exampleRow.filename}\n </Link>\n </Space>\n </DocSdkExampleCell>\n <DocSdkExampleCell hideBorderBottom={hidden}>\n {exampleRow.language}\n </DocSdkExampleCell>\n <DocSdkExampleCell hideBorderBottom={hidden}>\n {exampleRow.description}\n </DocSdkExampleCell>\n <DocSdkExampleCell hideBorderBottom={hidden}>\n {exampleRow.line}\n </DocSdkExampleCell>\n </DataTableItem>\n )\n })}\n </DataTable>\n {paginate && (\n <Box alignSelf=\"center\">\n <Pagination\n current={page}\n pages={pageLimit}\n onChange={(nextPage) => {\n setPage(nextPage)\n }}\n />\n </Box>\n )}\n </Card>\n </CollapserCard>\n )\n}\n"],"file":"DocSdkUsage.js"}
1
+ {"version":3,"sources":["../../../src/components/DocSdkUsage/DocSdkUsage.tsx"],"names":["DocSdkUsage","method","examples","selectExamplesLode","sdkLanguage","selectSdkLanguage","page","setPage","languages","name","length","pageExamples","pageLimit","paginate","operationId","exampleColumns","map","exampleRow","i","isEmptyItem","filename","EMPTY_STRING","isLastItem","PER_PAGE_COUNT","nextItemEmpty","hidden","permalink","language","description","line","nextPage"],"mappings":";;;;;;;AA0BA;;AACA;;AAWA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AAOA;;;;;;AAUO,IAAMA,WAAiC,GAAG,QAAgB;AAAA,MAAf;AAAEC,IAAAA;AAAF,GAAe;AAC/D,MAAMC,QAAQ,GAAG,6BAAYC,yBAAZ,CAAjB;AACA,MAAMC,WAAW,GAAG,6BAAYC,wBAAZ,CAApB;AACA,MAAM,CAACC,IAAD,EAAOC,OAAP,IAAkB,qBAAS,CAAT,CAAxB;AAEA,wBAAU,MAAM;AACdA,IAAAA,OAAO,CAAC,CAAD,CAAP;AACD,GAFD,EAEG,CAACN,MAAD,CAFH;AAIA,MAAI,CAACC,QAAL,EAAe,OAAO,2DAAP;AACf,MAAIM,SAAS,GAAG,sCAAqBN,QAArB,EAA+BD,MAAM,CAACQ,IAAtC,CAAhB;AACA,MAAID,SAAS,CAACE,MAAV,KAAqB,CAAzB,EAA4B,OAAO,2DAAP;AAE5BF,EAAAA,SAAS,GAAG,sCAA0BA,SAA1B,EAAqCJ,WAArC,CAAZ;AAEA,MAAM;AAAEO,IAAAA,YAAF;AAAgBC,IAAAA,SAAhB;AAA2BC,IAAAA;AAA3B,MAAwC,oCAC5CL,SAD4C,EAE5CN,QAF4C,EAG5CD,MAAM,CAACa,WAHqC,EAI5CR,IAJ4C,CAA9C;AAOA,MAAIK,YAAY,CAACD,MAAb,KAAwB,CAA5B,EAA+B,OAAO,2DAAP;AAE/B,SACE,6BAAC,oBAAD;AAAe,IAAA,EAAE,EAAC,UAAlB;AAA6B,IAAA,OAAO,EAAC;AAArC,KACE,6BAAC,gBAAD;AAAM,IAAA,MAAM,EAAC,MAAb;AAAoB,IAAA,EAAE,EAAC,OAAvB;AAA+B,IAAA,EAAE,EAAC,QAAlC;AAA2C,IAAA,EAAE,EAAC;AAA9C,KACE,6BAAC,qBAAD;AAAW,IAAA,OAAO,EAAC,cAAnB;AAAkC,IAAA,OAAO,EAAEK;AAA3C,KACGJ,YAAY,CAACK,GAAb,CAAiB,CAACC,UAAD,EAAaC,CAAb,KAAmB;AAAA;;AACnC,QAAMC,WAAW,GAAGF,UAAU,CAACG,QAAX,KAAwBC,mBAA5C;AACA,QAAMC,UAAU,GACd,CAACJ,CAAC,GAAG,CAAL,IAAUK,qBAAV,KAA6B,CAA7B,IAAkCL,CAAC,GAAG,CAAJ,KAAUP,YAAY,CAACD,MAD3D;AAEA,QAAMc,aAAa,GAAG,kBAAAb,YAAY,CAACO,CAAC,GAAG,CAAL,CAAZ,gEAAqBE,QAArB,MAAkCC,mBAAxD;AACA,QAAMI,MAAM,GAAGN,WAAW,IAAIG,UAAf,IAA6BE,aAA5C;AACA,WACE,6BAAC,yBAAD;AACE,MAAA,EAAE,EAAEP,UAAU,CAACS,SADjB;AAEE,MAAA,GAAG,EAAET,UAAU,CAACS;AAFlB,OAIE,6BAAC,oCAAD;AAAmB,MAAA,gBAAgB,EAAED;AAArC,OACE,6BAAC,iBAAD;AAAO,MAAA,GAAG,EAAC;AAAX,OACG,CAACN,WAAD,IACC,6BAAC,gBAAD;AACE,MAAA,IAAI,EAAE,6BAAC,gCAAD,OADR;AAEE,MAAA,KAAK,EAAC,OAFR;AAGE,MAAA,IAAI,EAAC;AAHP,MAFJ,EAQE,6BAAC,gBAAD;AACE,MAAA,IAAI,EAAEF,UAAU,CAACS,SADnB;AAEE,MAAA,MAAM,EAAE,QAFV;AAGE,MAAA,IAAI,EAAC;AAHP,OAKGT,UAAU,CAACG,QALd,CARF,CADF,CAJF,EAsBE,6BAAC,oCAAD;AAAmB,MAAA,gBAAgB,EAAEK;AAArC,OACGR,UAAU,CAACU,QADd,CAtBF,EAyBE,6BAAC,oCAAD;AAAmB,MAAA,gBAAgB,EAAEF;AAArC,OACGR,UAAU,CAACW,WADd,CAzBF,EA4BE,6BAAC,oCAAD;AAAmB,MAAA,gBAAgB,EAAEH;AAArC,OACGR,UAAU,CAACY,IADd,CA5BF,CADF;AAkCD,GAxCA,CADH,CADF,EA4CGhB,QAAQ,IACP,6BAAC,eAAD;AAAK,IAAA,SAAS,EAAC;AAAf,KACE,6BAAC,sBAAD;AACE,IAAA,OAAO,EAAEP,IADX;AAEE,IAAA,KAAK,EAAEM,SAFT;AAGE,IAAA,QAAQ,EAAGkB,QAAD,IAAc;AACtBvB,MAAAA,OAAO,CAACuB,QAAD,CAAP;AACD;AALH,IADF,CA7CJ,CADF,CADF;AA4DD,CApFM","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, { useState, useEffect } from 'react'\nimport {\n Box,\n Card,\n DataTable,\n DataTableItem,\n Icon,\n Link,\n Space,\n Pagination,\n} from '@looker/components'\nimport type { IMethod } from '@looker/sdk-codegen'\nimport { findExampleLanguages } from '@looker/sdk-codegen'\nimport { CollapserCard } from '@looker/run-it'\nimport { InsertDriveFile } from '@styled-icons/material-outlined/InsertDriveFile'\nimport { useSelector } from 'react-redux'\n\nimport { selectSdkLanguage, selectExamplesLode } from '../../state'\nimport {\n exampleColumns,\n EMPTY_STRING,\n prepareExampleDataTable,\n PER_PAGE_COUNT,\n sortLanguagesByPreference,\n} from './utils'\nimport { DocSdkExampleCell } from './DocSdkExampleCell'\n\ninterface DocSdkUsageProps {\n method: IMethod\n}\n\n/**\n * Given an SDK method, searches the examples index for its usages in various languages and renders\n * links to the source files\n */\nexport const DocSdkUsage: FC<DocSdkUsageProps> = ({ method }) => {\n const examples = useSelector(selectExamplesLode)\n const sdkLanguage = useSelector(selectSdkLanguage)\n const [page, setPage] = useState(1)\n\n useEffect(() => {\n setPage(1)\n }, [method])\n\n if (!examples) return <></>\n let languages = findExampleLanguages(examples, method.name)\n if (languages.length === 0) return <></>\n\n languages = sortLanguagesByPreference(languages, sdkLanguage)\n\n const { pageExamples, pageLimit, paginate } = prepareExampleDataTable(\n languages,\n examples,\n method.operationId,\n page\n )\n\n if (pageExamples.length === 0) return <></>\n\n return (\n <CollapserCard id=\"examples\" heading=\"SDK Examples\">\n <Card height=\"auto\" px=\"small\" py=\"xsmall\" mt=\"small\">\n <DataTable caption=\"SDK Examples\" columns={exampleColumns}>\n {pageExamples.map((exampleRow, i) => {\n const isEmptyItem = exampleRow.filename === EMPTY_STRING\n const isLastItem =\n (i + 1) % PER_PAGE_COUNT === 0 || i + 1 === pageExamples.length\n const nextItemEmpty = pageExamples[i + 1]?.filename === EMPTY_STRING\n const hidden = isEmptyItem || isLastItem || nextItemEmpty\n return (\n <DataTableItem\n id={exampleRow.permalink}\n key={exampleRow.permalink}\n >\n <DocSdkExampleCell hideBorderBottom={hidden}>\n <Space gap=\"xsmall\">\n {!isEmptyItem && (\n <Icon\n icon={<InsertDriveFile />}\n color=\"text1\"\n size=\"small\"\n />\n )}\n <Link\n href={exampleRow.permalink}\n target={'_blank'}\n role=\"link\"\n >\n {exampleRow.filename}\n </Link>\n </Space>\n </DocSdkExampleCell>\n <DocSdkExampleCell hideBorderBottom={hidden}>\n {exampleRow.language}\n </DocSdkExampleCell>\n <DocSdkExampleCell hideBorderBottom={hidden}>\n {exampleRow.description}\n </DocSdkExampleCell>\n <DocSdkExampleCell hideBorderBottom={hidden}>\n {exampleRow.line}\n </DocSdkExampleCell>\n </DataTableItem>\n )\n })}\n </DataTable>\n {paginate && (\n <Box alignSelf=\"center\">\n <Pagination\n current={page}\n pages={pageLimit}\n onChange={(nextPage) => {\n setPage(nextPage)\n }}\n />\n </Box>\n )}\n </Card>\n </CollapserCard>\n )\n}\n"],"file":"DocSdkUsage.js"}
@@ -1,5 +1,5 @@
1
- import { IExampleMine } from '@looker/sdk-codegen';
2
- import { DataTableColumns } from '@looker/components';
1
+ import type { IExampleMine } from '@looker/sdk-codegen';
2
+ import type { DataTableColumns } from '@looker/components';
3
3
  export declare const PER_PAGE_COUNT = 10;
4
4
  export declare const EMPTY_STRING = "";
5
5
  export declare const exampleColumns: DataTableColumns;