@atlaskit/editor-common 122.9.0 → 122.9.1

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,17 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 122.9.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`08cc5b3a5abad`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/08cc5b3a5abad) -
8
+ EDITOR-8471 Fix the validation override that relaxes INVALID_CONTENT for container children inside
9
+ a panel on load. `processRawValue` passed `allowContainerInPanel` while `validateADFEntity` still
10
+ read `allowExpandInPanel`, so with the `platform_editor_nest_container_in_panel` experiment
11
+ enabled an `expand` inside a `panel` was wrapped as `unsupportedBlock`. The option is now named
12
+ `allowContainerInPanel` on both sides, including `ErrorCallbackOptions` in `@atlaskit/adf-utils`.
13
+ - Updated dependencies
14
+
3
15
  ## 122.9.0
4
16
 
5
17
  ### Minor Changes
@@ -27,7 +27,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
27
27
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
28
28
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
29
29
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
30
- var packageVersion = "122.8.2";
30
+ var packageVersion = "122.9.0";
31
31
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
32
32
  // Remove URL as it has UGC
33
33
  // 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 = "122.8.2";
27
+ var packageVersion = "122.9.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -26,7 +26,7 @@ var errorCallbackFor = function errorCallbackFor(marks, validate, dispatchAnalyt
26
26
  return validationErrorHandler(entity, error, _objectSpread(_objectSpread({}, options), {}, {
27
27
  allowNestedTables: validationOverrides === null || validationOverrides === void 0 ? void 0 : validationOverrides.allowNestedTables,
28
28
  allowTableInPanel: validationOverrides === null || validationOverrides === void 0 ? void 0 : validationOverrides.allowTableInPanel,
29
- allowExpandInPanel: validationOverrides === null || validationOverrides === void 0 ? void 0 : validationOverrides.allowExpandInPanel
29
+ allowContainerInPanel: validationOverrides === null || validationOverrides === void 0 ? void 0 : validationOverrides.allowContainerInPanel
30
30
  }), marks, validate, dispatchAnalyticsEvent);
31
31
  };
32
32
  };
@@ -110,9 +110,10 @@ var validationErrorHandler = exports.validationErrorHandler = function validatio
110
110
 
111
111
  // panel_c1 is a ProseMirror-only variant: on save, expand-in-panel documents are stored as
112
112
  // plain ADF `panel` nodes containing an `expand`. The base validator-spec does not permit
113
- // `expand` inside `panel` (it's gated behind the experiment), so we suppress the
114
- // INVALID_CONTENT error when the experiment is active.
115
- if (options.allowExpandInPanel) {
113
+ // `expand` inside `panel` (it's gated behind the consolidated container-in-panel experiment,
114
+ // see `isPanelNestingContainerSupported`), so we suppress the INVALID_CONTENT error when
115
+ // `allowContainerInPanel` is set.
116
+ if (options.allowContainerInPanel) {
116
117
  var _meta2 = error.meta;
117
118
  if ((_meta2 === null || _meta2 === void 0 ? void 0 : _meta2.parentType) === 'panel' && error.code === 'INVALID_CONTENT' && entity.type === 'expand') {
118
119
  return entity;
@@ -13,7 +13,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
13
13
  const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
14
14
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
15
15
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
16
- const packageVersion = "122.8.2";
16
+ const packageVersion = "122.9.0";
17
17
  const sanitiseSentryEvents = (data, _hint) => {
18
18
  // Remove URL as it has UGC
19
19
  // Ignored via go/ees007
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags/fg';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "122.8.2";
17
+ const packageVersion = "122.9.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -11,7 +11,7 @@ const errorCallbackFor = (marks, validate, dispatchAnalyticsEvent, validationOve
11
11
  ...options,
12
12
  allowNestedTables: validationOverrides === null || validationOverrides === void 0 ? void 0 : validationOverrides.allowNestedTables,
13
13
  allowTableInPanel: validationOverrides === null || validationOverrides === void 0 ? void 0 : validationOverrides.allowTableInPanel,
14
- allowExpandInPanel: validationOverrides === null || validationOverrides === void 0 ? void 0 : validationOverrides.allowExpandInPanel
14
+ allowContainerInPanel: validationOverrides === null || validationOverrides === void 0 ? void 0 : validationOverrides.allowContainerInPanel
15
15
  }, marks, validate, dispatchAnalyticsEvent);
16
16
  };
17
17
  };
@@ -95,9 +95,10 @@ export const validationErrorHandler = (entity, error, options, marks, validate,
95
95
 
96
96
  // panel_c1 is a ProseMirror-only variant: on save, expand-in-panel documents are stored as
97
97
  // plain ADF `panel` nodes containing an `expand`. The base validator-spec does not permit
98
- // `expand` inside `panel` (it's gated behind the experiment), so we suppress the
99
- // INVALID_CONTENT error when the experiment is active.
100
- if (options.allowExpandInPanel) {
98
+ // `expand` inside `panel` (it's gated behind the consolidated container-in-panel experiment,
99
+ // see `isPanelNestingContainerSupported`), so we suppress the INVALID_CONTENT error when
100
+ // `allowContainerInPanel` is set.
101
+ if (options.allowContainerInPanel) {
101
102
  const meta = error.meta;
102
103
  if ((meta === null || meta === void 0 ? void 0 : meta.parentType) === 'panel' && error.code === 'INVALID_CONTENT' && entity.type === 'expand') {
103
104
  return entity;
@@ -19,7 +19,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
19
19
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
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 = "122.8.2";
22
+ var packageVersion = "122.9.0";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags/fg';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "122.8.2";
24
+ var packageVersion = "122.9.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -13,7 +13,7 @@ var errorCallbackFor = function errorCallbackFor(marks, validate, dispatchAnalyt
13
13
  return validationErrorHandler(entity, error, _objectSpread(_objectSpread({}, options), {}, {
14
14
  allowNestedTables: validationOverrides === null || validationOverrides === void 0 ? void 0 : validationOverrides.allowNestedTables,
15
15
  allowTableInPanel: validationOverrides === null || validationOverrides === void 0 ? void 0 : validationOverrides.allowTableInPanel,
16
- allowExpandInPanel: validationOverrides === null || validationOverrides === void 0 ? void 0 : validationOverrides.allowExpandInPanel
16
+ allowContainerInPanel: validationOverrides === null || validationOverrides === void 0 ? void 0 : validationOverrides.allowContainerInPanel
17
17
  }), marks, validate, dispatchAnalyticsEvent);
18
18
  };
19
19
  };
@@ -97,9 +97,10 @@ export var validationErrorHandler = function validationErrorHandler(entity, erro
97
97
 
98
98
  // panel_c1 is a ProseMirror-only variant: on save, expand-in-panel documents are stored as
99
99
  // plain ADF `panel` nodes containing an `expand`. The base validator-spec does not permit
100
- // `expand` inside `panel` (it's gated behind the experiment), so we suppress the
101
- // INVALID_CONTENT error when the experiment is active.
102
- if (options.allowExpandInPanel) {
100
+ // `expand` inside `panel` (it's gated behind the consolidated container-in-panel experiment,
101
+ // see `isPanelNestingContainerSupported`), so we suppress the INVALID_CONTENT error when
102
+ // `allowContainerInPanel` is set.
103
+ if (options.allowContainerInPanel) {
103
104
  var _meta2 = error.meta;
104
105
  if ((_meta2 === null || _meta2 === void 0 ? void 0 : _meta2.parentType) === 'panel' && error.code === 'INVALID_CONTENT' && entity.type === 'expand') {
105
106
  return entity;
@@ -12,7 +12,7 @@ export declare const validationErrorHandler: (entity: ADFEntity, error: Validati
12
12
  type: string;
13
13
  } | undefined;
14
14
  export declare const validateADFEntity: (schema: Schema, node: ADFEntity, dispatchAnalyticsEvent?: DispatchAnalyticsEvent, validationOverrides?: {
15
- allowExpandInPanel?: boolean;
15
+ allowContainerInPanel?: boolean;
16
16
  allowNestedTables?: boolean;
17
17
  allowTableInPanel?: boolean;
18
18
  }, adfStage?: ADFStage) => ADFEntity;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "122.9.0",
3
+ "version": "122.9.1",
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/"
@@ -76,7 +76,7 @@
76
76
  "@atlaskit/profilecard": "^26.24.0",
77
77
  "@atlaskit/prosemirror-history": "^1.2.0",
78
78
  "@atlaskit/react-compiler-gating": "^0.2.0",
79
- "@atlaskit/react-ufo": "^7.10.0",
79
+ "@atlaskit/react-ufo": "^7.11.0",
80
80
  "@atlaskit/section-message": "^10.2.0",
81
81
  "@atlaskit/smart-card": "^45.24.0",
82
82
  "@atlaskit/smart-user-picker": "^11.8.0",