@looker/api-explorer 0.9.55 → 0.9.57
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 +580 -640
- package/CODE_OF_CONDUCT.md +10 -10
- package/dist/bundle.js +3 -0
- package/dist/bundle.js.LICENSE.txt +115 -0
- package/dist/bundle.js.map +1 -0
- 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":"SideNavTypeTags.js","names":["_react","_interopRequireDefault","require","_styledComponents","_SideNavTypes","obj","__esModule","default","SideNavTypeTags","styled","_ref","tags","specKey","className","defaultOpen","createElement","Object","keys","map","tag","SideNavTypes","key","types","withConfig","displayName","componentId","_ref2","theme","space","large"
|
|
1
|
+
{"version":3,"file":"SideNavTypeTags.js","names":["_react","_interopRequireDefault","require","_styledComponents","_SideNavTypes","obj","__esModule","default","SideNavTypeTags","exports","styled","_ref","tags","specKey","className","defaultOpen","createElement","Object","keys","map","tag","SideNavTypes","key","types","withConfig","displayName","componentId","_ref2","theme","space","large"],"sources":["../../../src/components/SideNav/SideNavTypeTags.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 from 'react';\nimport styled from 'styled-components';\nimport type { TypeTagList } from '@looker/sdk-codegen';\nimport { SideNavTypes } from './SideNavTypes';\n\ninterface TypeTagsProps {\n tags: TypeTagList;\n specKey: string;\n defaultOpen?: boolean;\n className?: string;\n}\n\nexport const SideNavTypeTags = styled(\n ({ tags, specKey, className, defaultOpen }: TypeTagsProps) => (\n <div className={className}>\n {Object.keys(tags).map((tag) => (\n <SideNavTypes\n key={tag}\n defaultOpen={defaultOpen}\n types={tags[tag]}\n tag={tag}\n specKey={specKey}\n />\n ))}\n </div>\n )\n)`\n padding: 0 ${({ theme }) => theme.space.large};\n`;\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,aAAA,GAAAF,OAAA;AAA8C,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AASvC,IAAMG,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG,IAAAE,yBAAM,EACnCC,IAAA;EAAA,IAAC;IAAEC,IAAI;IAAEC,OAAO;IAAEC,SAAS;IAAEC;EAA2B,CAAC,GAAAJ,IAAA;EAAA,OACvDX,MAAA,CAAAO,OAAA,CAAAS,aAAA;IAAKF,SAAS,EAAEA;EAAU,GACvBG,MAAM,CAACC,IAAI,CAACN,IAAI,CAAC,CAACO,GAAG,CAAEC,GAAG,IACzBpB,MAAA,CAAAO,OAAA,CAAAS,aAAA,CAACZ,aAAA,CAAAiB,YAAY;IACXC,GAAG,EAAEF,GAAI;IACTL,WAAW,EAAEA,WAAY;IACzBQ,KAAK,EAAEX,IAAI,CAACQ,GAAG,CAAE;IACjBA,GAAG,EAAEA,GAAI;IACTP,OAAO,EAAEA;EAAQ,CAClB,CACF,CACE,CAAC;AAAA,CAEV,CAAC,CAAAW,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wBACcC,KAAA;EAAA,IAAC;IAAEC;EAAM,CAAC,GAAAD,KAAA;EAAA,OAAKC,KAAK,CAACC,KAAK,CAACC,KAAK;AAAA,EAC9C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { TypeList } from '@looker/sdk-codegen';
|
|
3
3
|
interface TypesProps {
|
|
4
4
|
types: TypeList;
|
|
@@ -7,5 +7,5 @@ interface TypesProps {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
defaultOpen?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export declare const SideNavTypes: import("styled-components").StyledComponent<({ className, types, tag, specKey, defaultOpen }: TypesProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
10
|
+
export declare const SideNavTypes: import("styled-components").StyledComponent<({ className, types, tag, specKey, defaultOpen }: TypesProps) => React.JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
11
11
|
export {};
|
|
@@ -13,9 +13,9 @@ var _Link = require("../Link");
|
|
|
13
13
|
var _utils = require("../../utils");
|
|
14
14
|
var _state = require("../../state");
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
function _getRequireWildcardCache(
|
|
17
|
-
function _interopRequireWildcard(
|
|
18
|
-
var SideNavTypes = (0, _styledComponents.default)(_ref => {
|
|
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
|
+
var SideNavTypes = exports.SideNavTypes = (0, _styledComponents.default)(_ref => {
|
|
19
19
|
var {
|
|
20
20
|
className,
|
|
21
21
|
types,
|
|
@@ -59,7 +59,7 @@ var SideNavTypes = (0, _styledComponents.default)(_ref => {
|
|
|
59
59
|
}, (0, _utils.highlightHTML)(searchPattern, type.name))))));
|
|
60
60
|
}).withConfig({
|
|
61
61
|
displayName: "SideNavTypes",
|
|
62
|
-
componentId: "
|
|
62
|
+
componentId: "vqik31-0"
|
|
63
63
|
})(["font-family:", ";[aria-controls]:hover,[aria-expanded='true']{h4,svg{color:", ";}}[aria-expanded='true'] h4{font-weight:", ";}ul{border-left:dashed 1px ", ";list-style:none;margin:0;padding:0;padding-left:", ";padding-top:", ";}[aria-current]{background:", ";font-weight:", ";}", "{border-radius:", ";display:block;overflow:hidden;padding:", ";text-overflow:ellipsis;white-space:nowrap;&:hover,&:focus,&.active{background:", ";}}"], _ref2 => {
|
|
64
64
|
var {
|
|
65
65
|
theme
|
|
@@ -116,5 +116,4 @@ var SideNavTypes = (0, _styledComponents.default)(_ref => {
|
|
|
116
116
|
} = _ref12;
|
|
117
117
|
return theme.colors.ui1;
|
|
118
118
|
});
|
|
119
|
-
exports.SideNavTypes = SideNavTypes;
|
|
120
119
|
//# sourceMappingURL=SideNavTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNavTypes.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_components","_reactRouterDom","_reactRedux","_Link","_utils","_state","obj","__esModule","default","_getRequireWildcardCache","
|
|
1
|
+
{"version":3,"file":"SideNavTypes.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_components","_reactRouterDom","_reactRedux","_Link","_utils","_state","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","SideNavTypes","exports","styled","_ref","className","types","tag","specKey","defaultOpen","navigate","buildPathWithGlobalParams","useNavigation","searchPattern","useSelector","selectSearchPattern","match","useRouteMatch","isOpen","setIsOpen","useState","handleOpen","_isOpen","concat","useEffect","status","params","typeTag","createElement","Accordion2","toggleOpen","label","Heading","as","fontSize","py","highlightHTML","values","map","type","key","name","Link","to","buildTypePath","withConfig","displayName","componentId","_ref2","theme","fonts","brand","_ref3","colors","_ref4","fontWeights","semiBold","_ref5","ui2","_ref6","space","xxsmall","_ref7","_ref8","ui1","_ref9","_ref10","radii","medium","_ref11","xsmall","_ref12"],"sources":["../../../src/components/SideNav/SideNavTypes.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 styled from 'styled-components';\nimport { Accordion2, Heading } from '@looker/components';\nimport type { TypeList } from '@looker/sdk-codegen';\nimport { useRouteMatch } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\nimport { Link } from '../Link';\nimport { buildTypePath, highlightHTML, useNavigation } from '../../utils';\nimport { selectSearchPattern } from '../../state';\n\ninterface TypesProps {\n types: TypeList;\n tag: string;\n specKey: string;\n className?: string;\n defaultOpen?: boolean;\n}\n\nexport const SideNavTypes = styled(\n ({ className, types, tag, specKey, defaultOpen = false }: TypesProps) => {\n const { navigate, buildPathWithGlobalParams } = useNavigation();\n const searchPattern = useSelector(selectSearchPattern);\n const match = useRouteMatch<{ typeTag: string }>(\n `/:specKey/types/:typeTag/:typeName?`\n );\n const [isOpen, setIsOpen] = useState(defaultOpen);\n const handleOpen = () => {\n const _isOpen = !isOpen;\n setIsOpen(_isOpen);\n if (_isOpen) {\n navigate(`/${specKey}/types/${tag}`);\n } else {\n navigate(`/${specKey}/types`);\n }\n };\n\n useEffect(() => {\n const status = match\n ? defaultOpen || match.params.typeTag === tag\n : defaultOpen;\n setIsOpen(status);\n }, [defaultOpen]);\n\n /* TODO: Fix highlighting. It is applied but it is somehow being overridden */\n return (\n <Accordion2\n isOpen={isOpen}\n toggleOpen={handleOpen}\n className={className}\n label={\n <Heading as=\"h4\" fontSize=\"small\" py=\"xsmall\">\n {highlightHTML(searchPattern, tag)}\n </Heading>\n }\n >\n <ul>\n {Object.values(types).map((type) => (\n <li key={type.name}>\n <Link\n to={buildPathWithGlobalParams(\n buildTypePath(specKey, tag, type.name)\n )}\n >\n {highlightHTML(searchPattern, type.name)}\n </Link>\n </li>\n ))}\n </ul>\n </Accordion2>\n );\n }\n)`\n font-family: ${({ theme }) => theme.fonts.brand};\n\n [aria-controls]:hover,\n [aria-expanded='true'] {\n h4,\n svg {\n color: ${({ theme }) => theme.colors.key};\n }\n }\n\n [aria-expanded='true'] h4 {\n font-weight: ${({ theme }) => theme.fontWeights.semiBold};\n }\n\n ul {\n border-left: dashed 1px ${({ theme }) => theme.colors.ui2};\n list-style: none;\n margin: 0;\n padding: 0;\n padding-left: ${({ theme }) => theme.space.xxsmall};\n padding-top: ${({ theme }) => theme.space.xxsmall};\n }\n\n [aria-current] {\n background: ${({ theme }) => theme.colors.ui1};\n font-weight: ${({ theme }) => theme.fontWeights.semiBold};\n }\n\n ${Link} {\n border-radius: ${({ theme }) => theme.radii.medium};\n display: block;\n overflow: hidden;\n padding: ${({ theme }) => theme.space.xsmall};\n text-overflow: ellipsis;\n white-space: nowrap;\n\n &:hover,\n &:focus,\n &.active {\n background: ${({ theme }) => theme.colors.ui1};\n }\n }\n`;\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAEA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAAkD,SAAAE,uBAAAO,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,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,SAAAd,wBAAAc,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAH,UAAA,SAAAG,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAF,OAAA,EAAAE,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAJ,CAAA,UAAAG,CAAA,CAAAE,GAAA,C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AAKtB,KAAK,CAACI,MAAM,CAACW,GAAG;AAAA,EAGlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_SideNav","require"],"sources":["../../../src/components/SideNav/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 { SideNav } from './SideNav'
|
|
1
|
+
{"version":3,"file":"index.js","names":["_SideNav","require"],"sources":["../../../src/components/SideNav/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 { SideNav } from './SideNav';\n"],"mappings":";;;;;;;;;;;AAyBA,IAAAA,QAAA,GAAAC,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchUtils.js","names":["_react","require","useDebounce","value","delay","debouncedValue","setDebouncedValue","useState","useEffect","handler","setTimeout","clearTimeout","exports","countMethods","tags","result","Object","values","forEach","methods","entries","length","countTypes","types"],"sources":["../../../src/components/SideNav/searchUtils.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 {
|
|
1
|
+
{"version":3,"file":"searchUtils.js","names":["_react","require","useDebounce","value","delay","debouncedValue","setDebouncedValue","useState","useEffect","handler","setTimeout","clearTimeout","exports","countMethods","tags","result","Object","values","forEach","methods","entries","length","countTypes","types"],"sources":["../../../src/components/SideNav/searchUtils.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 { useEffect, useState } from 'react';\nimport type { TagList, TypeList } from '@looker/sdk-codegen';\n\nexport const useDebounce = <T>(value: T, delay: number): T => {\n const [debouncedValue, setDebouncedValue] = useState(value);\n useEffect(() => {\n // Update debounced value only once delay has been elapsed\n const handler = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n // Reset the timeout on receiving a new keyword\n return () => {\n clearTimeout(handler);\n };\n }, [value]);\n return debouncedValue;\n};\n\nexport const countMethods = (tags: TagList) => {\n let result = 0;\n Object.values(tags).forEach((methods) => {\n result += Object.entries(methods).length;\n });\n return result;\n};\n\nexport const countTypes = (types: TypeList) => Object.entries(types).length;\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,OAAA;AAGO,IAAMC,WAAW,GAAGA,CAAIC,KAAQ,EAAEC,KAAa,KAAQ;EAC5D,IAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAG,IAAAC,eAAQ,EAACJ,KAAK,CAAC;EAC3D,IAAAK,gBAAS,EAAC,MAAM;IAEd,IAAMC,OAAO,GAAGC,UAAU,CAAC,MAAM;MAC/BJ,iBAAiB,CAACH,KAAK,CAAC;IAC1B,CAAC,EAAEC,KAAK,CAAC;IAET,OAAO,MAAM;MACXO,YAAY,CAACF,OAAO,CAAC;IACvB,CAAC;EACH,CAAC,EAAE,CAACN,KAAK,CAAC,CAAC;EACX,OAAOE,cAAc;AACvB,CAAC;AAACO,OAAA,CAAAV,WAAA,GAAAA,WAAA;AAEK,IAAMW,YAAY,GAAIC,IAAa,IAAK;EAC7C,IAAIC,MAAM,GAAG,CAAC;EACdC,MAAM,CAACC,MAAM,CAACH,IAAI,CAAC,CAACI,OAAO,CAAEC,OAAO,IAAK;IACvCJ,MAAM,IAAIC,MAAM,CAACI,OAAO,CAACD,OAAO,CAAC,CAACE,MAAM;EAC1C,CAAC,CAAC;EACF,OAAON,MAAM;AACf,CAAC;AAACH,OAAA,CAAAC,YAAA,GAAAA,YAAA;AAEK,IAAMS,UAAU,GAAIC,KAAe,IAAKP,MAAM,CAACI,OAAO,CAACG,KAAK,CAAC,CAACF,MAAM;AAACT,OAAA,CAAAU,UAAA,GAAAA,UAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Loader.js","names":["_react","_interopRequireDefault","require","_components","obj","__esModule","default","Loader","_ref","themeOverrides","message","createElement","ComponentsProvider","Flex","flexDirection","justifyContent","mt","FlexItem","alignSelf","ProgressCircular","size","Heading","color","as","exports"],"sources":["../../../src/components/common/Loader.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":"Loader.js","names":["_react","_interopRequireDefault","require","_components","obj","__esModule","default","Loader","_ref","themeOverrides","message","createElement","ComponentsProvider","Flex","flexDirection","justifyContent","mt","FlexItem","alignSelf","ProgressCircular","size","Heading","color","as","exports"],"sources":["../../../src/components/common/Loader.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 {\n ComponentsProvider,\n Flex,\n FlexItem,\n Heading,\n ProgressCircular,\n} from '@looker/components';\nimport type { ThemeOverrides } from '@looker/extension-utils';\n\nexport interface LoaderProps {\n themeOverrides: ThemeOverrides;\n message?: string;\n}\n\nexport const Loader: FC<LoaderProps> = ({\n themeOverrides,\n message = 'Loading API Specifications',\n}) => (\n <ComponentsProvider {...themeOverrides}>\n <Flex flexDirection=\"column\" justifyContent=\"center\" mt=\"25%\">\n <FlexItem alignSelf=\"center\">\n <ProgressCircular size=\"large\" />\n </FlexItem>\n <FlexItem mt=\"large\" alignSelf=\"center\">\n <Heading color=\"key\" as=\"h2\">\n {message}\n </Heading>\n </FlexItem>\n </Flex>\n </ComponentsProvider>\n);\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAM4B,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAQrB,IAAMG,MAAuB,GAAGC,IAAA;EAAA,IAAC;IACtCC,cAAc;IACdC,OAAO,GAAG;EACZ,CAAC,GAAAF,IAAA;EAAA,OACCR,MAAA,CAAAM,OAAA,CAAAK,aAAA,CAACR,WAAA,CAAAS,kBAAkB,EAAKH,cAAc,EACpCT,MAAA,CAAAM,OAAA,CAAAK,aAAA,CAACR,WAAA,CAAAU,IAAI;IAACC,aAAa,EAAC,QAAQ;IAACC,cAAc,EAAC,QAAQ;IAACC,EAAE,EAAC;EAAK,GAC3DhB,MAAA,CAAAM,OAAA,CAAAK,aAAA,CAACR,WAAA,CAAAc,QAAQ;IAACC,SAAS,EAAC;EAAQ,GAC1BlB,MAAA,CAAAM,OAAA,CAAAK,aAAA,CAACR,WAAA,CAAAgB,gBAAgB;IAACC,IAAI,EAAC;EAAO,CAAE,CACxB,CAAC,EACXpB,MAAA,CAAAM,OAAA,CAAAK,aAAA,CAACR,WAAA,CAAAc,QAAQ;IAACD,EAAE,EAAC,OAAO;IAACE,SAAS,EAAC;EAAQ,GACrClB,MAAA,CAAAM,OAAA,CAAAK,aAAA,CAACR,WAAA,CAAAkB,OAAO;IAACC,KAAK,EAAC,KAAK;IAACC,EAAE,EAAC;EAAI,GACzBb,OACM,CACD,CACN,CACY,CAAC;AAAA,CACtB;AAACc,OAAA,CAAAjB,MAAA,GAAAA,MAAA"}
|
|
@@ -8,11 +8,10 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _components = require("@looker/components");
|
|
9
9
|
var _utils = require("../../utils");
|
|
10
10
|
var _Header = require("../Header");
|
|
11
|
-
function _getRequireWildcardCache(
|
|
12
|
-
function _interopRequireWildcard(
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
13
13
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
|
-
var REM_TO_PX = 16;
|
|
15
|
-
exports.REM_TO_PX = REM_TO_PX;
|
|
14
|
+
var REM_TO_PX = exports.REM_TO_PX = 16;
|
|
16
15
|
var ApixSection = props => {
|
|
17
16
|
var size = (0, _utils.useWindowSize)();
|
|
18
17
|
var sectionH = size.height - REM_TO_PX * _Header.HEADER_REM;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","names":["_react","_interopRequireWildcard","require","_components","_utils","_Header","_getRequireWildcardCache","
|
|
1
|
+
{"version":3,"file":"common.js","names":["_react","_interopRequireWildcard","require","_components","_utils","_Header","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","apply","REM_TO_PX","exports","ApixSection","props","size","useWindowSize","sectionH","height","HEADER_REM","useEffect","_document$getElementB","document","getElementById","scrollTo","createElement","Section","id","p","style","concat","overflow","borderTop"],"sources":["../../../src/components/common/common.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, { useEffect } from 'react';\nimport type { SectionProps } from '@looker/components';\nimport { Section } from '@looker/components';\nimport { useWindowSize } from '../../utils';\nimport { HEADER_REM } from '../Header';\n\nexport const REM_TO_PX = 16;\n\n/**\n * Extends the looker Section to proper height and scrolls to top on use\n * @param props - anything you want, but probably SectionProps\n */\nexport const ApixSection: FC<SectionProps> = (props: any) => {\n const size = useWindowSize();\n const sectionH = size.height - REM_TO_PX * HEADER_REM;\n useEffect(() => {\n document.getElementById('top')?.scrollTo(REM_TO_PX * HEADER_REM, 0);\n }, [props]);\n\n return (\n <Section\n {...props}\n id=\"top\"\n p=\"xxlarge\"\n style={{ height: `${sectionH}px`, overflow: 'auto', borderTop: '0px' }}\n />\n );\n};\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAAuC,SAAAI,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,SAAAN,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AAJ,MAAA,CAAAI,GAAA,IAAAD,MAAA,CAAAC,GAAA,gBAAAJ,MAAA,YAAAH,QAAA,CAAAQ,KAAA,OAAAJ,SAAA;AAEhC,IAAMK,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,EAAE;AAMpB,IAAME,WAA6B,GAAIC,KAAU,IAAK;EAC3D,IAAMC,IAAI,GAAG,IAAAC,oBAAa,EAAC,CAAC;EAC5B,IAAMC,QAAQ,GAAGF,IAAI,CAACG,MAAM,GAAGP,SAAS,GAAGQ,kBAAU;EACrD,IAAAC,gBAAS,EAAC,MAAM;IAAA,IAAAC,qBAAA;IACd,CAAAA,qBAAA,GAAAC,QAAQ,CAACC,cAAc,CAAC,KAAK,CAAC,cAAAF,qBAAA,uBAA9BA,qBAAA,CAAgCG,QAAQ,CAACb,SAAS,GAAGQ,kBAAU,EAAE,CAAC,CAAC;EACrE,CAAC,EAAE,CAACL,KAAK,CAAC,CAAC;EAEX,OACEvC,MAAA,CAAAY,OAAA,CAAAsC,aAAA,CAAC/C,WAAA,CAAAgD,OAAO,EAAAxB,QAAA,KACFY,KAAK;IACTa,EAAE,EAAC,KAAK;IACRC,CAAC,EAAC,SAAS;IACXC,KAAK,EAAE;MAAEX,MAAM,KAAAY,MAAA,CAAKb,QAAQ,OAAI;MAAEc,QAAQ,EAAE,MAAM;MAAEC,SAAS,EAAE;IAAM;EAAE,EACxE,CAAC;AAEN,CAAC;AAACpB,OAAA,CAAAC,WAAA,GAAAA,WAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_common","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_Loader"],"sources":["../../../src/components/common/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 * from './common'
|
|
1
|
+
{"version":3,"file":"index.js","names":["_common","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_Loader"],"sources":["../../../src/components/common/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 * from './common';\nexport * from './Loader';\n"],"mappings":";;;;;AAyBA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,OAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,OAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,OAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,OAAA,CAAAL,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_common","require","_DocActivityType","_DocCode","_DocMethodSummary","_DocMarkdown","_DocPseudo","_DocRateLimited","_DocReferences","_DocSDKs","_DocSdkUsage","_DocSource","_DocStatus","_DocTitle","_Header","_SideNav","_ExploreType","_DocSchema","_DocTypeSummary","_Link","_ErrorBoundary","_SelectorContainer","_Banner"],"sources":["../../src/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 { ApixSection, Loader } from './common'
|
|
1
|
+
{"version":3,"file":"index.js","names":["_common","require","_DocActivityType","_DocCode","_DocMethodSummary","_DocMarkdown","_DocPseudo","_DocRateLimited","_DocReferences","_DocSDKs","_DocSdkUsage","_DocSource","_DocStatus","_DocTitle","_Header","_SideNav","_ExploreType","_DocSchema","_DocTypeSummary","_Link","_ErrorBoundary","_SelectorContainer","_Banner"],"sources":["../../src/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 { ApixSection, Loader } from './common';\nexport { DocActivityType } from './DocActivityType';\nexport { DocCode } from './DocCode';\nexport { DocMethodSummary, DocSummaryStatus } from './DocMethodSummary';\nexport { DocMarkdown } from './DocMarkdown';\nexport { DocPseudo } from './DocPseudo';\nexport { DocRateLimited } from './DocRateLimited';\nexport { DocReferences } from './DocReferences';\nexport { DocSDKs } from './DocSDKs';\nexport { DocSdkUsage } from './DocSdkUsage';\nexport { DocSource } from './DocSource';\nexport { DocStatus } from './DocStatus';\nexport { DocTitle } from './DocTitle';\nexport { Header, HEADER_TOGGLE_LABEL } from './Header';\nexport { SideNav } from './SideNav';\nexport { ExploreType, ExploreProperty } from './ExploreType';\nexport { DocSchema } from './DocSchema';\nexport { DocTypeSummary } from './DocTypeSummary';\nexport { Link } from './Link';\nexport { ErrorBoundary } from './ErrorBoundary';\nexport { SelectorContainer } from './SelectorContainer';\nexport { Banner } from './Banner';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AACA,IAAAO,cAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,UAAA,GAAAV,OAAA;AACA,IAAAW,UAAA,GAAAX,OAAA;AACA,IAAAY,SAAA,GAAAZ,OAAA;AACA,IAAAa,OAAA,GAAAb,OAAA;AACA,IAAAc,QAAA,GAAAd,OAAA;AACA,IAAAe,YAAA,GAAAf,OAAA;AACA,IAAAgB,UAAA,GAAAhB,OAAA;AACA,IAAAiB,eAAA,GAAAjB,OAAA;AACA,IAAAkB,KAAA,GAAAlB,OAAA;AACA,IAAAmB,cAAA,GAAAnB,OAAA;AACA,IAAAoB,kBAAA,GAAApB,OAAA;AACA,IAAAqB,OAAA,GAAArB,OAAA"}
|
package/lib/custom.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom.d.js","names":[],"sources":["../src/custom.d.ts"],"sourcesContent":["declare module '*.svg' {\n const content: any
|
|
1
|
+
{"version":3,"file":"custom.d.js","names":[],"sources":["../src/custom.d.ts"],"sourcesContent":["declare module '*.svg' {\n const content: any;\n export default content;\n}\n"],"mappings":""}
|
package/lib/esm/ApiExplorer.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
2
4
|
import styled, { createGlobalStyle } from 'styled-components';
|
|
3
5
|
import { Aside, ComponentsProvider, Divider, Heading, IconButton, Layout, Page, Space } from '@looker/components';
|
|
4
6
|
import { FirstPage } from '@styled-icons/material/FirstPage';
|
|
@@ -6,12 +8,12 @@ import { LastPage } from '@styled-icons/material/LastPage';
|
|
|
6
8
|
import { registerEnvAdaptor, unregisterEnvAdaptor } from '@looker/extension-utils';
|
|
7
9
|
import { useSelector } from 'react-redux';
|
|
8
10
|
import { useLocation } from 'react-router-dom';
|
|
9
|
-
import {
|
|
11
|
+
import { Banner, ErrorBoundary, HEADER_TOGGLE_LABEL, Header, Loader, SelectorContainer, SideNav } from './components';
|
|
10
12
|
import { AppRouter } from './routes';
|
|
11
13
|
import { apixFilesHost } from './utils/lodeUtils';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
var BodyOverride = createGlobalStyle([" html{height:100%;overflow:hidden;}"]);
|
|
14
|
+
import { selectCurrentSpec, selectSpecs, useLodeActions, useLodesStoreState, useSettingActions, useSettingStoreState, useSpecActions, useSpecStoreState } from './state';
|
|
15
|
+
import { findSdk, getSpecKey, useGlobalStoreSync } from './utils';
|
|
16
|
+
var BodyOverride = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral([" html { height: 100%; overflow: hidden; } "])));
|
|
15
17
|
export var ApiExplorer = _ref => {
|
|
16
18
|
var _location$pathname2;
|
|
17
19
|
var {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiExplorer.js","names":["React","useState","useEffect","useCallback","styled","createGlobalStyle","Aside","ComponentsProvider","Divider","Heading","IconButton","Layout","Page","Space","FirstPage","LastPage","registerEnvAdaptor","unregisterEnvAdaptor","useSelector","useLocation","Header","SideNav","ErrorBoundary","SelectorContainer","HEADER_TOGGLE_LABEL","Loader","Banner","AppRouter","apixFilesHost","useSettingActions","useLodeActions","useLodesStoreState","useSpecActions","useSpecStoreState","selectSpecs","selectCurrentSpec","useSettingStoreState","getSpecKey","findSdk","useGlobalStoreSync","BodyOverride","ApiExplorer","_ref","_location$pathname2","adaptor","examplesLodeUrl","declarationsLodeUrl","concat","headless","working","description","specs","spec","initLodesAction","initialized","initSettingsAction","setSearchPatternAction","setSdkLanguageAction","initSpecsAction","setCurrentSpecAction","location","hasNavigation","setHasNavigation","toggleNavigation","target","hasNavigationToggle","e","origin","window","data","action","currentHasNavigation","specKey","_location$pathname","maybeSpec","pathname","split","key","currentSpecKey","searchParams","URLSearchParams","search","searchPattern","get","sdkParam","language","sdkLanguage","addEventListener","removeEventListener","themeOverrides","neededSpec","createElement","Fragment","loadGoogleFonts","themeCustomizations","message","logError","bind","style","overflow","hasAside","height","AsideBorder","borderRight","isOpen","align","py","px","justifyItems","as","fontSize","fontWeight","color","size","shape","icon","label","onClick","mb","appearance","ml","mr","api","withConfig","displayName","componentId","_ref2"],"sources":["../../src/ApiExplorer.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, useCallback } from 'react'\nimport styled, { createGlobalStyle } from 'styled-components'\nimport {\n Aside,\n ComponentsProvider,\n Divider,\n Heading,\n IconButton,\n Layout,\n Page,\n Space,\n} from '@looker/components'\nimport { FirstPage } from '@styled-icons/material/FirstPage'\nimport { LastPage } from '@styled-icons/material/LastPage'\nimport {\n registerEnvAdaptor,\n unregisterEnvAdaptor,\n} from '@looker/extension-utils'\nimport { useSelector } from 'react-redux'\nimport { useLocation } from 'react-router-dom'\n\nimport type { IApixAdaptor } from './utils'\nimport {\n Header,\n SideNav,\n ErrorBoundary,\n SelectorContainer,\n HEADER_TOGGLE_LABEL,\n Loader,\n Banner,\n} from './components'\nimport { AppRouter } from './routes'\nimport { apixFilesHost } from './utils/lodeUtils'\nimport {\n useSettingActions,\n useLodeActions,\n useLodesStoreState,\n useSpecActions,\n useSpecStoreState,\n selectSpecs,\n selectCurrentSpec,\n useSettingStoreState,\n} from './state'\nimport { getSpecKey, findSdk, useGlobalStoreSync } from './utils'\n\nexport interface ApiExplorerProps {\n adaptor: IApixAdaptor\n examplesLodeUrl?: string\n declarationsLodeUrl?: string\n headless?: boolean\n}\n\nconst BodyOverride = createGlobalStyle` html { height: 100%; overflow: hidden; } `\n\nexport const ApiExplorer: FC<ApiExplorerProps> = ({\n adaptor,\n examplesLodeUrl = 'https://raw.githubusercontent.com/looker-open-source/sdk-codegen/main/examplesIndex.json',\n declarationsLodeUrl = `${apixFilesHost}/declarationsIndex.json`,\n headless = false,\n}) => {\n useLodesStoreState()\n const { working, description } = useSpecStoreState()\n const specs = useSelector(selectSpecs)\n const spec = useSelector(selectCurrentSpec)\n const { initLodesAction } = useLodeActions()\n const { initialized } = useSettingStoreState()\n const { initSettingsAction, setSearchPatternAction, setSdkLanguageAction } =\n useSettingActions()\n const { initSpecsAction, setCurrentSpecAction } = useSpecActions()\n\n const location = useLocation()\n useGlobalStoreSync()\n const [hasNavigation, setHasNavigation] = useState(true)\n const toggleNavigation = (target?: boolean) =>\n setHasNavigation(target || !hasNavigation)\n\n const hasNavigationToggle = useCallback((e: MessageEvent<any>) => {\n if (e.origin === window.origin && e.data.action === 'toggle_sidebar') {\n setHasNavigation((currentHasNavigation) => !currentHasNavigation)\n }\n }, [])\n\n registerEnvAdaptor(adaptor)\n\n useEffect(() => {\n initSettingsAction()\n initLodesAction({ examplesLodeUrl, declarationsLodeUrl })\n\n const specKey = getSpecKey(location)\n initSpecsAction({ specKey })\n return () => unregisterEnvAdaptor()\n }, [])\n\n useEffect(() => {\n const maybeSpec = location.pathname?.split('/')[1]\n if (spec && maybeSpec && maybeSpec !== spec.key) {\n setCurrentSpecAction({ currentSpecKey: maybeSpec })\n }\n }, [location.pathname, spec])\n\n useEffect(() => {\n if (!initialized) return\n const searchParams = new URLSearchParams(location.search)\n const searchPattern = searchParams.get('s') || ''\n const sdkParam = searchParams.get('sdk') || 'all'\n const { language: sdkLanguage } = findSdk(sdkParam)\n setSearchPatternAction({ searchPattern })\n setSdkLanguageAction({ sdkLanguage })\n }, [location.search])\n\n useEffect(() => {\n if (headless) {\n window.addEventListener('message', hasNavigationToggle)\n }\n return () => {\n if (headless) {\n window.removeEventListener('message', hasNavigationToggle)\n }\n }\n }, [headless, hasNavigationToggle])\n\n const themeOverrides = adaptor.themeOverrides()\n\n let neededSpec = location.pathname?.split('/')[1]\n if (!neededSpec) {\n neededSpec = spec?.key\n }\n\n return (\n <>\n <ComponentsProvider\n loadGoogleFonts={themeOverrides.loadGoogleFonts}\n themeCustomizations={themeOverrides.themeCustomizations}\n >\n {working || !neededSpec || neededSpec !== spec.key ? (\n <Loader message={description} themeOverrides={themeOverrides} />\n ) : (\n <ErrorBoundary logError={adaptor.logError.bind(adaptor)}>\n <Banner adaptor={adaptor} specs={specs} />\n <Page style={{ overflow: 'hidden' }}>\n {!headless && (\n <Header spec={spec} toggleNavigation={toggleNavigation} />\n )}\n <Layout hasAside height=\"100%\">\n <AsideBorder\n borderRight\n isOpen={hasNavigation}\n headless={headless}\n >\n {headless && (\n <>\n <Space\n align=\"center\"\n py=\"u3\"\n px={hasNavigation ? 'u5' : '0'}\n justifyItems={\n hasNavigation ? 'space-between' : 'center'\n }\n >\n {hasNavigation && (\n <Heading\n as=\"h2\"\n fontSize=\"xsmall\"\n fontWeight=\"bold\"\n color=\"text2\"\n >\n API DOCUMENTATION\n </Heading>\n )}\n <IconButton\n size=\"xsmall\"\n shape=\"round\"\n icon={hasNavigation ? <FirstPage /> : <LastPage />}\n label={HEADER_TOGGLE_LABEL}\n onClick={() => toggleNavigation()}\n />\n </Space>\n {hasNavigation && (\n <>\n <Divider mb=\"u3\" appearance=\"light\" />\n <SelectorContainer\n spec={spec}\n ml=\"large\"\n mr=\"large\"\n />\n </>\n )}\n </>\n )}\n {hasNavigation && <SideNav headless={headless} spec={spec} />}\n </AsideBorder>\n <AppRouter\n specKey={spec.key}\n api={spec.api!}\n toggleNavigation={toggleNavigation}\n />\n </Layout>\n </Page>\n </ErrorBoundary>\n )}\n </ComponentsProvider>\n {!headless && <BodyOverride />}\n </>\n )\n}\n\nconst AsideBorder = styled(Aside)<{\n isOpen: boolean\n headless: boolean\n}>`\n width: ${({ isOpen, headless }) =>\n isOpen ? '20rem' : headless ? '2.75rem' : '0rem'};\n`\n"],"mappings":"AA2BA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,EAAEC,WAAW,QAAQ,OAAO;AAC/D,OAAOC,MAAM,IAAIC,iBAAiB,QAAQ,mBAAmB;AAC7D,SACEC,KAAK,EACLC,kBAAkB,EAClBC,OAAO,EACPC,OAAO,EACPC,UAAU,EACVC,MAAM,EACNC,IAAI,EACJC,KAAK,QACA,oBAAoB;AAC3B,SAASC,SAAS,QAAQ,kCAAkC;AAC5D,SAASC,QAAQ,QAAQ,iCAAiC;AAC1D,SACEC,kBAAkB,EAClBC,oBAAoB,QACf,yBAAyB;AAChC,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,WAAW,QAAQ,kBAAkB;AAG9C,SACEC,MAAM,EACNC,OAAO,EACPC,aAAa,EACbC,iBAAiB,EACjBC,mBAAmB,EACnBC,MAAM,EACNC,MAAM,QACD,cAAc;AACrB,SAASC,SAAS,QAAQ,UAAU;AACpC,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SACEC,iBAAiB,EACjBC,cAAc,EACdC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","Aside","ComponentsProvider","Divider","Heading","IconButton","Layout","Page","Space","FirstPage","LastPage","registerEnvAdaptor","unregisterEnvAdaptor","useSelector","useLocation","Banner","ErrorBoundary","HEADER_TOGGLE_LABEL","Header","Loader","SelectorContainer","SideNav","AppRouter","apixFilesHost","selectCurrentSpec","selectSpecs","useLodeActions","useLodesStoreState","useSettingActions","useSettingStoreState","useSpecActions","useSpecStoreState","findSdk","getSpecKey","useGlobalStoreSync","BodyOverride","_templateObject","_taggedTemplateLiteral","ApiExplorer","_ref","_location$pathname2","adaptor","examplesLodeUrl","declarationsLodeUrl","concat","headless","working","description","specs","spec","initLodesAction","initialized","initSettingsAction","setSearchPatternAction","setSdkLanguageAction","initSpecsAction","setCurrentSpecAction","location","hasNavigation","setHasNavigation","toggleNavigation","target","hasNavigationToggle","e","origin","window","data","action","currentHasNavigation","specKey","_location$pathname","maybeSpec","pathname","split","key","currentSpecKey","searchParams","URLSearchParams","search","searchPattern","get","sdkParam","language","sdkLanguage","addEventListener","removeEventListener","themeOverrides","neededSpec","createElement","Fragment","loadGoogleFonts","themeCustomizations","message","logError","bind","style","overflow","hasAside","height","AsideBorder","borderRight","isOpen","align","py","px","justifyItems","as","fontSize","fontWeight","color","size","shape","icon","label","onClick","mb","appearance","ml","mr","api","withConfig","displayName","componentId","_ref2"],"sources":["../../src/ApiExplorer.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, { useCallback, useEffect, useState } from 'react';\nimport styled, { createGlobalStyle } from 'styled-components';\nimport {\n Aside,\n ComponentsProvider,\n Divider,\n Heading,\n IconButton,\n Layout,\n Page,\n Space,\n} from '@looker/components';\nimport { FirstPage } from '@styled-icons/material/FirstPage';\nimport { LastPage } from '@styled-icons/material/LastPage';\nimport {\n registerEnvAdaptor,\n unregisterEnvAdaptor,\n} from '@looker/extension-utils';\nimport { useSelector } from 'react-redux';\nimport { useLocation } from 'react-router-dom';\n\nimport type { IApixAdaptor } from './utils';\nimport {\n Banner,\n ErrorBoundary,\n HEADER_TOGGLE_LABEL,\n Header,\n Loader,\n SelectorContainer,\n SideNav,\n} from './components';\nimport { AppRouter } from './routes';\nimport { apixFilesHost } from './utils/lodeUtils';\nimport {\n selectCurrentSpec,\n selectSpecs,\n useLodeActions,\n useLodesStoreState,\n useSettingActions,\n useSettingStoreState,\n useSpecActions,\n useSpecStoreState,\n} from './state';\nimport { findSdk, getSpecKey, useGlobalStoreSync } from './utils';\n\nexport interface ApiExplorerProps {\n adaptor: IApixAdaptor;\n examplesLodeUrl?: string;\n declarationsLodeUrl?: string;\n headless?: boolean;\n}\n\nconst BodyOverride = createGlobalStyle` html { height: 100%; overflow: hidden; } `;\n\nexport const ApiExplorer: FC<ApiExplorerProps> = ({\n adaptor,\n examplesLodeUrl = 'https://raw.githubusercontent.com/looker-open-source/sdk-codegen/main/examplesIndex.json',\n declarationsLodeUrl = `${apixFilesHost}/declarationsIndex.json`,\n headless = false,\n}) => {\n useLodesStoreState();\n const { working, description } = useSpecStoreState();\n const specs = useSelector(selectSpecs);\n const spec = useSelector(selectCurrentSpec);\n const { initLodesAction } = useLodeActions();\n const { initialized } = useSettingStoreState();\n const { initSettingsAction, setSearchPatternAction, setSdkLanguageAction } =\n useSettingActions();\n const { initSpecsAction, setCurrentSpecAction } = useSpecActions();\n\n const location = useLocation();\n useGlobalStoreSync();\n const [hasNavigation, setHasNavigation] = useState(true);\n const toggleNavigation = (target?: boolean) =>\n setHasNavigation(target || !hasNavigation);\n\n const hasNavigationToggle = useCallback((e: MessageEvent<any>) => {\n if (e.origin === window.origin && e.data.action === 'toggle_sidebar') {\n setHasNavigation((currentHasNavigation) => !currentHasNavigation);\n }\n }, []);\n\n registerEnvAdaptor(adaptor);\n\n useEffect(() => {\n initSettingsAction();\n initLodesAction({ examplesLodeUrl, declarationsLodeUrl });\n\n const specKey = getSpecKey(location);\n initSpecsAction({ specKey });\n return () => unregisterEnvAdaptor();\n }, []);\n\n useEffect(() => {\n const maybeSpec = location.pathname?.split('/')[1];\n if (spec && maybeSpec && maybeSpec !== spec.key) {\n setCurrentSpecAction({ currentSpecKey: maybeSpec });\n }\n }, [location.pathname, spec]);\n\n useEffect(() => {\n if (!initialized) return;\n const searchParams = new URLSearchParams(location.search);\n const searchPattern = searchParams.get('s') || '';\n const sdkParam = searchParams.get('sdk') || 'all';\n const { language: sdkLanguage } = findSdk(sdkParam);\n setSearchPatternAction({ searchPattern });\n setSdkLanguageAction({ sdkLanguage });\n }, [location.search]);\n\n useEffect(() => {\n if (headless) {\n window.addEventListener('message', hasNavigationToggle);\n }\n return () => {\n if (headless) {\n window.removeEventListener('message', hasNavigationToggle);\n }\n };\n }, [headless, hasNavigationToggle]);\n\n const themeOverrides = adaptor.themeOverrides();\n\n let neededSpec = location.pathname?.split('/')[1];\n if (!neededSpec) {\n neededSpec = spec?.key;\n }\n\n return (\n <>\n <ComponentsProvider\n loadGoogleFonts={themeOverrides.loadGoogleFonts}\n themeCustomizations={themeOverrides.themeCustomizations}\n >\n {working || !neededSpec || neededSpec !== spec.key ? (\n <Loader message={description} themeOverrides={themeOverrides} />\n ) : (\n <ErrorBoundary logError={adaptor.logError.bind(adaptor)}>\n <Banner adaptor={adaptor} specs={specs} />\n <Page style={{ overflow: 'hidden' }}>\n {!headless && (\n <Header spec={spec} toggleNavigation={toggleNavigation} />\n )}\n <Layout hasAside height=\"100%\">\n <AsideBorder\n borderRight\n isOpen={hasNavigation}\n headless={headless}\n >\n {headless && (\n <>\n <Space\n align=\"center\"\n py=\"u3\"\n px={hasNavigation ? 'u5' : '0'}\n justifyItems={\n hasNavigation ? 'space-between' : 'center'\n }\n >\n {hasNavigation && (\n <Heading\n as=\"h2\"\n fontSize=\"xsmall\"\n fontWeight=\"bold\"\n color=\"text2\"\n >\n API DOCUMENTATION\n </Heading>\n )}\n <IconButton\n size=\"xsmall\"\n shape=\"round\"\n icon={hasNavigation ? <FirstPage /> : <LastPage />}\n label={HEADER_TOGGLE_LABEL}\n onClick={() => toggleNavigation()}\n />\n </Space>\n {hasNavigation && (\n <>\n <Divider mb=\"u3\" appearance=\"light\" />\n <SelectorContainer\n spec={spec}\n ml=\"large\"\n mr=\"large\"\n />\n </>\n )}\n </>\n )}\n {hasNavigation && <SideNav headless={headless} spec={spec} />}\n </AsideBorder>\n <AppRouter\n specKey={spec.key}\n api={spec.api!}\n toggleNavigation={toggleNavigation}\n />\n </Layout>\n </Page>\n </ErrorBoundary>\n )}\n </ComponentsProvider>\n {!headless && <BodyOverride />}\n </>\n );\n};\n\nconst AsideBorder = styled(Aside)<{\n isOpen: boolean;\n headless: boolean;\n}>`\n width: ${({ isOpen, headless }) =>\n isOpen ? '20rem' : headless ? '2.75rem' : '0rem'};\n`;\n"],"mappings":";;AA2BA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC/D,OAAOC,MAAM,IAAIC,iBAAiB,QAAQ,mBAAmB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EAAEpB,IAAI,CAACyB,GAAI;IAClB6C,GAAG,EAAEtE,IAAI,CAACsE,GAAK;IACf3D,gBAAgB,EAAEA;EAAiB,CACpC,CACK,CACJ,CACO,CAEC,CAAC,EACpB,CAACf,QAAQ,IAAIlD,KAAA,CAAA6F,aAAA,CAACrD,YAAY,MAAE,CAC7B,CAAC;AAEP,CAAC;AAED,IAAMgE,WAAW,GAAGpG,MAAM,CAACE,KAAK,CAAC,CAAAuH,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,oBAItBC,KAAA;EAAA,IAAC;IAAEtB,MAAM;IAAExD;EAAS,CAAC,GAAA8E,KAAA;EAAA,OAC5BtB,MAAM,GAAG,OAAO,GAAGxD,QAAQ,GAAG,SAAS,GAAG,MAAM;AAAA,EACnD"}
|
package/lib/esm/App.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import { BrowserRouter as Router } from 'react-router-dom';
|
|
3
5
|
import ReactDOM from 'react-dom';
|
|
4
6
|
import { createGlobalStyle } from 'styled-components';
|
|
5
7
|
import { StandaloneApiExplorer } from './StandaloneApiExplorer';
|
|
6
|
-
var BodyReset = createGlobalStyle(["body{margin:0
|
|
8
|
+
var BodyReset = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n body {\n margin: 0;\n }\n"])));
|
|
7
9
|
var basename = window.LOOKER_DEV_PORTAL ? window.LOOKER_DEV_PORTAL.basename : undefined;
|
|
8
10
|
var versionsUrl = new URL('versions.json', window.location.origin).toString();
|
|
9
11
|
ReactDOM.render(React.createElement(Router, {
|
package/lib/esm/App.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.js","names":["React","BrowserRouter","Router","ReactDOM","createGlobalStyle","StandaloneApiExplorer","BodyReset","basename","window","LOOKER_DEV_PORTAL","undefined","versionsUrl","URL","location","origin","toString","render","createElement","headless","document","getElementById"],"sources":["../../src/App.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 from 'react'
|
|
1
|
+
{"version":3,"file":"App.js","names":["React","BrowserRouter","Router","ReactDOM","createGlobalStyle","StandaloneApiExplorer","BodyReset","_templateObject","_taggedTemplateLiteral","basename","window","LOOKER_DEV_PORTAL","undefined","versionsUrl","URL","location","origin","toString","render","createElement","headless","document","getElementById"],"sources":["../../src/App.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 from 'react';\nimport { BrowserRouter as Router } from 'react-router-dom';\nimport ReactDOM from 'react-dom';\nimport { createGlobalStyle } from 'styled-components';\nimport { StandaloneApiExplorer } from './StandaloneApiExplorer';\n\nconst BodyReset = createGlobalStyle`\n body {\n margin: 0;\n }\n`;\n\nconst basename = (window as any).LOOKER_DEV_PORTAL\n ? (window as any).LOOKER_DEV_PORTAL.basename\n : undefined;\n\nconst versionsUrl = new URL(\n 'versions.json',\n (window as any).location.origin\n).toString();\n\nReactDOM.render(\n <Router basename={basename}>\n <StandaloneApiExplorer versionsUrl={versionsUrl} headless={!!basename} />\n <BodyReset />\n </Router>,\n document.getElementById('container')\n);\n"],"mappings":";;AA0BA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,IAAIC,MAAM,QAAQ,kBAAkB;AAC1D,OAAOC,QAAQ,MAAM,WAAW;AAChC,SAASC,iBAAiB,QAAQ,mBAAmB;AACrD,SAASC,qBAAqB,QAAQ,yBAAyB;AAE/D,IAAMC,SAAS,GAAGF,iBAAiB,CAAAG,eAAA,KAAAA,eAAA,GAAAC,sBAAA,yCAIlC;AAED,IAAMC,QAAQ,GAAIC,MAAM,CAASC,iBAAiB,GAC7CD,MAAM,CAASC,iBAAiB,CAACF,QAAQ,GAC1CG,SAAS;AAEb,IAAMC,WAAW,GAAG,IAAIC,GAAG,CACzB,eAAe,EACdJ,MAAM,CAASK,QAAQ,CAACC,MAC3B,CAAC,CAACC,QAAQ,CAAC,CAAC;AAEZd,QAAQ,CAACe,MAAM,CACblB,KAAA,CAAAmB,aAAA,CAACjB,MAAM;EAACO,QAAQ,EAAEA;AAAS,GACzBT,KAAA,CAAAmB,aAAA,CAACd,qBAAqB;EAACQ,WAAW,EAAEA,WAAY;EAACO,QAAQ,EAAE,CAAC,CAACX;AAAS,CAAE,CAAC,EACzET,KAAA,CAAAmB,aAAA,CAACb,SAAS,MAAE,CACN,CAAC,EACTe,QAAQ,CAACC,cAAc,CAAC,WAAW,CACrC,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
2
2
|
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); }); }; }
|
|
3
3
|
import React, { useEffect, useState } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { RunItProvider, initRunItSdk } from '@looker/run-it';
|
|
5
5
|
import { OAuthScene } from '@looker/extension-utils';
|
|
6
6
|
import { Provider } from 'react-redux';
|
|
7
7
|
import { useLocation } from 'react-router';
|
|
8
8
|
import { ApiExplorer } from './ApiExplorer';
|
|
9
9
|
import { store } from './state';
|
|
10
|
-
import {
|
|
10
|
+
import { ApixAdaptor, oAuthPath } from './utils';
|
|
11
11
|
import { Loader } from './components';
|
|
12
12
|
export var StandaloneApiExplorer = _ref => {
|
|
13
13
|
var {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandaloneApiExplorer.js","names":["React","useEffect","useState","
|
|
1
|
+
{"version":3,"file":"StandaloneApiExplorer.js","names":["React","useEffect","useState","RunItProvider","initRunItSdk","OAuthScene","Provider","useLocation","ApiExplorer","store","ApixAdaptor","oAuthPath","Loader","StandaloneApiExplorer","_ref","headless","browserAdaptor","window","origin","location","oauthReturn","pathname","concat","sdk","canLogin","authSession","settings","authIsConfigured","isAuthenticated","login","_ref2","_asyncToGenerator","apply","arguments","looker_url","getStoredConfig","createElement","basePath","themeOverrides","message","Fragment","adaptor"],"sources":["../../src/StandaloneApiExplorer.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, useState } from 'react';\nimport { RunItProvider, initRunItSdk } from '@looker/run-it';\nimport type { OAuthConfigProvider } from '@looker/extension-utils';\nimport { OAuthScene } from '@looker/extension-utils';\nimport { Provider } from 'react-redux';\nimport { useLocation } from 'react-router';\n\nimport { ApiExplorer } from './ApiExplorer';\nimport { store } from './state';\nimport { ApixAdaptor, oAuthPath } from './utils';\nimport { Loader } from './components';\n\nexport interface StandaloneApiExplorerProps {\n headless?: boolean;\n versionsUrl: string;\n}\n\nexport const StandaloneApiExplorer: FC<StandaloneApiExplorerProps> = ({\n headless = false,\n}) => {\n const [browserAdaptor] = useState(\n new ApixAdaptor(initRunItSdk(), window.origin)\n );\n const location = useLocation();\n const oauthReturn = location.pathname === `/${oAuthPath}`;\n const sdk = browserAdaptor.sdk;\n const canLogin =\n (sdk.authSession.settings as OAuthConfigProvider).authIsConfigured() &&\n !sdk.authSession.isAuthenticated() &&\n !oauthReturn;\n\n useEffect(() => {\n const login = async () => await browserAdaptor.login();\n if (canLogin) {\n login();\n }\n }, []);\n\n const { looker_url } = (\n sdk.authSession.settings as OAuthConfigProvider\n ).getStoredConfig();\n\n return (\n <Provider store={store}>\n <RunItProvider basePath=\"/api/4.0\">\n {canLogin ? (\n <Loader\n themeOverrides={browserAdaptor.themeOverrides()}\n message={`Configuration found. Logging into ${looker_url}`}\n />\n ) : (\n <>\n {oauthReturn ? (\n <OAuthScene adaptor={browserAdaptor} />\n ) : (\n <ApiExplorer adaptor={browserAdaptor} headless={headless} />\n )}\n </>\n )}\n </RunItProvider>\n </Provider>\n );\n};\n"],"mappings":";;AA2BA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,aAAa,EAAEC,YAAY,QAAQ,gBAAgB;AAE5D,SAASC,UAAU,QAAQ,yBAAyB;AACpD,SAASC,QAAQ,QAAQ,aAAa;AACtC,SAASC,WAAW,QAAQ,cAAc;AAE1C,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,KAAK,QAAQ,SAAS;AAC/B,SAASC,WAAW,EAAEC,SAAS,QAAQ,SAAS;AAChD,SAASC,MAAM,QAAQ,cAAc;AAOrC,OAAO,IAAM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,MAAA,CAAuCY,UAAU;EAAG,CAC5D,CAAC,GAEFlC,KAAA,CAAAoC,aAAA,CAAApC,KAAA,CAAAwC,QAAA,QACGpB,WAAW,GACVpB,KAAA,CAAAoC,aAAA,CAAC/B,UAAU;IAACoC,OAAO,EAAEzB;EAAe,CAAE,CAAC,GAEvChB,KAAA,CAAAoC,aAAA,CAAC5B,WAAW;IAACiC,OAAO,EAAEzB,cAAe;IAACD,QAAQ,EAAEA;EAAS,CAAE,CAE7D,CAES,CACP,CAAC;AAEf,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
2
2
|
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); }); }; }
|
|
3
3
|
import { ButtonOutline, Link, MessageBar } from '@looker/components';
|
|
4
|
-
import React, {
|
|
4
|
+
import React, { useEffect, useState } from 'react';
|
|
5
5
|
var LOCAL_STORAGE_KEY = 'api-40-ga-apix-banner';
|
|
6
6
|
var LOCAL_STORAGE_VALUE = 'dismissed';
|
|
7
7
|
export var Banner = _ref => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.js","names":["ButtonOutline","Link","MessageBar","React","
|
|
1
|
+
{"version":3,"file":"Banner.js","names":["ButtonOutline","Link","MessageBar","React","useEffect","useState","LOCAL_STORAGE_KEY","LOCAL_STORAGE_VALUE","Banner","_ref","adaptor","specs","isOpen","setOpen","onLoad","createElement","intent","onPrimaryClick","onClose","secondaryAction","href","target","size","innerOnLoad","_innerOnLoad","apply","arguments","_asyncToGenerator","is40Stable","status","wasDismissed","localStorageGetItem","isExtension","localStorageSetItem"],"sources":["../../../../src/components/Banner/Banner.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 { ButtonOutline, Link, MessageBar } from '@looker/components';\nimport type { IEnvironmentAdaptor } from '@looker/extension-utils';\nimport type { SpecList } from '@looker/sdk-codegen';\nimport type { FC } from 'react';\nimport React, { useEffect, useState } from 'react';\n\nconst LOCAL_STORAGE_KEY = 'api-40-ga-apix-banner';\nconst LOCAL_STORAGE_VALUE = 'dismissed';\n\nexport interface BannerProps {\n adaptor: IEnvironmentAdaptor;\n specs: SpecList;\n}\n\nexport const Banner: FC<BannerProps> = ({ adaptor, specs }) => {\n const [isOpen, setOpen] = useState(false);\n useEffect(onLoad, []);\n\n if (isOpen) {\n return (\n <MessageBar\n intent=\"inform\"\n onPrimaryClick={onClose}\n secondaryAction={\n <Link\n href=\"https://developers.looker.com/api/advanced-usage/version-4-ga\"\n target=\"_blank\"\n >\n <ButtonOutline size=\"small\">Announcement</ButtonOutline>\n </Link>\n }\n >\n API 4.0 moves from Beta to General Availability in Looker 22.4 with\n additions and possible breaking changes. Read the announcement to see\n how this affects you.\n </MessageBar>\n );\n } else {\n return null;\n }\n\n function onLoad() {\n // Following best practice with inner async function\n // https://github.com/facebook/react/issues/14326\n async function innerOnLoad() {\n // 4.0 is stable in Looker 22.4+. 4.0 is default or `current` in 22.4+.\n // Still check for `stable` just in case new version comes along.\n const is40Stable =\n specs['4.0'].status === 'stable' || specs['4.0'].status === 'current';\n const wasDismissed =\n (await adaptor.localStorageGetItem(LOCAL_STORAGE_KEY)) ===\n LOCAL_STORAGE_VALUE;\n setOpen(!is40Stable && !wasDismissed && adaptor.isExtension());\n }\n innerOnLoad();\n }\n\n function onClose() {\n adaptor.localStorageSetItem(LOCAL_STORAGE_KEY, LOCAL_STORAGE_VALUE);\n setOpen(false);\n }\n};\n"],"mappings":";;AAyBA,SAASA,aAAa,EAAEC,IAAI,EAAEC,UAAU,QAAQ,oBAAoB;AAIpE,OAAOC,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAElD,IAAMC,iBAAiB,GAAG,uBAAuB;AACjD,IAAMC,mBAAmB,GAAG,WAAW;AAOvC,OAAO,IAAMC,MAAuB,GAAGC,IAAA,IAAwB;EAAA,IAAvB;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAAF,IAAA;EACxD,IAAM,CAACG,MAAM,EAAEC,OAAO,CAAC,GAAGR,QAAQ,CAAC,KAAK,CAAC;EACzCD,SAAS,CAACU,MAAM,EAAE,EAAE,CAAC;EAErB,IAAIF,MAAM,EAAE;IACV,OACET,KAAA,CAAAY,aAAA,CAACb,UAAU;MACTc,MAAM,EAAC,QAAQ;MACfC,cAAc,EAAEC,OAAQ;MACxBC,eAAe,EACbhB,KAAA,CAAAY,aAAA,CAACd,IAAI;QACHmB,IAAI,EAAC,+DAA+D;QACpEC,MAAM,EAAC;MAAQ,GAEflB,KAAA,CAAAY,aAAA,CAACf,aAAa;QAACsB,IAAI,EAAC;MAAO,GAAC,cAA2B,CACnD;IACP,GACF,iKAIW,CAAC;EAEjB,CAAC,MAAM;IACL,OAAO,IAAI;EACb;EAEA,SAASR,MAAMA,CAAA,EAAG;IAAA,SAGDS,WAAWA,CAAA;MAAA,OAAAC,YAAA,CAAAC,KAAA,OAAAC,SAAA;IAAA;IAAA,SAAAF,aAAA;MAAAA,YAAA,GAAAG,iBAAA,CAA1B,aAA6B;QAG3B,IAAMC,UAAU,GACdjB,KAAK,CAAC,KAAK,CAAC,CAACkB,MAAM,KAAK,QAAQ,IAAIlB,KAAK,CAAC,KAAK,CAAC,CAACkB,MAAM,KAAK,SAAS;QACvE,IAAMC,YAAY,GAChB,OAAOpB,OAAO,CAACqB,mBAAmB,CAACzB,iBAAiB,CAAC,MACrDC,mBAAmB;QACrBM,OAAO,CAAC,CAACe,UAAU,IAAI,CAACE,YAAY,IAAIpB,OAAO,CAACsB,WAAW,CAAC,CAAC,CAAC;MAChE,CAAC;MAAA,OAAAR,YAAA,CAAAC,KAAA,OAAAC,SAAA;IAAA;IACDH,WAAW,CAAC,CAAC;EACf;EAEA,SAASL,OAAOA,CAAA,EAAG;IACjBR,OAAO,CAACuB,mBAAmB,CAAC3B,iBAAiB,EAAEC,mBAAmB,CAAC;IACnEM,OAAO,CAAC,KAAK,CAAC;EAChB;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Banner"],"sources":["../../../../src/components/Banner/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 { Banner } from './Banner'
|
|
1
|
+
{"version":3,"file":"index.js","names":["Banner"],"sources":["../../../../src/components/Banner/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 { Banner } from './Banner';\n"],"mappings":"AAyBA,SAASA,MAAM,QAAQ,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocActivityType.js","names":["React","
|
|
1
|
+
{"version":3,"file":"DocActivityType.js","names":["React","Badge","Code","Tooltip","DocActivityType","_ref","method","createElement","Fragment","activityType","color","textAlign","content","intent"],"sources":["../../../../src/components/DocActivityType/DocActivityType.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 { Badge, Code, Tooltip } from '@looker/components';\nimport type { IMethod } from '@looker/sdk-codegen';\n\ninterface DocActivityTypeProps {\n method: IMethod;\n}\nexport const DocActivityType: FC<DocActivityTypeProps> = ({ method }) => (\n <>\n {method.activityType === 'db_query' && (\n <>\n <Code color=\"palette.charcoal500\">{'db_query'}</Code>\n <Tooltip\n textAlign=\"left\"\n content={\n <>\n Call volume for this endpoint counts toward the \"db_query\" API\n activity category.\n </>\n }\n >\n <span>\n <Badge intent=\"neutral\">$</Badge>\n </span>\n </Tooltip>\n </>\n )}\n </>\n);\n"],"mappings":"AA0BA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,IAAI,EAAEC,OAAO,QAAQ,oBAAoB;AAMzD,OAAO,IAAMC,eAAyC,GAAGC,IAAA;EAAA,IAAC;IAAEC;EAAO,CAAC,GAAAD,IAAA;EAAA,OAClEL,KAAA,CAAAO,aAAA,CAAAP,KAAA,CAAAQ,QAAA,QACGF,MAAM,CAACG,YAAY,KAAK,UAAU,IACjCT,KAAA,CAAAO,aAAA,CAAAP,KAAA,CAAAQ,QAAA,QACER,KAAA,CAAAO,aAAA,CAACL,IAAI;IAACQ,KAAK,EAAC;EAAqB,GAAE,UAAiB,CAAC,EACrDV,KAAA,CAAAO,aAAA,CAACJ,OAAO;IACNQ,SAAS,EAAC,MAAM;IAChBC,OAAO,EACLZ,KAAA,CAAAO,aAAA,CAAAP,KAAA,CAAAQ,QAAA,QAAE,qFAGA;EACH,GAEDR,KAAA,CAAAO,aAAA,eACEP,KAAA,CAAAO,aAAA,CAACN,KAAK;IAACY,MAAM,EAAC;EAAS,GAAC,GAAQ,CAC5B,CACC,CACT,CAEJ,CAAC;AAAA,CACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["DocActivityType"],"sources":["../../../../src/components/DocActivityType/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 { DocActivityType } from './DocActivityType'
|
|
1
|
+
{"version":3,"file":"index.js","names":["DocActivityType"],"sources":["../../../../src/components/DocActivityType/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 { DocActivityType } from './DocActivityType';\n"],"mappings":"AAyBA,SAASA,eAAe,QAAQ,mBAAmB"}
|