@looker/api-explorer 0.9.21 → 0.9.26
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 +101 -0
- package/lib/ApiExplorer.d.ts +4 -39
- package/lib/ApiExplorer.js +23 -30
- 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.js +8 -13
- package/lib/StandaloneApiExplorer.js.map +1 -1
- package/lib/components/DocCode/DocCode.js +6 -10
- package/lib/components/DocCode/DocCode.js.map +1 -1
- package/lib/components/DocMarkdown/DocMarkdown.js +11 -15
- package/lib/components/DocMarkdown/DocMarkdown.js.map +1 -1
- package/lib/components/DocReferences/DocReferences.js +7 -11
- package/lib/components/DocReferences/DocReferences.js.map +1 -1
- package/lib/components/DocSdkUsage/DocSdkUsage.js +3 -6
- package/lib/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
- package/lib/components/DocSource/DocSource.js +5 -7
- package/lib/components/DocSource/DocSource.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/SelectorContainer/SdkLanguageSelector.js +1 -1
- package/lib/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
- package/lib/components/SideNav/SideNav.js +39 -26
- package/lib/components/SideNav/SideNav.js.map +1 -1
- package/lib/components/SideNav/SideNavMethods.js +7 -9
- package/lib/components/SideNav/SideNavMethods.js.map +1 -1
- package/lib/components/SideNav/SideNavTypes.js +6 -8
- package/lib/components/SideNav/SideNavTypes.js.map +1 -1
- package/lib/components/SideNav/searchUtils.d.ts +1 -1
- package/lib/components/SideNav/searchUtils.js +1 -1
- package/lib/components/SideNav/searchUtils.js.map +1 -1
- package/lib/components/common/Loader.d.ts +1 -1
- package/lib/components/common/Loader.js.map +1 -1
- package/lib/esm/ApiExplorer.js +26 -33
- 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 +7 -10
- package/lib/esm/StandaloneApiExplorer.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 +8 -11
- package/lib/esm/components/DocMarkdown/DocMarkdown.js.map +1 -1
- package/lib/esm/components/DocReferences/DocReferences.js +5 -8
- package/lib/esm/components/DocReferences/DocReferences.js.map +1 -1
- package/lib/esm/components/DocSdkUsage/DocSdkUsage.js +5 -7
- package/lib/esm/components/DocSdkUsage/DocSdkUsage.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/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/SelectorContainer/SdkLanguageSelector.js +2 -2
- package/lib/esm/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
- package/lib/esm/components/SideNav/SideNav.js +40 -27
- package/lib/esm/components/SideNav/SideNav.js.map +1 -1
- package/lib/esm/components/SideNav/SideNavMethods.js +7 -10
- package/lib/esm/components/SideNav/SideNavMethods.js.map +1 -1
- package/lib/esm/components/SideNav/SideNavTypes.js +6 -9
- 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/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/routes/AppRouter.js +2 -2
- package/lib/esm/routes/AppRouter.js.map +1 -1
- package/lib/esm/scenes/MethodScene/MethodScene.js +9 -11
- package/lib/esm/scenes/MethodScene/MethodScene.js.map +1 -1
- package/lib/esm/state/index.js +1 -0
- package/lib/esm/state/index.js.map +1 -1
- package/lib/esm/state/lodes/index.js +3 -0
- package/lib/{test-utils/envAdaptor.js.map → esm/state/lodes/index.js.map} +1 -1
- 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/sagas.js +28 -16
- package/lib/esm/state/settings/sagas.js.map +1 -1
- package/lib/esm/state/settings/selectors.js +5 -3
- package/lib/esm/state/settings/selectors.js.map +1 -1
- package/lib/esm/state/settings/slice.js +16 -9
- package/lib/esm/state/settings/slice.js.map +1 -1
- package/lib/esm/state/store.js +6 -3
- package/lib/esm/state/store.js.map +1 -1
- package/lib/esm/test-utils/index.js +2 -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 +12 -9
- package/lib/esm/test-utils/redux.js.map +1 -1
- package/lib/esm/utils/index.js +0 -1
- 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/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/routes/AppRouter.d.ts +2 -2
- package/lib/routes/AppRouter.js +2 -2
- package/lib/routes/AppRouter.js.map +1 -1
- package/lib/scenes/MethodScene/MethodScene.d.ts +2 -2
- package/lib/scenes/MethodScene/MethodScene.js +7 -9
- package/lib/scenes/MethodScene/MethodScene.js.map +1 -1
- package/lib/state/index.d.ts +1 -0
- package/lib/state/index.js +13 -0
- 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/sagas.js +28 -15
- package/lib/state/settings/sagas.js.map +1 -1
- package/lib/state/settings/selectors.d.ts +2 -0
- package/lib/state/settings/selectors.js +12 -4
- package/lib/state/settings/selectors.js.map +1 -1
- package/lib/state/settings/slice.d.ts +24 -16
- package/lib/state/settings/slice.js +22 -14
- package/lib/state/settings/slice.js.map +1 -1
- package/lib/state/store.d.ts +3 -0
- package/lib/state/store.js +6 -2
- 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/index.js +23 -0
- package/lib/test-data/index.js.map +1 -1
- package/lib/test-utils/index.d.ts +2 -4
- package/lib/test-utils/index.js +22 -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 +9 -3
- package/lib/test-utils/redux.js +14 -10
- package/lib/test-utils/redux.js.map +1 -1
- package/lib/utils/index.d.ts +0 -1
- package/lib/utils/index.js +0 -24
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/lodeUtils.d.ts +2 -2
- package/lib/utils/lodeUtils.js +3 -7
- package/lib/utils/lodeUtils.js.map +1 -1
- package/package.json +11 -10
- package/public/Looker.3.1.json +1343 -412
- package/public/Looker.4.0.json +3305 -661
- package/src/ApiExplorer.tsx +100 -119
- package/src/{index.tsx → App.tsx} +0 -0
- package/src/StandaloneApiExplorer.tsx +8 -16
- package/src/components/DocCode/DocCode.tsx +6 -6
- package/src/components/DocMarkdown/DocMarkdown.spec.tsx +16 -11
- package/src/components/DocMarkdown/DocMarkdown.tsx +8 -10
- package/src/components/DocReferences/DocReferences.spec.tsx +11 -4
- package/src/components/DocReferences/DocReferences.tsx +8 -9
- package/src/components/DocSdkUsage/DocSdkUsage.spec.tsx +2 -2
- package/src/components/DocSdkUsage/DocSdkUsage.tsx +5 -5
- package/src/components/DocSource/DocSource.tsx +4 -3
- package/src/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.spec.tsx +1 -1
- package/src/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.tsx +170 -6
- package/src/components/ExploreType/ExploreProperty.spec.tsx +7 -12
- package/src/components/ExploreType/ExploreType.spec.tsx +9 -27
- package/src/components/Header/Header.spec.tsx +30 -38
- package/src/components/SelectorContainer/ApiSpecSelector.spec.tsx +2 -2
- package/src/components/SelectorContainer/SdkLanguageSelector.spec.tsx +3 -5
- package/src/components/SelectorContainer/SdkLanguageSelector.tsx +2 -2
- package/src/components/SelectorContainer/SelectorContainer.spec.tsx +20 -26
- package/src/components/SideNav/SideNav.spec.tsx +24 -29
- package/src/components/SideNav/SideNav.tsx +45 -24
- package/src/components/SideNav/SideNavMethodTags.spec.tsx +8 -6
- package/src/components/SideNav/SideNavMethods.spec.tsx +9 -5
- package/src/components/SideNav/SideNavMethods.tsx +8 -8
- package/src/components/SideNav/SideNavTypeTags.spec.tsx +8 -6
- package/src/components/SideNav/SideNavTypes.spec.tsx +9 -4
- package/src/components/SideNav/SideNavTypes.tsx +7 -7
- package/src/components/SideNav/{searchUtils.tsx → searchUtils.ts} +2 -2
- package/src/components/common/Loader.tsx +1 -1
- package/src/{context/lode/index.ts → index.ts} +4 -1
- package/src/reducers/index.ts +0 -1
- package/src/routes/AppRouter.tsx +5 -4
- package/src/scenes/MethodScene/MethodScene.tsx +11 -11
- package/src/scenes/TypeTagScene/TypeTagScene.spec.tsx +4 -4
- package/src/state/index.ts +1 -0
- package/src/{reducers/search → state/lodes}/index.ts +2 -2
- package/src/state/lodes/sagas.spec.ts +92 -0
- package/src/state/lodes/sagas.ts +51 -0
- package/src/{context/search/SearchContext.ts → state/lodes/selectors.spec.ts} +13 -15
- package/src/{test-utils/envAdaptor.ts → state/lodes/selectors.ts} +8 -5
- package/src/{test-utils/render_with_lode.tsx → state/lodes/slice.ts} +37 -37
- package/src/state/settings/sagas.spec.ts +29 -24
- package/src/state/settings/sagas.ts +16 -16
- package/src/state/settings/selectors.spec.ts +1 -5
- package/src/state/settings/selectors.ts +9 -3
- package/src/state/settings/slice.ts +27 -10
- package/src/state/store.ts +7 -2
- package/src/{reducers/search/actions.ts → test-data/declarations.ts} +16 -15
- package/src/test-data/index.ts +1 -0
- package/src/test-utils/index.ts +2 -10
- package/src/{context/lode/LodeContext.ts → test-utils/lodes.tsx} +14 -13
- package/src/test-utils/redux.tsx +29 -10
- package/src/utils/index.ts +0 -1
- package/src/utils/lodeUtils.ts +4 -6
- package/webpack.dev.config.js +3 -0
- package/webpack.prod.config.js +4 -0
- package/lib/components/SideNav/SearchCriteriaSelector.d.ts +0 -2
- package/lib/components/SideNav/SearchCriteriaSelector.js +0 -57
- package/lib/components/SideNav/SearchCriteriaSelector.js.map +0 -1
- package/lib/context/index.d.ts +0 -2
- package/lib/context/index.js +0 -34
- 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/lode/index.js.map +0 -1
- package/lib/context/search/SearchContext.d.ts +0 -9
- package/lib/context/search/SearchContext.js +0 -19
- package/lib/context/search/SearchContext.js.map +0 -1
- package/lib/context/search/index.d.ts +0 -1
- package/lib/context/search/index.js +0 -20
- package/lib/context/search/index.js.map +0 -1
- package/lib/esm/components/SideNav/SearchCriteriaSelector.js +0 -38
- package/lib/esm/components/SideNav/SearchCriteriaSelector.js.map +0 -1
- package/lib/esm/context/index.js +0 -3
- 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/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/test-utils/envAdaptor.js +0 -5
- package/lib/esm/test-utils/envAdaptor.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 -84
- package/lib/esm/utils/envAdaptor.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/test-utils/envAdaptor.d.ts +0 -2
- package/lib/test-utils/envAdaptor.js +0 -15
- package/lib/test-utils/render_with_lode.d.ts +0 -7
- 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 -31
- package/lib/utils/envAdaptor.js +0 -106
- package/lib/utils/envAdaptor.js.map +0 -1
- package/src/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/somethingWentWrong.svg +0 -45
- package/src/components/SideNav/SearchCriteriaSelector.tsx +0 -76
- package/src/context/index.ts +0 -27
- package/src/context/search/index.ts +0 -26
- package/src/reducers/search/actions.spec.ts +0 -50
- package/src/reducers/search/reducer.spec.ts +0 -69
- package/src/reducers/search/reducer.ts +0 -63
- package/src/test-utils/render_with_search.tsx +0 -71
- package/src/utils/envAdaptor.spec.ts +0 -50
- package/src/utils/envAdaptor.ts +0 -147
|
@@ -23,20 +23,21 @@
|
|
|
23
23
|
SOFTWARE.
|
|
24
24
|
|
|
25
25
|
*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
import type { IDeclarationMine } from '@looker/sdk-codegen'
|
|
27
|
+
|
|
28
|
+
export const declarations: IDeclarationMine = {
|
|
29
|
+
commitHash: '1e9348b797c2f3760d03c1f94c60f18e534e8298',
|
|
30
|
+
remoteOrigin: 'https://github.com/looker-open-source/sdk-codegen',
|
|
31
|
+
types: {
|
|
32
|
+
FullLode: {
|
|
33
|
+
line: 40,
|
|
34
|
+
sourceFile: 'packages/api-explorer/src/utils/lodeUtils.ts',
|
|
35
|
+
},
|
|
34
36
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
criteria,
|
|
37
|
+
methods: {
|
|
38
|
+
getLoded: {
|
|
39
|
+
line: 45,
|
|
40
|
+
sourceFile: 'packages/api-explorer/src/utils/lodeUtils.ts',
|
|
41
|
+
},
|
|
41
42
|
},
|
|
42
|
-
}
|
|
43
|
+
}
|
package/src/test-data/index.ts
CHANGED
package/src/test-utils/index.ts
CHANGED
|
@@ -23,14 +23,6 @@
|
|
|
23
23
|
SOFTWARE.
|
|
24
24
|
|
|
25
25
|
*/
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
renderWithSearchAndRouter,
|
|
29
|
-
} from './render_with_search'
|
|
30
|
-
export {
|
|
31
|
-
renderWithLode,
|
|
32
|
-
renderWithReduxProviderAndLode,
|
|
33
|
-
} from './render_with_lode'
|
|
34
|
-
export { renderWithRouter, withRouter } from './router'
|
|
26
|
+
export * from './lodes'
|
|
27
|
+
export * from './router'
|
|
35
28
|
export * from './redux'
|
|
36
|
-
export { registerTestEnvAdaptor } from './envAdaptor'
|
|
@@ -23,18 +23,19 @@
|
|
|
23
23
|
SOFTWARE.
|
|
24
24
|
|
|
25
25
|
*/
|
|
26
|
-
import { createContext } from 'react'
|
|
27
26
|
import type { IDeclarationMine, IExampleMine } from '@looker/sdk-codegen'
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export const
|
|
35
|
-
|
|
27
|
+
import type { ReactElement } from 'react'
|
|
28
|
+
import type { RenderOptions } from '@testing-library/react'
|
|
29
|
+
import { renderWithTheme } from '@looker/components-test-utils'
|
|
30
|
+
|
|
31
|
+
import { createTestStore, withReduxProvider } from './redux'
|
|
32
|
+
|
|
33
|
+
export const renderWithLode = (
|
|
34
|
+
consumers: ReactElement<any>,
|
|
35
|
+
examples: IExampleMine,
|
|
36
|
+
declarations?: IDeclarationMine,
|
|
37
|
+
options?: Omit<RenderOptions, 'queries'>
|
|
38
|
+
) => {
|
|
39
|
+
const store = createTestStore({ lodes: { examples, declarations } })
|
|
40
|
+
return renderWithTheme(withReduxProvider(consumers, store), options)
|
|
36
41
|
}
|
|
37
|
-
|
|
38
|
-
export const LodeContext = createContext<LodeContextProps>(
|
|
39
|
-
defaultLodeContextValue
|
|
40
|
-
)
|
package/src/test-utils/redux.tsx
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
SOFTWARE.
|
|
24
24
|
|
|
25
25
|
*/
|
|
26
|
+
|
|
26
27
|
import type { ReactElement } from 'react'
|
|
27
28
|
import React from 'react'
|
|
28
29
|
import { Provider } from 'react-redux'
|
|
@@ -30,18 +31,24 @@ import type { Store } from 'redux'
|
|
|
30
31
|
import { renderWithTheme } from '@looker/components-test-utils'
|
|
31
32
|
import type { RenderOptions } from '@testing-library/react'
|
|
32
33
|
import { createStore } from '@looker/redux'
|
|
34
|
+
import { BrowserAdaptor, registerEnvAdaptor } from '@looker/extension-utils'
|
|
35
|
+
import { initRunItSdk } from '@looker/run-it'
|
|
33
36
|
|
|
34
|
-
import type { RootState } from '../state'
|
|
35
|
-
import {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
import type { LodesState, RootState, SettingState } from '../state'
|
|
38
|
+
import {
|
|
39
|
+
settingsSlice,
|
|
40
|
+
defaultLodesState,
|
|
41
|
+
defaultSettingsState,
|
|
42
|
+
store as defaultStore,
|
|
43
|
+
lodesSlice,
|
|
44
|
+
} from '../state'
|
|
45
|
+
import { renderWithRouter } from './router'
|
|
39
46
|
|
|
40
47
|
export const withReduxProvider = (
|
|
41
48
|
consumers: ReactElement<any>,
|
|
42
49
|
store: Store<RootState> = defaultStore
|
|
43
50
|
) => {
|
|
44
|
-
registerEnvAdaptor(new
|
|
51
|
+
registerEnvAdaptor(new BrowserAdaptor(initRunItSdk()))
|
|
45
52
|
return <Provider store={store}>{consumers}</Provider>
|
|
46
53
|
}
|
|
47
54
|
|
|
@@ -59,14 +66,26 @@ export const renderWithRouterAndReduxProvider = (
|
|
|
59
66
|
) =>
|
|
60
67
|
renderWithRouter(withReduxProvider(consumers, store), initialEntries, options)
|
|
61
68
|
|
|
62
|
-
const preloadedState: RootState = {
|
|
69
|
+
export const preloadedState: RootState = {
|
|
63
70
|
settings: defaultSettingsState,
|
|
71
|
+
lodes: defaultLodesState,
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
type DeepPartial<T> = {
|
|
75
|
+
[P in keyof T]?: DeepPartial<T[P]>
|
|
64
76
|
}
|
|
65
77
|
|
|
66
|
-
export const createTestStore = (overrides?:
|
|
78
|
+
export const createTestStore = (overrides?: DeepPartial<RootState>) =>
|
|
67
79
|
createStore({
|
|
68
80
|
preloadedState: {
|
|
69
|
-
settings: {
|
|
81
|
+
settings: {
|
|
82
|
+
...preloadedState.settings,
|
|
83
|
+
...overrides?.settings,
|
|
84
|
+
} as SettingState,
|
|
85
|
+
lodes: {
|
|
86
|
+
...defaultLodesState,
|
|
87
|
+
...overrides?.lodes,
|
|
88
|
+
} as LodesState,
|
|
70
89
|
},
|
|
71
|
-
reducer: { settings: settingsSlice.reducer },
|
|
90
|
+
reducer: { settings: settingsSlice.reducer, lodes: lodesSlice.reducer },
|
|
72
91
|
})
|
package/src/utils/index.ts
CHANGED
package/src/utils/lodeUtils.ts
CHANGED
|
@@ -38,17 +38,17 @@ const fetchLode = async (lodeUrl: string) => {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
interface FullLode {
|
|
41
|
-
examples
|
|
41
|
+
examples?: IExampleMine
|
|
42
42
|
declarations?: IDeclarationMine
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export const getLoded = async (
|
|
46
|
-
examplesLodeUrl
|
|
46
|
+
examplesLodeUrl?: string,
|
|
47
47
|
declarationsLodeUrl?: string
|
|
48
48
|
): Promise<FullLode> => {
|
|
49
49
|
// First try to load from the apix-files server
|
|
50
50
|
let examples = await fetchLode(`${apixFilesHost}/examplesIndex.json`)
|
|
51
|
-
if (!examples) {
|
|
51
|
+
if (!examples && examplesLodeUrl) {
|
|
52
52
|
examples = await fetchLode(examplesLodeUrl)
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -57,9 +57,7 @@ export const getLoded = async (
|
|
|
57
57
|
declarations = await fetchLode(declarationsLodeUrl)
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
const lode: FullLode = {
|
|
61
|
-
examples: { commitHash: '', nuggets: {}, remoteOrigin: '', summaries: {} },
|
|
62
|
-
}
|
|
60
|
+
const lode: FullLode = { examples: undefined, declarations: undefined }
|
|
63
61
|
if (examples) {
|
|
64
62
|
lode.examples = JSON.parse(examples)
|
|
65
63
|
}
|
package/webpack.dev.config.js
CHANGED
|
@@ -30,6 +30,9 @@ const base = require('../../webpack.base.config')(__dirname)
|
|
|
30
30
|
const browser = require('../../webpack.browser.config')()
|
|
31
31
|
|
|
32
32
|
module.exports = merge(base, browser, {
|
|
33
|
+
entry: {
|
|
34
|
+
app: path.join(__dirname, 'src/App.tsx'),
|
|
35
|
+
},
|
|
33
36
|
mode: 'development',
|
|
34
37
|
devServer: {
|
|
35
38
|
contentBase: path.join(__dirname, 'public'),
|
package/webpack.prod.config.js
CHANGED
|
@@ -23,10 +23,14 @@
|
|
|
23
23
|
SOFTWARE.
|
|
24
24
|
|
|
25
25
|
*/
|
|
26
|
+
const path = require('path')
|
|
26
27
|
const { merge } = require('webpack-merge')
|
|
27
28
|
const base = require('../../webpack.base.config')(__dirname)
|
|
28
29
|
const browser = require('../../webpack.browser.config')()
|
|
29
30
|
|
|
30
31
|
module.exports = merge(base, browser, {
|
|
32
|
+
entry: {
|
|
33
|
+
app: path.join(__dirname, 'src/index.ts'),
|
|
34
|
+
},
|
|
31
35
|
mode: 'production',
|
|
32
36
|
})
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SearchCriteriaSelector = void 0;
|
|
7
|
-
|
|
8
|
-
var _components = require("@looker/components");
|
|
9
|
-
|
|
10
|
-
var _FilterList = require("@styled-icons/material/FilterList");
|
|
11
|
-
|
|
12
|
-
var _sdkCodegen = require("@looker/sdk-codegen");
|
|
13
|
-
|
|
14
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
|
-
var _reducers = require("../../reducers");
|
|
17
|
-
|
|
18
|
-
var _context = require("../../context");
|
|
19
|
-
|
|
20
|
-
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); }
|
|
21
|
-
|
|
22
|
-
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; }
|
|
23
|
-
|
|
24
|
-
var SearchCriteriaSelector = () => {
|
|
25
|
-
var {
|
|
26
|
-
searchSettings,
|
|
27
|
-
setSearchSettings
|
|
28
|
-
} = (0, _react.useContext)(_context.SearchContext);
|
|
29
|
-
|
|
30
|
-
var handlePick = e => {
|
|
31
|
-
var criteria;
|
|
32
|
-
|
|
33
|
-
if (e.target.checked) {
|
|
34
|
-
criteria = [...searchSettings.criteria, e.target.value];
|
|
35
|
-
} else {
|
|
36
|
-
criteria = searchSettings.criteria.filter(c => c !== e.target.value);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
setSearchSettings((0, _reducers.setCriteria)(criteria));
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
return _react.default.createElement(_components.Popover, {
|
|
43
|
-
content: _react.default.createElement(_components.PopoverContent, null, _react.default.createElement(_components.Text, null, "Search Criteria:"), Object.keys(_sdkCodegen.SearchCriterion).filter(key => !isNaN(Number(key))).map(key => _react.default.createElement(_components.FieldCheckbox, {
|
|
44
|
-
checked: searchSettings.criteria.includes(_sdkCodegen.SearchCriterion[key]),
|
|
45
|
-
onChange: handlePick,
|
|
46
|
-
key: key,
|
|
47
|
-
value: _sdkCodegen.SearchCriterion[key],
|
|
48
|
-
label: _sdkCodegen.SearchCriterion[key]
|
|
49
|
-
})))
|
|
50
|
-
}, _react.default.createElement(_components.Icon, {
|
|
51
|
-
icon: _react.default.createElement(_FilterList.FilterList, null),
|
|
52
|
-
size: "small"
|
|
53
|
-
}));
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
exports.SearchCriteriaSelector = SearchCriteriaSelector;
|
|
57
|
-
//# sourceMappingURL=SearchCriteriaSelector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/SideNav/SearchCriteriaSelector.tsx"],"names":["SearchCriteriaSelector","searchSettings","setSearchSettings","SearchContext","handlePick","e","criteria","target","checked","value","filter","c","Object","keys","SearchCriterion","key","isNaN","Number","map","includes"],"mappings":";;;;;;;AAyBA;;AAOA;;AACA;;AAEA;;AAEA;;AACA;;;;;;AAEO,IAAMA,sBAA0B,GAAG,MAAM;AAC9C,MAAM;AAAEC,IAAAA,cAAF;AAAkBC,IAAAA;AAAlB,MAAwC,uBAAWC,sBAAX,CAA9C;;AAEA,MAAMC,UAAU,GAAIC,CAAD,IAA2B;AAC5C,QAAIC,QAAJ;;AACA,QAAID,CAAC,CAACE,MAAF,CAASC,OAAb,EAAsB;AACpBF,MAAAA,QAAQ,GAAG,CAAC,GAAGL,cAAc,CAACK,QAAnB,EAA6BD,CAAC,CAACE,MAAF,CAASE,KAAtC,CAAX;AACD,KAFD,MAEO;AACLH,MAAAA,QAAQ,GAAGL,cAAc,CAACK,QAAf,CAAwBI,MAAxB,CAAgCC,CAAD,IAAOA,CAAC,KAAKN,CAAC,CAACE,MAAF,CAASE,KAArD,CAAX;AACD;;AACDP,IAAAA,iBAAiB,CAAC,2BAAYI,QAAZ,CAAD,CAAjB;AACD,GARD;;AAUA,SACE,6BAAC,mBAAD;AACE,IAAA,OAAO,EACL,6BAAC,0BAAD,QACE,6BAAC,gBAAD,2BADF,EAEGM,MAAM,CAACC,IAAP,CAAYC,2BAAZ,EACEJ,MADF,CACUK,GAAD,IAAS,CAACC,KAAK,CAACC,MAAM,CAACF,GAAD,CAAP,CADxB,EAEEG,GAFF,CAEOH,GAAD,IACH,6BAAC,yBAAD;AACE,MAAA,OAAO,EAAEd,cAAc,CAACK,QAAf,CAAwBa,QAAxB,CAAiCL,4BAAgBC,GAAhB,CAAjC,CADX;AAEE,MAAA,QAAQ,EAAEX,UAFZ;AAGE,MAAA,GAAG,EAAEW,GAHP;AAIE,MAAA,KAAK,EAAED,4BAAgBC,GAAhB,CAJT;AAKE,MAAA,KAAK,EAAED,4BAAgBC,GAAhB;AALT,MAHH,CAFH;AAFJ,KAkBE,6BAAC,gBAAD;AAAM,IAAA,IAAI,EAAE,6BAAC,sBAAD,OAAZ;AAA4B,IAAA,IAAI,EAAC;AAAjC,IAlBF,CADF;AAsBD,CAnCM","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 {\n Icon,\n Text,\n Popover,\n PopoverContent,\n FieldCheckbox,\n} from '@looker/components'\nimport { FilterList } from '@styled-icons/material/FilterList'\nimport { SearchCriterion } from '@looker/sdk-codegen'\nimport type { FC, BaseSyntheticEvent } from 'react'\nimport React, { useContext } from 'react'\n\nimport { setCriteria } from '../../reducers'\nimport { SearchContext } from '../../context'\n\nexport const SearchCriteriaSelector: FC = () => {\n const { searchSettings, setSearchSettings } = useContext(SearchContext)\n\n const handlePick = (e: BaseSyntheticEvent) => {\n let criteria\n if (e.target.checked) {\n criteria = [...searchSettings.criteria, e.target.value]\n } else {\n criteria = searchSettings.criteria.filter((c) => c !== e.target.value)\n }\n setSearchSettings(setCriteria(criteria))\n }\n\n return (\n <Popover\n content={\n <PopoverContent>\n <Text>Search Criteria:</Text>\n {Object.keys(SearchCriterion)\n .filter((key) => !isNaN(Number(key)))\n .map((key) => (\n <FieldCheckbox\n checked={searchSettings.criteria.includes(SearchCriterion[key])}\n onChange={handlePick}\n key={key}\n value={SearchCriterion[key]}\n label={SearchCriterion[key]}\n />\n ))}\n </PopoverContent>\n }\n >\n <Icon icon={<FilterList />} size=\"small\" />\n </Popover>\n )\n}\n"],"file":"SearchCriteriaSelector.js"}
|
package/lib/context/index.d.ts
DELETED
package/lib/context/index.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "LodeContext", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _lode.LodeContext;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "defaultLodeContextValue", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _lode.defaultLodeContextValue;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "SearchContext", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _search.SearchContext;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "defaultSearchContextValue", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _search.defaultSearchContextValue;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
var _lode = require("./lode");
|
|
32
|
-
|
|
33
|
-
var _search = require("./search");
|
|
34
|
-
//# sourceMappingURL=index.js.map
|
package/lib/context/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/context/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA;;AACA","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 { LodeContext, defaultLodeContextValue } from './lode'\nexport { SearchContext, defaultSearchContextValue } from './search'\n"],"file":"index.js"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { IDeclarationMine, IExampleMine } from '@looker/sdk-codegen';
|
|
3
|
-
interface LodeContextProps {
|
|
4
|
-
examples: IExampleMine;
|
|
5
|
-
declarations?: IDeclarationMine;
|
|
6
|
-
}
|
|
7
|
-
export declare const defaultLodeContextValue: LodeContextProps;
|
|
8
|
-
export declare const LodeContext: import("react").Context<LodeContextProps>;
|
|
9
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.LodeContext = exports.defaultLodeContextValue = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
var defaultLodeContextValue = {
|
|
11
|
-
examples: {
|
|
12
|
-
commitHash: '',
|
|
13
|
-
remoteOrigin: '',
|
|
14
|
-
nuggets: {},
|
|
15
|
-
summaries: {}
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
exports.defaultLodeContextValue = defaultLodeContextValue;
|
|
19
|
-
var LodeContext = (0, _react.createContext)(defaultLodeContextValue);
|
|
20
|
-
exports.LodeContext = LodeContext;
|
|
21
|
-
//# sourceMappingURL=LodeContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/context/lode/LodeContext.ts"],"names":["defaultLodeContextValue","examples","commitHash","remoteOrigin","nuggets","summaries","LodeContext"],"mappings":";;;;;;;AAyBA;;AAQO,IAAMA,uBAAyC,GAAG;AACvDC,EAAAA,QAAQ,EAAE;AAAEC,IAAAA,UAAU,EAAE,EAAd;AAAkBC,IAAAA,YAAY,EAAE,EAAhC;AAAoCC,IAAAA,OAAO,EAAE,EAA7C;AAAiDC,IAAAA,SAAS,EAAE;AAA5D;AAD6C,CAAlD;;AAIA,IAAMC,WAAW,GAAG,0BACzBN,uBADyB,CAApB","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 { createContext } from 'react'\nimport type { IDeclarationMine, IExampleMine } from '@looker/sdk-codegen'\n\ninterface LodeContextProps {\n examples: IExampleMine\n declarations?: IDeclarationMine\n}\n\nexport const defaultLodeContextValue: LodeContextProps = {\n examples: { commitHash: '', remoteOrigin: '', nuggets: {}, summaries: {} },\n}\n\nexport const LodeContext = createContext<LodeContextProps>(\n defaultLodeContextValue\n)\n"],"file":"LodeContext.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { defaultLodeContextValue, LodeContext } from './LodeContext';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "defaultLodeContextValue", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _LodeContext.defaultLodeContextValue;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "LodeContext", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _LodeContext.LodeContext;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
var _LodeContext = require("./LodeContext");
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/context/lode/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 { defaultLodeContextValue, LodeContext } from './LodeContext'\n"],"file":"index.js"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Dispatch } from 'react';
|
|
2
|
-
import type { SearchState, SearchAction } from '../../reducers';
|
|
3
|
-
interface SearchContextProps {
|
|
4
|
-
searchSettings: SearchState;
|
|
5
|
-
setSearchSettings: Dispatch<SearchAction>;
|
|
6
|
-
}
|
|
7
|
-
export declare const defaultSearchContextValue: SearchContextProps;
|
|
8
|
-
export declare const SearchContext: import("react").Context<SearchContextProps>;
|
|
9
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SearchContext = exports.defaultSearchContextValue = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
var _reducers = require("../../reducers");
|
|
11
|
-
|
|
12
|
-
var defaultSearchContextValue = {
|
|
13
|
-
searchSettings: _reducers.defaultSearchState,
|
|
14
|
-
setSearchSettings: () => undefined
|
|
15
|
-
};
|
|
16
|
-
exports.defaultSearchContextValue = defaultSearchContextValue;
|
|
17
|
-
var SearchContext = (0, _react.createContext)(defaultSearchContextValue);
|
|
18
|
-
exports.SearchContext = SearchContext;
|
|
19
|
-
//# sourceMappingURL=SearchContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/context/search/SearchContext.ts"],"names":["defaultSearchContextValue","searchSettings","defaultSearchState","setSearchSettings","undefined","SearchContext"],"mappings":";;;;;;;AA2BA;;AAEA;;AAOO,IAAMA,yBAA6C,GAAG;AAC3DC,EAAAA,cAAc,EAAEC,4BAD2C;AAE3DC,EAAAA,iBAAiB,EAAE,MAAMC;AAFkC,CAAtD;;AAKA,IAAMC,aAAa,GAAG,0BAC3BL,yBAD2B,CAAtB","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 { Dispatch } from 'react'\nimport { createContext } from 'react'\nimport type { SearchState, SearchAction } from '../../reducers'\nimport { defaultSearchState } from '../../reducers'\n\ninterface SearchContextProps {\n searchSettings: SearchState\n setSearchSettings: Dispatch<SearchAction>\n}\n\nexport const defaultSearchContextValue: SearchContextProps = {\n searchSettings: defaultSearchState,\n setSearchSettings: () => undefined,\n}\n\nexport const SearchContext = createContext<SearchContextProps>(\n defaultSearchContextValue\n)\n"],"file":"SearchContext.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { SearchContext, defaultSearchContextValue } from './SearchContext';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "SearchContext", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _SearchContext.SearchContext;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "defaultSearchContextValue", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _SearchContext.defaultSearchContextValue;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
var _SearchContext = require("./SearchContext");
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/context/search/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 { SearchContext, defaultSearchContextValue } from './SearchContext'\n"],"file":"index.js"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Icon, Text, Popover, PopoverContent, FieldCheckbox } from '@looker/components';
|
|
2
|
-
import { FilterList } from '@styled-icons/material/FilterList';
|
|
3
|
-
import { SearchCriterion } from '@looker/sdk-codegen';
|
|
4
|
-
import React, { useContext } from 'react';
|
|
5
|
-
import { setCriteria } from '../../reducers';
|
|
6
|
-
import { SearchContext } from '../../context';
|
|
7
|
-
export var SearchCriteriaSelector = () => {
|
|
8
|
-
var {
|
|
9
|
-
searchSettings,
|
|
10
|
-
setSearchSettings
|
|
11
|
-
} = useContext(SearchContext);
|
|
12
|
-
|
|
13
|
-
var handlePick = e => {
|
|
14
|
-
var criteria;
|
|
15
|
-
|
|
16
|
-
if (e.target.checked) {
|
|
17
|
-
criteria = [...searchSettings.criteria, e.target.value];
|
|
18
|
-
} else {
|
|
19
|
-
criteria = searchSettings.criteria.filter(c => c !== e.target.value);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
setSearchSettings(setCriteria(criteria));
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
return React.createElement(Popover, {
|
|
26
|
-
content: React.createElement(PopoverContent, null, React.createElement(Text, null, "Search Criteria:"), Object.keys(SearchCriterion).filter(key => !isNaN(Number(key))).map(key => React.createElement(FieldCheckbox, {
|
|
27
|
-
checked: searchSettings.criteria.includes(SearchCriterion[key]),
|
|
28
|
-
onChange: handlePick,
|
|
29
|
-
key: key,
|
|
30
|
-
value: SearchCriterion[key],
|
|
31
|
-
label: SearchCriterion[key]
|
|
32
|
-
})))
|
|
33
|
-
}, React.createElement(Icon, {
|
|
34
|
-
icon: React.createElement(FilterList, null),
|
|
35
|
-
size: "small"
|
|
36
|
-
}));
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=SearchCriteriaSelector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/SideNav/SearchCriteriaSelector.tsx"],"names":["Icon","Text","Popover","PopoverContent","FieldCheckbox","FilterList","SearchCriterion","React","useContext","setCriteria","SearchContext","SearchCriteriaSelector","searchSettings","setSearchSettings","handlePick","e","criteria","target","checked","value","filter","c","Object","keys","key","isNaN","Number","map","includes"],"mappings":"AAyBA,SACEA,IADF,EAEEC,IAFF,EAGEC,OAHF,EAIEC,cAJF,EAKEC,aALF,QAMO,oBANP;AAOA,SAASC,UAAT,QAA2B,mCAA3B;AACA,SAASC,eAAT,QAAgC,qBAAhC;AAEA,OAAOC,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AAEA,SAASC,WAAT,QAA4B,gBAA5B;AACA,SAASC,aAAT,QAA8B,eAA9B;AAEA,OAAO,IAAMC,sBAA0B,GAAG,MAAM;AAC9C,MAAM;AAAEC,IAAAA,cAAF;AAAkBC,IAAAA;AAAlB,MAAwCL,UAAU,CAACE,aAAD,CAAxD;;AAEA,MAAMI,UAAU,GAAIC,CAAD,IAA2B;AAC5C,QAAIC,QAAJ;;AACA,QAAID,CAAC,CAACE,MAAF,CAASC,OAAb,EAAsB;AACpBF,MAAAA,QAAQ,GAAG,CAAC,GAAGJ,cAAc,CAACI,QAAnB,EAA6BD,CAAC,CAACE,MAAF,CAASE,KAAtC,CAAX;AACD,KAFD,MAEO;AACLH,MAAAA,QAAQ,GAAGJ,cAAc,CAACI,QAAf,CAAwBI,MAAxB,CAAgCC,CAAD,IAAOA,CAAC,KAAKN,CAAC,CAACE,MAAF,CAASE,KAArD,CAAX;AACD;;AACDN,IAAAA,iBAAiB,CAACJ,WAAW,CAACO,QAAD,CAAZ,CAAjB;AACD,GARD;;AAUA,SACE,oBAAC,OAAD;AACE,IAAA,OAAO,EACL,oBAAC,cAAD,QACE,oBAAC,IAAD,2BADF,EAEGM,MAAM,CAACC,IAAP,CAAYjB,eAAZ,EACEc,MADF,CACUI,GAAD,IAAS,CAACC,KAAK,CAACC,MAAM,CAACF,GAAD,CAAP,CADxB,EAEEG,GAFF,CAEOH,GAAD,IACH,oBAAC,aAAD;AACE,MAAA,OAAO,EAAEZ,cAAc,CAACI,QAAf,CAAwBY,QAAxB,CAAiCtB,eAAe,CAACkB,GAAD,CAAhD,CADX;AAEE,MAAA,QAAQ,EAAEV,UAFZ;AAGE,MAAA,GAAG,EAAEU,GAHP;AAIE,MAAA,KAAK,EAAElB,eAAe,CAACkB,GAAD,CAJxB;AAKE,MAAA,KAAK,EAAElB,eAAe,CAACkB,GAAD;AALxB,MAHH,CAFH;AAFJ,KAkBE,oBAAC,IAAD;AAAM,IAAA,IAAI,EAAE,oBAAC,UAAD,OAAZ;AAA4B,IAAA,IAAI,EAAC;AAAjC,IAlBF,CADF;AAsBD,CAnCM","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 {\n Icon,\n Text,\n Popover,\n PopoverContent,\n FieldCheckbox,\n} from '@looker/components'\nimport { FilterList } from '@styled-icons/material/FilterList'\nimport { SearchCriterion } from '@looker/sdk-codegen'\nimport type { FC, BaseSyntheticEvent } from 'react'\nimport React, { useContext } from 'react'\n\nimport { setCriteria } from '../../reducers'\nimport { SearchContext } from '../../context'\n\nexport const SearchCriteriaSelector: FC = () => {\n const { searchSettings, setSearchSettings } = useContext(SearchContext)\n\n const handlePick = (e: BaseSyntheticEvent) => {\n let criteria\n if (e.target.checked) {\n criteria = [...searchSettings.criteria, e.target.value]\n } else {\n criteria = searchSettings.criteria.filter((c) => c !== e.target.value)\n }\n setSearchSettings(setCriteria(criteria))\n }\n\n return (\n <Popover\n content={\n <PopoverContent>\n <Text>Search Criteria:</Text>\n {Object.keys(SearchCriterion)\n .filter((key) => !isNaN(Number(key)))\n .map((key) => (\n <FieldCheckbox\n checked={searchSettings.criteria.includes(SearchCriterion[key])}\n onChange={handlePick}\n key={key}\n value={SearchCriterion[key]}\n label={SearchCriterion[key]}\n />\n ))}\n </PopoverContent>\n }\n >\n <Icon icon={<FilterList />} size=\"small\" />\n </Popover>\n )\n}\n"],"file":"SearchCriteriaSelector.js"}
|
package/lib/esm/context/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/context/index.ts"],"names":["LodeContext","defaultLodeContextValue","SearchContext","defaultSearchContextValue"],"mappings":"AAyBA,SAASA,WAAT,EAAsBC,uBAAtB,QAAqD,QAArD;AACA,SAASC,aAAT,EAAwBC,yBAAxB,QAAyD,UAAzD","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 { LodeContext, defaultLodeContextValue } from './lode'\nexport { SearchContext, defaultSearchContextValue } from './search'\n"],"file":"index.js"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { createContext } from 'react';
|
|
2
|
-
export var defaultLodeContextValue = {
|
|
3
|
-
examples: {
|
|
4
|
-
commitHash: '',
|
|
5
|
-
remoteOrigin: '',
|
|
6
|
-
nuggets: {},
|
|
7
|
-
summaries: {}
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
export var LodeContext = createContext(defaultLodeContextValue);
|
|
11
|
-
//# sourceMappingURL=LodeContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/context/lode/LodeContext.ts"],"names":["createContext","defaultLodeContextValue","examples","commitHash","remoteOrigin","nuggets","summaries","LodeContext"],"mappings":"AAyBA,SAASA,aAAT,QAA8B,OAA9B;AAQA,OAAO,IAAMC,uBAAyC,GAAG;AACvDC,EAAAA,QAAQ,EAAE;AAAEC,IAAAA,UAAU,EAAE,EAAd;AAAkBC,IAAAA,YAAY,EAAE,EAAhC;AAAoCC,IAAAA,OAAO,EAAE,EAA7C;AAAiDC,IAAAA,SAAS,EAAE;AAA5D;AAD6C,CAAlD;AAIP,OAAO,IAAMC,WAAW,GAAGP,aAAa,CACtCC,uBADsC,CAAjC","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 { createContext } from 'react'\nimport type { IDeclarationMine, IExampleMine } from '@looker/sdk-codegen'\n\ninterface LodeContextProps {\n examples: IExampleMine\n declarations?: IDeclarationMine\n}\n\nexport const defaultLodeContextValue: LodeContextProps = {\n examples: { commitHash: '', remoteOrigin: '', nuggets: {}, summaries: {} },\n}\n\nexport const LodeContext = createContext<LodeContextProps>(\n defaultLodeContextValue\n)\n"],"file":"LodeContext.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/context/lode/index.ts"],"names":["defaultLodeContextValue","LodeContext"],"mappings":"AAyBA,SAASA,uBAAT,EAAkCC,WAAlC,QAAqD,eAArD","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 { defaultLodeContextValue, LodeContext } from './LodeContext'\n"],"file":"index.js"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { createContext } from 'react';
|
|
2
|
-
import { defaultSearchState } from '../../reducers';
|
|
3
|
-
export var defaultSearchContextValue = {
|
|
4
|
-
searchSettings: defaultSearchState,
|
|
5
|
-
setSearchSettings: () => undefined
|
|
6
|
-
};
|
|
7
|
-
export var SearchContext = createContext(defaultSearchContextValue);
|
|
8
|
-
//# sourceMappingURL=SearchContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/context/search/SearchContext.ts"],"names":["createContext","defaultSearchState","defaultSearchContextValue","searchSettings","setSearchSettings","undefined","SearchContext"],"mappings":"AA2BA,SAASA,aAAT,QAA8B,OAA9B;AAEA,SAASC,kBAAT,QAAmC,gBAAnC;AAOA,OAAO,IAAMC,yBAA6C,GAAG;AAC3DC,EAAAA,cAAc,EAAEF,kBAD2C;AAE3DG,EAAAA,iBAAiB,EAAE,MAAMC;AAFkC,CAAtD;AAKP,OAAO,IAAMC,aAAa,GAAGN,aAAa,CACxCE,yBADwC,CAAnC","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 { Dispatch } from 'react'\nimport { createContext } from 'react'\nimport type { SearchState, SearchAction } from '../../reducers'\nimport { defaultSearchState } from '../../reducers'\n\ninterface SearchContextProps {\n searchSettings: SearchState\n setSearchSettings: Dispatch<SearchAction>\n}\n\nexport const defaultSearchContextValue: SearchContextProps = {\n searchSettings: defaultSearchState,\n setSearchSettings: () => undefined,\n}\n\nexport const SearchContext = createContext<SearchContextProps>(\n defaultSearchContextValue\n)\n"],"file":"SearchContext.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/context/search/index.ts"],"names":["SearchContext","defaultSearchContextValue"],"mappings":"AAyBA,SAASA,aAAT,EAAwBC,yBAAxB,QAAyD,iBAAzD","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 { SearchContext, defaultSearchContextValue } from './SearchContext'\n"],"file":"index.js"}
|