@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,55 +1,106 @@
1
- import React, { useContext } from 'react';
2
- import { Heading } from '@looker/components';
3
- import { IntrinsicType } from '@looker/sdk-codegen';
1
+ import React, { useEffect, useState } from 'react';
4
2
  import styled from 'styled-components';
3
+ import { Accordion2, Heading } from '@looker/components';
4
+ import { useHistory, useRouteMatch } from 'react-router-dom';
5
+ import { useSelector } from 'react-redux';
5
6
  import { Link } from '../Link';
6
7
  import { buildTypePath, highlightHTML } from '../../utils';
7
- import { SearchContext } from '../../context';
8
- export var SideNavTypes = _ref => {
8
+ import { selectSearchPattern } from '../../state';
9
+ export var SideNavTypes = styled(_ref => {
9
10
  var {
11
+ className,
10
12
  types,
11
- specKey
13
+ tag,
14
+ specKey,
15
+ defaultOpen = false
12
16
  } = _ref;
13
- var {
14
- searchSettings: {
15
- pattern
16
- }
17
- } = useContext(SearchContext);
18
- return React.createElement(React.Fragment, null, Object.values(types).filter(type => !(type instanceof IntrinsicType)).map(type => React.createElement(SideNavLink, {
19
- key: type.name,
20
- to: "".concat(buildTypePath(specKey, type.name))
21
- }, React.createElement(Heading, {
22
- as: "h5",
23
- truncate: true
24
- }, highlightHTML(pattern, type.name)))));
25
- };
26
- var SideNavLink = styled(Link).withConfig({
27
- displayName: "SideNavTypes__SideNavLink",
17
+ var searchPattern = useSelector(selectSearchPattern);
18
+ var match = useRouteMatch("/:specKey/types/:typeTag/:typeName?");
19
+ var [isOpen, setIsOpen] = useState(defaultOpen);
20
+ var history = useHistory();
21
+
22
+ var handleOpen = () => {
23
+ var _isOpen = !isOpen;
24
+
25
+ setIsOpen(_isOpen);
26
+ if (_isOpen) history.push("/".concat(specKey, "/types/").concat(tag));
27
+ };
28
+
29
+ useEffect(() => {
30
+ var status = match ? defaultOpen || match.params.typeTag === tag : defaultOpen;
31
+ setIsOpen(status);
32
+ }, [defaultOpen]);
33
+ return React.createElement(Accordion2, {
34
+ isOpen: isOpen,
35
+ toggleOpen: handleOpen,
36
+ className: className,
37
+ label: React.createElement(Heading, {
38
+ as: "h4",
39
+ fontSize: "small",
40
+ py: "xsmall"
41
+ }, highlightHTML(searchPattern, tag))
42
+ }, React.createElement("ul", null, Object.values(types).map(type => React.createElement("li", {
43
+ key: type.name
44
+ }, React.createElement(Link, {
45
+ to: "".concat(buildTypePath(specKey, tag, type.name))
46
+ }, highlightHTML(searchPattern, type.name))))));
47
+ }).withConfig({
48
+ displayName: "SideNavTypes",
28
49
  componentId: "vqik31-0"
29
- })(["display:block;padding:", ";&:hover,&:focus{", "{color:", ";}}&.active{", "{color:", ";font-weight:", ";}}"], _ref2 => {
30
- var {
31
- theme: {
32
- space: {
33
- xsmall,
34
- large
35
- }
36
- }
50
+ })(["font-family:", ";[aria-controls]:hover,[aria-expanded='true']{h4,svg{color:", ";}}[aria-expanded='true'] h4{font-weight:", ";}ul{border-left:dashed 1px ", ";list-style:none;margin:0;padding:0;padding-left:", ";padding-top:", ";}[aria-current]{background:", ";font-weight:", ";}", "{border-radius:", ";display:block;overflow:hidden;padding:", ";text-overflow:ellipsis;white-space:nowrap;&:hover,&:focus,&.active{background:", ";}}"], _ref2 => {
51
+ var {
52
+ theme
37
53
  } = _ref2;
38
- return "".concat(xsmall, " ").concat(large);
39
- }, Heading, _ref3 => {
54
+ return theme.fonts.brand;
55
+ }, _ref3 => {
40
56
  var {
41
57
  theme
42
58
  } = _ref3;
43
59
  return theme.colors.key;
44
- }, Heading, _ref4 => {
60
+ }, _ref4 => {
45
61
  var {
46
62
  theme
47
63
  } = _ref4;
48
- return theme.colors.key;
64
+ return theme.fontWeights.semiBold;
49
65
  }, _ref5 => {
50
66
  var {
51
67
  theme
52
68
  } = _ref5;
69
+ return theme.colors.ui2;
70
+ }, _ref6 => {
71
+ var {
72
+ theme
73
+ } = _ref6;
74
+ return theme.space.xxsmall;
75
+ }, _ref7 => {
76
+ var {
77
+ theme
78
+ } = _ref7;
79
+ return theme.space.xxsmall;
80
+ }, _ref8 => {
81
+ var {
82
+ theme
83
+ } = _ref8;
84
+ return theme.colors.ui1;
85
+ }, _ref9 => {
86
+ var {
87
+ theme
88
+ } = _ref9;
53
89
  return theme.fontWeights.semiBold;
90
+ }, Link, _ref10 => {
91
+ var {
92
+ theme
93
+ } = _ref10;
94
+ return theme.radii.medium;
95
+ }, _ref11 => {
96
+ var {
97
+ theme
98
+ } = _ref11;
99
+ return theme.space.xsmall;
100
+ }, _ref12 => {
101
+ var {
102
+ theme
103
+ } = _ref12;
104
+ return theme.colors.ui1;
54
105
  });
55
106
  //# sourceMappingURL=SideNavTypes.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/SideNav/SideNavTypes.tsx"],"names":["React","useContext","Heading","IntrinsicType","styled","Link","buildTypePath","highlightHTML","SearchContext","SideNavTypes","types","specKey","searchSettings","pattern","Object","values","filter","type","map","name","SideNavLink","theme","space","xsmall","large","colors","key","fontWeights","semiBold"],"mappings":"AA0BA,OAAOA,KAAP,IAAoBC,UAApB,QAAsC,OAAtC;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAAmBC,aAAnB,QAAwC,qBAAxC;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAASC,IAAT,QAAqB,SAArB;AACA,SAASC,aAAT,EAAwBC,aAAxB,QAA6C,aAA7C;AACA,SAASC,aAAT,QAA8B,eAA9B;AAOA,OAAO,IAAMC,YAA2B,GAAG,QAAwB;AAAA,MAAvB;AAAEC,IAAAA,KAAF;AAASC,IAAAA;AAAT,GAAuB;AACjE,MAAM;AACJC,IAAAA,cAAc,EAAE;AAAEC,MAAAA;AAAF;AADZ,MAEFZ,UAAU,CAACO,aAAD,CAFd;AAIA,SACE,0CACGM,MAAM,CAACC,MAAP,CAAcL,KAAd,EACEM,MADF,CACUC,IAAD,IAAU,EAAEA,IAAI,YAAYd,aAAlB,CADnB,EAEEe,GAFF,CAEOD,IAAD,IACH,oBAAC,WAAD;AACE,IAAA,GAAG,EAAEA,IAAI,CAACE,IADZ;AAEE,IAAA,EAAE,YAAKb,aAAa,CAACK,OAAD,EAAUM,IAAI,CAACE,IAAf,CAAlB;AAFJ,KAIE,oBAAC,OAAD;AAAS,IAAA,EAAE,EAAC,IAAZ;AAAiB,IAAA,QAAQ;AAAzB,KACGZ,aAAa,CAACM,OAAD,EAAUI,IAAI,CAACE,IAAf,CADhB,CAJF,CAHH,CADH,CADF;AAgBD,CArBM;AAuBP,IAAMC,WAAW,GAAGhB,MAAM,CAACC,IAAD,CAAT;AAAA;AAAA;AAAA,kHAEJ;AAAA,MAAC;AACVgB,IAAAA,KAAK,EAAE;AACLC,MAAAA,KAAK,EAAE;AAAEC,QAAAA,MAAF;AAAUC,QAAAA;AAAV;AADF;AADG,GAAD;AAAA,mBAIFD,MAJE,cAIQC,KAJR;AAAA,CAFI,EAUXtB,OAVW,EAWF;AAAA,MAAC;AAAEmB,IAAAA;AAAF,GAAD;AAAA,SAAeA,KAAK,CAACI,MAAN,CAAaC,GAA5B;AAAA,CAXE,EAgBXxB,OAhBW,EAiBF;AAAA,MAAC;AAAEmB,IAAAA;AAAF,GAAD;AAAA,SAAeA,KAAK,CAACI,MAAN,CAAaC,GAA5B;AAAA,CAjBE,EAkBI;AAAA,MAAC;AAAEL,IAAAA;AAAF,GAAD;AAAA,SAAeA,KAAK,CAACM,WAAN,CAAkBC,QAAjC;AAAA,CAlBJ,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 */\n\nimport React, { FC, useContext } from 'react'\nimport { Heading } from '@looker/components'\nimport { TypeList, IntrinsicType } from '@looker/sdk-codegen'\nimport styled from 'styled-components'\nimport { Link } from '../Link'\nimport { buildTypePath, highlightHTML } from '../../utils'\nimport { SearchContext } from '../../context'\n\ninterface TypeProps {\n specKey: string\n types: TypeList\n}\n\nexport const SideNavTypes: FC<TypeProps> = ({ types, specKey }) => {\n const {\n searchSettings: { pattern },\n } = useContext(SearchContext)\n\n return (\n <>\n {Object.values(types)\n .filter((type) => !(type instanceof IntrinsicType))\n .map((type) => (\n <SideNavLink\n key={type.name}\n to={`${buildTypePath(specKey, type.name)}`}\n >\n <Heading as=\"h5\" truncate>\n {highlightHTML(pattern, type.name)}\n </Heading>\n </SideNavLink>\n ))}\n </>\n )\n}\n\nconst SideNavLink = styled(Link)`\n display: block;\n padding: ${({\n theme: {\n space: { xsmall, large },\n },\n }) => `${xsmall} ${large}`};\n\n &:hover,\n &:focus {\n ${Heading} {\n color: ${({ theme }) => theme.colors.key};\n }\n }\n\n &.active {\n ${Heading} {\n color: ${({ theme }) => theme.colors.key};\n font-weight: ${({ theme }) => theme.fontWeights.semiBold};\n }\n }\n`\n"],"file":"SideNavTypes.js"}
1
+ {"version":3,"sources":["../../../../src/components/SideNav/SideNavTypes.tsx"],"names":["React","useEffect","useState","styled","Accordion2","Heading","useHistory","useRouteMatch","useSelector","Link","buildTypePath","highlightHTML","selectSearchPattern","SideNavTypes","className","types","tag","specKey","defaultOpen","searchPattern","match","isOpen","setIsOpen","history","handleOpen","_isOpen","push","status","params","typeTag","Object","values","map","type","name","theme","fonts","brand","colors","key","fontWeights","semiBold","ui2","space","xxsmall","ui1","radii","medium","xsmall"],"mappings":"AA0BA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAASC,UAAT,EAAqBC,OAArB,QAAoC,oBAApC;AAEA,SAASC,UAAT,EAAqBC,aAArB,QAA0C,kBAA1C;AACA,SAASC,WAAT,QAA4B,aAA5B;AAEA,SAASC,IAAT,QAAqB,SAArB;AACA,SAASC,aAAT,EAAwBC,aAAxB,QAA6C,aAA7C;AACA,SAASC,mBAAT,QAAoC,aAApC;AAUA,OAAO,IAAMC,YAAY,GAAGV,MAAM,CAChC,QAAyE;AAAA,MAAxE;AAAEW,IAAAA,SAAF;AAAaC,IAAAA,KAAb;AAAoBC,IAAAA,GAApB;AAAyBC,IAAAA,OAAzB;AAAkCC,IAAAA,WAAW,GAAG;AAAhD,GAAwE;AACvE,MAAMC,aAAa,GAAGX,WAAW,CAACI,mBAAD,CAAjC;AACA,MAAMQ,KAAK,GAAGb,aAAa,uCAA3B;AAGA,MAAM,CAACc,MAAD,EAASC,SAAT,IAAsBpB,QAAQ,CAACgB,WAAD,CAApC;AACA,MAAMK,OAAO,GAAGjB,UAAU,EAA1B;;AAEA,MAAMkB,UAAU,GAAG,MAAM;AACvB,QAAMC,OAAO,GAAG,CAACJ,MAAjB;;AACAC,IAAAA,SAAS,CAACG,OAAD,CAAT;AACA,QAAIA,OAAJ,EAAaF,OAAO,CAACG,IAAR,YAAiBT,OAAjB,oBAAkCD,GAAlC;AACd,GAJD;;AAMAf,EAAAA,SAAS,CAAC,MAAM;AACd,QAAM0B,MAAM,GAAGP,KAAK,GAChBF,WAAW,IAAIE,KAAK,CAACQ,MAAN,CAAaC,OAAb,KAAyBb,GADxB,GAEhBE,WAFJ;AAGAI,IAAAA,SAAS,CAACK,MAAD,CAAT;AACD,GALQ,EAKN,CAACT,WAAD,CALM,CAAT;AAQA,SACE,oBAAC,UAAD;AACE,IAAA,MAAM,EAAEG,MADV;AAEE,IAAA,UAAU,EAAEG,UAFd;AAGE,IAAA,SAAS,EAAEV,SAHb;AAIE,IAAA,KAAK,EACH,oBAAC,OAAD;AAAS,MAAA,EAAE,EAAC,IAAZ;AAAiB,MAAA,QAAQ,EAAC,OAA1B;AAAkC,MAAA,EAAE,EAAC;AAArC,OACGH,aAAa,CAACQ,aAAD,EAAgBH,GAAhB,CADhB;AALJ,KAUE,gCACGc,MAAM,CAACC,MAAP,CAAchB,KAAd,EAAqBiB,GAArB,CAA0BC,IAAD,IACxB;AAAI,IAAA,GAAG,EAAEA,IAAI,CAACC;AAAd,KACE,oBAAC,IAAD;AAAM,IAAA,EAAE,YAAKxB,aAAa,CAACO,OAAD,EAAUD,GAAV,EAAeiB,IAAI,CAACC,IAApB,CAAlB;AAAR,KACGvB,aAAa,CAACQ,aAAD,EAAgBc,IAAI,CAACC,IAArB,CADhB,CADF,CADD,CADH,CAVF,CADF;AAsBD,CA7C+B,CAAT;AAAA;AAAA;AAAA,sbA+CR;AAAA,MAAC;AAAEC,IAAAA;AAAF,GAAD;AAAA,SAAeA,KAAK,CAACC,KAAN,CAAYC,KAA3B;AAAA,CA/CQ,EAqDV;AAAA,MAAC;AAAEF,IAAAA;AAAF,GAAD;AAAA,SAAeA,KAAK,CAACG,MAAN,CAAaC,GAA5B;AAAA,CArDU,EA0DN;AAAA,MAAC;AAAEJ,IAAAA;AAAF,GAAD;AAAA,SAAeA,KAAK,CAACK,WAAN,CAAkBC,QAAjC;AAAA,CA1DM,EA8DK;AAAA,MAAC;AAAEN,IAAAA;AAAF,GAAD;AAAA,SAAeA,KAAK,CAACG,MAAN,CAAaI,GAA5B;AAAA,CA9DL,EAkEL;AAAA,MAAC;AAAEP,IAAAA;AAAF,GAAD;AAAA,SAAeA,KAAK,CAACQ,KAAN,CAAYC,OAA3B;AAAA,CAlEK,EAmEN;AAAA,MAAC;AAAET,IAAAA;AAAF,GAAD;AAAA,SAAeA,KAAK,CAACQ,KAAN,CAAYC,OAA3B;AAAA,CAnEM,EAuEP;AAAA,MAAC;AAAET,IAAAA;AAAF,GAAD;AAAA,SAAeA,KAAK,CAACG,MAAN,CAAaO,GAA5B;AAAA,CAvEO,EAwEN;AAAA,MAAC;AAAEV,IAAAA;AAAF,GAAD;AAAA,SAAeA,KAAK,CAACK,WAAN,CAAkBC,QAAjC;AAAA,CAxEM,EA2ErBhC,IA3EqB,EA4EJ;AAAA,MAAC;AAAE0B,IAAAA;AAAF,GAAD;AAAA,SAAeA,KAAK,CAACW,KAAN,CAAYC,MAA3B;AAAA,CA5EI,EA+EV;AAAA,MAAC;AAAEZ,IAAAA;AAAF,GAAD;AAAA,SAAeA,KAAK,CAACQ,KAAN,CAAYK,MAA3B;AAAA,CA/EU,EAsFL;AAAA,MAAC;AAAEb,IAAAA;AAAF,GAAD;AAAA,SAAeA,KAAK,CAACG,MAAN,CAAaO,GAA5B;AAAA,CAtFK,CAAlB","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { useEffect, useState } from 'react'\nimport styled from 'styled-components'\nimport { Accordion2, Heading } from '@looker/components'\nimport type { TypeList } from '@looker/sdk-codegen'\nimport { useHistory, useRouteMatch } from 'react-router-dom'\nimport { useSelector } from 'react-redux'\n\nimport { Link } from '../Link'\nimport { buildTypePath, highlightHTML } from '../../utils'\nimport { selectSearchPattern } from '../../state'\n\ninterface TypesProps {\n types: TypeList\n tag: string\n specKey: string\n className?: string\n defaultOpen?: boolean\n}\n\nexport const SideNavTypes = styled(\n ({ className, types, tag, specKey, defaultOpen = false }: TypesProps) => {\n const searchPattern = useSelector(selectSearchPattern)\n const match = useRouteMatch<{ typeTag: string }>(\n `/:specKey/types/:typeTag/:typeName?`\n )\n const [isOpen, setIsOpen] = useState(defaultOpen)\n const history = useHistory()\n\n const handleOpen = () => {\n const _isOpen = !isOpen\n setIsOpen(_isOpen)\n if (_isOpen) history.push(`/${specKey}/types/${tag}`)\n }\n\n useEffect(() => {\n const status = match\n ? defaultOpen || match.params.typeTag === tag\n : defaultOpen\n setIsOpen(status)\n }, [defaultOpen])\n\n /* TODO: Fix highlighting. It is applied but it is somehow being overridden */\n return (\n <Accordion2\n isOpen={isOpen}\n toggleOpen={handleOpen}\n className={className}\n label={\n <Heading as=\"h4\" fontSize=\"small\" py=\"xsmall\">\n {highlightHTML(searchPattern, tag)}\n </Heading>\n }\n >\n <ul>\n {Object.values(types).map((type) => (\n <li key={type.name}>\n <Link to={`${buildTypePath(specKey, tag, type.name)}`}>\n {highlightHTML(searchPattern, type.name)}\n </Link>\n </li>\n ))}\n </ul>\n </Accordion2>\n )\n }\n)`\n font-family: ${({ theme }) => theme.fonts.brand};\n\n [aria-controls]:hover,\n [aria-expanded='true'] {\n h4,\n svg {\n color: ${({ theme }) => theme.colors.key};\n }\n }\n\n [aria-expanded='true'] h4 {\n font-weight: ${({ theme }) => theme.fontWeights.semiBold};\n }\n\n ul {\n border-left: dashed 1px ${({ theme }) => theme.colors.ui2};\n list-style: none;\n margin: 0;\n padding: 0;\n padding-left: ${({ theme }) => theme.space.xxsmall};\n padding-top: ${({ theme }) => theme.space.xxsmall};\n }\n\n [aria-current] {\n background: ${({ theme }) => theme.colors.ui1};\n font-weight: ${({ theme }) => theme.fontWeights.semiBold};\n }\n\n ${Link} {\n border-radius: ${({ theme }) => theme.radii.medium};\n display: block;\n overflow: hidden;\n padding: ${({ theme }) => theme.space.xsmall};\n text-overflow: ellipsis;\n white-space: nowrap;\n\n &:hover,\n &:focus,\n &.active {\n background: ${({ theme }) => theme.colors.ui1};\n }\n }\n`\n"],"file":"SideNavTypes.js"}
@@ -1,6 +1,6 @@
1
1
  import { useState, useEffect } from 'react';
2
2
  export var useDebounce = (value, delay) => {
3
- var [debouncedValue, setDebouncedValue] = useState();
3
+ var [debouncedValue, setDebouncedValue] = useState(value);
4
4
  useEffect(() => {
5
5
  var handler = setTimeout(() => {
6
6
  setDebouncedValue(value);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/SideNav/searchUtils.tsx"],"names":["useState","useEffect","useDebounce","value","delay","debouncedValue","setDebouncedValue","handler","setTimeout","clearTimeout","countMethods","tags","result","Object","values","forEach","methods","entries","length","countTypes","types"],"mappings":"AA0BA,SAASA,QAAT,EAAmBC,SAAnB,QAAoC,OAApC;AAGA,OAAO,IAAMC,WAAW,GAAG,CAACC,KAAD,EAAaC,KAAb,KAA+B;AACxD,MAAM,CAACC,cAAD,EAAiBC,iBAAjB,IAAsCN,QAAQ,EAApD;AACAC,EAAAA,SAAS,CAAC,MAAM;AAEd,QAAMM,OAAO,GAAGC,UAAU,CAAC,MAAM;AAC/BF,MAAAA,iBAAiB,CAACH,KAAD,CAAjB;AACD,KAFyB,EAEvBC,KAFuB,CAA1B;AAIA,WAAO,MAAM;AACXK,MAAAA,YAAY,CAACF,OAAD,CAAZ;AACD,KAFD;AAGD,GATQ,EASN,CAACJ,KAAD,CATM,CAAT;AAUA,SAAOE,cAAP;AACD,CAbM;AAeP,OAAO,IAAMK,YAAY,GAAIC,IAAD,IAAmB;AAC7C,MAAIC,MAAM,GAAG,CAAb;AACAC,EAAAA,MAAM,CAACC,MAAP,CAAcH,IAAd,EAAoBI,OAApB,CAA6BC,OAAD,IAAa;AACvCJ,IAAAA,MAAM,IAAIC,MAAM,CAACI,OAAP,CAAeD,OAAf,EAAwBE,MAAlC;AACD,GAFD;AAGA,SAAON,MAAP;AACD,CANM;AAQP,OAAO,IAAMO,UAAU,GAAIC,KAAD,IAAqBP,MAAM,CAACI,OAAP,CAAeG,KAAf,EAAsBF,MAA9D","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 { useState, useEffect } from 'react'\nimport { TagList, TypeList } from '@looker/sdk-codegen'\n\nexport const useDebounce = (value: any, delay: number) => {\n const [debouncedValue, setDebouncedValue] = useState()\n useEffect(() => {\n // Update debounced value only once delay has been elapsed\n const handler = setTimeout(() => {\n setDebouncedValue(value)\n }, delay)\n // Reset the timeout on receiving a new keyword\n return () => {\n clearTimeout(handler)\n }\n }, [value])\n return debouncedValue\n}\n\nexport const countMethods = (tags: TagList) => {\n let result = 0\n Object.values(tags).forEach((methods) => {\n result += Object.entries(methods).length\n })\n return result\n}\n\nexport const countTypes = (types: TypeList) => Object.entries(types).length\n"],"file":"searchUtils.js"}
1
+ {"version":3,"sources":["../../../../src/components/SideNav/searchUtils.ts"],"names":["useState","useEffect","useDebounce","value","delay","debouncedValue","setDebouncedValue","handler","setTimeout","clearTimeout","countMethods","tags","result","Object","values","forEach","methods","entries","length","countTypes","types"],"mappings":"AA0BA,SAASA,QAAT,EAAmBC,SAAnB,QAAoC,OAApC;AAGA,OAAO,IAAMC,WAAW,GAAG,CAAIC,KAAJ,EAAcC,KAAd,KAAmC;AAC5D,MAAM,CAACC,cAAD,EAAiBC,iBAAjB,IAAsCN,QAAQ,CAACG,KAAD,CAApD;AACAF,EAAAA,SAAS,CAAC,MAAM;AAEd,QAAMM,OAAO,GAAGC,UAAU,CAAC,MAAM;AAC/BF,MAAAA,iBAAiB,CAACH,KAAD,CAAjB;AACD,KAFyB,EAEvBC,KAFuB,CAA1B;AAIA,WAAO,MAAM;AACXK,MAAAA,YAAY,CAACF,OAAD,CAAZ;AACD,KAFD;AAGD,GATQ,EASN,CAACJ,KAAD,CATM,CAAT;AAUA,SAAOE,cAAP;AACD,CAbM;AAeP,OAAO,IAAMK,YAAY,GAAIC,IAAD,IAAmB;AAC7C,MAAIC,MAAM,GAAG,CAAb;AACAC,EAAAA,MAAM,CAACC,MAAP,CAAcH,IAAd,EAAoBI,OAApB,CAA6BC,OAAD,IAAa;AACvCJ,IAAAA,MAAM,IAAIC,MAAM,CAACI,OAAP,CAAeD,OAAf,EAAwBE,MAAlC;AACD,GAFD;AAGA,SAAON,MAAP;AACD,CANM;AAQP,OAAO,IAAMO,UAAU,GAAIC,KAAD,IAAqBP,MAAM,CAACI,OAAP,CAAeG,KAAf,EAAsBF,MAA9D","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 { useState, useEffect } from 'react'\nimport type { TagList, TypeList } from '@looker/sdk-codegen'\n\nexport const useDebounce = <T>(value: T, delay: number): T => {\n const [debouncedValue, setDebouncedValue] = useState(value)\n useEffect(() => {\n // Update debounced value only once delay has been elapsed\n const handler = setTimeout(() => {\n setDebouncedValue(value)\n }, delay)\n // Reset the timeout on receiving a new keyword\n return () => {\n clearTimeout(handler)\n }\n }, [value])\n return debouncedValue\n}\n\nexport const countMethods = (tags: TagList) => {\n let result = 0\n Object.values(tags).forEach((methods) => {\n result += Object.entries(methods).length\n })\n return result\n}\n\nexport const countTypes = (types: TypeList) => Object.entries(types).length\n"],"file":"searchUtils.js"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/common/Loader.tsx"],"names":["React","ComponentsProvider","Flex","FlexItem","Heading","ProgressCircular","Loader","themeOverrides","message"],"mappings":"AAyBA,OAAOA,KAAP,MAA0B,OAA1B;AACA,SACEC,kBADF,EAEEC,IAFF,EAGEC,QAHF,EAIEC,OAJF,EAKEC,gBALF,QAMO,oBANP;AAcA,OAAO,IAAMC,MAAuB,GAAG;AAAA,MAAC;AACtCC,IAAAA,cADsC;AAEtCC,IAAAA,OAAO,GAAG;AAF4B,GAAD;AAAA,SAIrC,oBAAC,kBAAD,EAAwBD,cAAxB,EACE,oBAAC,IAAD;AAAM,IAAA,aAAa,EAAC,QAApB;AAA6B,IAAA,cAAc,EAAC,QAA5C;AAAqD,IAAA,EAAE,EAAC;AAAxD,KACE,oBAAC,QAAD;AAAU,IAAA,SAAS,EAAC;AAApB,KACE,oBAAC,gBAAD;AAAkB,IAAA,IAAI,EAAC;AAAvB,IADF,CADF,EAIE,oBAAC,QAAD;AAAU,IAAA,EAAE,EAAC,OAAb;AAAqB,IAAA,SAAS,EAAC;AAA/B,KACE,oBAAC,OAAD;AAAS,IAAA,KAAK,EAAC,KAAf;AAAqB,IAAA,EAAE,EAAC;AAAxB,KACGC,OADH,CADF,CAJF,CADF,CAJqC;AAAA,CAAhC","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 {\n ComponentsProvider,\n Flex,\n FlexItem,\n Heading,\n ProgressCircular,\n} from '@looker/components'\nimport { ThemeOverrides } from '../../utils'\n\nexport interface LoaderProps {\n themeOverrides: ThemeOverrides\n message?: string\n}\n\nexport const Loader: FC<LoaderProps> = ({\n themeOverrides,\n message = 'Loading API Specifications',\n}) => (\n <ComponentsProvider {...themeOverrides}>\n <Flex flexDirection=\"column\" justifyContent=\"center\" mt=\"25%\">\n <FlexItem alignSelf=\"center\">\n <ProgressCircular size=\"large\" />\n </FlexItem>\n <FlexItem mt=\"large\" alignSelf=\"center\">\n <Heading color=\"key\" as=\"h2\">\n {message}\n </Heading>\n </FlexItem>\n </Flex>\n </ComponentsProvider>\n)\n"],"file":"Loader.js"}
1
+ {"version":3,"sources":["../../../../src/components/common/Loader.tsx"],"names":["React","ComponentsProvider","Flex","FlexItem","Heading","ProgressCircular","Loader","themeOverrides","message"],"mappings":"AA0BA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SACEC,kBADF,EAEEC,IAFF,EAGEC,QAHF,EAIEC,OAJF,EAKEC,gBALF,QAMO,oBANP;AAcA,OAAO,IAAMC,MAAuB,GAAG;AAAA,MAAC;AACtCC,IAAAA,cADsC;AAEtCC,IAAAA,OAAO,GAAG;AAF4B,GAAD;AAAA,SAIrC,oBAAC,kBAAD,EAAwBD,cAAxB,EACE,oBAAC,IAAD;AAAM,IAAA,aAAa,EAAC,QAApB;AAA6B,IAAA,cAAc,EAAC,QAA5C;AAAqD,IAAA,EAAE,EAAC;AAAxD,KACE,oBAAC,QAAD;AAAU,IAAA,SAAS,EAAC;AAApB,KACE,oBAAC,gBAAD;AAAkB,IAAA,IAAI,EAAC;AAAvB,IADF,CADF,EAIE,oBAAC,QAAD;AAAU,IAAA,EAAE,EAAC,OAAb;AAAqB,IAAA,SAAS,EAAC;AAA/B,KACE,oBAAC,OAAD;AAAS,IAAA,KAAK,EAAC,KAAf;AAAqB,IAAA,EAAE,EAAC;AAAxB,KACGC,OADH,CADF,CAJF,CADF,CAJqC;AAAA,CAAhC","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 {\n ComponentsProvider,\n Flex,\n FlexItem,\n Heading,\n ProgressCircular,\n} from '@looker/components'\nimport type { ThemeOverrides } from '@looker/extension-utils'\n\nexport interface LoaderProps {\n themeOverrides: ThemeOverrides\n message?: string\n}\n\nexport const Loader: FC<LoaderProps> = ({\n themeOverrides,\n message = 'Loading API Specifications',\n}) => (\n <ComponentsProvider {...themeOverrides}>\n <Flex flexDirection=\"column\" justifyContent=\"center\" mt=\"25%\">\n <FlexItem alignSelf=\"center\">\n <ProgressCircular size=\"large\" />\n </FlexItem>\n <FlexItem mt=\"large\" alignSelf=\"center\">\n <Heading color=\"key\" as=\"h2\">\n {message}\n </Heading>\n </FlexItem>\n </Flex>\n </ComponentsProvider>\n)\n"],"file":"Loader.js"}
@@ -1,18 +1,9 @@
1
1
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
3
  import React, { useEffect } from 'react';
4
- import styled from 'styled-components';
5
- import { Heading, Section } from '@looker/components';
4
+ import { Section } from '@looker/components';
6
5
  import { useWindowSize } from '../../utils';
7
6
  import { HEADER_REM } from '../Header';
8
- export var ApixHeading = styled(Heading).withConfig({
9
- displayName: "common__ApixHeading",
10
- componentId: "ksfrxk-0"
11
- })([""]);
12
- ApixHeading.defaultProps = {
13
- mb: 'xsmall',
14
- pt: 'xsmall'
15
- };
16
7
  export var REM_TO_PX = 16;
17
8
  export var ApixSection = props => {
18
9
  var size = useWindowSize();
@@ -27,7 +18,8 @@ export var ApixSection = props => {
27
18
  p: "xxlarge",
28
19
  style: {
29
20
  height: "".concat(sectionH, "px"),
30
- overflow: 'auto'
21
+ overflow: 'auto',
22
+ borderTop: '0px'
31
23
  }
32
24
  }));
33
25
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/common/common.tsx"],"names":["React","useEffect","styled","Heading","Section","useWindowSize","HEADER_REM","ApixHeading","defaultProps","mb","pt","REM_TO_PX","ApixSection","props","size","sectionH","height","document","getElementById","scrollTo","overflow"],"mappings":";;AAyBA,OAAOA,KAAP,IAAgBC,SAAhB,QAAqC,OAArC;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAASC,OAAT,EAAkBC,OAAlB,QAA+C,oBAA/C;AACA,SAASC,aAAT,QAA8B,aAA9B;AACA,SAASC,UAAT,QAA2B,WAA3B;AAMA,OAAO,IAAMC,WAAW,GAAGL,MAAM,CAACC,OAAD,CAAT;AAAA;AAAA;AAAA,QAAjB;AAEPI,WAAW,CAACC,YAAZ,GAA2B;AACzBC,EAAAA,EAAE,EAAE,QADqB;AAEzBC,EAAAA,EAAE,EAAE;AAFqB,CAA3B;AAKA,OAAO,IAAMC,SAAS,GAAG,EAAlB;AAMP,OAAO,IAAMC,WAA6B,GAAIC,KAAD,IAAgB;AAC3D,MAAMC,IAAI,GAAGT,aAAa,EAA1B;AACA,MAAMU,QAAQ,GAAGD,IAAI,CAACE,MAAL,GAAcL,SAAS,GAAGL,UAA3C;AACAL,EAAAA,SAAS,CAAC,MAAM;AAAA;;AACd,6BAAAgB,QAAQ,CAACC,cAAT,CAAwB,KAAxB,iFAAgCC,QAAhC,CAAyCR,SAAS,GAAGL,UAArD,EAAiE,CAAjE;AACD,GAFQ,EAEN,CAACO,KAAD,CAFM,CAAT;AAIA,SACE,oBAAC,OAAD,eACMA,KADN;AAEE,IAAA,EAAE,EAAC,KAFL;AAGE,IAAA,CAAC,EAAC,SAHJ;AAIE,IAAA,KAAK,EAAE;AAAEG,MAAAA,MAAM,YAAKD,QAAL,OAAR;AAA2BK,MAAAA,QAAQ,EAAE;AAArC;AAJT,KADF;AAQD,CAfM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport React, { useEffect, FC } from 'react'\nimport styled from 'styled-components'\nimport { Heading, Section, SectionProps } from '@looker/components'\nimport { useWindowSize } from '../../utils'\nimport { HEADER_REM } from '../Header'\n\n/**\n * Common styled components to be used across the whole library\n */\n\nexport const ApixHeading = styled(Heading)``\n\nApixHeading.defaultProps = {\n mb: 'xsmall',\n pt: 'xsmall',\n}\n\nexport const REM_TO_PX = 16\n\n/**\n * Extends the looker Section to proper height and scrolls to top on use\n * @param props - anything you want, but probably SectionProps\n */\nexport const ApixSection: FC<SectionProps> = (props: any) => {\n const size = useWindowSize()\n const sectionH = size.height - REM_TO_PX * HEADER_REM\n useEffect(() => {\n document.getElementById('top')?.scrollTo(REM_TO_PX * HEADER_REM, 0)\n }, [props])\n\n return (\n <Section\n {...props}\n id=\"top\"\n p=\"xxlarge\"\n style={{ height: `${sectionH}px`, overflow: 'auto' }}\n />\n )\n}\n"],"file":"common.js"}
1
+ {"version":3,"sources":["../../../../src/components/common/common.tsx"],"names":["React","useEffect","Section","useWindowSize","HEADER_REM","REM_TO_PX","ApixSection","props","size","sectionH","height","document","getElementById","scrollTo","overflow","borderTop"],"mappings":";;AA0BA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AAEA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAASC,aAAT,QAA8B,aAA9B;AACA,SAASC,UAAT,QAA2B,WAA3B;AAEA,OAAO,IAAMC,SAAS,GAAG,EAAlB;AAMP,OAAO,IAAMC,WAA6B,GAAIC,KAAD,IAAgB;AAC3D,MAAMC,IAAI,GAAGL,aAAa,EAA1B;AACA,MAAMM,QAAQ,GAAGD,IAAI,CAACE,MAAL,GAAcL,SAAS,GAAGD,UAA3C;AACAH,EAAAA,SAAS,CAAC,MAAM;AAAA;;AACd,6BAAAU,QAAQ,CAACC,cAAT,CAAwB,KAAxB,iFAAgCC,QAAhC,CAAyCR,SAAS,GAAGD,UAArD,EAAiE,CAAjE;AACD,GAFQ,EAEN,CAACG,KAAD,CAFM,CAAT;AAIA,SACE,oBAAC,OAAD,eACMA,KADN;AAEE,IAAA,EAAE,EAAC,KAFL;AAGE,IAAA,CAAC,EAAC,SAHJ;AAIE,IAAA,KAAK,EAAE;AAAEG,MAAAA,MAAM,YAAKD,QAAL,OAAR;AAA2BK,MAAAA,QAAQ,EAAE,MAArC;AAA6CC,MAAAA,SAAS,EAAE;AAAxD;AAJT,KADF;AAQD,CAfM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { FC } from 'react'\nimport React, { useEffect } from 'react'\nimport type { SectionProps } from '@looker/components'\nimport { Section } from '@looker/components'\nimport { useWindowSize } from '../../utils'\nimport { HEADER_REM } from '../Header'\n\nexport const REM_TO_PX = 16\n\n/**\n * Extends the looker Section to proper height and scrolls to top on use\n * @param props - anything you want, but probably SectionProps\n */\nexport const ApixSection: FC<SectionProps> = (props: any) => {\n const size = useWindowSize()\n const sectionH = size.height - REM_TO_PX * HEADER_REM\n useEffect(() => {\n document.getElementById('top')?.scrollTo(REM_TO_PX * HEADER_REM, 0)\n }, [props])\n\n return (\n <Section\n {...props}\n id=\"top\"\n p=\"xxlarge\"\n style={{ height: `${sectionH}px`, overflow: 'auto', borderTop: '0px' }}\n />\n )\n}\n"],"file":"common.js"}
@@ -1,3 +1,3 @@
1
- export { ApixHeading, ApixSection } from './common';
2
- export { Loader } from './Loader';
1
+ export * from './common';
2
+ export * from './Loader';
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/common/index.ts"],"names":["ApixHeading","ApixSection","Loader"],"mappings":"AAyBA,SAASA,WAAT,EAAsBC,WAAtB,QAAyC,UAAzC;AACA,SAASC,MAAT,QAAuB,UAAvB","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 { ApixHeading, ApixSection } from './common'\nexport { Loader } from './Loader'\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../../src/components/common/index.ts"],"names":[],"mappings":"AAyBA,cAAc,UAAd;AACA,cAAc,UAAd","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 './common'\nexport * from './Loader'\n"],"file":"index.js"}
@@ -1,7 +1,7 @@
1
- export { ApixHeading, ApixSection, Loader } from './common';
1
+ export { ApixSection, Loader } from './common';
2
2
  export { DocActivityType } from './DocActivityType';
3
3
  export { DocCode } from './DocCode';
4
- export { DocMethodSummary } from './DocMethodSummary';
4
+ export { DocMethodSummary, DocSummaryStatus } from './DocMethodSummary';
5
5
  export { DocMarkdown } from './DocMarkdown';
6
6
  export { DocPseudo } from './DocPseudo';
7
7
  export { DocRateLimited } from './DocRateLimited';
@@ -12,11 +12,12 @@ export { DocSdkUsage } from './DocSdkUsage';
12
12
  export { DocSource } from './DocSource';
13
13
  export { DocStatus } from './DocStatus';
14
14
  export { DocTitle } from './DocTitle';
15
- export { Header } from './Header';
15
+ export { Header, HEADER_TOGGLE_LABEL } from './Header';
16
16
  export { SideNav } from './SideNav';
17
17
  export { ExploreType, ExploreProperty } from './ExploreType';
18
- export { CollapserCard } from './Collapser';
19
18
  export { DocSchema } from './DocSchema';
19
+ export { DocTypeSummary } from './DocTypeSummary';
20
20
  export { Link } from './Link';
21
21
  export { ErrorBoundary } from './ErrorBoundary';
22
+ export { SelectorContainer } from './SelectorContainer';
22
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/index.ts"],"names":["ApixHeading","ApixSection","Loader","DocActivityType","DocCode","DocMethodSummary","DocMarkdown","DocPseudo","DocRateLimited","DocReferences","DocResponses","DocSDKs","DocSdkUsage","DocSource","DocStatus","DocTitle","Header","SideNav","ExploreType","ExploreProperty","CollapserCard","DocSchema","Link","ErrorBoundary"],"mappings":"AAyBA,SAASA,WAAT,EAAsBC,WAAtB,EAAmCC,MAAnC,QAAiD,UAAjD;AACA,SAASC,eAAT,QAAgC,mBAAhC;AACA,SAASC,OAAT,QAAwB,WAAxB;AACA,SAASC,gBAAT,QAAiC,oBAAjC;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,cAAT,QAA+B,kBAA/B;AACA,SAASC,aAAT,QAA8B,iBAA9B;AACA,SAASC,YAAT,QAA6B,gBAA7B;AACA,SAASC,OAAT,QAAwB,WAAxB;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,QAAT,QAAyB,YAAzB;AACA,SAASC,MAAT,QAAuB,UAAvB;AACA,SAASC,OAAT,QAAwB,WAAxB;AACA,SAASC,WAAT,EAAsBC,eAAtB,QAA6C,eAA7C;AACA,SAASC,aAAT,QAA8B,aAA9B;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,IAAT,QAAqB,QAArB;AACA,SAASC,aAAT,QAA8B,iBAA9B","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 { ApixHeading, ApixSection, Loader } from './common'\nexport { DocActivityType } from './DocActivityType'\nexport { DocCode } from './DocCode'\nexport { DocMethodSummary } from './DocMethodSummary'\nexport { DocMarkdown } from './DocMarkdown'\nexport { DocPseudo } from './DocPseudo'\nexport { DocRateLimited } from './DocRateLimited'\nexport { DocReferences } from './DocReferences'\nexport { DocResponses } from './DocResponses'\nexport { DocSDKs } from './DocSDKs'\nexport { DocSdkUsage } from './DocSdkUsage'\nexport { DocSource } from './DocSource'\nexport { DocStatus } from './DocStatus'\nexport { DocTitle } from './DocTitle'\nexport { Header } from './Header'\nexport { SideNav } from './SideNav'\nexport { ExploreType, ExploreProperty } from './ExploreType'\nexport { CollapserCard } from './Collapser'\nexport { DocSchema } from './DocSchema'\nexport { Link } from './Link'\nexport { ErrorBoundary } from './ErrorBoundary'\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/components/index.ts"],"names":["ApixSection","Loader","DocActivityType","DocCode","DocMethodSummary","DocSummaryStatus","DocMarkdown","DocPseudo","DocRateLimited","DocReferences","DocResponses","DocSDKs","DocSdkUsage","DocSource","DocStatus","DocTitle","Header","HEADER_TOGGLE_LABEL","SideNav","ExploreType","ExploreProperty","DocSchema","DocTypeSummary","Link","ErrorBoundary","SelectorContainer"],"mappings":"AAyBA,SAASA,WAAT,EAAsBC,MAAtB,QAAoC,UAApC;AACA,SAASC,eAAT,QAAgC,mBAAhC;AACA,SAASC,OAAT,QAAwB,WAAxB;AACA,SAASC,gBAAT,EAA2BC,gBAA3B,QAAmD,oBAAnD;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,cAAT,QAA+B,kBAA/B;AACA,SAASC,aAAT,QAA8B,iBAA9B;AACA,SAASC,YAAT,QAA6B,gBAA7B;AACA,SAASC,OAAT,QAAwB,WAAxB;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,QAAT,QAAyB,YAAzB;AACA,SAASC,MAAT,EAAiBC,mBAAjB,QAA4C,UAA5C;AACA,SAASC,OAAT,QAAwB,WAAxB;AACA,SAASC,WAAT,EAAsBC,eAAtB,QAA6C,eAA7C;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,cAAT,QAA+B,kBAA/B;AACA,SAASC,IAAT,QAAqB,QAArB;AACA,SAASC,aAAT,QAA8B,iBAA9B;AACA,SAASC,iBAAT,QAAkC,qBAAlC","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 { ApixSection, Loader } from './common'\nexport { DocActivityType } from './DocActivityType'\nexport { DocCode } from './DocCode'\nexport { DocMethodSummary, DocSummaryStatus } from './DocMethodSummary'\nexport { DocMarkdown } from './DocMarkdown'\nexport { DocPseudo } from './DocPseudo'\nexport { DocRateLimited } from './DocRateLimited'\nexport { DocReferences } from './DocReferences'\nexport { DocResponses } from './DocResponses'\nexport { DocSDKs } from './DocSDKs'\nexport { DocSdkUsage } from './DocSdkUsage'\nexport { DocSource } from './DocSource'\nexport { DocStatus } from './DocStatus'\nexport { DocTitle } from './DocTitle'\nexport { Header, HEADER_TOGGLE_LABEL } from './Header'\nexport { SideNav } from './SideNav'\nexport { ExploreType, ExploreProperty } from './ExploreType'\nexport { DocSchema } from './DocSchema'\nexport { DocTypeSummary } from './DocTypeSummary'\nexport { Link } from './Link'\nexport { ErrorBoundary } from './ErrorBoundary'\nexport { SelectorContainer } from './SelectorContainer'\n"],"file":"index.js"}
package/lib/esm/index.js CHANGED
@@ -1,19 +1,5 @@
1
- var _templateObject;
2
-
3
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
4
-
5
- import React from 'react';
6
- import { BrowserRouter as Router } from 'react-router-dom';
7
- import ReactDOM from 'react-dom';
8
- import { createGlobalStyle } from 'styled-components';
9
- import { StandaloneApiExplorer } from './StandaloneApiExplorer';
10
- var BodyReset = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n body {\n margin: 0;\n }\n"])));
11
- var basename = window.LOOKER_DEV_PORTAL ? window.LOOKER_DEV_PORTAL.basename : undefined;
12
- var versionsUrl = new URL('versions.json', window.location.origin).toString();
13
- ReactDOM.render(React.createElement(Router, {
14
- basename: basename
15
- }, React.createElement(StandaloneApiExplorer, {
16
- versionsUrl: versionsUrl,
17
- headless: basename
18
- }), React.createElement(BodyReset, null)), document.getElementById('container'));
1
+ export * from './ApiExplorer';
2
+ export * from './StandaloneApiExplorer';
3
+ export * from './components';
4
+ export * from './state';
19
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.tsx"],"names":["React","BrowserRouter","Router","ReactDOM","createGlobalStyle","StandaloneApiExplorer","BodyReset","basename","window","LOOKER_DEV_PORTAL","undefined","versionsUrl","URL","location","origin","toString","render","document","getElementById"],"mappings":";;;;AA0BA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,aAAa,IAAIC,MAA1B,QAAwC,kBAAxC;AACA,OAAOC,QAAP,MAAqB,WAArB;AACA,SAASC,iBAAT,QAAkC,mBAAlC;AACA,SAASC,qBAAT,QAAsC,yBAAtC;AAEA,IAAMC,SAAS,GAAGF,iBAAH,sGAAf;AAMA,IAAMG,QAAQ,GAAIC,MAAD,CAAgBC,iBAAhB,GACZD,MAAD,CAAgBC,iBAAhB,CAAkCF,QADrB,GAEbG,SAFJ;AAIA,IAAMC,WAAW,GAAG,IAAIC,GAAJ,CAClB,eADkB,EAEjBJ,MAAD,CAAgBK,QAAhB,CAAyBC,MAFP,EAGlBC,QAHkB,EAApB;AAKAZ,QAAQ,CAACa,MAAT,CACE,oBAAC,MAAD;AAAQ,EAAA,QAAQ,EAAET;AAAlB,GACE,oBAAC,qBAAD;AAAuB,EAAA,WAAW,EAAEI,WAApC;AAAiD,EAAA,QAAQ,EAAEJ;AAA3D,EADF,EAEE,oBAAC,SAAD,OAFF,CADF,EAKEU,QAAQ,CAACC,cAAT,CAAwB,WAAxB,CALF","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 from 'react'\nimport { BrowserRouter as Router } from 'react-router-dom'\nimport ReactDOM from 'react-dom'\nimport { createGlobalStyle } from 'styled-components'\nimport { StandaloneApiExplorer } from './StandaloneApiExplorer'\n\nconst BodyReset = createGlobalStyle`\n body {\n margin: 0;\n }\n`\n\nconst basename = (window as any).LOOKER_DEV_PORTAL\n ? (window as any).LOOKER_DEV_PORTAL.basename\n : undefined\n\nconst versionsUrl = new URL(\n 'versions.json',\n (window as any).location.origin\n).toString()\n\nReactDOM.render(\n <Router basename={basename}>\n <StandaloneApiExplorer versionsUrl={versionsUrl} headless={basename} />\n <BodyReset />\n </Router>,\n document.getElementById('container')\n)\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":"AAyBA,cAAc,eAAd;AACA,cAAc,yBAAd;AACA,cAAc,cAAd;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 './ApiExplorer'\nexport * from './StandaloneApiExplorer'\nexport * from './components'\nexport * from './state'\n"],"file":"index.js"}
@@ -1,3 +1,2 @@
1
1
  export * from './spec';
2
- export * from './search';
3
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/reducers/index.ts"],"names":[],"mappings":"AAyBA,cAAc,QAAd;AACA,cAAc,UAAd","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 './spec'\nexport * from './search'\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/reducers/index.ts"],"names":[],"mappings":"AAyBA,cAAc,QAAd","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 './spec'\n"],"file":"index.js"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/reducers/spec/actions.ts"],"names":["Actions","selectSpec","specKey","type","SELECT_SPEC","payload","updateSpecApi","api","UPDATE_SPEC_API"],"mappings":"AA4BA,WAAYA,OAAZ;;WAAYA,O;AAAAA,EAAAA,O;AAAAA,EAAAA,O;GAAAA,O,KAAAA,O;;AAsBZ,OAAO,IAAMC,UAAU,GAAIC,OAAD,KAAwC;AAChEC,EAAAA,IAAI,EAAEH,OAAO,CAACI,WADkD;AAEhEC,EAAAA,OAAO,EAAEH;AAFuD,CAAxC,CAAnB;AAKP,OAAO,IAAMI,aAAa,GAAG,CAC3BJ,OAD2B,EAE3BK,GAF2B,MAGF;AACzBJ,EAAAA,IAAI,EAAEH,OAAO,CAACQ,eADW;AAEzBH,EAAAA,OAAO,EAAE;AAAEH,IAAAA,OAAF;AAAWK,IAAAA;AAAX;AAFgB,CAHE,CAAtB","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 { ApiModel } from '@looker/sdk-codegen'\n\nexport enum Actions {\n SELECT_SPEC = 'SELECT_SPEC',\n UPDATE_SPEC_API = 'UPDATE_SPEC_API',\n}\n\nexport interface ApiUpdatePayload {\n specKey: string\n api: ApiModel\n}\n\nexport interface UpdateSpecApiAction {\n type: Actions.UPDATE_SPEC_API\n payload: ApiUpdatePayload\n}\n\nexport interface SelectSpecAction {\n type: Actions.SELECT_SPEC\n payload: string\n}\n\nexport type SpecAction = SelectSpecAction | UpdateSpecApiAction\n\nexport const selectSpec = (specKey: string): SelectSpecAction => ({\n type: Actions.SELECT_SPEC,\n payload: specKey,\n})\n\nexport const updateSpecApi = (\n specKey: string,\n api: ApiModel\n): UpdateSpecApiAction => ({\n type: Actions.UPDATE_SPEC_API,\n payload: { specKey, api },\n})\n"],"file":"actions.js"}
1
+ {"version":3,"sources":["../../../../src/reducers/spec/actions.ts"],"names":["Actions","selectSpec","specKey","type","SELECT_SPEC","payload","updateSpecApi","api","UPDATE_SPEC_API"],"mappings":"AA4BA,WAAYA,OAAZ;;WAAYA,O;AAAAA,EAAAA,O;AAAAA,EAAAA,O;GAAAA,O,KAAAA,O;;AAsBZ,OAAO,IAAMC,UAAU,GAAIC,OAAD,KAAwC;AAChEC,EAAAA,IAAI,EAAEH,OAAO,CAACI,WADkD;AAEhEC,EAAAA,OAAO,EAAEH;AAFuD,CAAxC,CAAnB;AAKP,OAAO,IAAMI,aAAa,GAAG,CAC3BJ,OAD2B,EAE3BK,GAF2B,MAGF;AACzBJ,EAAAA,IAAI,EAAEH,OAAO,CAACQ,eADW;AAEzBH,EAAAA,OAAO,EAAE;AAAEH,IAAAA,OAAF;AAAWK,IAAAA;AAAX;AAFgB,CAHE,CAAtB","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 { ApiModel } from '@looker/sdk-codegen'\n\nexport enum Actions {\n SELECT_SPEC = 'SELECT_SPEC',\n UPDATE_SPEC_API = 'UPDATE_SPEC_API',\n}\n\nexport interface ApiUpdatePayload {\n specKey: string\n api: ApiModel\n}\n\nexport interface UpdateSpecApiAction {\n type: Actions.UPDATE_SPEC_API\n payload: ApiUpdatePayload\n}\n\nexport interface SelectSpecAction {\n type: Actions.SELECT_SPEC\n payload: string\n}\n\nexport type SpecAction = SelectSpecAction | UpdateSpecApiAction\n\nexport const selectSpec = (specKey: string): SelectSpecAction => ({\n type: Actions.SELECT_SPEC,\n payload: specKey,\n})\n\nexport const updateSpecApi = (\n specKey: string,\n api: ApiModel\n): UpdateSpecApiAction => ({\n type: Actions.UPDATE_SPEC_API,\n payload: { specKey, api },\n})\n"],"file":"actions.js"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/reducers/spec/reducer.ts"],"names":["ApiModel","Actions","specReducer","state","action","type","payload","UPDATE_SPEC_API","specList","specKey","api","spec","newState","specContent","fromJson"],"mappings":";;;;;;AA0BA,SAASA,QAAT,QAA6C,qBAA7C;AAEA,SAAqBC,OAArB,QAAoC,GAApC;AAOA,OAAO,IAAMC,WAAW,GAAG,CACzBC,KADyB,EAEzBC,MAFyB,KAGX;AACd,MAAM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA;AAAR,MAAoBF,MAA1B;;AACA,UAAQC,IAAR;AACE,SAAKJ,OAAO,CAACM,eAAb;AAA8B;AAC5B,YAAMC,QAAQ,qBAAQL,KAAK,CAACK,QAAd,CAAd;;AACA,YAAM;AAAEC,UAAAA,OAAF;AAAWC,UAAAA;AAAX,YAAmBJ,OAAzB;AACA,YAAIK,IAAI,GAAGH,QAAQ,CAACC,OAAD,CAAnB;;AACA,YAAIE,IAAJ,EAAU;AACRA,UAAAA,IAAI,mCAAQA,IAAR;AAAcD,YAAAA;AAAd,YAAJ;AACAF,UAAAA,QAAQ,CAACC,OAAD,CAAR,GAAoBE,IAApB;AACD;;AACD,eAAO;AAAEH,UAAAA,QAAF;AAAYG,UAAAA;AAAZ,SAAP;AACD;;AACD,SAAK,aAAL;AAAoB;AAClB,YAAMC,QAAQ,qBAAQT,KAAR,CAAd;;AACA,YAAMQ,KAAI,GAAGC,QAAQ,CAACJ,QAAT,CAAkBF,OAAlB,CAAb;;AAEA,YAAIK,KAAJ,EAAU;AACR,cAAI,CAACA,KAAI,CAACD,GAAN,IAAaC,KAAI,CAACE,WAAtB,EAAmC;AACjCF,YAAAA,KAAI,CAACD,GAAL,GAAWV,QAAQ,CAACc,QAAT,CAAkBH,KAAI,CAACE,WAAvB,CAAX;AACD;;AACD,iDAAYV,KAAZ;AAAmBQ,YAAAA,IAAI,EAAJA;AAAnB;AACD;;AACD,eAAOR,KAAP;AACD;;AACD;AACE,aAAOA,KAAP;AAxBJ;AA0BD,CA/BM","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 { ApiModel, SpecItem, SpecList } from '@looker/sdk-codegen'\nimport { ApiUpdatePayload } from './actions'\nimport { SpecAction, Actions } from '.'\n\nexport interface SpecState {\n specList: SpecList\n spec: SpecItem\n}\n\nexport const specReducer = (\n state: SpecState,\n action: SpecAction\n): SpecState => {\n const { type, payload } = action\n switch (type) {\n case Actions.UPDATE_SPEC_API: {\n const specList = { ...state.specList }\n const { specKey, api } = payload as ApiUpdatePayload\n let spec = specList[specKey]\n if (spec) {\n spec = { ...spec, api }\n specList[specKey] = spec\n }\n return { specList, spec }\n }\n case 'SELECT_SPEC': {\n const newState = { ...state }\n const spec = newState.specList[payload as string]\n // Does extension API Explorer needs this?\n if (spec) {\n if (!spec.api && spec.specContent) {\n spec.api = ApiModel.fromJson(spec.specContent)\n }\n return { ...state, spec }\n }\n return state\n }\n default:\n return state\n }\n}\n"],"file":"reducer.js"}
1
+ {"version":3,"sources":["../../../../src/reducers/spec/reducer.ts"],"names":["ApiModel","Actions","specReducer","state","action","type","payload","UPDATE_SPEC_API","specList","specKey","api","spec","newState","specContent","fromJson"],"mappings":";;;;;;AA2BA,SAASA,QAAT,QAAyB,qBAAzB;AAGA,SAASC,OAAT,QAAwB,GAAxB;AAOA,OAAO,IAAMC,WAAW,GAAG,CACzBC,KADyB,EAEzBC,MAFyB,KAGX;AACd,MAAM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA;AAAR,MAAoBF,MAA1B;;AACA,UAAQC,IAAR;AACE,SAAKJ,OAAO,CAACM,eAAb;AAA8B;AAC5B,YAAMC,QAAQ,qBAAQL,KAAK,CAACK,QAAd,CAAd;;AACA,YAAM;AAAEC,UAAAA,OAAF;AAAWC,UAAAA;AAAX,YAAmBJ,OAAzB;AACA,YAAIK,IAAI,GAAGH,QAAQ,CAACC,OAAD,CAAnB;;AACA,YAAIE,IAAJ,EAAU;AACRA,UAAAA,IAAI,mCAAQA,IAAR;AAAcD,YAAAA;AAAd,YAAJ;AACAF,UAAAA,QAAQ,CAACC,OAAD,CAAR,GAAoBE,IAApB;AACD;;AACD,eAAO;AAAEH,UAAAA,QAAF;AAAYG,UAAAA;AAAZ,SAAP;AACD;;AACD,SAAK,aAAL;AAAoB;AAClB,YAAMC,QAAQ,qBAAQT,KAAR,CAAd;;AACA,YAAMQ,KAAI,GAAGC,QAAQ,CAACJ,QAAT,CAAkBF,OAAlB,CAAb;;AAEA,YAAIK,KAAJ,EAAU;AACR,cAAI,CAACA,KAAI,CAACD,GAAN,IAAaC,KAAI,CAACE,WAAtB,EAAmC;AACjCF,YAAAA,KAAI,CAACD,GAAL,GAAWV,QAAQ,CAACc,QAAT,CAAkBH,KAAI,CAACE,WAAvB,CAAX;AACD;;AACD,iDAAYV,KAAZ;AAAmBQ,YAAAA,IAAI,EAAJA;AAAnB;AACD;;AACD,eAAOR,KAAP;AACD;;AACD;AACE,aAAOA,KAAP;AAxBJ;AA0BD,CA/BM","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 { SpecItem, SpecList } from '@looker/sdk-codegen'\nimport { ApiModel } from '@looker/sdk-codegen'\nimport type { ApiUpdatePayload } from './actions'\nimport type { SpecAction } from '.'\nimport { Actions } from '.'\n\nexport interface SpecState {\n specList: SpecList\n spec: SpecItem\n}\n\nexport const specReducer = (\n state: SpecState,\n action: SpecAction\n): SpecState => {\n const { type, payload } = action\n switch (type) {\n case Actions.UPDATE_SPEC_API: {\n const specList = { ...state.specList }\n const { specKey, api } = payload as ApiUpdatePayload\n let spec = specList[specKey]\n if (spec) {\n spec = { ...spec, api }\n specList[specKey] = spec\n }\n return { specList, spec }\n }\n case 'SELECT_SPEC': {\n const newState = { ...state }\n const spec = newState.specList[payload as string]\n // Does extension API Explorer needs this?\n if (spec) {\n if (!spec.api && spec.specContent) {\n spec.api = ApiModel.fromJson(spec.specContent)\n }\n return { ...state, spec }\n }\n return state\n }\n default:\n return state\n }\n}\n"],"file":"reducer.js"}
@@ -1,3 +1,4 @@
1
+ import { OAuthSession } from '@looker/sdk-rtl';
1
2
  import { diffPath, oAuthPath } from '../../utils';
2
3
  export var getDefaultSpecKey = specs => {
3
4
  var items = Object.entries(specs);
@@ -37,6 +38,15 @@ export var getDefaultSpecKey = specs => {
37
38
  };
38
39
  export var getSpecKey = (location, specs) => {
39
40
  var pathName = location.pathname;
41
+
42
+ if (pathName === "/".concat(oAuthPath)) {
43
+ var returnUrl = sessionStorage.getItem(OAuthSession.returnUrlKey);
44
+
45
+ if (returnUrl) {
46
+ pathName = returnUrl;
47
+ }
48
+ }
49
+
40
50
  var pathNodes = pathName.split('/');
41
51
  var specKey = '';
42
52
 
@@ -50,9 +60,15 @@ export var getSpecKey = (location, specs) => {
50
60
  };
51
61
  export var initDefaultSpecState = (specList, location) => {
52
62
  var specKey = getSpecKey(location, specList);
63
+ var spec = specList[specKey];
64
+
65
+ if (!spec) {
66
+ spec = specList['4.0'];
67
+ }
68
+
53
69
  return {
54
70
  specList,
55
- spec: specList[specKey]
71
+ spec
56
72
  };
57
73
  };
58
74
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/reducers/spec/utils.ts"],"names":["diffPath","oAuthPath","getDefaultSpecKey","specs","items","Object","entries","length","Error","specKey","forEach","key","item","isDefault","status","keys","getSpecKey","location","pathName","pathname","pathNodes","split","initDefaultSpecState","specList","spec"],"mappings":"AA4BA,SAASA,QAAT,EAAmBC,SAAnB,QAAoC,aAApC;AAWA,OAAO,IAAMC,iBAAiB,GAAIC,KAAD,IAA6B;AAC5D,MAAMC,KAAK,GAAGC,MAAM,CAACC,OAAP,CAAeH,KAAf,CAAd;;AAEA,MAAIC,KAAK,CAACG,MAAN,KAAiB,CAArB,EAAwB;AACtB,UAAMC,KAAK,CAAC,iBAAD,CAAX;AACD;;AAED,MAAIC,OAAO,GAAG,EAAd;AACAL,EAAAA,KAAK,CAACM,OAAN,CAAc,QAAiB;AAAA,QAAhB,CAACC,GAAD,EAAMC,IAAN,CAAgB;;AAC7B,QAAIA,IAAI,CAACC,SAAT,EAAoB;AAClBJ,MAAAA,OAAO,GAAGE,GAAV;AACD;AACF,GAJD;;AAMA,MAAI,CAACF,OAAL,EAAc;AACZL,IAAAA,KAAK,CAACM,OAAN,CAAc,SAAiB;AAAA,UAAhB,CAACC,GAAD,EAAMC,IAAN,CAAgB;;AAC7B,UAAIA,IAAI,CAACE,MAAL,KAAgB,SAApB,EAA+B;AAC7BL,QAAAA,OAAO,GAAGE,GAAV;AACD;AACF,KAJD;AAKD;;AAED,MAAI,CAACF,OAAL,EAAc;AACZA,IAAAA,OAAO,GAAGJ,MAAM,CAACU,IAAP,CAAYZ,KAAZ,EAAmB,CAAnB,CAAV;AACD;;AAED,MAAI,CAACM,OAAL,EAAc;AACZ,UAAMD,KAAK,CAAC,iBAAD,CAAX;AACD;;AAED,SAAOC,OAAP;AACD,CA/BM;AAsCP,OAAO,IAAMO,UAAU,GAAG,CAACC,QAAD,EAA6Bd,KAA7B,KAAkD;AAC1E,MAAMe,QAAQ,GAAGD,QAAQ,CAACE,QAA1B;AACA,MAAMC,SAAS,GAAGF,QAAQ,CAACG,KAAT,CAAe,GAAf,CAAlB;AACA,MAAIZ,OAAO,GAAG,EAAd;;AACA,MACEW,SAAS,CAACb,MAAV,GAAmB,CAAnB,IACAa,SAAS,CAAC,CAAD,CADT,IAEAA,SAAS,CAAC,CAAD,CAAT,KAAiBnB,SAFjB,IAGAmB,SAAS,CAAC,CAAD,CAAT,KAAiBpB,QAJnB,EAKE;AACAS,IAAAA,OAAO,GAAGW,SAAS,CAAC,CAAD,CAAnB;AACD,GAPD,MAOO,IAAIjB,KAAJ,EAAW;AAChBM,IAAAA,OAAO,GAAGP,iBAAiB,CAACC,KAAD,CAA3B;AACD;;AACD,SAAOM,OAAP;AACD,CAfM;AAwBP,OAAO,IAAMa,oBAAoB,GAAG,CAClCC,QADkC,EAElCN,QAFkC,KAGpB;AACd,MAAMR,OAAO,GAAGO,UAAU,CAACC,QAAD,EAAWM,QAAX,CAA1B;AACA,SAAO;AACLA,IAAAA,QADK;AAELC,IAAAA,IAAI,EAAED,QAAQ,CAACd,OAAD;AAFT,GAAP;AAID,CATM","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 { SpecList } from '@looker/sdk-codegen'\nimport { Location as HLocation } from 'history'\nimport { diffPath, oAuthPath } from '../../utils'\nimport { SpecState } from './reducer'\n\nexport type AbstractLocation = HLocation | Location\n\n/**\n * Given a collection of specs, it returns the spec marked as default, the one\n * marked as current or the first one, in that order.\n * @param specs A collection of specs\n * @returns A spec\n */\nexport const getDefaultSpecKey = (specs: SpecList): string => {\n const items = Object.entries(specs)\n\n if (items.length === 0) {\n throw Error('No specs found.')\n }\n\n let specKey = ''\n items.forEach(([key, item]) => {\n if (item.isDefault) {\n specKey = key\n }\n })\n\n if (!specKey) {\n items.forEach(([key, item]) => {\n if (item.status === 'current') {\n specKey = key\n }\n })\n }\n\n if (!specKey) {\n specKey = Object.keys(specs)[0]\n }\n\n if (!specKey) {\n throw Error('No specs found.')\n }\n\n return specKey\n}\n\n/**\n * Determine the API specification key from URL pattern or default spec\n * @param location service to examine\n * @param specs to use to find the default spec key\n */\nexport const getSpecKey = (location: AbstractLocation, specs?: SpecList) => {\n const pathName = location.pathname\n const pathNodes = pathName.split('/')\n let specKey = ''\n if (\n pathNodes.length > 1 &&\n pathNodes[1] &&\n pathNodes[1] !== oAuthPath &&\n pathNodes[1] !== diffPath\n ) {\n specKey = pathNodes[1]\n } else if (specs) {\n specKey = getDefaultSpecKey(specs)\n }\n return specKey\n}\n\n/**\n * Creates a default state object with the spec matching the specKey defined\n * in the url or the default criteria in getDefaultSpecKey\n * @param specs A collection of specs\n * @param location Standalone or extension location\n * @returns An object to be used as default state\n */\nexport const initDefaultSpecState = (\n specList: SpecList,\n location: AbstractLocation\n): SpecState => {\n const specKey = getSpecKey(location, specList)\n return {\n specList,\n spec: specList[specKey],\n }\n}\n"],"file":"utils.js"}
1
+ {"version":3,"sources":["../../../../src/reducers/spec/utils.ts"],"names":["OAuthSession","diffPath","oAuthPath","getDefaultSpecKey","specs","items","Object","entries","length","Error","specKey","forEach","key","item","isDefault","status","keys","getSpecKey","location","pathName","pathname","returnUrl","sessionStorage","getItem","returnUrlKey","pathNodes","split","initDefaultSpecState","specList","spec"],"mappings":"AA4BA,SAASA,YAAT,QAA6B,iBAA7B;AACA,SAASC,QAAT,EAAmBC,SAAnB,QAAoC,aAApC;AAWA,OAAO,IAAMC,iBAAiB,GAAIC,KAAD,IAA6B;AAC5D,MAAMC,KAAK,GAAGC,MAAM,CAACC,OAAP,CAAeH,KAAf,CAAd;;AAEA,MAAIC,KAAK,CAACG,MAAN,KAAiB,CAArB,EAAwB;AACtB,UAAMC,KAAK,CAAC,iBAAD,CAAX;AACD;;AAED,MAAIC,OAAO,GAAG,EAAd;AACAL,EAAAA,KAAK,CAACM,OAAN,CAAc,QAAiB;AAAA,QAAhB,CAACC,GAAD,EAAMC,IAAN,CAAgB;;AAC7B,QAAIA,IAAI,CAACC,SAAT,EAAoB;AAClBJ,MAAAA,OAAO,GAAGE,GAAV;AACD;AACF,GAJD;;AAMA,MAAI,CAACF,OAAL,EAAc;AACZL,IAAAA,KAAK,CAACM,OAAN,CAAc,SAAiB;AAAA,UAAhB,CAACC,GAAD,EAAMC,IAAN,CAAgB;;AAC7B,UAAIA,IAAI,CAACE,MAAL,KAAgB,SAApB,EAA+B;AAC7BL,QAAAA,OAAO,GAAGE,GAAV;AACD;AACF,KAJD;AAKD;;AAED,MAAI,CAACF,OAAL,EAAc;AACZA,IAAAA,OAAO,GAAGJ,MAAM,CAACU,IAAP,CAAYZ,KAAZ,EAAmB,CAAnB,CAAV;AACD;;AAED,MAAI,CAACM,OAAL,EAAc;AACZ,UAAMD,KAAK,CAAC,iBAAD,CAAX;AACD;;AAED,SAAOC,OAAP;AACD,CA/BM;AAsCP,OAAO,IAAMO,UAAU,GAAG,CAACC,QAAD,EAA6Bd,KAA7B,KAAkD;AAC1E,MAAIe,QAAQ,GAAGD,QAAQ,CAACE,QAAxB;;AACA,MAAID,QAAQ,gBAASjB,SAAT,CAAZ,EAAkC;AAChC,QAAMmB,SAAS,GAAGC,cAAc,CAACC,OAAf,CAAuBvB,YAAY,CAACwB,YAApC,CAAlB;;AACA,QAAIH,SAAJ,EAAe;AACbF,MAAAA,QAAQ,GAAGE,SAAX;AACD;AACF;;AACD,MAAMI,SAAS,GAAGN,QAAQ,CAACO,KAAT,CAAe,GAAf,CAAlB;AACA,MAAIhB,OAAO,GAAG,EAAd;;AACA,MACEe,SAAS,CAACjB,MAAV,GAAmB,CAAnB,IACAiB,SAAS,CAAC,CAAD,CADT,IAEAA,SAAS,CAAC,CAAD,CAAT,KAAiBvB,SAFjB,IAGAuB,SAAS,CAAC,CAAD,CAAT,KAAiBxB,QAJnB,EAKE;AACAS,IAAAA,OAAO,GAAGe,SAAS,CAAC,CAAD,CAAnB;AACD,GAPD,MAOO,IAAIrB,KAAJ,EAAW;AAChBM,IAAAA,OAAO,GAAGP,iBAAiB,CAACC,KAAD,CAA3B;AACD;;AACD,SAAOM,OAAP;AACD,CArBM;AA8BP,OAAO,IAAMiB,oBAAoB,GAAG,CAClCC,QADkC,EAElCV,QAFkC,KAGpB;AACd,MAAMR,OAAO,GAAGO,UAAU,CAACC,QAAD,EAAWU,QAAX,CAA1B;AAEA,MAAIC,IAAI,GAAGD,QAAQ,CAAClB,OAAD,CAAnB;;AACA,MAAI,CAACmB,IAAL,EAAW;AACTA,IAAAA,IAAI,GAAGD,QAAQ,CAAC,KAAD,CAAf;AACD;;AACD,SAAO;AACLA,IAAAA,QADK;AAELC,IAAAA;AAFK,GAAP;AAID,CAdM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { SpecList } from '@looker/sdk-codegen'\nimport type { Location as HLocation } from 'history'\nimport { OAuthSession } from '@looker/sdk-rtl'\nimport { diffPath, oAuthPath } from '../../utils'\nimport type { SpecState } from './reducer'\n\nexport type AbstractLocation = HLocation | Location\n\n/**\n * Given a collection of specs, it returns the spec marked as default, the one\n * marked as current or the first one, in that order.\n * @param specs A collection of specs\n * @returns A spec\n */\nexport const getDefaultSpecKey = (specs: SpecList): string => {\n const items = Object.entries(specs)\n\n if (items.length === 0) {\n throw Error('No specs found.')\n }\n\n let specKey = ''\n items.forEach(([key, item]) => {\n if (item.isDefault) {\n specKey = key\n }\n })\n\n if (!specKey) {\n items.forEach(([key, item]) => {\n if (item.status === 'current') {\n specKey = key\n }\n })\n }\n\n if (!specKey) {\n specKey = Object.keys(specs)[0]\n }\n\n if (!specKey) {\n throw Error('No specs found.')\n }\n\n return specKey\n}\n\n/**\n * Determine the API specification key from URL pattern or default spec\n * @param location service to examine\n * @param specs to use to find the default spec key\n */\nexport const getSpecKey = (location: AbstractLocation, specs?: SpecList) => {\n let pathName = location.pathname\n if (pathName === `/${oAuthPath}`) {\n const returnUrl = sessionStorage.getItem(OAuthSession.returnUrlKey)\n if (returnUrl) {\n pathName = returnUrl\n }\n }\n const pathNodes = pathName.split('/')\n let specKey = ''\n if (\n pathNodes.length > 1 &&\n pathNodes[1] &&\n pathNodes[1] !== oAuthPath &&\n pathNodes[1] !== diffPath\n ) {\n specKey = pathNodes[1]\n } else if (specs) {\n specKey = getDefaultSpecKey(specs)\n }\n return specKey\n}\n\n/**\n * Creates a default state object with the spec matching the specKey defined\n * in the url or the default criteria in getDefaultSpecKey\n * @param specList A collection of specs\n * @param location Standalone or extension location\n * @returns An object to be used as default state\n */\nexport const initDefaultSpecState = (\n specList: SpecList,\n location: AbstractLocation\n): SpecState => {\n const specKey = getSpecKey(location, specList)\n // Handle bad spec in the URL. Fall back to 4.0\n let spec = specList[specKey]\n if (!spec) {\n spec = specList['4.0']\n }\n return {\n specList,\n spec,\n }\n}\n"],"file":"utils.js"}
@@ -1,27 +1,22 @@
1
- import React, { useContext } from 'react';
1
+ import React from 'react';
2
2
  import { Redirect, Route, Switch } from 'react-router-dom';
3
- import { OAuthScene, RunItContext } from '@looker/run-it';
4
- import { HomeScene, MethodScene, TagScene, TypeScene } from '../scenes';
3
+ import { HomeScene, MethodScene, MethodTagScene, TypeScene, TypeTagScene } from '../scenes';
5
4
  import { DiffScene } from '../scenes/DiffScene';
6
- import { diffPath, oAuthPath } from '../utils';
5
+ import { diffPath } from '../utils';
7
6
  export var AppRouter = _ref => {
8
7
  var {
9
8
  specKey,
10
9
  api,
11
10
  specs,
12
- toggleNavigation
11
+ toggleNavigation,
12
+ adaptor,
13
+ setVersionsUrl
13
14
  } = _ref;
14
- var {
15
- sdk
16
- } = useContext(RunItContext);
17
- var maybeOauth = sdk && sdk.apiVersion === '4.0';
18
15
  return React.createElement(Switch, null, React.createElement(Redirect, {
19
16
  from: "/",
20
17
  to: "/".concat(specKey, "/"),
21
18
  exact: true
22
- }), maybeOauth && React.createElement(Route, {
23
- path: "/".concat(oAuthPath)
24
- }, React.createElement(OAuthScene, null)), React.createElement(Route, {
19
+ }), React.createElement(Route, {
25
20
  path: "/".concat(diffPath, "/:l?/:r?")
26
21
  }, React.createElement(DiffScene, {
27
22
  specs: specs,
@@ -34,14 +29,21 @@ export var AppRouter = _ref => {
34
29
  })), React.createElement(Route, {
35
30
  path: "/:specKey/methods/:methodTag",
36
31
  exact: true
37
- }, React.createElement(TagScene, {
32
+ }, React.createElement(MethodTagScene, {
38
33
  api: api
39
34
  })), React.createElement(Route, {
40
35
  path: "/:specKey/methods/:methodTag/:methodName"
41
36
  }, React.createElement(MethodScene, {
37
+ api: api,
38
+ adaptor: adaptor,
39
+ setVersionsUrl: setVersionsUrl
40
+ })), React.createElement(Route, {
41
+ path: "/:specKey/types/:typeTag",
42
+ exact: true
43
+ }, React.createElement(TypeTagScene, {
42
44
  api: api
43
45
  })), React.createElement(Route, {
44
- path: "/:specKey/types/:typeName"
46
+ path: "/:specKey/types/:typeTag/:typeName"
45
47
  }, React.createElement(TypeScene, {
46
48
  api: api
47
49
  })));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/routes/AppRouter.tsx"],"names":["React","useContext","Redirect","Route","Switch","OAuthScene","RunItContext","HomeScene","MethodScene","TagScene","TypeScene","DiffScene","diffPath","oAuthPath","AppRouter","specKey","api","specs","toggleNavigation","sdk","maybeOauth","apiVersion"],"mappings":"AAyBA,OAAOA,KAAP,IAAoBC,UAApB,QAAsC,OAAtC;AACA,SAASC,QAAT,EAAmBC,KAAnB,EAA0BC,MAA1B,QAAwC,kBAAxC;AAEA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,gBAAzC;AAEA,SAASC,SAAT,EAAoBC,WAApB,EAAiCC,QAAjC,EAA2CC,SAA3C,QAA4D,WAA5D;AACA,SAASC,SAAT,QAA0B,qBAA1B;AACA,SAASC,QAAT,EAAmBC,SAAnB,QAAoC,UAApC;AASA,OAAO,IAAMC,SAA6B,GAAG,QAKvC;AAAA,MALwC;AAC5CC,IAAAA,OAD4C;AAE5CC,IAAAA,GAF4C;AAG5CC,IAAAA,KAH4C;AAI5CC,IAAAA;AAJ4C,GAKxC;AACJ,MAAM;AAAEC,IAAAA;AAAF,MAAUlB,UAAU,CAACK,YAAD,CAA1B;AACA,MAAMc,UAAU,GAAGD,GAAG,IAAIA,GAAG,CAACE,UAAJ,KAAmB,KAA7C;AACA,SACE,oBAAC,MAAD,QACE,oBAAC,QAAD;AAAU,IAAA,IAAI,EAAC,GAAf;AAAmB,IAAA,EAAE,aAAMN,OAAN,MAArB;AAAuC,IAAA,KAAK;AAA5C,IADF,EAEGK,UAAU,IACT,oBAAC,KAAD;AAAO,IAAA,IAAI,aAAMP,SAAN;AAAX,KACE,oBAAC,UAAD,OADF,CAHJ,EAOE,oBAAC,KAAD;AAAO,IAAA,IAAI,aAAMD,QAAN;AAAX,KACE,oBAAC,SAAD;AAAW,IAAA,KAAK,EAAEK,KAAlB;AAAyB,IAAA,gBAAgB,EAAEC;AAA3C,IADF,CAPF,EAUE,oBAAC,KAAD;AAAO,IAAA,IAAI,EAAC,4BAAZ;AAAyC,IAAA,KAAK;AAA9C,KACE,oBAAC,SAAD;AAAW,IAAA,GAAG,EAAEF;AAAhB,IADF,CAVF,EAaE,oBAAC,KAAD;AAAO,IAAA,IAAI,EAAC,8BAAZ;AAA2C,IAAA,KAAK;AAAhD,KACE,oBAAC,QAAD;AAAU,IAAA,GAAG,EAAEA;AAAf,IADF,CAbF,EAgBE,oBAAC,KAAD;AAAO,IAAA,IAAI,EAAC;AAAZ,KACE,oBAAC,WAAD;AAAa,IAAA,GAAG,EAAEA;AAAlB,IADF,CAhBF,EAmBE,oBAAC,KAAD;AAAO,IAAA,IAAI,EAAC;AAAZ,KACE,oBAAC,SAAD;AAAW,IAAA,GAAG,EAAEA;AAAhB,IADF,CAnBF,CADF;AAyBD,CAjCM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport React, { FC, useContext } from 'react'\nimport { Redirect, Route, Switch } from 'react-router-dom'\nimport { ApiModel, SpecList } from '@looker/sdk-codegen'\nimport { OAuthScene, RunItContext } from '@looker/run-it'\n\nimport { HomeScene, MethodScene, TagScene, TypeScene } from '../scenes'\nimport { DiffScene } from '../scenes/DiffScene'\nimport { diffPath, oAuthPath } from '../utils'\n\ninterface AppRouterProps {\n api: ApiModel\n specKey: string\n specs: SpecList\n toggleNavigation: (target?: boolean) => void\n}\n\nexport const AppRouter: FC<AppRouterProps> = ({\n specKey,\n api,\n specs,\n toggleNavigation,\n}) => {\n const { sdk } = useContext(RunItContext)\n const maybeOauth = sdk && sdk.apiVersion === '4.0'\n return (\n <Switch>\n <Redirect from=\"/\" to={`/${specKey}/`} exact />\n {maybeOauth && (\n <Route path={`/${oAuthPath}`}>\n <OAuthScene />\n </Route>\n )}\n <Route path={`/${diffPath}/:l?/:r?`}>\n <DiffScene specs={specs} toggleNavigation={toggleNavigation} />\n </Route>\n <Route path=\"/:specKey/(methods|types)?\" exact>\n <HomeScene api={api} />\n </Route>\n <Route path=\"/:specKey/methods/:methodTag\" exact>\n <TagScene api={api} />\n </Route>\n <Route path=\"/:specKey/methods/:methodTag/:methodName\">\n <MethodScene api={api} />\n </Route>\n <Route path=\"/:specKey/types/:typeName\">\n <TypeScene api={api} />\n </Route>\n </Switch>\n )\n}\n"],"file":"AppRouter.js"}
1
+ {"version":3,"sources":["../../../src/routes/AppRouter.tsx"],"names":["React","Redirect","Route","Switch","HomeScene","MethodScene","MethodTagScene","TypeScene","TypeTagScene","DiffScene","diffPath","AppRouter","specKey","api","specs","toggleNavigation","adaptor","setVersionsUrl"],"mappings":"AA2BA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,QAAT,EAAmBC,KAAnB,EAA0BC,MAA1B,QAAwC,kBAAxC;AAKA,SACEC,SADF,EAEEC,WAFF,EAGEC,cAHF,EAIEC,SAJF,EAKEC,YALF,QAMO,WANP;AAOA,SAASC,SAAT,QAA0B,qBAA1B;AACA,SAASC,QAAT,QAAyB,UAAzB;AAWA,OAAO,IAAMC,SAA6B,GAAG,QAOvC;AAAA,MAPwC;AAC5CC,IAAAA,OAD4C;AAE5CC,IAAAA,GAF4C;AAG5CC,IAAAA,KAH4C;AAI5CC,IAAAA,gBAJ4C;AAK5CC,IAAAA,OAL4C;AAM5CC,IAAAA;AAN4C,GAOxC;AACJ,SACE,oBAAC,MAAD,QACE,oBAAC,QAAD;AAAU,IAAA,IAAI,EAAC,GAAf;AAAmB,IAAA,EAAE,aAAML,OAAN,MAArB;AAAuC,IAAA,KAAK;AAA5C,IADF,EAEE,oBAAC,KAAD;AAAO,IAAA,IAAI,aAAMF,QAAN;AAAX,KACE,oBAAC,SAAD;AAAW,IAAA,KAAK,EAAEI,KAAlB;AAAyB,IAAA,gBAAgB,EAAEC;AAA3C,IADF,CAFF,EAKE,oBAAC,KAAD;AAAO,IAAA,IAAI,EAAC,4BAAZ;AAAyC,IAAA,KAAK;AAA9C,KACE,oBAAC,SAAD;AAAW,IAAA,GAAG,EAAEF;AAAhB,IADF,CALF,EAQE,oBAAC,KAAD;AAAO,IAAA,IAAI,EAAC,8BAAZ;AAA2C,IAAA,KAAK;AAAhD,KACE,oBAAC,cAAD;AAAgB,IAAA,GAAG,EAAEA;AAArB,IADF,CARF,EAWE,oBAAC,KAAD;AAAO,IAAA,IAAI,EAAC;AAAZ,KACE,oBAAC,WAAD;AACE,IAAA,GAAG,EAAEA,GADP;AAEE,IAAA,OAAO,EAAEG,OAFX;AAGE,IAAA,cAAc,EAAEC;AAHlB,IADF,CAXF,EAkBE,oBAAC,KAAD;AAAO,IAAA,IAAI,EAAC,0BAAZ;AAAuC,IAAA,KAAK;AAA5C,KACE,oBAAC,YAAD;AAAc,IAAA,GAAG,EAAEJ;AAAnB,IADF,CAlBF,EAqBE,oBAAC,KAAD;AAAO,IAAA,IAAI,EAAC;AAAZ,KACE,oBAAC,SAAD;AAAW,IAAA,GAAG,EAAEA;AAAhB,IADF,CArBF,CADF;AA2BD,CAnCM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react'\nimport React from 'react'\nimport { Redirect, Route, Switch } from 'react-router-dom'\nimport type { ApiModel, SpecList } from '@looker/sdk-codegen'\nimport type { RunItSetter } from '@looker/run-it'\nimport type { IEnvironmentAdaptor } from '@looker/extension-utils'\n\nimport {\n HomeScene,\n MethodScene,\n MethodTagScene,\n TypeScene,\n TypeTagScene,\n} from '../scenes'\nimport { DiffScene } from '../scenes/DiffScene'\nimport { diffPath } from '../utils'\n\ninterface AppRouterProps {\n api: ApiModel\n specKey: string\n specs: SpecList\n toggleNavigation: (target?: boolean) => void\n adaptor: IEnvironmentAdaptor\n setVersionsUrl: RunItSetter\n}\n\nexport const AppRouter: FC<AppRouterProps> = ({\n specKey,\n api,\n specs,\n toggleNavigation,\n adaptor,\n setVersionsUrl,\n}) => {\n return (\n <Switch>\n <Redirect from=\"/\" to={`/${specKey}/`} exact />\n <Route path={`/${diffPath}/:l?/:r?`}>\n <DiffScene specs={specs} toggleNavigation={toggleNavigation} />\n </Route>\n <Route path=\"/:specKey/(methods|types)?\" exact>\n <HomeScene api={api} />\n </Route>\n <Route path=\"/:specKey/methods/:methodTag\" exact>\n <MethodTagScene api={api} />\n </Route>\n <Route path=\"/:specKey/methods/:methodTag/:methodName\">\n <MethodScene\n api={api}\n adaptor={adaptor}\n setVersionsUrl={setVersionsUrl}\n />\n </Route>\n <Route path=\"/:specKey/types/:typeTag\" exact>\n <TypeTagScene api={api} />\n </Route>\n <Route path=\"/:specKey/types/:typeTag/:typeName\">\n <TypeScene api={api} />\n </Route>\n </Switch>\n )\n}\n"],"file":"AppRouter.js"}