@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,46 +1,90 @@
|
|
|
1
|
-
|
|
1
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
2
|
+
|
|
3
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
4
|
+
|
|
5
|
+
import React, { useState, useEffect } from 'react';
|
|
2
6
|
import { Aside, Button, ButtonOutline, Space, useToggle, ExtendComponentsThemeProvider } from '@looker/components';
|
|
3
7
|
import { Beaker } from '@looker/icons';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { RunIt, RunItContext } from '@looker/run-it';
|
|
8
|
+
import { useHistory, useParams } from 'react-router-dom';
|
|
9
|
+
import { RunIt, RunItFormKey } from '@looker/run-it';
|
|
7
10
|
import { typeRefs } from '@looker/sdk-codegen';
|
|
8
11
|
import { useSelector } from 'react-redux';
|
|
9
12
|
import { ApixSection, DocActivityType, DocMarkdown, DocRateLimited, DocReferences, DocResponses, DocSDKs, DocSdkUsage, DocSource, DocStatus, DocTitle, DocSchema } from '../../components';
|
|
10
|
-
import {
|
|
13
|
+
import { selectSdkLanguage } from '../../state';
|
|
11
14
|
import { DocOperation, DocRequestBody } from './components';
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
|
|
16
|
+
var showRunIt = function () {
|
|
17
|
+
var _ref = _asyncToGenerator(function* (adaptor) {
|
|
18
|
+
var data = yield adaptor.localStorageGetItem(RunItFormKey);
|
|
19
|
+
return !!data;
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
return function showRunIt(_x) {
|
|
23
|
+
return _ref.apply(this, arguments);
|
|
24
|
+
};
|
|
25
|
+
}();
|
|
26
|
+
|
|
27
|
+
export var MethodScene = _ref2 => {
|
|
14
28
|
var {
|
|
15
|
-
api
|
|
16
|
-
|
|
29
|
+
api,
|
|
30
|
+
adaptor,
|
|
31
|
+
setVersionsUrl
|
|
32
|
+
} = _ref2;
|
|
33
|
+
var history = useHistory();
|
|
34
|
+
var sdkLanguage = useSelector(selectSdkLanguage);
|
|
17
35
|
var {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var {
|
|
22
|
-
methodName,
|
|
23
|
-
specKey
|
|
36
|
+
specKey,
|
|
37
|
+
methodTag,
|
|
38
|
+
methodName
|
|
24
39
|
} = useParams();
|
|
25
40
|
var {
|
|
26
41
|
value,
|
|
27
|
-
toggle
|
|
42
|
+
toggle,
|
|
43
|
+
setOn
|
|
28
44
|
} = useToggle();
|
|
29
45
|
var [method, setMethod] = useState(api.methods[methodName]);
|
|
30
|
-
var seeTypes = typeRefs(api, method.customTypes);
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
setMethod(api.methods[methodName]);
|
|
33
|
-
}, [api, methodName]);
|
|
34
|
-
var {
|
|
35
|
-
colors
|
|
36
|
-
} = useContext(ThemeContext);
|
|
46
|
+
var seeTypes = typeRefs(api, method === null || method === void 0 ? void 0 : method.customTypes);
|
|
37
47
|
var RunItButton = value ? Button : ButtonOutline;
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
var foundMethod = api.methods[methodName];
|
|
50
|
+
|
|
51
|
+
if (foundMethod) {
|
|
52
|
+
setMethod(api.methods[methodName]);
|
|
53
|
+
} else {
|
|
54
|
+
if (api.tags[methodTag]) {
|
|
55
|
+
history.push("/".concat(specKey, "/methods/").concat(methodTag));
|
|
56
|
+
} else {
|
|
57
|
+
history.push("/".concat(specKey, "/methods"));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}, [api, history, methodName, methodTag, specKey]);
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
var checkRunIt = function () {
|
|
63
|
+
var _ref3 = _asyncToGenerator(function* () {
|
|
64
|
+
try {
|
|
65
|
+
var show = yield showRunIt(adaptor);
|
|
66
|
+
|
|
67
|
+
if (show) {
|
|
68
|
+
setOn();
|
|
69
|
+
}
|
|
70
|
+
} catch (error) {
|
|
71
|
+
console.error(error);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
return function checkRunIt() {
|
|
76
|
+
return _ref3.apply(this, arguments);
|
|
77
|
+
};
|
|
78
|
+
}();
|
|
79
|
+
|
|
80
|
+
checkRunIt();
|
|
81
|
+
}, [adaptor, setOn]);
|
|
38
82
|
var runItToggle = React.createElement(RunItButton, {
|
|
39
83
|
color: value ? 'key' : 'neutral',
|
|
40
84
|
iconBefore: React.createElement(Beaker, null),
|
|
41
85
|
onClick: toggle
|
|
42
86
|
}, "Run It");
|
|
43
|
-
return React.createElement(React.Fragment, null, React.createElement(ApixSection, null, React.createElement(Space, {
|
|
87
|
+
return React.createElement(React.Fragment, null, method && React.createElement(ApixSection, null, React.createElement(Space, {
|
|
44
88
|
between: true
|
|
45
89
|
}, React.createElement(Space, null, React.createElement(DocTitle, null, method.summary), React.createElement(DocSource, {
|
|
46
90
|
method: method
|
|
@@ -62,6 +106,7 @@ export var MethodScene = _ref => {
|
|
|
62
106
|
api: api,
|
|
63
107
|
method: method
|
|
64
108
|
}), React.createElement(DocRequestBody, {
|
|
109
|
+
api: api,
|
|
65
110
|
method: method
|
|
66
111
|
}), React.createElement(DocSdkUsage, {
|
|
67
112
|
method: method
|
|
@@ -70,23 +115,29 @@ export var MethodScene = _ref => {
|
|
|
70
115
|
api: api,
|
|
71
116
|
specKey: specKey
|
|
72
117
|
}), React.createElement(DocResponses, {
|
|
118
|
+
api: api,
|
|
73
119
|
responses: method.responses
|
|
74
120
|
}), React.createElement(DocSchema, {
|
|
75
121
|
object: method.schema
|
|
76
|
-
})),
|
|
122
|
+
})), value && React.createElement(Aside, {
|
|
77
123
|
width: "50rem"
|
|
78
124
|
}, React.createElement(ExtendComponentsThemeProvider, {
|
|
79
125
|
themeCustomizations: {
|
|
80
126
|
colors: {
|
|
81
|
-
background:
|
|
82
|
-
|
|
127
|
+
background: '#262D33',
|
|
128
|
+
key: '#8AB4F8',
|
|
129
|
+
text: '#fff',
|
|
130
|
+
link: '#8AB4F8',
|
|
131
|
+
critical: '#FF877C'
|
|
83
132
|
}
|
|
84
133
|
}
|
|
85
134
|
}, React.createElement(RunIt, {
|
|
135
|
+
adaptor: adaptor,
|
|
136
|
+
key: method.operationId,
|
|
86
137
|
sdkLanguage: sdkLanguage,
|
|
87
138
|
api: api,
|
|
88
|
-
|
|
89
|
-
|
|
139
|
+
method: method,
|
|
140
|
+
setVersionsUrl: setVersionsUrl
|
|
90
141
|
}))));
|
|
91
142
|
};
|
|
92
143
|
//# sourceMappingURL=MethodScene.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/scenes/MethodScene/MethodScene.tsx"],"names":["React","useContext","useState","useEffect","Aside","Button","ButtonOutline","Space","useToggle","ExtendComponentsThemeProvider","Beaker","ThemeContext","useParams","RunIt","RunItContext","typeRefs","useSelector","ApixSection","DocActivityType","DocMarkdown","DocRateLimited","DocReferences","DocResponses","DocSDKs","DocSdkUsage","DocSource","DocStatus","DocTitle","DocSchema","getSelectedSdkLanguage","DocOperation","DocRequestBody","createInputs","MethodScene","api","sdk","sdkLanguage","methodName","specKey","value","toggle","method","setMethod","methods","seeTypes","customTypes","colors","RunItButton","runItToggle","summary","description","responses","schema","background","text"],"mappings":"AA0BA,OAAOA,KAAP,IAAoBC,UAApB,EAAgCC,QAAhC,EAA0CC,SAA1C,QAA2D,OAA3D;AACA,SACEC,KADF,EAEEC,MAFF,EAGEC,aAHF,EAIEC,KAJF,EAKEC,SALF,EAMEC,6BANF,QAOO,oBAPP;AAQA,SAASC,MAAT,QAAuB,eAAvB;AACA,SAASC,YAAT,QAA6B,mBAA7B;AACA,SAASC,SAAT,QAA0B,kBAA1B;AACA,SAASC,KAAT,EAAgBC,YAAhB,QAAoC,gBAApC;AACA,SAAmBC,QAAnB,QAAmC,qBAAnC;AACA,SAASC,WAAT,QAA4B,aAA5B;AAEA,SACEC,WADF,EAEEC,eAFF,EAGEC,WAHF,EAIEC,cAJF,EAKEC,aALF,EAMEC,YANF,EAOEC,OAPF,EAQEC,WARF,EASEC,SATF,EAUEC,SAVF,EAWEC,QAXF,EAYEC,SAZF,QAaO,kBAbP;AAcA,SAASC,sBAAT,QAAuC,aAAvC;AACA,SAASC,YAAT,EAAuBC,cAAvB,QAA6C,cAA7C;AACA,SAASC,YAAT,QAA6B,SAA7B;AAWA,OAAO,IAAMC,WAA+B,GAAG,QAAa;AAAA,MAAZ;AAAEC,IAAAA;AAAF,GAAY;AAC1D,MAAM;AAAEC,IAAAA;AAAF,MAAUlC,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Content":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { FC, useContext, useState, useEffect } from 'react'\nimport {\n Aside,\n Button,\n ButtonOutline,\n Space,\n useToggle,\n ExtendComponentsThemeProvider,\n} from '@looker/components'\nimport { Beaker } from '@looker/icons'\nimport { ThemeContext } from 'styled-components'\nimport { useParams } from 'react-router-dom'\nimport { RunIt, RunItContext } from '@looker/run-it'\nimport { ApiModel, typeRefs } from '@looker/sdk-codegen'\nimport { useSelector } from 'react-redux'\n\nimport {\n ApixSection,\n DocActivityType,\n DocMarkdown,\n DocRateLimited,\n DocReferences,\n DocResponses,\n DocSDKs,\n DocSdkUsage,\n DocSource,\n DocStatus,\n DocTitle,\n DocSchema,\n} from '../../components'\nimport { getSelectedSdkLanguage } from '../../state'\nimport { DocOperation, DocRequestBody } from './components'\nimport { createInputs } from './utils'\n\ninterface DocMethodProps {\n api: ApiModel\n}\n\ninterface DocMethodParams {\n methodName: string\n specKey: string\n}\n\nexport const MethodScene: FC<DocMethodProps> = ({ api }) => {\n const { sdk } = useContext(RunItContext)\n const sdkLanguage = useSelector(getSelectedSdkLanguage)\n const { methodName, specKey } = useParams<DocMethodParams>()\n const { value, toggle } = useToggle()\n const [method, setMethod] = useState(api.methods[methodName])\n const seeTypes = typeRefs(api, method.customTypes)\n\n useEffect(() => {\n setMethod(api.methods[methodName])\n }, [api, methodName])\n\n const { colors } = useContext(ThemeContext)\n\n const RunItButton = value ? Button : ButtonOutline\n const runItToggle = (\n <RunItButton\n color={value ? 'key' : 'neutral'}\n iconBefore={<Beaker />}\n onClick={toggle}\n >\n Run It\n </RunItButton>\n )\n\n return (\n <>\n <ApixSection>\n <Space between>\n <Space>\n <DocTitle>{method.summary}</DocTitle>\n <DocSource method={method} />\n </Space>\n {runItToggle}\n </Space>\n <Space mb=\"large\" gap=\"small\">\n <DocStatus method={method} />\n <DocActivityType method={method} />\n <DocRateLimited method={method} />\n </Space>\n <DocOperation method={method} />\n <DocMarkdown source={method.description} specKey={specKey} />\n <DocSDKs api={api} method={method} />\n <DocRequestBody method={method} />\n <DocSdkUsage method={method} />\n <DocReferences typesUsed={seeTypes} api={api} specKey={specKey} />\n <DocResponses responses={method.responses} />\n <DocSchema object={method.schema} />\n </ApixSection>\n {sdk && value && (\n <Aside width=\"50rem\">\n <ExtendComponentsThemeProvider\n themeCustomizations={{\n colors: {\n background: colors.text,\n text: colors.background,\n },\n }}\n >\n <RunIt\n sdkLanguage={sdkLanguage}\n api={api}\n inputs={createInputs(api, method)}\n method={method}\n />\n </ExtendComponentsThemeProvider>\n </Aside>\n )}\n </>\n )\n}\n"],"file":"MethodScene.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/scenes/MethodScene/MethodScene.tsx"],"names":["React","useState","useEffect","Aside","Button","ButtonOutline","Space","useToggle","ExtendComponentsThemeProvider","Beaker","useHistory","useParams","RunIt","RunItFormKey","typeRefs","useSelector","ApixSection","DocActivityType","DocMarkdown","DocRateLimited","DocReferences","DocResponses","DocSDKs","DocSdkUsage","DocSource","DocStatus","DocTitle","DocSchema","selectSdkLanguage","DocOperation","DocRequestBody","showRunIt","adaptor","data","localStorageGetItem","MethodScene","api","setVersionsUrl","history","sdkLanguage","specKey","methodTag","methodName","value","toggle","setOn","method","setMethod","methods","seeTypes","customTypes","RunItButton","foundMethod","tags","push","checkRunIt","show","error","console","runItToggle","summary","description","responses","schema","colors","background","key","text","link","critical","operationId"],"mappings":";;;;AA2BA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,SACEC,KADF,EAEEC,MAFF,EAGEC,aAHF,EAIEC,KAJF,EAKEC,SALF,EAMEC,6BANF,QAOO,oBAPP;AAQA,SAASC,MAAT,QAAuB,eAAvB;AACA,SAASC,UAAT,EAAqBC,SAArB,QAAsC,kBAAtC;AAEA,SAASC,KAAT,EAAgBC,YAAhB,QAAoC,gBAApC;AAEA,SAASC,QAAT,QAAyB,qBAAzB;AACA,SAASC,WAAT,QAA4B,aAA5B;AAGA,SACEC,WADF,EAEEC,eAFF,EAGEC,WAHF,EAIEC,cAJF,EAKEC,aALF,EAMEC,YANF,EAOEC,OAPF,EAQEC,WARF,EASEC,SATF,EAUEC,SAVF,EAWEC,QAXF,EAYEC,SAZF,QAaO,kBAbP;AAcA,SAASC,iBAAT,QAAkC,aAAlC;AACA,SAASC,YAAT,EAAuBC,cAAvB,QAA6C,cAA7C;;AAcA,IAAMC,SAAS;AAAA,+BAAG,WAAOC,OAAP,EAAwC;AACxD,QAAMC,IAAI,SAASD,OAAO,CAACE,mBAAR,CAA4BrB,YAA5B,CAAnB;AACA,WAAO,CAAC,CAACoB,IAAT;AACD,GAHc;;AAAA,kBAATF,SAAS;AAAA;AAAA;AAAA,GAAf;;AAKA,OAAO,IAAMI,WAAiC,GAAG,SAI3C;AAAA,MAJ4C;AAChDC,IAAAA,GADgD;AAEhDJ,IAAAA,OAFgD;AAGhDK,IAAAA;AAHgD,GAI5C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,IAAA,MAAM,EAAEU;AAAlC,IAhBF,EAiBE,oBAAC,WAAD;AAAa,IAAA,MAAM,EAAEA;AAArB,IAjBF,EAkBE,oBAAC,aAAD;AAAe,IAAA,SAAS,EAAEG,QAA1B;AAAoC,IAAA,GAAG,EAAEb,GAAzC;AAA8C,IAAA,OAAO,EAAEI;AAAvD,IAlBF,EAmBE,oBAAC,YAAD;AAAc,IAAA,GAAG,EAAEJ,GAAnB;AAAwB,IAAA,SAAS,EAAEU,MAAM,CAACgB;AAA1C,IAnBF,EAoBE,oBAAC,SAAD;AAAW,IAAA,MAAM,EAAEhB,MAAM,CAACiB;AAA1B,IApBF,CAFJ,EAyBGpB,KAAK,IACJ,oBAAC,KAAD;AAAO,IAAA,KAAK,EAAC;AAAb,KACE,oBAAC,6BAAD;AACE,IAAA,mBAAmB,EAAE;AACnBqB,MAAAA,MAAM,EAAE;AACNC,QAAAA,UAAU,EAAE,SADN;AAENC,QAAAA,GAAG,EAAE,SAFC;AAGNC,QAAAA,IAAI,EAAE,MAHA;AAINC,QAAAA,IAAI,EAAE,SAJA;AAKNC,QAAAA,QAAQ,EAAE;AALJ;AADW;AADvB,KAWE,oBAAC,KAAD;AACE,IAAA,OAAO,EAAErC,OADX;AAEE,IAAA,GAAG,EAAEc,MAAM,CAACwB,WAFd;AAGE,IAAA,WAAW,EAAE/B,WAHf;AAIE,IAAA,GAAG,EAAEH,GAJP;AAKE,IAAA,MAAM,EAAEU,MALV;AAME,IAAA,cAAc,EAAET;AANlB,IAXF,CADF,CA1BJ,CADF;AAoDD,CAzGM","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 {\n Aside,\n Button,\n ButtonOutline,\n Space,\n useToggle,\n ExtendComponentsThemeProvider,\n} from '@looker/components'\nimport { Beaker } from '@looker/icons'\nimport { useHistory, useParams } from 'react-router-dom'\nimport type { RunItSetter } from '@looker/run-it'\nimport { RunIt, RunItFormKey } from '@looker/run-it'\nimport type { ApiModel } from '@looker/sdk-codegen'\nimport { typeRefs } from '@looker/sdk-codegen'\nimport { useSelector } from 'react-redux'\n\nimport type { IEnvironmentAdaptor } from '@looker/extension-utils'\nimport {\n ApixSection,\n DocActivityType,\n DocMarkdown,\n DocRateLimited,\n DocReferences,\n DocResponses,\n DocSDKs,\n DocSdkUsage,\n DocSource,\n DocStatus,\n DocTitle,\n DocSchema,\n} from '../../components'\nimport { selectSdkLanguage } from '../../state'\nimport { DocOperation, DocRequestBody } from './components'\n\ninterface MethodSceneProps {\n api: ApiModel\n adaptor: IEnvironmentAdaptor\n setVersionsUrl: RunItSetter\n}\n\ninterface MethodSceneParams {\n methodName: string\n methodTag: string\n specKey: string\n}\n\nconst showRunIt = async (adaptor: IEnvironmentAdaptor) => {\n const data = await adaptor.localStorageGetItem(RunItFormKey)\n return !!data\n}\n\nexport const MethodScene: FC<MethodSceneProps> = ({\n api,\n adaptor,\n setVersionsUrl,\n}) => {\n const history = useHistory()\n const sdkLanguage = useSelector(selectSdkLanguage)\n const { specKey, methodTag, methodName } = useParams<MethodSceneParams>()\n const { value, toggle, setOn } = useToggle()\n const [method, setMethod] = useState(api.methods[methodName])\n const seeTypes = typeRefs(api, method?.customTypes)\n\n const RunItButton = value ? Button : ButtonOutline\n\n useEffect(() => {\n const foundMethod = api.methods[methodName]\n if (foundMethod) {\n setMethod(api.methods[methodName])\n } else {\n // Invalid method\n if (api.tags[methodTag]) {\n // Found tag though\n history.push(`/${specKey}/methods/${methodTag}`)\n } else {\n history.push(`/${specKey}/methods`)\n }\n }\n }, [api, history, methodName, methodTag, specKey])\n\n useEffect(() => {\n const checkRunIt = async () => {\n try {\n const show = await showRunIt(adaptor)\n if (show) {\n setOn()\n }\n } catch (error) {\n console.error(error)\n }\n }\n checkRunIt()\n }, [adaptor, setOn])\n\n const runItToggle = (\n <RunItButton\n color={value ? 'key' : 'neutral'}\n iconBefore={<Beaker />}\n onClick={toggle}\n >\n Run It\n </RunItButton>\n )\n\n return (\n <>\n {method && (\n <ApixSection>\n <Space between>\n <Space>\n <DocTitle>{method.summary}</DocTitle>\n <DocSource method={method} />\n </Space>\n {runItToggle}\n </Space>\n <Space mb=\"large\" gap=\"small\">\n <DocStatus method={method} />\n <DocActivityType method={method} />\n <DocRateLimited method={method} />\n </Space>\n <DocOperation method={method} />\n <DocMarkdown source={method.description} specKey={specKey} />\n <DocSDKs api={api} method={method} />\n <DocRequestBody api={api} method={method} />\n <DocSdkUsage method={method} />\n <DocReferences typesUsed={seeTypes} api={api} specKey={specKey} />\n <DocResponses api={api} responses={method.responses} />\n <DocSchema object={method.schema} />\n </ApixSection>\n )}\n {value && (\n <Aside width=\"50rem\">\n <ExtendComponentsThemeProvider\n themeCustomizations={{\n colors: {\n background: '#262D33',\n key: '#8AB4F8',\n text: '#fff',\n link: '#8AB4F8',\n critical: '#FF877C',\n },\n }}\n >\n <RunIt\n adaptor={adaptor}\n key={method.operationId}\n sdkLanguage={sdkLanguage}\n api={api}\n method={method}\n setVersionsUrl={setVersionsUrl}\n />\n </ExtendComponentsThemeProvider>\n </Aside>\n )}\n </>\n )\n}\n"],"file":"MethodScene.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/scenes/MethodScene/components/DocOperation.tsx"],"names":["React","Code","Flex","SpaceVertical","Text","MethodBadge","DocPseudo","DocOperation","method","httpMethod","endpoint"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/scenes/MethodScene/components/DocOperation.tsx"],"names":["React","Code","Flex","SpaceVertical","Text","MethodBadge","DocPseudo","DocOperation","method","httpMethod","endpoint"],"mappings":"AA0BA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,IAAT,EAAeC,IAAf,EAAqBC,aAArB,EAAoCC,IAApC,QAAgD,oBAAhD;AACA,SAASC,WAAT,QAA4B,gBAA5B;AAEA,SAASC,SAAT,QAA0B,qBAA1B;AAMA,OAAO,IAAMC,YAAmC,GAAG;AAAA,MAAC;AAAEC,IAAAA;AAAF,GAAD;AAAA,SACjD,oBAAC,aAAD;AAAe,IAAA,KAAK,EAAC,OAArB;AAA6B,IAAA,EAAE,EAAC,OAAhC;AAAwC,IAAA,GAAG,EAAC;AAA5C,KACE,oBAAC,WAAD;AAAa,IAAA,IAAI,EAAEA,MAAM,CAACC;AAA1B,KACE,oBAAC,SAAD;AAAW,IAAA,MAAM,EAAED;AAAnB,IADF,CADF,EAIE,oBAAC,WAAD;AAAa,IAAA,IAAI,EAAEA,MAAM,CAACC;AAA1B,KACE,oBAAC,IAAD;AAAM,IAAA,UAAU,EAAC;AAAjB,KACE,oBAAC,IAAD;AAAM,IAAA,QAAQ,EAAC,QAAf;AAAwB,IAAA,UAAU,EAAC,UAAnC;AAA8C,IAAA,EAAE,EAAC;AAAjD,KACGD,MAAM,CAACC,UADV,CADF,EAIE,oBAAC,IAAD;AAAM,IAAA,QAAQ,EAAC,OAAf;AAAuB,IAAA,UAAU,EAAC;AAAlC,KACGD,MAAM,CAACE,QADV,CAJF,CADF,CAJF,CADiD;AAAA,CAA5C","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { FC } from 'react'\nimport React from 'react'\nimport type { IMethod } from '@looker/sdk-codegen'\nimport { Code, Flex, SpaceVertical, Text } from '@looker/components'\nimport { MethodBadge } from '@looker/run-it'\n\nimport { DocPseudo } from '../../../components'\n\ninterface DocOperationProps {\n method: IMethod\n}\n\nexport const DocOperation: FC<DocOperationProps> = ({ method }) => (\n <SpaceVertical align=\"start\" mb=\"large\" gap=\"xsmall\">\n <MethodBadge type={method.httpMethod}>\n <DocPseudo method={method} />\n </MethodBadge>\n <MethodBadge type={method.httpMethod}>\n <Flex alignItems=\"center\">\n <Text fontSize=\"xsmall\" fontWeight=\"semiBold\" mr=\"xxsmall\">\n {method.httpMethod}\n </Text>\n <Code fontSize=\"small\" fontWeight=\"normal\">\n {method.endpoint}\n </Code>\n </Flex>\n </MethodBadge>\n </SpaceVertical>\n)\n"],"file":"DocOperation.js"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { CollapserCard } from '@looker/run-it';
|
|
3
|
+
import { ExploreType } from '../../../components';
|
|
3
4
|
export var DocRequestBody = _ref => {
|
|
4
5
|
var {
|
|
5
|
-
method
|
|
6
|
+
method,
|
|
7
|
+
api
|
|
6
8
|
} = _ref;
|
|
7
9
|
var bodies = method.bodyParams;
|
|
8
10
|
if (bodies.length === 0) return React.createElement(React.Fragment, null);
|
|
@@ -11,6 +13,7 @@ export var DocRequestBody = _ref => {
|
|
|
11
13
|
id: "bodies",
|
|
12
14
|
heading: header
|
|
13
15
|
}, React.createElement(React.Fragment, null, bodies.map(body => React.createElement(ExploreType, {
|
|
16
|
+
api: api,
|
|
14
17
|
type: body.type,
|
|
15
18
|
open: false,
|
|
16
19
|
key: "body.".concat(body.name)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/scenes/MethodScene/components/DocRequestBody.tsx"],"names":["React","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/scenes/MethodScene/components/DocRequestBody.tsx"],"names":["React","CollapserCard","ExploreType","DocRequestBody","method","api","bodies","bodyParams","length","header","map","body","type","name"],"mappings":"AA0BA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,aAAT,QAA8B,gBAA9B;AACA,SAASC,WAAT,QAA4B,qBAA5B;AAWA,OAAO,IAAMC,cAAuC,GAAG,QAAqB;AAAA,MAApB;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAAoB;AAC1E,MAAMC,MAAM,GAAGF,MAAM,CAACG,UAAtB;AACA,MAAID,MAAM,CAACE,MAAP,KAAkB,CAAtB,EAAyB,OAAO,yCAAP;AACzB,MAAMC,MAAM,GAAGH,MAAM,CAACE,MAAP,GAAgB,CAAhB,GAAoB,gBAApB,GAAuC,cAAtD;AAEA,SACE,oBAAC,aAAD;AAAe,IAAA,EAAE,EAAC,QAAlB;AAA2B,IAAA,OAAO,EAAEC;AAApC,KACE,0CACGH,MAAM,CAACI,GAAP,CAAYC,IAAD,IACV,oBAAC,WAAD;AACE,IAAA,GAAG,EAAEN,GADP;AAEE,IAAA,IAAI,EAAEM,IAAI,CAACC,IAFb;AAGE,IAAA,IAAI,EAAE,KAHR;AAIE,IAAA,GAAG,iBAAUD,IAAI,CAACE,IAAf;AAJL,IADD,CADH,CADF,CADF;AAcD,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 type { FC } from 'react'\nimport React from 'react'\nimport type { ApiModel, IMethod } from '@looker/sdk-codegen'\nimport { CollapserCard } from '@looker/run-it'\nimport { ExploreType } from '../../../components'\n\ninterface DocRequestBodyProps {\n method: IMethod\n api: ApiModel\n}\n\n/**\n * If a method has request body parameters, display them\n * @param method to document\n */\nexport const DocRequestBody: FC<DocRequestBodyProps> = ({ method, api }) => {\n const bodies = method.bodyParams\n if (bodies.length === 0) return <></>\n const header = bodies.length > 1 ? 'Request bodies' : 'Request body'\n\n return (\n <CollapserCard id=\"bodies\" heading={header}>\n <>\n {bodies.map((body) => (\n <ExploreType\n api={api}\n type={body.type}\n open={false}\n key={`body.${body.name}`}\n />\n ))}\n </>\n </CollapserCard>\n )\n}\n"],"file":"DocRequestBody.js"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { useHistory, useParams } from 'react-router-dom';
|
|
2
3
|
import { Grid, ButtonToggle, ButtonItem } from '@looker/components';
|
|
3
|
-
import { useParams, useHistory } from 'react-router-dom';
|
|
4
4
|
import { ApixSection, DocTitle, DocMethodSummary, Link } from '../../components';
|
|
5
5
|
import { buildMethodPath } from '../../utils';
|
|
6
6
|
import { getOperations } from './utils';
|
|
7
|
-
export var
|
|
7
|
+
export var MethodTagScene = _ref => {
|
|
8
8
|
var {
|
|
9
9
|
api
|
|
10
10
|
} = _ref;
|
|
@@ -13,18 +13,23 @@ export var TagScene = _ref => {
|
|
|
13
13
|
methodTag
|
|
14
14
|
} = useParams();
|
|
15
15
|
var history = useHistory();
|
|
16
|
+
var [value, setValue] = useState('ALL');
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
setValue('ALL');
|
|
19
|
+
}, [methodTag]);
|
|
20
|
+
var methods = api.tags[methodTag];
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (!methods) {
|
|
23
|
+
history.push("/".concat(specKey, "/methods"));
|
|
24
|
+
}
|
|
25
|
+
}, [history, methods]);
|
|
16
26
|
|
|
17
|
-
if (!
|
|
18
|
-
|
|
27
|
+
if (!methods) {
|
|
28
|
+
return React.createElement(React.Fragment, null);
|
|
19
29
|
}
|
|
20
30
|
|
|
21
|
-
var methods = api.tags[methodTag];
|
|
22
31
|
var tag = Object.values(api.spec.tags).find(tag => tag.name === methodTag);
|
|
23
32
|
var operations = getOperations(methods);
|
|
24
|
-
var [value, setValue] = useState('ALL');
|
|
25
|
-
useEffect(() => {
|
|
26
|
-
setValue('ALL');
|
|
27
|
-
}, [methodTag]);
|
|
28
33
|
return React.createElement(ApixSection, null, React.createElement(DocTitle, null, "".concat(tag.name, ": ").concat(tag.description)), React.createElement(ButtonToggle, {
|
|
29
34
|
mb: "small",
|
|
30
35
|
mt: "xlarge",
|
|
@@ -38,7 +43,7 @@ export var TagScene = _ref => {
|
|
|
38
43
|
key: op,
|
|
39
44
|
px: "large",
|
|
40
45
|
py: "xsmall"
|
|
41
|
-
}, op))), Object.values(methods).map((method, index) => (value ===
|
|
46
|
+
}, op))), Object.values(methods).map((method, index) => (value === 'ALL' || value === method.httpMethod) && React.createElement(Link, {
|
|
42
47
|
key: index,
|
|
43
48
|
to: buildMethodPath(specKey, tag.name, method.name)
|
|
44
49
|
}, React.createElement(Grid, {
|
|
@@ -49,4 +54,4 @@ export var TagScene = _ref => {
|
|
|
49
54
|
method: method
|
|
50
55
|
})))));
|
|
51
56
|
};
|
|
52
|
-
//# sourceMappingURL=
|
|
57
|
+
//# sourceMappingURL=MethodTagScene.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/scenes/MethodTagScene/MethodTagScene.tsx"],"names":["React","useEffect","useState","useHistory","useParams","Grid","ButtonToggle","ButtonItem","ApixSection","DocTitle","DocMethodSummary","Link","buildMethodPath","getOperations","MethodTagScene","api","specKey","methodTag","history","value","setValue","methods","tags","push","tag","Object","values","spec","find","name","operations","description","map","op","method","index","httpMethod"],"mappings":"AA0BA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,UAAT,EAAqBC,SAArB,QAAsC,kBAAtC;AACA,SAASC,IAAT,EAAeC,YAAf,EAA6BC,UAA7B,QAA+C,oBAA/C;AAEA,SAASC,WAAT,EAAsBC,QAAtB,EAAgCC,gBAAhC,EAA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E,oBAAC,UAAD;AAAY,IAAA,GAAG,EAAC,KAAhB;AAAsB,IAAA,EAAE,EAAC,OAAzB;AAAiC,IAAA,EAAE,EAAC;AAApC,WADF,EAIGU,UAAU,CAACE,GAAX,CAAgBC,EAAD,IACd,oBAAC,UAAD;AAAY,IAAA,GAAG,EAAEA,EAAjB;AAAqB,IAAA,EAAE,EAAC,OAAxB;AAAgC,IAAA,EAAE,EAAC;AAAnC,KACGA,EADH,CADD,CAJH,CAFF,EAYGR,MAAM,CAACC,MAAP,CAAcL,OAAd,EAAuBW,GAAvB,CACC,CAACE,MAAD,EAASC,KAAT,KACE,CAAChB,KAAK,KAAK,KAAV,IAAmBA,KAAK,KAAKe,MAAM,CAACE,UAArC,KACE,oBAAC,IAAD;AACE,IAAA,GAAG,EAAED,KADP;AAEE,IAAA,EAAE,EAAEvB,eAAe,CAACI,OAAD,EAAUQ,GAAG,CAACK,IAAd,EAAoBK,MAAM,CAACL,IAA3B;AAFrB,KAIE,oBAAC,IAAD;AAAM,IAAA,OAAO,EAAE,CAAf;AAAkB,IAAA,EAAE,EAAC;AAArB,KACE,oBAAC,gBAAD;AAAkB,IAAA,GAAG,EAAEM,KAAvB;AAA8B,IAAA,MAAM,EAAED;AAAtC,IADF,CAJF,CAHL,CAZH,CADF;AA4BD,CApDM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { FC } from 'react'\nimport React, { useEffect, useState } from 'react'\nimport { useHistory, useParams } from 'react-router-dom'\nimport { Grid, ButtonToggle, ButtonItem } from '@looker/components'\nimport type { ApiModel } from '@looker/sdk-codegen'\nimport { ApixSection, DocTitle, DocMethodSummary, Link } from '../../components'\nimport { buildMethodPath } from '../../utils'\nimport { getOperations } from './utils'\n\ninterface MethodTagSceneProps {\n api: ApiModel\n}\n\ninterface MethodTagSceneParams {\n specKey: string\n methodTag: string\n}\n\nexport const MethodTagScene: FC<MethodTagSceneProps> = ({ api }) => {\n const { specKey, methodTag } = useParams<MethodTagSceneParams>()\n const history = useHistory()\n const [value, setValue] = useState('ALL')\n\n useEffect(() => {\n /** Reset ButtonToggle value on route change */\n setValue('ALL')\n }, [methodTag])\n\n const methods = api.tags[methodTag]\n useEffect(() => {\n if (!methods) {\n history.push(`/${specKey}/methods`)\n }\n }, [history, methods])\n if (!methods) {\n return <></>\n }\n const tag = Object.values(api.spec.tags!).find(\n (tag) => tag.name === methodTag\n )!\n const operations = getOperations(methods)\n\n return (\n <ApixSection>\n <DocTitle>{`${tag.name}: ${tag.description}`}</DocTitle>\n <ButtonToggle mb=\"small\" mt=\"xlarge\" value={value} onChange={setValue}>\n <ButtonItem key=\"ALL\" px=\"large\" py=\"xsmall\">\n ALL\n </ButtonItem>\n {operations.map((op) => (\n <ButtonItem key={op} px=\"large\" py=\"xsmall\">\n {op}\n </ButtonItem>\n ))}\n </ButtonToggle>\n {Object.values(methods).map(\n (method, index) =>\n (value === 'ALL' || value === method.httpMethod) && (\n <Link\n key={index}\n to={buildMethodPath(specKey, tag.name, method.name)}\n >\n <Grid columns={1} py=\"xsmall\">\n <DocMethodSummary key={index} method={method} />\n </Grid>\n </Link>\n )\n )}\n </ApixSection>\n )\n}\n"],"file":"MethodTagScene.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../../src/scenes/MethodTagScene/index.ts"],"names":["MethodTagScene"],"mappings":"AAyBA,SAASA,cAAT,QAA+B,kBAA/B","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { MethodTagScene } from './MethodTagScene'\n"],"file":"index.js"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/scenes/MethodTagScene/utils.ts"],"names":["getOperations","methods","operationsSet","Set","Object","values","forEach","method","add","httpMethod","Array","from"],"mappings":"AA+BA,OAAO,IAAMA,aAAa,GAAIC,OAAD,IAAyB;AACpD,MAAMC,aAAa,GAAG,IAAIC,GAAJ,EAAtB;AACAC,EAAAA,MAAM,CAACC,MAAP,CAAcJ,OAAd,EAAuBK,OAAvB,CAAgCC,MAAD,IAAY;AACzCL,IAAAA,aAAa,CAACM,GAAd,CAAkBD,MAAM,CAACE,UAAzB;AACD,GAFD;AAGA,SAAOC,KAAK,CAACC,IAAN,CAAWT,aAAa,CAACG,MAAd,EAAX,CAAP;AACD,CANM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { MethodList } from '@looker/sdk-codegen'\n\n/**\n * Given a list of methods it returns a list of distinct operations\n * @param methods A list of methods\n */\nexport const getOperations = (methods: MethodList) => {\n const operationsSet = new Set<string>()\n Object.values(methods).forEach((method) => {\n operationsSet.add(method.httpMethod)\n })\n return Array.from(operationsSet.values())\n}\n"],"file":"utils.js"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
2
|
import { typeRefs, methodRefs } from '@looker/sdk-codegen';
|
|
3
|
-
import { useParams } from 'react-router-dom';
|
|
3
|
+
import { useHistory, useParams } from 'react-router-dom';
|
|
4
4
|
import { Space, Box } from '@looker/components';
|
|
5
5
|
import { ApixSection, DocReferences, DocSDKs, DocSource, DocTitle, ExploreType, DocSchema } from '../../components';
|
|
6
6
|
export var TypeScene = _ref => {
|
|
@@ -12,14 +12,21 @@ export var TypeScene = _ref => {
|
|
|
12
12
|
typeName
|
|
13
13
|
} = useParams();
|
|
14
14
|
var type = api.types[typeName];
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
|
|
15
|
+
var history = useHistory();
|
|
16
|
+
var typesUsed = typeRefs(api, type === null || type === void 0 ? void 0 : type.customTypes);
|
|
17
|
+
var methodsUsedBy = methodRefs(api, type === null || type === void 0 ? void 0 : type.methodRefs);
|
|
18
|
+
var typesUsedBy = typeRefs(api, type === null || type === void 0 ? void 0 : type.parentTypes);
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (!type) {
|
|
21
|
+
history.push("/".concat(specKey, "/types"));
|
|
22
|
+
}
|
|
23
|
+
}, [history, specKey, type]);
|
|
24
|
+
return React.createElement(React.Fragment, null, type && React.createElement(ApixSection, null, React.createElement(Space, null, React.createElement(DocTitle, null, type.name), React.createElement(DocSource, {
|
|
19
25
|
type: type
|
|
20
26
|
})), React.createElement(Box, {
|
|
21
27
|
pb: "xlarge"
|
|
22
28
|
}, React.createElement(ExploreType, {
|
|
29
|
+
api: api,
|
|
23
30
|
type: type
|
|
24
31
|
})), React.createElement(DocReferences, {
|
|
25
32
|
typesUsed: typesUsed,
|
|
@@ -32,6 +39,6 @@ export var TypeScene = _ref => {
|
|
|
32
39
|
api: api
|
|
33
40
|
}), React.createElement(DocSchema, {
|
|
34
41
|
object: type.schema
|
|
35
|
-
}));
|
|
42
|
+
})));
|
|
36
43
|
};
|
|
37
44
|
//# sourceMappingURL=TypeScene.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/scenes/TypeScene/TypeScene.tsx"],"names":["React","typeRefs","methodRefs","useParams","Space","Box","ApixSection","DocReferences","DocSDKs","DocSource","DocTitle","ExploreType","DocSchema","TypeScene","api","specKey","typeName","type","types","typesUsed","customTypes","methodsUsedBy","typesUsedBy","parentTypes","name","schema"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/scenes/TypeScene/TypeScene.tsx"],"names":["React","useEffect","typeRefs","methodRefs","useHistory","useParams","Space","Box","ApixSection","DocReferences","DocSDKs","DocSource","DocTitle","ExploreType","DocSchema","TypeScene","api","specKey","typeName","type","types","history","typesUsed","customTypes","methodsUsedBy","typesUsedBy","parentTypes","push","name","schema"],"mappings":"AA2BA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AAEA,SAASC,QAAT,EAAmBC,UAAnB,QAAqC,qBAArC;AACA,SAASC,UAAT,EAAqBC,SAArB,QAAsC,kBAAtC;AACA,SAASC,KAAT,EAAgBC,GAAhB,QAA2B,oBAA3B;AAEA,SACEC,WADF,EAEEC,aAFF,EAGEC,OAHF,EAIEC,SAJF,EAKEC,QALF,EAMEC,WANF,EAOEC,SAPF,QAQO,kBARP;AAmBA,OAAO,IAAMC,SAA2B,GAAG,QAAa;AAAA,MAAZ;AAAEC,IAAAA;AAAF,GAAY;AACtD,MAAM;AAAEC,IAAAA,OAAF;AAAWC,IAAAA;AAAX,MAAwBb,SAAS,EAAvC;AACA,MAAMc,IAAI,GAAGH,GAAG,CAACI,KAAJ,CAAUF,QAAV,CAAb;AACA,MAAMG,OAAO,GAAGjB,UAAU,EAA1B;AACA,MAAMkB,SAAS,GAAGpB,QAAQ,CAACc,GAAD,EAAMG,IAAN,aAAMA,IAAN,uBAAMA,IAAI,CAAEI,WAAZ,CAA1B;AACA,MAAMC,aAAa,GAAGrB,UAAU,CAACa,GAAD,EAAMG,IAAN,aAAMA,IAAN,uBAAMA,IAAI,CAAEhB,UAAZ,CAAhC;AACA,MAAMsB,WAAW,GAAGvB,QAAQ,CAACc,GAAD,EAAMG,IAAN,aAAMA,IAAN,uBAAMA,IAAI,CAAEO,WAAZ,CAA5B;AACAzB,EAAAA,SAAS,CAAC,MAAM;AACd,QAAI,CAACkB,IAAL,EAAW;AACTE,MAAAA,OAAO,CAACM,IAAR,YAAiBV,OAAjB;AACD;AACF,GAJQ,EAIN,CAACI,OAAD,EAAUJ,OAAV,EAAmBE,IAAnB,CAJM,CAAT;AAMA,SACE,0CACGA,IAAI,IACH,oBAAC,WAAD,QACE,oBAAC,KAAD,QACE,oBAAC,QAAD,QAAWA,IAAI,CAACS,IAAhB,CADF,EAEE,oBAAC,SAAD;AAAW,IAAA,IAAI,EAAET;AAAjB,IAFF,CADF,EAKE,oBAAC,GAAD;AAAK,IAAA,EAAE,EAAC;AAAR,KACE,oBAAC,WAAD;AAAa,IAAA,GAAG,EAAEH,GAAlB;AAAuB,IAAA,IAAI,EAAEG;AAA7B,IADF,CALF,EAQE,oBAAC,aAAD;AACE,IAAA,SAAS,EAAEG,SADb;AAEE,IAAA,WAAW,EAAEG,WAFf;AAGE,IAAA,aAAa,EAAED,aAHjB;AAIE,IAAA,GAAG,EAAER,GAJP;AAKE,IAAA,OAAO,EAAEC;AALX,IARF,EAeE,oBAAC,OAAD;AAAS,IAAA,IAAI,EAAEE,IAAf;AAAqB,IAAA,GAAG,EAAEH;AAA1B,IAfF,EAgBE,oBAAC,SAAD;AAAW,IAAA,MAAM,EAAEG,IAAI,CAACU;AAAxB,IAhBF,CAFJ,CADF;AAwBD,CArCM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react'\nimport React, { useEffect } from 'react'\nimport type { ApiModel } from '@looker/sdk-codegen'\nimport { typeRefs, methodRefs } from '@looker/sdk-codegen'\nimport { useHistory, useParams } from 'react-router-dom'\nimport { Space, Box } from '@looker/components'\n\nimport {\n ApixSection,\n DocReferences,\n DocSDKs,\n DocSource,\n DocTitle,\n ExploreType,\n DocSchema,\n} from '../../components'\n\ninterface DocTypeProps {\n api: ApiModel\n}\n\ninterface DocTypeParams {\n specKey: string\n typeName: string\n}\n\nexport const TypeScene: FC<DocTypeProps> = ({ api }) => {\n const { specKey, typeName } = useParams<DocTypeParams>()\n const type = api.types[typeName]\n const history = useHistory()\n const typesUsed = typeRefs(api, type?.customTypes)\n const methodsUsedBy = methodRefs(api, type?.methodRefs)\n const typesUsedBy = typeRefs(api, type?.parentTypes)\n useEffect(() => {\n if (!type) {\n history.push(`/${specKey}/types`)\n }\n }, [history, specKey, type])\n\n return (\n <>\n {type && (\n <ApixSection>\n <Space>\n <DocTitle>{type.name}</DocTitle>\n <DocSource type={type} />\n </Space>\n <Box pb=\"xlarge\">\n <ExploreType api={api} type={type} />\n </Box>\n <DocReferences\n typesUsed={typesUsed}\n typesUsedBy={typesUsedBy}\n methodsUsedBy={methodsUsedBy}\n api={api}\n specKey={specKey}\n />\n <DocSDKs type={type} api={api} />\n <DocSchema object={type.schema} />\n </ApixSection>\n )}\n </>\n )\n}\n"],"file":"TypeScene.js"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { Grid, ButtonToggle, ButtonItem } from '@looker/components';
|
|
3
|
+
import { useParams, useHistory } from 'react-router-dom';
|
|
4
|
+
import { ApixSection, DocTitle, DocTypeSummary, Link } from '../../components';
|
|
5
|
+
import { buildTypePath } from '../../utils';
|
|
6
|
+
import { getMetaTypes } from './utils';
|
|
7
|
+
export var TypeTagScene = _ref => {
|
|
8
|
+
var {
|
|
9
|
+
api
|
|
10
|
+
} = _ref;
|
|
11
|
+
var {
|
|
12
|
+
specKey,
|
|
13
|
+
typeTag
|
|
14
|
+
} = useParams();
|
|
15
|
+
var history = useHistory();
|
|
16
|
+
var [value, setValue] = useState('ALL');
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
setValue('ALL');
|
|
19
|
+
}, [typeTag]);
|
|
20
|
+
var types = api.typeTags[typeTag];
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (!types) {
|
|
23
|
+
history.push("/".concat(specKey, "/types"));
|
|
24
|
+
}
|
|
25
|
+
}, [history, types]);
|
|
26
|
+
|
|
27
|
+
if (!types) {
|
|
28
|
+
return React.createElement(React.Fragment, null);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var tag = Object.values(api.spec.tags).find(tag => tag.name === typeTag);
|
|
32
|
+
var metaTypes = getMetaTypes(types);
|
|
33
|
+
return React.createElement(ApixSection, null, React.createElement(DocTitle, null, "".concat(tag.name, ": ").concat(tag.description)), React.createElement(ButtonToggle, {
|
|
34
|
+
mb: "small",
|
|
35
|
+
mt: "xlarge",
|
|
36
|
+
value: value,
|
|
37
|
+
onChange: setValue
|
|
38
|
+
}, React.createElement(ButtonItem, {
|
|
39
|
+
key: "ALL",
|
|
40
|
+
px: "large",
|
|
41
|
+
py: "xsmall"
|
|
42
|
+
}, "ALL"), metaTypes.map(op => React.createElement(ButtonItem, {
|
|
43
|
+
key: op,
|
|
44
|
+
px: "large",
|
|
45
|
+
py: "xsmall"
|
|
46
|
+
}, op))), Object.values(types).map((type, index) => (value === 'ALL' || value === type.metaType.toString().toUpperCase()) && React.createElement(Link, {
|
|
47
|
+
key: index,
|
|
48
|
+
to: buildTypePath(specKey, tag.name, type.name)
|
|
49
|
+
}, React.createElement(Grid, {
|
|
50
|
+
columns: 1,
|
|
51
|
+
py: "xsmall"
|
|
52
|
+
}, React.createElement(DocTypeSummary, {
|
|
53
|
+
key: index,
|
|
54
|
+
type: type
|
|
55
|
+
})))));
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=TypeTagScene.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/scenes/TypeTagScene/TypeTagScene.tsx"],"names":["React","useEffect","useState","Grid","ButtonToggle","ButtonItem","useParams","useHistory","ApixSection","DocTitle","DocTypeSummary","Link","buildTypePath","getMetaTypes","TypeTagScene","api","specKey","typeTag","history","value","setValue","types","typeTags","push","tag","Object","values","spec","tags","find","name","metaTypes","description","map","op","type","index","metaType","toString","toUpperCase"],"mappings":"AA0BA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,IAAT,EAAeC,YAAf,EAA6BC,UAA7B,QAA+C,oBAA/C;AAEA,SAASC,SAAT,EAAoBC,UAApB,QAAsC,kBAAtC;AACA,SAASC,WAAT,EAAsBC,QAAtB,EAAgCC,cAAhC,EAAgDC,IAAhD,QAA4D,kBAA5D;AACA,SAASC,aAAT,QAA8B,aAA9B;AACA,SAASC,YAAT,QAA6B,SAA7B;AAWA,OAAO,IAAMC,YAAmC,GAAG,QAAa;AAAA,MAAZ;AAAEC,IAAAA;AAAF,GAAY;AAC9D,MAAM;AAAEC,IAAAA,OAAF;AAAWC,IAAAA;AAAX,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AC,OAAxB;AAAgC,IAAA,EAAE,EAAC;AAAnC,KACGA,EADH,CADD,CAJH,CAFF,EAYGT,MAAM,CAACC,MAAP,CAAcL,KAAd,EAAqBY,GAArB,CACC,CAACE,IAAD,EAAOC,KAAP,KACE,CAACjB,KAAK,KAAK,KAAV,IACCA,KAAK,KAAKgB,IAAI,CAACE,QAAL,CAAcC,QAAd,GAAyBC,WAAzB,EADZ,KAEE,oBAAC,IAAD;AAAM,IAAA,GAAG,EAAEH,KAAX;AAAkB,IAAA,EAAE,EAAExB,aAAa,CAACI,OAAD,EAAUQ,GAAG,CAACM,IAAd,EAAoBK,IAAI,CAACL,IAAzB;AAAnC,KACE,oBAAC,IAAD;AAAM,IAAA,OAAO,EAAE,CAAf;AAAkB,IAAA,EAAE,EAAC;AAArB,KACE,oBAAC,cAAD;AAAgB,IAAA,GAAG,EAAEM,KAArB;AAA4B,IAAA,IAAI,EAAED;AAAlC,IADF,CADF,CAJL,CAZH,CADF;AA0BD,CAjDM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { FC } from 'react'\nimport React, { useEffect, useState } from 'react'\nimport { Grid, ButtonToggle, ButtonItem } from '@looker/components'\nimport type { ApiModel } from '@looker/sdk-codegen'\nimport { useParams, useHistory } from 'react-router-dom'\nimport { ApixSection, DocTitle, DocTypeSummary, Link } from '../../components'\nimport { buildTypePath } from '../../utils'\nimport { getMetaTypes } from './utils'\n\ninterface TypeTagSceneProps {\n api: ApiModel\n}\n\ninterface TypeTagSceneParams {\n specKey: string\n typeTag: string\n}\n\nexport const TypeTagScene: FC<TypeTagSceneProps> = ({ api }) => {\n const { specKey, typeTag } = useParams<TypeTagSceneParams>()\n const history = useHistory()\n const [value, setValue] = useState('ALL')\n\n useEffect(() => {\n /** Reset ButtonToggle value on route change */\n setValue('ALL')\n }, [typeTag])\n\n const types = api.typeTags[typeTag]\n useEffect(() => {\n if (!types) {\n history.push(`/${specKey}/types`)\n }\n }, [history, types])\n\n if (!types) {\n return <></>\n }\n\n const tag = Object.values(api.spec.tags!).find((tag) => tag.name === typeTag)!\n const metaTypes = getMetaTypes(types)\n return (\n <ApixSection>\n <DocTitle>{`${tag.name}: ${tag.description}`}</DocTitle>\n <ButtonToggle mb=\"small\" mt=\"xlarge\" value={value} onChange={setValue}>\n <ButtonItem key=\"ALL\" px=\"large\" py=\"xsmall\">\n ALL\n </ButtonItem>\n {metaTypes.map((op) => (\n <ButtonItem key={op} px=\"large\" py=\"xsmall\">\n {op}\n </ButtonItem>\n ))}\n </ButtonToggle>\n {Object.values(types).map(\n (type, index) =>\n (value === 'ALL' ||\n value === type.metaType.toString().toUpperCase()) && (\n <Link key={index} to={buildTypePath(specKey, tag.name, type.name)}>\n <Grid columns={1} py=\"xsmall\">\n <DocTypeSummary key={index} type={type} />\n </Grid>\n </Link>\n )\n )}\n </ApixSection>\n )\n}\n"],"file":"TypeTagScene.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/scenes/TypeTagScene/index.ts"],"names":["TypeTagScene"],"mappings":"AAyBA,SAASA,YAAT,QAA6B,gBAA7B","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 { TypeTagScene } from './TypeTagScene'\n"],"file":"index.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/scenes/TypeTagScene/utils.ts"],"names":["getMetaTypes","types","typeSet","Set","Object","values","forEach","type","add","metaType","toString","toUpperCase","Array","from"],"mappings":"AAgCA,OAAO,IAAMA,YAAY,GAAIC,KAAD,IAAqB;AAC/C,MAAMC,OAAO,GAAG,IAAIC,GAAJ,EAAhB;AACAC,EAAAA,MAAM,CAACC,MAAP,CAAcJ,KAAd,EAAqBK,OAArB,CAA8BC,IAAD,IAAU;AACrCL,IAAAA,OAAO,CAACM,GAAR,CAAYD,IAAI,CAACE,QAAL,CAAcC,QAAd,GAAyBC,WAAzB,EAAZ;AACD,GAFD;AAGA,SAAOC,KAAK,CAACC,IAAN,CAAWX,OAAO,CAACG,MAAR,EAAX,CAAP;AACD,CANM","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 { TypeList } from '@looker/sdk-codegen'\n\n/**\n * Given a list of types it returns a list of distinct types\n * @param types A list of types\n */\nexport const getMetaTypes = (types: TypeList) => {\n const typeSet = new Set<string>()\n Object.values(types).forEach((type) => {\n typeSet.add(type.metaType.toString().toUpperCase())\n })\n return Array.from(typeSet.values())\n}\n"],"file":"utils.js"}
|
package/lib/esm/scenes/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { HomeScene } from './HomeScene';
|
|
2
2
|
export { MethodScene } from './MethodScene';
|
|
3
3
|
export { TypeScene } from './TypeScene';
|
|
4
|
-
export {
|
|
4
|
+
export { MethodTagScene } from './MethodTagScene';
|
|
5
|
+
export { TypeTagScene } from './TypeTagScene';
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/scenes/index.ts"],"names":["HomeScene","MethodScene","TypeScene","
|
|
1
|
+
{"version":3,"sources":["../../../src/scenes/index.ts"],"names":["HomeScene","MethodScene","TypeScene","MethodTagScene","TypeTagScene"],"mappings":"AAyBA,SAASA,SAAT,QAA0B,aAA1B;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,cAAT,QAA+B,kBAA/B;AACA,SAASC,YAAT,QAA6B,gBAA7B","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 { HomeScene } from './HomeScene'\nexport { MethodScene } from './MethodScene'\nexport { TypeScene } from './TypeScene'\nexport { MethodTagScene } from './MethodTagScene'\nexport { TypeTagScene } from './TypeTagScene'\n"],"file":"index.js"}
|
package/lib/esm/state/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/state/index.ts"],"names":[
|
|
1
|
+
{"version":3,"sources":["../../../src/state/index.ts"],"names":[],"mappings":"AAyBA,cAAc,SAAd;AACA,cAAc,YAAd;AACA,cAAc,SAAd","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * from './store'\nexport * from './settings'\nexport * from './lodes'\n"],"file":"index.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/state/lodes/index.ts"],"names":[],"mappings":"AAyBA,cAAc,aAAd;AACA,cAAc,SAAd","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * from './selectors'\nexport * from './slice'\n"],"file":"index.js"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { call, put, takeEvery } from 'typed-redux-saga';
|
|
2
|
+
import { getLoded } from '../../utils';
|
|
3
|
+
import { lodeActions } from './slice';
|
|
4
|
+
|
|
5
|
+
function* initSaga(action) {
|
|
6
|
+
var {
|
|
7
|
+
initLodesSuccessAction,
|
|
8
|
+
initLodesFailureAction
|
|
9
|
+
} = lodeActions;
|
|
10
|
+
|
|
11
|
+
try {
|
|
12
|
+
var lode = yield* call(getLoded, action.payload.examplesLodeUrl, action.payload.declarationsLodeUrl);
|
|
13
|
+
yield* put(initLodesSuccessAction(lode));
|
|
14
|
+
} catch (error) {
|
|
15
|
+
yield* put(initLodesFailureAction(error));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function* saga() {
|
|
20
|
+
var {
|
|
21
|
+
initLodesAction
|
|
22
|
+
} = lodeActions;
|
|
23
|
+
yield* takeEvery(initLodesAction, initSaga);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=sagas.js.map
|