@atlaskit/jql-editor 4.13.6 → 4.14.1

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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/jql-editor
2
2
 
3
+ ## 4.14.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 4.14.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#109060](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109060)
14
+ [`4660ec858a305`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4660ec858a305) -
15
+ Update `React` from v16 to v18
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 4.13.6
4
22
 
5
23
  ### Patch Changes
@@ -6,5 +6,5 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useJqlEditorAnalytics = void 0;
7
7
  var _jqlEditorCommon = require("@atlaskit/jql-editor-common");
8
8
  var useJqlEditorAnalytics = exports.useJqlEditorAnalytics = function useJqlEditorAnalytics(analyticsSource) {
9
- return (0, _jqlEditorCommon.useJqlPackageAnalytics)(analyticsSource, "@atlaskit/jql-editor", "4.13.6", _jqlEditorCommon.ANALYTICS_CHANNEL);
9
+ return (0, _jqlEditorCommon.useJqlPackageAnalytics)(analyticsSource, "@atlaskit/jql-editor", "4.14.1", _jqlEditorCommon.ANALYTICS_CHANNEL);
10
10
  };
@@ -24,7 +24,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
24
24
  * @param parentNodePos Current document and text position within the parent when entering the current node.
25
25
  * @param textPosition Text position to find in the Prosemirror document.
26
26
  */
27
- var enterNode = function enterNode(node, parentNodePos, textPosition) {
27
+ var _enterNode = function enterNode(node, parentNodePos, textPosition) {
28
28
  var nodePos = _objectSpread({}, parentNodePos);
29
29
  var isDocNode = node.type === _schema.JQLEditorSchema.nodes.doc;
30
30
 
@@ -66,7 +66,7 @@ var enterNode = function enterNode(node, parentNodePos, textPosition) {
66
66
  }
67
67
  }
68
68
  for (var i = 0; i < node.childCount; i++) {
69
- nodePos = enterNode(node.child(i), nodePos, textPosition);
69
+ nodePos = _enterNode(node.child(i), nodePos, textPosition);
70
70
 
71
71
  // If we have a matching node after iterating this nodes children then return the current node position.
72
72
  if (nodePos.text === textPosition) {
@@ -93,7 +93,7 @@ var getDocumentPosition = function getDocumentPosition(doc, textPosition) {
93
93
  text: 0,
94
94
  enteredInitialBlock: false
95
95
  };
96
- var matchingNodePos = enterNode(doc, currentPos, textPosition);
96
+ var matchingNodePos = _enterNode(doc, currentPos, textPosition);
97
97
  return matchingNodePos.doc;
98
98
  };
99
99
  var _default = exports.default = getDocumentPosition;
@@ -33,22 +33,24 @@ var richInlineNodesPlugin = function richInlineNodesPlugin(portalActions) {
33
33
  key: RichInlineNodesPluginKey,
34
34
  props: {
35
35
  decorations: function decorations(state) {
36
+ var _decorations;
36
37
  var decorations = [];
37
38
 
38
39
  // Apply selected decoration to node views when they are part of a text selection
39
40
  var _state$selection = state.selection,
40
41
  from = _state$selection.from,
41
42
  to = _state$selection.to;
42
- decorations.push.apply(decorations, (0, _toConsumableArray2.default)(decorateNodesInRange(state, _constants.SELECTED_NODE, from, to)));
43
+ (_decorations = decorations).push.apply(_decorations, (0, _toConsumableArray2.default)(decorateNodesInRange(state, _constants.SELECTED_NODE, from, to)));
43
44
 
44
45
  // Apply error decoration to node views when they are part of AST error range
45
46
  var ast = (0, _jqlAst2.getJastFromState)(state);
46
47
  var _ast$errors = (0, _slicedToArray2.default)(ast.errors, 1),
47
48
  error = _ast$errors[0];
48
49
  if (error instanceof _jqlAst.JQLSyntaxError) {
50
+ var _decorations2;
49
51
  var documentFrom = (0, _getDocumentPosition.default)(state.doc, error.start);
50
52
  var documentTo = (0, _getDocumentPosition.default)(state.doc, error.stop);
51
- decorations.push.apply(decorations, (0, _toConsumableArray2.default)(decorateNodesInRange(state, _constants.ERROR_NODE, documentFrom, documentTo)));
53
+ (_decorations2 = decorations).push.apply(_decorations2, (0, _toConsumableArray2.default)(decorateNodesInRange(state, _constants.ERROR_NODE, documentFrom, documentTo)));
52
54
  }
53
55
  return _view2.DecorationSet.create(state.doc, decorations);
54
56
  },
@@ -1,4 +1,4 @@
1
1
  import { ANALYTICS_CHANNEL, useJqlPackageAnalytics } from '@atlaskit/jql-editor-common';
2
2
  export const useJqlEditorAnalytics = analyticsSource => {
3
- return useJqlPackageAnalytics(analyticsSource, "@atlaskit/jql-editor", "4.13.6", ANALYTICS_CHANNEL);
3
+ return useJqlPackageAnalytics(analyticsSource, "@atlaskit/jql-editor", "4.14.1", ANALYTICS_CHANNEL);
4
4
  };
@@ -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", "4.13.6", ANALYTICS_CHANNEL);
3
+ return useJqlPackageAnalytics(analyticsSource, "@atlaskit/jql-editor", "4.14.1", ANALYTICS_CHANNEL);
4
4
  };
@@ -18,7 +18,7 @@ import { JQLEditorSchema } from '../../../schema';
18
18
  * @param parentNodePos Current document and text position within the parent when entering the current node.
19
19
  * @param textPosition Text position to find in the Prosemirror document.
20
20
  */
21
- var enterNode = function enterNode(node, parentNodePos, textPosition) {
21
+ var _enterNode = function enterNode(node, parentNodePos, textPosition) {
22
22
  var nodePos = _objectSpread({}, parentNodePos);
23
23
  var isDocNode = node.type === JQLEditorSchema.nodes.doc;
24
24
 
@@ -60,7 +60,7 @@ var enterNode = function enterNode(node, parentNodePos, textPosition) {
60
60
  }
61
61
  }
62
62
  for (var i = 0; i < node.childCount; i++) {
63
- nodePos = enterNode(node.child(i), nodePos, textPosition);
63
+ nodePos = _enterNode(node.child(i), nodePos, textPosition);
64
64
 
65
65
  // If we have a matching node after iterating this nodes children then return the current node position.
66
66
  if (nodePos.text === textPosition) {
@@ -87,7 +87,7 @@ var getDocumentPosition = function getDocumentPosition(doc, textPosition) {
87
87
  text: 0,
88
88
  enteredInitialBlock: false
89
89
  };
90
- var matchingNodePos = enterNode(doc, currentPos, textPosition);
90
+ var matchingNodePos = _enterNode(doc, currentPos, textPosition);
91
91
  return matchingNodePos.doc;
92
92
  };
93
93
  export default getDocumentPosition;
@@ -26,22 +26,24 @@ var richInlineNodesPlugin = function richInlineNodesPlugin(portalActions) {
26
26
  key: RichInlineNodesPluginKey,
27
27
  props: {
28
28
  decorations: function decorations(state) {
29
+ var _decorations;
29
30
  var decorations = [];
30
31
 
31
32
  // Apply selected decoration to node views when they are part of a text selection
32
33
  var _state$selection = state.selection,
33
34
  from = _state$selection.from,
34
35
  to = _state$selection.to;
35
- decorations.push.apply(decorations, _toConsumableArray(decorateNodesInRange(state, SELECTED_NODE, from, to)));
36
+ (_decorations = decorations).push.apply(_decorations, _toConsumableArray(decorateNodesInRange(state, SELECTED_NODE, from, to)));
36
37
 
37
38
  // Apply error decoration to node views when they are part of AST error range
38
39
  var ast = getJastFromState(state);
39
40
  var _ast$errors = _slicedToArray(ast.errors, 1),
40
41
  error = _ast$errors[0];
41
42
  if (error instanceof JQLSyntaxError) {
43
+ var _decorations2;
42
44
  var documentFrom = getDocumentPosition(state.doc, error.start);
43
45
  var documentTo = getDocumentPosition(state.doc, error.stop);
44
- decorations.push.apply(decorations, _toConsumableArray(decorateNodesInRange(state, ERROR_NODE, documentFrom, documentTo)));
46
+ (_decorations2 = decorations).push.apply(_decorations2, _toConsumableArray(decorateNodesInRange(state, ERROR_NODE, documentFrom, documentTo)));
45
47
  }
46
48
  return DecorationSet.create(state.doc, decorations);
47
49
  },
@@ -889,4 +889,4 @@ export declare const useOnSyntaxHelp: import("react-sweet-state").HookFunction<v
889
889
  externalErrorMessageViewed: () => Action<State, Props>;
890
890
  createAndFireAnalyticsEvent: (payload: JqlEditorAnalyticsEvent) => Action<State, Props>;
891
891
  }>, void>;
892
- export declare const EditorStateContainer: import("react-sweet-state").ContainerComponent<Props>;
892
+ export declare const EditorStateContainer: import("react-sweet-state").OverrideContainerComponent<Props>;
@@ -19,8 +19,6 @@ export declare const ReadOnlyEditorViewContainer: import("@emotion/styled").Styl
19
19
  theme?: import("@emotion/react").Theme | undefined;
20
20
  as?: import("react").ElementType<any> | undefined;
21
21
  } & EditorViewContainerProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
22
- children?: import("react").ReactNode;
23
- } & {
24
22
  theme?: import("@emotion/react").Theme | undefined;
25
23
  }, {}, {}>;
26
24
  export declare const LineNumberToolbar: import("@emotion/styled").StyledComponent<{
@@ -50,8 +48,6 @@ export declare const ReadOnlyEditorView: import("@emotion/styled").StyledCompone
50
48
  lineNumbersVisible: boolean;
51
49
  isCompact: boolean;
52
50
  } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
53
- children?: import("react").ReactNode;
54
- } & {
55
51
  theme?: import("@emotion/react").Theme | undefined;
56
52
  }, {}, {}>;
57
53
  export declare const EditorControls: import("@emotion/styled").StyledComponent<{
@@ -889,4 +889,4 @@ export declare const useOnSyntaxHelp: import("react-sweet-state").HookFunction<v
889
889
  externalErrorMessageViewed: () => Action<State, Props>;
890
890
  createAndFireAnalyticsEvent: (payload: JqlEditorAnalyticsEvent) => Action<State, Props>;
891
891
  }>, void>;
892
- export declare const EditorStateContainer: import("react-sweet-state").ContainerComponent<Props>;
892
+ export declare const EditorStateContainer: import("react-sweet-state").OverrideContainerComponent<Props>;
@@ -19,8 +19,6 @@ export declare const ReadOnlyEditorViewContainer: import("@emotion/styled").Styl
19
19
  theme?: import("@emotion/react").Theme | undefined;
20
20
  as?: import("react").ElementType<any> | undefined;
21
21
  } & EditorViewContainerProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
22
- children?: import("react").ReactNode;
23
- } & {
24
22
  theme?: import("@emotion/react").Theme | undefined;
25
23
  }, {}, {}>;
26
24
  export declare const LineNumberToolbar: import("@emotion/styled").StyledComponent<{
@@ -50,8 +48,6 @@ export declare const ReadOnlyEditorView: import("@emotion/styled").StyledCompone
50
48
  lineNumbersVisible: boolean;
51
49
  isCompact: boolean;
52
50
  } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
53
- children?: import("react").ReactNode;
54
- } & {
55
51
  theme?: import("@emotion/react").Theme | undefined;
56
52
  }, {}, {}>;
57
53
  export declare const EditorControls: import("@emotion/styled").StyledComponent<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/jql-editor",
3
- "version": "4.13.6",
3
+ "version": "4.14.1",
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",
@@ -36,23 +36,23 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@atlaskit/analytics-gas-types": "^5.1.0",
39
- "@atlaskit/analytics-next": "^10.2.0",
40
- "@atlaskit/avatar": "^21.17.0",
41
- "@atlaskit/button": "^20.3.0",
39
+ "@atlaskit/analytics-next": "^10.3.0",
40
+ "@atlaskit/avatar": "^21.18.0",
41
+ "@atlaskit/button": "^20.4.0",
42
42
  "@atlaskit/editor-prosemirror": "6.2.1",
43
- "@atlaskit/form": "^11.0.0",
44
- "@atlaskit/icon": "^23.4.0",
43
+ "@atlaskit/form": "^11.1.0",
44
+ "@atlaskit/icon": "^23.6.0",
45
45
  "@atlaskit/jql-ast": "^3.3.0",
46
46
  "@atlaskit/jql-autocomplete": "^2.0.0",
47
- "@atlaskit/jql-editor-common": "^2.1.0",
47
+ "@atlaskit/jql-editor-common": "^2.2.0",
48
48
  "@atlaskit/jql-parser": "^2.0.0",
49
- "@atlaskit/legacy-custom-icons": "^0.20.0",
50
- "@atlaskit/platform-feature-flags": "^0.3.0",
51
- "@atlaskit/primitives": "^13.3.0",
52
- "@atlaskit/spinner": "^17.0.0",
53
- "@atlaskit/theme": "^14.0.0",
54
- "@atlaskit/tokens": "^3.2.0",
55
- "@atlaskit/tooltip": "^19.0.0",
49
+ "@atlaskit/legacy-custom-icons": "^0.21.0",
50
+ "@atlaskit/platform-feature-flags": "^1.0.0",
51
+ "@atlaskit/primitives": "^13.4.0",
52
+ "@atlaskit/spinner": "^17.1.0",
53
+ "@atlaskit/theme": "^14.1.0",
54
+ "@atlaskit/tokens": "^3.3.0",
55
+ "@atlaskit/tooltip": "^19.1.0",
56
56
  "@babel/runtime": "^7.0.0",
57
57
  "@emotion/react": "^11.7.1",
58
58
  "@emotion/styled": "^11.0.0",
@@ -75,13 +75,13 @@
75
75
  "devDependencies": {
76
76
  "@af/integration-testing": "*",
77
77
  "@atlaskit/docs": "*",
78
- "@atlaskit/jql-editor-autocomplete-rest": "^2.1.0",
78
+ "@atlaskit/jql-editor-autocomplete-rest": "^2.2.0",
79
79
  "@atlaskit/visual-regression": "*",
80
- "@atlassian/feature-flags-test-utils": "0.2.3",
80
+ "@atlassian/feature-flags-test-utils": "0.3.1",
81
81
  "@storybook/addon-actions": "^6.4.0",
82
82
  "@storybook/addon-knobs": "^6.4.0",
83
83
  "@testing-library/jest-dom": "^6.4.5",
84
- "@testing-library/react": "^12.1.5",
84
+ "@testing-library/react": "^13.4.0",
85
85
  "@testing-library/react-hooks": "^8.0.1",
86
86
  "typescript": "~5.4.2",
87
87
  "wait-for-expect": "^1.2.0"