@atlaskit/editor-common 115.16.0 → 116.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 116.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
8
+ Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
9
+
10
+ Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
11
+
12
+ Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
13
+
14
+ ```diff
15
+ - "typesVersions": {
16
+ - ">=4.5 <4.9": {
17
+ - "*": [
18
+ - "dist/types-ts4.5/*",
19
+ - "dist/types-ts4.5/index.d.ts"
20
+ - ]
21
+ - }
22
+ - },
23
+ ```
24
+
25
+ ### Minor Changes
26
+
27
+ - [`78adaba64ee33`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/78adaba64ee33) -
28
+ Add opt-in section title display controls for typeahead sections
29
+
30
+ ### Patch Changes
31
+
32
+ - [`94670f6d5975b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/94670f6d5975b) -
33
+ Instrument agent mention analytics and proactive nudge experiment attribution.
34
+ - Updated dependencies
35
+
36
+ ## 115.16.1
37
+
38
+ ### Patch Changes
39
+
40
+ - [`027beb2f61316`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/027beb2f61316) -
41
+ Update smart link appearance, if and only if smart link is created from confluence editor quick
42
+ insert menu
43
+ - Updated dependencies
44
+
3
45
  ## 115.16.0
4
46
 
5
47
  ### Minor Changes
@@ -27,7 +27,7 @@ var onSubmitInterface = function onSubmitInterface(onSubmit) {
27
27
  displayText = _ref.displayText,
28
28
  rawUrl = _ref.rawUrl,
29
29
  meta = _ref.meta;
30
- onSubmit(url, title !== null && title !== void 0 ? title : rawUrl, displayText || undefined, meta.inputMethod === 'manual' ? _analytics.INPUT_METHOD.MANUAL : _analytics.INPUT_METHOD.TYPEAHEAD, analytic);
30
+ onSubmit(url, title !== null && title !== void 0 ? title : rawUrl, displayText || undefined, meta.inputMethod === 'manual' ? _analytics.INPUT_METHOD.MANUAL : _analytics.INPUT_METHOD.TYPEAHEAD, analytic, meta.appearance);
31
31
  };
32
32
  };
33
33
  function HyperlinkAddToolbar(_ref2) {
@@ -28,7 +28,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
28
28
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
29
29
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
30
30
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
31
- var packageVersion = "115.15.4";
31
+ var packageVersion = "115.16.1";
32
32
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
33
33
  // Remove URL as it has UGC
34
34
  // Ignored via go/ees007
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "115.15.4";
27
+ var packageVersion = "115.16.1";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -16,7 +16,7 @@ const onSubmitInterface = onSubmit => ({
16
16
  rawUrl,
17
17
  meta
18
18
  }, analytic) => {
19
- onSubmit(url, title !== null && title !== void 0 ? title : rawUrl, displayText || undefined, meta.inputMethod === 'manual' ? INPUT_METHOD.MANUAL : INPUT_METHOD.TYPEAHEAD, analytic);
19
+ onSubmit(url, title !== null && title !== void 0 ? title : rawUrl, displayText || undefined, meta.inputMethod === 'manual' ? INPUT_METHOD.MANUAL : INPUT_METHOD.TYPEAHEAD, analytic, meta.appearance);
20
20
  };
21
21
  export function HyperlinkAddToolbar({
22
22
  linkPickerOptions: {
@@ -14,7 +14,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
14
14
  const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
15
15
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
16
16
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
17
- const packageVersion = "115.15.4";
17
+ const packageVersion = "115.16.1";
18
18
  const sanitiseSentryEvents = (data, _hint) => {
19
19
  // Remove URL as it has UGC
20
20
  // Ignored via go/ees007
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "115.15.4";
17
+ const packageVersion = "115.16.1";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -18,7 +18,7 @@ var onSubmitInterface = function onSubmitInterface(onSubmit) {
18
18
  displayText = _ref.displayText,
19
19
  rawUrl = _ref.rawUrl,
20
20
  meta = _ref.meta;
21
- onSubmit(url, title !== null && title !== void 0 ? title : rawUrl, displayText || undefined, meta.inputMethod === 'manual' ? INPUT_METHOD.MANUAL : INPUT_METHOD.TYPEAHEAD, analytic);
21
+ onSubmit(url, title !== null && title !== void 0 ? title : rawUrl, displayText || undefined, meta.inputMethod === 'manual' ? INPUT_METHOD.MANUAL : INPUT_METHOD.TYPEAHEAD, analytic, meta.appearance);
22
22
  };
23
23
  };
24
24
  export function HyperlinkAddToolbar(_ref2) {
@@ -20,7 +20,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
20
20
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
21
21
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
22
22
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
23
- var packageVersion = "115.15.4";
23
+ var packageVersion = "115.16.1";
24
24
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
25
25
  // Remove URL as it has UGC
26
26
  // Ignored via go/ees007
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "115.15.4";
24
+ var packageVersion = "115.16.1";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -14,11 +14,11 @@ type MentionTypeaheadInviteItemViewedPayload = UIAEP<ACTION.RENDERED, ACTION_SUB
14
14
  childObjectId?: string;
15
15
  componentName: string;
16
16
  containerId: string;
17
+ isInlineInviteMentionsEnabled?: boolean;
17
18
  objectId: string;
18
19
  sessionId: string;
19
20
  source: string;
20
21
  userRole?: string;
21
- isInlineInviteMentionsEnabled?: boolean;
22
22
  }, undefined>;
23
23
  type MentionTypeaheadInviteItemClickedPayload = UIAEP<ACTION.CLICKED | ACTION.PRESSED, ACTION_SUBJECT.INVITE_ITEM, undefined, {
24
24
  childObjectId?: string;
@@ -26,6 +26,7 @@ type MentionTypeaheadInviteItemClickedPayload = UIAEP<ACTION.CLICKED | ACTION.PR
26
26
  containerId: string;
27
27
  downKeyCount: number;
28
28
  duration: number;
29
+ isInlineInviteMentionsEnabled?: boolean;
29
30
  keyboardKey?: string;
30
31
  objectId: string;
31
32
  queryLength?: number;
@@ -33,7 +34,6 @@ type MentionTypeaheadInviteItemClickedPayload = UIAEP<ACTION.CLICKED | ACTION.PR
33
34
  spaceInQuery?: boolean;
34
35
  upKeyCount: number;
35
36
  userRole?: string;
36
- isInlineInviteMentionsEnabled?: boolean;
37
37
  }, undefined>;
38
38
  type MentionTypeaheadInsertedPayload = UIAEP<ACTION.CLICKED | ACTION.PRESSED, ACTION_SUBJECT.MENTION_TYPEAHEAD, undefined, {
39
39
  accessLevel: string;
@@ -42,6 +42,7 @@ type MentionTypeaheadInsertedPayload = UIAEP<ACTION.CLICKED | ACTION.PRESSED, AC
42
42
  downKeyCount: number;
43
43
  duration: number;
44
44
  includesYou?: boolean | null;
45
+ isAgent?: boolean;
45
46
  isSpecial: boolean;
46
47
  keyboardKey?: string;
47
48
  localId?: string;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
- import type { ProviderFactory } from '../../../provider-factory';
4
+ import type { CardAppearance, ProviderFactory } from '../../../provider-factory';
5
5
  import type { Command, EditorAppearance, LinkInputType, LinkPickerOptions } from '../../../types';
6
6
  import type { EditorLinkPickerProps } from '../EditorLinkPicker';
7
7
  export interface HyperlinkAddToolbarProps extends Pick<EditorLinkPickerProps, 'onCancel' | 'invokeMethod' | 'onClose'> {
@@ -14,7 +14,7 @@ export interface HyperlinkAddToolbarProps extends Pick<EditorLinkPickerProps, 'o
14
14
  lpLinkPicker: boolean;
15
15
  onClickAwayCallback?: Command;
16
16
  onEscapeCallback?: Command;
17
- onSubmit: (href: string, title: string | undefined, displayText: string | undefined, inputMethod: LinkInputType, analytic?: UIAnalyticsEvent | null | undefined) => void;
17
+ onSubmit: (href: string, title: string | undefined, displayText: string | undefined, inputMethod: LinkInputType, analytic?: UIAnalyticsEvent | null | undefined, appearance?: CardAppearance) => void;
18
18
  providerFactory: ProviderFactory;
19
19
  recentSearchListSize?: number;
20
20
  searchSessionId?: string;
@@ -49,15 +49,28 @@ export type TypeAheadSection = {
49
49
  filter: (item: TypeAheadItem) => boolean;
50
50
  id: string;
51
51
  limit?: number;
52
+ sectionTitleDisplay?: TypeAheadSectionTitleDisplay;
52
53
  title: string;
53
54
  };
55
+ export type TypeAheadSectionTitleDisplay = {
56
+ /**
57
+ * Keeps this section's title visible when it is the only section with matching items.
58
+ * Does not render the title for an empty section and does not override
59
+ * `showWhenQueryPresent: false`.
60
+ */
61
+ showWhenOnlySection?: boolean;
62
+ /**
63
+ * Controls whether this section's title stays visible once the typeahead query is non-empty.
64
+ * Defaults to true. Grouping, ordering, and section limits still apply when false.
65
+ */
66
+ showWhenQueryPresent?: boolean;
67
+ };
54
68
  export type TypeAheadSectionTitleUpdate = {
55
69
  id: string;
56
70
  /**
57
- * Keeps this section's title visible when it is the only section with matching items.
58
- * Does not render the title for an empty section.
71
+ * Updates display rules for this section title in the current typeahead session.
59
72
  */
60
- showTitleWhenOnlySection?: boolean;
73
+ sectionTitleDisplay?: TypeAheadSectionTitleDisplay;
61
74
  title: string;
62
75
  };
63
76
  export type TypeAheadForceSelect = (props: TypeAheadForceSelectProps) => TypeAheadItem | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "115.16.0",
3
+ "version": "116.0.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,14 +12,6 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.5 <4.9": {
17
- "*": [
18
- "dist/types-ts4.5/*",
19
- "dist/types-ts4.5/index.d.ts"
20
- ]
21
- }
22
- },
23
15
  "sideEffects": [
24
16
  "**/*.compiled.css"
25
17
  ],
@@ -36,61 +28,61 @@
36
28
  "singleton": true
37
29
  },
38
30
  "dependencies": {
39
- "@atlaskit/activity-provider": "^2.6.0",
40
- "@atlaskit/adf-schema": "^54.0.0",
41
- "@atlaskit/adf-utils": "^19.33.0",
31
+ "@atlaskit/activity-provider": "^3.0.0",
32
+ "@atlaskit/adf-schema": "^55.0.0",
33
+ "@atlaskit/adf-utils": "^20.0.0",
42
34
  "@atlaskit/afm-i18n-platform-editor-editor-common": "2.18.0",
43
- "@atlaskit/analytics-listeners": "^10.1.0",
44
- "@atlaskit/analytics-namespaced-context": "^7.3.0",
45
- "@atlaskit/analytics-next": "^11.3.0",
46
- "@atlaskit/atlassian-context": "^0.11.0",
47
- "@atlaskit/browser-apis": "^0.0.2",
48
- "@atlaskit/button": "^23.11.0",
49
- "@atlaskit/codemod-utils": "^4.3.0",
50
- "@atlaskit/css": "^0.19.0",
51
- "@atlaskit/custom-steps": "^0.17.0",
52
- "@atlaskit/dropdown-menu": "^16.10.0",
53
- "@atlaskit/editor-json-transformer": "^8.33.0",
54
- "@atlaskit/editor-palette": "^2.2.0",
55
- "@atlaskit/editor-prosemirror": "^7.3.0",
56
- "@atlaskit/editor-shared-styles": "^3.11.0",
57
- "@atlaskit/editor-tables": "^2.10.0",
58
- "@atlaskit/editor-toolbar": "^1.10.0",
59
- "@atlaskit/editor-toolbar-model": "^0.5.0",
60
- "@atlaskit/emoji": "^70.17.0",
61
- "@atlaskit/icon": "^35.4.0",
62
- "@atlaskit/link": "^3.4.0",
63
- "@atlaskit/link-datasource": "^5.6.0",
64
- "@atlaskit/link-picker": "^5.3.0",
65
- "@atlaskit/media-card": "^80.8.0",
66
- "@atlaskit/media-client": "^36.3.0",
67
- "@atlaskit/media-client-react": "^5.2.0",
68
- "@atlaskit/media-common": "^13.3.0",
69
- "@atlaskit/media-file-preview": "^0.18.0",
70
- "@atlaskit/media-picker": "^71.4.0",
71
- "@atlaskit/media-ui": "^29.3.0",
72
- "@atlaskit/media-viewer": "^53.2.0",
73
- "@atlaskit/mention": "^26.2.0",
74
- "@atlaskit/menu": "^8.5.0",
75
- "@atlaskit/object": "^1.0.0",
76
- "@atlaskit/onboarding": "^14.6.0",
77
- "@atlaskit/platform-feature-flags": "^1.1.0",
78
- "@atlaskit/platform-feature-flags-react": "^0.5.0",
79
- "@atlaskit/primitives": "^19.0.0",
80
- "@atlaskit/profilecard": "^25.9.0",
81
- "@atlaskit/prosemirror-history": "^0.2.0",
82
- "@atlaskit/react-ufo": "^6.7.0",
83
- "@atlaskit/section-message": "^8.13.0",
84
- "@atlaskit/smart-card": "^44.29.0",
85
- "@atlaskit/smart-user-picker": "^10.2.0",
86
- "@atlaskit/spinner": "^19.1.0",
87
- "@atlaskit/task-decision": "^20.2.0",
88
- "@atlaskit/teams-app-config": "^1.12.0",
89
- "@atlaskit/textfield": "^8.3.0",
90
- "@atlaskit/tmp-editor-statsig": "^103.0.0",
91
- "@atlaskit/tokens": "^13.4.0",
92
- "@atlaskit/tooltip": "^22.6.0",
93
- "@atlaskit/width-detector": "^5.1.0",
35
+ "@atlaskit/analytics-listeners": "^11.0.0",
36
+ "@atlaskit/analytics-namespaced-context": "^8.0.0",
37
+ "@atlaskit/analytics-next": "^12.0.0",
38
+ "@atlaskit/atlassian-context": "^1.0.0",
39
+ "@atlaskit/browser-apis": "^1.0.0",
40
+ "@atlaskit/button": "^24.0.0",
41
+ "@atlaskit/codemod-utils": "^5.0.0",
42
+ "@atlaskit/css": "^1.0.0",
43
+ "@atlaskit/custom-steps": "^1.0.0",
44
+ "@atlaskit/dropdown-menu": "^17.0.0",
45
+ "@atlaskit/editor-json-transformer": "^9.0.0",
46
+ "@atlaskit/editor-palette": "^3.0.0",
47
+ "@atlaskit/editor-prosemirror": "^8.0.0",
48
+ "@atlaskit/editor-shared-styles": "^4.0.0",
49
+ "@atlaskit/editor-tables": "^3.0.0",
50
+ "@atlaskit/editor-toolbar": "^2.0.0",
51
+ "@atlaskit/editor-toolbar-model": "^1.0.0",
52
+ "@atlaskit/emoji": "^71.0.0",
53
+ "@atlaskit/icon": "^36.0.0",
54
+ "@atlaskit/link": "^4.0.0",
55
+ "@atlaskit/link-datasource": "^6.0.0",
56
+ "@atlaskit/link-picker": "^6.0.0",
57
+ "@atlaskit/media-card": "^81.0.0",
58
+ "@atlaskit/media-client": "^37.0.0",
59
+ "@atlaskit/media-client-react": "^6.0.0",
60
+ "@atlaskit/media-common": "^14.0.0",
61
+ "@atlaskit/media-file-preview": "^1.0.0",
62
+ "@atlaskit/media-picker": "^72.0.0",
63
+ "@atlaskit/media-ui": "^30.0.0",
64
+ "@atlaskit/media-viewer": "^54.0.0",
65
+ "@atlaskit/mention": "^27.0.0",
66
+ "@atlaskit/menu": "^9.0.0",
67
+ "@atlaskit/object": "^2.0.0",
68
+ "@atlaskit/onboarding": "^15.0.0",
69
+ "@atlaskit/platform-feature-flags": "^2.0.0",
70
+ "@atlaskit/platform-feature-flags-react": "^1.0.0",
71
+ "@atlaskit/primitives": "^20.0.0",
72
+ "@atlaskit/profilecard": "^26.0.0",
73
+ "@atlaskit/prosemirror-history": "^1.0.0",
74
+ "@atlaskit/react-ufo": "^7.0.0",
75
+ "@atlaskit/section-message": "^9.0.0",
76
+ "@atlaskit/smart-card": "^45.0.0",
77
+ "@atlaskit/smart-user-picker": "^11.0.0",
78
+ "@atlaskit/spinner": "^20.0.0",
79
+ "@atlaskit/task-decision": "^21.0.0",
80
+ "@atlaskit/teams-app-config": "^2.0.0",
81
+ "@atlaskit/textfield": "^9.0.0",
82
+ "@atlaskit/tmp-editor-statsig": "^104.0.0",
83
+ "@atlaskit/tokens": "^14.0.0",
84
+ "@atlaskit/tooltip": "^23.0.0",
85
+ "@atlaskit/width-detector": "^6.0.0",
94
86
  "@babel/runtime": "^7.0.0",
95
87
  "@compiled/react": "^0.20.0",
96
88
  "@emotion/react": "^11.7.1",
@@ -121,13 +113,13 @@
121
113
  "w3c-keyname": "^2.1.8"
122
114
  },
123
115
  "peerDependencies": {
124
- "@atlaskit/media-core": "^37.1.0",
116
+ "@atlaskit/media-core": "^38.0.0",
125
117
  "react": "^18.2.0",
126
118
  "react-dom": "^18.2.0",
127
119
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
128
120
  },
129
121
  "devDependencies": {
130
- "@atlaskit/media-core": "^37.1.0",
122
+ "@atlaskit/media-core": "^38.0.0",
131
123
  "@atlassian/a11y-jest-testing": "^0.12.0",
132
124
  "@atlassian/react-compiler-gating": "workspace:^",
133
125
  "@testing-library/dom": "^10.1.0",