@atlaskit/jql-editor 5.13.5 → 5.14.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 +20 -0
- package/dist/cjs/analytics/util.js +1 -1
- package/dist/cjs/async.js +1 -1
- package/dist/cjs/plugins/autocomplete/components/autocomplete-dropdown/styled.js +7 -8
- package/dist/cjs/plugins/autocomplete/components/autocomplete-option/index.js +1 -2
- package/dist/cjs/plugins/autocomplete/components/autocomplete-option/styled.js +5 -6
- package/dist/cjs/plugins/autocomplete/view.js +8 -12
- package/dist/cjs/plugins/rich-inline-nodes/nodes/team/styled.js +13 -14
- package/dist/cjs/plugins/rich-inline-nodes/nodes/user/styled.js +13 -14
- package/dist/cjs/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +1 -1
- package/dist/cjs/state/hydration/index.js +9 -2
- package/dist/cjs/state/hydration/util.js +10 -1
- package/dist/cjs/state/index.js +31 -20
- package/dist/cjs/ui/jql-editor-controls-content/base-expand-toggle/index.js +2 -3
- package/dist/cjs/ui/jql-editor-controls-content/base-expand-toggle/styled.js +2 -3
- package/dist/cjs/ui/jql-editor-controls-content/base-syntax-help/index.js +1 -2
- package/dist/cjs/ui/jql-editor-controls-content/base-syntax-help/styled.js +5 -6
- package/dist/cjs/ui/jql-editor-footer-content/jql-messages/infos/index.js +1 -4
- package/dist/cjs/ui/jql-editor-footer-content/jql-messages/warnings/index.js +1 -2
- package/dist/cjs/ui/jql-editor-layout/styled.js +15 -16
- package/dist/es2019/analytics/util.js +1 -1
- package/dist/es2019/async.js +2 -0
- package/dist/es2019/plugins/autocomplete/components/autocomplete-dropdown/styled.js +7 -8
- package/dist/es2019/plugins/autocomplete/components/autocomplete-option/index.js +1 -2
- package/dist/es2019/plugins/autocomplete/components/autocomplete-option/styled.js +5 -6
- package/dist/es2019/plugins/autocomplete/view.js +8 -12
- package/dist/es2019/plugins/rich-inline-nodes/nodes/team/styled.js +13 -14
- package/dist/es2019/plugins/rich-inline-nodes/nodes/user/styled.js +13 -14
- package/dist/es2019/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +1 -1
- package/dist/es2019/state/hydration/index.js +12 -4
- package/dist/es2019/state/hydration/util.js +8 -1
- package/dist/es2019/state/index.js +21 -10
- package/dist/es2019/ui/jql-editor-controls-content/base-expand-toggle/index.js +2 -3
- package/dist/es2019/ui/jql-editor-controls-content/base-expand-toggle/styled.js +2 -3
- package/dist/es2019/ui/jql-editor-controls-content/base-syntax-help/index.js +1 -2
- package/dist/es2019/ui/jql-editor-controls-content/base-syntax-help/styled.js +5 -6
- package/dist/es2019/ui/jql-editor-footer-content/jql-messages/infos/index.js +1 -2
- package/dist/es2019/ui/jql-editor-footer-content/jql-messages/warnings/index.js +1 -2
- package/dist/es2019/ui/jql-editor-layout/styled.js +20 -21
- package/dist/esm/analytics/util.js +1 -1
- package/dist/esm/async.js +2 -0
- package/dist/esm/plugins/autocomplete/components/autocomplete-dropdown/styled.js +7 -8
- package/dist/esm/plugins/autocomplete/components/autocomplete-option/index.js +1 -2
- package/dist/esm/plugins/autocomplete/components/autocomplete-option/styled.js +5 -6
- package/dist/esm/plugins/autocomplete/view.js +8 -12
- package/dist/esm/plugins/rich-inline-nodes/nodes/team/styled.js +13 -14
- package/dist/esm/plugins/rich-inline-nodes/nodes/user/styled.js +13 -14
- package/dist/esm/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +1 -1
- package/dist/esm/state/hydration/index.js +10 -3
- package/dist/esm/state/hydration/util.js +10 -1
- package/dist/esm/state/index.js +21 -10
- package/dist/esm/ui/jql-editor-controls-content/base-expand-toggle/index.js +2 -3
- package/dist/esm/ui/jql-editor-controls-content/base-expand-toggle/styled.js +2 -3
- package/dist/esm/ui/jql-editor-controls-content/base-syntax-help/index.js +1 -2
- package/dist/esm/ui/jql-editor-controls-content/base-syntax-help/styled.js +5 -6
- package/dist/esm/ui/jql-editor-footer-content/jql-messages/infos/index.js +1 -2
- package/dist/esm/ui/jql-editor-footer-content/jql-messages/warnings/index.js +1 -2
- package/dist/esm/ui/jql-editor-layout/styled.js +15 -16
- package/dist/types/state/hydration/util.d.ts +6 -0
- package/dist/types-ts4.5/state/hydration/util.d.ts +6 -0
- package/package.json +8 -11
|
@@ -9,6 +9,7 @@ import { v4 as uuidv4 } from 'uuid';
|
|
|
9
9
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
10
|
import { computeJqlInsights, isListOperator, normaliseJqlString } from '@atlaskit/jql-ast';
|
|
11
11
|
import { JQLAutocomplete } from '@atlaskit/jql-autocomplete';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
13
|
import { ActionSubject, ActionSubjectId, Action as AnalyticsAction, EventType } from '../analytics';
|
|
13
14
|
import { selectErrorCommand } from '../commands/select-error-command';
|
|
14
15
|
import { JQL_EDITOR_MAIN_ID } from '../common/constants';
|
|
@@ -19,6 +20,7 @@ import { getNodeText } from '../utils/document-text';
|
|
|
19
20
|
import { onStartAutocompleteEvent } from './analytics';
|
|
20
21
|
import { sortOperators } from './autocomplete';
|
|
21
22
|
import { hydrateQuery } from './hydration';
|
|
23
|
+
import { normaliseHydrationKey } from './hydration/util';
|
|
22
24
|
import { getAutocompleteOptionId, getAutocompletePosition, getFieldNodes, getReplacePositionStart, sendDebugMessage, tokensToAutocompleteOptions } from './util';
|
|
23
25
|
const initialIntl = createIntl({
|
|
24
26
|
locale: 'en'
|
|
@@ -864,13 +866,22 @@ export const useAutocompletePosition = createHook(Store, {
|
|
|
864
866
|
};
|
|
865
867
|
}
|
|
866
868
|
});
|
|
869
|
+
|
|
870
|
+
// IMPORTANT: All hydration lookup hooks below must normalise fieldName using normaliseHydrationKey.
|
|
871
|
+
// This ensures consistent matching regardless of quoting or casing differences between the hydration API
|
|
872
|
+
// response (storage) and ProseMirror node attributes (lookup). Both sides must use the same normalisation.
|
|
873
|
+
// See normaliseHydrationKey in ./hydration/util.ts for details.
|
|
867
874
|
export const useHydratedValue = createHook(Store, {
|
|
868
875
|
selector: (state, {
|
|
869
876
|
id,
|
|
870
877
|
fieldName
|
|
871
878
|
}) => {
|
|
872
|
-
var _state$
|
|
873
|
-
|
|
879
|
+
var _state$hydratedValues2;
|
|
880
|
+
if (fg('projects_in_jira_eap_drop2')) {
|
|
881
|
+
var _state$hydratedValues;
|
|
882
|
+
return (_state$hydratedValues = state.hydratedValues[normaliseHydrationKey(fieldName)]) === null || _state$hydratedValues === void 0 ? void 0 : _state$hydratedValues.get(normaliseJqlString(id));
|
|
883
|
+
}
|
|
884
|
+
return (_state$hydratedValues2 = state.hydratedValues[fieldName]) === null || _state$hydratedValues2 === void 0 ? void 0 : _state$hydratedValues2.get(id);
|
|
874
885
|
}
|
|
875
886
|
});
|
|
876
887
|
export const useHydratedUser = createHook(Store, {
|
|
@@ -878,8 +889,8 @@ export const useHydratedUser = createHook(Store, {
|
|
|
878
889
|
id,
|
|
879
890
|
fieldName
|
|
880
891
|
}) => {
|
|
881
|
-
var _state$
|
|
882
|
-
const user = (_state$
|
|
892
|
+
var _state$hydratedValues3, _state$hydratedValues4;
|
|
893
|
+
const user = fg('projects_in_jira_eap_drop2') ? (_state$hydratedValues3 = state.hydratedValues[normaliseHydrationKey(fieldName)]) === null || _state$hydratedValues3 === void 0 ? void 0 : _state$hydratedValues3.get(normaliseJqlString(id)) : (_state$hydratedValues4 = state.hydratedValues[fieldName]) === null || _state$hydratedValues4 === void 0 ? void 0 : _state$hydratedValues4.get(id);
|
|
883
894
|
return user && user.type === 'user' ? user : undefined;
|
|
884
895
|
}
|
|
885
896
|
});
|
|
@@ -888,8 +899,8 @@ export const useHydratedTeam = createHook(Store, {
|
|
|
888
899
|
id,
|
|
889
900
|
fieldName
|
|
890
901
|
}) => {
|
|
891
|
-
var _state$
|
|
892
|
-
const team = (_state$
|
|
902
|
+
var _state$hydratedValues5, _state$hydratedValues6;
|
|
903
|
+
const team = fg('projects_in_jira_eap_drop2') ? (_state$hydratedValues5 = state.hydratedValues[normaliseHydrationKey(fieldName)]) === null || _state$hydratedValues5 === void 0 ? void 0 : _state$hydratedValues5.get(normaliseJqlString(id)) : (_state$hydratedValues6 = state.hydratedValues[fieldName]) === null || _state$hydratedValues6 === void 0 ? void 0 : _state$hydratedValues6.get(id);
|
|
893
904
|
return team && team.type === 'team' ? team : undefined;
|
|
894
905
|
}
|
|
895
906
|
});
|
|
@@ -898,8 +909,8 @@ export const useHydratedProject = createHook(Store, {
|
|
|
898
909
|
id,
|
|
899
910
|
fieldName
|
|
900
911
|
}) => {
|
|
901
|
-
var _state$
|
|
902
|
-
const project = (_state$
|
|
912
|
+
var _state$hydratedValues7, _state$hydratedValues8;
|
|
913
|
+
const project = fg('projects_in_jira_eap_drop2') ? (_state$hydratedValues7 = state.hydratedValues[normaliseHydrationKey(fieldName)]) === null || _state$hydratedValues7 === void 0 ? void 0 : _state$hydratedValues7.get(normaliseJqlString(id)) : (_state$hydratedValues8 = state.hydratedValues[normaliseJqlString(fieldName)]) === null || _state$hydratedValues8 === void 0 ? void 0 : _state$hydratedValues8.get(normaliseJqlString(id));
|
|
903
914
|
return project && project.type === 'project' ? project : undefined;
|
|
904
915
|
}
|
|
905
916
|
});
|
|
@@ -909,8 +920,8 @@ export const useHydratedDeprecations = createHook(Store, {
|
|
|
909
920
|
const fieldsInQuery = getFieldNodes(ast);
|
|
910
921
|
const toReturn = [];
|
|
911
922
|
Object.entries(state.hydratedValues).forEach(([fieldName]) => {
|
|
912
|
-
var _state$
|
|
913
|
-
(_state$
|
|
923
|
+
var _state$hydratedValues9;
|
|
924
|
+
(_state$hydratedValues9 = state.hydratedValues[fieldName]) === null || _state$hydratedValues9 === void 0 ? void 0 : _state$hydratedValues9.forEach(value => {
|
|
914
925
|
if (value.type === 'deprecated-field') {
|
|
915
926
|
if (fieldsInQuery.has(value.id.toLowerCase())) {
|
|
916
927
|
toReturn.push(value);
|
|
@@ -4,7 +4,6 @@ import { IconButton } from '@atlaskit/button/new';
|
|
|
4
4
|
import GrowDiagonalIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
5
5
|
import ShrinkDiagonalIcon from '@atlaskit/icon/core/shrink-diagonal';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
-
import { N50, N500 } from '@atlaskit/theme/colors';
|
|
8
7
|
import { ExpandToggleContainer } from './styled';
|
|
9
8
|
|
|
10
9
|
// Atlaskit doesn't provide a circle variation of the expand/collapse icons so we have to implement our own
|
|
@@ -12,13 +11,13 @@ const ExpandCircleIcon = ({
|
|
|
12
11
|
isDisabled
|
|
13
12
|
}) => /*#__PURE__*/React.createElement(GrowDiagonalIcon, {
|
|
14
13
|
label: '',
|
|
15
|
-
color: isDisabled ?
|
|
14
|
+
color: isDisabled ? "var(--ds-icon-disabled, #080F214A)" : "var(--ds-icon, #292A2E)"
|
|
16
15
|
});
|
|
17
16
|
const CollapseCircleIcon = ({
|
|
18
17
|
isDisabled
|
|
19
18
|
}) => /*#__PURE__*/React.createElement(ShrinkDiagonalIcon, {
|
|
20
19
|
label: '',
|
|
21
|
-
color: isDisabled ?
|
|
20
|
+
color: isDisabled ? "var(--ds-icon-disabled, #080F214A)" : "var(--ds-icon, #292A2E)"
|
|
22
21
|
});
|
|
23
22
|
export const BaseExpandToggle = ({
|
|
24
23
|
expanded,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
|
-
import { N40, N50 } from '@atlaskit/theme/colors';
|
|
4
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
5
4
|
export const ExpandToggleContainer = styled.div({
|
|
6
5
|
/* Override background styles for our button to match designs */
|
|
@@ -10,11 +9,11 @@ export const ExpandToggleContainer = styled.div({
|
|
|
10
9
|
/* Fill the remaining vertical space for a single line in our editor and space between buttons */
|
|
11
10
|
margin: `${"var(--ds-space-050, 4px)"} 0`,
|
|
12
11
|
'&:hover': {
|
|
13
|
-
background:
|
|
12
|
+
background: "var(--ds-background-neutral-subtle-hovered, #0515240F)"
|
|
14
13
|
},
|
|
15
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
16
15
|
"&:active, &[data-firefox-is-active='true']": {
|
|
17
|
-
background:
|
|
16
|
+
background: "var(--ds-background-neutral-subtle-pressed, #0B120E24)"
|
|
18
17
|
}
|
|
19
18
|
}
|
|
20
19
|
});
|
|
@@ -6,7 +6,6 @@ import QuestionCircleIcon from '@atlaskit/icon/core/question-circle';
|
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
8
8
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
9
|
-
import { N0 } from '@atlaskit/theme/colors';
|
|
10
9
|
import { SyntaxHelpContainer } from './styled';
|
|
11
10
|
|
|
12
11
|
// Fixes icon margin issus after new icon migration
|
|
@@ -44,7 +43,7 @@ export const BaseSyntaxHelp = ({
|
|
|
44
43
|
xcss: iconStyle
|
|
45
44
|
}, /*#__PURE__*/React.createElement(QuestionCircleIcon, {
|
|
46
45
|
label: '',
|
|
47
|
-
color: isDisabled ?
|
|
46
|
+
color: isDisabled ? "var(--ds-icon-disabled, #080F214A)" : "var(--ds-icon-inverse, #FFFFFF)"
|
|
48
47
|
})),
|
|
49
48
|
onClick: onClick
|
|
50
49
|
}));
|
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
|
-
import { N50, N500, N600, N70 } from '@atlaskit/theme/colors';
|
|
4
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
5
4
|
export const SyntaxHelpContainer = styled.div({
|
|
6
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
7
6
|
'> a': {
|
|
8
|
-
background:
|
|
7
|
+
background: "var(--ds-background-neutral-bold, #292A2E)",
|
|
9
8
|
borderRadius: "var(--ds-radius-full, 9999px)",
|
|
10
9
|
margin: "var(--ds-space-050, 4px)",
|
|
11
10
|
'&:hover': {
|
|
12
|
-
background:
|
|
11
|
+
background: "var(--ds-background-neutral-bold-hovered, #3B3D42)"
|
|
13
12
|
},
|
|
14
13
|
'&:focus': {
|
|
15
|
-
background:
|
|
14
|
+
background: "var(--ds-background-neutral-bold, #292A2E)"
|
|
16
15
|
},
|
|
17
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
18
17
|
"&:active, &[data-firefox-is-active='true']": {
|
|
19
|
-
background:
|
|
18
|
+
background: "var(--ds-background-neutral-bold-pressed, #505258)"
|
|
20
19
|
},
|
|
21
20
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
22
21
|
'&[disabled]': {
|
|
23
|
-
background:
|
|
22
|
+
background: "var(--ds-background-disabled, #17171708)"
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
25
|
});
|
|
@@ -3,7 +3,6 @@ import { di } from 'react-magnetic-di';
|
|
|
3
3
|
import { HelperMessage } from '@atlaskit/form';
|
|
4
4
|
import StatusInformationIcon from '@atlaskit/icon/core/status-information';
|
|
5
5
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
|
-
import * as colors from '@atlaskit/theme/colors';
|
|
7
6
|
import { useEditorViewHasInfos } from '../../../../hooks/use-editor-view-has-infos';
|
|
8
7
|
import { useExternalMessages } from '../../../../state';
|
|
9
8
|
import { FormatMessages, MessageContainer } from '../format';
|
|
@@ -28,7 +27,7 @@ export const InfoMessages = () => {
|
|
|
28
27
|
paddingInlineEnd: "space.050"
|
|
29
28
|
}, /*#__PURE__*/React.createElement(StatusInformationIcon, {
|
|
30
29
|
label: "",
|
|
31
|
-
color:
|
|
30
|
+
color: "var(--ds-icon-information, #357DE8)",
|
|
32
31
|
size: "small"
|
|
33
32
|
})), infoMessage)) : null;
|
|
34
33
|
};
|
|
@@ -5,7 +5,6 @@ import StatusWarningIcon from '@atlaskit/icon/core/status-warning';
|
|
|
5
5
|
import Link from '@atlaskit/link';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
|
-
import * as colors from '@atlaskit/theme/colors';
|
|
9
8
|
import { useEditorViewHasWarnings } from '../../../../hooks/use-editor-view-has-warnings';
|
|
10
9
|
import { useExternalMessages, useHydratedDeprecations, useIntl } from '../../../../state';
|
|
11
10
|
import { FormatMessages, MessageContainer } from '../format';
|
|
@@ -100,7 +99,7 @@ export const WarningMessages = () => {
|
|
|
100
99
|
paddingInlineEnd: "space.050"
|
|
101
100
|
}, /*#__PURE__*/React.createElement(StatusWarningIcon, {
|
|
102
101
|
label: "",
|
|
103
|
-
color:
|
|
102
|
+
color: "var(--ds-icon-warning, #E06C00)",
|
|
104
103
|
size: "small"
|
|
105
104
|
})), warningMessage)) : null;
|
|
106
105
|
};
|
|
@@ -3,7 +3,6 @@ import { css, keyframes } from '@emotion/react';
|
|
|
3
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
4
|
import styled from '@emotion/styled';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
-
import { B200, B300, G500, N0, N10, N100, N30, N700, N800, N900, P400, R400 } from '@atlaskit/theme/colors';
|
|
7
6
|
import { layers } from '@atlaskit/theme/constants';
|
|
8
7
|
import { TOOLTIP_CLASSNAME, TOOLTIP_ENTER_CLASSNAME, TOOLTIP_EXIT_CLASSNAME } from '../../plugins/validation-tooltip/constants';
|
|
9
8
|
const fadeIn = keyframes({
|
|
@@ -34,8 +33,8 @@ export const EditorMain = styled.div`
|
|
|
34
33
|
/* These styles and animations are derived from @atlaskit/tooltip */
|
|
35
34
|
|
|
36
35
|
.${TOOLTIP_CLASSNAME} {
|
|
37
|
-
background-color: ${
|
|
38
|
-
color: ${
|
|
36
|
+
background-color: ${"var(--ds-background-neutral-bold, #292A2E)"};
|
|
37
|
+
color: ${"var(--ds-text-inverse, #FFFFFF)"};
|
|
39
38
|
border-radius: ${"var(--ds-radius-small, 3px)"};
|
|
40
39
|
box-sizing: border-box;
|
|
41
40
|
font: ${"var(--ds-font-body-small, normal 400 12px/16px \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)"};
|
|
@@ -77,14 +76,14 @@ const getEditorInputVerticalPadding = isCompact => isCompact ? 3 : 7;
|
|
|
77
76
|
const editorInputHorizontalPadding = 6;
|
|
78
77
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
79
78
|
export const EditorViewContainer = styled.div({
|
|
80
|
-
backgroundColor:
|
|
79
|
+
backgroundColor: "var(--ds-background-input, #FFFFFF)",
|
|
81
80
|
borderStyle: 'solid',
|
|
82
81
|
borderWidth: "var(--ds-border-width, 1px)",
|
|
83
|
-
borderColor:
|
|
82
|
+
borderColor: "var(--ds-border-input, #8C8F97)",
|
|
84
83
|
borderRadius: "var(--ds-radius-medium, 3px)",
|
|
85
84
|
padding: "var(--ds-border-width, 1px)",
|
|
86
85
|
boxSizing: 'border-box',
|
|
87
|
-
color:
|
|
86
|
+
color: "var(--ds-text, #292A2E)",
|
|
88
87
|
display: 'flex',
|
|
89
88
|
overflow: 'auto',
|
|
90
89
|
transition: 'background-color 0.2s ease-in-out, border-color 0.2s ease-in-out'
|
|
@@ -93,34 +92,34 @@ export const EditorViewContainer = styled.div({
|
|
|
93
92
|
props => props.editorViewIsInvalid &&
|
|
94
93
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
95
94
|
css({
|
|
96
|
-
borderColor:
|
|
97
|
-
boxShadow: `inset 0 0 0 ${"var(--ds-border-width, 1px)"} ${
|
|
95
|
+
borderColor: "var(--ds-border-danger, #E2483D)",
|
|
96
|
+
boxShadow: `inset 0 0 0 ${"var(--ds-border-width, 1px)"} ${"var(--ds-border-danger, #E2483D)"}`
|
|
98
97
|
}),
|
|
99
98
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
|
|
100
99
|
props => props.editorViewHasFocus ?
|
|
101
100
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
102
101
|
css({
|
|
103
|
-
backgroundColor:
|
|
104
|
-
borderColor:
|
|
105
|
-
boxShadow: `inset 0 0 0 ${"var(--ds-border-width, 1px)"} ${
|
|
102
|
+
backgroundColor: "var(--ds-surface, #FFFFFF)",
|
|
103
|
+
borderColor: "var(--ds-border-focused, #4688EC)",
|
|
104
|
+
boxShadow: `inset 0 0 0 ${"var(--ds-border-width, 1px)"} ${"var(--ds-border-focused, #4688EC)"}`
|
|
106
105
|
}) :
|
|
107
106
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
108
107
|
css({
|
|
109
108
|
'&:hover': {
|
|
110
|
-
backgroundColor:
|
|
109
|
+
backgroundColor: "var(--ds-background-input-hovered, #F8F8F8)"
|
|
111
110
|
}
|
|
112
111
|
}));
|
|
113
112
|
|
|
114
113
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
115
114
|
export const ReadOnlyEditorViewContainer = styled(EditorViewContainer)({
|
|
116
|
-
backgroundColor:
|
|
117
|
-
color:
|
|
115
|
+
backgroundColor: "var(--ds-background-disabled, #17171708)",
|
|
116
|
+
color: "var(--ds-text-disabled, #080F214A)",
|
|
118
117
|
pointerEvents: 'none'
|
|
119
118
|
});
|
|
120
119
|
|
|
121
120
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
122
121
|
export const LineNumberToolbar = styled.div({
|
|
123
|
-
backgroundColor:
|
|
122
|
+
backgroundColor: "var(--ds-background-neutral, #0515240F)",
|
|
124
123
|
flexShrink: 0,
|
|
125
124
|
width: '30px',
|
|
126
125
|
position: 'sticky',
|
|
@@ -159,7 +158,7 @@ export const EditorView = styled.div`
|
|
|
159
158
|
}
|
|
160
159
|
|
|
161
160
|
.ProseMirror {
|
|
162
|
-
color: ${
|
|
161
|
+
color: ${"var(--ds-text, #292A2E)"};
|
|
163
162
|
padding: ${props => getEditorInputVerticalPadding(props.isCompact)}px
|
|
164
163
|
${editorInputHorizontalPadding}px;
|
|
165
164
|
|
|
@@ -168,19 +167,19 @@ export const EditorView = styled.div`
|
|
|
168
167
|
}
|
|
169
168
|
|
|
170
169
|
.mark-token-keyword {
|
|
171
|
-
color: ${
|
|
170
|
+
color: ${"var(--ds-text-accent-purple, #803FA5)"};
|
|
172
171
|
}
|
|
173
172
|
|
|
174
173
|
.mark-token-field {
|
|
175
|
-
color: ${
|
|
174
|
+
color: ${"var(--ds-text-accent-blue, #1558BC)"};
|
|
176
175
|
}
|
|
177
176
|
|
|
178
177
|
.mark-token-operator {
|
|
179
|
-
color: ${
|
|
178
|
+
color: ${"var(--ds-text-accent-green, #216E4E)"};
|
|
180
179
|
}
|
|
181
180
|
|
|
182
181
|
.mark-token-error {
|
|
183
|
-
color: ${
|
|
182
|
+
color: ${"var(--ds-text-danger, #AE2E24)"};
|
|
184
183
|
text-decoration: wavy underline;
|
|
185
184
|
text-decoration-thickness: 1px;
|
|
186
185
|
text-decoration-skip-ink: none;
|
|
@@ -196,7 +195,7 @@ export const EditorView = styled.div`
|
|
|
196
195
|
|
|
197
196
|
&::before {
|
|
198
197
|
content: counter(lineNumber);
|
|
199
|
-
color: ${
|
|
198
|
+
color: ${"var(--ds-text-subtlest, #6B6E76)"};
|
|
200
199
|
font-size: 10px;
|
|
201
200
|
line-height: ${rowHeight / 10};
|
|
202
201
|
padding: 0 ${"var(--ds-space-100, 8px)"} 0 ${"var(--ds-space-025, 2px)"};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ANALYTICS_CHANNEL, useJqlPackageAnalytics } from '@atlaskit/jql-editor-common';
|
|
2
2
|
export var useJqlEditorAnalytics = function useJqlEditorAnalytics(analyticsSource) {
|
|
3
|
-
return useJqlPackageAnalytics(analyticsSource, "@atlaskit/jql-editor", "
|
|
3
|
+
return useJqlPackageAnalytics(analyticsSource, "@atlaskit/jql-editor", "5.13.6", ANALYTICS_CHANNEL);
|
|
4
4
|
};
|
package/dist/esm/async.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
+
|
|
4
|
+
// oxlint-disable-next-line @atlassian/no-restricted-imports
|
|
3
5
|
import { lazyForPaint, LazySuspense } from 'react-loosely-lazy';
|
|
4
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
7
|
import { withErrorBoundary } from './ui/error-boundary';
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
|
-
import { N200, N40, N50A, N60A } from '@atlaskit/theme/colors';
|
|
4
3
|
import { layers } from '@atlaskit/theme/constants';
|
|
5
4
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
6
5
|
export var AutocompleteContainer = styled.div({
|
|
7
6
|
position: 'absolute',
|
|
8
|
-
backgroundColor: "var(--ds-surface-overlay,
|
|
7
|
+
backgroundColor: "var(--ds-surface-overlay, #FFFFFF)",
|
|
9
8
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
10
9
|
willChange: 'top, left',
|
|
11
10
|
zIndex: layers.dialog(),
|
|
12
|
-
boxShadow: "var(--ds-shadow-overlay,
|
|
13
|
-
padding: "var(--ds-space-075, 6px)".concat(" ", "var(--ds-space-0,
|
|
11
|
+
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #1E1F2126, 0px 0px 1px #1E1F214f)",
|
|
12
|
+
padding: "var(--ds-space-075, 6px)".concat(" ", "var(--ds-space-0, 0px)"),
|
|
14
13
|
minWidth: '200px',
|
|
15
14
|
maxWidth: '400px',
|
|
16
15
|
'&:focus': {
|
|
@@ -45,15 +44,15 @@ export var AutocompleteOptionsContainer = styled.div({
|
|
|
45
44
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
46
45
|
export var OptionList = styled.ul({
|
|
47
46
|
listStyle: 'none',
|
|
48
|
-
margin: "var(--ds-space-0,
|
|
49
|
-
padding: "var(--ds-space-0,
|
|
47
|
+
margin: "var(--ds-space-0, 0px)",
|
|
48
|
+
padding: "var(--ds-space-0, 0px)"
|
|
50
49
|
});
|
|
51
50
|
|
|
52
51
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
53
52
|
export var AutocompleteLoadingFooter = styled.div({
|
|
54
53
|
display: 'flex',
|
|
55
54
|
justifyContent: 'center',
|
|
56
|
-
color: "var(--ds-text-subtlest,
|
|
55
|
+
color: "var(--ds-text-subtlest, #6B6E76)",
|
|
57
56
|
fontStyle: 'italic',
|
|
58
57
|
padding: "var(--ds-space-150, 12px)",
|
|
59
58
|
textAlign: 'center'
|
|
@@ -62,7 +61,7 @@ export var AutocompleteLoadingFooter = styled.div({
|
|
|
62
61
|
function (_ref3) {
|
|
63
62
|
var hasOptions = _ref3.hasOptions;
|
|
64
63
|
return hasOptions && {
|
|
65
|
-
borderTop: "solid
|
|
64
|
+
borderTop: "solid ".concat("var(--ds-border-width, 1px)", " ", "var(--ds-border, #0B120E24)"),
|
|
66
65
|
marginTop: "var(--ds-space-075, 6px)",
|
|
67
66
|
paddingTop: "var(--ds-space-250, 20px)"
|
|
68
67
|
};
|
|
@@ -16,7 +16,6 @@ import TagIcon from '@atlaskit/icon/core/tag';
|
|
|
16
16
|
import CheckboxIcon from '@atlaskit/icon/core/task';
|
|
17
17
|
import TextIcon from '@atlaskit/icon/core/text';
|
|
18
18
|
import { normaliseJqlString } from '@atlaskit/jql-ast';
|
|
19
|
-
import { N400 } from '@atlaskit/theme/colors';
|
|
20
19
|
import Tooltip from '@atlaskit/tooltip';
|
|
21
20
|
import { useIntl } from '../../../../state';
|
|
22
21
|
import { messages } from './messages';
|
|
@@ -163,7 +162,7 @@ var AutocompleteOption = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
163
162
|
spacing: "spacious",
|
|
164
163
|
testId: "jql-editor-deprecated-icon",
|
|
165
164
|
label: "",
|
|
166
|
-
color: "var(--ds-icon,
|
|
165
|
+
color: "var(--ds-icon, #292A2E)"
|
|
167
166
|
}))) : optionName, fieldType && /*#__PURE__*/React.createElement(FieldType, null, fieldTypeIcon && /*#__PURE__*/React.createElement(FieldTypeIcon, null, fieldTypeIcon), fieldType));
|
|
168
167
|
var tooltipContent = /*#__PURE__*/React.createElement(TooltipContent, null, name);
|
|
169
168
|
if (overflows) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
|
-
import { N100, N20, N50, N800 } from '@atlaskit/theme/colors';
|
|
4
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
5
4
|
export var TooltipContent = styled.div({
|
|
6
5
|
fontFamily: "var(--ds-font-family-body, \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)"
|
|
@@ -18,7 +17,7 @@ export var OptionListItem = styled.li({
|
|
|
18
17
|
function (_ref) {
|
|
19
18
|
var isSelected = _ref.isSelected;
|
|
20
19
|
return isSelected && {
|
|
21
|
-
background: "var(--ds-background-neutral-subtle-hovered,
|
|
20
|
+
background: "var(--ds-background-neutral-subtle-hovered, #0515240F)"
|
|
22
21
|
};
|
|
23
22
|
},
|
|
24
23
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
|
|
@@ -26,13 +25,13 @@ function (_ref2) {
|
|
|
26
25
|
var isDeprecated = _ref2.isDeprecated;
|
|
27
26
|
return isDeprecated && {
|
|
28
27
|
cursor: 'default',
|
|
29
|
-
color: "var(--ds-text-disabled,
|
|
28
|
+
color: "var(--ds-text-disabled, #080F214A)"
|
|
30
29
|
};
|
|
31
30
|
});
|
|
32
31
|
|
|
33
32
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
34
33
|
export var OptionName = styled.div({
|
|
35
|
-
color: "var(--ds-text,
|
|
34
|
+
color: "var(--ds-text, #292A2E)",
|
|
36
35
|
overflow: 'hidden',
|
|
37
36
|
whiteSpace: 'nowrap',
|
|
38
37
|
textOverflow: 'ellipsis',
|
|
@@ -42,7 +41,7 @@ export var OptionName = styled.div({
|
|
|
42
41
|
|
|
43
42
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
44
43
|
export var DeprecatedOptionContainer = styled.div({
|
|
45
|
-
color: "var(--ds-text-disabled,
|
|
44
|
+
color: "var(--ds-text-disabled, #080F214A)",
|
|
46
45
|
display: 'flex',
|
|
47
46
|
justifyContent: 'space-between',
|
|
48
47
|
opacity: 0.6
|
|
@@ -58,7 +57,7 @@ export var FieldType = styled.div({
|
|
|
58
57
|
display: 'flex',
|
|
59
58
|
alignItems: 'center',
|
|
60
59
|
marginTop: "var(--ds-space-negative-025, -2px)",
|
|
61
|
-
color: "var(--ds-text-subtlest,
|
|
60
|
+
color: "var(--ds-text-subtlest, #6B6E76)"
|
|
62
61
|
});
|
|
63
62
|
|
|
64
63
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -56,7 +56,7 @@ var AutocompletePluginView = /*#__PURE__*/function (_ReactPluginView) {
|
|
|
56
56
|
if (_this.enableRichInlineNodes && option.type === 'value' && option.valueType === 'user') {
|
|
57
57
|
transaction.setMeta('hydrate', true);
|
|
58
58
|
}
|
|
59
|
-
if (_this.enableRichInlineNodes && option.type === 'value' && (option.valueType === 'team'
|
|
59
|
+
if (_this.enableRichInlineNodes && option.type === 'value' && (option.valueType === 'team' || option.valueType === 'project' && fg('projects_in_jira_eap_drop2'))) {
|
|
60
60
|
transaction.setMeta('hydrate', true);
|
|
61
61
|
}
|
|
62
62
|
var documentFrom = getDocumentPosition(transaction.doc, from);
|
|
@@ -98,17 +98,13 @@ var AutocompletePluginView = /*#__PURE__*/function (_ReactPluginView) {
|
|
|
98
98
|
}
|
|
99
99
|
case 'team':
|
|
100
100
|
{
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
nodes.push(_this.view.state.schema.nodes.team.create(_attributes, textContent));
|
|
109
|
-
} else {
|
|
110
|
-
nodes.push(textContent);
|
|
111
|
-
}
|
|
101
|
+
var _attributes = {
|
|
102
|
+
type: 'team',
|
|
103
|
+
id: value,
|
|
104
|
+
name: nameOnRichInlineNode !== null && nameOnRichInlineNode !== void 0 ? nameOnRichInlineNode : name,
|
|
105
|
+
fieldName: context === null || context === void 0 ? void 0 : context.field
|
|
106
|
+
};
|
|
107
|
+
nodes.push(_this.view.state.schema.nodes.team.create(_attributes, textContent));
|
|
112
108
|
break;
|
|
113
109
|
}
|
|
114
110
|
case 'project':
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
4
|
import styled from '@emotion/styled';
|
|
5
|
-
import { N0, N40, N50, N500, R400 } from '@atlaskit/theme/colors';
|
|
6
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
7
6
|
export var TeamContainer = styled.span({
|
|
8
7
|
display: 'inline-flex',
|
|
@@ -20,42 +19,42 @@ function (_ref) {
|
|
|
20
19
|
if (error) {
|
|
21
20
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
22
21
|
return css({
|
|
23
|
-
color: "var(--ds-text-inverse,
|
|
24
|
-
backgroundColor: "var(--ds-background-danger-bold,
|
|
22
|
+
color: "var(--ds-text-inverse, #FFFFFF)",
|
|
23
|
+
backgroundColor: "var(--ds-background-danger-bold, #C9372C)",
|
|
25
24
|
textDecoration: 'wavy underline',
|
|
26
25
|
textDecorationThickness: '1px',
|
|
27
26
|
textDecorationSkipInk: 'none',
|
|
28
|
-
textDecorationColor: "var(--ds-text-inverse,
|
|
27
|
+
textDecorationColor: "var(--ds-text-inverse, #FFFFFF)"
|
|
29
28
|
});
|
|
30
29
|
} else {
|
|
31
30
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
32
31
|
return css({
|
|
33
|
-
color: "var(--ds-text,
|
|
34
|
-
backgroundColor: "var(--ds-background-selected,
|
|
35
|
-
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected,
|
|
32
|
+
color: "var(--ds-text, #292A2E)",
|
|
33
|
+
backgroundColor: "var(--ds-background-selected, #E9F2FE)",
|
|
34
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #1868DB)")
|
|
36
35
|
});
|
|
37
36
|
}
|
|
38
37
|
} else {
|
|
39
38
|
if (error) {
|
|
40
39
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
41
40
|
return css({
|
|
42
|
-
color: "var(--ds-text-subtle,
|
|
43
|
-
backgroundColor: "var(--ds-background-neutral,
|
|
41
|
+
color: "var(--ds-text-subtle, #505258)",
|
|
42
|
+
backgroundColor: "var(--ds-background-neutral, #0515240F)",
|
|
44
43
|
textDecoration: 'wavy underline',
|
|
45
44
|
textDecorationThickness: '1px',
|
|
46
45
|
textDecorationSkipInk: 'none',
|
|
47
|
-
textDecorationColor: "var(--ds-text-danger,
|
|
46
|
+
textDecorationColor: "var(--ds-text-danger, #AE2E24)",
|
|
48
47
|
'&:hover': {
|
|
49
|
-
backgroundColor: "var(--ds-background-neutral-hovered,
|
|
48
|
+
backgroundColor: "var(--ds-background-neutral-hovered, #0B120E24)"
|
|
50
49
|
}
|
|
51
50
|
});
|
|
52
51
|
} else {
|
|
53
52
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
54
53
|
return css({
|
|
55
|
-
color: "var(--ds-text-subtle,
|
|
56
|
-
backgroundColor: "var(--ds-background-neutral,
|
|
54
|
+
color: "var(--ds-text-subtle, #505258)",
|
|
55
|
+
backgroundColor: "var(--ds-background-neutral, #0515240F)",
|
|
57
56
|
'&:hover': {
|
|
58
|
-
backgroundColor: "var(--ds-background-neutral-hovered,
|
|
57
|
+
backgroundColor: "var(--ds-background-neutral-hovered, #0B120E24)"
|
|
59
58
|
}
|
|
60
59
|
});
|
|
61
60
|
}
|