@looker/api-explorer 0.9.55 → 0.9.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +596 -634
- package/CODE_OF_CONDUCT.md +10 -10
- package/e2e/MethodScene.spec.ts +23 -23
- package/e2e/diffScene.spec.ts +115 -115
- package/e2e/e2e.spec.ts +134 -134
- package/e2e/helpers.ts +11 -11
- package/jest-puppeteer.config.js +2 -2
- package/jest.config.js +4 -7
- package/lib/ApiExplorer.js +5 -3
- package/lib/ApiExplorer.js.map +1 -1
- package/lib/App.js +3 -1
- package/lib/App.js.map +1 -1
- package/lib/StandaloneApiExplorer.js +2 -2
- package/lib/StandaloneApiExplorer.js.map +1 -1
- package/lib/components/Banner/Banner.js +2 -2
- package/lib/components/Banner/Banner.js.map +1 -1
- package/lib/components/Banner/index.js.map +1 -1
- package/lib/components/DocActivityType/DocActivityType.js.map +1 -1
- package/lib/components/DocActivityType/index.js.map +1 -1
- package/lib/components/DocCode/DocCode.js.map +1 -1
- package/lib/components/DocCode/index.js.map +1 -1
- package/lib/components/DocMarkdown/DocMarkdown.js.map +1 -1
- package/lib/components/DocMarkdown/index.js.map +1 -1
- package/lib/components/DocMarkdown/utils.js.map +1 -1
- package/lib/components/DocMethodSummary/DocMethodSummary.js.map +1 -1
- package/lib/components/DocMethodSummary/DocSummaryStatus.js.map +1 -1
- package/lib/components/DocMethodSummary/index.js.map +1 -1
- package/lib/components/DocMethodSummary/utils.d.ts +2 -2
- package/lib/components/DocMethodSummary/utils.js +1 -1
- package/lib/components/DocMethodSummary/utils.js.map +1 -1
- package/lib/components/DocPseudo/DocParam.js.map +1 -1
- package/lib/components/DocPseudo/DocParams.js +2 -2
- package/lib/components/DocPseudo/DocParams.js.map +1 -1
- package/lib/components/DocPseudo/DocPrimaryResponse.js.map +1 -1
- package/lib/components/DocPseudo/DocPseudo.js.map +1 -1
- package/lib/components/DocPseudo/index.js.map +1 -1
- package/lib/components/DocRateLimited/DocRateLimited.js.map +1 -1
- package/lib/components/DocRateLimited/index.js.map +1 -1
- package/lib/components/DocReferences/DocReferences.js.map +1 -1
- package/lib/components/DocReferences/index.js.map +1 -1
- package/lib/components/DocReferences/utils.d.ts +2 -2
- package/lib/components/DocReferences/utils.js.map +1 -1
- package/lib/components/DocSDKs/DocDeclarations.js.map +1 -1
- package/lib/components/DocSDKs/DocSDKs.d.ts +1 -1
- package/lib/components/DocSDKs/DocSDKs.js +2 -2
- package/lib/components/DocSDKs/DocSDKs.js.map +1 -1
- package/lib/components/DocSDKs/index.js.map +1 -1
- package/lib/components/DocSDKs/utils.js.map +1 -1
- package/lib/components/DocSchema/DocSchema.js.map +1 -1
- package/lib/components/DocSchema/index.js.map +1 -1
- package/lib/components/DocSdkUsage/DocSdkExampleCell.js.map +1 -1
- package/lib/components/DocSdkUsage/DocSdkUsage.js +2 -2
- package/lib/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
- package/lib/components/DocSdkUsage/index.js.map +1 -1
- package/lib/components/DocSdkUsage/utils.js +3 -6
- package/lib/components/DocSdkUsage/utils.js.map +1 -1
- package/lib/components/DocSource/DocSource.js +0 -1
- package/lib/components/DocSource/DocSource.js.map +1 -1
- package/lib/components/DocSource/index.js.map +1 -1
- package/lib/components/DocStatus/DocStatus.js.map +1 -1
- package/lib/components/DocStatus/index.js.map +1 -1
- package/lib/components/DocTitle/DocTitle.js.map +1 -1
- package/lib/components/DocTitle/index.js.map +1 -1
- package/lib/components/DocTypeSummary/DocTypeSummary.js.map +1 -1
- package/lib/components/DocTypeSummary/index.js.map +1 -1
- package/lib/components/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/lib/components/ErrorBoundary/ErrorBoundary.js +2 -2
- package/lib/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.js.map +1 -1
- package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js +1 -2
- package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
- package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/index.js.map +1 -1
- package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/index.js.map +1 -1
- package/lib/components/ErrorBoundary/components/SomethingWentWrong/index.js.map +1 -1
- package/lib/components/ErrorBoundary/index.js.map +1 -1
- package/lib/components/ExploreType/ExploreProperty.d.ts +1 -1
- package/lib/components/ExploreType/ExploreProperty.js.map +1 -1
- package/lib/components/ExploreType/ExploreType.d.ts +1 -1
- package/lib/components/ExploreType/ExploreType.js.map +1 -1
- package/lib/components/ExploreType/exploreUtils.js +1 -2
- package/lib/components/ExploreType/exploreUtils.js.map +1 -1
- package/lib/components/ExploreType/index.js.map +1 -1
- package/lib/components/Header/Header.js +3 -6
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/index.js.map +1 -1
- package/lib/components/Link/Link.js +2 -3
- package/lib/components/Link/Link.js.map +1 -1
- package/lib/components/Link/index.js.map +1 -1
- package/lib/components/SelectorContainer/ApiSpecSelector.js.map +1 -1
- package/lib/components/SelectorContainer/SdkLanguageSelector.js +2 -2
- package/lib/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
- package/lib/components/SelectorContainer/SelectorContainer.js +1 -2
- package/lib/components/SelectorContainer/SelectorContainer.js.map +1 -1
- package/lib/components/SelectorContainer/index.js.map +1 -1
- package/lib/components/SelectorContainer/utils.js.map +1 -1
- package/lib/components/SideNav/SearchMessage.js.map +1 -1
- package/lib/components/SideNav/SideNav.js +2 -11
- package/lib/components/SideNav/SideNav.js.map +1 -1
- package/lib/components/SideNav/SideNavMethodTags.d.ts +2 -2
- package/lib/components/SideNav/SideNavMethodTags.js +2 -3
- package/lib/components/SideNav/SideNavMethodTags.js.map +1 -1
- package/lib/components/SideNav/SideNavMethods.d.ts +2 -2
- package/lib/components/SideNav/SideNavMethods.js +3 -4
- package/lib/components/SideNav/SideNavMethods.js.map +1 -1
- package/lib/components/SideNav/SideNavTypeTags.d.ts +2 -2
- package/lib/components/SideNav/SideNavTypeTags.js +2 -3
- package/lib/components/SideNav/SideNavTypeTags.js.map +1 -1
- package/lib/components/SideNav/SideNavTypes.d.ts +2 -2
- package/lib/components/SideNav/SideNavTypes.js +4 -5
- package/lib/components/SideNav/SideNavTypes.js.map +1 -1
- package/lib/components/SideNav/index.js.map +1 -1
- package/lib/components/SideNav/searchUtils.js.map +1 -1
- package/lib/components/common/Loader.js.map +1 -1
- package/lib/components/common/common.js +3 -4
- package/lib/components/common/common.js.map +1 -1
- package/lib/components/common/index.js.map +1 -1
- package/lib/components/index.js.map +1 -1
- package/lib/custom.d.js.map +1 -1
- package/lib/esm/ApiExplorer.js +7 -5
- package/lib/esm/ApiExplorer.js.map +1 -1
- package/lib/esm/App.js +3 -1
- package/lib/esm/App.js.map +1 -1
- package/lib/esm/StandaloneApiExplorer.js +2 -2
- package/lib/esm/StandaloneApiExplorer.js.map +1 -1
- package/lib/esm/components/Banner/Banner.js +1 -1
- package/lib/esm/components/Banner/Banner.js.map +1 -1
- package/lib/esm/components/Banner/index.js.map +1 -1
- package/lib/esm/components/DocActivityType/DocActivityType.js +1 -1
- package/lib/esm/components/DocActivityType/DocActivityType.js.map +1 -1
- package/lib/esm/components/DocActivityType/index.js.map +1 -1
- package/lib/esm/components/DocCode/DocCode.js.map +1 -1
- package/lib/esm/components/DocCode/index.js.map +1 -1
- package/lib/esm/components/DocMarkdown/DocMarkdown.js.map +1 -1
- package/lib/esm/components/DocMarkdown/index.js.map +1 -1
- package/lib/esm/components/DocMarkdown/utils.js.map +1 -1
- package/lib/esm/components/DocMethodSummary/DocMethodSummary.js.map +1 -1
- package/lib/esm/components/DocMethodSummary/DocSummaryStatus.js.map +1 -1
- package/lib/esm/components/DocMethodSummary/index.js.map +1 -1
- package/lib/esm/components/DocMethodSummary/utils.js +1 -1
- package/lib/esm/components/DocMethodSummary/utils.js.map +1 -1
- package/lib/esm/components/DocPseudo/DocParam.js.map +1 -1
- package/lib/esm/components/DocPseudo/DocParams.js.map +1 -1
- package/lib/esm/components/DocPseudo/DocPrimaryResponse.js.map +1 -1
- package/lib/esm/components/DocPseudo/DocPseudo.js.map +1 -1
- package/lib/esm/components/DocPseudo/index.js.map +1 -1
- package/lib/esm/components/DocRateLimited/DocRateLimited.js.map +1 -1
- package/lib/esm/components/DocRateLimited/index.js.map +1 -1
- package/lib/esm/components/DocReferences/DocReferences.js.map +1 -1
- package/lib/esm/components/DocReferences/index.js.map +1 -1
- package/lib/esm/components/DocReferences/utils.js.map +1 -1
- package/lib/esm/components/DocSDKs/DocDeclarations.js.map +1 -1
- package/lib/esm/components/DocSDKs/DocSDKs.js +1 -1
- package/lib/esm/components/DocSDKs/DocSDKs.js.map +1 -1
- package/lib/esm/components/DocSDKs/index.js.map +1 -1
- package/lib/esm/components/DocSDKs/utils.js.map +1 -1
- package/lib/esm/components/DocSchema/DocSchema.js.map +1 -1
- package/lib/esm/components/DocSchema/index.js.map +1 -1
- package/lib/esm/components/DocSdkUsage/DocSdkExampleCell.js.map +1 -1
- package/lib/esm/components/DocSdkUsage/DocSdkUsage.js +4 -4
- package/lib/esm/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
- package/lib/esm/components/DocSdkUsage/index.js.map +1 -1
- package/lib/esm/components/DocSdkUsage/utils.js.map +1 -1
- package/lib/esm/components/DocSource/DocSource.js +0 -1
- package/lib/esm/components/DocSource/DocSource.js.map +1 -1
- package/lib/esm/components/DocSource/index.js.map +1 -1
- package/lib/esm/components/DocStatus/DocStatus.js.map +1 -1
- package/lib/esm/components/DocStatus/index.js.map +1 -1
- package/lib/esm/components/DocTitle/DocTitle.js.map +1 -1
- package/lib/esm/components/DocTitle/index.js.map +1 -1
- package/lib/esm/components/DocTypeSummary/DocTypeSummary.js.map +1 -1
- package/lib/esm/components/DocTypeSummary/index.js.map +1 -1
- package/lib/esm/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.js.map +1 -1
- package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
- package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/index.js.map +1 -1
- package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/index.js.map +1 -1
- package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/index.js.map +1 -1
- package/lib/esm/components/ErrorBoundary/index.js.map +1 -1
- package/lib/esm/components/ExploreType/ExploreProperty.js +2 -2
- package/lib/esm/components/ExploreType/ExploreProperty.js.map +1 -1
- package/lib/esm/components/ExploreType/ExploreType.js.map +1 -1
- package/lib/esm/components/ExploreType/exploreUtils.js.map +1 -1
- package/lib/esm/components/ExploreType/index.js.map +1 -1
- package/lib/esm/components/Header/Header.js +1 -1
- package/lib/esm/components/Header/Header.js.map +1 -1
- package/lib/esm/components/Header/index.js.map +1 -1
- package/lib/esm/components/Link/Link.js +1 -1
- package/lib/esm/components/Link/Link.js.map +1 -1
- package/lib/esm/components/Link/index.js.map +1 -1
- package/lib/esm/components/SelectorContainer/ApiSpecSelector.js.map +1 -1
- package/lib/esm/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
- package/lib/esm/components/SelectorContainer/SelectorContainer.js +1 -1
- package/lib/esm/components/SelectorContainer/SelectorContainer.js.map +1 -1
- package/lib/esm/components/SelectorContainer/index.js.map +1 -1
- package/lib/esm/components/SelectorContainer/utils.js +1 -1
- package/lib/esm/components/SelectorContainer/utils.js.map +1 -1
- package/lib/esm/components/SideNav/SearchMessage.js +1 -1
- package/lib/esm/components/SideNav/SearchMessage.js.map +1 -1
- package/lib/esm/components/SideNav/SideNav.js +3 -12
- package/lib/esm/components/SideNav/SideNav.js.map +1 -1
- package/lib/esm/components/SideNav/SideNavMethodTags.js +1 -1
- package/lib/esm/components/SideNav/SideNavMethodTags.js.map +1 -1
- package/lib/esm/components/SideNav/SideNavMethods.js +1 -1
- package/lib/esm/components/SideNav/SideNavMethods.js.map +1 -1
- package/lib/esm/components/SideNav/SideNavTypeTags.js +1 -1
- package/lib/esm/components/SideNav/SideNavTypeTags.js.map +1 -1
- package/lib/esm/components/SideNav/SideNavTypes.js +2 -2
- package/lib/esm/components/SideNav/SideNavTypes.js.map +1 -1
- package/lib/esm/components/SideNav/index.js.map +1 -1
- package/lib/esm/components/SideNav/searchUtils.js +1 -1
- package/lib/esm/components/SideNav/searchUtils.js.map +1 -1
- package/lib/esm/components/common/Loader.js.map +1 -1
- package/lib/esm/components/common/common.js.map +1 -1
- package/lib/esm/components/common/index.js.map +1 -1
- package/lib/esm/components/index.js.map +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/routes/AppRouter.js.map +1 -1
- package/lib/esm/routes/index.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DiffScene.js +1 -1
- package/lib/esm/scenes/DiffScene/DiffScene.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/DiffBanner.js +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/DiffBanner.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/DiffItem.js +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/DiffItem.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/DiffLegend.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/DocDiff.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/docDiffUtils.js +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/docDiffUtils.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/index.js.map +1 -1
- package/lib/esm/scenes/DiffScene/diffUtils.js.map +1 -1
- package/lib/esm/scenes/DiffScene/index.js.map +1 -1
- package/lib/esm/scenes/ErrorDetailScene/ErrorDetailScene.js +2 -1
- package/lib/esm/scenes/ErrorDetailScene/ErrorDetailScene.js.map +1 -1
- package/lib/esm/scenes/ErrorDetailScene/index.js.map +1 -1
- package/lib/esm/scenes/HomeScene/HomeScene.js.map +1 -1
- package/lib/esm/scenes/HomeScene/index.js.map +1 -1
- package/lib/esm/scenes/MethodScene/MethodScene.js +3 -3
- package/lib/esm/scenes/MethodScene/MethodScene.js.map +1 -1
- package/lib/esm/scenes/MethodScene/components/DocOperation.js.map +1 -1
- package/lib/esm/scenes/MethodScene/components/DocRequestBody.js.map +1 -1
- package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponseTypes.js +2 -2
- package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponseTypes.js.map +1 -1
- package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponses.js +2 -2
- package/lib/esm/scenes/MethodScene/components/DocResponses/DocResponses.js.map +1 -1
- package/lib/esm/scenes/MethodScene/components/DocResponses/index.js.map +1 -1
- package/lib/esm/scenes/MethodScene/components/DocResponses/utils.js.map +1 -1
- package/lib/esm/scenes/MethodScene/components/index.js.map +1 -1
- package/lib/esm/scenes/MethodScene/index.js.map +1 -1
- package/lib/esm/scenes/MethodTagScene/MethodTagScene.js +2 -2
- package/lib/esm/scenes/MethodTagScene/MethodTagScene.js.map +1 -1
- package/lib/esm/scenes/MethodTagScene/index.js.map +1 -1
- package/lib/esm/scenes/MethodTagScene/utils.js.map +1 -1
- package/lib/esm/scenes/TypeScene/TypeScene.js +3 -3
- package/lib/esm/scenes/TypeScene/TypeScene.js.map +1 -1
- package/lib/esm/scenes/TypeScene/index.js.map +1 -1
- package/lib/esm/scenes/TypeTagScene/TypeTagScene.js +1 -1
- package/lib/esm/scenes/TypeTagScene/TypeTagScene.js.map +1 -1
- package/lib/esm/scenes/TypeTagScene/index.js.map +1 -1
- package/lib/esm/scenes/TypeTagScene/utils.js.map +1 -1
- package/lib/esm/scenes/index.js.map +1 -1
- package/lib/esm/scenes/utils/hooks/index.js.map +1 -1
- package/lib/esm/scenes/utils/hooks/tagStoreSync.js.map +1 -1
- package/lib/esm/scenes/utils/index.js.map +1 -1
- package/lib/esm/state/index.js.map +1 -1
- package/lib/esm/state/lodes/index.js.map +1 -1
- package/lib/esm/state/lodes/sagas.js.map +1 -1
- package/lib/esm/state/lodes/selectors.js.map +1 -1
- package/lib/esm/state/lodes/slice.js.map +1 -1
- package/lib/esm/state/settings/index.js.map +1 -1
- package/lib/esm/state/settings/sagas.js +6 -6
- package/lib/esm/state/settings/sagas.js.map +1 -1
- package/lib/esm/state/settings/selectors.js.map +1 -1
- package/lib/esm/state/settings/slice.js +4 -4
- package/lib/esm/state/settings/slice.js.map +1 -1
- package/lib/esm/state/specs/index.js.map +1 -1
- package/lib/esm/state/specs/sagas.js +1 -1
- package/lib/esm/state/specs/sagas.js.map +1 -1
- package/lib/esm/state/specs/selectors.js.map +1 -1
- package/lib/esm/state/specs/slice.js.map +1 -1
- package/lib/esm/state/store.js +5 -5
- package/lib/esm/state/store.js.map +1 -1
- package/lib/esm/test-data/declarations.js.map +1 -1
- package/lib/esm/test-data/examples.js.map +1 -1
- package/lib/esm/test-data/index.js.map +1 -1
- package/lib/esm/test-data/sdkLanguages.js.map +1 -1
- package/lib/esm/test-data/specs.js +4 -4
- package/lib/esm/test-data/specs.js.map +1 -1
- package/lib/esm/test-utils/index.js.map +1 -1
- package/lib/esm/test-utils/lodes.js.map +1 -1
- package/lib/esm/test-utils/redux.js +5 -5
- package/lib/esm/test-utils/redux.js.map +1 -1
- package/lib/esm/test-utils/router.js.map +1 -1
- package/lib/esm/utils/adaptorUtils.js.map +1 -1
- package/lib/esm/utils/apixAdaptor.js +1 -1
- package/lib/esm/utils/apixAdaptor.js.map +1 -1
- package/lib/esm/utils/highlight.js.map +1 -1
- package/lib/esm/utils/hooks/globalStoreSync.js.map +1 -1
- package/lib/esm/utils/hooks/index.js.map +1 -1
- package/lib/esm/utils/hooks/navigation.js +2 -1
- package/lib/esm/utils/hooks/navigation.js.map +1 -1
- package/lib/esm/utils/hooks/useQuery.js.map +1 -1
- package/lib/esm/utils/index.js.map +1 -1
- package/lib/esm/utils/lodeUtils.js.map +1 -1
- package/lib/esm/utils/path.js +1 -1
- package/lib/esm/utils/path.js.map +1 -1
- package/lib/esm/utils/sdkLanguage.js +4 -4
- package/lib/esm/utils/sdkLanguage.js.map +1 -1
- package/lib/esm/utils/useWindowSize.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/routes/AppRouter.js.map +1 -1
- package/lib/routes/index.js.map +1 -1
- package/lib/scenes/DiffScene/DiffScene.js +2 -2
- package/lib/scenes/DiffScene/DiffScene.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/DiffBanner.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/DiffItem.js +2 -2
- package/lib/scenes/DiffScene/DocDiff/DiffItem.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/DiffLegend.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/DocDiff.js +2 -2
- package/lib/scenes/DiffScene/DocDiff/DocDiff.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/docDiffUtils.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/index.js.map +1 -1
- package/lib/scenes/DiffScene/diffUtils.js +2 -4
- package/lib/scenes/DiffScene/diffUtils.js.map +1 -1
- package/lib/scenes/DiffScene/index.js.map +1 -1
- package/lib/scenes/ErrorDetailScene/ErrorDetailScene.d.ts +2 -2
- package/lib/scenes/ErrorDetailScene/ErrorDetailScene.js +2 -1
- package/lib/scenes/ErrorDetailScene/ErrorDetailScene.js.map +1 -1
- package/lib/scenes/ErrorDetailScene/index.js.map +1 -1
- package/lib/scenes/HomeScene/HomeScene.js.map +1 -1
- package/lib/scenes/HomeScene/index.js.map +1 -1
- package/lib/scenes/MethodScene/MethodScene.js +2 -2
- package/lib/scenes/MethodScene/MethodScene.js.map +1 -1
- package/lib/scenes/MethodScene/components/DocOperation.js.map +1 -1
- package/lib/scenes/MethodScene/components/DocRequestBody.js.map +1 -1
- package/lib/scenes/MethodScene/components/DocResponses/DocResponseTypes.d.ts +3 -3
- package/lib/scenes/MethodScene/components/DocResponses/DocResponseTypes.js +2 -2
- package/lib/scenes/MethodScene/components/DocResponses/DocResponseTypes.js.map +1 -1
- package/lib/scenes/MethodScene/components/DocResponses/DocResponses.d.ts +2 -2
- package/lib/scenes/MethodScene/components/DocResponses/DocResponses.js +2 -2
- package/lib/scenes/MethodScene/components/DocResponses/DocResponses.js.map +1 -1
- package/lib/scenes/MethodScene/components/DocResponses/index.js.map +1 -1
- package/lib/scenes/MethodScene/components/DocResponses/utils.js.map +1 -1
- package/lib/scenes/MethodScene/components/index.js.map +1 -1
- package/lib/scenes/MethodScene/index.js.map +1 -1
- package/lib/scenes/MethodTagScene/MethodTagScene.js +2 -2
- package/lib/scenes/MethodTagScene/MethodTagScene.js.map +1 -1
- package/lib/scenes/MethodTagScene/index.js.map +1 -1
- package/lib/scenes/MethodTagScene/utils.js.map +1 -1
- package/lib/scenes/TypeScene/TypeScene.js +2 -2
- package/lib/scenes/TypeScene/TypeScene.js.map +1 -1
- package/lib/scenes/TypeScene/index.js.map +1 -1
- package/lib/scenes/TypeTagScene/TypeTagScene.js +2 -2
- package/lib/scenes/TypeTagScene/TypeTagScene.js.map +1 -1
- package/lib/scenes/TypeTagScene/index.js.map +1 -1
- package/lib/scenes/TypeTagScene/utils.js.map +1 -1
- package/lib/scenes/index.js.map +1 -1
- package/lib/scenes/utils/hooks/index.js.map +1 -1
- package/lib/scenes/utils/hooks/tagStoreSync.js.map +1 -1
- package/lib/scenes/utils/index.js.map +1 -1
- package/lib/state/index.js.map +1 -1
- package/lib/state/lodes/index.js.map +1 -1
- package/lib/state/lodes/sagas.js.map +1 -1
- package/lib/state/lodes/selectors.js.map +1 -1
- package/lib/state/lodes/slice.d.ts +1 -1
- package/lib/state/lodes/slice.js +3 -6
- package/lib/state/lodes/slice.js.map +1 -1
- package/lib/state/settings/index.js.map +1 -1
- package/lib/state/settings/sagas.js +4 -4
- package/lib/state/settings/sagas.js.map +1 -1
- package/lib/state/settings/selectors.js.map +1 -1
- package/lib/state/settings/slice.d.ts +4 -4
- package/lib/state/settings/slice.js +8 -12
- package/lib/state/settings/slice.js.map +1 -1
- package/lib/state/specs/index.js.map +1 -1
- package/lib/state/specs/sagas.js.map +1 -1
- package/lib/state/specs/selectors.js.map +1 -1
- package/lib/state/specs/slice.js +3 -6
- package/lib/state/specs/slice.js.map +1 -1
- package/lib/state/store.js +5 -6
- package/lib/state/store.js.map +1 -1
- package/lib/test-data/declarations.js +1 -2
- package/lib/test-data/declarations.js.map +1 -1
- package/lib/test-data/examples.js +1 -2
- package/lib/test-data/examples.js.map +1 -1
- package/lib/test-data/index.js.map +1 -1
- package/lib/test-data/sdkLanguages.js +2 -4
- package/lib/test-data/sdkLanguages.js.map +1 -1
- package/lib/test-data/specs.js +8 -12
- package/lib/test-data/specs.js.map +1 -1
- package/lib/test-utils/index.js.map +1 -1
- package/lib/test-utils/lodes.d.ts +1 -1
- package/lib/test-utils/lodes.js.map +1 -1
- package/lib/test-utils/redux.d.ts +6 -5
- package/lib/test-utils/redux.js +7 -10
- package/lib/test-utils/redux.js.map +1 -1
- package/lib/test-utils/router.d.ts +3 -2
- package/lib/test-utils/router.js +1 -2
- package/lib/test-utils/router.js.map +1 -1
- package/lib/utils/adaptorUtils.d.ts +3 -3
- package/lib/utils/adaptorUtils.js +3 -6
- package/lib/utils/adaptorUtils.js.map +1 -1
- package/lib/utils/apixAdaptor.js.map +1 -1
- package/lib/utils/highlight.d.ts +2 -2
- package/lib/utils/highlight.js.map +1 -1
- package/lib/utils/hooks/globalStoreSync.js.map +1 -1
- package/lib/utils/hooks/index.js.map +1 -1
- package/lib/utils/hooks/navigation.d.ts +1 -1
- package/lib/utils/hooks/navigation.js +2 -1
- package/lib/utils/hooks/navigation.js.map +1 -1
- package/lib/utils/hooks/useQuery.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/lodeUtils.d.ts +1 -1
- package/lib/utils/lodeUtils.js +2 -4
- package/lib/utils/lodeUtils.js.map +1 -1
- package/lib/utils/path.d.ts +2 -2
- package/lib/utils/path.js +5 -9
- package/lib/utils/path.js.map +1 -1
- package/lib/utils/sdkLanguage.js +5 -6
- package/lib/utils/sdkLanguage.js.map +1 -1
- package/lib/utils/useWindowSize.js.map +1 -1
- package/package.json +38 -38
- package/src/ApiExplorer.tsx +72 -72
- package/src/App.tsx +9 -9
- package/src/StandaloneApiExplorer.tsx +24 -24
- package/src/components/Banner/Banner.spec.tsx +27 -25
- package/src/components/Banner/Banner.tsx +20 -20
- package/src/components/Banner/index.ts +1 -1
- package/src/components/DocActivityType/DocActivityType.spec.tsx +17 -16
- package/src/components/DocActivityType/DocActivityType.tsx +6 -6
- package/src/components/DocActivityType/index.ts +1 -1
- package/src/components/DocCode/DocCode.tsx +16 -14
- package/src/components/DocCode/index.ts +1 -1
- package/src/components/DocMarkdown/DocMarkdown.spec.tsx +41 -41
- package/src/components/DocMarkdown/DocMarkdown.tsx +19 -19
- package/src/components/DocMarkdown/index.ts +1 -1
- package/src/components/DocMarkdown/utils.spec.ts +26 -26
- package/src/components/DocMarkdown/utils.ts +4 -4
- package/src/components/DocMethodSummary/DocMethodSummary.spec.tsx +18 -17
- package/src/components/DocMethodSummary/DocMethodSummary.tsx +9 -9
- package/src/components/DocMethodSummary/DocSummaryStatus.spec.tsx +12 -12
- package/src/components/DocMethodSummary/DocSummaryStatus.tsx +6 -6
- package/src/components/DocMethodSummary/index.tsx +3 -3
- package/src/components/DocMethodSummary/utils.spec.tsx +5 -5
- package/src/components/DocMethodSummary/utils.tsx +23 -23
- package/src/components/DocPseudo/DocParam.spec.tsx +22 -22
- package/src/components/DocPseudo/DocParam.tsx +7 -7
- package/src/components/DocPseudo/DocParams.spec.tsx +27 -27
- package/src/components/DocPseudo/DocParams.tsx +6 -6
- package/src/components/DocPseudo/DocPrimaryResponse.spec.tsx +16 -16
- package/src/components/DocPseudo/DocPrimaryResponse.tsx +6 -6
- package/src/components/DocPseudo/DocPseudo.spec.tsx +15 -13
- package/src/components/DocPseudo/DocPseudo.tsx +11 -11
- package/src/components/DocPseudo/index.tsx +1 -1
- package/src/components/DocRateLimited/DocRateLimited.spec.tsx +16 -16
- package/src/components/DocRateLimited/DocRateLimited.tsx +6 -6
- package/src/components/DocRateLimited/index.ts +1 -1
- package/src/components/DocReferences/DocReferences.spec.tsx +29 -26
- package/src/components/DocReferences/DocReferences.tsx +16 -16
- package/src/components/DocReferences/index.ts +1 -1
- package/src/components/DocReferences/utils.spec.tsx +2 -2
- package/src/components/DocReferences/utils.tsx +8 -8
- package/src/components/DocSDKs/DocDeclarations.tsx +7 -7
- package/src/components/DocSDKs/DocSDKs.spec.tsx +22 -22
- package/src/components/DocSDKs/DocSDKs.tsx +36 -36
- package/src/components/DocSDKs/index.ts +1 -1
- package/src/components/DocSDKs/utils.spec.ts +8 -8
- package/src/components/DocSDKs/utils.ts +6 -6
- package/src/components/DocSchema/DocSchema.tsx +9 -9
- package/src/components/DocSchema/index.ts +1 -1
- package/src/components/DocSdkUsage/DocSdkExampleCell.tsx +5 -5
- package/src/components/DocSdkUsage/DocSdkUsage.spec.tsx +22 -22
- package/src/components/DocSdkUsage/DocSdkUsage.tsx +35 -34
- package/src/components/DocSdkUsage/index.ts +1 -1
- package/src/components/DocSdkUsage/utils.ts +29 -30
- package/src/components/DocSource/DocSource.spec.tsx +33 -37
- package/src/components/DocSource/DocSource.tsx +17 -17
- package/src/components/DocSource/index.ts +1 -1
- package/src/components/DocStatus/DocStatus.spec.tsx +12 -12
- package/src/components/DocStatus/DocStatus.tsx +8 -8
- package/src/components/DocStatus/index.ts +1 -1
- package/src/components/DocTitle/DocTitle.spec.tsx +9 -9
- package/src/components/DocTitle/DocTitle.tsx +4 -4
- package/src/components/DocTitle/index.ts +1 -1
- package/src/components/DocTypeSummary/DocTypeSummary.spec.tsx +11 -11
- package/src/components/DocTypeSummary/DocTypeSummary.tsx +11 -11
- package/src/components/DocTypeSummary/index.tsx +1 -1
- package/src/components/ErrorBoundary/ErrorBoundary.spec.tsx +29 -29
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +16 -16
- package/src/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.spec.tsx +17 -17
- package/src/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.tsx +11 -11
- package/src/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.tsx +4 -4
- package/src/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/index.ts +1 -1
- package/src/components/ErrorBoundary/components/SomethingWentWrong/components/index.ts +1 -1
- package/src/components/ErrorBoundary/components/SomethingWentWrong/index.ts +2 -2
- package/src/components/ErrorBoundary/index.ts +1 -1
- package/src/components/ExploreType/ExploreProperty.spec.tsx +60 -58
- package/src/components/ExploreType/ExploreProperty.tsx +53 -53
- package/src/components/ExploreType/ExploreType.spec.tsx +41 -39
- package/src/components/ExploreType/ExploreType.tsx +33 -33
- package/src/components/ExploreType/exploreUtils.spec.tsx +38 -38
- package/src/components/ExploreType/exploreUtils.tsx +44 -44
- package/src/components/ExploreType/index.ts +3 -3
- package/src/components/Header/Header.spec.tsx +38 -44
- package/src/components/Header/Header.tsx +18 -18
- package/src/components/Header/index.ts +1 -1
- package/src/components/Link/Link.tsx +3 -3
- package/src/components/Link/index.ts +1 -1
- package/src/components/SelectorContainer/ApiSpecSelector.spec.tsx +31 -31
- package/src/components/SelectorContainer/ApiSpecSelector.tsx +18 -18
- package/src/components/SelectorContainer/SdkLanguageSelector.spec.tsx +42 -42
- package/src/components/SelectorContainer/SdkLanguageSelector.tsx +19 -19
- package/src/components/SelectorContainer/SelectorContainer.spec.tsx +31 -39
- package/src/components/SelectorContainer/SelectorContainer.tsx +15 -15
- package/src/components/SelectorContainer/index.ts +1 -1
- package/src/components/SelectorContainer/utils.ts +10 -10
- package/src/components/SideNav/SearchMessage.tsx +7 -7
- package/src/components/SideNav/SideNav.spec.tsx +70 -70
- package/src/components/SideNav/SideNav.tsx +77 -83
- package/src/components/SideNav/SideNavMethodTags.spec.tsx +35 -35
- package/src/components/SideNav/SideNavMethodTags.tsx +9 -9
- package/src/components/SideNav/SideNavMethods.spec.tsx +52 -52
- package/src/components/SideNav/SideNavMethods.tsx +28 -28
- package/src/components/SideNav/SideNavTypeTags.spec.tsx +36 -36
- package/src/components/SideNav/SideNavTypeTags.tsx +9 -9
- package/src/components/SideNav/SideNavTypes.spec.tsx +36 -36
- package/src/components/SideNav/SideNavTypes.tsx +28 -28
- package/src/components/SideNav/index.ts +1 -1
- package/src/components/SideNav/searchUtils.ts +16 -16
- package/src/components/common/Loader.tsx +7 -7
- package/src/components/common/common.tsx +13 -13
- package/src/components/common/index.ts +2 -2
- package/src/components/index.ts +22 -22
- package/src/custom.d.ts +2 -2
- package/src/index.ts +5 -5
- package/src/routes/AppRouter.tsx +11 -11
- package/src/routes/index.ts +1 -1
- package/src/scenes/DiffScene/DiffScene.tsx +54 -54
- package/src/scenes/DiffScene/DocDiff/DiffBanner.tsx +8 -8
- package/src/scenes/DiffScene/DocDiff/DiffItem.spec.tsx +26 -26
- package/src/scenes/DiffScene/DocDiff/DiffItem.tsx +47 -47
- package/src/scenes/DiffScene/DocDiff/DiffLegend.tsx +10 -10
- package/src/scenes/DiffScene/DocDiff/DocDiff.spec.tsx +62 -66
- package/src/scenes/DiffScene/DocDiff/DocDiff.tsx +18 -18
- package/src/scenes/DiffScene/DocDiff/docDiffUtils.tsx +23 -23
- package/src/scenes/DiffScene/DocDiff/index.ts +1 -1
- package/src/scenes/DiffScene/diffUtils.spec.ts +11 -11
- package/src/scenes/DiffScene/diffUtils.ts +26 -26
- package/src/scenes/DiffScene/index.ts +1 -1
- package/src/scenes/ErrorDetailScene/ErrorDetailScene.tsx +25 -25
- package/src/scenes/ErrorDetailScene/index.ts +1 -1
- package/src/scenes/HomeScene/HomeScene.tsx +12 -12
- package/src/scenes/HomeScene/index.ts +1 -1
- package/src/scenes/MethodScene/MethodScene.tsx +54 -54
- package/src/scenes/MethodScene/components/DocOperation.spec.tsx +17 -17
- package/src/scenes/MethodScene/components/DocOperation.tsx +8 -8
- package/src/scenes/MethodScene/components/DocRequestBody.spec.tsx +14 -14
- package/src/scenes/MethodScene/components/DocRequestBody.tsx +12 -12
- package/src/scenes/MethodScene/components/DocResponses/DocResponseTypes.tsx +15 -15
- package/src/scenes/MethodScene/components/DocResponses/DocResponses.spec.tsx +51 -51
- package/src/scenes/MethodScene/components/DocResponses/DocResponses.tsx +34 -34
- package/src/scenes/MethodScene/components/DocResponses/index.ts +1 -1
- package/src/scenes/MethodScene/components/DocResponses/utils.spec.ts +19 -14
- package/src/scenes/MethodScene/components/DocResponses/utils.ts +8 -8
- package/src/scenes/MethodScene/components/index.ts +3 -3
- package/src/scenes/MethodScene/index.ts +1 -1
- package/src/scenes/MethodTagScene/MethodTagScene.spec.tsx +31 -31
- package/src/scenes/MethodTagScene/MethodTagScene.tsx +44 -39
- package/src/scenes/MethodTagScene/index.ts +1 -1
- package/src/scenes/MethodTagScene/utils.spec.ts +6 -6
- package/src/scenes/MethodTagScene/utils.ts +6 -6
- package/src/scenes/TypeScene/TypeScene.tsx +25 -25
- package/src/scenes/TypeScene/index.ts +1 -1
- package/src/scenes/TypeTagScene/TypeTagScene.spec.tsx +34 -32
- package/src/scenes/TypeTagScene/TypeTagScene.tsx +40 -38
- package/src/scenes/TypeTagScene/index.ts +1 -1
- package/src/scenes/TypeTagScene/utils.spec.ts +6 -6
- package/src/scenes/TypeTagScene/utils.ts +6 -6
- package/src/scenes/index.ts +6 -6
- package/src/scenes/utils/hooks/index.ts +1 -1
- package/src/scenes/utils/hooks/tagStoreSync.spec.ts +37 -37
- package/src/scenes/utils/hooks/tagStoreSync.ts +18 -18
- package/src/scenes/utils/index.ts +1 -1
- package/src/state/index.ts +4 -4
- package/src/state/lodes/index.ts +2 -2
- package/src/state/lodes/sagas.spec.ts +32 -32
- package/src/state/lodes/sagas.ts +11 -11
- package/src/state/lodes/selectors.spec.ts +10 -10
- package/src/state/lodes/selectors.ts +4 -4
- package/src/state/lodes/slice.ts +18 -18
- package/src/state/settings/index.ts +2 -2
- package/src/state/settings/sagas.spec.ts +49 -49
- package/src/state/settings/sagas.ts +18 -18
- package/src/state/settings/selectors.spec.ts +11 -11
- package/src/state/settings/selectors.ts +7 -7
- package/src/state/settings/slice.ts +28 -28
- package/src/state/specs/index.ts +2 -2
- package/src/state/specs/sagas.spec.ts +60 -60
- package/src/state/specs/sagas.ts +27 -27
- package/src/state/specs/selectors.ts +7 -7
- package/src/state/specs/slice.ts +36 -36
- package/src/state/store.ts +24 -24
- package/src/test-data/declarations.ts +2 -2
- package/src/test-data/examples.ts +1 -1
- package/src/test-data/index.ts +4 -4
- package/src/test-data/sdkLanguages.ts +2 -2
- package/src/test-data/specs.ts +13 -13
- package/src/test-utils/index.ts +3 -3
- package/src/test-utils/lodes.tsx +9 -9
- package/src/test-utils/redux.tsx +30 -26
- package/src/test-utils/router.tsx +8 -8
- package/src/utils/adaptorUtils.ts +55 -55
- package/src/utils/apixAdaptor.ts +31 -25
- package/src/utils/highlight.spec.tsx +13 -13
- package/src/utils/highlight.tsx +11 -11
- package/src/utils/hooks/globalStoreSync.spec.tsx +54 -54
- package/src/utils/hooks/globalStoreSync.ts +21 -21
- package/src/utils/hooks/index.ts +3 -3
- package/src/utils/hooks/navigation.spec.ts +47 -45
- package/src/utils/hooks/navigation.ts +33 -30
- package/src/utils/hooks/useQuery.ts +5 -5
- package/src/utils/index.ts +8 -8
- package/src/utils/lodeUtils.ts +17 -17
- package/src/utils/path.spec.ts +57 -55
- package/src/utils/path.ts +42 -42
- package/src/utils/sdkLanguage.spec.ts +24 -24
- package/src/utils/sdkLanguage.ts +15 -14
- package/src/utils/useWindowSize.tsx +8 -8
- package/webpack.dev.config.js +5 -5
- package/webpack.prod.config.js +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useQuery.js","names":["_react","require","_reactRouterDom","useQuery","search","useLocation","useMemo","URLSearchParams","exports"],"sources":["../../../src/utils/hooks/useQuery.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { useMemo } from 'react'
|
|
1
|
+
{"version":3,"file":"useQuery.js","names":["_react","require","_reactRouterDom","useQuery","search","useLocation","useMemo","URLSearchParams","exports"],"sources":["../../../src/utils/hooks/useQuery.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { useMemo } from 'react';\nimport { useLocation } from 'react-router-dom';\n\n/**\n * Hook for retrieving query params\n */\nexport const useQuery = () => {\n const { search } = useLocation();\n\n return useMemo(() => new URLSearchParams(search), [search]);\n};\n"],"mappings":";;;;;;AAyBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAKO,IAAME,QAAQ,GAAGA,CAAA,KAAM;EAC5B,IAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,2BAAW,EAAC,CAAC;EAEhC,OAAO,IAAAC,cAAO,EAAC,MAAM,IAAIC,eAAe,CAACH,MAAM,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;AAC7D,CAAC;AAACI,OAAA,CAAAL,QAAA,GAAAA,QAAA"}
|
package/lib/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_highlight","require","_path","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_sdkLanguage","_lodeUtils","_useWindowSize","_apixAdaptor","_adaptorUtils","_hooks"],"sources":["../../src/utils/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 { highlightHTML } from './highlight'
|
|
1
|
+
{"version":3,"file":"index.js","names":["_highlight","require","_path","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_sdkLanguage","_lodeUtils","_useWindowSize","_apixAdaptor","_adaptorUtils","_hooks"],"sources":["../../src/utils/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 { highlightHTML } from './highlight';\nexport * from './path';\nexport * from './sdkLanguage';\nexport { getLoded } from './lodeUtils';\nexport { useWindowSize } from './useWindowSize';\nexport * from './apixAdaptor';\nexport * from './adaptorUtils';\nexport { useNavigation, useGlobalStoreSync, useQuery } from './hooks';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,KAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,KAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAZ,KAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,YAAA,GAAAd,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAW,YAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,YAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD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
|
|
6
6
|
}
|
|
7
|
-
export declare const getLoded: (examplesLodeUrl?: string
|
|
7
|
+
export declare const getLoded: (examplesLodeUrl?: string, declarationsLodeUrl?: string) => Promise<FullLode>;
|
|
8
8
|
export {};
|
package/lib/utils/lodeUtils.js
CHANGED
|
@@ -6,8 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getLoded = exports.apixFilesHost = void 0;
|
|
7
7
|
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); } }
|
|
8
8
|
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); }); }; }
|
|
9
|
-
var apixFilesHost = 'http://localhost:30000';
|
|
10
|
-
exports.apixFilesHost = apixFilesHost;
|
|
9
|
+
var apixFilesHost = exports.apixFilesHost = 'http://localhost:30000';
|
|
11
10
|
var fetchLode = function () {
|
|
12
11
|
var _ref = _asyncToGenerator(function* (lodeUrl) {
|
|
13
12
|
try {
|
|
@@ -23,7 +22,7 @@ var fetchLode = function () {
|
|
|
23
22
|
return _ref.apply(this, arguments);
|
|
24
23
|
};
|
|
25
24
|
}();
|
|
26
|
-
var getLoded = function () {
|
|
25
|
+
var getLoded = exports.getLoded = function () {
|
|
27
26
|
var _ref2 = _asyncToGenerator(function* (examplesLodeUrl, declarationsLodeUrl) {
|
|
28
27
|
var examples = yield fetchLode("".concat(apixFilesHost, "/examplesIndex.json"));
|
|
29
28
|
if (!examples && examplesLodeUrl) {
|
|
@@ -49,5 +48,4 @@ var getLoded = function () {
|
|
|
49
48
|
return _ref2.apply(this, arguments);
|
|
50
49
|
};
|
|
51
50
|
}();
|
|
52
|
-
exports.getLoded = getLoded;
|
|
53
51
|
//# sourceMappingURL=lodeUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lodeUtils.js","names":["apixFilesHost","exports","fetchLode","_ref","_asyncToGenerator","lodeUrl","result","fetch","mode","text","error","_x","apply","arguments","getLoded","_ref2","examplesLodeUrl","declarationsLodeUrl","examples","concat","declarations","lode","undefined","JSON","parse","_x2","_x3"],"sources":["../../src/utils/lodeUtils.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { IDeclarationMine, IExampleMine } from '@looker/sdk-codegen'
|
|
1
|
+
{"version":3,"file":"lodeUtils.js","names":["apixFilesHost","exports","fetchLode","_ref","_asyncToGenerator","lodeUrl","result","fetch","mode","text","error","_x","apply","arguments","getLoded","_ref2","examplesLodeUrl","declarationsLodeUrl","examples","concat","declarations","lode","undefined","JSON","parse","_x2","_x3"],"sources":["../../src/utils/lodeUtils.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { IDeclarationMine, IExampleMine } from '@looker/sdk-codegen';\n\nexport const apixFilesHost = 'http://localhost:30000';\n\nconst fetchLode = async (lodeUrl: string) => {\n try {\n const result = await fetch(lodeUrl, { mode: 'cors' });\n return result.text();\n } catch (error) {\n return '';\n }\n};\n\ninterface FullLode {\n examples?: IExampleMine;\n declarations?: IDeclarationMine;\n}\n\nexport const getLoded = async (\n examplesLodeUrl?: string,\n declarationsLodeUrl?: string\n): Promise<FullLode> => {\n // First try to load from the apix-files server\n let examples = await fetchLode(`${apixFilesHost}/examplesIndex.json`);\n if (!examples && examplesLodeUrl) {\n examples = await fetchLode(examplesLodeUrl);\n }\n\n let declarations;\n if (declarationsLodeUrl) {\n declarations = await fetchLode(declarationsLodeUrl);\n }\n\n const lode: FullLode = { examples: undefined, declarations: undefined };\n if (examples) {\n lode.examples = JSON.parse(examples);\n }\n if (decl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gBAvBYP,QAAQA,CAAAW,GAAA,EAAAC,GAAA;IAAA,OAAAX,KAAA,CAAAH,KAAA,OAAAC,SAAA;EAAA;AAAA,GAuBpB"}
|
package/lib/utils/path.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import type { ApiModel, IMethod, IType } from '@looker/sdk-codegen';
|
|
|
2
2
|
import type { Location as HLocation } from 'history';
|
|
3
3
|
export declare const methodFilterOptions: RegExp;
|
|
4
4
|
export declare const typeFilterOptions: RegExp;
|
|
5
|
-
export declare const buildMethodPath: (specKey: string, tag: string, methodName: string, params?: string
|
|
6
|
-
export declare const buildTypePath: (specKey: string, tag: string, typeName: string, params?: string
|
|
5
|
+
export declare const buildMethodPath: (specKey: string, tag: string, methodName: string, params?: string) => string;
|
|
6
|
+
export declare const buildTypePath: (specKey: string, tag: string, typeName: string, params?: string) => string;
|
|
7
7
|
export declare const diffPath = "diff";
|
|
8
8
|
export declare const oAuthPath = "oauth";
|
|
9
9
|
export declare const isMethod: (item: IMethod | IType) => boolean;
|
package/lib/utils/path.js
CHANGED
|
@@ -6,21 +6,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.typeFilterOptions = exports.oAuthPath = exports.methodFilterOptions = exports.isValidFilter = exports.isMethod = exports.getSpecKey = exports.getSceneType = exports.diffPath = exports.buildTypePath = exports.buildPath = exports.buildMethodPath = void 0;
|
|
7
7
|
var _sdkCodegen = require("@looker/sdk-codegen");
|
|
8
8
|
var _reactRouter = require("react-router");
|
|
9
|
-
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(
|
|
9
|
+
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = new RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != typeof e[e.length - 1] && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
|
|
10
10
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
11
11
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12
|
-
var methodFilterOptions = /GET$|POST$|PUT$|PATCH$|DELETE$/i;
|
|
13
|
-
exports.
|
|
14
|
-
var typeFilterOptions = /SPECIFICATION$|WRITE$|REQUEST$|ENUMERATED$/i;
|
|
15
|
-
exports.typeFilterOptions = typeFilterOptions;
|
|
12
|
+
var methodFilterOptions = exports.methodFilterOptions = /GET$|POST$|PUT$|PATCH$|DELETE$/i;
|
|
13
|
+
var typeFilterOptions = exports.typeFilterOptions = /SPECIFICATION$|WRITE$|REQUEST$|ENUMERATED$/i;
|
|
16
14
|
var buildMethodPath = (specKey, tag, methodName, params) => "/".concat(specKey, "/methods/").concat(tag, "/").concat(methodName).concat(params ? "?".concat(params) : '');
|
|
17
15
|
exports.buildMethodPath = buildMethodPath;
|
|
18
16
|
var buildTypePath = (specKey, tag, typeName, params) => "/".concat(specKey, "/types/").concat(tag, "/").concat(typeName).concat(params ? "?".concat(params) : '');
|
|
19
17
|
exports.buildTypePath = buildTypePath;
|
|
20
|
-
var diffPath = 'diff';
|
|
21
|
-
exports.
|
|
22
|
-
var oAuthPath = 'oauth';
|
|
23
|
-
exports.oAuthPath = oAuthPath;
|
|
18
|
+
var diffPath = exports.diffPath = 'diff';
|
|
19
|
+
var oAuthPath = exports.oAuthPath = 'oauth';
|
|
24
20
|
var getMethodTag = (api, methodName) => {
|
|
25
21
|
return Object.entries(api.tags).filter(_ref => {
|
|
26
22
|
var [, methods] = _ref;
|
package/lib/utils/path.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path.js","names":["_sdkCodegen","require","_reactRouter","_wrapRegExp","re","groups","BabelRegExp","_super","RegExp","prototype","_groups","WeakMap","flags","_this","set","get","_setPrototypeOf","buildGroups","result","g","Object","keys","reduce","name","i","k","length","create","_inherits","exec","str","call","indices","Symbol","replace","substitution","_","group","Array","isArray","join","args","arguments","slice","push","apply","subClass","superClass","TypeError","constructor","value","writable","configurable","defineProperty","o","p","setPrototypeOf","bind","__proto__","methodFilterOptions","exports","typeFilterOptions","buildMethodPath","specKey","tag","methodName","params","concat","buildTypePath","typeName","diffPath","oAuthPath","getMethodTag","api","entries","tags","filter","_ref","methods","map","_ref2","methodTag","isMethod","item","getTypeTag","type","method","firstMethodRef","buildPath","path","getSpecKey","location","_match","_match$groups","pathname","match","startsWith","pattern","getSceneType","matchPath","tagType","isValidFilter","isValid","sceneType","localeCompare","sensitivity","test"],"sources":["../../src/utils/path.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { ApiModel, IMethod, IType } from '@looker/sdk-codegen'\nimport { firstMethodRef } from '@looker/sdk-codegen'\nimport type { Location as HLocation } from 'history'\nimport { matchPath } from 'react-router'\n\nexport const methodFilterOptions = /GET$|POST$|PUT$|PATCH$|DELETE$/i\nexport const typeFilterOptions = /SPECIFICATION$|WRITE$|REQUEST$|ENUMERATED$/i\n\n/**\n * Builds a path matching the route used by MethodScene\n * @param specKey A string to identify the spec in the URL\n * @param tag Corresponding method tag\n * @param methodName A method name\n * @param params Hash of query param name/value pairs to include in the destination url\n * @returns a Method path\n */\nexport const buildMethodPath = (\n specKey: string,\n tag: string,\n methodName: string,\n params?: string\n) => `/${specKey}/methods/${tag}/${methodName}${params ? `?${params}` : ''}`\n\n/**\n * Builds a path matching the route used by TypeScene\n * @param specKey A string to identify the spec in the URL\n * @param tag Corresponding type tag\n * @param typeName A type name\n * @param params Hash of query param name/value pairs to include in the destination url\n * @returns a Type path\n */\nexport const buildTypePath = (\n specKey: string,\n tag: string,\n typeName: string,\n params?: string\n) => `/${specKey}/types/${tag}/${typeName}${params ? `?${params}` : ''}`\n\nexport const diffPath = 'diff'\nexport const oAuthPath = 'oauth'\n\n/**\n * Returns the tag for a given method name\n * @param api Parsed api\n * @param methodName SDK method name\n * @returns Corresponding tag\n */\nconst getMethodTag = (api: ApiModel, methodName: string) => {\n // Find tag containing methodName\n return Object.entries(api.tags)\n .filter(([, methods]) => methodName in methods)\n .map(([methodTag]) => methodTag)[0]\n}\n\n/**\n * Is this item a method? Check without requiring `instanceof Method`\n * @param item to check for method or type\n */\nexport const isMethod = (item: IMethod | IType) => 'params' in item\n\n/**\n * Return the tag for a give type\n * @param api Parsed api\n * @param type to tag\n */\nconst getTypeTag = (api: ApiModel, type: IType) => {\n const method = firstMethodRef(api, type)\n return getMethodTag(api, method.name)\n}\n\n/**\n * Builds a path matching MethodScene or TypeScene route\n * @param api parsed api\n * @param item A method or type item\n * @param specKey A string to identify the spec in the url\n * @returns a method or type path\n */\nexport const buildPath = (\n api: ApiModel,\n item: IMethod | IType,\n specKey: string\n) => {\n let path\n if (isMethod(item)) {\n const tag = getMethodTag(api, item.name)\n path = buildMethodPath(specKey, tag, item.name)\n } else {\n const tag = getTypeTag(api, item as IType)\n path = buildTypePath(specKey, tag, item.name)\n }\n return path\n}\n\n/**\n * Determine API specification keys from URL pattern\n * @param location service to examine\n */\nexport const getSpecKey = (location: HLocation | Location): string | null => {\n const pathname = location.pathname\n let match\n if (pathname.startsWith(`/${diffPath}`)) {\n const pattern = new RegExp(`(?:/${diffPath})/(?<specKey>\\\\w+.\\\\w+)`)\n match = pathname.match(pattern)\n } else {\n match = pathname.match(/\\/(?<specKey>\\w+\\.\\w+).*/)\n }\n const result = match?.groups?.specKey || null\n return result\n}\n\n/**\n * Gets the scene type of the current page\n * @param path path of browser location\n * @returns string representing the scene type\n */\nexport const getSceneType = (path: string) => {\n const match = matchPath<{ tagType: string }>(path, {\n path: '/:specKey/:tagType',\n })\n return match ? match!.params.tagType : ''\n}\n\n/**\n * Confirms if filter is valid for a given method/type tag\n * @param path browser location pathname\n * @param filter filter tag for page\n */\nexport const isValidFilter = (path: string, filter: string) => {\n let isValid\n const sceneType = getSceneType(path)\n if (!sceneType) isValid = false\n else if (!filter.localeCompare('all', 'en', { sensitivity: 'base' }))\n isValid = true\n else if (sceneType === 'methods') {\n isValid = methodFilterOptions.test(filter)\n } else {\n isValid = typeFilterOptions.test(filter)\n }\n return isValid\n}\n"],"mappings":";;;;;;AA2BA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAAwC,SAAAE,YAAA,IAAAA,WAAA,YAAAA,YAAAC,EAAA,EAAAC,MAAA,eAAAC,WAAA,CAAAF,EAAA,UAAAC,MAAA,UAAAE,MAAA,GAAAC,MAAA,CAAAC,SAAA,EAAAC,OAAA,OAAAC,OAAA,aAAAL,YAAAF,EAAA,EAAAQ,KAAA,EAAAP,MAAA,QAAAQ,KAAA,OAAAL,MAAA,CAAAJ,EAAA,EAAAQ,KAAA,UAAAF,OAAA,CAAAI,GAAA,CAAAD,KAAA,EAAAR,MAAA,IAAAK,OAAA,CAAAK,GAAA,CAAAX,EAAA,IAAAY,eAAA,CAAAH,KAAA,EAAAP,WAAA,CAAAG,SAAA,cAAAQ,YAAAC,MAAA,EAAAd,EAAA,QAAAe,CAAA,GAAAT,OAAA,CAAAK,GAAA,CAAAX,EAAA,UAAAgB,MAAA,CAAAC,IAAA,CAAAF,CAAA,EAAAG,MAAA,WAAAjB,MAAA,EAAAkB,IAAA,QAAAC,CAAA,GAAAL,CAAA,CAAAI,IAAA,0BAAAC,CAAA,EAAAnB,MAAA,CAAAkB,IAAA,IAAAL,MAAA,CAAAM,CAAA,kBAAAC,CAAA,iBAAAP,MAAA,CAAAM,CAAA,CAAAC,CAAA,MAAAA,CAAA,OAAAD,CAAA,CAAAE,MAAA,GAAAD,CAAA,IAAApB,MAAA,CAAAkB,IAAA,IAAAL,MAAA,CAAAM,CA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AMG,aAAa,GAAGA,CAACZ,IAAY,EAAEb,MAAc,KAAK;EAC7D,IAAI0B,OAAO;EACX,IAAMC,SAAS,GAAGL,YAAY,CAACT,IAAI,CAAC;EACpC,IAAI,CAACc,SAAS,EAAED,OAAO,GAAG,KAAK,MAC1B,IAAI,CAAC1B,MAAM,CAAC4B,aAAa,CAAC,KAAK,EAAE,IAAI,EAAE;IAAEC,WAAW,EAAE;EAAO,CAAC,CAAC,EAClEH,OAAO,GAAG,IAAI,MACX,IAAIC,SAAS,KAAK,SAAS,EAAE;IAChCD,OAAO,GAAG3C,mBAAmB,CAAC+C,IAAI,CAAC9B,MAAM,CAAC;EAC5C,CAAC,MAAM;IACL0B,OAAO,GAAGzC,iBAAiB,CAAC6C,IAAI,CAAC9B,MAAM,CAAC;EAC1C;EACA,OAAO0B,OAAO;AAChB,CAAC;AAAA1C,OAAA,CAAAyC,aAAA,GAAAA,aAAA"}
|
|
1
|
+
{"version":3,"file":"path.js","names":["_sdkCodegen","require","_reactRouter","_wrapRegExp","e","r","BabelRegExp","RegExp","prototype","WeakMap","t","p","o","set","get","_setPrototypeOf","buildGroups","Object","keys","reduce","i","length","create","_inherits","exec","call","groups","indices","Symbol","replace","Array","isArray","join","arguments","slice","push","apply","subClass","superClass","TypeError","constructor","value","writable","configurable","defineProperty","setPrototypeOf","bind","__proto__","methodFilterOptions","exports","typeFilterOptions","buildMethodPath","specKey","tag","methodName","params","concat","buildTypePath","typeName","diffPath","oAuthPath","getMethodTag","api","entries","tags","filter","_ref","methods","map","_ref2","methodTag","isMethod","item","getTypeTag","type","method","firstMethodRef","name","buildPath","path","getSpecKey","location","_match","_match$groups","pathname","match","startsWith","pattern","result","getSceneType","matchPath","tagType","isValidFilter","isValid","sceneType","localeCompare","sensitivity","test"],"sources":["../../src/utils/path.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { ApiModel, IMethod, IType } from '@looker/sdk-codegen';\nimport { firstMethodRef } from '@looker/sdk-codegen';\nimport type { Location as HLocation } from 'history';\nimport { matchPath } from 'react-router';\n\nexport const methodFilterOptions = /GET$|POST$|PUT$|PATCH$|DELETE$/i;\nexport const typeFilterOptions = /SPECIFICATION$|WRITE$|REQUEST$|ENUMERATED$/i;\n\n/**\n * Builds a path matching the route used by MethodScene\n * @param specKey A string to identify the spec in the URL\n * @param tag Corresponding method tag\n * @param methodName A method name\n * @param params Hash of query param name/value pairs to include in the destination url\n * @returns a Method path\n */\nexport const buildMethodPath = (\n specKey: string,\n tag: string,\n methodName: string,\n params?: string\n) => `/${specKey}/methods/${tag}/${methodName}${params ? `?${params}` : ''}`;\n\n/**\n * Builds a path matching the route used by TypeScene\n * @param specKey A string to identify the spec in the URL\n * @param tag Corresponding type tag\n * @param typeName A type name\n * @param params Hash of query param name/value pairs to include in the destination url\n * @returns a Type path\n */\nexport const buildTypePath = (\n specKey: string,\n tag: string,\n typeName: string,\n params?: string\n) => `/${specKey}/types/${tag}/${typeName}${params ? `?${params}` : ''}`;\n\nexport const diffPath = 'diff';\nexport const oAuthPath = 'oauth';\n\n/**\n * Returns the tag for a given method name\n * @param api Parsed api\n * @param methodName SDK method name\n * @returns Corresponding tag\n */\nconst getMethodTag = (api: ApiModel, methodName: string) => {\n // Find tag containing methodName\n return Object.entries(api.tags)\n .filter(([, methods]) => methodName in methods)\n .map(([methodTag]) => methodTag)[0];\n};\n\n/**\n * Is this item a method? Check without requiring `instanceof Method`\n * @param item to check for method or type\n */\nexport const isMethod = (item: IMethod | IType) => 'params' in item;\n\n/**\n * Return the tag for a give type\n * @param api Parsed api\n * @param type to tag\n */\nconst getTypeTag = (api: ApiModel, type: IType) => {\n const method = firstMethodRef(api, type);\n return getMethodTag(api, method.name);\n};\n\n/**\n * Builds a path matching MethodScene or TypeScene route\n * @param api parsed api\n * @param item A method or type item\n * @param specKey A string to identify the spec in the url\n * @returns a method or type path\n */\nexport const buildPath = (\n api: ApiModel,\n item: IMethod | IType,\n specKey: string\n) => {\n let path;\n if (isMethod(item)) {\n const tag = getMethodTag(api, item.name);\n path = buildMethodPath(specKey, tag, item.name);\n } else {\n const tag = getTypeTag(api, item as IType);\n path = buildTypePath(specKey, tag, item.name);\n }\n return path;\n};\n\n/**\n * Determine API specification keys from URL pattern\n * @param location service to examine\n */\nexport const getSpecKey = (location: HLocation | Location): string | null => {\n const pathname = location.pathname;\n let match;\n if (pathname.startsWith(`/${diffPath}`)) {\n const pattern = new RegExp(`(?:/${diffPath})/(?<specKey>\\\\w+.\\\\w+)`);\n match = pathname.match(pattern);\n } else {\n match = pathname.match(/\\/(?<specKey>\\w+\\.\\w+).*/);\n }\n const result = match?.groups?.specKey || null;\n return result;\n};\n\n/**\n * Gets the scene type of the current page\n * @param path path of browser location\n * @returns string representing the scene type\n */\nexport const getSceneType = (path: string) => {\n const match = matchPath<{ tagType: string }>(path, {\n path: '/:specKey/:tagType',\n });\n return match ? match!.params.tagType : '';\n};\n\n/**\n * Confirms if filter is valid for a given method/type tag\n * @param path browser location pathname\n * @param filter filter tag for page\n */\nexport const isValidFilter = (path: string, filter: string) => {\n let isValid;\n const sceneType = getSceneType(path);\n if (!sceneType) isValid = false;\n else if (!filter.localeCompare('all', 'en', { sensitivity: 'base' }))\n isValid = true;\n else if (sceneType === 'methods') {\n isValid = methodFilterOptions.test(filter);\n } else {\n isValid = typeFilterOptions.test(filter);\n }\n return isValid;\n};\n"],"mappings":";;;;;;AA2BA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAAyC,SAAAE,YAAA,IAAAA,WAAA,YAAAA,YAAAC,CAAA,EAAAC,CAAA,eAAAC,WAAA,CAAAF,CAAA,UAAAC,CAAA,UAAAD,CAAA,GAAAG,MAAA,CAAAC,SAAA,EAAAH,CAAA,OAAAI,OAAA,aAAAH,YAAAF,CAAA,EAAAM,CAAA,EAAAC,CAAA,QAAAC,CAAA,OAAAL,MAAA,CAAAH,CAAA,EAAAM,CAAA,UAAAL,CAAA,CAAAQ,GAAA,CAAAD,CAAA,EAAAD,CAAA,IAAAN,CAAA,CAAAS,GAAA,CAAAV,CAAA,IAAAW,eAAA,CAAAH,CAAA,EAAAN,WAAA,CAAAE,SAAA,cAAAQ,YAAAZ,CAAA,EAAAM,CAAA,QAAAC,CAAA,GAAAN,CAAA,CAAAS,GAAA,CAAAJ,CAAA,UAAAO,MAAA,CAAAC,IAAA,CAAAP,CAAA,EAAAQ,MAAA,WAAAd,CAAA,EAAAK,CAAA,QAAAE,CAAA,GAAAD,CAAA,CAAAD,CAAA,0BAAAE,CAAA,EAAAP,CAAA,CAAAK,CAAA,IAAAN,CAAA,CAAAQ,CAAA,kBAAAQ,CAAA,iBAAAhB,CAAA,CAAAQ,CAAA,CAAAQ,CAAA,MAAAA,CAAA,OAAAR,CAAA,CAAAS,MAAA,GAAAD,CAAA,IAAAf,CAAA,CAAAK,CAAA,IAAAN,CAAA,CAAAQ,CAAA,CAAAQ,CAAA,aAAAf,CA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L,YAAY,CAACV,IAAI,CAAC;EACpC,IAAI,CAACe,SAAS,EAAED,OAAO,GAAG,KAAK,CAAC,KAC3B,IAAI,CAAC5B,MAAM,CAAC8B,aAAa,CAAC,KAAK,EAAE,IAAI,EAAE;IAAEC,WAAW,EAAE;EAAO,CAAC,CAAC,EAClEH,OAAO,GAAG,IAAI,CAAC,KACZ,IAAIC,SAAS,KAAK,SAAS,EAAE;IAChCD,OAAO,GAAG7C,mBAAmB,CAACiD,IAAI,CAAChC,MAAM,CAAC;EAC5C,CAAC,MAAM;IACL4B,OAAO,GAAG3C,iBAAiB,CAAC+C,IAAI,CAAChC,MAAM,CAAC;EAC1C;EACA,OAAO4B,OAAO;AAChB,CAAC;AAAC5C,OAAA,CAAA2C,aAAA,GAAAA,aAAA"}
|
package/lib/utils/sdkLanguage.js
CHANGED
|
@@ -5,13 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.findSdk = exports.allSdkLanguages = exports.allAlias = void 0;
|
|
7
7
|
var _sdkCodegen = require("@looker/sdk-codegen");
|
|
8
|
-
function ownKeys(
|
|
9
|
-
function _objectSpread(
|
|
8
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
10
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
-
function _toPropertyKey(
|
|
12
|
-
function _toPrimitive(
|
|
13
|
-
var allAlias = 'all';
|
|
14
|
-
exports.allAlias = allAlias;
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
12
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
|
+
var allAlias = exports.allAlias = 'all';
|
|
15
14
|
var allSdkLanguages = () => {
|
|
16
15
|
var languages = {};
|
|
17
16
|
_sdkCodegen.codeGenerators.forEach(gen => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdkLanguage.js","names":["_sdkCodegen","require","ownKeys","
|
|
1
|
+
{"version":3,"file":"sdkLanguage.js","names":["_sdkCodegen","require","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","key","value","_toPropertyKey","configurable","writable","i","_toPrimitive","String","Symbol","toPrimitive","call","TypeError","Number","allAlias","exports","allSdkLanguages","languages","codeGenerators","gen","alias","extension","toString","match","language","findSdk","label","entries","localeCompare","sensitivity"],"sources":["../../src/utils/sdkLanguage.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { ArgValues } from '@looker/sdk-codegen';\nimport { codeGenerators } from '@looker/sdk-codegen';\n\nexport const allAlias = 'all';\n\n/**\n * Gets all supported sdk languages\n * @returns mapping of sdk language aliases to name\n */\nexport const allSdkLanguages = (): Record<string, string> => {\n const languages: ArgValues = {};\n codeGenerators.forEach((gen) => {\n const alias = gen.extension.toString().match(/\\.(\\w+)\\b/)![1];\n languages[alias] = gen.language;\n });\n\n return { ...languages, [allAlias]: 'All' };\n};\n\n/**\n * Searches for sdk language details given label\n * @param label label to search by\n * @returns language name and alias\n */\nexport const findSdk = (label: string) => {\n const languages = allSdkLanguages();\n let match = { alias: allAlias, language: languages[allAlias] };\n for (const [alias, language] of Object.entries(languages)) {\n if (\n !label.localeCompare(alias, 'en', { sensitivity: 'base' }) ||\n !label.localeCompare(language, 'en', { sensitivity: 'base' })\n ) {\n match = { alias, language };\n break;\n }\n }\n return match;\n};\n"],"mappings":";;;;;;AA2BA,IAAAA,WAAA,GAAAC,OAAA;AAAqD,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAA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,KAAK,CAACE,aAAa,CAACJ,QAAQ,EAAE,IAAI,EAAE;MAAEK,WAAW,EAAE;IAAO,CAAC,CAAC,EAC7D;MACAN,KAAK,GAAG;QAAEH,KAAK;QAAEI;MAAS,CAAC;MAC3B;IACF;EACF;EACA,OAAOD,KAAK;AACd,CAAC;AAACR,OAAA,CAAAU,OAAA,GAAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWindowSize.js","names":["_react","require","useWindowSize","windowSize","setWindowSize","useState","width","height","useEffect","handleResize","window","innerWidth","innerHeight","addEventListener","removeEventListener"],"sources":["../../src/utils/useWindowSize.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 { useEffect, useState } from 'react'
|
|
1
|
+
{"version":3,"file":"useWindowSize.js","names":["_react","require","useWindowSize","windowSize","setWindowSize","useState","width","height","useEffect","handleResize","window","innerWidth","innerHeight","addEventListener","removeEventListener"],"sources":["../../src/utils/useWindowSize.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 { useEffect, useState } from 'react';\n// from: https://usehooks.com/useWindowSize/\nexport function useWindowSize() {\n const [windowSize, setWindowSize] = useState({\n width: 0,\n height: 0,\n });\n\n useEffect(() => {\n function handleResize() {\n setWindowSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n }\n window.addEventListener('resize', handleResize);\n handleResize();\n return () => window.removeEventListener('resize', handleResize);\n }, []);\n\n return windowSize;\n}\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,OAAA;AAEO,SAASC,aAAaA,CAAA,EAAG;EAC9B,IAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAG,IAAAC,eAAQ,EAAC;IAC3CC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE;EACV,CAAC,CAAC;EAEF,IAAAC,gBAAS,EAAC,MAAM;IACd,SAASC,YAAYA,CAAA,EAAG;MACtBL,aAAa,CAAC;QACZE,KAAK,EAAEI,MAAM,CAACC,UAAU;QACxBJ,MAAM,EAAEG,MAAM,CAACE;MACjB,CAAC,CAAC;IACJ;IACAF,MAAM,CAACG,gBAAgB,CAAC,QAAQ,EAAEJ,YAAY,CAAC;IAC/CA,YAAY,CAAC,CAAC;IACd,OAAO,MAAMC,MAAM,CAACI,mBAAmB,CAAC,QAAQ,EAAEL,YAAY,CAAC;EACjE,CAAC,EAAE,EAAE,CAAC;EAEN,OAAON,UAAU;AACnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@looker/api-explorer",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.59",
|
|
4
4
|
"description": "Looker API Explorer",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -33,25 +33,25 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@looker/components-test-utils": "^1.5.27",
|
|
36
|
-
"@looker/sdk-codegen-scripts": "
|
|
37
|
-
"@looker/sdk-node": "
|
|
36
|
+
"@looker/sdk-codegen-scripts": "21.5.16",
|
|
37
|
+
"@looker/sdk-node": "24.4.0",
|
|
38
38
|
"@styled-icons/styled-icon": "^10.6.3",
|
|
39
|
-
"@testing-library/jest-dom": "
|
|
40
|
-
"@testing-library/react": "
|
|
41
|
-
"@testing-library/react-hooks": "
|
|
42
|
-
"@testing-library/user-event": "
|
|
39
|
+
"@testing-library/jest-dom": "5.16.5",
|
|
40
|
+
"@testing-library/react": "12.1.5",
|
|
41
|
+
"@testing-library/react-hooks": "8.0.1",
|
|
42
|
+
"@testing-library/user-event": "13.1.5",
|
|
43
43
|
"@types/expect-puppeteer": "^4.4.6",
|
|
44
44
|
"@types/jest-environment-puppeteer": "^4.4.1",
|
|
45
|
-
"@types/lodash": "
|
|
45
|
+
"@types/lodash": "4.14.172",
|
|
46
46
|
"@types/puppeteer": "^5.4.4",
|
|
47
|
-
"@types/react": "
|
|
48
|
-
"@types/react-dom": "^
|
|
49
|
-
"@types/react-router": "
|
|
50
|
-
"@types/react-router-dom": "
|
|
51
|
-
"@types/react-test-renderer": "^
|
|
47
|
+
"@types/react": "17.0.65",
|
|
48
|
+
"@types/react-dom": "^17.0.25",
|
|
49
|
+
"@types/react-router": "5.1.20",
|
|
50
|
+
"@types/react-router-dom": "5.3.3",
|
|
51
|
+
"@types/react-test-renderer": "^17.0.9",
|
|
52
52
|
"@types/redux": "^3.6.0",
|
|
53
|
-
"@types/redux-saga-tester": "^1.0.
|
|
54
|
-
"@types/styled-components": "^5.1.
|
|
53
|
+
"@types/redux-saga-tester": "^1.0.4",
|
|
54
|
+
"@types/styled-components": "^5.1.26",
|
|
55
55
|
"@types/styled-system": "5.1.13",
|
|
56
56
|
"babel-loader": "^8.1.0",
|
|
57
57
|
"css-loader": "^6.7.3",
|
|
@@ -60,42 +60,42 @@
|
|
|
60
60
|
"jest-localstorage-mock": "^2.4.9",
|
|
61
61
|
"jest-puppeteer": "^5.0.4",
|
|
62
62
|
"puppeteer": "^10.1.0",
|
|
63
|
-
"react-test-renderer": "^17.0.
|
|
63
|
+
"react-test-renderer": "^17.0.2",
|
|
64
64
|
"redux-saga-tester": "^1.0.874",
|
|
65
65
|
"style-loader": "^1.1.3",
|
|
66
66
|
"ts-jest": "^29.0.5",
|
|
67
|
-
"webpack-bundle-analyzer": "^4.
|
|
68
|
-
"webpack-cli": "
|
|
69
|
-
"webpack-dev-server": "
|
|
67
|
+
"webpack-bundle-analyzer": "^4.4.1",
|
|
68
|
+
"webpack-cli": "5.0.1",
|
|
69
|
+
"webpack-dev-server": "4.15.1",
|
|
70
70
|
"webpack-merge": "^5.7.3"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@looker/code-editor": "
|
|
74
|
-
"@looker/components": "^4.1.
|
|
73
|
+
"@looker/code-editor": "0.1.30",
|
|
74
|
+
"@looker/components": "^4.1.3",
|
|
75
75
|
"@looker/design-tokens": "^3.1.0",
|
|
76
|
-
"@looker/extension-utils": "
|
|
76
|
+
"@looker/extension-utils": "0.1.36",
|
|
77
77
|
"@looker/icons": "^1.5.21",
|
|
78
78
|
"@looker/redux": "^0.0.1",
|
|
79
|
-
"@looker/run-it": "
|
|
80
|
-
"@looker/sdk": "
|
|
81
|
-
"@looker/sdk-codegen": "
|
|
82
|
-
"@looker/sdk-rtl": "
|
|
83
|
-
"@reduxjs/toolkit": "^1.
|
|
84
|
-
"@styled-icons/material": "^10.
|
|
85
|
-
"@styled-icons/material-outlined": "^10.
|
|
79
|
+
"@looker/run-it": "0.9.59",
|
|
80
|
+
"@looker/sdk": "24.4.0",
|
|
81
|
+
"@looker/sdk-codegen": "21.8.2",
|
|
82
|
+
"@looker/sdk-rtl": "21.6.1",
|
|
83
|
+
"@reduxjs/toolkit": "^1.9.3",
|
|
84
|
+
"@styled-icons/material": "^10.47.0",
|
|
85
|
+
"@styled-icons/material-outlined": "^10.47.0",
|
|
86
86
|
"@styled-icons/material-rounded": "^10.28.0",
|
|
87
87
|
"history": "^4.10.1",
|
|
88
|
-
"lodash": "
|
|
89
|
-
"react": "^
|
|
90
|
-
"react-diff-viewer": "
|
|
91
|
-
"react-dom": "^
|
|
92
|
-
"react-is": "^
|
|
93
|
-
"react-redux": "^7.2.
|
|
88
|
+
"lodash": "4.17.21",
|
|
89
|
+
"react": "^17.0.2",
|
|
90
|
+
"react-diff-viewer": "3.1.1",
|
|
91
|
+
"react-dom": "^17.0.2",
|
|
92
|
+
"react-is": "^17.0.2",
|
|
93
|
+
"react-redux": "^7.2.9",
|
|
94
94
|
"react-router": "^5.3.4",
|
|
95
95
|
"react-router-dom": "^5.3.4",
|
|
96
96
|
"redux": "^4.0.5",
|
|
97
|
-
"styled-components": "^5.
|
|
98
|
-
"typed-redux-saga": "^1.
|
|
97
|
+
"styled-components": "^5.3.1",
|
|
98
|
+
"typed-redux-saga": "^1.5.0"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "ce27df45f0d2cabed1e3c8f7321e95969105edbb"
|
|
101
101
|
}
|