@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.
Files changed (61) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/analytics/util.js +1 -1
  3. package/dist/cjs/async.js +1 -1
  4. package/dist/cjs/plugins/autocomplete/components/autocomplete-dropdown/styled.js +7 -8
  5. package/dist/cjs/plugins/autocomplete/components/autocomplete-option/index.js +1 -2
  6. package/dist/cjs/plugins/autocomplete/components/autocomplete-option/styled.js +5 -6
  7. package/dist/cjs/plugins/autocomplete/view.js +8 -12
  8. package/dist/cjs/plugins/rich-inline-nodes/nodes/team/styled.js +13 -14
  9. package/dist/cjs/plugins/rich-inline-nodes/nodes/user/styled.js +13 -14
  10. package/dist/cjs/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +1 -1
  11. package/dist/cjs/state/hydration/index.js +9 -2
  12. package/dist/cjs/state/hydration/util.js +10 -1
  13. package/dist/cjs/state/index.js +31 -20
  14. package/dist/cjs/ui/jql-editor-controls-content/base-expand-toggle/index.js +2 -3
  15. package/dist/cjs/ui/jql-editor-controls-content/base-expand-toggle/styled.js +2 -3
  16. package/dist/cjs/ui/jql-editor-controls-content/base-syntax-help/index.js +1 -2
  17. package/dist/cjs/ui/jql-editor-controls-content/base-syntax-help/styled.js +5 -6
  18. package/dist/cjs/ui/jql-editor-footer-content/jql-messages/infos/index.js +1 -4
  19. package/dist/cjs/ui/jql-editor-footer-content/jql-messages/warnings/index.js +1 -2
  20. package/dist/cjs/ui/jql-editor-layout/styled.js +15 -16
  21. package/dist/es2019/analytics/util.js +1 -1
  22. package/dist/es2019/async.js +2 -0
  23. package/dist/es2019/plugins/autocomplete/components/autocomplete-dropdown/styled.js +7 -8
  24. package/dist/es2019/plugins/autocomplete/components/autocomplete-option/index.js +1 -2
  25. package/dist/es2019/plugins/autocomplete/components/autocomplete-option/styled.js +5 -6
  26. package/dist/es2019/plugins/autocomplete/view.js +8 -12
  27. package/dist/es2019/plugins/rich-inline-nodes/nodes/team/styled.js +13 -14
  28. package/dist/es2019/plugins/rich-inline-nodes/nodes/user/styled.js +13 -14
  29. package/dist/es2019/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +1 -1
  30. package/dist/es2019/state/hydration/index.js +12 -4
  31. package/dist/es2019/state/hydration/util.js +8 -1
  32. package/dist/es2019/state/index.js +21 -10
  33. package/dist/es2019/ui/jql-editor-controls-content/base-expand-toggle/index.js +2 -3
  34. package/dist/es2019/ui/jql-editor-controls-content/base-expand-toggle/styled.js +2 -3
  35. package/dist/es2019/ui/jql-editor-controls-content/base-syntax-help/index.js +1 -2
  36. package/dist/es2019/ui/jql-editor-controls-content/base-syntax-help/styled.js +5 -6
  37. package/dist/es2019/ui/jql-editor-footer-content/jql-messages/infos/index.js +1 -2
  38. package/dist/es2019/ui/jql-editor-footer-content/jql-messages/warnings/index.js +1 -2
  39. package/dist/es2019/ui/jql-editor-layout/styled.js +20 -21
  40. package/dist/esm/analytics/util.js +1 -1
  41. package/dist/esm/async.js +2 -0
  42. package/dist/esm/plugins/autocomplete/components/autocomplete-dropdown/styled.js +7 -8
  43. package/dist/esm/plugins/autocomplete/components/autocomplete-option/index.js +1 -2
  44. package/dist/esm/plugins/autocomplete/components/autocomplete-option/styled.js +5 -6
  45. package/dist/esm/plugins/autocomplete/view.js +8 -12
  46. package/dist/esm/plugins/rich-inline-nodes/nodes/team/styled.js +13 -14
  47. package/dist/esm/plugins/rich-inline-nodes/nodes/user/styled.js +13 -14
  48. package/dist/esm/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +1 -1
  49. package/dist/esm/state/hydration/index.js +10 -3
  50. package/dist/esm/state/hydration/util.js +10 -1
  51. package/dist/esm/state/index.js +21 -10
  52. package/dist/esm/ui/jql-editor-controls-content/base-expand-toggle/index.js +2 -3
  53. package/dist/esm/ui/jql-editor-controls-content/base-expand-toggle/styled.js +2 -3
  54. package/dist/esm/ui/jql-editor-controls-content/base-syntax-help/index.js +1 -2
  55. package/dist/esm/ui/jql-editor-controls-content/base-syntax-help/styled.js +5 -6
  56. package/dist/esm/ui/jql-editor-footer-content/jql-messages/infos/index.js +1 -2
  57. package/dist/esm/ui/jql-editor-footer-content/jql-messages/warnings/index.js +1 -2
  58. package/dist/esm/ui/jql-editor-layout/styled.js +15 -16
  59. package/dist/types/state/hydration/util.d.ts +6 -0
  60. package/dist/types-ts4.5/state/hydration/util.d.ts +6 -0
  61. package/package.json +8 -11
@@ -3,7 +3,6 @@ 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
5
  import { fg } from '@atlaskit/platform-feature-flags';
6
- import { N0, N40, N50, N500, R400 } from '@atlaskit/theme/colors';
7
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
8
7
  export var UserContainer = styled.span({
9
8
  display: 'inline-flex',
@@ -21,42 +20,42 @@ function (_ref) {
21
20
  if (error) {
22
21
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
23
22
  return css({
24
- color: "var(--ds-text-inverse, ".concat(N0, ")"),
25
- backgroundColor: "var(--ds-background-danger-bold, ".concat(R400, ")"),
23
+ color: "var(--ds-text-inverse, #FFFFFF)",
24
+ backgroundColor: "var(--ds-background-danger-bold, #C9372C)",
26
25
  textDecoration: 'wavy underline',
27
26
  textDecorationThickness: '1px',
28
27
  textDecorationSkipInk: 'none',
29
- textDecorationColor: "var(--ds-text-inverse, ".concat(N0, ")")
28
+ textDecorationColor: "var(--ds-text-inverse, #FFFFFF)"
30
29
  });
31
30
  } else {
32
31
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
33
32
  return css({
34
- color: "var(--ds-text, ".concat(N0, ")"),
35
- backgroundColor: "var(--ds-background-selected, ".concat(N500, ")"),
36
- boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, transparent)")
33
+ color: "var(--ds-text, #292A2E)",
34
+ backgroundColor: "var(--ds-background-selected, #E9F2FE)",
35
+ boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #1868DB)")
37
36
  });
38
37
  }
39
38
  } else {
40
39
  if (error) {
41
40
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
42
41
  return css({
43
- color: "var(--ds-text-subtle, ".concat(N500, ")"),
44
- backgroundColor: "var(--ds-background-neutral, ".concat(N40, ")"),
42
+ color: "var(--ds-text-subtle, #505258)",
43
+ backgroundColor: "var(--ds-background-neutral, #0515240F)",
45
44
  textDecoration: 'wavy underline',
46
45
  textDecorationThickness: '1px',
47
46
  textDecorationSkipInk: 'none',
48
- textDecorationColor: "var(--ds-text-danger, ".concat(R400, ")"),
47
+ textDecorationColor: "var(--ds-text-danger, #AE2E24)",
49
48
  '&:hover': {
50
- backgroundColor: "var(--ds-background-neutral-hovered, ".concat(N50, ")")
49
+ backgroundColor: "var(--ds-background-neutral-hovered, #0B120E24)"
51
50
  }
52
51
  });
53
52
  } else {
54
53
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
55
54
  return css({
56
- color: "var(--ds-text-subtle, ".concat(N500, ")"),
57
- backgroundColor: "var(--ds-background-neutral, ".concat(N40, ")"),
55
+ color: "var(--ds-text-subtle, #505258)",
56
+ backgroundColor: "var(--ds-background-neutral, #0515240F)",
58
57
  '&:hover': {
59
- backgroundColor: "var(--ds-background-neutral-hovered, ".concat(N50, ")")
58
+ backgroundColor: "var(--ds-background-neutral-hovered, #0B120E24)"
60
59
  }
61
60
  });
62
61
  }
@@ -26,7 +26,7 @@ export var replaceRichInlineNodes = function replaceRichInlineNodes(editorState,
26
26
  fieldName = _ref2[0],
27
27
  values = _ref2[1];
28
28
  values.forEach(function (value) {
29
- if (value.type === 'user' || value.type === 'team' && fg('jira_update_jql_teams') || value.type === 'project' && fg('projects_in_jira_eap_drop2')) {
29
+ if (value.type === 'user' || value.type === 'team' || value.type === 'project' && fg('projects_in_jira_eap_drop2')) {
30
30
  // First try to find as direct value operand (e.g., Team[Team] = uuid)
31
31
  var astNodes = getValueNodes(ast, fieldName, value.id);
32
32
 
@@ -4,10 +4,11 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
4
  import _regeneratorRuntime from "@babel/runtime/regenerator";
5
5
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
6
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  import { getJastFromState } from '../../plugins/jql-ast';
8
9
  import { replaceRichInlineNodes } from '../../plugins/rich-inline-nodes/util/replace-nodes-transaction';
9
10
  import { actions } from '../index';
10
- import { ValidQueryVisitor } from './util';
11
+ import { normaliseHydrationKey, ValidQueryVisitor } from './util';
11
12
  export var hydrateQuery = function hydrateQuery() {
12
13
  return /*#__PURE__*/function () {
13
14
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref, _ref2) {
@@ -42,15 +43,21 @@ export var hydrateQuery = function hydrateQuery() {
42
43
  return onHydrate(queryToHydrate);
43
44
  case 13:
44
45
  newHydratedValues = _context.sent;
46
+ // IMPORTANT: Field name keys must be normalised (unquoted + lowercased) when storing hydrated values.
47
+ // The hydration API returns field names in a canonical format (e.g. 'Project[AtlassianProject]'),
48
+ // but lookup keys from ProseMirror node attributes may differ in quoting and casing
49
+ // (e.g. '"project[atlassianproject]"'). normaliseHydrationKey ensures both storage and lookup use
50
+ // the same key format. See normaliseHydrationKey in ./util.ts.
45
51
  hydratedValuesMap = Object.entries(newHydratedValues).reduce(function (map, _ref4) {
46
52
  var _ref5 = _slicedToArray(_ref4, 2),
47
53
  fieldName = _ref5[0],
48
54
  values = _ref5[1];
49
- var valueMap = new Map(oldHydratedValues[fieldName]);
55
+ var fieldNameToUse = fg('projects_in_jira_eap_drop2') ? normaliseHydrationKey(fieldName) : fieldName;
56
+ var valueMap = new Map(oldHydratedValues[fieldNameToUse]);
50
57
  values.forEach(function (value) {
51
58
  valueMap.set(value.id, value);
52
59
  });
53
- return _objectSpread(_objectSpread({}, map), {}, _defineProperty({}, fieldName, valueMap));
60
+ return _objectSpread(_objectSpread({}, map), {}, _defineProperty({}, fieldNameToUse, valueMap));
54
61
  }, {});
55
62
  setState({
56
63
  hydratedValues: hydratedValuesMap
@@ -6,9 +6,18 @@ import _inherits from "@babel/runtime/helpers/inherits";
6
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
7
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
- import { AbstractJastVisitor } from '@atlaskit/jql-ast';
9
+ import { AbstractJastVisitor, normaliseJqlString } from '@atlaskit/jql-ast';
10
10
  import { fg } from '@atlaskit/platform-feature-flags';
11
11
 
12
+ /**
13
+ * Normalise a JQL string for use as a hydration map key.
14
+ * Strips quotes/escaping and lowercases to ensure case-insensitive matching
15
+ * between field names from different sources (e.g. AST vs hydration API).
16
+ */
17
+ export var normaliseHydrationKey = function normaliseHydrationKey(key) {
18
+ return normaliseJqlString(key).toLowerCase();
19
+ };
20
+
12
21
  /**
13
22
  * Given an AST with parse errors, this visitor returns a valid query that is equivalent for hydration purposes
14
23
  * (i.e. just fields, operators and values). Resulting query is generated on a best-effort basis and depends on
@@ -14,6 +14,7 @@ import { v4 as uuidv4 } from 'uuid';
14
14
  import { EditorView } from '@atlaskit/editor-prosemirror/view';
15
15
  import { computeJqlInsights, isListOperator, normaliseJqlString } from '@atlaskit/jql-ast';
16
16
  import { JQLAutocomplete } from '@atlaskit/jql-autocomplete';
17
+ import { fg } from '@atlaskit/platform-feature-flags';
17
18
  import { ActionSubject, ActionSubjectId, Action as AnalyticsAction, EventType } from '../analytics';
18
19
  import { selectErrorCommand } from '../commands/select-error-command';
19
20
  import { JQL_EDITOR_MAIN_ID } from '../common/constants';
@@ -24,6 +25,7 @@ import { getNodeText } from '../utils/document-text';
24
25
  import { onStartAutocompleteEvent } from './analytics';
25
26
  import { sortOperators } from './autocomplete';
26
27
  import { hydrateQuery } from './hydration';
28
+ import { normaliseHydrationKey } from './hydration/util';
27
29
  import { getAutocompleteOptionId, getAutocompletePosition, getFieldNodes, getReplacePositionStart, sendDebugMessage, tokensToAutocompleteOptions } from './util';
28
30
  var initialIntl = createIntl({
29
31
  locale: 'en'
@@ -886,38 +888,47 @@ export var useAutocompletePosition = createHook(Store, {
886
888
  };
887
889
  }
888
890
  });
891
+
892
+ // IMPORTANT: All hydration lookup hooks below must normalise fieldName using normaliseHydrationKey.
893
+ // This ensures consistent matching regardless of quoting or casing differences between the hydration API
894
+ // response (storage) and ProseMirror node attributes (lookup). Both sides must use the same normalisation.
895
+ // See normaliseHydrationKey in ./hydration/util.ts for details.
889
896
  export var useHydratedValue = createHook(Store, {
890
897
  selector: function selector(state, _ref38) {
891
- var _state$hydratedValues;
898
+ var _state$hydratedValues2;
892
899
  var id = _ref38.id,
893
900
  fieldName = _ref38.fieldName;
894
- return (_state$hydratedValues = state.hydratedValues[fieldName]) === null || _state$hydratedValues === void 0 ? void 0 : _state$hydratedValues.get(id);
901
+ if (fg('projects_in_jira_eap_drop2')) {
902
+ var _state$hydratedValues;
903
+ return (_state$hydratedValues = state.hydratedValues[normaliseHydrationKey(fieldName)]) === null || _state$hydratedValues === void 0 ? void 0 : _state$hydratedValues.get(normaliseJqlString(id));
904
+ }
905
+ return (_state$hydratedValues2 = state.hydratedValues[fieldName]) === null || _state$hydratedValues2 === void 0 ? void 0 : _state$hydratedValues2.get(id);
895
906
  }
896
907
  });
897
908
  export var useHydratedUser = createHook(Store, {
898
909
  selector: function selector(state, _ref39) {
899
- var _state$hydratedValues2;
910
+ var _state$hydratedValues3, _state$hydratedValues4;
900
911
  var id = _ref39.id,
901
912
  fieldName = _ref39.fieldName;
902
- var user = (_state$hydratedValues2 = state.hydratedValues[fieldName]) === null || _state$hydratedValues2 === void 0 ? void 0 : _state$hydratedValues2.get(id);
913
+ var 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);
903
914
  return user && user.type === 'user' ? user : undefined;
904
915
  }
905
916
  });
906
917
  export var useHydratedTeam = createHook(Store, {
907
918
  selector: function selector(state, _ref40) {
908
- var _state$hydratedValues3;
919
+ var _state$hydratedValues5, _state$hydratedValues6;
909
920
  var id = _ref40.id,
910
921
  fieldName = _ref40.fieldName;
911
- var team = (_state$hydratedValues3 = state.hydratedValues[fieldName]) === null || _state$hydratedValues3 === void 0 ? void 0 : _state$hydratedValues3.get(id);
922
+ var 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);
912
923
  return team && team.type === 'team' ? team : undefined;
913
924
  }
914
925
  });
915
926
  export var useHydratedProject = createHook(Store, {
916
927
  selector: function selector(state, _ref41) {
917
- var _state$hydratedValues4;
928
+ var _state$hydratedValues7, _state$hydratedValues8;
918
929
  var id = _ref41.id,
919
930
  fieldName = _ref41.fieldName;
920
- var project = (_state$hydratedValues4 = state.hydratedValues[normaliseJqlString(fieldName)]) === null || _state$hydratedValues4 === void 0 ? void 0 : _state$hydratedValues4.get(normaliseJqlString(id));
931
+ var 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));
921
932
  return project && project.type === 'project' ? project : undefined;
922
933
  }
923
934
  });
@@ -927,10 +938,10 @@ export var useHydratedDeprecations = createHook(Store, {
927
938
  var fieldsInQuery = getFieldNodes(ast);
928
939
  var toReturn = [];
929
940
  Object.entries(state.hydratedValues).forEach(function (_ref42) {
930
- var _state$hydratedValues5;
941
+ var _state$hydratedValues9;
931
942
  var _ref43 = _slicedToArray(_ref42, 1),
932
943
  fieldName = _ref43[0];
933
- (_state$hydratedValues5 = state.hydratedValues[fieldName]) === null || _state$hydratedValues5 === void 0 || _state$hydratedValues5.forEach(function (value) {
944
+ (_state$hydratedValues9 = state.hydratedValues[fieldName]) === null || _state$hydratedValues9 === void 0 || _state$hydratedValues9.forEach(function (value) {
934
945
  if (value.type === 'deprecated-field') {
935
946
  if (fieldsInQuery.has(value.id.toLowerCase())) {
936
947
  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,14 +11,14 @@ var ExpandCircleIcon = function ExpandCircleIcon(_ref) {
12
11
  var isDisabled = _ref.isDisabled;
13
12
  return /*#__PURE__*/React.createElement(GrowDiagonalIcon, {
14
13
  label: '',
15
- color: isDisabled ? "var(--ds-icon-disabled, ".concat(N50, ")") : "var(--ds-icon, ".concat(N500, ")")
14
+ color: isDisabled ? "var(--ds-icon-disabled, #080F214A)" : "var(--ds-icon, #292A2E)"
16
15
  });
17
16
  };
18
17
  var CollapseCircleIcon = function CollapseCircleIcon(_ref2) {
19
18
  var isDisabled = _ref2.isDisabled;
20
19
  return /*#__PURE__*/React.createElement(ShrinkDiagonalIcon, {
21
20
  label: '',
22
- color: isDisabled ? "var(--ds-icon-disabled, ".concat(N50, ")") : "var(--ds-icon, ".concat(N500, ")")
21
+ color: isDisabled ? "var(--ds-icon-disabled, #080F214A)" : "var(--ds-icon, #292A2E)"
23
22
  });
24
23
  };
25
24
  export var BaseExpandToggle = function BaseExpandToggle(_ref3) {
@@ -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 var ExpandToggleContainer = styled.div({
6
5
  /* Override background styles for our button to match designs */
@@ -10,11 +9,11 @@ export var 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)".concat(" 0"),
12
11
  '&:hover': {
13
- background: "var(--ds-background-neutral-subtle-hovered, ".concat(N40, ")")
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: "var(--ds-background-neutral-subtle-pressed, ".concat(N50, ")")
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
@@ -45,7 +44,7 @@ export var BaseSyntaxHelp = function BaseSyntaxHelp(_ref) {
45
44
  xcss: iconStyle
46
45
  }, /*#__PURE__*/React.createElement(QuestionCircleIcon, {
47
46
  label: '',
48
- color: isDisabled ? "var(--ds-icon-disabled, ".concat(N0, ")") : "var(--ds-icon-inverse, ".concat(N0, ")")
47
+ color: isDisabled ? "var(--ds-icon-disabled, #080F214A)" : "var(--ds-icon-inverse, #FFFFFF)"
49
48
  })),
50
49
  onClick: onClick
51
50
  }));
@@ -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 var 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: "var(--ds-background-neutral-bold, ".concat(N70, ")"),
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: "var(--ds-background-neutral-bold-hovered, ".concat(N500, ")")
11
+ background: "var(--ds-background-neutral-bold-hovered, #3B3D42)"
13
12
  },
14
13
  '&:focus': {
15
- background: "var(--ds-background-neutral-bold, ".concat(N70, ")")
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: "var(--ds-background-neutral-bold-pressed, ".concat(N600, ")")
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: "var(--ds-background-disabled, ".concat(N50, ")")
22
+ background: "var(--ds-background-disabled, #17171708)"
24
23
  }
25
24
  }
26
25
  });
@@ -4,7 +4,6 @@ import { di } from 'react-magnetic-di';
4
4
  import { HelperMessage } from '@atlaskit/form';
5
5
  import StatusInformationIcon from '@atlaskit/icon/core/status-information';
6
6
  import { Box } from '@atlaskit/primitives/compiled';
7
- import * as colors from '@atlaskit/theme/colors';
8
7
  import { useEditorViewHasInfos } from '../../../../hooks/use-editor-view-has-infos';
9
8
  import { useExternalMessages } from '../../../../state';
10
9
  import { FormatMessages, MessageContainer } from '../format';
@@ -29,7 +28,7 @@ export var InfoMessages = function InfoMessages() {
29
28
  paddingInlineEnd: "space.050"
30
29
  }, /*#__PURE__*/React.createElement(StatusInformationIcon, {
31
30
  label: "",
32
- color: "var(--ds-icon-information, ".concat(colors.B500, ")"),
31
+ color: "var(--ds-icon-information, #357DE8)",
33
32
  size: "small"
34
33
  })), infoMessage)) : null;
35
34
  };
@@ -7,7 +7,6 @@ import StatusWarningIcon from '@atlaskit/icon/core/status-warning';
7
7
  import Link from '@atlaskit/link';
8
8
  import { fg } from '@atlaskit/platform-feature-flags';
9
9
  import { Box } from '@atlaskit/primitives/compiled';
10
- import * as colors from '@atlaskit/theme/colors';
11
10
  import { useEditorViewHasWarnings } from '../../../../hooks/use-editor-view-has-warnings';
12
11
  import { useExternalMessages, useHydratedDeprecations, useIntl } from '../../../../state';
13
12
  import { FormatMessages, MessageContainer } from '../format';
@@ -120,7 +119,7 @@ export var WarningMessages = function WarningMessages() {
120
119
  paddingInlineEnd: "space.050"
121
120
  }, /*#__PURE__*/React.createElement(StatusWarningIcon, {
122
121
  label: "",
123
- color: "var(--ds-icon-warning, ".concat(colors.Y400, ")"),
122
+ color: "var(--ds-icon-warning, #E06C00)",
124
123
  size: "small"
125
124
  })), warningMessage)) : null;
126
125
  };
@@ -5,7 +5,6 @@ import { css, keyframes } from '@emotion/react';
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
6
  import styled from '@emotion/styled';
7
7
  import { fg } from '@atlaskit/platform-feature-flags';
8
- import { B200, B300, G500, N0, N10, N100, N30, N700, N800, N900, P400, R400 } from '@atlaskit/theme/colors';
9
8
  import { layers } from '@atlaskit/theme/constants';
10
9
  import { TOOLTIP_CLASSNAME, TOOLTIP_ENTER_CLASSNAME, TOOLTIP_EXIT_CLASSNAME } from '../../plugins/validation-tooltip/constants';
11
10
  var fadeIn = keyframes({
@@ -27,7 +26,7 @@ var fadeOut = keyframes({
27
26
  });
28
27
 
29
28
  // eslint-disable-next-line @atlaskit/design-system/no-styled-tagged-template-expression, @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
30
- export var EditorMain = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t/* CSS reset */\n\tfont-family: ", ";\n\tfont-size: 14px;\n\tflex-grow: 1;\n\n\t/* These styles and animations are derived from @atlaskit/tooltip */\n\n\t.", " {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\tborder-radius: ", ";\n\t\tbox-sizing: border-box;\n\t\tfont: ", ";\n\t\tline-height: 1.3;\n\t\tmax-width: 240px;\n\t\tpadding: ", " ", ";\n\t\tword-wrap: break-word;\n\t\toverflow-wrap: break-word;\n\t\tz-index: ", ";\n\t\tpointer-events: none;\n\t\tposition: absolute;\n\t\tvisibility: hidden;\n\n\t\t/* Horizontally center and vertically position above the target element */\n\t\ttransform: translate(-50%, calc(-100% - ", "));\n\n\t\t&.", " {\n\t\t\tanimation: ", " 350ms cubic-bezier(0.15, 1, 0.3, 1);\n\t\t\tvisibility: visible;\n\t\t}\n\n\t\t&.", " {\n\t\t\tanimation: ", " 350ms cubic-bezier(0.15, 1, 0.3, 1);\n\t\t}\n\t}\n"])), "var(--ds-font-family-body, \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)", TOOLTIP_CLASSNAME, "var(--ds-background-neutral-bold, ".concat(N800, ")"), "var(--ds-text-inverse, ".concat(N0, ")"), "var(--ds-radius-small, 3px)", "var(--ds-font-body-small, normal 400 12px/16px \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)", "var(--ds-space-025, 2px)", "var(--ds-space-075, 6px)", layers.tooltip(), "var(--ds-space-200, 16px)", TOOLTIP_ENTER_CLASSNAME, fadeIn, TOOLTIP_EXIT_CLASSNAME, fadeOut);
29
+ export var EditorMain = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t/* CSS reset */\n\tfont-family: ", ";\n\tfont-size: 14px;\n\tflex-grow: 1;\n\n\t/* These styles and animations are derived from @atlaskit/tooltip */\n\n\t.", " {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\tborder-radius: ", ";\n\t\tbox-sizing: border-box;\n\t\tfont: ", ";\n\t\tline-height: 1.3;\n\t\tmax-width: 240px;\n\t\tpadding: ", " ", ";\n\t\tword-wrap: break-word;\n\t\toverflow-wrap: break-word;\n\t\tz-index: ", ";\n\t\tpointer-events: none;\n\t\tposition: absolute;\n\t\tvisibility: hidden;\n\n\t\t/* Horizontally center and vertically position above the target element */\n\t\ttransform: translate(-50%, calc(-100% - ", "));\n\n\t\t&.", " {\n\t\t\tanimation: ", " 350ms cubic-bezier(0.15, 1, 0.3, 1);\n\t\t\tvisibility: visible;\n\t\t}\n\n\t\t&.", " {\n\t\t\tanimation: ", " 350ms cubic-bezier(0.15, 1, 0.3, 1);\n\t\t}\n\t}\n"])), "var(--ds-font-family-body, \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)", TOOLTIP_CLASSNAME, "var(--ds-background-neutral-bold, #292A2E)", "var(--ds-text-inverse, #FFFFFF)", "var(--ds-radius-small, 3px)", "var(--ds-font-body-small, normal 400 12px/16px \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)", "var(--ds-space-025, 2px)", "var(--ds-space-075, 6px)", layers.tooltip(), "var(--ds-space-200, 16px)", TOOLTIP_ENTER_CLASSNAME, fadeIn, TOOLTIP_EXIT_CLASSNAME, fadeOut);
31
30
 
32
31
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
33
32
  export var EditorFooter = styled.div({
@@ -45,14 +44,14 @@ var getEditorInputVerticalPadding = function getEditorInputVerticalPadding(isCom
45
44
  var editorInputHorizontalPadding = 6;
46
45
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
47
46
  export var EditorViewContainer = styled.div({
48
- backgroundColor: "var(--ds-background-input, ".concat(N10, ")"),
47
+ backgroundColor: "var(--ds-background-input, #FFFFFF)",
49
48
  borderStyle: 'solid',
50
49
  borderWidth: "var(--ds-border-width, 1px)",
51
- borderColor: "var(--ds-border-input, ".concat(N100, ")"),
50
+ borderColor: "var(--ds-border-input, #8C8F97)",
52
51
  borderRadius: "var(--ds-radius-medium, 3px)",
53
52
  padding: "var(--ds-border-width, 1px)",
54
53
  boxSizing: 'border-box',
55
- color: "var(--ds-text, ".concat(N900, ")"),
54
+ color: "var(--ds-text, #292A2E)",
56
55
  display: 'flex',
57
56
  overflow: 'auto',
58
57
  transition: 'background-color 0.2s ease-in-out, border-color 0.2s ease-in-out'
@@ -62,8 +61,8 @@ function (props) {
62
61
  return props.editorViewIsInvalid &&
63
62
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
64
63
  css({
65
- borderColor: "var(--ds-border-danger, ".concat(R400, ")"),
66
- boxShadow: "inset 0 0 0 ".concat("var(--ds-border-width, 1px)", " ", "var(--ds-border-danger, ".concat(R400, ")"))
64
+ borderColor: "var(--ds-border-danger, #E2483D)",
65
+ boxShadow: "inset 0 0 0 ".concat("var(--ds-border-width, 1px)", " ", "var(--ds-border-danger, #E2483D)")
67
66
  });
68
67
  },
69
68
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
@@ -71,28 +70,28 @@ function (props) {
71
70
  return props.editorViewHasFocus ?
72
71
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
73
72
  css({
74
- backgroundColor: "var(--ds-surface, ".concat(N0, ")"),
75
- borderColor: "var(--ds-border-focused, ".concat(B200, ")"),
76
- boxShadow: "inset 0 0 0 ".concat("var(--ds-border-width, 1px)", " ", "var(--ds-border-focused, ".concat(B200, ")"))
73
+ backgroundColor: "var(--ds-surface, #FFFFFF)",
74
+ borderColor: "var(--ds-border-focused, #4688EC)",
75
+ boxShadow: "inset 0 0 0 ".concat("var(--ds-border-width, 1px)", " ", "var(--ds-border-focused, #4688EC)")
77
76
  }) :
78
77
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
79
78
  css({
80
79
  '&:hover': {
81
- backgroundColor: "var(--ds-background-input-hovered, ".concat(N30, ")")
80
+ backgroundColor: "var(--ds-background-input-hovered, #F8F8F8)"
82
81
  }
83
82
  });
84
83
  });
85
84
 
86
85
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
87
86
  export var ReadOnlyEditorViewContainer = styled(EditorViewContainer)({
88
- backgroundColor: "var(--ds-background-disabled, ".concat(N30, ")"),
89
- color: "var(--ds-text-disabled, ".concat(N100, ")"),
87
+ backgroundColor: "var(--ds-background-disabled, #17171708)",
88
+ color: "var(--ds-text-disabled, #080F214A)",
90
89
  pointerEvents: 'none'
91
90
  });
92
91
 
93
92
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
94
93
  export var LineNumberToolbar = styled.div({
95
- backgroundColor: "var(--ds-background-neutral, ".concat(N30, ")"),
94
+ backgroundColor: "var(--ds-background-neutral, #0515240F)",
96
95
  flexShrink: 0,
97
96
  width: '30px',
98
97
  position: 'sticky',
@@ -121,9 +120,9 @@ export var EditorView = styled.div(_templateObject2 || (_templateObject2 = _tagg
121
120
  return rowHeight * props.expandedRows + getEditorInputVerticalPadding(props.isCompact) * 2;
122
121
  }, function (props) {
123
122
  return rowHeight * props.expandedRows + getEditorInputVerticalPadding(props.isCompact) * 2;
124
- }, "var(--ds-text, ".concat(N700, ")"), function (props) {
123
+ }, "var(--ds-text, #292A2E)", function (props) {
125
124
  return getEditorInputVerticalPadding(props.isCompact);
126
- }, editorInputHorizontalPadding, "var(--ds-text-accent-purple, ".concat(P400, ")"), "var(--ds-text-accent-blue, ".concat(B300, ")"), "var(--ds-text-accent-green, ".concat(G500, ")"), "var(--ds-text-danger, ".concat(R400, ")"), "var(--ds-text-subtlest, ".concat(N100, ")"), rowHeight / 10, "var(--ds-space-100, 8px)", "var(--ds-space-025, 2px)", "var(--ds-space-100, 8px)", function (props) {
125
+ }, editorInputHorizontalPadding, "var(--ds-text-accent-purple, #803FA5)", "var(--ds-text-accent-blue, #1558BC)", "var(--ds-text-accent-green, #216E4E)", "var(--ds-text-danger, #AE2E24)", "var(--ds-text-subtlest, #6B6E76)", rowHeight / 10, "var(--ds-space-100, 8px)", "var(--ds-space-025, 2px)", "var(--ds-space-100, 8px)", function (props) {
127
126
  return !props.lineNumbersVisible && // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
128
127
  css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t\t\t\t\tdisplay: none;\n\t\t\t\t"])));
129
128
  });
@@ -1,4 +1,10 @@
1
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;
2
8
  /**
3
9
  * Given an AST with parse errors, this visitor returns a valid query that is equivalent for hydration purposes
4
10
  * (i.e. just fields, operators and values). Resulting query is generated on a best-effort basis and depends on
@@ -1,4 +1,10 @@
1
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;
2
8
  /**
3
9
  * Given an AST with parse errors, this visitor returns a valid query that is equivalent for hydration purposes
4
10
  * (i.e. just fields, operators and values). Resulting query is generated on a best-effort basis and depends on
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/jql-editor",
3
- "version": "5.13.5",
3
+ "version": "5.14.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",
@@ -34,15 +34,15 @@
34
34
  "dependencies": {
35
35
  "@atlaskit/afm-i18n-platform-jql-jql-editor": "2.10.0",
36
36
  "@atlaskit/analytics-gas-types": "^5.1.0",
37
- "@atlaskit/analytics-next": "^11.1.0",
38
- "@atlaskit/avatar": "^25.10.0",
37
+ "@atlaskit/analytics-next": "^11.2.0",
38
+ "@atlaskit/avatar": "^25.11.0",
39
39
  "@atlaskit/button": "^23.10.0",
40
40
  "@atlaskit/css": "^0.19.0",
41
41
  "@atlaskit/editor-prosemirror": "^7.3.0",
42
42
  "@atlaskit/emoji": "^69.10.0",
43
- "@atlaskit/form": "^15.4.0",
44
- "@atlaskit/icon": "^33.0.0",
45
- "@atlaskit/icon-lab": "^6.0.0",
43
+ "@atlaskit/form": "^15.5.0",
44
+ "@atlaskit/icon": "^33.1.0",
45
+ "@atlaskit/icon-lab": "^6.2.0",
46
46
  "@atlaskit/jql-ast": "^3.4.0",
47
47
  "@atlaskit/jql-autocomplete": "^2.0.0",
48
48
  "@atlaskit/jql-editor-common": "^3.1.0",
@@ -50,12 +50,12 @@
50
50
  "@atlaskit/link": "^3.3.0",
51
51
  "@atlaskit/platform-feature-flags": "^1.1.0",
52
52
  "@atlaskit/popper": "^7.1.0",
53
- "@atlaskit/primitives": "^18.0.0",
53
+ "@atlaskit/primitives": "^18.1.0",
54
54
  "@atlaskit/prosemirror-history": "^0.2.0",
55
55
  "@atlaskit/spinner": "^19.0.0",
56
56
  "@atlaskit/teams-avatar": "^2.4.0",
57
57
  "@atlaskit/theme": "^22.0.0",
58
- "@atlaskit/tokens": "^11.1.0",
58
+ "@atlaskit/tokens": "^11.4.0",
59
59
  "@atlaskit/tooltip": "^21.0.0",
60
60
  "@atlaskit/townsquare-emoji-provider": "^1.0.0",
61
61
  "@babel/runtime": "^7.0.0",
@@ -144,9 +144,6 @@
144
144
  "jql_editor_autocomplete_use_popper": {
145
145
  "type": "boolean"
146
146
  },
147
- "jira_update_jql_teams": {
148
- "type": "boolean"
149
- },
150
147
  "jira-membersof-team-support": {
151
148
  "type": "boolean"
152
149
  },