@atlaskit/jql-editor 5.12.7 → 5.13.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 (50) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/analytics/util.js +1 -1
  3. package/dist/cjs/plugins/autocomplete/view.js +16 -1
  4. package/dist/cjs/plugins/rich-inline-nodes/nodes/base/index.compiled.css +3 -1
  5. package/dist/cjs/plugins/rich-inline-nodes/nodes/base/index.js +2 -2
  6. package/dist/cjs/plugins/rich-inline-nodes/nodes/index.js +3 -1
  7. package/dist/cjs/plugins/rich-inline-nodes/nodes/project/index.js +9 -65
  8. package/dist/cjs/plugins/rich-inline-nodes/nodes/project/{index.compiled.css → project-node.compiled.css} +2 -2
  9. package/dist/cjs/plugins/rich-inline-nodes/nodes/project/project-node.js +78 -0
  10. package/dist/cjs/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +8 -1
  11. package/dist/cjs/state/index.js +40 -31
  12. package/dist/es2019/analytics/util.js +1 -1
  13. package/dist/es2019/plugins/autocomplete/view.js +16 -1
  14. package/dist/es2019/plugins/rich-inline-nodes/nodes/base/index.compiled.css +3 -1
  15. package/dist/es2019/plugins/rich-inline-nodes/nodes/base/index.js +2 -2
  16. package/dist/es2019/plugins/rich-inline-nodes/nodes/index.js +3 -1
  17. package/dist/es2019/plugins/rich-inline-nodes/nodes/project/index.js +8 -56
  18. package/dist/es2019/plugins/rich-inline-nodes/nodes/project/{index.compiled.css → project-node.compiled.css} +2 -2
  19. package/dist/es2019/plugins/rich-inline-nodes/nodes/project/project-node.js +63 -0
  20. package/dist/es2019/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +9 -1
  21. package/dist/es2019/state/index.js +12 -2
  22. package/dist/esm/analytics/util.js +1 -1
  23. package/dist/esm/plugins/autocomplete/view.js +16 -1
  24. package/dist/esm/plugins/rich-inline-nodes/nodes/base/index.compiled.css +3 -1
  25. package/dist/esm/plugins/rich-inline-nodes/nodes/base/index.js +2 -2
  26. package/dist/esm/plugins/rich-inline-nodes/nodes/index.js +3 -1
  27. package/dist/esm/plugins/rich-inline-nodes/nodes/project/index.js +8 -59
  28. package/dist/esm/plugins/rich-inline-nodes/nodes/project/{index.compiled.css → project-node.compiled.css} +2 -2
  29. package/dist/esm/plugins/rich-inline-nodes/nodes/project/project-node.js +67 -0
  30. package/dist/esm/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +8 -1
  31. package/dist/esm/state/index.js +39 -30
  32. package/dist/types/index.d.ts +1 -1
  33. package/dist/types/plugins/rich-inline-nodes/nodes/index.d.ts +1 -0
  34. package/dist/types/plugins/rich-inline-nodes/nodes/project/index.d.ts +3 -10
  35. package/dist/types/plugins/rich-inline-nodes/nodes/project/project-node.d.ts +10 -0
  36. package/dist/types/plugins/rich-inline-nodes/nodes/project/types.d.ts +6 -4
  37. package/dist/types/state/index.d.ts +36 -1
  38. package/dist/types/types.d.ts +1 -1
  39. package/dist/types/ui/jql-editor/types.d.ts +9 -2
  40. package/dist/types/ui/types.d.ts +1 -1
  41. package/dist/types-ts4.5/index.d.ts +1 -1
  42. package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/index.d.ts +1 -0
  43. package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/project/index.d.ts +3 -10
  44. package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/project/project-node.d.ts +10 -0
  45. package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/project/types.d.ts +6 -4
  46. package/dist/types-ts4.5/state/index.d.ts +36 -1
  47. package/dist/types-ts4.5/types.d.ts +1 -1
  48. package/dist/types-ts4.5/ui/jql-editor/types.d.ts +9 -2
  49. package/dist/types-ts4.5/ui/types.d.ts +1 -1
  50. package/package.json +8 -5
@@ -10,7 +10,7 @@ import { type JqlEditorAnalyticsEvent } from '../analytics';
10
10
  import { type AutocompleteOptionGroup, type AutocompleteOptions, type AutocompleteOptionType, type SelectableAutocompleteOption } from '../plugins/autocomplete/components/types';
11
11
  import { type AutocompleteProvider } from '../plugins/types';
12
12
  import { type PortalActions } from '../ui/jql-editor-portal-provider/types';
13
- import { type HydratedDeprecatedField, type HydratedTeam, type HydratedUser, type HydratedValue } from '../ui/jql-editor/types';
13
+ import { type HydratedDeprecatedField, type HydratedProject, type HydratedTeam, type HydratedUser, type HydratedValue } from '../ui/jql-editor/types';
14
14
  import { type AutocompletePosition, type AutocompleteState, type ContextAwareJQLSuggestions, type CustomErrorComponent, type ExternalMessagesNormalized, type OptionsKey, type Props, type State } from './types';
15
15
  export declare const initialState: State;
16
16
  export declare const actions: {
@@ -764,6 +764,41 @@ export declare const useHydratedTeam: import("react-sweet-state").HookFunction<H
764
764
  fieldName: string;
765
765
  id: string;
766
766
  }>;
767
+ export declare const useHydratedProject: import("react-sweet-state").HookFunction<HydratedProject | undefined, import("react-sweet-state").BoundActions<State, {
768
+ onEditorViewBlur: () => Action<State>;
769
+ onEditorViewFocus: (event: FocusEvent<HTMLElement>) => Action<State, Props>;
770
+ openAutocompleteOnNextUpdate: () => Action<State>;
771
+ closeAutocomplete: () => Action<State>;
772
+ setSelectedAutocompleteOptionId: (selectedOptionId: string | undefined) => Action<State>;
773
+ getAutocompleteSuggestions: (editorState: EditorState) => Action<State>;
774
+ getAutocompleteOptions: (suggestions: ContextAwareJQLSuggestions) => Action<State>;
775
+ appendOptionsForObservable: (key: OptionsKey, observable: Observable<AutocompleteOptions>, rule: JQLRuleSuggestion, type: AutocompleteOptionType) => Action<State, void, Observable<AutocompleteOptions>>;
776
+ cancelSubscription: () => Action<State>;
777
+ setLoading: (loading: boolean) => Action<State>;
778
+ setAutocompleteOptions: (options: AutocompleteOptionGroup) => Action<State>;
779
+ setAutocompleteContainer: (container: HTMLElement | null) => Action<State>;
780
+ callAutocompleteProviders: ({ rules, tokens }: ContextAwareJQLSuggestions) => Action<State>;
781
+ updateValidationState: () => Action<State>;
782
+ initialiseEditorState: () => Action<State, Props>;
783
+ configurePlugins: (portalActions: PortalActions | void) => Action<State, Props>;
784
+ onApplyEditorTransaction: (transaction: Transaction) => Action<State, Props>;
785
+ resetEditorState: (query: string, addToHistory?: boolean) => Action<State>;
786
+ initialiseEditorView: (editorViewNode: HTMLElement, attributes: {
787
+ [key: string]: string;
788
+ }, portalActions: PortalActions) => Action<State, Props>;
789
+ updateEditorView: (attributes: {
790
+ [key: string]: string;
791
+ }) => Action<State, Props>;
792
+ setEditorViewContainer: (editorViewContainer: HTMLElement) => Action<State>;
793
+ setEditorViewContainerScroll: (scroll: number) => Action<State>;
794
+ onSearch: () => Action<State>;
795
+ onSearchCommand: (pmState: EditorState, pmDispatch: ((tr: Transaction) => void) | undefined, pmView: EditorView | undefined, keyboardShortcut: boolean) => Action<State, Props, boolean>;
796
+ externalErrorMessageViewed: () => Action<State, Props>;
797
+ createAndFireAnalyticsEvent: (payload: JqlEditorAnalyticsEvent) => Action<State, Props>;
798
+ }>, {
799
+ fieldName: string;
800
+ id: string;
801
+ }>;
767
802
  export declare const useHydratedDeprecations: import("react-sweet-state").HookFunction<HydratedDeprecatedField[], import("react-sweet-state").BoundActions<State, {
768
803
  onEditorViewBlur: () => Action<State>;
769
804
  onEditorViewFocus: (event: FocusEvent<HTMLElement>) => Action<State, Props>;
@@ -1,5 +1,5 @@
1
1
  export type { JQLClause } from '@atlaskit/jql-autocomplete';
2
- export type { JQLEditorUIProps, JQLEditorProps, HydratedValues, HydratedValue, HydratedUser, HydratedTeam, } from './ui/types';
2
+ export type { JQLEditorUIProps, JQLEditorProps, HydratedValues, HydratedValue, HydratedUser, HydratedTeam, HydratedProject, } from './ui/types';
3
3
  export type { ExternalMessage, ExternalError, ExternalWarning, ExternalInfo, CustomComponents, } from './state/types';
4
4
  export type { AutocompleteProvider, AutocompleteOptions, AutocompleteOption, AutocompleteValueType, } from './plugins/types';
5
5
  export type { ListenerProps, JqlAnalyticsEvent } from './analytics';
@@ -3,11 +3,11 @@ import { type Jast } from '@atlaskit/jql-ast';
3
3
  import { type AutocompleteProvider } from '../../plugins/autocomplete/types';
4
4
  import { type CustomComponents, type ExternalMessage } from '../../state/types';
5
5
  export type HydratedUser = {
6
+ appType?: string | null;
6
7
  avatarUrl: string;
7
8
  id: string;
8
9
  name: string;
9
10
  type: 'user';
10
- appType?: string | null;
11
11
  };
12
12
  export type HydratedTeam = {
13
13
  avatarUrl: string;
@@ -15,6 +15,13 @@ export type HydratedTeam = {
15
15
  name: string;
16
16
  type: 'team';
17
17
  };
18
+ export type HydratedProject = {
19
+ iconName?: string;
20
+ id: string;
21
+ name: string;
22
+ privateProject?: boolean;
23
+ type: 'project';
24
+ };
18
25
  export type HydratedDeprecatedField = {
19
26
  deprecatedSearcherKey: string;
20
27
  /**
@@ -23,7 +30,7 @@ export type HydratedDeprecatedField = {
23
30
  id: string;
24
31
  type: 'deprecated-field';
25
32
  };
26
- export type HydratedValue = HydratedUser | HydratedTeam | HydratedDeprecatedField;
33
+ export type HydratedValue = HydratedUser | HydratedTeam | HydratedProject | HydratedDeprecatedField;
27
34
  export type HydratedValues = {
28
35
  [fieldName: string]: HydratedValue[];
29
36
  };
@@ -1,5 +1,5 @@
1
1
  import { type JQLEditorUIProps } from './jql-editor/types';
2
- export type { JQLEditorUIProps, HydratedValue, HydratedValues, HydratedUser, HydratedTeam, } from './jql-editor/types';
2
+ export type { JQLEditorUIProps, HydratedValue, HydratedValues, HydratedUser, HydratedTeam, HydratedProject, } from './jql-editor/types';
3
3
  export type JQLEditorProps = JQLEditorUIProps & {
4
4
  /**
5
5
  * React-intl locale. This should be set to "en" if alternate message sets are not being loaded higher in the React
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/jql-editor",
3
- "version": "5.12.7",
3
+ "version": "5.13.0",
4
4
  "description": "This package allows consumers to render an advanced JQL editor component to enable autocomplete-assisted authoring and validation of JQL queries.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -41,11 +41,11 @@
41
41
  "@atlaskit/editor-prosemirror": "^7.3.0",
42
42
  "@atlaskit/emoji": "^69.10.0",
43
43
  "@atlaskit/form": "^15.3.0",
44
- "@atlaskit/icon": "^30.0.0",
45
- "@atlaskit/icon-lab": "^5.15.0",
44
+ "@atlaskit/icon": "^31.0.0",
45
+ "@atlaskit/icon-lab": "^5.16.0",
46
46
  "@atlaskit/jql-ast": "^3.4.0",
47
47
  "@atlaskit/jql-autocomplete": "^2.0.0",
48
- "@atlaskit/jql-editor-common": "^3.0.0",
48
+ "@atlaskit/jql-editor-common": "^3.1.0",
49
49
  "@atlaskit/jql-parser": "^2.0.0",
50
50
  "@atlaskit/link": "^3.3.0",
51
51
  "@atlaskit/platform-feature-flags": "^1.1.0",
@@ -81,7 +81,7 @@
81
81
  "@af/integration-testing": "workspace:^",
82
82
  "@af/visual-regression": "workspace:^",
83
83
  "@atlaskit/docs": "^11.3.0",
84
- "@atlaskit/jql-editor-autocomplete-rest": "^3.0.0",
84
+ "@atlaskit/jql-editor-autocomplete-rest": "^3.1.0",
85
85
  "@atlassian/feature-flags-storybook-utils": "^0.3.0",
86
86
  "@atlassian/feature-flags-test-utils": "^1.0.0",
87
87
  "@storybook/addon-actions": "^8.6.14",
@@ -156,6 +156,9 @@
156
156
  },
157
157
  "jira_ai_agent_avatar_with_apptype_for_jql": {
158
158
  "type": "boolean"
159
+ },
160
+ "projects_in_jira_eap_drop2": {
161
+ "type": "boolean"
159
162
  }
160
163
  }
161
164
  }