@looker/api-explorer 0.9.18 → 0.9.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +141 -0
- package/e2e/e2e.spec.ts +242 -0
- package/{src/reducers/search/reducer.ts → e2e/helpers.ts} +21 -36
- package/{src/reducers/search/actions.ts → jest-puppeteer.config.js} +17 -15
- package/jest.config.js +2 -0
- package/lib/ApiExplorer.d.ts +8 -11
- package/lib/ApiExplorer.js +93 -71
- package/lib/ApiExplorer.js.map +1 -1
- package/lib/App.d.ts +1 -0
- package/lib/App.js +29 -0
- package/lib/App.js.map +1 -0
- package/lib/StandaloneApiExplorer.d.ts +1 -1
- package/lib/StandaloneApiExplorer.js +46 -25
- package/lib/StandaloneApiExplorer.js.map +1 -1
- package/lib/components/DocActivityType/DocActivityType.d.ts +2 -2
- package/lib/components/DocActivityType/DocActivityType.js.map +1 -1
- package/lib/components/DocCode/DocCode.d.ts +1 -1
- package/lib/components/DocCode/DocCode.js +6 -10
- package/lib/components/DocCode/DocCode.js.map +1 -1
- package/lib/components/DocMarkdown/DocMarkdown.d.ts +1 -1
- package/lib/components/DocMarkdown/DocMarkdown.js +13 -15
- package/lib/components/DocMarkdown/DocMarkdown.js.map +1 -1
- package/lib/components/DocMethodSummary/DocMethodSummary.d.ts +2 -2
- package/lib/components/DocMethodSummary/DocMethodSummary.js +3 -6
- package/lib/components/DocMethodSummary/DocMethodSummary.js.map +1 -1
- package/lib/components/DocMethodSummary/DocSummaryStatus.d.ts +2 -3
- package/lib/components/DocMethodSummary/DocSummaryStatus.js +3 -3
- package/lib/components/DocMethodSummary/DocSummaryStatus.js.map +1 -1
- package/lib/components/DocMethodSummary/index.d.ts +1 -0
- package/lib/components/DocMethodSummary/index.js +8 -0
- package/lib/components/DocMethodSummary/index.js.map +1 -1
- package/lib/components/DocMethodSummary/utils.d.ts +2 -1
- package/lib/components/DocMethodSummary/utils.js +24 -15
- package/lib/components/DocMethodSummary/utils.js.map +1 -1
- package/lib/components/DocPseudo/DocParam.d.ts +2 -2
- package/lib/components/DocPseudo/DocParam.js.map +1 -1
- package/lib/components/DocPseudo/DocParams.d.ts +2 -2
- package/lib/components/DocPseudo/DocParams.js.map +1 -1
- package/lib/components/DocPseudo/DocPrimaryResponse.d.ts +2 -2
- package/lib/components/DocPseudo/DocPrimaryResponse.js.map +1 -1
- package/lib/components/DocPseudo/DocPseudo.d.ts +2 -2
- package/lib/components/DocPseudo/DocPseudo.js.map +1 -1
- package/lib/components/DocRateLimited/DocRateLimited.d.ts +2 -2
- package/lib/components/DocRateLimited/DocRateLimited.js.map +1 -1
- package/lib/components/DocReferences/DocReferences.d.ts +2 -2
- package/lib/components/DocReferences/DocReferences.js +9 -13
- package/lib/components/DocReferences/DocReferences.js.map +1 -1
- package/lib/components/DocReferences/utils.d.ts +2 -2
- package/lib/components/DocReferences/utils.js +5 -31
- package/lib/components/DocReferences/utils.js.map +1 -1
- package/lib/components/DocResponses/DocResponseTypes.d.ts +3 -2
- package/lib/components/DocResponses/DocResponseTypes.js +3 -1
- package/lib/components/DocResponses/DocResponseTypes.js.map +1 -1
- package/lib/components/DocResponses/DocResponses.d.ts +3 -2
- package/lib/components/DocResponses/DocResponses.js +4 -2
- package/lib/components/DocResponses/DocResponses.js.map +1 -1
- package/lib/components/DocResponses/utils.d.ts +1 -1
- package/lib/components/DocResponses/utils.js.map +1 -1
- package/lib/components/DocSDKs/DocDeclarations.d.ts +2 -2
- package/lib/components/DocSDKs/DocDeclarations.js.map +1 -1
- package/lib/components/DocSDKs/DocSDKs.d.ts +2 -2
- package/lib/components/DocSDKs/DocSDKs.js +2 -4
- package/lib/components/DocSDKs/DocSDKs.js.map +1 -1
- package/lib/components/DocSDKs/utils.d.ts +1 -1
- package/lib/components/DocSDKs/utils.js.map +1 -1
- package/lib/components/DocSchema/DocSchema.d.ts +1 -1
- package/lib/components/DocSchema/DocSchema.js +2 -2
- package/lib/components/DocSchema/DocSchema.js.map +1 -1
- package/lib/components/DocSdkUsage/DocSdkExampleCell.d.ts +1 -1
- package/lib/components/DocSdkUsage/DocSdkExampleCell.js.map +1 -1
- package/lib/components/DocSdkUsage/DocSdkUsage.d.ts +2 -2
- package/lib/components/DocSdkUsage/DocSdkUsage.js +7 -10
- package/lib/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
- package/lib/components/DocSdkUsage/utils.d.ts +2 -2
- package/lib/components/DocSdkUsage/utils.js.map +1 -1
- package/lib/components/DocSource/DocSource.d.ts +2 -2
- package/lib/components/DocSource/DocSource.js +5 -7
- package/lib/components/DocSource/DocSource.js.map +1 -1
- package/lib/components/DocStatus/DocStatus.d.ts +2 -2
- package/lib/components/DocStatus/DocStatus.js.map +1 -1
- package/lib/components/DocTitle/DocTitle.d.ts +1 -1
- package/lib/components/DocTitle/DocTitle.js +2 -2
- package/lib/components/DocTitle/DocTitle.js.map +1 -1
- package/lib/components/DocTypeSummary/DocTypeSummary.d.ts +7 -0
- package/lib/components/DocTypeSummary/DocTypeSummary.js +52 -0
- package/lib/components/DocTypeSummary/DocTypeSummary.js.map +1 -0
- package/lib/components/DocTypeSummary/index.d.ts +1 -0
- package/lib/components/DocTypeSummary/index.js +14 -0
- package/lib/components/DocTypeSummary/index.js.map +1 -0
- package/lib/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/lib/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.d.ts +1 -1
- package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js +152 -8
- package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
- package/lib/components/ExploreType/ExploreProperty.d.ts +10 -7
- package/lib/components/ExploreType/ExploreProperty.js +14 -3
- package/lib/components/ExploreType/ExploreProperty.js.map +1 -1
- package/lib/components/ExploreType/ExploreType.d.ts +4 -2
- package/lib/components/ExploreType/ExploreType.js +9 -5
- package/lib/components/ExploreType/ExploreType.js.map +1 -1
- package/lib/components/ExploreType/exploreUtils.d.ts +2 -2
- package/lib/components/ExploreType/exploreUtils.js.map +1 -1
- package/lib/components/Header/Header.d.ts +5 -4
- package/lib/components/Header/Header.js +5 -2
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/index.d.ts +1 -1
- package/lib/components/Header/index.js +6 -0
- package/lib/components/Header/index.js.map +1 -1
- package/lib/components/SelectorContainer/ApiSpecSelector.d.ts +3 -3
- package/lib/components/SelectorContainer/ApiSpecSelector.js +3 -1
- package/lib/components/SelectorContainer/ApiSpecSelector.js.map +1 -1
- package/lib/components/SelectorContainer/SdkLanguageSelector.d.ts +1 -1
- package/lib/components/SelectorContainer/SdkLanguageSelector.js +7 -17
- package/lib/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
- package/lib/components/SelectorContainer/SelectorContainer.d.ts +5 -4
- package/lib/components/SelectorContainer/SelectorContainer.js +11 -3
- package/lib/components/SelectorContainer/SelectorContainer.js.map +1 -1
- package/lib/components/SideNav/SearchMessage.d.ts +2 -2
- package/lib/components/SideNav/SearchMessage.js.map +1 -1
- package/lib/components/SideNav/SideNav.d.ts +3 -3
- package/lib/components/SideNav/SideNav.js +93 -56
- package/lib/components/SideNav/SideNav.js.map +1 -1
- package/lib/components/SideNav/SideNavMethodTags.d.ts +10 -0
- package/lib/components/SideNav/SideNavMethodTags.js +42 -0
- package/lib/components/SideNav/SideNavMethodTags.js.map +1 -0
- package/lib/components/SideNav/SideNavMethods.d.ts +5 -5
- package/lib/components/SideNav/SideNavMethods.js +37 -93
- package/lib/components/SideNav/SideNavMethods.js.map +1 -1
- package/lib/components/SideNav/SideNavTypeTags.d.ts +10 -0
- package/lib/components/SideNav/SideNavTypeTags.js +42 -0
- package/lib/components/SideNav/SideNavTypeTags.js.map +1 -0
- package/lib/components/SideNav/SideNavTypes.d.ts +8 -5
- package/lib/components/SideNav/SideNavTypes.js +83 -32
- package/lib/components/SideNav/SideNavTypes.js.map +1 -1
- package/lib/components/SideNav/searchUtils.d.ts +2 -2
- package/lib/components/SideNav/searchUtils.js +1 -1
- package/lib/components/SideNav/searchUtils.js.map +1 -1
- package/lib/components/common/Loader.d.ts +2 -2
- package/lib/components/common/Loader.js.map +1 -1
- package/lib/components/common/common.d.ts +2 -3
- package/lib/components/common/common.js +3 -15
- package/lib/components/common/common.js.map +1 -1
- package/lib/components/common/index.d.ts +2 -2
- package/lib/components/common/index.js +22 -18
- package/lib/components/common/index.js.map +1 -1
- package/lib/components/index.d.ts +5 -4
- package/lib/components/index.js +26 -12
- package/lib/components/index.js.map +1 -1
- package/lib/esm/ApiExplorer.js +97 -77
- package/lib/esm/ApiExplorer.js.map +1 -1
- package/lib/esm/App.js +19 -0
- package/lib/esm/App.js.map +1 -0
- package/lib/esm/StandaloneApiExplorer.js +46 -22
- package/lib/esm/StandaloneApiExplorer.js.map +1 -1
- package/lib/esm/components/DocActivityType/DocActivityType.js.map +1 -1
- package/lib/esm/components/DocCode/DocCode.js +5 -8
- package/lib/esm/components/DocCode/DocCode.js.map +1 -1
- package/lib/esm/components/DocMarkdown/DocMarkdown.js +10 -12
- package/lib/esm/components/DocMarkdown/DocMarkdown.js.map +1 -1
- package/lib/esm/components/DocMethodSummary/DocMethodSummary.js +4 -6
- package/lib/esm/components/DocMethodSummary/DocMethodSummary.js.map +1 -1
- package/lib/esm/components/DocMethodSummary/DocSummaryStatus.js +3 -3
- package/lib/esm/components/DocMethodSummary/DocSummaryStatus.js.map +1 -1
- package/lib/esm/components/DocMethodSummary/index.js +1 -0
- package/lib/esm/components/DocMethodSummary/index.js.map +1 -1
- package/lib/esm/components/DocMethodSummary/utils.js +24 -15
- package/lib/esm/components/DocMethodSummary/utils.js.map +1 -1
- package/lib/esm/components/DocPseudo/DocParam.js.map +1 -1
- package/lib/esm/components/DocPseudo/DocParams.js.map +1 -1
- package/lib/esm/components/DocPseudo/DocPrimaryResponse.js.map +1 -1
- package/lib/esm/components/DocPseudo/DocPseudo.js.map +1 -1
- package/lib/esm/components/DocRateLimited/DocRateLimited.js.map +1 -1
- package/lib/esm/components/DocReferences/DocReferences.js +6 -9
- package/lib/esm/components/DocReferences/DocReferences.js.map +1 -1
- package/lib/esm/components/DocReferences/utils.js +3 -26
- package/lib/esm/components/DocReferences/utils.js.map +1 -1
- package/lib/esm/components/DocResponses/DocResponseTypes.js +3 -1
- package/lib/esm/components/DocResponses/DocResponseTypes.js.map +1 -1
- package/lib/esm/components/DocResponses/DocResponses.js +3 -1
- package/lib/esm/components/DocResponses/DocResponses.js.map +1 -1
- package/lib/esm/components/DocResponses/utils.js.map +1 -1
- package/lib/esm/components/DocSDKs/DocDeclarations.js.map +1 -1
- package/lib/esm/components/DocSDKs/DocSDKs.js +3 -4
- package/lib/esm/components/DocSDKs/DocSDKs.js.map +1 -1
- package/lib/esm/components/DocSDKs/utils.js.map +1 -1
- package/lib/esm/components/DocSchema/DocSchema.js +1 -1
- package/lib/esm/components/DocSchema/DocSchema.js.map +1 -1
- package/lib/esm/components/DocSdkUsage/DocSdkExampleCell.js.map +1 -1
- package/lib/esm/components/DocSdkUsage/DocSdkUsage.js +7 -9
- package/lib/esm/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
- package/lib/esm/components/DocSdkUsage/utils.js.map +1 -1
- package/lib/esm/components/DocSource/DocSource.js +4 -5
- package/lib/esm/components/DocSource/DocSource.js.map +1 -1
- package/lib/esm/components/DocStatus/DocStatus.js.map +1 -1
- package/lib/esm/components/DocTitle/DocTitle.js +2 -2
- package/lib/esm/components/DocTitle/DocTitle.js.map +1 -1
- package/lib/esm/components/DocTypeSummary/DocTypeSummary.js +38 -0
- package/lib/esm/components/DocTypeSummary/DocTypeSummary.js.map +1 -0
- package/lib/esm/components/DocTypeSummary/index.js +2 -0
- package/lib/{state/action_creators.js.map → esm/components/DocTypeSummary/index.js.map} +1 -1
- package/lib/esm/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/lib/esm/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js +153 -6
- package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
- package/lib/esm/components/ExploreType/ExploreProperty.js +14 -3
- package/lib/esm/components/ExploreType/ExploreProperty.js.map +1 -1
- package/lib/esm/components/ExploreType/ExploreType.js +8 -4
- package/lib/esm/components/ExploreType/ExploreType.js.map +1 -1
- package/lib/esm/components/ExploreType/exploreUtils.js.map +1 -1
- package/lib/esm/components/Header/Header.js +3 -1
- package/lib/esm/components/Header/Header.js.map +1 -1
- package/lib/esm/components/Header/index.js +1 -1
- package/lib/esm/components/Header/index.js.map +1 -1
- package/lib/esm/components/SelectorContainer/ApiSpecSelector.js +4 -2
- package/lib/esm/components/SelectorContainer/ApiSpecSelector.js.map +1 -1
- package/lib/esm/components/SelectorContainer/SdkLanguageSelector.js +7 -12
- package/lib/esm/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
- package/lib/esm/components/SelectorContainer/SelectorContainer.js +11 -3
- package/lib/esm/components/SelectorContainer/SelectorContainer.js.map +1 -1
- package/lib/esm/components/SideNav/SearchMessage.js.map +1 -1
- package/lib/esm/components/SideNav/SideNav.js +95 -57
- package/lib/esm/components/SideNav/SideNav.js.map +1 -1
- package/lib/esm/components/SideNav/SideNavMethodTags.js +29 -0
- package/lib/esm/components/SideNav/SideNavMethodTags.js.map +1 -0
- package/lib/esm/components/SideNav/SideNavMethods.js +38 -96
- package/lib/esm/components/SideNav/SideNavMethods.js.map +1 -1
- package/lib/esm/components/SideNav/SideNavTypeTags.js +29 -0
- package/lib/esm/components/SideNav/SideNavTypeTags.js.map +1 -0
- package/lib/esm/components/SideNav/SideNavTypes.js +84 -33
- package/lib/esm/components/SideNav/SideNavTypes.js.map +1 -1
- package/lib/esm/components/SideNav/searchUtils.js +1 -1
- package/lib/esm/components/SideNav/searchUtils.js.map +1 -1
- package/lib/esm/components/common/Loader.js.map +1 -1
- package/lib/esm/components/common/common.js +3 -11
- package/lib/esm/components/common/common.js.map +1 -1
- package/lib/esm/components/common/index.js +2 -2
- package/lib/esm/components/common/index.js.map +1 -1
- package/lib/esm/components/index.js +5 -4
- package/lib/esm/components/index.js.map +1 -1
- package/lib/esm/index.js +4 -18
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/reducers/index.js +0 -1
- package/lib/esm/reducers/index.js.map +1 -1
- package/lib/esm/reducers/spec/actions.js.map +1 -1
- package/lib/esm/reducers/spec/reducer.js.map +1 -1
- package/lib/esm/reducers/spec/utils.js +17 -1
- package/lib/esm/reducers/spec/utils.js.map +1 -1
- package/lib/esm/routes/AppRouter.js +16 -14
- package/lib/esm/routes/AppRouter.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DiffScene.js +65 -11
- package/lib/esm/scenes/DiffScene/DiffScene.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/DiffBanner.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/DiffItem.js +15 -22
- package/lib/esm/scenes/DiffScene/DocDiff/DiffItem.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/DiffLegend.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/DocDiff.js.map +1 -1
- package/lib/esm/scenes/DiffScene/DocDiff/docDiffUtils.js.map +1 -1
- package/lib/esm/scenes/DiffScene/diffUtils.js.map +1 -1
- package/lib/esm/scenes/HomeScene/HomeScene.js.map +1 -1
- package/lib/esm/scenes/MethodScene/MethodScene.js +80 -29
- package/lib/esm/scenes/MethodScene/MethodScene.js.map +1 -1
- package/lib/esm/scenes/MethodScene/components/DocOperation.js.map +1 -1
- package/lib/esm/scenes/MethodScene/components/DocRequestBody.js +5 -2
- package/lib/esm/scenes/MethodScene/components/DocRequestBody.js.map +1 -1
- package/lib/esm/scenes/{TagScene/TagScene.js → MethodTagScene/MethodTagScene.js} +16 -11
- package/lib/esm/scenes/MethodTagScene/MethodTagScene.js.map +1 -0
- package/lib/esm/scenes/MethodTagScene/index.js +2 -0
- package/lib/{state/reducers.js.map → esm/scenes/MethodTagScene/index.js.map} +1 -1
- package/lib/esm/scenes/{TagScene → MethodTagScene}/utils.js +0 -0
- package/lib/esm/scenes/MethodTagScene/utils.js.map +1 -0
- package/lib/esm/scenes/TypeScene/TypeScene.js +14 -7
- package/lib/esm/scenes/TypeScene/TypeScene.js.map +1 -1
- package/lib/esm/scenes/TypeTagScene/TypeTagScene.js +57 -0
- package/lib/esm/scenes/TypeTagScene/TypeTagScene.js.map +1 -0
- package/lib/esm/scenes/TypeTagScene/index.js +2 -0
- package/lib/esm/scenes/TypeTagScene/index.js.map +1 -0
- package/lib/esm/scenes/TypeTagScene/utils.js +8 -0
- package/lib/esm/scenes/TypeTagScene/utils.js.map +1 -0
- package/lib/esm/scenes/index.js +2 -1
- package/lib/esm/scenes/index.js.map +1 -1
- package/lib/esm/state/index.js +2 -3
- package/lib/esm/state/index.js.map +1 -1
- package/lib/esm/state/lodes/index.js +3 -0
- package/lib/esm/state/lodes/index.js.map +1 -0
- package/lib/esm/state/lodes/sagas.js +25 -0
- package/lib/esm/state/lodes/sagas.js.map +1 -0
- package/lib/esm/state/lodes/selectors.js +5 -0
- package/lib/esm/state/lodes/selectors.js.map +1 -0
- package/lib/esm/state/lodes/slice.js +30 -0
- package/lib/esm/state/lodes/slice.js.map +1 -0
- package/lib/esm/state/settings/index.js +1 -1
- package/lib/esm/state/settings/index.js.map +1 -1
- package/lib/esm/state/settings/sagas.js +59 -0
- package/lib/esm/state/settings/sagas.js.map +1 -0
- package/lib/esm/state/settings/selectors.js +6 -1
- package/lib/esm/state/settings/selectors.js.map +1 -1
- package/lib/esm/state/settings/slice.js +50 -0
- package/lib/esm/state/settings/slice.js.map +1 -0
- package/lib/esm/state/store.js +13 -3
- package/lib/esm/state/store.js.map +1 -1
- package/lib/esm/test-utils/index.js +3 -4
- package/lib/esm/test-utils/index.js.map +1 -1
- package/lib/esm/test-utils/lodes.js +12 -0
- package/lib/esm/test-utils/lodes.js.map +1 -0
- package/lib/esm/test-utils/redux.js +30 -15
- package/lib/esm/test-utils/redux.js.map +1 -1
- package/lib/esm/test-utils/router.js.map +1 -1
- package/lib/esm/utils/index.js +1 -2
- package/lib/esm/utils/index.js.map +1 -1
- package/lib/esm/utils/lodeUtils.js +3 -7
- package/lib/esm/utils/lodeUtils.js.map +1 -1
- package/lib/esm/utils/path.js +32 -1
- package/lib/esm/utils/path.js.map +1 -1
- package/lib/index.d.ts +4 -1
- package/lib/index.js +52 -23
- package/lib/index.js.map +1 -1
- package/lib/reducers/index.d.ts +0 -1
- package/lib/reducers/index.js +0 -13
- package/lib/reducers/index.js.map +1 -1
- package/lib/reducers/spec/actions.d.ts +1 -1
- package/lib/reducers/spec/actions.js.map +1 -1
- package/lib/reducers/spec/reducer.d.ts +2 -2
- package/lib/reducers/spec/reducer.js.map +1 -1
- package/lib/reducers/spec/utils.d.ts +3 -3
- package/lib/reducers/spec/utils.js +18 -1
- package/lib/reducers/spec/utils.js.map +1 -1
- package/lib/routes/AppRouter.d.ts +6 -2
- package/lib/routes/AppRouter.js +15 -16
- package/lib/routes/AppRouter.js.map +1 -1
- package/lib/scenes/DiffScene/DiffScene.d.ts +2 -2
- package/lib/scenes/DiffScene/DiffScene.js +65 -11
- package/lib/scenes/DiffScene/DiffScene.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/DiffBanner.d.ts +2 -2
- package/lib/scenes/DiffScene/DocDiff/DiffBanner.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/DiffItem.d.ts +3 -3
- package/lib/scenes/DiffScene/DocDiff/DiffItem.js +13 -20
- package/lib/scenes/DiffScene/DocDiff/DiffItem.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/DiffLegend.d.ts +2 -2
- package/lib/scenes/DiffScene/DocDiff/DiffLegend.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/DocDiff.d.ts +2 -2
- package/lib/scenes/DiffScene/DocDiff/DocDiff.js.map +1 -1
- package/lib/scenes/DiffScene/DocDiff/docDiffUtils.d.ts +1 -1
- package/lib/scenes/DiffScene/DocDiff/docDiffUtils.js.map +1 -1
- package/lib/scenes/DiffScene/diffUtils.d.ts +1 -1
- package/lib/scenes/DiffScene/diffUtils.js.map +1 -1
- package/lib/scenes/HomeScene/HomeScene.d.ts +2 -2
- package/lib/scenes/HomeScene/HomeScene.js.map +1 -1
- package/lib/scenes/MethodScene/MethodScene.d.ts +8 -4
- package/lib/scenes/MethodScene/MethodScene.js +75 -27
- package/lib/scenes/MethodScene/MethodScene.js.map +1 -1
- package/lib/scenes/MethodScene/components/DocOperation.d.ts +2 -2
- package/lib/scenes/MethodScene/components/DocOperation.js.map +1 -1
- package/lib/scenes/MethodScene/components/DocRequestBody.d.ts +3 -2
- package/lib/scenes/MethodScene/components/DocRequestBody.js +6 -2
- package/lib/scenes/MethodScene/components/DocRequestBody.js.map +1 -1
- package/lib/scenes/MethodTagScene/MethodTagScene.d.ts +7 -0
- package/lib/scenes/{TagScene/TagScene.js → MethodTagScene/MethodTagScene.js} +19 -14
- package/lib/scenes/MethodTagScene/MethodTagScene.js.map +1 -0
- package/lib/scenes/MethodTagScene/index.d.ts +1 -0
- package/lib/scenes/MethodTagScene/index.js +14 -0
- package/lib/{context/search/SearchContext.js.map → scenes/MethodTagScene/index.js.map} +1 -1
- package/lib/scenes/{TagScene → MethodTagScene}/utils.d.ts +1 -1
- package/lib/scenes/{TagScene → MethodTagScene}/utils.js +0 -0
- package/lib/{context/lode/index.js.map → scenes/MethodTagScene/utils.js.map} +1 -1
- package/lib/scenes/TypeScene/TypeScene.d.ts +2 -2
- package/lib/scenes/TypeScene/TypeScene.js +16 -7
- package/lib/scenes/TypeScene/TypeScene.js.map +1 -1
- package/lib/scenes/TypeTagScene/TypeTagScene.d.ts +7 -0
- package/lib/scenes/TypeTagScene/TypeTagScene.js +76 -0
- package/lib/scenes/TypeTagScene/TypeTagScene.js.map +1 -0
- package/lib/scenes/TypeTagScene/index.d.ts +1 -0
- package/lib/scenes/TypeTagScene/index.js +14 -0
- package/lib/{esm/state/settings/actions.js.map → scenes/TypeTagScene/index.js.map} +1 -1
- package/lib/scenes/TypeTagScene/utils.d.ts +2 -0
- package/lib/scenes/TypeTagScene/utils.js +17 -0
- package/lib/scenes/TypeTagScene/utils.js.map +1 -0
- package/lib/scenes/index.d.ts +2 -1
- package/lib/scenes/index.js +11 -3
- package/lib/scenes/index.js.map +1 -1
- package/lib/state/index.d.ts +2 -2
- package/lib/state/index.js +15 -16
- package/lib/state/index.js.map +1 -1
- package/lib/state/lodes/index.d.ts +2 -0
- package/lib/{reducers/search → state/lodes}/index.js +8 -8
- package/lib/state/lodes/index.js.map +1 -0
- package/lib/state/lodes/sagas.d.ts +1 -0
- package/lib/state/lodes/sagas.js +34 -0
- package/lib/state/lodes/sagas.js.map +1 -0
- package/lib/state/lodes/selectors.d.ts +3 -0
- package/lib/state/lodes/selectors.js +17 -0
- package/lib/state/lodes/selectors.js.map +1 -0
- package/lib/state/lodes/slice.d.ts +29 -0
- package/lib/state/lodes/slice.js +45 -0
- package/lib/state/lodes/slice.js.map +1 -0
- package/lib/state/settings/index.d.ts +1 -1
- package/lib/state/settings/index.js +8 -8
- package/lib/state/settings/index.js.map +1 -1
- package/lib/state/settings/sagas.d.ts +1 -0
- package/lib/state/settings/sagas.js +69 -0
- package/lib/state/settings/sagas.js.map +1 -0
- package/lib/state/settings/selectors.d.ts +5 -2
- package/lib/state/settings/selectors.js +17 -3
- package/lib/state/settings/selectors.js.map +1 -1
- package/lib/state/settings/slice.d.ts +42 -0
- package/lib/state/settings/slice.js +69 -0
- package/lib/state/settings/slice.js.map +1 -0
- package/lib/state/store.d.ts +10 -6
- package/lib/state/store.js +15 -5
- package/lib/state/store.js.map +1 -1
- package/lib/test-data/declarations.js +24 -0
- package/lib/test-data/declarations.js.map +1 -0
- package/lib/test-data/examples.js.map +1 -1
- package/lib/test-data/index.js +23 -0
- package/lib/test-data/index.js.map +1 -1
- package/lib/test-data/specs.js.map +1 -1
- package/lib/test-utils/index.d.ts +3 -4
- package/lib/test-utils/index.js +33 -56
- package/lib/test-utils/index.js.map +1 -1
- package/lib/test-utils/lodes.d.ts +4 -0
- package/lib/test-utils/lodes.js +23 -0
- package/lib/test-utils/lodes.js.map +1 -0
- package/lib/test-utils/redux.d.ts +16 -12
- package/lib/test-utils/redux.js +36 -17
- package/lib/test-utils/redux.js.map +1 -1
- package/lib/test-utils/router.d.ts +2 -2
- package/lib/test-utils/router.js.map +1 -1
- package/lib/utils/highlight.d.ts +1 -0
- package/lib/utils/index.d.ts +1 -2
- package/lib/utils/index.js +6 -23
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/lodeUtils.d.ts +3 -3
- package/lib/utils/lodeUtils.js +3 -7
- package/lib/utils/lodeUtils.js.map +1 -1
- package/lib/utils/path.d.ts +3 -1
- package/lib/utils/path.js +36 -2
- package/lib/utils/path.js.map +1 -1
- package/package.json +29 -15
- package/public/Looker.3.1.json +1343 -412
- package/public/Looker.4.0.json +3305 -661
- package/public/versions.json +1 -1
- package/src/ApiExplorer.tsx +160 -99
- package/src/{index.tsx → App.tsx} +1 -1
- package/src/StandaloneApiExplorer.tsx +38 -29
- package/src/components/DocActivityType/DocActivityType.tsx +3 -2
- package/src/components/DocCode/DocCode.tsx +7 -6
- package/src/components/DocMarkdown/DocMarkdown.spec.tsx +16 -11
- package/src/components/DocMarkdown/DocMarkdown.tsx +11 -9
- package/src/components/DocMethodSummary/DocMethodSummary.spec.tsx +2 -2
- package/src/components/DocMethodSummary/DocMethodSummary.tsx +8 -8
- package/src/components/DocMethodSummary/DocSummaryStatus.spec.tsx +5 -5
- package/src/components/DocMethodSummary/DocSummaryStatus.tsx +5 -7
- package/src/components/DocMethodSummary/index.tsx +1 -0
- package/src/components/DocMethodSummary/utils.spec.tsx +7 -7
- package/src/components/DocMethodSummary/utils.tsx +17 -23
- package/src/components/DocPseudo/DocParam.tsx +3 -2
- package/src/components/DocPseudo/DocParams.tsx +3 -2
- package/src/components/DocPseudo/DocPrimaryResponse.tsx +3 -2
- package/src/components/DocPseudo/DocPseudo.tsx +3 -2
- package/src/components/DocRateLimited/DocRateLimited.tsx +3 -2
- package/src/components/DocReferences/DocReferences.spec.tsx +19 -8
- package/src/components/DocReferences/DocReferences.tsx +10 -10
- package/src/components/DocReferences/utils.spec.tsx +1 -13
- package/src/components/DocReferences/utils.tsx +4 -39
- package/src/components/DocResponses/DocResponseTypes.tsx +15 -4
- package/src/components/DocResponses/DocResponses.spec.tsx +1 -1
- package/src/components/DocResponses/DocResponses.tsx +7 -5
- package/src/components/DocResponses/utils.ts +1 -1
- package/src/components/DocSDKs/DocDeclarations.tsx +3 -2
- package/src/components/DocSDKs/DocSDKs.spec.tsx +12 -5
- package/src/components/DocSDKs/DocSDKs.tsx +7 -7
- package/src/components/DocSDKs/utils.ts +1 -1
- package/src/components/DocSchema/DocSchema.tsx +3 -2
- package/src/components/DocSdkUsage/DocSdkExampleCell.tsx +2 -1
- package/src/components/DocSdkUsage/DocSdkUsage.spec.tsx +2 -2
- package/src/components/DocSdkUsage/DocSdkUsage.tsx +10 -8
- package/src/components/DocSdkUsage/utils.ts +4 -2
- package/src/components/DocSource/DocSource.spec.tsx +2 -1
- package/src/components/DocSource/DocSource.tsx +7 -4
- package/src/components/DocStatus/DocStatus.spec.tsx +1 -1
- package/src/components/DocStatus/DocStatus.tsx +3 -2
- package/src/components/DocTitle/DocTitle.tsx +4 -3
- package/src/{state/settings/action_creators.spec.ts → components/DocTypeSummary/DocTypeSummary.spec.tsx} +15 -10
- package/src/components/DocTypeSummary/DocTypeSummary.tsx +64 -0
- package/src/{state/action_creators.ts → components/DocTypeSummary/index.tsx} +1 -1
- package/src/components/ErrorBoundary/ErrorBoundary.spec.tsx +11 -9
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +1 -1
- package/src/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.spec.tsx +6 -5
- package/src/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.tsx +170 -6
- package/src/components/ExploreType/ExploreProperty.spec.tsx +15 -6
- package/src/components/ExploreType/ExploreProperty.tsx +26 -12
- package/src/components/ExploreType/ExploreType.spec.tsx +15 -31
- package/src/components/ExploreType/ExploreType.tsx +13 -6
- package/src/components/ExploreType/exploreUtils.tsx +3 -2
- package/src/components/Header/Header.spec.tsx +29 -37
- package/src/components/Header/Header.tsx +8 -4
- package/src/components/Header/index.ts +1 -1
- package/src/components/SelectorContainer/ApiSpecSelector.spec.tsx +12 -2
- package/src/components/SelectorContainer/ApiSpecSelector.tsx +9 -5
- package/src/components/SelectorContainer/SdkLanguageSelector.spec.tsx +13 -7
- package/src/components/SelectorContainer/SdkLanguageSelector.tsx +7 -14
- package/src/components/SelectorContainer/SelectorContainer.spec.tsx +19 -25
- package/src/components/SelectorContainer/SelectorContainer.tsx +8 -5
- package/src/components/SideNav/SearchMessage.tsx +3 -2
- package/src/components/SideNav/SideNav.spec.tsx +28 -41
- package/src/components/SideNav/SideNav.tsx +102 -68
- package/src/components/SideNav/{SideNavTags.spec.tsx → SideNavMethodTags.spec.tsx} +10 -8
- package/src/components/SideNav/{SideNavTags.tsx → SideNavMethodTags.tsx} +21 -19
- package/src/components/SideNav/SideNavMethods.spec.tsx +9 -5
- package/src/components/SideNav/SideNavMethods.tsx +78 -126
- package/src/components/SideNav/SideNavTypeTags.spec.tsx +79 -0
- package/src/{context/search/SearchContext.ts → components/SideNav/SideNavTypeTags.tsx} +27 -14
- package/src/components/SideNav/SideNavTypes.spec.tsx +13 -6
- package/src/components/SideNav/SideNavTypes.tsx +94 -43
- package/src/components/SideNav/{searchUtils.tsx → searchUtils.ts} +3 -3
- package/src/components/common/Loader.tsx +3 -2
- package/src/components/common/common.tsx +5 -15
- package/src/components/common/index.ts +2 -2
- package/src/components/index.ts +5 -4
- package/src/{context/lode/index.ts → index.ts} +4 -1
- package/src/reducers/index.ts +0 -1
- package/src/reducers/spec/actions.ts +1 -1
- package/src/reducers/spec/reducer.spec.ts +2 -1
- package/src/reducers/spec/reducer.ts +5 -3
- package/src/reducers/spec/utils.spec.ts +1 -1
- package/src/reducers/spec/utils.ts +18 -6
- package/src/routes/AppRouter.tsx +28 -15
- package/src/scenes/DiffScene/DiffScene.tsx +44 -13
- package/src/scenes/DiffScene/DocDiff/DiffBanner.tsx +3 -2
- package/src/scenes/DiffScene/DocDiff/DiffItem.spec.tsx +2 -1
- package/src/scenes/DiffScene/DocDiff/DiffItem.tsx +32 -49
- package/src/scenes/DiffScene/DocDiff/DiffLegend.tsx +3 -2
- package/src/scenes/DiffScene/DocDiff/DocDiff.tsx +3 -2
- package/src/scenes/DiffScene/DocDiff/docDiffUtils.tsx +2 -7
- package/src/scenes/DiffScene/diffUtils.spec.ts +2 -1
- package/src/scenes/DiffScene/diffUtils.ts +2 -2
- package/src/scenes/HomeScene/HomeScene.tsx +3 -2
- package/src/scenes/MethodScene/MethodScene.tsx +89 -44
- package/src/scenes/MethodScene/components/DocOperation.tsx +3 -2
- package/src/scenes/MethodScene/components/DocRequestBody.spec.tsx +2 -2
- package/src/scenes/MethodScene/components/DocRequestBody.tsx +8 -5
- package/src/scenes/{TagScene/TagScene.spec.tsx → MethodTagScene/MethodTagScene.spec.tsx} +5 -5
- package/src/scenes/{TagScene/TagScene.tsx → MethodTagScene/MethodTagScene.tsx} +23 -16
- package/src/{components/Collapser → scenes/MethodTagScene}/index.ts +1 -2
- package/src/scenes/{TagScene → MethodTagScene}/utils.spec.ts +1 -1
- package/src/scenes/{TagScene → MethodTagScene}/utils.ts +1 -1
- package/src/scenes/TypeScene/TypeScene.tsx +36 -24
- package/src/scenes/TypeTagScene/TypeTagScene.spec.tsx +103 -0
- package/src/scenes/TypeTagScene/TypeTagScene.tsx +93 -0
- package/src/scenes/{TagScene → TypeTagScene}/index.ts +1 -1
- package/src/{state/reducers.ts → scenes/TypeTagScene/utils.spec.ts} +8 -7
- package/src/{hooks/use_actions_hook.ts → scenes/TypeTagScene/utils.ts} +13 -10
- package/src/scenes/index.ts +2 -1
- package/src/state/index.ts +2 -2
- package/src/{reducers/search → state/lodes}/index.ts +2 -2
- package/src/state/lodes/sagas.spec.ts +92 -0
- package/src/state/{settings/reducer.ts → lodes/sagas.ts} +23 -21
- package/src/state/{settings/reducer.spec.ts → lodes/selectors.spec.ts} +15 -14
- package/src/state/{settings/actions.ts → lodes/selectors.ts} +7 -9
- package/src/state/lodes/slice.ts +69 -0
- package/src/state/settings/index.ts +1 -1
- package/src/state/settings/sagas.spec.ts +121 -0
- package/src/state/settings/sagas.ts +79 -0
- package/src/state/settings/selectors.spec.ts +16 -9
- package/src/state/settings/selectors.ts +14 -3
- package/src/state/settings/slice.ts +94 -0
- package/src/state/store.ts +22 -8
- package/src/{context/envAdaptor/EnvAdaptorContext.ts → test-data/declarations.ts} +17 -12
- package/src/test-data/examples.ts +1 -1
- package/src/test-data/index.ts +1 -0
- package/src/test-data/specs.ts +2 -1
- package/src/test-utils/index.ts +3 -14
- package/src/{context/lode/LodeContext.ts → test-utils/lodes.tsx} +15 -14
- package/src/test-utils/redux.tsx +46 -26
- package/src/test-utils/router.tsx +3 -2
- package/src/utils/index.ts +7 -2
- package/src/utils/lodeUtils.ts +5 -7
- package/src/utils/path.spec.ts +17 -3
- package/src/utils/path.ts +54 -4
- package/webpack.dev.config.js +3 -0
- package/webpack.prod.config.js +4 -0
- package/lib/components/Collapser/CollapserCard.d.ts +0 -9
- package/lib/components/Collapser/CollapserCard.js +0 -50
- package/lib/components/Collapser/CollapserCard.js.map +0 -1
- package/lib/components/Collapser/index.d.ts +0 -1
- package/lib/components/Collapser/index.js +0 -14
- package/lib/components/Collapser/index.js.map +0 -1
- package/lib/components/SideNav/SearchCriteriaSelector.d.ts +0 -2
- package/lib/components/SideNav/SearchCriteriaSelector.js +0 -57
- package/lib/components/SideNav/SearchCriteriaSelector.js.map +0 -1
- package/lib/components/SideNav/SideNavTags.d.ts +0 -9
- package/lib/components/SideNav/SideNavTags.js +0 -30
- package/lib/components/SideNav/SideNavTags.js.map +0 -1
- package/lib/context/envAdaptor/EnvAdaptorContext.d.ts +0 -7
- package/lib/context/envAdaptor/EnvAdaptorContext.js +0 -18
- package/lib/context/envAdaptor/EnvAdaptorContext.js.map +0 -1
- package/lib/context/envAdaptor/index.d.ts +0 -1
- package/lib/context/envAdaptor/index.js +0 -20
- package/lib/context/envAdaptor/index.js.map +0 -1
- package/lib/context/index.d.ts +0 -3
- package/lib/context/index.js +0 -48
- package/lib/context/index.js.map +0 -1
- package/lib/context/lode/LodeContext.d.ts +0 -9
- package/lib/context/lode/LodeContext.js +0 -21
- package/lib/context/lode/LodeContext.js.map +0 -1
- package/lib/context/lode/index.d.ts +0 -1
- package/lib/context/lode/index.js +0 -20
- package/lib/context/search/SearchContext.d.ts +0 -9
- package/lib/context/search/SearchContext.js +0 -19
- package/lib/context/search/index.d.ts +0 -1
- package/lib/context/search/index.js +0 -20
- package/lib/context/search/index.js.map +0 -1
- package/lib/esm/components/Collapser/CollapserCard.js +0 -34
- package/lib/esm/components/Collapser/CollapserCard.js.map +0 -1
- package/lib/esm/components/Collapser/index.js +0 -2
- package/lib/esm/components/Collapser/index.js.map +0 -1
- package/lib/esm/components/SideNav/SearchCriteriaSelector.js +0 -38
- package/lib/esm/components/SideNav/SearchCriteriaSelector.js.map +0 -1
- package/lib/esm/components/SideNav/SideNavTags.js +0 -17
- package/lib/esm/components/SideNav/SideNavTags.js.map +0 -1
- package/lib/esm/context/envAdaptor/EnvAdaptorContext.js +0 -7
- package/lib/esm/context/envAdaptor/EnvAdaptorContext.js.map +0 -1
- package/lib/esm/context/envAdaptor/index.js +0 -2
- package/lib/esm/context/envAdaptor/index.js.map +0 -1
- package/lib/esm/context/index.js +0 -4
- package/lib/esm/context/index.js.map +0 -1
- package/lib/esm/context/lode/LodeContext.js +0 -11
- package/lib/esm/context/lode/LodeContext.js.map +0 -1
- package/lib/esm/context/lode/index.js +0 -2
- package/lib/esm/context/lode/index.js.map +0 -1
- package/lib/esm/context/search/SearchContext.js +0 -8
- package/lib/esm/context/search/SearchContext.js.map +0 -1
- package/lib/esm/context/search/index.js +0 -2
- package/lib/esm/context/search/index.js.map +0 -1
- package/lib/esm/hooks/index.js +0 -2
- package/lib/esm/hooks/index.js.map +0 -1
- package/lib/esm/hooks/use_actions_hook.js +0 -11
- package/lib/esm/hooks/use_actions_hook.js.map +0 -1
- package/lib/esm/reducers/search/actions.js +0 -13
- package/lib/esm/reducers/search/actions.js.map +0 -1
- package/lib/esm/reducers/search/index.js +0 -3
- package/lib/esm/reducers/search/index.js.map +0 -1
- package/lib/esm/reducers/search/reducer.js +0 -31
- package/lib/esm/reducers/search/reducer.js.map +0 -1
- package/lib/esm/scenes/MethodScene/utils.js +0 -72
- package/lib/esm/scenes/MethodScene/utils.js.map +0 -1
- package/lib/esm/scenes/TagScene/TagScene.js.map +0 -1
- package/lib/esm/scenes/TagScene/index.js +0 -2
- package/lib/esm/scenes/TagScene/index.js.map +0 -1
- package/lib/esm/scenes/TagScene/utils.js.map +0 -1
- package/lib/esm/state/action_creators.js +0 -2
- package/lib/esm/state/action_creators.js.map +0 -1
- package/lib/esm/state/reducers.js +0 -6
- package/lib/esm/state/reducers.js.map +0 -1
- package/lib/esm/state/settings/action_creators.js +0 -6
- package/lib/esm/state/settings/action_creators.js.map +0 -1
- package/lib/esm/state/settings/actions.js +0 -6
- package/lib/esm/state/settings/reducer.js +0 -19
- package/lib/esm/state/settings/reducer.js.map +0 -1
- package/lib/esm/test-utils/render_with_lode.js +0 -19
- package/lib/esm/test-utils/render_with_lode.js.map +0 -1
- package/lib/esm/test-utils/render_with_search.js +0 -34
- package/lib/esm/test-utils/render_with_search.js.map +0 -1
- package/lib/esm/utils/envAdaptor.js +0 -68
- package/lib/esm/utils/envAdaptor.js.map +0 -1
- package/lib/hooks/index.d.ts +0 -1
- package/lib/hooks/index.js +0 -14
- package/lib/hooks/index.js.map +0 -1
- package/lib/hooks/use_actions_hook.d.ts +0 -2
- package/lib/hooks/use_actions_hook.js +0 -24
- package/lib/hooks/use_actions_hook.js.map +0 -1
- package/lib/reducers/search/actions.d.ts +0 -4
- package/lib/reducers/search/actions.js +0 -25
- package/lib/reducers/search/actions.js.map +0 -1
- package/lib/reducers/search/index.d.ts +0 -2
- package/lib/reducers/search/index.js.map +0 -1
- package/lib/reducers/search/reducer.d.ts +0 -11
- package/lib/reducers/search/reducer.js +0 -43
- package/lib/reducers/search/reducer.js.map +0 -1
- package/lib/scenes/MethodScene/utils.d.ts +0 -3
- package/lib/scenes/MethodScene/utils.js +0 -81
- package/lib/scenes/MethodScene/utils.js.map +0 -1
- package/lib/scenes/TagScene/TagScene.d.ts +0 -7
- package/lib/scenes/TagScene/TagScene.js.map +0 -1
- package/lib/scenes/TagScene/index.d.ts +0 -1
- package/lib/scenes/TagScene/index.js +0 -14
- package/lib/scenes/TagScene/index.js.map +0 -1
- package/lib/scenes/TagScene/utils.js.map +0 -1
- package/lib/state/action_creators.d.ts +0 -1
- package/lib/state/action_creators.js +0 -19
- package/lib/state/reducers.d.ts +0 -4
- package/lib/state/reducers.js +0 -16
- package/lib/state/settings/action_creators.d.ts +0 -2
- package/lib/state/settings/action_creators.js +0 -16
- package/lib/state/settings/action_creators.js.map +0 -1
- package/lib/state/settings/actions.d.ts +0 -8
- package/lib/state/settings/actions.js +0 -13
- package/lib/state/settings/actions.js.map +0 -1
- package/lib/state/settings/reducer.d.ts +0 -6
- package/lib/state/settings/reducer.js +0 -31
- package/lib/state/settings/reducer.js.map +0 -1
- package/lib/test-utils/render_with_lode.d.ts +0 -9
- package/lib/test-utils/render_with_lode.js +0 -36
- package/lib/test-utils/render_with_lode.js.map +0 -1
- package/lib/test-utils/render_with_search.d.ts +0 -4
- package/lib/test-utils/render_with_search.js +0 -52
- package/lib/test-utils/render_with_search.js.map +0 -1
- package/lib/utils/envAdaptor.d.ts +0 -27
- package/lib/utils/envAdaptor.js +0 -81
- package/lib/utils/envAdaptor.js.map +0 -1
- package/src/components/Collapser/CollapserCard.spec.tsx +0 -50
- package/src/components/Collapser/CollapserCard.tsx +0 -76
- package/src/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/somethingWentWrong.svg +0 -45
- package/src/components/SideNav/SearchCriteriaSelector.tsx +0 -75
- package/src/context/envAdaptor/index.ts +0 -29
- package/src/context/index.ts +0 -28
- package/src/context/search/index.ts +0 -26
- package/src/hooks/index.ts +0 -26
- package/src/reducers/search/actions.spec.ts +0 -50
- package/src/reducers/search/reducer.spec.ts +0 -72
- package/src/scenes/MethodScene/utils.spec.ts +0 -95
- package/src/scenes/MethodScene/utils.ts +0 -121
- package/src/state/settings/action_creators.ts +0 -33
- package/src/test-utils/render_with_lode.tsx +0 -74
- package/src/test-utils/render_with_search.tsx +0 -69
- package/src/utils/envAdaptor.spec.ts +0 -53
- package/src/utils/envAdaptor.ts +0 -120
|
@@ -105,7 +105,8 @@ var ExplorePropertyDescription = _ref5 => {
|
|
|
105
105
|
|
|
106
106
|
var ExplorePropertyDetail = _ref6 => {
|
|
107
107
|
var {
|
|
108
|
-
property
|
|
108
|
+
property,
|
|
109
|
+
api
|
|
109
110
|
} = _ref6;
|
|
110
111
|
return _react.default.createElement(_components.Space, {
|
|
111
112
|
style: {
|
|
@@ -115,7 +116,8 @@ var ExplorePropertyDetail = _ref6 => {
|
|
|
115
116
|
}, _react.default.createElement(_components.Box, {
|
|
116
117
|
width: "10rem"
|
|
117
118
|
}, _react.default.createElement(_.ExploreTypeLink, {
|
|
118
|
-
type: property.type
|
|
119
|
+
type: property.type,
|
|
120
|
+
api: api
|
|
119
121
|
})), _react.default.createElement(_components.Box, {
|
|
120
122
|
width: "5rem"
|
|
121
123
|
}, _react.default.createElement(ExplorePropertyRequired, {
|
|
@@ -135,11 +137,13 @@ exports.ExplorePropertyDetail = ExplorePropertyDetail;
|
|
|
135
137
|
|
|
136
138
|
var ExplorePropertyNode = _ref7 => {
|
|
137
139
|
var {
|
|
138
|
-
property
|
|
140
|
+
property,
|
|
141
|
+
api
|
|
139
142
|
} = _ref7;
|
|
140
143
|
var legend = (0, _.typeIcon)(property.type);
|
|
141
144
|
return _react.default.createElement(_components.TreeItem, _extends({}, legend, {
|
|
142
145
|
detail: _react.default.createElement(ExplorePropertyDetail, {
|
|
146
|
+
api: api,
|
|
143
147
|
property: property
|
|
144
148
|
})
|
|
145
149
|
}), property.jsonName);
|
|
@@ -150,6 +154,7 @@ exports.ExplorePropertyNode = ExplorePropertyNode;
|
|
|
150
154
|
var ExploreProperty = _ref8 => {
|
|
151
155
|
var {
|
|
152
156
|
property,
|
|
157
|
+
api,
|
|
153
158
|
level = 0,
|
|
154
159
|
maxDepth = -1,
|
|
155
160
|
openAll = false
|
|
@@ -158,6 +163,7 @@ var ExploreProperty = _ref8 => {
|
|
|
158
163
|
|
|
159
164
|
if (!picked.intrinsic) {
|
|
160
165
|
return _react.default.createElement(ExplorePropertyType, {
|
|
166
|
+
api: api,
|
|
161
167
|
property: property,
|
|
162
168
|
open: false,
|
|
163
169
|
level: level + 1,
|
|
@@ -167,6 +173,7 @@ var ExploreProperty = _ref8 => {
|
|
|
167
173
|
}
|
|
168
174
|
|
|
169
175
|
return _react.default.createElement(ExplorePropertyNode, {
|
|
176
|
+
api: api,
|
|
170
177
|
property: property
|
|
171
178
|
});
|
|
172
179
|
};
|
|
@@ -176,6 +183,7 @@ exports.ExploreProperty = ExploreProperty;
|
|
|
176
183
|
var ExplorePropertyType = _ref9 => {
|
|
177
184
|
var {
|
|
178
185
|
property,
|
|
186
|
+
api,
|
|
179
187
|
open = true,
|
|
180
188
|
level = 0,
|
|
181
189
|
maxDepth = -1,
|
|
@@ -188,6 +196,7 @@ var ExplorePropertyType = _ref9 => {
|
|
|
188
196
|
|
|
189
197
|
if (!nest) {
|
|
190
198
|
return _react.default.createElement(ExplorePropertyNode, {
|
|
199
|
+
api: api,
|
|
191
200
|
property: property
|
|
192
201
|
});
|
|
193
202
|
}
|
|
@@ -199,9 +208,11 @@ var ExplorePropertyType = _ref9 => {
|
|
|
199
208
|
defaultOpen: open || openAll,
|
|
200
209
|
density: -3,
|
|
201
210
|
detail: _react.default.createElement(ExplorePropertyDetail, {
|
|
211
|
+
api: api,
|
|
202
212
|
property: property
|
|
203
213
|
})
|
|
204
214
|
}, Object.values(props).map(property => _react.default.createElement(ExploreProperty, {
|
|
215
|
+
api: api,
|
|
205
216
|
key: property.fullName,
|
|
206
217
|
property: property,
|
|
207
218
|
level: level + 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ExploreType/ExploreProperty.tsx"],"names":["TipIcon","show","tip","icon","title","ExplorePropertyRequired","property","fullName","required","ExplorePropertyDeprecated","deprecated","ExplorePropertyReadOnly","readOnly","DescriptionParagraph","props","ExplorePropertyDescription","description","ExplorePropertyDetail","fontSize","marginLeft","type","ExplorePropertyNode","legend","jsonName","ExploreProperty","level","maxDepth","openAll","picked","intrinsic","ExplorePropertyType","open","nest","Object","values","map"],"mappings":";;;;;;;AA0BA;;AACA;;AAUA;;AACA;;AACA;;AAEA;;AACA;;;;;;AAuBO,IAAMA,OAAyB,GAAG,QAAgC;AAAA,MAA/B;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,GAAR;AAAaC,IAAAA,IAAb;AAAmBC,IAAAA;AAAnB,GAA+B;AACvE,MAAI,CAACH,IAAL,EAAW,OAAO,2DAAP;AACX,SACE,6BAAC,mBAAD;AAAS,IAAA,OAAO,EAAEC;AAAlB,KACE,6BAAC,gBAAD;AAAM,IAAA,IAAI,EAAEC,IAAZ;AAAkB,IAAA,IAAI,EAAC,QAAvB;AAAgC,IAAA,OAAO,EAAED,GAAzC;AAA8C,IAAA,KAAK,EAAEE;AAArD,IADF,CADF;AAKD,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BAAC,qBAAD;AAAuB,MAAA,QAAQ,EAAErB;AAAjC;AANV,KAQG2B,MAAM,CAACC,MAAP,CAAcpB,KAAd,EAAqBqB,GAArB,CAA0B7B,QAAD,IACxB,6BAAC,eAAD;AACE,IAAA,GAAG,EAAEA,QAAQ,CAACC,QADhB;AAEE,IAAA,QAAQ,EAAED,QAFZ;AAGE,IAAA,KAAK,EAAEmB,KAAK,GAAG,CAHjB;AAIE,IAAA,QAAQ,EAAEC,QAJZ;AAKE,IAAA,OAAO,EAAEC;AALX,IADD,CARH,CADF;AAoBD,CAlCM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { FC } from 'react'\nimport {\n Box,\n IconType,\n Icon,\n Tree,\n TreeItem,\n Tooltip,\n Space,\n Paragraph,\n} from '@looker/components'\nimport { Done } from '@styled-icons/material/Done'\nimport { Lock } from '@styled-icons/material/Lock'\nimport { Remove } from '@styled-icons/material/Remove'\nimport { IProperty } from '@looker/sdk-codegen'\nimport { Markdown } from '@looker/code-editor'\nimport {\n expandable,\n ExploreTypeLink,\n pickType,\n pickTypeProps,\n typeIcon,\n} from '.'\n\ninterface TipIconProps {\n show: boolean\n tip: string\n icon: IconType\n title: string\n}\n\n/**\n * Show a tip with icon if show is true\n * @param show true to show tip and icon\n * @param tip to display on hover\n * @param icon name to use\n * @param title for icon\n * @constructor\n */\nexport const TipIcon: FC<TipIconProps> = ({ show, tip, icon, title }) => {\n if (!show) return <></>\n return (\n <Tooltip content={tip}>\n <Icon icon={icon} size=\"xsmall\" content={tip} title={title} />\n </Tooltip>\n )\n}\n\n/**\n * Interface shared by several ExploreProperty components\n */\ninterface ExplorePropertyProps {\n /** property to explore */\n property: IProperty\n /** the current level of the hierarchy */\n level?: number\n /** the maximum depth to expanded nested types. -1 = all (default), 0 = no expansion */\n maxDepth?: number\n /** open all nodes immediately? */\n openAll?: boolean\n}\n\n/**\n * Show required status if a property is required\n * @param property to describe\n * @constructor\n */\nexport const ExplorePropertyRequired: FC<ExplorePropertyProps> = ({\n property,\n}) => {\n const tip = `${property.fullName} is required`\n return (\n <TipIcon\n show={property.required}\n icon={<Done />}\n tip={tip}\n title=\"required property\"\n />\n )\n}\n\n/**\n * Show deprecated status if a property is deprecated\n * @param property to describe\n * @constructor\n */\nexport const ExplorePropertyDeprecated: FC<ExplorePropertyProps> = ({\n property,\n}) => {\n const tip = `${property.fullName} is deprecated`\n return (\n <TipIcon\n show={property.deprecated}\n icon={<Remove />}\n tip={tip}\n title=\"deprecated property\"\n />\n )\n}\n\n/**\n * Show read-only status if a property is read-only\n * @param property to describe\n * @constructor\n */\nexport const ExplorePropertyReadOnly: FC<ExplorePropertyProps> = ({\n property,\n}) => {\n const tip = `${property.fullName} is read-only`\n return (\n <TipIcon\n show={property.readOnly}\n icon={<Lock />}\n tip={tip}\n title=\"read-only property\"\n />\n )\n}\n\n/**\n * Display the property description if it's assigned\n * @param property to describe\n * @constructor\n */\nconst DescriptionParagraph: FC = (props) => (\n <Paragraph fontSize=\"small\" m=\"none\" {...props} />\n)\n\nconst ExplorePropertyDescription: FC<ExplorePropertyProps> = ({ property }) =>\n property.description ? (\n <Markdown\n source={property.description}\n paragraphOverride={DescriptionParagraph}\n />\n ) : null\n\n/**\n * Show the details of the property\n * @param property\n * @constructor\n */\nexport const ExplorePropertyDetail: FC<ExplorePropertyProps> = ({\n property,\n}) => (\n <Space style={{ fontSize: 'small', marginLeft: '10rem' }}>\n <Box width=\"10rem\">\n <ExploreTypeLink type={property.type} />\n </Box>\n <Box width=\"5rem\">\n <ExplorePropertyRequired property={property} />\n <ExplorePropertyReadOnly property={property} />\n <ExplorePropertyDeprecated property={property} />\n </Box>\n <Box width=\"30rem\">\n <ExplorePropertyDescription property={property} />\n </Box>\n </Space>\n)\n\n/**\n * Render a potentially complex property as a non-expanding node\n * @param property to display\n * @constructor\n */\nexport const ExplorePropertyNode: FC<ExplorePropertyProps> = ({ property }) => {\n const legend = typeIcon(property.type)\n return (\n <TreeItem\n {...legend}\n detail={<ExplorePropertyDetail property={property} />}\n >\n {property.jsonName}\n </TreeItem>\n )\n}\n\n/**\n * Render the Tree or TreeItem for this property\n * @param property to display\n * @param level current nesting level\n * @param maxDepth maximum depth to expand\n * @param openAll expands entire tree if true\n * @constructor\n */\nexport const ExploreProperty: FC<ExplorePropertyProps> = ({\n property,\n level = 0,\n maxDepth = -1,\n openAll = false,\n}) => {\n const picked = pickType(property.type)\n if (!picked.intrinsic) {\n return (\n <ExplorePropertyType\n property={property}\n open={false}\n level={level + 1}\n maxDepth={maxDepth}\n openAll={openAll}\n />\n )\n }\n return <ExplorePropertyNode property={property} />\n}\n\ninterface ExplorePropertyTypeProps extends ExplorePropertyProps {\n /** Open the node display immediately? */\n open?: boolean\n}\n\nexport const ExplorePropertyType: FC<ExplorePropertyTypeProps> = ({\n property,\n open = true,\n level = 0,\n maxDepth = -1,\n openAll = false,\n}) => {\n const type = property.type\n const props = pickTypeProps(type)\n const nest = expandable(level, maxDepth)\n const legend = typeIcon(type)\n if (!nest) {\n return <ExplorePropertyNode property={property} />\n }\n return (\n <Tree\n border\n label={`${property.jsonName}`}\n icon={legend.icon}\n defaultOpen={open || openAll}\n density={-3}\n detail={<ExplorePropertyDetail property={property} />}\n >\n {Object.values(props).map((property) => (\n <ExploreProperty\n key={property.fullName}\n property={property}\n level={level + 1}\n maxDepth={maxDepth}\n openAll={openAll}\n />\n ))}\n </Tree>\n )\n}\n"],"file":"ExploreProperty.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ExploreType/ExploreProperty.tsx"],"names":["TipIcon","show","tip","icon","title","ExplorePropertyRequired","property","fullName","required","ExplorePropertyDeprecated","deprecated","ExplorePropertyReadOnly","readOnly","DescriptionParagraph","props","ExplorePropertyDescription","description","ExplorePropertyDetail","api","fontSize","marginLeft","type","ExplorePropertyNode","legend","jsonName","ExploreProperty","level","maxDepth","openAll","picked","intrinsic","ExplorePropertyType","open","nest","Object","values","map"],"mappings":";;;;;;;AA2BA;;AAEA;;AASA;;AACA;;AACA;;AAEA;;AACA;;;;;;AAuBO,IAAMA,OAAyB,GAAG,QAAgC;AAAA,MAA/B;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,GAAR;AAAaC,IAAAA,IAAb;AAAmBC,IAAAA;AAAnB,GAA+B;AACvE,MAAI,CAACH,IAAL,EAAW,OAAO,2DAAP;AACX,SACE,6BAAC,mBAAD;AAAS,IAAA,OAAO,EAAEC;AAAlB,KACE,6BAAC,gBAAD;AAAM,IAAA,IAAI,EAAEC,IAAZ;AAAkB,IAAA,IAAI,EAAC,QAAvB;AAAgC,IAAA,OAAO,EAAED,GAAzC;AAA8C,IAAA,KAAK,EAAEE;AAArD,IADF,CADF;AAKD,CAPM;;;;AA4BA,IAAMC,uBAAiD,GAAG,SAE3D;AAAA,MAF4D;AAChEC,IAAAA;AADgE,GAE5D;AACJ,MAAMJ,GAAG,aAAMI,QAAQ,CAACC,QAAf,iBAAT;AACA,SACE,6BA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AIE,IAAA,WAAW,EAAE6B,IAAI,IAAIJ,OAJvB;AAKE,IAAA,OAAO,EAAE,CAAC,CALZ;AAME,IAAA,MAAM,EAAE,6BAAC,qBAAD;AAAuB,MAAA,GAAG,EAAEV,GAA5B;AAAiC,MAAA,QAAQ,EAAEZ;AAA3C;AANV,KAQG4B,MAAM,CAACC,MAAP,CAAcrB,KAAd,EAAqBsB,GAArB,CAA0B9B,QAAD,IACxB,6BAAC,eAAD;AACE,IAAA,GAAG,EAAEY,GADP;AAEE,IAAA,GAAG,EAAEZ,QAAQ,CAACC,QAFhB;AAGE,IAAA,QAAQ,EAAED,QAHZ;AAIE,IAAA,KAAK,EAAEoB,KAAK,GAAG,CAJjB;AAKE,IAAA,QAAQ,EAAEC,QALZ;AAME,IAAA,OAAO,EAAEC;AANX,IADD,CARH,CADF;AAqBD,CApCM","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 from 'react'\nimport type { IconType } from '@looker/components'\nimport {\n Box,\n Icon,\n Tree,\n TreeItem,\n Tooltip,\n Space,\n Paragraph,\n} from '@looker/components'\nimport { Done } from '@styled-icons/material/Done'\nimport { Lock } from '@styled-icons/material/Lock'\nimport { Remove } from '@styled-icons/material/Remove'\nimport type { IProperty, ApiModel } from '@looker/sdk-codegen'\nimport { Markdown } from '@looker/code-editor'\nimport {\n expandable,\n ExploreTypeLink,\n pickType,\n pickTypeProps,\n typeIcon,\n} from '.'\n\ninterface TipIconProps {\n show: boolean\n tip: string\n icon: IconType\n title: string\n}\n\n/**\n * Show a tip with icon if show is true\n * @param show true to show tip and icon\n * @param tip to display on hover\n * @param icon name to use\n * @param title for icon\n * @constructor\n */\nexport const TipIcon: FC<TipIconProps> = ({ show, tip, icon, title }) => {\n if (!show) return <></>\n return (\n <Tooltip content={tip}>\n <Icon icon={icon} size=\"xsmall\" content={tip} title={title} />\n </Tooltip>\n )\n}\n\n/**\n * Interface shared by several ExploreProperty components\n */\ninterface ExplorePropertyProps {\n /** property to explore */\n property: IProperty\n /** the current level of the hierarchy */\n level?: number\n /** the maximum depth to expanded nested types. -1 = all (default), 0 = no expansion */\n maxDepth?: number\n /** open all nodes immediately? */\n openAll?: boolean\n}\n\n/**\n * Show required status if a property is required\n * @param property to describe\n * @constructor\n */\nexport const ExplorePropertyRequired: FC<ExplorePropertyProps> = ({\n property,\n}) => {\n const tip = `${property.fullName} is required`\n return (\n <TipIcon\n show={property.required}\n icon={<Done />}\n tip={tip}\n title=\"required property\"\n />\n )\n}\n\n/**\n * Show deprecated status if a property is deprecated\n * @param property to describe\n * @constructor\n */\nexport const ExplorePropertyDeprecated: FC<ExplorePropertyProps> = ({\n property,\n}) => {\n const tip = `${property.fullName} is deprecated`\n return (\n <TipIcon\n show={property.deprecated}\n icon={<Remove />}\n tip={tip}\n title=\"deprecated property\"\n />\n )\n}\n\n/**\n * Show read-only status if a property is read-only\n * @param property to describe\n * @constructor\n */\nexport const ExplorePropertyReadOnly: FC<ExplorePropertyProps> = ({\n property,\n}) => {\n const tip = `${property.fullName} is read-only`\n return (\n <TipIcon\n show={property.readOnly}\n icon={<Lock />}\n tip={tip}\n title=\"read-only property\"\n />\n )\n}\n\n/**\n * Display the property description if it's assigned\n * @param property to describe\n * @constructor\n */\nconst DescriptionParagraph: FC = (props) => (\n <Paragraph fontSize=\"small\" m=\"none\" {...props} />\n)\n\nconst ExplorePropertyDescription: FC<ExplorePropertyProps> = ({ property }) =>\n property.description ? (\n <Markdown\n source={property.description}\n paragraphOverride={DescriptionParagraph}\n />\n ) : null\n\ninterface ExploreApiPropertyProps extends ExplorePropertyProps {\n /** parsed api */\n api: ApiModel\n}\n\n/**\n * Show the details of the property\n * @param property\n * @constructor\n */\nexport const ExplorePropertyDetail: FC<ExploreApiPropertyProps> = ({\n property,\n api,\n}) => (\n <Space style={{ fontSize: 'small', marginLeft: '10rem' }}>\n <Box width=\"10rem\">\n <ExploreTypeLink type={property.type} api={api} />\n </Box>\n <Box width=\"5rem\">\n <ExplorePropertyRequired property={property} />\n <ExplorePropertyReadOnly property={property} />\n <ExplorePropertyDeprecated property={property} />\n </Box>\n <Box width=\"30rem\">\n <ExplorePropertyDescription property={property} />\n </Box>\n </Space>\n)\n\n/**\n * Render a potentially complex property as a non-expanding node\n * @param property to display\n * @constructor\n */\nexport const ExplorePropertyNode: FC<ExploreApiPropertyProps> = ({\n property,\n api,\n}) => {\n const legend = typeIcon(property.type)\n return (\n <TreeItem\n {...legend}\n detail={<ExplorePropertyDetail api={api} property={property} />}\n >\n {property.jsonName}\n </TreeItem>\n )\n}\n\n/**\n * Render the Tree or TreeItem for this property\n * @param property to display\n * @param level current nesting level\n * @param maxDepth maximum depth to expand\n * @param openAll expands entire tree if true\n * @constructor\n */\nexport const ExploreProperty: FC<ExploreApiPropertyProps> = ({\n property,\n api,\n level = 0,\n maxDepth = -1,\n openAll = false,\n}) => {\n const picked = pickType(property.type)\n if (!picked.intrinsic) {\n return (\n <ExplorePropertyType\n api={api}\n property={property}\n open={false}\n level={level + 1}\n maxDepth={maxDepth}\n openAll={openAll}\n />\n )\n }\n return <ExplorePropertyNode api={api} property={property} />\n}\n\ninterface ExplorePropertyTypeProps extends ExploreApiPropertyProps {\n /** Open the node display immediately? */\n open?: boolean\n}\n\nexport const ExplorePropertyType: FC<ExplorePropertyTypeProps> = ({\n property,\n api,\n open = true,\n level = 0,\n maxDepth = -1,\n openAll = false,\n}) => {\n const type = property.type\n const props = pickTypeProps(type)\n const nest = expandable(level, maxDepth)\n const legend = typeIcon(type)\n if (!nest) {\n return <ExplorePropertyNode api={api} property={property} />\n }\n return (\n <Tree\n border\n label={`${property.jsonName}`}\n icon={legend.icon}\n defaultOpen={open || openAll}\n density={-3}\n detail={<ExplorePropertyDetail api={api} property={property} />}\n >\n {Object.values(props).map((property) => (\n <ExploreProperty\n api={api}\n key={property.fullName}\n property={property}\n level={level + 1}\n maxDepth={maxDepth}\n openAll={openAll}\n />\n ))}\n </Tree>\n )\n}\n"],"file":"ExploreProperty.js"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { IType } from '@looker/sdk-codegen';
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { IType, ApiModel } from '@looker/sdk-codegen';
|
|
3
3
|
interface ExploreTypeLinkProps {
|
|
4
4
|
type: IType;
|
|
5
|
+
api: ApiModel;
|
|
5
6
|
}
|
|
6
7
|
export declare const ExploreTypeLink: FC<ExploreTypeLinkProps>;
|
|
7
8
|
interface ExploreTypeProps {
|
|
8
9
|
type: IType;
|
|
10
|
+
api: ApiModel;
|
|
9
11
|
open?: boolean;
|
|
10
12
|
link?: boolean;
|
|
11
13
|
level?: number;
|
|
@@ -15,17 +15,18 @@ var _reactRouter = require("react-router");
|
|
|
15
15
|
|
|
16
16
|
var _Link = require("../Link");
|
|
17
17
|
|
|
18
|
-
var _utils = require("../../utils");
|
|
19
|
-
|
|
20
18
|
var _reducers = require("../../reducers");
|
|
21
19
|
|
|
20
|
+
var _utils = require("../../utils");
|
|
21
|
+
|
|
22
22
|
var _ = require(".");
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
26
26
|
var ExploreTypeLink = _ref => {
|
|
27
27
|
var {
|
|
28
|
-
type
|
|
28
|
+
type,
|
|
29
|
+
api
|
|
29
30
|
} = _ref;
|
|
30
31
|
var location = (0, _reactRouter.useLocation)();
|
|
31
32
|
var picked = (0, _.pickType)(type);
|
|
@@ -39,7 +40,7 @@ var ExploreTypeLink = _ref => {
|
|
|
39
40
|
var specKey = (0, _reducers.getSpecKey)(location);
|
|
40
41
|
return _react.default.createElement(_react.default.Fragment, null, prefix, _react.default.createElement(_Link.Link, {
|
|
41
42
|
key: type.fullName,
|
|
42
|
-
to: (0, _utils.
|
|
43
|
+
to: (0, _utils.buildPath)(api, type, specKey)
|
|
43
44
|
}, name), suffix);
|
|
44
45
|
};
|
|
45
46
|
|
|
@@ -48,6 +49,7 @@ exports.ExploreTypeLink = ExploreTypeLink;
|
|
|
48
49
|
var ExploreType = _ref2 => {
|
|
49
50
|
var {
|
|
50
51
|
type,
|
|
52
|
+
api,
|
|
51
53
|
open = true,
|
|
52
54
|
link = false,
|
|
53
55
|
level = 0,
|
|
@@ -66,9 +68,11 @@ var ExploreType = _ref2 => {
|
|
|
66
68
|
detail: _react.default.createElement(_react.default.Fragment, null, !!type.description && _react.default.createElement(_components.TreeItem, {
|
|
67
69
|
key: type.name
|
|
68
70
|
}, type.description), link && _react.default.createElement(ExploreTypeLink, {
|
|
69
|
-
type: type
|
|
71
|
+
type: type,
|
|
72
|
+
api: api
|
|
70
73
|
}))
|
|
71
74
|
}, nest && Object.values(props).map(property => _react.default.createElement(_.ExploreProperty, {
|
|
75
|
+
api: api,
|
|
72
76
|
key: property.fullName,
|
|
73
77
|
property: property,
|
|
74
78
|
level: level + 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ExploreType/ExploreType.tsx"],"names":["ExploreTypeLink","type","location","picked","name","prefix","suffix","typed","TypeOfType","Intrinsic","jsonName","specKey","fullName","ExploreType","open","link","level","maxDepth","openAll","props","nest","legend","icon","description","Object","values","map","property"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ExploreType/ExploreType.tsx"],"names":["ExploreTypeLink","type","api","location","picked","name","prefix","suffix","typed","TypeOfType","Intrinsic","jsonName","specKey","fullName","ExploreType","open","link","level","maxDepth","openAll","props","nest","legend","icon","description","Object","values","map","property"],"mappings":";;;;;;;AA2BA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAcO,IAAMA,eAAyC,GAAG,QAAmB;AAAA,MAAlB;AAAEC,IAAAA,IAAF;AAAQC,IAAAA;AAAR,GAAkB;AAC1E,MAAMC,QAAQ,GAAG,+BAAjB;AACA,MAAMC,MAAM,GAAG,gBAASH,IAAT,CAAf;AACA,MAAMI,IAAI,GAAGD,MAAM,CAACC,IAApB;AACA,MAAMC,MAAM,GAAG,sBAAeL,IAAf,CAAf;AACA,MAAMM,MAAM,GAAG,sBAAeN,IAAf,CAAf;AACA,MAAMO,KAAK,GAAG,4BAAWJ,MAAX,CAAd;AACA,MAAII,KAAK,KAAKC,uBAAWC,SAAzB,EACE,OAAO,6BAAC,gBAAD;AAAM,IAAA,QAAQ,EAAC;AAAf,KAAwBT,IAAI,CAACU,QAA7B,CAAP;AAEF,MAAMC,OAAO,GAAG,0BAAWT,QAAX,CAAhB;AACA,SACE,4DACGG,MADH,EAEE,6BAAC,UAAD;AAAM,IAAA,GAAG,EAAEL,IAAI,CAACY,QAAhB;AAA0B,IAAA,EAAE,EAAE,sBAAUX,GAAV,EAAeD,IAAf,EAAqBW,OAArB;AAA9B,KACGP,IADH,CAFF,EAKGE,MALH,CADF;AASD,CApBM;;;;AAuCA,IAAMO,WAAiC,GAAG,SAQ3C;AA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,CADF;AA6BD,CAzCM","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 from 'react'\nimport { Code, Tree, TreeItem } from '@looker/components'\nimport type { IType, ApiModel } from '@looker/sdk-codegen'\nimport { TypeOfType, typeOfType } from '@looker/sdk-codegen'\nimport { useLocation } from 'react-router'\nimport { Link } from '../Link'\nimport { getSpecKey } from '../../reducers'\nimport { buildPath } from '../../utils'\nimport {\n ExploreProperty,\n pickType,\n pickTypeProps,\n typeIcon,\n typeLinkPrefix,\n typeLinkSuffix,\n} from '.'\n\ninterface ExploreTypeLinkProps {\n type: IType\n api: ApiModel\n}\n\nexport const ExploreTypeLink: FC<ExploreTypeLinkProps> = ({ type, api }) => {\n const location = useLocation()\n const picked = pickType(type)\n const name = picked.name\n const prefix = typeLinkPrefix(type)\n const suffix = typeLinkSuffix(type)\n const typed = typeOfType(picked)\n if (typed === TypeOfType.Intrinsic)\n return <Code fontSize=\"small\">{type.jsonName}</Code>\n\n const specKey = getSpecKey(location)\n return (\n <>\n {prefix}\n <Link key={type.fullName} to={buildPath(api, type, specKey)}>\n {name}\n </Link>\n {suffix}\n </>\n )\n}\n\ninterface ExploreTypeProps {\n /** Type to explore */\n type: IType\n /** parsed specification */\n api: ApiModel\n /** Open the node display immediately */\n open?: boolean\n /** Create a link to the type? */\n link?: boolean\n /** the nesting level of the type */\n level?: number\n /** the maximum depth to expanded nested types. -1 = all (default), 0 = no expansion */\n maxDepth?: number\n /** open all nodes immediately? */\n openAll?: boolean\n}\n\nexport const ExploreType: FC<ExploreTypeProps> = ({\n type,\n api,\n open = true,\n link = false,\n level = 0,\n maxDepth = -1,\n openAll = false,\n}) => {\n const props = pickTypeProps(type)\n const nest = maxDepth === -1 || level < maxDepth\n const legend = typeIcon(type)\n return (\n <Tree\n border\n label={type.name}\n icon={legend.icon}\n defaultOpen={open || openAll}\n density={-3}\n detail={\n <>\n {!!type.description && (\n <TreeItem key={type.name}>{type.description}</TreeItem>\n )}\n {link && <ExploreTypeLink type={type} api={api} />}\n </>\n }\n >\n {nest &&\n Object.values(props).map((property) => (\n <ExploreProperty\n api={api}\n key={property.fullName}\n property={property}\n level={level + 1}\n maxDepth={maxDepth}\n openAll={openAll}\n />\n ))}\n </Tree>\n )\n}\n"],"file":"ExploreType.js"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IconType } from '@looker/components';
|
|
2
|
-
import { IType } from '@looker/sdk-codegen';
|
|
1
|
+
import type { IconType } from '@looker/components';
|
|
2
|
+
import type { IType } from '@looker/sdk-codegen';
|
|
3
3
|
export declare const pickType: (value: IType) => IType;
|
|
4
4
|
export declare const expandable: (level: number, maxDepth?: number) => boolean;
|
|
5
5
|
export declare const pickTypeProps: (value: IType) => import("@looker/sdk-codegen").PropertyList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ExploreType/exploreUtils.tsx"],"names":["pickType","value","typed","TypeOfType","Intrinsic","Complex","elementType","expandable","level","maxDepth","pickTypeProps","properties","typeLinkPrefix","Hash","typeLinkSuffix","Array","DelimArray","typeIcon","className","icon","title","jsonName","type"],"mappings":";;;;;;;AA0BA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ExploreType/exploreUtils.tsx"],"names":["pickType","value","typed","TypeOfType","Intrinsic","Complex","elementType","expandable","level","maxDepth","pickTypeProps","properties","typeLinkPrefix","Hash","typeLinkSuffix","Array","DelimArray","typeIcon","className","icon","title","jsonName","type"],"mappings":";;;;;;;AA0BA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;AAMO,IAAMA,QAAQ,GAAIC,KAAD,IAAkB;AACxC,MAAMC,KAAK,GAAG,4BAAWD,KAAX,CAAd;;AACA,UAAQC,KAAR;AACE,SAAKC,uBAAWC,SAAhB;AACA,SAAKD,uBAAWE,OAAhB;AACE,aAAOJ,KAAP;;AACF;AACE,aAAOA,KAAK,CAACK,WAAb;AALJ;AAOD,CATM;;;;AAgBA,IAAMC,UAAU,GAAG,SAAbA,UAAa,CAACC,KAAD;AAAA,MAAgBC,QAAhB,uEAA2B,CAAC,CAA5B;AAAA,SACxBA,QAAQ,KAAK,CAAC,CAAd,IAAmBD,KAAK,IAAIC,QADJ;AAAA,CAAnB;;;;AAOA,IAAMC,aAAa,GAAIT,KAAD,IAAkBD,QAAQ,CAACC,KAAD,CAAR,CAAgBU,UAAxD;;;;AAMA,IAAMC,cAAc,GAAIX,KAAD,IAAkB;AAC9C,MAAMC,KAAK,GAAG,4BAAWD,KAAX,CAAd;;AACA,UAAQC,KAAR;AACE,SAAKC,uBAAWU,IAAhB;AACE,aAAO,OAAP;;AACF;AACE,aAAO,EAAP;AAJJ;AAMD,CARM;;;;AAcA,IAAMC,cAAc,GAAIb,KAAD,IAAkB;AAC9C,MAAMC,KAAK,GA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,SAAK,UAAL;AACA,SAAK,MAAL;AACA,SAAK,MAAL;AACA,SAAK,MAAL;AACE,aAAO;AAAEF,QAAAA,IAAI,EAAE,6BAAC,kBAAD,OAAR;AAAyBC,QAAAA,KAAK,EAAEE,IAAI,CAACD;AAArC,OAAP;;AACF,SAAK,OAAL;AACE,aAAO;AAAEF,QAAAA,IAAI,EAAE,6BAAC,uBAAD,OAAR;AAAmBC,QAAAA,KAAK,EAAEE,IAAI,CAACD;AAA/B,OAAP;;AACF,SAAK,UAAL;AACE,aAAO;AAAEF,QAAAA,IAAI,EAAE,6BAAC,cAAD,OAAR;AAAoBC,QAAAA,KAAK,EAAEE,IAAI,CAACD;AAAhC,OAAP;;AACF,SAAK,KAAL;AACE,aAAO;AAAEF,QAAAA,IAAI,EAAE,6BAAC,UAAD,OAAR;AAAkBC,QAAAA,KAAK,EAAEE,IAAI,CAACD;AAA9B,OAAP;;AACF,SAAK,UAAL;AACE,aAAO;AAAEF,QAAAA,IAAI,EAAE,6BAAC,4BAAD,OAAR;AAA2BC,QAAAA,KAAK,EAAEE,IAAI,CAACD;AAAvC,OAAP;;AACF;AACE,aAAO;AAAEF,QAAAA,IAAI,EAAE,6BAAC,UAAD,OAAR;AAAkBC,QAAAA,KAAK,EAAEE,IAAI,CAACD;AAA9B,OAAP;AAvBJ;AAyBD,CAtCM","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 type { IconType } from '@looker/components'\nimport { FieldString, IdeFileManifest, IdeParameter } from '@looker/icons'\nimport { CalendarToday } from '@styled-icons/material/CalendarToday'\nimport { Check } from '@styled-icons/material/Check'\nimport { Code } from '@styled-icons/material/Code'\nimport { Link } from '@styled-icons/material/Link'\nimport { Toc } from '@styled-icons/material/Toc'\nimport { VpnKey } from '@styled-icons/material/VpnKey'\nimport { Tag } from '@styled-icons/material-rounded'\nimport { Email } from '@styled-icons/material-outlined'\nimport type { IType } from '@looker/sdk-codegen'\nimport { TypeOfType, typeOfType } from '@looker/sdk-codegen'\n\n/**\n * Get the type or element type if this type is a collection\n * @param value type to pick\n */\nexport const pickType = (value: IType) => {\n const typed = typeOfType(value)\n switch (typed) {\n case TypeOfType.Intrinsic:\n case TypeOfType.Complex:\n return value\n default:\n return value.elementType!\n }\n}\n\n/**\n * Is this an expandable node?\n * @param level is the current level of the hierarchy\n * @param maxDepth is the maximum depth to expanded nested types. -1 = all (default), 0 = no expansion\n */\nexport const expandable = (level: number, maxDepth = -1) =>\n maxDepth === -1 || level <= maxDepth\n\n/**\n * Gets the properties for the \"exploring\" type\n * @param value type to pick\n */\nexport const pickTypeProps = (value: IType) => pickType(value).properties\n\n/**\n * Get the link prefix for the type\n * @param value type to link to\n */\nexport const typeLinkPrefix = (value: IType) => {\n const typed = typeOfType(value)\n switch (typed) {\n case TypeOfType.Hash:\n return 'Hash['\n default:\n return ''\n }\n}\n\n/**\n * Get the link suffix for the type\n * @param value type to link to\n */\nexport const typeLinkSuffix = (value: IType) => {\n const typed = typeOfType(value)\n switch (typed) {\n case TypeOfType.Array:\n case TypeOfType.DelimArray:\n return '[]'\n case TypeOfType.Hash:\n return ']'\n default:\n return ''\n }\n}\n\ninterface TypedIcon {\n icon: IconType\n title: string\n}\n\n/**\n * Determines the icon name for the type\n * @param value to iconize\n */\nexport const typeIcon = (value: IType): TypedIcon => {\n switch (value.className) {\n case 'ArrayType':\n return { icon: <Toc />, title: value.jsonName }\n case 'DelimArrayType':\n return { icon: <Toc />, title: value.jsonName }\n case 'HashType':\n return { icon: <IdeFileManifest />, title: value.jsonName }\n case 'EnumType':\n return { icon: <IdeParameter />, title: value.jsonName }\n }\n\n const type = pickType(value)\n switch (type.jsonName) {\n case 'boolean':\n return { icon: <Check />, title: type.jsonName }\n case 'int64':\n case 'integer':\n case 'float':\n case 'double':\n return { icon: <Tag />, title: type.jsonName }\n case 'string':\n case 'hostname':\n case 'uuid':\n case 'ipv4':\n case 'ipv6':\n return { icon: <FieldString />, title: type.jsonName }\n case 'email':\n return { icon: <Email />, title: type.jsonName }\n case 'password':\n return { icon: <VpnKey />, title: type.jsonName }\n case 'uri':\n return { icon: <Link />, title: type.jsonName }\n case 'datetime':\n return { icon: <CalendarToday />, title: type.jsonName }\n default:\n return { icon: <Code />, title: type.jsonName }\n }\n}\n"],"file":"exploreUtils.js"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { SpecList, SpecItem } from '@looker/sdk-codegen';
|
|
3
|
-
import { SpecAction } from '../../reducers';
|
|
1
|
+
import type { FC, Dispatch } from 'react';
|
|
2
|
+
import type { SpecList, SpecItem } from '@looker/sdk-codegen';
|
|
3
|
+
import type { SpecAction } from '../../reducers';
|
|
4
4
|
interface HeaderProps {
|
|
5
5
|
specs: SpecList;
|
|
6
6
|
spec: SpecItem;
|
|
@@ -9,6 +9,7 @@ interface HeaderProps {
|
|
|
9
9
|
className?: string;
|
|
10
10
|
}
|
|
11
11
|
export declare const HEADER_REM = 4;
|
|
12
|
+
export declare const HEADER_TOGGLE_LABEL = "Toggle Navigation";
|
|
12
13
|
export declare const HeaderLayout: FC<HeaderProps>;
|
|
13
|
-
export declare const Header: import("styled-components").StyledComponent<
|
|
14
|
+
export declare const Header: import("styled-components").StyledComponent<FC<HeaderProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
14
15
|
export {};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.Header = exports.HeaderLayout = exports.HEADER_REM = void 0;
|
|
6
|
+
exports.Header = exports.HeaderLayout = exports.HEADER_TOGGLE_LABEL = exports.HEADER_REM = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -23,6 +23,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
23
23
|
|
|
24
24
|
var HEADER_REM = 4;
|
|
25
25
|
exports.HEADER_REM = HEADER_REM;
|
|
26
|
+
var HEADER_TOGGLE_LABEL = 'Toggle Navigation';
|
|
27
|
+
exports.HEADER_TOGGLE_LABEL = HEADER_TOGGLE_LABEL;
|
|
26
28
|
|
|
27
29
|
var HeaderLayout = _ref => {
|
|
28
30
|
var {
|
|
@@ -41,7 +43,8 @@ var HeaderLayout = _ref => {
|
|
|
41
43
|
size: "small",
|
|
42
44
|
onClick: () => toggleNavigation(),
|
|
43
45
|
icon: _react.default.createElement(_Menu.Menu, null),
|
|
44
|
-
label: "
|
|
46
|
+
"aria-label": "nav toggle",
|
|
47
|
+
label: HEADER_TOGGLE_LABEL
|
|
45
48
|
}), _react.default.createElement(_Link.Link, {
|
|
46
49
|
to: "/".concat(spec.key)
|
|
47
50
|
}, _react.default.createElement(_components.Space, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Header/Header.tsx"],"names":["HEADER_REM","HeaderLayout","className","specs","spec","specDispatch","toggleNavigation","key","width","Header","theme","colors","ui2"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Header/Header.tsx"],"names":["HEADER_REM","HEADER_TOGGLE_LABEL","HeaderLayout","className","specs","spec","specDispatch","toggleNavigation","key","width","Header","theme","colors","ui2"],"mappings":";;;;;;;AA2BA;;AACA;;AACA;;AAOA;;AACA;;AAGA;;AAEA;;;;AAcO,IAAMA,UAAU,GAAG,CAAnB;;AAEA,IAAMC,mBAAmB,GAAG,mBAA5B;;;AAKA,IAAMC,YAA6B,GAAG;AAAA,MAAC;AAC5CC,IAAAA,SAD4C;AAE5CC,IAAAA,KAF4C;AAG5CC,IAAAA,IAH4C;AAI5CC,IAAAA,YAJ4C;AAK5CC,IAAAA;AAL4C,GAAD;AAAA,SAO3C,6BAAC,kBAAD;AACE,IAAA,MAAM,YAAKP,UAAL,QADR;AAEE,IAAA,SAAS,EAAEG,SAFb;AAGE,IAAA,EAAE,EAAC,OAHL;AAIE,IAAA,EAAE,EAAC;AAJL,KAME,6BAAC,iBAAD,QACE,6BAAC,sBAAD;AACE,IAAA,IAAI,EAAC,OADP;AAEE,IAAA,OAAO,EAAE,MAAMI,gBAAgB,EAFjC;AAGE,IAAA,IAAI,EAAE,6BAAC,UAAD,OAHR;AAIE,kBAAW,YAJb;AAKE,IAAA,KAAK,EAAEN;AALT,IADF,EASE,6BAAC,UAAD;AAAM,IAAA,EAAE,aAAMI,IAAI,CAACG,GAAX;AAAR,KACE,6BAAC,iBAAD;AAAO,IAAA,GAAG,EAAC;AAAX,KACE,6BAAC,gBAAD;AACE,IAAA,IAAI,EAAE,6BAAC,iBAAD,OADR;AAEE,IAAA,GAAG,EAAC,QAFN;AAGE,IAAA,KAAK,EAAC,OAHR;AAIE,IAAA,KAAK,EAAE;AAAEC,MAAAA,KAAK,EAAE;AAAT;AAJT,IADF,EAOE,6BAAC,mBAAD;AAAS,IAAA,KAAK,EAAC;AAAf,oBAPF,CADF,CATF,CANF,EA2BE,6BAAC,oCAAD;AAAmB,IAAA,KAAK,EAAEL,KAA1B;AAAiC,IAAA,IAAI,EAAEC,IAAvC;AAA6C,IAAA,YAAY,EAAEC;AAA3D,IA3BF,CAP2C;AAAA,CAAtC;;;AAsCA,IAAMI,MAAM,GAAG,+BAAOR,YAAP,CAAH;AAAA;AAAA;AAAA,sCACU;AAAA,MAAC;AAAES,IAAAA;AAAF,GAAD;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaC,GAA5B;AAAA,CADV,CAAZ","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, Dispatch } from 'react'\nimport React from 'react'\nimport styled from 'styled-components'\nimport {\n Icon,\n Space,\n IconButton,\n Heading,\n Header as SemanticHeader,\n} from '@looker/components'\nimport { LookerLogo } from '@looker/icons'\nimport { Menu } from '@styled-icons/material/Menu'\nimport type { SpecList, SpecItem } from '@looker/sdk-codegen'\n\nimport { Link } from '../Link'\nimport type { SpecAction } from '../../reducers'\nimport { SelectorContainer } from '../SelectorContainer'\n\ninterface HeaderProps {\n /** Specs to choose from */\n specs: SpecList\n /** Current selected spec */\n spec: SpecItem\n /** Spec state setter */\n specDispatch: Dispatch<SpecAction>\n /** Nav state setter */\n toggleNavigation: (target?: boolean) => void\n className?: string\n}\n\nexport const HEADER_REM = 4\n\nexport const HEADER_TOGGLE_LABEL = 'Toggle Navigation'\n\n/**\n * Renders the API Explorer header\n */\nexport const HeaderLayout: FC<HeaderProps> = ({\n className,\n specs,\n spec,\n specDispatch,\n toggleNavigation,\n}) => (\n <SemanticHeader\n height={`${HEADER_REM}rem`}\n className={className}\n pl=\"small\"\n pr=\"large\"\n >\n <Space>\n <IconButton\n size=\"small\"\n onClick={() => toggleNavigation()}\n icon={<Menu />}\n aria-label=\"nav toggle\"\n label={HEADER_TOGGLE_LABEL}\n />\n\n <Link to={`/${spec.key}`}>\n <Space gap=\"small\">\n <Icon\n icon={<LookerLogo />}\n alt=\"Looker\"\n color=\"text5\"\n style={{ width: '82px' }}\n />\n <Heading color=\"key\">API Explorer</Heading>\n </Space>\n </Link>\n </Space>\n <SelectorContainer specs={specs} spec={spec} specDispatch={specDispatch} />\n </SemanticHeader>\n)\n\nexport const Header = styled(HeaderLayout)`\n border-bottom: 1px solid ${({ theme }) => theme.colors.ui2};\n`\n"],"file":"Header.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Header, HEADER_REM } from './Header';
|
|
1
|
+
export { Header, HEADER_REM, HEADER_TOGGLE_LABEL } from './Header';
|
|
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "HEADER_REM", {
|
|
|
15
15
|
return _Header.HEADER_REM;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "HEADER_TOGGLE_LABEL", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _Header.HEADER_TOGGLE_LABEL;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
18
24
|
|
|
19
25
|
var _Header = require("./Header");
|
|
20
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Header/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Header/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyBA","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 { Header, HEADER_REM, HEADER_TOGGLE_LABEL } from './Header'\n"],"file":"index.js"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FC, Dispatch } from 'react';
|
|
2
|
-
import { SpecList, SpecItem } from '@looker/sdk-codegen';
|
|
3
|
-
import { SpecAction } from '../../reducers';
|
|
1
|
+
import type { FC, Dispatch } from 'react';
|
|
2
|
+
import type { SpecList, SpecItem } from '@looker/sdk-codegen';
|
|
3
|
+
import type { SpecAction } from '../../reducers';
|
|
4
4
|
interface ApiSpecSelectorProps {
|
|
5
5
|
specs: SpecList;
|
|
6
6
|
spec: SpecItem;
|
|
@@ -22,6 +22,7 @@ var ApiSpecSelector = _ref => {
|
|
|
22
22
|
specDispatch
|
|
23
23
|
} = _ref;
|
|
24
24
|
var history = (0, _reactRouterDom.useHistory)();
|
|
25
|
+
var location = (0, _reactRouterDom.useLocation)();
|
|
25
26
|
var options = Object.entries(specs).map(_ref2 => {
|
|
26
27
|
var [key, spec] = _ref2;
|
|
27
28
|
return {
|
|
@@ -33,7 +34,8 @@ var ApiSpecSelector = _ref => {
|
|
|
33
34
|
|
|
34
35
|
var handleChange = specKey => {
|
|
35
36
|
specDispatch((0, _reducers.selectSpec)(specKey));
|
|
36
|
-
|
|
37
|
+
var matchPath = location.pathname.replace("/".concat(spec.key), "/".concat(specKey));
|
|
38
|
+
history.push(matchPath);
|
|
37
39
|
};
|
|
38
40
|
|
|
39
41
|
return _react.default.createElement(_components.Select, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/SelectorContainer/ApiSpecSelector.tsx"],"names":["ApiSpecSelector","specs","spec","specDispatch","history","options","Object","entries","map","key","value","label","description","status","handleChange","specKey","push"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SelectorContainer/ApiSpecSelector.tsx"],"names":["ApiSpecSelector","specs","spec","specDispatch","history","location","options","Object","entries","map","key","value","label","description","status","handleChange","specKey","matchPath","pathname","replace","push"],"mappings":";;;;;;;AA2BA;;AACA;;AACA;;AAIA;;;;AAQO,IAAMA,eAAyC,GAAG,QAInD;AAAA,MAJoD;AACxDC,IAAAA,KADwD;AAExDC,IAAAA,IAFwD;AAGxDC,IAAAA;AAHwD,GAIpD;AACJ,MAAMC,OAAO,GAAG,iCAAhB;AACA,MAAMC,QAAQ,GAAG,kCAAjB;AACA,MAAMC,OAAO,GAAGC,MAAM,CAACC,OAAP,CAAeP,KAAf,EAAsBQ,GAAtB,CAA0B;AAAA,QAAC,CAACC,GAAD,EAAMR,IAAN,CAAD;AAAA,WAAkB;AAC1DS,MAAAA,KAAK,EAAED,GADmD;AAE1DE,MAAAA,KAAK,EAAEF,GAFmD;AAG1DG,MAAAA,WAAW,EAAEX,IAAI,CAACY;AAHwC,KAAlB;AAAA,GAA1B,CAAhB;;AAMA,MAAMC,YAAY,GAAIC,OAAD,IAAqB;AACxCb,IAAAA,YAAY,CAAC,0BAAWa,OAAX,CAAD,CAAZ;AACA,QAAMC,SAAS,GAAGZ,QAAQ,CAACa,QAAT,CAAkBC,OAAlB,YAA8BjB,IAAI,CAACQ,GAAnC,cAA8CM,OAA9C,EAAlB;AACAZ,IAAAA,OAAO,CAACgB,IAAR,CAAaH,SAAb;AACD,GAJD;;AAMA,SACE,6BAAC,kBAAD;AACE,IAAA,KAAK,EAAC,OADR;AAEE,kBAAW,eAFb;AAGE,IAAA,YAAY,EAAEf,IAAI,CAACQ,GAHrB;AAIE,IAAA,OAAO,EAAEJ,OAJX;AAKE,IAAA,QAAQ,EAAES;AALZ,IADF;AASD,CA5BM","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, Dispatch } from 'react'\nimport React from 'react'\nimport { Select } from '@looker/components'\nimport { useHistory, useLocation } from 'react-router-dom'\n\nimport type { SpecList, SpecItem } from '@looker/sdk-codegen'\nimport type { SpecAction } from '../../reducers'\nimport { selectSpec } from '../../reducers'\n\ninterface ApiSpecSelectorProps {\n specs: SpecList\n spec: SpecItem\n specDispatch: Dispatch<SpecAction>\n}\n\nexport const ApiSpecSelector: FC<ApiSpecSelectorProps> = ({\n specs,\n spec,\n specDispatch,\n}) => {\n const history = useHistory()\n const location = useLocation()\n const options = Object.entries(specs).map(([key, spec]) => ({\n value: key,\n label: key,\n description: spec.status,\n }))\n\n const handleChange = (specKey: string) => {\n specDispatch(selectSpec(specKey))\n const matchPath = location.pathname.replace(`/${spec.key}`, `/${specKey}`)\n history.push(matchPath)\n }\n\n return (\n <Select\n width=\"10rem\"\n aria-label=\"spec selector\"\n defaultValue={spec.key}\n options={options}\n onChange={handleChange}\n />\n )\n}\n"],"file":"ApiSpecSelector.js"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import type { FC } from 'react';
|
|
2
2
|
export declare const SdkLanguageSelector: FC;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.SdkLanguageSelector = void 0;
|
|
7
7
|
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
10
|
var _sdkCodegen = require("@looker/sdk-codegen");
|
|
11
11
|
|
|
@@ -13,26 +13,15 @@ var _components = require("@looker/components");
|
|
|
13
13
|
|
|
14
14
|
var _reactRedux = require("react-redux");
|
|
15
15
|
|
|
16
|
-
var _hooks = require("../../hooks");
|
|
17
|
-
|
|
18
16
|
var _state = require("../../state");
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var _utils = require("../../utils");
|
|
23
|
-
|
|
24
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
-
|
|
26
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
19
|
|
|
28
20
|
var SdkLanguageSelector = () => {
|
|
29
21
|
var {
|
|
30
22
|
setSdkLanguageAction
|
|
31
|
-
} = (0,
|
|
32
|
-
var selectedSdkLanguage = (0, _reactRedux.useSelector)(_state.
|
|
33
|
-
var {
|
|
34
|
-
envAdaptor
|
|
35
|
-
} = (0, _react.useContext)(_context.EnvAdaptorContext);
|
|
23
|
+
} = (0, _state.useSettingActions)();
|
|
24
|
+
var selectedSdkLanguage = (0, _reactRedux.useSelector)(_state.selectSdkLanguage);
|
|
36
25
|
|
|
37
26
|
var allSdkLanguages = _sdkCodegen.codeGenerators.map(gen => ({
|
|
38
27
|
value: gen.language
|
|
@@ -45,8 +34,9 @@ var SdkLanguageSelector = () => {
|
|
|
45
34
|
});
|
|
46
35
|
|
|
47
36
|
var handleChange = language => {
|
|
48
|
-
setSdkLanguageAction(
|
|
49
|
-
|
|
37
|
+
setSdkLanguageAction({
|
|
38
|
+
sdkLanguage: language
|
|
39
|
+
});
|
|
50
40
|
};
|
|
51
41
|
|
|
52
42
|
return _react.default.createElement(_components.Select, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/SelectorContainer/SdkLanguageSelector.tsx"],"names":["SdkLanguageSelector","setSdkLanguageAction","selectedSdkLanguage","
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SelectorContainer/SdkLanguageSelector.tsx"],"names":["SdkLanguageSelector","setSdkLanguageAction","selectedSdkLanguage","selectSdkLanguage","allSdkLanguages","codeGenerators","map","gen","value","language","push","options","handleChange","sdkLanguage"],"mappings":";;;;;;;AA0BA;;AACA;;AACA;;AACA;;AAGA;;;;AAKO,IAAMA,mBAAuB,GAAG,MAAM;AAC3C,MAAM;AAAEC,IAAAA;AAAF,MAA2B,+BAAjC;AACA,MAAMC,mBAAmB,GAAG,6BAAYC,wBAAZ,CAA5B;;AAEA,MAAMC,eAAoC,GAAGC,2BAAeC,GAAf,CAAoBC,GAAD,KAAU;AACxEC,IAAAA,KAAK,EAAED,GAAG,CAACE;AAD6D,GAAV,CAAnB,CAA7C;;AAIAL,EAAAA,eAAe,CAACM,IAAhB,CAAqB;AACnBC,IAAAA,OAAO,EAAE,CACP;AACEH,MAAAA,KAAK,EAAE;AADT,KADO;AADU,GAArB;;AAQA,MAAMI,YAAY,GAAIH,QAAD,IAAsB;AACzCR,IAAAA,oBAAoB,CAAC;AAAEY,MAAAA,WAAW,EAAEJ;AAAf,KAAD,CAApB;AACD,GAFD;;AAIA,SACE,6BAAC,kBAAD;AACE,kBAAW,uBADb;AAEE,IAAA,KAAK,EAAEP,mBAFT;AAGE,IAAA,QAAQ,EAAEU,YAHZ;AAIE,IAAA,OAAO,EAAER;AAJX,IADF;AAQD,CA5BM","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 { codeGenerators } from '@looker/sdk-codegen'\nimport { Select } from '@looker/components'\nimport { useSelector } from 'react-redux'\nimport type { SelectOptionProps } from '@looker/components'\n\nimport { useSettingActions, selectSdkLanguage } from '../../state'\n\n/**\n * Allows the user to select their preferred SDK language\n */\nexport const SdkLanguageSelector: FC = () => {\n const { setSdkLanguageAction } = useSettingActions()\n const selectedSdkLanguage = useSelector(selectSdkLanguage)\n\n const allSdkLanguages: SelectOptionProps[] = codeGenerators.map((gen) => ({\n value: gen.language,\n }))\n\n allSdkLanguages.push({\n options: [\n {\n value: 'All',\n },\n ],\n })\n\n const handleChange = (language: string) => {\n setSdkLanguageAction({ sdkLanguage: language })\n }\n\n return (\n <Select\n aria-label=\"sdk language selector\"\n value={selectedSdkLanguage}\n onChange={handleChange}\n options={allSdkLanguages}\n />\n )\n}\n"],"file":"SdkLanguageSelector.js"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { FC, Dispatch } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import type { FC, Dispatch } from 'react';
|
|
2
|
+
import type { SpaceHelperProps } from '@looker/components';
|
|
3
|
+
import type { SpecList, SpecItem } from '@looker/sdk-codegen';
|
|
4
|
+
import type { SpecAction } from '../../reducers';
|
|
5
|
+
interface SelectorContainerProps extends SpaceHelperProps {
|
|
5
6
|
specs: SpecList;
|
|
6
7
|
spec: SpecItem;
|
|
7
8
|
specDispatch: Dispatch<SpecAction>;
|
|
@@ -21,6 +21,12 @@ var _ApiSpecSelector = require("./ApiSpecSelector");
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
25
|
+
|
|
26
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
27
|
+
|
|
28
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
29
|
+
|
|
24
30
|
var HEADER_REM = 4;
|
|
25
31
|
exports.HEADER_REM = HEADER_REM;
|
|
26
32
|
|
|
@@ -29,10 +35,12 @@ var SelectorContainer = _ref => {
|
|
|
29
35
|
specs,
|
|
30
36
|
spec,
|
|
31
37
|
specDispatch
|
|
32
|
-
} = _ref
|
|
33
|
-
|
|
38
|
+
} = _ref,
|
|
39
|
+
spaceProps = _objectWithoutProperties(_ref, ["specs", "spec", "specDispatch"]);
|
|
40
|
+
|
|
41
|
+
return _react.default.createElement(_components.Space, _extends({
|
|
34
42
|
width: "auto"
|
|
35
|
-
}, _react.default.createElement(_SdkLanguageSelector.SdkLanguageSelector, null), _react.default.createElement(_ApiSpecSelector.ApiSpecSelector, {
|
|
43
|
+
}, spaceProps), _react.default.createElement(_SdkLanguageSelector.SdkLanguageSelector, null), _react.default.createElement(_ApiSpecSelector.ApiSpecSelector, {
|
|
36
44
|
specs: specs,
|
|
37
45
|
spec: spec,
|
|
38
46
|
specDispatch: specDispatch
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/SelectorContainer/SelectorContainer.tsx"],"names":["HEADER_REM","SelectorContainer","specs","spec","specDispatch","diffPath","key"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SelectorContainer/SelectorContainer.tsx"],"names":["HEADER_REM","SelectorContainer","specs","spec","specDispatch","spaceProps","diffPath","key"],"mappings":";;;;;;;AA2BA;;AAEA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;;;;;;;;;AAWO,IAAMA,UAAU,GAAG,CAAnB;;;AAKA,IAAMC,iBAA6C,GAAG;AAAA,MAAC;AAC5DC,IAAAA,KAD4D;AAE5DC,IAAAA,IAF4D;AAG5DC,IAAAA;AAH4D,GAAD;AAAA,MAIxDC,UAJwD;;AAAA,SAM3D,6BAAC,iBAAD;AAAO,IAAA,KAAK,EAAC;AAAb,KAAwBA,UAAxB,GACE,6BAAC,wCAAD,OADF,EAEE,6BAAC,gCAAD;AAAiB,IAAA,KAAK,EAAEH,KAAxB;AAA+B,IAAA,IAAI,EAAEC,IAArC;AAA2C,IAAA,YAAY,EAAEC;AAAzD,IAFF,EAGE,6BAAC,UAAD;AAAM,IAAA,EAAE,aAAME,eAAN,cAAkBH,IAAI,CAACI,GAAvB;AAAR,KACE,6BAAC,sBAAD;AACE,IAAA,MAAM,MADR;AAEE,IAAA,KAAK,EAAC,wBAFR;AAGE,IAAA,IAAI,EAAE,6BAAC,4BAAD,OAHR;AAIE,IAAA,IAAI,EAAC;AAJP,IADF,CAHF,CAN2D;AAAA,CAAtD","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, Dispatch } from 'react'\nimport React from 'react'\nimport type { SpaceHelperProps } from '@looker/components'\nimport { Space, IconButton } from '@looker/components'\nimport { ChangeHistory } from '@styled-icons/material/ChangeHistory'\nimport type { SpecList, SpecItem } from '@looker/sdk-codegen'\nimport { Link } from '../Link'\nimport type { SpecAction } from '../../reducers'\nimport { diffPath } from '../../utils'\nimport { SdkLanguageSelector } from './SdkLanguageSelector'\nimport { ApiSpecSelector } from './ApiSpecSelector'\n\ninterface SelectorContainerProps extends SpaceHelperProps {\n /** Specs to choose from */\n specs: SpecList\n /** Current selected spec */\n spec: SpecItem\n /** Spec state setter */\n specDispatch: Dispatch<SpecAction>\n}\n\nexport const HEADER_REM = 4\n\n/**\n * Renders a container for selectors\n */\nexport const SelectorContainer: FC<SelectorContainerProps> = ({\n specs,\n spec,\n specDispatch,\n ...spaceProps\n}) => (\n <Space width=\"auto\" {...spaceProps}>\n <SdkLanguageSelector />\n <ApiSpecSelector specs={specs} spec={spec} specDispatch={specDispatch} />\n <Link to={`/${diffPath}/${spec.key}/`}>\n <IconButton\n toggle\n label=\"Compare Specifications\"\n icon={<ChangeHistory />}\n size=\"small\"\n />\n </Link>\n </Space>\n)\n"],"file":"SelectorContainer.js"}
|