@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
@@ -105,7 +105,8 @@ var ExplorePropertyDescription = _ref5 => {
105
105
 
106
106
  var ExplorePropertyDetail = _ref6 => {
107
107
  var {
108
- property
108
+ property,
109
+ api
109
110
  } = _ref6;
110
111
  return _react.default.createElement(_components.Space, {
111
112
  style: {
@@ -115,7 +116,8 @@ var ExplorePropertyDetail = _ref6 => {
115
116
  }, _react.default.createElement(_components.Box, {
116
117
  width: "10rem"
117
118
  }, _react.default.createElement(_.ExploreTypeLink, {
118
- type: property.type
119
+ type: property.type,
120
+ api: api
119
121
  })), _react.default.createElement(_components.Box, {
120
122
  width: "5rem"
121
123
  }, _react.default.createElement(ExplorePropertyRequired, {
@@ -135,11 +137,13 @@ exports.ExplorePropertyDetail = ExplorePropertyDetail;
135
137
 
136
138
  var ExplorePropertyNode = _ref7 => {
137
139
  var {
138
- property
140
+ property,
141
+ api
139
142
  } = _ref7;
140
143
  var legend = (0, _.typeIcon)(property.type);
141
144
  return _react.default.createElement(_components.TreeItem, _extends({}, legend, {
142
145
  detail: _react.default.createElement(ExplorePropertyDetail, {
146
+ api: api,
143
147
  property: property
144
148
  })
145
149
  }), property.jsonName);
@@ -150,6 +154,7 @@ exports.ExplorePropertyNode = ExplorePropertyNode;
150
154
  var ExploreProperty = _ref8 => {
151
155
  var {
152
156
  property,
157
+ api,
153
158
  level = 0,
154
159
  maxDepth = -1,
155
160
  openAll = false
@@ -158,6 +163,7 @@ var ExploreProperty = _ref8 => {
158
163
 
159
164
  if (!picked.intrinsic) {
160
165
  return _react.default.createElement(ExplorePropertyType, {
166
+ api: api,
161
167
  property: property,
162
168
  open: false,
163
169
  level: level + 1,
@@ -167,6 +173,7 @@ var ExploreProperty = _ref8 => {
167
173
  }
168
174
 
169
175
  return _react.default.createElement(ExplorePropertyNode, {
176
+ api: api,
170
177
  property: property
171
178
  });
172
179
  };
@@ -176,6 +183,7 @@ exports.ExploreProperty = ExploreProperty;
176
183
  var ExplorePropertyType = _ref9 => {
177
184
  var {
178
185
  property,
186
+ api,
179
187
  open = true,
180
188
  level = 0,
181
189
  maxDepth = -1,
@@ -188,6 +196,7 @@ var ExplorePropertyType = _ref9 => {
188
196
 
189
197
  if (!nest) {
190
198
  return _react.default.createElement(ExplorePropertyNode, {
199
+ api: api,
191
200
  property: property
192
201
  });
193
202
  }
@@ -199,9 +208,11 @@ var ExplorePropertyType = _ref9 => {
199
208
  defaultOpen: open || openAll,
200
209
  density: -3,
201
210
  detail: _react.default.createElement(ExplorePropertyDetail, {
211
+ api: api,
202
212
  property: property
203
213
  })
204
214
  }, Object.values(props).map(property => _react.default.createElement(ExploreProperty, {
215
+ api: api,
205
216
  key: property.fullName,
206
217
  property: property,
207
218
  level: level + 1,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ExploreType/ExploreProperty.tsx"],"names":["TipIcon","show","tip","icon","title","ExplorePropertyRequired","property","fullName","required","ExplorePropertyDeprecated","deprecated","ExplorePropertyReadOnly","readOnly","DescriptionParagraph","props","ExplorePropertyDescription","description","ExplorePropertyDetail","fontSize","marginLeft","type","ExplorePropertyNode","legend","jsonName","ExploreProperty","level","maxDepth","openAll","picked","intrinsic","ExplorePropertyType","open","nest","Object","values","map"],"mappings":";;;;;;;AA0BA;;AACA;;AAUA;;AACA;;AACA;;AAEA;;AACA;;;;;;AAuBO,IAAMA,OAAyB,GAAG,QAAgC;AAAA,MAA/B;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,GAAR;AAAaC,IAAAA,IAAb;AAAmBC,IAAAA;AAAnB,GAA+B;AACvE,MAAI,CAACH,IAAL,EAAW,OAAO,2DAAP;AACX,SACE,6BAAC,mBAAD;AAAS,IAAA,OAAO,EAAEC;AAAlB,KACE,6BAAC,gBAAD;AAAM,IAAA,IAAI,EAAEC,IAAZ;AAAkB,IAAA,IAAI,EAAC,QAAvB;AAAgC,IAAA,OAAO,EAAED,GAAzC;AAA8C,IAAA,KAAK,EAAEE;AAArD,IADF,CADF;AAKD,CAPM;;;;AA4BA,IAAMC,uBAAiD,GAAG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ErB;AAAjC;AANV,KAQG2B,MAAM,CAACC,MAAP,CAAcpB,KAAd,EAAqBqB,GAArB,CAA0B7B,QAAD,IACxB,6BAAC,eAAD;AACE,IAAA,GAAG,EAAEA,QAAQ,CAACC,QADhB;AAEE,IAAA,QAAQ,EAAED,QAFZ;AAGE,IAAA,KAAK,EAAEmB,KAAK,GAAG,CAHjB;AAIE,IAAA,QAAQ,EAAEC,QAJZ;AAKE,IAAA,OAAO,EAAEC;AALX,IADD,CARH,CADF;AAoBD,CAlCM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { FC } from 'react'\nimport {\n Box,\n IconType,\n Icon,\n Tree,\n TreeItem,\n Tooltip,\n Space,\n Paragraph,\n} from '@looker/components'\nimport { Done } from '@styled-icons/material/Done'\nimport { Lock } from '@styled-icons/material/Lock'\nimport { Remove } from '@styled-icons/material/Remove'\nimport { IProperty } from '@looker/sdk-codegen'\nimport { Markdown } from '@looker/code-editor'\nimport {\n expandable,\n ExploreTypeLink,\n pickType,\n pickTypeProps,\n typeIcon,\n} from '.'\n\ninterface TipIconProps {\n show: boolean\n tip: string\n icon: IconType\n title: string\n}\n\n/**\n * Show a tip with icon if show is true\n * @param show true to show tip and icon\n * @param tip to display on hover\n * @param icon name to use\n * @param title for icon\n * @constructor\n */\nexport const TipIcon: FC<TipIconProps> = ({ show, tip, icon, title }) => {\n if (!show) return <></>\n return (\n <Tooltip content={tip}>\n <Icon icon={icon} size=\"xsmall\" content={tip} title={title} />\n </Tooltip>\n )\n}\n\n/**\n * Interface shared by several ExploreProperty components\n */\ninterface ExplorePropertyProps {\n /** property to explore */\n property: IProperty\n /** the current level of the hierarchy */\n level?: number\n /** the maximum depth to expanded nested types. -1 = all (default), 0 = no expansion */\n maxDepth?: number\n /** open all nodes immediately? */\n openAll?: boolean\n}\n\n/**\n * Show required status if a property is required\n * @param property to describe\n * @constructor\n */\nexport const ExplorePropertyRequired: FC<ExplorePropertyProps> = ({\n property,\n}) => {\n const tip = `${property.fullName} is required`\n return (\n <TipIcon\n show={property.required}\n icon={<Done />}\n tip={tip}\n title=\"required property\"\n />\n )\n}\n\n/**\n * Show deprecated status if a property is deprecated\n * @param property to describe\n * @constructor\n */\nexport const ExplorePropertyDeprecated: FC<ExplorePropertyProps> = ({\n property,\n}) => {\n const tip = `${property.fullName} is deprecated`\n return (\n <TipIcon\n show={property.deprecated}\n icon={<Remove />}\n tip={tip}\n title=\"deprecated property\"\n />\n )\n}\n\n/**\n * Show read-only status if a property is read-only\n * @param property to describe\n * @constructor\n */\nexport const ExplorePropertyReadOnly: FC<ExplorePropertyProps> = ({\n property,\n}) => {\n const tip = `${property.fullName} is read-only`\n return (\n <TipIcon\n show={property.readOnly}\n icon={<Lock />}\n tip={tip}\n title=\"read-only property\"\n />\n )\n}\n\n/**\n * Display the property description if it's assigned\n * @param property to describe\n * @constructor\n */\nconst DescriptionParagraph: FC = (props) => (\n <Paragraph fontSize=\"small\" m=\"none\" {...props} />\n)\n\nconst ExplorePropertyDescription: FC<ExplorePropertyProps> = ({ property }) =>\n property.description ? (\n <Markdown\n source={property.description}\n paragraphOverride={DescriptionParagraph}\n />\n ) : null\n\n/**\n * Show the details of the property\n * @param property\n * @constructor\n */\nexport const ExplorePropertyDetail: FC<ExplorePropertyProps> = ({\n property,\n}) => (\n <Space style={{ fontSize: 'small', marginLeft: '10rem' }}>\n <Box width=\"10rem\">\n <ExploreTypeLink type={property.type} />\n </Box>\n <Box width=\"5rem\">\n <ExplorePropertyRequired property={property} />\n <ExplorePropertyReadOnly property={property} />\n <ExplorePropertyDeprecated property={property} />\n </Box>\n <Box width=\"30rem\">\n <ExplorePropertyDescription property={property} />\n </Box>\n </Space>\n)\n\n/**\n * Render a potentially complex property as a non-expanding node\n * @param property to display\n * @constructor\n */\nexport const ExplorePropertyNode: FC<ExplorePropertyProps> = ({ property }) => {\n const legend = typeIcon(property.type)\n return (\n <TreeItem\n {...legend}\n detail={<ExplorePropertyDetail property={property} />}\n >\n {property.jsonName}\n </TreeItem>\n )\n}\n\n/**\n * Render the Tree or TreeItem for this property\n * @param property to display\n * @param level current nesting level\n * @param maxDepth maximum depth to expand\n * @param openAll expands entire tree if true\n * @constructor\n */\nexport const ExploreProperty: FC<ExplorePropertyProps> = ({\n property,\n level = 0,\n maxDepth = -1,\n openAll = false,\n}) => {\n const picked = pickType(property.type)\n if (!picked.intrinsic) {\n return (\n <ExplorePropertyType\n property={property}\n open={false}\n level={level + 1}\n maxDepth={maxDepth}\n openAll={openAll}\n />\n )\n }\n return <ExplorePropertyNode property={property} />\n}\n\ninterface ExplorePropertyTypeProps extends ExplorePropertyProps {\n /** Open the node display immediately? */\n open?: boolean\n}\n\nexport const ExplorePropertyType: FC<ExplorePropertyTypeProps> = ({\n property,\n open = true,\n level = 0,\n maxDepth = -1,\n openAll = false,\n}) => {\n const type = property.type\n const props = pickTypeProps(type)\n const nest = expandable(level, maxDepth)\n const legend = typeIcon(type)\n if (!nest) {\n return <ExplorePropertyNode property={property} />\n }\n return (\n <Tree\n border\n label={`${property.jsonName}`}\n icon={legend.icon}\n defaultOpen={open || openAll}\n density={-3}\n detail={<ExplorePropertyDetail property={property} />}\n >\n {Object.values(props).map((property) => (\n <ExploreProperty\n key={property.fullName}\n property={property}\n level={level + 1}\n maxDepth={maxDepth}\n openAll={openAll}\n />\n ))}\n </Tree>\n )\n}\n"],"file":"ExploreProperty.js"}
1
+ {"version":3,"sources":["../../../src/components/ExploreType/ExploreProperty.tsx"],"names":["TipIcon","show","tip","icon","title","ExplorePropertyRequired","property","fullName","required","ExplorePropertyDeprecated","deprecated","ExplorePropertyReadOnly","readOnly","DescriptionParagraph","props","ExplorePropertyDescription","description","ExplorePropertyDetail","api","fontSize","marginLeft","type","ExplorePropertyNode","legend","jsonName","ExploreProperty","level","maxDepth","openAll","picked","intrinsic","ExplorePropertyType","open","nest","Object","values","map"],"mappings":";;;;;;;AA2BA;;AAEA;;AASA;;AACA;;AACA;;AAEA;;AACA;;;;;;AAuBO,IAAMA,OAAyB,GAAG,QAAgC;AAAA,MAA/B;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,GAAR;AAAaC,IAAAA,IAAb;AAAmBC,IAAAA;AAAnB,GAA+B;AACvE,MAAI,CAACH,IAAL,EAAW,OAAO,2DAAP;AACX,SACE,6BAAC,mBAAD;AAAS,IAAA,OAAO,EAAEC;AAAlB,KACE,6BAAC,gBAAD;AAAM,IAAA,IAAI,EAAEC,IAAZ;AAAkB,IAAA,IAAI,EAAC,QAAvB;AAAgC,IAAA,OAAO,EAAED,GAAzC;AAA8C,IAAA,KAAK,EAAEE;AAArD,IADF,CADF;AAKD,CAPM;;;;AA4BA,IAAMC,uBAAiD,GAAG,SAE3D;AAAA,MAF4D;AAChEC,IAAAA;AADgE,GAE5D;AACJ,MAAMJ,GAAG,aAAMI,QAAQ,CAACC,QAAf,iBAAT;AACA,SACE,6BAAC,OAAD;AACE,IAAA,IAAI,EAAED,QAAQ,CAACE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B;AAKE,IAAA,OAAO,EAAE,CAAC,CALZ;AAME,IAAA,MAAM,EAAE,6BAAC,qBAAD;AAAuB,MAAA,GAAG,EAAEV,GAA5B;AAAiC,MAAA,QAAQ,EAAEZ;AAA3C;AANV,KAQG4B,MAAM,CAACC,MAAP,CAAcrB,KAAd,EAAqBsB,GAArB,CAA0B9B,QAAD,IACxB,6BAAC,eAAD;AACE,IAAA,GAAG,EAAEY,GADP;AAEE,IAAA,GAAG,EAAEZ,QAAQ,CAACC,QAFhB;AAGE,IAAA,QAAQ,EAAED,QAHZ;AAIE,IAAA,KAAK,EAAEoB,KAAK,GAAG,CAJjB;AAKE,IAAA,QAAQ,EAAEC,QALZ;AAME,IAAA,OAAO,EAAEC;AANX,IADD,CARH,CADF;AAqBD,CApCM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react'\nimport React from 'react'\nimport type { IconType } from '@looker/components'\nimport {\n Box,\n Icon,\n Tree,\n TreeItem,\n Tooltip,\n Space,\n Paragraph,\n} from '@looker/components'\nimport { Done } from '@styled-icons/material/Done'\nimport { Lock } from '@styled-icons/material/Lock'\nimport { Remove } from '@styled-icons/material/Remove'\nimport type { IProperty, ApiModel } from '@looker/sdk-codegen'\nimport { Markdown } from '@looker/code-editor'\nimport {\n expandable,\n ExploreTypeLink,\n pickType,\n pickTypeProps,\n typeIcon,\n} from '.'\n\ninterface TipIconProps {\n show: boolean\n tip: string\n icon: IconType\n title: string\n}\n\n/**\n * Show a tip with icon if show is true\n * @param show true to show tip and icon\n * @param tip to display on hover\n * @param icon name to use\n * @param title for icon\n * @constructor\n */\nexport const TipIcon: FC<TipIconProps> = ({ show, tip, icon, title }) => {\n if (!show) return <></>\n return (\n <Tooltip content={tip}>\n <Icon icon={icon} size=\"xsmall\" content={tip} title={title} />\n </Tooltip>\n )\n}\n\n/**\n * Interface shared by several ExploreProperty components\n */\ninterface ExplorePropertyProps {\n /** property to explore */\n property: IProperty\n /** the current level of the hierarchy */\n level?: number\n /** the maximum depth to expanded nested types. -1 = all (default), 0 = no expansion */\n maxDepth?: number\n /** open all nodes immediately? */\n openAll?: boolean\n}\n\n/**\n * Show required status if a property is required\n * @param property to describe\n * @constructor\n */\nexport const ExplorePropertyRequired: FC<ExplorePropertyProps> = ({\n property,\n}) => {\n const tip = `${property.fullName} is required`\n return (\n <TipIcon\n show={property.required}\n icon={<Done />}\n tip={tip}\n title=\"required property\"\n />\n )\n}\n\n/**\n * Show deprecated status if a property is deprecated\n * @param property to describe\n * @constructor\n */\nexport const ExplorePropertyDeprecated: FC<ExplorePropertyProps> = ({\n property,\n}) => {\n const tip = `${property.fullName} is deprecated`\n return (\n <TipIcon\n show={property.deprecated}\n icon={<Remove />}\n tip={tip}\n title=\"deprecated property\"\n />\n )\n}\n\n/**\n * Show read-only status if a property is read-only\n * @param property to describe\n * @constructor\n */\nexport const ExplorePropertyReadOnly: FC<ExplorePropertyProps> = ({\n property,\n}) => {\n const tip = `${property.fullName} is read-only`\n return (\n <TipIcon\n show={property.readOnly}\n icon={<Lock />}\n tip={tip}\n title=\"read-only property\"\n />\n )\n}\n\n/**\n * Display the property description if it's assigned\n * @param property to describe\n * @constructor\n */\nconst DescriptionParagraph: FC = (props) => (\n <Paragraph fontSize=\"small\" m=\"none\" {...props} />\n)\n\nconst ExplorePropertyDescription: FC<ExplorePropertyProps> = ({ property }) =>\n property.description ? (\n <Markdown\n source={property.description}\n paragraphOverride={DescriptionParagraph}\n />\n ) : null\n\ninterface ExploreApiPropertyProps extends ExplorePropertyProps {\n /** parsed api */\n api: ApiModel\n}\n\n/**\n * Show the details of the property\n * @param property\n * @constructor\n */\nexport const ExplorePropertyDetail: FC<ExploreApiPropertyProps> = ({\n property,\n api,\n}) => (\n <Space style={{ fontSize: 'small', marginLeft: '10rem' }}>\n <Box width=\"10rem\">\n <ExploreTypeLink type={property.type} api={api} />\n </Box>\n <Box width=\"5rem\">\n <ExplorePropertyRequired property={property} />\n <ExplorePropertyReadOnly property={property} />\n <ExplorePropertyDeprecated property={property} />\n </Box>\n <Box width=\"30rem\">\n <ExplorePropertyDescription property={property} />\n </Box>\n </Space>\n)\n\n/**\n * Render a potentially complex property as a non-expanding node\n * @param property to display\n * @constructor\n */\nexport const ExplorePropertyNode: FC<ExploreApiPropertyProps> = ({\n property,\n api,\n}) => {\n const legend = typeIcon(property.type)\n return (\n <TreeItem\n {...legend}\n detail={<ExplorePropertyDetail api={api} property={property} />}\n >\n {property.jsonName}\n </TreeItem>\n )\n}\n\n/**\n * Render the Tree or TreeItem for this property\n * @param property to display\n * @param level current nesting level\n * @param maxDepth maximum depth to expand\n * @param openAll expands entire tree if true\n * @constructor\n */\nexport const ExploreProperty: FC<ExploreApiPropertyProps> = ({\n property,\n api,\n level = 0,\n maxDepth = -1,\n openAll = false,\n}) => {\n const picked = pickType(property.type)\n if (!picked.intrinsic) {\n return (\n <ExplorePropertyType\n api={api}\n property={property}\n open={false}\n level={level + 1}\n maxDepth={maxDepth}\n openAll={openAll}\n />\n )\n }\n return <ExplorePropertyNode api={api} property={property} />\n}\n\ninterface ExplorePropertyTypeProps extends ExploreApiPropertyProps {\n /** Open the node display immediately? */\n open?: boolean\n}\n\nexport const ExplorePropertyType: FC<ExplorePropertyTypeProps> = ({\n property,\n api,\n open = true,\n level = 0,\n maxDepth = -1,\n openAll = false,\n}) => {\n const type = property.type\n const props = pickTypeProps(type)\n const nest = expandable(level, maxDepth)\n const legend = typeIcon(type)\n if (!nest) {\n return <ExplorePropertyNode api={api} property={property} />\n }\n return (\n <Tree\n border\n label={`${property.jsonName}`}\n icon={legend.icon}\n defaultOpen={open || openAll}\n density={-3}\n detail={<ExplorePropertyDetail api={api} property={property} />}\n >\n {Object.values(props).map((property) => (\n <ExploreProperty\n api={api}\n key={property.fullName}\n property={property}\n level={level + 1}\n maxDepth={maxDepth}\n openAll={openAll}\n />\n ))}\n </Tree>\n )\n}\n"],"file":"ExploreProperty.js"}
@@ -1,11 +1,13 @@
1
- import { FC } from 'react';
2
- import { IType } from '@looker/sdk-codegen';
1
+ import type { FC } from 'react';
2
+ import type { IType, ApiModel } from '@looker/sdk-codegen';
3
3
  interface ExploreTypeLinkProps {
4
4
  type: IType;
5
+ api: ApiModel;
5
6
  }
6
7
  export declare const ExploreTypeLink: FC<ExploreTypeLinkProps>;
7
8
  interface ExploreTypeProps {
8
9
  type: IType;
10
+ api: ApiModel;
9
11
  open?: boolean;
10
12
  link?: boolean;
11
13
  level?: number;
@@ -15,17 +15,18 @@ var _reactRouter = require("react-router");
15
15
 
16
16
  var _Link = require("../Link");
17
17
 
18
- var _utils = require("../../utils");
19
-
20
18
  var _reducers = require("../../reducers");
21
19
 
20
+ var _utils = require("../../utils");
21
+
22
22
  var _ = require(".");
23
23
 
24
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
25
 
26
26
  var ExploreTypeLink = _ref => {
27
27
  var {
28
- type
28
+ type,
29
+ api
29
30
  } = _ref;
30
31
  var location = (0, _reactRouter.useLocation)();
31
32
  var picked = (0, _.pickType)(type);
@@ -39,7 +40,7 @@ var ExploreTypeLink = _ref => {
39
40
  var specKey = (0, _reducers.getSpecKey)(location);
40
41
  return _react.default.createElement(_react.default.Fragment, null, prefix, _react.default.createElement(_Link.Link, {
41
42
  key: type.fullName,
42
- to: (0, _utils.buildTypePath)(specKey, name)
43
+ to: (0, _utils.buildPath)(api, type, specKey)
43
44
  }, name), suffix);
44
45
  };
45
46
 
@@ -48,6 +49,7 @@ exports.ExploreTypeLink = ExploreTypeLink;
48
49
  var ExploreType = _ref2 => {
49
50
  var {
50
51
  type,
52
+ api,
51
53
  open = true,
52
54
  link = false,
53
55
  level = 0,
@@ -66,9 +68,11 @@ var ExploreType = _ref2 => {
66
68
  detail: _react.default.createElement(_react.default.Fragment, null, !!type.description && _react.default.createElement(_components.TreeItem, {
67
69
  key: type.name
68
70
  }, type.description), link && _react.default.createElement(ExploreTypeLink, {
69
- type: type
71
+ type: type,
72
+ api: api
70
73
  }))
71
74
  }, nest && Object.values(props).map(property => _react.default.createElement(_.ExploreProperty, {
75
+ api: api,
72
76
  key: property.fullName,
73
77
  property: property,
74
78
  level: level + 1,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ExploreType/ExploreType.tsx"],"names":["ExploreTypeLink","type","location","picked","name","prefix","suffix","typed","TypeOfType","Intrinsic","jsonName","specKey","fullName","ExploreType","open","link","level","maxDepth","openAll","props","nest","legend","icon","description","Object","values","map","property"],"mappings":";;;;;;;AA0BA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAaO,IAAMA,eAAyC,GAAG,QAAc;AAAA,MAAb;AAAEC,IAAAA;AAAF,GAAa;AACrE,MAAMC,QAAQ,GAAG,+BAAjB;AACA,MAAMC,MAAM,GAAG,gBAASF,IAAT,CAAf;AACA,MAAMG,IAAI,GAAGD,MAAM,CAACC,IAApB;AACA,MAAMC,MAAM,GAAG,sBAAeJ,I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G;AAApB,OAA2BH,IAAI,CAACsB,WAAhC,CAFJ,EAIGR,IAAI,IAAI,6BAAC,eAAD;AAAiB,MAAA,IAAI,EAAEd;AAAvB,MAJX;AAPJ,KAeGmB,IAAI,IACHI,MAAM,CAACC,MAAP,CAAcN,KAAd,EAAqBO,GAArB,CAA0BC,QAAD,IACvB,6BAAC,iBAAD;AACE,IAAA,GAAG,EAAEA,QAAQ,CAACf,QADhB;AAEE,IAAA,QAAQ,EAAEe,QAFZ;AAGE,IAAA,KAAK,EAAEX,KAAK,GAAG,CAHjB;AAIE,IAAA,QAAQ,EAAEC,QAJZ;AAKE,IAAA,OAAO,EAAEC;AALX,IADF,CAhBJ,CADF;AA4BD,CAvCM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { FC } from 'react'\nimport { Code, Tree, TreeItem } from '@looker/components'\nimport { IType, TypeOfType, typeOfType } from '@looker/sdk-codegen'\nimport { useLocation } from 'react-router'\nimport { Link } from '../Link'\nimport { buildTypePath } from '../../utils'\nimport { getSpecKey } from '../../reducers'\nimport {\n ExploreProperty,\n pickType,\n pickTypeProps,\n typeIcon,\n typeLinkPrefix,\n typeLinkSuffix,\n} from '.'\n\ninterface ExploreTypeLinkProps {\n type: IType\n}\n\nexport const ExploreTypeLink: FC<ExploreTypeLinkProps> = ({ type }) => {\n const location = useLocation()\n const picked = pickType(type)\n const name = picked.name\n const prefix = typeLinkPrefix(type)\n const suffix = typeLinkSuffix(type)\n const typed = typeOfType(picked)\n if (typed === TypeOfType.Intrinsic)\n return <Code fontSize=\"small\">{type.jsonName}</Code>\n\n const specKey = getSpecKey(location)\n return (\n <>\n {prefix}\n <Link key={type.fullName} to={buildTypePath(specKey, name)}>\n {name}\n </Link>\n {suffix}\n </>\n )\n}\n\ninterface ExploreTypeProps {\n /** Type to explore */\n type: IType\n /** Open the node display immediately */\n open?: boolean\n /** Create a link to the type? */\n link?: boolean\n /** the nesting level of the type */\n level?: number\n /** the maximum depth to expanded nested types. -1 = all (default), 0 = no expansion */\n maxDepth?: number\n /** open all nodes immediately? */\n openAll?: boolean\n}\n\nexport const ExploreType: FC<ExploreTypeProps> = ({\n type,\n open = true,\n link = false,\n level = 0,\n maxDepth = -1,\n openAll = false,\n}) => {\n const props = pickTypeProps(type)\n const nest = maxDepth === -1 || level < maxDepth\n const legend = typeIcon(type)\n return (\n <Tree\n border\n label={type.name}\n icon={legend.icon}\n defaultOpen={open || openAll}\n density={-3}\n detail={\n <>\n {!!type.description && (\n <TreeItem key={type.name}>{type.description}</TreeItem>\n )}\n {link && <ExploreTypeLink type={type} />}\n </>\n }\n >\n {nest &&\n Object.values(props).map((property) => (\n <ExploreProperty\n key={property.fullName}\n property={property}\n level={level + 1}\n maxDepth={maxDepth}\n openAll={openAll}\n />\n ))}\n </Tree>\n )\n}\n"],"file":"ExploreType.js"}
1
+ {"version":3,"sources":["../../../src/components/ExploreType/ExploreType.tsx"],"names":["ExploreTypeLink","type","api","location","picked","name","prefix","suffix","typed","TypeOfType","Intrinsic","jsonName","specKey","fullName","ExploreType","open","link","level","maxDepth","openAll","props","nest","legend","icon","description","Object","values","map","property"],"mappings":";;;;;;;AA2BA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAcO,IAAMA,eAAyC,GAAG,QAAmB;AAAA,MAAlB;AAAEC,IAAAA,IAAF;AAAQC,IAAAA;AAAR,GAAkB;AAC1E,MAAMC,QAAQ,GAAG,+BAAjB;AACA,MAAMC,MAAM,GAAG,gBAASH,IAAT,CAAf;AACA,MAAMI,IAAI,GAAGD,MAAM,CAACC,IAApB;AACA,MAAMC,MAAM,GAAG,sBAAeL,IAAf,CAAf;AACA,MAAMM,MAAM,GAAG,sBAAeN,IAAf,CAAf;AACA,MAAMO,KAAK,GAAG,4BAAWJ,MAAX,CAAd;AACA,MAAII,KAAK,KAAKC,uBAAWC,SAAzB,EACE,OAAO,6BAAC,gBAAD;AAAM,IAAA,QAAQ,EAAC;AAAf,KAAwBT,IAAI,CAACU,QAA7B,CAAP;AAEF,MAAMC,OAAO,GAAG,0BAAWT,QAAX,CAAhB;AACA,SACE,4DACGG,MADH,EAEE,6BAAC,UAAD;AAAM,IAAA,GAAG,EAAEL,IAAI,CAACY,QAAhB;AAA0B,IAAA,EAAE,EAAE,sBAAUX,GAAV,EAAeD,IAAf,EAAqBW,OAArB;AAA9B,KACGP,IADH,CAFF,EAKGE,MALH,CADF;AASD,CApBM;;;;AAuCA,IAAMO,WAAiC,GAAG,SAQ3C;AAAA,MAR4C;AAChDb,IAAAA,IADgD;AAEhDC,IAAAA,GAFgD;AAGhDa,IAAAA,IAAI,GAAG,IAHyC;AAIhDC,IAAAA,IAAI,GAAG,KAJyC;AAKhDC,IAAAA,KAAK,GAAG,CALwC;AAMhDC,IAAAA,QAAQ,GAAG,CAAC,CANoC;AAOhDC,IAAAA,OAAO,GAAG;AAPsC,GAQ5C;AACJ,MAAMC,KAAK,GAAG,qBAAcnB,IAAd,CAAd;AACA,MAAMoB,IAAI,GAAGH,QAAQ,KAAK,CAAC,CAAd,IAAmBD,KAAK,GAAGC,QAAxC;AACA,MAAMI,MAAM,GAAG,gBAASrB,IAAT,CAAf;AACA,SACE,6BAAC,gBAAD;AACE,IAAA,MAAM,MADR;AAEE,IAAA,KAAK,EAAEA,IAAI,CAACI,IAFd;AAGE,IAAA,IAAI,EAAEiB,MAAM,CAACC,IAHf;AAIE,IAAA,WAAW,EAAER,IAAI,IAAII,OAJvB;AAKE,IAAA,OAAO,EAAE,CAAC,CALZ;AAME,IAAA,MAAM,EACJ,4DACG,CAAC,CAAClB,IAAI,CAACuB,WAAP,IACC,6BAAC,oBAAD;AAAU,MAAA,GAAG,EAAEvB,IAAI,CAACI;AAApB,OAA2BJ,IAAI,CAACuB,WAAhC,CAFJ,EAIGR,IAAI,IAAI,6BAAC,eAAD;AAAiB,MAAA,IAAI,EAAEf,IAAvB;AAA6B,MAAA,GAAG,EAAEC;AAAlC,MAJX;AAPJ,KAeGmB,IAAI,IACHI,MAAM,CAACC,MAAP,CAAcN,KAAd,EAAqBO,GAArB,CAA0BC,QAAD,IACvB,6BAAC,iBAAD;AACE,IAAA,GAAG,EAAE1B,GADP;AAEE,IAAA,GAAG,EAAE0B,QAAQ,CAACf,QAFhB;AAGE,IAAA,QAAQ,EAAEe,QAHZ;AAIE,IAAA,KAAK,EAAEX,KAAK,GAAG,CAJjB;AAKE,IAAA,QAAQ,EAAEC,QALZ;AAME,IAAA,OAAO,EAAEC;AANX,IADF,CAhBJ,CADF;AA6BD,CAzCM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react'\nimport React from 'react'\nimport { Code, Tree, TreeItem } from '@looker/components'\nimport type { IType, ApiModel } from '@looker/sdk-codegen'\nimport { TypeOfType, typeOfType } from '@looker/sdk-codegen'\nimport { useLocation } from 'react-router'\nimport { Link } from '../Link'\nimport { getSpecKey } from '../../reducers'\nimport { buildPath } from '../../utils'\nimport {\n ExploreProperty,\n pickType,\n pickTypeProps,\n typeIcon,\n typeLinkPrefix,\n typeLinkSuffix,\n} from '.'\n\ninterface ExploreTypeLinkProps {\n type: IType\n api: ApiModel\n}\n\nexport const ExploreTypeLink: FC<ExploreTypeLinkProps> = ({ type, api }) => {\n const location = useLocation()\n const picked = pickType(type)\n const name = picked.name\n const prefix = typeLinkPrefix(type)\n const suffix = typeLinkSuffix(type)\n const typed = typeOfType(picked)\n if (typed === TypeOfType.Intrinsic)\n return <Code fontSize=\"small\">{type.jsonName}</Code>\n\n const specKey = getSpecKey(location)\n return (\n <>\n {prefix}\n <Link key={type.fullName} to={buildPath(api, type, specKey)}>\n {name}\n </Link>\n {suffix}\n </>\n )\n}\n\ninterface ExploreTypeProps {\n /** Type to explore */\n type: IType\n /** parsed specification */\n api: ApiModel\n /** Open the node display immediately */\n open?: boolean\n /** Create a link to the type? */\n link?: boolean\n /** the nesting level of the type */\n level?: number\n /** the maximum depth to expanded nested types. -1 = all (default), 0 = no expansion */\n maxDepth?: number\n /** open all nodes immediately? */\n openAll?: boolean\n}\n\nexport const ExploreType: FC<ExploreTypeProps> = ({\n type,\n api,\n open = true,\n link = false,\n level = 0,\n maxDepth = -1,\n openAll = false,\n}) => {\n const props = pickTypeProps(type)\n const nest = maxDepth === -1 || level < maxDepth\n const legend = typeIcon(type)\n return (\n <Tree\n border\n label={type.name}\n icon={legend.icon}\n defaultOpen={open || openAll}\n density={-3}\n detail={\n <>\n {!!type.description && (\n <TreeItem key={type.name}>{type.description}</TreeItem>\n )}\n {link && <ExploreTypeLink type={type} api={api} />}\n </>\n }\n >\n {nest &&\n Object.values(props).map((property) => (\n <ExploreProperty\n api={api}\n key={property.fullName}\n property={property}\n level={level + 1}\n maxDepth={maxDepth}\n openAll={openAll}\n />\n ))}\n </Tree>\n )\n}\n"],"file":"ExploreType.js"}
@@ -1,5 +1,5 @@
1
- import { IconType } from '@looker/components';
2
- import { IType } from '@looker/sdk-codegen';
1
+ import type { IconType } from '@looker/components';
2
+ import type { IType } from '@looker/sdk-codegen';
3
3
  export declare const pickType: (value: IType) => IType;
4
4
  export declare const expandable: (level: number, maxDepth?: number) => boolean;
5
5
  export declare const pickTypeProps: (value: IType) => import("@looker/sdk-codegen").PropertyList;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ExploreType/exploreUtils.tsx"],"names":["pickType","value","typed","TypeOfType","Intrinsic","Complex","elementType","expandable","level","maxDepth","pickTypeProps","properties","typeLinkPrefix","Hash","typeLinkSuffix","Array","DelimArray","typeIcon","className","icon","title","jsonName","type"],"mappings":";;;;;;;AA0BA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAMO,IAAMA,QAAQ,GAAIC,KAAD,IAAkB;AACxC,MAAMC,KAAK,GAAG,4BAAWD,KAAX,CAAd;;AACA,UAAQC,KAAR;AACE,SAAKC,uBAAWC,SAAhB;AACA,SAAKD,u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AC,4BAAD,OAAR;AAA2BC,QAAAA,KAAK,EAAEE,IAAI,CAACD;AAAvC,OAAP;;AACF;AACE,aAAO;AAAEF,QAAAA,IAAI,EAAE,6BAAC,UAAD,OAAR;AAAkBC,QAAAA,KAAK,EAAEE,IAAI,CAACD;AAA9B,OAAP;AAvBJ;AAyBD,CAtCM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React from 'react'\nimport { IconType } from '@looker/components'\nimport { FieldString, IdeFileManifest, IdeParameter } from '@looker/icons'\nimport { CalendarToday } from '@styled-icons/material/CalendarToday'\nimport { Check } from '@styled-icons/material/Check'\nimport { Code } from '@styled-icons/material/Code'\nimport { Link } from '@styled-icons/material/Link'\nimport { Toc } from '@styled-icons/material/Toc'\nimport { VpnKey } from '@styled-icons/material/VpnKey'\nimport { Tag } from '@styled-icons/material-rounded'\nimport { Email } from '@styled-icons/material-outlined'\nimport { IType, TypeOfType, typeOfType } from '@looker/sdk-codegen'\n\n/**\n * Get the type or element type if this type is a collection\n * @param value type to pick\n */\nexport const pickType = (value: IType) => {\n const typed = typeOfType(value)\n switch (typed) {\n case TypeOfType.Intrinsic:\n case TypeOfType.Complex:\n return value\n default:\n return value.elementType!\n }\n}\n\n/**\n * Is this an expandable node?\n * @param level is the current level of the hierarchy\n * @param maxDepth is the maximum depth to expanded nested types. -1 = all (default), 0 = no expansion\n */\nexport const expandable = (level: number, maxDepth = -1) =>\n maxDepth === -1 || level <= maxDepth\n\n/**\n * Gets the properties for the \"exploring\" type\n * @param value type to pick\n */\nexport const pickTypeProps = (value: IType) => pickType(value).properties\n\n/**\n * Get the link prefix for the type\n * @param value type to link to\n */\nexport const typeLinkPrefix = (value: IType) => {\n const typed = typeOfType(value)\n switch (typed) {\n case TypeOfType.Hash:\n return 'Hash['\n default:\n return ''\n }\n}\n\n/**\n * Get the link suffix for the type\n * @param value type to link to\n */\nexport const typeLinkSuffix = (value: IType) => {\n const typed = typeOfType(value)\n switch (typed) {\n case TypeOfType.Array:\n case TypeOfType.DelimArray:\n return '[]'\n case TypeOfType.Hash:\n return ']'\n default:\n return ''\n }\n}\n\ninterface TypedIcon {\n icon: IconType\n title: string\n}\n\n/**\n * Determines the icon name for the type\n * @param value to iconize\n */\nexport const typeIcon = (value: IType): TypedIcon => {\n switch (value.className) {\n case 'ArrayType':\n return { icon: <Toc />, title: value.jsonName }\n case 'DelimArrayType':\n return { icon: <Toc />, title: value.jsonName }\n case 'HashType':\n return { icon: <IdeFileManifest />, title: value.jsonName }\n case 'EnumType':\n return { icon: <IdeParameter />, title: value.jsonName }\n }\n\n const type = pickType(value)\n switch (type.jsonName) {\n case 'boolean':\n return { icon: <Check />, title: type.jsonName }\n case 'int64':\n case 'integer':\n case 'float':\n case 'double':\n return { icon: <Tag />, title: type.jsonName }\n case 'string':\n case 'hostname':\n case 'uuid':\n case 'ipv4':\n case 'ipv6':\n return { icon: <FieldString />, title: type.jsonName }\n case 'email':\n return { icon: <Email />, title: type.jsonName }\n case 'password':\n return { icon: <VpnKey />, title: type.jsonName }\n case 'uri':\n return { icon: <Link />, title: type.jsonName }\n case 'datetime':\n return { icon: <CalendarToday />, title: type.jsonName }\n default:\n return { icon: <Code />, title: type.jsonName }\n }\n}\n"],"file":"exploreUtils.js"}
1
+ {"version":3,"sources":["../../../src/components/ExploreType/exploreUtils.tsx"],"names":["pickType","value","typed","TypeOfType","Intrinsic","Complex","elementType","expandable","level","maxDepth","pickTypeProps","properties","typeLinkPrefix","Hash","typeLinkSuffix","Array","DelimArray","typeIcon","className","icon","title","jsonName","type"],"mappings":";;;;;;;AA0BA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;AAMO,IAAMA,QAAQ,GAAIC,KAAD,IAAkB;AACxC,MAAMC,KAAK,GAAG,4BAAWD,KAAX,CAAd;;AACA,UAAQC,KAAR;AACE,SAAKC,uBAAWC,SAAhB;AACA,SAAKD,uBAAWE,OAAhB;AACE,aAAOJ,KAAP;;AACF;AACE,aAAOA,KAAK,CAACK,WAAb;AALJ;AAOD,CATM;;;;AAgBA,IAAMC,UAAU,GAAG,SAAbA,UAAa,CAACC,KAAD;AAAA,MAAgBC,QAAhB,uEAA2B,CAAC,CAA5B;AAAA,SACxBA,QAAQ,KAAK,CAAC,CAAd,IAAmBD,KAAK,IAAIC,QADJ;AAAA,CAAnB;;;;AAOA,IAAMC,aAAa,GAAIT,KAAD,IAAkBD,QAAQ,CAACC,KAAD,CAAR,CAAgBU,UAAxD;;;;AAMA,IAAMC,cAAc,GAAIX,KAAD,IAAkB;AAC9C,MAAMC,KAAK,GAAG,4BAAWD,KAAX,CAAd;;AACA,UAAQC,KAAR;AACE,SAAKC,uBAAWU,IAAhB;AACE,aAAO,OAAP;;AACF;AACE,aAAO,EAAP;AAJJ;AAMD,CARM;;;;AAcA,IAAMC,cAAc,GAAIb,KAAD,IAAkB;AAC9C,MAAMC,KAAK,GAAG,4BAAWD,KAAX,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SAAK,MAAL;AACA,SAAK,MAAL;AACA,SAAK,MAAL;AACE,aAAO;AAAEF,QAAAA,IAAI,EAAE,6BAAC,kBAAD,OAAR;AAAyBC,QAAAA,KAAK,EAAEE,IAAI,CAACD;AAArC,OAAP;;AACF,SAAK,OAAL;AACE,aAAO;AAAEF,QAAAA,IAAI,EAAE,6BAAC,uBAAD,OAAR;AAAmBC,QAAAA,KAAK,EAAEE,IAAI,CAACD;AAA/B,OAAP;;AACF,SAAK,UAAL;AACE,aAAO;AAAEF,QAAAA,IAAI,EAAE,6BAAC,cAAD,OAAR;AAAoBC,QAAAA,KAAK,EAAEE,IAAI,CAACD;AAAhC,OAAP;;AACF,SAAK,KAAL;AACE,aAAO;AAAEF,QAAAA,IAAI,EAAE,6BAAC,UAAD,OAAR;AAAkBC,QAAAA,KAAK,EAAEE,IAAI,CAACD;AAA9B,OAAP;;AACF,SAAK,UAAL;AACE,aAAO;AAAEF,QAAAA,IAAI,EAAE,6BAAC,4BAAD,OAAR;AAA2BC,QAAAA,KAAK,EAAEE,IAAI,CAACD;AAAvC,OAAP;;AACF;AACE,aAAO;AAAEF,QAAAA,IAAI,EAAE,6BAAC,UAAD,OAAR;AAAkBC,QAAAA,KAAK,EAAEE,IAAI,CAACD;AAA9B,OAAP;AAvBJ;AAyBD,CAtCM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React from 'react'\nimport type { IconType } from '@looker/components'\nimport { FieldString, IdeFileManifest, IdeParameter } from '@looker/icons'\nimport { CalendarToday } from '@styled-icons/material/CalendarToday'\nimport { Check } from '@styled-icons/material/Check'\nimport { Code } from '@styled-icons/material/Code'\nimport { Link } from '@styled-icons/material/Link'\nimport { Toc } from '@styled-icons/material/Toc'\nimport { VpnKey } from '@styled-icons/material/VpnKey'\nimport { Tag } from '@styled-icons/material-rounded'\nimport { Email } from '@styled-icons/material-outlined'\nimport type { IType } from '@looker/sdk-codegen'\nimport { TypeOfType, typeOfType } from '@looker/sdk-codegen'\n\n/**\n * Get the type or element type if this type is a collection\n * @param value type to pick\n */\nexport const pickType = (value: IType) => {\n const typed = typeOfType(value)\n switch (typed) {\n case TypeOfType.Intrinsic:\n case TypeOfType.Complex:\n return value\n default:\n return value.elementType!\n }\n}\n\n/**\n * Is this an expandable node?\n * @param level is the current level of the hierarchy\n * @param maxDepth is the maximum depth to expanded nested types. -1 = all (default), 0 = no expansion\n */\nexport const expandable = (level: number, maxDepth = -1) =>\n maxDepth === -1 || level <= maxDepth\n\n/**\n * Gets the properties for the \"exploring\" type\n * @param value type to pick\n */\nexport const pickTypeProps = (value: IType) => pickType(value).properties\n\n/**\n * Get the link prefix for the type\n * @param value type to link to\n */\nexport const typeLinkPrefix = (value: IType) => {\n const typed = typeOfType(value)\n switch (typed) {\n case TypeOfType.Hash:\n return 'Hash['\n default:\n return ''\n }\n}\n\n/**\n * Get the link suffix for the type\n * @param value type to link to\n */\nexport const typeLinkSuffix = (value: IType) => {\n const typed = typeOfType(value)\n switch (typed) {\n case TypeOfType.Array:\n case TypeOfType.DelimArray:\n return '[]'\n case TypeOfType.Hash:\n return ']'\n default:\n return ''\n }\n}\n\ninterface TypedIcon {\n icon: IconType\n title: string\n}\n\n/**\n * Determines the icon name for the type\n * @param value to iconize\n */\nexport const typeIcon = (value: IType): TypedIcon => {\n switch (value.className) {\n case 'ArrayType':\n return { icon: <Toc />, title: value.jsonName }\n case 'DelimArrayType':\n return { icon: <Toc />, title: value.jsonName }\n case 'HashType':\n return { icon: <IdeFileManifest />, title: value.jsonName }\n case 'EnumType':\n return { icon: <IdeParameter />, title: value.jsonName }\n }\n\n const type = pickType(value)\n switch (type.jsonName) {\n case 'boolean':\n return { icon: <Check />, title: type.jsonName }\n case 'int64':\n case 'integer':\n case 'float':\n case 'double':\n return { icon: <Tag />, title: type.jsonName }\n case 'string':\n case 'hostname':\n case 'uuid':\n case 'ipv4':\n case 'ipv6':\n return { icon: <FieldString />, title: type.jsonName }\n case 'email':\n return { icon: <Email />, title: type.jsonName }\n case 'password':\n return { icon: <VpnKey />, title: type.jsonName }\n case 'uri':\n return { icon: <Link />, title: type.jsonName }\n case 'datetime':\n return { icon: <CalendarToday />, title: type.jsonName }\n default:\n return { icon: <Code />, title: type.jsonName }\n }\n}\n"],"file":"exploreUtils.js"}
@@ -1,6 +1,6 @@
1
- import React, { FC, Dispatch } from 'react';
2
- import { SpecList, SpecItem } from '@looker/sdk-codegen';
3
- import { SpecAction } from '../../reducers';
1
+ import type { FC, Dispatch } from 'react';
2
+ import type { SpecList, SpecItem } from '@looker/sdk-codegen';
3
+ import type { SpecAction } from '../../reducers';
4
4
  interface HeaderProps {
5
5
  specs: SpecList;
6
6
  spec: SpecItem;
@@ -9,6 +9,7 @@ interface HeaderProps {
9
9
  className?: string;
10
10
  }
11
11
  export declare const HEADER_REM = 4;
12
+ export declare const HEADER_TOGGLE_LABEL = "Toggle Navigation";
12
13
  export declare const HeaderLayout: FC<HeaderProps>;
13
- export declare const Header: import("styled-components").StyledComponent<React.FC<HeaderProps>, import("styled-components").DefaultTheme, {}, never>;
14
+ export declare const Header: import("styled-components").StyledComponent<FC<HeaderProps>, import("styled-components").DefaultTheme, {}, never>;
14
15
  export {};
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Header = exports.HeaderLayout = exports.HEADER_REM = void 0;
6
+ exports.Header = exports.HeaderLayout = exports.HEADER_TOGGLE_LABEL = exports.HEADER_REM = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -23,6 +23,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
23
23
 
24
24
  var HEADER_REM = 4;
25
25
  exports.HEADER_REM = HEADER_REM;
26
+ var HEADER_TOGGLE_LABEL = 'Toggle Navigation';
27
+ exports.HEADER_TOGGLE_LABEL = HEADER_TOGGLE_LABEL;
26
28
 
27
29
  var HeaderLayout = _ref => {
28
30
  var {
@@ -41,7 +43,8 @@ var HeaderLayout = _ref => {
41
43
  size: "small",
42
44
  onClick: () => toggleNavigation(),
43
45
  icon: _react.default.createElement(_Menu.Menu, null),
44
- label: "Toggle Navigation"
46
+ "aria-label": "nav toggle",
47
+ label: HEADER_TOGGLE_LABEL
45
48
  }), _react.default.createElement(_Link.Link, {
46
49
  to: "/".concat(spec.key)
47
50
  }, _react.default.createElement(_components.Space, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Header/Header.tsx"],"names":["HEADER_REM","HeaderLayout","className","specs","spec","specDispatch","toggleNavigation","key","width","Header","theme","colors","ui2"],"mappings":";;;;;;;AA0BA;;AACA;;AACA;;AAOA;;AACA;;AAGA;;AAEA;;;;AAcO,IAAMA,UAAU,GAAG,CAAnB;;;AAKA,IAAMC,YAA6B,GAAG;AAAA,MAAC;AAC5CC,IAAAA,SAD4C;AAE5CC,IAAAA,KAF4C;AAG5CC,IAAAA,IAH4C;AAI5CC,IAAAA,YAJ4C;AAK5CC,IAAAA;AAL4C,GAAD;AAAA,SAO3C,6BAAC,kBAAD;AACE,IAAA,MAAM,YAAKN,UAAL,QADR;AAEE,IAAA,SAAS,EAAEE,SAFb;AAGE,IAAA,EAAE,EAAC,OAHL;AAIE,IAAA,EAAE,EAAC;AAJL,KAME,6BAAC,iBAAD,QACE,6BAAC,sBAAD;AACE,IAAA,IAAI,EAAC,OADP;AAEE,IAAA,OAAO,EAAE,MAAMI,gBAAgB,EAFjC;AAGE,IAAA,IAAI,EAAE,6BAAC,UAAD,OAHR;AAIE,IAAA,KAAK,EAAC;AAJR,IADF,EAQE,6BAAC,UAAD;AAAM,IAAA,EAAE,aAAMF,IAAI,CAACG,GAAX;AAAR,KACE,6BAAC,iBAAD;AAAO,IAAA,GAAG,EAAC;AAAX,KACE,6BAAC,gBAAD;AACE,IAAA,IAAI,EAAE,6BAAC,iBAAD,OADR;AAEE,IAAA,GAAG,EAAC,QAFN;AAGE,IAAA,KAAK,EAAC,OAHR;AAIE,IAAA,KAAK,EAAE;AAAEC,MAAAA,KAAK,EAAE;AAAT;AAJT,IADF,EAOE,6BAAC,mBAAD;AAAS,IAAA,KAAK,EAAC;AAAf,oBAPF,CADF,CARF,CANF,EA0BE,6BAAC,oCAAD;AAAmB,IAAA,KAAK,EAAEL,KAA1B;AAAiC,IAAA,IAAI,EAAEC,IAAvC;AAA6C,IAAA,YAAY,EAAEC;AAA3D,IA1BF,CAP2C;AAAA,CAAtC;;;AAqCA,IAAMI,MAAM,GAAG,+BAAOR,YAAP,CAAH;AAAA;AAAA;AAAA,sCACU;AAAA,MAAC;AAAES,IAAAA;AAAF,GAAD;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaC,GAA5B;AAAA,CADV,CAAZ","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, Dispatch } from 'react'\nimport styled from 'styled-components'\nimport {\n Icon,\n Space,\n IconButton,\n Heading,\n Header as SemanticHeader,\n} from '@looker/components'\nimport { LookerLogo } from '@looker/icons'\nimport { Menu } from '@styled-icons/material/Menu'\nimport { SpecList, SpecItem } from '@looker/sdk-codegen'\n\nimport { Link } from '../Link'\nimport { SpecAction } from '../../reducers'\nimport { SelectorContainer } from '../SelectorContainer'\n\ninterface HeaderProps {\n /** Specs to choose from */\n specs: SpecList\n /** Current selected spec */\n spec: SpecItem\n /** Spec state setter */\n specDispatch: Dispatch<SpecAction>\n /** Nav state setter */\n toggleNavigation: (target?: boolean) => void\n className?: string\n}\n\nexport const HEADER_REM = 4\n\n/**\n * Renders the API Explorer header\n */\nexport const HeaderLayout: FC<HeaderProps> = ({\n className,\n specs,\n spec,\n specDispatch,\n toggleNavigation,\n}) => (\n <SemanticHeader\n height={`${HEADER_REM}rem`}\n className={className}\n pl=\"small\"\n pr=\"large\"\n >\n <Space>\n <IconButton\n size=\"small\"\n onClick={() => toggleNavigation()}\n icon={<Menu />}\n label=\"Toggle Navigation\"\n />\n\n <Link to={`/${spec.key}`}>\n <Space gap=\"small\">\n <Icon\n icon={<LookerLogo />}\n alt=\"Looker\"\n color=\"text5\"\n style={{ width: '82px' }}\n />\n <Heading color=\"key\">API Explorer</Heading>\n </Space>\n </Link>\n </Space>\n <SelectorContainer specs={specs} spec={spec} specDispatch={specDispatch} />\n </SemanticHeader>\n)\n\nexport const Header = styled(HeaderLayout)`\n border-bottom: 1px solid ${({ theme }) => theme.colors.ui2};\n`\n"],"file":"Header.js"}
1
+ {"version":3,"sources":["../../../src/components/Header/Header.tsx"],"names":["HEADER_REM","HEADER_TOGGLE_LABEL","HeaderLayout","className","specs","spec","specDispatch","toggleNavigation","key","width","Header","theme","colors","ui2"],"mappings":";;;;;;;AA2BA;;AACA;;AACA;;AAOA;;AACA;;AAGA;;AAEA;;;;AAcO,IAAMA,UAAU,GAAG,CAAnB;;AAEA,IAAMC,mBAAmB,GAAG,mBAA5B;;;AAKA,IAAMC,YAA6B,GAAG;AAAA,MAAC;AAC5CC,IAAAA,SAD4C;AAE5CC,IAAAA,KAF4C;AAG5CC,IAAAA,IAH4C;AAI5CC,IAAAA,YAJ4C;AAK5CC,IAAAA;AAL4C,GAAD;AAAA,SAO3C,6BAAC,kBAAD;AACE,IAAA,MAAM,YAAKP,UAAL,QADR;AAEE,IAAA,SAAS,EAAEG,SAFb;AAGE,IAAA,EAAE,EAAC,OAHL;AAIE,IAAA,EAAE,EAAC;AAJL,KAME,6BAAC,iBAAD,QACE,6BAAC,sBAAD;AACE,IAAA,IAAI,EAAC,OADP;AAEE,IAAA,OAAO,EAAE,MAAMI,gBAAgB,EAFjC;AAGE,IAAA,IAAI,EAAE,6BAAC,UAAD,OAHR;AAIE,kBAAW,YAJb;AAKE,IAAA,KAAK,EAAEN;AALT,IADF,EASE,6BAAC,UAAD;AAAM,IAAA,EAAE,aAAMI,IAAI,CAACG,GAAX;AAAR,KACE,6BAAC,iBAAD;AAAO,IAAA,GAAG,EAAC;AAAX,KACE,6BAAC,gBAAD;AACE,IAAA,IAAI,EAAE,6BAAC,iBAAD,OADR;AAEE,IAAA,GAAG,EAAC,QAFN;AAGE,IAAA,KAAK,EAAC,OAHR;AAIE,IAAA,KAAK,EAAE;AAAEC,MAAAA,KAAK,EAAE;AAAT;AAJT,IADF,EAOE,6BAAC,mBAAD;AAAS,IAAA,KAAK,EAAC;AAAf,oBAPF,CADF,CATF,CANF,EA2BE,6BAAC,oCAAD;AAAmB,IAAA,KAAK,EAAEL,KAA1B;AAAiC,IAAA,IAAI,EAAEC,IAAvC;AAA6C,IAAA,YAAY,EAAEC;AAA3D,IA3BF,CAP2C;AAAA,CAAtC;;;AAsCA,IAAMI,MAAM,GAAG,+BAAOR,YAAP,CAAH;AAAA;AAAA;AAAA,sCACU;AAAA,MAAC;AAAES,IAAAA;AAAF,GAAD;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaC,GAA5B;AAAA,CADV,CAAZ","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, Dispatch } from 'react'\nimport React from 'react'\nimport styled from 'styled-components'\nimport {\n Icon,\n Space,\n IconButton,\n Heading,\n Header as SemanticHeader,\n} from '@looker/components'\nimport { LookerLogo } from '@looker/icons'\nimport { Menu } from '@styled-icons/material/Menu'\nimport type { SpecList, SpecItem } from '@looker/sdk-codegen'\n\nimport { Link } from '../Link'\nimport type { SpecAction } from '../../reducers'\nimport { SelectorContainer } from '../SelectorContainer'\n\ninterface HeaderProps {\n /** Specs to choose from */\n specs: SpecList\n /** Current selected spec */\n spec: SpecItem\n /** Spec state setter */\n specDispatch: Dispatch<SpecAction>\n /** Nav state setter */\n toggleNavigation: (target?: boolean) => void\n className?: string\n}\n\nexport const HEADER_REM = 4\n\nexport const HEADER_TOGGLE_LABEL = 'Toggle Navigation'\n\n/**\n * Renders the API Explorer header\n */\nexport const HeaderLayout: FC<HeaderProps> = ({\n className,\n specs,\n spec,\n specDispatch,\n toggleNavigation,\n}) => (\n <SemanticHeader\n height={`${HEADER_REM}rem`}\n className={className}\n pl=\"small\"\n pr=\"large\"\n >\n <Space>\n <IconButton\n size=\"small\"\n onClick={() => toggleNavigation()}\n icon={<Menu />}\n aria-label=\"nav toggle\"\n label={HEADER_TOGGLE_LABEL}\n />\n\n <Link to={`/${spec.key}`}>\n <Space gap=\"small\">\n <Icon\n icon={<LookerLogo />}\n alt=\"Looker\"\n color=\"text5\"\n style={{ width: '82px' }}\n />\n <Heading color=\"key\">API Explorer</Heading>\n </Space>\n </Link>\n </Space>\n <SelectorContainer specs={specs} spec={spec} specDispatch={specDispatch} />\n </SemanticHeader>\n)\n\nexport const Header = styled(HeaderLayout)`\n border-bottom: 1px solid ${({ theme }) => theme.colors.ui2};\n`\n"],"file":"Header.js"}
@@ -1 +1 @@
1
- export { Header, HEADER_REM } from './Header';
1
+ export { Header, HEADER_REM, HEADER_TOGGLE_LABEL } from './Header';
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "HEADER_REM", {
15
15
  return _Header.HEADER_REM;
16
16
  }
17
17
  });
18
+ Object.defineProperty(exports, "HEADER_TOGGLE_LABEL", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _Header.HEADER_TOGGLE_LABEL;
22
+ }
23
+ });
18
24
 
19
25
  var _Header = require("./Header");
20
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Header/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAyBA","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 { Header, HEADER_REM } from './Header'\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/components/Header/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyBA","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 { Header, HEADER_REM, HEADER_TOGGLE_LABEL } from './Header'\n"],"file":"index.js"}
@@ -1,6 +1,6 @@
1
- import { FC, Dispatch } from 'react';
2
- import { SpecList, SpecItem } from '@looker/sdk-codegen';
3
- import { SpecAction } from '../../reducers';
1
+ import type { FC, Dispatch } from 'react';
2
+ import type { SpecList, SpecItem } from '@looker/sdk-codegen';
3
+ import type { SpecAction } from '../../reducers';
4
4
  interface ApiSpecSelectorProps {
5
5
  specs: SpecList;
6
6
  spec: SpecItem;
@@ -22,6 +22,7 @@ var ApiSpecSelector = _ref => {
22
22
  specDispatch
23
23
  } = _ref;
24
24
  var history = (0, _reactRouterDom.useHistory)();
25
+ var location = (0, _reactRouterDom.useLocation)();
25
26
  var options = Object.entries(specs).map(_ref2 => {
26
27
  var [key, spec] = _ref2;
27
28
  return {
@@ -33,7 +34,8 @@ var ApiSpecSelector = _ref => {
33
34
 
34
35
  var handleChange = specKey => {
35
36
  specDispatch((0, _reducers.selectSpec)(specKey));
36
- history.push("/".concat(specKey));
37
+ var matchPath = location.pathname.replace("/".concat(spec.key), "/".concat(specKey));
38
+ history.push(matchPath);
37
39
  };
38
40
 
39
41
  return _react.default.createElement(_components.Select, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/SelectorContainer/ApiSpecSelector.tsx"],"names":["ApiSpecSelector","specs","spec","specDispatch","history","options","Object","entries","map","key","value","label","description","status","handleChange","specKey","push"],"mappings":";;;;;;;AA0BA;;AACA;;AACA;;AAGA;;;;AAQO,IAAMA,eAAyC,GAAG,QAInD;AAAA,MAJoD;AACxDC,IAAAA,KADwD;AAExDC,IAAAA,IAFwD;AAGxDC,IAAAA;AAHwD,GAIpD;AACJ,MAAMC,OAAO,GAAG,iCAAhB;AACA,MAAMC,OAAO,GAAGC,MAAM,CAACC,OAAP,CAAeN,KAAf,EAAsBO,GAAtB,CAA0B;AAAA,QAAC,CAACC,GAAD,EAAMP,IAAN,CAAD;AAAA,WAAkB;AAC1DQ,MAAAA,KAAK,EAAED,GADmD;AAE1DE,MAAAA,KAAK,EAAEF,GAFmD;AAG1DG,MAAAA,WAAW,EAAEV,IAAI,CAACW;AAHwC,KAAlB;AAAA,GAA1B,CAAhB;;AAMA,MAAMC,YAAY,GAAIC,OAAD,IAAqB;AACxCZ,IAAAA,YAAY,CAAC,0BAAWY,OAAX,CAAD,CAAZ;AACAX,IAAAA,OAAO,CAACY,IAAR,YAAiBD,OAAjB;AACD,GAHD;;AAKA,SACE,6BAAC,kBAAD;AACE,IAAA,KAAK,EAAC,OADR;AAEE,kBAAW,eAFb;AAGE,IAAA,YAAY,EAAEb,IAAI,CAACO,GAHrB;AAIE,IAAA,OAAO,EAAEJ,OAJX;AAKE,IAAA,QAAQ,EAAES;AALZ,IADF;AASD,CA1BM","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, Dispatch } from 'react'\nimport { Select } from '@looker/components'\nimport { useHistory } from 'react-router-dom'\n\nimport { SpecList, SpecItem } from '@looker/sdk-codegen'\nimport { SpecAction, selectSpec } from '../../reducers'\n\ninterface ApiSpecSelectorProps {\n specs: SpecList\n spec: SpecItem\n specDispatch: Dispatch<SpecAction>\n}\n\nexport const ApiSpecSelector: FC<ApiSpecSelectorProps> = ({\n specs,\n spec,\n specDispatch,\n}) => {\n const history = useHistory()\n const options = Object.entries(specs).map(([key, spec]) => ({\n value: key,\n label: key,\n description: spec.status,\n }))\n\n const handleChange = (specKey: string) => {\n specDispatch(selectSpec(specKey))\n history.push(`/${specKey}`)\n }\n\n return (\n <Select\n width=\"10rem\"\n aria-label=\"spec selector\"\n defaultValue={spec.key}\n options={options}\n onChange={handleChange}\n />\n )\n}\n"],"file":"ApiSpecSelector.js"}
1
+ {"version":3,"sources":["../../../src/components/SelectorContainer/ApiSpecSelector.tsx"],"names":["ApiSpecSelector","specs","spec","specDispatch","history","location","options","Object","entries","map","key","value","label","description","status","handleChange","specKey","matchPath","pathname","replace","push"],"mappings":";;;;;;;AA2BA;;AACA;;AACA;;AAIA;;;;AAQO,IAAMA,eAAyC,GAAG,QAInD;AAAA,MAJoD;AACxDC,IAAAA,KADwD;AAExDC,IAAAA,IAFwD;AAGxDC,IAAAA;AAHwD,GAIpD;AACJ,MAAMC,OAAO,GAAG,iCAAhB;AACA,MAAMC,QAAQ,GAAG,kCAAjB;AACA,MAAMC,OAAO,GAAGC,MAAM,CAACC,OAAP,CAAeP,KAAf,EAAsBQ,GAAtB,CAA0B;AAAA,QAAC,CAACC,GAAD,EAAMR,IAAN,CAAD;AAAA,WAAkB;AAC1DS,MAAAA,KAAK,EAAED,GADmD;AAE1DE,MAAAA,KAAK,EAAEF,GAFmD;AAG1DG,MAAAA,WAAW,EAAEX,IAAI,CAACY;AAHwC,KAAlB;AAAA,GAA1B,CAAhB;;AAMA,MAAMC,YAAY,GAAIC,OAAD,IAAqB;AACxCb,IAAAA,YAAY,CAAC,0BAAWa,OAAX,CAAD,CAAZ;AACA,QAAMC,SAAS,GAAGZ,QAAQ,CAACa,QAAT,CAAkBC,OAAlB,YAA8BjB,IAAI,CAACQ,GAAnC,cAA8CM,OAA9C,EAAlB;AACAZ,IAAAA,OAAO,CAACgB,IAAR,CAAaH,SAAb;AACD,GAJD;;AAMA,SACE,6BAAC,kBAAD;AACE,IAAA,KAAK,EAAC,OADR;AAEE,kBAAW,eAFb;AAGE,IAAA,YAAY,EAAEf,IAAI,CAACQ,GAHrB;AAIE,IAAA,OAAO,EAAEJ,OAJX;AAKE,IAAA,QAAQ,EAAES;AALZ,IADF;AASD,CA5BM","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, Dispatch } from 'react'\nimport React from 'react'\nimport { Select } from '@looker/components'\nimport { useHistory, useLocation } from 'react-router-dom'\n\nimport type { SpecList, SpecItem } from '@looker/sdk-codegen'\nimport type { SpecAction } from '../../reducers'\nimport { selectSpec } from '../../reducers'\n\ninterface ApiSpecSelectorProps {\n specs: SpecList\n spec: SpecItem\n specDispatch: Dispatch<SpecAction>\n}\n\nexport const ApiSpecSelector: FC<ApiSpecSelectorProps> = ({\n specs,\n spec,\n specDispatch,\n}) => {\n const history = useHistory()\n const location = useLocation()\n const options = Object.entries(specs).map(([key, spec]) => ({\n value: key,\n label: key,\n description: spec.status,\n }))\n\n const handleChange = (specKey: string) => {\n specDispatch(selectSpec(specKey))\n const matchPath = location.pathname.replace(`/${spec.key}`, `/${specKey}`)\n history.push(matchPath)\n }\n\n return (\n <Select\n width=\"10rem\"\n aria-label=\"spec selector\"\n defaultValue={spec.key}\n options={options}\n onChange={handleChange}\n />\n )\n}\n"],"file":"ApiSpecSelector.js"}
@@ -1,2 +1,2 @@
1
- import { FC } from 'react';
1
+ import type { FC } from 'react';
2
2
  export declare const SdkLanguageSelector: FC;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.SdkLanguageSelector = void 0;
7
7
 
8
- var _react = _interopRequireWildcard(require("react"));
8
+ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _sdkCodegen = require("@looker/sdk-codegen");
11
11
 
@@ -13,26 +13,15 @@ var _components = require("@looker/components");
13
13
 
14
14
  var _reactRedux = require("react-redux");
15
15
 
16
- var _hooks = require("../../hooks");
17
-
18
16
  var _state = require("../../state");
19
17
 
20
- var _context = require("../../context");
21
-
22
- var _utils = require("../../utils");
23
-
24
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
-
26
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
19
 
28
20
  var SdkLanguageSelector = () => {
29
21
  var {
30
22
  setSdkLanguageAction
31
- } = (0, _hooks.useActions)();
32
- var selectedSdkLanguage = (0, _reactRedux.useSelector)(_state.getSelectedSdkLanguage);
33
- var {
34
- envAdaptor
35
- } = (0, _react.useContext)(_context.EnvAdaptorContext);
23
+ } = (0, _state.useSettingActions)();
24
+ var selectedSdkLanguage = (0, _reactRedux.useSelector)(_state.selectSdkLanguage);
36
25
 
37
26
  var allSdkLanguages = _sdkCodegen.codeGenerators.map(gen => ({
38
27
  value: gen.language
@@ -45,8 +34,9 @@ var SdkLanguageSelector = () => {
45
34
  });
46
35
 
47
36
  var handleChange = language => {
48
- setSdkLanguageAction(language);
49
- envAdaptor.localStorageSetItem(_utils.EnvAdaptorConstants.LOCALSTORAGE_SDK_LANGUAGE_KEY, language);
37
+ setSdkLanguageAction({
38
+ sdkLanguage: language
39
+ });
50
40
  };
51
41
 
52
42
  return _react.default.createElement(_components.Select, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/SelectorContainer/SdkLanguageSelector.tsx"],"names":["SdkLanguageSelector","setSdkLanguageAction","selectedSdkLanguage","getSelectedSdkLanguage","envAdaptor","EnvAdaptorContext","allSdkLanguages","codeGenerators","map","gen","value","language","push","options","handleChange","localStorageSetItem","EnvAdaptorConstants","LOCALSTORAGE_SDK_LANGUAGE_KEY"],"mappings":";;;;;;;AAyBA;;AACA;;AACA;;AACA;;AAGA;;AACA;;AACA;;AACA;;;;;;AAKO,IAAMA,mBAAuB,GAAG,MAAM;AAC3C,MAAM;AAAEC,IAAAA;AAAF,MAA2B,wBAAjC;AACA,MAAMC,mBAAmB,GAAG,6BAAYC,6BAAZ,CAA5B;AACA,MAAM;AAAEC,IAAAA;AAAF,MAAiB,uBAAWC,0BAAX,CAAvB;;AAEA,MAAMC,eAAoC,GAAGC,2BAAeC,GAAf,CAAoBC,GAAD,KAAU;AACxEC,IAAAA,KAAK,EAAED,GAAG,CAACE;AAD6D,GAAV,CAAnB,CAA7C;;AAIAL,EAAAA,eAAe,CAACM,IAAhB,CAAqB;AACnBC,IAAAA,OAAO,EAAE,CACP;AACEH,MAAAA,KAAK,EAAE;AADT,KADO;AADU,GAArB;;AAQA,MAAMI,YAAY,GAAIH,QAAD,IAAsB;AACzCV,IAAAA,oBAAoB,CAACU,QAAD,CAApB;AACAP,IAAAA,UAAU,CAACW,mBAAX,CACEC,2BAAoBC,6BADtB,EAEEN,QAFF;AAID,GAND;;AAQA,SACE,6BAAC,kBAAD;AACE,kBAAW,uBADb;AAEE,IAAA,KAAK,EAAET,mBAFT;AAGE,IAAA,QAAQ,EAAEY,YAHZ;AAIE,IAAA,OAAO,EAAER;AAJX,IADF;AAQD,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 { codeGenerators } from '@looker/sdk-codegen'\nimport { Select } from '@looker/components'\nimport { useSelector } from 'react-redux'\nimport { SelectOptionProps } from '@looker/components/lib/Form/Inputs/Select'\n\nimport { useActions } from '../../hooks'\nimport { getSelectedSdkLanguage } from '../../state'\nimport { EnvAdaptorContext } from '../../context'\nimport { EnvAdaptorConstants } from '../../utils'\n\n/**\n * Allows the user to select their preferred SDK language\n */\nexport const SdkLanguageSelector: FC = () => {\n const { setSdkLanguageAction } = useActions()\n const selectedSdkLanguage = useSelector(getSelectedSdkLanguage)\n const { envAdaptor } = useContext(EnvAdaptorContext)\n\n const allSdkLanguages: SelectOptionProps[] = codeGenerators.map((gen) => ({\n value: gen.language,\n }))\n\n allSdkLanguages.push({\n options: [\n {\n value: 'All',\n },\n ],\n })\n\n const handleChange = (language: string) => {\n setSdkLanguageAction(language)\n envAdaptor.localStorageSetItem(\n EnvAdaptorConstants.LOCALSTORAGE_SDK_LANGUAGE_KEY,\n language\n )\n }\n\n return (\n <Select\n aria-label=\"sdk language selector\"\n value={selectedSdkLanguage}\n onChange={handleChange}\n options={allSdkLanguages}\n />\n )\n}\n"],"file":"SdkLanguageSelector.js"}
1
+ {"version":3,"sources":["../../../src/components/SelectorContainer/SdkLanguageSelector.tsx"],"names":["SdkLanguageSelector","setSdkLanguageAction","selectedSdkLanguage","selectSdkLanguage","allSdkLanguages","codeGenerators","map","gen","value","language","push","options","handleChange","sdkLanguage"],"mappings":";;;;;;;AA0BA;;AACA;;AACA;;AACA;;AAGA;;;;AAKO,IAAMA,mBAAuB,GAAG,MAAM;AAC3C,MAAM;AAAEC,IAAAA;AAAF,MAA2B,+BAAjC;AACA,MAAMC,mBAAmB,GAAG,6BAAYC,wBAAZ,CAA5B;;AAEA,MAAMC,eAAoC,GAAGC,2BAAeC,GAAf,CAAoBC,GAAD,KAAU;AACxEC,IAAAA,KAAK,EAAED,GAAG,CAACE;AAD6D,GAAV,CAAnB,CAA7C;;AAIAL,EAAAA,eAAe,CAACM,IAAhB,CAAqB;AACnBC,IAAAA,OAAO,EAAE,CACP;AACEH,MAAAA,KAAK,EAAE;AADT,KADO;AADU,GAArB;;AAQA,MAAMI,YAAY,GAAIH,QAAD,IAAsB;AACzCR,IAAAA,oBAAoB,CAAC;AAAEY,MAAAA,WAAW,EAAEJ;AAAf,KAAD,CAApB;AACD,GAFD;;AAIA,SACE,6BAAC,kBAAD;AACE,kBAAW,uBADb;AAEE,IAAA,KAAK,EAAEP,mBAFT;AAGE,IAAA,QAAQ,EAAEU,YAHZ;AAIE,IAAA,OAAO,EAAER;AAJX,IADF;AAQD,CA5BM","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 { codeGenerators } from '@looker/sdk-codegen'\nimport { Select } from '@looker/components'\nimport { useSelector } from 'react-redux'\nimport type { SelectOptionProps } from '@looker/components'\n\nimport { useSettingActions, selectSdkLanguage } from '../../state'\n\n/**\n * Allows the user to select their preferred SDK language\n */\nexport const SdkLanguageSelector: FC = () => {\n const { setSdkLanguageAction } = useSettingActions()\n const selectedSdkLanguage = useSelector(selectSdkLanguage)\n\n const allSdkLanguages: SelectOptionProps[] = codeGenerators.map((gen) => ({\n value: gen.language,\n }))\n\n allSdkLanguages.push({\n options: [\n {\n value: 'All',\n },\n ],\n })\n\n const handleChange = (language: string) => {\n setSdkLanguageAction({ sdkLanguage: language })\n }\n\n return (\n <Select\n aria-label=\"sdk language selector\"\n value={selectedSdkLanguage}\n onChange={handleChange}\n options={allSdkLanguages}\n />\n )\n}\n"],"file":"SdkLanguageSelector.js"}
@@ -1,7 +1,8 @@
1
- import { FC, Dispatch } from 'react';
2
- import { SpecList, SpecItem } from '@looker/sdk-codegen';
3
- import { SpecAction } from '../../reducers';
4
- interface SelectorContainerProps {
1
+ import type { FC, Dispatch } from 'react';
2
+ import type { SpaceHelperProps } from '@looker/components';
3
+ import type { SpecList, SpecItem } from '@looker/sdk-codegen';
4
+ import type { SpecAction } from '../../reducers';
5
+ interface SelectorContainerProps extends SpaceHelperProps {
5
6
  specs: SpecList;
6
7
  spec: SpecItem;
7
8
  specDispatch: Dispatch<SpecAction>;
@@ -21,6 +21,12 @@ var _ApiSpecSelector = require("./ApiSpecSelector");
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
24
+ 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); }
25
+
26
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
27
+
28
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
29
+
24
30
  var HEADER_REM = 4;
25
31
  exports.HEADER_REM = HEADER_REM;
26
32
 
@@ -29,10 +35,12 @@ var SelectorContainer = _ref => {
29
35
  specs,
30
36
  spec,
31
37
  specDispatch
32
- } = _ref;
33
- return _react.default.createElement(_components.Space, {
38
+ } = _ref,
39
+ spaceProps = _objectWithoutProperties(_ref, ["specs", "spec", "specDispatch"]);
40
+
41
+ return _react.default.createElement(_components.Space, _extends({
34
42
  width: "auto"
35
- }, _react.default.createElement(_SdkLanguageSelector.SdkLanguageSelector, null), _react.default.createElement(_ApiSpecSelector.ApiSpecSelector, {
43
+ }, spaceProps), _react.default.createElement(_SdkLanguageSelector.SdkLanguageSelector, null), _react.default.createElement(_ApiSpecSelector.ApiSpecSelector, {
36
44
  specs: specs,
37
45
  spec: spec,
38
46
  specDispatch: specDispatch
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/SelectorContainer/SelectorContainer.tsx"],"names":["HEADER_REM","SelectorContainer","specs","spec","specDispatch","diffPath","key"],"mappings":";;;;;;;AA0BA;;AACA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;;;AAWO,IAAMA,UAAU,GAAG,CAAnB;;;AAKA,IAAMC,iBAA6C,GAAG;AAAA,MAAC;AAC5DC,IAAAA,KAD4D;AAE5DC,IAAAA,IAF4D;AAG5DC,IAAAA;AAH4D,GAAD;AAAA,SAK3D,6BAAC,iBAAD;AAAO,IAAA,KAAK,EAAC;AAAb,KACE,6BAAC,wCAAD,OADF,EAEE,6BAAC,gCAAD;AAAiB,IAAA,KAAK,EAAEF,KAAxB;AAA+B,IAAA,IAAI,EAAEC,IAArC;AAA2C,IAAA,YAAY,EAAEC;AAAzD,IAFF,EAGE,6BAAC,UAAD;AAAM,IAAA,EAAE,aAAMC,eAAN,cAAkBF,IAAI,CAACG,GAAvB;AAAR,KACE,6BAAC,sBAAD;AACE,IAAA,MAAM,MADR;AAEE,IAAA,KAAK,EAAC,wBAFR;AAGE,IAAA,IAAI,EAAE,6BAAC,4BAAD,OAHR;AAIE,IAAA,IAAI,EAAC;AAJP,IADF,CAHF,CAL2D;AAAA,CAAtD","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, Dispatch } from 'react'\nimport { Space, IconButton } from '@looker/components'\nimport { ChangeHistory } from '@styled-icons/material/ChangeHistory'\nimport { SpecList, SpecItem } from '@looker/sdk-codegen'\nimport { Link } from '../Link'\nimport { SpecAction } from '../../reducers'\nimport { diffPath } from '../../utils'\nimport { SdkLanguageSelector } from './SdkLanguageSelector'\nimport { ApiSpecSelector } from './ApiSpecSelector'\n\ninterface SelectorContainerProps {\n /** Specs to choose from */\n specs: SpecList\n /** Current selected spec */\n spec: SpecItem\n /** Spec state setter */\n specDispatch: Dispatch<SpecAction>\n}\n\nexport const HEADER_REM = 4\n\n/**\n * Renders a container for selectors\n */\nexport const SelectorContainer: FC<SelectorContainerProps> = ({\n specs,\n spec,\n specDispatch,\n}) => (\n <Space width=\"auto\">\n <SdkLanguageSelector />\n <ApiSpecSelector specs={specs} spec={spec} specDispatch={specDispatch} />\n <Link to={`/${diffPath}/${spec.key}/`}>\n <IconButton\n toggle\n label=\"Compare Specifications\"\n icon={<ChangeHistory />}\n size=\"small\"\n />\n </Link>\n </Space>\n)\n"],"file":"SelectorContainer.js"}
1
+ {"version":3,"sources":["../../../src/components/SelectorContainer/SelectorContainer.tsx"],"names":["HEADER_REM","SelectorContainer","specs","spec","specDispatch","spaceProps","diffPath","key"],"mappings":";;;;;;;AA2BA;;AAEA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;;;;;;;;;AAWO,IAAMA,UAAU,GAAG,CAAnB;;;AAKA,IAAMC,iBAA6C,GAAG;AAAA,MAAC;AAC5DC,IAAAA,KAD4D;AAE5DC,IAAAA,IAF4D;AAG5DC,IAAAA;AAH4D,GAAD;AAAA,MAIxDC,UAJwD;;AAAA,SAM3D,6BAAC,iBAAD;AAAO,IAAA,KAAK,EAAC;AAAb,KAAwBA,UAAxB,GACE,6BAAC,wCAAD,OADF,EAEE,6BAAC,gCAAD;AAAiB,IAAA,KAAK,EAAEH,KAAxB;AAA+B,IAAA,IAAI,EAAEC,IAArC;AAA2C,IAAA,YAAY,EAAEC;AAAzD,IAFF,EAGE,6BAAC,UAAD;AAAM,IAAA,EAAE,aAAME,eAAN,cAAkBH,IAAI,CAACI,GAAvB;AAAR,KACE,6BAAC,sBAAD;AACE,IAAA,MAAM,MADR;AAEE,IAAA,KAAK,EAAC,wBAFR;AAGE,IAAA,IAAI,EAAE,6BAAC,4BAAD,OAHR;AAIE,IAAA,IAAI,EAAC;AAJP,IADF,CAHF,CAN2D;AAAA,CAAtD","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, Dispatch } from 'react'\nimport React from 'react'\nimport type { SpaceHelperProps } from '@looker/components'\nimport { Space, IconButton } from '@looker/components'\nimport { ChangeHistory } from '@styled-icons/material/ChangeHistory'\nimport type { SpecList, SpecItem } from '@looker/sdk-codegen'\nimport { Link } from '../Link'\nimport type { SpecAction } from '../../reducers'\nimport { diffPath } from '../../utils'\nimport { SdkLanguageSelector } from './SdkLanguageSelector'\nimport { ApiSpecSelector } from './ApiSpecSelector'\n\ninterface SelectorContainerProps extends SpaceHelperProps {\n /** Specs to choose from */\n specs: SpecList\n /** Current selected spec */\n spec: SpecItem\n /** Spec state setter */\n specDispatch: Dispatch<SpecAction>\n}\n\nexport const HEADER_REM = 4\n\n/**\n * Renders a container for selectors\n */\nexport const SelectorContainer: FC<SelectorContainerProps> = ({\n specs,\n spec,\n specDispatch,\n ...spaceProps\n}) => (\n <Space width=\"auto\" {...spaceProps}>\n <SdkLanguageSelector />\n <ApiSpecSelector specs={specs} spec={spec} specDispatch={specDispatch} />\n <Link to={`/${diffPath}/${spec.key}/`}>\n <IconButton\n toggle\n label=\"Compare Specifications\"\n icon={<ChangeHistory />}\n size=\"small\"\n />\n </Link>\n </Space>\n)\n"],"file":"SelectorContainer.js"}
@@ -1,5 +1,5 @@
1
- import { FC } from 'react';
2
- import { ISearchResult } from '@looker/sdk-codegen';
1
+ import type { FC } from 'react';
2
+ import type { ISearchResult } from '@looker/sdk-codegen';
3
3
  interface SearchMessageProps {
4
4
  search?: ISearchResult;
5
5
  }