@looker/api-explorer 0.9.18 → 0.9.24

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 (726) hide show
  1. package/CHANGELOG.md +141 -0
  2. package/e2e/e2e.spec.ts +242 -0
  3. package/{src/reducers/search/reducer.ts → e2e/helpers.ts} +21 -36
  4. package/{src/reducers/search/actions.ts → jest-puppeteer.config.js} +17 -15
  5. package/jest.config.js +2 -0
  6. package/lib/ApiExplorer.d.ts +8 -11
  7. package/lib/ApiExplorer.js +93 -71
  8. package/lib/ApiExplorer.js.map +1 -1
  9. package/lib/App.d.ts +1 -0
  10. package/lib/App.js +29 -0
  11. package/lib/App.js.map +1 -0
  12. package/lib/StandaloneApiExplorer.d.ts +1 -1
  13. package/lib/StandaloneApiExplorer.js +46 -25
  14. package/lib/StandaloneApiExplorer.js.map +1 -1
  15. package/lib/components/DocActivityType/DocActivityType.d.ts +2 -2
  16. package/lib/components/DocActivityType/DocActivityType.js.map +1 -1
  17. package/lib/components/DocCode/DocCode.d.ts +1 -1
  18. package/lib/components/DocCode/DocCode.js +6 -10
  19. package/lib/components/DocCode/DocCode.js.map +1 -1
  20. package/lib/components/DocMarkdown/DocMarkdown.d.ts +1 -1
  21. package/lib/components/DocMarkdown/DocMarkdown.js +13 -15
  22. package/lib/components/DocMarkdown/DocMarkdown.js.map +1 -1
  23. package/lib/components/DocMethodSummary/DocMethodSummary.d.ts +2 -2
  24. package/lib/components/DocMethodSummary/DocMethodSummary.js +3 -6
  25. package/lib/components/DocMethodSummary/DocMethodSummary.js.map +1 -1
  26. package/lib/components/DocMethodSummary/DocSummaryStatus.d.ts +2 -3
  27. package/lib/components/DocMethodSummary/DocSummaryStatus.js +3 -3
  28. package/lib/components/DocMethodSummary/DocSummaryStatus.js.map +1 -1
  29. package/lib/components/DocMethodSummary/index.d.ts +1 -0
  30. package/lib/components/DocMethodSummary/index.js +8 -0
  31. package/lib/components/DocMethodSummary/index.js.map +1 -1
  32. package/lib/components/DocMethodSummary/utils.d.ts +2 -1
  33. package/lib/components/DocMethodSummary/utils.js +24 -15
  34. package/lib/components/DocMethodSummary/utils.js.map +1 -1
  35. package/lib/components/DocPseudo/DocParam.d.ts +2 -2
  36. package/lib/components/DocPseudo/DocParam.js.map +1 -1
  37. package/lib/components/DocPseudo/DocParams.d.ts +2 -2
  38. package/lib/components/DocPseudo/DocParams.js.map +1 -1
  39. package/lib/components/DocPseudo/DocPrimaryResponse.d.ts +2 -2
  40. package/lib/components/DocPseudo/DocPrimaryResponse.js.map +1 -1
  41. package/lib/components/DocPseudo/DocPseudo.d.ts +2 -2
  42. package/lib/components/DocPseudo/DocPseudo.js.map +1 -1
  43. package/lib/components/DocRateLimited/DocRateLimited.d.ts +2 -2
  44. package/lib/components/DocRateLimited/DocRateLimited.js.map +1 -1
  45. package/lib/components/DocReferences/DocReferences.d.ts +2 -2
  46. package/lib/components/DocReferences/DocReferences.js +9 -13
  47. package/lib/components/DocReferences/DocReferences.js.map +1 -1
  48. package/lib/components/DocReferences/utils.d.ts +2 -2
  49. package/lib/components/DocReferences/utils.js +5 -31
  50. package/lib/components/DocReferences/utils.js.map +1 -1
  51. package/lib/components/DocResponses/DocResponseTypes.d.ts +3 -2
  52. package/lib/components/DocResponses/DocResponseTypes.js +3 -1
  53. package/lib/components/DocResponses/DocResponseTypes.js.map +1 -1
  54. package/lib/components/DocResponses/DocResponses.d.ts +3 -2
  55. package/lib/components/DocResponses/DocResponses.js +4 -2
  56. package/lib/components/DocResponses/DocResponses.js.map +1 -1
  57. package/lib/components/DocResponses/utils.d.ts +1 -1
  58. package/lib/components/DocResponses/utils.js.map +1 -1
  59. package/lib/components/DocSDKs/DocDeclarations.d.ts +2 -2
  60. package/lib/components/DocSDKs/DocDeclarations.js.map +1 -1
  61. package/lib/components/DocSDKs/DocSDKs.d.ts +2 -2
  62. package/lib/components/DocSDKs/DocSDKs.js +2 -4
  63. package/lib/components/DocSDKs/DocSDKs.js.map +1 -1
  64. package/lib/components/DocSDKs/utils.d.ts +1 -1
  65. package/lib/components/DocSDKs/utils.js.map +1 -1
  66. package/lib/components/DocSchema/DocSchema.d.ts +1 -1
  67. package/lib/components/DocSchema/DocSchema.js +2 -2
  68. package/lib/components/DocSchema/DocSchema.js.map +1 -1
  69. package/lib/components/DocSdkUsage/DocSdkExampleCell.d.ts +1 -1
  70. package/lib/components/DocSdkUsage/DocSdkExampleCell.js.map +1 -1
  71. package/lib/components/DocSdkUsage/DocSdkUsage.d.ts +2 -2
  72. package/lib/components/DocSdkUsage/DocSdkUsage.js +7 -10
  73. package/lib/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
  74. package/lib/components/DocSdkUsage/utils.d.ts +2 -2
  75. package/lib/components/DocSdkUsage/utils.js.map +1 -1
  76. package/lib/components/DocSource/DocSource.d.ts +2 -2
  77. package/lib/components/DocSource/DocSource.js +5 -7
  78. package/lib/components/DocSource/DocSource.js.map +1 -1
  79. package/lib/components/DocStatus/DocStatus.d.ts +2 -2
  80. package/lib/components/DocStatus/DocStatus.js.map +1 -1
  81. package/lib/components/DocTitle/DocTitle.d.ts +1 -1
  82. package/lib/components/DocTitle/DocTitle.js +2 -2
  83. package/lib/components/DocTitle/DocTitle.js.map +1 -1
  84. package/lib/components/DocTypeSummary/DocTypeSummary.d.ts +7 -0
  85. package/lib/components/DocTypeSummary/DocTypeSummary.js +52 -0
  86. package/lib/components/DocTypeSummary/DocTypeSummary.js.map +1 -0
  87. package/lib/components/DocTypeSummary/index.d.ts +1 -0
  88. package/lib/components/DocTypeSummary/index.js +14 -0
  89. package/lib/components/DocTypeSummary/index.js.map +1 -0
  90. package/lib/components/ErrorBoundary/ErrorBoundary.js +1 -1
  91. package/lib/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
  92. package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.d.ts +1 -1
  93. package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js +152 -8
  94. package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
  95. package/lib/components/ExploreType/ExploreProperty.d.ts +10 -7
  96. package/lib/components/ExploreType/ExploreProperty.js +14 -3
  97. package/lib/components/ExploreType/ExploreProperty.js.map +1 -1
  98. package/lib/components/ExploreType/ExploreType.d.ts +4 -2
  99. package/lib/components/ExploreType/ExploreType.js +9 -5
  100. package/lib/components/ExploreType/ExploreType.js.map +1 -1
  101. package/lib/components/ExploreType/exploreUtils.d.ts +2 -2
  102. package/lib/components/ExploreType/exploreUtils.js.map +1 -1
  103. package/lib/components/Header/Header.d.ts +5 -4
  104. package/lib/components/Header/Header.js +5 -2
  105. package/lib/components/Header/Header.js.map +1 -1
  106. package/lib/components/Header/index.d.ts +1 -1
  107. package/lib/components/Header/index.js +6 -0
  108. package/lib/components/Header/index.js.map +1 -1
  109. package/lib/components/SelectorContainer/ApiSpecSelector.d.ts +3 -3
  110. package/lib/components/SelectorContainer/ApiSpecSelector.js +3 -1
  111. package/lib/components/SelectorContainer/ApiSpecSelector.js.map +1 -1
  112. package/lib/components/SelectorContainer/SdkLanguageSelector.d.ts +1 -1
  113. package/lib/components/SelectorContainer/SdkLanguageSelector.js +7 -17
  114. package/lib/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
  115. package/lib/components/SelectorContainer/SelectorContainer.d.ts +5 -4
  116. package/lib/components/SelectorContainer/SelectorContainer.js +11 -3
  117. package/lib/components/SelectorContainer/SelectorContainer.js.map +1 -1
  118. package/lib/components/SideNav/SearchMessage.d.ts +2 -2
  119. package/lib/components/SideNav/SearchMessage.js.map +1 -1
  120. package/lib/components/SideNav/SideNav.d.ts +3 -3
  121. package/lib/components/SideNav/SideNav.js +93 -56
  122. package/lib/components/SideNav/SideNav.js.map +1 -1
  123. package/lib/components/SideNav/SideNavMethodTags.d.ts +10 -0
  124. package/lib/components/SideNav/SideNavMethodTags.js +42 -0
  125. package/lib/components/SideNav/SideNavMethodTags.js.map +1 -0
  126. package/lib/components/SideNav/SideNavMethods.d.ts +5 -5
  127. package/lib/components/SideNav/SideNavMethods.js +37 -93
  128. package/lib/components/SideNav/SideNavMethods.js.map +1 -1
  129. package/lib/components/SideNav/SideNavTypeTags.d.ts +10 -0
  130. package/lib/components/SideNav/SideNavTypeTags.js +42 -0
  131. package/lib/components/SideNav/SideNavTypeTags.js.map +1 -0
  132. package/lib/components/SideNav/SideNavTypes.d.ts +8 -5
  133. package/lib/components/SideNav/SideNavTypes.js +83 -32
  134. package/lib/components/SideNav/SideNavTypes.js.map +1 -1
  135. package/lib/components/SideNav/searchUtils.d.ts +2 -2
  136. package/lib/components/SideNav/searchUtils.js +1 -1
  137. package/lib/components/SideNav/searchUtils.js.map +1 -1
  138. package/lib/components/common/Loader.d.ts +2 -2
  139. package/lib/components/common/Loader.js.map +1 -1
  140. package/lib/components/common/common.d.ts +2 -3
  141. package/lib/components/common/common.js +3 -15
  142. package/lib/components/common/common.js.map +1 -1
  143. package/lib/components/common/index.d.ts +2 -2
  144. package/lib/components/common/index.js +22 -18
  145. package/lib/components/common/index.js.map +1 -1
  146. package/lib/components/index.d.ts +5 -4
  147. package/lib/components/index.js +26 -12
  148. package/lib/components/index.js.map +1 -1
  149. package/lib/esm/ApiExplorer.js +97 -77
  150. package/lib/esm/ApiExplorer.js.map +1 -1
  151. package/lib/esm/App.js +19 -0
  152. package/lib/esm/App.js.map +1 -0
  153. package/lib/esm/StandaloneApiExplorer.js +46 -22
  154. package/lib/esm/StandaloneApiExplorer.js.map +1 -1
  155. package/lib/esm/components/DocActivityType/DocActivityType.js.map +1 -1
  156. package/lib/esm/components/DocCode/DocCode.js +5 -8
  157. package/lib/esm/components/DocCode/DocCode.js.map +1 -1
  158. package/lib/esm/components/DocMarkdown/DocMarkdown.js +10 -12
  159. package/lib/esm/components/DocMarkdown/DocMarkdown.js.map +1 -1
  160. package/lib/esm/components/DocMethodSummary/DocMethodSummary.js +4 -6
  161. package/lib/esm/components/DocMethodSummary/DocMethodSummary.js.map +1 -1
  162. package/lib/esm/components/DocMethodSummary/DocSummaryStatus.js +3 -3
  163. package/lib/esm/components/DocMethodSummary/DocSummaryStatus.js.map +1 -1
  164. package/lib/esm/components/DocMethodSummary/index.js +1 -0
  165. package/lib/esm/components/DocMethodSummary/index.js.map +1 -1
  166. package/lib/esm/components/DocMethodSummary/utils.js +24 -15
  167. package/lib/esm/components/DocMethodSummary/utils.js.map +1 -1
  168. package/lib/esm/components/DocPseudo/DocParam.js.map +1 -1
  169. package/lib/esm/components/DocPseudo/DocParams.js.map +1 -1
  170. package/lib/esm/components/DocPseudo/DocPrimaryResponse.js.map +1 -1
  171. package/lib/esm/components/DocPseudo/DocPseudo.js.map +1 -1
  172. package/lib/esm/components/DocRateLimited/DocRateLimited.js.map +1 -1
  173. package/lib/esm/components/DocReferences/DocReferences.js +6 -9
  174. package/lib/esm/components/DocReferences/DocReferences.js.map +1 -1
  175. package/lib/esm/components/DocReferences/utils.js +3 -26
  176. package/lib/esm/components/DocReferences/utils.js.map +1 -1
  177. package/lib/esm/components/DocResponses/DocResponseTypes.js +3 -1
  178. package/lib/esm/components/DocResponses/DocResponseTypes.js.map +1 -1
  179. package/lib/esm/components/DocResponses/DocResponses.js +3 -1
  180. package/lib/esm/components/DocResponses/DocResponses.js.map +1 -1
  181. package/lib/esm/components/DocResponses/utils.js.map +1 -1
  182. package/lib/esm/components/DocSDKs/DocDeclarations.js.map +1 -1
  183. package/lib/esm/components/DocSDKs/DocSDKs.js +3 -4
  184. package/lib/esm/components/DocSDKs/DocSDKs.js.map +1 -1
  185. package/lib/esm/components/DocSDKs/utils.js.map +1 -1
  186. package/lib/esm/components/DocSchema/DocSchema.js +1 -1
  187. package/lib/esm/components/DocSchema/DocSchema.js.map +1 -1
  188. package/lib/esm/components/DocSdkUsage/DocSdkExampleCell.js.map +1 -1
  189. package/lib/esm/components/DocSdkUsage/DocSdkUsage.js +7 -9
  190. package/lib/esm/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
  191. package/lib/esm/components/DocSdkUsage/utils.js.map +1 -1
  192. package/lib/esm/components/DocSource/DocSource.js +4 -5
  193. package/lib/esm/components/DocSource/DocSource.js.map +1 -1
  194. package/lib/esm/components/DocStatus/DocStatus.js.map +1 -1
  195. package/lib/esm/components/DocTitle/DocTitle.js +2 -2
  196. package/lib/esm/components/DocTitle/DocTitle.js.map +1 -1
  197. package/lib/esm/components/DocTypeSummary/DocTypeSummary.js +38 -0
  198. package/lib/esm/components/DocTypeSummary/DocTypeSummary.js.map +1 -0
  199. package/lib/esm/components/DocTypeSummary/index.js +2 -0
  200. package/lib/{state/action_creators.js.map → esm/components/DocTypeSummary/index.js.map} +1 -1
  201. package/lib/esm/components/ErrorBoundary/ErrorBoundary.js +1 -1
  202. package/lib/esm/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
  203. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js +153 -6
  204. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
  205. package/lib/esm/components/ExploreType/ExploreProperty.js +14 -3
  206. package/lib/esm/components/ExploreType/ExploreProperty.js.map +1 -1
  207. package/lib/esm/components/ExploreType/ExploreType.js +8 -4
  208. package/lib/esm/components/ExploreType/ExploreType.js.map +1 -1
  209. package/lib/esm/components/ExploreType/exploreUtils.js.map +1 -1
  210. package/lib/esm/components/Header/Header.js +3 -1
  211. package/lib/esm/components/Header/Header.js.map +1 -1
  212. package/lib/esm/components/Header/index.js +1 -1
  213. package/lib/esm/components/Header/index.js.map +1 -1
  214. package/lib/esm/components/SelectorContainer/ApiSpecSelector.js +4 -2
  215. package/lib/esm/components/SelectorContainer/ApiSpecSelector.js.map +1 -1
  216. package/lib/esm/components/SelectorContainer/SdkLanguageSelector.js +7 -12
  217. package/lib/esm/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
  218. package/lib/esm/components/SelectorContainer/SelectorContainer.js +11 -3
  219. package/lib/esm/components/SelectorContainer/SelectorContainer.js.map +1 -1
  220. package/lib/esm/components/SideNav/SearchMessage.js.map +1 -1
  221. package/lib/esm/components/SideNav/SideNav.js +95 -57
  222. package/lib/esm/components/SideNav/SideNav.js.map +1 -1
  223. package/lib/esm/components/SideNav/SideNavMethodTags.js +29 -0
  224. package/lib/esm/components/SideNav/SideNavMethodTags.js.map +1 -0
  225. package/lib/esm/components/SideNav/SideNavMethods.js +38 -96
  226. package/lib/esm/components/SideNav/SideNavMethods.js.map +1 -1
  227. package/lib/esm/components/SideNav/SideNavTypeTags.js +29 -0
  228. package/lib/esm/components/SideNav/SideNavTypeTags.js.map +1 -0
  229. package/lib/esm/components/SideNav/SideNavTypes.js +84 -33
  230. package/lib/esm/components/SideNav/SideNavTypes.js.map +1 -1
  231. package/lib/esm/components/SideNav/searchUtils.js +1 -1
  232. package/lib/esm/components/SideNav/searchUtils.js.map +1 -1
  233. package/lib/esm/components/common/Loader.js.map +1 -1
  234. package/lib/esm/components/common/common.js +3 -11
  235. package/lib/esm/components/common/common.js.map +1 -1
  236. package/lib/esm/components/common/index.js +2 -2
  237. package/lib/esm/components/common/index.js.map +1 -1
  238. package/lib/esm/components/index.js +5 -4
  239. package/lib/esm/components/index.js.map +1 -1
  240. package/lib/esm/index.js +4 -18
  241. package/lib/esm/index.js.map +1 -1
  242. package/lib/esm/reducers/index.js +0 -1
  243. package/lib/esm/reducers/index.js.map +1 -1
  244. package/lib/esm/reducers/spec/actions.js.map +1 -1
  245. package/lib/esm/reducers/spec/reducer.js.map +1 -1
  246. package/lib/esm/reducers/spec/utils.js +17 -1
  247. package/lib/esm/reducers/spec/utils.js.map +1 -1
  248. package/lib/esm/routes/AppRouter.js +16 -14
  249. package/lib/esm/routes/AppRouter.js.map +1 -1
  250. package/lib/esm/scenes/DiffScene/DiffScene.js +65 -11
  251. package/lib/esm/scenes/DiffScene/DiffScene.js.map +1 -1
  252. package/lib/esm/scenes/DiffScene/DocDiff/DiffBanner.js.map +1 -1
  253. package/lib/esm/scenes/DiffScene/DocDiff/DiffItem.js +15 -22
  254. package/lib/esm/scenes/DiffScene/DocDiff/DiffItem.js.map +1 -1
  255. package/lib/esm/scenes/DiffScene/DocDiff/DiffLegend.js.map +1 -1
  256. package/lib/esm/scenes/DiffScene/DocDiff/DocDiff.js.map +1 -1
  257. package/lib/esm/scenes/DiffScene/DocDiff/docDiffUtils.js.map +1 -1
  258. package/lib/esm/scenes/DiffScene/diffUtils.js.map +1 -1
  259. package/lib/esm/scenes/HomeScene/HomeScene.js.map +1 -1
  260. package/lib/esm/scenes/MethodScene/MethodScene.js +80 -29
  261. package/lib/esm/scenes/MethodScene/MethodScene.js.map +1 -1
  262. package/lib/esm/scenes/MethodScene/components/DocOperation.js.map +1 -1
  263. package/lib/esm/scenes/MethodScene/components/DocRequestBody.js +5 -2
  264. package/lib/esm/scenes/MethodScene/components/DocRequestBody.js.map +1 -1
  265. package/lib/esm/scenes/{TagScene/TagScene.js → MethodTagScene/MethodTagScene.js} +16 -11
  266. package/lib/esm/scenes/MethodTagScene/MethodTagScene.js.map +1 -0
  267. package/lib/esm/scenes/MethodTagScene/index.js +2 -0
  268. package/lib/{state/reducers.js.map → esm/scenes/MethodTagScene/index.js.map} +1 -1
  269. package/lib/esm/scenes/{TagScene → MethodTagScene}/utils.js +0 -0
  270. package/lib/esm/scenes/MethodTagScene/utils.js.map +1 -0
  271. package/lib/esm/scenes/TypeScene/TypeScene.js +14 -7
  272. package/lib/esm/scenes/TypeScene/TypeScene.js.map +1 -1
  273. package/lib/esm/scenes/TypeTagScene/TypeTagScene.js +57 -0
  274. package/lib/esm/scenes/TypeTagScene/TypeTagScene.js.map +1 -0
  275. package/lib/esm/scenes/TypeTagScene/index.js +2 -0
  276. package/lib/esm/scenes/TypeTagScene/index.js.map +1 -0
  277. package/lib/esm/scenes/TypeTagScene/utils.js +8 -0
  278. package/lib/esm/scenes/TypeTagScene/utils.js.map +1 -0
  279. package/lib/esm/scenes/index.js +2 -1
  280. package/lib/esm/scenes/index.js.map +1 -1
  281. package/lib/esm/state/index.js +2 -3
  282. package/lib/esm/state/index.js.map +1 -1
  283. package/lib/esm/state/lodes/index.js +3 -0
  284. package/lib/esm/state/lodes/index.js.map +1 -0
  285. package/lib/esm/state/lodes/sagas.js +25 -0
  286. package/lib/esm/state/lodes/sagas.js.map +1 -0
  287. package/lib/esm/state/lodes/selectors.js +5 -0
  288. package/lib/esm/state/lodes/selectors.js.map +1 -0
  289. package/lib/esm/state/lodes/slice.js +30 -0
  290. package/lib/esm/state/lodes/slice.js.map +1 -0
  291. package/lib/esm/state/settings/index.js +1 -1
  292. package/lib/esm/state/settings/index.js.map +1 -1
  293. package/lib/esm/state/settings/sagas.js +59 -0
  294. package/lib/esm/state/settings/sagas.js.map +1 -0
  295. package/lib/esm/state/settings/selectors.js +6 -1
  296. package/lib/esm/state/settings/selectors.js.map +1 -1
  297. package/lib/esm/state/settings/slice.js +50 -0
  298. package/lib/esm/state/settings/slice.js.map +1 -0
  299. package/lib/esm/state/store.js +13 -3
  300. package/lib/esm/state/store.js.map +1 -1
  301. package/lib/esm/test-utils/index.js +3 -4
  302. package/lib/esm/test-utils/index.js.map +1 -1
  303. package/lib/esm/test-utils/lodes.js +12 -0
  304. package/lib/esm/test-utils/lodes.js.map +1 -0
  305. package/lib/esm/test-utils/redux.js +30 -15
  306. package/lib/esm/test-utils/redux.js.map +1 -1
  307. package/lib/esm/test-utils/router.js.map +1 -1
  308. package/lib/esm/utils/index.js +1 -2
  309. package/lib/esm/utils/index.js.map +1 -1
  310. package/lib/esm/utils/lodeUtils.js +3 -7
  311. package/lib/esm/utils/lodeUtils.js.map +1 -1
  312. package/lib/esm/utils/path.js +32 -1
  313. package/lib/esm/utils/path.js.map +1 -1
  314. package/lib/index.d.ts +4 -1
  315. package/lib/index.js +52 -23
  316. package/lib/index.js.map +1 -1
  317. package/lib/reducers/index.d.ts +0 -1
  318. package/lib/reducers/index.js +0 -13
  319. package/lib/reducers/index.js.map +1 -1
  320. package/lib/reducers/spec/actions.d.ts +1 -1
  321. package/lib/reducers/spec/actions.js.map +1 -1
  322. package/lib/reducers/spec/reducer.d.ts +2 -2
  323. package/lib/reducers/spec/reducer.js.map +1 -1
  324. package/lib/reducers/spec/utils.d.ts +3 -3
  325. package/lib/reducers/spec/utils.js +18 -1
  326. package/lib/reducers/spec/utils.js.map +1 -1
  327. package/lib/routes/AppRouter.d.ts +6 -2
  328. package/lib/routes/AppRouter.js +15 -16
  329. package/lib/routes/AppRouter.js.map +1 -1
  330. package/lib/scenes/DiffScene/DiffScene.d.ts +2 -2
  331. package/lib/scenes/DiffScene/DiffScene.js +65 -11
  332. package/lib/scenes/DiffScene/DiffScene.js.map +1 -1
  333. package/lib/scenes/DiffScene/DocDiff/DiffBanner.d.ts +2 -2
  334. package/lib/scenes/DiffScene/DocDiff/DiffBanner.js.map +1 -1
  335. package/lib/scenes/DiffScene/DocDiff/DiffItem.d.ts +3 -3
  336. package/lib/scenes/DiffScene/DocDiff/DiffItem.js +13 -20
  337. package/lib/scenes/DiffScene/DocDiff/DiffItem.js.map +1 -1
  338. package/lib/scenes/DiffScene/DocDiff/DiffLegend.d.ts +2 -2
  339. package/lib/scenes/DiffScene/DocDiff/DiffLegend.js.map +1 -1
  340. package/lib/scenes/DiffScene/DocDiff/DocDiff.d.ts +2 -2
  341. package/lib/scenes/DiffScene/DocDiff/DocDiff.js.map +1 -1
  342. package/lib/scenes/DiffScene/DocDiff/docDiffUtils.d.ts +1 -1
  343. package/lib/scenes/DiffScene/DocDiff/docDiffUtils.js.map +1 -1
  344. package/lib/scenes/DiffScene/diffUtils.d.ts +1 -1
  345. package/lib/scenes/DiffScene/diffUtils.js.map +1 -1
  346. package/lib/scenes/HomeScene/HomeScene.d.ts +2 -2
  347. package/lib/scenes/HomeScene/HomeScene.js.map +1 -1
  348. package/lib/scenes/MethodScene/MethodScene.d.ts +8 -4
  349. package/lib/scenes/MethodScene/MethodScene.js +75 -27
  350. package/lib/scenes/MethodScene/MethodScene.js.map +1 -1
  351. package/lib/scenes/MethodScene/components/DocOperation.d.ts +2 -2
  352. package/lib/scenes/MethodScene/components/DocOperation.js.map +1 -1
  353. package/lib/scenes/MethodScene/components/DocRequestBody.d.ts +3 -2
  354. package/lib/scenes/MethodScene/components/DocRequestBody.js +6 -2
  355. package/lib/scenes/MethodScene/components/DocRequestBody.js.map +1 -1
  356. package/lib/scenes/MethodTagScene/MethodTagScene.d.ts +7 -0
  357. package/lib/scenes/{TagScene/TagScene.js → MethodTagScene/MethodTagScene.js} +19 -14
  358. package/lib/scenes/MethodTagScene/MethodTagScene.js.map +1 -0
  359. package/lib/scenes/MethodTagScene/index.d.ts +1 -0
  360. package/lib/scenes/MethodTagScene/index.js +14 -0
  361. package/lib/{context/search/SearchContext.js.map → scenes/MethodTagScene/index.js.map} +1 -1
  362. package/lib/scenes/{TagScene → MethodTagScene}/utils.d.ts +1 -1
  363. package/lib/scenes/{TagScene → MethodTagScene}/utils.js +0 -0
  364. package/lib/{context/lode/index.js.map → scenes/MethodTagScene/utils.js.map} +1 -1
  365. package/lib/scenes/TypeScene/TypeScene.d.ts +2 -2
  366. package/lib/scenes/TypeScene/TypeScene.js +16 -7
  367. package/lib/scenes/TypeScene/TypeScene.js.map +1 -1
  368. package/lib/scenes/TypeTagScene/TypeTagScene.d.ts +7 -0
  369. package/lib/scenes/TypeTagScene/TypeTagScene.js +76 -0
  370. package/lib/scenes/TypeTagScene/TypeTagScene.js.map +1 -0
  371. package/lib/scenes/TypeTagScene/index.d.ts +1 -0
  372. package/lib/scenes/TypeTagScene/index.js +14 -0
  373. package/lib/{esm/state/settings/actions.js.map → scenes/TypeTagScene/index.js.map} +1 -1
  374. package/lib/scenes/TypeTagScene/utils.d.ts +2 -0
  375. package/lib/scenes/TypeTagScene/utils.js +17 -0
  376. package/lib/scenes/TypeTagScene/utils.js.map +1 -0
  377. package/lib/scenes/index.d.ts +2 -1
  378. package/lib/scenes/index.js +11 -3
  379. package/lib/scenes/index.js.map +1 -1
  380. package/lib/state/index.d.ts +2 -2
  381. package/lib/state/index.js +15 -16
  382. package/lib/state/index.js.map +1 -1
  383. package/lib/state/lodes/index.d.ts +2 -0
  384. package/lib/{reducers/search → state/lodes}/index.js +8 -8
  385. package/lib/state/lodes/index.js.map +1 -0
  386. package/lib/state/lodes/sagas.d.ts +1 -0
  387. package/lib/state/lodes/sagas.js +34 -0
  388. package/lib/state/lodes/sagas.js.map +1 -0
  389. package/lib/state/lodes/selectors.d.ts +3 -0
  390. package/lib/state/lodes/selectors.js +17 -0
  391. package/lib/state/lodes/selectors.js.map +1 -0
  392. package/lib/state/lodes/slice.d.ts +29 -0
  393. package/lib/state/lodes/slice.js +45 -0
  394. package/lib/state/lodes/slice.js.map +1 -0
  395. package/lib/state/settings/index.d.ts +1 -1
  396. package/lib/state/settings/index.js +8 -8
  397. package/lib/state/settings/index.js.map +1 -1
  398. package/lib/state/settings/sagas.d.ts +1 -0
  399. package/lib/state/settings/sagas.js +69 -0
  400. package/lib/state/settings/sagas.js.map +1 -0
  401. package/lib/state/settings/selectors.d.ts +5 -2
  402. package/lib/state/settings/selectors.js +17 -3
  403. package/lib/state/settings/selectors.js.map +1 -1
  404. package/lib/state/settings/slice.d.ts +42 -0
  405. package/lib/state/settings/slice.js +69 -0
  406. package/lib/state/settings/slice.js.map +1 -0
  407. package/lib/state/store.d.ts +10 -6
  408. package/lib/state/store.js +15 -5
  409. package/lib/state/store.js.map +1 -1
  410. package/lib/test-data/declarations.js +24 -0
  411. package/lib/test-data/declarations.js.map +1 -0
  412. package/lib/test-data/examples.js.map +1 -1
  413. package/lib/test-data/index.js +23 -0
  414. package/lib/test-data/index.js.map +1 -1
  415. package/lib/test-data/specs.js.map +1 -1
  416. package/lib/test-utils/index.d.ts +3 -4
  417. package/lib/test-utils/index.js +33 -56
  418. package/lib/test-utils/index.js.map +1 -1
  419. package/lib/test-utils/lodes.d.ts +4 -0
  420. package/lib/test-utils/lodes.js +23 -0
  421. package/lib/test-utils/lodes.js.map +1 -0
  422. package/lib/test-utils/redux.d.ts +16 -12
  423. package/lib/test-utils/redux.js +36 -17
  424. package/lib/test-utils/redux.js.map +1 -1
  425. package/lib/test-utils/router.d.ts +2 -2
  426. package/lib/test-utils/router.js.map +1 -1
  427. package/lib/utils/highlight.d.ts +1 -0
  428. package/lib/utils/index.d.ts +1 -2
  429. package/lib/utils/index.js +6 -23
  430. package/lib/utils/index.js.map +1 -1
  431. package/lib/utils/lodeUtils.d.ts +3 -3
  432. package/lib/utils/lodeUtils.js +3 -7
  433. package/lib/utils/lodeUtils.js.map +1 -1
  434. package/lib/utils/path.d.ts +3 -1
  435. package/lib/utils/path.js +36 -2
  436. package/lib/utils/path.js.map +1 -1
  437. package/package.json +29 -15
  438. package/public/Looker.3.1.json +1343 -412
  439. package/public/Looker.4.0.json +3305 -661
  440. package/public/versions.json +1 -1
  441. package/src/ApiExplorer.tsx +160 -99
  442. package/src/{index.tsx → App.tsx} +1 -1
  443. package/src/StandaloneApiExplorer.tsx +38 -29
  444. package/src/components/DocActivityType/DocActivityType.tsx +3 -2
  445. package/src/components/DocCode/DocCode.tsx +7 -6
  446. package/src/components/DocMarkdown/DocMarkdown.spec.tsx +16 -11
  447. package/src/components/DocMarkdown/DocMarkdown.tsx +11 -9
  448. package/src/components/DocMethodSummary/DocMethodSummary.spec.tsx +2 -2
  449. package/src/components/DocMethodSummary/DocMethodSummary.tsx +8 -8
  450. package/src/components/DocMethodSummary/DocSummaryStatus.spec.tsx +5 -5
  451. package/src/components/DocMethodSummary/DocSummaryStatus.tsx +5 -7
  452. package/src/components/DocMethodSummary/index.tsx +1 -0
  453. package/src/components/DocMethodSummary/utils.spec.tsx +7 -7
  454. package/src/components/DocMethodSummary/utils.tsx +17 -23
  455. package/src/components/DocPseudo/DocParam.tsx +3 -2
  456. package/src/components/DocPseudo/DocParams.tsx +3 -2
  457. package/src/components/DocPseudo/DocPrimaryResponse.tsx +3 -2
  458. package/src/components/DocPseudo/DocPseudo.tsx +3 -2
  459. package/src/components/DocRateLimited/DocRateLimited.tsx +3 -2
  460. package/src/components/DocReferences/DocReferences.spec.tsx +19 -8
  461. package/src/components/DocReferences/DocReferences.tsx +10 -10
  462. package/src/components/DocReferences/utils.spec.tsx +1 -13
  463. package/src/components/DocReferences/utils.tsx +4 -39
  464. package/src/components/DocResponses/DocResponseTypes.tsx +15 -4
  465. package/src/components/DocResponses/DocResponses.spec.tsx +1 -1
  466. package/src/components/DocResponses/DocResponses.tsx +7 -5
  467. package/src/components/DocResponses/utils.ts +1 -1
  468. package/src/components/DocSDKs/DocDeclarations.tsx +3 -2
  469. package/src/components/DocSDKs/DocSDKs.spec.tsx +12 -5
  470. package/src/components/DocSDKs/DocSDKs.tsx +7 -7
  471. package/src/components/DocSDKs/utils.ts +1 -1
  472. package/src/components/DocSchema/DocSchema.tsx +3 -2
  473. package/src/components/DocSdkUsage/DocSdkExampleCell.tsx +2 -1
  474. package/src/components/DocSdkUsage/DocSdkUsage.spec.tsx +2 -2
  475. package/src/components/DocSdkUsage/DocSdkUsage.tsx +10 -8
  476. package/src/components/DocSdkUsage/utils.ts +4 -2
  477. package/src/components/DocSource/DocSource.spec.tsx +2 -1
  478. package/src/components/DocSource/DocSource.tsx +7 -4
  479. package/src/components/DocStatus/DocStatus.spec.tsx +1 -1
  480. package/src/components/DocStatus/DocStatus.tsx +3 -2
  481. package/src/components/DocTitle/DocTitle.tsx +4 -3
  482. package/src/{state/settings/action_creators.spec.ts → components/DocTypeSummary/DocTypeSummary.spec.tsx} +15 -10
  483. package/src/components/DocTypeSummary/DocTypeSummary.tsx +64 -0
  484. package/src/{state/action_creators.ts → components/DocTypeSummary/index.tsx} +1 -1
  485. package/src/components/ErrorBoundary/ErrorBoundary.spec.tsx +11 -9
  486. package/src/components/ErrorBoundary/ErrorBoundary.tsx +1 -1
  487. package/src/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.spec.tsx +6 -5
  488. package/src/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.tsx +170 -6
  489. package/src/components/ExploreType/ExploreProperty.spec.tsx +15 -6
  490. package/src/components/ExploreType/ExploreProperty.tsx +26 -12
  491. package/src/components/ExploreType/ExploreType.spec.tsx +15 -31
  492. package/src/components/ExploreType/ExploreType.tsx +13 -6
  493. package/src/components/ExploreType/exploreUtils.tsx +3 -2
  494. package/src/components/Header/Header.spec.tsx +29 -37
  495. package/src/components/Header/Header.tsx +8 -4
  496. package/src/components/Header/index.ts +1 -1
  497. package/src/components/SelectorContainer/ApiSpecSelector.spec.tsx +12 -2
  498. package/src/components/SelectorContainer/ApiSpecSelector.tsx +9 -5
  499. package/src/components/SelectorContainer/SdkLanguageSelector.spec.tsx +13 -7
  500. package/src/components/SelectorContainer/SdkLanguageSelector.tsx +7 -14
  501. package/src/components/SelectorContainer/SelectorContainer.spec.tsx +19 -25
  502. package/src/components/SelectorContainer/SelectorContainer.tsx +8 -5
  503. package/src/components/SideNav/SearchMessage.tsx +3 -2
  504. package/src/components/SideNav/SideNav.spec.tsx +28 -41
  505. package/src/components/SideNav/SideNav.tsx +102 -68
  506. package/src/components/SideNav/{SideNavTags.spec.tsx → SideNavMethodTags.spec.tsx} +10 -8
  507. package/src/components/SideNav/{SideNavTags.tsx → SideNavMethodTags.tsx} +21 -19
  508. package/src/components/SideNav/SideNavMethods.spec.tsx +9 -5
  509. package/src/components/SideNav/SideNavMethods.tsx +78 -126
  510. package/src/components/SideNav/SideNavTypeTags.spec.tsx +79 -0
  511. package/src/{context/search/SearchContext.ts → components/SideNav/SideNavTypeTags.tsx} +27 -14
  512. package/src/components/SideNav/SideNavTypes.spec.tsx +13 -6
  513. package/src/components/SideNav/SideNavTypes.tsx +94 -43
  514. package/src/components/SideNav/{searchUtils.tsx → searchUtils.ts} +3 -3
  515. package/src/components/common/Loader.tsx +3 -2
  516. package/src/components/common/common.tsx +5 -15
  517. package/src/components/common/index.ts +2 -2
  518. package/src/components/index.ts +5 -4
  519. package/src/{context/lode/index.ts → index.ts} +4 -1
  520. package/src/reducers/index.ts +0 -1
  521. package/src/reducers/spec/actions.ts +1 -1
  522. package/src/reducers/spec/reducer.spec.ts +2 -1
  523. package/src/reducers/spec/reducer.ts +5 -3
  524. package/src/reducers/spec/utils.spec.ts +1 -1
  525. package/src/reducers/spec/utils.ts +18 -6
  526. package/src/routes/AppRouter.tsx +28 -15
  527. package/src/scenes/DiffScene/DiffScene.tsx +44 -13
  528. package/src/scenes/DiffScene/DocDiff/DiffBanner.tsx +3 -2
  529. package/src/scenes/DiffScene/DocDiff/DiffItem.spec.tsx +2 -1
  530. package/src/scenes/DiffScene/DocDiff/DiffItem.tsx +32 -49
  531. package/src/scenes/DiffScene/DocDiff/DiffLegend.tsx +3 -2
  532. package/src/scenes/DiffScene/DocDiff/DocDiff.tsx +3 -2
  533. package/src/scenes/DiffScene/DocDiff/docDiffUtils.tsx +2 -7
  534. package/src/scenes/DiffScene/diffUtils.spec.ts +2 -1
  535. package/src/scenes/DiffScene/diffUtils.ts +2 -2
  536. package/src/scenes/HomeScene/HomeScene.tsx +3 -2
  537. package/src/scenes/MethodScene/MethodScene.tsx +89 -44
  538. package/src/scenes/MethodScene/components/DocOperation.tsx +3 -2
  539. package/src/scenes/MethodScene/components/DocRequestBody.spec.tsx +2 -2
  540. package/src/scenes/MethodScene/components/DocRequestBody.tsx +8 -5
  541. package/src/scenes/{TagScene/TagScene.spec.tsx → MethodTagScene/MethodTagScene.spec.tsx} +5 -5
  542. package/src/scenes/{TagScene/TagScene.tsx → MethodTagScene/MethodTagScene.tsx} +23 -16
  543. package/src/{components/Collapser → scenes/MethodTagScene}/index.ts +1 -2
  544. package/src/scenes/{TagScene → MethodTagScene}/utils.spec.ts +1 -1
  545. package/src/scenes/{TagScene → MethodTagScene}/utils.ts +1 -1
  546. package/src/scenes/TypeScene/TypeScene.tsx +36 -24
  547. package/src/scenes/TypeTagScene/TypeTagScene.spec.tsx +103 -0
  548. package/src/scenes/TypeTagScene/TypeTagScene.tsx +93 -0
  549. package/src/scenes/{TagScene → TypeTagScene}/index.ts +1 -1
  550. package/src/{state/reducers.ts → scenes/TypeTagScene/utils.spec.ts} +8 -7
  551. package/src/{hooks/use_actions_hook.ts → scenes/TypeTagScene/utils.ts} +13 -10
  552. package/src/scenes/index.ts +2 -1
  553. package/src/state/index.ts +2 -2
  554. package/src/{reducers/search → state/lodes}/index.ts +2 -2
  555. package/src/state/lodes/sagas.spec.ts +92 -0
  556. package/src/state/{settings/reducer.ts → lodes/sagas.ts} +23 -21
  557. package/src/state/{settings/reducer.spec.ts → lodes/selectors.spec.ts} +15 -14
  558. package/src/state/{settings/actions.ts → lodes/selectors.ts} +7 -9
  559. package/src/state/lodes/slice.ts +69 -0
  560. package/src/state/settings/index.ts +1 -1
  561. package/src/state/settings/sagas.spec.ts +121 -0
  562. package/src/state/settings/sagas.ts +79 -0
  563. package/src/state/settings/selectors.spec.ts +16 -9
  564. package/src/state/settings/selectors.ts +14 -3
  565. package/src/state/settings/slice.ts +94 -0
  566. package/src/state/store.ts +22 -8
  567. package/src/{context/envAdaptor/EnvAdaptorContext.ts → test-data/declarations.ts} +17 -12
  568. package/src/test-data/examples.ts +1 -1
  569. package/src/test-data/index.ts +1 -0
  570. package/src/test-data/specs.ts +2 -1
  571. package/src/test-utils/index.ts +3 -14
  572. package/src/{context/lode/LodeContext.ts → test-utils/lodes.tsx} +15 -14
  573. package/src/test-utils/redux.tsx +46 -26
  574. package/src/test-utils/router.tsx +3 -2
  575. package/src/utils/index.ts +7 -2
  576. package/src/utils/lodeUtils.ts +5 -7
  577. package/src/utils/path.spec.ts +17 -3
  578. package/src/utils/path.ts +54 -4
  579. package/webpack.dev.config.js +3 -0
  580. package/webpack.prod.config.js +4 -0
  581. package/lib/components/Collapser/CollapserCard.d.ts +0 -9
  582. package/lib/components/Collapser/CollapserCard.js +0 -50
  583. package/lib/components/Collapser/CollapserCard.js.map +0 -1
  584. package/lib/components/Collapser/index.d.ts +0 -1
  585. package/lib/components/Collapser/index.js +0 -14
  586. package/lib/components/Collapser/index.js.map +0 -1
  587. package/lib/components/SideNav/SearchCriteriaSelector.d.ts +0 -2
  588. package/lib/components/SideNav/SearchCriteriaSelector.js +0 -57
  589. package/lib/components/SideNav/SearchCriteriaSelector.js.map +0 -1
  590. package/lib/components/SideNav/SideNavTags.d.ts +0 -9
  591. package/lib/components/SideNav/SideNavTags.js +0 -30
  592. package/lib/components/SideNav/SideNavTags.js.map +0 -1
  593. package/lib/context/envAdaptor/EnvAdaptorContext.d.ts +0 -7
  594. package/lib/context/envAdaptor/EnvAdaptorContext.js +0 -18
  595. package/lib/context/envAdaptor/EnvAdaptorContext.js.map +0 -1
  596. package/lib/context/envAdaptor/index.d.ts +0 -1
  597. package/lib/context/envAdaptor/index.js +0 -20
  598. package/lib/context/envAdaptor/index.js.map +0 -1
  599. package/lib/context/index.d.ts +0 -3
  600. package/lib/context/index.js +0 -48
  601. package/lib/context/index.js.map +0 -1
  602. package/lib/context/lode/LodeContext.d.ts +0 -9
  603. package/lib/context/lode/LodeContext.js +0 -21
  604. package/lib/context/lode/LodeContext.js.map +0 -1
  605. package/lib/context/lode/index.d.ts +0 -1
  606. package/lib/context/lode/index.js +0 -20
  607. package/lib/context/search/SearchContext.d.ts +0 -9
  608. package/lib/context/search/SearchContext.js +0 -19
  609. package/lib/context/search/index.d.ts +0 -1
  610. package/lib/context/search/index.js +0 -20
  611. package/lib/context/search/index.js.map +0 -1
  612. package/lib/esm/components/Collapser/CollapserCard.js +0 -34
  613. package/lib/esm/components/Collapser/CollapserCard.js.map +0 -1
  614. package/lib/esm/components/Collapser/index.js +0 -2
  615. package/lib/esm/components/Collapser/index.js.map +0 -1
  616. package/lib/esm/components/SideNav/SearchCriteriaSelector.js +0 -38
  617. package/lib/esm/components/SideNav/SearchCriteriaSelector.js.map +0 -1
  618. package/lib/esm/components/SideNav/SideNavTags.js +0 -17
  619. package/lib/esm/components/SideNav/SideNavTags.js.map +0 -1
  620. package/lib/esm/context/envAdaptor/EnvAdaptorContext.js +0 -7
  621. package/lib/esm/context/envAdaptor/EnvAdaptorContext.js.map +0 -1
  622. package/lib/esm/context/envAdaptor/index.js +0 -2
  623. package/lib/esm/context/envAdaptor/index.js.map +0 -1
  624. package/lib/esm/context/index.js +0 -4
  625. package/lib/esm/context/index.js.map +0 -1
  626. package/lib/esm/context/lode/LodeContext.js +0 -11
  627. package/lib/esm/context/lode/LodeContext.js.map +0 -1
  628. package/lib/esm/context/lode/index.js +0 -2
  629. package/lib/esm/context/lode/index.js.map +0 -1
  630. package/lib/esm/context/search/SearchContext.js +0 -8
  631. package/lib/esm/context/search/SearchContext.js.map +0 -1
  632. package/lib/esm/context/search/index.js +0 -2
  633. package/lib/esm/context/search/index.js.map +0 -1
  634. package/lib/esm/hooks/index.js +0 -2
  635. package/lib/esm/hooks/index.js.map +0 -1
  636. package/lib/esm/hooks/use_actions_hook.js +0 -11
  637. package/lib/esm/hooks/use_actions_hook.js.map +0 -1
  638. package/lib/esm/reducers/search/actions.js +0 -13
  639. package/lib/esm/reducers/search/actions.js.map +0 -1
  640. package/lib/esm/reducers/search/index.js +0 -3
  641. package/lib/esm/reducers/search/index.js.map +0 -1
  642. package/lib/esm/reducers/search/reducer.js +0 -31
  643. package/lib/esm/reducers/search/reducer.js.map +0 -1
  644. package/lib/esm/scenes/MethodScene/utils.js +0 -72
  645. package/lib/esm/scenes/MethodScene/utils.js.map +0 -1
  646. package/lib/esm/scenes/TagScene/TagScene.js.map +0 -1
  647. package/lib/esm/scenes/TagScene/index.js +0 -2
  648. package/lib/esm/scenes/TagScene/index.js.map +0 -1
  649. package/lib/esm/scenes/TagScene/utils.js.map +0 -1
  650. package/lib/esm/state/action_creators.js +0 -2
  651. package/lib/esm/state/action_creators.js.map +0 -1
  652. package/lib/esm/state/reducers.js +0 -6
  653. package/lib/esm/state/reducers.js.map +0 -1
  654. package/lib/esm/state/settings/action_creators.js +0 -6
  655. package/lib/esm/state/settings/action_creators.js.map +0 -1
  656. package/lib/esm/state/settings/actions.js +0 -6
  657. package/lib/esm/state/settings/reducer.js +0 -19
  658. package/lib/esm/state/settings/reducer.js.map +0 -1
  659. package/lib/esm/test-utils/render_with_lode.js +0 -19
  660. package/lib/esm/test-utils/render_with_lode.js.map +0 -1
  661. package/lib/esm/test-utils/render_with_search.js +0 -34
  662. package/lib/esm/test-utils/render_with_search.js.map +0 -1
  663. package/lib/esm/utils/envAdaptor.js +0 -68
  664. package/lib/esm/utils/envAdaptor.js.map +0 -1
  665. package/lib/hooks/index.d.ts +0 -1
  666. package/lib/hooks/index.js +0 -14
  667. package/lib/hooks/index.js.map +0 -1
  668. package/lib/hooks/use_actions_hook.d.ts +0 -2
  669. package/lib/hooks/use_actions_hook.js +0 -24
  670. package/lib/hooks/use_actions_hook.js.map +0 -1
  671. package/lib/reducers/search/actions.d.ts +0 -4
  672. package/lib/reducers/search/actions.js +0 -25
  673. package/lib/reducers/search/actions.js.map +0 -1
  674. package/lib/reducers/search/index.d.ts +0 -2
  675. package/lib/reducers/search/index.js.map +0 -1
  676. package/lib/reducers/search/reducer.d.ts +0 -11
  677. package/lib/reducers/search/reducer.js +0 -43
  678. package/lib/reducers/search/reducer.js.map +0 -1
  679. package/lib/scenes/MethodScene/utils.d.ts +0 -3
  680. package/lib/scenes/MethodScene/utils.js +0 -81
  681. package/lib/scenes/MethodScene/utils.js.map +0 -1
  682. package/lib/scenes/TagScene/TagScene.d.ts +0 -7
  683. package/lib/scenes/TagScene/TagScene.js.map +0 -1
  684. package/lib/scenes/TagScene/index.d.ts +0 -1
  685. package/lib/scenes/TagScene/index.js +0 -14
  686. package/lib/scenes/TagScene/index.js.map +0 -1
  687. package/lib/scenes/TagScene/utils.js.map +0 -1
  688. package/lib/state/action_creators.d.ts +0 -1
  689. package/lib/state/action_creators.js +0 -19
  690. package/lib/state/reducers.d.ts +0 -4
  691. package/lib/state/reducers.js +0 -16
  692. package/lib/state/settings/action_creators.d.ts +0 -2
  693. package/lib/state/settings/action_creators.js +0 -16
  694. package/lib/state/settings/action_creators.js.map +0 -1
  695. package/lib/state/settings/actions.d.ts +0 -8
  696. package/lib/state/settings/actions.js +0 -13
  697. package/lib/state/settings/actions.js.map +0 -1
  698. package/lib/state/settings/reducer.d.ts +0 -6
  699. package/lib/state/settings/reducer.js +0 -31
  700. package/lib/state/settings/reducer.js.map +0 -1
  701. package/lib/test-utils/render_with_lode.d.ts +0 -9
  702. package/lib/test-utils/render_with_lode.js +0 -36
  703. package/lib/test-utils/render_with_lode.js.map +0 -1
  704. package/lib/test-utils/render_with_search.d.ts +0 -4
  705. package/lib/test-utils/render_with_search.js +0 -52
  706. package/lib/test-utils/render_with_search.js.map +0 -1
  707. package/lib/utils/envAdaptor.d.ts +0 -27
  708. package/lib/utils/envAdaptor.js +0 -81
  709. package/lib/utils/envAdaptor.js.map +0 -1
  710. package/src/components/Collapser/CollapserCard.spec.tsx +0 -50
  711. package/src/components/Collapser/CollapserCard.tsx +0 -76
  712. package/src/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/somethingWentWrong.svg +0 -45
  713. package/src/components/SideNav/SearchCriteriaSelector.tsx +0 -75
  714. package/src/context/envAdaptor/index.ts +0 -29
  715. package/src/context/index.ts +0 -28
  716. package/src/context/search/index.ts +0 -26
  717. package/src/hooks/index.ts +0 -26
  718. package/src/reducers/search/actions.spec.ts +0 -50
  719. package/src/reducers/search/reducer.spec.ts +0 -72
  720. package/src/scenes/MethodScene/utils.spec.ts +0 -95
  721. package/src/scenes/MethodScene/utils.ts +0 -121
  722. package/src/state/settings/action_creators.ts +0 -33
  723. package/src/test-utils/render_with_lode.tsx +0 -74
  724. package/src/test-utils/render_with_search.tsx +0 -69
  725. package/src/utils/envAdaptor.spec.ts +0 -53
  726. package/src/utils/envAdaptor.ts +0 -120
@@ -1,46 +1,90 @@
1
- import React, { useContext, useState, useEffect } from 'react';
1
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
2
+
3
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
4
+
5
+ import React, { useState, useEffect } from 'react';
2
6
  import { Aside, Button, ButtonOutline, Space, useToggle, ExtendComponentsThemeProvider } from '@looker/components';
3
7
  import { Beaker } from '@looker/icons';
4
- import { ThemeContext } from 'styled-components';
5
- import { useParams } from 'react-router-dom';
6
- import { RunIt, RunItContext } from '@looker/run-it';
8
+ import { useHistory, useParams } from 'react-router-dom';
9
+ import { RunIt, RunItFormKey } from '@looker/run-it';
7
10
  import { typeRefs } from '@looker/sdk-codegen';
8
11
  import { useSelector } from 'react-redux';
9
12
  import { ApixSection, DocActivityType, DocMarkdown, DocRateLimited, DocReferences, DocResponses, DocSDKs, DocSdkUsage, DocSource, DocStatus, DocTitle, DocSchema } from '../../components';
10
- import { getSelectedSdkLanguage } from '../../state';
13
+ import { selectSdkLanguage } from '../../state';
11
14
  import { DocOperation, DocRequestBody } from './components';
12
- import { createInputs } from './utils';
13
- export var MethodScene = _ref => {
15
+
16
+ var showRunIt = function () {
17
+ var _ref = _asyncToGenerator(function* (adaptor) {
18
+ var data = yield adaptor.localStorageGetItem(RunItFormKey);
19
+ return !!data;
20
+ });
21
+
22
+ return function showRunIt(_x) {
23
+ return _ref.apply(this, arguments);
24
+ };
25
+ }();
26
+
27
+ export var MethodScene = _ref2 => {
14
28
  var {
15
- api
16
- } = _ref;
29
+ api,
30
+ adaptor,
31
+ setVersionsUrl
32
+ } = _ref2;
33
+ var history = useHistory();
34
+ var sdkLanguage = useSelector(selectSdkLanguage);
17
35
  var {
18
- sdk
19
- } = useContext(RunItContext);
20
- var sdkLanguage = useSelector(getSelectedSdkLanguage);
21
- var {
22
- methodName,
23
- specKey
36
+ specKey,
37
+ methodTag,
38
+ methodName
24
39
  } = useParams();
25
40
  var {
26
41
  value,
27
- toggle
42
+ toggle,
43
+ setOn
28
44
  } = useToggle();
29
45
  var [method, setMethod] = useState(api.methods[methodName]);
30
- var seeTypes = typeRefs(api, method.customTypes);
31
- useEffect(() => {
32
- setMethod(api.methods[methodName]);
33
- }, [api, methodName]);
34
- var {
35
- colors
36
- } = useContext(ThemeContext);
46
+ var seeTypes = typeRefs(api, method === null || method === void 0 ? void 0 : method.customTypes);
37
47
  var RunItButton = value ? Button : ButtonOutline;
48
+ useEffect(() => {
49
+ var foundMethod = api.methods[methodName];
50
+
51
+ if (foundMethod) {
52
+ setMethod(api.methods[methodName]);
53
+ } else {
54
+ if (api.tags[methodTag]) {
55
+ history.push("/".concat(specKey, "/methods/").concat(methodTag));
56
+ } else {
57
+ history.push("/".concat(specKey, "/methods"));
58
+ }
59
+ }
60
+ }, [api, history, methodName, methodTag, specKey]);
61
+ useEffect(() => {
62
+ var checkRunIt = function () {
63
+ var _ref3 = _asyncToGenerator(function* () {
64
+ try {
65
+ var show = yield showRunIt(adaptor);
66
+
67
+ if (show) {
68
+ setOn();
69
+ }
70
+ } catch (error) {
71
+ console.error(error);
72
+ }
73
+ });
74
+
75
+ return function checkRunIt() {
76
+ return _ref3.apply(this, arguments);
77
+ };
78
+ }();
79
+
80
+ checkRunIt();
81
+ }, [adaptor, setOn]);
38
82
  var runItToggle = React.createElement(RunItButton, {
39
83
  color: value ? 'key' : 'neutral',
40
84
  iconBefore: React.createElement(Beaker, null),
41
85
  onClick: toggle
42
86
  }, "Run It");
43
- return React.createElement(React.Fragment, null, React.createElement(ApixSection, null, React.createElement(Space, {
87
+ return React.createElement(React.Fragment, null, method && React.createElement(ApixSection, null, React.createElement(Space, {
44
88
  between: true
45
89
  }, React.createElement(Space, null, React.createElement(DocTitle, null, method.summary), React.createElement(DocSource, {
46
90
  method: method
@@ -62,6 +106,7 @@ export var MethodScene = _ref => {
62
106
  api: api,
63
107
  method: method
64
108
  }), React.createElement(DocRequestBody, {
109
+ api: api,
65
110
  method: method
66
111
  }), React.createElement(DocSdkUsage, {
67
112
  method: method
@@ -70,23 +115,29 @@ export var MethodScene = _ref => {
70
115
  api: api,
71
116
  specKey: specKey
72
117
  }), React.createElement(DocResponses, {
118
+ api: api,
73
119
  responses: method.responses
74
120
  }), React.createElement(DocSchema, {
75
121
  object: method.schema
76
- })), sdk && value && React.createElement(Aside, {
122
+ })), value && React.createElement(Aside, {
77
123
  width: "50rem"
78
124
  }, React.createElement(ExtendComponentsThemeProvider, {
79
125
  themeCustomizations: {
80
126
  colors: {
81
- background: colors.text,
82
- text: colors.background
127
+ background: '#262D33',
128
+ key: '#8AB4F8',
129
+ text: '#fff',
130
+ link: '#8AB4F8',
131
+ critical: '#FF877C'
83
132
  }
84
133
  }
85
134
  }, React.createElement(RunIt, {
135
+ adaptor: adaptor,
136
+ key: method.operationId,
86
137
  sdkLanguage: sdkLanguage,
87
138
  api: api,
88
- inputs: createInputs(api, method),
89
- method: method
139
+ method: method,
140
+ setVersionsUrl: setVersionsUrl
90
141
  }))));
91
142
  };
92
143
  //# sourceMappingURL=MethodScene.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/scenes/MethodScene/MethodScene.tsx"],"names":["React","useContext","useState","useEffect","Aside","Button","ButtonOutline","Space","useToggle","ExtendComponentsThemeProvider","Beaker","ThemeContext","useParams","RunIt","RunItContext","typeRefs","useSelector","ApixSection","DocActivityType","DocMarkdown","DocRateLimited","DocReferences","DocResponses","DocSDKs","DocSdkUsage","DocSource","DocStatus","DocTitle","DocSchema","getSelectedSdkLanguage","DocOperation","DocRequestBody","createInputs","MethodScene","api","sdk","sdkLanguage","methodName","specKey","value","toggle","method","setMethod","methods","seeTypes","customTypes","colors","RunItButton","runItToggle","summary","description","responses","schema","background","text"],"mappings":"AA0BA,OAAOA,KAAP,IAAoBC,UAApB,EAAgCC,QAAhC,EAA0CC,SAA1C,QAA2D,OAA3D;AACA,SACEC,KADF,EAEEC,MAFF,EAGEC,aAHF,EAIEC,KAJF,EAKEC,SALF,EAMEC,6BANF,QAOO,oBAPP;AAQA,SAASC,MAAT,QAAuB,eAAvB;AACA,SAASC,YAAT,QAA6B,mBAA7B;AACA,SAASC,SAAT,QAA0B,kBAA1B;AACA,SAASC,KAAT,EAAgBC,YAAhB,QAAoC,gBAApC;AACA,SAAmBC,QAAnB,QAAmC,qBAAnC;AACA,SAASC,WAAT,QAA4B,aAA5B;AAEA,SACEC,WADF,EAEEC,eAFF,EAGEC,WAHF,EAIEC,cAJF,EAKEC,aALF,EAMEC,YANF,EAOEC,OAPF,EAQEC,WARF,EASEC,SATF,EAUEC,SAVF,EAWEC,QAXF,EAYEC,SAZF,QAaO,kBAbP;AAcA,SAASC,sBAAT,QAAuC,aAAvC;AACA,SAASC,YAAT,EAAuBC,cAAvB,QAA6C,cAA7C;AACA,SAASC,YAAT,QAA6B,SAA7B;AAWA,OAAO,IAAMC,WAA+B,GAAG,QAAa;AAAA,MAAZ;AAAEC,IAAAA;AAAF,GAAY;AAC1D,MAAM;AAAEC,IAAAA;AAAF,MAAUlC,UAAU,CAACa,YAAD,CAA1B;AACA,MAAMsB,WAAW,GAAGpB,WAAW,CAACa,sBAAD,CAA/B;AACA,MAAM;AAAEQ,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAA0B1B,SAAS,EAAzC;AACA,MAAM;AAAE2B,IAAAA,KAAF;AAASC,IAAAA;AAAT,MAAoBhC,SAAS,EAAnC;AACA,MAAM,CAACiC,MAAD,EAASC,SAAT,IAAsBxC,QAAQ,CAACgC,GAAG,CAACS,OAAJ,CAAYN,UAAZ,CAAD,CAApC;AACA,MAAMO,QAAQ,GAAG7B,QAAQ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fF,EAgBE,oBAAC,cAAD;AAAgB,IAAA,MAAM,EAAEA;AAAxB,IAhBF,EAiBE,oBAAC,WAAD;AAAa,IAAA,MAAM,EAAEA;AAArB,IAjBF,EAkBE,oBAAC,aAAD;AAAe,IAAA,SAAS,EAAEG,QAA1B;AAAoC,IAAA,GAAG,EAAEV,GAAzC;AAA8C,IAAA,OAAO,EAAEI;AAAvD,IAlBF,EAmBE,oBAAC,YAAD;AAAc,IAAA,SAAS,EAAEG,MAAM,CAACU;AAAhC,IAnBF,EAoBE,oBAAC,SAAD;AAAW,IAAA,MAAM,EAAEV,MAAM,CAACW;AAA1B,IApBF,CADF,EAuBGjB,GAAG,IAAII,KAAP,IACC,oBAAC,KAAD;AAAO,IAAA,KAAK,EAAC;AAAb,KACE,oBAAC,6BAAD;AACE,IAAA,mBAAmB,EAAE;AACnBO,MAAAA,MAAM,EAAE;AACNO,QAAAA,UAAU,EAAEP,MAAM,CAACQ,IADb;AAENA,QAAAA,IAAI,EAAER,MAAM,CAACO;AAFP;AADW;AADvB,KAQE,oBAAC,KAAD;AACE,IAAA,WAAW,EAAEjB,WADf;AAEE,IAAA,GAAG,EAAEF,GAFP;AAGE,IAAA,MAAM,EAAEF,YAAY,CAACE,GAAD,EAAMO,MAAN,CAHtB;AAIE,IAAA,MAAM,EAAEA;AAJV,IARF,CADF,CAxBJ,CADF;AA6CD,CAtEM","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, useState, useEffect } from 'react'\nimport {\n Aside,\n Button,\n ButtonOutline,\n Space,\n useToggle,\n ExtendComponentsThemeProvider,\n} from '@looker/components'\nimport { Beaker } from '@looker/icons'\nimport { ThemeContext } from 'styled-components'\nimport { useParams } from 'react-router-dom'\nimport { RunIt, RunItContext } from '@looker/run-it'\nimport { ApiModel, typeRefs } from '@looker/sdk-codegen'\nimport { useSelector } from 'react-redux'\n\nimport {\n ApixSection,\n DocActivityType,\n DocMarkdown,\n DocRateLimited,\n DocReferences,\n DocResponses,\n DocSDKs,\n DocSdkUsage,\n DocSource,\n DocStatus,\n DocTitle,\n DocSchema,\n} from '../../components'\nimport { getSelectedSdkLanguage } from '../../state'\nimport { DocOperation, DocRequestBody } from './components'\nimport { createInputs } from './utils'\n\ninterface DocMethodProps {\n api: ApiModel\n}\n\ninterface DocMethodParams {\n methodName: string\n specKey: string\n}\n\nexport const MethodScene: FC<DocMethodProps> = ({ api }) => {\n const { sdk } = useContext(RunItContext)\n const sdkLanguage = useSelector(getSelectedSdkLanguage)\n const { methodName, specKey } = useParams<DocMethodParams>()\n const { value, toggle } = useToggle()\n const [method, setMethod] = useState(api.methods[methodName])\n const seeTypes = typeRefs(api, method.customTypes)\n\n useEffect(() => {\n setMethod(api.methods[methodName])\n }, [api, methodName])\n\n const { colors } = useContext(ThemeContext)\n\n const RunItButton = value ? Button : ButtonOutline\n const runItToggle = (\n <RunItButton\n color={value ? 'key' : 'neutral'}\n iconBefore={<Beaker />}\n onClick={toggle}\n >\n Run It\n </RunItButton>\n )\n\n return (\n <>\n <ApixSection>\n <Space between>\n <Space>\n <DocTitle>{method.summary}</DocTitle>\n <DocSource method={method} />\n </Space>\n {runItToggle}\n </Space>\n <Space mb=\"large\" gap=\"small\">\n <DocStatus method={method} />\n <DocActivityType method={method} />\n <DocRateLimited method={method} />\n </Space>\n <DocOperation method={method} />\n <DocMarkdown source={method.description} specKey={specKey} />\n <DocSDKs api={api} method={method} />\n <DocRequestBody method={method} />\n <DocSdkUsage method={method} />\n <DocReferences typesUsed={seeTypes} api={api} specKey={specKey} />\n <DocResponses responses={method.responses} />\n <DocSchema object={method.schema} />\n </ApixSection>\n {sdk && value && (\n <Aside width=\"50rem\">\n <ExtendComponentsThemeProvider\n themeCustomizations={{\n colors: {\n background: colors.text,\n text: colors.background,\n },\n }}\n >\n <RunIt\n sdkLanguage={sdkLanguage}\n api={api}\n inputs={createInputs(api, method)}\n method={method}\n />\n </ExtendComponentsThemeProvider>\n </Aside>\n )}\n </>\n )\n}\n"],"file":"MethodScene.js"}
1
+ {"version":3,"sources":["../../../../src/scenes/MethodScene/MethodScene.tsx"],"names":["React","useState","useEffect","Aside","Button","ButtonOutline","Space","useToggle","ExtendComponentsThemeProvider","Beaker","useHistory","useParams","RunIt","RunItFormKey","typeRefs","useSelector","ApixSection","DocActivityType","DocMarkdown","DocRateLimited","DocReferences","DocResponses","DocSDKs","DocSdkUsage","DocSource","DocStatus","DocTitle","DocSchema","selectSdkLanguage","DocOperation","DocRequestBody","showRunIt","adaptor","data","localStorageGetItem","MethodScene","api","setVersionsUrl","history","sdkLanguage","specKey","methodTag","methodName","value","toggle","setOn","method","setMethod","methods","seeTypes","customTypes","RunItButton","foundMethod","tags","push","checkRunIt","show","error","console","runItToggle","summary","description","responses","schema","colors","background","key","text","link","critical","operationId"],"mappings":";;;;AA2BA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,SACEC,KADF,EA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MAAM,CAACiB;AAA1B,IApBF,CAFJ,EAyBGpB,KAAK,IACJ,oBAAC,KAAD;AAAO,IAAA,KAAK,EAAC;AAAb,KACE,oBAAC,6BAAD;AACE,IAAA,mBAAmB,EAAE;AACnBqB,MAAAA,MAAM,EAAE;AACNC,QAAAA,UAAU,EAAE,SADN;AAENC,QAAAA,GAAG,EAAE,SAFC;AAGNC,QAAAA,IAAI,EAAE,MAHA;AAINC,QAAAA,IAAI,EAAE,SAJA;AAKNC,QAAAA,QAAQ,EAAE;AALJ;AADW;AADvB,KAWE,oBAAC,KAAD;AACE,IAAA,OAAO,EAAErC,OADX;AAEE,IAAA,GAAG,EAAEc,MAAM,CAACwB,WAFd;AAGE,IAAA,WAAW,EAAE/B,WAHf;AAIE,IAAA,GAAG,EAAEH,GAJP;AAKE,IAAA,MAAM,EAAEU,MALV;AAME,IAAA,cAAc,EAAET;AANlB,IAXF,CADF,CA1BJ,CADF;AAoDD,CAzGM","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 {\n Aside,\n Button,\n ButtonOutline,\n Space,\n useToggle,\n ExtendComponentsThemeProvider,\n} from '@looker/components'\nimport { Beaker } from '@looker/icons'\nimport { useHistory, useParams } from 'react-router-dom'\nimport type { RunItSetter } from '@looker/run-it'\nimport { RunIt, RunItFormKey } from '@looker/run-it'\nimport type { ApiModel } from '@looker/sdk-codegen'\nimport { typeRefs } from '@looker/sdk-codegen'\nimport { useSelector } from 'react-redux'\n\nimport type { IEnvironmentAdaptor } from '@looker/extension-utils'\nimport {\n ApixSection,\n DocActivityType,\n DocMarkdown,\n DocRateLimited,\n DocReferences,\n DocResponses,\n DocSDKs,\n DocSdkUsage,\n DocSource,\n DocStatus,\n DocTitle,\n DocSchema,\n} from '../../components'\nimport { selectSdkLanguage } from '../../state'\nimport { DocOperation, DocRequestBody } from './components'\n\ninterface MethodSceneProps {\n api: ApiModel\n adaptor: IEnvironmentAdaptor\n setVersionsUrl: RunItSetter\n}\n\ninterface MethodSceneParams {\n methodName: string\n methodTag: string\n specKey: string\n}\n\nconst showRunIt = async (adaptor: IEnvironmentAdaptor) => {\n const data = await adaptor.localStorageGetItem(RunItFormKey)\n return !!data\n}\n\nexport const MethodScene: FC<MethodSceneProps> = ({\n api,\n adaptor,\n setVersionsUrl,\n}) => {\n const history = useHistory()\n const sdkLanguage = useSelector(selectSdkLanguage)\n const { specKey, methodTag, methodName } = useParams<MethodSceneParams>()\n const { value, toggle, setOn } = useToggle()\n const [method, setMethod] = useState(api.methods[methodName])\n const seeTypes = typeRefs(api, method?.customTypes)\n\n const RunItButton = value ? Button : ButtonOutline\n\n useEffect(() => {\n const foundMethod = api.methods[methodName]\n if (foundMethod) {\n setMethod(api.methods[methodName])\n } else {\n // Invalid method\n if (api.tags[methodTag]) {\n // Found tag though\n history.push(`/${specKey}/methods/${methodTag}`)\n } else {\n history.push(`/${specKey}/methods`)\n }\n }\n }, [api, history, methodName, methodTag, specKey])\n\n useEffect(() => {\n const checkRunIt = async () => {\n try {\n const show = await showRunIt(adaptor)\n if (show) {\n setOn()\n }\n } catch (error) {\n console.error(error)\n }\n }\n checkRunIt()\n }, [adaptor, setOn])\n\n const runItToggle = (\n <RunItButton\n color={value ? 'key' : 'neutral'}\n iconBefore={<Beaker />}\n onClick={toggle}\n >\n Run It\n </RunItButton>\n )\n\n return (\n <>\n {method && (\n <ApixSection>\n <Space between>\n <Space>\n <DocTitle>{method.summary}</DocTitle>\n <DocSource method={method} />\n </Space>\n {runItToggle}\n </Space>\n <Space mb=\"large\" gap=\"small\">\n <DocStatus method={method} />\n <DocActivityType method={method} />\n <DocRateLimited method={method} />\n </Space>\n <DocOperation method={method} />\n <DocMarkdown source={method.description} specKey={specKey} />\n <DocSDKs api={api} method={method} />\n <DocRequestBody api={api} method={method} />\n <DocSdkUsage method={method} />\n <DocReferences typesUsed={seeTypes} api={api} specKey={specKey} />\n <DocResponses api={api} responses={method.responses} />\n <DocSchema object={method.schema} />\n </ApixSection>\n )}\n {value && (\n <Aside width=\"50rem\">\n <ExtendComponentsThemeProvider\n themeCustomizations={{\n colors: {\n background: '#262D33',\n key: '#8AB4F8',\n text: '#fff',\n link: '#8AB4F8',\n critical: '#FF877C',\n },\n }}\n >\n <RunIt\n adaptor={adaptor}\n key={method.operationId}\n sdkLanguage={sdkLanguage}\n api={api}\n method={method}\n setVersionsUrl={setVersionsUrl}\n />\n </ExtendComponentsThemeProvider>\n </Aside>\n )}\n </>\n )\n}\n"],"file":"MethodScene.js"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/scenes/MethodScene/components/DocOperation.tsx"],"names":["React","Code","Flex","SpaceVertical","Text","MethodBadge","DocPseudo","DocOperation","method","httpMethod","endpoint"],"mappings":"AAyBA,OAAOA,KAAP,MAA0B,OAA1B;AAEA,SAASC,IAAT,EAAeC,IAAf,EAAqBC,aAArB,EAAoCC,IAApC,QAAgD,oBAAhD;AACA,SAASC,WAAT,QAA4B,gBAA5B;AAEA,SAASC,SAAT,QAA0B,qBAA1B;AAMA,OAAO,IAAMC,YAAmC,GAAG;AAAA,MAAC;AAAEC,IAAAA;AAAF,GAAD;AAAA,SACjD,oBAAC,aAAD;AAAe,IAAA,KAAK,EAAC,OAArB;AAA6B,IAAA,EAAE,EAAC,OAAhC;AAAwC,IAAA,GAAG,EAAC;AAA5C,KACE,oBAAC,WAAD;AAAa,IAAA,IAAI,EAAEA,MAAM,CAACC;AAA1B,KACE,oBAAC,SAAD;AAAW,IAAA,MAAM,EAAED;AAAnB,IADF,CADF,EAIE,oBAAC,WAAD;AAAa,IAAA,IAAI,EAAEA,MAAM,CAACC;AAA1B,KACE,oBAAC,IAAD;AAAM,IAAA,UAAU,EAAC;AAAjB,KACE,oBAAC,IAAD;AAAM,IAAA,QAAQ,EAAC,QAAf;AAAwB,IAAA,UAAU,EAAC,UAAnC;AAA8C,IAAA,EAAE,EAAC;AAAjD,KACGD,MAAM,CAACC,UADV,CADF,EAIE,oBAAC,IAAD;AAAM,IAAA,QAAQ,EAAC,OAAf;AAAuB,IAAA,UAAU,EAAC;AAAlC,KACGD,MAAM,CAACE,QADV,CAJF,CADF,CAJF,CADiD;AAAA,CAA5C","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport React, { FC } from 'react'\nimport { IMethod } from '@looker/sdk-codegen'\nimport { Code, Flex, SpaceVertical, Text } from '@looker/components'\nimport { MethodBadge } from '@looker/run-it'\n\nimport { DocPseudo } from '../../../components'\n\ninterface DocOperationProps {\n method: IMethod\n}\n\nexport const DocOperation: FC<DocOperationProps> = ({ method }) => (\n <SpaceVertical align=\"start\" mb=\"large\" gap=\"xsmall\">\n <MethodBadge type={method.httpMethod}>\n <DocPseudo method={method} />\n </MethodBadge>\n <MethodBadge type={method.httpMethod}>\n <Flex alignItems=\"center\">\n <Text fontSize=\"xsmall\" fontWeight=\"semiBold\" mr=\"xxsmall\">\n {method.httpMethod}\n </Text>\n <Code fontSize=\"small\" fontWeight=\"normal\">\n {method.endpoint}\n </Code>\n </Flex>\n </MethodBadge>\n </SpaceVertical>\n)\n"],"file":"DocOperation.js"}
1
+ {"version":3,"sources":["../../../../../src/scenes/MethodScene/components/DocOperation.tsx"],"names":["React","Code","Flex","SpaceVertical","Text","MethodBadge","DocPseudo","DocOperation","method","httpMethod","endpoint"],"mappings":"AA0BA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,IAAT,EAAeC,IAAf,EAAqBC,aAArB,EAAoCC,IAApC,QAAgD,oBAAhD;AACA,SAASC,WAAT,QAA4B,gBAA5B;AAEA,SAASC,SAAT,QAA0B,qBAA1B;AAMA,OAAO,IAAMC,YAAmC,GAAG;AAAA,MAAC;AAAEC,IAAAA;AAAF,GAAD;AAAA,SACjD,oBAAC,aAAD;AAAe,IAAA,KAAK,EAAC,OAArB;AAA6B,IAAA,EAAE,EAAC,OAAhC;AAAwC,IAAA,GAAG,EAAC;AAA5C,KACE,oBAAC,WAAD;AAAa,IAAA,IAAI,EAAEA,MAAM,CAACC;AAA1B,KACE,oBAAC,SAAD;AAAW,IAAA,MAAM,EAAED;AAAnB,IADF,CADF,EAIE,oBAAC,WAAD;AAAa,IAAA,IAAI,EAAEA,MAAM,CAACC;AAA1B,KACE,oBAAC,IAAD;AAAM,IAAA,UAAU,EAAC;AAAjB,KACE,oBAAC,IAAD;AAAM,IAAA,QAAQ,EAAC,QAAf;AAAwB,IAAA,UAAU,EAAC,UAAnC;AAA8C,IAAA,EAAE,EAAC;AAAjD,KACGD,MAAM,CAACC,UADV,CADF,EAIE,oBAAC,IAAD;AAAM,IAAA,QAAQ,EAAC,OAAf;AAAuB,IAAA,UAAU,EAAC;AAAlC,KACGD,MAAM,CAACE,QADV,CAJF,CADF,CAJF,CADiD;AAAA,CAA5C","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { FC } from 'react'\nimport React from 'react'\nimport type { IMethod } from '@looker/sdk-codegen'\nimport { Code, Flex, SpaceVertical, Text } from '@looker/components'\nimport { MethodBadge } from '@looker/run-it'\n\nimport { DocPseudo } from '../../../components'\n\ninterface DocOperationProps {\n method: IMethod\n}\n\nexport const DocOperation: FC<DocOperationProps> = ({ method }) => (\n <SpaceVertical align=\"start\" mb=\"large\" gap=\"xsmall\">\n <MethodBadge type={method.httpMethod}>\n <DocPseudo method={method} />\n </MethodBadge>\n <MethodBadge type={method.httpMethod}>\n <Flex alignItems=\"center\">\n <Text fontSize=\"xsmall\" fontWeight=\"semiBold\" mr=\"xxsmall\">\n {method.httpMethod}\n </Text>\n <Code fontSize=\"small\" fontWeight=\"normal\">\n {method.endpoint}\n </Code>\n </Flex>\n </MethodBadge>\n </SpaceVertical>\n)\n"],"file":"DocOperation.js"}
@@ -1,8 +1,10 @@
1
1
  import React from 'react';
2
- import { ExploreType, CollapserCard } from '../../../components';
2
+ import { CollapserCard } from '@looker/run-it';
3
+ import { ExploreType } from '../../../components';
3
4
  export var DocRequestBody = _ref => {
4
5
  var {
5
- method
6
+ method,
7
+ api
6
8
  } = _ref;
7
9
  var bodies = method.bodyParams;
8
10
  if (bodies.length === 0) return React.createElement(React.Fragment, null);
@@ -11,6 +13,7 @@ export var DocRequestBody = _ref => {
11
13
  id: "bodies",
12
14
  heading: header
13
15
  }, React.createElement(React.Fragment, null, bodies.map(body => React.createElement(ExploreType, {
16
+ api: api,
14
17
  type: body.type,
15
18
  open: false,
16
19
  key: "body.".concat(body.name)
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/scenes/MethodScene/components/DocRequestBody.tsx"],"names":["React","ExploreType","CollapserCard","DocRequestBody","method","bodies","bodyParams","length","header","map","body","type","name"],"mappings":"AAyBA,OAAOA,KAAP,MAA0B,OAA1B;AAGA,SAASC,WAAT,EAAsBC,aAAtB,QAA2C,qBAA3C;AAUA,OAAO,IAAMC,cAAuC,GAAG,QAAgB;AAAA,MAAf;AAAEC,IAAAA;AAAF,GAAe;AACrE,MAAMC,MAAM,GAAGD,MAAM,CAACE,UAAtB;AACA,MAAID,MAAM,CAACE,MAAP,KAAkB,CAAtB,EAAyB,OAAO,yCAAP;AACzB,MAAMC,MAAM,GAAGH,MAAM,CAACE,MAAP,GAAgB,CAAhB,GAAoB,gBAApB,GAAuC,cAAtD;AAEA,SACE,oBAAC,aAAD;AAAe,IAAA,EAAE,EAAC,QAAlB;AAA2B,IAAA,OAAO,EAAEC;AAApC,KACE,0CACGH,MAAM,CAACI,GAAP,CAAYC,IAAD,IACV,oBAAC,WAAD;AACE,IAAA,IAAI,EAAEA,IAAI,CAACC,IADb;AAEE,IAAA,IAAI,EAAE,KAFR;AAGE,IAAA,GAAG,iBAAUD,IAAI,CAACE,IAAf;AAHL,IADD,CADH,CADF,CADF;AAaD,CAlBM","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 { IMethod } from '@looker/sdk-codegen'\n\nimport { ExploreType, CollapserCard } from '../../../components'\n\ninterface DocRequestBodyProps {\n method: IMethod\n}\n\n/**\n * If a method has request body parameters, display them\n * @param method to document\n */\nexport const DocRequestBody: FC<DocRequestBodyProps> = ({ method }) => {\n const bodies = method.bodyParams\n if (bodies.length === 0) return <></>\n const header = bodies.length > 1 ? 'Request bodies' : 'Request body'\n\n return (\n <CollapserCard id=\"bodies\" heading={header}>\n <>\n {bodies.map((body) => (\n <ExploreType\n type={body.type}\n open={false}\n key={`body.${body.name}`}\n />\n ))}\n </>\n </CollapserCard>\n )\n}\n"],"file":"DocRequestBody.js"}
1
+ {"version":3,"sources":["../../../../../src/scenes/MethodScene/components/DocRequestBody.tsx"],"names":["React","CollapserCard","ExploreType","DocRequestBody","method","api","bodies","bodyParams","length","header","map","body","type","name"],"mappings":"AA0BA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,aAAT,QAA8B,gBAA9B;AACA,SAASC,WAAT,QAA4B,qBAA5B;AAWA,OAAO,IAAMC,cAAuC,GAAG,QAAqB;AAAA,MAApB;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAAoB;AAC1E,MAAMC,MAAM,GAAGF,MAAM,CAACG,UAAtB;AACA,MAAID,MAAM,CAACE,MAAP,KAAkB,CAAtB,EAAyB,OAAO,yCAAP;AACzB,MAAMC,MAAM,GAAGH,MAAM,CAACE,MAAP,GAAgB,CAAhB,GAAoB,gBAApB,GAAuC,cAAtD;AAEA,SACE,oBAAC,aAAD;AAAe,IAAA,EAAE,EAAC,QAAlB;AAA2B,IAAA,OAAO,EAAEC;AAApC,KACE,0CACGH,MAAM,CAACI,GAAP,CAAYC,IAAD,IACV,oBAAC,WAAD;AACE,IAAA,GAAG,EAAEN,GADP;AAEE,IAAA,IAAI,EAAEM,IAAI,CAACC,IAFb;AAGE,IAAA,IAAI,EAAE,KAHR;AAIE,IAAA,GAAG,iBAAUD,IAAI,CAACE,IAAf;AAJL,IADD,CADH,CADF,CADF;AAcD,CAnBM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { FC } from 'react'\nimport React from 'react'\nimport type { ApiModel, IMethod } from '@looker/sdk-codegen'\nimport { CollapserCard } from '@looker/run-it'\nimport { ExploreType } from '../../../components'\n\ninterface DocRequestBodyProps {\n method: IMethod\n api: ApiModel\n}\n\n/**\n * If a method has request body parameters, display them\n * @param method to document\n */\nexport const DocRequestBody: FC<DocRequestBodyProps> = ({ method, api }) => {\n const bodies = method.bodyParams\n if (bodies.length === 0) return <></>\n const header = bodies.length > 1 ? 'Request bodies' : 'Request body'\n\n return (\n <CollapserCard id=\"bodies\" heading={header}>\n <>\n {bodies.map((body) => (\n <ExploreType\n api={api}\n type={body.type}\n open={false}\n key={`body.${body.name}`}\n />\n ))}\n </>\n </CollapserCard>\n )\n}\n"],"file":"DocRequestBody.js"}
@@ -1,10 +1,10 @@
1
1
  import React, { useEffect, useState } from 'react';
2
+ import { useHistory, useParams } from 'react-router-dom';
2
3
  import { Grid, ButtonToggle, ButtonItem } from '@looker/components';
3
- import { useParams, useHistory } from 'react-router-dom';
4
4
  import { ApixSection, DocTitle, DocMethodSummary, Link } from '../../components';
5
5
  import { buildMethodPath } from '../../utils';
6
6
  import { getOperations } from './utils';
7
- export var TagScene = _ref => {
7
+ export var MethodTagScene = _ref => {
8
8
  var {
9
9
  api
10
10
  } = _ref;
@@ -13,18 +13,23 @@ export var TagScene = _ref => {
13
13
  methodTag
14
14
  } = useParams();
15
15
  var history = useHistory();
16
+ var [value, setValue] = useState('ALL');
17
+ useEffect(() => {
18
+ setValue('ALL');
19
+ }, [methodTag]);
20
+ var methods = api.tags[methodTag];
21
+ useEffect(() => {
22
+ if (!methods) {
23
+ history.push("/".concat(specKey, "/methods"));
24
+ }
25
+ }, [history, methods]);
16
26
 
17
- if (!(methodTag in api.tags)) {
18
- history.push('/methods');
27
+ if (!methods) {
28
+ return React.createElement(React.Fragment, null);
19
29
  }
20
30
 
21
- var methods = api.tags[methodTag];
22
31
  var tag = Object.values(api.spec.tags).find(tag => tag.name === methodTag);
23
32
  var operations = getOperations(methods);
24
- var [value, setValue] = useState('ALL');
25
- useEffect(() => {
26
- setValue('ALL');
27
- }, [methodTag]);
28
33
  return React.createElement(ApixSection, null, React.createElement(DocTitle, null, "".concat(tag.name, ": ").concat(tag.description)), React.createElement(ButtonToggle, {
29
34
  mb: "small",
30
35
  mt: "xlarge",
@@ -38,7 +43,7 @@ export var TagScene = _ref => {
38
43
  key: op,
39
44
  px: "large",
40
45
  py: "xsmall"
41
- }, op))), Object.values(methods).map((method, index) => (value === method.httpMethod || value === 'ALL') && React.createElement(Link, {
46
+ }, op))), Object.values(methods).map((method, index) => (value === 'ALL' || value === method.httpMethod) && React.createElement(Link, {
42
47
  key: index,
43
48
  to: buildMethodPath(specKey, tag.name, method.name)
44
49
  }, React.createElement(Grid, {
@@ -49,4 +54,4 @@ export var TagScene = _ref => {
49
54
  method: method
50
55
  })))));
51
56
  };
52
- //# sourceMappingURL=TagScene.js.map
57
+ //# sourceMappingURL=MethodTagScene.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/scenes/MethodTagScene/MethodTagScene.tsx"],"names":["React","useEffect","useState","useHistory","useParams","Grid","ButtonToggle","ButtonItem","ApixSection","DocTitle","DocMethodSummary","Link","buildMethodPath","getOperations","MethodTagScene","api","specKey","methodTag","history","value","setValue","methods","tags","push","tag","Object","values","spec","find","name","operations","description","map","op","method","index","httpMethod"],"mappings":"AA0BA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,UAAT,EAAqBC,SAArB,QAAsC,kBAAtC;AACA,SAASC,IAAT,EAAeC,YAAf,EAA6BC,UAA7B,QAA+C,oBAA/C;AAEA,SAASC,WAAT,EAAsBC,QAAtB,EAAgCC,gBAAhC,EAAkDC,IAAlD,QAA8D,kBAA9D;AACA,SAASC,eAAT,QAAgC,aAAhC;AACA,SAASC,aAAT,QAA8B,SAA9B;AAWA,OAAO,IAAMC,cAAuC,GAAG,QAAa;AAAA,MAAZ;AAAEC,IAAAA;AAAF,GAAY;AAClE,MAAM;AAAEC,IAAAA,OAAF;AAAWC,IAAAA;AAAX,MAAyBb,SAAS,EAAxC;AACA,MAAMc,OAAO,GAAGf,UAAU,EAA1B;AACA,MAAM,CAACgB,KAAD,EAAQC,QAAR,IAAoBlB,QAAQ,CAAC,KAAD,CAAlC;AAEAD,EAAAA,SAAS,CAAC,MAAM;AAEdmB,IAAAA,QAAQ,CAAC,KAAD,CAAR;AACD,GAHQ,EAGN,CAACH,SAAD,CAHM,CAAT;AAKA,MAAMI,OAAO,GAAGN,GAAG,CAACO,IAAJ,CAASL,SAAT,CAAhB;AACAhB,EAAAA,SAAS,CAAC,MAAM;AACd,QAAI,CAACoB,OAAL,EAAc;AACZH,MAAAA,OAAO,CAACK,IAAR,YAAiBP,OAAjB;AACD;AACF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AAkB,IAAA,EAAE,EAAC;AAArB,KACE,oBAAC,gBAAD;AAAkB,IAAA,GAAG,EAAEM,KAAvB;AAA8B,IAAA,MAAM,EAAED;AAAtC,IADF,CAJF,CAHL,CAZH,CADF;AA4BD,CApDM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { FC } from 'react'\nimport React, { useEffect, useState } from 'react'\nimport { useHistory, useParams } from 'react-router-dom'\nimport { Grid, ButtonToggle, ButtonItem } from '@looker/components'\nimport type { ApiModel } from '@looker/sdk-codegen'\nimport { ApixSection, DocTitle, DocMethodSummary, Link } from '../../components'\nimport { buildMethodPath } from '../../utils'\nimport { getOperations } from './utils'\n\ninterface MethodTagSceneProps {\n api: ApiModel\n}\n\ninterface MethodTagSceneParams {\n specKey: string\n methodTag: string\n}\n\nexport const MethodTagScene: FC<MethodTagSceneProps> = ({ api }) => {\n const { specKey, methodTag } = useParams<MethodTagSceneParams>()\n const history = useHistory()\n const [value, setValue] = useState('ALL')\n\n useEffect(() => {\n /** Reset ButtonToggle value on route change */\n setValue('ALL')\n }, [methodTag])\n\n const methods = api.tags[methodTag]\n useEffect(() => {\n if (!methods) {\n history.push(`/${specKey}/methods`)\n }\n }, [history, methods])\n if (!methods) {\n return <></>\n }\n const tag = Object.values(api.spec.tags!).find(\n (tag) => tag.name === methodTag\n )!\n const operations = getOperations(methods)\n\n return (\n <ApixSection>\n <DocTitle>{`${tag.name}: ${tag.description}`}</DocTitle>\n <ButtonToggle mb=\"small\" mt=\"xlarge\" value={value} onChange={setValue}>\n <ButtonItem key=\"ALL\" px=\"large\" py=\"xsmall\">\n ALL\n </ButtonItem>\n {operations.map((op) => (\n <ButtonItem key={op} px=\"large\" py=\"xsmall\">\n {op}\n </ButtonItem>\n ))}\n </ButtonToggle>\n {Object.values(methods).map(\n (method, index) =>\n (value === 'ALL' || value === method.httpMethod) && (\n <Link\n key={index}\n to={buildMethodPath(specKey, tag.name, method.name)}\n >\n <Grid columns={1} py=\"xsmall\">\n <DocMethodSummary key={index} method={method} />\n </Grid>\n </Link>\n )\n )}\n </ApixSection>\n )\n}\n"],"file":"MethodTagScene.js"}
@@ -0,0 +1,2 @@
1
+ export { MethodTagScene } from './MethodTagScene';
2
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/state/reducers.ts"],"names":["reducers","settings","settingsReducer"],"mappings":";;;;;;;AAyBA;;AACA;;AAEO,IAAMA,QAAQ,GAAG,4BAAgB;AACtCC,EAAAA,QAAQ,EAAEC;AAD4B,CAAhB,CAAjB","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 { combineReducers } from 'redux'\nimport { settingsReducer } from './settings'\n\nexport const reducers = combineReducers({\n settings: settingsReducer,\n})\n\nexport type RootState = ReturnType<typeof reducers>\n"],"file":"reducers.js"}
1
+ {"version":3,"sources":["../../../../src/scenes/MethodTagScene/index.ts"],"names":["MethodTagScene"],"mappings":"AAyBA,SAASA,cAAT,QAA+B,kBAA/B","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { MethodTagScene } from './MethodTagScene'\n"],"file":"index.js"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/scenes/MethodTagScene/utils.ts"],"names":["getOperations","methods","operationsSet","Set","Object","values","forEach","method","add","httpMethod","Array","from"],"mappings":"AA+BA,OAAO,IAAMA,aAAa,GAAIC,OAAD,IAAyB;AACpD,MAAMC,aAAa,GAAG,IAAIC,GAAJ,EAAtB;AACAC,EAAAA,MAAM,CAACC,MAAP,CAAcJ,OAAd,EAAuBK,OAAvB,CAAgCC,MAAD,IAAY;AACzCL,IAAAA,aAAa,CAACM,GAAd,CAAkBD,MAAM,CAACE,UAAzB;AACD,GAFD;AAGA,SAAOC,KAAK,CAACC,IAAN,CAAWT,aAAa,CAACG,MAAd,EAAX,CAAP;AACD,CANM","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 { MethodList } from '@looker/sdk-codegen'\n\n/**\n * Given a list of methods it returns a list of distinct operations\n * @param methods A list of methods\n */\nexport const getOperations = (methods: MethodList) => {\n const operationsSet = new Set<string>()\n Object.values(methods).forEach((method) => {\n operationsSet.add(method.httpMethod)\n })\n return Array.from(operationsSet.values())\n}\n"],"file":"utils.js"}
@@ -1,6 +1,6 @@
1
- import React from 'react';
1
+ import React, { useEffect } from 'react';
2
2
  import { typeRefs, methodRefs } from '@looker/sdk-codegen';
3
- import { useParams } from 'react-router-dom';
3
+ import { useHistory, useParams } from 'react-router-dom';
4
4
  import { Space, Box } from '@looker/components';
5
5
  import { ApixSection, DocReferences, DocSDKs, DocSource, DocTitle, ExploreType, DocSchema } from '../../components';
6
6
  export var TypeScene = _ref => {
@@ -12,14 +12,21 @@ export var TypeScene = _ref => {
12
12
  typeName
13
13
  } = useParams();
14
14
  var type = api.types[typeName];
15
- var typesUsed = typeRefs(api, type.customTypes);
16
- var methodsUsedBy = methodRefs(api, type.methodRefs);
17
- var typesUsedBy = typeRefs(api, type.parentTypes);
18
- return React.createElement(ApixSection, null, React.createElement(Space, null, React.createElement(DocTitle, null, type.name), React.createElement(DocSource, {
15
+ var history = useHistory();
16
+ var typesUsed = typeRefs(api, type === null || type === void 0 ? void 0 : type.customTypes);
17
+ var methodsUsedBy = methodRefs(api, type === null || type === void 0 ? void 0 : type.methodRefs);
18
+ var typesUsedBy = typeRefs(api, type === null || type === void 0 ? void 0 : type.parentTypes);
19
+ useEffect(() => {
20
+ if (!type) {
21
+ history.push("/".concat(specKey, "/types"));
22
+ }
23
+ }, [history, specKey, type]);
24
+ return React.createElement(React.Fragment, null, type && React.createElement(ApixSection, null, React.createElement(Space, null, React.createElement(DocTitle, null, type.name), React.createElement(DocSource, {
19
25
  type: type
20
26
  })), React.createElement(Box, {
21
27
  pb: "xlarge"
22
28
  }, React.createElement(ExploreType, {
29
+ api: api,
23
30
  type: type
24
31
  })), React.createElement(DocReferences, {
25
32
  typesUsed: typesUsed,
@@ -32,6 +39,6 @@ export var TypeScene = _ref => {
32
39
  api: api
33
40
  }), React.createElement(DocSchema, {
34
41
  object: type.schema
35
- }));
42
+ })));
36
43
  };
37
44
  //# sourceMappingURL=TypeScene.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/scenes/TypeScene/TypeScene.tsx"],"names":["React","typeRefs","methodRefs","useParams","Space","Box","ApixSection","DocReferences","DocSDKs","DocSource","DocTitle","ExploreType","DocSchema","TypeScene","api","specKey","typeName","type","types","typesUsed","customTypes","methodsUsedBy","typesUsedBy","parentTypes","name","schema"],"mappings":"AA0BA,OAAOA,KAAP,MAA0B,OAA1B;AACA,SAASC,QAAT,EAAmBC,UAAnB,QAA+C,qBAA/C;AACA,SAASC,SAAT,QAA0B,kBAA1B;AACA,SAASC,KAAT,EAAgBC,GAAhB,QAA2B,oBAA3B;AAEA,SACEC,WADF,EAEEC,aAFF,EAGEC,OAHF,EAIEC,SAJF,EAKEC,QALF,EAMEC,WANF,EAOEC,SAPF,QAQO,kBARP;AAmBA,OAAO,IAAMC,SAA2B,GAAG,QAAa;AAAA,MAAZ;AAAEC,IAAAA;AAAF,GAAY;AACtD,MAAM;AAAEC,IAAAA,OAAF;AAAWC,IAAAA;AAAX,MAAwBb,SAAS,EAAvC;AACA,MAAMc,IAAI,GAAGH,GAAG,CAACI,KAAJ,CAAUF,QAAV,CAAb;AACA,MAAMG,SAAS,GAAGlB,QAAQ,CAACa,GAAD,EAAMG,IAAI,CAACG,WAAX,CAA1B;AACA,MAAMC,aAAa,GAAGnB,UAAU,CAACY,GAAD,EAAMG,IAAI,CAACf,UAAX,CAAhC;AACA,MAAMoB,WAAW,GAAGrB,QAAQ,CAACa,GAAD,EAAMG,IAAI,CAACM,WAAX,CAA5B;AAEA,SACE,oBAAC,WAAD,QACE,oBAAC,KAAD,QACE,oBAAC,QAAD,QAAWN,IAAI,CAACO,IAAhB,CADF,EAEE,oBAAC,SAAD;AAAW,IAAA,IAAI,EAAEP;AAAjB,IAFF,CADF,EAKE,oBAAC,GAAD;AAAK,IAAA,EAAE,EAAC;AAAR,KACE,oBAAC,WAAD;AAAa,IAAA,IAAI,EAAEA;AAAnB,IADF,CALF,EAQE,oBAAC,aAAD;AACE,IAAA,SAAS,EAAEE,SADb;AAEE,IAAA,WAAW,EAAEG,WAFf;AAGE,IAAA,aAAa,EAAED,aAHjB;AAIE,IAAA,GAAG,EAAEP,GAJP;AAKE,IAAA,OAAO,EAAEC;AALX,IARF,EAeE,oBAAC,OAAD;AAAS,IAAA,IAAI,EAAEE,IAAf;AAAqB,IAAA,GAAG,EAAEH;AAA1B,IAfF,EAgBE,oBAAC,SAAD;AAAW,IAAA,MAAM,EAAEG,IAAI,CAACQ;AAAxB,IAhBF,CADF;AAoBD,CA3BM","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 { typeRefs, methodRefs, ApiModel } from '@looker/sdk-codegen'\nimport { useParams } from 'react-router-dom'\nimport { Space, Box } from '@looker/components'\n\nimport {\n ApixSection,\n DocReferences,\n DocSDKs,\n DocSource,\n DocTitle,\n ExploreType,\n DocSchema,\n} from '../../components'\n\ninterface DocTypeProps {\n api: ApiModel\n}\n\ninterface DocTypeParams {\n specKey: string\n typeName: string\n}\n\nexport const TypeScene: FC<DocTypeProps> = ({ api }) => {\n const { specKey, typeName } = useParams<DocTypeParams>()\n const type = api.types[typeName]\n const typesUsed = typeRefs(api, type.customTypes)\n const methodsUsedBy = methodRefs(api, type.methodRefs)\n const typesUsedBy = typeRefs(api, type.parentTypes)\n\n return (\n <ApixSection>\n <Space>\n <DocTitle>{type.name}</DocTitle>\n <DocSource type={type} />\n </Space>\n <Box pb=\"xlarge\">\n <ExploreType type={type} />\n </Box>\n <DocReferences\n typesUsed={typesUsed}\n typesUsedBy={typesUsedBy}\n methodsUsedBy={methodsUsedBy}\n api={api}\n specKey={specKey}\n />\n <DocSDKs type={type} api={api} />\n <DocSchema object={type.schema} />\n </ApixSection>\n )\n}\n"],"file":"TypeScene.js"}
1
+ {"version":3,"sources":["../../../../src/scenes/TypeScene/TypeScene.tsx"],"names":["React","useEffect","typeRefs","methodRefs","useHistory","useParams","Space","Box","ApixSection","DocReferences","DocSDKs","DocSource","DocTitle","ExploreType","DocSchema","TypeScene","api","specKey","typeName","type","types","history","typesUsed","customTypes","methodsUsedBy","typesUsedBy","parentTypes","push","name","schema"],"mappings":"AA2BA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AAEA,SAASC,QAAT,EAAmBC,UAAnB,QAAqC,qBAArC;AACA,SAASC,UAAT,EAAqBC,SAArB,QAAsC,kBAAtC;AACA,SAASC,KAAT,EAAgBC,GAAhB,QAA2B,oBAA3B;AAEA,SACEC,WADF,EAEEC,aAFF,EAGEC,OAHF,EAIEC,SAJF,EAKEC,QALF,EAMEC,WANF,EAOEC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,EAAER,GAJP;AAKE,IAAA,OAAO,EAAEC;AALX,IARF,EAeE,oBAAC,OAAD;AAAS,IAAA,IAAI,EAAEE,IAAf;AAAqB,IAAA,GAAG,EAAEH;AAA1B,IAfF,EAgBE,oBAAC,SAAD;AAAW,IAAA,MAAM,EAAEG,IAAI,CAACU;AAAxB,IAhBF,CAFJ,CADF;AAwBD,CArCM","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, { useEffect } from 'react'\nimport type { ApiModel } from '@looker/sdk-codegen'\nimport { typeRefs, methodRefs } from '@looker/sdk-codegen'\nimport { useHistory, useParams } from 'react-router-dom'\nimport { Space, Box } from '@looker/components'\n\nimport {\n ApixSection,\n DocReferences,\n DocSDKs,\n DocSource,\n DocTitle,\n ExploreType,\n DocSchema,\n} from '../../components'\n\ninterface DocTypeProps {\n api: ApiModel\n}\n\ninterface DocTypeParams {\n specKey: string\n typeName: string\n}\n\nexport const TypeScene: FC<DocTypeProps> = ({ api }) => {\n const { specKey, typeName } = useParams<DocTypeParams>()\n const type = api.types[typeName]\n const history = useHistory()\n const typesUsed = typeRefs(api, type?.customTypes)\n const methodsUsedBy = methodRefs(api, type?.methodRefs)\n const typesUsedBy = typeRefs(api, type?.parentTypes)\n useEffect(() => {\n if (!type) {\n history.push(`/${specKey}/types`)\n }\n }, [history, specKey, type])\n\n return (\n <>\n {type && (\n <ApixSection>\n <Space>\n <DocTitle>{type.name}</DocTitle>\n <DocSource type={type} />\n </Space>\n <Box pb=\"xlarge\">\n <ExploreType api={api} type={type} />\n </Box>\n <DocReferences\n typesUsed={typesUsed}\n typesUsedBy={typesUsedBy}\n methodsUsedBy={methodsUsedBy}\n api={api}\n specKey={specKey}\n />\n <DocSDKs type={type} api={api} />\n <DocSchema object={type.schema} />\n </ApixSection>\n )}\n </>\n )\n}\n"],"file":"TypeScene.js"}
@@ -0,0 +1,57 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { Grid, ButtonToggle, ButtonItem } from '@looker/components';
3
+ import { useParams, useHistory } from 'react-router-dom';
4
+ import { ApixSection, DocTitle, DocTypeSummary, Link } from '../../components';
5
+ import { buildTypePath } from '../../utils';
6
+ import { getMetaTypes } from './utils';
7
+ export var TypeTagScene = _ref => {
8
+ var {
9
+ api
10
+ } = _ref;
11
+ var {
12
+ specKey,
13
+ typeTag
14
+ } = useParams();
15
+ var history = useHistory();
16
+ var [value, setValue] = useState('ALL');
17
+ useEffect(() => {
18
+ setValue('ALL');
19
+ }, [typeTag]);
20
+ var types = api.typeTags[typeTag];
21
+ useEffect(() => {
22
+ if (!types) {
23
+ history.push("/".concat(specKey, "/types"));
24
+ }
25
+ }, [history, types]);
26
+
27
+ if (!types) {
28
+ return React.createElement(React.Fragment, null);
29
+ }
30
+
31
+ var tag = Object.values(api.spec.tags).find(tag => tag.name === typeTag);
32
+ var metaTypes = getMetaTypes(types);
33
+ return React.createElement(ApixSection, null, React.createElement(DocTitle, null, "".concat(tag.name, ": ").concat(tag.description)), React.createElement(ButtonToggle, {
34
+ mb: "small",
35
+ mt: "xlarge",
36
+ value: value,
37
+ onChange: setValue
38
+ }, React.createElement(ButtonItem, {
39
+ key: "ALL",
40
+ px: "large",
41
+ py: "xsmall"
42
+ }, "ALL"), metaTypes.map(op => React.createElement(ButtonItem, {
43
+ key: op,
44
+ px: "large",
45
+ py: "xsmall"
46
+ }, op))), Object.values(types).map((type, index) => (value === 'ALL' || value === type.metaType.toString().toUpperCase()) && React.createElement(Link, {
47
+ key: index,
48
+ to: buildTypePath(specKey, tag.name, type.name)
49
+ }, React.createElement(Grid, {
50
+ columns: 1,
51
+ py: "xsmall"
52
+ }, React.createElement(DocTypeSummary, {
53
+ key: index,
54
+ type: type
55
+ })))));
56
+ };
57
+ //# sourceMappingURL=TypeTagScene.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/scenes/TypeTagScene/TypeTagScene.tsx"],"names":["React","useEffect","useState","Grid","ButtonToggle","ButtonItem","useParams","useHistory","ApixSection","DocTitle","DocTypeSummary","Link","buildTypePath","getMetaTypes","TypeTagScene","api","specKey","typeTag","history","value","setValue","types","typeTags","push","tag","Object","values","spec","tags","find","name","metaTypes","description","map","op","type","index","metaType","toString","toUpperCase"],"mappings":"AA0BA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,IAAT,EAAeC,YAAf,EAA6BC,UAA7B,QAA+C,oBAA/C;AAEA,SAASC,SAAT,EAAoBC,UAApB,QAAsC,kBAAtC;AACA,SAASC,WAAT,EAAsBC,QAAtB,EAAgCC,cAAhC,EAAgDC,IAAhD,QAA4D,kBAA5D;AACA,SAASC,aAAT,QAA8B,aAA9B;AACA,SAASC,YAAT,QAA6B,SAA7B;AAWA,OAAO,IAAMC,YAAmC,GAAG,QAAa;AAAA,MAAZ;AAAEC,IAAAA;AAAF,GAAY;AAC9D,MAAM;AAAEC,IAAAA,OA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B;AAAqB,IAAA,EAAE,EAAC,OAAxB;AAAgC,IAAA,EAAE,EAAC;AAAnC,KACGA,EADH,CADD,CAJH,CAFF,EAYGT,MAAM,CAACC,MAAP,CAAcL,KAAd,EAAqBY,GAArB,CACC,CAACE,IAAD,EAAOC,KAAP,KACE,CAACjB,KAAK,KAAK,KAAV,IACCA,KAAK,KAAKgB,IAAI,CAACE,QAAL,CAAcC,QAAd,GAAyBC,WAAzB,EADZ,KAEE,oBAAC,IAAD;AAAM,IAAA,GAAG,EAAEH,KAAX;AAAkB,IAAA,EAAE,EAAExB,aAAa,CAACI,OAAD,EAAUQ,GAAG,CAACM,IAAd,EAAoBK,IAAI,CAACL,IAAzB;AAAnC,KACE,oBAAC,IAAD;AAAM,IAAA,OAAO,EAAE,CAAf;AAAkB,IAAA,EAAE,EAAC;AAArB,KACE,oBAAC,cAAD;AAAgB,IAAA,GAAG,EAAEM,KAArB;AAA4B,IAAA,IAAI,EAAED;AAAlC,IADF,CADF,CAJL,CAZH,CADF;AA0BD,CAjDM","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, { useEffect, useState } from 'react'\nimport { Grid, ButtonToggle, ButtonItem } from '@looker/components'\nimport type { ApiModel } from '@looker/sdk-codegen'\nimport { useParams, useHistory } from 'react-router-dom'\nimport { ApixSection, DocTitle, DocTypeSummary, Link } from '../../components'\nimport { buildTypePath } from '../../utils'\nimport { getMetaTypes } from './utils'\n\ninterface TypeTagSceneProps {\n api: ApiModel\n}\n\ninterface TypeTagSceneParams {\n specKey: string\n typeTag: string\n}\n\nexport const TypeTagScene: FC<TypeTagSceneProps> = ({ api }) => {\n const { specKey, typeTag } = useParams<TypeTagSceneParams>()\n const history = useHistory()\n const [value, setValue] = useState('ALL')\n\n useEffect(() => {\n /** Reset ButtonToggle value on route change */\n setValue('ALL')\n }, [typeTag])\n\n const types = api.typeTags[typeTag]\n useEffect(() => {\n if (!types) {\n history.push(`/${specKey}/types`)\n }\n }, [history, types])\n\n if (!types) {\n return <></>\n }\n\n const tag = Object.values(api.spec.tags!).find((tag) => tag.name === typeTag)!\n const metaTypes = getMetaTypes(types)\n return (\n <ApixSection>\n <DocTitle>{`${tag.name}: ${tag.description}`}</DocTitle>\n <ButtonToggle mb=\"small\" mt=\"xlarge\" value={value} onChange={setValue}>\n <ButtonItem key=\"ALL\" px=\"large\" py=\"xsmall\">\n ALL\n </ButtonItem>\n {metaTypes.map((op) => (\n <ButtonItem key={op} px=\"large\" py=\"xsmall\">\n {op}\n </ButtonItem>\n ))}\n </ButtonToggle>\n {Object.values(types).map(\n (type, index) =>\n (value === 'ALL' ||\n value === type.metaType.toString().toUpperCase()) && (\n <Link key={index} to={buildTypePath(specKey, tag.name, type.name)}>\n <Grid columns={1} py=\"xsmall\">\n <DocTypeSummary key={index} type={type} />\n </Grid>\n </Link>\n )\n )}\n </ApixSection>\n )\n}\n"],"file":"TypeTagScene.js"}
@@ -0,0 +1,2 @@
1
+ export { TypeTagScene } from './TypeTagScene';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/scenes/TypeTagScene/index.ts"],"names":["TypeTagScene"],"mappings":"AAyBA,SAASA,YAAT,QAA6B,gBAA7B","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { TypeTagScene } from './TypeTagScene'\n"],"file":"index.js"}
@@ -0,0 +1,8 @@
1
+ export var getMetaTypes = types => {
2
+ var typeSet = new Set();
3
+ Object.values(types).forEach(type => {
4
+ typeSet.add(type.metaType.toString().toUpperCase());
5
+ });
6
+ return Array.from(typeSet.values());
7
+ };
8
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/scenes/TypeTagScene/utils.ts"],"names":["getMetaTypes","types","typeSet","Set","Object","values","forEach","type","add","metaType","toString","toUpperCase","Array","from"],"mappings":"AAgCA,OAAO,IAAMA,YAAY,GAAIC,KAAD,IAAqB;AAC/C,MAAMC,OAAO,GAAG,IAAIC,GAAJ,EAAhB;AACAC,EAAAA,MAAM,CAACC,MAAP,CAAcJ,KAAd,EAAqBK,OAArB,CAA8BC,IAAD,IAAU;AACrCL,IAAAA,OAAO,CAACM,GAAR,CAAYD,IAAI,CAACE,QAAL,CAAcC,QAAd,GAAyBC,WAAzB,EAAZ;AACD,GAFD;AAGA,SAAOC,KAAK,CAACC,IAAN,CAAWX,OAAO,CAACG,MAAR,EAAX,CAAP;AACD,CANM","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 { TypeList } from '@looker/sdk-codegen'\n\n/**\n * Given a list of types it returns a list of distinct types\n * @param types A list of types\n */\nexport const getMetaTypes = (types: TypeList) => {\n const typeSet = new Set<string>()\n Object.values(types).forEach((type) => {\n typeSet.add(type.metaType.toString().toUpperCase())\n })\n return Array.from(typeSet.values())\n}\n"],"file":"utils.js"}
@@ -1,5 +1,6 @@
1
1
  export { HomeScene } from './HomeScene';
2
2
  export { MethodScene } from './MethodScene';
3
3
  export { TypeScene } from './TypeScene';
4
- export { TagScene } from './TagScene';
4
+ export { MethodTagScene } from './MethodTagScene';
5
+ export { TypeTagScene } from './TypeTagScene';
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/scenes/index.ts"],"names":["HomeScene","MethodScene","TypeScene","TagScene"],"mappings":"AAyBA,SAASA,SAAT,QAA0B,aAA1B;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,QAAT,QAAyB,YAAzB","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { HomeScene } from './HomeScene'\nexport { MethodScene } from './MethodScene'\nexport { TypeScene } from './TypeScene'\nexport { TagScene } from './TagScene'\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/scenes/index.ts"],"names":["HomeScene","MethodScene","TypeScene","MethodTagScene","TypeTagScene"],"mappings":"AAyBA,SAASA,SAAT,QAA0B,aAA1B;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,cAAT,QAA+B,kBAA/B;AACA,SAASC,YAAT,QAA6B,gBAA7B","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { HomeScene } from './HomeScene'\nexport { MethodScene } from './MethodScene'\nexport { TypeScene } from './TypeScene'\nexport { MethodTagScene } from './MethodTagScene'\nexport { TypeTagScene } from './TypeTagScene'\n"],"file":"index.js"}
@@ -1,5 +1,4 @@
1
- import * as _actionCreators from './action_creators';
2
- export { _actionCreators as actionCreators };
3
- export * from './settings';
4
1
  export * from './store';
2
+ export * from './settings';
3
+ export * from './lodes';
5
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/state/index.ts"],"names":["actionCreators"],"mappings":"iCAyBgC,mB;4BAApBA,c;AACZ,cAAc,YAAd;AACA,cAAc,SAAd","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * as actionCreators from './action_creators'\nexport * from './settings'\nexport * from './store'\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/state/index.ts"],"names":[],"mappings":"AAyBA,cAAc,SAAd;AACA,cAAc,YAAd;AACA,cAAc,SAAd","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * from './store'\nexport * from './settings'\nexport * from './lodes'\n"],"file":"index.js"}
@@ -0,0 +1,3 @@
1
+ export * from './selectors';
2
+ export * from './slice';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/state/lodes/index.ts"],"names":[],"mappings":"AAyBA,cAAc,aAAd;AACA,cAAc,SAAd","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * from './selectors'\nexport * from './slice'\n"],"file":"index.js"}
@@ -0,0 +1,25 @@
1
+ import { call, put, takeEvery } from 'typed-redux-saga';
2
+ import { getLoded } from '../../utils';
3
+ import { lodeActions } from './slice';
4
+
5
+ function* initSaga(action) {
6
+ var {
7
+ initLodesSuccessAction,
8
+ initLodesFailureAction
9
+ } = lodeActions;
10
+
11
+ try {
12
+ var lode = yield* call(getLoded, action.payload.examplesLodeUrl, action.payload.declarationsLodeUrl);
13
+ yield* put(initLodesSuccessAction(lode));
14
+ } catch (error) {
15
+ yield* put(initLodesFailureAction(error));
16
+ }
17
+ }
18
+
19
+ export function* saga() {
20
+ var {
21
+ initLodesAction
22
+ } = lodeActions;
23
+ yield* takeEvery(initLodesAction, initSaga);
24
+ }
25
+ //# sourceMappingURL=sagas.js.map