@atlaskit/jql-editor 6.6.0 → 7.0.0
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 +26 -0
- package/analytics/package.json +1 -8
- package/async/package.json +1 -8
- package/components/types/package.json +1 -8
- 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/i18n/package.json +1 -8
- package/jql-editor-analytics-listener/package.json +1 -8
- package/jql-editor-layout/package.json +1 -8
- package/package.json +29 -37
- package/state/types/package.json +1 -8
- package/types/package.json +1 -8
- package/ui/package.json +1 -8
- package/ui/types/package.json +1 -8
- package/dist/types-ts4.5/accessibility/index.d.ts +0 -1
- package/dist/types-ts4.5/accessibility/styled.d.ts +0 -7
- package/dist/types-ts4.5/analytics/constants.d.ts +0 -18
- package/dist/types-ts4.5/analytics/index.d.ts +0 -7
- package/dist/types-ts4.5/analytics/listener/analytics-web-client-wrapper.d.ts +0 -9
- package/dist/types-ts4.5/analytics/listener/handle-event.d.ts +0 -9
- package/dist/types-ts4.5/analytics/listener/helpers/logger.d.ts +0 -24
- package/dist/types-ts4.5/analytics/listener/index.d.ts +0 -7
- package/dist/types-ts4.5/analytics/listener/jql-editor-analytics-listener.d.ts +0 -20
- package/dist/types-ts4.5/analytics/listener/process-event-payload.d.ts +0 -8
- package/dist/types-ts4.5/analytics/listener/types.d.ts +0 -7
- package/dist/types-ts4.5/analytics/types.d.ts +0 -3
- package/dist/types-ts4.5/analytics/util.d.ts +0 -5
- package/dist/types-ts4.5/async.d.ts +0 -5
- package/dist/types-ts4.5/commands/select-error-command/index.d.ts +0 -5
- package/dist/types-ts4.5/common/constants.d.ts +0 -6
- package/dist/types-ts4.5/common/messages.d.ts +0 -7
- package/dist/types-ts4.5/common/styled.d.ts +0 -8
- package/dist/types-ts4.5/entry-points/analytics.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/async.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/components-types.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/jql-editor-analytics-listener.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/jql-editor-layout.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/src-types.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/state-types.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/ui-types.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/ui.d.ts +0 -1
- package/dist/types-ts4.5/hooks/use-editor-theme/index.d.ts +0 -43
- package/dist/types-ts4.5/hooks/use-editor-view-has-infos/index.d.ts +0 -1
- package/dist/types-ts4.5/hooks/use-editor-view-has-warnings/index.d.ts +0 -1
- package/dist/types-ts4.5/hooks/use-editor-view-is-invalid/index.d.ts +0 -11
- package/dist/types-ts4.5/i18n/cs.d.ts +0 -8
- package/dist/types-ts4.5/i18n/da.d.ts +0 -8
- package/dist/types-ts4.5/i18n/de.d.ts +0 -8
- package/dist/types-ts4.5/i18n/en.d.ts +0 -8
- package/dist/types-ts4.5/i18n/en_GB.d.ts +0 -8
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +0 -8
- package/dist/types-ts4.5/i18n/es.d.ts +0 -8
- package/dist/types-ts4.5/i18n/et.d.ts +0 -8
- package/dist/types-ts4.5/i18n/fi.d.ts +0 -8
- package/dist/types-ts4.5/i18n/fr.d.ts +0 -8
- package/dist/types-ts4.5/i18n/hr.d.ts +0 -8
- package/dist/types-ts4.5/i18n/hu.d.ts +0 -8
- package/dist/types-ts4.5/i18n/index.d.ts +0 -24
- package/dist/types-ts4.5/i18n/it.d.ts +0 -8
- package/dist/types-ts4.5/i18n/ja.d.ts +0 -8
- package/dist/types-ts4.5/i18n/ko.d.ts +0 -8
- package/dist/types-ts4.5/i18n/nb.d.ts +0 -8
- package/dist/types-ts4.5/i18n/nl.d.ts +0 -8
- package/dist/types-ts4.5/i18n/pl.d.ts +0 -8
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +0 -8
- package/dist/types-ts4.5/i18n/pt_PT.d.ts +0 -8
- package/dist/types-ts4.5/i18n/ru.d.ts +0 -8
- package/dist/types-ts4.5/i18n/sk.d.ts +0 -8
- package/dist/types-ts4.5/i18n/sl.d.ts +0 -8
- package/dist/types-ts4.5/i18n/sr_RS.d.ts +0 -8
- package/dist/types-ts4.5/i18n/sr_YR.d.ts +0 -8
- package/dist/types-ts4.5/i18n/sv.d.ts +0 -8
- package/dist/types-ts4.5/i18n/th.d.ts +0 -8
- package/dist/types-ts4.5/i18n/tr.d.ts +0 -8
- package/dist/types-ts4.5/i18n/uk.d.ts +0 -8
- package/dist/types-ts4.5/i18n/vi.d.ts +0 -8
- package/dist/types-ts4.5/i18n/zh.d.ts +0 -8
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +0 -8
- package/dist/types-ts4.5/index.d.ts +0 -5
- package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete/index.d.ts +0 -4
- package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete-dropdown/index.d.ts +0 -11
- package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete-dropdown/styled.d.ts +0 -24
- package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete-option/index.d.ts +0 -10
- package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete-option/messages.d.ts +0 -12
- package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete-option/styled.d.ts +0 -34
- package/dist/types-ts4.5/plugins/autocomplete/components/types.d.ts +0 -38
- package/dist/types-ts4.5/plugins/autocomplete/constants.d.ts +0 -14
- package/dist/types-ts4.5/plugins/autocomplete/index.d.ts +0 -4
- package/dist/types-ts4.5/plugins/autocomplete/messages.d.ts +0 -7
- package/dist/types-ts4.5/plugins/autocomplete/types.d.ts +0 -1
- package/dist/types-ts4.5/plugins/autocomplete/view.d.ts +0 -19
- package/dist/types-ts4.5/plugins/common/get-document-position/index.d.ts +0 -9
- package/dist/types-ts4.5/plugins/common/plugin-keymap.d.ts +0 -8
- package/dist/types-ts4.5/plugins/common/react-plugin-view.d.ts +0 -48
- package/dist/types-ts4.5/plugins/index.d.ts +0 -5
- package/dist/types-ts4.5/plugins/jql-ast/JQLEditorErrorStrategy.d.ts +0 -17
- package/dist/types-ts4.5/plugins/jql-ast/constants.d.ts +0 -3
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/CustomFieldRuleErrorHandler.d.ts +0 -5
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/ExpectedTokensErrorHandler.d.ts +0 -11
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/FieldPropertyIdErrorHandler.d.ts +0 -6
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/FieldRuleErrorHandler.d.ts +0 -6
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/FunctionArgumentRuleErrorHandler.d.ts +0 -6
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/OperandRuleErrorHandler.d.ts +0 -9
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/OperatorRuleErrorHandler.d.ts +0 -6
- package/dist/types-ts4.5/plugins/jql-ast/index.d.ts +0 -7
- package/dist/types-ts4.5/plugins/jql-ast/messages.d.ts +0 -172
- package/dist/types-ts4.5/plugins/jql-ast/utils.d.ts +0 -4
- package/dist/types-ts4.5/plugins/jql-syntax-highlighting/index.d.ts +0 -4
- package/dist/types-ts4.5/plugins/jql-syntax-highlighting/types.d.ts +0 -5
- package/dist/types-ts4.5/plugins/jql-syntax-highlighting/visitor.d.ts +0 -19
- package/dist/types-ts4.5/plugins/rich-inline-nodes/constants.d.ts +0 -3
- package/dist/types-ts4.5/plugins/rich-inline-nodes/index.d.ts +0 -4
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/base/index.d.ts +0 -16
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/base/types.d.ts +0 -7
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/goal/goal-icon.d.ts +0 -16
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/goal/goal-node.d.ts +0 -10
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/goal/index.d.ts +0 -3
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/goal/types.d.ts +0 -5
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/index.d.ts +0 -13
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/lozenge-with-avatar/index.d.ts +0 -7
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/lozenge-with-avatar/styled.d.ts +0 -18
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/project/index.d.ts +0 -3
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/project/messages.d.ts +0 -7
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/project/project-node.d.ts +0 -10
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/project/types.d.ts +0 -7
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/team/index.d.ts +0 -7
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/team/styled.d.ts +0 -18
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/types.d.ts +0 -9
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/user/index.d.ts +0 -7
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/user/styled.d.ts +0 -18
- package/dist/types-ts4.5/plugins/rich-inline-nodes/types.d.ts +0 -2
- package/dist/types-ts4.5/plugins/rich-inline-nodes/util/create-node-spec.d.ts +0 -4
- package/dist/types-ts4.5/plugins/rich-inline-nodes/util/react-node-view.d.ts +0 -24
- package/dist/types-ts4.5/plugins/rich-inline-nodes/util/replace-nodes-transaction.d.ts +0 -3
- package/dist/types-ts4.5/plugins/types.d.ts +0 -16
- package/dist/types-ts4.5/plugins/validation-tooltip/constants.d.ts +0 -5
- package/dist/types-ts4.5/plugins/validation-tooltip/index.d.ts +0 -3
- package/dist/types-ts4.5/plugins/validation-tooltip/view.d.ts +0 -18
- package/dist/types-ts4.5/schema/index.d.ts +0 -28
- package/dist/types-ts4.5/state/analytics/index.d.ts +0 -9
- package/dist/types-ts4.5/state/autocomplete/index.d.ts +0 -4
- package/dist/types-ts4.5/state/hydration/index.d.ts +0 -3
- package/dist/types-ts4.5/state/hydration/util.d.ts +0 -30
- package/dist/types-ts4.5/state/index.d.ts +0 -102
- package/dist/types-ts4.5/state/types.d.ts +0 -261
- package/dist/types-ts4.5/state/util.d.ts +0 -16
- package/dist/types-ts4.5/types.d.ts +0 -5
- package/dist/types-ts4.5/ui/error-boundary/index.d.ts +0 -25
- package/dist/types-ts4.5/ui/index.d.ts +0 -3
- package/dist/types-ts4.5/ui/intl-provider/index.d.ts +0 -10
- package/dist/types-ts4.5/ui/jql-editor/index.d.ts +0 -13
- package/dist/types-ts4.5/ui/jql-editor/types.d.ts +0 -136
- package/dist/types-ts4.5/ui/jql-editor-controls-content/base-expand-toggle/index.d.ts +0 -10
- package/dist/types-ts4.5/ui/jql-editor-controls-content/base-expand-toggle/styled.d.ts +0 -7
- package/dist/types-ts4.5/ui/jql-editor-controls-content/base-search/index.d.ts +0 -9
- package/dist/types-ts4.5/ui/jql-editor-controls-content/base-syntax-help/index.d.ts +0 -9
- package/dist/types-ts4.5/ui/jql-editor-controls-content/base-syntax-help/styled.d.ts +0 -7
- package/dist/types-ts4.5/ui/jql-editor-controls-content/expand-toggle/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/jql-editor-controls-content/expand-toggle/messages.d.ts +0 -17
- package/dist/types-ts4.5/ui/jql-editor-controls-content/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/jql-editor-controls-content/read-only-controls-content/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/jql-editor-controls-content/search/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/jql-editor-controls-content/search/messages.d.ts +0 -7
- package/dist/types-ts4.5/ui/jql-editor-controls-content/syntax-help/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/jql-editor-controls-content/syntax-help/messages.d.ts +0 -12
- package/dist/types-ts4.5/ui/jql-editor-footer-content/index.d.ts +0 -6
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-editor-help/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-editor-help/messages.d.ts +0 -17
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-editor-help/styled.d.ts +0 -11
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/errors/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/errors/messages.d.ts +0 -7
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/format/index.d.ts +0 -15
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/format/styled.d.ts +0 -13
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/index.d.ts +0 -3
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/infos/index.d.ts +0 -3
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/warnings/index.d.ts +0 -3
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/warnings/messages.d.ts +0 -17
- package/dist/types-ts4.5/ui/jql-editor-layout/index.d.ts +0 -65
- package/dist/types-ts4.5/ui/jql-editor-layout/styled.d.ts +0 -65
- package/dist/types-ts4.5/ui/jql-editor-portal-provider/context.d.ts +0 -4
- package/dist/types-ts4.5/ui/jql-editor-portal-provider/index.d.ts +0 -7
- package/dist/types-ts4.5/ui/jql-editor-portal-provider/types.d.ts +0 -38
- package/dist/types-ts4.5/ui/jql-editor-view/index.d.ts +0 -10
- package/dist/types-ts4.5/ui/messages.d.ts +0 -7
- package/dist/types-ts4.5/ui/tooltip-tag/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/tooltip-tag/styled.d.ts +0 -7
- package/dist/types-ts4.5/ui/types.d.ts +0 -9
- package/dist/types-ts4.5/utils/document-text/index.d.ts +0 -9
- package/dist/types-ts4.5/utils/split-text-by-new-line/index.d.ts +0 -4
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { AbstractJastVisitor, type CompoundClause, type FunctionOperand, type ListOperand, type NotClause, type Query, type TerminalClause, type ValueOperand } from '@atlaskit/jql-ast';
|
|
2
|
-
/**
|
|
3
|
-
* Normalise a JQL string for use as a hydration map key.
|
|
4
|
-
* Strips quotes/escaping and lowercases to ensure case-insensitive matching
|
|
5
|
-
* between field names from different sources (e.g. AST vs hydration API).
|
|
6
|
-
*/
|
|
7
|
-
export declare const normaliseHydrationKey: (key: string) => string;
|
|
8
|
-
/**
|
|
9
|
-
* Given an AST with parse errors, this visitor returns a valid query that is equivalent for hydration purposes
|
|
10
|
-
* (i.e. just fields, operators and values). Resulting query is generated on a best-effort basis and depends on
|
|
11
|
-
* a successful parser error recovery.
|
|
12
|
-
*
|
|
13
|
-
* Example 1:
|
|
14
|
-
* - Original query: "assignee in (abc-123-def"
|
|
15
|
-
* - Equivalent query: "assignee in (abc-123-def)"
|
|
16
|
-
*
|
|
17
|
-
* Example 2:
|
|
18
|
-
* - Original query: "project = EM and status in (Done, currentUser(), EMPTY) and reporter in"
|
|
19
|
-
* - Equivalent query: "project = EM and status in (Done)"
|
|
20
|
-
*/
|
|
21
|
-
export declare class ValidQueryVisitor extends AbstractJastVisitor<string> {
|
|
22
|
-
visitQuery: (query: Query) => string;
|
|
23
|
-
visitCompoundClause: (compoundClause: CompoundClause) => string;
|
|
24
|
-
visitTerminalClause: (terminalClause: TerminalClause) => string;
|
|
25
|
-
visitNotClause: (notClause: NotClause) => string;
|
|
26
|
-
visitValueOperand: (valueOperand: ValueOperand) => string;
|
|
27
|
-
visitListOperand: (listOperand: ListOperand) => string;
|
|
28
|
-
visitFunctionOperand: (functionOperand: FunctionOperand) => string;
|
|
29
|
-
protected defaultResult(): string;
|
|
30
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { type FocusEvent, type MouseEvent } from 'react';
|
|
2
|
-
import { type IntlShape } from 'react-intl';
|
|
3
|
-
import { type Action, type BoundActions, type HookFunction, type OverrideContainerComponent } from 'react-sweet-state';
|
|
4
|
-
import { type Observable } from 'rxjs/Observable';
|
|
5
|
-
import { type EditorState, type Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
-
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
import { type JQLParseError } from '@atlaskit/jql-ast';
|
|
8
|
-
import { type JQLRuleSuggestion } from '@atlaskit/jql-autocomplete';
|
|
9
|
-
import { type JqlEditorAnalyticsEvent } from '../analytics';
|
|
10
|
-
import { type AutocompleteOptionGroup, type AutocompleteOptions, type AutocompleteOptionType, type SelectableAutocompleteOption } from '../plugins/autocomplete/components/types';
|
|
11
|
-
import { type AutocompleteProvider } from '../plugins/types';
|
|
12
|
-
import { type PortalActions } from '../ui/jql-editor-portal-provider/types';
|
|
13
|
-
import { type HydratedDeprecatedField, type HydratedProject, type HydratedGoal, type HydratedLozengeWithAvatar, type HydratedTeam, type HydratedUser, type HydratedValue } from '../ui/jql-editor/types';
|
|
14
|
-
import { type AutocompletePosition, type AutocompleteState, type ContextAwareJQLSuggestions, type CustomErrorComponent, type ExternalMessagesNormalized, type OptionsKey, type Props, type State } from './types';
|
|
15
|
-
export declare const initialState: State;
|
|
16
|
-
type Actions = {
|
|
17
|
-
appendOptionsForObservable: (key: OptionsKey, observable: Observable<AutocompleteOptions>, rule: JQLRuleSuggestion, type: AutocompleteOptionType) => Action<State, void, Observable<AutocompleteOptions>>;
|
|
18
|
-
callAutocompleteProviders: ({ rules, tokens }: ContextAwareJQLSuggestions) => Action<State>;
|
|
19
|
-
cancelSubscription: () => Action<State>;
|
|
20
|
-
closeAutocomplete: () => Action<State>;
|
|
21
|
-
configurePlugins: (portalActions: PortalActions | void) => Action<State, Props>;
|
|
22
|
-
createAndFireAnalyticsEvent: (payload: JqlEditorAnalyticsEvent) => Action<State, Props>;
|
|
23
|
-
externalErrorMessageViewed: () => Action<State, Props>;
|
|
24
|
-
getAutocompleteOptions: (suggestions: ContextAwareJQLSuggestions) => Action<State>;
|
|
25
|
-
getAutocompleteSuggestions: (editorState: EditorState) => Action<State>;
|
|
26
|
-
initialiseEditorState: () => Action<State, Props>;
|
|
27
|
-
initialiseEditorView: (editorViewNode: HTMLElement, attributes: {
|
|
28
|
-
[key: string]: string;
|
|
29
|
-
}, portalActions: PortalActions) => Action<State, Props>;
|
|
30
|
-
onApplyEditorTransaction: (transaction: Transaction) => Action<State, Props>;
|
|
31
|
-
onEditorViewBlur: () => Action<State>;
|
|
32
|
-
onEditorViewFocus: (event: FocusEvent<HTMLElement>) => Action<State, Props>;
|
|
33
|
-
onSearch: () => Action<State>;
|
|
34
|
-
onSearchCommand: (pmState: EditorState, pmDispatch: ((tr: Transaction) => void) | undefined, pmView: EditorView | undefined, keyboardShortcut: boolean) => Action<State, Props, boolean>;
|
|
35
|
-
openAutocompleteOnNextUpdate: () => Action<State>;
|
|
36
|
-
resetEditorState: (query: string, addToHistory?: boolean) => Action<State>;
|
|
37
|
-
setAutocompleteContainer: (container: HTMLElement | null) => Action<State>;
|
|
38
|
-
setAutocompleteOptions: (options: AutocompleteOptionGroup) => Action<State>;
|
|
39
|
-
setEditorViewContainer: (editorViewContainer: HTMLElement) => Action<State>;
|
|
40
|
-
setEditorViewContainerScroll: (scroll: number) => Action<State>;
|
|
41
|
-
setLoading: (loading: boolean) => Action<State>;
|
|
42
|
-
setSelectedAutocompleteOptionId: (selectedOptionId: string | undefined) => Action<State>;
|
|
43
|
-
updateEditorView: (attributes: {
|
|
44
|
-
[key: string]: string;
|
|
45
|
-
}) => Action<State, Props>;
|
|
46
|
-
updateValidationState: () => Action<State>;
|
|
47
|
-
};
|
|
48
|
-
export declare const actions: Actions;
|
|
49
|
-
export declare const useStoreActions: HookFunction<null, BoundActions<State, Actions>, void>;
|
|
50
|
-
export declare const useEditorState: HookFunction<EditorState, BoundActions<State, Actions>, void>;
|
|
51
|
-
export declare const useEditorView: HookFunction<EditorView | undefined, BoundActions<State, Actions>, void>;
|
|
52
|
-
export declare const useIsSearching: HookFunction<boolean | undefined, BoundActions<State, Actions>, void>;
|
|
53
|
-
export declare const useIntl: HookFunction<IntlShape, BoundActions<State, Actions>, void>;
|
|
54
|
-
export declare const useAutocompleteProvider: HookFunction<AutocompleteProvider, BoundActions<State, Actions>, void>;
|
|
55
|
-
export declare const useScopedId: HookFunction<string, BoundActions<State, Actions>, string>;
|
|
56
|
-
export declare const useIdPrefix: HookFunction<string, BoundActions<State, Actions>, void>;
|
|
57
|
-
export declare const useEditorViewHasFocus: HookFunction<boolean, BoundActions<State, Actions>, void>;
|
|
58
|
-
export declare const useLineNumbersVisible: HookFunction<boolean, BoundActions<State, Actions>, void>;
|
|
59
|
-
export declare const useAutocomplete: HookFunction<AutocompleteState, BoundActions<State, Actions>, void>;
|
|
60
|
-
/**
|
|
61
|
-
* Returns the JQL error from the last query that was searched, or {@code null} if there were none.
|
|
62
|
-
*/
|
|
63
|
-
export declare const useJqlError: HookFunction<JQLParseError | null, BoundActions<State, Actions>, void>;
|
|
64
|
-
/**
|
|
65
|
-
* Returns whether there are any JQL errors in the current Prosemirror editor state.
|
|
66
|
-
*/
|
|
67
|
-
export declare const useEditorStateHasJqlError: HookFunction<boolean, BoundActions<State, Actions>, void>;
|
|
68
|
-
export declare const useExternalMessages: HookFunction<ExternalMessagesNormalized, BoundActions<State, Actions>, void>;
|
|
69
|
-
export declare const useCustomErrorComponent: HookFunction<CustomErrorComponent | undefined, BoundActions<State, Actions>, void>;
|
|
70
|
-
export declare const useAutocompleteOptions: HookFunction<SelectableAutocompleteOption[], BoundActions<State, Actions>, void>;
|
|
71
|
-
export declare const useAutocompleteLoading: HookFunction<boolean, BoundActions<State, Actions>, void>;
|
|
72
|
-
export declare const useAutocompleteIsOpen: HookFunction<boolean, BoundActions<State, Actions>, void>;
|
|
73
|
-
export declare const useAutocompletePosition: HookFunction<AutocompletePosition, BoundActions<State, Actions>, void>;
|
|
74
|
-
export declare const useHydratedValue: HookFunction<HydratedValue | undefined, BoundActions<State, Actions>, {
|
|
75
|
-
fieldName: string;
|
|
76
|
-
id: string;
|
|
77
|
-
}>;
|
|
78
|
-
export declare const useHydratedUser: HookFunction<HydratedUser | undefined, BoundActions<State, Actions>, {
|
|
79
|
-
fieldName: string;
|
|
80
|
-
id: string;
|
|
81
|
-
}>;
|
|
82
|
-
export declare const useHydratedTeam: HookFunction<HydratedTeam | undefined, BoundActions<State, Actions>, {
|
|
83
|
-
fieldName: string;
|
|
84
|
-
id: string;
|
|
85
|
-
}>;
|
|
86
|
-
export declare const useHydratedProject: HookFunction<HydratedProject | undefined, BoundActions<State, Actions>, {
|
|
87
|
-
fieldName: string;
|
|
88
|
-
id: string;
|
|
89
|
-
}>;
|
|
90
|
-
export declare const useHydratedGoal: HookFunction<HydratedGoal | undefined, BoundActions<State, Actions>, {
|
|
91
|
-
fieldName: string;
|
|
92
|
-
id: string;
|
|
93
|
-
}>;
|
|
94
|
-
export declare const useHydratedLozengeWithAvatar: HookFunction<HydratedLozengeWithAvatar | undefined, BoundActions<State, Actions>, {
|
|
95
|
-
fieldName: string;
|
|
96
|
-
id: string;
|
|
97
|
-
}>;
|
|
98
|
-
export declare const useHydratedDeprecations: HookFunction<HydratedDeprecatedField[], BoundActions<State, Actions>, void>;
|
|
99
|
-
export declare const useRichInlineNodesEnabled: HookFunction<boolean, BoundActions<State, Actions>, void>;
|
|
100
|
-
export declare const useOnSyntaxHelp: HookFunction<void | ((e: MouseEvent<HTMLElement>) => boolean), BoundActions<State, Actions>, void>;
|
|
101
|
-
export declare const EditorStateContainer: OverrideContainerComponent<Props>;
|
|
102
|
-
export {};
|
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import { type FocusEvent, type MouseEvent, type MutableRefObject, type PropsWithChildren, type ReactNode } from 'react';
|
|
2
|
-
import { type IntlShape } from 'react-intl';
|
|
3
|
-
import { type Subscription } from 'rxjs/Subscription';
|
|
4
|
-
import { type EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import { type Jast, type JQLParseError } from '@atlaskit/jql-ast';
|
|
7
|
-
import { type JQLRuleContext, type JQLRuleSuggestions, type TokenSuggestions } from '@atlaskit/jql-autocomplete';
|
|
8
|
-
import { type JqlEditorAnalyticsEvent } from '../analytics';
|
|
9
|
-
import { type EditorTheme } from '../hooks/use-editor-theme';
|
|
10
|
-
import { type AutocompleteOptionGroup, type AutocompleteProvider } from '../plugins/autocomplete/types';
|
|
11
|
-
import { type HydratedValue, type HydratedValues } from '../ui/jql-editor/types';
|
|
12
|
-
export type ContextAwareTokenSuggestions = TokenSuggestions & {
|
|
13
|
-
context?: JQLRuleContext;
|
|
14
|
-
};
|
|
15
|
-
export type ContextAwareJQLSuggestions = {
|
|
16
|
-
rules: JQLRuleSuggestions;
|
|
17
|
-
tokens: ContextAwareTokenSuggestions;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Analytic attributes emitted whenever external JQL errors are viewed in the UI.
|
|
21
|
-
*/
|
|
22
|
-
export type ExternalErrorAttributes = {
|
|
23
|
-
hasClientError: boolean;
|
|
24
|
-
semanticErrorCount: number;
|
|
25
|
-
syntaxErrorCount: number;
|
|
26
|
-
syntaxErrorTypes: string[];
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Custom error messages to display for an invalid query. This should be sourced from the server when a query is
|
|
30
|
-
* submitted to perform additional semantic validation that cannot be performed on the client, e.g. "The option
|
|
31
|
-
* 'Chocolate' for field 'Ice cream' does not exist".
|
|
32
|
-
*/
|
|
33
|
-
export type ExternalError = {
|
|
34
|
-
/**
|
|
35
|
-
* Optional identifying error type when a syntax error has occurred. This should be one of the types defined in the
|
|
36
|
-
* `JqlSyntaxQueryErrorExtension` node of the Atlassian GraphQL schema.
|
|
37
|
-
*/
|
|
38
|
-
errorType?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Message to display.
|
|
41
|
-
*/
|
|
42
|
-
message: ReactNode;
|
|
43
|
-
/**
|
|
44
|
-
* Type of the message.
|
|
45
|
-
*/
|
|
46
|
-
type: 'error';
|
|
47
|
-
};
|
|
48
|
-
export type ExternalWarning = {
|
|
49
|
-
/**
|
|
50
|
-
* Message to display.
|
|
51
|
-
*/
|
|
52
|
-
message: ReactNode;
|
|
53
|
-
/**
|
|
54
|
-
* Type of the message.
|
|
55
|
-
*/
|
|
56
|
-
type: 'warning';
|
|
57
|
-
};
|
|
58
|
-
export type ExternalInfo = {
|
|
59
|
-
/**
|
|
60
|
-
* Message to display.
|
|
61
|
-
*/
|
|
62
|
-
message: ReactNode;
|
|
63
|
-
/**
|
|
64
|
-
* Type of the message.
|
|
65
|
-
*/
|
|
66
|
-
type: 'info';
|
|
67
|
-
};
|
|
68
|
-
export type CustomErrorComponent = React.ComponentType<PropsWithChildren<{
|
|
69
|
-
editorId: string;
|
|
70
|
-
editorTheme: EditorTheme;
|
|
71
|
-
errorMessages: React.ReactElement[];
|
|
72
|
-
testId: string;
|
|
73
|
-
validationId: string;
|
|
74
|
-
}>>;
|
|
75
|
-
export type CustomErrorMessageProps = Omit<React.ComponentProps<CustomErrorComponent>, 'editorTheme'> & {
|
|
76
|
-
Component: CustomErrorComponent;
|
|
77
|
-
};
|
|
78
|
-
export type CustomComponents = {
|
|
79
|
-
ErrorMessage?: CustomErrorComponent;
|
|
80
|
-
};
|
|
81
|
-
export type ExternalMessage = ExternalError | ExternalWarning | ExternalInfo;
|
|
82
|
-
export type ExternalMessagesNormalized = {
|
|
83
|
-
errors: ExternalError[];
|
|
84
|
-
infos: ExternalInfo[];
|
|
85
|
-
warnings: ExternalWarning[];
|
|
86
|
-
};
|
|
87
|
-
export type AutocompletePosition = {
|
|
88
|
-
left: number;
|
|
89
|
-
top: number;
|
|
90
|
-
};
|
|
91
|
-
export type OptionsKey = keyof Omit<AutocompleteOptionGroup, 'tokens'>;
|
|
92
|
-
export type AutocompleteState = {
|
|
93
|
-
/**
|
|
94
|
-
* Subscription for a debounced autocomplete analytics event. This allows the event to be cancelled upon a new request.
|
|
95
|
-
*/
|
|
96
|
-
analyticsSubscription: Subscription | null;
|
|
97
|
-
/**
|
|
98
|
-
* Reference to the autocomplete container DOM element.
|
|
99
|
-
*/
|
|
100
|
-
container: HTMLElement | null;
|
|
101
|
-
/**
|
|
102
|
-
* Determines if autocomplete options are currently being loaded.
|
|
103
|
-
*/
|
|
104
|
-
loading: boolean;
|
|
105
|
-
/**
|
|
106
|
-
* Provides information about autocomplete offset parent's size and its position relative to the viewport.
|
|
107
|
-
* This is used to calculate autocomplete dropdown position.
|
|
108
|
-
*/
|
|
109
|
-
offsetParentRect: DOMRectReadOnly | undefined;
|
|
110
|
-
/**
|
|
111
|
-
* Autocomplete options returned by autocomplete provider functions.
|
|
112
|
-
*/
|
|
113
|
-
options: AutocompleteOptionGroup;
|
|
114
|
-
/**
|
|
115
|
-
* Computed replace position start for the current set of autocomplete options.
|
|
116
|
-
* We use this position to derive autocomplete dropdown coordinates.
|
|
117
|
-
*/
|
|
118
|
-
replacePositionStart: number;
|
|
119
|
-
/**
|
|
120
|
-
* ID of the currently selected autocomplete option, or `undefined` if no option is selected.
|
|
121
|
-
*/
|
|
122
|
-
selectedOptionId: string | undefined;
|
|
123
|
-
/**
|
|
124
|
-
* Manages current autocomplete visibility state, derived from `shouldStayClosedOnNextUpdate`.
|
|
125
|
-
*/
|
|
126
|
-
shouldStayClosed: boolean;
|
|
127
|
-
/**
|
|
128
|
-
* Forces autocomplete to stay closed on next update, which is the desired behavior when:
|
|
129
|
-
* - we select an autocomplete option
|
|
130
|
-
* - we navigate the query with arrow keys
|
|
131
|
-
*/
|
|
132
|
-
shouldStayClosedOnNextUpdate: boolean;
|
|
133
|
-
/**
|
|
134
|
-
* Autocomplete provider is an Observable based API. This references any in-flight subscription so we can cancel it
|
|
135
|
-
* upon a new request.
|
|
136
|
-
*/
|
|
137
|
-
subscription: Subscription | null;
|
|
138
|
-
};
|
|
139
|
-
export type HydratedValuesMap = {
|
|
140
|
-
[fieldName: string]: Map<string, HydratedValue>;
|
|
141
|
-
};
|
|
142
|
-
export type State = {
|
|
143
|
-
/**
|
|
144
|
-
* State managed by the autocomplete plugin.
|
|
145
|
-
*/
|
|
146
|
-
autocomplete: AutocompleteState;
|
|
147
|
-
/**
|
|
148
|
-
* Provider object to fetch autocomplete data.
|
|
149
|
-
*/
|
|
150
|
-
autocompleteProvider: AutocompleteProvider;
|
|
151
|
-
/**
|
|
152
|
-
* The controlled query prop passed to the container.
|
|
153
|
-
*/
|
|
154
|
-
controlledQuery: string;
|
|
155
|
-
/**
|
|
156
|
-
* Custom components to take over the rendering of certain parts of the jql editor
|
|
157
|
-
*/
|
|
158
|
-
customComponents?: CustomComponents;
|
|
159
|
-
/**
|
|
160
|
-
* The current Prosemirror editor state.
|
|
161
|
-
*/
|
|
162
|
-
editorState: EditorState;
|
|
163
|
-
/**
|
|
164
|
-
* The Prosemirror editor view mounted to the DOM, or `undefined` if the view has not been initialised.
|
|
165
|
-
*/
|
|
166
|
-
editorView: EditorView | undefined;
|
|
167
|
-
/**
|
|
168
|
-
* ID of the timeout used before setting `editorViewHasFocus=false`. This gives an opportunity for the timeout to be
|
|
169
|
-
* cleared if another element within the context receives focus.
|
|
170
|
-
*/
|
|
171
|
-
editorViewBlurTimeout: number | null;
|
|
172
|
-
/**
|
|
173
|
-
* Reference to the editor view container (scrollable element that contains line numbers and editor view).
|
|
174
|
-
*/
|
|
175
|
-
editorViewContainer: HTMLElement | undefined;
|
|
176
|
-
/**
|
|
177
|
-
* Provides information about editor view container size and its position relative to the viewport.
|
|
178
|
-
* Can be used to position portals in relation to the editor, ensure they don't exceed its dimensions, etc.
|
|
179
|
-
*/
|
|
180
|
-
editorViewContainerRect: DOMRectReadOnly | undefined;
|
|
181
|
-
/**
|
|
182
|
-
* Number of pixels that the editor view container is currently scrolled vertically (Y axis).
|
|
183
|
-
*/
|
|
184
|
-
editorViewContainerScroll: number;
|
|
185
|
-
/**
|
|
186
|
-
* Flag to determine whether the editor view (or autocomplete dropdown) currently has focus.
|
|
187
|
-
*/
|
|
188
|
-
editorViewHasFocus: boolean;
|
|
189
|
-
/**
|
|
190
|
-
* Whether rich inline nodes feature should be enabled.
|
|
191
|
-
*/
|
|
192
|
-
enableRichInlineNodes: boolean;
|
|
193
|
-
/**
|
|
194
|
-
* Custom messages to display.
|
|
195
|
-
*/
|
|
196
|
-
externalMessages: ExternalMessage[];
|
|
197
|
-
/**
|
|
198
|
-
* Map of hydrated values.
|
|
199
|
-
*/
|
|
200
|
-
hydratedValues: HydratedValuesMap;
|
|
201
|
-
/**
|
|
202
|
-
* Prefix to use when computing id's for DOM elements (to allow multiple editors rendered on the same page).
|
|
203
|
-
*/
|
|
204
|
-
idPrefix: string;
|
|
205
|
-
/**
|
|
206
|
-
* Mutable reference to a react-intl object.
|
|
207
|
-
*/
|
|
208
|
-
intlRef: MutableRefObject<IntlShape>;
|
|
209
|
-
/**
|
|
210
|
-
* Flag to enable the searching indicator when a JQL search is in progress.
|
|
211
|
-
*/
|
|
212
|
-
isSearching: boolean | undefined;
|
|
213
|
-
/**
|
|
214
|
-
* The first JQL parse error of the last submitted query, or {@code null} if there were no errors.
|
|
215
|
-
*/
|
|
216
|
-
jqlError: JQLParseError | null;
|
|
217
|
-
/**
|
|
218
|
-
* Flag to determine whether line numbers should be shown in the editor.
|
|
219
|
-
*/
|
|
220
|
-
lineNumbersVisible: boolean;
|
|
221
|
-
/**
|
|
222
|
-
* Called when we want to debug a particular error or action that has occurred within the editor. The message may
|
|
223
|
-
* contain PII, and as such consumers should treat as a privacy unsafe error.
|
|
224
|
-
*/
|
|
225
|
-
onDebugUnsafeMessage: ((message: string, event: {
|
|
226
|
-
[key: string]: DebugMessageEventAttribute;
|
|
227
|
-
}) => void) | undefined;
|
|
228
|
-
/**
|
|
229
|
-
* Called when the syntax help button is clicked. Consumers can return `true` to signify that this event has been
|
|
230
|
-
* handled which will prevent default behaviour of the help button, i.e. `e.preventDefault()`.
|
|
231
|
-
*/
|
|
232
|
-
onSyntaxHelp?: (e: MouseEvent<HTMLElement>) => boolean;
|
|
233
|
-
/**
|
|
234
|
-
* The current query string in the JQL editor.
|
|
235
|
-
*/
|
|
236
|
-
query: string;
|
|
237
|
-
/**
|
|
238
|
-
* Reference to the ResizeObserver object used to process size changes within the editor.
|
|
239
|
-
*/
|
|
240
|
-
resizeObserver: ResizeObserver | undefined;
|
|
241
|
-
};
|
|
242
|
-
export type DebugMessageEventAttribute = string | number | boolean | void | null;
|
|
243
|
-
export type Props = {
|
|
244
|
-
autocompleteProvider: AutocompleteProvider;
|
|
245
|
-
createAndFireAnalyticsEvent: (payload: JqlEditorAnalyticsEvent) => void;
|
|
246
|
-
customComponents?: CustomComponents;
|
|
247
|
-
enableRichInlineNodes: boolean;
|
|
248
|
-
externalMessages: ExternalMessage[];
|
|
249
|
-
intlRef: MutableRefObject<IntlShape>;
|
|
250
|
-
isSearching: boolean | undefined;
|
|
251
|
-
onDebugUnsafeMessage?: (message: string, event: {
|
|
252
|
-
[key: string]: DebugMessageEventAttribute;
|
|
253
|
-
}) => void;
|
|
254
|
-
onEditorMounted?: () => void;
|
|
255
|
-
onFocus?: (e: FocusEvent<HTMLElement>) => void;
|
|
256
|
-
onHydrate?: (query: string) => Promise<HydratedValues>;
|
|
257
|
-
onSearch?: (query: string, jast: Jast) => void;
|
|
258
|
-
onSyntaxHelp?: (e: MouseEvent<HTMLElement>) => boolean;
|
|
259
|
-
onUpdate?: (query: string, jast: Jast) => void;
|
|
260
|
-
query: string;
|
|
261
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
import { type Jast } from '@atlaskit/jql-ast';
|
|
4
|
-
import { type JQLSuggestions } from '@atlaskit/jql-autocomplete';
|
|
5
|
-
import { type SelectableAutocompleteOptions } from '../plugins/autocomplete/components/types';
|
|
6
|
-
import { type AutocompletePosition, type ContextAwareTokenSuggestions, type DebugMessageEventAttribute } from './types';
|
|
7
|
-
export declare const getAutocompleteOptionId: (value: string) => any;
|
|
8
|
-
export declare const tokensToAutocompleteOptions: (tokens: ContextAwareTokenSuggestions) => SelectableAutocompleteOptions;
|
|
9
|
-
export declare const getReplacePositionStart: ({ rules, tokens }: JQLSuggestions) => number;
|
|
10
|
-
export declare const getAutocompletePosition: (editorView: EditorView, replacePositionStart: number) => AutocompletePosition;
|
|
11
|
-
export declare const sendDebugMessage: (message: string, editorView: EditorView, editorState: EditorState, onDebugUnsafeMessage?: (message: string, event: {
|
|
12
|
-
[key: string]: DebugMessageEventAttribute;
|
|
13
|
-
}) => void, eventAttributes?: {
|
|
14
|
-
[key: string]: DebugMessageEventAttribute;
|
|
15
|
-
}) => void;
|
|
16
|
-
export declare const getFieldNodes: (ast: Jast) => Set<string>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export type { JQLClause } from '@atlaskit/jql-autocomplete';
|
|
2
|
-
export type { JQLEditorUIProps, JQLEditorProps, HydratedValues, HydratedValue, HydratedUser, HydratedTeam, HydratedProject, HydratedGoal, HydratedLozengeWithAvatar, } from './ui/types';
|
|
3
|
-
export type { ExternalMessage, ExternalError, ExternalWarning, ExternalInfo, CustomComponents, } from './state/types';
|
|
4
|
-
export type { AutocompleteProvider, AutocompleteOptions, AutocompleteOption, AutocompleteValueType, } from './plugins/types';
|
|
5
|
-
export type { ListenerProps, JqlAnalyticsEvent } from './analytics';
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React, { type ComponentClass, type FunctionComponent } from 'react';
|
|
2
|
-
import { type JQLEditorUIProps } from '../jql-editor/types';
|
|
3
|
-
type WithErrorBoundaryProps = {
|
|
4
|
-
/**
|
|
5
|
-
* To adjust size of the editor
|
|
6
|
-
* `false` matches AK's default field styling
|
|
7
|
-
* `true` matches AK's compact field styling, used for search purposes
|
|
8
|
-
*/
|
|
9
|
-
isCompact?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Called if an unexpected error is thrown while rendering the editor.
|
|
12
|
-
*/
|
|
13
|
-
onRenderError?: (error: Error) => void;
|
|
14
|
-
/**
|
|
15
|
-
* Called every time the search command is given in the editor with the current query value and respective Jast object.
|
|
16
|
-
* If not passed, hides the search button/other search related functionality, allowing this to be usable as a form field.
|
|
17
|
-
*/
|
|
18
|
-
onSearch?: JQLEditorUIProps['onSearch'];
|
|
19
|
-
/**
|
|
20
|
-
* The query to render in the editor.
|
|
21
|
-
*/
|
|
22
|
-
query: string;
|
|
23
|
-
};
|
|
24
|
-
export declare const withErrorBoundary: <Props extends WithErrorBoundaryProps>(WrappedComponent: FunctionComponent<Props> | ComponentClass<Props>) => (props: Props) => React.JSX.Element;
|
|
25
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React, { type ComponentClass, type FunctionComponent } from 'react';
|
|
2
|
-
type WithIntlProviderProps = {
|
|
3
|
-
/**
|
|
4
|
-
* React-intl locale. This should be set to "en" if alternate message sets are not being loaded higher in the React
|
|
5
|
-
* tree.
|
|
6
|
-
*/
|
|
7
|
-
locale?: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const withIntlProvider: <Props extends WithIntlProviderProps>(WrappedComponent: FunctionComponent<Omit<Props, "locale">> | ComponentClass<Omit<Props, "locale">>) => (props: Props) => React.JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type IntlShape, type WithIntlProps } from 'react-intl';
|
|
3
|
-
import { type JQLEditorUIProps } from './types';
|
|
4
|
-
export type JQLEditorInnerProps = JQLEditorUIProps & {
|
|
5
|
-
/**
|
|
6
|
-
* React-intl object.
|
|
7
|
-
*/
|
|
8
|
-
intl: IntlShape;
|
|
9
|
-
};
|
|
10
|
-
declare const _default_1: React.FC<WithIntlProps<JQLEditorInnerProps>> & {
|
|
11
|
-
WrappedComponent: React.ComponentType<JQLEditorInnerProps>;
|
|
12
|
-
};
|
|
13
|
-
export default _default_1;
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { type FocusEvent, type MouseEvent, type Ref } from 'react';
|
|
2
|
-
import { type Jast } from '@atlaskit/jql-ast';
|
|
3
|
-
import { type AutocompleteProvider } from '../../plugins/autocomplete/types';
|
|
4
|
-
import { type CustomComponents, type ExternalMessage } from '../../state/types';
|
|
5
|
-
export type HydratedUser = {
|
|
6
|
-
appType?: string | null;
|
|
7
|
-
avatarUrl: string;
|
|
8
|
-
id: string;
|
|
9
|
-
name: string;
|
|
10
|
-
type: 'user';
|
|
11
|
-
};
|
|
12
|
-
export type HydratedTeam = {
|
|
13
|
-
avatarUrl: string;
|
|
14
|
-
id: string;
|
|
15
|
-
name: string;
|
|
16
|
-
type: 'team';
|
|
17
|
-
};
|
|
18
|
-
export type HydratedProject = {
|
|
19
|
-
iconName?: string;
|
|
20
|
-
id: string;
|
|
21
|
-
name: string;
|
|
22
|
-
privateProject?: boolean;
|
|
23
|
-
type: 'project';
|
|
24
|
-
};
|
|
25
|
-
export type HydratedGoal = {
|
|
26
|
-
iconKey?: string | null | undefined;
|
|
27
|
-
id: string;
|
|
28
|
-
name: string;
|
|
29
|
-
status?: string | null | undefined;
|
|
30
|
-
type: 'goal';
|
|
31
|
-
};
|
|
32
|
-
export type HydratedDeprecatedField = {
|
|
33
|
-
deprecatedSearcherKey: string;
|
|
34
|
-
/**
|
|
35
|
-
* The jqlTerm of the field.
|
|
36
|
-
*/
|
|
37
|
-
id: string;
|
|
38
|
-
type: 'deprecated-field';
|
|
39
|
-
};
|
|
40
|
-
export type HydratedLozengeWithAvatar = {
|
|
41
|
-
avatarUrl?: string;
|
|
42
|
-
id: string;
|
|
43
|
-
name: string;
|
|
44
|
-
type: 'lozengeWithAvatar';
|
|
45
|
-
};
|
|
46
|
-
export type HydratedValue = HydratedUser | HydratedTeam | HydratedProject | HydratedGoal | HydratedDeprecatedField | HydratedLozengeWithAvatar;
|
|
47
|
-
export type HydratedValues = {
|
|
48
|
-
[fieldName: string]: HydratedValue[];
|
|
49
|
-
};
|
|
50
|
-
export type JQLEditorUIProps = {
|
|
51
|
-
/**
|
|
52
|
-
* Page/experience where the component is being rendered. Used to correlate JQL analytics events to a given consumer.
|
|
53
|
-
*/
|
|
54
|
-
analyticsSource: string;
|
|
55
|
-
/**
|
|
56
|
-
* Provider object to fetch autocomplete data.
|
|
57
|
-
*/
|
|
58
|
-
autocompleteProvider: AutocompleteProvider;
|
|
59
|
-
/**
|
|
60
|
-
* Custom components to take over the rendering of certain parts of JQL editor
|
|
61
|
-
*/
|
|
62
|
-
customComponents?: CustomComponents;
|
|
63
|
-
/**
|
|
64
|
-
* The number of default rows that are visible.
|
|
65
|
-
*/
|
|
66
|
-
defaultRows?: number;
|
|
67
|
-
/**
|
|
68
|
-
* Enables rich inline nodes feature, which will replace user identifiers with a lozenge containing name and avatar.
|
|
69
|
-
* Note that you must specify an `onHydrate` prop which will return user data for a given query in order to see the
|
|
70
|
-
* following behaviour:
|
|
71
|
-
* - Loading of user avatars
|
|
72
|
-
* - Rendering of user lozenges on component initialisation
|
|
73
|
-
* - Rendering of user lozenges on paste
|
|
74
|
-
*/
|
|
75
|
-
enableRichInlineNodes?: boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Ref callback to force the focus event
|
|
78
|
-
*/
|
|
79
|
-
inputRef?: Ref<{
|
|
80
|
-
focus: () => void;
|
|
81
|
-
}>;
|
|
82
|
-
/**
|
|
83
|
-
* `false` matches the Atlaskit default field styling
|
|
84
|
-
* `true` matches the Atlaskit compact field styling, generally used for search purposes.
|
|
85
|
-
*/
|
|
86
|
-
isCompact?: boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Flag to enable the searching indicator when a JQL search is in progress.
|
|
89
|
-
*/
|
|
90
|
-
isSearching?: boolean;
|
|
91
|
-
/**
|
|
92
|
-
* Custom messages to display.
|
|
93
|
-
*/
|
|
94
|
-
messages?: ExternalMessage[];
|
|
95
|
-
/**
|
|
96
|
-
* Called when we want to debug a particular error or action that has occurred within the editor. The message may
|
|
97
|
-
* contain PII, and as such consumers should treat as a privacy unsafe error.
|
|
98
|
-
*/
|
|
99
|
-
onDebugUnsafeMessage?: (message: string, event: {
|
|
100
|
-
[key: string]: string | number | boolean | void | null;
|
|
101
|
-
}) => void;
|
|
102
|
-
/**
|
|
103
|
-
* Called when the JQL editor has been initialised.
|
|
104
|
-
*/
|
|
105
|
-
onEditorMounted?: () => void;
|
|
106
|
-
/**
|
|
107
|
-
* Called when the editor input is focused.
|
|
108
|
-
*/
|
|
109
|
-
onFocus?: (e: FocusEvent<HTMLElement>) => void;
|
|
110
|
-
/**
|
|
111
|
-
* Called every time the editor needs to hydrate values for the current query.
|
|
112
|
-
*/
|
|
113
|
-
onHydrate?: (query: string) => Promise<HydratedValues>;
|
|
114
|
-
/**
|
|
115
|
-
* Called if an unexpected error is thrown while rendering the editor.
|
|
116
|
-
*/
|
|
117
|
-
onRenderError?: (error: Error) => void;
|
|
118
|
-
/**
|
|
119
|
-
* Called every time the search command is given in the editor with the current query value and respective Jast object.
|
|
120
|
-
* If not passed, hides the search button/other search related functionality, allowing this to be usable as a form field.
|
|
121
|
-
*/
|
|
122
|
-
onSearch?: (query: string, jast: Jast) => void;
|
|
123
|
-
/**
|
|
124
|
-
* Called when the syntax help button is clicked. Consumers can return `true` to signify that this event has been
|
|
125
|
-
* handled which will prevent default behaviour of the help button, i.e. `e.preventDefault()`.
|
|
126
|
-
*/
|
|
127
|
-
onSyntaxHelp?: (e: MouseEvent<HTMLElement>) => boolean;
|
|
128
|
-
/**
|
|
129
|
-
* Called every time the editor is updated with the current query value and respective Jast object.
|
|
130
|
-
*/
|
|
131
|
-
onUpdate?: (query: string, jast: Jast) => void;
|
|
132
|
-
/**
|
|
133
|
-
* The query to render in the editor.
|
|
134
|
-
*/
|
|
135
|
-
query: string;
|
|
136
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
type Props = {
|
|
3
|
-
editorId: string;
|
|
4
|
-
expanded: boolean;
|
|
5
|
-
isDisabled?: boolean;
|
|
6
|
-
label: string;
|
|
7
|
-
onClick: () => void;
|
|
8
|
-
};
|
|
9
|
-
export declare const BaseExpandToggle: ({ expanded, editorId, isDisabled, label, onClick, }: Props) => React.JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { DetailedHTMLProps, HTMLAttributes } from 'react';
|
|
2
|
-
import type { Theme } from '@emotion/react';
|
|
3
|
-
import { type StyledComponent } from '@emotion/styled';
|
|
4
|
-
export declare const ExpandToggleContainer: StyledComponent<{
|
|
5
|
-
as?: React.ElementType;
|
|
6
|
-
theme?: Theme;
|
|
7
|
-
}, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React, { type MouseEvent } from 'react';
|
|
2
|
-
type Props = {
|
|
3
|
-
describedby?: string;
|
|
4
|
-
isDisabled?: boolean;
|
|
5
|
-
label: string;
|
|
6
|
-
onClick: (e: MouseEvent<HTMLElement>) => void;
|
|
7
|
-
};
|
|
8
|
-
export declare const BaseSyntaxHelp: ({ describedby, isDisabled, label, onClick, }: Props) => React.JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { DetailedHTMLProps, HTMLAttributes } from 'react';
|
|
2
|
-
import type { Theme } from '@emotion/react';
|
|
3
|
-
import { type StyledComponent } from '@emotion/styled';
|
|
4
|
-
export declare const SyntaxHelpContainer: StyledComponent<{
|
|
5
|
-
as?: React.ElementType;
|
|
6
|
-
theme?: Theme;
|
|
7
|
-
}, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|