@looker/api-explorer 0.9.55 → 0.9.59
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 +596 -634
- package/CODE_OF_CONDUCT.md +10 -10
- package/e2e/MethodScene.spec.ts +23 -23
- package/e2e/diffScene.spec.ts +115 -115
- package/e2e/e2e.spec.ts +134 -134
- package/e2e/helpers.ts +11 -11
- package/jest-puppeteer.config.js +2 -2
- package/jest.config.js +4 -7
- package/lib/ApiExplorer.js +5 -3
- package/lib/ApiExplorer.js.map +1 -1
- package/lib/App.js +3 -1
- package/lib/App.js.map +1 -1
- package/lib/StandaloneApiExplorer.js +2 -2
- package/lib/StandaloneApiExplorer.js.map +1 -1
- package/lib/components/Banner/Banner.js +2 -2
- package/lib/components/Banner/Banner.js.map +1 -1
- package/lib/components/Banner/index.js.map +1 -1
- package/lib/components/DocActivityType/DocActivityType.js.map +1 -1
- package/lib/components/DocActivityType/index.js.map +1 -1
- package/lib/components/DocCode/DocCode.js.map +1 -1
- package/lib/components/DocCode/index.js.map +1 -1
- package/lib/components/DocMarkdown/DocMarkdown.js.map +1 -1
- package/lib/components/DocMarkdown/index.js.map +1 -1
- package/lib/components/DocMarkdown/utils.js.map +1 -1
- package/lib/components/DocMethodSummary/DocMethodSummary.js.map +1 -1
- package/lib/components/DocMethodSummary/DocSummaryStatus.js.map +1 -1
- package/lib/components/DocMethodSummary/index.js.map +1 -1
- package/lib/components/DocMethodSummary/utils.d.ts +2 -2
- package/lib/components/DocMethodSummary/utils.js +1 -1
- package/lib/components/DocMethodSummary/utils.js.map +1 -1
- package/lib/components/DocPseudo/DocParam.js.map +1 -1
- package/lib/components/DocPseudo/DocParams.js +2 -2
- package/lib/components/DocPseudo/DocParams.js.map +1 -1
- package/lib/components/DocPseudo/DocPrimaryResponse.js.map +1 -1
- package/lib/components/DocPseudo/DocPseudo.js.map +1 -1
- package/lib/components/DocPseudo/index.js.map +1 -1
- package/lib/components/DocRateLimited/DocRateLimited.js.map +1 -1
- package/lib/components/DocRateLimited/index.js.map +1 -1
- package/lib/components/DocReferences/DocReferences.js.map +1 -1
- package/lib/components/DocReferences/index.js.map +1 -1
- package/lib/components/DocReferences/utils.d.ts +2 -2
- package/lib/components/DocReferences/utils.js.map +1 -1
- package/lib/components/DocSDKs/DocDeclarations.js.map +1 -1
- package/lib/components/DocSDKs/DocSDKs.d.ts +1 -1
- package/lib/components/DocSDKs/DocSDKs.js +2 -2
- package/lib/components/DocSDKs/DocSDKs.js.map +1 -1
- package/lib/components/DocSDKs/index.js.map +1 -1
- package/lib/components/DocSDKs/utils.js.map +1 -1
- package/lib/components/DocSchema/DocSchema.js.map +1 -1
- package/lib/components/DocSchema/index.js.map +1 -1
- package/lib/components/DocSdkUsage/DocSdkExampleCell.js.map +1 -1
- package/lib/components/DocSdkUsage/DocSdkUsage.js +2 -2
- package/lib/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
- package/lib/components/DocSdkUsage/index.js.map +1 -1
- package/lib/components/DocSdkUsage/utils.js +3 -6
- package/lib/components/DocSdkUsage/utils.js.map +1 -1
- package/lib/components/DocSource/DocSource.js +0 -1
- package/lib/components/DocSource/DocSource.js.map +1 -1
- package/lib/components/DocSource/index.js.map +1 -1
- package/lib/components/DocStatus/DocStatus.js.map +1 -1
- package/lib/components/DocStatus/index.js.map +1 -1
- package/lib/components/DocTitle/DocTitle.js.map +1 -1
- package/lib/components/DocTitle/index.js.map +1 -1
- package/lib/components/DocTypeSummary/DocTypeSummary.js.map +1 -1
- package/lib/components/DocTypeSummary/index.js.map +1 -1
- package/lib/components/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/lib/components/ErrorBoundary/ErrorBoundary.js +2 -2
- package/lib/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.js.map +1 -1
- package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js +1 -2
- package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
- package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/index.js.map +1 -1
- package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/index.js.map +1 -1
- package/lib/components/ErrorBoundary/components/SomethingWentWrong/index.js.map +1 -1
- package/lib/components/ErrorBoundary/index.js.map +1 -1
- package/lib/components/ExploreType/ExploreProperty.d.ts +1 -1
- package/lib/components/ExploreType/ExploreProperty.js.map +1 -1
- package/lib/components/ExploreType/ExploreType.d.ts +1 -1
- package/lib/components/ExploreType/ExploreType.js.map +1 -1
- package/lib/components/ExploreType/exploreUtils.js +1 -2
- package/lib/components/ExploreType/exploreUtils.js.map +1 -1
- package/lib/components/ExploreType/index.js.map +1 -1
- package/lib/components/Header/Header.js +3 -6
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/index.js.map +1 -1
- package/lib/components/Link/Link.js +2 -3
- package/lib/components/Link/Link.js.map +1 -1
- package/lib/components/Link/index.js.map +1 -1
- package/lib/components/SelectorContainer/ApiSpecSelector.js.map +1 -1
- package/lib/components/SelectorContainer/SdkLanguageSelector.js +2 -2
- package/lib/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
- package/lib/components/SelectorContainer/SelectorContainer.js +1 -2
- package/lib/components/SelectorContainer/SelectorContainer.js.map +1 -1
- package/lib/components/SelectorContainer/index.js.map +1 -1
- package/lib/components/SelectorContainer/utils.js.map +1 -1
- package/lib/components/SideNav/SearchMessage.js.map +1 -1
- package/lib/components/SideNav/SideNav.js +2 -11
- package/lib/components/SideNav/SideNav.js.map +1 -1
- package/lib/components/SideNav/SideNavMethodTags.d.ts +2 -2
- package/lib/components/SideNav/SideNavMethodTags.js +2 -3
- package/lib/components/SideNav/SideNavMethodTags.js.map +1 -1
- package/lib/components/SideNav/SideNavMethods.d.ts +2 -2
- package/lib/components/SideNav/SideNavMethods.js +3 -4
- package/lib/components/SideNav/SideNavMethods.js.map +1 -1
- package/lib/components/SideNav/SideNavTypeTags.d.ts +2 -2
- package/lib/components/SideNav/SideNavTypeTags.js +2 -3
- package/lib/components/SideNav/SideNavTypeTags.js.map +1 -1
- package/lib/components/SideNav/SideNavTypes.d.ts +2 -2
- package/lib/components/SideNav/SideNavTypes.js +4 -5
- package/lib/components/SideNav/SideNavTypes.js.map +1 -1
- package/lib/components/SideNav/index.js.map +1 -1
- package/lib/components/SideNav/searchUtils.js.map +1 -1
- package/lib/components/common/Loader.js.map +1 -1
- package/lib/components/common/common.js +3 -4
- package/lib/components/common/common.js.map +1 -1
- package/lib/components/common/index.js.map +1 -1
- package/lib/components/index.js.map +1 -1
- package/lib/custom.d.js.map +1 -1
- package/lib/esm/ApiExplorer.js +7 -5
- package/lib/esm/ApiExplorer.js.map +1 -1
- package/lib/esm/App.js +3 -1
- package/lib/esm/App.js.map +1 -1
- package/lib/esm/StandaloneApiExplorer.js +2 -2
- package/lib/esm/StandaloneApiExplorer.js.map +1 -1
- package/lib/esm/components/Banner/Banner.js +1 -1
- package/lib/esm/components/Banner/Banner.js.map +1 -1
- package/lib/esm/components/Banner/index.js.map +1 -1
- package/lib/esm/components/DocActivityType/DocActivityType.js +1 -1
- package/lib/esm/components/DocActivityType/DocActivityType.js.map +1 -1
- package/lib/esm/components/DocActivityType/index.js.map +1 -1
- package/lib/esm/components/DocCode/DocCode.js.map +1 -1
- package/lib/esm/components/DocCode/index.js.map +1 -1
- package/lib/esm/components/DocMarkdown/DocMarkdown.js.map +1 -1
- package/lib/esm/components/DocMarkdown/index.js.map +1 -1
- package/lib/esm/components/DocMarkdown/utils.js.map +1 -1
- package/lib/esm/components/DocMethodSummary/DocMethodSummary.js.map +1 -1
- package/lib/esm/components/DocMethodSummary/DocSummaryStatus.js.map +1 -1
- package/lib/esm/components/DocMethodSummary/index.js.map +1 -1
- package/lib/esm/components/DocMethodSummary/utils.js +1 -1
- 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/DocPseudo/index.js.map +1 -1
- package/lib/esm/components/DocRateLimited/DocRateLimited.js.map +1 -1
- package/lib/esm/components/DocRateLimited/index.js.map +1 -1
- package/lib/esm/components/DocReferences/DocReferences.js.map +1 -1
- package/lib/esm/components/DocReferences/index.js.map +1 -1
- package/lib/esm/components/DocReferences/utils.js.map +1 -1
- package/lib/esm/components/DocSDKs/DocDeclarations.js.map +1 -1
- package/lib/esm/components/DocSDKs/DocSDKs.js +1 -1
- package/lib/esm/components/DocSDKs/DocSDKs.js.map +1 -1
- package/lib/esm/components/DocSDKs/index.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/DocSchema/index.js.map +1 -1
- package/lib/esm/components/DocSdkUsage/DocSdkExampleCell.js.map +1 -1
- package/lib/esm/components/DocSdkUsage/DocSdkUsage.js +4 -4
- package/lib/esm/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
- package/lib/esm/components/DocSdkUsage/index.js.map +1 -1
- package/lib/esm/components/DocSdkUsage/utils.js.map +1 -1
- package/lib/esm/components/DocSource/DocSource.js +0 -1
- package/lib/esm/components/DocSource/DocSource.js.map +1 -1
- package/lib/esm/components/DocSource/index.js.map +1 -1
- package/lib/esm/components/DocStatus/DocStatus.js.map +1 -1
- package/lib/esm/components/DocStatus/index.js.map +1 -1
- package/lib/esm/components/DocTitle/DocTitle.js.map +1 -1
- package/lib/esm/components/DocTitle/index.js.map +1 -1
- package/lib/esm/components/DocTypeSummary/DocTypeSummary.js.map +1 -1
- package/lib/esm/components/DocTypeSummary/index.js.map +1 -1
- package/lib/esm/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.js.map +1 -1
- package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
- package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/index.js.map +1 -1
- package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/index.js.map +1 -1
- package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/index.js.map +1 -1
- package/lib/esm/components/ErrorBoundary/index.js.map +1 -1
- package/lib/esm/components/ExploreType/ExploreProperty.js +2 -2
- package/lib/esm/components/ExploreType/ExploreProperty.js.map +1 -1
- package/lib/esm/components/ExploreType/ExploreType.js.map +1 -1
- package/lib/esm/components/ExploreType/exploreUtils.js.map +1 -1
- package/lib/esm/components/ExploreType/index.js.map +1 -1
- package/lib/esm/components/Header/Header.js +1 -1
- package/lib/esm/components/Header/Header.js.map +1 -1
- package/lib/esm/components/Header/index.js.map +1 -1
- package/lib/esm/components/Link/Link.js +1 -1
- package/lib/esm/components/Link/Link.js.map +1 -1
- package/lib/esm/components/Link/index.js.map +1 -1
- package/lib/esm/components/SelectorContainer/ApiSpecSelector.js.map +1 -1
- package/lib/esm/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
- package/lib/esm/components/SelectorContainer/SelectorContainer.js +1 -1
- package/lib/esm/components/SelectorContainer/SelectorContainer.js.map +1 -1
- package/lib/esm/components/SelectorContainer/index.js.map +1 -1
- package/lib/esm/components/SelectorContainer/utils.js +1 -1
- package/lib/esm/components/SelectorContainer/utils.js.map +1 -1
- package/lib/esm/components/SideNav/SearchMessage.js +1 -1
- package/lib/esm/components/SideNav/SearchMessage.js.map +1 -1
- package/lib/esm/components/SideNav/SideNav.js +3 -12
- package/lib/esm/components/SideNav/SideNav.js.map +1 -1
- package/lib/esm/components/SideNav/SideNavMethodTags.js +1 -1
- package/lib/esm/components/SideNav/SideNavMethodTags.js.map +1 -1
- package/lib/esm/components/SideNav/SideNavMethods.js +1 -1
- package/lib/esm/components/SideNav/SideNavMethods.js.map +1 -1
- package/lib/esm/components/SideNav/SideNavTypeTags.js +1 -1
- package/lib/esm/components/SideNav/SideNavTypeTags.js.map +1 -1
- package/lib/esm/components/SideNav/SideNavTypes.js +2 -2
- package/lib/esm/components/SideNav/SideNavTypes.js.map +1 -1
- package/lib/esm/components/SideNav/index.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.map +1 -1
- package/lib/esm/components/common/index.js.map +1 -1
- package/lib/esm/components/index.js.map +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/routes/AppRouter.js.map +1 -1
- package/lib/esm/routes/index.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DiffScene.js +1 -1
- package/lib/esm/scenes/DiffScene/DiffScene.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/DiffBanner.js +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/DiffBanner.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/DiffItem.js +1 -1
- 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 +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/docDiffUtils.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/index.js.map +1 -1
- package/lib/esm/scenes/DiffScene/diffUtils.js.map +1 -1
- package/lib/esm/scenes/DiffScene/index.js.map +1 -1
- package/lib/esm/scenes/ErrorDetailScene/ErrorDetailScene.js +2 -1
- package/lib/esm/scenes/ErrorDetailScene/ErrorDetailScene.js.map +1 -1
- package/lib/esm/scenes/ErrorDetailScene/index.js.map +1 -1
- package/lib/esm/scenes/HomeScene/HomeScene.js.map +1 -1
- package/lib/esm/scenes/HomeScene/index.js.map +1 -1
- package/lib/esm/scenes/MethodScene/MethodScene.js +3 -3
- 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.map +1 -1
- package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponseTypes.js +2 -2
- package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponseTypes.js.map +1 -1
- package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponses.js +2 -2
- package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponses.js.map +1 -1
- package/lib/esm/scenes/MethodScene/components/DocResponses/index.js.map +1 -1
- package/lib/esm/scenes/MethodScene/components/DocResponses/utils.js.map +1 -1
- package/lib/esm/scenes/MethodScene/components/index.js.map +1 -1
- package/lib/esm/scenes/MethodScene/index.js.map +1 -1
- package/lib/esm/scenes/MethodTagScene/MethodTagScene.js +2 -2
- package/lib/esm/scenes/MethodTagScene/MethodTagScene.js.map +1 -1
- package/lib/esm/scenes/MethodTagScene/index.js.map +1 -1
- package/lib/esm/scenes/MethodTagScene/utils.js.map +1 -1
- package/lib/esm/scenes/TypeScene/TypeScene.js +3 -3
- package/lib/esm/scenes/TypeScene/TypeScene.js.map +1 -1
- package/lib/esm/scenes/TypeScene/index.js.map +1 -1
- package/lib/esm/scenes/TypeTagScene/TypeTagScene.js +1 -1
- package/lib/esm/scenes/TypeTagScene/TypeTagScene.js.map +1 -1
- package/lib/esm/scenes/TypeTagScene/index.js.map +1 -1
- package/lib/esm/scenes/TypeTagScene/utils.js.map +1 -1
- package/lib/esm/scenes/index.js.map +1 -1
- package/lib/esm/scenes/utils/hooks/index.js.map +1 -1
- package/lib/esm/scenes/utils/hooks/tagStoreSync.js.map +1 -1
- package/lib/esm/scenes/utils/index.js.map +1 -1
- package/lib/esm/state/index.js.map +1 -1
- package/lib/esm/state/lodes/index.js.map +1 -1
- package/lib/esm/state/lodes/sagas.js.map +1 -1
- package/lib/esm/state/lodes/selectors.js.map +1 -1
- package/lib/esm/state/lodes/slice.js.map +1 -1
- package/lib/esm/state/settings/index.js.map +1 -1
- package/lib/esm/state/settings/sagas.js +6 -6
- package/lib/esm/state/settings/sagas.js.map +1 -1
- package/lib/esm/state/settings/selectors.js.map +1 -1
- package/lib/esm/state/settings/slice.js +4 -4
- package/lib/esm/state/settings/slice.js.map +1 -1
- package/lib/esm/state/specs/index.js.map +1 -1
- package/lib/esm/state/specs/sagas.js +1 -1
- package/lib/esm/state/specs/sagas.js.map +1 -1
- package/lib/esm/state/specs/selectors.js.map +1 -1
- package/lib/esm/state/specs/slice.js.map +1 -1
- package/lib/esm/state/store.js +5 -5
- package/lib/esm/state/store.js.map +1 -1
- package/lib/esm/test-data/declarations.js.map +1 -1
- package/lib/esm/test-data/examples.js.map +1 -1
- package/lib/esm/test-data/index.js.map +1 -1
- package/lib/esm/test-data/sdkLanguages.js.map +1 -1
- package/lib/esm/test-data/specs.js +4 -4
- package/lib/esm/test-data/specs.js.map +1 -1
- package/lib/esm/test-utils/index.js.map +1 -1
- package/lib/esm/test-utils/lodes.js.map +1 -1
- package/lib/esm/test-utils/redux.js +5 -5
- package/lib/esm/test-utils/redux.js.map +1 -1
- package/lib/esm/test-utils/router.js.map +1 -1
- package/lib/esm/utils/adaptorUtils.js.map +1 -1
- package/lib/esm/utils/apixAdaptor.js +1 -1
- package/lib/esm/utils/apixAdaptor.js.map +1 -1
- package/lib/esm/utils/highlight.js.map +1 -1
- package/lib/esm/utils/hooks/globalStoreSync.js.map +1 -1
- package/lib/esm/utils/hooks/index.js.map +1 -1
- package/lib/esm/utils/hooks/navigation.js +2 -1
- package/lib/esm/utils/hooks/navigation.js.map +1 -1
- package/lib/esm/utils/hooks/useQuery.js.map +1 -1
- package/lib/esm/utils/index.js.map +1 -1
- package/lib/esm/utils/lodeUtils.js.map +1 -1
- package/lib/esm/utils/path.js +1 -1
- package/lib/esm/utils/path.js.map +1 -1
- package/lib/esm/utils/sdkLanguage.js +4 -4
- package/lib/esm/utils/sdkLanguage.js.map +1 -1
- package/lib/esm/utils/useWindowSize.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/routes/AppRouter.js.map +1 -1
- package/lib/routes/index.js.map +1 -1
- package/lib/scenes/DiffScene/DiffScene.js +2 -2
- package/lib/scenes/DiffScene/DiffScene.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/DiffBanner.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/DiffItem.js +2 -2
- package/lib/scenes/DiffScene/DocDiff/DiffItem.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/DiffLegend.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/DocDiff.js +2 -2
- package/lib/scenes/DiffScene/DocDiff/DocDiff.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/docDiffUtils.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/index.js.map +1 -1
- package/lib/scenes/DiffScene/diffUtils.js +2 -4
- package/lib/scenes/DiffScene/diffUtils.js.map +1 -1
- package/lib/scenes/DiffScene/index.js.map +1 -1
- package/lib/scenes/ErrorDetailScene/ErrorDetailScene.d.ts +2 -2
- package/lib/scenes/ErrorDetailScene/ErrorDetailScene.js +2 -1
- package/lib/scenes/ErrorDetailScene/ErrorDetailScene.js.map +1 -1
- package/lib/scenes/ErrorDetailScene/index.js.map +1 -1
- package/lib/scenes/HomeScene/HomeScene.js.map +1 -1
- package/lib/scenes/HomeScene/index.js.map +1 -1
- package/lib/scenes/MethodScene/MethodScene.js +2 -2
- package/lib/scenes/MethodScene/MethodScene.js.map +1 -1
- package/lib/scenes/MethodScene/components/DocOperation.js.map +1 -1
- package/lib/scenes/MethodScene/components/DocRequestBody.js.map +1 -1
- package/lib/scenes/MethodScene/components/DocResponses/DocResponseTypes.d.ts +3 -3
- package/lib/scenes/MethodScene/components/DocResponses/DocResponseTypes.js +2 -2
- package/lib/scenes/MethodScene/components/DocResponses/DocResponseTypes.js.map +1 -1
- package/lib/scenes/MethodScene/components/DocResponses/DocResponses.d.ts +2 -2
- package/lib/scenes/MethodScene/components/DocResponses/DocResponses.js +2 -2
- package/lib/scenes/MethodScene/components/DocResponses/DocResponses.js.map +1 -1
- package/lib/scenes/MethodScene/components/DocResponses/index.js.map +1 -1
- package/lib/scenes/MethodScene/components/DocResponses/utils.js.map +1 -1
- package/lib/scenes/MethodScene/components/index.js.map +1 -1
- package/lib/scenes/MethodScene/index.js.map +1 -1
- package/lib/scenes/MethodTagScene/MethodTagScene.js +2 -2
- package/lib/scenes/MethodTagScene/MethodTagScene.js.map +1 -1
- package/lib/scenes/MethodTagScene/index.js.map +1 -1
- package/lib/scenes/MethodTagScene/utils.js.map +1 -1
- package/lib/scenes/TypeScene/TypeScene.js +2 -2
- package/lib/scenes/TypeScene/TypeScene.js.map +1 -1
- package/lib/scenes/TypeScene/index.js.map +1 -1
- package/lib/scenes/TypeTagScene/TypeTagScene.js +2 -2
- package/lib/scenes/TypeTagScene/TypeTagScene.js.map +1 -1
- package/lib/scenes/TypeTagScene/index.js.map +1 -1
- package/lib/scenes/TypeTagScene/utils.js.map +1 -1
- package/lib/scenes/index.js.map +1 -1
- package/lib/scenes/utils/hooks/index.js.map +1 -1
- package/lib/scenes/utils/hooks/tagStoreSync.js.map +1 -1
- package/lib/scenes/utils/index.js.map +1 -1
- package/lib/state/index.js.map +1 -1
- package/lib/state/lodes/index.js.map +1 -1
- package/lib/state/lodes/sagas.js.map +1 -1
- package/lib/state/lodes/selectors.js.map +1 -1
- package/lib/state/lodes/slice.d.ts +1 -1
- package/lib/state/lodes/slice.js +3 -6
- package/lib/state/lodes/slice.js.map +1 -1
- package/lib/state/settings/index.js.map +1 -1
- package/lib/state/settings/sagas.js +4 -4
- package/lib/state/settings/sagas.js.map +1 -1
- package/lib/state/settings/selectors.js.map +1 -1
- package/lib/state/settings/slice.d.ts +4 -4
- package/lib/state/settings/slice.js +8 -12
- package/lib/state/settings/slice.js.map +1 -1
- package/lib/state/specs/index.js.map +1 -1
- package/lib/state/specs/sagas.js.map +1 -1
- package/lib/state/specs/selectors.js.map +1 -1
- package/lib/state/specs/slice.js +3 -6
- package/lib/state/specs/slice.js.map +1 -1
- package/lib/state/store.js +5 -6
- package/lib/state/store.js.map +1 -1
- package/lib/test-data/declarations.js +1 -2
- package/lib/test-data/declarations.js.map +1 -1
- package/lib/test-data/examples.js +1 -2
- package/lib/test-data/examples.js.map +1 -1
- package/lib/test-data/index.js.map +1 -1
- package/lib/test-data/sdkLanguages.js +2 -4
- package/lib/test-data/sdkLanguages.js.map +1 -1
- package/lib/test-data/specs.js +8 -12
- package/lib/test-data/specs.js.map +1 -1
- package/lib/test-utils/index.js.map +1 -1
- package/lib/test-utils/lodes.d.ts +1 -1
- package/lib/test-utils/lodes.js.map +1 -1
- package/lib/test-utils/redux.d.ts +6 -5
- package/lib/test-utils/redux.js +7 -10
- package/lib/test-utils/redux.js.map +1 -1
- package/lib/test-utils/router.d.ts +3 -2
- package/lib/test-utils/router.js +1 -2
- package/lib/test-utils/router.js.map +1 -1
- package/lib/utils/adaptorUtils.d.ts +3 -3
- package/lib/utils/adaptorUtils.js +3 -6
- package/lib/utils/adaptorUtils.js.map +1 -1
- package/lib/utils/apixAdaptor.js.map +1 -1
- package/lib/utils/highlight.d.ts +2 -2
- package/lib/utils/highlight.js.map +1 -1
- package/lib/utils/hooks/globalStoreSync.js.map +1 -1
- package/lib/utils/hooks/index.js.map +1 -1
- package/lib/utils/hooks/navigation.d.ts +1 -1
- package/lib/utils/hooks/navigation.js +2 -1
- package/lib/utils/hooks/navigation.js.map +1 -1
- package/lib/utils/hooks/useQuery.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/lodeUtils.d.ts +1 -1
- package/lib/utils/lodeUtils.js +2 -4
- package/lib/utils/lodeUtils.js.map +1 -1
- package/lib/utils/path.d.ts +2 -2
- package/lib/utils/path.js +5 -9
- package/lib/utils/path.js.map +1 -1
- package/lib/utils/sdkLanguage.js +5 -6
- package/lib/utils/sdkLanguage.js.map +1 -1
- package/lib/utils/useWindowSize.js.map +1 -1
- package/package.json +38 -38
- package/src/ApiExplorer.tsx +72 -72
- package/src/App.tsx +9 -9
- package/src/StandaloneApiExplorer.tsx +24 -24
- package/src/components/Banner/Banner.spec.tsx +27 -25
- package/src/components/Banner/Banner.tsx +20 -20
- package/src/components/Banner/index.ts +1 -1
- package/src/components/DocActivityType/DocActivityType.spec.tsx +17 -16
- package/src/components/DocActivityType/DocActivityType.tsx +6 -6
- package/src/components/DocActivityType/index.ts +1 -1
- package/src/components/DocCode/DocCode.tsx +16 -14
- package/src/components/DocCode/index.ts +1 -1
- package/src/components/DocMarkdown/DocMarkdown.spec.tsx +41 -41
- package/src/components/DocMarkdown/DocMarkdown.tsx +19 -19
- package/src/components/DocMarkdown/index.ts +1 -1
- package/src/components/DocMarkdown/utils.spec.ts +26 -26
- package/src/components/DocMarkdown/utils.ts +4 -4
- package/src/components/DocMethodSummary/DocMethodSummary.spec.tsx +18 -17
- package/src/components/DocMethodSummary/DocMethodSummary.tsx +9 -9
- package/src/components/DocMethodSummary/DocSummaryStatus.spec.tsx +12 -12
- package/src/components/DocMethodSummary/DocSummaryStatus.tsx +6 -6
- package/src/components/DocMethodSummary/index.tsx +3 -3
- package/src/components/DocMethodSummary/utils.spec.tsx +5 -5
- package/src/components/DocMethodSummary/utils.tsx +23 -23
- package/src/components/DocPseudo/DocParam.spec.tsx +22 -22
- package/src/components/DocPseudo/DocParam.tsx +7 -7
- package/src/components/DocPseudo/DocParams.spec.tsx +27 -27
- package/src/components/DocPseudo/DocParams.tsx +6 -6
- package/src/components/DocPseudo/DocPrimaryResponse.spec.tsx +16 -16
- package/src/components/DocPseudo/DocPrimaryResponse.tsx +6 -6
- package/src/components/DocPseudo/DocPseudo.spec.tsx +15 -13
- package/src/components/DocPseudo/DocPseudo.tsx +11 -11
- package/src/components/DocPseudo/index.tsx +1 -1
- package/src/components/DocRateLimited/DocRateLimited.spec.tsx +16 -16
- package/src/components/DocRateLimited/DocRateLimited.tsx +6 -6
- package/src/components/DocRateLimited/index.ts +1 -1
- package/src/components/DocReferences/DocReferences.spec.tsx +29 -26
- package/src/components/DocReferences/DocReferences.tsx +16 -16
- package/src/components/DocReferences/index.ts +1 -1
- package/src/components/DocReferences/utils.spec.tsx +2 -2
- package/src/components/DocReferences/utils.tsx +8 -8
- package/src/components/DocSDKs/DocDeclarations.tsx +7 -7
- package/src/components/DocSDKs/DocSDKs.spec.tsx +22 -22
- package/src/components/DocSDKs/DocSDKs.tsx +36 -36
- package/src/components/DocSDKs/index.ts +1 -1
- package/src/components/DocSDKs/utils.spec.ts +8 -8
- package/src/components/DocSDKs/utils.ts +6 -6
- package/src/components/DocSchema/DocSchema.tsx +9 -9
- package/src/components/DocSchema/index.ts +1 -1
- package/src/components/DocSdkUsage/DocSdkExampleCell.tsx +5 -5
- package/src/components/DocSdkUsage/DocSdkUsage.spec.tsx +22 -22
- package/src/components/DocSdkUsage/DocSdkUsage.tsx +35 -34
- package/src/components/DocSdkUsage/index.ts +1 -1
- package/src/components/DocSdkUsage/utils.ts +29 -30
- package/src/components/DocSource/DocSource.spec.tsx +33 -37
- package/src/components/DocSource/DocSource.tsx +17 -17
- package/src/components/DocSource/index.ts +1 -1
- package/src/components/DocStatus/DocStatus.spec.tsx +12 -12
- package/src/components/DocStatus/DocStatus.tsx +8 -8
- package/src/components/DocStatus/index.ts +1 -1
- package/src/components/DocTitle/DocTitle.spec.tsx +9 -9
- package/src/components/DocTitle/DocTitle.tsx +4 -4
- package/src/components/DocTitle/index.ts +1 -1
- package/src/components/DocTypeSummary/DocTypeSummary.spec.tsx +11 -11
- package/src/components/DocTypeSummary/DocTypeSummary.tsx +11 -11
- package/src/components/DocTypeSummary/index.tsx +1 -1
- package/src/components/ErrorBoundary/ErrorBoundary.spec.tsx +29 -29
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +16 -16
- package/src/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.spec.tsx +17 -17
- package/src/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.tsx +11 -11
- package/src/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.tsx +4 -4
- package/src/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/index.ts +1 -1
- package/src/components/ErrorBoundary/components/SomethingWentWrong/components/index.ts +1 -1
- package/src/components/ErrorBoundary/components/SomethingWentWrong/index.ts +2 -2
- package/src/components/ErrorBoundary/index.ts +1 -1
- package/src/components/ExploreType/ExploreProperty.spec.tsx +60 -58
- package/src/components/ExploreType/ExploreProperty.tsx +53 -53
- package/src/components/ExploreType/ExploreType.spec.tsx +41 -39
- package/src/components/ExploreType/ExploreType.tsx +33 -33
- package/src/components/ExploreType/exploreUtils.spec.tsx +38 -38
- package/src/components/ExploreType/exploreUtils.tsx +44 -44
- package/src/components/ExploreType/index.ts +3 -3
- package/src/components/Header/Header.spec.tsx +38 -44
- package/src/components/Header/Header.tsx +18 -18
- package/src/components/Header/index.ts +1 -1
- package/src/components/Link/Link.tsx +3 -3
- package/src/components/Link/index.ts +1 -1
- package/src/components/SelectorContainer/ApiSpecSelector.spec.tsx +31 -31
- package/src/components/SelectorContainer/ApiSpecSelector.tsx +18 -18
- package/src/components/SelectorContainer/SdkLanguageSelector.spec.tsx +42 -42
- package/src/components/SelectorContainer/SdkLanguageSelector.tsx +19 -19
- package/src/components/SelectorContainer/SelectorContainer.spec.tsx +31 -39
- package/src/components/SelectorContainer/SelectorContainer.tsx +15 -15
- package/src/components/SelectorContainer/index.ts +1 -1
- package/src/components/SelectorContainer/utils.ts +10 -10
- package/src/components/SideNav/SearchMessage.tsx +7 -7
- package/src/components/SideNav/SideNav.spec.tsx +70 -70
- package/src/components/SideNav/SideNav.tsx +77 -83
- package/src/components/SideNav/SideNavMethodTags.spec.tsx +35 -35
- package/src/components/SideNav/SideNavMethodTags.tsx +9 -9
- package/src/components/SideNav/SideNavMethods.spec.tsx +52 -52
- package/src/components/SideNav/SideNavMethods.tsx +28 -28
- package/src/components/SideNav/SideNavTypeTags.spec.tsx +36 -36
- package/src/components/SideNav/SideNavTypeTags.tsx +9 -9
- package/src/components/SideNav/SideNavTypes.spec.tsx +36 -36
- package/src/components/SideNav/SideNavTypes.tsx +28 -28
- package/src/components/SideNav/index.ts +1 -1
- package/src/components/SideNav/searchUtils.ts +16 -16
- package/src/components/common/Loader.tsx +7 -7
- package/src/components/common/common.tsx +13 -13
- package/src/components/common/index.ts +2 -2
- package/src/components/index.ts +22 -22
- package/src/custom.d.ts +2 -2
- package/src/index.ts +5 -5
- package/src/routes/AppRouter.tsx +11 -11
- package/src/routes/index.ts +1 -1
- package/src/scenes/DiffScene/DiffScene.tsx +54 -54
- package/src/scenes/DiffScene/DocDiff/DiffBanner.tsx +8 -8
- package/src/scenes/DiffScene/DocDiff/DiffItem.spec.tsx +26 -26
- package/src/scenes/DiffScene/DocDiff/DiffItem.tsx +47 -47
- package/src/scenes/DiffScene/DocDiff/DiffLegend.tsx +10 -10
- package/src/scenes/DiffScene/DocDiff/DocDiff.spec.tsx +62 -66
- package/src/scenes/DiffScene/DocDiff/DocDiff.tsx +18 -18
- package/src/scenes/DiffScene/DocDiff/docDiffUtils.tsx +23 -23
- package/src/scenes/DiffScene/DocDiff/index.ts +1 -1
- package/src/scenes/DiffScene/diffUtils.spec.ts +11 -11
- package/src/scenes/DiffScene/diffUtils.ts +26 -26
- package/src/scenes/DiffScene/index.ts +1 -1
- package/src/scenes/ErrorDetailScene/ErrorDetailScene.tsx +25 -25
- package/src/scenes/ErrorDetailScene/index.ts +1 -1
- package/src/scenes/HomeScene/HomeScene.tsx +12 -12
- package/src/scenes/HomeScene/index.ts +1 -1
- package/src/scenes/MethodScene/MethodScene.tsx +54 -54
- package/src/scenes/MethodScene/components/DocOperation.spec.tsx +17 -17
- package/src/scenes/MethodScene/components/DocOperation.tsx +8 -8
- package/src/scenes/MethodScene/components/DocRequestBody.spec.tsx +14 -14
- package/src/scenes/MethodScene/components/DocRequestBody.tsx +12 -12
- package/src/scenes/MethodScene/components/DocResponses/DocResponseTypes.tsx +15 -15
- package/src/scenes/MethodScene/components/DocResponses/DocResponses.spec.tsx +51 -51
- package/src/scenes/MethodScene/components/DocResponses/DocResponses.tsx +34 -34
- package/src/scenes/MethodScene/components/DocResponses/index.ts +1 -1
- package/src/scenes/MethodScene/components/DocResponses/utils.spec.ts +19 -14
- package/src/scenes/MethodScene/components/DocResponses/utils.ts +8 -8
- package/src/scenes/MethodScene/components/index.ts +3 -3
- package/src/scenes/MethodScene/index.ts +1 -1
- package/src/scenes/MethodTagScene/MethodTagScene.spec.tsx +31 -31
- package/src/scenes/MethodTagScene/MethodTagScene.tsx +44 -39
- package/src/scenes/MethodTagScene/index.ts +1 -1
- package/src/scenes/MethodTagScene/utils.spec.ts +6 -6
- package/src/scenes/MethodTagScene/utils.ts +6 -6
- package/src/scenes/TypeScene/TypeScene.tsx +25 -25
- package/src/scenes/TypeScene/index.ts +1 -1
- package/src/scenes/TypeTagScene/TypeTagScene.spec.tsx +34 -32
- package/src/scenes/TypeTagScene/TypeTagScene.tsx +40 -38
- package/src/scenes/TypeTagScene/index.ts +1 -1
- package/src/scenes/TypeTagScene/utils.spec.ts +6 -6
- package/src/scenes/TypeTagScene/utils.ts +6 -6
- package/src/scenes/index.ts +6 -6
- package/src/scenes/utils/hooks/index.ts +1 -1
- package/src/scenes/utils/hooks/tagStoreSync.spec.ts +37 -37
- package/src/scenes/utils/hooks/tagStoreSync.ts +18 -18
- package/src/scenes/utils/index.ts +1 -1
- package/src/state/index.ts +4 -4
- package/src/state/lodes/index.ts +2 -2
- package/src/state/lodes/sagas.spec.ts +32 -32
- package/src/state/lodes/sagas.ts +11 -11
- package/src/state/lodes/selectors.spec.ts +10 -10
- package/src/state/lodes/selectors.ts +4 -4
- package/src/state/lodes/slice.ts +18 -18
- package/src/state/settings/index.ts +2 -2
- package/src/state/settings/sagas.spec.ts +49 -49
- package/src/state/settings/sagas.ts +18 -18
- package/src/state/settings/selectors.spec.ts +11 -11
- package/src/state/settings/selectors.ts +7 -7
- package/src/state/settings/slice.ts +28 -28
- package/src/state/specs/index.ts +2 -2
- package/src/state/specs/sagas.spec.ts +60 -60
- package/src/state/specs/sagas.ts +27 -27
- package/src/state/specs/selectors.ts +7 -7
- package/src/state/specs/slice.ts +36 -36
- package/src/state/store.ts +24 -24
- package/src/test-data/declarations.ts +2 -2
- package/src/test-data/examples.ts +1 -1
- package/src/test-data/index.ts +4 -4
- package/src/test-data/sdkLanguages.ts +2 -2
- package/src/test-data/specs.ts +13 -13
- package/src/test-utils/index.ts +3 -3
- package/src/test-utils/lodes.tsx +9 -9
- package/src/test-utils/redux.tsx +30 -26
- package/src/test-utils/router.tsx +8 -8
- package/src/utils/adaptorUtils.ts +55 -55
- package/src/utils/apixAdaptor.ts +31 -25
- package/src/utils/highlight.spec.tsx +13 -13
- package/src/utils/highlight.tsx +11 -11
- package/src/utils/hooks/globalStoreSync.spec.tsx +54 -54
- package/src/utils/hooks/globalStoreSync.ts +21 -21
- package/src/utils/hooks/index.ts +3 -3
- package/src/utils/hooks/navigation.spec.ts +47 -45
- package/src/utils/hooks/navigation.ts +33 -30
- package/src/utils/hooks/useQuery.ts +5 -5
- package/src/utils/index.ts +8 -8
- package/src/utils/lodeUtils.ts +17 -17
- package/src/utils/path.spec.ts +57 -55
- package/src/utils/path.ts +42 -42
- package/src/utils/sdkLanguage.spec.ts +24 -24
- package/src/utils/sdkLanguage.ts +15 -14
- package/src/utils/useWindowSize.tsx +8 -8
- package/webpack.dev.config.js +5 -5
- package/webpack.prod.config.js +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diffUtils.js","names":["_cloneDeep","_interopRequireDefault","require","_sdkCodegen","obj","__esModule","default","allDiffToggles","exports","standardDiffToggles","diffSpecs","lhs","rhs","options","includeOptions","delta","lMethod","rMethod","includes","lStatus","rStatus","paramsDiff","typeDiff","bodyDiff","responseDiff","compareSpecs","addMethodToTags","tags","method","tag","schema","list","name","diffToSpec","lSpec","rSpec","result","cloneDeep","methods","forEach","row","types"],"sources":["../../../src/scenes/DiffScene/diffUtils.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport cloneDeep from 'lodash/cloneDeep'
|
|
1
|
+
{"version":3,"file":"diffUtils.js","names":["_cloneDeep","_interopRequireDefault","require","_sdkCodegen","obj","__esModule","default","allDiffToggles","exports","standardDiffToggles","diffSpecs","lhs","rhs","options","includeOptions","delta","lMethod","rMethod","includes","lStatus","rStatus","paramsDiff","typeDiff","bodyDiff","responseDiff","compareSpecs","addMethodToTags","tags","method","tag","schema","list","name","diffToSpec","lSpec","rSpec","result","cloneDeep","methods","forEach","row","types"],"sources":["../../../src/scenes/DiffScene/diffUtils.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport 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"],"mappings":";;;;;;AA0BA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AASA,IAAAC,WAAA,GAAAD,OAAA;AAAmD,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE5C,IAAMG,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,CAC5B,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,UAAU,CACX;AAEM,IAAME,mBAAmB,GAAAD,OAAA,CAAAC,mBAAA,GAAG,CACjC,SAAS,EACT,QAAQ,EACR,MAAM,EACN,MAAM,EACN,UAAU,CACX;AAQM,IAAMC,SAAS,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AAG,IAAAC,kBAAS,EAACH,KAAK,CAAC;EAC/BE,MAAM,CAACT,IAAI,GAAG,CAAC,CAAC;EAChBS,MAAM,CAACE,OAAO,GAAG,CAAC,CAAC;EAEnBvB,KAAK,CAACwB,OAAO,CAAEC,GAAG,IAAK;IACrB,IAAMR,IAAI,GAAGQ,GAAG,CAACR,IAAI;IACrB,IAAIJ,MAAM,GAAGM,KAAK,CAACI,OAAO,CAACN,IAAI,CAAC;IAChC,IAAI,CAACJ,MAAM,EAAEA,MAAM,GAAGO,KAAK,CAACG,OAAO,CAACN,IAAI,CAAC;IACzCI,MAAM,CAACE,OAAO,CAACN,IAAI,CAAC,GAAGJ,MAAM;IAC7BF,eAAe,CAACU,MAAM,CAACT,IAAI,EAAEC,MAAM,CAAC;EACtC,CAAC,CAAC;EAGFQ,MAAM,CAACK,KAAK,GAAG,CAAC,CAAC;EACjB,OAAOL,MAAM;AACf,CAAC;AAAC5B,OAAA,CAAAyB,UAAA,GAAAA,UAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_DiffScene","require"],"sources":["../../../src/scenes/DiffScene/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nexport { DiffScene } from './DiffScene'
|
|
1
|
+
{"version":3,"file":"index.js","names":["_DiffScene","require"],"sources":["../../../src/scenes/DiffScene/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nexport { DiffScene } from './DiffScene';\n"],"mappings":";;;;;;;;;;;AA0BA,IAAAA,UAAA,GAAAC,OAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { IApiModel } from '@looker/sdk-codegen';
|
|
3
3
|
interface ErrorDetailSceneProps {
|
|
4
4
|
api: IApiModel;
|
|
5
5
|
}
|
|
6
|
-
export declare const ErrorDetailScene: ({ api }: ErrorDetailSceneProps) => JSX.Element;
|
|
6
|
+
export declare const ErrorDetailScene: ({ api }: ErrorDetailSceneProps) => React.JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -11,11 +11,12 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
var _utils = require("../../utils");
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
var ErrorDetailScene = _ref => {
|
|
14
|
+
var _match$path;
|
|
14
15
|
var {
|
|
15
16
|
api
|
|
16
17
|
} = _ref;
|
|
17
18
|
var match = (0, _reactRouterDom.useRouteMatch)("/:specKey/err/:statusCode/:verb/*");
|
|
18
|
-
var methodPath = match === null || match === void 0 ? void 0 : match.
|
|
19
|
+
var methodPath = (_match$path = match === null || match === void 0 ? void 0 : match.path) !== null && _match$path !== void 0 ? _match$path : '';
|
|
19
20
|
var adaptor = (0, _extensionUtils.getEnvAdaptor)();
|
|
20
21
|
var errorDoc = new _sdkRtl.ErrorDoc(adaptor.sdk);
|
|
21
22
|
var restPath = errorDoc.specPath(methodPath);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorDetailScene.js","names":["_reactRouterDom","require","_extensionUtils","_sdkRtl","_react","_interopRequireDefault","_utils","obj","__esModule","default","ErrorDetailScene","_ref","api","match","useRouteMatch","methodPath","
|
|
1
|
+
{"version":3,"file":"ErrorDetailScene.js","names":["_reactRouterDom","require","_extensionUtils","_sdkRtl","_react","_interopRequireDefault","_utils","obj","__esModule","default","ErrorDetailScene","_ref","_match$path","api","match","useRouteMatch","methodPath","path","adaptor","getEnvAdaptor","errorDoc","ErrorDoc","sdk","restPath","specPath","methodId","concat","params","verb","toLocaleLowerCase","specKey","statusCode","method","Object","values","methods","find","id","methodTag","schema","tags","methodName","operationId","buildPathWithGlobalParams","useNavigation","redirectPath","e","createElement","Redirect","to","exports"],"sources":["../../../src/scenes/ErrorDetailScene/ErrorDetailScene.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 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 { Redirect, useRouteMatch } from 'react-router-dom';\nimport { getEnvAdaptor } from '@looker/extension-utils';\nimport { ErrorDoc } from '@looker/sdk-rtl';\nimport React from 'react';\nimport type { IApiModel } from '@looker/sdk-codegen';\n\nimport { useNavigation } from '../../utils';\n\ninterface ErrorDetailSceneProps {\n api: IApiModel;\n}\n\n/**\n * Scene responsible for redirecting users from an error doc link to a specific\n * method scene\n */\nexport const ErrorDetailScene = ({ api }: ErrorDetailSceneProps) => {\n const match = useRouteMatch<{\n specKey: string;\n statusCode: string;\n verb: string;\n }>(`/:specKey/err/:statusCode/:verb/*`);\n const methodPath = match?.path ?? '';\n const adaptor = getEnvAdaptor();\n const errorDoc = new ErrorDoc(adaptor.sdk);\n const restPath = errorDoc.specPath(methodPath);\n\n const methodId = `${match?.params.verb} /${restPath}`.toLocaleLowerCase();\n const specKey = match?.params.specKey;\n const statusCode = match?.params.statusCode;\n\n const method = Object.values(api.methods).find(\n (method) => method.id.toLocaleLowerCase() === methodId\n );\n\n const methodTag = method?.schema.tags[0];\n const methodName = method?.operationId;\n\n const { buildPathWithGlobalParams } = useNavigation();\n\n const redirectPath = buildPathWithGlobalParams(\n `/${specKey}/methods/${methodTag}/${methodName}`,\n { e: statusCode }\n );\n\n return <Redirect to={redirectPath} />;\n};\n"],"mappings":";;;;;;AAyBA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAGA,IAAAK,MAAA,GAAAL,OAAA;AAA4C,SAAAI,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAUrC,IAAMG,gBAAgB,GAAGC,IAAA,IAAoC;EAAA,IAAAC,WAAA;EAAA,IAAnC;IAAEC;EAA2B,CAAC,GAAAF,IAAA;EAC7D,IAAMG,KAAK,GAAG,IAAAC,6BAAa,qCAIW,CAAC;EACvC,IAAMC,UAAU,IAAAJ,WAAA,GAAGE,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEG,IAAI,cAAAL,WAAA,cAAAA,WAAA,GAAI,EAAE;EACpC,IAAMM,OAAO,GAAG,IAAAC,6BAAa,EAAC,CAAC;EAC/B,IAAMC,QAAQ,GAAG,IAAIC,gBAAQ,CAACH,OAAO,CAACI,GAAG,CAAC;EAC1C,IAAMC,QAAQ,GAAGH,QAAQ,CAACI,QAAQ,CAACR,UAAU,CAAC;EAE9C,IAAMS,QAAQ,GAAG,GAAAC,MAAA,CAAGZ,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEa,MAAM,CAACC,IAAI,QAAAF,MAAA,CAAKH,QAAQ,EAAGM,iBAAiB,CAAC,CAAC;EACzE,IAAMC,OAAO,GAAGhB,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEa,MAAM,CAACG,OAAO;EACrC,IAAMC,UAAU,GAAGjB,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEa,MAAM,CAACI,UAAU;EAE3C,IAAMC,MAAM,GAAGC,MAAM,CAACC,MAAM,CAACrB,GAAG,CAACsB,OAAO,CAAC,CAACC,IAAI,CAC3CJ,MAAM,IAAKA,MAAM,CAACK,EAAE,CAACR,iBAAiB,CAAC,CAAC,KAAKJ,QAChD,CAAC;EAED,IAAMa,SAAS,GAAGN,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEO,MAAM,CAACC,IAAI,CAAC,CAAC,CAAC;EACxC,IAAMC,UAAU,GAAGT,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEU,WAAW;EAEtC,IAAM;IAAEC;EAA0B,CAAC,GAAG,IAAAC,oBAAa,EAAC,CAAC;EAErD,IAAMC,YAAY,GAAGF,yBAAyB,KAAAjB,MAAA,CACxCI,OAAO,eAAAJ,MAAA,CAAYY,SAAS,OAAAZ,MAAA,CAAIe,UAAU,GAC9C;IAAEK,CAAC,EAAEf;EAAW,CAClB,CAAC;EAED,OAAO3B,MAAA,CAAAK,OAAA,CAAAsC,aAAA,CAAC/C,eAAA,CAAAgD,QAAQ;IAACC,EAAE,EAAEJ;EAAa,CAAE,CAAC;AACvC,CAAC;AAACK,OAAA,CAAAxC,gBAAA,GAAAA,gBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_ErrorDetailScene","require"],"sources":["../../../src/scenes/ErrorDetailScene/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 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 { ErrorDetailScene } from './ErrorDetailScene'
|
|
1
|
+
{"version":3,"file":"index.js","names":["_ErrorDetailScene","require"],"sources":["../../../src/scenes/ErrorDetailScene/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 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 { ErrorDetailScene } from './ErrorDetailScene';\n"],"mappings":";;;;;;;;;;;AAyBA,IAAAA,iBAAA,GAAAC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HomeScene.js","names":["_react","_interopRequireDefault","require","_reactRouterDom","_components","_components2","obj","__esModule","default","HomeScene","_ref","api","specKey","useParams","lookerVersion","createElement","ApixSection","Space","DocTitle","spec","info","title","Tooltip","content","Span","fontSize","description","DocMarkdown","source","exports"],"sources":["../../../src/scenes/HomeScene/HomeScene.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { ApiModel } from '@looker/sdk-codegen'
|
|
1
|
+
{"version":3,"file":"HomeScene.js","names":["_react","_interopRequireDefault","require","_reactRouterDom","_components","_components2","obj","__esModule","default","HomeScene","_ref","api","specKey","useParams","lookerVersion","createElement","ApixSection","Space","DocTitle","spec","info","title","Tooltip","content","Span","fontSize","description","DocMarkdown","source","exports"],"sources":["../../../src/scenes/HomeScene/HomeScene.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { ApiModel } from '@looker/sdk-codegen';\nimport type { FC } from 'react';\nimport React from 'react';\nimport { useParams } from 'react-router-dom';\nimport { Space, Span, Tooltip } from '@looker/components';\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 const lookerVersion = 'x-looker-release-version';\n\n return (\n <ApixSection>\n <Space>\n <DocTitle>{api.spec.info.title}</DocTitle>\n {api.spec.info[lookerVersion] && (\n <Tooltip content=\"Looker version providing this specification\">\n <Span fontSize=\"small\">{api.spec.info[lookerVersion]}</Span>\n </Tooltip>\n )}\n </Space>\n {api.spec.info.description && (\n <DocMarkdown source={api.spec.info.description} specKey={specKey} />\n )}\n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,WAAY;IAACd,OAAO,EAAEA;EAAQ,CAAE,CAE1D,CAAC;AAElB,CAAC;AAACiB,OAAA,CAAApB,SAAA,GAAAA,SAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_HomeScene","require"],"sources":["../../../src/scenes/HomeScene/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { HomeScene } from './HomeScene'
|
|
1
|
+
{"version":3,"file":"index.js","names":["_HomeScene","require"],"sources":["../../../src/scenes/HomeScene/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { HomeScene } from './HomeScene';\n"],"mappings":";;;;;;;;;;;AAyBA,IAAAA,UAAA,GAAAC,OAAA"}
|
|
@@ -15,8 +15,8 @@ var _utils = require("../../utils");
|
|
|
15
15
|
var _components2 = require("../../components");
|
|
16
16
|
var _state = require("../../state");
|
|
17
17
|
var _components3 = require("./components");
|
|
18
|
-
function _getRequireWildcardCache(
|
|
19
|
-
function _interopRequireWildcard(
|
|
18
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
20
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
21
21
|
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); }); }; }
|
|
22
22
|
var showRunIt = function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MethodScene.js","names":["_react","_interopRequireWildcard","require","_components","_icons","_reactRouterDom","_runIt","_sdkCodegen","_reactRedux","_utils","_components2","_state","_components3","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","asyncGeneratorStep","gen","resolve","reject","_next","_throw","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","showRunIt","_ref","adaptor","data","localStorageGetItem","RunItFormKey","_x","MethodScene","_ref2","_query$get","api","getApixAdaptor","history","useHistory","navigate","useNavigation","sdkLanguage","useSelector","selectSdkLanguage","specKey","methodTag","methodName","useParams","toggle","setOn","useToggle","method","setMethod","useState","methods","seeTypes","typeRefs","customTypes","query","useQuery","errorCode","RunItButton","Button","ButtonOutline","docResponsesRef","useRef","useEffect","foundMethod","tags","concat","checkRunIt","_ref3","show","console","responses","current","window","setTimeout","scrollIntoView","runItToggle","createElement","color","iconBefore","Beaker","onClick","Fragment","ApixSection","Space","between","DocTitle","summary","DocSource","mb","gap","DocStatus","DocActivityType","DocRateLimited","DocOperation","DocMarkdown","source","description","DocSDKs","DocRequestBody","DocSdkUsage","DocReferences","typesUsed","Span","ref","DocResponses","DocSchema","object","schema","Aside","width","ExtendComponentsThemeProvider","themeCustomizations","colors","background","text","link","critical","RunIt","operationId","exports"],"sources":["../../../src/scenes/MethodScene/MethodScene.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react'\nimport React, { useState, useEffect, useRef } from 'react'\nimport {\n Aside,\n Button,\n ButtonOutline,\n Space,\n useToggle,\n ExtendComponentsThemeProvider,\n Span,\n} from '@looker/components'\nimport { Beaker } from '@looker/icons'\nimport { useHistory, useParams } from 'react-router-dom'\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'\nimport type { IEnvironmentAdaptor } from '@looker/extension-utils'\n\nimport { getApixAdaptor, useNavigation, useQuery } from '../../utils'\nimport {\n ApixSection,\n DocActivityType,\n DocMarkdown,\n DocRateLimited,\n DocReferences,\n DocSDKs,\n DocSdkUsage,\n DocSource,\n DocStatus,\n DocTitle,\n DocSchema,\n} from '../../components'\nimport { selectSdkLanguage } from '../../state'\nimport { DocOperation, DocRequestBody, DocResponses } from './components'\n\ninterface MethodSceneProps {\n api: ApiModel\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> = ({ api }) => {\n const adaptor = getApixAdaptor()\n const history = useHistory()\n const { navigate } = useNavigation()\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 const query = useQuery()\n const errorCode = query.get('e') ?? undefined\n const RunItButton = value ? Button : ButtonOutline\n const docResponsesRef = useRef<HTMLElement>(null)\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 navigate(`/${specKey}/methods/${methodTag}`)\n } else {\n navigate(`/${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 useEffect(() => {\n if (method?.responses && errorCode) {\n if (docResponsesRef.current) {\n window.setTimeout(() => {\n docResponsesRef.current!.scrollIntoView()\n }, 300)\n }\n }\n }, [method])\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 <Span ref={docResponsesRef}>\n <DocResponses api={api} method={method} errorCode={errorCode} />\n </Span>\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 />\n </ExtendComponentsThemeProvider>\n </Aside>\n )}\n </>\n )\n}\n"],"mappings":";;;;;;AA2BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AASA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAEA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAGA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AAaA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AAAyE,SAAAW,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAb,wBAAAiB,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAA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M,EAAEA;EAAO,CAChB,CAC4B,CAC1B,CAET,CAAC;AAEP,CAAC;AAAAwE,OAAA,CAAA3F,WAAA,GAAAA,WAAA"}
|
|
1
|
+
{"version":3,"file":"MethodScene.js","names":["_react","_interopRequireWildcard","require","_components","_icons","_reactRouterDom","_runIt","_sdkCodegen","_reactRedux","_utils","_components2","_state","_components3","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","showRunIt","_ref","adaptor","data","localStorageGetItem","RunItFormKey","_x","MethodScene","_ref2","_query$get","api","getApixAdaptor","history","useHistory","navigate","useNavigation","sdkLanguage","useSelector","selectSdkLanguage","specKey","methodTag","methodName","useParams","toggle","setOn","useToggle","method","setMethod","useState","methods","seeTypes","typeRefs","customTypes","query","useQuery","errorCode","RunItButton","Button","ButtonOutline","docResponsesRef","useRef","useEffect","foundMethod","tags","concat","checkRunIt","_ref3","show","console","responses","current","window","setTimeout","scrollIntoView","runItToggle","createElement","color","iconBefore","Beaker","onClick","Fragment","ApixSection","Space","between","DocTitle","summary","DocSource","mb","gap","DocStatus","DocActivityType","DocRateLimited","DocOperation","DocMarkdown","source","description","DocSDKs","DocRequestBody","DocSdkUsage","DocReferences","typesUsed","Span","ref","DocResponses","DocSchema","object","schema","Aside","width","ExtendComponentsThemeProvider","themeCustomizations","colors","background","text","link","critical","RunIt","operationId","exports"],"sources":["../../../src/scenes/MethodScene/MethodScene.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react';\nimport React, { useEffect, useRef, useState } from 'react';\nimport {\n Aside,\n Button,\n ButtonOutline,\n ExtendComponentsThemeProvider,\n Space,\n Span,\n useToggle,\n} from '@looker/components';\nimport { Beaker } from '@looker/icons';\nimport { useHistory, useParams } from 'react-router-dom';\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';\nimport type { IEnvironmentAdaptor } from '@looker/extension-utils';\n\nimport { getApixAdaptor, useNavigation, useQuery } from '../../utils';\nimport {\n ApixSection,\n DocActivityType,\n DocMarkdown,\n DocRateLimited,\n DocReferences,\n DocSDKs,\n DocSchema,\n DocSdkUsage,\n DocSource,\n DocStatus,\n DocTitle,\n} from '../../components';\nimport { selectSdkLanguage } from '../../state';\nimport { DocOperation, DocRequestBody, DocResponses } from './components';\n\ninterface MethodSceneProps {\n api: ApiModel;\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> = ({ api }) => {\n const adaptor = getApixAdaptor();\n const history = useHistory();\n const { navigate } = useNavigation();\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 const query = useQuery();\n const errorCode = query.get('e') ?? undefined;\n const RunItButton = value ? Button : ButtonOutline;\n const docResponsesRef = useRef<HTMLElement>(null);\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 navigate(`/${specKey}/methods/${methodTag}`);\n } else {\n navigate(`/${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 useEffect(() => {\n if (method?.responses && errorCode) {\n if (docResponsesRef.current) {\n window.setTimeout(() => {\n docResponsesRef.current!.scrollIntoView();\n }, 300);\n }\n }\n }, [method]);\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 <Span ref={docResponsesRef}>\n <DocResponses api={api} method={method} errorCode={errorCode} />\n </Span>\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 />\n </ExtendComponentsThemeProvider>\n </Aside>\n )}\n </>\n );\n};\n"],"mappings":";;;;;;AA2BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AASA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAEA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAGA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AAaA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AAA0E,SAAAW,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAb,wBAAAa,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,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AACS,OAAO,EAAEA;EAAQ,CAAE,CAAC,EAClE3E,MAAA,CAAAmB,OAAA,CAAA4F,aAAA,CAAC5G,WAAA,CAAAsI,IAAI;IAACC,GAAG,EAAE3C;EAAgB,GACzB/F,MAAA,CAAAmB,OAAA,CAAA4F,aAAA,CAACnG,YAAA,CAAA+H,YAAY;IAACzE,GAAG,EAAEA,GAAI;IAACgB,MAAM,EAAEA,MAAO;IAACS,SAAS,EAAEA;EAAU,CAAE,CAC3D,CAAC,EACP3F,MAAA,CAAAmB,OAAA,CAAA4F,aAAA,CAACrG,YAAA,CAAAkI,SAAS;IAACC,MAAM,EAAE3D,MAAM,CAAC4D;EAAO,CAAE,CACxB,CACd,EACAnG,KAAK,IACJ3C,MAAA,CAAAmB,OAAA,CAAA4F,aAAA,CAAC5G,WAAA,CAAA4I,KAAK;IAACC,KAAK,EAAC;EAAO,GAClBhJ,MAAA,CAAAmB,OAAA,CAAA4F,aAAA,CAAC5G,WAAA,CAAA8I,6BAA6B;IAC5BC,mBAAmB,EAAE;MACnBC,MAAM,EAAE;QACNC,UAAU,EAAE,SAAS;QACrB5G,GAAG,EAAE,SAAS;QACd6G,IAAI,EAAE,MAAM;QACZC,IAAI,EAAE,SAAS;QACfC,QAAQ,EAAE;MACZ;IACF;EAAE,GAEFvJ,MAAA,CAAAmB,OAAA,CAAA4F,aAAA,CAACzG,MAAA,CAAAkJ,KAAK;IACJ9F,OAAO,EAAEA,OAAQ;IACjBlB,GAAG,EAAE0C,MAAM,CAACuE,WAAY;IACxBjF,WAAW,EAAEA,WAAY;IACzBN,GAAG,EAAEA,GAAI;IACTgB,MAAM,EAAEA;EAAO,CAChB,CAC4B,CAC1B,CAET,CAAC;AAEP,CAAC;AAACwE,OAAA,CAAA3F,WAAA,GAAAA,WAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocOperation.js","names":["_react","_interopRequireDefault","require","_components","_runIt","_components2","obj","__esModule","default","DocOperation","_ref","method","createElement","SpaceVertical","align","mb","gap","MethodBadge","type","httpMethod","DocPseudo","Flex","alignItems","Text","fontSize","fontWeight","mr","Code","endpoint","exports"],"sources":["../../../../src/scenes/MethodScene/components/DocOperation.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { FC } from 'react'
|
|
1
|
+
{"version":3,"file":"DocOperation.js","names":["_react","_interopRequireDefault","require","_components","_runIt","_components2","obj","__esModule","default","DocOperation","_ref","method","createElement","SpaceVertical","align","mb","gap","MethodBadge","type","httpMethod","DocPseudo","Flex","alignItems","Text","fontSize","fontWeight","mr","Code","endpoint","exports"],"sources":["../../../../src/scenes/MethodScene/components/DocOperation.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { FC } from 'react';\nimport React from 'react';\nimport type { IMethod } 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"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AAAgD,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAMzC,IAAMG,YAAmC,GAAGC,IAAA;EAAA,IAAC;IAAEC;EAAO,CAAC,GAAAD,IAAA;EAAA,OAC5DV,MAAA,CAAAQ,OAAA,CAAAI,aAAA,CAACT,WAAA,CAAAU,aAAa;IAACC,KAAK,EAAC,OAAO;IAACC,EAAE,EAAC,OAAO;IAACC,GAAG,EAAC;EAAQ,GAClDhB,MAAA,CAAAQ,OAAA,CAAAI,aAAA,CAACR,MAAA,CAAAa,WAAW;IAACC,IAAI,EAAEP,MAAM,CAACQ;EAAW,GACnCnB,MAAA,CAAAQ,OAAA,CAAAI,aAAA,CAACP,YAAA,CAAAe,SAAS;IAACT,MAAM,EAAEA;EAAO,CAAE,CACjB,CAAC,EACdX,MAAA,CAAAQ,OAAA,CAAAI,aAAA,CAACR,MAAA,CAAAa,WAAW;IAACC,IAAI,EAAEP,MAAM,CAACQ;EAAW,GACnCnB,MAAA,CAAAQ,OAAA,CAAAI,aAAA,CAACT,WAAA,CAAAkB,IAAI;IAACC,UAAU,EAAC;EAAQ,GACvBtB,MAAA,CAAAQ,OAAA,CAAAI,aAAA,CAACT,WAAA,CAAAoB,IAAI;IAACC,QAAQ,EAAC,QAAQ;IAACC,UAAU,EAAC,UAAU;IAACC,EAAE,EAAC;EAAS,GACvDf,MAAM,CAACQ,UACJ,CAAC,EACPnB,MAAA,CAAAQ,OAAA,CAAAI,aAAA,CAACT,WAAA,CAAAwB,IAAI;IAACH,QAAQ,EAAC,OAAO;IAACC,UAAU,EAAC;EAAQ,GACvCd,MAAM,CAACiB,QACJ,CACF,CACK,CACA,CAAC;AAAA,CACjB;AAACC,OAAA,CAAApB,YAAA,GAAAA,YAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocRequestBody.js","names":["_react","_interopRequireDefault","require","_runIt","_components","obj","__esModule","default","DocRequestBody","_ref","method","api","bodies","bodyParams","length","createElement","Fragment","header","CollapserCard","id","heading","map","body","ExploreType","type","open","key","concat","name","exports"],"sources":["../../../../src/scenes/MethodScene/components/DocRequestBody.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { FC } from 'react'
|
|
1
|
+
{"version":3,"file":"DocRequestBody.js","names":["_react","_interopRequireDefault","require","_runIt","_components","obj","__esModule","default","DocRequestBody","_ref","method","api","bodies","bodyParams","length","createElement","Fragment","header","CollapserCard","id","heading","map","body","ExploreType","type","open","key","concat","name","exports"],"sources":["../../../../src/scenes/MethodScene/components/DocRequestBody.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { FC } from 'react';\nimport React from 'react';\nimport type { 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"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAAkD,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAW3C,IAAMG,cAAuC,GAAGC,IAAA,IAAqB;EAAA,IAApB;IAAEC,MAAM;IAAEC;EAAI,CAAC,GAAAF,IAAA;EACrE,IAAMG,MAAM,GAAGF,MAAM,CAACG,UAAU;EAChC,IAAID,MAAM,CAACE,MAAM,KAAK,CAAC,EAAE,OAAOd,MAAA,CAAAO,OAAA,CAAAQ,aAAA,CAAAf,MAAA,CAAAO,OAAA,CAAAS,QAAA,MAAI,CAAC;EACrC,IAAMC,MAAM,GAAGL,MAAM,CAACE,MAAM,GAAG,CAAC,GAAG,gBAAgB,GAAG,cAAc;EAEpE,OACEd,MAAA,CAAAO,OAAA,CAAAQ,aAAA,CAACZ,MAAA,CAAAe,aAAa;IAACC,EAAE,EAAC,QAAQ;IAACC,OAAO,EAAEH;EAAO,GACzCjB,MAAA,CAAAO,OAAA,CAAAQ,aAAA,CAAAf,MAAA,CAAAO,OAAA,CAAAS,QAAA,QACGJ,MAAM,CAACS,GAAG,CAAEC,IAAI,IACftB,MAAA,CAAAO,OAAA,CAAAQ,aAAA,CAACX,WAAA,CAAAmB,WAAW;IACVZ,GAAG,EAAEA,GAAI;IACTa,IAAI,EAAEF,IAAI,CAACE,IAAK;IAChBC,IAAI,EAAE,KAAM;IACZC,GAAG,UAAAC,MAAA,CAAUL,IAAI,CAACM,IAAI;EAAG,CAC1B,CACF,CACD,CACW,CAAC;AAEpB,CAAC;AAACC,OAAA,CAAArB,cAAA,GAAAA,cAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import type { ApiModel,
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ApiModel, IMethodResponse, KeyedCollection } from '@looker/sdk-codegen';
|
|
3
3
|
interface DocResponseTypesProps {
|
|
4
4
|
api: ApiModel;
|
|
5
5
|
responses: KeyedCollection<IMethodResponse>;
|
|
6
6
|
}
|
|
7
|
-
export declare const DocResponseTypes: ({ api, responses }: DocResponseTypesProps) => JSX.Element;
|
|
7
|
+
export declare const DocResponseTypes: ({ api, responses }: DocResponseTypesProps) => React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -7,8 +7,8 @@ exports.DocResponseTypes = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _components = require("@looker/components");
|
|
9
9
|
var _components2 = require("../../../../components");
|
|
10
|
-
function _getRequireWildcardCache(
|
|
11
|
-
function _interopRequireWildcard(
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
12
|
var DocResponseTypes = _ref => {
|
|
13
13
|
var {
|
|
14
14
|
api,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocResponseTypes.js","names":["_react","_interopRequireWildcard","require","_components","_components2","_getRequireWildcardCache","
|
|
1
|
+
{"version":3,"file":"DocResponseTypes.js","names":["_react","_interopRequireWildcard","require","_components","_components2","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","DocResponseTypes","_ref","api","responses","mediaTypes","keys","selectedMediaType","setSelectedMediaType","useState","resps","setResps","useEffect","createElement","Fragment","ButtonToggle","value","onChange","mt","mb","map","mediaType","ButtonItem","key","style","overflow","ExploreType","type","link","maxDepth","exports"],"sources":["../../../../../src/scenes/MethodScene/components/DocResponses/DocResponseTypes.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { useEffect, useState } from 'react';\nimport { ButtonItem, ButtonToggle } from '@looker/components';\nimport type {\n ApiModel,\n IMethodResponse,\n KeyedCollection,\n} from '@looker/sdk-codegen';\n\nimport { ExploreType } from '../../../../components';\n\ninterface DocResponseTypesProps {\n api: ApiModel;\n /** responses to render */\n responses: KeyedCollection<IMethodResponse>;\n}\n\n/**\n * Given a collection of media types (keys) and responses (values) for a response code, generate a group of buttons for\n * toggling media type and render the response\n * @param response\n */\nexport const DocResponseTypes = ({ api, responses }: DocResponseTypesProps) => {\n const mediaTypes = Object.keys(responses);\n const [selectedMediaType, setSelectedMediaType] = useState(mediaTypes[0]);\n const [resps, setResps] = useState(responses);\n\n useEffect(() => {\n /** When new responses are passed, update the default selected media type */\n setSelectedMediaType(mediaTypes[0]);\n setResps(responses);\n }, [responses, mediaTypes]);\n\n // TODO: Account for endpoints with no responses (e.g. delete a custom cmd)\n return (\n <>\n <ButtonToggle\n value={selectedMediaType}\n onChange={setSelectedMediaType}\n mt=\"large\"\n mb=\"large\"\n >\n {mediaTypes.map((mediaType) => (\n <ButtonItem key={mediaType}>{mediaType}</ButtonItem>\n ))}\n </ButtonToggle>\n <div style={{ overflow: 'auto' }}>\n <ExploreType\n api={api}\n key={selectedMediaType}\n type={resps[selectedMediaType].type}\n link={true}\n maxDepth={2}\n />\n </div>\n </>\n );\n};\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAOA,IAAAE,YAAA,GAAAF,OAAA;AAAqD,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAc,CAAA,SAAAI,CAAA,GAAAR,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAI,CAAA,KAAAA,CAAA,CAAAX,GAAA,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9C,MAAA,CAAAW,OAAA,CAAA2B,aAAA;IAAKW,KAAK,EAAE;MAAEC,QAAQ,EAAE;IAAO;EAAE,GAC/BlD,MAAA,CAAAW,OAAA,CAAA2B,aAAA,CAAClC,YAAA,CAAA+C,WAAW;IACVvB,GAAG,EAAEA,GAAI;IACToB,GAAG,EAAEhB,iBAAkB;IACvBoB,IAAI,EAAEjB,KAAK,CAACH,iBAAiB,CAAC,CAACoB,IAAK;IACpCC,IAAI,EAAE,IAAK;IACXC,QAAQ,EAAE;EAAE,CACb,CACE,CACL,CAAC;AAEP,CAAC;AAACC,OAAA,CAAA7B,gBAAA,GAAAA,gBAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { ApiModel, IMethod } from '@looker/sdk-codegen';
|
|
3
3
|
interface DocResponsesProps {
|
|
4
4
|
api: ApiModel;
|
|
5
5
|
method: IMethod;
|
|
6
6
|
errorCode?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare const DocResponses: ({ api, method, errorCode }: DocResponsesProps) => JSX.Element;
|
|
8
|
+
export declare const DocResponses: ({ api, method, errorCode }: DocResponsesProps) => React.JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -11,8 +11,8 @@ var _sdkRtl = require("@looker/sdk-rtl");
|
|
|
11
11
|
var _extensionUtils = require("@looker/extension-utils");
|
|
12
12
|
var _DocResponseTypes = require("./DocResponseTypes");
|
|
13
13
|
var _utils = require("./utils");
|
|
14
|
-
function _getRequireWildcardCache(
|
|
15
|
-
function _interopRequireWildcard(
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
16
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
17
17
|
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); }); }; }
|
|
18
18
|
var DocResponses = _ref => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocResponses.js","names":["_react","_interopRequireWildcard","require","_components","_runIt","_sdkRtl","_extensionUtils","_DocResponseTypes","_utils","_getRequireWildcardCache","
|
|
1
|
+
{"version":3,"file":"DocResponses.js","names":["_react","_interopRequireWildcard","require","_components","_runIt","_sdkRtl","_extensionUtils","_DocResponseTypes","_utils","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","DocResponses","_ref","api","method","errorCode","errorContent","setErrorContent","useState","responses","responseTree","buildResponseTree","tabNames","keys","defaultTabId","pattern","RegExp","concat","forEach","el","test","useEffect","getErrorContent","_ref2","docUrl","httpMethod","toLocaleLowerCase","endpoint","adaptor","getEnvAdaptor","errDoc","ErrorDoc","sdk","apiErrorDisplayFetch","content","length","createElement","Fragment","CollapserCard","heading","id","Tabs2","entries","map","_ref3","statusCode","response","errorTab","Tab2","label","DocResponseTypes","ExtMarkdown","source","exports"],"sources":["../../../../../src/scenes/MethodScene/components/DocResponses/DocResponses.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { useEffect, useState } from 'react';\nimport { Tab2, Tabs2 } from '@looker/components';\nimport type { ApiModel, IMethod } from '@looker/sdk-codegen';\nimport { CollapserCard } from '@looker/run-it';\nimport { ErrorDoc } from '@looker/sdk-rtl';\nimport {\n ExtMarkdown,\n apiErrorDisplayFetch,\n getEnvAdaptor,\n} from '@looker/extension-utils';\n\nimport { DocResponseTypes } from './DocResponseTypes';\nimport { buildResponseTree } from './utils';\n\ninterface DocResponsesProps {\n api: ApiModel;\n method: IMethod;\n /** error code to display */\n errorCode?: string;\n}\n\n/**\n * Renders a tab list and tab panels for different method response types\n */\nexport const DocResponses = ({ api, method, errorCode }: DocResponsesProps) => {\n const [errorContent, setErrorContent] = useState('');\n const responses = method.responses;\n\n const responseTree = buildResponseTree(responses);\n const tabNames = Object.keys(responseTree);\n\n let defaultTabId = tabNames[0];\n\n if (errorCode) {\n const pattern = new RegExp(`${errorCode}: \\\\w+`);\n tabNames.forEach((el) => {\n if (pattern.test(el)) {\n defaultTabId = el;\n }\n });\n }\n\n useEffect(() => {\n if (!errorCode) return;\n\n const getErrorContent = async () => {\n const docUrl = `/err/4.0/${errorCode}/${method.httpMethod.toLocaleLowerCase()}${\n method.endpoint\n }`;\n const adaptor = getEnvAdaptor();\n const errDoc = new ErrorDoc(adaptor.sdk, apiErrorDisplayFetch);\n const content = await errDoc.content(docUrl);\n setErrorContent(content);\n };\n getErrorContent();\n }, [errorCode]);\n\n if (responses.length === 0) return <></>;\n\n return (\n <CollapserCard heading=\"Response Models\" id=\"response models\">\n <Tabs2 defaultTabId={defaultTabId}>\n {Object.entries(responseTree).map(([statusCode, response]) => {\n const errorTab = errorCode && statusCode === defaultTabId;\n return (\n <Tab2 key={statusCode} id={statusCode} label={statusCode}>\n <DocResponseTypes api={api} responses={response} />\n {errorContent && errorTab && (\n <ExtMarkdown source={errorContent} />\n )}\n </Tab2>\n );\n })}\n </Tabs2>\n </CollapserCard>\n );\n};\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AAMA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAA4C,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CA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,YAAY;IACzD,OACEjE,MAAA,CAAAe,OAAA,CAAAwE,aAAA,CAACpF,WAAA,CAAAgG,IAAI;MAAC/D,GAAG,EAAE4D,UAAW;MAACL,EAAE,EAAEK,UAAW;MAACI,KAAK,EAAEJ;IAAW,GACvDhG,MAAA,CAAAe,OAAA,CAAAwE,aAAA,CAAChF,iBAAA,CAAA8F,gBAAgB;MAAC/C,GAAG,EAAEA,GAAI;MAACM,SAAS,EAAEqC;IAAS,CAAE,CAAC,EAClDxC,YAAY,IAAIyC,QAAQ,IACvBlG,MAAA,CAAAe,OAAA,CAAAwE,aAAA,CAACjF,eAAA,CAAAgG,WAAW;MAACC,MAAM,EAAE9C;IAAa,CAAE,CAElC,CAAC;EAEX,CAAC,CACI,CACM,CAAC;AAEpB,CAAC;AAAC+C,OAAA,CAAApD,YAAA,GAAAA,YAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_DocResponses","require"],"sources":["../../../../../src/scenes/MethodScene/components/DocResponses/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { DocResponses } from './DocResponses'
|
|
1
|
+
{"version":3,"file":"index.js","names":["_DocResponses","require"],"sources":["../../../../../src/scenes/MethodScene/components/DocResponses/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { DocResponses } from './DocResponses';\n"],"mappings":";;;;;;;;;;;AAyBA,IAAAA,aAAA,GAAAC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["buildResponseTree","responses","tree","Object","values","forEach","response","node","concat","statusCode","description","mediaType","exports"],"sources":["../../../../../src/scenes/MethodScene/components/DocResponses/utils.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { IMethodResponse, KeyedCollection } from '@looker/sdk-codegen'
|
|
1
|
+
{"version":3,"file":"utils.js","names":["buildResponseTree","responses","tree","Object","values","forEach","response","node","concat","statusCode","description","mediaType","exports"],"sources":["../../../../../src/scenes/MethodScene/components/DocResponses/utils.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { IMethodResponse, KeyedCollection } from '@looker/sdk-codegen';\n\n/**\n * Given an array of method responses, group them by statusCode. The value of each status code is a collection of\n * media types (keys) and responses (values)\n * @param responses An array of method responses\n */\nexport const buildResponseTree = (\n responses: IMethodResponse[]\n): KeyedCollection<KeyedCollection<IMethodResponse>> => {\n const tree: KeyedCollection<KeyedCollection<IMethodResponse>> = {};\n Object.values(responses).forEach((response) => {\n const node = `${response.statusCode}: ${response.description}`;\n if (!(node in tree)) tree[node] = {};\n tree[node][response.mediaType] = response;\n });\n return tree;\n};\n"],"mappings":";;;;;;AAiCO,IAAMA,iBAAiB,GAC5BC,SAA4B,IAC0B;EACtD,IAAMC,IAAuD,GAAG,CAAC,CAAC;EAClEC,MAAM,CAACC,MAAM,CAACH,SAAS,CAAC,CAACI,OAAO,CAAEC,QAAQ,IAAK;IAC7C,IAAMC,IAAI,MAAAC,MAAA,CAAMF,QAAQ,CAACG,UAAU,QAAAD,MAAA,CAAKF,QAAQ,CAACI,WAAW,CAAE;IAC9D,IAAI,EAAEH,IAAI,IAAIL,IAAI,CAAC,EAAEA,IAAI,CAACK,IAAI,CAAC,GAAG,CAAC,CAAC;IACpCL,IAAI,CAACK,IAAI,CAAC,CAACD,QAAQ,CAACK,SAAS,CAAC,GAAGL,QAAQ;EAC3C,CAAC,CAAC;EACF,OAAOJ,IAAI;AACb,CAAC;AAACU,OAAA,CAAAZ,iBAAA,GAAAA,iBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_DocOperation","require","_DocRequestBody","_DocResponses"],"sources":["../../../../src/scenes/MethodScene/components/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { DocOperation } from './DocOperation'
|
|
1
|
+
{"version":3,"file":"index.js","names":["_DocOperation","require","_DocRequestBody","_DocResponses"],"sources":["../../../../src/scenes/MethodScene/components/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { DocOperation } from './DocOperation';\nexport { DocRequestBody } from './DocRequestBody';\nexport { DocResponses } from './DocResponses';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_MethodScene","require"],"sources":["../../../src/scenes/MethodScene/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { MethodScene } from './MethodScene'
|
|
1
|
+
{"version":3,"file":"index.js","names":["_MethodScene","require"],"sources":["../../../src/scenes/MethodScene/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { MethodScene } from './MethodScene';\n"],"mappings":";;;;;;;;;;;AAyBA,IAAAA,YAAA,GAAAC,OAAA"}
|
|
@@ -13,8 +13,8 @@ var _utils = require("../../utils");
|
|
|
13
13
|
var _state = require("../../state");
|
|
14
14
|
var _utils2 = require("../utils");
|
|
15
15
|
var _utils3 = require("./utils");
|
|
16
|
-
function _getRequireWildcardCache(
|
|
17
|
-
function _interopRequireWildcard(
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var MethodTagScene = _ref => {
|
|
19
19
|
var {
|
|
20
20
|
api
|