@atlaskit/jql-editor 4.13.2 → 4.13.4

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,19 @@
1
1
  # @atlaskit/jql-editor
2
2
 
3
+ ## 4.13.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 4.13.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [#100720](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/100720)
14
+ [`a2e1a2e89f721`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a2e1a2e89f721) -
15
+ Fix useExternalMessages memoization
16
+
3
17
  ## 4.13.2
4
18
 
5
19
  ### 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.2", _jqlEditorCommon.ANALYTICS_CHANNEL);
9
+ return (0, _jqlEditorCommon.useJqlPackageAnalytics)(analyticsSource, "@atlaskit/jql-editor", "4.13.4", _jqlEditorCommon.ANALYTICS_CHANNEL);
10
10
  };
@@ -19,6 +19,7 @@ var OptionListItem = exports.OptionListItem = _styled.default.li({
19
19
  cursor: 'pointer',
20
20
  padding: "var(--ds-space-075, 6px)".concat(" ", "var(--ds-space-100, 8px)"),
21
21
  fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
22
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
22
23
  lineHeight: '24px'
23
24
  },
24
25
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
@@ -75,6 +75,7 @@ function (_ref) {
75
75
  var NameContainer = exports.NameContainer = _styled.default.span({
76
76
  marginLeft: "var(--ds-space-075, 6px)",
77
77
  marginRight: "var(--ds-space-100, 8px)",
78
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
78
79
  lineHeight: "var(--ds-space-250, 20px)"
79
80
  });
80
81
 
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.useStoreActions = exports.useScopedId = exports.useRichInlineNodesEnabled = exports.useOnSyntaxHelp = exports.useLineNumbersVisible = exports.useJqlError = exports.useIsSearching = exports.useIntl = exports.useIdPrefix = exports.useHydratedValue = exports.useHydratedUser = exports.useHydratedDeprecations = exports.useExternalMessages = exports.useEditorViewHasFocus = exports.useEditorView = exports.useEditorStateHasJqlError = exports.useEditorState = exports.useCustomErrorComponent = exports.useAutocompleteProvider = exports.useAutocompletePosition = exports.useAutocompleteOptions = exports.useAutocompleteLoading = exports.useAutocompleteIsOpen = exports.useAutocomplete = exports.initialState = exports.actions = exports.EditorStateContainer = void 0;
7
+ exports.useStoreActions = exports.useScopedId = exports.useRichInlineNodesEnabled = exports.useOnSyntaxHelp = exports.useLineNumbersVisible = exports.useJqlError = exports.useIsSearching = exports.useIntl = exports.useIdPrefix = exports.useHydratedValue = exports.useHydratedUser = exports.useHydratedDeprecations = exports.useExternalMessagesOld = exports.useExternalMessagesNew = exports.useExternalMessages = exports.useEditorViewHasFocus = exports.useEditorView = exports.useEditorStateHasJqlError = exports.useEditorState = exports.useCustomErrorComponent = exports.useAutocompleteProvider = exports.useAutocompletePosition = exports.useAutocompleteOptions = exports.useAutocompleteLoading = exports.useAutocompleteIsOpen = exports.useAutocomplete = exports.initialState = exports.actions = exports.EditorStateContainer = void 0;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
9
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
@@ -18,6 +18,7 @@ var _uuid = require("uuid");
18
18
  var _view = require("@atlaskit/editor-prosemirror/view");
19
19
  var _jqlAst = require("@atlaskit/jql-ast");
20
20
  var _jqlAutocomplete = require("@atlaskit/jql-autocomplete");
21
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
21
22
  var _analytics = require("../analytics");
22
23
  var _selectErrorCommand = require("../commands/select-error-command");
23
24
  var _constants = require("../common/constants");
@@ -773,7 +774,19 @@ var useEditorStateHasJqlError = exports.useEditorStateHasJqlError = (0, _reactSw
773
774
  return (0, _jqlAst2.getJastFromState)(state.editorState).errors.length > 0;
774
775
  }
775
776
  });
776
- var useExternalMessages = exports.useExternalMessages = (0, _reactSweetState.createHook)(Store, {
777
+ var memoizedExternalMessagesSelector = (0, _reactSweetState.createSelector)(function (state) {
778
+ return state.externalMessages;
779
+ }, function (externalMessages) {
780
+ var byType = (0, _groupBy.default)(externalMessages, 'type');
781
+ return {
782
+ errors: byType.error || [],
783
+ warnings: byType.warning || [],
784
+ infos: byType.info || []
785
+ };
786
+ });
787
+
788
+ // remove when cleanup fix_errormessage_viewed_jqlresult_analytics fg
789
+ var useExternalMessagesOld = exports.useExternalMessagesOld = (0, _reactSweetState.createHook)(Store, {
777
790
  selector: function selector(state) {
778
791
  var byType = (0, _groupBy.default)(state.externalMessages, 'type');
779
792
  return {
@@ -783,6 +796,18 @@ var useExternalMessages = exports.useExternalMessages = (0, _reactSweetState.cre
783
796
  };
784
797
  }
785
798
  });
799
+ var useExternalMessagesNew = exports.useExternalMessagesNew = (0, _reactSweetState.createHook)(Store, {
800
+ selector: memoizedExternalMessagesSelector
801
+ });
802
+
803
+ // replace with useExternalMessagesNew when cleanup fix_errormessage_viewed_jqlresult_analytics fg
804
+ var useExternalMessages = exports.useExternalMessages = function useExternalMessages() {
805
+ return (0, _platformFeatureFlags.fg)('fix_errormessage_viewed_jqlresult_analytics') ?
806
+ // eslint-disable-next-line react-hooks/rules-of-hooks
807
+ useExternalMessagesNew() :
808
+ // eslint-disable-next-line react-hooks/rules-of-hooks
809
+ useExternalMessagesOld();
810
+ };
786
811
  var useCustomErrorComponent = exports.useCustomErrorComponent = (0, _reactSweetState.createHook)(Store, {
787
812
  selector: function selector(state) {
788
813
  var _state$customComponen;
@@ -148,6 +148,7 @@ var EditorControls = exports.EditorControls = _styled.default.div(function (prop
148
148
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
149
149
  props.isSearch ? getEditorInputVerticalPadding(props.isCompact) - 1 // the search button needs the same vertical & horizontal spacing
150
150
  : editorInputHorizontalPadding - 3, "px"),
151
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
151
152
  lineHeight: 'normal',
152
153
  position: 'sticky',
153
154
  top: 0,
@@ -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.2", ANALYTICS_CHANNEL);
3
+ return useJqlPackageAnalytics(analyticsSource, "@atlaskit/jql-editor", "4.13.4", ANALYTICS_CHANNEL);
4
4
  };
@@ -11,6 +11,7 @@ export const OptionListItem = styled.li({
11
11
  cursor: 'pointer',
12
12
  padding: `${"var(--ds-space-075, 6px)"} ${"var(--ds-space-100, 8px)"}`,
13
13
  fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
14
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
14
15
  lineHeight: '24px'
15
16
  },
16
17
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
@@ -67,6 +67,7 @@ export const UserContainer = styled.span({
67
67
  export const NameContainer = styled.span({
68
68
  marginLeft: "var(--ds-space-075, 6px)",
69
69
  marginRight: "var(--ds-space-100, 8px)",
70
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
70
71
  lineHeight: "var(--ds-space-250, 20px)"
71
72
  });
72
73
 
@@ -8,6 +8,7 @@ import { v4 as uuidv4 } from 'uuid';
8
8
  import { EditorView } from '@atlaskit/editor-prosemirror/view';
9
9
  import { computeJqlInsights, isListOperator } from '@atlaskit/jql-ast';
10
10
  import { JQLAutocomplete } from '@atlaskit/jql-autocomplete';
11
+ import { fg } from '@atlaskit/platform-feature-flags';
11
12
  import { ActionSubject, ActionSubjectId, Action as AnalyticsAction, EventType } from '../analytics';
12
13
  import { selectErrorCommand } from '../commands/select-error-command';
13
14
  import { JQL_EDITOR_MAIN_ID } from '../common/constants';
@@ -762,7 +763,17 @@ export const useJqlError = createHook(Store, {
762
763
  export const useEditorStateHasJqlError = createHook(Store, {
763
764
  selector: state => getJastFromState(state.editorState).errors.length > 0
764
765
  });
765
- export const useExternalMessages = createHook(Store, {
766
+ const memoizedExternalMessagesSelector = createSelector(state => state.externalMessages, externalMessages => {
767
+ const byType = groupBy(externalMessages, 'type');
768
+ return {
769
+ errors: byType.error || [],
770
+ warnings: byType.warning || [],
771
+ infos: byType.info || []
772
+ };
773
+ });
774
+
775
+ // remove when cleanup fix_errormessage_viewed_jqlresult_analytics fg
776
+ export const useExternalMessagesOld = createHook(Store, {
766
777
  selector: state => {
767
778
  const byType = groupBy(state.externalMessages, 'type');
768
779
  return {
@@ -772,6 +783,16 @@ export const useExternalMessages = createHook(Store, {
772
783
  };
773
784
  }
774
785
  });
786
+ export const useExternalMessagesNew = createHook(Store, {
787
+ selector: memoizedExternalMessagesSelector
788
+ });
789
+
790
+ // replace with useExternalMessagesNew when cleanup fix_errormessage_viewed_jqlresult_analytics fg
791
+ export const useExternalMessages = () => fg('fix_errormessage_viewed_jqlresult_analytics') ?
792
+ // eslint-disable-next-line react-hooks/rules-of-hooks
793
+ useExternalMessagesNew() :
794
+ // eslint-disable-next-line react-hooks/rules-of-hooks
795
+ useExternalMessagesOld();
775
796
  export const useCustomErrorComponent = createHook(Store, {
776
797
  selector: state => {
777
798
  var _state$customComponen;
@@ -246,6 +246,7 @@ export const EditorControls = styled.div(props => ({
246
246
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
247
247
  props.isSearch ? getEditorInputVerticalPadding(props.isCompact) - 1 // the search button needs the same vertical & horizontal spacing
248
248
  : editorInputHorizontalPadding - 3}px`,
249
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
249
250
  lineHeight: 'normal',
250
251
  position: 'sticky',
251
252
  top: 0,
@@ -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.2", ANALYTICS_CHANNEL);
3
+ return useJqlPackageAnalytics(analyticsSource, "@atlaskit/jql-editor", "4.13.4", ANALYTICS_CHANNEL);
4
4
  };
@@ -11,6 +11,7 @@ export var OptionListItem = styled.li({
11
11
  cursor: 'pointer',
12
12
  padding: "var(--ds-space-075, 6px)".concat(" ", "var(--ds-space-100, 8px)"),
13
13
  fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
14
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
14
15
  lineHeight: '24px'
15
16
  },
16
17
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
@@ -66,6 +66,7 @@ function (_ref) {
66
66
  export var NameContainer = styled.span({
67
67
  marginLeft: "var(--ds-space-075, 6px)",
68
68
  marginRight: "var(--ds-space-100, 8px)",
69
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
69
70
  lineHeight: "var(--ds-space-250, 20px)"
70
71
  });
71
72
 
@@ -13,6 +13,7 @@ import { v4 as uuidv4 } from 'uuid';
13
13
  import { EditorView } from '@atlaskit/editor-prosemirror/view';
14
14
  import { computeJqlInsights, isListOperator } from '@atlaskit/jql-ast';
15
15
  import { JQLAutocomplete } from '@atlaskit/jql-autocomplete';
16
+ import { fg } from '@atlaskit/platform-feature-flags';
16
17
  import { ActionSubject, ActionSubjectId, Action as AnalyticsAction, EventType } from '../analytics';
17
18
  import { selectErrorCommand } from '../commands/select-error-command';
18
19
  import { JQL_EDITOR_MAIN_ID } from '../common/constants';
@@ -766,7 +767,19 @@ export var useEditorStateHasJqlError = createHook(Store, {
766
767
  return getJastFromState(state.editorState).errors.length > 0;
767
768
  }
768
769
  });
769
- export var useExternalMessages = createHook(Store, {
770
+ var memoizedExternalMessagesSelector = createSelector(function (state) {
771
+ return state.externalMessages;
772
+ }, function (externalMessages) {
773
+ var byType = groupBy(externalMessages, 'type');
774
+ return {
775
+ errors: byType.error || [],
776
+ warnings: byType.warning || [],
777
+ infos: byType.info || []
778
+ };
779
+ });
780
+
781
+ // remove when cleanup fix_errormessage_viewed_jqlresult_analytics fg
782
+ export var useExternalMessagesOld = createHook(Store, {
770
783
  selector: function selector(state) {
771
784
  var byType = groupBy(state.externalMessages, 'type');
772
785
  return {
@@ -776,6 +789,18 @@ export var useExternalMessages = createHook(Store, {
776
789
  };
777
790
  }
778
791
  });
792
+ export var useExternalMessagesNew = createHook(Store, {
793
+ selector: memoizedExternalMessagesSelector
794
+ });
795
+
796
+ // replace with useExternalMessagesNew when cleanup fix_errormessage_viewed_jqlresult_analytics fg
797
+ export var useExternalMessages = function useExternalMessages() {
798
+ return fg('fix_errormessage_viewed_jqlresult_analytics') ?
799
+ // eslint-disable-next-line react-hooks/rules-of-hooks
800
+ useExternalMessagesNew() :
801
+ // eslint-disable-next-line react-hooks/rules-of-hooks
802
+ useExternalMessagesOld();
803
+ };
779
804
  export var useCustomErrorComponent = createHook(Store, {
780
805
  selector: function selector(state) {
781
806
  var _state$customComponen;
@@ -144,6 +144,7 @@ export var EditorControls = styled.div(function (props) {
144
144
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
145
145
  props.isSearch ? getEditorInputVerticalPadding(props.isCompact) - 1 // the search button needs the same vertical & horizontal spacing
146
146
  : editorInputHorizontalPadding - 3, "px"),
147
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
147
148
  lineHeight: 'normal',
148
149
  position: 'sticky',
149
150
  top: 0,
@@ -467,7 +467,7 @@ export declare const useEditorStateHasJqlError: import("react-sweet-state").Hook
467
467
  externalErrorMessageViewed: () => Action<State, Props>;
468
468
  createAndFireAnalyticsEvent: (payload: JqlEditorAnalyticsEvent) => Action<State, Props>;
469
469
  }>, void>;
470
- export declare const useExternalMessages: import("react-sweet-state").HookFunction<ExternalMessagesNormalized, import("react-sweet-state").BoundActions<State, {
470
+ export declare const useExternalMessagesOld: import("react-sweet-state").HookFunction<ExternalMessagesNormalized, import("react-sweet-state").BoundActions<State, {
471
471
  onEditorViewBlur: () => Action<State>;
472
472
  onEditorViewFocus: (event: FocusEvent<HTMLElement>) => Action<State, Props>;
473
473
  openAutocompleteOnNextUpdate: () => Action<State>;
@@ -499,6 +499,70 @@ export declare const useExternalMessages: import("react-sweet-state").HookFuncti
499
499
  externalErrorMessageViewed: () => Action<State, Props>;
500
500
  createAndFireAnalyticsEvent: (payload: JqlEditorAnalyticsEvent) => Action<State, Props>;
501
501
  }>, void>;
502
+ export declare const useExternalMessagesNew: import("react-sweet-state").HookFunction<ExternalMessagesNormalized, import("react-sweet-state").BoundActions<State, {
503
+ onEditorViewBlur: () => Action<State>;
504
+ onEditorViewFocus: (event: FocusEvent<HTMLElement>) => Action<State, Props>;
505
+ openAutocompleteOnNextUpdate: () => Action<State>;
506
+ closeAutocomplete: () => Action<State>;
507
+ setSelectedAutocompleteOptionId: (selectedOptionId: string | undefined) => Action<State>;
508
+ getAutocompleteSuggestions: (editorState: EditorState) => Action<State>;
509
+ getAutocompleteOptions: (suggestions: ContextAwareJQLSuggestions) => Action<State>;
510
+ appendOptionsForObservable: (key: OptionsKey, observable: Observable<AutocompleteOptions>, rule: JQLRuleSuggestion, type: AutocompleteOptionType) => Action<State, void, Observable<AutocompleteOptions>>;
511
+ cancelSubscription: () => Action<State>;
512
+ setLoading: (loading: boolean) => Action<State>;
513
+ setAutocompleteOptions: (options: AutocompleteOptionGroup) => Action<State>;
514
+ setAutocompleteContainer: (container: HTMLElement | null) => Action<State>;
515
+ callAutocompleteProviders: ({ rules, tokens }: ContextAwareJQLSuggestions) => Action<State>;
516
+ updateValidationState: () => Action<State>;
517
+ initialiseEditorState: () => Action<State, Props>;
518
+ configurePlugins: (portalActions: PortalActions | void) => Action<State, Props>;
519
+ onApplyEditorTransaction: (transaction: Transaction) => Action<State, Props>;
520
+ resetEditorState: (query: string, addToHistory?: boolean) => Action<State>;
521
+ initialiseEditorView: (editorViewNode: HTMLElement, attributes: {
522
+ [key: string]: string;
523
+ }, portalActions: PortalActions) => Action<State, Props>;
524
+ updateEditorView: (attributes: {
525
+ [key: string]: string;
526
+ }) => Action<State, Props>;
527
+ setEditorViewContainer: (editorViewContainer: HTMLElement) => Action<State>;
528
+ setEditorViewContainerScroll: (scroll: number) => Action<State>;
529
+ onSearch: () => Action<State>;
530
+ onSearchCommand: (pmState: EditorState, pmDispatch: ((tr: Transaction) => void) | undefined, pmView: EditorView | undefined, keyboardShortcut: boolean) => Action<State, Props, boolean>;
531
+ externalErrorMessageViewed: () => Action<State, Props>;
532
+ createAndFireAnalyticsEvent: (payload: JqlEditorAnalyticsEvent) => Action<State, Props>;
533
+ }>, void>;
534
+ export declare const useExternalMessages: () => import("react-sweet-state").HookReturnValue<ExternalMessagesNormalized, import("react-sweet-state").BoundActions<State, {
535
+ onEditorViewBlur: () => Action<State>;
536
+ onEditorViewFocus: (event: FocusEvent<HTMLElement>) => Action<State, Props>;
537
+ openAutocompleteOnNextUpdate: () => Action<State>;
538
+ closeAutocomplete: () => Action<State>;
539
+ setSelectedAutocompleteOptionId: (selectedOptionId: string | undefined) => Action<State>;
540
+ getAutocompleteSuggestions: (editorState: EditorState) => Action<State>;
541
+ getAutocompleteOptions: (suggestions: ContextAwareJQLSuggestions) => Action<State>;
542
+ appendOptionsForObservable: (key: OptionsKey, observable: Observable<AutocompleteOptions>, rule: JQLRuleSuggestion, type: AutocompleteOptionType) => Action<State, void, Observable<AutocompleteOptions>>;
543
+ cancelSubscription: () => Action<State>;
544
+ setLoading: (loading: boolean) => Action<State>;
545
+ setAutocompleteOptions: (options: AutocompleteOptionGroup) => Action<State>;
546
+ setAutocompleteContainer: (container: HTMLElement | null) => Action<State>;
547
+ callAutocompleteProviders: ({ rules, tokens }: ContextAwareJQLSuggestions) => Action<State>;
548
+ updateValidationState: () => Action<State>;
549
+ initialiseEditorState: () => Action<State, Props>;
550
+ configurePlugins: (portalActions: PortalActions | void) => Action<State, Props>;
551
+ onApplyEditorTransaction: (transaction: Transaction) => Action<State, Props>;
552
+ resetEditorState: (query: string, addToHistory?: boolean) => Action<State>;
553
+ initialiseEditorView: (editorViewNode: HTMLElement, attributes: {
554
+ [key: string]: string;
555
+ }, portalActions: PortalActions) => Action<State, Props>;
556
+ updateEditorView: (attributes: {
557
+ [key: string]: string;
558
+ }) => Action<State, Props>;
559
+ setEditorViewContainer: (editorViewContainer: HTMLElement) => Action<State>;
560
+ setEditorViewContainerScroll: (scroll: number) => Action<State>;
561
+ onSearch: () => Action<State>;
562
+ onSearchCommand: (pmState: EditorState, pmDispatch: ((tr: Transaction) => void) | undefined, pmView: EditorView | undefined, keyboardShortcut: boolean) => Action<State, Props, boolean>;
563
+ externalErrorMessageViewed: () => Action<State, Props>;
564
+ createAndFireAnalyticsEvent: (payload: JqlEditorAnalyticsEvent) => Action<State, Props>;
565
+ }>>;
502
566
  export declare const useCustomErrorComponent: import("react-sweet-state").HookFunction<CustomErrorComponent | undefined, import("react-sweet-state").BoundActions<State, {
503
567
  onEditorViewBlur: () => Action<State>;
504
568
  onEditorViewFocus: (event: FocusEvent<HTMLElement>) => Action<State, Props>;
@@ -467,7 +467,7 @@ export declare const useEditorStateHasJqlError: import("react-sweet-state").Hook
467
467
  externalErrorMessageViewed: () => Action<State, Props>;
468
468
  createAndFireAnalyticsEvent: (payload: JqlEditorAnalyticsEvent) => Action<State, Props>;
469
469
  }>, void>;
470
- export declare const useExternalMessages: import("react-sweet-state").HookFunction<ExternalMessagesNormalized, import("react-sweet-state").BoundActions<State, {
470
+ export declare const useExternalMessagesOld: import("react-sweet-state").HookFunction<ExternalMessagesNormalized, import("react-sweet-state").BoundActions<State, {
471
471
  onEditorViewBlur: () => Action<State>;
472
472
  onEditorViewFocus: (event: FocusEvent<HTMLElement>) => Action<State, Props>;
473
473
  openAutocompleteOnNextUpdate: () => Action<State>;
@@ -499,6 +499,70 @@ export declare const useExternalMessages: import("react-sweet-state").HookFuncti
499
499
  externalErrorMessageViewed: () => Action<State, Props>;
500
500
  createAndFireAnalyticsEvent: (payload: JqlEditorAnalyticsEvent) => Action<State, Props>;
501
501
  }>, void>;
502
+ export declare const useExternalMessagesNew: import("react-sweet-state").HookFunction<ExternalMessagesNormalized, import("react-sweet-state").BoundActions<State, {
503
+ onEditorViewBlur: () => Action<State>;
504
+ onEditorViewFocus: (event: FocusEvent<HTMLElement>) => Action<State, Props>;
505
+ openAutocompleteOnNextUpdate: () => Action<State>;
506
+ closeAutocomplete: () => Action<State>;
507
+ setSelectedAutocompleteOptionId: (selectedOptionId: string | undefined) => Action<State>;
508
+ getAutocompleteSuggestions: (editorState: EditorState) => Action<State>;
509
+ getAutocompleteOptions: (suggestions: ContextAwareJQLSuggestions) => Action<State>;
510
+ appendOptionsForObservable: (key: OptionsKey, observable: Observable<AutocompleteOptions>, rule: JQLRuleSuggestion, type: AutocompleteOptionType) => Action<State, void, Observable<AutocompleteOptions>>;
511
+ cancelSubscription: () => Action<State>;
512
+ setLoading: (loading: boolean) => Action<State>;
513
+ setAutocompleteOptions: (options: AutocompleteOptionGroup) => Action<State>;
514
+ setAutocompleteContainer: (container: HTMLElement | null) => Action<State>;
515
+ callAutocompleteProviders: ({ rules, tokens }: ContextAwareJQLSuggestions) => Action<State>;
516
+ updateValidationState: () => Action<State>;
517
+ initialiseEditorState: () => Action<State, Props>;
518
+ configurePlugins: (portalActions: PortalActions | void) => Action<State, Props>;
519
+ onApplyEditorTransaction: (transaction: Transaction) => Action<State, Props>;
520
+ resetEditorState: (query: string, addToHistory?: boolean) => Action<State>;
521
+ initialiseEditorView: (editorViewNode: HTMLElement, attributes: {
522
+ [key: string]: string;
523
+ }, portalActions: PortalActions) => Action<State, Props>;
524
+ updateEditorView: (attributes: {
525
+ [key: string]: string;
526
+ }) => Action<State, Props>;
527
+ setEditorViewContainer: (editorViewContainer: HTMLElement) => Action<State>;
528
+ setEditorViewContainerScroll: (scroll: number) => Action<State>;
529
+ onSearch: () => Action<State>;
530
+ onSearchCommand: (pmState: EditorState, pmDispatch: ((tr: Transaction) => void) | undefined, pmView: EditorView | undefined, keyboardShortcut: boolean) => Action<State, Props, boolean>;
531
+ externalErrorMessageViewed: () => Action<State, Props>;
532
+ createAndFireAnalyticsEvent: (payload: JqlEditorAnalyticsEvent) => Action<State, Props>;
533
+ }>, void>;
534
+ export declare const useExternalMessages: () => import("react-sweet-state").HookReturnValue<ExternalMessagesNormalized, import("react-sweet-state").BoundActions<State, {
535
+ onEditorViewBlur: () => Action<State>;
536
+ onEditorViewFocus: (event: FocusEvent<HTMLElement>) => Action<State, Props>;
537
+ openAutocompleteOnNextUpdate: () => Action<State>;
538
+ closeAutocomplete: () => Action<State>;
539
+ setSelectedAutocompleteOptionId: (selectedOptionId: string | undefined) => Action<State>;
540
+ getAutocompleteSuggestions: (editorState: EditorState) => Action<State>;
541
+ getAutocompleteOptions: (suggestions: ContextAwareJQLSuggestions) => Action<State>;
542
+ appendOptionsForObservable: (key: OptionsKey, observable: Observable<AutocompleteOptions>, rule: JQLRuleSuggestion, type: AutocompleteOptionType) => Action<State, void, Observable<AutocompleteOptions>>;
543
+ cancelSubscription: () => Action<State>;
544
+ setLoading: (loading: boolean) => Action<State>;
545
+ setAutocompleteOptions: (options: AutocompleteOptionGroup) => Action<State>;
546
+ setAutocompleteContainer: (container: HTMLElement | null) => Action<State>;
547
+ callAutocompleteProviders: ({ rules, tokens }: ContextAwareJQLSuggestions) => Action<State>;
548
+ updateValidationState: () => Action<State>;
549
+ initialiseEditorState: () => Action<State, Props>;
550
+ configurePlugins: (portalActions: PortalActions | void) => Action<State, Props>;
551
+ onApplyEditorTransaction: (transaction: Transaction) => Action<State, Props>;
552
+ resetEditorState: (query: string, addToHistory?: boolean) => Action<State>;
553
+ initialiseEditorView: (editorViewNode: HTMLElement, attributes: {
554
+ [key: string]: string;
555
+ }, portalActions: PortalActions) => Action<State, Props>;
556
+ updateEditorView: (attributes: {
557
+ [key: string]: string;
558
+ }) => Action<State, Props>;
559
+ setEditorViewContainer: (editorViewContainer: HTMLElement) => Action<State>;
560
+ setEditorViewContainerScroll: (scroll: number) => Action<State>;
561
+ onSearch: () => Action<State>;
562
+ onSearchCommand: (pmState: EditorState, pmDispatch: ((tr: Transaction) => void) | undefined, pmView: EditorView | undefined, keyboardShortcut: boolean) => Action<State, Props, boolean>;
563
+ externalErrorMessageViewed: () => Action<State, Props>;
564
+ createAndFireAnalyticsEvent: (payload: JqlEditorAnalyticsEvent) => Action<State, Props>;
565
+ }>>;
502
566
  export declare const useCustomErrorComponent: import("react-sweet-state").HookFunction<CustomErrorComponent | undefined, import("react-sweet-state").BoundActions<State, {
503
567
  onEditorViewBlur: () => Action<State>;
504
568
  onEditorViewFocus: (event: FocusEvent<HTMLElement>) => Action<State, Props>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/jql-editor",
3
- "version": "4.13.2",
3
+ "version": "4.13.4",
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,7 +41,7 @@
41
41
  "@atlaskit/button": "^20.3.0",
42
42
  "@atlaskit/editor-prosemirror": "6.2.1",
43
43
  "@atlaskit/form": "^11.0.0",
44
- "@atlaskit/icon": "^23.1.0",
44
+ "@atlaskit/icon": "^23.3.0",
45
45
  "@atlaskit/jql-ast": "^3.3.0",
46
46
  "@atlaskit/jql-autocomplete": "^2.0.0",
47
47
  "@atlaskit/jql-editor-common": "^2.1.0",
@@ -51,7 +51,7 @@
51
51
  "@atlaskit/primitives": "^13.3.0",
52
52
  "@atlaskit/spinner": "^16.3.0",
53
53
  "@atlaskit/theme": "^14.0.0",
54
- "@atlaskit/tokens": "^2.5.0",
54
+ "@atlaskit/tokens": "^3.0.0",
55
55
  "@atlaskit/tooltip": "^19.0.0",
56
56
  "@babel/runtime": "^7.0.0",
57
57
  "@emotion/react": "^11.7.1",
@@ -131,6 +131,9 @@
131
131
  },
132
132
  "add_nin_press_interactions": {
133
133
  "type": "boolean"
134
+ },
135
+ "fix_errormessage_viewed_jqlresult_analytics": {
136
+ "type": "boolean"
134
137
  }
135
138
  }
136
139
  }