@looker/api-explorer 0.9.51 → 0.9.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (397) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/e2e/diffScene.spec.ts +1 -1
  3. package/lib/ApiExplorer.js.map +1 -1
  4. package/lib/App.js.map +1 -1
  5. package/lib/StandaloneApiExplorer.js.map +1 -1
  6. package/lib/components/Banner/Banner.js.map +1 -1
  7. package/lib/components/DocActivityType/DocActivityType.js.map +1 -1
  8. package/lib/components/DocCode/DocCode.js.map +1 -1
  9. package/lib/components/DocMarkdown/DocMarkdown.js.map +1 -1
  10. package/lib/components/DocMarkdown/utils.js.map +1 -1
  11. package/lib/components/DocMethodSummary/DocMethodSummary.js.map +1 -1
  12. package/lib/components/DocMethodSummary/DocSummaryStatus.js.map +1 -1
  13. package/lib/components/DocMethodSummary/utils.js.map +1 -1
  14. package/lib/components/DocPseudo/DocParam.js.map +1 -1
  15. package/lib/components/DocPseudo/DocParams.js.map +1 -1
  16. package/lib/components/DocPseudo/DocPrimaryResponse.js.map +1 -1
  17. package/lib/components/DocPseudo/DocPseudo.js.map +1 -1
  18. package/lib/components/DocRateLimited/DocRateLimited.js.map +1 -1
  19. package/lib/components/DocReferences/DocReferences.js.map +1 -1
  20. package/lib/components/DocReferences/utils.js.map +1 -1
  21. package/lib/components/DocSDKs/DocDeclarations.js.map +1 -1
  22. package/lib/components/DocSDKs/DocSDKs.js.map +1 -1
  23. package/lib/components/DocSchema/DocSchema.js.map +1 -1
  24. package/lib/components/DocSdkUsage/DocSdkExampleCell.js.map +1 -1
  25. package/lib/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
  26. package/lib/components/DocSdkUsage/utils.js.map +1 -1
  27. package/lib/components/DocSource/DocSource.js.map +1 -1
  28. package/lib/components/DocStatus/DocStatus.js.map +1 -1
  29. package/lib/components/DocTitle/DocTitle.js.map +1 -1
  30. package/lib/components/DocTypeSummary/DocTypeSummary.js.map +1 -1
  31. package/lib/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
  32. package/lib/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.js.map +1 -1
  33. package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
  34. package/lib/components/ExploreType/ExploreProperty.js.map +1 -1
  35. package/lib/components/ExploreType/ExploreType.js.map +1 -1
  36. package/lib/components/ExploreType/exploreUtils.js.map +1 -1
  37. package/lib/components/Header/Header.js.map +1 -1
  38. package/lib/components/SelectorContainer/ApiSpecSelector.js.map +1 -1
  39. package/lib/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
  40. package/lib/components/SelectorContainer/SelectorContainer.js.map +1 -1
  41. package/lib/components/SelectorContainer/utils.js.map +1 -1
  42. package/lib/components/SideNav/SearchMessage.js.map +1 -1
  43. package/lib/components/SideNav/SideNav.js.map +1 -1
  44. package/lib/components/SideNav/SideNavMethodTags.js.map +1 -1
  45. package/lib/components/SideNav/SideNavMethods.js.map +1 -1
  46. package/lib/components/SideNav/SideNavTypeTags.js.map +1 -1
  47. package/lib/components/SideNav/SideNavTypes.js.map +1 -1
  48. package/lib/components/common/Loader.js.map +1 -1
  49. package/lib/components/common/common.js.map +1 -1
  50. package/lib/esm/ApiExplorer.js +55 -64
  51. package/lib/esm/ApiExplorer.js.map +1 -1
  52. package/lib/esm/App.js +9 -12
  53. package/lib/esm/App.js.map +1 -1
  54. package/lib/esm/StandaloneApiExplorer.js +20 -29
  55. package/lib/esm/StandaloneApiExplorer.js.map +1 -1
  56. package/lib/esm/components/Banner/Banner.js +8 -17
  57. package/lib/esm/components/Banner/Banner.js.map +1 -1
  58. package/lib/esm/components/Banner/index.js +1 -12
  59. package/lib/esm/components/Banner/index.js.map +1 -1
  60. package/lib/esm/components/DocActivityType/DocActivityType.js +7 -15
  61. package/lib/esm/components/DocActivityType/DocActivityType.js.map +1 -1
  62. package/lib/esm/components/DocActivityType/index.js +1 -12
  63. package/lib/esm/components/DocActivityType/index.js.map +1 -1
  64. package/lib/esm/components/DocCode/DocCode.js +9 -17
  65. package/lib/esm/components/DocCode/DocCode.js.map +1 -1
  66. package/lib/esm/components/DocCode/index.js +1 -12
  67. package/lib/esm/components/DocCode/index.js.map +1 -1
  68. package/lib/esm/components/DocMarkdown/DocMarkdown.js +13 -21
  69. package/lib/esm/components/DocMarkdown/DocMarkdown.js.map +1 -1
  70. package/lib/esm/components/DocMarkdown/index.js +1 -12
  71. package/lib/esm/components/DocMarkdown/index.js.map +1 -1
  72. package/lib/esm/components/DocMarkdown/utils.js +2 -10
  73. package/lib/esm/components/DocMarkdown/utils.js.map +1 -1
  74. package/lib/esm/components/DocMethodSummary/DocMethodSummary.js +15 -23
  75. package/lib/esm/components/DocMethodSummary/DocMethodSummary.js.map +1 -1
  76. package/lib/esm/components/DocMethodSummary/DocSummaryStatus.js +7 -15
  77. package/lib/esm/components/DocMethodSummary/DocSummaryStatus.js.map +1 -1
  78. package/lib/esm/components/DocMethodSummary/index.js +3 -26
  79. package/lib/esm/components/DocMethodSummary/index.js.map +1 -1
  80. package/lib/esm/components/DocMethodSummary/utils.js +18 -27
  81. package/lib/esm/components/DocMethodSummary/utils.js.map +1 -1
  82. package/lib/esm/components/DocPseudo/DocParam.js +7 -15
  83. package/lib/esm/components/DocPseudo/DocParam.js.map +1 -1
  84. package/lib/esm/components/DocPseudo/DocParams.js +5 -14
  85. package/lib/esm/components/DocPseudo/DocParams.js.map +1 -1
  86. package/lib/esm/components/DocPseudo/DocPrimaryResponse.js +5 -13
  87. package/lib/esm/components/DocPseudo/DocPrimaryResponse.js.map +1 -1
  88. package/lib/esm/components/DocPseudo/DocPseudo.js +9 -17
  89. package/lib/esm/components/DocPseudo/DocPseudo.js.map +1 -1
  90. package/lib/esm/components/DocPseudo/index.js +1 -12
  91. package/lib/esm/components/DocPseudo/index.js.map +1 -1
  92. package/lib/esm/components/DocRateLimited/DocRateLimited.js +5 -13
  93. package/lib/esm/components/DocRateLimited/DocRateLimited.js.map +1 -1
  94. package/lib/esm/components/DocRateLimited/index.js +1 -12
  95. package/lib/esm/components/DocRateLimited/index.js.map +1 -1
  96. package/lib/esm/components/DocReferences/DocReferences.js +10 -18
  97. package/lib/esm/components/DocReferences/DocReferences.js.map +1 -1
  98. package/lib/esm/components/DocReferences/index.js +1 -12
  99. package/lib/esm/components/DocReferences/index.js.map +1 -1
  100. package/lib/esm/components/DocReferences/utils.js +11 -19
  101. package/lib/esm/components/DocReferences/utils.js.map +1 -1
  102. package/lib/esm/components/DocSDKs/DocDeclarations.js +7 -15
  103. package/lib/esm/components/DocSDKs/DocDeclarations.js.map +1 -1
  104. package/lib/esm/components/DocSDKs/DocSDKs.js +21 -30
  105. package/lib/esm/components/DocSDKs/DocSDKs.js.map +1 -1
  106. package/lib/esm/components/DocSDKs/index.js +1 -12
  107. package/lib/esm/components/DocSDKs/index.js.map +1 -1
  108. package/lib/esm/components/DocSDKs/utils.js +3 -11
  109. package/lib/esm/components/DocSDKs/utils.js.map +1 -1
  110. package/lib/esm/components/DocSchema/DocSchema.js +7 -15
  111. package/lib/esm/components/DocSchema/DocSchema.js.map +1 -1
  112. package/lib/esm/components/DocSchema/index.js +1 -12
  113. package/lib/esm/components/DocSchema/index.js.map +1 -1
  114. package/lib/esm/components/DocSdkUsage/DocSdkExampleCell.js +6 -14
  115. package/lib/esm/components/DocSdkUsage/DocSdkExampleCell.js.map +1 -1
  116. package/lib/esm/components/DocSdkUsage/DocSdkUsage.js +38 -47
  117. package/lib/esm/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
  118. package/lib/esm/components/DocSdkUsage/index.js +1 -12
  119. package/lib/esm/components/DocSdkUsage/index.js.map +1 -1
  120. package/lib/esm/components/DocSdkUsage/utils.js +11 -24
  121. package/lib/esm/components/DocSdkUsage/utils.js.map +1 -1
  122. package/lib/esm/components/DocSource/DocSource.js +13 -21
  123. package/lib/esm/components/DocSource/DocSource.js.map +1 -1
  124. package/lib/esm/components/DocSource/index.js +1 -12
  125. package/lib/esm/components/DocSource/index.js.map +1 -1
  126. package/lib/esm/components/DocStatus/DocStatus.js +8 -16
  127. package/lib/esm/components/DocStatus/DocStatus.js.map +1 -1
  128. package/lib/esm/components/DocStatus/index.js +1 -12
  129. package/lib/esm/components/DocStatus/index.js.map +1 -1
  130. package/lib/esm/components/DocTitle/DocTitle.js +3 -11
  131. package/lib/esm/components/DocTitle/DocTitle.js.map +1 -1
  132. package/lib/esm/components/DocTitle/index.js +1 -12
  133. package/lib/esm/components/DocTitle/index.js.map +1 -1
  134. package/lib/esm/components/DocTypeSummary/DocTypeSummary.js +11 -19
  135. package/lib/esm/components/DocTypeSummary/DocTypeSummary.js.map +1 -1
  136. package/lib/esm/components/DocTypeSummary/index.js +1 -12
  137. package/lib/esm/components/DocTypeSummary/index.js.map +1 -1
  138. package/lib/esm/components/ErrorBoundary/ErrorBoundary.js +5 -14
  139. package/lib/esm/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
  140. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.js +11 -19
  141. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.js.map +1 -1
  142. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js +46 -54
  143. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
  144. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/index.js +1 -12
  145. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/index.js.map +1 -1
  146. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/index.js +1 -12
  147. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/index.js.map +1 -1
  148. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/index.js +1 -12
  149. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/index.js.map +1 -1
  150. package/lib/esm/components/ErrorBoundary/index.js +1 -12
  151. package/lib/esm/components/ErrorBoundary/index.js.map +1 -1
  152. package/lib/esm/components/ExploreType/ExploreProperty.js +48 -63
  153. package/lib/esm/components/ExploreType/ExploreProperty.js.map +1 -1
  154. package/lib/esm/components/ExploreType/ExploreType.js +23 -32
  155. package/lib/esm/components/ExploreType/ExploreType.js.map +1 -1
  156. package/lib/esm/components/ExploreType/exploreUtils.js +38 -51
  157. package/lib/esm/components/ExploreType/exploreUtils.js.map +1 -1
  158. package/lib/esm/components/ExploreType/index.js +3 -80
  159. package/lib/esm/components/ExploreType/index.js.map +1 -1
  160. package/lib/esm/components/Header/Header.js +20 -31
  161. package/lib/esm/components/Header/Header.js.map +1 -1
  162. package/lib/esm/components/Header/index.js +1 -24
  163. package/lib/esm/components/Header/index.js.map +1 -1
  164. package/lib/esm/components/Link/Link.js +3 -11
  165. package/lib/esm/components/Link/Link.js.map +1 -1
  166. package/lib/esm/components/Link/index.js +1 -12
  167. package/lib/esm/components/Link/index.js.map +1 -1
  168. package/lib/esm/components/SelectorContainer/ApiSpecSelector.js +11 -19
  169. package/lib/esm/components/SelectorContainer/ApiSpecSelector.js.map +1 -1
  170. package/lib/esm/components/SelectorContainer/SdkLanguageSelector.js +16 -25
  171. package/lib/esm/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
  172. package/lib/esm/components/SelectorContainer/SelectorContainer.js +16 -25
  173. package/lib/esm/components/SelectorContainer/SelectorContainer.js.map +1 -1
  174. package/lib/esm/components/SelectorContainer/index.js +1 -12
  175. package/lib/esm/components/SelectorContainer/index.js.map +1 -1
  176. package/lib/esm/components/SelectorContainer/utils.js +4 -11
  177. package/lib/esm/components/SelectorContainer/utils.js.map +1 -1
  178. package/lib/esm/components/SideNav/SearchMessage.js +8 -16
  179. package/lib/esm/components/SideNav/SearchMessage.js.map +1 -1
  180. package/lib/esm/components/SideNav/SideNav.js +41 -50
  181. package/lib/esm/components/SideNav/SideNav.js.map +1 -1
  182. package/lib/esm/components/SideNav/SideNavMethodTags.js +6 -14
  183. package/lib/esm/components/SideNav/SideNavMethodTags.js.map +1 -1
  184. package/lib/esm/components/SideNav/SideNavMethods.js +22 -32
  185. package/lib/esm/components/SideNav/SideNavMethods.js.map +1 -1
  186. package/lib/esm/components/SideNav/SideNavTypeTags.js +6 -14
  187. package/lib/esm/components/SideNav/SideNavTypeTags.js.map +1 -1
  188. package/lib/esm/components/SideNav/SideNavTypes.js +22 -32
  189. package/lib/esm/components/SideNav/SideNavTypes.js.map +1 -1
  190. package/lib/esm/components/SideNav/index.js +1 -12
  191. package/lib/esm/components/SideNav/index.js.map +1 -1
  192. package/lib/esm/components/SideNav/searchUtils.js +6 -15
  193. package/lib/esm/components/SideNav/searchUtils.js.map +1 -1
  194. package/lib/esm/components/common/Loader.js +8 -16
  195. package/lib/esm/components/common/Loader.js.map +1 -1
  196. package/lib/esm/components/common/common.js +11 -21
  197. package/lib/esm/components/common/common.js.map +1 -1
  198. package/lib/esm/components/common/index.js +2 -27
  199. package/lib/esm/components/common/index.js.map +1 -1
  200. package/lib/esm/components/index.js +22 -183
  201. package/lib/esm/components/index.js.map +1 -1
  202. package/lib/esm/index.js +5 -60
  203. package/lib/esm/index.js.map +1 -1
  204. package/lib/esm/routes/AppRouter.js +22 -30
  205. package/lib/esm/routes/AppRouter.js.map +1 -1
  206. package/lib/esm/routes/index.js +1 -12
  207. package/lib/esm/routes/index.js.map +1 -1
  208. package/lib/esm/scenes/DiffScene/DiffScene.js +43 -52
  209. package/lib/esm/scenes/DiffScene/DiffScene.js.map +1 -1
  210. package/lib/esm/scenes/DiffScene/DocDiff/DiffBanner.js +9 -17
  211. package/lib/esm/scenes/DiffScene/DocDiff/DiffBanner.js.map +1 -1
  212. package/lib/esm/scenes/DiffScene/DocDiff/DiffItem.js +33 -44
  213. package/lib/esm/scenes/DiffScene/DocDiff/DiffItem.js.map +1 -1
  214. package/lib/esm/scenes/DiffScene/DocDiff/DiffLegend.js +18 -26
  215. package/lib/esm/scenes/DiffScene/DocDiff/DiffLegend.js.map +1 -1
  216. package/lib/esm/scenes/DiffScene/DocDiff/DocDiff.js +11 -20
  217. package/lib/esm/scenes/DiffScene/DocDiff/DocDiff.js.map +1 -1
  218. package/lib/esm/scenes/DiffScene/DocDiff/docDiffUtils.js +5 -13
  219. package/lib/esm/scenes/DiffScene/DocDiff/docDiffUtils.js.map +1 -1
  220. package/lib/esm/scenes/DiffScene/DocDiff/index.js +1 -12
  221. package/lib/esm/scenes/DiffScene/DocDiff/index.js.map +1 -1
  222. package/lib/esm/scenes/DiffScene/diffUtils.js +8 -19
  223. package/lib/esm/scenes/DiffScene/diffUtils.js.map +1 -1
  224. package/lib/esm/scenes/DiffScene/index.js +1 -12
  225. package/lib/esm/scenes/DiffScene/index.js.map +1 -1
  226. package/lib/esm/scenes/ErrorDetailScene/ErrorDetailScene.js +11 -19
  227. package/lib/esm/scenes/ErrorDetailScene/ErrorDetailScene.js.map +1 -1
  228. package/lib/esm/scenes/ErrorDetailScene/index.js +1 -12
  229. package/lib/esm/scenes/ErrorDetailScene/index.js.map +1 -1
  230. package/lib/esm/scenes/HomeScene/HomeScene.js +9 -17
  231. package/lib/esm/scenes/HomeScene/HomeScene.js.map +1 -1
  232. package/lib/esm/scenes/HomeScene/index.js +1 -12
  233. package/lib/esm/scenes/HomeScene/index.js.map +1 -1
  234. package/lib/esm/scenes/MethodScene/MethodScene.js +47 -56
  235. package/lib/esm/scenes/MethodScene/MethodScene.js.map +1 -1
  236. package/lib/esm/scenes/MethodScene/components/DocOperation.js +12 -20
  237. package/lib/esm/scenes/MethodScene/components/DocOperation.js.map +1 -1
  238. package/lib/esm/scenes/MethodScene/components/DocRequestBody.js +7 -15
  239. package/lib/esm/scenes/MethodScene/components/DocRequestBody.js.map +1 -1
  240. package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponseTypes.js +11 -20
  241. package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponseTypes.js.map +1 -1
  242. package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponses.js +19 -28
  243. package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponses.js.map +1 -1
  244. package/lib/esm/scenes/MethodScene/components/DocResponses/index.js +1 -12
  245. package/lib/esm/scenes/MethodScene/components/DocResponses/index.js.map +1 -1
  246. package/lib/esm/scenes/MethodScene/components/DocResponses/utils.js +1 -8
  247. package/lib/esm/scenes/MethodScene/components/DocResponses/utils.js.map +1 -1
  248. package/lib/esm/scenes/MethodScene/components/index.js +3 -26
  249. package/lib/esm/scenes/MethodScene/components/index.js.map +1 -1
  250. package/lib/esm/scenes/MethodScene/index.js +1 -12
  251. package/lib/esm/scenes/MethodScene/index.js.map +1 -1
  252. package/lib/esm/scenes/MethodTagScene/MethodTagScene.js +31 -40
  253. package/lib/esm/scenes/MethodTagScene/MethodTagScene.js.map +1 -1
  254. package/lib/esm/scenes/MethodTagScene/index.js +1 -12
  255. package/lib/esm/scenes/MethodTagScene/index.js.map +1 -1
  256. package/lib/esm/scenes/MethodTagScene/utils.js +1 -8
  257. package/lib/esm/scenes/MethodTagScene/utils.js.map +1 -1
  258. package/lib/esm/scenes/TypeScene/TypeScene.js +20 -29
  259. package/lib/esm/scenes/TypeScene/TypeScene.js.map +1 -1
  260. package/lib/esm/scenes/TypeScene/index.js +1 -12
  261. package/lib/esm/scenes/TypeScene/index.js.map +1 -1
  262. package/lib/esm/scenes/TypeTagScene/TypeTagScene.js +30 -39
  263. package/lib/esm/scenes/TypeTagScene/TypeTagScene.js.map +1 -1
  264. package/lib/esm/scenes/TypeTagScene/index.js +1 -12
  265. package/lib/esm/scenes/TypeTagScene/index.js.map +1 -1
  266. package/lib/esm/scenes/TypeTagScene/utils.js +1 -8
  267. package/lib/esm/scenes/TypeTagScene/utils.js.map +1 -1
  268. package/lib/esm/scenes/index.js +6 -47
  269. package/lib/esm/scenes/index.js.map +1 -1
  270. package/lib/esm/scenes/utils/hooks/index.js +1 -12
  271. package/lib/esm/scenes/utils/hooks/index.js.map +1 -1
  272. package/lib/esm/scenes/utils/hooks/tagStoreSync.js +14 -21
  273. package/lib/esm/scenes/utils/hooks/tagStoreSync.js.map +1 -1
  274. package/lib/esm/scenes/utils/index.js +1 -12
  275. package/lib/esm/scenes/utils/index.js.map +1 -1
  276. package/lib/esm/state/index.js +4 -49
  277. package/lib/esm/state/index.js.map +1 -1
  278. package/lib/esm/state/lodes/index.js +2 -27
  279. package/lib/esm/state/lodes/index.js.map +1 -1
  280. package/lib/esm/state/lodes/sagas.js +10 -16
  281. package/lib/esm/state/lodes/sagas.js.map +1 -1
  282. package/lib/esm/state/lodes/selectors.js +2 -10
  283. package/lib/esm/state/lodes/selectors.js.map +1 -1
  284. package/lib/esm/state/lodes/slice.js +8 -19
  285. package/lib/esm/state/lodes/slice.js.map +1 -1
  286. package/lib/esm/state/settings/index.js +2 -27
  287. package/lib/esm/state/settings/index.js.map +1 -1
  288. package/lib/esm/state/settings/sagas.js +18 -24
  289. package/lib/esm/state/settings/sagas.js.map +1 -1
  290. package/lib/esm/state/settings/selectors.js +5 -16
  291. package/lib/esm/state/settings/selectors.js.map +1 -1
  292. package/lib/esm/state/settings/slice.js +11 -23
  293. package/lib/esm/state/settings/slice.js.map +1 -1
  294. package/lib/esm/state/specs/index.js +2 -27
  295. package/lib/esm/state/specs/index.js.map +1 -1
  296. package/lib/esm/state/specs/sagas.js +21 -25
  297. package/lib/esm/state/specs/sagas.js.map +1 -1
  298. package/lib/esm/state/specs/selectors.js +2 -10
  299. package/lib/esm/state/specs/selectors.js.map +1 -1
  300. package/lib/esm/state/specs/slice.js +8 -19
  301. package/lib/esm/state/specs/slice.js.map +1 -1
  302. package/lib/esm/state/store.js +13 -21
  303. package/lib/esm/state/store.js.map +1 -1
  304. package/lib/esm/test-data/declarations.js +1 -8
  305. package/lib/esm/test-data/declarations.js.map +1 -1
  306. package/lib/esm/test-data/examples.js +1 -8
  307. package/lib/esm/test-data/examples.js.map +1 -1
  308. package/lib/esm/test-data/index.js +4 -51
  309. package/lib/esm/test-data/index.js.map +1 -1
  310. package/lib/esm/test-data/sdkLanguages.js +2 -10
  311. package/lib/esm/test-data/sdkLanguages.js.map +1 -1
  312. package/lib/esm/test-data/specs.js +7 -18
  313. package/lib/esm/test-data/specs.js.map +1 -1
  314. package/lib/esm/test-utils/index.js +3 -38
  315. package/lib/esm/test-utils/index.js.map +1 -1
  316. package/lib/esm/test-utils/lodes.js +5 -12
  317. package/lib/esm/test-utils/lodes.js.map +1 -1
  318. package/lib/esm/test-utils/redux.js +25 -37
  319. package/lib/esm/test-utils/redux.js.map +1 -1
  320. package/lib/esm/test-utils/router.js +6 -15
  321. package/lib/esm/test-utils/router.js.map +1 -1
  322. package/lib/esm/utils/adaptorUtils.js +15 -26
  323. package/lib/esm/utils/adaptorUtils.js.map +1 -1
  324. package/lib/esm/utils/apixAdaptor.js +13 -22
  325. package/lib/esm/utils/apixAdaptor.js.map +1 -1
  326. package/lib/esm/utils/highlight.js +3 -11
  327. package/lib/esm/utils/highlight.js.map +1 -1
  328. package/lib/esm/utils/hooks/globalStoreSync.js +15 -22
  329. package/lib/esm/utils/hooks/globalStoreSync.js.map +1 -1
  330. package/lib/esm/utils/hooks/index.js +3 -26
  331. package/lib/esm/utils/hooks/index.js.map +1 -1
  332. package/lib/esm/utils/hooks/navigation.js +3 -10
  333. package/lib/esm/utils/hooks/navigation.js.map +1 -1
  334. package/lib/esm/utils/hooks/useQuery.js +5 -12
  335. package/lib/esm/utils/hooks/useQuery.js.map +1 -1
  336. package/lib/esm/utils/index.js +8 -101
  337. package/lib/esm/utils/index.js.map +1 -1
  338. package/lib/esm/utils/lodeUtils.js +2 -10
  339. package/lib/esm/utils/lodeUtils.js.map +1 -1
  340. package/lib/esm/utils/path.js +15 -32
  341. package/lib/esm/utils/path.js.map +1 -1
  342. package/lib/esm/utils/sdkLanguage.js +5 -14
  343. package/lib/esm/utils/sdkLanguage.js.map +1 -1
  344. package/lib/esm/utils/useWindowSize.js +4 -10
  345. package/lib/esm/utils/useWindowSize.js.map +1 -1
  346. package/lib/routes/AppRouter.js.map +1 -1
  347. package/lib/scenes/DiffScene/DiffScene.js.map +1 -1
  348. package/lib/scenes/DiffScene/DocDiff/DiffBanner.js.map +1 -1
  349. package/lib/scenes/DiffScene/DocDiff/DiffItem.js.map +1 -1
  350. package/lib/scenes/DiffScene/DocDiff/DiffLegend.js.map +1 -1
  351. package/lib/scenes/DiffScene/DocDiff/DocDiff.js.map +1 -1
  352. package/lib/scenes/DiffScene/DocDiff/docDiffUtils.js.map +1 -1
  353. package/lib/scenes/ErrorDetailScene/ErrorDetailScene.js.map +1 -1
  354. package/lib/scenes/HomeScene/HomeScene.js.map +1 -1
  355. package/lib/scenes/MethodScene/MethodScene.js.map +1 -1
  356. package/lib/scenes/MethodScene/components/DocOperation.js.map +1 -1
  357. package/lib/scenes/MethodScene/components/DocRequestBody.js.map +1 -1
  358. package/lib/scenes/MethodScene/components/DocResponses/DocResponseTypes.js.map +1 -1
  359. package/lib/scenes/MethodScene/components/DocResponses/DocResponses.js.map +1 -1
  360. package/lib/scenes/MethodTagScene/MethodTagScene.js.map +1 -1
  361. package/lib/scenes/MethodTagScene/utils.js.map +1 -1
  362. package/lib/scenes/TypeScene/TypeScene.js.map +1 -1
  363. package/lib/scenes/TypeTagScene/TypeTagScene.js.map +1 -1
  364. package/lib/scenes/TypeTagScene/utils.js.map +1 -1
  365. package/lib/scenes/utils/hooks/tagStoreSync.js.map +1 -1
  366. package/lib/state/lodes/sagas.js.map +1 -1
  367. package/lib/state/settings/sagas.js.map +1 -1
  368. package/lib/state/specs/sagas.js +2 -0
  369. package/lib/state/specs/sagas.js.map +1 -1
  370. package/lib/test-data/specs.js.map +1 -1
  371. package/lib/test-utils/redux.js.map +1 -1
  372. package/lib/test-utils/router.js.map +1 -1
  373. package/lib/utils/adaptorUtils.js.map +1 -1
  374. package/lib/utils/apixAdaptor.js.map +1 -1
  375. package/lib/utils/highlight.js.map +1 -1
  376. package/lib/utils/hooks/globalStoreSync.js.map +1 -1
  377. package/lib/utils/hooks/navigation.js.map +1 -1
  378. package/lib/utils/hooks/useQuery.js.map +1 -1
  379. package/lib/utils/lodeUtils.js.map +1 -1
  380. package/lib/utils/path.js.map +1 -1
  381. package/lib/utils/sdkLanguage.js.map +1 -1
  382. package/lib/utils/useWindowSize.js.map +1 -1
  383. package/package.json +9 -9
  384. package/public/Looker.4.0.json +5181 -1075
  385. package/public/versions.json +4 -10
  386. package/src/components/DocMarkdown/DocMarkdown.spec.tsx +10 -10
  387. package/src/components/DocMarkdown/utils.spec.ts +11 -11
  388. package/src/components/DocReferences/DocReferences.spec.tsx +6 -6
  389. package/src/components/ExploreType/ExploreType.spec.tsx +0 -12
  390. package/src/components/SelectorContainer/ApiSpecSelector.spec.tsx +2 -2
  391. package/src/components/SideNav/SideNav.spec.tsx +6 -6
  392. package/src/components/SideNav/SideNavMethodTags.spec.tsx +4 -4
  393. package/src/components/SideNav/SideNavMethods.spec.tsx +1 -1
  394. package/src/components/SideNav/SideNavTypeTags.spec.tsx +4 -4
  395. package/src/components/SideNav/SideNavTypes.spec.tsx +1 -1
  396. package/src/scenes/DiffScene/DocDiff/DocDiff.spec.tsx +1 -1
  397. package/src/state/specs/sagas.ts +4 -0
@@ -1,91 +1,82 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.MethodTagScene = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _reactRouterDom = require("react-router-dom");
9
- var _components = require("@looker/components");
10
- var _reactRedux = require("react-redux");
11
- var _components2 = require("../../components");
12
- var _utils = require("../../utils");
13
- var _state = require("../../state");
14
- var _utils2 = require("../utils");
15
- var _utils3 = require("./utils");
16
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
- 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
- var MethodTagScene = _ref => {
1
+ import React, { useEffect, useState } from 'react';
2
+ import { useHistory, useLocation, useParams } from 'react-router-dom';
3
+ import { Grid, ButtonToggle, ButtonItem } from '@looker/components';
4
+ import { useSelector } from 'react-redux';
5
+ import { ApixSection, DocTitle, DocMethodSummary, Link } from '../../components';
6
+ import { buildMethodPath, isValidFilter, useNavigation } from '../../utils';
7
+ import { selectTagFilter, useSettingActions } from '../../state';
8
+ import { useTagStoreSync } from '../utils';
9
+ import { getOperations } from './utils';
10
+ export var MethodTagScene = _ref => {
19
11
  var {
20
12
  api
21
13
  } = _ref;
22
14
  var {
23
15
  specKey,
24
16
  methodTag
25
- } = (0, _reactRouterDom.useParams)();
26
- var location = (0, _reactRouterDom.useLocation)();
27
- var history = (0, _reactRouterDom.useHistory)();
17
+ } = useParams();
18
+ var location = useLocation();
19
+ var history = useHistory();
28
20
  var methods = api.tags[methodTag];
29
21
  var {
30
22
  navigate,
31
23
  buildPathWithGlobalParams,
32
24
  navigateWithGlobalParams
33
- } = (0, _utils.useNavigation)();
34
- var selectedTagFilter = (0, _reactRedux.useSelector)(_state.selectTagFilter);
25
+ } = useNavigation();
26
+ var selectedTagFilter = useSelector(selectTagFilter);
35
27
  var {
36
28
  setTagFilterAction
37
- } = (0, _state.useSettingActions)();
38
- var [tagFilter, setTagFilter] = (0, _react.useState)(selectedTagFilter);
39
- (0, _utils2.useTagStoreSync)();
29
+ } = useSettingActions();
30
+ var [tagFilter, setTagFilter] = useState(selectedTagFilter);
31
+ useTagStoreSync();
40
32
  var handleChange = filter => {
41
33
  navigate(location.pathname, {
42
34
  t: filter === 'ALL' ? null : filter.toLowerCase()
43
35
  });
44
36
  };
45
- (0, _react.useEffect)(() => {
37
+ useEffect(() => {
46
38
  var searchParams = new URLSearchParams(location.search);
47
39
  var verbParam = searchParams.get('t') || 'ALL';
48
- verbParam = (0, _utils.isValidFilter)(location.pathname, verbParam) ? verbParam.toUpperCase() : 'ALL';
40
+ verbParam = isValidFilter(location.pathname, verbParam) ? verbParam.toUpperCase() : 'ALL';
49
41
  setTagFilterAction({
50
42
  tagFilter: verbParam
51
43
  });
52
44
  }, [location.search]);
53
- (0, _react.useEffect)(() => {
45
+ useEffect(() => {
54
46
  setTagFilter(selectedTagFilter);
55
47
  }, [selectedTagFilter]);
56
- (0, _react.useEffect)(() => {
48
+ useEffect(() => {
57
49
  if (!methods) {
58
50
  navigateWithGlobalParams("/".concat(specKey, "/methods"));
59
51
  }
60
52
  }, [history, methods]);
61
53
  if (!methods) {
62
- return _react.default.createElement(_react.default.Fragment, null);
54
+ return React.createElement(React.Fragment, null);
63
55
  }
64
56
  var tag = Object.values(api.spec.tags).find(tag => tag.name === methodTag);
65
- var operations = (0, _utils3.getOperations)(methods);
66
- return _react.default.createElement(_components2.ApixSection, null, _react.default.createElement(_components2.DocTitle, null, "".concat(tag.name, ": ").concat(tag.description)), _react.default.createElement(_components.ButtonToggle, {
57
+ var operations = getOperations(methods);
58
+ return React.createElement(ApixSection, null, React.createElement(DocTitle, null, "".concat(tag.name, ": ").concat(tag.description)), React.createElement(ButtonToggle, {
67
59
  mb: "small",
68
60
  mt: "xlarge",
69
61
  value: tagFilter,
70
62
  onChange: handleChange
71
- }, _react.default.createElement(_components.ButtonItem, {
63
+ }, React.createElement(ButtonItem, {
72
64
  key: "ALL",
73
65
  px: "large",
74
66
  py: "xsmall"
75
- }, "ALL"), operations.map(op => _react.default.createElement(_components.ButtonItem, {
67
+ }, "ALL"), operations.map(op => React.createElement(ButtonItem, {
76
68
  key: op,
77
69
  px: "large",
78
70
  py: "xsmall"
79
- }, op))), Object.values(methods).map((method, index) => (selectedTagFilter === 'ALL' || selectedTagFilter === method.httpMethod) && _react.default.createElement(_components2.Link, {
71
+ }, op))), Object.values(methods).map((method, index) => (selectedTagFilter === 'ALL' || selectedTagFilter === method.httpMethod) && React.createElement(Link, {
80
72
  key: index,
81
- to: buildPathWithGlobalParams((0, _utils.buildMethodPath)(specKey, tag.name, method.name))
82
- }, _react.default.createElement(_components.Grid, {
73
+ to: buildPathWithGlobalParams(buildMethodPath(specKey, tag.name, method.name))
74
+ }, React.createElement(Grid, {
83
75
  columns: 1,
84
76
  py: "xsmall"
85
- }, _react.default.createElement(_components2.DocMethodSummary, {
77
+ }, React.createElement(DocMethodSummary, {
86
78
  key: index,
87
79
  method: method
88
80
  })))));
89
81
  };
90
- exports.MethodTagScene = MethodTagScene;
91
82
  //# sourceMappingURL=MethodTagScene.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MethodTagScene.js","names":["_react","_interopRequireWildcard","require","_reactRouterDom","_components","_reactRedux","_components2","_utils","_state","_utils2","_utils3","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","MethodTagScene","_ref","api","specKey","methodTag","useParams","location","useLocation","history","useHistory","methods","tags","navigate","buildPathWithGlobalParams","navigateWithGlobalParams","useNavigation","selectedTagFilter","useSelector","selectTagFilter","setTagFilterAction","useSettingActions","tagFilter","setTagFilter","useState","useTagStoreSync","handleChange","filter","pathname","t","toLowerCase","useEffect","searchParams","URLSearchParams","search","verbParam","isValidFilter","toUpperCase","concat","createElement","Fragment","tag","values","spec","find","name","operations","getOperations","ApixSection","DocTitle","description","ButtonToggle","mb","mt","value","onChange","ButtonItem","px","py","map","op","method","index","httpMethod","Link","to","buildMethodPath","Grid","columns","DocMethodSummary","exports"],"sources":["../../../../src/scenes/MethodTagScene/MethodTagScene.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { FC } from 'react'\nimport React, { useEffect, useState } from 'react'\nimport { useHistory, useLocation, useParams } from 'react-router-dom'\nimport { Grid, ButtonToggle, ButtonItem } from '@looker/components'\nimport type { ApiModel } from '@looker/sdk-codegen'\nimport { useSelector } from 'react-redux'\nimport { ApixSection, DocTitle, DocMethodSummary, Link } from '../../components'\nimport { buildMethodPath, isValidFilter, useNavigation } from '../../utils'\nimport { selectTagFilter, useSettingActions } from '../../state'\nimport { useTagStoreSync } from '../utils'\nimport { getOperations } from './utils'\n\ninterface MethodTagSceneProps {\n api: ApiModel\n}\n\ninterface MethodTagSceneParams {\n specKey: string\n methodTag: string\n}\n\nexport const MethodTagScene: FC<MethodTagSceneProps> = ({ api }) => {\n const { specKey, methodTag } = useParams<MethodTagSceneParams>()\n const location = useLocation()\n const history = useHistory()\n const methods = api.tags[methodTag]\n const { navigate, buildPathWithGlobalParams, navigateWithGlobalParams } =\n useNavigation()\n const selectedTagFilter = useSelector(selectTagFilter)\n const { setTagFilterAction } = useSettingActions()\n const [tagFilter, setTagFilter] = useState(selectedTagFilter)\n useTagStoreSync()\n\n const handleChange = (filter: string) => {\n navigate(location.pathname, {\n t: filter === 'ALL' ? null : filter.toLowerCase(),\n })\n }\n\n useEffect(() => {\n const searchParams = new URLSearchParams(location.search)\n let verbParam = searchParams.get('t') || 'ALL'\n verbParam = isValidFilter(location.pathname, verbParam)\n ? verbParam.toUpperCase()\n : 'ALL'\n setTagFilterAction({\n tagFilter: verbParam,\n })\n }, [location.search])\n\n useEffect(() => {\n setTagFilter(selectedTagFilter)\n }, [selectedTagFilter])\n\n useEffect(() => {\n if (!methods) {\n navigateWithGlobalParams(`/${specKey}/methods`)\n }\n }, [history, methods])\n if (!methods) {\n return <></>\n }\n const tag = Object.values(api.spec.tags!).find(\n (tag) => tag.name === methodTag\n )!\n const operations = getOperations(methods)\n\n return (\n <ApixSection>\n <DocTitle>{`${tag.name}: ${tag.description}`}</DocTitle>\n <ButtonToggle\n mb=\"small\"\n mt=\"xlarge\"\n value={tagFilter}\n onChange={handleChange}\n >\n <ButtonItem key=\"ALL\" px=\"large\" py=\"xsmall\">\n ALL\n </ButtonItem>\n {operations.map((op) => (\n <ButtonItem key={op} px=\"large\" py=\"xsmall\">\n {op}\n </ButtonItem>\n ))}\n </ButtonToggle>\n {Object.values(methods).map(\n (method, index) =>\n (selectedTagFilter === 'ALL' ||\n selectedTagFilter === method.httpMethod) && (\n <Link\n key={index}\n to={buildPathWithGlobalParams(\n buildMethodPath(specKey, tag.name, method.name)\n )}\n >\n <Grid columns={1} py=\"xsmall\">\n <DocMethodSummary key={index} method={method} />\n </Grid>\n </Link>\n )\n )}\n </ApixSection>\n )\n}\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAAuC,SAAAS,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAX,wBAAAe,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAA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,CAC3C,CAEV,CACJ,CACW;AAElB,CAAC;AAAAS,OAAA,CAAArE,cAAA,GAAAA,cAAA"}
1
+ {"version":3,"file":"MethodTagScene.js","names":["React","useEffect","useState","useHistory","useLocation","useParams","Grid","ButtonToggle","ButtonItem","useSelector","ApixSection","DocTitle","DocMethodSummary","Link","buildMethodPath","isValidFilter","useNavigation","selectTagFilter","useSettingActions","useTagStoreSync","getOperations","MethodTagScene","_ref","api","specKey","methodTag","location","history","methods","tags","navigate","buildPathWithGlobalParams","navigateWithGlobalParams","selectedTagFilter","setTagFilterAction","tagFilter","setTagFilter","handleChange","filter","pathname","t","toLowerCase","searchParams","URLSearchParams","search","verbParam","get","toUpperCase","concat","createElement","Fragment","tag","Object","values","spec","find","name","operations","description","mb","mt","value","onChange","key","px","py","map","op","method","index","httpMethod","to","columns"],"sources":["../../../../src/scenes/MethodTagScene/MethodTagScene.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { FC } from 'react'\nimport React, { useEffect, useState } from 'react'\nimport { useHistory, useLocation, useParams } from 'react-router-dom'\nimport { Grid, ButtonToggle, ButtonItem } from '@looker/components'\nimport type { ApiModel } from '@looker/sdk-codegen'\nimport { useSelector } from 'react-redux'\nimport { ApixSection, DocTitle, DocMethodSummary, Link } from '../../components'\nimport { buildMethodPath, isValidFilter, useNavigation } from '../../utils'\nimport { selectTagFilter, useSettingActions } from '../../state'\nimport { useTagStoreSync } from '../utils'\nimport { getOperations } from './utils'\n\ninterface MethodTagSceneProps {\n api: ApiModel\n}\n\ninterface MethodTagSceneParams {\n specKey: string\n methodTag: string\n}\n\nexport const MethodTagScene: FC<MethodTagSceneProps> = ({ api }) => {\n const { specKey, methodTag } = useParams<MethodTagSceneParams>()\n const location = useLocation()\n const history = useHistory()\n const methods = api.tags[methodTag]\n const { navigate, buildPathWithGlobalParams, navigateWithGlobalParams } =\n useNavigation()\n const selectedTagFilter = useSelector(selectTagFilter)\n const { setTagFilterAction } = useSettingActions()\n const [tagFilter, setTagFilter] = useState(selectedTagFilter)\n useTagStoreSync()\n\n const handleChange = (filter: string) => {\n navigate(location.pathname, {\n t: filter === 'ALL' ? null : filter.toLowerCase(),\n })\n }\n\n useEffect(() => {\n const searchParams = new URLSearchParams(location.search)\n let verbParam = searchParams.get('t') || 'ALL'\n verbParam = isValidFilter(location.pathname, verbParam)\n ? verbParam.toUpperCase()\n : 'ALL'\n setTagFilterAction({\n tagFilter: verbParam,\n })\n }, [location.search])\n\n useEffect(() => {\n setTagFilter(selectedTagFilter)\n }, [selectedTagFilter])\n\n useEffect(() => {\n if (!methods) {\n navigateWithGlobalParams(`/${specKey}/methods`)\n }\n }, [history, methods])\n if (!methods) {\n return <></>\n }\n const tag = Object.values(api.spec.tags!).find(\n (tag) => tag.name === methodTag\n )!\n const operations = getOperations(methods)\n\n return (\n <ApixSection>\n <DocTitle>{`${tag.name}: ${tag.description}`}</DocTitle>\n <ButtonToggle\n mb=\"small\"\n mt=\"xlarge\"\n value={tagFilter}\n onChange={handleChange}\n >\n <ButtonItem key=\"ALL\" px=\"large\" py=\"xsmall\">\n ALL\n </ButtonItem>\n {operations.map((op) => (\n <ButtonItem key={op} px=\"large\" py=\"xsmall\">\n {op}\n </ButtonItem>\n ))}\n </ButtonToggle>\n {Object.values(methods).map(\n (method, index) =>\n (selectedTagFilter === 'ALL' ||\n selectedTagFilter === method.httpMethod) && (\n <Link\n key={index}\n to={buildPathWithGlobalParams(\n buildMethodPath(specKey, tag.name, method.name)\n )}\n >\n <Grid columns={1} py=\"xsmall\">\n <DocMethodSummary key={index} method={method} />\n </Grid>\n </Link>\n )\n )}\n </ApixSection>\n )\n}\n"],"mappings":"AA0BA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,UAAU,EAAEC,WAAW,EAAEC,SAAS,QAAQ,kBAAkB;AACrE,SAASC,IAAI,EAAEC,YAAY,EAAEC,UAAU,QAAQ,oBAAoB;AAEnE,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,WAAW,EAAEC,QAAQ,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,kBAAkB;AAChF,SAASC,eAAe,EAAEC,aAAa,EAAEC,aAAa,QAAQ,aAAa;AAC3E,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,aAAa;AAChE,SAASC,eAAe,QAAQ,UAAU;AAC1C,SAASC,aAAa,QAAQ,SAAS;AAWvC,OAAO,IAAMC,cAAuC,GAAGC,IAAA,IAAa;EAAA,IAAZ;IAAEC;EAAI,CAAC,GAAAD,IAAA;EAC7D,IAAM;IAAEE,OAAO;IAAEC;EAAU,CAAC,GAAGpB,SAAS,CAAuB,CAAC;EAChE,IAAMqB,QAAQ,GAAGtB,WAAW,CAAC,CAAC;EAC9B,IAAMuB,OAAO,GAAGxB,UAAU,CAAC,CAAC;EAC5B,IAAMyB,OAAO,GAAGL,GAAG,CAACM,IAAI,CAACJ,SAAS,CAAC;E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AAe,CAACU,OAAO,EAAE2B,GAAG,CAACK,IAAI,EAAEY,MAAM,CAACZ,IAAI,CAChD;EAAE,GAEFxD,KAAA,CAAAiD,aAAA,CAAC3C,IAAI;IAACkE,OAAO,EAAE,CAAE;IAACP,EAAE,EAAC;EAAQ,GAC3BjE,KAAA,CAAAiD,aAAA,CAACrC,gBAAgB;IAACmD,GAAG,EAAEM,KAAM;IAACD,MAAM,EAAEA;EAAO,CAAE,CAC3C,CACF,CAEZ,CACW,CAAC;AAElB,CAAC"}
@@ -1,13 +1,2 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "MethodTagScene", {
7
- enumerable: true,
8
- get: function get() {
9
- return _MethodTagScene.MethodTagScene;
10
- }
11
- });
12
- var _MethodTagScene = require("./MethodTagScene");
1
+ export { MethodTagScene } from './MethodTagScene';
13
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_MethodTagScene","require"],"sources":["../../../../src/scenes/MethodTagScene/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { MethodTagScene } from './MethodTagScene'\n"],"mappings":";;;;;;;;;;;AAyBA,IAAAA,eAAA,GAAAC,OAAA"}
1
+ {"version":3,"file":"index.js","names":["MethodTagScene"],"sources":["../../../../src/scenes/MethodTagScene/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { MethodTagScene } from './MethodTagScene'\n"],"mappings":"AAyBA,SAASA,cAAc,QAAQ,kBAAkB"}
@@ -1,15 +1,8 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getOperations = void 0;
7
- var getOperations = methods => {
1
+ export var getOperations = methods => {
8
2
  var operationsSet = new Set();
9
3
  Object.values(methods).forEach(method => {
10
4
  operationsSet.add(method.httpMethod);
11
5
  });
12
6
  return Array.from(operationsSet.values());
13
7
  };
14
- exports.getOperations = getOperations;
15
8
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["getOperations","methods","operationsSet","Set","Object","values","forEach","method","add","httpMethod","Array","from","exports"],"sources":["../../../../src/scenes/MethodTagScene/utils.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { MethodList } from '@looker/sdk-codegen'\n\n/**\n * Given a list of methods it returns a list of distinct operations\n * @param methods A list of methods\n */\nexport const getOperations = (methods: MethodList) => {\n const operationsSet = new Set<string>()\n Object.values(methods).forEach((method) => {\n operationsSet.add(method.httpMethod)\n })\n return Array.from(operationsSet.values())\n}\n"],"mappings":";;;;;;AA+BO,IAAMA,aAAa,GAAIC,OAAmB,IAAK;EACpD,IAAMC,aAAa,GAAG,IAAIC,GAAG,EAAU;EACvCC,MAAM,CAACC,MAAM,CAACJ,OAAO,CAAC,CAACK,OAAO,CAAEC,MAAM,IAAK;IACzCL,aAAa,CAACM,GAAG,CAACD,MAAM,CAACE,UAAU,CAAC;EACtC,CAAC,CAAC;EACF,OAAOC,KAAK,CAACC,IAAI,CAACT,aAAa,CAACG,MAAM,EAAE,CAAC;AAC3C,CAAC;AAAAO,OAAA,CAAAZ,aAAA,GAAAA,aAAA"}
1
+ {"version":3,"file":"utils.js","names":["getOperations","methods","operationsSet","Set","Object","values","forEach","method","add","httpMethod","Array","from"],"sources":["../../../../src/scenes/MethodTagScene/utils.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { MethodList } from '@looker/sdk-codegen'\n\n/**\n * Given a list of methods it returns a list of distinct operations\n * @param methods A list of methods\n */\nexport const getOperations = (methods: MethodList) => {\n const operationsSet = new Set<string>()\n Object.values(methods).forEach((method) => {\n operationsSet.add(method.httpMethod)\n })\n return Array.from(operationsSet.values())\n}\n"],"mappings":"AA+BA,OAAO,IAAMA,aAAa,GAAIC,OAAmB,IAAK;EACpD,IAAMC,aAAa,GAAG,IAAIC,GAAG,CAAS,CAAC;EACvCC,MAAM,CAACC,MAAM,CAACJ,OAAO,CAAC,CAACK,OAAO,CAAEC,MAAM,IAAK;IACzCL,aAAa,CAACM,GAAG,CAACD,MAAM,CAACE,UAAU,CAAC;EACtC,CAAC,CAAC;EACF,OAAOC,KAAK,CAACC,IAAI,CAACT,aAAa,CAACG,MAAM,CAAC,CAAC,CAAC;AAC3C,CAAC"}
@@ -1,18 +1,10 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.TypeScene = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _sdkCodegen = require("@looker/sdk-codegen");
9
- var _reactRouterDom = require("react-router-dom");
10
- var _components = require("@looker/components");
11
- var _components2 = require("../../components");
12
- var _utils = require("../../utils");
13
- 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); }
14
- 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; }
15
- var TypeScene = _ref => {
1
+ import React, { useEffect } from 'react';
2
+ import { typeRefs, methodRefs } from '@looker/sdk-codegen';
3
+ import { useHistory, useParams } from 'react-router-dom';
4
+ import { Space, Box } from '@looker/components';
5
+ import { ApixSection, DocReferences, DocSDKs, DocSource, DocTitle, ExploreType, DocSchema } from '../../components';
6
+ import { useNavigation } from '../../utils';
7
+ export var TypeScene = _ref => {
16
8
  var {
17
9
  api
18
10
  } = _ref;
@@ -20,40 +12,39 @@ var TypeScene = _ref => {
20
12
  specKey,
21
13
  typeTag,
22
14
  typeName
23
- } = (0, _reactRouterDom.useParams)();
15
+ } = useParams();
24
16
  var type = api.types[typeName];
25
- var history = (0, _reactRouterDom.useHistory)();
17
+ var history = useHistory();
26
18
  var {
27
19
  navigate
28
- } = (0, _utils.useNavigation)();
29
- var typesUsed = (0, _sdkCodegen.typeRefs)(api, type === null || type === void 0 ? void 0 : type.customTypes);
30
- var methodsUsedBy = (0, _sdkCodegen.methodRefs)(api, type === null || type === void 0 ? void 0 : type.methodRefs);
31
- var typesUsedBy = (0, _sdkCodegen.typeRefs)(api, type === null || type === void 0 ? void 0 : type.parentTypes);
32
- (0, _react.useEffect)(() => {
20
+ } = useNavigation();
21
+ var typesUsed = typeRefs(api, type === null || type === void 0 ? void 0 : type.customTypes);
22
+ var methodsUsedBy = methodRefs(api, type === null || type === void 0 ? void 0 : type.methodRefs);
23
+ var typesUsedBy = typeRefs(api, type === null || type === void 0 ? void 0 : type.parentTypes);
24
+ useEffect(() => {
33
25
  if (!type) {
34
26
  var route = api.typeTags[typeTag] ? "/".concat(specKey, "/types/").concat(typeTag) : "/".concat(specKey, "/types");
35
27
  navigate(route);
36
28
  }
37
29
  }, [history, specKey, type]);
38
- return _react.default.createElement(_react.default.Fragment, null, type && _react.default.createElement(_components2.ApixSection, null, _react.default.createElement(_components.Space, null, _react.default.createElement(_components2.DocTitle, null, type.name), _react.default.createElement(_components2.DocSource, {
30
+ return React.createElement(React.Fragment, null, type && React.createElement(ApixSection, null, React.createElement(Space, null, React.createElement(DocTitle, null, type.name), React.createElement(DocSource, {
39
31
  type: type
40
- })), _react.default.createElement(_components.Box, {
32
+ })), React.createElement(Box, {
41
33
  pb: "xlarge"
42
- }, _react.default.createElement(_components2.ExploreType, {
34
+ }, React.createElement(ExploreType, {
43
35
  api: api,
44
36
  type: type
45
- })), _react.default.createElement(_components2.DocReferences, {
37
+ })), React.createElement(DocReferences, {
46
38
  typesUsed: typesUsed,
47
39
  typesUsedBy: typesUsedBy,
48
40
  methodsUsedBy: methodsUsedBy,
49
41
  api: api,
50
42
  specKey: specKey
51
- }), _react.default.createElement(_components2.DocSDKs, {
43
+ }), React.createElement(DocSDKs, {
52
44
  type: type,
53
45
  api: api
54
- }), _react.default.createElement(_components2.DocSchema, {
46
+ }), React.createElement(DocSchema, {
55
47
  object: type.schema
56
48
  })));
57
49
  };
58
- exports.TypeScene = TypeScene;
59
50
  //# sourceMappingURL=TypeScene.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TypeScene.js","names":["_react","_interopRequireWildcard","require","_sdkCodegen","_reactRouterDom","_components","_components2","_utils","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","TypeScene","_ref","api","specKey","typeTag","typeName","useParams","type","types","history","useHistory","navigate","useNavigation","typesUsed","typeRefs","customTypes","methodsUsedBy","methodRefs","typesUsedBy","parentTypes","useEffect","route","typeTags","concat","createElement","Fragment","ApixSection","Space","DocTitle","name","DocSource","Box","pb","ExploreType","DocReferences","DocSDKs","DocSchema","object","schema","exports"],"sources":["../../../../src/scenes/TypeScene/TypeScene.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react'\nimport React, { useEffect } from 'react'\nimport type { ApiModel } from '@looker/sdk-codegen'\nimport { typeRefs, methodRefs } from '@looker/sdk-codegen'\nimport { useHistory, useParams } from 'react-router-dom'\nimport { Space, Box } from '@looker/components'\n\nimport {\n ApixSection,\n DocReferences,\n DocSDKs,\n DocSource,\n DocTitle,\n ExploreType,\n DocSchema,\n} from '../../components'\nimport { useNavigation } from '../../utils'\n\ninterface DocTypeProps {\n api: ApiModel\n}\n\ninterface DocTypeParams {\n specKey: string\n typeTag: string\n typeName: string\n}\n\nexport const TypeScene: FC<DocTypeProps> = ({ api }) => {\n const { specKey, typeTag, typeName } = useParams<DocTypeParams>()\n const type = api.types[typeName]\n const history = useHistory()\n const { navigate } = useNavigation()\n const typesUsed = typeRefs(api, type?.customTypes)\n const methodsUsedBy = methodRefs(api, type?.methodRefs)\n const typesUsedBy = typeRefs(api, type?.parentTypes)\n useEffect(() => {\n if (!type) {\n const route = api.typeTags[typeTag]\n ? `/${specKey}/types/${typeTag}`\n : `/${specKey}/types`\n navigate(route)\n }\n }, [history, specKey, type])\n\n return (\n <>\n {type && (\n <ApixSection>\n <Space>\n <DocTitle>{type.name}</DocTitle>\n <DocSource type={type} />\n </Space>\n <Box pb=\"xlarge\">\n <ExploreType api={api} type={type} />\n </Box>\n <DocReferences\n typesUsed={typesUsed}\n typesUsedBy={typesUsedBy}\n methodsUsedBy={methodsUsedBy}\n api={api}\n specKey={specKey}\n />\n <DocSDKs type={type} api={api} />\n <DocSchema object={type.schema} />\n </ApixSection>\n )}\n </>\n )\n}\n"],"mappings":";;;;;;AA2BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAEA,IAAAI,YAAA,GAAAJ,OAAA;AASA,IAAAK,MAAA,GAAAL,OAAA;AAA2C,SAAAM,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAR,wBAAAY,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CA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AAI,CAAC+B;EAAO,EAAG,CAErC,CACA;AAEP,CAAC;AAAAC,OAAA,CAAAvC,SAAA,GAAAA,SAAA"}
1
+ {"version":3,"file":"TypeScene.js","names":["React","useEffect","typeRefs","methodRefs","useHistory","useParams","Space","Box","ApixSection","DocReferences","DocSDKs","DocSource","DocTitle","ExploreType","DocSchema","useNavigation","TypeScene","_ref","api","specKey","typeTag","typeName","type","types","history","navigate","typesUsed","customTypes","methodsUsedBy","typesUsedBy","parentTypes","route","typeTags","concat","createElement","Fragment","name","pb","object","schema"],"sources":["../../../../src/scenes/TypeScene/TypeScene.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react'\nimport React, { useEffect } from 'react'\nimport type { ApiModel } from '@looker/sdk-codegen'\nimport { typeRefs, methodRefs } from '@looker/sdk-codegen'\nimport { useHistory, useParams } from 'react-router-dom'\nimport { Space, Box } from '@looker/components'\n\nimport {\n ApixSection,\n DocReferences,\n DocSDKs,\n DocSource,\n DocTitle,\n ExploreType,\n DocSchema,\n} from '../../components'\nimport { useNavigation } from '../../utils'\n\ninterface DocTypeProps {\n api: ApiModel\n}\n\ninterface DocTypeParams {\n specKey: string\n typeTag: string\n typeName: string\n}\n\nexport const TypeScene: FC<DocTypeProps> = ({ api }) => {\n const { specKey, typeTag, typeName } = useParams<DocTypeParams>()\n const type = api.types[typeName]\n const history = useHistory()\n const { navigate } = useNavigation()\n const typesUsed = typeRefs(api, type?.customTypes)\n const methodsUsedBy = methodRefs(api, type?.methodRefs)\n const typesUsedBy = typeRefs(api, type?.parentTypes)\n useEffect(() => {\n if (!type) {\n const route = api.typeTags[typeTag]\n ? `/${specKey}/types/${typeTag}`\n : `/${specKey}/types`\n navigate(route)\n }\n }, [history, specKey, type])\n\n return (\n <>\n {type && (\n <ApixSection>\n <Space>\n <DocTitle>{type.name}</DocTitle>\n <DocSource type={type} />\n </Space>\n <Box pb=\"xlarge\">\n <ExploreType api={api} type={type} />\n </Box>\n <DocReferences\n typesUsed={typesUsed}\n typesUsedBy={typesUsedBy}\n methodsUsedBy={methodsUsedBy}\n api={api}\n specKey={specKey}\n />\n <DocSDKs type={type} api={api} />\n <DocSchema object={type.schema} />\n </ApixSection>\n )}\n </>\n )\n}\n"],"mappings":"AA2BA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AAExC,SAASC,QAAQ,EAAEC,UAAU,QAAQ,qBAAqB;AAC1D,SAASC,UAAU,EAAEC,SAAS,QAAQ,kBAAkB;AACxD,SAASC,KAAK,EAAEC,GAAG,QAAQ,oBAAoB;AAE/C,SACEC,WAAW,EACXC,aAAa,EACbC,OAAO,EACPC,SAAS,EACTC,QAAQ,EACRC,WAAW,EACXC,SAAS,QACJ,kBAAkB;AACzB,SAASC,aAAa,QAAQ,aAAa;AAY3C,OAAO,IAAMC,SAA2B,GAAGC,IAAA,IAAa;EAAA,IAAZ;IAAEC;EAAI,CAAC,GAAAD,IAAA;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kC,aAAA,CAAC3B,GAAG;IAAC8B,EAAE,EAAC;EAAQ,GACdrC,KAAA,CAAAkC,aAAA,CAACrB,WAAW;IAACK,GAAG,EAAEA,GAAI;IAACI,IAAI,EAAEA;EAAK,CAAE,CACjC,CAAC,EACNtB,KAAA,CAAAkC,aAAA,CAACzB,aAAa;IACZiB,SAAS,EAAEA,SAAU;IACrBG,WAAW,EAAEA,WAAY;IACzBD,aAAa,EAAEA,aAAc;IAC7BV,GAAG,EAAEA,GAAI;IACTC,OAAO,EAAEA;EAAQ,CAClB,CAAC,EACFnB,KAAA,CAAAkC,aAAA,CAACxB,OAAO;IAACY,IAAI,EAAEA,IAAK;IAACJ,GAAG,EAAEA;EAAI,CAAE,CAAC,EACjClB,KAAA,CAAAkC,aAAA,CAACpB,SAAS;IAACwB,MAAM,EAAEhB,IAAI,CAACiB;EAAO,CAAE,CACtB,CAEf,CAAC;AAEP,CAAC"}
@@ -1,13 +1,2 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "TypeScene", {
7
- enumerable: true,
8
- get: function get() {
9
- return _TypeScene.TypeScene;
10
- }
11
- });
12
- var _TypeScene = require("./TypeScene");
1
+ export { TypeScene } from './TypeScene';
13
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_TypeScene","require"],"sources":["../../../../src/scenes/TypeScene/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { TypeScene } from './TypeScene'\n"],"mappings":";;;;;;;;;;;AAyBA,IAAAA,UAAA,GAAAC,OAAA"}
1
+ {"version":3,"file":"index.js","names":["TypeScene"],"sources":["../../../../src/scenes/TypeScene/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { TypeScene } from './TypeScene'\n"],"mappings":"AAyBA,SAASA,SAAS,QAAQ,aAAa"}
@@ -1,90 +1,81 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.TypeTagScene = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _components = require("@looker/components");
9
- var _reactRouterDom = require("react-router-dom");
10
- var _reactRedux = require("react-redux");
11
- var _components2 = require("../../components");
12
- var _utils = require("../../utils");
13
- var _state = require("../../state");
14
- var _utils2 = require("../utils");
15
- var _utils3 = require("./utils");
16
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
- 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
- var TypeTagScene = _ref => {
1
+ import React, { useEffect, useState } from 'react';
2
+ import { Grid, ButtonToggle, ButtonItem } from '@looker/components';
3
+ import { useLocation, useParams } from 'react-router-dom';
4
+ import { useSelector } from 'react-redux';
5
+ import { ApixSection, DocTitle, DocTypeSummary, Link } from '../../components';
6
+ import { buildTypePath, isValidFilter, useNavigation } from '../../utils';
7
+ import { selectTagFilter, useSettingActions } from '../../state';
8
+ import { useTagStoreSync } from '../utils';
9
+ import { getMetaTypes } from './utils';
10
+ export var TypeTagScene = _ref => {
19
11
  var {
20
12
  api
21
13
  } = _ref;
22
14
  var {
23
15
  specKey,
24
16
  typeTag
25
- } = (0, _reactRouterDom.useParams)();
26
- var location = (0, _reactRouterDom.useLocation)();
17
+ } = useParams();
18
+ var location = useLocation();
27
19
  var {
28
20
  navigate,
29
21
  buildPathWithGlobalParams,
30
22
  navigateWithGlobalParams
31
- } = (0, _utils.useNavigation)();
32
- var selectedTagFilter = (0, _reactRedux.useSelector)(_state.selectTagFilter);
23
+ } = useNavigation();
24
+ var selectedTagFilter = useSelector(selectTagFilter);
33
25
  var {
34
26
  setTagFilterAction
35
- } = (0, _state.useSettingActions)();
36
- var [tagFilter, setTagFilter] = (0, _react.useState)(selectedTagFilter);
37
- (0, _utils2.useTagStoreSync)();
27
+ } = useSettingActions();
28
+ var [tagFilter, setTagFilter] = useState(selectedTagFilter);
29
+ useTagStoreSync();
38
30
  var handleChange = filter => {
39
31
  navigate(location.pathname, {
40
32
  t: filter === 'ALL' ? null : filter.toLowerCase()
41
33
  });
42
34
  };
43
- (0, _react.useEffect)(() => {
35
+ useEffect(() => {
44
36
  var searchParams = new URLSearchParams(location.search);
45
37
  var verbParam = searchParams.get('t') || 'ALL';
46
- verbParam = (0, _utils.isValidFilter)(location.pathname, verbParam) ? verbParam.toUpperCase() : 'ALL';
38
+ verbParam = isValidFilter(location.pathname, verbParam) ? verbParam.toUpperCase() : 'ALL';
47
39
  setTagFilterAction({
48
40
  tagFilter: verbParam
49
41
  });
50
42
  }, [location.search]);
51
43
  var types = api.typeTags[typeTag];
52
- (0, _react.useEffect)(() => {
44
+ useEffect(() => {
53
45
  if (!types) {
54
46
  navigateWithGlobalParams("/".concat(specKey, "/types"));
55
47
  }
56
48
  }, [types]);
57
- (0, _react.useEffect)(() => {
49
+ useEffect(() => {
58
50
  setTagFilter(selectedTagFilter);
59
51
  }, [selectedTagFilter]);
60
52
  if (!types) {
61
- return _react.default.createElement(_react.default.Fragment, null);
53
+ return React.createElement(React.Fragment, null);
62
54
  }
63
55
  var tag = Object.values(api.spec.tags).find(tag => tag.name === typeTag);
64
- var metaTypes = (0, _utils3.getMetaTypes)(types);
65
- return _react.default.createElement(_components2.ApixSection, null, _react.default.createElement(_components2.DocTitle, null, "".concat(tag.name, ": ").concat(tag.description)), _react.default.createElement(_components.ButtonToggle, {
56
+ var metaTypes = getMetaTypes(types);
57
+ return React.createElement(ApixSection, null, React.createElement(DocTitle, null, "".concat(tag.name, ": ").concat(tag.description)), React.createElement(ButtonToggle, {
66
58
  mb: "small",
67
59
  mt: "xlarge",
68
60
  value: tagFilter,
69
61
  onChange: handleChange
70
- }, _react.default.createElement(_components.ButtonItem, {
62
+ }, React.createElement(ButtonItem, {
71
63
  key: "ALL",
72
64
  px: "large",
73
65
  py: "xsmall"
74
- }, "ALL"), metaTypes.map(op => _react.default.createElement(_components.ButtonItem, {
66
+ }, "ALL"), metaTypes.map(op => React.createElement(ButtonItem, {
75
67
  key: op,
76
68
  px: "large",
77
69
  py: "xsmall"
78
- }, op))), Object.values(types).map((type, index) => (selectedTagFilter === 'ALL' || selectedTagFilter === type.metaType.toString().toUpperCase()) && _react.default.createElement(_components2.Link, {
70
+ }, op))), Object.values(types).map((type, index) => (selectedTagFilter === 'ALL' || selectedTagFilter === type.metaType.toString().toUpperCase()) && React.createElement(Link, {
79
71
  key: index,
80
- to: buildPathWithGlobalParams((0, _utils.buildTypePath)(specKey, tag.name, type.name))
81
- }, _react.default.createElement(_components.Grid, {
72
+ to: buildPathWithGlobalParams(buildTypePath(specKey, tag.name, type.name))
73
+ }, React.createElement(Grid, {
82
74
  columns: 1,
83
75
  py: "xsmall"
84
- }, _react.default.createElement(_components2.DocTypeSummary, {
76
+ }, React.createElement(DocTypeSummary, {
85
77
  key: index,
86
78
  type: type
87
79
  })))));
88
80
  };
89
- exports.TypeTagScene = TypeTagScene;
90
81
  //# sourceMappingURL=TypeTagScene.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TypeTagScene.js","names":["_react","_interopRequireWildcard","require","_components","_reactRouterDom","_reactRedux","_components2","_utils","_state","_utils2","_utils3","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","TypeTagScene","_ref","api","specKey","typeTag","useParams","location","useLocation","navigate","buildPathWithGlobalParams","navigateWithGlobalParams","useNavigation","selectedTagFilter","useSelector","selectTagFilter","setTagFilterAction","useSettingActions","tagFilter","setTagFilter","useState","useTagStoreSync","handleChange","filter","pathname","t","toLowerCase","useEffect","searchParams","URLSearchParams","search","verbParam","isValidFilter","toUpperCase","types","typeTags","concat","createElement","Fragment","tag","values","spec","tags","find","name","metaTypes","getMetaTypes","ApixSection","DocTitle","description","ButtonToggle","mb","mt","value","onChange","ButtonItem","px","py","map","op","type","index","metaType","toString","Link","to","buildTypePath","Grid","columns","DocTypeSummary","exports"],"sources":["../../../../src/scenes/TypeTagScene/TypeTagScene.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { FC } from 'react'\nimport React, { useEffect, useState } from 'react'\nimport { Grid, ButtonToggle, ButtonItem } from '@looker/components'\nimport type { ApiModel } from '@looker/sdk-codegen'\nimport { useLocation, useParams } from 'react-router-dom'\nimport { useSelector } from 'react-redux'\nimport { ApixSection, DocTitle, DocTypeSummary, Link } from '../../components'\nimport { buildTypePath, isValidFilter, useNavigation } from '../../utils'\nimport { selectTagFilter, useSettingActions } from '../../state'\nimport { useTagStoreSync } from '../utils'\nimport { getMetaTypes } from './utils'\n\ninterface TypeTagSceneProps {\n api: ApiModel\n}\n\ninterface TypeTagSceneParams {\n specKey: string\n typeTag: string\n}\n\nexport const TypeTagScene: FC<TypeTagSceneProps> = ({ api }) => {\n const { specKey, typeTag } = useParams<TypeTagSceneParams>()\n const location = useLocation()\n const { navigate, buildPathWithGlobalParams, navigateWithGlobalParams } =\n useNavigation()\n const selectedTagFilter = useSelector(selectTagFilter)\n const { setTagFilterAction } = useSettingActions()\n const [tagFilter, setTagFilter] = useState(selectedTagFilter)\n useTagStoreSync()\n\n const handleChange = (filter: string) => {\n navigate(location.pathname, {\n t: filter === 'ALL' ? null : filter.toLowerCase(),\n })\n }\n\n useEffect(() => {\n const searchParams = new URLSearchParams(location.search)\n let verbParam = searchParams.get('t') || 'ALL'\n verbParam = isValidFilter(location.pathname, verbParam)\n ? verbParam.toUpperCase()\n : 'ALL'\n setTagFilterAction({\n tagFilter: verbParam,\n })\n }, [location.search])\n\n const types = api.typeTags[typeTag]\n useEffect(() => {\n if (!types) {\n navigateWithGlobalParams(`/${specKey}/types`)\n }\n }, [types])\n\n useEffect(() => {\n setTagFilter(selectedTagFilter)\n }, [selectedTagFilter])\n\n if (!types) {\n return <></>\n }\n\n const tag = Object.values(api.spec.tags!).find((tag) => tag.name === typeTag)!\n const metaTypes = getMetaTypes(types)\n return (\n <ApixSection>\n <DocTitle>{`${tag.name}: ${tag.description}`}</DocTitle>\n <ButtonToggle\n mb=\"small\"\n mt=\"xlarge\"\n value={tagFilter}\n onChange={handleChange}\n >\n <ButtonItem key=\"ALL\" px=\"large\" py=\"xsmall\">\n ALL\n </ButtonItem>\n {metaTypes.map((op) => (\n <ButtonItem key={op} px=\"large\" py=\"xsmall\">\n {op}\n </ButtonItem>\n ))}\n </ButtonToggle>\n {Object.values(types).map(\n (type, index) =>\n (selectedTagFilter === 'ALL' ||\n selectedTagFilter === type.metaType.toString().toUpperCase()) && (\n <Link\n key={index}\n to={buildPathWithGlobalParams(\n buildTypePath(specKey, tag.name, type.name)\n )}\n >\n <Grid columns={1} py=\"xsmall\">\n <DocTypeSummary key={index} type={type} />\n </Grid>\n </Link>\n )\n )}\n </ApixSection>\n )\n}\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAAsC,SAAAS,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAX,wBAAAe,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAA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B,IAAAwD,oBAAa,EAAC9D,OAAO,EAAEmC,GAAG,CAACK,IAAI,EAAEgB,IAAI,CAAChB,IAAI,CAAC;EAC3C,GAEF5E,MAAA,CAAAkB,OAAA,CAAAmD,aAAA,CAAClE,WAAA,CAAAgG,IAAI;IAACC,OAAO,EAAE,CAAE;IAACX,EAAE,EAAC;EAAQ,GAC3BzF,MAAA,CAAAkB,OAAA,CAAAmD,aAAA,CAAC/D,YAAA,CAAA+F,cAAc;IAAC1E,GAAG,EAAEkE,KAAM;IAACD,IAAI,EAAEA;EAAK,EAAG,CACrC,CAEV,CACJ,CACW;AAElB,CAAC;AAAAU,OAAA,CAAArE,YAAA,GAAAA,YAAA"}
1
+ {"version":3,"file":"TypeTagScene.js","names":["React","useEffect","useState","Grid","ButtonToggle","ButtonItem","useLocation","useParams","useSelector","ApixSection","DocTitle","DocTypeSummary","Link","buildTypePath","isValidFilter","useNavigation","selectTagFilter","useSettingActions","useTagStoreSync","getMetaTypes","TypeTagScene","_ref","api","specKey","typeTag","location","navigate","buildPathWithGlobalParams","navigateWithGlobalParams","selectedTagFilter","setTagFilterAction","tagFilter","setTagFilter","handleChange","filter","pathname","t","toLowerCase","searchParams","URLSearchParams","search","verbParam","get","toUpperCase","types","typeTags","concat","createElement","Fragment","tag","Object","values","spec","tags","find","name","metaTypes","description","mb","mt","value","onChange","key","px","py","map","op","type","index","metaType","toString","to","columns"],"sources":["../../../../src/scenes/TypeTagScene/TypeTagScene.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { FC } from 'react'\nimport React, { useEffect, useState } from 'react'\nimport { Grid, ButtonToggle, ButtonItem } from '@looker/components'\nimport type { ApiModel } from '@looker/sdk-codegen'\nimport { useLocation, useParams } from 'react-router-dom'\nimport { useSelector } from 'react-redux'\nimport { ApixSection, DocTitle, DocTypeSummary, Link } from '../../components'\nimport { buildTypePath, isValidFilter, useNavigation } from '../../utils'\nimport { selectTagFilter, useSettingActions } from '../../state'\nimport { useTagStoreSync } from '../utils'\nimport { getMetaTypes } from './utils'\n\ninterface TypeTagSceneProps {\n api: ApiModel\n}\n\ninterface TypeTagSceneParams {\n specKey: string\n typeTag: string\n}\n\nexport const TypeTagScene: FC<TypeTagSceneProps> = ({ api }) => {\n const { specKey, typeTag } = useParams<TypeTagSceneParams>()\n const location = useLocation()\n const { navigate, buildPathWithGlobalParams, navigateWithGlobalParams } =\n useNavigation()\n const selectedTagFilter = useSelector(selectTagFilter)\n const { setTagFilterAction } = useSettingActions()\n const [tagFilter, setTagFilter] = useState(selectedTagFilter)\n useTagStoreSync()\n\n const handleChange = (filter: string) => {\n navigate(location.pathname, {\n t: filter === 'ALL' ? null : filter.toLowerCase(),\n })\n }\n\n useEffect(() => {\n const searchParams = new URLSearchParams(location.search)\n let verbParam = searchParams.get('t') || 'ALL'\n verbParam = isValidFilter(location.pathname, verbParam)\n ? verbParam.toUpperCase()\n : 'ALL'\n setTagFilterAction({\n tagFilter: verbParam,\n })\n }, [location.search])\n\n const types = api.typeTags[typeTag]\n useEffect(() => {\n if (!types) {\n navigateWithGlobalParams(`/${specKey}/types`)\n }\n }, [types])\n\n useEffect(() => {\n setTagFilter(selectedTagFilter)\n }, [selectedTagFilter])\n\n if (!types) {\n return <></>\n }\n\n const tag = Object.values(api.spec.tags!).find((tag) => tag.name === typeTag)!\n const metaTypes = getMetaTypes(types)\n return (\n <ApixSection>\n <DocTitle>{`${tag.name}: ${tag.description}`}</DocTitle>\n <ButtonToggle\n mb=\"small\"\n mt=\"xlarge\"\n value={tagFilter}\n onChange={handleChange}\n >\n <ButtonItem key=\"ALL\" px=\"large\" py=\"xsmall\">\n ALL\n </ButtonItem>\n {metaTypes.map((op) => (\n <ButtonItem key={op} px=\"large\" py=\"xsmall\">\n {op}\n </ButtonItem>\n ))}\n </ButtonToggle>\n {Object.values(types).map(\n (type, index) =>\n (selectedTagFilter === 'ALL' ||\n selectedTagFilter === type.metaType.toString().toUpperCase()) && (\n <Link\n key={index}\n to={buildPathWithGlobalParams(\n buildTypePath(specKey, tag.name, type.name)\n )}\n >\n <Grid columns={1} py=\"xsmall\">\n <DocTypeSummary key={index} type={type} />\n </Grid>\n </Link>\n )\n )}\n </ApixSection>\n )\n}\n"],"mappings":"AA0BA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,IAAI,EAAEC,YAAY,EAAEC,UAAU,QAAQ,oBAAoB;AAEnE,SAASC,WAAW,EAAEC,SAAS,QAAQ,kBAAkB;AACzD,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,WAAW,EAAEC,QAAQ,EAAEC,cAAc,EAAEC,IAAI,QAAQ,kBAAkB;AAC9E,SAASC,aAAa,EAAEC,aAAa,EAAEC,aAAa,QAAQ,aAAa;AACzE,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,aAAa;AAChE,SAASC,eAAe,QAAQ,UAAU;AAC1C,SAASC,YAAY,QAAQ,SAA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,MAAM,CAACC,MAAM,CAACP,KAAK,CAAC,CAACqB,GAAG,CACvB,CAACE,IAAI,EAAEC,KAAK,KACV,CAACvC,iBAAiB,KAAK,KAAK,IAC1BA,iBAAiB,KAAKsC,IAAI,CAACE,QAAQ,CAACC,QAAQ,CAAC,CAAC,CAAC3B,WAAW,CAAC,CAAC,KAC5D3C,KAAA,CAAA+C,aAAA,CAACnC,IAAI;IACHkD,GAAG,EAAEM,KAAM;IACXG,EAAE,EAAE5C,yBAAyB,CAC3Bd,aAAa,CAACU,OAAO,EAAE0B,GAAG,CAACM,IAAI,EAAEY,IAAI,CAACZ,IAAI,CAC5C;EAAE,GAEFvD,KAAA,CAAA+C,aAAA,CAAC5C,IAAI;IAACqE,OAAO,EAAE,CAAE;IAACR,EAAE,EAAC;EAAQ,GAC3BhE,KAAA,CAAA+C,aAAA,CAACpC,cAAc;IAACmD,GAAG,EAAEM,KAAM;IAACD,IAAI,EAAEA;EAAK,CAAE,CACrC,CACF,CAEZ,CACW,CAAC;AAElB,CAAC"}
@@ -1,13 +1,2 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "TypeTagScene", {
7
- enumerable: true,
8
- get: function get() {
9
- return _TypeTagScene.TypeTagScene;
10
- }
11
- });
12
- var _TypeTagScene = require("./TypeTagScene");
1
+ export { TypeTagScene } from './TypeTagScene';
13
2
  //# sourceMappingURL=index.js.map