@atlaskit/editor-common 123.5.0 → 123.5.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,13 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 123.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`74360ce048e56`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/74360ce048e56) -
8
+ FFCLEANUP-196833 Cleanup `platform_editor_adf_validator_stage0`
9
+ - Updated dependencies
10
+
3
11
  ## 123.5.0
4
12
 
5
13
  ### 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 = "123.4.2";
30
+ var packageVersion = "123.5.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 = "123.4.2";
27
+ var packageVersion = "123.5.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -13,7 +13,6 @@ Object.defineProperty(exports, "wrapWithUnsupported", {
13
13
  });
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
15
  var _validator = require("@atlaskit/adf-utils/validator");
16
- var _fg = require("@atlaskit/platform-feature-flags/fg");
17
16
  var _analytics = require("../analytics");
18
17
  var _ADFStages = require("./ADFStages");
19
18
  var _trackUnsupportedContent = require("./track-unsupported-content");
@@ -94,28 +93,14 @@ var validationErrorHandler = exports.validationErrorHandler = function validatio
94
93
  }
95
94
  }
96
95
 
97
- // panel_c1 is a ProseMirror-only variant: on save, table-in-panel documents are stored as
98
- // plain ADF `panel` nodes containing a `table`. The base validator-spec does not permit
99
- // `table` inside `panel`, so suppress the INVALID_CONTENT error when the experiment is active.
100
- // This suppression is blunt, allowing a table in every panel, and applies only while
101
- // `platform_editor_adf_validator_stage0` is off. With that gate on, adf-utils offers the stage-0
102
- // `panel_c1` variants and accepts table-in-panel positionally instead, in `doc`, a layout column
103
- // and a synced block only.
104
- if (options.allowTableInPanel && !(0, _fg.fg)('platform_editor_adf_validator_stage0')) {
105
- var _meta = error.meta;
106
- if ((_meta === null || _meta === void 0 ? void 0 : _meta.parentType) === 'panel' && error.code === 'INVALID_CONTENT' && entity.type === 'table') {
107
- return entity;
108
- }
109
- }
110
-
111
96
  // panel_c1 is a ProseMirror-only variant: on save, expand-in-panel documents are stored as
112
97
  // plain ADF `panel` nodes containing an `expand`. The base validator-spec does not permit
113
98
  // `expand` inside `panel` (it's gated behind the consolidated container-in-panel experiment,
114
99
  // see `isPanelNestingContainerSupported`), so we suppress the INVALID_CONTENT error when
115
100
  // `allowContainerInPanel` is set.
116
101
  if (options.allowContainerInPanel) {
117
- var _meta2 = error.meta;
118
- if ((_meta2 === null || _meta2 === void 0 ? void 0 : _meta2.parentType) === 'panel' && error.code === 'INVALID_CONTENT' && entity.type === 'expand') {
102
+ var _meta = error.meta;
103
+ if ((_meta === null || _meta === void 0 ? void 0 : _meta.parentType) === 'panel' && error.code === 'INVALID_CONTENT' && entity.type === 'expand') {
119
104
  return entity;
120
105
  }
121
106
  }
@@ -179,7 +164,6 @@ var validateADFEntity = exports.validateADFEntity = function validateADFEntity(s
179
164
  // because a document holding a stage-0-only construct, such as a `layoutSection` with one column,
180
165
  // otherwise has that content wrapped as unsupported. Editors carry such constructs by design,
181
166
  // since the editor's own schema enables them, and renderers meet them in stored documents.
182
- // `stage0` is only observable while `platform_editor_adf_validator_stage0` is enabled.
183
167
  var validate = (0, _validator.validator)(nodes, marks, {
184
168
  allowPrivateAttributes: true,
185
169
  stage0: adfStage !== _ADFStages.ADFStages.FINAL
@@ -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 = "123.4.2";
16
+ const packageVersion = "123.5.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 = "123.4.2";
17
+ const packageVersion = "123.5.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -1,5 +1,4 @@
1
1
  import { validator } from '@atlaskit/adf-utils/validator';
2
- import { fg } from '@atlaskit/platform-feature-flags/fg';
3
2
  import { ACTION_SUBJECT_ID } from '../analytics';
4
3
  export const UNSUPPORTED_NODE_ATTRIBUTE = 'unsupportedNodeAttribute';
5
4
  import { ADFStages } from './ADFStages';
@@ -79,20 +78,6 @@ export const validationErrorHandler = (entity, error, options, marks, validate,
79
78
  }
80
79
  }
81
80
 
82
- // panel_c1 is a ProseMirror-only variant: on save, table-in-panel documents are stored as
83
- // plain ADF `panel` nodes containing a `table`. The base validator-spec does not permit
84
- // `table` inside `panel`, so suppress the INVALID_CONTENT error when the experiment is active.
85
- // This suppression is blunt, allowing a table in every panel, and applies only while
86
- // `platform_editor_adf_validator_stage0` is off. With that gate on, adf-utils offers the stage-0
87
- // `panel_c1` variants and accepts table-in-panel positionally instead, in `doc`, a layout column
88
- // and a synced block only.
89
- if (options.allowTableInPanel && !fg('platform_editor_adf_validator_stage0')) {
90
- const meta = error.meta;
91
- if ((meta === null || meta === void 0 ? void 0 : meta.parentType) === 'panel' && error.code === 'INVALID_CONTENT' && entity.type === 'table') {
92
- return entity;
93
- }
94
- }
95
-
96
81
  // panel_c1 is a ProseMirror-only variant: on save, expand-in-panel documents are stored as
97
82
  // plain ADF `panel` nodes containing an `expand`. The base validator-spec does not permit
98
83
  // `expand` inside `panel` (it's gated behind the consolidated container-in-panel experiment,
@@ -160,7 +145,6 @@ export const validateADFEntity = (schema, node, dispatchAnalyticsEvent, validati
160
145
  // because a document holding a stage-0-only construct, such as a `layoutSection` with one column,
161
146
  // otherwise has that content wrapped as unsupported. Editors carry such constructs by design,
162
147
  // since the editor's own schema enables them, and renderers meet them in stored documents.
163
- // `stage0` is only observable while `platform_editor_adf_validator_stage0` is enabled.
164
148
  const validate = validator(nodes, marks, {
165
149
  allowPrivateAttributes: true,
166
150
  stage0: adfStage !== ADFStages.FINAL
@@ -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 = "123.4.2";
22
+ var packageVersion = "123.5.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 = "123.4.2";
24
+ var packageVersion = "123.5.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -2,7 +2,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  import { validator } from '@atlaskit/adf-utils/validator';
5
- import { fg } from '@atlaskit/platform-feature-flags/fg';
6
5
  import { ACTION_SUBJECT_ID } from '../analytics';
7
6
  export var UNSUPPORTED_NODE_ATTRIBUTE = 'unsupportedNodeAttribute';
8
7
  import { ADFStages } from './ADFStages';
@@ -81,28 +80,14 @@ export var validationErrorHandler = function validationErrorHandler(entity, erro
81
80
  }
82
81
  }
83
82
 
84
- // panel_c1 is a ProseMirror-only variant: on save, table-in-panel documents are stored as
85
- // plain ADF `panel` nodes containing a `table`. The base validator-spec does not permit
86
- // `table` inside `panel`, so suppress the INVALID_CONTENT error when the experiment is active.
87
- // This suppression is blunt, allowing a table in every panel, and applies only while
88
- // `platform_editor_adf_validator_stage0` is off. With that gate on, adf-utils offers the stage-0
89
- // `panel_c1` variants and accepts table-in-panel positionally instead, in `doc`, a layout column
90
- // and a synced block only.
91
- if (options.allowTableInPanel && !fg('platform_editor_adf_validator_stage0')) {
92
- var _meta = error.meta;
93
- if ((_meta === null || _meta === void 0 ? void 0 : _meta.parentType) === 'panel' && error.code === 'INVALID_CONTENT' && entity.type === 'table') {
94
- return entity;
95
- }
96
- }
97
-
98
83
  // panel_c1 is a ProseMirror-only variant: on save, expand-in-panel documents are stored as
99
84
  // plain ADF `panel` nodes containing an `expand`. The base validator-spec does not permit
100
85
  // `expand` inside `panel` (it's gated behind the consolidated container-in-panel experiment,
101
86
  // see `isPanelNestingContainerSupported`), so we suppress the INVALID_CONTENT error when
102
87
  // `allowContainerInPanel` is set.
103
88
  if (options.allowContainerInPanel) {
104
- var _meta2 = error.meta;
105
- if ((_meta2 === null || _meta2 === void 0 ? void 0 : _meta2.parentType) === 'panel' && error.code === 'INVALID_CONTENT' && entity.type === 'expand') {
89
+ var _meta = error.meta;
90
+ if ((_meta === null || _meta === void 0 ? void 0 : _meta.parentType) === 'panel' && error.code === 'INVALID_CONTENT' && entity.type === 'expand') {
106
91
  return entity;
107
92
  }
108
93
  }
@@ -166,7 +151,6 @@ export var validateADFEntity = function validateADFEntity(schema, node, dispatch
166
151
  // because a document holding a stage-0-only construct, such as a `layoutSection` with one column,
167
152
  // otherwise has that content wrapped as unsupported. Editors carry such constructs by design,
168
153
  // since the editor's own schema enables them, and renderers meet them in stored documents.
169
- // `stage0` is only observable while `platform_editor_adf_validator_stage0` is enabled.
170
154
  var validate = validator(nodes, marks, {
171
155
  allowPrivateAttributes: true,
172
156
  stage0: adfStage !== ADFStages.FINAL
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "123.5.0",
3
+ "version": "123.5.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/"
@@ -162,10 +162,6 @@
162
162
  "platform_editor_hide_configure_lozenge_non_configurable": {
163
163
  "type": "boolean"
164
164
  },
165
- "platform_editor_adf_validator_stage0": {
166
- "type": "boolean",
167
- "referenceOnly": true
168
- },
169
165
  "rovo_skill_tag_label_wrapping": {
170
166
  "type": "boolean",
171
167
  "referenceOnly": true