@looker/api-explorer 0.9.18 → 0.9.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +141 -0
- package/e2e/e2e.spec.ts +242 -0
- package/{src/reducers/search/reducer.ts → e2e/helpers.ts} +21 -36
- package/{src/reducers/search/actions.ts → jest-puppeteer.config.js} +17 -15
- package/jest.config.js +2 -0
- package/lib/ApiExplorer.d.ts +8 -11
- package/lib/ApiExplorer.js +93 -71
- package/lib/ApiExplorer.js.map +1 -1
- package/lib/App.d.ts +1 -0
- package/lib/App.js +29 -0
- package/lib/App.js.map +1 -0
- package/lib/StandaloneApiExplorer.d.ts +1 -1
- package/lib/StandaloneApiExplorer.js +46 -25
- package/lib/StandaloneApiExplorer.js.map +1 -1
- package/lib/components/DocActivityType/DocActivityType.d.ts +2 -2
- package/lib/components/DocActivityType/DocActivityType.js.map +1 -1
- package/lib/components/DocCode/DocCode.d.ts +1 -1
- package/lib/components/DocCode/DocCode.js +6 -10
- package/lib/components/DocCode/DocCode.js.map +1 -1
- package/lib/components/DocMarkdown/DocMarkdown.d.ts +1 -1
- package/lib/components/DocMarkdown/DocMarkdown.js +13 -15
- package/lib/components/DocMarkdown/DocMarkdown.js.map +1 -1
- package/lib/components/DocMethodSummary/DocMethodSummary.d.ts +2 -2
- package/lib/components/DocMethodSummary/DocMethodSummary.js +3 -6
- package/lib/components/DocMethodSummary/DocMethodSummary.js.map +1 -1
- package/lib/components/DocMethodSummary/DocSummaryStatus.d.ts +2 -3
- package/lib/components/DocMethodSummary/DocSummaryStatus.js +3 -3
- package/lib/components/DocMethodSummary/DocSummaryStatus.js.map +1 -1
- package/lib/components/DocMethodSummary/index.d.ts +1 -0
- package/lib/components/DocMethodSummary/index.js +8 -0
- package/lib/components/DocMethodSummary/index.js.map +1 -1
- package/lib/components/DocMethodSummary/utils.d.ts +2 -1
- package/lib/components/DocMethodSummary/utils.js +24 -15
- package/lib/components/DocMethodSummary/utils.js.map +1 -1
- package/lib/components/DocPseudo/DocParam.d.ts +2 -2
- package/lib/components/DocPseudo/DocParam.js.map +1 -1
- package/lib/components/DocPseudo/DocParams.d.ts +2 -2
- package/lib/components/DocPseudo/DocParams.js.map +1 -1
- package/lib/components/DocPseudo/DocPrimaryResponse.d.ts +2 -2
- package/lib/components/DocPseudo/DocPrimaryResponse.js.map +1 -1
- package/lib/components/DocPseudo/DocPseudo.d.ts +2 -2
- package/lib/components/DocPseudo/DocPseudo.js.map +1 -1
- package/lib/components/DocRateLimited/DocRateLimited.d.ts +2 -2
- package/lib/components/DocRateLimited/DocRateLimited.js.map +1 -1
- package/lib/components/DocReferences/DocReferences.d.ts +2 -2
- package/lib/components/DocReferences/DocReferences.js +9 -13
- package/lib/components/DocReferences/DocReferences.js.map +1 -1
- package/lib/components/DocReferences/utils.d.ts +2 -2
- package/lib/components/DocReferences/utils.js +5 -31
- package/lib/components/DocReferences/utils.js.map +1 -1
- package/lib/components/DocResponses/DocResponseTypes.d.ts +3 -2
- package/lib/components/DocResponses/DocResponseTypes.js +3 -1
- package/lib/components/DocResponses/DocResponseTypes.js.map +1 -1
- package/lib/components/DocResponses/DocResponses.d.ts +3 -2
- package/lib/components/DocResponses/DocResponses.js +4 -2
- package/lib/components/DocResponses/DocResponses.js.map +1 -1
- package/lib/components/DocResponses/utils.d.ts +1 -1
- package/lib/components/DocResponses/utils.js.map +1 -1
- package/lib/components/DocSDKs/DocDeclarations.d.ts +2 -2
- package/lib/components/DocSDKs/DocDeclarations.js.map +1 -1
- package/lib/components/DocSDKs/DocSDKs.d.ts +2 -2
- package/lib/components/DocSDKs/DocSDKs.js +2 -4
- package/lib/components/DocSDKs/DocSDKs.js.map +1 -1
- package/lib/components/DocSDKs/utils.d.ts +1 -1
- package/lib/components/DocSDKs/utils.js.map +1 -1
- package/lib/components/DocSchema/DocSchema.d.ts +1 -1
- package/lib/components/DocSchema/DocSchema.js +2 -2
- package/lib/components/DocSchema/DocSchema.js.map +1 -1
- package/lib/components/DocSdkUsage/DocSdkExampleCell.d.ts +1 -1
- package/lib/components/DocSdkUsage/DocSdkExampleCell.js.map +1 -1
- package/lib/components/DocSdkUsage/DocSdkUsage.d.ts +2 -2
- package/lib/components/DocSdkUsage/DocSdkUsage.js +7 -10
- package/lib/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
- package/lib/components/DocSdkUsage/utils.d.ts +2 -2
- package/lib/components/DocSdkUsage/utils.js.map +1 -1
- package/lib/components/DocSource/DocSource.d.ts +2 -2
- package/lib/components/DocSource/DocSource.js +5 -7
- package/lib/components/DocSource/DocSource.js.map +1 -1
- package/lib/components/DocStatus/DocStatus.d.ts +2 -2
- package/lib/components/DocStatus/DocStatus.js.map +1 -1
- package/lib/components/DocTitle/DocTitle.d.ts +1 -1
- package/lib/components/DocTitle/DocTitle.js +2 -2
- package/lib/components/DocTitle/DocTitle.js.map +1 -1
- package/lib/components/DocTypeSummary/DocTypeSummary.d.ts +7 -0
- package/lib/components/DocTypeSummary/DocTypeSummary.js +52 -0
- package/lib/components/DocTypeSummary/DocTypeSummary.js.map +1 -0
- package/lib/components/DocTypeSummary/index.d.ts +1 -0
- package/lib/components/DocTypeSummary/index.js +14 -0
- package/lib/components/DocTypeSummary/index.js.map +1 -0
- package/lib/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/lib/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.d.ts +1 -1
- package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js +152 -8
- package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
- package/lib/components/ExploreType/ExploreProperty.d.ts +10 -7
- package/lib/components/ExploreType/ExploreProperty.js +14 -3
- package/lib/components/ExploreType/ExploreProperty.js.map +1 -1
- package/lib/components/ExploreType/ExploreType.d.ts +4 -2
- package/lib/components/ExploreType/ExploreType.js +9 -5
- package/lib/components/ExploreType/ExploreType.js.map +1 -1
- package/lib/components/ExploreType/exploreUtils.d.ts +2 -2
- package/lib/components/ExploreType/exploreUtils.js.map +1 -1
- package/lib/components/Header/Header.d.ts +5 -4
- package/lib/components/Header/Header.js +5 -2
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/index.d.ts +1 -1
- package/lib/components/Header/index.js +6 -0
- package/lib/components/Header/index.js.map +1 -1
- package/lib/components/SelectorContainer/ApiSpecSelector.d.ts +3 -3
- package/lib/components/SelectorContainer/ApiSpecSelector.js +3 -1
- package/lib/components/SelectorContainer/ApiSpecSelector.js.map +1 -1
- package/lib/components/SelectorContainer/SdkLanguageSelector.d.ts +1 -1
- package/lib/components/SelectorContainer/SdkLanguageSelector.js +7 -17
- package/lib/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
- package/lib/components/SelectorContainer/SelectorContainer.d.ts +5 -4
- package/lib/components/SelectorContainer/SelectorContainer.js +11 -3
- package/lib/components/SelectorContainer/SelectorContainer.js.map +1 -1
- package/lib/components/SideNav/SearchMessage.d.ts +2 -2
- package/lib/components/SideNav/SearchMessage.js.map +1 -1
- package/lib/components/SideNav/SideNav.d.ts +3 -3
- package/lib/components/SideNav/SideNav.js +93 -56
- package/lib/components/SideNav/SideNav.js.map +1 -1
- package/lib/components/SideNav/SideNavMethodTags.d.ts +10 -0
- package/lib/components/SideNav/SideNavMethodTags.js +42 -0
- package/lib/components/SideNav/SideNavMethodTags.js.map +1 -0
- package/lib/components/SideNav/SideNavMethods.d.ts +5 -5
- package/lib/components/SideNav/SideNavMethods.js +37 -93
- package/lib/components/SideNav/SideNavMethods.js.map +1 -1
- package/lib/components/SideNav/SideNavTypeTags.d.ts +10 -0
- package/lib/components/SideNav/SideNavTypeTags.js +42 -0
- package/lib/components/SideNav/SideNavTypeTags.js.map +1 -0
- package/lib/components/SideNav/SideNavTypes.d.ts +8 -5
- package/lib/components/SideNav/SideNavTypes.js +83 -32
- package/lib/components/SideNav/SideNavTypes.js.map +1 -1
- package/lib/components/SideNav/searchUtils.d.ts +2 -2
- package/lib/components/SideNav/searchUtils.js +1 -1
- package/lib/components/SideNav/searchUtils.js.map +1 -1
- package/lib/components/common/Loader.d.ts +2 -2
- package/lib/components/common/Loader.js.map +1 -1
- package/lib/components/common/common.d.ts +2 -3
- package/lib/components/common/common.js +3 -15
- package/lib/components/common/common.js.map +1 -1
- package/lib/components/common/index.d.ts +2 -2
- package/lib/components/common/index.js +22 -18
- package/lib/components/common/index.js.map +1 -1
- package/lib/components/index.d.ts +5 -4
- package/lib/components/index.js +26 -12
- package/lib/components/index.js.map +1 -1
- package/lib/esm/ApiExplorer.js +97 -77
- package/lib/esm/ApiExplorer.js.map +1 -1
- package/lib/esm/App.js +19 -0
- package/lib/esm/App.js.map +1 -0
- package/lib/esm/StandaloneApiExplorer.js +46 -22
- package/lib/esm/StandaloneApiExplorer.js.map +1 -1
- package/lib/esm/components/DocActivityType/DocActivityType.js.map +1 -1
- package/lib/esm/components/DocCode/DocCode.js +5 -8
- package/lib/esm/components/DocCode/DocCode.js.map +1 -1
- package/lib/esm/components/DocMarkdown/DocMarkdown.js +10 -12
- package/lib/esm/components/DocMarkdown/DocMarkdown.js.map +1 -1
- package/lib/esm/components/DocMethodSummary/DocMethodSummary.js +4 -6
- package/lib/esm/components/DocMethodSummary/DocMethodSummary.js.map +1 -1
- package/lib/esm/components/DocMethodSummary/DocSummaryStatus.js +3 -3
- package/lib/esm/components/DocMethodSummary/DocSummaryStatus.js.map +1 -1
- package/lib/esm/components/DocMethodSummary/index.js +1 -0
- package/lib/esm/components/DocMethodSummary/index.js.map +1 -1
- package/lib/esm/components/DocMethodSummary/utils.js +24 -15
- package/lib/esm/components/DocMethodSummary/utils.js.map +1 -1
- package/lib/esm/components/DocPseudo/DocParam.js.map +1 -1
- package/lib/esm/components/DocPseudo/DocParams.js.map +1 -1
- package/lib/esm/components/DocPseudo/DocPrimaryResponse.js.map +1 -1
- package/lib/esm/components/DocPseudo/DocPseudo.js.map +1 -1
- package/lib/esm/components/DocRateLimited/DocRateLimited.js.map +1 -1
- package/lib/esm/components/DocReferences/DocReferences.js +6 -9
- package/lib/esm/components/DocReferences/DocReferences.js.map +1 -1
- package/lib/esm/components/DocReferences/utils.js +3 -26
- package/lib/esm/components/DocReferences/utils.js.map +1 -1
- package/lib/esm/components/DocResponses/DocResponseTypes.js +3 -1
- package/lib/esm/components/DocResponses/DocResponseTypes.js.map +1 -1
- package/lib/esm/components/DocResponses/DocResponses.js +3 -1
- package/lib/esm/components/DocResponses/DocResponses.js.map +1 -1
- package/lib/esm/components/DocResponses/utils.js.map +1 -1
- package/lib/esm/components/DocSDKs/DocDeclarations.js.map +1 -1
- package/lib/esm/components/DocSDKs/DocSDKs.js +3 -4
- package/lib/esm/components/DocSDKs/DocSDKs.js.map +1 -1
- package/lib/esm/components/DocSDKs/utils.js.map +1 -1
- package/lib/esm/components/DocSchema/DocSchema.js +1 -1
- package/lib/esm/components/DocSchema/DocSchema.js.map +1 -1
- package/lib/esm/components/DocSdkUsage/DocSdkExampleCell.js.map +1 -1
- package/lib/esm/components/DocSdkUsage/DocSdkUsage.js +7 -9
- package/lib/esm/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
- package/lib/esm/components/DocSdkUsage/utils.js.map +1 -1
- package/lib/esm/components/DocSource/DocSource.js +4 -5
- package/lib/esm/components/DocSource/DocSource.js.map +1 -1
- package/lib/esm/components/DocStatus/DocStatus.js.map +1 -1
- package/lib/esm/components/DocTitle/DocTitle.js +2 -2
- package/lib/esm/components/DocTitle/DocTitle.js.map +1 -1
- package/lib/esm/components/DocTypeSummary/DocTypeSummary.js +38 -0
- package/lib/esm/components/DocTypeSummary/DocTypeSummary.js.map +1 -0
- package/lib/esm/components/DocTypeSummary/index.js +2 -0
- package/lib/{state/action_creators.js.map → esm/components/DocTypeSummary/index.js.map} +1 -1
- package/lib/esm/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/lib/esm/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js +153 -6
- package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
- package/lib/esm/components/ExploreType/ExploreProperty.js +14 -3
- package/lib/esm/components/ExploreType/ExploreProperty.js.map +1 -1
- package/lib/esm/components/ExploreType/ExploreType.js +8 -4
- package/lib/esm/components/ExploreType/ExploreType.js.map +1 -1
- package/lib/esm/components/ExploreType/exploreUtils.js.map +1 -1
- package/lib/esm/components/Header/Header.js +3 -1
- package/lib/esm/components/Header/Header.js.map +1 -1
- package/lib/esm/components/Header/index.js +1 -1
- package/lib/esm/components/Header/index.js.map +1 -1
- package/lib/esm/components/SelectorContainer/ApiSpecSelector.js +4 -2
- package/lib/esm/components/SelectorContainer/ApiSpecSelector.js.map +1 -1
- package/lib/esm/components/SelectorContainer/SdkLanguageSelector.js +7 -12
- package/lib/esm/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
- package/lib/esm/components/SelectorContainer/SelectorContainer.js +11 -3
- package/lib/esm/components/SelectorContainer/SelectorContainer.js.map +1 -1
- package/lib/esm/components/SideNav/SearchMessage.js.map +1 -1
- package/lib/esm/components/SideNav/SideNav.js +95 -57
- package/lib/esm/components/SideNav/SideNav.js.map +1 -1
- package/lib/esm/components/SideNav/SideNavMethodTags.js +29 -0
- package/lib/esm/components/SideNav/SideNavMethodTags.js.map +1 -0
- package/lib/esm/components/SideNav/SideNavMethods.js +38 -96
- package/lib/esm/components/SideNav/SideNavMethods.js.map +1 -1
- package/lib/esm/components/SideNav/SideNavTypeTags.js +29 -0
- package/lib/esm/components/SideNav/SideNavTypeTags.js.map +1 -0
- package/lib/esm/components/SideNav/SideNavTypes.js +84 -33
- package/lib/esm/components/SideNav/SideNavTypes.js.map +1 -1
- package/lib/esm/components/SideNav/searchUtils.js +1 -1
- package/lib/esm/components/SideNav/searchUtils.js.map +1 -1
- package/lib/esm/components/common/Loader.js.map +1 -1
- package/lib/esm/components/common/common.js +3 -11
- package/lib/esm/components/common/common.js.map +1 -1
- package/lib/esm/components/common/index.js +2 -2
- package/lib/esm/components/common/index.js.map +1 -1
- package/lib/esm/components/index.js +5 -4
- package/lib/esm/components/index.js.map +1 -1
- package/lib/esm/index.js +4 -18
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/reducers/index.js +0 -1
- package/lib/esm/reducers/index.js.map +1 -1
- package/lib/esm/reducers/spec/actions.js.map +1 -1
- package/lib/esm/reducers/spec/reducer.js.map +1 -1
- package/lib/esm/reducers/spec/utils.js +17 -1
- package/lib/esm/reducers/spec/utils.js.map +1 -1
- package/lib/esm/routes/AppRouter.js +16 -14
- package/lib/esm/routes/AppRouter.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DiffScene.js +65 -11
- package/lib/esm/scenes/DiffScene/DiffScene.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/DiffBanner.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/DiffItem.js +15 -22
- package/lib/esm/scenes/DiffScene/DocDiff/DiffItem.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/DiffLegend.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/DocDiff.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/docDiffUtils.js.map +1 -1
- package/lib/esm/scenes/DiffScene/diffUtils.js.map +1 -1
- package/lib/esm/scenes/HomeScene/HomeScene.js.map +1 -1
- package/lib/esm/scenes/MethodScene/MethodScene.js +80 -29
- package/lib/esm/scenes/MethodScene/MethodScene.js.map +1 -1
- package/lib/esm/scenes/MethodScene/components/DocOperation.js.map +1 -1
- package/lib/esm/scenes/MethodScene/components/DocRequestBody.js +5 -2
- package/lib/esm/scenes/MethodScene/components/DocRequestBody.js.map +1 -1
- package/lib/esm/scenes/{TagScene/TagScene.js → MethodTagScene/MethodTagScene.js} +16 -11
- package/lib/esm/scenes/MethodTagScene/MethodTagScene.js.map +1 -0
- package/lib/esm/scenes/MethodTagScene/index.js +2 -0
- package/lib/{state/reducers.js.map → esm/scenes/MethodTagScene/index.js.map} +1 -1
- package/lib/esm/scenes/{TagScene → MethodTagScene}/utils.js +0 -0
- package/lib/esm/scenes/MethodTagScene/utils.js.map +1 -0
- package/lib/esm/scenes/TypeScene/TypeScene.js +14 -7
- package/lib/esm/scenes/TypeScene/TypeScene.js.map +1 -1
- package/lib/esm/scenes/TypeTagScene/TypeTagScene.js +57 -0
- package/lib/esm/scenes/TypeTagScene/TypeTagScene.js.map +1 -0
- package/lib/esm/scenes/TypeTagScene/index.js +2 -0
- package/lib/esm/scenes/TypeTagScene/index.js.map +1 -0
- package/lib/esm/scenes/TypeTagScene/utils.js +8 -0
- package/lib/esm/scenes/TypeTagScene/utils.js.map +1 -0
- package/lib/esm/scenes/index.js +2 -1
- package/lib/esm/scenes/index.js.map +1 -1
- package/lib/esm/state/index.js +2 -3
- package/lib/esm/state/index.js.map +1 -1
- package/lib/esm/state/lodes/index.js +3 -0
- package/lib/esm/state/lodes/index.js.map +1 -0
- package/lib/esm/state/lodes/sagas.js +25 -0
- package/lib/esm/state/lodes/sagas.js.map +1 -0
- package/lib/esm/state/lodes/selectors.js +5 -0
- package/lib/esm/state/lodes/selectors.js.map +1 -0
- package/lib/esm/state/lodes/slice.js +30 -0
- package/lib/esm/state/lodes/slice.js.map +1 -0
- package/lib/esm/state/settings/index.js +1 -1
- package/lib/esm/state/settings/index.js.map +1 -1
- package/lib/esm/state/settings/sagas.js +59 -0
- package/lib/esm/state/settings/sagas.js.map +1 -0
- package/lib/esm/state/settings/selectors.js +6 -1
- package/lib/esm/state/settings/selectors.js.map +1 -1
- package/lib/esm/state/settings/slice.js +50 -0
- package/lib/esm/state/settings/slice.js.map +1 -0
- package/lib/esm/state/store.js +13 -3
- package/lib/esm/state/store.js.map +1 -1
- package/lib/esm/test-utils/index.js +3 -4
- package/lib/esm/test-utils/index.js.map +1 -1
- package/lib/esm/test-utils/lodes.js +12 -0
- package/lib/esm/test-utils/lodes.js.map +1 -0
- package/lib/esm/test-utils/redux.js +30 -15
- package/lib/esm/test-utils/redux.js.map +1 -1
- package/lib/esm/test-utils/router.js.map +1 -1
- package/lib/esm/utils/index.js +1 -2
- package/lib/esm/utils/index.js.map +1 -1
- package/lib/esm/utils/lodeUtils.js +3 -7
- package/lib/esm/utils/lodeUtils.js.map +1 -1
- package/lib/esm/utils/path.js +32 -1
- package/lib/esm/utils/path.js.map +1 -1
- package/lib/index.d.ts +4 -1
- package/lib/index.js +52 -23
- package/lib/index.js.map +1 -1
- package/lib/reducers/index.d.ts +0 -1
- package/lib/reducers/index.js +0 -13
- package/lib/reducers/index.js.map +1 -1
- package/lib/reducers/spec/actions.d.ts +1 -1
- package/lib/reducers/spec/actions.js.map +1 -1
- package/lib/reducers/spec/reducer.d.ts +2 -2
- package/lib/reducers/spec/reducer.js.map +1 -1
- package/lib/reducers/spec/utils.d.ts +3 -3
- package/lib/reducers/spec/utils.js +18 -1
- package/lib/reducers/spec/utils.js.map +1 -1
- package/lib/routes/AppRouter.d.ts +6 -2
- package/lib/routes/AppRouter.js +15 -16
- package/lib/routes/AppRouter.js.map +1 -1
- package/lib/scenes/DiffScene/DiffScene.d.ts +2 -2
- package/lib/scenes/DiffScene/DiffScene.js +65 -11
- package/lib/scenes/DiffScene/DiffScene.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/DiffBanner.d.ts +2 -2
- package/lib/scenes/DiffScene/DocDiff/DiffBanner.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/DiffItem.d.ts +3 -3
- package/lib/scenes/DiffScene/DocDiff/DiffItem.js +13 -20
- package/lib/scenes/DiffScene/DocDiff/DiffItem.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/DiffLegend.d.ts +2 -2
- package/lib/scenes/DiffScene/DocDiff/DiffLegend.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/DocDiff.d.ts +2 -2
- package/lib/scenes/DiffScene/DocDiff/DocDiff.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/docDiffUtils.d.ts +1 -1
- package/lib/scenes/DiffScene/DocDiff/docDiffUtils.js.map +1 -1
- package/lib/scenes/DiffScene/diffUtils.d.ts +1 -1
- package/lib/scenes/DiffScene/diffUtils.js.map +1 -1
- package/lib/scenes/HomeScene/HomeScene.d.ts +2 -2
- package/lib/scenes/HomeScene/HomeScene.js.map +1 -1
- package/lib/scenes/MethodScene/MethodScene.d.ts +8 -4
- package/lib/scenes/MethodScene/MethodScene.js +75 -27
- package/lib/scenes/MethodScene/MethodScene.js.map +1 -1
- package/lib/scenes/MethodScene/components/DocOperation.d.ts +2 -2
- package/lib/scenes/MethodScene/components/DocOperation.js.map +1 -1
- package/lib/scenes/MethodScene/components/DocRequestBody.d.ts +3 -2
- package/lib/scenes/MethodScene/components/DocRequestBody.js +6 -2
- package/lib/scenes/MethodScene/components/DocRequestBody.js.map +1 -1
- package/lib/scenes/MethodTagScene/MethodTagScene.d.ts +7 -0
- package/lib/scenes/{TagScene/TagScene.js → MethodTagScene/MethodTagScene.js} +19 -14
- package/lib/scenes/MethodTagScene/MethodTagScene.js.map +1 -0
- package/lib/scenes/MethodTagScene/index.d.ts +1 -0
- package/lib/scenes/MethodTagScene/index.js +14 -0
- package/lib/{context/search/SearchContext.js.map → scenes/MethodTagScene/index.js.map} +1 -1
- package/lib/scenes/{TagScene → MethodTagScene}/utils.d.ts +1 -1
- package/lib/scenes/{TagScene → MethodTagScene}/utils.js +0 -0
- package/lib/{context/lode/index.js.map → scenes/MethodTagScene/utils.js.map} +1 -1
- package/lib/scenes/TypeScene/TypeScene.d.ts +2 -2
- package/lib/scenes/TypeScene/TypeScene.js +16 -7
- package/lib/scenes/TypeScene/TypeScene.js.map +1 -1
- package/lib/scenes/TypeTagScene/TypeTagScene.d.ts +7 -0
- package/lib/scenes/TypeTagScene/TypeTagScene.js +76 -0
- package/lib/scenes/TypeTagScene/TypeTagScene.js.map +1 -0
- package/lib/scenes/TypeTagScene/index.d.ts +1 -0
- package/lib/scenes/TypeTagScene/index.js +14 -0
- package/lib/{esm/state/settings/actions.js.map → scenes/TypeTagScene/index.js.map} +1 -1
- package/lib/scenes/TypeTagScene/utils.d.ts +2 -0
- package/lib/scenes/TypeTagScene/utils.js +17 -0
- package/lib/scenes/TypeTagScene/utils.js.map +1 -0
- package/lib/scenes/index.d.ts +2 -1
- package/lib/scenes/index.js +11 -3
- package/lib/scenes/index.js.map +1 -1
- package/lib/state/index.d.ts +2 -2
- package/lib/state/index.js +15 -16
- package/lib/state/index.js.map +1 -1
- package/lib/state/lodes/index.d.ts +2 -0
- package/lib/{reducers/search → state/lodes}/index.js +8 -8
- package/lib/state/lodes/index.js.map +1 -0
- package/lib/state/lodes/sagas.d.ts +1 -0
- package/lib/state/lodes/sagas.js +34 -0
- package/lib/state/lodes/sagas.js.map +1 -0
- package/lib/state/lodes/selectors.d.ts +3 -0
- package/lib/state/lodes/selectors.js +17 -0
- package/lib/state/lodes/selectors.js.map +1 -0
- package/lib/state/lodes/slice.d.ts +29 -0
- package/lib/state/lodes/slice.js +45 -0
- package/lib/state/lodes/slice.js.map +1 -0
- package/lib/state/settings/index.d.ts +1 -1
- package/lib/state/settings/index.js +8 -8
- package/lib/state/settings/index.js.map +1 -1
- package/lib/state/settings/sagas.d.ts +1 -0
- package/lib/state/settings/sagas.js +69 -0
- package/lib/state/settings/sagas.js.map +1 -0
- package/lib/state/settings/selectors.d.ts +5 -2
- package/lib/state/settings/selectors.js +17 -3
- package/lib/state/settings/selectors.js.map +1 -1
- package/lib/state/settings/slice.d.ts +42 -0
- package/lib/state/settings/slice.js +69 -0
- package/lib/state/settings/slice.js.map +1 -0
- package/lib/state/store.d.ts +10 -6
- package/lib/state/store.js +15 -5
- package/lib/state/store.js.map +1 -1
- package/lib/test-data/declarations.js +24 -0
- package/lib/test-data/declarations.js.map +1 -0
- package/lib/test-data/examples.js.map +1 -1
- package/lib/test-data/index.js +23 -0
- package/lib/test-data/index.js.map +1 -1
- package/lib/test-data/specs.js.map +1 -1
- package/lib/test-utils/index.d.ts +3 -4
- package/lib/test-utils/index.js +33 -56
- package/lib/test-utils/index.js.map +1 -1
- package/lib/test-utils/lodes.d.ts +4 -0
- package/lib/test-utils/lodes.js +23 -0
- package/lib/test-utils/lodes.js.map +1 -0
- package/lib/test-utils/redux.d.ts +16 -12
- package/lib/test-utils/redux.js +36 -17
- package/lib/test-utils/redux.js.map +1 -1
- package/lib/test-utils/router.d.ts +2 -2
- package/lib/test-utils/router.js.map +1 -1
- package/lib/utils/highlight.d.ts +1 -0
- package/lib/utils/index.d.ts +1 -2
- package/lib/utils/index.js +6 -23
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/lodeUtils.d.ts +3 -3
- package/lib/utils/lodeUtils.js +3 -7
- package/lib/utils/lodeUtils.js.map +1 -1
- package/lib/utils/path.d.ts +3 -1
- package/lib/utils/path.js +36 -2
- package/lib/utils/path.js.map +1 -1
- package/package.json +29 -15
- package/public/Looker.3.1.json +1343 -412
- package/public/Looker.4.0.json +3305 -661
- package/public/versions.json +1 -1
- package/src/ApiExplorer.tsx +160 -99
- package/src/{index.tsx → App.tsx} +1 -1
- package/src/StandaloneApiExplorer.tsx +38 -29
- package/src/components/DocActivityType/DocActivityType.tsx +3 -2
- package/src/components/DocCode/DocCode.tsx +7 -6
- package/src/components/DocMarkdown/DocMarkdown.spec.tsx +16 -11
- package/src/components/DocMarkdown/DocMarkdown.tsx +11 -9
- package/src/components/DocMethodSummary/DocMethodSummary.spec.tsx +2 -2
- package/src/components/DocMethodSummary/DocMethodSummary.tsx +8 -8
- package/src/components/DocMethodSummary/DocSummaryStatus.spec.tsx +5 -5
- package/src/components/DocMethodSummary/DocSummaryStatus.tsx +5 -7
- package/src/components/DocMethodSummary/index.tsx +1 -0
- package/src/components/DocMethodSummary/utils.spec.tsx +7 -7
- package/src/components/DocMethodSummary/utils.tsx +17 -23
- package/src/components/DocPseudo/DocParam.tsx +3 -2
- package/src/components/DocPseudo/DocParams.tsx +3 -2
- package/src/components/DocPseudo/DocPrimaryResponse.tsx +3 -2
- package/src/components/DocPseudo/DocPseudo.tsx +3 -2
- package/src/components/DocRateLimited/DocRateLimited.tsx +3 -2
- package/src/components/DocReferences/DocReferences.spec.tsx +19 -8
- package/src/components/DocReferences/DocReferences.tsx +10 -10
- package/src/components/DocReferences/utils.spec.tsx +1 -13
- package/src/components/DocReferences/utils.tsx +4 -39
- package/src/components/DocResponses/DocResponseTypes.tsx +15 -4
- package/src/components/DocResponses/DocResponses.spec.tsx +1 -1
- package/src/components/DocResponses/DocResponses.tsx +7 -5
- package/src/components/DocResponses/utils.ts +1 -1
- package/src/components/DocSDKs/DocDeclarations.tsx +3 -2
- package/src/components/DocSDKs/DocSDKs.spec.tsx +12 -5
- package/src/components/DocSDKs/DocSDKs.tsx +7 -7
- package/src/components/DocSDKs/utils.ts +1 -1
- package/src/components/DocSchema/DocSchema.tsx +3 -2
- package/src/components/DocSdkUsage/DocSdkExampleCell.tsx +2 -1
- package/src/components/DocSdkUsage/DocSdkUsage.spec.tsx +2 -2
- package/src/components/DocSdkUsage/DocSdkUsage.tsx +10 -8
- package/src/components/DocSdkUsage/utils.ts +4 -2
- package/src/components/DocSource/DocSource.spec.tsx +2 -1
- package/src/components/DocSource/DocSource.tsx +7 -4
- package/src/components/DocStatus/DocStatus.spec.tsx +1 -1
- package/src/components/DocStatus/DocStatus.tsx +3 -2
- package/src/components/DocTitle/DocTitle.tsx +4 -3
- package/src/{state/settings/action_creators.spec.ts → components/DocTypeSummary/DocTypeSummary.spec.tsx} +15 -10
- package/src/components/DocTypeSummary/DocTypeSummary.tsx +64 -0
- package/src/{state/action_creators.ts → components/DocTypeSummary/index.tsx} +1 -1
- package/src/components/ErrorBoundary/ErrorBoundary.spec.tsx +11 -9
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +1 -1
- package/src/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.spec.tsx +6 -5
- package/src/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.tsx +170 -6
- package/src/components/ExploreType/ExploreProperty.spec.tsx +15 -6
- package/src/components/ExploreType/ExploreProperty.tsx +26 -12
- package/src/components/ExploreType/ExploreType.spec.tsx +15 -31
- package/src/components/ExploreType/ExploreType.tsx +13 -6
- package/src/components/ExploreType/exploreUtils.tsx +3 -2
- package/src/components/Header/Header.spec.tsx +29 -37
- package/src/components/Header/Header.tsx +8 -4
- package/src/components/Header/index.ts +1 -1
- package/src/components/SelectorContainer/ApiSpecSelector.spec.tsx +12 -2
- package/src/components/SelectorContainer/ApiSpecSelector.tsx +9 -5
- package/src/components/SelectorContainer/SdkLanguageSelector.spec.tsx +13 -7
- package/src/components/SelectorContainer/SdkLanguageSelector.tsx +7 -14
- package/src/components/SelectorContainer/SelectorContainer.spec.tsx +19 -25
- package/src/components/SelectorContainer/SelectorContainer.tsx +8 -5
- package/src/components/SideNav/SearchMessage.tsx +3 -2
- package/src/components/SideNav/SideNav.spec.tsx +28 -41
- package/src/components/SideNav/SideNav.tsx +102 -68
- package/src/components/SideNav/{SideNavTags.spec.tsx → SideNavMethodTags.spec.tsx} +10 -8
- package/src/components/SideNav/{SideNavTags.tsx → SideNavMethodTags.tsx} +21 -19
- package/src/components/SideNav/SideNavMethods.spec.tsx +9 -5
- package/src/components/SideNav/SideNavMethods.tsx +78 -126
- package/src/components/SideNav/SideNavTypeTags.spec.tsx +79 -0
- package/src/{context/search/SearchContext.ts → components/SideNav/SideNavTypeTags.tsx} +27 -14
- package/src/components/SideNav/SideNavTypes.spec.tsx +13 -6
- package/src/components/SideNav/SideNavTypes.tsx +94 -43
- package/src/components/SideNav/{searchUtils.tsx → searchUtils.ts} +3 -3
- package/src/components/common/Loader.tsx +3 -2
- package/src/components/common/common.tsx +5 -15
- package/src/components/common/index.ts +2 -2
- package/src/components/index.ts +5 -4
- package/src/{context/lode/index.ts → index.ts} +4 -1
- package/src/reducers/index.ts +0 -1
- package/src/reducers/spec/actions.ts +1 -1
- package/src/reducers/spec/reducer.spec.ts +2 -1
- package/src/reducers/spec/reducer.ts +5 -3
- package/src/reducers/spec/utils.spec.ts +1 -1
- package/src/reducers/spec/utils.ts +18 -6
- package/src/routes/AppRouter.tsx +28 -15
- package/src/scenes/DiffScene/DiffScene.tsx +44 -13
- package/src/scenes/DiffScene/DocDiff/DiffBanner.tsx +3 -2
- package/src/scenes/DiffScene/DocDiff/DiffItem.spec.tsx +2 -1
- package/src/scenes/DiffScene/DocDiff/DiffItem.tsx +32 -49
- package/src/scenes/DiffScene/DocDiff/DiffLegend.tsx +3 -2
- package/src/scenes/DiffScene/DocDiff/DocDiff.tsx +3 -2
- package/src/scenes/DiffScene/DocDiff/docDiffUtils.tsx +2 -7
- package/src/scenes/DiffScene/diffUtils.spec.ts +2 -1
- package/src/scenes/DiffScene/diffUtils.ts +2 -2
- package/src/scenes/HomeScene/HomeScene.tsx +3 -2
- package/src/scenes/MethodScene/MethodScene.tsx +89 -44
- package/src/scenes/MethodScene/components/DocOperation.tsx +3 -2
- package/src/scenes/MethodScene/components/DocRequestBody.spec.tsx +2 -2
- package/src/scenes/MethodScene/components/DocRequestBody.tsx +8 -5
- package/src/scenes/{TagScene/TagScene.spec.tsx → MethodTagScene/MethodTagScene.spec.tsx} +5 -5
- package/src/scenes/{TagScene/TagScene.tsx → MethodTagScene/MethodTagScene.tsx} +23 -16
- package/src/{components/Collapser → scenes/MethodTagScene}/index.ts +1 -2
- package/src/scenes/{TagScene → MethodTagScene}/utils.spec.ts +1 -1
- package/src/scenes/{TagScene → MethodTagScene}/utils.ts +1 -1
- package/src/scenes/TypeScene/TypeScene.tsx +36 -24
- package/src/scenes/TypeTagScene/TypeTagScene.spec.tsx +103 -0
- package/src/scenes/TypeTagScene/TypeTagScene.tsx +93 -0
- package/src/scenes/{TagScene → TypeTagScene}/index.ts +1 -1
- package/src/{state/reducers.ts → scenes/TypeTagScene/utils.spec.ts} +8 -7
- package/src/{hooks/use_actions_hook.ts → scenes/TypeTagScene/utils.ts} +13 -10
- package/src/scenes/index.ts +2 -1
- package/src/state/index.ts +2 -2
- package/src/{reducers/search → state/lodes}/index.ts +2 -2
- package/src/state/lodes/sagas.spec.ts +92 -0
- package/src/state/{settings/reducer.ts → lodes/sagas.ts} +23 -21
- package/src/state/{settings/reducer.spec.ts → lodes/selectors.spec.ts} +15 -14
- package/src/state/{settings/actions.ts → lodes/selectors.ts} +7 -9
- package/src/state/lodes/slice.ts +69 -0
- package/src/state/settings/index.ts +1 -1
- package/src/state/settings/sagas.spec.ts +121 -0
- package/src/state/settings/sagas.ts +79 -0
- package/src/state/settings/selectors.spec.ts +16 -9
- package/src/state/settings/selectors.ts +14 -3
- package/src/state/settings/slice.ts +94 -0
- package/src/state/store.ts +22 -8
- package/src/{context/envAdaptor/EnvAdaptorContext.ts → test-data/declarations.ts} +17 -12
- package/src/test-data/examples.ts +1 -1
- package/src/test-data/index.ts +1 -0
- package/src/test-data/specs.ts +2 -1
- package/src/test-utils/index.ts +3 -14
- package/src/{context/lode/LodeContext.ts → test-utils/lodes.tsx} +15 -14
- package/src/test-utils/redux.tsx +46 -26
- package/src/test-utils/router.tsx +3 -2
- package/src/utils/index.ts +7 -2
- package/src/utils/lodeUtils.ts +5 -7
- package/src/utils/path.spec.ts +17 -3
- package/src/utils/path.ts +54 -4
- package/webpack.dev.config.js +3 -0
- package/webpack.prod.config.js +4 -0
- package/lib/components/Collapser/CollapserCard.d.ts +0 -9
- package/lib/components/Collapser/CollapserCard.js +0 -50
- package/lib/components/Collapser/CollapserCard.js.map +0 -1
- package/lib/components/Collapser/index.d.ts +0 -1
- package/lib/components/Collapser/index.js +0 -14
- package/lib/components/Collapser/index.js.map +0 -1
- package/lib/components/SideNav/SearchCriteriaSelector.d.ts +0 -2
- package/lib/components/SideNav/SearchCriteriaSelector.js +0 -57
- package/lib/components/SideNav/SearchCriteriaSelector.js.map +0 -1
- package/lib/components/SideNav/SideNavTags.d.ts +0 -9
- package/lib/components/SideNav/SideNavTags.js +0 -30
- package/lib/components/SideNav/SideNavTags.js.map +0 -1
- package/lib/context/envAdaptor/EnvAdaptorContext.d.ts +0 -7
- package/lib/context/envAdaptor/EnvAdaptorContext.js +0 -18
- package/lib/context/envAdaptor/EnvAdaptorContext.js.map +0 -1
- package/lib/context/envAdaptor/index.d.ts +0 -1
- package/lib/context/envAdaptor/index.js +0 -20
- package/lib/context/envAdaptor/index.js.map +0 -1
- package/lib/context/index.d.ts +0 -3
- package/lib/context/index.js +0 -48
- package/lib/context/index.js.map +0 -1
- package/lib/context/lode/LodeContext.d.ts +0 -9
- package/lib/context/lode/LodeContext.js +0 -21
- package/lib/context/lode/LodeContext.js.map +0 -1
- package/lib/context/lode/index.d.ts +0 -1
- package/lib/context/lode/index.js +0 -20
- package/lib/context/search/SearchContext.d.ts +0 -9
- package/lib/context/search/SearchContext.js +0 -19
- package/lib/context/search/index.d.ts +0 -1
- package/lib/context/search/index.js +0 -20
- package/lib/context/search/index.js.map +0 -1
- package/lib/esm/components/Collapser/CollapserCard.js +0 -34
- package/lib/esm/components/Collapser/CollapserCard.js.map +0 -1
- package/lib/esm/components/Collapser/index.js +0 -2
- package/lib/esm/components/Collapser/index.js.map +0 -1
- package/lib/esm/components/SideNav/SearchCriteriaSelector.js +0 -38
- package/lib/esm/components/SideNav/SearchCriteriaSelector.js.map +0 -1
- package/lib/esm/components/SideNav/SideNavTags.js +0 -17
- package/lib/esm/components/SideNav/SideNavTags.js.map +0 -1
- package/lib/esm/context/envAdaptor/EnvAdaptorContext.js +0 -7
- package/lib/esm/context/envAdaptor/EnvAdaptorContext.js.map +0 -1
- package/lib/esm/context/envAdaptor/index.js +0 -2
- package/lib/esm/context/envAdaptor/index.js.map +0 -1
- package/lib/esm/context/index.js +0 -4
- package/lib/esm/context/index.js.map +0 -1
- package/lib/esm/context/lode/LodeContext.js +0 -11
- package/lib/esm/context/lode/LodeContext.js.map +0 -1
- package/lib/esm/context/lode/index.js +0 -2
- package/lib/esm/context/lode/index.js.map +0 -1
- package/lib/esm/context/search/SearchContext.js +0 -8
- package/lib/esm/context/search/SearchContext.js.map +0 -1
- package/lib/esm/context/search/index.js +0 -2
- package/lib/esm/context/search/index.js.map +0 -1
- package/lib/esm/hooks/index.js +0 -2
- package/lib/esm/hooks/index.js.map +0 -1
- package/lib/esm/hooks/use_actions_hook.js +0 -11
- package/lib/esm/hooks/use_actions_hook.js.map +0 -1
- package/lib/esm/reducers/search/actions.js +0 -13
- package/lib/esm/reducers/search/actions.js.map +0 -1
- package/lib/esm/reducers/search/index.js +0 -3
- package/lib/esm/reducers/search/index.js.map +0 -1
- package/lib/esm/reducers/search/reducer.js +0 -31
- package/lib/esm/reducers/search/reducer.js.map +0 -1
- package/lib/esm/scenes/MethodScene/utils.js +0 -72
- package/lib/esm/scenes/MethodScene/utils.js.map +0 -1
- package/lib/esm/scenes/TagScene/TagScene.js.map +0 -1
- package/lib/esm/scenes/TagScene/index.js +0 -2
- package/lib/esm/scenes/TagScene/index.js.map +0 -1
- package/lib/esm/scenes/TagScene/utils.js.map +0 -1
- package/lib/esm/state/action_creators.js +0 -2
- package/lib/esm/state/action_creators.js.map +0 -1
- package/lib/esm/state/reducers.js +0 -6
- package/lib/esm/state/reducers.js.map +0 -1
- package/lib/esm/state/settings/action_creators.js +0 -6
- package/lib/esm/state/settings/action_creators.js.map +0 -1
- package/lib/esm/state/settings/actions.js +0 -6
- package/lib/esm/state/settings/reducer.js +0 -19
- package/lib/esm/state/settings/reducer.js.map +0 -1
- package/lib/esm/test-utils/render_with_lode.js +0 -19
- package/lib/esm/test-utils/render_with_lode.js.map +0 -1
- package/lib/esm/test-utils/render_with_search.js +0 -34
- package/lib/esm/test-utils/render_with_search.js.map +0 -1
- package/lib/esm/utils/envAdaptor.js +0 -68
- package/lib/esm/utils/envAdaptor.js.map +0 -1
- package/lib/hooks/index.d.ts +0 -1
- package/lib/hooks/index.js +0 -14
- package/lib/hooks/index.js.map +0 -1
- package/lib/hooks/use_actions_hook.d.ts +0 -2
- package/lib/hooks/use_actions_hook.js +0 -24
- package/lib/hooks/use_actions_hook.js.map +0 -1
- package/lib/reducers/search/actions.d.ts +0 -4
- package/lib/reducers/search/actions.js +0 -25
- package/lib/reducers/search/actions.js.map +0 -1
- package/lib/reducers/search/index.d.ts +0 -2
- package/lib/reducers/search/index.js.map +0 -1
- package/lib/reducers/search/reducer.d.ts +0 -11
- package/lib/reducers/search/reducer.js +0 -43
- package/lib/reducers/search/reducer.js.map +0 -1
- package/lib/scenes/MethodScene/utils.d.ts +0 -3
- package/lib/scenes/MethodScene/utils.js +0 -81
- package/lib/scenes/MethodScene/utils.js.map +0 -1
- package/lib/scenes/TagScene/TagScene.d.ts +0 -7
- package/lib/scenes/TagScene/TagScene.js.map +0 -1
- package/lib/scenes/TagScene/index.d.ts +0 -1
- package/lib/scenes/TagScene/index.js +0 -14
- package/lib/scenes/TagScene/index.js.map +0 -1
- package/lib/scenes/TagScene/utils.js.map +0 -1
- package/lib/state/action_creators.d.ts +0 -1
- package/lib/state/action_creators.js +0 -19
- package/lib/state/reducers.d.ts +0 -4
- package/lib/state/reducers.js +0 -16
- package/lib/state/settings/action_creators.d.ts +0 -2
- package/lib/state/settings/action_creators.js +0 -16
- package/lib/state/settings/action_creators.js.map +0 -1
- package/lib/state/settings/actions.d.ts +0 -8
- package/lib/state/settings/actions.js +0 -13
- package/lib/state/settings/actions.js.map +0 -1
- package/lib/state/settings/reducer.d.ts +0 -6
- package/lib/state/settings/reducer.js +0 -31
- package/lib/state/settings/reducer.js.map +0 -1
- package/lib/test-utils/render_with_lode.d.ts +0 -9
- package/lib/test-utils/render_with_lode.js +0 -36
- package/lib/test-utils/render_with_lode.js.map +0 -1
- package/lib/test-utils/render_with_search.d.ts +0 -4
- package/lib/test-utils/render_with_search.js +0 -52
- package/lib/test-utils/render_with_search.js.map +0 -1
- package/lib/utils/envAdaptor.d.ts +0 -27
- package/lib/utils/envAdaptor.js +0 -81
- package/lib/utils/envAdaptor.js.map +0 -1
- package/src/components/Collapser/CollapserCard.spec.tsx +0 -50
- package/src/components/Collapser/CollapserCard.tsx +0 -76
- package/src/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/somethingWentWrong.svg +0 -45
- package/src/components/SideNav/SearchCriteriaSelector.tsx +0 -75
- package/src/context/envAdaptor/index.ts +0 -29
- package/src/context/index.ts +0 -28
- package/src/context/search/index.ts +0 -26
- package/src/hooks/index.ts +0 -26
- package/src/reducers/search/actions.spec.ts +0 -50
- package/src/reducers/search/reducer.spec.ts +0 -72
- package/src/scenes/MethodScene/utils.spec.ts +0 -95
- package/src/scenes/MethodScene/utils.ts +0 -121
- package/src/state/settings/action_creators.ts +0 -33
- package/src/test-utils/render_with_lode.tsx +0 -74
- package/src/test-utils/render_with_search.tsx +0 -69
- package/src/utils/envAdaptor.spec.ts +0 -53
- package/src/utils/envAdaptor.ts +0 -120
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/DocMethodSummary/DocMethodSummary.tsx"],"names":["React","Card","CardContent","Flex","Space","Text","MethodBadge","
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/DocMethodSummary/DocMethodSummary.tsx"],"names":["React","Card","CardContent","Flex","Space","Text","MethodBadge","RunItHeading","DocActivityType","DocRateLimited","DocSummaryStatus","DocMethodSummary","method","httpMethod","toUpperCase","summary","endpoint","status"],"mappings":"AA0BA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EAAeC,WAAf,EAA4BC,IAA5B,EAAkCC,KAAlC,EAAyCC,IAAzC,QAAqD,oBAArD;AAEA,SAASC,WAAT,EAAsBC,YAAtB,QAA0C,gBAA1C;AACA,SAASC,eAAT,EAA0BC,cAA1B,QAAgD,kBAAhD;AACA,SAASC,gBAAT,QAAiC,oBAAjC;AAMA,OAAO,IAAMC,gBAA2C,GAAG;AAAA,MAAC;AAAEC,IAAAA;AAAF,GAAD;AAAA,SACzD,oBAAC,IAAD;AAAM,IAAA,QAAQ,EAAC,OAAf;AAAuB,IAAA,MAAM;AAA7B,KACE,oBAAC,WAAD,QACE,oBAAC,KAAD;AAAO,IAAA,KAAK,EAAC,OAAb;AAAqB,IAAA,OAAO;AAA5B,KACE,oBAAC,WAAD;AACE,IAAA,IAAI,EAAEA,MAAM,CAACC,UADf;AAEE,IAAA,SAAS,EAAC,QAFZ;AAGE,IAAA,QAAQ,EAAC;AAHX,KAKGD,MAAM,CAACC,UAAP,CAAkBC,WAAlB,EALH,CADF,EAQE,oBAAC,IAAD;AAAM,IAAA,UAAU,EAAC,OAAjB;AAAyB,IAAA,aAAa,EAAC,QAAvC;AAAgD,IAAA,IAAI,EAAC,GAArD;AAAyD,IAAA,EAAE,EAAC;AAA5D,KACE,oBAAC,YAAD;AAAc,IAAA,EAAE,EAAC,IAAjB;AAAsB,IAAA,EAAE,EAAC,GAAzB;AAA6B,IAAA,EAAE,EAAC;AAAhC,KACGF,MAAM,CAACG,OADV,CADF,EAIE,oBAAC,KAAD,QACE,oBAAC,cAAD;AAAgB,IAAA,MAAM,EAAEH;AAAxB,IADF,EAEE,oBAAC,eAAD;AAAiB,IAAA,MAAM,EAAEA;AAAzB,IAFF,CAJF,EAQE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAC;AAAZ,KAAuBA,MAAM,CAACI,QAA9B,CARF,CARF,EAkBE,oBAAC,gBAAD;AAAkB,IAAA,MAAM,EAAEJ,MAAM,CAACK;AAAjC,IAlBF,CADF,CADF,CADyD;AAAA,CAApD","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 { Card, CardContent, Flex, Space, Text } from '@looker/components'\nimport type { IMethod } from '@looker/sdk-codegen'\nimport { MethodBadge, RunItHeading } from '@looker/run-it'\nimport { DocActivityType, DocRateLimited } from '../../components'\nimport { DocSummaryStatus } from './DocSummaryStatus'\n\ninterface DocMethodSummaryProps {\n method: IMethod\n}\n\nexport const DocMethodSummary: FC<DocMethodSummaryProps> = ({ method }) => (\n <Card maxWidth=\"50rem\" border>\n <CardContent>\n <Space align=\"start\" between>\n <MethodBadge\n type={method.httpMethod}\n textAlign=\"center\"\n minWidth=\"3.7625rem\"\n >\n {method.httpMethod.toUpperCase()}\n </MethodBadge>\n <Flex alignItems=\"start\" flexDirection=\"column\" flex=\"1\" mx=\"small\">\n <RunItHeading as=\"h3\" mb=\"0\" pt=\"0\">\n {method.summary}\n </RunItHeading>\n <Space>\n <DocRateLimited method={method} />\n <DocActivityType method={method} />\n </Space>\n <Text color=\"subdued\">{method.endpoint}</Text>\n </Flex>\n <DocSummaryStatus status={method.status} />\n </Space>\n </CardContent>\n </Card>\n)\n"],"file":"DocMethodSummary.js"}
|
|
@@ -3,10 +3,10 @@ import { Tooltip } from '@looker/components';
|
|
|
3
3
|
import { pickStatus, pickTooltipContent } from './utils';
|
|
4
4
|
export var DocSummaryStatus = _ref => {
|
|
5
5
|
var {
|
|
6
|
-
|
|
6
|
+
status
|
|
7
7
|
} = _ref;
|
|
8
8
|
return React.createElement(Tooltip, {
|
|
9
|
-
content: pickTooltipContent(
|
|
10
|
-
}, pickStatus(
|
|
9
|
+
content: pickTooltipContent(status)
|
|
10
|
+
}, pickStatus(status));
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=DocSummaryStatus.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/DocMethodSummary/DocSummaryStatus.tsx"],"names":["React","Tooltip","pickStatus","pickTooltipContent","DocSummaryStatus","
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/DocMethodSummary/DocSummaryStatus.tsx"],"names":["React","Tooltip","pickStatus","pickTooltipContent","DocSummaryStatus","status"],"mappings":"AA0BA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,OAAT,QAAwB,oBAAxB;AAEA,SAASC,UAAT,EAAqBC,kBAArB,QAA+C,SAA/C;AAMA,OAAO,IAAMC,gBAA2C,GAAG;AAAA,MAAC;AAAEC,IAAAA;AAAF,GAAD;AAAA,SACzD,oBAAC,OAAD;AAAS,IAAA,OAAO,EAAEF,kBAAkB,CAACE,MAAD;AAApC,KAA+CH,UAAU,CAACG,MAAD,CAAzD,CADyD;AAAA,CAApD","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'\n\nimport { pickStatus, pickTooltipContent } from './utils'\n\ninterface DocSummaryStatusProps {\n status: string\n}\n\nexport const DocSummaryStatus: FC<DocSummaryStatusProps> = ({ status }) => (\n <Tooltip content={pickTooltipContent(status)}>{pickStatus(status)}</Tooltip>\n)\n"],"file":"DocSummaryStatus.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/DocMethodSummary/index.tsx"],"names":["DocMethodSummary","pickTooltipContent"],"mappings":"AAyBA,SAASA,gBAAT,QAAiC,oBAAjC;AACA,SAASC,kBAAT,QAAmC,SAAnC","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 { DocMethodSummary } from './DocMethodSummary'\nexport { pickTooltipContent } from './utils'\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/DocMethodSummary/index.tsx"],"names":["DocMethodSummary","DocSummaryStatus","pickTooltipContent"],"mappings":"AAyBA,SAASA,gBAAT,QAAiC,oBAAjC;AACA,SAASC,gBAAT,QAAiC,oBAAjC;AACA,SAASC,kBAAT,QAAmC,SAAnC","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 { DocMethodSummary } from './DocMethodSummary'\nexport { DocSummaryStatus } from './DocSummaryStatus'\nexport { pickTooltipContent } from './utils'\n"],"file":"index.js"}
|
|
@@ -4,15 +4,25 @@ import { Icon, Status } from '@looker/components';
|
|
|
4
4
|
import { Beaker } from '@looker/icons';
|
|
5
5
|
import { VisibilityOff } from '@styled-icons/material/VisibilityOff';
|
|
6
6
|
export var pickStatus = status => {
|
|
7
|
-
|
|
7
|
+
var title = "".concat(status.toLowerCase(), " item");
|
|
8
|
+
|
|
9
|
+
switch (status.toLowerCase()) {
|
|
8
10
|
case 'beta':
|
|
9
11
|
return React.createElement(StatusBeta, {
|
|
10
|
-
"aria-label":
|
|
12
|
+
"aria-label": title
|
|
11
13
|
}, "\u03B2");
|
|
12
14
|
|
|
13
15
|
case 'experimental':
|
|
14
16
|
{
|
|
15
|
-
|
|
17
|
+
return React.createElement(Icon, {
|
|
18
|
+
title: title,
|
|
19
|
+
"aria-label": title,
|
|
20
|
+
icon: React.createElement(Beaker, null)
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
case 'alpha':
|
|
25
|
+
{
|
|
16
26
|
return React.createElement(Icon, {
|
|
17
27
|
title: title,
|
|
18
28
|
"aria-label": title,
|
|
@@ -22,24 +32,23 @@ export var pickStatus = status => {
|
|
|
22
32
|
|
|
23
33
|
case 'undocumented':
|
|
24
34
|
{
|
|
25
|
-
var _title = 'undocumented endpoint';
|
|
26
35
|
return React.createElement(Icon, {
|
|
27
|
-
title:
|
|
28
|
-
"aria-label":
|
|
36
|
+
title: title,
|
|
37
|
+
"aria-label": title,
|
|
29
38
|
icon: React.createElement(VisibilityOff, null)
|
|
30
39
|
});
|
|
31
40
|
}
|
|
32
41
|
|
|
33
42
|
case 'deprecated':
|
|
34
43
|
return React.createElement(Status, {
|
|
35
|
-
"aria-label":
|
|
44
|
+
"aria-label": title,
|
|
36
45
|
intent: "critical",
|
|
37
46
|
size: "small"
|
|
38
47
|
});
|
|
39
48
|
|
|
40
49
|
case 'stable':
|
|
41
50
|
return React.createElement(Status, {
|
|
42
|
-
"aria-label":
|
|
51
|
+
"aria-label": title,
|
|
43
52
|
intent: "positive",
|
|
44
53
|
size: "small"
|
|
45
54
|
});
|
|
@@ -53,24 +62,24 @@ export var pickStatus = status => {
|
|
|
53
62
|
}
|
|
54
63
|
};
|
|
55
64
|
export var pickTooltipContent = status => {
|
|
56
|
-
switch (status.
|
|
65
|
+
switch (status.toLowerCase()) {
|
|
57
66
|
case 'beta':
|
|
58
|
-
return 'This beta
|
|
67
|
+
return 'This beta item is under development and subject to change.';
|
|
59
68
|
|
|
60
69
|
case 'experimental':
|
|
61
|
-
return 'This experimental
|
|
70
|
+
return 'This experimental item is not fully developed and may be significantly changed or completely removed in future releases.';
|
|
62
71
|
|
|
63
72
|
case 'deprecated':
|
|
64
|
-
return 'This
|
|
73
|
+
return 'This item has been deprecated and will be removed in the future.';
|
|
65
74
|
|
|
66
75
|
case 'stable':
|
|
67
|
-
return 'This
|
|
76
|
+
return 'This item is considered stable for this API version.';
|
|
68
77
|
|
|
69
78
|
case 'undocumented':
|
|
70
|
-
return 'This is an internal-only
|
|
79
|
+
return 'This is an internal-only item.';
|
|
71
80
|
|
|
72
81
|
default:
|
|
73
|
-
return 'This
|
|
82
|
+
return 'This item has no status associated with it.';
|
|
74
83
|
}
|
|
75
84
|
};
|
|
76
85
|
var StatusBeta = styled.div.withConfig({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/DocMethodSummary/utils.tsx"],"names":["React","styled","Icon","Status","Beaker","VisibilityOff","pickStatus","status","
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/DocMethodSummary/utils.tsx"],"names":["React","styled","Icon","Status","Beaker","VisibilityOff","pickStatus","status","title","toLowerCase","pickTooltipContent","StatusBeta","div","theme","fontSizes","xxsmall","colors","neutral"],"mappings":"AAyBA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAASC,IAAT,EAAeC,MAAf,QAA6B,oBAA7B;AACA,SAASC,MAAT,QAAuB,eAAvB;AACA,SAASC,aAAT,QAA8B,sCAA9B;AAMA,OAAO,IAAMC,UAAU,GAAIC,MAAD,IAAoB;AAC5C,MAAMC,KAAK,aAAMD,MAAM,CAACE,WAAP,EAAN,UAAX;;AACA,UAAQF,MAAM,CAACE,WAAP,EAAR;AACE,SAAK,MAAL;AACE,aAAO,oBAAC,UAAD;AAAY,sBAAYD;AAAxB,kBAAP;;AACF,SAAK,cAAL;AAAqB;AACnB,eAAO,oBAAC,IAAD;AAAM,UAAA,KAAK,EAAEA,KAAb;AAAoB,wBAAYA,KAAhC;AAAuC,UAAA,IAAI,EAAE,oBAAC,MAAD;AAA7C,UAAP;AACD;;AACD,SAAK,OAAL;AAAc;AACZ,eAAO,oBAAC,IAAD;AAAM,UAAA,KAAK,EAAEA,KAAb;AAAoB,wBAAYA,KAAhC;AAAuC,UAAA,IAAI,EAAE,oBAAC,MAAD;AAA7C,UAAP;AACD;;AACD,SAAK,cAAL;AAAqB;AACnB,eAAO,oBAAC,IAAD;AAAM,UAAA,KAAK,EAAEA,KAAb;AAAoB,wBAAYA,KAAhC;AAAuC,UAAA,IAAI,EAAE,oBAAC,aAAD;AAA7C,UAAP;AACD;;AACD,SAAK,YAAL;AACE,aAAO,oBAAC,MAAD;AAAQ,sBAAYA,KAApB;AAA2B,QAAA,MAAM,EAAC,UAAlC;AAA6C,QAAA,IAAI,EAAC;AAAlD,QAAP;;AACF,SAAK,QAAL;AACE,aAAO,oBAAC,MAAD;AAAQ,sBAAYA,KAApB;AAA2B,QAAA,MAAM,EAAC,UAAlC;AAA6C,QAAA,IAAI,EAAC;AAAlD,QAAP;;AACF;AACE,aACE,oBAAC,MAAD;AACE,sBAAW,yBADb;AAEE,QAAA,MAAM,EAAC,SAFT;AAGE,QAAA,IAAI,EAAC;AAHP,QADF;AAjBJ;AAyBD,CA3BM;AAiCP,OAAO,IAAME,kBAAkB,GAAIH,MAAD,IAAoB;AACpD,UAAQA,MAAM,CAACE,WAAP,EAAR;AACE,SAAK,MAAL;AACE,aAAO,4DAAP;;AACF,SAAK,cAAL;AACE,aAAO,0HAAP;;AACF,SAAK,YAAL;AACE,aAAO,kEAAP;;AACF,SAAK,QAAL;AACE,aAAO,sDAAP;;AACF,SAAK,cAAL;AACE,aAAO,gCAAP;;AACF;AACE,aAAO,6CAAP;AAZJ;AAcD,CAfM;AAiBP,IAAME,UAAU,GAAGV,MAAM,CAACW,GAAV;AAAA;AAAA;AAAA,yHAID;AAAA,MAAC;AAAEC,IAAAA;AAAF,GAAD;AAAA,SAAeA,KAAK,CAACC,SAAN,CAAgBC,OAA/B;AAAA,CAJC,EAKL;AAAA,MAAC;AAAEF,IAAAA;AAAF,GAAD;AAAA,SAAeA,KAAK,CAACG,MAAN,CAAaC,OAA5B;AAAA,CALK,CAAhB","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport React from 'react'\nimport styled from 'styled-components'\nimport { Icon, Status } from '@looker/components'\nimport { Beaker } from '@looker/icons'\nimport { VisibilityOff } from '@styled-icons/material/VisibilityOff'\n\n/**\n * Return a Status react element based on an endpoint's status\n * @param status Endpoint status\n */\nexport const pickStatus = (status: string) => {\n const title = `${status.toLowerCase()} item`\n switch (status.toLowerCase()) {\n case 'beta':\n return <StatusBeta aria-label={title}>β</StatusBeta>\n case 'experimental': {\n return <Icon title={title} aria-label={title} icon={<Beaker />} />\n }\n case 'alpha': {\n return <Icon title={title} aria-label={title} icon={<Beaker />} />\n }\n case 'undocumented': {\n return <Icon title={title} aria-label={title} icon={<VisibilityOff />} />\n }\n case 'deprecated':\n return <Status aria-label={title} intent=\"critical\" size=\"small\" />\n case 'stable':\n return <Status aria-label={title} intent=\"positive\" size=\"small\" />\n default:\n return (\n <Status\n aria-label=\"unknown status endpoint\"\n intent=\"neutral\"\n size=\"small\"\n />\n )\n }\n}\n\n/**\n * Returns tooltip content based on status\n * @param status item status\n */\nexport const pickTooltipContent = (status: string) => {\n switch (status.toLowerCase()) {\n case 'beta':\n return 'This beta item is under development and subject to change.'\n case 'experimental':\n return 'This experimental item is not fully developed and may be significantly changed or completely removed in future releases.'\n case 'deprecated':\n return 'This item has been deprecated and will be removed in the future.'\n case 'stable':\n return 'This item is considered stable for this API version.'\n case 'undocumented':\n return 'This is an internal-only item.'\n default:\n return 'This item has no status associated with it.'\n }\n}\n\nconst StatusBeta = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: ${({ theme }) => theme.fontSizes.xxsmall};\n color: ${({ theme }) => theme.colors.neutral};\n width: 1.125rem;\n height: 1.125rem;\n`\n"],"file":"utils.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/DocPseudo/DocParam.tsx"],"names":["React","Tooltip","DocParam","parameter","type","name","description","required"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/DocPseudo/DocParam.tsx"],"names":["React","Tooltip","DocParam","parameter","type","name","description","required"],"mappings":"AA0BA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,OAAT,QAAwB,oBAAxB;AAMA,OAAO,IAAMC,QAAyB,GAAG;AAAA,MAAC;AAAEC,IAAAA;AAAF,GAAD;AAAA,SACvC,oBAAC,OAAD;AAAS,IAAA,OAAO,YAAKA,SAAS,CAACC,IAAV,CAAeC,IAApB,cAA4BF,SAAS,CAACG,WAAtC;AAAhB,KACE,kCAAOH,SAAS,CAACI,QAAV,GAAqBJ,SAAS,CAACE,IAA/B,cAA0CF,SAAS,CAACE,IAApD,MAAP,CADF,CADuC;AAAA,CAAlC","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 { IParameter } from '@looker/sdk-codegen'\nimport { Tooltip } from '@looker/components'\n\nexport interface DocArgProps {\n parameter: IParameter\n}\n\nexport const DocParam: FC<DocArgProps> = ({ parameter }) => (\n <Tooltip content={`${parameter.type.name} ${parameter.description}`}>\n <span>{parameter.required ? parameter.name : `[${parameter.name}]`}</span>\n </Tooltip>\n)\n"],"file":"DocParam.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/DocPseudo/DocParams.tsx"],"names":["React","Fragment","DocParam","DocParams","parameters","map","a","index"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/DocPseudo/DocParams.tsx"],"names":["React","Fragment","DocParam","DocParams","parameters","map","a","index"],"mappings":"AA2BA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AAEA,SAASC,QAAT,QAAyB,YAAzB;AAMA,OAAO,IAAMC,SAA2B,GAAG;AAAA,MAAC;AAAEC,IAAAA;AAAF,GAAD;AAAA,SACzC,0CACGA,UAAU,CAACC,GAAX,CAAe,CAACC,CAAD,EAAIC,KAAJ,KACd,oBAAC,QAAD;AAAU,IAAA,GAAG,EAAEA;AAAf,KACGA,KAAK,GAAG,IAAH,GAAU,EADlB,EAEE,oBAAC,QAAD;AAAU,IAAA,SAAS,EAAED,CAArB;AAAwB,IAAA,GAAG,EAAEC;AAA7B,IAFF,CADD,CADH,CADyC;AAAA,CAApC","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 { IParameter } from '@looker/sdk-codegen'\nimport type { FC } from 'react'\nimport React, { Fragment } from 'react'\n\nimport { DocParam } from './DocParam'\n\nexport interface DocArgsProps {\n parameters: IParameter[]\n}\n\nexport const DocParams: FC<DocArgsProps> = ({ parameters }) => (\n <>\n {parameters.map((a, index) => (\n <Fragment key={index}>\n {index ? ', ' : ''}\n <DocParam parameter={a} key={index} />\n </Fragment>\n ))}\n </>\n)\n"],"file":"DocParams.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/DocPseudo/DocPrimaryResponse.tsx"],"names":["React","Tooltip","DocPrimaryResponse","response","description","mediaType","type","name"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/DocPseudo/DocPrimaryResponse.tsx"],"names":["React","Tooltip","DocPrimaryResponse","response","description","mediaType","type","name"],"mappings":"AA2BA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,OAAT,QAAwB,oBAAxB;AAMA,OAAO,IAAMC,kBAA+C,GAAG;AAAA,MAAC;AAC9DC,IAAAA;AAD8D,GAAD;AAAA,SAG7D,oBAAC,OAAD;AAAS,IAAA,OAAO,YAAKA,QAAQ,CAACC,WAAd,cAA6BD,QAAQ,CAACE,SAAtC;AAAhB,KACE,kCAAOF,QAAQ,CAACG,IAAT,CAAcC,IAArB,CADF,CAH6D;AAAA,CAAxD","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 { IMethodResponse } from '@looker/sdk-codegen'\nimport type { FC } from 'react'\nimport React from 'react'\nimport { Tooltip } from '@looker/components'\n\nexport interface DocPrimaryResponseProps {\n response: IMethodResponse\n}\n\nexport const DocPrimaryResponse: FC<DocPrimaryResponseProps> = ({\n response,\n}) => (\n <Tooltip content={`${response.description} ${response.mediaType}`}>\n <span>{response.type.name}</span>\n </Tooltip>\n)\n"],"file":"DocPrimaryResponse.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/DocPseudo/DocPseudo.tsx"],"names":["React","Code","Flex","DocPrimaryResponse","DocParams","DocPseudo","method","args","allParams","resType","primaryResponse","operationId"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/DocPseudo/DocPseudo.tsx"],"names":["React","Code","Flex","DocPrimaryResponse","DocParams","DocPseudo","method","args","allParams","resType","primaryResponse","operationId"],"mappings":"AA2BA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EAAeC,IAAf,QAA2B,oBAA3B;AAGA,SAASC,kBAAT,QAAmC,sBAAnC;AACA,SAASC,SAAT,QAA0B,aAA1B;AAMA,OAAO,IAAMC,SAA0B,GAAG,QAAgB;AAAA,MAAf;AAAEC,IAAAA;AAAF,GAAe;AACxD,MAAMC,IAAI,GAAGD,MAAM,CAACE,SAApB;AACA,MAAMC,OAAO,GAAGH,MAAM,CAACI,eAAvB;AAEA,SACE,oBAAC,IAAD;AAAM,IAAA,UAAU,EAAC;AAAjB,KACE,oBAAC,IAAD;AAAM,IAAA,QAAQ,EAAC,OAAf;AAAuB,IAAA,UAAU,EAAC;AAAlC,eACMJ,MAAM,CAACK,WADb,QAEE,oBAAC,SAAD;AAAW,IAAA,UAAU,EAAEJ;AAAvB,IAFF,EAGG,KAHH,EAIE,oBAAC,kBAAD;AAAoB,IAAA,QAAQ,EAAEE;AAA9B,IAJF,CADF,CADF;AAUD,CAdM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react'\nimport React from 'react'\nimport { Code, Flex } from '@looker/components'\nimport type { IMethod } from '@looker/sdk-codegen'\n\nimport { DocPrimaryResponse } from './DocPrimaryResponse'\nimport { DocParams } from './DocParams'\n\nexport interface PseudoProps {\n method: IMethod\n}\n\nexport const DocPseudo: FC<PseudoProps> = ({ method }) => {\n const args = method.allParams\n const resType = method.primaryResponse\n\n return (\n <Flex alignItems=\"flex-start\">\n <Code fontSize=\"small\" fontWeight=\"normal\">\n {`${method.operationId}(`}\n <DocParams parameters={args} />\n {'): '}\n <DocPrimaryResponse response={resType} />\n </Code>\n </Flex>\n )\n}\n"],"file":"DocPseudo.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/DocRateLimited/DocRateLimited.tsx"],"names":["React","Code","Tooltip","DocRateLimited","method","rateLimited"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/DocRateLimited/DocRateLimited.tsx"],"names":["React","Code","Tooltip","DocRateLimited","method","rateLimited"],"mappings":"AA0BA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EAAeC,OAAf,QAA8B,oBAA9B;AAMA,OAAO,IAAMC,cAAuC,GAAG;AAAA,MAAC;AAAEC,IAAAA;AAAF,GAAD;AAAA,SACrD,0CACGA,MAAM,CAACC,WAAP,IACC,0CACE,oBAAC,OAAD;AAAS,IAAA,SAAS,EAAC,MAAnB;AAA0B,IAAA,OAAO,EAAE;AAAnC,KACE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAC;AAAZ,KAAmC,cAAnC,CADF,CADF,CAFJ,CADqD;AAAA,CAAhD","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 { Code, Tooltip } from '@looker/components'\nimport type { IMethod } from '@looker/sdk-codegen'\n\ninterface DocRateLimitedProps {\n method: IMethod\n}\nexport const DocRateLimited: FC<DocRateLimitedProps> = ({ method }) => (\n <>\n {method.rateLimited && (\n <>\n <Tooltip textAlign=\"left\" content={'This endpoint is rate limited.'}>\n <Code color=\"palette.charcoal500\">{'rate_limited'}</Code>\n </Tooltip>\n </>\n )}\n </>\n)\n"],"file":"DocRateLimited.js"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CollapserCard } from '@looker/run-it';
|
|
3
|
+
import { useSelector } from 'react-redux';
|
|
4
|
+
import { selectSearchPattern } from '../../state';
|
|
4
5
|
import { DocReferenceItems } from './utils';
|
|
5
6
|
export var DocReferences = _ref => {
|
|
6
7
|
var {
|
|
@@ -10,15 +11,11 @@ export var DocReferences = _ref => {
|
|
|
10
11
|
methodsUsedBy = [],
|
|
11
12
|
typesUsedBy = []
|
|
12
13
|
} = _ref;
|
|
13
|
-
var
|
|
14
|
-
searchSettings: {
|
|
15
|
-
pattern
|
|
16
|
-
}
|
|
17
|
-
} = useContext(SearchContext);
|
|
14
|
+
var searchPattern = useSelector(selectSearchPattern);
|
|
18
15
|
if (typesUsed.length === 0 && methodsUsedBy.length === 0 && typesUsedBy.length === 0) return React.createElement(React.Fragment, null);
|
|
19
16
|
return React.createElement(CollapserCard, {
|
|
20
17
|
heading: "References",
|
|
21
18
|
id: "references"
|
|
22
|
-
}, React.createElement(React.Fragment, null, DocReferenceItems('Referenced Types:', typesUsed, api, specKey,
|
|
19
|
+
}, React.createElement(React.Fragment, null, DocReferenceItems('Referenced Types:', typesUsed, api, specKey, searchPattern), DocReferenceItems('Used by types:', typesUsedBy, api, specKey, searchPattern), DocReferenceItems('Used by methods:', methodsUsedBy, api, specKey, searchPattern)));
|
|
23
20
|
};
|
|
24
21
|
//# sourceMappingURL=DocReferences.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/DocReferences/DocReferences.tsx"],"names":["React","
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/DocReferences/DocReferences.tsx"],"names":["React","CollapserCard","useSelector","selectSearchPattern","DocReferenceItems","DocReferences","typesUsed","specKey","api","methodsUsedBy","typesUsedBy","searchPattern","length"],"mappings":"AA2BA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,aAAT,QAA8B,gBAA9B;AAEA,SAASC,WAAT,QAA4B,aAA5B;AACA,SAASC,mBAAT,QAAoC,aAApC;AACA,SAASC,iBAAT,QAAkC,SAAlC;AAaA,OAAO,IAAMC,aAAqC,GAAG,QAM/C;AAAA,MANgD;AACpDC,IAAAA,SADoD;AAEpDC,IAAAA,OAFoD;AAGpDC,IAAAA,GAHoD;AAIpDC,IAAAA,aAAa,GAAG,EAJoC;AAKpDC,IAAAA,WAAW,GAAG;AALsC,GAMhD;AACJ,MAAMC,aAAa,GAAGT,WAAW,CAACC,mBAAD,CAAjC;AAEA,MACEG,SAAS,CAACM,MAAV,KAAqB,CAArB,IACAH,aAAa,CAACG,MAAd,KAAyB,CADzB,IAEAF,WAAW,CAACE,MAAZ,KAAuB,CAHzB,EAKE,OAAO,yCAAP;AAEF,SACE,oBAAC,aAAD;AAAe,IAAA,OAAO,EAAC,YAAvB;AAAoC,IAAA,EAAE,EAAC;AAAvC,KACE,0CACGR,iBAAiB,CAChB,mBADgB,EAEhBE,SAFgB,EAGhBE,GAHgB,EAIhBD,OAJgB,EAKhBI,aALgB,CADpB,EAQGP,iBAAiB,CAChB,gBADgB,EAEhBM,WAFgB,EAGhBF,GAHgB,EAIhBD,OAJgB,EAKhBI,aALgB,CARpB,EAeGP,iBAAiB,CAChB,kBADgB,EAEhBK,aAFgB,EAGhBD,GAHgB,EAIhBD,OAJgB,EAKhBI,aALgB,CAfpB,CADF,CADF;AA2BD,CA3CM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react'\nimport React from 'react'\nimport type { ApiModel, IMethod, IType } from '@looker/sdk-codegen'\nimport { CollapserCard } from '@looker/run-it'\n\nimport { useSelector } from 'react-redux'\nimport { selectSearchPattern } from '../../state'\nimport { DocReferenceItems } from './utils'\n\ninterface DocReferencesProps {\n typesUsed: IType[]\n methodsUsedBy?: IMethod[]\n typesUsedBy?: IType[]\n specKey: string\n api: ApiModel\n}\n\n/**\n * It renders links to the given types and/or methods references\n */\nexport const DocReferences: FC<DocReferencesProps> = ({\n typesUsed,\n specKey,\n api,\n methodsUsedBy = [],\n typesUsedBy = [],\n}) => {\n const searchPattern = useSelector(selectSearchPattern)\n\n if (\n typesUsed.length === 0 &&\n methodsUsedBy.length === 0 &&\n typesUsedBy.length === 0\n )\n return <></>\n\n return (\n <CollapserCard heading=\"References\" id=\"references\">\n <>\n {DocReferenceItems(\n 'Referenced Types:',\n typesUsed,\n api,\n specKey,\n searchPattern\n )}\n {DocReferenceItems(\n 'Used by types:',\n typesUsedBy,\n api,\n specKey,\n searchPattern\n )}\n {DocReferenceItems(\n 'Used by methods:',\n methodsUsedBy,\n api,\n specKey,\n searchPattern\n )}\n </>\n </CollapserCard>\n )\n}\n"],"file":"DocReferences.js"}
|
|
@@ -1,33 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Method } from '@looker/sdk-codegen';
|
|
3
2
|
import { Link } from 'react-router-dom';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
var getTag = (api, methodName) => {
|
|
8
|
-
return Object.entries(api.tags).filter(_ref => {
|
|
9
|
-
var [, methods] = _ref;
|
|
10
|
-
return methodName in methods;
|
|
11
|
-
}).map(_ref2 => {
|
|
12
|
-
var [methodTag] = _ref2;
|
|
13
|
-
return methodTag;
|
|
14
|
-
})[0];
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export var buildPath = (api, item, specKey) => {
|
|
18
|
-
var path;
|
|
19
|
-
|
|
20
|
-
if (item instanceof Method) {
|
|
21
|
-
path = buildMethodPath(specKey, getTag(api, item.name), item.name);
|
|
22
|
-
} else {
|
|
23
|
-
path = buildTypePath(specKey, item.name);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return path;
|
|
27
|
-
};
|
|
3
|
+
import { RunItHeading } from '@looker/run-it';
|
|
4
|
+
import { buildPath, highlightHTML } from '../../utils';
|
|
28
5
|
export var DocReferenceItems = (heading, items, api, specKey, pattern) => {
|
|
29
6
|
if (items.length === 0) return React.createElement(React.Fragment, null);
|
|
30
|
-
return React.createElement(React.Fragment, null, React.createElement(
|
|
7
|
+
return React.createElement(React.Fragment, null, React.createElement(RunItHeading, {
|
|
31
8
|
as: "h4"
|
|
32
9
|
}, heading), items.map((item, index) => React.createElement("span", {
|
|
33
10
|
className: "doc-link",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/DocReferences/utils.tsx"],"names":["React","
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/DocReferences/utils.tsx"],"names":["React","Link","RunItHeading","buildPath","highlightHTML","DocReferenceItems","heading","items","api","specKey","pattern","length","map","item","index","name"],"mappings":"AAyBA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,IAAT,QAAqB,kBAArB;AACA,SAASC,YAAT,QAA6B,gBAA7B;AACA,SAASC,SAAT,EAAoBC,aAApB,QAAyC,aAAzC;AAKA,OAAO,IAAMC,iBAAiB,GAAG,CAC/BC,OAD+B,EAE/BC,KAF+B,EAG/BC,GAH+B,EAI/BC,OAJ+B,EAK/BC,OAL+B,KAM5B;AACH,MAAIH,KAAK,CAACI,MAAN,KAAiB,CAArB,EAAwB,OAAO,yCAAP;AAExB,SACE,0CACE,oBAAC,YAAD;AAAc,IAAA,EAAE,EAAC;AAAjB,KAAuBL,OAAvB,CADF,EAEGC,KAAK,CAACK,GAAN,CAAU,CAACC,IAAD,EAAOC,KAAP,KACT;AAAM,IAAA,SAAS,EAAC,UAAhB;AAA2B,IAAA,GAAG,EAAED,IAAI,CAACE;AAArC,KACGD,KAAK,GAAG,IAAH,GAAU,EADlB,EAEE,oBAAC,IAAD;AAAM,IAAA,EAAE,EAAEX,SAAS,CAACK,GAAD,EAAMK,IAAN,EAAYJ,OAAZ;AAAnB,KACGL,aAAa,CAACM,OAAD,EAAUG,IAAI,CAACE,IAAf,CADhB,CAFF,CADD,CAFH,CADF;AAaD,CAtBM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport React from 'react'\nimport type { ApiModel, IMethod, IType } from '@looker/sdk-codegen'\nimport { Link } from 'react-router-dom'\nimport { RunItHeading } from '@looker/run-it'\nimport { buildPath, highlightHTML } from '../../utils'\n\n/**\n * Renders a heading and links to all item types\n */\nexport const DocReferenceItems = (\n heading: string,\n items: (IType | IMethod)[],\n api: ApiModel,\n specKey: string,\n pattern: string\n) => {\n if (items.length === 0) return <></>\n\n return (\n <>\n <RunItHeading as=\"h4\">{heading}</RunItHeading>\n {items.map((item, index) => (\n <span className=\"doc-link\" key={item.name}>\n {index ? ', ' : ''}\n <Link to={buildPath(api, item, specKey)}>\n {highlightHTML(pattern, item.name)}\n </Link>\n </span>\n ))}\n </>\n )\n}\n"],"file":"utils.js"}
|
|
@@ -3,6 +3,7 @@ import { ButtonToggle, ButtonItem } from '@looker/components';
|
|
|
3
3
|
import { ExploreType } from '..';
|
|
4
4
|
export var DocResponseTypes = _ref => {
|
|
5
5
|
var {
|
|
6
|
+
api,
|
|
6
7
|
responses
|
|
7
8
|
} = _ref;
|
|
8
9
|
var mediaTypes = Object.keys(responses);
|
|
@@ -11,7 +12,7 @@ export var DocResponseTypes = _ref => {
|
|
|
11
12
|
useEffect(() => {
|
|
12
13
|
setSelectedMediaType(mediaTypes[0]);
|
|
13
14
|
setResps(responses);
|
|
14
|
-
}, [responses]);
|
|
15
|
+
}, [responses, mediaTypes]);
|
|
15
16
|
return React.createElement(React.Fragment, null, React.createElement(ButtonToggle, {
|
|
16
17
|
value: selectedMediaType,
|
|
17
18
|
onChange: setSelectedMediaType,
|
|
@@ -24,6 +25,7 @@ export var DocResponseTypes = _ref => {
|
|
|
24
25
|
overflow: 'auto'
|
|
25
26
|
}
|
|
26
27
|
}, React.createElement(ExploreType, {
|
|
28
|
+
api: api,
|
|
27
29
|
key: selectedMediaType,
|
|
28
30
|
type: resps[selectedMediaType].type,
|
|
29
31
|
link: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/DocResponses/DocResponseTypes.tsx"],"names":["React","useState","useEffect","ButtonToggle","ButtonItem","ExploreType","DocResponseTypes","responses","mediaTypes","Object","keys","selectedMediaType","setSelectedMediaType","resps","setResps","map","mediaType","overflow","type"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/DocResponses/DocResponseTypes.tsx"],"names":["React","useState","useEffect","ButtonToggle","ButtonItem","ExploreType","DocResponseTypes","api","responses","mediaTypes","Object","keys","selectedMediaType","setSelectedMediaType","resps","setResps","map","mediaType","overflow","type"],"mappings":"AA2BA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,SAASC,YAAT,EAAuBC,UAAvB,QAAyC,oBAAzC;AAOA,SAASC,WAAT,QAA4B,IAA5B;AAYA,OAAO,IAAMC,gBAA2C,GAAG,QAGrD;AAAA,MAHsD;AAC1DC,IAAAA,GAD0D;AAE1DC,IAAAA;AAF0D,GAGtD;AACJ,MAAMC,UAAU,GAAGC,MAAM,CAACC,IAAP,CAAYH,SAAZ,CAAnB;AACA,MAAM,CAACI,iBAAD,EAAoBC,oBAApB,IAA4CZ,QAAQ,CAACQ,UAAU,CAAC,CAAD,CAAX,CAA1D;AACA,MAAM,CAACK,KAAD,EAAQC,QAAR,IAAoBd,QAAQ,CAACO,SAAD,CAAlC;AAEAN,EAAAA,SAAS,CAAC,MAAM;AAEdW,IAAAA,oBAAoB,CAACJ,UAAU,CAAC,CAAD,CAAX,CAApB;AACAM,IAAAA,QAAQ,CAACP,SAAD,CAAR;AACD,GAJQ,EAIN,CAACA,SAAD,EAAYC,UAAZ,CAJM,CAAT;AAOA,SACE,0CACE,oBAAC,YAAD;AACE,IAAA,KAAK,EAAEG,iBADT;AAEE,IAAA,QAAQ,EAAEC,oBAFZ;AAGE,IAAA,EAAE,EAAC,OAHL;AAIE,IAAA,EAAE,EAAC;AAJL,KAMGJ,UAAU,CAACO,GAAX,CAAgBC,SAAD,IACd,oBAAC,UAAD;AAAY,IAAA,GAAG,EAAEA;AAAjB,KAA6BA,SAA7B,CADD,CANH,CADF,EAWE;AAAK,IAAA,KAAK,EAAE;AAAEC,MAAAA,QAAQ,EAAE;AAAZ;AAAZ,KACE,oBAAC,WAAD;AACE,IAAA,GAAG,EAAEX,GADP;AAEE,IAAA,GAAG,EAAEK,iBAFP;AAGE,IAAA,IAAI,EAAEE,KAAK,CAACF,iBAAD,CAAL,CAAyBO,IAHjC;AAIE,IAAA,IAAI,EAAE,IAJR;AAKE,IAAA,QAAQ,EAAE;AALZ,IADF,CAXF,CADF;AAuBD,CAtCM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react'\nimport React, { useState, useEffect } from 'react'\nimport { ButtonToggle, ButtonItem } from '@looker/components'\nimport type {\n ApiModel,\n KeyedCollection,\n IMethodResponse,\n} from '@looker/sdk-codegen'\n\nimport { ExploreType } from '..'\n\ninterface DocResponseTypesProps {\n api: ApiModel\n responses: KeyedCollection<IMethodResponse>\n}\n\n/**\n * Given a collection of media types (keys) and responses (values) for a response code, generate a group of buttons for\n * toggling media type and render the response\n * @param response\n */\nexport const DocResponseTypes: FC<DocResponseTypesProps> = ({\n api,\n responses,\n}) => {\n const mediaTypes = Object.keys(responses)\n const [selectedMediaType, setSelectedMediaType] = useState(mediaTypes[0])\n const [resps, setResps] = useState(responses)\n\n useEffect(() => {\n /** When new responses are passed, update the default selected media type */\n setSelectedMediaType(mediaTypes[0])\n setResps(responses)\n }, [responses, mediaTypes])\n\n // TODO: Account for endpoints with no responses (e.g. delete a custom cmd)\n return (\n <>\n <ButtonToggle\n value={selectedMediaType}\n onChange={setSelectedMediaType}\n mt=\"large\"\n mb=\"large\"\n >\n {mediaTypes.map((mediaType) => (\n <ButtonItem key={mediaType}>{mediaType}</ButtonItem>\n ))}\n </ButtonToggle>\n <div style={{ overflow: 'auto' }}>\n <ExploreType\n api={api}\n key={selectedMediaType}\n type={resps[selectedMediaType].type}\n link={true}\n maxDepth={2}\n />\n </div>\n </>\n )\n}\n"],"file":"DocResponseTypes.js"}
|
|
@@ -2,11 +2,12 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Tab, TabList, TabPanel, TabPanels, useTabs } from '@looker/components';
|
|
5
|
-
import { CollapserCard } from '
|
|
5
|
+
import { CollapserCard } from '@looker/run-it';
|
|
6
6
|
import { DocResponseTypes } from './DocResponseTypes';
|
|
7
7
|
import { buildResponseTree } from './utils';
|
|
8
8
|
export var DocResponses = _ref => {
|
|
9
9
|
var {
|
|
10
|
+
api,
|
|
10
11
|
responses
|
|
11
12
|
} = _ref;
|
|
12
13
|
var tabs = useTabs();
|
|
@@ -22,6 +23,7 @@ export var DocResponses = _ref => {
|
|
|
22
23
|
}), Object.values(responseTree).map((responses, index) => React.createElement(TabPanel, {
|
|
23
24
|
key: index
|
|
24
25
|
}, React.createElement(DocResponseTypes, {
|
|
26
|
+
api: api,
|
|
25
27
|
responses: responses
|
|
26
28
|
}))))));
|
|
27
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/DocResponses/DocResponses.tsx"],"names":["React","Tab","TabList","TabPanel","TabPanels","useTabs","CollapserCard","DocResponseTypes","buildResponseTree","DocResponses","responses","tabs","length","responseTree","Object","keys","map","statusCode","index","values"],"mappings":";;
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/DocResponses/DocResponses.tsx"],"names":["React","Tab","TabList","TabPanel","TabPanels","useTabs","CollapserCard","DocResponseTypes","buildResponseTree","DocResponses","api","responses","tabs","length","responseTree","Object","keys","map","statusCode","index","values"],"mappings":";;AA2BA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,GAAT,EAAcC,OAAd,EAAuBC,QAAvB,EAAiCC,SAAjC,EAA4CC,OAA5C,QAA2D,oBAA3D;AAGA,SAASC,aAAT,QAA8B,gBAA9B;AACA,SAASC,gBAAT,QAAiC,oBAAjC;AACA,SAASC,iBAAT,QAAkC,SAAlC;AAUA,OAAO,IAAMC,YAAmC,GAAG,QAAwB;AAAA,MAAvB;AAAEC,IAAAA,GAAF;AAAOC,IAAAA;AAAP,GAAuB;AACzE,MAAMC,IAAI,GAAGP,OAAO,EAApB;AAEA,MAAIM,SAAS,CAACE,MAAV,KAAqB,CAAzB,EAA4B,OAAO,yCAAP;AAE5B,MAAMC,YAAY,GAAGN,iBAAiB,CAACG,SAAD,CAAtC;AAEA,SACE,oBAAC,aAAD;AAAe,IAAA,OAAO,EAAC,iBAAvB;AAAyC,IAAA,EAAE,EAAC;AAA5C,KACE,0CACE,oBAAC,OAAD,EAAaC,IAAb,EACGG,MAAM,CAACC,IAAP,CAAYF,YAAZ,EAA0BG,GAA1B,CAA8B,CAACC,UAAD,EAAaC,KAAb,KAC7B,oBAAC,GAAD;AAAK,IAAA,GAAG,EAAEA;AAAV,KAAkBD,UAAlB,CADD,CADH,CADF,EAME,oBAAC,SAAD,eAAeN,IAAf;AAAqB,IAAA,EAAE,EAAC;AAAxB,MACGG,MAAM,CAACK,MAAP,CAAcN,YAAd,EAA4BG,GAA5B,CAAgC,CAACN,SAAD,EAAYQ,KAAZ,KAC/B,oBAAC,QAAD;AAAU,IAAA,GAAG,EAAEA;AAAf,KACE,oBAAC,gBAAD;AAAkB,IAAA,GAAG,EAAET,GAAvB;AAA4B,IAAA,SAAS,EAAEC;AAAvC,IADF,CADD,CADH,CANF,CADF,CADF;AAkBD,CAzBM","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 { Tab, TabList, TabPanel, TabPanels, useTabs } from '@looker/components'\nimport type { IMethodResponse, ApiModel } from '@looker/sdk-codegen'\n\nimport { CollapserCard } from '@looker/run-it'\nimport { DocResponseTypes } from './DocResponseTypes'\nimport { buildResponseTree } from './utils'\n\ninterface DocResponsesProps {\n responses: IMethodResponse[]\n api: ApiModel\n}\n\n/**\n * Renders a tab list and tab panels for different method response types\n */\nexport const DocResponses: FC<DocResponsesProps> = ({ api, responses }) => {\n const tabs = useTabs()\n\n if (responses.length === 0) return <></>\n\n const responseTree = buildResponseTree(responses)\n\n return (\n <CollapserCard heading=\"Response Models\" id=\"response models\">\n <>\n <TabList {...tabs}>\n {Object.keys(responseTree).map((statusCode, index) => (\n <Tab key={index}>{statusCode}</Tab>\n ))}\n </TabList>\n <TabPanels {...tabs} pt=\"0\">\n {Object.values(responseTree).map((responses, index) => (\n <TabPanel key={index}>\n <DocResponseTypes api={api} responses={responses} />\n </TabPanel>\n ))}\n </TabPanels>\n </>\n </CollapserCard>\n )\n}\n"],"file":"DocResponses.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/DocResponses/utils.ts"],"names":["buildResponseTree","responses","tree","Object","values","forEach","response","node","statusCode","description","mediaType"],"mappings":"AAiCA,OAAO,IAAMA,iBAAiB,GAC5BC,SAD+B,IAEuB;AACtD,MAAMC,IAAI,GAAG,EAAb;AACAC,EAAAA,MAAM,CAACC,MAAP,CAAcH,SAAd,EAAyBI,OAAzB,CAAkCC,QAAD,IAAc;AAC7C,QAAMC,IAAI,aAAMD,QAAQ,CAACE,UAAf,eAA8BF,QAAQ,CAACG,WAAvC,CAAV;AACA,QAAI,EAAEF,IAAI,IAAIL,IAAV,CAAJ,EAAqBA,IAAI,CAACK,IAAD,CAAJ,GAAa,EAAb;AACrBL,IAAAA,IAAI,CAACK,IAAD,CAAJ,CAAWD,QAAQ,CAACI,SAApB,IAAiCJ,QAAjC;AACD,GAJD;AAKA,SAAOJ,IAAP;AACD,CAVM","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 { IMethodResponse, KeyedCollection } from '@looker/sdk-codegen'\n\n/**\n * Given an array of method responses, group them by statusCode. The value of each status code is a collection of\n * media types (keys) and responses (values)\n * @param responses An array of method responses\n */\nexport const buildResponseTree = (\n responses: IMethodResponse[]\n): KeyedCollection<KeyedCollection<IMethodResponse>> => {\n const tree = {}\n Object.values(responses).forEach((response) => {\n const node = `${response.statusCode}: ${response.description}`\n if (!(node in tree)) tree[node] = {}\n tree[node][response.mediaType] = response\n })\n return tree\n}\n"],"file":"utils.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/DocResponses/utils.ts"],"names":["buildResponseTree","responses","tree","Object","values","forEach","response","node","statusCode","description","mediaType"],"mappings":"AAiCA,OAAO,IAAMA,iBAAiB,GAC5BC,SAD+B,IAEuB;AACtD,MAAMC,IAAI,GAAG,EAAb;AACAC,EAAAA,MAAM,CAACC,MAAP,CAAcH,SAAd,EAAyBI,OAAzB,CAAkCC,QAAD,IAAc;AAC7C,QAAMC,IAAI,aAAMD,QAAQ,CAACE,UAAf,eAA8BF,QAAQ,CAACG,WAAvC,CAAV;AACA,QAAI,EAAEF,IAAI,IAAIL,IAAV,CAAJ,EAAqBA,IAAI,CAACK,IAAD,CAAJ,GAAa,EAAb;AACrBL,IAAAA,IAAI,CAACK,IAAD,CAAJ,CAAWD,QAAQ,CAACI,SAApB,IAAiCJ,QAAjC;AACD,GAJD;AAKA,SAAOJ,IAAP;AACD,CAVM","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 { IMethodResponse, KeyedCollection } from '@looker/sdk-codegen'\n\n/**\n * Given an array of method responses, group them by statusCode. The value of each status code is a collection of\n * media types (keys) and responses (values)\n * @param responses An array of method responses\n */\nexport const buildResponseTree = (\n responses: IMethodResponse[]\n): KeyedCollection<KeyedCollection<IMethodResponse>> => {\n const tree = {}\n Object.values(responses).forEach((response) => {\n const node = `${response.statusCode}: ${response.description}`\n if (!(node in tree)) tree[node] = {}\n tree[node][response.mediaType] = response\n })\n return tree\n}\n"],"file":"utils.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/DocSDKs/DocDeclarations.tsx"],"names":["Tab","TabList","TabPanel","TabPanels","useTabs","React","DocCode","DocDeclarations","declarations","tabs","Object","keys","map","language","entries","code"],"mappings":";;AAyBA,SAASA,GAAT,EAAcC,OAAd,EAAuBC,QAAvB,EAAiCC,SAAjC,EAA4CC,OAA5C,QAA2D,oBAA3D;
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/DocSDKs/DocDeclarations.tsx"],"names":["Tab","TabList","TabPanel","TabPanels","useTabs","React","DocCode","DocDeclarations","declarations","tabs","Object","keys","map","language","entries","code"],"mappings":";;AAyBA,SAASA,GAAT,EAAcC,OAAd,EAAuBC,QAAvB,EAAiCC,SAAjC,EAA4CC,OAA5C,QAA2D,oBAA3D;AAGA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAASC,OAAT,QAAwB,YAAxB;AAUA,OAAO,IAAMC,eAAyC,GAAG,QAAsB;AAAA,MAArB;AAAEC,IAAAA;AAAF,GAAqB;AAC7E,MAAMC,IAAI,GAAGL,OAAO,EAApB;AAEA,SACE,0CACE,oBAAC,OAAD,EAAaK,IAAb,EACGC,MAAM,CAACC,IAAP,CAAYH,YAAZ,EAA0BI,GAA1B,CAA+BC,QAAD,IAC7B,oBAAC,GAAD;AAAK,IAAA,GAAG,EAAEA;AAAV,KAAqBA,QAArB,CADD,CADH,CADF,EAME,oBAAC,SAAD,eAAeJ,IAAf;AAAqB,IAAA,EAAE,EAAC;AAAxB,MACGC,MAAM,CAACI,OAAP,CAAeN,YAAf,EAA6BI,GAA7B,CAAiC;AAAA,QAAC,CAACC,QAAD,EAAWE,IAAX,CAAD;AAAA,WAChC,oBAAC,QAAD;AAAU,MAAA,GAAG,EAAEF;AAAf,OACE,oBAAC,OAAD;AAAS,MAAA,QAAQ,EAAEA,QAAnB;AAA6B,MAAA,IAAI,EAAEE;AAAnC,MADF,CADgC;AAAA,GAAjC,CADH,CANF,CADF;AAgBD,CAnBM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { Tab, TabList, TabPanel, TabPanels, useTabs } from '@looker/components'\nimport type { KeyedCollection } from '@looker/sdk-codegen'\nimport type { FC } from 'react'\nimport React from 'react'\nimport { DocCode } from '../DocCode'\n\ninterface DocDeclarationsProps {\n declarations: KeyedCollection<string>\n}\n\n/**\n * Renders all provided declarations\n * @param declarations A collection of SDK declarations in various languages\n */\nexport const DocDeclarations: FC<DocDeclarationsProps> = ({ declarations }) => {\n const tabs = useTabs()\n\n return (\n <>\n <TabList {...tabs}>\n {Object.keys(declarations).map((language) => (\n <Tab key={language}>{language}</Tab>\n ))}\n </TabList>\n <TabPanels {...tabs} pt=\"0\">\n {Object.entries(declarations).map(([language, code]) => (\n <TabPanel key={language}>\n <DocCode language={language} code={code} />\n </TabPanel>\n ))}\n </TabPanels>\n </>\n )\n}\n"],"file":"DocDeclarations.js"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { useSelector } from 'react-redux';
|
|
3
3
|
import { Method } from '@looker/sdk-codegen';
|
|
4
|
-
import { getGenerators } from '@looker/run-it';
|
|
4
|
+
import { CollapserCard, getGenerators } from '@looker/run-it';
|
|
5
5
|
import { DocCode } from '../DocCode';
|
|
6
|
-
import {
|
|
7
|
-
import { CollapserCard } from '../Collapser';
|
|
6
|
+
import { selectSdkLanguage } from '../../state';
|
|
8
7
|
import { noComment } from './utils';
|
|
9
8
|
import { DocDeclarations } from './DocDeclarations';
|
|
10
9
|
|
|
@@ -27,7 +26,7 @@ export var DocSDKs = _ref2 => {
|
|
|
27
26
|
method,
|
|
28
27
|
type
|
|
29
28
|
} = _ref2;
|
|
30
|
-
var sdkLanguage = useSelector(
|
|
29
|
+
var sdkLanguage = useSelector(selectSdkLanguage);
|
|
31
30
|
var generators = getGenerators(api);
|
|
32
31
|
var [item, setItem] = useState(method ? noComment(method) : type);
|
|
33
32
|
var [declarations, setDeclarations] = useState(getDeclarations(generators, sdkLanguage, item));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/DocSDKs/DocSDKs.tsx"],"names":["React","useState","useEffect","useSelector","Method","
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/DocSDKs/DocSDKs.tsx"],"names":["React","useState","useEffect","useSelector","Method","CollapserCard","getGenerators","DocCode","selectSdkLanguage","noComment","DocDeclarations","getDeclarations","generators","sdkLanguage","item","declarations","Object","entries","forEach","language","gen","code","declareMethod","declareType","DocSDKs","api","method","type","setItem","setDeclarations","header","setHeader","languages","keys","length","values"],"mappings":"AA2BA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,SAASC,WAAT,QAA4B,aAA5B;AAQA,SAASC,MAAT,QAAuB,qBAAvB;AACA,SAASC,aAAT,EAAwBC,aAAxB,QAA6C,gBAA7C;AAEA,SAASC,OAAT,QAAwB,YAAxB;AACA,SAASC,iBAAT,QAAkC,aAAlC;AACA,SAASC,SAAT,QAA0B,SAA1B;AACA,SAASC,eAAT,QAAgC,mBAAhC;;AAWA,IAAMC,eAAe,GAAG,CACtBC,UADsB,EAEtBC,WAFsB,EAGtBC,IAHsB,KAInB;AACH,MAAMC,YAAqC,GAAG,EAA9C;AACAC,EAAAA,MAAM,CAACC,OAAP,CAAeL,UAAf,EAA2BM,OAA3B,CAAmC,QAAqB;AAAA,QAApB,CAACC,QAAD,EAAWC,GAAX,CAAoB;;AACtD,QAAIP,WAAW,KAAK,KAAhB,IAAyBM,QAAQ,KAAKN,WAA1C,EAAuD;AACrD,UAAMQ,IAAI,GACRP,IAAI,YAAYV,MAAhB,GACIgB,GAAG,CAACE,aAAJ,CAAkB,EAAlB,EAAsBR,IAAtB,CADJ,GAEIM,GAAG,CAACG,WAAJ,CAAgB,EAAhB,EAAoBT,IAApB,CAHN;AAIAC,MAAAA,YAAY,CAACI,QAAD,CAAZ,GAAyBE,IAAzB;AACD;AACF,GARD;AASA,SAAON,YAAP;AACD,CAhBD;;AAqBA,OAAO,IAAMS,OAA6B,GAAG,SAA2B;AAAA,MAA1B;AAAEC,IAAAA,GAAF;AAAOC,IAAAA,MAAP;AAAeC,IAAAA;AAAf,GAA0B;AACtE,MAAMd,WAAW,GAAGV,WAAW,CAACK,iBAAD,CAA/B;AACA,MAAMI,UAAU,GAAGN,aAAa,CAACmB,GAAD,CAAhC;AACA,MAAM,CAACX,IAAD,EAAOc,OAAP,IAAkB3B,QAAQ,CAACyB,MAAM,GAAGjB,SAAS,CAACiB,MAAD,CAAZ,GAAuBC,IAA9B,CAAhC;AACA,MAAM,CAACZ,YAAD,EAAec,eAAf,IAAkC5B,QAAQ,CAC9CU,eAAe,CAACC,UAAD,EAAaC,WAAb,EAA0BC,IAA1B,CAD+B,CAAhD;AAGA,MAAM,CAACgB,MAAD,EAASC,SAAT,IAAsB9B,QAAQ,WAAIY,WAAJ,kBAApC;AAEAX,EAAAA,SAAS,CAAC,MAAM;AACd0B,IAAAA,OAAO,CAACF,MAAM,GAAGjB,SAAS,CAACiB,MAAD,CAAZ,GAAuBC,IAA9B,CAAP;AACD,GAFQ,EAEN,CAACD,MAAD,EAASC,IAAT,CAFM,CAAT;AAIAzB,EAAAA,SAAS,CAAC,MAAM;AACd,QAAMa,YAAY,GAAGJ,eAAe,CAACC,UAAD,EAAaC,WAAb,EAA0BC,IAA1B,CAApC;AACAe,IAAAA,eAAe,CAACd,YAAD,CAAf;AACA,QAAMiB,SAAS,GAAGhB,MAAM,CAACiB,IAAP,CAAYlB,YAAZ,CAAlB;;AACA,QAAIiB,SAAS,CAACE,MAAV,GAAmB,CAAvB,EAA0B;AACxBH,MAAAA,SAAS,CAAC,cAAD,CAAT;AACD,KAFD,MAEO;AACLA,MAAAA,SAAS,WAAIC,SAAS,CAAC,CAAD,CAAb,kBAAT;AACD;AACF,GATQ,EASN,CAACnB,WAAD,EAAcC,IAAd,CATM,CAAT;AAWA,SACE,oBAAC,aAAD;AAAe,IAAA,OAAO,EAAEgB,MAAxB;AAAgC,IAAA,EAAE,EAAC;AAAnC,KACGd,MAAM,CAACiB,IAAP,CAAYlB,YAAZ,EAA0BmB,MAA1B,GAAmC,CAAnC,GACC,oBAAC,eAAD;AAAiB,IAAA,YAAY,EAAEnB;AAA/B,IADD,GAGC,oBAAC,OAAD;AACE,IAAA,QAAQ,EAAEC,MAAM,CAACiB,IAAP,CAAYlB,YAAZ,EAA0B,CAA1B,CADZ;AAEE,IAAA,IAAI,EAAEC,MAAM,CAACmB,MAAP,CAAcpB,YAAd,EAA4B,CAA5B;AAFR,IAJJ,CADF;AAYD,CApCM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react'\nimport React, { useState, useEffect } from 'react'\nimport { useSelector } from 'react-redux'\nimport type {\n IMethod,\n IType,\n ApiModel,\n KeyedCollection,\n CodeGen,\n} from '@looker/sdk-codegen'\nimport { Method } from '@looker/sdk-codegen'\nimport { CollapserCard, getGenerators } from '@looker/run-it'\n\nimport { DocCode } from '../DocCode'\nimport { selectSdkLanguage } from '../../state'\nimport { noComment } from './utils'\nimport { DocDeclarations } from './DocDeclarations'\n\ninterface LanguageSDKProps {\n /** API spec */\n api: ApiModel\n /** An SDK method */\n method?: IMethod\n /** An SDK type */\n type?: IType\n}\n\nconst getDeclarations = (\n generators: KeyedCollection<CodeGen>,\n sdkLanguage: string,\n item: IMethod | IType\n) => {\n const declarations: KeyedCollection<string> = {}\n Object.entries(generators).forEach(([language, gen]) => {\n if (sdkLanguage === 'All' || language === sdkLanguage) {\n const code =\n item instanceof Method\n ? gen.declareMethod('', item as IMethod)\n : gen.declareType('', item as IType)\n declarations[language] = code\n }\n })\n return declarations\n}\n\n/**\n * Given a method or a type, it renders its SDK declaration in all supported languages.\n */\nexport const DocSDKs: FC<LanguageSDKProps> = ({ api, method, type }) => {\n const sdkLanguage = useSelector(selectSdkLanguage)\n const generators = getGenerators(api)\n const [item, setItem] = useState(method ? noComment(method) : type!)\n const [declarations, setDeclarations] = useState(\n getDeclarations(generators, sdkLanguage, item)\n )\n const [header, setHeader] = useState(`${sdkLanguage} Declaration`)\n\n useEffect(() => {\n setItem(method ? noComment(method) : type!)\n }, [method, type])\n\n useEffect(() => {\n const declarations = getDeclarations(generators, sdkLanguage, item)\n setDeclarations(declarations)\n const languages = Object.keys(declarations)\n if (languages.length > 1) {\n setHeader('Declarations')\n } else {\n setHeader(`${languages[0]} Declaration`)\n }\n }, [sdkLanguage, item])\n\n return (\n <CollapserCard heading={header} id=\"sdk declarations\">\n {Object.keys(declarations).length > 1 ? (\n <DocDeclarations declarations={declarations} />\n ) : (\n <DocCode\n language={Object.keys(declarations)[0]}\n code={Object.values(declarations)[0]}\n />\n )}\n </CollapserCard>\n )\n}\n"],"file":"DocSDKs.js"}
|