@atlaskit/jql-editor 6.4.7 → 6.6.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 +22 -0
- package/dist/cjs/analytics/util.js +1 -1
- package/dist/cjs/plugins/autocomplete/constants.js +3 -0
- package/dist/cjs/plugins/rich-inline-nodes/nodes/index.js +2 -0
- package/dist/cjs/plugins/rich-inline-nodes/nodes/lozenge-with-avatar/index.js +41 -0
- package/dist/cjs/plugins/rich-inline-nodes/nodes/lozenge-with-avatar/styled.js +105 -0
- package/dist/cjs/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +86 -33
- package/dist/cjs/state/hydration/util.js +6 -6
- package/dist/cjs/state/index.js +65 -39
- package/dist/es2019/analytics/util.js +1 -1
- package/dist/es2019/plugins/autocomplete/constants.js +2 -1
- package/dist/es2019/plugins/rich-inline-nodes/nodes/index.js +2 -0
- package/dist/es2019/plugins/rich-inline-nodes/nodes/lozenge-with-avatar/index.js +32 -0
- package/dist/es2019/plugins/rich-inline-nodes/nodes/lozenge-with-avatar/styled.js +97 -0
- package/dist/es2019/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +63 -15
- package/dist/es2019/state/hydration/util.js +6 -6
- package/dist/es2019/state/index.js +32 -4
- package/dist/esm/analytics/util.js +1 -1
- package/dist/esm/plugins/autocomplete/constants.js +3 -0
- package/dist/esm/plugins/rich-inline-nodes/nodes/index.js +2 -0
- package/dist/esm/plugins/rich-inline-nodes/nodes/lozenge-with-avatar/index.js +34 -0
- package/dist/esm/plugins/rich-inline-nodes/nodes/lozenge-with-avatar/styled.js +96 -0
- package/dist/esm/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +86 -33
- package/dist/esm/state/hydration/util.js +6 -6
- package/dist/esm/state/index.js +64 -38
- package/dist/types/plugins/rich-inline-nodes/nodes/index.d.ts +2 -0
- package/dist/types/plugins/rich-inline-nodes/nodes/lozenge-with-avatar/index.d.ts +7 -0
- package/dist/types/plugins/rich-inline-nodes/nodes/lozenge-with-avatar/styled.d.ts +18 -0
- package/dist/types/state/index.d.ts +5 -1
- package/dist/types/types.d.ts +1 -1
- package/dist/types/ui/jql-editor/types.d.ts +7 -1
- package/dist/types/ui/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/index.d.ts +2 -0
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/lozenge-with-avatar/index.d.ts +7 -0
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/lozenge-with-avatar/styled.d.ts +18 -0
- package/dist/types-ts4.5/state/index.d.ts +5 -1
- package/dist/types-ts4.5/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/jql-editor/types.d.ts +7 -1
- package/dist/types-ts4.5/ui/types.d.ts +1 -1
- package/package.json +17 -11
|
@@ -79,16 +79,16 @@ export var ValidQueryVisitor = /*#__PURE__*/function (_AbstractJastVisitor) {
|
|
|
79
79
|
}).join(', '), ")");
|
|
80
80
|
});
|
|
81
81
|
_defineProperty(_this, "visitFunctionOperand", function (functionOperand) {
|
|
82
|
-
// Only include membersOf function as it has arguments that need hydration
|
|
83
|
-
// Other functions like currentUser() don't have hydratable arguments
|
|
84
82
|
var functionName = functionOperand.function.value.toLowerCase();
|
|
85
|
-
if (functionName !== 'membersof' || !fg('jira-membersof-team-support')) {
|
|
86
|
-
return '';
|
|
87
|
-
}
|
|
88
83
|
var args = functionOperand.arguments.map(function (arg) {
|
|
89
84
|
return arg.text;
|
|
90
85
|
}).join(', ');
|
|
91
|
-
|
|
86
|
+
|
|
87
|
+
// The generic gate supersedes the legacy membersOf-specific gate: when
|
|
88
|
+
// jql-function-arg-hydration is on, any function with arguments is included (covering
|
|
89
|
+
// membersOf and all others). Otherwise fall back to the legacy membersOf-only path.
|
|
90
|
+
var shouldIncludeFunction = fg('jql-function-arg-hydration') ? functionOperand.arguments.length > 0 : functionName === 'membersof' && fg('jira-membersof-team-support');
|
|
91
|
+
return shouldIncludeFunction ? "".concat(functionOperand.function.text, "(").concat(args, ")") : '';
|
|
92
92
|
});
|
|
93
93
|
return _this;
|
|
94
94
|
}
|
package/dist/esm/state/index.js
CHANGED
|
@@ -15,6 +15,7 @@ import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
15
15
|
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
16
16
|
import { computeJqlInsights, isListOperator, normaliseJqlString } from '@atlaskit/jql-ast';
|
|
17
17
|
import { JQLAutocomplete } from '@atlaskit/jql-autocomplete';
|
|
18
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
19
|
import { ActionSubject, ActionSubjectId, Action as AnalyticsAction, EventType } from '../analytics';
|
|
19
20
|
import { selectErrorCommand } from '../commands/select-error-command';
|
|
20
21
|
import { JQL_EDITOR_MAIN_ID } from '../common/constants';
|
|
@@ -330,10 +331,26 @@ export var actions = {
|
|
|
330
331
|
onFields = _getState$autocomplet.onFields,
|
|
331
332
|
onOperators = _getState$autocomplet.onOperators,
|
|
332
333
|
onValues = _getState$autocomplet.onValues,
|
|
333
|
-
onFunctions = _getState$autocomplet.onFunctions
|
|
334
|
+
onFunctions = _getState$autocomplet.onFunctions,
|
|
335
|
+
onFunctionArguments = _getState$autocomplet.onFunctionArguments;
|
|
334
336
|
var optionTypes = [];
|
|
335
337
|
var observables = [];
|
|
336
|
-
if (rules.
|
|
338
|
+
if (rules.functionArgument && onFunctionArguments && fg('enable-jql-membersof-autocomplete')) {
|
|
339
|
+
var _context$field, _context$functionName;
|
|
340
|
+
// When the caret is inside a function argument (e.g. membersOf("...")), we call
|
|
341
|
+
// onFunctionArguments unconditionally in preference to the generic value/function
|
|
342
|
+
// providers. rules.functionArgument can co-exist with rules.function so we must check it
|
|
343
|
+
// first — before the outer rules.value/rules.function block — to avoid it being
|
|
344
|
+
// swallowed by the else-if chain.
|
|
345
|
+
var _rules$functionArgume = rules.functionArgument,
|
|
346
|
+
matchedText = _rules$functionArgume.matchedText,
|
|
347
|
+
context = _rules$functionArgume.context;
|
|
348
|
+
var fieldName = (_context$field = context === null || context === void 0 ? void 0 : context.field) !== null && _context$field !== void 0 ? _context$field : '';
|
|
349
|
+
var functionName = (_context$functionName = context === null || context === void 0 ? void 0 : context.functionName) !== null && _context$functionName !== void 0 ? _context$functionName : '';
|
|
350
|
+
var functionArguments$ = onFunctionArguments(fieldName, matchedText, functionName);
|
|
351
|
+
optionTypes.push('values');
|
|
352
|
+
observables.push(dispatch(actions.appendOptionsForObservable('values', functionArguments$, rules.functionArgument, 'value')));
|
|
353
|
+
} else if (rules.value || rules.function ||
|
|
337
354
|
// If EMPTY is suggested as a token, we are also in "operand mode" and we don't want to call other providers
|
|
338
355
|
// e.g. "assignee is " will return "EMPTY" token and "operator" rule as suggestions (because of "is not")
|
|
339
356
|
tokens.values.includes('EMPTY')) {
|
|
@@ -351,16 +368,16 @@ export var actions = {
|
|
|
351
368
|
}
|
|
352
369
|
} else if (rules.operator) {
|
|
353
370
|
var _rules$operator = rules.operator,
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
var operators$ = sortOperators(onOperators(
|
|
371
|
+
_context = _rules$operator.context,
|
|
372
|
+
_matchedText = _rules$operator.matchedText;
|
|
373
|
+
var operators$ = sortOperators(onOperators(_matchedText, _context === null || _context === void 0 ? void 0 : _context.field));
|
|
357
374
|
optionTypes.push('operators');
|
|
358
375
|
observables.push(dispatch(actions.appendOptionsForObservable('operators', operators$, rules.operator, 'operator')));
|
|
359
376
|
} else if (rules.field) {
|
|
360
377
|
var _rules$field = rules.field,
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
var fields$ = onFields(
|
|
378
|
+
_context2 = _rules$field.context,
|
|
379
|
+
_matchedText2 = _rules$field.matchedText;
|
|
380
|
+
var fields$ = onFields(_matchedText2, _context2 === null || _context2 === void 0 ? void 0 : _context2.clause);
|
|
364
381
|
optionTypes.push('fields');
|
|
365
382
|
observables.push(dispatch(actions.appendOptionsForObservable('fields', fields$, rules.field, 'field')));
|
|
366
383
|
}
|
|
@@ -944,16 +961,25 @@ export var useHydratedGoal = createHook(Store, {
|
|
|
944
961
|
return goal && goal.type === 'goal' ? goal : undefined;
|
|
945
962
|
}
|
|
946
963
|
});
|
|
964
|
+
export var useHydratedLozengeWithAvatar = createHook(Store, {
|
|
965
|
+
selector: function selector(state, _ref43) {
|
|
966
|
+
var _state$hydratedValues0;
|
|
967
|
+
var id = _ref43.id,
|
|
968
|
+
fieldName = _ref43.fieldName;
|
|
969
|
+
var value = (_state$hydratedValues0 = state.hydratedValues[normaliseHydrationKey(fieldName)]) === null || _state$hydratedValues0 === void 0 ? void 0 : _state$hydratedValues0.get(normaliseJqlString(id));
|
|
970
|
+
return value && value.type === 'lozengeWithAvatar' ? value : undefined;
|
|
971
|
+
}
|
|
972
|
+
});
|
|
947
973
|
export var useHydratedDeprecations = createHook(Store, {
|
|
948
974
|
selector: function selector(state) {
|
|
949
975
|
var ast = getJastFromState(state.editorState);
|
|
950
976
|
var fieldsInQuery = getFieldNodes(ast);
|
|
951
977
|
var toReturn = [];
|
|
952
|
-
Object.entries(state.hydratedValues).forEach(function (
|
|
953
|
-
var _state$
|
|
954
|
-
var
|
|
955
|
-
fieldName =
|
|
956
|
-
(_state$
|
|
978
|
+
Object.entries(state.hydratedValues).forEach(function (_ref44) {
|
|
979
|
+
var _state$hydratedValues1;
|
|
980
|
+
var _ref45 = _slicedToArray(_ref44, 1),
|
|
981
|
+
fieldName = _ref45[0];
|
|
982
|
+
(_state$hydratedValues1 = state.hydratedValues[fieldName]) === null || _state$hydratedValues1 === void 0 || _state$hydratedValues1.forEach(function (value) {
|
|
957
983
|
if (value.type === 'deprecated-field') {
|
|
958
984
|
if (fieldsInQuery.has(value.id.toLowerCase())) {
|
|
959
985
|
toReturn.push(value);
|
|
@@ -976,19 +1002,19 @@ export var useOnSyntaxHelp = createHook(Store, {
|
|
|
976
1002
|
});
|
|
977
1003
|
export var EditorStateContainer = createContainer(Store, {
|
|
978
1004
|
onInit: function onInit() {
|
|
979
|
-
return function (
|
|
980
|
-
var getState =
|
|
981
|
-
setState =
|
|
982
|
-
dispatch =
|
|
983
|
-
var intlRef =
|
|
984
|
-
query =
|
|
985
|
-
isSearching =
|
|
986
|
-
autocompleteProvider =
|
|
987
|
-
externalMessages =
|
|
988
|
-
enableRichInlineNodes =
|
|
989
|
-
onDebugUnsafeMessage =
|
|
990
|
-
onSyntaxHelp =
|
|
991
|
-
customComponents =
|
|
1005
|
+
return function (_ref46, _ref47) {
|
|
1006
|
+
var getState = _ref46.getState,
|
|
1007
|
+
setState = _ref46.setState,
|
|
1008
|
+
dispatch = _ref46.dispatch;
|
|
1009
|
+
var intlRef = _ref47.intlRef,
|
|
1010
|
+
query = _ref47.query,
|
|
1011
|
+
isSearching = _ref47.isSearching,
|
|
1012
|
+
autocompleteProvider = _ref47.autocompleteProvider,
|
|
1013
|
+
externalMessages = _ref47.externalMessages,
|
|
1014
|
+
enableRichInlineNodes = _ref47.enableRichInlineNodes,
|
|
1015
|
+
onDebugUnsafeMessage = _ref47.onDebugUnsafeMessage,
|
|
1016
|
+
onSyntaxHelp = _ref47.onSyntaxHelp,
|
|
1017
|
+
customComponents = _ref47.customComponents;
|
|
992
1018
|
setState({
|
|
993
1019
|
controlledQuery: query,
|
|
994
1020
|
query: query,
|
|
@@ -1017,18 +1043,18 @@ export var EditorStateContainer = createContainer(Store, {
|
|
|
1017
1043
|
};
|
|
1018
1044
|
},
|
|
1019
1045
|
onUpdate: function onUpdate() {
|
|
1020
|
-
return function (
|
|
1021
|
-
var getState =
|
|
1022
|
-
setState =
|
|
1023
|
-
dispatch =
|
|
1024
|
-
var controlledQueryProp =
|
|
1025
|
-
isSearching =
|
|
1026
|
-
autocompleteProvider =
|
|
1027
|
-
externalMessages =
|
|
1028
|
-
enableRichInlineNodes =
|
|
1029
|
-
onDebugUnsafeMessage =
|
|
1030
|
-
onSyntaxHelp =
|
|
1031
|
-
customComponents =
|
|
1046
|
+
return function (_ref48, _ref49) {
|
|
1047
|
+
var getState = _ref48.getState,
|
|
1048
|
+
setState = _ref48.setState,
|
|
1049
|
+
dispatch = _ref48.dispatch;
|
|
1050
|
+
var controlledQueryProp = _ref49.query,
|
|
1051
|
+
isSearching = _ref49.isSearching,
|
|
1052
|
+
autocompleteProvider = _ref49.autocompleteProvider,
|
|
1053
|
+
externalMessages = _ref49.externalMessages,
|
|
1054
|
+
enableRichInlineNodes = _ref49.enableRichInlineNodes,
|
|
1055
|
+
onDebugUnsafeMessage = _ref49.onDebugUnsafeMessage,
|
|
1056
|
+
onSyntaxHelp = _ref49.onSyntaxHelp,
|
|
1057
|
+
customComponents = _ref49.customComponents;
|
|
1032
1058
|
var _getState12 = getState(),
|
|
1033
1059
|
controlledQuery = _getState12.controlledQuery,
|
|
1034
1060
|
query = _getState12.query;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { Props as GoalRichInlineProps } from './goal/types';
|
|
2
|
+
import { type Props as LozengeWithAvatarRichInlineProps } from './lozenge-with-avatar';
|
|
2
3
|
import type { Props as ProjectRichInlineProps } from './project/types';
|
|
3
4
|
import { type Props as TeamRichInlineProps } from './team';
|
|
4
5
|
import type { JQLNodeSpec } from './types';
|
|
5
6
|
import { type Props as UserRichInlineProps } from './user';
|
|
6
7
|
export declare const richInlineNodes: {
|
|
7
8
|
goal: JQLNodeSpec<GoalRichInlineProps>;
|
|
9
|
+
lozengeWithAvatar: JQLNodeSpec<LozengeWithAvatarRichInlineProps>;
|
|
8
10
|
project: JQLNodeSpec<ProjectRichInlineProps>;
|
|
9
11
|
team: JQLNodeSpec<TeamRichInlineProps>;
|
|
10
12
|
user: JQLNodeSpec<UserRichInlineProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
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 LozengeWithAvatarContainer: StyledComponent<{
|
|
5
|
+
as?: React.ElementType;
|
|
6
|
+
theme?: Theme;
|
|
7
|
+
} & {
|
|
8
|
+
error: boolean;
|
|
9
|
+
selected: boolean;
|
|
10
|
+
}, DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
11
|
+
export declare const NameContainer: StyledComponent<{
|
|
12
|
+
as?: React.ElementType;
|
|
13
|
+
theme?: Theme;
|
|
14
|
+
}, DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
15
|
+
export declare const AvatarWrapper: StyledComponent<{
|
|
16
|
+
as?: React.ElementType;
|
|
17
|
+
theme?: Theme;
|
|
18
|
+
}, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -10,7 +10,7 @@ import { type JqlEditorAnalyticsEvent } from '../analytics';
|
|
|
10
10
|
import { type AutocompleteOptionGroup, type AutocompleteOptions, type AutocompleteOptionType, type SelectableAutocompleteOption } from '../plugins/autocomplete/components/types';
|
|
11
11
|
import { type AutocompleteProvider } from '../plugins/types';
|
|
12
12
|
import { type PortalActions } from '../ui/jql-editor-portal-provider/types';
|
|
13
|
-
import { type HydratedDeprecatedField, type HydratedProject, type HydratedGoal, type HydratedTeam, type HydratedUser, type HydratedValue } from '../ui/jql-editor/types';
|
|
13
|
+
import { type HydratedDeprecatedField, type HydratedProject, type HydratedGoal, type HydratedLozengeWithAvatar, type HydratedTeam, type HydratedUser, type HydratedValue } from '../ui/jql-editor/types';
|
|
14
14
|
import { type AutocompletePosition, type AutocompleteState, type ContextAwareJQLSuggestions, type CustomErrorComponent, type ExternalMessagesNormalized, type OptionsKey, type Props, type State } from './types';
|
|
15
15
|
export declare const initialState: State;
|
|
16
16
|
type Actions = {
|
|
@@ -91,6 +91,10 @@ export declare const useHydratedGoal: HookFunction<HydratedGoal | undefined, Bou
|
|
|
91
91
|
fieldName: string;
|
|
92
92
|
id: string;
|
|
93
93
|
}>;
|
|
94
|
+
export declare const useHydratedLozengeWithAvatar: HookFunction<HydratedLozengeWithAvatar | undefined, BoundActions<State, Actions>, {
|
|
95
|
+
fieldName: string;
|
|
96
|
+
id: string;
|
|
97
|
+
}>;
|
|
94
98
|
export declare const useHydratedDeprecations: HookFunction<HydratedDeprecatedField[], BoundActions<State, Actions>, void>;
|
|
95
99
|
export declare const useRichInlineNodesEnabled: HookFunction<boolean, BoundActions<State, Actions>, void>;
|
|
96
100
|
export declare const useOnSyntaxHelp: HookFunction<void | ((e: MouseEvent<HTMLElement>) => boolean), BoundActions<State, Actions>, void>;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { JQLClause } from '@atlaskit/jql-autocomplete';
|
|
2
|
-
export type { JQLEditorUIProps, JQLEditorProps, HydratedValues, HydratedValue, HydratedUser, HydratedTeam, HydratedProject, HydratedGoal, } from './ui/types';
|
|
2
|
+
export type { JQLEditorUIProps, JQLEditorProps, HydratedValues, HydratedValue, HydratedUser, HydratedTeam, HydratedProject, HydratedGoal, HydratedLozengeWithAvatar, } from './ui/types';
|
|
3
3
|
export type { ExternalMessage, ExternalError, ExternalWarning, ExternalInfo, CustomComponents, } from './state/types';
|
|
4
4
|
export type { AutocompleteProvider, AutocompleteOptions, AutocompleteOption, AutocompleteValueType, } from './plugins/types';
|
|
5
5
|
export type { ListenerProps, JqlAnalyticsEvent } from './analytics';
|
|
@@ -37,7 +37,13 @@ export type HydratedDeprecatedField = {
|
|
|
37
37
|
id: string;
|
|
38
38
|
type: 'deprecated-field';
|
|
39
39
|
};
|
|
40
|
-
export type
|
|
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;
|
|
41
47
|
export type HydratedValues = {
|
|
42
48
|
[fieldName: string]: HydratedValue[];
|
|
43
49
|
};
|
package/dist/types/ui/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type JQLEditorUIProps } from './jql-editor/types';
|
|
2
|
-
export type { JQLEditorUIProps, HydratedValue, HydratedValues, HydratedUser, HydratedTeam, HydratedProject, HydratedGoal, } from './jql-editor/types';
|
|
2
|
+
export type { JQLEditorUIProps, HydratedValue, HydratedValues, HydratedUser, HydratedTeam, HydratedProject, HydratedGoal, HydratedLozengeWithAvatar, } from './jql-editor/types';
|
|
3
3
|
export type JQLEditorProps = JQLEditorUIProps & {
|
|
4
4
|
/**
|
|
5
5
|
* React-intl locale. This should be set to "en" if alternate message sets are not being loaded higher in the React
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { Props as GoalRichInlineProps } from './goal/types';
|
|
2
|
+
import { type Props as LozengeWithAvatarRichInlineProps } from './lozenge-with-avatar';
|
|
2
3
|
import type { Props as ProjectRichInlineProps } from './project/types';
|
|
3
4
|
import { type Props as TeamRichInlineProps } from './team';
|
|
4
5
|
import type { JQLNodeSpec } from './types';
|
|
5
6
|
import { type Props as UserRichInlineProps } from './user';
|
|
6
7
|
export declare const richInlineNodes: {
|
|
7
8
|
goal: JQLNodeSpec<GoalRichInlineProps>;
|
|
9
|
+
lozengeWithAvatar: JQLNodeSpec<LozengeWithAvatarRichInlineProps>;
|
|
8
10
|
project: JQLNodeSpec<ProjectRichInlineProps>;
|
|
9
11
|
team: JQLNodeSpec<TeamRichInlineProps>;
|
|
10
12
|
user: JQLNodeSpec<UserRichInlineProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
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 LozengeWithAvatarContainer: StyledComponent<{
|
|
5
|
+
as?: React.ElementType;
|
|
6
|
+
theme?: Theme;
|
|
7
|
+
} & {
|
|
8
|
+
error: boolean;
|
|
9
|
+
selected: boolean;
|
|
10
|
+
}, DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
11
|
+
export declare const NameContainer: StyledComponent<{
|
|
12
|
+
as?: React.ElementType;
|
|
13
|
+
theme?: Theme;
|
|
14
|
+
}, DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
15
|
+
export declare const AvatarWrapper: StyledComponent<{
|
|
16
|
+
as?: React.ElementType;
|
|
17
|
+
theme?: Theme;
|
|
18
|
+
}, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -10,7 +10,7 @@ import { type JqlEditorAnalyticsEvent } from '../analytics';
|
|
|
10
10
|
import { type AutocompleteOptionGroup, type AutocompleteOptions, type AutocompleteOptionType, type SelectableAutocompleteOption } from '../plugins/autocomplete/components/types';
|
|
11
11
|
import { type AutocompleteProvider } from '../plugins/types';
|
|
12
12
|
import { type PortalActions } from '../ui/jql-editor-portal-provider/types';
|
|
13
|
-
import { type HydratedDeprecatedField, type HydratedProject, type HydratedGoal, type HydratedTeam, type HydratedUser, type HydratedValue } from '../ui/jql-editor/types';
|
|
13
|
+
import { type HydratedDeprecatedField, type HydratedProject, type HydratedGoal, type HydratedLozengeWithAvatar, type HydratedTeam, type HydratedUser, type HydratedValue } from '../ui/jql-editor/types';
|
|
14
14
|
import { type AutocompletePosition, type AutocompleteState, type ContextAwareJQLSuggestions, type CustomErrorComponent, type ExternalMessagesNormalized, type OptionsKey, type Props, type State } from './types';
|
|
15
15
|
export declare const initialState: State;
|
|
16
16
|
type Actions = {
|
|
@@ -91,6 +91,10 @@ export declare const useHydratedGoal: HookFunction<HydratedGoal | undefined, Bou
|
|
|
91
91
|
fieldName: string;
|
|
92
92
|
id: string;
|
|
93
93
|
}>;
|
|
94
|
+
export declare const useHydratedLozengeWithAvatar: HookFunction<HydratedLozengeWithAvatar | undefined, BoundActions<State, Actions>, {
|
|
95
|
+
fieldName: string;
|
|
96
|
+
id: string;
|
|
97
|
+
}>;
|
|
94
98
|
export declare const useHydratedDeprecations: HookFunction<HydratedDeprecatedField[], BoundActions<State, Actions>, void>;
|
|
95
99
|
export declare const useRichInlineNodesEnabled: HookFunction<boolean, BoundActions<State, Actions>, void>;
|
|
96
100
|
export declare const useOnSyntaxHelp: HookFunction<void | ((e: MouseEvent<HTMLElement>) => boolean), BoundActions<State, Actions>, void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { JQLClause } from '@atlaskit/jql-autocomplete';
|
|
2
|
-
export type { JQLEditorUIProps, JQLEditorProps, HydratedValues, HydratedValue, HydratedUser, HydratedTeam, HydratedProject, HydratedGoal, } from './ui/types';
|
|
2
|
+
export type { JQLEditorUIProps, JQLEditorProps, HydratedValues, HydratedValue, HydratedUser, HydratedTeam, HydratedProject, HydratedGoal, HydratedLozengeWithAvatar, } from './ui/types';
|
|
3
3
|
export type { ExternalMessage, ExternalError, ExternalWarning, ExternalInfo, CustomComponents, } from './state/types';
|
|
4
4
|
export type { AutocompleteProvider, AutocompleteOptions, AutocompleteOption, AutocompleteValueType, } from './plugins/types';
|
|
5
5
|
export type { ListenerProps, JqlAnalyticsEvent } from './analytics';
|
|
@@ -37,7 +37,13 @@ export type HydratedDeprecatedField = {
|
|
|
37
37
|
id: string;
|
|
38
38
|
type: 'deprecated-field';
|
|
39
39
|
};
|
|
40
|
-
export type
|
|
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;
|
|
41
47
|
export type HydratedValues = {
|
|
42
48
|
[fieldName: string]: HydratedValue[];
|
|
43
49
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type JQLEditorUIProps } from './jql-editor/types';
|
|
2
|
-
export type { JQLEditorUIProps, HydratedValue, HydratedValues, HydratedUser, HydratedTeam, HydratedProject, HydratedGoal, } from './jql-editor/types';
|
|
2
|
+
export type { JQLEditorUIProps, HydratedValue, HydratedValues, HydratedUser, HydratedTeam, HydratedProject, HydratedGoal, HydratedLozengeWithAvatar, } from './jql-editor/types';
|
|
3
3
|
export type JQLEditorProps = JQLEditorUIProps & {
|
|
4
4
|
/**
|
|
5
5
|
* React-intl locale. This should be set to "en" if alternate message sets are not being loaded higher in the React
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/jql-editor",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.0",
|
|
4
4
|
"description": "This package allows consumers to render an advanced JQL editor component to enable autocomplete-assisted authoring and validation of JQL queries.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -41,19 +41,19 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@atlaskit/afm-i18n-platform-jql-jql-editor": "2.10.0",
|
|
43
43
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
44
|
-
"@atlaskit/analytics-next": "^11.
|
|
44
|
+
"@atlaskit/analytics-next": "^11.3.0",
|
|
45
45
|
"@atlaskit/avatar": "^25.15.0",
|
|
46
46
|
"@atlaskit/button": "^23.11.0",
|
|
47
47
|
"@atlaskit/css": "^0.19.0",
|
|
48
48
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
49
|
-
"@atlaskit/emoji": "^70.
|
|
50
|
-
"@atlaskit/feature-gate-js-client": "^5.
|
|
49
|
+
"@atlaskit/emoji": "^70.17.0",
|
|
50
|
+
"@atlaskit/feature-gate-js-client": "^5.8.0",
|
|
51
51
|
"@atlaskit/form": "^15.5.0",
|
|
52
|
-
"@atlaskit/icon": "^35.
|
|
53
|
-
"@atlaskit/icon-lab": "^6.
|
|
52
|
+
"@atlaskit/icon": "^35.4.0",
|
|
53
|
+
"@atlaskit/icon-lab": "^6.13.0",
|
|
54
54
|
"@atlaskit/jql-ast": "^3.5.0",
|
|
55
|
-
"@atlaskit/jql-autocomplete": "^2.
|
|
56
|
-
"@atlaskit/jql-editor-common": "^3.
|
|
55
|
+
"@atlaskit/jql-autocomplete": "^2.2.0",
|
|
56
|
+
"@atlaskit/jql-editor-common": "^3.4.0",
|
|
57
57
|
"@atlaskit/jql-parser": "^2.1.0",
|
|
58
58
|
"@atlaskit/link": "^3.4.0",
|
|
59
59
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"@atlaskit/spinner": "^19.1.0",
|
|
64
64
|
"@atlaskit/teams-avatar": "^2.7.0",
|
|
65
65
|
"@atlaskit/theme": "^25.0.0",
|
|
66
|
-
"@atlaskit/tokens": "^13.
|
|
67
|
-
"@atlaskit/tooltip": "^22.
|
|
66
|
+
"@atlaskit/tokens": "^13.4.0",
|
|
67
|
+
"@atlaskit/tooltip": "^22.6.0",
|
|
68
68
|
"@atlaskit/townsquare-emoji-provider": "^1.0.0",
|
|
69
69
|
"@babel/runtime": "^7.0.0",
|
|
70
70
|
"@emotion/react": "^11.7.1",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"@af/integration-testing": "workspace:^",
|
|
90
90
|
"@af/visual-regression": "workspace:^",
|
|
91
91
|
"@atlaskit/docs": "^11.8.0",
|
|
92
|
-
"@atlaskit/jql-editor-autocomplete-rest": "^3.
|
|
92
|
+
"@atlaskit/jql-editor-autocomplete-rest": "^3.4.0",
|
|
93
93
|
"@atlassian/feature-flags-storybook-utils": "^0.4.0",
|
|
94
94
|
"@atlassian/feature-flags-test-utils": "^1.1.0",
|
|
95
95
|
"@atlassian/react-compiler-gating": "workspace:^",
|
|
@@ -152,6 +152,12 @@
|
|
|
152
152
|
},
|
|
153
153
|
"jira_ai_agent_avatar_with_apptype_for_jql": {
|
|
154
154
|
"type": "boolean"
|
|
155
|
+
},
|
|
156
|
+
"jql-function-arg-hydration": {
|
|
157
|
+
"type": "boolean"
|
|
158
|
+
},
|
|
159
|
+
"enable-jql-membersof-autocomplete": {
|
|
160
|
+
"type": "boolean"
|
|
155
161
|
}
|
|
156
162
|
}
|
|
157
163
|
}
|