@atlaskit/jql-editor 5.5.1 → 5.5.2
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 +8 -0
- package/dist/cjs/analytics/util.js +1 -1
- package/dist/es2019/analytics/util.js +1 -1
- package/dist/esm/analytics/util.js +1 -1
- package/dist/types/analytics/listener/types.d.ts +2 -2
- package/dist/types/hooks/use-editor-theme/index.d.ts +6 -6
- package/dist/types/plugins/autocomplete/components/autocomplete-dropdown/index.d.ts +2 -2
- package/dist/types/plugins/autocomplete/components/autocomplete-option/index.d.ts +1 -1
- package/dist/types/plugins/autocomplete/components/autocomplete-option/styled.d.ts +1 -1
- package/dist/types/plugins/autocomplete/components/types.d.ts +5 -5
- package/dist/types/plugins/rich-inline-nodes/nodes/types.d.ts +1 -1
- package/dist/types/plugins/rich-inline-nodes/nodes/user/index.d.ts +1 -1
- package/dist/types/plugins/rich-inline-nodes/nodes/user/styled.d.ts +1 -1
- package/dist/types/plugins/rich-inline-nodes/util/react-node-view.d.ts +1 -1
- package/dist/types/plugins/types.d.ts +4 -4
- package/dist/types/plugins/validation-tooltip/view.d.ts +1 -1
- package/dist/types/state/types.d.ts +89 -89
- package/dist/types/ui/error-boundary/index.d.ts +8 -8
- package/dist/types/ui/jql-editor/types.d.ts +44 -44
- package/dist/types/ui/jql-editor-controls-content/base-expand-toggle/index.d.ts +1 -1
- package/dist/types/ui/jql-editor-layout/index.d.ts +17 -17
- package/dist/types/ui/jql-editor-layout/styled.d.ts +3 -3
- package/dist/types/ui/jql-editor-portal-provider/types.d.ts +5 -5
- package/dist/types-ts4.5/analytics/listener/types.d.ts +2 -2
- package/dist/types-ts4.5/hooks/use-editor-theme/index.d.ts +6 -6
- package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete-dropdown/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete-option/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete-option/styled.d.ts +1 -1
- package/dist/types-ts4.5/plugins/autocomplete/components/types.d.ts +5 -5
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/user/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/user/styled.d.ts +1 -1
- package/dist/types-ts4.5/plugins/rich-inline-nodes/util/react-node-view.d.ts +1 -1
- package/dist/types-ts4.5/plugins/types.d.ts +4 -4
- package/dist/types-ts4.5/plugins/validation-tooltip/view.d.ts +1 -1
- package/dist/types-ts4.5/state/types.d.ts +89 -89
- package/dist/types-ts4.5/ui/error-boundary/index.d.ts +8 -8
- package/dist/types-ts4.5/ui/jql-editor/types.d.ts +44 -44
- package/dist/types-ts4.5/ui/jql-editor-controls-content/base-expand-toggle/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/jql-editor-layout/index.d.ts +17 -17
- package/dist/types-ts4.5/ui/jql-editor-layout/styled.d.ts +3 -3
- package/dist/types-ts4.5/ui/jql-editor-portal-provider/types.d.ts +5 -5
- package/package.json +2 -3
|
@@ -3,18 +3,18 @@ import { type Jast } from '@atlaskit/jql-ast';
|
|
|
3
3
|
import { type AutocompleteProvider } from '../../plugins/autocomplete/types';
|
|
4
4
|
import { type CustomComponents, type ExternalMessage } from '../../state/types';
|
|
5
5
|
export type HydratedUser = {
|
|
6
|
-
|
|
6
|
+
avatarUrl: string;
|
|
7
7
|
id: string;
|
|
8
8
|
name: string;
|
|
9
|
-
|
|
9
|
+
type: 'user';
|
|
10
10
|
};
|
|
11
11
|
export type HydratedDeprecatedField = {
|
|
12
|
-
|
|
12
|
+
deprecatedSearcherKey: string;
|
|
13
13
|
/**
|
|
14
14
|
* The jqlTerm of the field.
|
|
15
15
|
*/
|
|
16
16
|
id: string;
|
|
17
|
-
|
|
17
|
+
type: 'deprecated-field';
|
|
18
18
|
};
|
|
19
19
|
export type HydratedValue = HydratedUser | HydratedDeprecatedField;
|
|
20
20
|
export type HydratedValues = {
|
|
@@ -26,38 +26,41 @@ export type JQLEditorUIProps = {
|
|
|
26
26
|
*/
|
|
27
27
|
analyticsSource: string;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
query: string;
|
|
32
|
-
/**
|
|
33
|
-
* Custom messages to display.
|
|
29
|
+
* Provider object to fetch autocomplete data.
|
|
34
30
|
*/
|
|
35
|
-
|
|
31
|
+
autocompleteProvider: AutocompleteProvider;
|
|
36
32
|
/**
|
|
37
|
-
*
|
|
33
|
+
* Custom components to take over the rendering of certain parts of JQL editor
|
|
38
34
|
*/
|
|
39
|
-
|
|
35
|
+
customComponents?: CustomComponents;
|
|
40
36
|
/**
|
|
41
|
-
*
|
|
37
|
+
* Enables rich inline nodes feature, which will replace user identifiers with a lozenge containing name and avatar.
|
|
38
|
+
* Note that you must specify an `onHydrate` prop which will return user data for a given query in order to see the
|
|
39
|
+
* following behaviour:
|
|
40
|
+
* - Loading of user avatars
|
|
41
|
+
* - Rendering of user lozenges on component initialisation
|
|
42
|
+
* - Rendering of user lozenges on paste
|
|
42
43
|
*/
|
|
43
|
-
|
|
44
|
+
enableRichInlineNodes?: boolean;
|
|
44
45
|
/**
|
|
45
|
-
*
|
|
46
|
+
* Ref callback to force the focus event
|
|
46
47
|
*/
|
|
47
|
-
|
|
48
|
+
inputRef?: Ref<{
|
|
49
|
+
focus: () => void;
|
|
50
|
+
}>;
|
|
48
51
|
/**
|
|
49
|
-
*
|
|
52
|
+
* `false` matches the Atlaskit default field styling
|
|
53
|
+
* `true` matches the Atlaskit compact field styling, generally used for search purposes.
|
|
50
54
|
*/
|
|
51
|
-
|
|
55
|
+
isCompact?: boolean;
|
|
52
56
|
/**
|
|
53
|
-
*
|
|
54
|
-
* If not passed, hides the search button/other search related functionality, allowing this to be usable as a form field.
|
|
57
|
+
* Flag to enable the searching indicator when a JQL search is in progress.
|
|
55
58
|
*/
|
|
56
|
-
|
|
59
|
+
isSearching?: boolean;
|
|
57
60
|
/**
|
|
58
|
-
*
|
|
61
|
+
* Custom messages to display.
|
|
59
62
|
*/
|
|
60
|
-
|
|
63
|
+
messages?: ExternalMessage[];
|
|
61
64
|
/**
|
|
62
65
|
* Called when we want to debug a particular error or action that has occurred within the editor. The message may
|
|
63
66
|
* contain PII, and as such consumers should treat as a privacy unsafe error.
|
|
@@ -66,40 +69,37 @@ export type JQLEditorUIProps = {
|
|
|
66
69
|
[key: string]: string | number | boolean | void | null;
|
|
67
70
|
}) => void;
|
|
68
71
|
/**
|
|
69
|
-
* Called when the
|
|
70
|
-
* handled which will prevent default behaviour of the help button, i.e. `e.preventDefault()`.
|
|
72
|
+
* Called when the JQL editor has been initialised.
|
|
71
73
|
*/
|
|
72
|
-
|
|
74
|
+
onEditorMounted?: () => void;
|
|
73
75
|
/**
|
|
74
76
|
* Called when the editor input is focused.
|
|
75
77
|
*/
|
|
76
78
|
onFocus?: (e: FocusEvent<HTMLElement>) => void;
|
|
77
79
|
/**
|
|
78
|
-
*
|
|
80
|
+
* Called every time the editor needs to hydrate values for the current query.
|
|
79
81
|
*/
|
|
80
|
-
|
|
82
|
+
onHydrate?: (query: string) => Promise<HydratedValues>;
|
|
81
83
|
/**
|
|
82
|
-
*
|
|
83
|
-
* Note that you must specify an `onHydrate` prop which will return user data for a given query in order to see the
|
|
84
|
-
* following behaviour:
|
|
85
|
-
* - Loading of user avatars
|
|
86
|
-
* - Rendering of user lozenges on component initialisation
|
|
87
|
-
* - Rendering of user lozenges on paste
|
|
84
|
+
* Called if an unexpected error is thrown while rendering the editor.
|
|
88
85
|
*/
|
|
89
|
-
|
|
86
|
+
onRenderError?: (error: Error) => void;
|
|
90
87
|
/**
|
|
91
|
-
*
|
|
92
|
-
*
|
|
88
|
+
* Called every time the search command is given in the editor with the current query value and respective Jast object.
|
|
89
|
+
* If not passed, hides the search button/other search related functionality, allowing this to be usable as a form field.
|
|
93
90
|
*/
|
|
94
|
-
|
|
91
|
+
onSearch?: (query: string, jast: Jast) => void;
|
|
95
92
|
/**
|
|
96
|
-
*
|
|
93
|
+
* Called when the syntax help button is clicked. Consumers can return `true` to signify that this event has been
|
|
94
|
+
* handled which will prevent default behaviour of the help button, i.e. `e.preventDefault()`.
|
|
97
95
|
*/
|
|
98
|
-
|
|
99
|
-
focus: () => void;
|
|
100
|
-
}>;
|
|
96
|
+
onSyntaxHelp?: (e: MouseEvent<HTMLElement>) => boolean;
|
|
101
97
|
/**
|
|
102
|
-
*
|
|
98
|
+
* Called every time the editor is updated with the current query value and respective Jast object.
|
|
103
99
|
*/
|
|
104
|
-
|
|
100
|
+
onUpdate?: (query: string, jast: Jast) => void;
|
|
101
|
+
/**
|
|
102
|
+
* The query to render in the editor.
|
|
103
|
+
*/
|
|
104
|
+
query: string;
|
|
105
105
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import React, { type FocusEvent, type ReactNode } from 'react';
|
|
2
2
|
type Props = {
|
|
3
|
-
/**
|
|
4
|
-
* React node to render within the footer.
|
|
5
|
-
*/
|
|
6
|
-
EditorFooterContent: ReactNode;
|
|
7
3
|
/**
|
|
8
4
|
* React node to render within the editor controls group.
|
|
9
5
|
*/
|
|
10
6
|
EditorControlsContent: ReactNode;
|
|
11
7
|
/**
|
|
12
|
-
*
|
|
8
|
+
* React node to render within the footer.
|
|
13
9
|
*/
|
|
14
|
-
|
|
10
|
+
EditorFooterContent: ReactNode;
|
|
15
11
|
/**
|
|
16
|
-
* Flag to determine whether
|
|
12
|
+
* Flag to determine whether the editor view (or autocomplete dropdown) currently has focus.
|
|
17
13
|
*/
|
|
18
|
-
|
|
14
|
+
editorViewHasFocus: boolean;
|
|
19
15
|
/**
|
|
20
16
|
* Flag to determine if there were any JQL parse errors in the last submitted query.
|
|
21
17
|
*/
|
|
22
18
|
editorViewIsInvalid: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Flag to determine whether line numbers should be shown in the editor.
|
|
21
|
+
*/
|
|
22
|
+
lineNumbersVisible: boolean;
|
|
23
23
|
/**
|
|
24
24
|
* ID to assign to the main wrapper of the editor.
|
|
25
25
|
*/
|
|
@@ -28,6 +28,10 @@ type Props = {
|
|
|
28
28
|
* Ref callback to the main wrapper of the editor.
|
|
29
29
|
*/
|
|
30
30
|
onEditorMainRef?: (editorMain: HTMLElement | null) => void;
|
|
31
|
+
/**
|
|
32
|
+
* Callback when the editor view is blurred.
|
|
33
|
+
*/
|
|
34
|
+
onEditorViewBlur?: () => void;
|
|
31
35
|
/**
|
|
32
36
|
* Ref callback to the editor view container element.
|
|
33
37
|
*/
|
|
@@ -36,18 +40,14 @@ type Props = {
|
|
|
36
40
|
* Callback when the editor view is scrolled.
|
|
37
41
|
*/
|
|
38
42
|
onEditorViewContainerScroll?: (event: React.UIEvent<HTMLElement>) => void;
|
|
39
|
-
/**
|
|
40
|
-
* Ref callback to the editor view element which the Prosemirror editor will be bound to.
|
|
41
|
-
*/
|
|
42
|
-
onEditorViewRef?: (editorView: HTMLElement | null) => void;
|
|
43
|
-
/**
|
|
44
|
-
* Callback when the editor view is blurred.
|
|
45
|
-
*/
|
|
46
|
-
onEditorViewBlur?: () => void;
|
|
47
43
|
/**
|
|
48
44
|
* Callback when the editor view is focused.
|
|
49
45
|
*/
|
|
50
46
|
onEditorViewFocus?: (event: FocusEvent<HTMLElement>) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Ref callback to the editor view element which the Prosemirror editor will be bound to.
|
|
49
|
+
*/
|
|
50
|
+
onEditorViewRef?: (editorView: HTMLElement | null) => void;
|
|
51
51
|
/**
|
|
52
52
|
* Callback when the editor view receives a CSS transition end event.
|
|
53
53
|
*/
|
|
@@ -58,7 +58,7 @@ type ReadOnlyProps = {
|
|
|
58
58
|
query: string;
|
|
59
59
|
};
|
|
60
60
|
export declare const JQLEditorReadOnly: ({ isSearch, isCompact, ...props }: ReadOnlyProps & {
|
|
61
|
-
isSearch?: boolean;
|
|
62
61
|
isCompact?: boolean;
|
|
62
|
+
isSearch?: boolean;
|
|
63
63
|
}) => React.JSX.Element;
|
|
64
64
|
export default JQLEditorLayout;
|
|
@@ -35,8 +35,8 @@ export declare const EditorView: import("@emotion/styled").StyledComponent<{
|
|
|
35
35
|
} & {
|
|
36
36
|
defaultMaxRows: number;
|
|
37
37
|
expandedRows: number;
|
|
38
|
-
lineNumbersVisible: boolean;
|
|
39
38
|
isCompact: boolean;
|
|
39
|
+
lineNumbersVisible: boolean;
|
|
40
40
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
41
41
|
export declare const ReadOnlyEditorView: import("@emotion/styled").StyledComponent<{
|
|
42
42
|
theme?: import("@emotion/react").Theme;
|
|
@@ -44,8 +44,8 @@ export declare const ReadOnlyEditorView: import("@emotion/styled").StyledCompone
|
|
|
44
44
|
} & {
|
|
45
45
|
defaultMaxRows: number;
|
|
46
46
|
expandedRows: number;
|
|
47
|
-
lineNumbersVisible: boolean;
|
|
48
47
|
isCompact: boolean;
|
|
48
|
+
lineNumbersVisible: boolean;
|
|
49
49
|
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
50
50
|
theme?: import("@emotion/react").Theme;
|
|
51
51
|
}, {}, {}>;
|
|
@@ -53,8 +53,8 @@ export declare const EditorControls: import("@emotion/styled").StyledComponent<{
|
|
|
53
53
|
theme?: import("@emotion/react").Theme;
|
|
54
54
|
as?: React.ElementType;
|
|
55
55
|
} & {
|
|
56
|
-
isSearch: boolean;
|
|
57
56
|
isCompact: boolean;
|
|
57
|
+
isSearch: boolean;
|
|
58
58
|
isVisualRefresh?: boolean;
|
|
59
59
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
60
60
|
export {};
|
|
@@ -9,30 +9,30 @@ export type PortalActions = {
|
|
|
9
9
|
export type PortalState = {
|
|
10
10
|
components: {
|
|
11
11
|
[key: string]: {
|
|
12
|
-
portalComponent: ReactNode;
|
|
13
12
|
container: Container;
|
|
13
|
+
portalComponent: ReactNode;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
containers: PluginContainers;
|
|
17
17
|
};
|
|
18
18
|
type CreatePortalAction = {
|
|
19
|
-
type: 'createPortal';
|
|
20
19
|
payload: {
|
|
20
|
+
container: Container;
|
|
21
21
|
key: string;
|
|
22
22
|
portalComponent: ReactNode;
|
|
23
|
-
container: Container;
|
|
24
23
|
};
|
|
24
|
+
type: 'createPortal';
|
|
25
25
|
};
|
|
26
26
|
type DestroyPortalAction = {
|
|
27
|
-
type: 'destroyPortal';
|
|
28
27
|
payload: string;
|
|
28
|
+
type: 'destroyPortal';
|
|
29
29
|
};
|
|
30
30
|
type RegisterPluginContainerAction = {
|
|
31
|
-
type: 'registerPluginContainer';
|
|
32
31
|
payload: {
|
|
33
32
|
containerKey: PluginContainerKey;
|
|
34
33
|
element: HTMLElement | null;
|
|
35
34
|
};
|
|
35
|
+
type: 'registerPluginContainer';
|
|
36
36
|
};
|
|
37
37
|
export type PortalAction = CreatePortalAction | DestroyPortalAction | RegisterPluginContainerAction;
|
|
38
38
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type GasPurePayload, type GasPureScreenEventPayload } from '@atlaskit/analytics-gas-types';
|
|
2
2
|
export type AnalyticsWebClient = {
|
|
3
|
-
sendUIEvent: (event: GasPurePayload) => void;
|
|
4
3
|
sendOperationalEvent: (event: GasPurePayload) => void;
|
|
5
|
-
sendTrackEvent: (event: GasPurePayload) => void;
|
|
6
4
|
sendScreenEvent: (event: GasPureScreenEventPayload) => void;
|
|
5
|
+
sendTrackEvent: (event: GasPurePayload) => void;
|
|
6
|
+
sendUIEvent: (event: GasPurePayload) => void;
|
|
7
7
|
};
|
|
@@ -12,26 +12,26 @@ export type EditorTheme = {
|
|
|
12
12
|
*/
|
|
13
13
|
expandedRows: number;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* `false` matches AK's default field styling
|
|
16
|
+
* `true` matches AK's compact field styling, generally used for search purposes.
|
|
16
17
|
*/
|
|
17
|
-
|
|
18
|
+
isCompact: boolean;
|
|
18
19
|
/**
|
|
19
20
|
* `true` shows search button, other search related elements
|
|
20
21
|
* `false` to act as a text field
|
|
21
22
|
*/
|
|
22
23
|
isSearch: boolean;
|
|
23
24
|
/**
|
|
24
|
-
*
|
|
25
|
-
* `true` matches AK's compact field styling, generally used for search purposes.
|
|
25
|
+
* Toggle the editor view expanded state.
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
toggleExpanded: () => void;
|
|
28
28
|
};
|
|
29
29
|
export declare const EditorThemeContext: import("react").Context<EditorTheme>;
|
|
30
30
|
/**
|
|
31
31
|
* Hook to manage the theming state of the editor.
|
|
32
32
|
*/
|
|
33
33
|
export declare const useEditorTheme: ({ isSearch, isCompact, }: {
|
|
34
|
-
isSearch?: boolean;
|
|
35
34
|
isCompact?: boolean;
|
|
35
|
+
isSearch?: boolean;
|
|
36
36
|
}) => EditorTheme;
|
|
37
37
|
export declare const useEditorThemeContext: () => EditorTheme;
|
|
@@ -2,10 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import { type PluginKeymap } from '../../../common/plugin-keymap';
|
|
3
3
|
import { type AutocompleteAnalyticsAttributes, type SelectableAutocompleteOption } from '../types';
|
|
4
4
|
type Props = {
|
|
5
|
-
options: SelectableAutocompleteOption[];
|
|
6
|
-
loading: boolean;
|
|
7
5
|
keymap: PluginKeymap;
|
|
6
|
+
loading: boolean;
|
|
8
7
|
onClick: (option: SelectableAutocompleteOption, analyticsAttributes: AutocompleteAnalyticsAttributes) => void;
|
|
8
|
+
options: SelectableAutocompleteOption[];
|
|
9
9
|
};
|
|
10
10
|
declare const AutocompleteDropdown: ({ options, loading, keymap, onClick }: Props) => React.JSX.Element | null;
|
|
11
11
|
export default AutocompleteDropdown;
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import { type SelectableAutocompleteOption } from '../types';
|
|
3
3
|
type Props = {
|
|
4
4
|
isSelected: boolean;
|
|
5
|
-
option: SelectableAutocompleteOption;
|
|
6
5
|
onClick: () => void;
|
|
7
6
|
onMouseMove: () => void;
|
|
7
|
+
option: SelectableAutocompleteOption;
|
|
8
8
|
};
|
|
9
9
|
declare const AutocompleteOption: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLLIElement>>;
|
|
10
10
|
export default AutocompleteOption;
|
|
@@ -6,8 +6,8 @@ export declare const OptionListItem: import("@emotion/styled").StyledComponent<{
|
|
|
6
6
|
theme?: import("@emotion/react").Theme;
|
|
7
7
|
as?: React.ElementType;
|
|
8
8
|
} & {
|
|
9
|
-
isSelected: boolean;
|
|
10
9
|
isDeprecated: boolean;
|
|
10
|
+
isSelected: boolean;
|
|
11
11
|
}, import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {}>;
|
|
12
12
|
export declare const OptionName: import("@emotion/styled").StyledComponent<{
|
|
13
13
|
theme?: import("@emotion/react").Theme;
|
|
@@ -4,9 +4,9 @@ import { type PluginKeymap } from '../../common/plugin-keymap';
|
|
|
4
4
|
export type { AutocompleteProvider, AutocompleteOptions, AutocompleteOption, AutocompleteValueType, } from '@atlaskit/jql-editor-common';
|
|
5
5
|
export type AutocompleteOptionType = 'field' | 'operator' | 'value' | 'function' | 'keyword';
|
|
6
6
|
export type AutocompleteOptionExtra = {
|
|
7
|
-
replacePosition: Position;
|
|
8
7
|
context: JQLRuleContext | null;
|
|
9
8
|
matchedText: string;
|
|
9
|
+
replacePosition: Position;
|
|
10
10
|
type: AutocompleteOptionType;
|
|
11
11
|
};
|
|
12
12
|
export type SelectableAutocompleteOption = AutocompleteOption & AutocompleteOptionExtra & {
|
|
@@ -14,15 +14,15 @@ export type SelectableAutocompleteOption = AutocompleteOption & AutocompleteOpti
|
|
|
14
14
|
};
|
|
15
15
|
export type SelectableAutocompleteOptions = SelectableAutocompleteOption[];
|
|
16
16
|
export type AutocompleteOptionGroup = {
|
|
17
|
-
tokens: SelectableAutocompleteOptions;
|
|
18
17
|
fields: SelectableAutocompleteOptions;
|
|
18
|
+
functions: SelectableAutocompleteOptions;
|
|
19
19
|
operators: SelectableAutocompleteOptions;
|
|
20
|
+
tokens: SelectableAutocompleteOptions;
|
|
20
21
|
values: SelectableAutocompleteOptions;
|
|
21
|
-
functions: SelectableAutocompleteOptions;
|
|
22
22
|
};
|
|
23
23
|
export type AutocompletePosition = {
|
|
24
|
-
top: number;
|
|
25
24
|
left: number;
|
|
25
|
+
top: number;
|
|
26
26
|
};
|
|
27
27
|
export type AutocompleteProps = {
|
|
28
28
|
keymap: PluginKeymap;
|
|
@@ -30,9 +30,9 @@ export type AutocompleteProps = {
|
|
|
30
30
|
};
|
|
31
31
|
export type AutocompleteAnalyticsAttributes = {
|
|
32
32
|
keyboard: boolean;
|
|
33
|
+
nodeType: string;
|
|
33
34
|
numberOfOptions: number;
|
|
34
35
|
optionIndex: number;
|
|
35
36
|
optionType: AutocompleteOptionType;
|
|
36
37
|
queryLength: number;
|
|
37
|
-
nodeType: string;
|
|
38
38
|
};
|
|
@@ -2,8 +2,8 @@ import { type FunctionComponent } from 'react';
|
|
|
2
2
|
import { type AttributeSpec } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import { type NodeViewProps } from '../util/react-node-view';
|
|
4
4
|
export type JQLNodeSpec<Props> = {
|
|
5
|
-
component: FunctionComponent<NodeViewProps<Props>>;
|
|
6
5
|
attrs: {
|
|
7
6
|
[name: string]: AttributeSpec;
|
|
8
7
|
};
|
|
8
|
+
component: FunctionComponent<NodeViewProps<Props>>;
|
|
9
9
|
};
|
|
@@ -2,8 +2,8 @@ export declare const UserContainer: import("@emotion/styled").StyledComponent<{
|
|
|
2
2
|
theme?: import("@emotion/react").Theme;
|
|
3
3
|
as?: React.ElementType;
|
|
4
4
|
} & {
|
|
5
|
-
selected: boolean;
|
|
6
5
|
error: boolean;
|
|
6
|
+
selected: boolean;
|
|
7
7
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
8
8
|
export declare const NameContainer: import("@emotion/styled").StyledComponent<{
|
|
9
9
|
theme?: import("@emotion/react").Theme;
|
|
@@ -3,8 +3,8 @@ import { type Node } from '@atlaskit/editor-prosemirror/model';
|
|
|
3
3
|
import { type Decoration, type NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import { type PortalActions } from '../../../ui/jql-editor-portal-provider/types';
|
|
5
5
|
export type NodeViewProps<Props> = Props & {
|
|
6
|
-
selected: boolean;
|
|
7
6
|
error: boolean;
|
|
7
|
+
selected: boolean;
|
|
8
8
|
};
|
|
9
9
|
export declare class ReactNodeView<Props> implements NodeView {
|
|
10
10
|
private readonly component;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export type { AutocompleteProvider, AutocompleteOptions, AutocompleteOption, AutocompleteValueType, } from './autocomplete/types';
|
|
2
2
|
export type PluginContainers = {
|
|
3
3
|
/**
|
|
4
|
-
* Container for plugin components which should be appended
|
|
4
|
+
* Container for plugin components which should be appended at the end of the editor input.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
editor_controls?: HTMLElement;
|
|
7
7
|
/**
|
|
8
8
|
* Container for plugin components which should be appended to the footer underneath the editor input.
|
|
9
9
|
*/
|
|
10
10
|
footer?: HTMLElement;
|
|
11
11
|
/**
|
|
12
|
-
* Container for plugin components which should be appended
|
|
12
|
+
* Container for plugin components which should be appended to the top level container element.
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
main?: HTMLElement;
|
|
15
15
|
};
|
|
16
16
|
export type PluginContainerKey = keyof PluginContainers;
|
|
@@ -2,10 +2,10 @@ import { type EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
|
2
2
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import { JQLSyntaxError } from '@atlaskit/jql-ast';
|
|
4
4
|
type Coords = {
|
|
5
|
+
bottom: number;
|
|
5
6
|
left: number;
|
|
6
7
|
right: number;
|
|
7
8
|
top: number;
|
|
8
|
-
bottom: number;
|
|
9
9
|
};
|
|
10
10
|
export declare class ValidationTooltipPluginView {
|
|
11
11
|
tooltip: HTMLElement;
|