@looker/api-explorer 0.9.19 → 0.9.25
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 +135 -1
- package/e2e/e2e.spec.ts +6 -5
- package/lib/ApiExplorer.d.ts +7 -38
- package/lib/ApiExplorer.js +90 -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 +10 -21
- 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 +1 -1
- 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 +7 -11
- package/lib/components/DocReferences/DocReferences.js.map +1 -1
- package/lib/components/DocReferences/utils.d.ts +2 -2
- package/lib/components/DocReferences/utils.js +2 -28
- 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 +2 -0
- 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 +1 -1
- 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.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 +4 -7
- 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.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 +4 -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/{SideNavTags.js → SideNavMethodTags.js} +6 -6
- package/lib/components/SideNav/SideNavMethodTags.js.map +1 -0
- package/lib/components/SideNav/SideNavMethods.d.ts +5 -4
- package/lib/components/SideNav/SideNavMethods.js +9 -11
- 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 -2
- package/lib/components/common/common.js +2 -1
- package/lib/components/common/common.js.map +1 -1
- package/lib/components/index.d.ts +4 -2
- package/lib/components/index.js +28 -0
- package/lib/components/index.js.map +1 -1
- package/lib/esm/ApiExplorer.js +94 -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 +9 -18
- 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 +1 -1
- 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 +5 -8
- package/lib/esm/components/DocReferences/DocReferences.js.map +1 -1
- package/lib/esm/components/DocReferences/utils.js +1 -24
- 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 +2 -0
- 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 +2 -2
- 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.map +1 -1
- package/lib/esm/components/DocSdkUsage/DocSdkExampleCell.js.map +1 -1
- package/lib/esm/components/DocSdkUsage/DocSdkUsage.js +6 -8
- 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.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 +2 -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/{SideNavTags.js → SideNavMethodTags.js} +4 -4
- package/lib/esm/components/SideNav/SideNavMethodTags.js.map +1 -0
- package/lib/esm/components/SideNav/SideNavMethods.js +9 -12
- 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 +2 -1
- package/lib/esm/components/common/common.js.map +1 -1
- package/lib/esm/components/index.js +4 -2
- 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 +7 -1
- package/lib/esm/reducers/spec/utils.js.map +1 -1
- package/lib/esm/routes/AppRouter.js +13 -15
- 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 +2 -2
- 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 +41 -23
- 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 +3 -1
- 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 +7 -1
- package/lib/reducers/spec/utils.js.map +1 -1
- package/lib/routes/AppRouter.d.ts +5 -5
- package/lib/routes/AppRouter.js +12 -17
- 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 +1 -1
- 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 +5 -5
- package/lib/scenes/MethodScene/MethodScene.js +37 -20
- 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 +3 -1
- 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 +22 -16
- package/public/Looker.3.1.json +1343 -412
- package/public/Looker.4.0.json +3305 -661
- package/src/ApiExplorer.tsx +158 -99
- package/src/{index.tsx → App.tsx} +1 -1
- package/src/StandaloneApiExplorer.tsx +13 -25
- 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 +4 -3
- 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 +2 -36
- package/src/components/DocResponses/DocResponseTypes.tsx +15 -4
- package/src/components/DocResponses/DocResponses.spec.tsx +1 -1
- package/src/components/DocResponses/DocResponses.tsx +6 -4
- 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 +6 -5
- package/src/components/DocSDKs/utils.ts +1 -1
- package/src/components/DocSchema/DocSchema.tsx +2 -1
- package/src/components/DocSdkUsage/DocSdkExampleCell.tsx +2 -1
- package/src/components/DocSdkUsage/DocSdkUsage.spec.tsx +2 -2
- package/src/components/DocSdkUsage/DocSdkUsage.tsx +9 -7
- 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 +2 -1
- package/src/{state/settings/reducer.spec.ts → components/DocTypeSummary/DocTypeSummary.spec.tsx} +15 -14
- 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 +7 -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 -39
- 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} +2 -2
- package/src/components/SideNav/SideNavMethods.spec.tsx +9 -5
- package/src/components/SideNav/SideNavMethods.tsx +12 -12
- package/src/components/SideNav/SideNavTypeTags.spec.tsx +79 -0
- package/src/{context/lode/LodeContext.ts → components/SideNav/SideNavTypeTags.tsx} +26 -11
- 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 -3
- package/src/components/index.ts +4 -2
- package/src/{context/envAdaptor/index.ts → index.ts} +4 -4
- 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 +9 -4
- package/src/routes/AppRouter.tsx +22 -17
- 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 +6 -5
- 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 +66 -43
- 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 +6 -3
- 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/{hooks → scenes/MethodTagScene}/index.ts +1 -1
- 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/action_creators.spec.ts → lodes/selectors.spec.ts} +15 -10
- 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/{reducers/search/actions.ts → test-data/declarations.ts} +16 -15
- 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/search/SearchContext.ts → test-utils/lodes.tsx} +15 -16
- 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/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.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/SideNav/SearchCriteriaSelector.js +0 -38
- package/lib/esm/components/SideNav/SearchCriteriaSelector.js.map +0 -1
- 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/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/somethingWentWrong.svg +0 -45
- package/src/components/SideNav/SearchCriteriaSelector.tsx +0 -75
- package/src/context/envAdaptor/EnvAdaptorContext.ts +0 -38
- package/src/context/index.ts +0 -28
- package/src/context/lode/index.ts +0 -26
- package/src/context/search/index.ts +0 -26
- package/src/reducers/search/actions.spec.ts +0 -50
- package/src/reducers/search/reducer.spec.ts +0 -72
- package/src/reducers/search/reducer.ts +0 -66
- package/src/scenes/MethodScene/utils.spec.ts +0 -95
- package/src/scenes/MethodScene/utils.ts +0 -121
- package/src/state/settings/action_creators.ts +0 -33
- package/src/test-utils/render_with_lode.tsx +0 -74
- package/src/test-utils/render_with_search.tsx +0 -69
- package/src/utils/envAdaptor.spec.ts +0 -53
- package/src/utils/envAdaptor.ts +0 -120
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/scenes/DiffScene/DocDiff/DiffBanner.tsx"],"names":["React","Grid","Flex","FlexItem","Code","Heading","DiffLegend","DiffBanner","item","method","name","id","summary","diffCount"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/scenes/DiffScene/DocDiff/DiffBanner.tsx"],"names":["React","Grid","Flex","FlexItem","Code","Heading","DiffLegend","DiffBanner","item","method","name","id","summary","diffCount"],"mappings":"AA0BA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EAAeC,IAAf,EAAqBC,QAArB,EAA+BC,IAA/B,EAAqCC,OAArC,QAAoD,oBAApD;AAEA,SAASC,UAAT,QAA2B,cAA3B;AAOA,OAAO,IAAMC,UAA+B,GAAG;AAAA,MAAC;AAAEC,IAAAA,IAAF;AAAQC,IAAAA;AAAR,GAAD;AAAA,SAC7C,oBAAC,IAAD;AAAM,IAAA,cAAc,EAAC,eAArB;AAAqC,IAAA,OAAO,EAAE;AAA9C,KACE,oBAAC,QAAD,QACE,oBAAC,IAAD,QAAOD,IAAI,CAACE,IAAZ,CADF,CADF,EAIE,oBAAC,QAAD,QACE,oBAAC,OAAD;AAAS,IAAA,EAAE,EAAC,IAAZ;AAAiB,IAAA,QAAQ;AAAzB,KACGF,IAAI,CAACG,EADR,CADF,CAJF,EASE,oBAAC,QAAD,QACE,oBAAC,OAAD;AAAS,IAAA,EAAE,EAAC,IAAZ;AAAiB,IAAA,QAAQ;AAAzB,KACGF,MADH,aACGA,MADH,uBACGA,MAAM,CAAEG,OADX,CADF,CATF,EAcE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAC,MAAZ;AAAmB,IAAA,cAAc,EAAC;AAAlC,KACE,oBAAC,UAAD;AAAY,IAAA,KAAK,EAAEJ,IAAI,CAACK;AAAxB,IADF,CAdF,CAD6C;AAAA,CAAxC","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 { Grid, Flex, FlexItem, Code, Heading } from '@looker/components'\nimport type { DiffRow, IMethod } from '@looker/sdk-codegen'\nimport { DiffLegend } from './DiffLegend'\n\ninterface DiffBannerProps {\n item: DiffRow\n method: IMethod\n}\n\nexport const DiffBanner: FC<DiffBannerProps> = ({ item, method }) => (\n <Grid justifyContent=\"space-between\" columns={4}>\n <FlexItem>\n <Code>{item.name}</Code>\n </FlexItem>\n <FlexItem>\n <Heading as=\"h4\" truncate>\n {item.id}\n </Heading>\n </FlexItem>\n <FlexItem>\n <Heading as=\"h4\" truncate>\n {method?.summary}\n </Heading>\n </FlexItem>\n <Flex width=\"100%\" justifyContent=\"flex-end\">\n <DiffLegend count={item.diffCount} />\n </Flex>\n </Grid>\n)\n"],"file":"DiffBanner.js"}
|
|
@@ -4,7 +4,7 @@ import { useHistory } from 'react-router';
|
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { Accordion2, Box, Card, Grid, Heading } from '@looker/components';
|
|
6
6
|
import { useSelector } from 'react-redux';
|
|
7
|
-
import {
|
|
7
|
+
import { selectSdkLanguage } from '../../../state';
|
|
8
8
|
import { buildMethodPath } from '../../../utils';
|
|
9
9
|
import { DiffBanner } from './DiffBanner';
|
|
10
10
|
import { differ } from './docDiffUtils';
|
|
@@ -57,7 +57,7 @@ export var DiffItem = _ref5 => {
|
|
|
57
57
|
rightKey,
|
|
58
58
|
rightSpec
|
|
59
59
|
} = _ref5;
|
|
60
|
-
var selectedSdkLanguage = useSelector(
|
|
60
|
+
var selectedSdkLanguage = useSelector(selectSdkLanguage);
|
|
61
61
|
var [leftMethod, setLeftMethod] = useState(leftSpec.methods[item.name]);
|
|
62
62
|
var [rightMethod, setRightMethod] = useState(rightSpec.methods[item.name]);
|
|
63
63
|
var [method, setMethod] = useState(leftMethod || rightMethod);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/scenes/DiffScene/DocDiff/DiffItem.tsx"],"names":["React","useState","useEffect","ReactDiffViewer","DiffMethod","useHistory","styled","Accordion2","Box","Card","Grid","Heading","useSelector","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/scenes/DiffScene/DocDiff/DiffItem.tsx"],"names":["React","useState","useEffect","ReactDiffViewer","DiffMethod","useHistory","styled","Accordion2","Box","Card","Grid","Heading","useSelector","selectSdkLanguage","buildMethodPath","DiffBanner","differ","DiffLink","theme","colors","ui5","space","xsmall","large","key","DiffMethodLink","method","specKey","history","handleClick","e","stopPropagation","tag","schema","tags","path","name","push","DiffItem","item","leftKey","leftSpec","rightKey","rightSpec","selectedSdkLanguage","leftMethod","setLeftMethod","methods","rightMethod","setRightMethod","setMethod","isOpen","setIsOpen","leftSide","setLeftSide","rightSide","setRightSide","lhs","rhs","lMethod","rMethod","handleOpen","LINES"],"mappings":"AA0BA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,QAA2C,OAA3C;AACA,OAAOC,eAAP,IAA0BC,UAA1B,QAA4C,mBAA5C;AACA,SAASC,UAAT,QAA2B,cAA3B;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAASC,UAAT,EAAqBC,GAArB,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c.\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, BaseSyntheticEvent } from 'react'\nimport React, { useState, useEffect } from 'react'\nimport ReactDiffViewer, { DiffMethod } from 'react-diff-viewer'\nimport { useHistory } from 'react-router'\nimport styled from 'styled-components'\nimport { Accordion2, Box, Card, Grid, Heading } from '@looker/components'\nimport type { DiffRow } from '@looker/sdk-codegen/src'\nimport type { ApiModel, IMethod } from '@looker/sdk-codegen'\nimport { useSelector } from 'react-redux'\nimport { selectSdkLanguage } from '../../../state'\nimport { buildMethodPath } from '../../../utils'\nimport { DiffBanner } from './DiffBanner'\nimport { differ } from './docDiffUtils'\n\ninterface DiffMethodLinkProps {\n method: IMethod | undefined\n specKey: string\n}\n\nconst DiffLink = styled(Heading)`\n color: ${({ theme }) => theme.colors.ui5};\n cursor: pointer;\n display: block;\n padding: ${({ theme }) => `${theme.space.xsmall} ${theme.space.large}`};\n &:hover,\n &:visited,\n &:focus,\n &.active {\n color: ${({ theme }) => theme.colors.key};\n cursor: pointer;\n }\n`\n\nexport const DiffMethodLink: FC<DiffMethodLinkProps> = ({\n method,\n specKey,\n}) => {\n const history = useHistory()\n if (!method) return <Heading as=\"h4\">{`Missing in ${specKey}`}</Heading>\n\n const handleClick = (e: BaseSyntheticEvent) => {\n e.stopPropagation()\n const tag = method.schema.tags[0]\n const path = `${buildMethodPath(specKey, tag, method.name)}`\n history.push(path)\n }\n\n return (\n <DiffLink\n as=\"h4\"\n onClick={handleClick}\n >{`${method.name} for ${specKey}`}</DiffLink>\n )\n}\n\ninterface DiffItemProps {\n item: DiffRow\n leftKey: string\n rightKey: string\n leftSpec: ApiModel\n rightSpec: ApiModel\n}\n\nexport const DiffItem: FC<DiffItemProps> = ({\n item,\n leftKey,\n leftSpec,\n rightKey,\n rightSpec,\n}) => {\n const selectedSdkLanguage = useSelector(selectSdkLanguage)\n const [leftMethod, setLeftMethod] = useState<IMethod | undefined>(\n leftSpec.methods[item.name]\n )\n const [rightMethod, setRightMethod] = useState<IMethod | undefined>(\n rightSpec.methods[item.name]\n )\n const [method, setMethod] = useState<IMethod>((leftMethod || rightMethod)!)\n const [isOpen, setIsOpen] = useState(false)\n const [leftSide, setLeftSide] = useState<string>('')\n const [rightSide, setRightSide] = useState<string>('')\n\n useEffect(() => {\n const { lhs, rhs } = differ(item, leftSpec, rightSpec, selectedSdkLanguage)\n const lMethod = leftSpec.methods[item.name]\n const rMethod = rightSpec.methods[item.name]\n setLeftMethod(lMethod)\n setRightMethod(rMethod)\n setMethod((lMethod || rMethod)!)\n setLeftSide(lhs)\n setRightSide(rhs)\n }, [leftSpec, rightSpec, isOpen, selectedSdkLanguage])\n\n const handleOpen = () => {\n setIsOpen(!isOpen)\n }\n\n return (\n <Card border width=\"100%\">\n <Accordion2\n indicatorPosition=\"left\"\n isOpen={isOpen}\n toggleOpen={handleOpen}\n label={<DiffBanner item={item} method={method} />}\n >\n <Grid columns={2}>\n <Box>\n <DiffMethodLink method={leftMethod} specKey={leftKey} />\n </Box>\n <Box>\n <DiffMethodLink method={rightMethod} specKey={rightKey} />\n </Box>\n </Grid>\n <ReactDiffViewer\n oldValue={leftSide}\n newValue={rightSide}\n splitView={true}\n compareMethod={DiffMethod.LINES}\n showDiffOnly={true}\n />\n </Accordion2>\n </Card>\n )\n}\n"],"file":"DiffItem.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/scenes/DiffScene/DocDiff/DiffLegend.tsx"],"names":["React","Code","Flex","Icon","Space","Add","ChangeHistory","Remove","DiffLegend","count","added","changed","removed"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/scenes/DiffScene/DocDiff/DiffLegend.tsx"],"names":["React","Code","Flex","Icon","Space","Add","ChangeHistory","Remove","DiffLegend","count","added","changed","removed"],"mappings":"AA0BA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,IAAT,EAAeC,IAAf,EAAqBC,IAArB,EAA2BC,KAA3B,QAAwC,oBAAxC;AACA,SAASC,GAAT,QAAoB,4BAApB;AACA,SAASC,aAAT,QAA8B,sCAA9B;AACA,SAASC,MAAT,QAAuB,+BAAvB;AAMA,OAAO,IAAMC,UAA+B,GAAG,QAAe;AAAA,MAAd;AAAEC,IAAAA;AAAF,GAAc;AAC5D,SACE,oBAAC,IAAD,QACGA,KAAK,CAACC,KAAN,GAAc,CAAd,IACC,oBAAC,KAAD;AAAO,IAAA,GAAG,EAAC;AAAX,KACE,oBAAC,IAAD;AAAM,IAAA,IAAI,EAAE,oBAAC,GAAD,OAAZ;AAAqB,IAAA,KAAK,EAAC,UAA3B;AAAsC,IAAA,IAAI,EAAC;AAA3C,IADF,EAEE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAC,UAAZ;AAAuB,IAAA,UAAU,EAAC;AAAlC,KACGD,KAAK,CAACC,KADT,CAFF,CAFJ,EASGD,KAAK,CAACE,OAAN,GAAgB,CAAhB,IACC,oBAAC,KAAD;AAAO,IAAA,GAAG,EAAC;AAAX,KACE,oBAAC,IAAD;AAAM,IAAA,IAAI,EAAE,oBAAC,aAAD,OAAZ;AAA+B,IAAA,KAAK,EAAC,MAArC;AAA4C,IAAA,IAAI,EAAC;AAAjD,IADF,EAEE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAC,MAAZ;AAAmB,IAAA,UAAU,EAAC;AAA9B,KACGF,KAAK,CAACE,OADT,CAFF,CAVJ,EAiBGF,KAAK,CAACG,OAAN,GAAgB,CAAhB,IACC,oBAAC,KAAD;AAAO,IAAA,GAAG,EAAC;AAAX,KACE,oBAAC,IAAD;AAAM,IAAA,IAAI,EAAE,oBAAC,MAAD,OAAZ;AAAwB,IAAA,KAAK,EAAC,UAA9B;AAAyC,IAAA,IAAI,EAAC;AAA9C,IADF,EAEE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAC,UAAZ;AAAuB,IAAA,UAAU,EAAC;AAAlC,KACGH,KAAK,CAACG,OADT,CAFF,CAlBJ,CADF;AA4BD,CA7BM","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 { DiffCount } from '@looker/sdk-codegen'\nimport { Code, Flex, Icon, Space } from '@looker/components'\nimport { Add } from '@styled-icons/material/Add'\nimport { ChangeHistory } from '@styled-icons/material/ChangeHistory'\nimport { Remove } from '@styled-icons/material/Remove'\n\ninterface DiffLegendProps {\n count: DiffCount\n}\n\nexport const DiffLegend: FC<DiffLegendProps> = ({ count }) => {\n return (\n <Flex>\n {count.added > 0 && (\n <Space gap=\"xxsmall\">\n <Icon icon={<Add />} color=\"positive\" size=\"small\" />\n <Code color=\"positive\" fontWeight=\"medium\">\n {count.added}\n </Code>\n </Space>\n )}\n {count.changed > 0 && (\n <Space gap=\"xxsmall\">\n <Icon icon={<ChangeHistory />} color=\"warn\" size=\"small\" />\n <Code color=\"warn\" fontWeight=\"medium\">\n {count.changed}\n </Code>\n </Space>\n )}\n {count.removed > 0 && (\n <Space gap=\"xxsmall\">\n <Icon icon={<Remove />} color=\"critical\" size=\"small\" />\n <Code color=\"critical\" fontWeight=\"medium\">\n {count.removed}\n </Code>\n </Space>\n )}\n </Flex>\n )\n}\n"],"file":"DiffLegend.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/scenes/DiffScene/DocDiff/DocDiff.tsx"],"names":["Flex","Heading","Pagination","Space","SpaceVertical","Text","React","useState","DiffItem","DocDiff","delta","leftKey","leftSpec","rightKey","rightSpec","pageSize","page","setPage","length","pageCount","Math","round","pageItemData","slice","map","item","id","nextPage"],"mappings":"AA0BA,SACEA,IADF,EAEEC,OAFF,EAGEC,UAHF,EAIEC,KAJF,EAKEC,aALF,EAMEC,IANF,QAOO,oBAPP;
|
|
1
|
+
{"version":3,"sources":["../../../../../src/scenes/DiffScene/DocDiff/DocDiff.tsx"],"names":["Flex","Heading","Pagination","Space","SpaceVertical","Text","React","useState","DiffItem","DocDiff","delta","leftKey","leftSpec","rightKey","rightSpec","pageSize","page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AAG,EAAC;AAA9B,KACGS,YAAY,CAACE,GAAb,CAAkBC,IAAD,IAChB,oBAAC,QAAD;AACE,IAAA,GAAG,EAAEA,IAAI,CAACC,EADZ;AAEE,IAAA,IAAI,EAAED,IAFR;AAGE,IAAA,OAAO,EAAEd,OAHX;AAIE,IAAA,QAAQ,EAAEC,QAJZ;AAKE,IAAA,QAAQ,EAAEC,QALZ;AAME,IAAA,SAAS,EAAEC;AANb,IADD,CADH,CAJF,EAgBE,oBAAC,UAAD;AACE,IAAA,OAAO,EAAEE,IADX;AAEE,IAAA,KAAK,EAAEG,SAFT;AAGE,IAAA,QAAQ,EAAGQ,QAAD,IAAc;AACtBV,MAAAA,OAAO,CAACU,QAAD,CAAP;AACD;AALH,IAhBF,CAJJ,CADF;AAgCD,CAnDM","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 { ApiModel, DiffRow } from '@looker/sdk-codegen'\nimport {\n Flex,\n Heading,\n Pagination,\n Space,\n SpaceVertical,\n Text,\n} from '@looker/components'\nimport type { FC } from 'react'\nimport React, { useState } from 'react'\nimport { DiffItem } from './DiffItem'\n\nexport interface DocDiffProps {\n /** Using delta because IntelliJ has bugs with 'diff' in a react app */\n delta: DiffRow[]\n /** Left side specKey */\n leftKey: string\n /** Left side spec */\n leftSpec: ApiModel\n /** Right side specKey */\n rightKey: string\n /** Right side spec */\n rightSpec: ApiModel\n /** Number of rows per page. Defaults to 15 */\n pageSize?: number\n}\n\nexport const DocDiff: FC<DocDiffProps> = ({\n delta,\n leftKey,\n leftSpec,\n rightKey,\n rightSpec,\n pageSize = 15,\n}) => {\n const [page, setPage] = useState(1)\n\n if (delta.length === 0) return <Text>{'No differences found'}</Text>\n\n const pageCount = Math.round((delta.length - 1) / pageSize)\n // The +1 is to skip the header row\n const pageItemData = delta.slice(\n (page - 1) * pageSize + 1,\n page * pageSize + 1\n )\n\n return (\n <>\n {delta.length === 0 ? (\n <Text>{'No differences found'}</Text>\n ) : (\n <Flex flexDirection=\"column\" alignItems=\"center\">\n <Space>\n <Heading as=\"h2\">{`${delta.length} differences between ${leftKey} and ${rightKey}`}</Heading>\n </Space>\n <SpaceVertical mt=\"large\" gap=\"xxsmall\">\n {pageItemData.map((item) => (\n <DiffItem\n key={item.id}\n item={item}\n leftKey={leftKey}\n leftSpec={leftSpec}\n rightKey={rightKey}\n rightSpec={rightSpec}\n />\n ))}\n </SpaceVertical>\n <Pagination\n current={page}\n pages={pageCount}\n onChange={(nextPage) => {\n setPage(nextPage)\n }}\n />\n </Flex>\n )}\n </>\n )\n}\n"],"file":"DocDiff.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/scenes/DiffScene/DocDiff/docDiffUtils.tsx"],"names":["getCodeGenerator","PseudoGen","diffText","row","status","api","sdkLanguage","gen","method","methods","name","indent","result","methodSignature","bodyDiff","args","bodyParams","map","p","declareParameter","join","typeDiff","declareType","type","responseDiff","bump","bumper","items","responses","r","statusCode","mediaType","fullName","differ","leftSpec","rightSpec","lhs","lStatus","rStatus","rhs"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/scenes/DiffScene/DocDiff/docDiffUtils.tsx"],"names":["getCodeGenerator","PseudoGen","diffText","row","status","api","sdkLanguage","gen","method","methods","name","indent","result","methodSignature","bodyDiff","args","bodyParams","map","p","declareParameter","join","typeDiff","declareType","type","responseDiff","bump","bumper","items","responses","r","statusCode","mediaType","fullName","differ","leftSpec","rightSpec","lhs","lStatus","rStatus","rhs"],"mappings":"AA2BA,SAASA,gBAAT,EAA2BC,SAA3B,QAA4C,qBAA5C;AAEA,OAAO,IAAMC,QAAQ,GAAG,CACtBC,GADsB,EAEtBC,MAFsB,EAGtBC,GAHsB,EAItBC,WAJsB,KAKnB;AACH,MAAIC,GAAJ;;AACA,MAAID,WAAW,KAAK,KAApB,EAA2B;AACzBC,IAAAA,GAAG,GAAG,IAAIN,SAAJ,CAAcI,GAAd,CAAN;AACD,GAFD,MAEO;AACLE,IAAAA,GAAG,GAAGP,gBAAgB,CAACM,WAAD,EAAcD,GAAd,CAAtB;AACD;;AAED,MAAMG,MAAM,GAAGH,GAAG,CAACI,OAAJ,CAAYN,GAAG,CAACO,IAAhB,CAAf;AACA,MAAI,CAACF,MAAL,EAAa,iBAAUL,GAAG,CAACO,IAAd;AACb,MAAMC,MAAM,GAAG,EAAf;AACA,MAAIC,MAAM,GAAGR,MAAM,qBAAcA,MAAd,UAA2B,EAA9C;AACAQ,EAAAA,MAAM,IAAIL,GAAG,CAACM,eAAJ,CAAoBF,MAApB,EAA4BH,MAA5B,CAAV;;AACA,MAAIL,GAAG,CAACW,QAAR,EAAkB;AAChB,QAAMC,IAAI,GAAGP,MAAM,CAACQ,UAAP,CAAkBC,GAAlB,CAAuBC,CAAD,IACjCX,GAAG,CAACY,gBAAJ,CAAqBR,MAArB,EAA6BH,MAA7B,EAAqCU,CAArC,CADW,CAAb;AAGAN,IAAAA,MAAM,uBA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IT 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 { ApiModel, DiffRow, ICodeGen } from '@looker/sdk-codegen'\nimport { getCodeGenerator, PseudoGen } from '@looker/sdk-codegen'\n\nexport const diffText = (\n row: DiffRow,\n status: string,\n api: ApiModel,\n sdkLanguage: string\n) => {\n let gen: ICodeGen\n if (sdkLanguage === 'All') {\n gen = new PseudoGen(api)\n } else {\n gen = getCodeGenerator(sdkLanguage, api)!\n }\n\n const method = api.methods[row.name]\n if (!method) return `${row.name} is missing`\n const indent = ''\n let result = status ? `Status: ${status}\\n` : ''\n result += gen.methodSignature(indent, method)\n if (row.bodyDiff) {\n const args = method.bodyParams.map((p) =>\n gen.declareParameter(indent, method, p)\n )\n result += `\\nBody:\\n${args.join('\\n')}`\n }\n if (row.typeDiff) {\n result += `\\nMethod type:\\n${gen.declareType(indent, method.type)}`\n }\n if (row.responseDiff) {\n const bump = gen.bumper(indent)\n const items = method.responses.map((r) => {\n return `${bump}Code: ${r.statusCode}\n${bump}MIME: ${r.mediaType}\n${bump}Type:${r.type.fullName}`\n })\n result += `\\nResponses:\\n${items.join('\\n')}`\n }\n return result\n}\n\nexport const differ = (\n row: DiffRow,\n leftSpec: ApiModel,\n rightSpec: ApiModel,\n sdkLanguage: string\n) => {\n const lhs = diffText(\n row,\n row.lStatus !== row.rStatus ? row.lStatus : '',\n leftSpec,\n sdkLanguage\n )\n const rhs = diffText(\n row,\n row.lStatus !== row.rStatus ? row.rStatus : '',\n rightSpec,\n sdkLanguage\n )\n return { lhs, rhs }\n}\n"],"file":"docDiffUtils.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/scenes/DiffScene/diffUtils.ts"],"names":["cloneDeep","compareSpecs","allDiffToggles","standardDiffToggles","diffSpecs","lhs","rhs","options","includeOptions","delta","lMethod","rMethod","includes","lStatus","rStatus","paramsDiff","typeDiff","bodyDiff","responseDiff","addMethodToTags","tags","method","tag","schema","list","name","diffToSpec","lSpec","rSpec","result","methods","forEach","row","types"],"mappings":"AA0BA,OAAOA,SAAP,MAAsB,kBAAtB;
|
|
1
|
+
{"version":3,"sources":["../../../../src/scenes/DiffScene/diffUtils.ts"],"names":["cloneDeep","compareSpecs","allDiffToggles","standardDiffToggles","diffSpecs","lhs","rhs","options","includeOptions","delta","lMethod","rMethod","includes","lStatus","rStatus","paramsDiff","typeDiff","bodyDiff","responseDiff","addMethodToTags","tags","method","tag","schema","list","name","diffToSpec","lSpec","rSpec","result","methods","forEach","row","types"],"mappings":"AA0BA,OAAOA,SAAP,MAAsB,kBAAtB;AASA,SAASC,YAAT,QAA6B,qBAA7B;AAEA,OAAO,IAAMC,cAAc,GAAG,CAC5B,SAD4B,EAE5B,QAF4B,EAG5B,QAH4B,EAI5B,MAJ4B,EAK5B,MAL4B,EAM5B,UAN4B,CAAvB;AASP,OAAO,IAAMC,mBAAmB,GAAG,CACjC,SADiC,EAEjC,QAFiC,EAGjC,MAHiC,EAIjC,MAJ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,KAIrB;AACH,MAAMC,MAAM,GAAG7B,SAAS,CAAC2B,KAAD,CAAxB;AACAE,EAAAA,MAAM,CAACT,IAAP,GAAc,EAAd;AACAS,EAAAA,MAAM,CAACC,OAAP,GAAiB,EAAjB;AAEArB,EAAAA,KAAK,CAACsB,OAAN,CAAeC,GAAD,IAAS;AACrB,QAAMP,IAAI,GAAGO,GAAG,CAACP,IAAjB;AACA,QAAIJ,MAAM,GAAGM,KAAK,CAACG,OAAN,CAAcL,IAAd,CAAb;AACA,QAAI,CAACJ,MAAL,EAAaA,MAAM,GAAGO,KAAK,CAACE,OAAN,CAAcL,IAAd,CAAT;AACbI,IAAAA,MAAM,CAACC,OAAP,CAAeL,IAAf,IAAuBJ,MAAvB;AACAF,IAAAA,eAAe,CAACU,MAAM,CAACT,IAAR,EAAcC,MAAd,CAAf;AACD,GAND;AASAQ,EAAAA,MAAM,CAACI,KAAP,GAAe,EAAf;AACA,SAAOJ,MAAP;AACD,CApBM","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 cloneDeep from 'lodash/cloneDeep'\nimport type {\n DiffFilter,\n DiffRow,\n IApiModel,\n IMethod,\n MethodList,\n TagList,\n} from '@looker/sdk-codegen'\nimport { compareSpecs } from '@looker/sdk-codegen'\n\nexport const allDiffToggles = [\n 'missing',\n 'status',\n 'params',\n 'type',\n 'body',\n 'response',\n]\n\nexport const standardDiffToggles = [\n 'missing',\n 'params',\n 'type',\n 'body',\n 'response',\n]\n\n/**\n * Abstraction of compareAPIs in case we need to transform compareSpecs diff rows\n * @param lhs left side API\n * @param rhs right sight API\n * @param options to include\n */\nexport const diffSpecs = (\n lhs: IApiModel,\n rhs: IApiModel,\n options: string[]\n) => {\n const includeOptions: DiffFilter = (delta, lMethod, rMethod) =>\n (options.includes('missing') && (!lMethod || !rMethod)) ||\n (options.includes('status') && delta.lStatus !== delta.rStatus) ||\n (options.includes('params') && !!delta.paramsDiff) ||\n (options.includes('type') && !!delta.typeDiff) ||\n (options.includes('body') && !!delta.bodyDiff) ||\n (options.includes('response') && !!delta.responseDiff)\n\n return compareSpecs(lhs, rhs, includeOptions)\n}\n\n/**\n * Local copy of private function from ApiModel\n * @param tags list of all tags\n * @param method to add\n */\nconst addMethodToTags = (tags: TagList, method: IMethod): TagList => {\n for (const tag of method.schema.tags) {\n let list: MethodList = tags[tag]\n if (!list) {\n list = {}\n tags[tag] = list\n }\n list[method.name] = method\n }\n return tags\n}\n\n/**\n * Combine diff into a psuedo api spec that contains an established method for each diff result\n * @param delta complete diff to compose\n * @param lSpec left spec\n * @param rSpec right spec\n */\nexport const diffToSpec = (\n delta: DiffRow[],\n lSpec: IApiModel,\n rSpec: IApiModel\n) => {\n const result = cloneDeep(lSpec)\n result.tags = {}\n result.methods = {}\n\n delta.forEach((row) => {\n const name = row.name\n let method = lSpec.methods[name]\n if (!method) method = rSpec.methods[name]\n result.methods[name] = method\n addMethodToTags(result.tags, method)\n })\n\n // TODO diff types then we can populate this also\n result.types = {}\n return result\n}\n"],"file":"diffUtils.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/scenes/HomeScene/HomeScene.tsx"],"names":["React","useParams","ApixSection","DocMarkdown","DocTitle","HomeScene","api","specKey","spec","info","title","description"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/scenes/HomeScene/HomeScene.tsx"],"names":["React","useParams","ApixSection","DocMarkdown","DocTitle","HomeScene","api","specKey","spec","info","title","description"],"mappings":"AA2BA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,SAAT,QAA0B,kBAA1B;AACA,SAASC,WAAT,EAAsBC,WAAtB,EAAmCC,QAAnC,QAAmD,kBAAnD;AAUA,OAAO,IAAMC,SAA2B,GAAG,QAAa;AAAA,MAAZ;AAAEC,IAAAA;AAAF,GAAY;AACtD,MAAM;AAAEC,IAAAA;AAAF,MAAcN,SAAS,EAA7B;AAEA,SACE,oBAAC,WAAD,QACE,oBAAC,QAAD,QAAWK,GAAG,CAACE,IAAJ,CAASC,IAAT,CAAcC,KAAzB,CADF,EAEGJ,GAAG,CAACE,IAAJ,CAASC,IAAT,CAAcE,WAAd,IACC,oBAAC,WAAD;AAAa,IAAA,MAAM,EAAEL,GAAG,CAACE,IAAJ,CAASC,IAAT,CAAcE,WAAnC;AAAgD,IAAA,OAAO,EAAEJ;AAAzD,IAHJ,CADF;AAQD,CAXM","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 { ApiModel } from '@looker/sdk-codegen'\nimport type { FC } from 'react'\nimport React from 'react'\nimport { useParams } from 'react-router-dom'\nimport { ApixSection, DocMarkdown, DocTitle } from '../../components'\n\ninterface DocHomeProps {\n api: ApiModel\n}\n\ninterface DocHomeParams {\n specKey: string\n}\n\nexport const HomeScene: FC<DocHomeProps> = ({ api }) => {\n const { specKey } = useParams<DocHomeParams>()\n\n return (\n <ApixSection>\n <DocTitle>{api.spec.info.title}</DocTitle>\n {api.spec.info.description && (\n <DocMarkdown source={api.spec.info.description} specKey={specKey} />\n )}\n </ApixSection>\n )\n}\n"],"file":"HomeScene.js"}
|
|
@@ -2,21 +2,20 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
2
2
|
|
|
3
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
4
|
|
|
5
|
-
import React, {
|
|
5
|
+
import React, { useState, useEffect } from 'react';
|
|
6
6
|
import { Aside, Button, ButtonOutline, Space, useToggle, ExtendComponentsThemeProvider } from '@looker/components';
|
|
7
7
|
import { Beaker } from '@looker/icons';
|
|
8
|
-
import { useParams } from 'react-router-dom';
|
|
9
|
-
import { RunIt,
|
|
8
|
+
import { useHistory, useParams } from 'react-router-dom';
|
|
9
|
+
import { RunIt, RunItFormKey } from '@looker/run-it';
|
|
10
10
|
import { typeRefs } from '@looker/sdk-codegen';
|
|
11
11
|
import { useSelector } from 'react-redux';
|
|
12
12
|
import { ApixSection, DocActivityType, DocMarkdown, DocRateLimited, DocReferences, DocResponses, DocSDKs, DocSdkUsage, DocSource, DocStatus, DocTitle, DocSchema } from '../../components';
|
|
13
|
-
import {
|
|
13
|
+
import { selectSdkLanguage } from '../../state';
|
|
14
14
|
import { DocOperation, DocRequestBody } from './components';
|
|
15
|
-
import { createInputs } from './utils';
|
|
16
15
|
|
|
17
16
|
var showRunIt = function () {
|
|
18
|
-
var _ref = _asyncToGenerator(function* (
|
|
19
|
-
var data = yield
|
|
17
|
+
var _ref = _asyncToGenerator(function* (adaptor) {
|
|
18
|
+
var data = yield adaptor.localStorageGetItem(RunItFormKey);
|
|
20
19
|
return !!data;
|
|
21
20
|
});
|
|
22
21
|
|
|
@@ -28,16 +27,15 @@ var showRunIt = function () {
|
|
|
28
27
|
export var MethodScene = _ref2 => {
|
|
29
28
|
var {
|
|
30
29
|
api,
|
|
31
|
-
|
|
30
|
+
adaptor,
|
|
32
31
|
setVersionsUrl
|
|
33
32
|
} = _ref2;
|
|
33
|
+
var history = useHistory();
|
|
34
|
+
var sdkLanguage = useSelector(selectSdkLanguage);
|
|
34
35
|
var {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
var {
|
|
39
|
-
methodName,
|
|
40
|
-
specKey
|
|
36
|
+
specKey,
|
|
37
|
+
methodTag,
|
|
38
|
+
methodName
|
|
41
39
|
} = useParams();
|
|
42
40
|
var {
|
|
43
41
|
value,
|
|
@@ -45,16 +43,33 @@ export var MethodScene = _ref2 => {
|
|
|
45
43
|
setOn
|
|
46
44
|
} = useToggle();
|
|
47
45
|
var [method, setMethod] = useState(api.methods[methodName]);
|
|
48
|
-
var seeTypes = typeRefs(api, method.customTypes);
|
|
46
|
+
var seeTypes = typeRefs(api, method === null || method === void 0 ? void 0 : method.customTypes);
|
|
49
47
|
var RunItButton = value ? Button : ButtonOutline;
|
|
50
48
|
useEffect(() => {
|
|
51
|
-
|
|
52
|
-
|
|
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]);
|
|
53
61
|
useEffect(() => {
|
|
54
62
|
var checkRunIt = function () {
|
|
55
63
|
var _ref3 = _asyncToGenerator(function* () {
|
|
56
|
-
|
|
57
|
-
|
|
64
|
+
try {
|
|
65
|
+
var show = yield showRunIt(adaptor);
|
|
66
|
+
|
|
67
|
+
if (show) {
|
|
68
|
+
setOn();
|
|
69
|
+
}
|
|
70
|
+
} catch (error) {
|
|
71
|
+
console.error(error);
|
|
72
|
+
}
|
|
58
73
|
});
|
|
59
74
|
|
|
60
75
|
return function checkRunIt() {
|
|
@@ -63,13 +78,13 @@ export var MethodScene = _ref2 => {
|
|
|
63
78
|
}();
|
|
64
79
|
|
|
65
80
|
checkRunIt();
|
|
66
|
-
}, [
|
|
81
|
+
}, [adaptor, setOn]);
|
|
67
82
|
var runItToggle = React.createElement(RunItButton, {
|
|
68
83
|
color: value ? 'key' : 'neutral',
|
|
69
84
|
iconBefore: React.createElement(Beaker, null),
|
|
70
85
|
onClick: toggle
|
|
71
86
|
}, "Run It");
|
|
72
|
-
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, {
|
|
73
88
|
between: true
|
|
74
89
|
}, React.createElement(Space, null, React.createElement(DocTitle, null, method.summary), React.createElement(DocSource, {
|
|
75
90
|
method: method
|
|
@@ -91,6 +106,7 @@ export var MethodScene = _ref2 => {
|
|
|
91
106
|
api: api,
|
|
92
107
|
method: method
|
|
93
108
|
}), React.createElement(DocRequestBody, {
|
|
109
|
+
api: api,
|
|
94
110
|
method: method
|
|
95
111
|
}), React.createElement(DocSdkUsage, {
|
|
96
112
|
method: method
|
|
@@ -99,10 +115,11 @@ export var MethodScene = _ref2 => {
|
|
|
99
115
|
api: api,
|
|
100
116
|
specKey: specKey
|
|
101
117
|
}), React.createElement(DocResponses, {
|
|
118
|
+
api: api,
|
|
102
119
|
responses: method.responses
|
|
103
120
|
}), React.createElement(DocSchema, {
|
|
104
121
|
object: method.schema
|
|
105
|
-
})),
|
|
122
|
+
})), value && React.createElement(Aside, {
|
|
106
123
|
width: "50rem"
|
|
107
124
|
}, React.createElement(ExtendComponentsThemeProvider, {
|
|
108
125
|
themeCustomizations: {
|
|
@@ -115,9 +132,10 @@ export var MethodScene = _ref2 => {
|
|
|
115
132
|
}
|
|
116
133
|
}
|
|
117
134
|
}, React.createElement(RunIt, {
|
|
135
|
+
adaptor: adaptor,
|
|
136
|
+
key: method.operationId,
|
|
118
137
|
sdkLanguage: sdkLanguage,
|
|
119
138
|
api: api,
|
|
120
|
-
inputs: createInputs(api, method),
|
|
121
139
|
method: method,
|
|
122
140
|
setVersionsUrl: setVersionsUrl
|
|
123
141
|
}))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/scenes/MethodScene/MethodScene.tsx"],"names":["React","useContext","useState","useEffect","Aside","Button","ButtonOutline","Space","useToggle","ExtendComponentsThemeProvider","Beaker","useParams","RunIt","RunItContext","RunItFormKey","typeRefs","useSelector","ApixSection","DocActivityType","DocMarkdown","DocRateLimited","DocReferences","DocResponses","DocSDKs","DocSdkUsage","DocSource","DocStatus","DocTitle","DocSchema","getSelectedSdkLanguage","DocOperation","DocRequestBody","createInputs","showRunIt","envAdaptor","data","localStorageGetItem","MethodScene","api","setVersionsUrl","sdk","sdkLanguage","methodName","specKey","value","toggle","setOn","method","setMethod","methods","seeTypes","customTypes","RunItButton","checkRunIt","show","runItToggle","summary","description","responses","schema","colors","background","key","text","link","critical"],"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,SAAT,QAA0B,kBAA1B;AACA,SAASC,KAAT,EAA6BC,YAA7B,EAA2CC,YAA3C,QAA+D,gBAA/D;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;AAEA,SAASC,YAAT,EAAuBC,cAAvB,QAA6C,cAA7C;AACA,SAASC,YAAT,QAA6B,SAA7B;;AAaA,IAAMC,SAAS;AAAA,+BAAG,WAAOC,UAAP,EAAuC;AACvD,QAAMC,IAAI,SAASD,UAAU,CAACE,mBAAX,CAA+BtB,YAA/B,CAAnB;AACA,WAAO,CAAC,CAACqB,IAAT;AACD,GAHc;;AAAA,kBAATF,SAAS;AAAA;AAAA;AAAA,GAAf;;AAKA,OAAO,IAAMI,WAAiC,GAAG,SAI3C;AAAA,MAJ4C;AAChDC,IAAAA,GADgD;AAEhDJ,IAAAA,UAFgD;AAGhDK,IAAAA;AAHgD,GAI5C;AACJ,MAAM;AAAEC,IAAAA;AAAF,MAAUvC,UAAU,CAACY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AAI,EAAE,MAHA;AAINC,QAAAA,IAAI,EAAE,SAJA;AAKNC,QAAAA,QAAQ,EAAE;AALJ;AADW;AADvB,KAWE,oBAAC,KAAD;AACE,IAAA,WAAW,EAAExB,WADf;AAEE,IAAA,GAAG,EAAEH,GAFP;AAGE,IAAA,MAAM,EAAEN,YAAY,CAACM,GAAD,EAAMS,MAAN,CAHtB;AAIE,IAAA,MAAM,EAAEA,MAJV;AAKE,IAAA,cAAc,EAAER;AALlB,IAXF,CADF,CAxBJ,CADF;AAiDD,CArFM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { FC, 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 { useParams } from 'react-router-dom'\nimport { RunIt, RunItSetter, RunItContext, RunItFormKey } 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 { IApixEnvAdaptor } from '../../utils'\nimport { DocOperation, DocRequestBody } from './components'\nimport { createInputs } from './utils'\n\ninterface MethodSceneProps {\n api: ApiModel\n envAdaptor: IApixEnvAdaptor\n setVersionsUrl: RunItSetter\n}\n\ninterface MethodSceneParams {\n methodName: string\n specKey: string\n}\n\nconst showRunIt = async (envAdaptor: IApixEnvAdaptor) => {\n const data = await envAdaptor.localStorageGetItem(RunItFormKey)\n return !!data\n}\n\nexport const MethodScene: FC<MethodSceneProps> = ({\n api,\n envAdaptor,\n setVersionsUrl,\n}) => {\n const { sdk } = useContext(RunItContext)\n const sdkLanguage = useSelector(getSelectedSdkLanguage)\n const { methodName, specKey } = 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 setMethod(api.methods[methodName])\n }, [api, methodName])\n\n useEffect(() => {\n const checkRunIt = async () => {\n const show = await showRunIt(envAdaptor)\n if (show) setOn()\n }\n checkRunIt()\n }, [envAdaptor, 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 <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: '#262D33',\n key: '#8AB4F8',\n text: '#fff',\n link: '#8AB4F8',\n critical: '#FF877C',\n },\n }}\n >\n <RunIt\n sdkLanguage={sdkLanguage}\n api={api}\n inputs={createInputs(api, method)}\n method={method}\n setVersionsUrl={setVersionsUrl}\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,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NC,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"}
|
|
@@ -3,7 +3,8 @@ import { CollapserCard } from '@looker/run-it';
|
|
|
3
3
|
import { ExploreType } from '../../../components';
|
|
4
4
|
export var DocRequestBody = _ref => {
|
|
5
5
|
var {
|
|
6
|
-
method
|
|
6
|
+
method,
|
|
7
|
+
api
|
|
7
8
|
} = _ref;
|
|
8
9
|
var bodies = method.bodyParams;
|
|
9
10
|
if (bodies.length === 0) return React.createElement(React.Fragment, null);
|
|
@@ -12,6 +13,7 @@ export var DocRequestBody = _ref => {
|
|
|
12
13
|
id: "bodies",
|
|
13
14
|
heading: header
|
|
14
15
|
}, React.createElement(React.Fragment, null, bodies.map(body => React.createElement(ExploreType, {
|
|
16
|
+
api: api,
|
|
15
17
|
type: body.type,
|
|
16
18
|
open: false,
|
|
17
19
|
key: "body.".concat(body.name)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/scenes/MethodScene/components/DocRequestBody.tsx"],"names":["React","CollapserCard","ExploreType","DocRequestBody","method","bodies","bodyParams","length","header","map","body","type","name"],"mappings":"
|
|
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,EAAkDC,IAAlD,QAA8D,kBAA9D;AACA,SAASC,eAAT,QAAgC,aAAhC;AACA,SAASC,aAAT,QAA8B,SAA9B;AAWA,OAAO,IAAMC,cAAuC,GAAG,QAAa;AAAA,MAAZ;AAAEC,IAAAA;AAAF,GAAY;AAClE,MAAM;AAAEC,IAAAA,OAAF;AAAWC,IAAAA;AAAX,MAAyBb,SAAS,EAAxC;AACA,MAAMc,OAAO,GAAGf,UAAU,EAA1B;AACA,MAAM,CAACgB,KAAD,EAAQC,QAAR,IAAoBlB,QAAQ,CAAC,KAAD,CAAlC;AAEAD,EAAAA,SAAS,CAAC,MAAM;AAEdmB,IAAAA,QAAQ,CAAC,KAAD,CAAR;AACD,GAHQ,EAGN,CAACH,SAAD,CAHM,CAAT;AAKA,MAAMI,OAAO,GAAGN,GAAG,CAACO,IAAJ,CAASL,SAAT,CAAhB;A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AAD,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"}
|