@looker/api-explorer 0.9.28 → 0.9.32
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 +66 -0
- package/lib/components/DocPseudo/DocParam.js +3 -1
- package/lib/components/DocPseudo/DocParam.js.map +1 -1
- package/lib/esm/components/DocPseudo/DocParam.js +2 -1
- package/lib/esm/components/DocPseudo/DocParam.js.map +1 -1
- package/package.json +10 -10
- package/public/Looker.3.1.json +789 -1340
- package/public/Looker.4.0.json +2038 -2422
- package/src/components/DocMarkdown/utils.spec.ts +4 -4
- package/src/components/DocPseudo/DocParam.spec.tsx +2 -1
- package/src/components/DocPseudo/DocParam.tsx +2 -1
- package/src/components/ExploreType/exploreUtils.spec.tsx +2 -1
|
@@ -57,15 +57,15 @@ describe('DocMarkdown utils', () => {
|
|
|
57
57
|
expect(result).toEqual('/3.1/methods/Dashboard/create_dashboard')
|
|
58
58
|
})
|
|
59
59
|
test('removes mark tags and transforms url', () => {
|
|
60
|
-
const url = 'https://looker.com/
|
|
60
|
+
const url = 'https://docs.looker.com/r/api/<mark>authorization</mark>'
|
|
61
61
|
const result = transformURL('3.1', url)
|
|
62
|
-
expect(result).toEqual('https://looker.com/
|
|
62
|
+
expect(result).toEqual('https://docs.looker.com/r/api/authorization')
|
|
63
63
|
})
|
|
64
64
|
test('removes escaped mark tags and transforms url', () => {
|
|
65
65
|
const url =
|
|
66
|
-
'https://looker.com/
|
|
66
|
+
'https://docs.looker.com/r/api/%3Cmark%3Eauthorization%3Cmark%3E'
|
|
67
67
|
const result = transformURL('3.1', url)
|
|
68
|
-
expect(result).toEqual('https://looker.com/
|
|
68
|
+
expect(result).toEqual('https://docs.looker.com/r/api/authorization')
|
|
69
69
|
})
|
|
70
70
|
})
|
|
71
71
|
})
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
*/
|
|
26
26
|
import React from 'react'
|
|
27
27
|
import { renderWithTheme } from '@looker/components-test-utils'
|
|
28
|
+
import { describeParam } from '@looker/sdk-codegen'
|
|
28
29
|
import { screen, waitFor, fireEvent } from '@testing-library/react'
|
|
29
30
|
|
|
30
31
|
import { api } from '../../test-data'
|
|
@@ -46,7 +47,7 @@ describe('DocParam', () => {
|
|
|
46
47
|
fireEvent.mouseOver(arg)
|
|
47
48
|
await waitFor(() => {
|
|
48
49
|
expect(screen.getByRole('tooltip')).toHaveTextContent(
|
|
49
|
-
`${requiredParam.type.name} ${requiredParam
|
|
50
|
+
`${requiredParam.type.name} ${describeParam(requiredParam)}`
|
|
50
51
|
)
|
|
51
52
|
})
|
|
52
53
|
})
|
|
@@ -27,13 +27,14 @@ import type { FC } from 'react'
|
|
|
27
27
|
import React from 'react'
|
|
28
28
|
import type { IParameter } from '@looker/sdk-codegen'
|
|
29
29
|
import { Tooltip } from '@looker/components'
|
|
30
|
+
import { describeParam } from '@looker/sdk-codegen'
|
|
30
31
|
|
|
31
32
|
export interface DocArgProps {
|
|
32
33
|
parameter: IParameter
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
export const DocParam: FC<DocArgProps> = ({ parameter }) => (
|
|
36
|
-
<Tooltip content={`${parameter.type.name} ${parameter
|
|
37
|
+
<Tooltip content={`${parameter.type.name} ${describeParam(parameter)}`}>
|
|
37
38
|
<span>{parameter.required ? parameter.name : `[${parameter.name}]`}</span>
|
|
38
39
|
</Tooltip>
|
|
39
40
|
)
|
|
@@ -62,7 +62,8 @@ describe('exploreUtils', () => {
|
|
|
62
62
|
icon: <FieldString />,
|
|
63
63
|
title: 'string',
|
|
64
64
|
})
|
|
65
|
-
|
|
65
|
+
const intProp = api.types.ColorStop.properties.offset
|
|
66
|
+
expect(typeIcon(intProp.type)).toEqual({
|
|
66
67
|
icon: <Tag />,
|
|
67
68
|
title: 'int64',
|
|
68
69
|
})
|