@atlaskit/editor-common 82.8.5 → 82.8.6

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,13 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 82.8.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#112385](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/112385)
8
+ [`7889fc5a6eff5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7889fc5a6eff5) -
9
+ Add new moved events for dnd, change which events are fired in block control plugin
10
+
3
11
  ## 82.8.5
4
12
 
5
13
  ### Patch Changes
@@ -143,6 +143,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
143
143
  ACTION["REMOVE_CHILD"] = "removeChild";
144
144
  ACTION["UPDATE_PARAMETERS"] = "updateParameters";
145
145
  ACTION["GET_CHILDERN"] = "getChildern";
146
+ ACTION["MOVED"] = "moved";
146
147
  return ACTION;
147
148
  }({});
148
149
  var INPUT_METHOD = exports.INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
@@ -17,6 +17,8 @@ var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
17
17
  var _messages = require("../../messages");
18
18
  /** @jsx jsx */
19
19
 
20
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
21
+
20
22
  var buttonStyles = (0, _react2.css)({
21
23
  background: "var(--ds-background-neutral, ".concat(_colors.N30A, ")"),
22
24
  color: "var(--ds-icon, ".concat(_colors.N700, ")"),
@@ -11,12 +11,13 @@ var FEDRAMP_MODERATE = 'fedramp-moderate';
11
11
  // We cannot import the same-named function from @atlassian/atl-context due to editor-common being a public package (and atl-context being private)
12
12
  // TODO: Seek alternatives
13
13
  function isFedRamp() {
14
- var _globalThis$location;
14
+ var _global$location;
15
+ var global = globalThis;
15
16
  // MICROS_PERIMETER is already used by few products, so we need to keep it for backward compatibility
16
- var env = globalThis.MICROS_PERIMETER || globalThis.UNSAFE_ATL_CONTEXT_BOUNDARY;
17
+ var env = global.MICROS_PERIMETER || global.UNSAFE_ATL_CONTEXT_BOUNDARY;
17
18
  if (env) {
18
19
  return env === FEDRAMP_MODERATE;
19
20
  }
20
- var matches = (_globalThis$location = globalThis.location) === null || _globalThis$location === void 0 || (_globalThis$location = _globalThis$location.hostname) === null || _globalThis$location === void 0 ? void 0 : _globalThis$location.match(/atlassian-us-gov-mod\.(com|net)|atlassian-us-gov\.(com|net)|atlassian-fex\.(com|net)|atlassian-stg-fedm\.(com|net)/);
21
+ var matches = (_global$location = global.location) === null || _global$location === void 0 || (_global$location = _global$location.hostname) === null || _global$location === void 0 ? void 0 : _global$location.match(/atlassian-us-gov-mod\.(com|net)|atlassian-us-gov\.(com|net)|atlassian-fex\.(com|net)|atlassian-stg-fedm\.(com|net)/);
21
22
  return matches ? matches.length > 0 : false;
22
23
  }
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "82.8.5";
20
+ var packageVersion = "82.8.6";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // TODO: Sanitise the URL instead of just removing it
@@ -20,7 +20,7 @@ var _Layer = _interopRequireDefault(require("../Layer"));
20
20
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
21
21
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "82.8.5";
23
+ var packageVersion = "82.8.6";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  var DropList = /*#__PURE__*/function (_Component) {
@@ -51,7 +51,9 @@ function FunctionalComponentColor(props) {
51
51
  }, (0, _react2.jsx)("span", {
52
52
  css: _styles.buttonWrapperStyle
53
53
  }, (0, _react2.jsx)("button", {
54
- type: "button",
54
+ type: "button"
55
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
56
+ ,
55
57
  css: _styles.buttonStyle,
56
58
  "aria-label": label,
57
59
  role: "radio",
@@ -137,6 +137,7 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
137
137
  ACTION["REMOVE_CHILD"] = "removeChild";
138
138
  ACTION["UPDATE_PARAMETERS"] = "updateParameters";
139
139
  ACTION["GET_CHILDERN"] = "getChildern";
140
+ ACTION["MOVED"] = "moved";
140
141
  return ACTION;
141
142
  }({});
142
143
  export let INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
@@ -1,5 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { useCallback } from 'react';
3
+
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
5
  import { css, jsx } from '@emotion/react';
4
6
  import { useIntl } from 'react-intl-next';
5
7
  import Button from '@atlaskit/button';
@@ -5,12 +5,13 @@ const FEDRAMP_MODERATE = 'fedramp-moderate';
5
5
  // We cannot import the same-named function from @atlassian/atl-context due to editor-common being a public package (and atl-context being private)
6
6
  // TODO: Seek alternatives
7
7
  export function isFedRamp() {
8
- var _globalThis$location, _globalThis$location$;
8
+ var _global$location, _global$location$host;
9
+ const global = globalThis;
9
10
  // MICROS_PERIMETER is already used by few products, so we need to keep it for backward compatibility
10
- const env = globalThis.MICROS_PERIMETER || globalThis.UNSAFE_ATL_CONTEXT_BOUNDARY;
11
+ const env = global.MICROS_PERIMETER || global.UNSAFE_ATL_CONTEXT_BOUNDARY;
11
12
  if (env) {
12
13
  return env === FEDRAMP_MODERATE;
13
14
  }
14
- const matches = (_globalThis$location = globalThis.location) === null || _globalThis$location === void 0 ? void 0 : (_globalThis$location$ = _globalThis$location.hostname) === null || _globalThis$location$ === void 0 ? void 0 : _globalThis$location$.match(/atlassian-us-gov-mod\.(com|net)|atlassian-us-gov\.(com|net)|atlassian-fex\.(com|net)|atlassian-stg-fedm\.(com|net)/);
15
+ const matches = (_global$location = global.location) === null || _global$location === void 0 ? void 0 : (_global$location$host = _global$location.hostname) === null || _global$location$host === void 0 ? void 0 : _global$location$host.match(/atlassian-us-gov-mod\.(com|net)|atlassian-us-gov\.(com|net)|atlassian-fex\.(com|net)|atlassian-stg-fedm\.(com|net)/);
15
16
  return matches ? matches.length > 0 : false;
16
17
  }
@@ -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 = "82.8.5";
4
+ const packageVersion = "82.8.6";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // TODO: Sanitise the URL instead of just removing it
@@ -9,7 +9,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
9
9
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
10
10
  import Layer from '../Layer';
11
11
  const packageName = "@atlaskit/editor-common";
12
- const packageVersion = "82.8.5";
12
+ const packageVersion = "82.8.6";
13
13
  const halfFocusRing = 1;
14
14
  const dropOffset = '0, 8';
15
15
  class DropList extends Component {
@@ -46,7 +46,9 @@ function FunctionalComponentColor(props) {
46
46
  }, jsx("span", {
47
47
  css: buttonWrapperStyle
48
48
  }, jsx("button", {
49
- type: "button",
49
+ type: "button"
50
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
51
+ ,
50
52
  css: buttonStyle,
51
53
  "aria-label": label,
52
54
  role: "radio",
@@ -137,6 +137,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
137
137
  ACTION["REMOVE_CHILD"] = "removeChild";
138
138
  ACTION["UPDATE_PARAMETERS"] = "updateParameters";
139
139
  ACTION["GET_CHILDERN"] = "getChildern";
140
+ ACTION["MOVED"] = "moved";
140
141
  return ACTION;
141
142
  }({});
142
143
  export var INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
@@ -1,5 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { useCallback } from 'react';
3
+
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
5
  import { css, jsx } from '@emotion/react';
4
6
  import { useIntl } from 'react-intl-next';
5
7
  import Button from '@atlaskit/button';
@@ -5,12 +5,13 @@ var FEDRAMP_MODERATE = 'fedramp-moderate';
5
5
  // We cannot import the same-named function from @atlassian/atl-context due to editor-common being a public package (and atl-context being private)
6
6
  // TODO: Seek alternatives
7
7
  export function isFedRamp() {
8
- var _globalThis$location;
8
+ var _global$location;
9
+ var global = globalThis;
9
10
  // MICROS_PERIMETER is already used by few products, so we need to keep it for backward compatibility
10
- var env = globalThis.MICROS_PERIMETER || globalThis.UNSAFE_ATL_CONTEXT_BOUNDARY;
11
+ var env = global.MICROS_PERIMETER || global.UNSAFE_ATL_CONTEXT_BOUNDARY;
11
12
  if (env) {
12
13
  return env === FEDRAMP_MODERATE;
13
14
  }
14
- var matches = (_globalThis$location = globalThis.location) === null || _globalThis$location === void 0 || (_globalThis$location = _globalThis$location.hostname) === null || _globalThis$location === void 0 ? void 0 : _globalThis$location.match(/atlassian-us-gov-mod\.(com|net)|atlassian-us-gov\.(com|net)|atlassian-fex\.(com|net)|atlassian-stg-fedm\.(com|net)/);
15
+ var matches = (_global$location = global.location) === null || _global$location === void 0 || (_global$location = _global$location.hostname) === null || _global$location === void 0 ? void 0 : _global$location.match(/atlassian-us-gov-mod\.(com|net)|atlassian-us-gov\.(com|net)|atlassian-fex\.(com|net)|atlassian-stg-fedm\.(com|net)/);
15
16
  return matches ? matches.length > 0 : false;
16
17
  }
@@ -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 = "82.8.5";
10
+ var packageVersion = "82.8.6";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // TODO: Sanitise the URL instead of just removing it
@@ -17,7 +17,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
17
17
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
18
18
  import Layer from '../Layer';
19
19
  var packageName = "@atlaskit/editor-common";
20
- var packageVersion = "82.8.5";
20
+ var packageVersion = "82.8.6";
21
21
  var halfFocusRing = 1;
22
22
  var dropOffset = '0, 8';
23
23
  var DropList = /*#__PURE__*/function (_Component) {
@@ -44,7 +44,9 @@ function FunctionalComponentColor(props) {
44
44
  }, jsx("span", {
45
45
  css: buttonWrapperStyle
46
46
  }, jsx("button", {
47
- type: "button",
47
+ type: "button"
48
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
49
+ ,
48
50
  css: buttonStyle,
49
51
  "aria-label": label,
50
52
  role: "radio",
@@ -1,10 +1,11 @@
1
1
  import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
2
- import type { UIAEP } from './utils';
2
+ import type { TrackAEP, UIAEP } from './utils';
3
3
  type ElementAttributes = {
4
4
  nodeDepth: number;
5
5
  nodeType: string;
6
6
  };
7
+ type ElementMovedAEP = TrackAEP<ACTION.MOVED, ACTION_SUBJECT.ELEMENT, ACTION_SUBJECT_ID.ELEMENT_DRAG_HANDLE, ElementAttributes, null>;
7
8
  type ElementDragAEP = UIAEP<ACTION.DRAGGED, ACTION_SUBJECT.ELEMENT, ACTION_SUBJECT_ID.ELEMENT_DRAG_HANDLE, ElementAttributes, null>;
8
9
  type DragCancelledAEP = UIAEP<ACTION.CANCELLED, ACTION_SUBJECT.DRAG, ACTION_SUBJECT_ID.ELEMENT_DRAG_HANDLE, ElementAttributes, null>;
9
- export type ElementEventPayload = ElementDragAEP | DragCancelledAEP;
10
+ export type ElementEventPayload = ElementMovedAEP | ElementDragAEP | DragCancelledAEP;
10
11
  export {};
@@ -143,7 +143,8 @@ export declare enum ACTION {
143
143
  CHANGE_ACTIVE = "changeActive",
144
144
  REMOVE_CHILD = "removeChild",
145
145
  UPDATE_PARAMETERS = "updateParameters",
146
- GET_CHILDERN = "getChildern"
146
+ GET_CHILDERN = "getChildern",
147
+ MOVED = "moved"
147
148
  }
148
149
  export declare enum INPUT_METHOD {
149
150
  ASCII = "ascii",
@@ -1,10 +1,11 @@
1
1
  import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
2
- import type { UIAEP } from './utils';
2
+ import type { TrackAEP, UIAEP } from './utils';
3
3
  type ElementAttributes = {
4
4
  nodeDepth: number;
5
5
  nodeType: string;
6
6
  };
7
+ type ElementMovedAEP = TrackAEP<ACTION.MOVED, ACTION_SUBJECT.ELEMENT, ACTION_SUBJECT_ID.ELEMENT_DRAG_HANDLE, ElementAttributes, null>;
7
8
  type ElementDragAEP = UIAEP<ACTION.DRAGGED, ACTION_SUBJECT.ELEMENT, ACTION_SUBJECT_ID.ELEMENT_DRAG_HANDLE, ElementAttributes, null>;
8
9
  type DragCancelledAEP = UIAEP<ACTION.CANCELLED, ACTION_SUBJECT.DRAG, ACTION_SUBJECT_ID.ELEMENT_DRAG_HANDLE, ElementAttributes, null>;
9
- export type ElementEventPayload = ElementDragAEP | DragCancelledAEP;
10
+ export type ElementEventPayload = ElementMovedAEP | ElementDragAEP | DragCancelledAEP;
10
11
  export {};
@@ -143,7 +143,8 @@ export declare enum ACTION {
143
143
  CHANGE_ACTIVE = "changeActive",
144
144
  REMOVE_CHILD = "removeChild",
145
145
  UPDATE_PARAMETERS = "updateParameters",
146
- GET_CHILDERN = "getChildern"
146
+ GET_CHILDERN = "getChildern",
147
+ MOVED = "moved"
147
148
  }
148
149
  export declare enum INPUT_METHOD {
149
150
  ASCII = "ascii",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "82.8.5",
3
+ "version": "82.8.6",
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/"
@@ -102,8 +102,8 @@
102
102
  "@atlaskit/analytics-namespaced-context": "^6.10.0",
103
103
  "@atlaskit/analytics-next": "^9.3.0",
104
104
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
105
- "@atlaskit/button": "^17.18.0",
106
- "@atlaskit/code": "^15.2.0",
105
+ "@atlaskit/button": "^17.22.0",
106
+ "@atlaskit/code": "^15.3.0",
107
107
  "@atlaskit/codemod-utils": "^4.2.0",
108
108
  "@atlaskit/custom-steps": "^0.2.0",
109
109
  "@atlaskit/editor-json-transformer": "^8.13.0",
@@ -117,7 +117,7 @@
117
117
  "@atlaskit/link-datasource": "^2.3.0",
118
118
  "@atlaskit/link-picker": "^1.37.0",
119
119
  "@atlaskit/media-card": "^77.12.0",
120
- "@atlaskit/media-client": "^27.2.0",
120
+ "@atlaskit/media-client": "^27.3.0",
121
121
  "@atlaskit/media-client-react": "^2.0.0",
122
122
  "@atlaskit/media-common": "^11.2.0",
123
123
  "@atlaskit/media-file-preview": "^0.5.0",