@atlaskit/editor-common 115.2.2 → 115.3.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,18 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 115.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`3bb54917f1df6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3bb54917f1df6) -
8
+ Add a gated API for updating mention typeahead section metadata.
9
+
10
+ ### Patch Changes
11
+
12
+ - [`795424ce08dae`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/795424ce08dae) -
13
+ Add analytics for layout column resizing
14
+ - Updated dependencies
15
+
3
16
  ## 115.2.2
4
17
 
5
18
  ### Patch Changes
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
20
20
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
21
21
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
22
- var packageVersion = "115.2.1";
22
+ var packageVersion = "115.2.2";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // 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.2.1";
27
+ var packageVersion = "115.2.2";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
4
4
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
5
5
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
6
6
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
7
- const packageVersion = "115.2.1";
7
+ const packageVersion = "115.2.2";
8
8
  const sanitiseSentryEvents = (data, _hint) => {
9
9
  // Remove URL as it has UGC
10
10
  // 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.2.1";
17
+ const packageVersion = "115.2.2";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
10
10
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
11
11
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
12
12
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
13
- var packageVersion = "115.2.1";
13
+ var packageVersion = "115.2.2";
14
14
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
15
15
  // Remove URL as it has UGC
16
16
  // 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.2.1";
24
+ var packageVersion = "115.2.2";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -76,6 +76,17 @@ type DistributedLayoutColumnAEP = TrackAEP<ACTION.UPDATED, ACTION_SUBJECT.DOCUME
76
76
  selectedCount: number;
77
77
  startIndex: number;
78
78
  }, undefined>;
79
+ type ResizedLayoutColumnAEP = TrackAEP<ACTION.DRAGGED, ACTION_SUBJECT.DOCUMENT, ACTION_SUBJECT_ID.LAYOUT_COLUMN, {
80
+ /** Total number of columns in the layout section */
81
+ columnCount: number;
82
+ inputMethod: INPUT_METHOD.DRAG;
83
+ /** 0-based index of the left column involved in the resize */
84
+ leftColumnIndex: number;
85
+ /** Final width percentage of the left column after resize */
86
+ leftColumnWidth: number;
87
+ /** Final width percentage of the right column after resize */
88
+ rightColumnWidth: number;
89
+ }, undefined>;
79
90
  type DeletedExpandAEP = TrackAEP<ACTION.DELETED, ACTION_SUBJECT.EXPAND | ACTION_SUBJECT.NESTED_EXPAND, undefined, {
80
91
  inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
81
92
  }, undefined>;
@@ -86,5 +97,5 @@ type UnsupportedContentAEP = TrackAEP<ACTION.UNSUPPORTED_CONTENT_ENCOUNTERED, AC
86
97
  type: string;
87
98
  };
88
99
  }, undefined>;
89
- export type NodeEventPayload = ChangePanelAEP | DeletePanelAEP | DeletedSmartLink | VisitedSmartLink | VisitedHyperlink | ChangedLayoutAEP | DeletedLayoutAEP | DeletedLayoutColumnAEP | UpdatedLayoutColumnVerticalAlignmentAEP | DistributedLayoutColumnAEP | DeletedExpandAEP | NodeDeletedAEP | ChangeSmartLinkAEP | ChangeNativeEmbedAEP | UnsupportedContentAEP;
100
+ export type NodeEventPayload = ChangePanelAEP | DeletePanelAEP | DeletedSmartLink | VisitedSmartLink | VisitedHyperlink | ChangedLayoutAEP | DeletedLayoutAEP | DeletedLayoutColumnAEP | UpdatedLayoutColumnVerticalAlignmentAEP | DistributedLayoutColumnAEP | ResizedLayoutColumnAEP | DeletedExpandAEP | NodeDeletedAEP | ChangeSmartLinkAEP | ChangeNativeEmbedAEP | UnsupportedContentAEP;
90
101
  export {};
@@ -7,7 +7,7 @@ export { AnnotationUpdateEmitter, AnnotationUpdateEvent } from './annotation/emi
7
7
  export type { AnnotationState, AnnotationUpdateEventPayloads, OnAnnotationClickPayload, } from './annotation/emitter';
8
8
  export type { AnnotationProviders, InlineCommentSelectionComponentProps, InlineCommentHoverComponentProps, InlineCommentViewComponentProps, InlineCommentAnnotationProvider, AnnotationByMatches, AnnotationActionResult, } from './annotation';
9
9
  export type { ContextUpdateHandler, EditorActionsOptions, ReplaceRawValue, GetResolvedEditorStateReason, } from './editor-actions';
10
- export type { TypeAheadStats, TypeAheadItemRenderProps, TypeAheadInsert, TypeAheadSelectItem, TypeAheadItem, TypeAheadForceSelect, TypeAheadHandler, TypeAheadSection, } from './type-ahead';
10
+ export type { TypeAheadStats, TypeAheadItemRenderProps, TypeAheadInsert, TypeAheadSelectItem, TypeAheadItem, TypeAheadForceSelect, TypeAheadHandler, TypeAheadSection, TypeAheadSectionTitleUpdate, } from './type-ahead';
11
11
  export type { CommandDispatch, Command, HigherOrderCommand, Predicate } from './command';
12
12
  export type { FeatureFlags, FeatureFlagKey, GetEditorFeatureFlags } from './feature-flags';
13
13
  export type { Browsers, Range, DisableSpellcheckByBrowser } from './supported-browsers';
@@ -51,6 +51,15 @@ export type TypeAheadSection = {
51
51
  limit?: number;
52
52
  title: string;
53
53
  };
54
+ export type TypeAheadSectionTitleUpdate = {
55
+ id: string;
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.
59
+ */
60
+ showTitleWhenOnlySection?: boolean;
61
+ title: string;
62
+ };
54
63
  export type TypeAheadForceSelect = (props: TypeAheadForceSelectProps) => TypeAheadItem | undefined;
55
64
  export type MoreOptionsButtonConfig = {
56
65
  ariaLabel?: string;
@@ -84,11 +93,11 @@ export type TypeAheadHandler = {
84
93
  editorState: EditorState;
85
94
  query: string;
86
95
  }) => Promise<Array<TypeAheadItem>>;
96
+ getMoreOptionsButtonConfig?: (intl: IntlShape) => MoreOptionsButtonConfig;
87
97
  /** Optional section definitions used by type-ahead menu to group items */
88
98
  getSections?: (props: {
89
99
  intl: IntlShape;
90
100
  }) => Array<TypeAheadSection>;
91
- getMoreOptionsButtonConfig?: (intl: IntlShape) => MoreOptionsButtonConfig;
92
101
  headless?: boolean;
93
102
  id: TypeAheadAvailableNodes;
94
103
  onInvokeAnalytics?: TypeAheadPayload;
@@ -76,6 +76,17 @@ type DistributedLayoutColumnAEP = TrackAEP<ACTION.UPDATED, ACTION_SUBJECT.DOCUME
76
76
  selectedCount: number;
77
77
  startIndex: number;
78
78
  }, undefined>;
79
+ type ResizedLayoutColumnAEP = TrackAEP<ACTION.DRAGGED, ACTION_SUBJECT.DOCUMENT, ACTION_SUBJECT_ID.LAYOUT_COLUMN, {
80
+ /** Total number of columns in the layout section */
81
+ columnCount: number;
82
+ inputMethod: INPUT_METHOD.DRAG;
83
+ /** 0-based index of the left column involved in the resize */
84
+ leftColumnIndex: number;
85
+ /** Final width percentage of the left column after resize */
86
+ leftColumnWidth: number;
87
+ /** Final width percentage of the right column after resize */
88
+ rightColumnWidth: number;
89
+ }, undefined>;
79
90
  type DeletedExpandAEP = TrackAEP<ACTION.DELETED, ACTION_SUBJECT.EXPAND | ACTION_SUBJECT.NESTED_EXPAND, undefined, {
80
91
  inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
81
92
  }, undefined>;
@@ -86,5 +97,5 @@ type UnsupportedContentAEP = TrackAEP<ACTION.UNSUPPORTED_CONTENT_ENCOUNTERED, AC
86
97
  type: string;
87
98
  };
88
99
  }, undefined>;
89
- export type NodeEventPayload = ChangePanelAEP | DeletePanelAEP | DeletedSmartLink | VisitedSmartLink | VisitedHyperlink | ChangedLayoutAEP | DeletedLayoutAEP | DeletedLayoutColumnAEP | UpdatedLayoutColumnVerticalAlignmentAEP | DistributedLayoutColumnAEP | DeletedExpandAEP | NodeDeletedAEP | ChangeSmartLinkAEP | ChangeNativeEmbedAEP | UnsupportedContentAEP;
100
+ export type NodeEventPayload = ChangePanelAEP | DeletePanelAEP | DeletedSmartLink | VisitedSmartLink | VisitedHyperlink | ChangedLayoutAEP | DeletedLayoutAEP | DeletedLayoutColumnAEP | UpdatedLayoutColumnVerticalAlignmentAEP | DistributedLayoutColumnAEP | ResizedLayoutColumnAEP | DeletedExpandAEP | NodeDeletedAEP | ChangeSmartLinkAEP | ChangeNativeEmbedAEP | UnsupportedContentAEP;
90
101
  export {};
@@ -7,7 +7,7 @@ export { AnnotationUpdateEmitter, AnnotationUpdateEvent } from './annotation/emi
7
7
  export type { AnnotationState, AnnotationUpdateEventPayloads, OnAnnotationClickPayload, } from './annotation/emitter';
8
8
  export type { AnnotationProviders, InlineCommentSelectionComponentProps, InlineCommentHoverComponentProps, InlineCommentViewComponentProps, InlineCommentAnnotationProvider, AnnotationByMatches, AnnotationActionResult, } from './annotation';
9
9
  export type { ContextUpdateHandler, EditorActionsOptions, ReplaceRawValue, GetResolvedEditorStateReason, } from './editor-actions';
10
- export type { TypeAheadStats, TypeAheadItemRenderProps, TypeAheadInsert, TypeAheadSelectItem, TypeAheadItem, TypeAheadForceSelect, TypeAheadHandler, TypeAheadSection, } from './type-ahead';
10
+ export type { TypeAheadStats, TypeAheadItemRenderProps, TypeAheadInsert, TypeAheadSelectItem, TypeAheadItem, TypeAheadForceSelect, TypeAheadHandler, TypeAheadSection, TypeAheadSectionTitleUpdate, } from './type-ahead';
11
11
  export type { CommandDispatch, Command, HigherOrderCommand, Predicate } from './command';
12
12
  export type { FeatureFlags, FeatureFlagKey, GetEditorFeatureFlags } from './feature-flags';
13
13
  export type { Browsers, Range, DisableSpellcheckByBrowser } from './supported-browsers';
@@ -51,6 +51,15 @@ export type TypeAheadSection = {
51
51
  limit?: number;
52
52
  title: string;
53
53
  };
54
+ export type TypeAheadSectionTitleUpdate = {
55
+ id: string;
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.
59
+ */
60
+ showTitleWhenOnlySection?: boolean;
61
+ title: string;
62
+ };
54
63
  export type TypeAheadForceSelect = (props: TypeAheadForceSelectProps) => TypeAheadItem | undefined;
55
64
  export type MoreOptionsButtonConfig = {
56
65
  ariaLabel?: string;
@@ -84,11 +93,11 @@ export type TypeAheadHandler = {
84
93
  editorState: EditorState;
85
94
  query: string;
86
95
  }) => Promise<Array<TypeAheadItem>>;
96
+ getMoreOptionsButtonConfig?: (intl: IntlShape) => MoreOptionsButtonConfig;
87
97
  /** Optional section definitions used by type-ahead menu to group items */
88
98
  getSections?: (props: {
89
99
  intl: IntlShape;
90
100
  }) => Array<TypeAheadSection>;
91
- getMoreOptionsButtonConfig?: (intl: IntlShape) => MoreOptionsButtonConfig;
92
101
  headless?: boolean;
93
102
  id: TypeAheadAvailableNodes;
94
103
  onInvokeAnalytics?: TypeAheadPayload;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "115.2.2",
3
+ "version": "115.3.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/"
@@ -81,7 +81,7 @@
81
81
  "@atlaskit/prosemirror-history": "^0.2.0",
82
82
  "@atlaskit/react-ufo": "^6.6.0",
83
83
  "@atlaskit/section-message": "^8.13.0",
84
- "@atlaskit/smart-card": "^44.22.0",
84
+ "@atlaskit/smart-card": "^44.23.0",
85
85
  "@atlaskit/smart-user-picker": "^10.2.0",
86
86
  "@atlaskit/spinner": "^19.1.0",
87
87
  "@atlaskit/task-decision": "^20.1.0",