@atlaskit/editor-common 107.12.2 → 107.12.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,21 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 107.12.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#191381](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/191381)
8
+ [`efd66bb003bb4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/efd66bb003bb4) -
9
+ [ux] Show warning on embed option in smart link card appearance dropdown
10
+
11
+ ## 107.12.3
12
+
13
+ ### Patch Changes
14
+
15
+ - [#185241](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/185241)
16
+ [`0d1bffce3fedd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0d1bffce3fedd) -
17
+ [ux] View embed as block card when page width smaller or equal to 600px
18
+
3
19
  ## 107.12.2
4
20
 
5
21
  ### Patch Changes
@@ -13,7 +13,8 @@ var getDropdownOption = exports.getDropdownOption = function getDropdownOption(i
13
13
  selected = _ref.selected,
14
14
  appearance = _ref.appearance,
15
15
  testId = _ref.testId,
16
- tooltip = _ref.tooltip;
16
+ tooltip = _ref.tooltip,
17
+ description = _ref.description;
17
18
  var _appearancePropsMap = _linkToolbarButtonGroupOptions.appearancePropsMap[appearance !== null && appearance !== void 0 ? appearance : 'url'],
18
19
  title = _appearancePropsMap.title,
19
20
  Icon = _appearancePropsMap.icon;
@@ -28,6 +29,7 @@ var getDropdownOption = exports.getDropdownOption = function getDropdownOption(i
28
29
  disabled: Boolean(disabled),
29
30
  testId: testId,
30
31
  selected: selected,
31
- tooltip: tooltip !== null && tooltip !== void 0 ? tooltip : ''
32
+ tooltip: tooltip !== null && tooltip !== void 0 ? tooltip : '',
33
+ description: description
32
34
  };
33
35
  };
@@ -96,6 +96,11 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
96
96
  defaultMessage: 'Display an interactive preview of a link',
97
97
  description: 'Description for option to display link as an embedded object.'
98
98
  },
99
+ embedToBlockCardWarning: {
100
+ id: 'fabric.editor.embedToBlockCardWarning',
101
+ defaultMessage: 'Displays as a card on small screens',
102
+ description: 'Warning message to show the user that embed card will be displayed as a block card on small screens.'
103
+ },
99
104
  editDropdownExpandIconLabel: {
100
105
  id: 'fabric.editor.editDropdownExpandIconLabel',
101
106
  defaultMessage: 'Expand dropdown menu',
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
  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 _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "107.12.1";
19
+ var packageVersion = "107.12.3";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // Ignored via go/ees007
@@ -271,7 +271,7 @@ var ReactNodeView = exports.default = /*#__PURE__*/function () {
271
271
  }
272
272
  }, {
273
273
  key: "viewShouldUpdate",
274
- value: function viewShouldUpdate(nextNode, decorations) {
274
+ value: function viewShouldUpdate(nextNode, _decorations) {
275
275
  if (this._viewShouldUpdate) {
276
276
  return this._viewShouldUpdate(nextNode);
277
277
  }
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "107.12.1";
26
+ var packageVersion = "107.12.3";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -6,7 +6,8 @@ export const getDropdownOption = (intl, dispatchCommand, {
6
6
  selected,
7
7
  appearance,
8
8
  testId,
9
- tooltip
9
+ tooltip,
10
+ description
10
11
  }) => {
11
12
  const {
12
13
  title,
@@ -21,6 +22,7 @@ export const getDropdownOption = (intl, dispatchCommand, {
21
22
  disabled: Boolean(disabled),
22
23
  testId,
23
24
  selected,
24
- tooltip: tooltip !== null && tooltip !== void 0 ? tooltip : ''
25
+ tooltip: tooltip !== null && tooltip !== void 0 ? tooltip : '',
26
+ description
25
27
  };
26
28
  };
@@ -90,6 +90,11 @@ export const messages = defineMessages({
90
90
  defaultMessage: 'Display an interactive preview of a link',
91
91
  description: 'Description for option to display link as an embedded object.'
92
92
  },
93
+ embedToBlockCardWarning: {
94
+ id: 'fabric.editor.embedToBlockCardWarning',
95
+ defaultMessage: 'Displays as a card on small screens',
96
+ description: 'Warning message to show the user that embed card will be displayed as a block card on small screens.'
97
+ },
93
98
  editDropdownExpandIconLabel: {
94
99
  id: 'fabric.editor.editDropdownExpandIconLabel',
95
100
  defaultMessage: 'Expand dropdown menu',
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "107.12.1";
4
+ const packageVersion = "107.12.3";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -222,7 +222,7 @@ export default class ReactNodeView {
222
222
  this.renderReactComponent(() => this.render(this.reactComponentProps, this.handleRef));
223
223
  return true;
224
224
  }
225
- viewShouldUpdate(nextNode, decorations) {
225
+ viewShouldUpdate(nextNode, _decorations) {
226
226
  if (this._viewShouldUpdate) {
227
227
  return this._viewShouldUpdate(nextNode);
228
228
  }
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "107.12.1";
16
+ const packageVersion = "107.12.3";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -6,7 +6,8 @@ export var getDropdownOption = function getDropdownOption(intl, dispatchCommand,
6
6
  selected = _ref.selected,
7
7
  appearance = _ref.appearance,
8
8
  testId = _ref.testId,
9
- tooltip = _ref.tooltip;
9
+ tooltip = _ref.tooltip,
10
+ description = _ref.description;
10
11
  var _appearancePropsMap = appearancePropsMap[appearance !== null && appearance !== void 0 ? appearance : 'url'],
11
12
  title = _appearancePropsMap.title,
12
13
  Icon = _appearancePropsMap.icon;
@@ -21,6 +22,7 @@ export var getDropdownOption = function getDropdownOption(intl, dispatchCommand,
21
22
  disabled: Boolean(disabled),
22
23
  testId: testId,
23
24
  selected: selected,
24
- tooltip: tooltip !== null && tooltip !== void 0 ? tooltip : ''
25
+ tooltip: tooltip !== null && tooltip !== void 0 ? tooltip : '',
26
+ description: description
25
27
  };
26
28
  };
@@ -90,6 +90,11 @@ export var messages = defineMessages({
90
90
  defaultMessage: 'Display an interactive preview of a link',
91
91
  description: 'Description for option to display link as an embedded object.'
92
92
  },
93
+ embedToBlockCardWarning: {
94
+ id: 'fabric.editor.embedToBlockCardWarning',
95
+ defaultMessage: 'Displays as a card on small screens',
96
+ description: 'Warning message to show the user that embed card will be displayed as a block card on small screens.'
97
+ },
93
98
  editDropdownExpandIconLabel: {
94
99
  id: 'fabric.editor.editDropdownExpandIconLabel',
95
100
  defaultMessage: 'Expand dropdown menu',
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "107.12.1";
10
+ var packageVersion = "107.12.3";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -253,7 +253,7 @@ var ReactNodeView = /*#__PURE__*/function () {
253
253
  }
254
254
  }, {
255
255
  key: "viewShouldUpdate",
256
- value: function viewShouldUpdate(nextNode, decorations) {
256
+ value: function viewShouldUpdate(nextNode, _decorations) {
257
257
  if (this._viewShouldUpdate) {
258
258
  return this._viewShouldUpdate(nextNode);
259
259
  }
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "107.12.1";
23
+ var packageVersion = "107.12.3";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -1,4 +1,4 @@
1
1
  import { type IntlShape } from 'react-intl-next';
2
2
  import type { Command, DropdownOptionT } from '../types';
3
3
  import type { OptionConfig } from './types';
4
- export declare const getDropdownOption: (intl: IntlShape, dispatchCommand: (command: Command) => void, { disabled, onClick, selected, appearance, testId, tooltip }: OptionConfig) => DropdownOptionT<Function>;
4
+ export declare const getDropdownOption: (intl: IntlShape, dispatchCommand: (command: Command) => void, { disabled, onClick, selected, appearance, testId, tooltip, description }: OptionConfig) => DropdownOptionT<Function>;
@@ -14,6 +14,7 @@ export interface OptionConfig {
14
14
  disabled?: boolean;
15
15
  hidden?: boolean;
16
16
  tooltip?: string;
17
+ description?: string;
17
18
  }
18
19
  export type CardReplacementInputMethod = INPUT_METHOD.CLIPBOARD | INPUT_METHOD.AUTO_DETECT | INPUT_METHOD.FORMATTING | INPUT_METHOD.MANUAL | INPUT_METHOD.TYPEAHEAD | INPUT_METHOD.FLOATING_TB;
19
20
  export type QueueCardsFromTransactionAction = (state: EditorState, tr: Transaction, source: CardReplacementInputMethod, analyticsAction?: ACTION, normalizeLinkText?: boolean, sourceEvent?: UIAnalyticsEvent | null | undefined, appearance?: CardAppearance) => Transaction;
@@ -89,6 +89,11 @@ export declare const messages: {
89
89
  defaultMessage: string;
90
90
  description: string;
91
91
  };
92
+ embedToBlockCardWarning: {
93
+ id: string;
94
+ defaultMessage: string;
95
+ description: string;
96
+ };
92
97
  editDropdownExpandIconLabel: {
93
98
  id: string;
94
99
  defaultMessage: string;
@@ -42,7 +42,7 @@ export default class ReactNodeView<P = ReactComponentProps> implements NodeView
42
42
  private _handleRef;
43
43
  render(props: P, forwardRef?: ForwardRef): React.ReactElement<any> | null;
44
44
  update(node: PMNode, decorations: ReadonlyArray<Decoration>, _innerDecorations?: DecorationSource, validUpdate?: (currentNode: PMNode, newNode: PMNode) => boolean): boolean;
45
- viewShouldUpdate(nextNode: PMNode, decorations?: Array<Decoration>): boolean;
45
+ viewShouldUpdate(nextNode: PMNode, _decorations?: Array<Decoration>): boolean;
46
46
  /**
47
47
  * Copies the attributes from a ProseMirror Node to a DOM node.
48
48
  * @param node The Prosemirror Node from which to source the attributes
@@ -69,6 +69,7 @@ export interface DropdownOptionT<T extends Object> {
69
69
  tooltip?: string;
70
70
  elemAfter?: React.ReactNode;
71
71
  icon?: React.ReactNode;
72
+ description?: string;
72
73
  }
73
74
  export type typeOption =
74
75
  /** Dropdown menu item type
@@ -1,4 +1,4 @@
1
1
  import { type IntlShape } from 'react-intl-next';
2
2
  import type { Command, DropdownOptionT } from '../types';
3
3
  import type { OptionConfig } from './types';
4
- export declare const getDropdownOption: (intl: IntlShape, dispatchCommand: (command: Command) => void, { disabled, onClick, selected, appearance, testId, tooltip }: OptionConfig) => DropdownOptionT<Function>;
4
+ export declare const getDropdownOption: (intl: IntlShape, dispatchCommand: (command: Command) => void, { disabled, onClick, selected, appearance, testId, tooltip, description }: OptionConfig) => DropdownOptionT<Function>;
@@ -14,6 +14,7 @@ export interface OptionConfig {
14
14
  disabled?: boolean;
15
15
  hidden?: boolean;
16
16
  tooltip?: string;
17
+ description?: string;
17
18
  }
18
19
  export type CardReplacementInputMethod = INPUT_METHOD.CLIPBOARD | INPUT_METHOD.AUTO_DETECT | INPUT_METHOD.FORMATTING | INPUT_METHOD.MANUAL | INPUT_METHOD.TYPEAHEAD | INPUT_METHOD.FLOATING_TB;
19
20
  export type QueueCardsFromTransactionAction = (state: EditorState, tr: Transaction, source: CardReplacementInputMethod, analyticsAction?: ACTION, normalizeLinkText?: boolean, sourceEvent?: UIAnalyticsEvent | null | undefined, appearance?: CardAppearance) => Transaction;
@@ -89,6 +89,11 @@ export declare const messages: {
89
89
  defaultMessage: string;
90
90
  description: string;
91
91
  };
92
+ embedToBlockCardWarning: {
93
+ id: string;
94
+ defaultMessage: string;
95
+ description: string;
96
+ };
92
97
  editDropdownExpandIconLabel: {
93
98
  id: string;
94
99
  defaultMessage: string;
@@ -42,7 +42,7 @@ export default class ReactNodeView<P = ReactComponentProps> implements NodeView
42
42
  private _handleRef;
43
43
  render(props: P, forwardRef?: ForwardRef): React.ReactElement<any> | null;
44
44
  update(node: PMNode, decorations: ReadonlyArray<Decoration>, _innerDecorations?: DecorationSource, validUpdate?: (currentNode: PMNode, newNode: PMNode) => boolean): boolean;
45
- viewShouldUpdate(nextNode: PMNode, decorations?: Array<Decoration>): boolean;
45
+ viewShouldUpdate(nextNode: PMNode, _decorations?: Array<Decoration>): boolean;
46
46
  /**
47
47
  * Copies the attributes from a ProseMirror Node to a DOM node.
48
48
  * @param node The Prosemirror Node from which to source the attributes
@@ -69,6 +69,7 @@ export interface DropdownOptionT<T extends Object> {
69
69
  tooltip?: string;
70
70
  elemAfter?: React.ReactNode;
71
71
  icon?: React.ReactNode;
72
+ description?: string;
72
73
  }
73
74
  export type typeOption =
74
75
  /** Dropdown menu item type
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "107.12.2",
3
+ "version": "107.12.4",
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/"
@@ -141,7 +141,7 @@
141
141
  "@atlaskit/editor-shared-styles": "^3.5.0",
142
142
  "@atlaskit/editor-tables": "^2.9.0",
143
143
  "@atlaskit/emoji": "^69.3.0",
144
- "@atlaskit/icon": "^27.6.0",
144
+ "@atlaskit/icon": "^27.7.0",
145
145
  "@atlaskit/icon-object": "^7.1.0",
146
146
  "@atlaskit/link": "^3.2.0",
147
147
  "@atlaskit/link-datasource": "^4.14.0",