@looker/api-explorer 0.9.52 → 0.9.54

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 +22 -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 +7 -7
  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,20 +1,8 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.exampleColumns = exports.PER_PAGE_COUNT = exports.EMPTY_STRING = void 0;
7
- exports.getFileNameFromPath = getFileNameFromPath;
8
- exports.getTableItemBottomBorder = getTableItemBottomBorder;
9
- exports.prepareExampleDataTable = prepareExampleDataTable;
10
- exports.sortLanguagesByPreference = sortLanguagesByPreference;
11
- var _sdkCodegen = require("@looker/sdk-codegen");
12
- var _components = require("@looker/components");
13
- var PER_PAGE_COUNT = 10;
14
- exports.PER_PAGE_COUNT = PER_PAGE_COUNT;
15
- var EMPTY_STRING = '';
16
- exports.EMPTY_STRING = EMPTY_STRING;
17
- var exampleColumns = [{
1
+ import { findExamples } from '@looker/sdk-codegen';
2
+ import { theme } from '@looker/components';
3
+ export var PER_PAGE_COUNT = 10;
4
+ export var EMPTY_STRING = '';
5
+ export var exampleColumns = [{
18
6
  id: 'filename',
19
7
  title: 'Filename',
20
8
  type: 'string',
@@ -35,14 +23,13 @@ var exampleColumns = [{
35
23
  type: 'number',
36
24
  size: 20
37
25
  }];
38
- exports.exampleColumns = exampleColumns;
39
- function getFileNameFromPath(path) {
26
+ export function getFileNameFromPath(path) {
40
27
  var lastForwardSlash = path.lastIndexOf('/');
41
28
  return lastForwardSlash === -1 ? path : path.slice(lastForwardSlash + 1, path.indexOf(' '));
42
29
  }
43
- function prepareExampleDataTable(languages, examples, operationId, currentPage) {
30
+ export function prepareExampleDataTable(languages, examples, operationId, currentPage) {
44
31
  var tableExamples = languages.reduce(function (result, language) {
45
- var languageExamples = (0, _sdkCodegen.findExamples)(examples, language, operationId);
32
+ var languageExamples = findExamples(examples, language, operationId);
46
33
  return [...result, ...languageExamples.map(exampleLink => {
47
34
  return {
48
35
  filename: getFileNameFromPath(exampleLink.tooltip),
@@ -73,10 +60,10 @@ function prepareExampleDataTable(languages, examples, operationId, currentPage)
73
60
  paginate
74
61
  };
75
62
  }
76
- function getTableItemBottomBorder(hide) {
77
- return hide ? 'none' : "solid 1px ".concat(_components.theme.colors.ui2);
63
+ export function getTableItemBottomBorder(hide) {
64
+ return hide ? 'none' : "solid 1px ".concat(theme.colors.ui2);
78
65
  }
79
- function sortLanguagesByPreference(languages, sdkLanguage) {
66
+ export function sortLanguagesByPreference(languages, sdkLanguage) {
80
67
  languages.some((item, idx) => item === sdkLanguage && languages.unshift(languages.splice(idx, 1)[0]));
81
68
  return languages;
82
69
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["_sdkCodegen","require","_components","PER_PAGE_COUNT","exports","EMPTY_STRING","exampleColumns","id","title","type","size","getFileNameFromPath","path","lastForwardSlash","lastIndexOf","slice","indexOf","prepareExampleDataTable","languages","examples","operationId","currentPage","tableExamples","reduce","result","language","languageExamples","findExamples","map","exampleLink","filename","tooltip","line","lineNumber","toLowerCase","permalink","description","pageExamples","filter","example","index","pageLimit","Math","ceil","length","paginate","push","toString","getTableItemBottomBorder","hide","concat","theme","colors","ui2","sortLanguagesByPreference","sdkLanguage","some","item","idx","unshift","splice"],"sources":["../../../../src/components/DocSdkUsage/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 */\n\nimport type { IExampleMine } from '@looker/sdk-codegen'\nimport { findExamples } from '@looker/sdk-codegen'\nimport type { DataTableColumns } from '@looker/components'\nimport { theme } from '@looker/components'\n\nexport const PER_PAGE_COUNT = 10\n\nexport const EMPTY_STRING = ''\n\nexport const exampleColumns: DataTableColumns = [\n {\n id: 'filename',\n title: 'Filename',\n type: 'string',\n size: 30,\n },\n {\n id: 'language',\n title: 'Language',\n type: 'string',\n size: 20,\n },\n {\n id: 'description',\n title: 'Description',\n type: 'string',\n size: 40,\n },\n {\n id: 'line',\n title: 'Line',\n type: 'number',\n size: 20,\n },\n]\n\nexport interface ExampleLinkTableRow {\n filename: string\n language: string\n line: string\n permalink: string\n description: string\n}\n\nexport interface DataTablePage {\n /** array of sdk examples for a given page */\n pageExamples: ExampleLinkTableRow[]\n /** the page limit of the larger example set */\n pageLimit: number\n /** flag for whether or not to paginate results */\n paginate: boolean\n}\n\n/**\n * Gets the filename from the end of a path\n * @param path - repository path\n * @returns file name\n */\nexport function getFileNameFromPath(path: string): string {\n const lastForwardSlash = path.lastIndexOf('/')\n return lastForwardSlash === -1\n ? path\n : path.slice(lastForwardSlash + 1, path.indexOf(' '))\n}\n\n/**\n * Formats the examples for each language into a format that is displayable in a table structure\n * @param languages - languages to example mine\n * @param examples - the mined examples\n * @param operationId - the current operation id\n * @param currentPage - the current page to paginate to\n * @returns display-ready table data\n */\nexport function prepareExampleDataTable(\n languages: string[],\n examples: IExampleMine,\n operationId: string,\n currentPage: number\n): DataTablePage {\n const tableExamples = languages.reduce(function (\n result: ExampleLinkTableRow[],\n language: string\n ) {\n const languageExamples = findExamples(examples, language, operationId)\n return [\n ...result,\n ...languageExamples.map((exampleLink) => {\n return {\n filename: getFileNameFromPath(exampleLink.tooltip),\n line: exampleLink.lineNumber,\n language: language.toLowerCase(),\n permalink: exampleLink.permalink,\n description: exampleLink.description,\n }\n }),\n ]\n },\n [])\n\n const pageExamples = tableExamples.filter(\n (example, index) =>\n example &&\n index + 1 > (currentPage - 1) * PER_PAGE_COUNT &&\n index + 1 <= currentPage * PER_PAGE_COUNT\n )\n\n const pageLimit = Math.ceil(tableExamples.length / PER_PAGE_COUNT)\n const paginate = tableExamples.length > PER_PAGE_COUNT\n\n if (tableExamples.length > PER_PAGE_COUNT) {\n while (pageExamples.length !== PER_PAGE_COUNT) {\n pageExamples.push({\n filename: EMPTY_STRING,\n line: EMPTY_STRING,\n language: EMPTY_STRING,\n permalink: pageExamples.length.toString(),\n description: EMPTY_STRING,\n })\n }\n }\n return { pageExamples, pageLimit, paginate }\n}\n\n/**\n * returns a border-bottom style value for table items\n * @param hide whether or not to hide bottom border\n */\nexport function getTableItemBottomBorder(hide: boolean): string {\n return hide ? 'none' : `solid 1px ${theme.colors.ui2}`\n}\n\n/**\n * puts preferred language examples at front of list\n * @param languages list of languages\n * @param sdkLanguage language preference\n */\nexport function sortLanguagesByPreference(\n languages: string[],\n sdkLanguage: string\n): string[] {\n languages.some(\n (item, idx) =>\n item === sdkLanguage && languages.unshift(languages.splice(idx, 1)[0])\n )\n return languages\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"utils.js","names":["findExamples","theme","PER_PAGE_COUNT","EMPTY_STRING","exampleColumns","id","title","type","size","getFileNameFromPath","path","lastForwardSlash","lastIndexOf","slice","indexOf","prepareExampleDataTable","languages","examples","operationId","currentPage","tableExamples","reduce","result","language","languageExamples","map","exampleLink","filename","tooltip","line","lineNumber","toLowerCase","permalink","description","pageExamples","filter","example","index","pageLimit","Math","ceil","length","paginate","push","toString","getTableItemBottomBorder","hide","concat","colors","ui2","sortLanguagesByPreference","sdkLanguage","some","item","idx","unshift","splice"],"sources":["../../../../src/components/DocSdkUsage/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 */\n\nimport type { IExampleMine } from '@looker/sdk-codegen'\nimport { findExamples } from '@looker/sdk-codegen'\nimport type { DataTableColumns } from '@looker/components'\nimport { theme } from '@looker/components'\n\nexport const PER_PAGE_COUNT = 10\n\nexport const EMPTY_STRING = ''\n\nexport const exampleColumns: DataTableColumns = [\n {\n id: 'filename',\n title: 'Filename',\n type: 'string',\n size: 30,\n },\n {\n id: 'language',\n title: 'Language',\n type: 'string',\n size: 20,\n },\n {\n id: 'description',\n title: 'Description',\n type: 'string',\n size: 40,\n },\n {\n id: 'line',\n title: 'Line',\n type: 'number',\n size: 20,\n },\n]\n\nexport interface ExampleLinkTableRow {\n filename: string\n language: string\n line: string\n permalink: string\n description: string\n}\n\nexport interface DataTablePage {\n /** array of sdk examples for a given page */\n pageExamples: ExampleLinkTableRow[]\n /** the page limit of the larger example set */\n pageLimit: number\n /** flag for whether or not to paginate results */\n paginate: boolean\n}\n\n/**\n * Gets the filename from the end of a path\n * @param path - repository path\n * @returns file name\n */\nexport function getFileNameFromPath(path: string): string {\n const lastForwardSlash = path.lastIndexOf('/')\n return lastForwardSlash === -1\n ? path\n : path.slice(lastForwardSlash + 1, path.indexOf(' '))\n}\n\n/**\n * Formats the examples for each language into a format that is displayable in a table structure\n * @param languages - languages to example mine\n * @param examples - the mined examples\n * @param operationId - the current operation id\n * @param currentPage - the current page to paginate to\n * @returns display-ready table data\n */\nexport function prepareExampleDataTable(\n languages: string[],\n examples: IExampleMine,\n operationId: string,\n currentPage: number\n): DataTablePage {\n const tableExamples = languages.reduce(function (\n result: ExampleLinkTableRow[],\n language: string\n ) {\n const languageExamples = findExamples(examples, language, operationId)\n return [\n ...result,\n ...languageExamples.map((exampleLink) => {\n return {\n filename: getFileNameFromPath(exampleLink.tooltip),\n line: exampleLink.lineNumber,\n language: language.toLowerCase(),\n permalink: exampleLink.permalink,\n description: exampleLink.description,\n }\n }),\n ]\n },\n [])\n\n const pageExamples = tableExamples.filter(\n (example, index) =>\n example &&\n index + 1 > (currentPage - 1) * PER_PAGE_COUNT &&\n index + 1 <= currentPage * PER_PAGE_COUNT\n )\n\n const pageLimit = Math.ceil(tableExamples.length / PER_PAGE_COUNT)\n const paginate = tableExamples.length > PER_PAGE_COUNT\n\n if (tableExamples.length > PER_PAGE_COUNT) {\n while (pageExamples.length !== PER_PAGE_COUNT) {\n pageExamples.push({\n filename: EMPTY_STRING,\n line: EMPTY_STRING,\n language: EMPTY_STRING,\n permalink: pageExamples.length.toString(),\n description: EMPTY_STRING,\n })\n }\n }\n return { pageExamples, pageLimit, paginate }\n}\n\n/**\n * returns a border-bottom style value for table items\n * @param hide whether or not to hide bottom border\n */\nexport function getTableItemBottomBorder(hide: boolean): string {\n return hide ? 'none' : `solid 1px ${theme.colors.ui2}`\n}\n\n/**\n * puts preferred language examples at front of list\n * @param languages list of languages\n * @param sdkLanguage language preference\n */\nexport function sortLanguagesByPreference(\n languages: string[],\n sdkLanguage: string\n): string[] {\n languages.some(\n (item, idx) =>\n item === sdkLanguage && languages.unshift(languages.splice(idx, 1)[0])\n )\n return languages\n}\n"],"mappings":"AA2BA,SAASA,YAAY,QAAQ,qBAAqB;AAElD,SAASC,KAAK,QAAQ,oBAAoB;AAE1C,OAAO,IAAMC,cAAc,GAAG,EAAE;AAEhC,OAAO,IAAMC,YAAY,GAAG,EAAE;AAE9B,OAAO,IAAMC,cAAgC,GAAG,CAC9C;EACEC,EAAE,EAAE,UAAU;EACdC,KAAK,EAAE,UAAU;EACjBC,IAAI,EAAE,QAAQ;EACdC,IAAI,EAAE;AACR,CAAC,EACD;EACEH,EAAE,EAAE,UAAU;EACdC,KAAK,EAAE,UAAU;EACjBC,IAAI,EAAE,QAAQ;EACdC,IAAI,EAAE;AACR,CAAC,EACD;EACEH,EAAE,EAAE,aAAa;EACjBC,KAAK,EAAE,aAAa;EACpBC,IAAI,EAAE,QAAQ;EACdC,IAAI,EAAE;AACR,CAAC,EACD;EACEH,EAAE,EAAE,MAAM;EACVC,KAAK,EAAE,MAAM;EACbC,IAAI,EAAE,QAAQ;EACdC,IAAI,EAAE;AACR,CAAC,CACF;AAwBD,OAAO,SAASC,mBAAmBA,CAACC,IAAY,EAAU;EACxD,IAAMC,gBAAgB,GAAGD,IAAI,CAACE,WAAW,CAAC,GAAG,CAAC;EAC9C,OAAOD,gBAAgB,KAAK,CAAC,CAAC,GAC1BD,IAAI,GACJA,IAAI,CAACG,KAAK,CAACF,gBAAgB,GAAG,CAAC,EAAED,IAAI,CAACI,OAAO,CAAC,GAAG,CAAC,CAAC;AACzD;AAUA,OAAO,SAASC,uBAAuBA,CACrCC,SAAmB,EACnBC,QAAsB,EACtBC,WAAmB,EACnBC,WAAmB,EACJ;EACf,IAAMC,aAAa,GAAGJ,SAAS,CAACK,MAAM,CAAC,UACrCC,MAA6B,EAC7BC,QAAgB,EAChB;IACA,IAAMC,gBAAgB,GAAGxB,YAAY,CAACiB,QAAQ,EAAEM,QAAQ,EAAEL,WAAW,CAAC;IACtE,OAAO,CACL,GAAGI,MAAM,EACT,GAAGE,gBAAgB,CAACC,GAAG,CAAEC,WAAW,IAAK;MACvC,OAAO;QACLC,QAAQ,EAAElB,mBAAmB,CAACiB,WAAW,CAACE,OAAO,CAAC;QAClDC,IAAI,EAAEH,WAAW,CAACI,UAAU;QAC5BP,QAAQ,EAAEA,QAAQ,CAACQ,WAAW,CAAC,CAAC;QAChCC,SAAS,EAAEN,WAAW,CAACM,SAAS;QAChCC,WAAW,EAAEP,WAAW,CAACO;MAC3B,CAAC;IACH,CAAC,CAAC,CACH;EACH,CAAC,EACD,EAAE,CAAC;EAEH,IAAMC,YAAY,GAAGd,aAAa,CAACe,MAAM,CACvC,CAACC,OAAO,EAAEC,KAAK,KACbD,OAAO,IACPC,KAAK,GAAG,CAAC,GAAG,CAAClB,WAAW,GAAG,CAAC,IAAIjB,cAAc,IAC9CmC,KAAK,GAAG,CAAC,IAAIlB,WAAW,GAAGjB,cAC/B,CAAC;EAED,IAAMoC,SAAS,GAAGC,IAAI,CAACC,IAAI,CAACpB,aAAa,CAACqB,MAAM,GAAGvC,cAAc,CAAC;EAClE,IAAMwC,QAAQ,GAAGtB,aAAa,CAACqB,MAAM,GAAGvC,cAAc;EAEtD,IAAIkB,aAAa,CAACqB,MAAM,GAAGvC,cAAc,EAAE;IACzC,OAAOgC,YAAY,CAACO,MAAM,KAAKvC,cAAc,EAAE;MAC7CgC,YAAY,CAACS,IAAI,CAAC;QAChBhB,QAAQ,EAAExB,YAAY;QACtB0B,IAAI,EAAE1B,YAAY;QAClBoB,QAAQ,EAAEpB,YAAY;QACtB6B,SAAS,EAAEE,YAAY,CAACO,MAAM,CAACG,QAAQ,CAAC,CAAC;QACzCX,WAAW,EAAE9B;MACf,CAAC,CAAC;IACJ;EACF;EACA,OAAO;IAAE+B,YAAY;IAAEI,SAAS;IAAEI;EAAS,CAAC;AAC9C;AAMA,OAAO,SAASG,wBAAwBA,CAACC,IAAa,EAAU;EAC9D,OAAOA,IAAI,GAAG,MAAM,gBAAAC,MAAA,CAAgB9C,KAAK,CAAC+C,MAAM,CAACC,GAAG,CAAE;AACxD;AAOA,OAAO,SAASC,yBAAyBA,CACvClC,SAAmB,EACnBmC,WAAmB,EACT;EACVnC,SAAS,CAACoC,IAAI,CACZ,CAACC,IAAI,EAAEC,GAAG,KACRD,IAAI,KAAKF,WAAW,IAAInC,SAAS,CAACuC,OAAO,CAACvC,SAAS,CAACwC,MAAM,CAACF,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CACzE,CAAC;EACD,OAAOtC,SAAS;AAClB"}
@@ -1,22 +1,15 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DocSource = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _sdkCodegen = require("@looker/sdk-codegen");
9
- var _components = require("@looker/components");
10
- var _icons = require("@looker/icons");
11
- var _reactRedux = require("react-redux");
12
- var _state = require("../../state");
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- var DocSource = _ref => {
1
+ import React from 'react';
2
+ import { codeSearchLink, findDeclaration } from '@looker/sdk-codegen';
3
+ import { Icon, Link, Tooltip } from '@looker/components';
4
+ import { IdeFileDocument } from '@looker/icons';
5
+ import { useSelector } from 'react-redux';
6
+ import { selectDeclarationsLode } from '../../state';
7
+ export var DocSource = _ref => {
15
8
  var {
16
9
  method,
17
10
  type
18
11
  } = _ref;
19
- var declarations = (0, _reactRedux.useSelector)(_state.selectDeclarationsLode);
12
+ var declarations = useSelector(selectDeclarationsLode);
20
13
  var sourceLink;
21
14
  var declaration;
22
15
  if (declarations) {
@@ -24,17 +17,16 @@ var DocSource = _ref => {
24
17
  ({
25
18
  declaration,
26
19
  link: sourceLink
27
- } = (0, _sdkCodegen.findDeclaration)(declarations, method === null || method === void 0 ? void 0 : method.id, type === null || type === void 0 ? void 0 : type.name, _sdkCodegen.codeSearchLink));
20
+ } = findDeclaration(declarations, method === null || method === void 0 ? void 0 : method.id, type === null || type === void 0 ? void 0 : type.name, codeSearchLink));
28
21
  }
29
- return _react.default.createElement(_react.default.Fragment, null, sourceLink && declaration && _react.default.createElement(_components.Tooltip, {
22
+ return React.createElement(React.Fragment, null, sourceLink && declaration && React.createElement(Tooltip, {
30
23
  content: "".concat(declaration.sourceFile, "#L").concat(declaration.line),
31
24
  width: "none"
32
- }, _react.default.createElement(_components.Link, {
25
+ }, React.createElement(Link, {
33
26
  href: sourceLink,
34
27
  target: "_blank"
35
- }, _react.default.createElement(_components.Icon, {
36
- icon: _react.default.createElement(_icons.IdeFileDocument, null)
28
+ }, React.createElement(Icon, {
29
+ icon: React.createElement(IdeFileDocument, null)
37
30
  }))));
38
31
  };
39
- exports.DocSource = DocSource;
40
32
  //# sourceMappingURL=DocSource.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocSource.js","names":["_react","_interopRequireDefault","require","_sdkCodegen","_components","_icons","_reactRedux","_state","obj","__esModule","default","DocSource","_ref","method","type","declarations","useSelector","selectDeclarationsLode","sourceLink","declaration","link","findDeclaration","id","name","codeSearchLink","createElement","Fragment","Tooltip","content","concat","sourceFile","line","width","Link","href","target","Icon","icon","IdeFileDocument","exports"],"sources":["../../../../src/components/DocSource/DocSource.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 from 'react'\nimport type { IMethod, IType } from '@looker/sdk-codegen'\nimport { codeSearchLink, findDeclaration } from '@looker/sdk-codegen'\nimport { Icon, Link, Tooltip } from '@looker/components'\nimport { IdeFileDocument } from '@looker/icons'\nimport { useSelector } from 'react-redux'\n\nimport { selectDeclarationsLode } from '../../state'\n\ninterface DocSourceProps {\n method?: IMethod\n type?: IType\n}\n\nexport const DocSource: FC<DocSourceProps> = ({ method, type }) => {\n const declarations = useSelector(selectDeclarationsLode)\n let sourceLink\n let declaration\n if (declarations) {\n ;({ declaration, link: sourceLink } = findDeclaration(\n declarations,\n method?.id,\n type?.name,\n codeSearchLink\n ))\n }\n\n return (\n <>\n {sourceLink && declaration && (\n <Tooltip\n content={`${declaration.sourceFile}#L${declaration.line}`}\n width=\"none\"\n >\n <Link href={sourceLink} target=\"_blank\">\n <Icon icon={<IdeFileDocument />} />\n </Link>\n </Tooltip>\n )}\n </>\n )\n}\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAL,OAAA;AAAoD,SAAAD,uBAAAO,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAO7C,IAAMG,SAA6B,GAAGC,IAAA,IAAsB;EAAA,IAArB;IAAEC,MAAM;IAAEC;EAAK,CAAC,GAAAF,IAAA;EAC5D,IAAMG,YAAY,GAAG,IAAAC,uBAAW,EAACC,6BAAsB,CAAC;EACxD,IAAIC,UAAU;EACd,IAAIC,WAAW;EACf,IAAIJ,YAAY,EAAE;IAChB;IAAC,CAAC;MAAEI,WAAW;MAAEC,IAAI,EAAEF;IAAW,CAAC,GAAG,IAAAG,2BAAe,EACnDN,YAAY,EACZF,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAES,EAAE,EACVR,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAES,IAAI,EACVC,0BAAc,CACf;EACH;EAEA,OACExB,MAAA,CAAAU,OAAA,CAAAe,aAAA,CAAAzB,MAAA,CAAAU,OAAA,CAAAgB,QAAA,QACGR,UAAU,IAAIC,WAAW,IACxBnB,MAAA,CAAAU,OAAA,CAAAe,aAAA,CAACrB,WAAA,CAAAuB,OAAO;IACNC,OAAO,KAAAC,MAAA,CAAKV,WAAW,CAACW,UAAU,QAAAD,MAAA,CAAKV,WAAW,CAACY,IAAI,CAAG;IAC1DC,KAAK,EAAC;EAAM,GAEZhC,MAAA,CAAAU,OAAA,CAAAe,aAAA,CAACrB,WAAA,CAAA6B,IAAI;IAACC,IAAI,EAAEhB,UAAW;IAACiB,MAAM,EAAC;EAAQ,GACrCnC,MAAA,CAAAU,OAAA,CAAAe,aAAA,CAACrB,WAAA,CAAAgC,IAAI;IAACC,IAAI,EAAErC,MAAA,CAAAU,OAAA,CAAAe,aAAA,CAACpB,MAAA,CAAAiC,eAAe;EAAI,EAAG,CAC9B,CAEV,CACA;AAEP,CAAC;AAAAC,OAAA,CAAA5B,SAAA,GAAAA,SAAA"}
1
+ {"version":3,"file":"DocSource.js","names":["React","codeSearchLink","findDeclaration","Icon","Link","Tooltip","IdeFileDocument","useSelector","selectDeclarationsLode","DocSource","_ref","method","type","declarations","sourceLink","declaration","link","id","name","createElement","Fragment","content","concat","sourceFile","line","width","href","target","icon"],"sources":["../../../../src/components/DocSource/DocSource.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 from 'react'\nimport type { IMethod, IType } from '@looker/sdk-codegen'\nimport { codeSearchLink, findDeclaration } from '@looker/sdk-codegen'\nimport { Icon, Link, Tooltip } from '@looker/components'\nimport { IdeFileDocument } from '@looker/icons'\nimport { useSelector } from 'react-redux'\n\nimport { selectDeclarationsLode } from '../../state'\n\ninterface DocSourceProps {\n method?: IMethod\n type?: IType\n}\n\nexport const DocSource: FC<DocSourceProps> = ({ method, type }) => {\n const declarations = useSelector(selectDeclarationsLode)\n let sourceLink\n let declaration\n if (declarations) {\n ;({ declaration, link: sourceLink } = findDeclaration(\n declarations,\n method?.id,\n type?.name,\n codeSearchLink\n ))\n }\n\n return (\n <>\n {sourceLink && declaration && (\n <Tooltip\n content={`${declaration.sourceFile}#L${declaration.line}`}\n width=\"none\"\n >\n <Link href={sourceLink} target=\"_blank\">\n <Icon icon={<IdeFileDocument />} />\n </Link>\n </Tooltip>\n )}\n </>\n )\n}\n"],"mappings":"AA0BA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,cAAc,EAAEC,eAAe,QAAQ,qBAAqB;AACrE,SAASC,IAAI,EAAEC,IAAI,EAAEC,OAAO,QAAQ,oBAAoB;AACxD,SAASC,eAAe,QAAQ,eAAe;AAC/C,SAASC,WAAW,QAAQ,aAAa;AAEzC,SAASC,sBAAsB,QAAQ,aAAa;AAOpD,OAAO,IAAMC,SAA6B,GAAGC,IAAA,IAAsB;EAAA,IAArB;IAAEC,MAAM;IAAEC;EAAK,CAAC,GAAAF,IAAA;EAC5D,IAAMG,YAAY,GAAGN,WAAW,CAACC,sBAAsB,CAAC;EACxD,IAAIM,UAAU;EACd,IAAIC,WAAW;EACf,IAAIF,YAAY,EAAE;IAChB;IAAC,CAAC;MAAEE,WAAW;MAAEC,IAAI,EAAEF;IAAW,CAAC,GAAGZ,eAAe,CACnDW,YAAY,EACZF,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEM,EAAE,EACVL,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEM,IAAI,EACVjB,cACF,CAAC;EACH;EAEA,OACED,KAAA,CAAAmB,aAAA,CAAAnB,KAAA,CAAAoB,QAAA,QACGN,UAAU,IAAIC,WAAW,IACxBf,KAAA,CAAAmB,aAAA,CAACd,OAAO;IACNgB,OAAO,KAAAC,MAAA,CAAKP,WAAW,CAACQ,UAAU,QAAAD,MAAA,CAAKP,WAAW,CAACS,IAAI,CAAG;IAC1DC,KAAK,EAAC;EAAM,GAEZzB,KAAA,CAAAmB,aAAA,CAACf,IAAI;IAACsB,IAAI,EAAEZ,UAAW;IAACa,MAAM,EAAC;EAAQ,GACrC3B,KAAA,CAAAmB,aAAA,CAAChB,IAAI;IAACyB,IAAI,EAAE5B,KAAA,CAAAmB,aAAA,CAACb,eAAe,MAAE;EAAE,CAAE,CAC9B,CACC,CAEX,CAAC;AAEP,CAAC"}
@@ -1,13 +1,2 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "DocSource", {
7
- enumerable: true,
8
- get: function get() {
9
- return _DocSource.DocSource;
10
- }
11
- });
12
- var _DocSource = require("./DocSource");
1
+ export { DocSource } from './DocSource';
13
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_DocSource","require"],"sources":["../../../../src/components/DocSource/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 { DocSource } from './DocSource'\n"],"mappings":";;;;;;;;;;;AAyBA,IAAAA,UAAA,GAAAC,OAAA"}
1
+ {"version":3,"file":"index.js","names":["DocSource"],"sources":["../../../../src/components/DocSource/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 { DocSource } from './DocSource'\n"],"mappings":"AAyBA,SAASA,SAAS,QAAQ,aAAa"}
@@ -1,24 +1,16 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DocStatus = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _components = require("@looker/components");
9
- var _runIt = require("@looker/run-it");
10
- var _DocMethodSummary = require("../DocMethodSummary");
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- var DocStatus = _ref => {
1
+ import React from 'react';
2
+ import { Tooltip } from '@looker/components';
3
+ import { MethodBadge } from '@looker/run-it';
4
+ import { pickTooltipContent } from '../DocMethodSummary';
5
+ export var DocStatus = _ref => {
13
6
  var {
14
7
  method
15
8
  } = _ref;
16
- return _react.default.createElement(_components.Tooltip, {
17
- content: (0, _DocMethodSummary.pickTooltipContent)(method.status)
18
- }, _react.default.createElement(_runIt.MethodBadge, {
9
+ return React.createElement(Tooltip, {
10
+ content: pickTooltipContent(method.status)
11
+ }, React.createElement(MethodBadge, {
19
12
  type: method.status,
20
13
  titleStatus: true
21
14
  }, method.status.toLocaleUpperCase()));
22
15
  };
23
- exports.DocStatus = DocStatus;
24
16
  //# sourceMappingURL=DocStatus.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocStatus.js","names":["_react","_interopRequireDefault","require","_components","_runIt","_DocMethodSummary","obj","__esModule","default","DocStatus","_ref","method","createElement","Tooltip","content","pickTooltipContent","status","MethodBadge","type","titleStatus","toLocaleUpperCase","exports"],"sources":["../../../../src/components/DocStatus/DocStatus.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 from 'react'\nimport { Tooltip } from '@looker/components'\nimport { MethodBadge } from '@looker/run-it'\nimport type { IMethod } from '@looker/sdk-codegen'\n\nimport { pickTooltipContent } from '../DocMethodSummary'\n\ninterface DocStatusProps {\n method: IMethod\n}\n\n/**\n * Renders a status badge with a tooltip\n */\nexport const DocStatus: FC<DocStatusProps> = ({ method }) => (\n <Tooltip content={pickTooltipContent(method.status)}>\n <MethodBadge type={method.status} titleStatus>\n {method.status.toLocaleUpperCase()}\n </MethodBadge>\n </Tooltip>\n)\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAGA,IAAAG,iBAAA,GAAAH,OAAA;AAAwD,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AASjD,IAAMG,SAA6B,GAAGC,IAAA;EAAA,IAAC;IAAEC;EAAO,CAAC,GAAAD,IAAA;EAAA,OACtDV,MAAA,CAAAQ,OAAA,CAAAI,aAAA,CAACT,WAAA,CAAAU,OAAO;IAACC,OAAO,EAAE,IAAAC,oCAAkB,EAACJ,MAAM,CAACK,MAAM;EAAE,GAClDhB,MAAA,CAAAQ,OAAA,CAAAI,aAAA,CAACR,MAAA,CAAAa,WAAW;IAACC,IAAI,EAAEP,MAAM,CAACK,MAAO;IAACG,WAAW;EAAA,GAC1CR,MAAM,CAACK,MAAM,CAACI,iBAAiB,EAAE,CACtB,CACN;AAAA,CACX;AAAAC,OAAA,CAAAZ,SAAA,GAAAA,SAAA"}
1
+ {"version":3,"file":"DocStatus.js","names":["React","Tooltip","MethodBadge","pickTooltipContent","DocStatus","_ref","method","createElement","content","status","type","titleStatus","toLocaleUpperCase"],"sources":["../../../../src/components/DocStatus/DocStatus.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 from 'react'\nimport { Tooltip } from '@looker/components'\nimport { MethodBadge } from '@looker/run-it'\nimport type { IMethod } from '@looker/sdk-codegen'\n\nimport { pickTooltipContent } from '../DocMethodSummary'\n\ninterface DocStatusProps {\n method: IMethod\n}\n\n/**\n * Renders a status badge with a tooltip\n */\nexport const DocStatus: FC<DocStatusProps> = ({ method }) => (\n <Tooltip content={pickTooltipContent(method.status)}>\n <MethodBadge type={method.status} titleStatus>\n {method.status.toLocaleUpperCase()}\n </MethodBadge>\n </Tooltip>\n)\n"],"mappings":"AA0BA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,WAAW,QAAQ,gBAAgB;AAG5C,SAASC,kBAAkB,QAAQ,qBAAqB;AASxD,OAAO,IAAMC,SAA6B,GAAGC,IAAA;EAAA,IAAC;IAAEC;EAAO,CAAC,GAAAD,IAAA;EAAA,OACtDL,KAAA,CAAAO,aAAA,CAACN,OAAO;IAACO,OAAO,EAAEL,kBAAkB,CAACG,MAAM,CAACG,MAAM;EAAE,GAClDT,KAAA,CAAAO,aAAA,CAACL,WAAW;IAACQ,IAAI,EAAEJ,MAAM,CAACG,MAAO;IAACE,WAAW;EAAA,GAC1CL,MAAM,CAACG,MAAM,CAACG,iBAAiB,CAAC,CACtB,CACN,CAAC;AAAA,CACX"}
@@ -1,13 +1,2 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "DocStatus", {
7
- enumerable: true,
8
- get: function get() {
9
- return _DocStatus.DocStatus;
10
- }
11
- });
12
- var _DocStatus = require("./DocStatus");
1
+ export { DocStatus } from './DocStatus';
13
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_DocStatus","require"],"sources":["../../../../src/components/DocStatus/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 { DocStatus } from './DocStatus'\n"],"mappings":";;;;;;;;;;;AAyBA,IAAAA,UAAA,GAAAC,OAAA"}
1
+ {"version":3,"file":"index.js","names":["DocStatus"],"sources":["../../../../src/components/DocStatus/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 { DocStatus } from './DocStatus'\n"],"mappings":"AAyBA,SAASA,SAAS,QAAQ,aAAa"}
@@ -1,15 +1,7 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DocTitle = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _runIt = require("@looker/run-it");
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
11
- var DocTitle = props => _react.default.createElement(_runIt.RunItHeading, _extends({
2
+ import React from 'react';
3
+ import { RunItHeading } from '@looker/run-it';
4
+ export var DocTitle = props => React.createElement(RunItHeading, _extends({
12
5
  fontSize: "xxxlarge"
13
6
  }, props));
14
- exports.DocTitle = DocTitle;
15
7
  //# sourceMappingURL=DocTitle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocTitle.js","names":["_react","_interopRequireDefault","require","_runIt","obj","__esModule","default","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","DocTitle","props","createElement","RunItHeading","fontSize","exports"],"sources":["../../../../src/components/DocTitle/DocTitle.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 from 'react'\nimport { RunItHeading } from '@looker/run-it'\n\nexport const DocTitle: FC = (props) => (\n <RunItHeading fontSize=\"xxxlarge\" {...props} />\n)\n"],"mappings":";;;;;;AA2BA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAA6C,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,SAAA,IAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,GAAAF,SAAA,CAAAD,CAAA,YAAAI,GAAA,IAAAD,MAAA,QAAAP,MAAA,CAAAS,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAJ,MAAA,EAAAC,GAAA,KAAAL,MAAA,CAAAK,GAAA,IAAAD,MAAA,CAAAC,GAAA,gBAAAL,MAAA,YAAAJ,QAAA,CAAAa,KAAA,OAAAP,SAAA;AAEtC,IAAMQ,QAAY,GAAIC,KAAK,IAChCtB,MAAA,CAAAM,OAAA,CAAAiB,aAAA,CAACpB,MAAA,CAAAqB,YAAY,EAAAjB,QAAA;EAACkB,QAAQ,EAAC;AAAU,GAAKH,KAAK,EAC5C;AAAAI,OAAA,CAAAL,QAAA,GAAAA,QAAA"}
1
+ {"version":3,"file":"DocTitle.js","names":["React","RunItHeading","DocTitle","props","createElement","_extends","fontSize"],"sources":["../../../../src/components/DocTitle/DocTitle.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 from 'react'\nimport { RunItHeading } from '@looker/run-it'\n\nexport const DocTitle: FC = (props) => (\n <RunItHeading fontSize=\"xxxlarge\" {...props} />\n)\n"],"mappings":";AA2BA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,YAAY,QAAQ,gBAAgB;AAE7C,OAAO,IAAMC,QAAY,GAAIC,KAAK,IAChCH,KAAA,CAAAI,aAAA,CAACH,YAAY,EAAAI,QAAA;EAACC,QAAQ,EAAC;AAAU,GAAKH,KAAK,CAAG,CAC/C"}
@@ -1,13 +1,2 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "DocTitle", {
7
- enumerable: true,
8
- get: function get() {
9
- return _DocTitle.DocTitle;
10
- }
11
- });
12
- var _DocTitle = require("./DocTitle");
1
+ export { DocTitle } from './DocTitle';
13
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_DocTitle","require"],"sources":["../../../../src/components/DocTitle/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 { DocTitle } from './DocTitle'\n"],"mappings":";;;;;;;;;;;AAyBA,IAAAA,SAAA,GAAAC,OAAA"}
1
+ {"version":3,"file":"index.js","names":["DocTitle"],"sources":["../../../../src/components/DocTitle/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 { DocTitle } from './DocTitle'\n"],"mappings":"AAyBA,SAASA,QAAQ,QAAQ,YAAY"}
@@ -1,44 +1,36 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DocTypeSummary = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _components = require("@looker/components");
9
- var _runIt = require("@looker/run-it");
10
- var _components2 = require("../../components");
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1
+ import React from 'react';
2
+ import { Card, CardContent, Flex, Space } from '@looker/components';
3
+ import { MethodBadge, RunItHeading } from '@looker/run-it';
4
+ import { DocSummaryStatus } from '../../components';
12
5
  var typeDescription = type => {
13
6
  if (type.description) return type.description;
14
7
  return "".concat(Object.entries(type.properties).length, " properties");
15
8
  };
16
- var DocTypeSummary = _ref => {
9
+ export var DocTypeSummary = _ref => {
17
10
  var {
18
11
  type
19
12
  } = _ref;
20
- return _react.default.createElement(_components.Card, {
13
+ return React.createElement(Card, {
21
14
  maxWidth: "50rem",
22
15
  border: true
23
- }, _react.default.createElement(_components.CardContent, null, _react.default.createElement(_components.Space, {
16
+ }, React.createElement(CardContent, null, React.createElement(Space, {
24
17
  align: "start",
25
18
  between: true
26
- }, _react.default.createElement(_runIt.MethodBadge, {
19
+ }, React.createElement(MethodBadge, {
27
20
  type: type.metaType.toString(),
28
21
  textAlign: "center",
29
22
  minWidth: "3.7625rem"
30
- }, type.metaType.toString().toUpperCase()), _react.default.createElement(_components.Flex, {
23
+ }, type.metaType.toString().toUpperCase()), React.createElement(Flex, {
31
24
  alignItems: "start",
32
25
  flexDirection: "column",
33
26
  flex: "1",
34
27
  mx: "small"
35
- }, _react.default.createElement(_runIt.RunItHeading, {
28
+ }, React.createElement(RunItHeading, {
36
29
  as: "h3",
37
30
  mb: "0",
38
31
  pt: "0"
39
- }, type.title || type.jsonName), _react.default.createElement(_components.Space, null, typeDescription(type))), _react.default.createElement(_components2.DocSummaryStatus, {
32
+ }, type.title || type.jsonName), React.createElement(Space, null, typeDescription(type))), React.createElement(DocSummaryStatus, {
40
33
  status: type.status
41
34
  }))));
42
35
  };
43
- exports.DocTypeSummary = DocTypeSummary;
44
36
  //# sourceMappingURL=DocTypeSummary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocTypeSummary.js","names":["_react","_interopRequireDefault","require","_components","_runIt","_components2","obj","__esModule","default","typeDescription","type","description","concat","Object","entries","properties","length","DocTypeSummary","_ref","createElement","Card","maxWidth","border","CardContent","Space","align","between","MethodBadge","metaType","toString","textAlign","minWidth","toUpperCase","Flex","alignItems","flexDirection","flex","mx","RunItHeading","as","mb","pt","title","jsonName","DocSummaryStatus","status","exports"],"sources":["../../../../src/components/DocTypeSummary/DocTypeSummary.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 from 'react'\nimport { Card, CardContent, Flex, Space } from '@looker/components'\nimport type { IType } from '@looker/sdk-codegen'\nimport { MethodBadge, RunItHeading } from '@looker/run-it'\nimport { DocSummaryStatus } from '../../components'\n\ninterface DocTypeSummaryProps {\n type: IType\n}\n\nconst typeDescription = (type: IType) => {\n if (type.description) return type.description\n return `${Object.entries(type.properties).length} properties`\n}\n\nexport const DocTypeSummary: FC<DocTypeSummaryProps> = ({ type }) => (\n <Card maxWidth=\"50rem\" border>\n <CardContent>\n <Space align=\"start\" between>\n <MethodBadge\n type={type.metaType.toString()}\n textAlign=\"center\"\n minWidth=\"3.7625rem\"\n >\n {type.metaType.toString().toUpperCase()}\n </MethodBadge>\n <Flex alignItems=\"start\" flexDirection=\"column\" flex=\"1\" mx=\"small\">\n <RunItHeading as=\"h3\" mb=\"0\" pt=\"0\">\n {type.title || type.jsonName}\n </RunItHeading>\n <Space>{typeDescription(type)}</Space>\n </Flex>\n <DocSummaryStatus status={type.status} />\n </Space>\n </CardContent>\n </Card>\n)\n"],"mappings":";;;;;;AA2BA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAAmD,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAMnD,IAAMG,eAAe,GAAIC,IAAW,IAAK;EACvC,IAAIA,IAAI,CAACC,WAAW,EAAE,OAAOD,IAAI,CAACC,WAAW;EAC7C,UAAAC,MAAA,CAAUC,MAAM,CAACC,OAAO,CAACJ,IAAI,CAACK,UAAU,CAAC,CAACC,MAAM;AAClD,CAAC;AAEM,IAAMC,cAAuC,GAAGC,IAAA;EAAA,IAAC;IAAER;EAAK,CAAC,GAAAQ,IAAA;EAAA,OAC9DlB,MAAA,CAAAQ,OAAA,CAAAW,aAAA,CAAChB,WAAA,CAAAiB,IAAI;IAACC,QAAQ,EAAC,OAAO;IAACC,MAAM;EAAA,GAC3BtB,MAAA,CAAAQ,OAAA,CAAAW,aAAA,CAAChB,WAAA,CAAAoB,WAAW,QACVvB,MAAA,CAAAQ,OAAA,CAAAW,aAAA,CAAChB,WAAA,CAAAqB,KAAK;IAACC,KAAK,EAAC,OAAO;IAACC,OAAO;EAAA,GAC1B1B,MAAA,CAAAQ,OAAA,CAAAW,aAAA,CAACf,MAAA,CAAAuB,WAAW;IACVjB,IAAI,EAAEA,IAAI,CAACkB,QAAQ,CAACC,QAAQ,EAAG;IAC/BC,SAAS,EAAC,QAAQ;IAClBC,QAAQ,EAAC;EAAW,GAEnBrB,IAAI,CAACkB,QAAQ,CAACC,QAAQ,EAAE,CAACG,WAAW,EAAE,CAC3B,EACdhC,MAAA,CAAAQ,OAAA,CAAAW,aAAA,CAAChB,WAAA,CAAA8B,IAAI;IAACC,UAAU,EAAC,OAAO;IAACC,aAAa,EAAC,QAAQ;IAACC,IAAI,EAAC,GAAG;IAACC,EAAE,EAAC;EAAO,GACjErC,MAAA,CAAAQ,OAAA,CAAAW,aAAA,CAACf,MAAA,CAAAkC,YAAY;IAACC,EAAE,EAAC,IAAI;IAACC,EAAE,EAAC,GAAG;IAACC,EAAE,EAAC;EAAG,GAChC/B,IAAI,CAACgC,KAAK,IAAIhC,IAAI,CAACiC,QAAQ,CACf,EACf3C,MAAA,CAAAQ,OAAA,CAAAW,aAAA,CAAChB,WAAA,CAAAqB,KAAK,QAAEf,eAAe,CAACC,IAAI,CAAC,CAAS,CACjC,EACPV,MAAA,CAAAQ,OAAA,CAAAW,aAAA,CAACd,YAAA,CAAAuC,gBAAgB;IAACC,MAAM,EAAEnC,IAAI,CAACmC;EAAO,EAAG,CACnC,CACI,CACT;AAAA,CACR;AAAAC,OAAA,CAAA7B,cAAA,GAAAA,cAAA"}
1
+ {"version":3,"file":"DocTypeSummary.js","names":["React","Card","CardContent","Flex","Space","MethodBadge","RunItHeading","DocSummaryStatus","typeDescription","type","description","concat","Object","entries","properties","length","DocTypeSummary","_ref","createElement","maxWidth","border","align","between","metaType","toString","textAlign","minWidth","toUpperCase","alignItems","flexDirection","flex","mx","as","mb","pt","title","jsonName","status"],"sources":["../../../../src/components/DocTypeSummary/DocTypeSummary.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 from 'react'\nimport { Card, CardContent, Flex, Space } from '@looker/components'\nimport type { IType } from '@looker/sdk-codegen'\nimport { MethodBadge, RunItHeading } from '@looker/run-it'\nimport { DocSummaryStatus } from '../../components'\n\ninterface DocTypeSummaryProps {\n type: IType\n}\n\nconst typeDescription = (type: IType) => {\n if (type.description) return type.description\n return `${Object.entries(type.properties).length} properties`\n}\n\nexport const DocTypeSummary: FC<DocTypeSummaryProps> = ({ type }) => (\n <Card maxWidth=\"50rem\" border>\n <CardContent>\n <Space align=\"start\" between>\n <MethodBadge\n type={type.metaType.toString()}\n textAlign=\"center\"\n minWidth=\"3.7625rem\"\n >\n {type.metaType.toString().toUpperCase()}\n </MethodBadge>\n <Flex alignItems=\"start\" flexDirection=\"column\" flex=\"1\" mx=\"small\">\n <RunItHeading as=\"h3\" mb=\"0\" pt=\"0\">\n {type.title || type.jsonName}\n </RunItHeading>\n <Space>{typeDescription(type)}</Space>\n </Flex>\n <DocSummaryStatus status={type.status} />\n </Space>\n </CardContent>\n </Card>\n)\n"],"mappings":"AA2BA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,WAAW,EAAEC,IAAI,EAAEC,KAAK,QAAQ,oBAAoB;AAEnE,SAASC,WAAW,EAAEC,YAAY,QAAQ,gBAAgB;AAC1D,SAASC,gBAAgB,QAAQ,kBAAkB;AAMnD,IAAMC,eAAe,GAAIC,IAAW,IAAK;EACvC,IAAIA,IAAI,CAACC,WAAW,EAAE,OAAOD,IAAI,CAACC,WAAW;EAC7C,UAAAC,MAAA,CAAUC,MAAM,CAACC,OAAO,CAACJ,IAAI,CAACK,UAAU,CAAC,CAACC,MAAM;AAClD,CAAC;AAED,OAAO,IAAMC,cAAuC,GAAGC,IAAA;EAAA,IAAC;IAAER;EAAK,CAAC,GAAAQ,IAAA;EAAA,OAC9DjB,KAAA,CAAAkB,aAAA,CAACjB,IAAI;IAACkB,QAAQ,EAAC,OAAO;IAACC,MAAM;EAAA,GAC3BpB,KAAA,CAAAkB,aAAA,CAAChB,WAAW,QACVF,KAAA,CAAAkB,aAAA,CAACd,KAAK;IAACiB,KAAK,EAAC,OAAO;IAACC,OAAO;EAAA,GAC1BtB,KAAA,CAAAkB,aAAA,CAACb,WAAW;IACVI,IAAI,EAAEA,IAAI,CAACc,QAAQ,CAACC,QAAQ,CAAC,CAAE;IAC/BC,SAAS,EAAC,QAAQ;IAClBC,QAAQ,EAAC;EAAW,GAEnBjB,IAAI,CAACc,QAAQ,CAACC,QAAQ,CAAC,CAAC,CAACG,WAAW,CAAC,CAC3B,CAAC,EACd3B,KAAA,CAAAkB,aAAA,CAACf,IAAI;IAACyB,UAAU,EAAC,OAAO;IAACC,aAAa,EAAC,QAAQ;IAACC,IAAI,EAAC,GAAG;IAACC,EAAE,EAAC;EAAO,GACjE/B,KAAA,CAAAkB,aAAA,CAACZ,YAAY;IAAC0B,EAAE,EAAC,IAAI;IAACC,EAAE,EAAC,GAAG;IAACC,EAAE,EAAC;EAAG,GAChCzB,IAAI,CAAC0B,KAAK,IAAI1B,IAAI,CAAC2B,QACR,CAAC,EACfpC,KAAA,CAAAkB,aAAA,CAACd,KAAK,QAAEI,eAAe,CAACC,IAAI,CAAS,CACjC,CAAC,EACPT,KAAA,CAAAkB,aAAA,CAACX,gBAAgB;IAAC8B,MAAM,EAAE5B,IAAI,CAAC4B;EAAO,CAAE,CACnC,CACI,CACT,CAAC;AAAA,CACR"}
@@ -1,13 +1,2 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "DocTypeSummary", {
7
- enumerable: true,
8
- get: function get() {
9
- return _DocTypeSummary.DocTypeSummary;
10
- }
11
- });
12
- var _DocTypeSummary = require("./DocTypeSummary");
1
+ export { DocTypeSummary } from './DocTypeSummary';
13
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_DocTypeSummary","require"],"sources":["../../../../src/components/DocTypeSummary/index.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 */\nexport { DocTypeSummary } from './DocTypeSummary'\n"],"mappings":";;;;;;;;;;;AAyBA,IAAAA,eAAA,GAAAC,OAAA"}
1
+ {"version":3,"file":"index.js","names":["DocTypeSummary"],"sources":["../../../../src/components/DocTypeSummary/index.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 */\nexport { DocTypeSummary } from './DocTypeSummary'\n"],"mappings":"AAyBA,SAASA,cAAc,QAAQ,kBAAkB"}
@@ -1,14 +1,6 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ErrorBoundary = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _SomethingWentWrong = require("./components/SomethingWentWrong");
9
- 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); }
10
- 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; }
11
- class ErrorBoundary extends _react.Component {
1
+ import React, { Component } from 'react';
2
+ import { SomethingWentWrong } from './components/SomethingWentWrong';
3
+ export class ErrorBoundary extends Component {
12
4
  constructor(props) {
13
5
  super(props);
14
6
  this.state = {
@@ -36,13 +28,12 @@ class ErrorBoundary extends _react.Component {
36
28
  children
37
29
  } = this.props;
38
30
  if (hasError) {
39
- return _react.default.createElement(_SomethingWentWrong.SomethingWentWrong, {
31
+ return React.createElement(SomethingWentWrong, {
40
32
  header: "Uh oh! Something went wrong!",
41
33
  actionMessage: "Try refreshing the page to correct the problem."
42
34
  });
43
35
  }
44
- return children || _react.default.createElement(_react.default.Fragment, null);
36
+ return children || React.createElement(React.Fragment, null);
45
37
  }
46
38
  }
47
- exports.ErrorBoundary = ErrorBoundary;
48
39
  //# sourceMappingURL=ErrorBoundary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary.js","names":["_react","_interopRequireWildcard","require","_SomethingWentWrong","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ErrorBoundary","Component","constructor","props","state","hasError","errorMessage","Error","getDerivedStateFromError","error","componentDidCatch","errorInfo","logError","componentStack","render","children","createElement","SomethingWentWrong","header","actionMessage","Fragment","exports"],"sources":["../../../../src/components/ErrorBoundary/ErrorBoundary.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 React, { Component } from 'react'\nimport type { ReactNode, ErrorInfo } from 'react'\nimport { SomethingWentWrong } from './components/SomethingWentWrong'\n\ninterface ErrorBoundaryProps {\n children: ReactNode\n logError: (error: Error, componentStack: string) => void\n}\n\ninterface ErrorBoundaryState {\n hasError: boolean\n errorMessage: Error\n}\n\nexport class ErrorBoundary extends Component<\n ErrorBoundaryProps,\n ErrorBoundaryState\n> {\n constructor(props: ErrorBoundaryProps) {\n super(props)\n this.state = { hasError: false, errorMessage: new Error('') }\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, errorMessage: error }\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n const { logError } = this.props\n logError(error, errorInfo.componentStack)\n }\n\n render() {\n const { hasError } = this.state\n const { children } = this.props\n if (hasError) {\n return (\n <SomethingWentWrong\n header=\"Uh oh! Something went wrong!\"\n actionMessage=\"Try refreshing the page to correct the problem.\"\n />\n )\n }\n return children || <></>\n }\n}\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAD,OAAA;AAAoE,SAAAE,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,SAAAJ,wBAAAQ,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,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA;AAY7D,MAAMW,aAAa,SAASC,gBAAS,CAG1C;EACAC,WAAWA,CAACC,KAAyB,EAAE;IACrC,KAAK,CAACA,KAAK,CAAC;IACZ,IAAI,CAACC,KAAK,GAAG;MAAEC,QAAQ,EAAE,KAAK;MAAEC,YAAY,EAAE,IAAIC,KAAK,CAAC,EAAE;IAAE,CAAC;EAC/D;EAEA,OAAOC,wBAAwBA,CAACC,KAAY,EAAE;IAC5C,OAAO;MAAEJ,QAAQ,EAAE,IAAI;MAAEC,YAAY,EAAEG;IAAM,CAAC;EAChD;EAEAC,iBAAiBA,CAACD,KAAY,EAAEE,SAAoB,EAAE;IACpD,IAAM;MAAEC;IAAS,CAAC,GAAG,IAAI,CAACT,KAAK;IAC/BS,QAAQ,CAACH,KAAK,EAAEE,SAAS,CAACE,cAAc,CAAC;EAC3C;EAEAC,MAAMA,CAAA,EAAG;IACP,IAAM;MAAET;IAAS,CAAC,GAAG,IAAI,CAACD,KAAK;IAC/B,IAAM;MAAEW;IAAS,CAAC,GAAG,IAAI,CAACZ,KAAK;IAC/B,IAAIE,QAAQ,EAAE;MACZ,OACE/B,MAAA,CAAAW,OAAA,CAAA+B,aAAA,CAACvC,mBAAA,CAAAwC,kBAAkB;QACjBC,MAAM,EAAC,8BAA8B;QACrCC,aAAa,EAAC;MAAiD,EAC/D;IAEN;IACA,OAAOJ,QAAQ,IAAIzC,MAAA,CAAAW,OAAA,CAAA+B,aAAA,CAAA1C,MAAA,CAAAW,OAAA,CAAAmC,QAAA,OAAK;EAC1B;AACF;AAACC,OAAA,CAAArB,aAAA,GAAAA,aAAA"}
1
+ {"version":3,"file":"ErrorBoundary.js","names":["React","Component","SomethingWentWrong","ErrorBoundary","constructor","props","state","hasError","errorMessage","Error","getDerivedStateFromError","error","componentDidCatch","errorInfo","logError","componentStack","render","children","createElement","header","actionMessage","Fragment"],"sources":["../../../../src/components/ErrorBoundary/ErrorBoundary.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 React, { Component } from 'react'\nimport type { ReactNode, ErrorInfo } from 'react'\nimport { SomethingWentWrong } from './components/SomethingWentWrong'\n\ninterface ErrorBoundaryProps {\n children: ReactNode\n logError: (error: Error, componentStack: string) => void\n}\n\ninterface ErrorBoundaryState {\n hasError: boolean\n errorMessage: Error\n}\n\nexport class ErrorBoundary extends Component<\n ErrorBoundaryProps,\n ErrorBoundaryState\n> {\n constructor(props: ErrorBoundaryProps) {\n super(props)\n this.state = { hasError: false, errorMessage: new Error('') }\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, errorMessage: error }\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n const { logError } = this.props\n logError(error, errorInfo.componentStack)\n }\n\n render() {\n const { hasError } = this.state\n const { children } = this.props\n if (hasError) {\n return (\n <SomethingWentWrong\n header=\"Uh oh! Something went wrong!\"\n actionMessage=\"Try refreshing the page to correct the problem.\"\n />\n )\n }\n return children || <></>\n }\n}\n"],"mappings":"AA0BA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AAExC,SAASC,kBAAkB,QAAQ,iCAAiC;AAYpE,OAAO,MAAMC,aAAa,SAASF,SAAS,CAG1C;EACAG,WAAWA,CAACC,KAAyB,EAAE;IACrC,KAAK,CAACA,KAAK,CAAC;IACZ,IAAI,CAACC,KAAK,GAAG;MAAEC,QAAQ,EAAE,KAAK;MAAEC,YAAY,EAAE,IAAIC,KAAK,CAAC,EAAE;IAAE,CAAC;EAC/D;EAEA,OAAOC,wBAAwBA,CAACC,KAAY,EAAE;IAC5C,OAAO;MAAEJ,QAAQ,EAAE,IAAI;MAAEC,YAAY,EAAEG;IAAM,CAAC;EAChD;EAEAC,iBAAiBA,CAACD,KAAY,EAAEE,SAAoB,EAAE;IACpD,IAAM;MAAEC;IAAS,CAAC,GAAG,IAAI,CAACT,KAAK;IAC/BS,QAAQ,CAACH,KAAK,EAAEE,SAAS,CAACE,cAAc,CAAC;EAC3C;EAEAC,MAAMA,CAAA,EAAG;IACP,IAAM;MAAET;IAAS,CAAC,GAAG,IAAI,CAACD,KAAK;IAC/B,IAAM;MAAEW;IAAS,CAAC,GAAG,IAAI,CAACZ,KAAK;IAC/B,IAAIE,QAAQ,EAAE;MACZ,OACEP,KAAA,CAAAkB,aAAA,CAAChB,kBAAkB;QACjBiB,MAAM,EAAC,8BAA8B;QACrCC,aAAa,EAAC;MAAiD,CAChE,CAAC;IAEN;IACA,OAAOH,QAAQ,IAAIjB,KAAA,CAAAkB,aAAA,CAAAlB,KAAA,CAAAqB,QAAA,MAAI,CAAC;EAC1B;AACF"}
@@ -1,36 +1,28 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SomethingWentWrong = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _components = require("@looker/components");
9
- var _styledComponents = _interopRequireDefault(require("styled-components"));
10
- var _components2 = require("./components");
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- var SomethingWentWrong = _ref => {
1
+ import React from 'react';
2
+ import { Box, Flex } from '@looker/components';
3
+ import styled from 'styled-components';
4
+ import { SomethingWentWrongGraphic } from './components';
5
+ export var SomethingWentWrong = _ref => {
13
6
  var {
14
7
  header,
15
8
  actionMessage,
16
9
  altText
17
10
  } = _ref;
18
- return _react.default.createElement(OuterFlex, null, _react.default.createElement(_components2.SomethingWentWrongGraphic, {
11
+ return React.createElement(OuterFlex, null, React.createElement(SomethingWentWrongGraphic, {
19
12
  altText: altText
20
- }), _react.default.createElement(HeaderText, null, header), _react.default.createElement(_components.Box, {
13
+ }), React.createElement(HeaderText, null, header), React.createElement(Box, {
21
14
  width: 520
22
- }, _react.default.createElement(ActionMessage, null, actionMessage)));
15
+ }, React.createElement(ActionMessage, null, actionMessage)));
23
16
  };
24
- exports.SomethingWentWrong = SomethingWentWrong;
25
- var OuterFlex = (0, _styledComponents.default)(_components.Flex).withConfig({
17
+ var OuterFlex = styled(Flex).withConfig({
26
18
  displayName: "SomethingWentWrong__OuterFlex",
27
19
  componentId: "sc-1xvmu4u-0"
28
20
  })(["width:100%;margin-top:", ";justify-content:center;flex-direction:column;align-items:center;"], props => props.theme.space.xxxxlarge);
29
- var HeaderText = _styledComponents.default.h1.withConfig({
21
+ var HeaderText = styled.h1.withConfig({
30
22
  displayName: "SomethingWentWrong__HeaderText",
31
23
  componentId: "sc-1xvmu4u-1"
32
24
  })(["margin-top:", ";text-align:center;font-family:", ";font-weight:", ";font-size:", ";color:", ";"], props => props.theme.space.large, props => props.theme.fonts.brand, props => props.theme.fontWeights.normal, props => props.theme.fontSizes.xxxxlarge, props => props.theme.colors.text5);
33
- var ActionMessage = _styledComponents.default.h3.withConfig({
25
+ var ActionMessage = styled.h3.withConfig({
34
26
  displayName: "SomethingWentWrong__ActionMessage",
35
27
  componentId: "sc-1xvmu4u-2"
36
28
  })(["margin-top:", ";text-align:center;font-family:", ";font-weight:", ";font-size:", ";color:", ";"], props => props.theme.space.small, props => props.theme.fonts.brand, props => props.theme.fontWeights.normal, props => props.theme.fontSizes.large, props => props.theme.colors.text3);