@atlaskit/renderer 124.10.2 → 124.10.3

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/renderer
2
2
 
3
+ ## 124.10.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4660917b9e6b9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4660917b9e6b9) -
8
+ Cleaned platform_editor_nested_table_extension_comment_fix FG.
9
+ - Updated dependencies
10
+
3
11
  ## 124.10.2
4
12
 
5
13
  ### Patch Changes
@@ -16,26 +16,7 @@ var _enums = require("../../analytics/enums");
16
16
  var _analytics = require("@atlaskit/editor-common/analytics");
17
17
  var _annotations = require("../../ui/annotations");
18
18
  var _ValidationContext = require("../../ui/Renderer/ValidationContext");
19
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
20
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 _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); }
21
- var ValidationContextWrapper = function ValidationContextWrapper(_ref) {
22
- var children = _ref.children;
23
- // We override validation of nested tables in nested renderers as invalid ADF (but valid Prosemirror)
24
- // may have been introduced in the parent renderer's render and subsequent transformations.
25
- // For example - nested tables which are transformed from an extension node in ADF
26
- // to native Prosemirror nested table nodes in and this is invalid ADF.
27
- var validationContextValue = (0, _react.useMemo)(function () {
28
- return {
29
- allowNestedTables: true
30
- };
31
- }, []);
32
- if (!(0, _platformFeatureFlags.fg)('platform_editor_nested_table_extension_comment_fix')) {
33
- return children;
34
- }
35
- return /*#__PURE__*/_react.default.createElement(_ValidationContext.ValidationContextProvider, {
36
- value: validationContextValue
37
- }, children);
38
- };
39
20
  var BodiedExtension = function BodiedExtension(props) {
40
21
  var children = props.children,
41
22
  _props$layout = props.layout,
@@ -55,6 +36,11 @@ var BodiedExtension = function BodiedExtension(props) {
55
36
  .map(function (child) {
56
37
  return /*#__PURE__*/_react.default.isValidElement(child) ? child.props.nodeType === 'table' : false;
57
38
  }).every(Boolean);
39
+ var validationContextValue = (0, _react.useMemo)(function () {
40
+ return {
41
+ allowNestedTables: true
42
+ };
43
+ }, []);
58
44
  return /*#__PURE__*/_react.default.createElement(_ErrorBoundary.ErrorBoundary, {
59
45
  component: _enums.ACTION_SUBJECT.RENDERER,
60
46
  componentId: _analytics.ACTION_SUBJECT_ID.EXTENSION_BODIED,
@@ -64,13 +50,15 @@ var BodiedExtension = function BodiedExtension(props) {
64
50
  value: {
65
51
  startPos: props.startPos + 1
66
52
  }
67
- }, /*#__PURE__*/_react.default.createElement(ValidationContextWrapper, null, /*#__PURE__*/_react.default.createElement(_ExtensionRenderer.default
53
+ }, /*#__PURE__*/_react.default.createElement(_ValidationContext.ValidationContextProvider, {
54
+ value: validationContextValue
55
+ }, /*#__PURE__*/_react.default.createElement(_ExtensionRenderer.default
68
56
  // Ignored via go/ees005
69
57
  // eslint-disable-next-line react/jsx-props-no-spreading
70
58
  , (0, _extends2.default)({}, props, {
71
59
  type: "bodiedExtension"
72
- }), function (_ref2) {
73
- var result = _ref2.result;
60
+ }), function (_ref) {
61
+ var result = _ref.result;
74
62
  try {
75
63
  if (result && /*#__PURE__*/_react.default.isValidElement(result)) {
76
64
  // Return the content directly if it's a valid JSX.Element
@@ -70,10 +70,7 @@ var _validation = function _validation(doc, schema, adfStage, useSpecBasedValida
70
70
 
71
71
  // Convert nested-table extensions into nested tables
72
72
  try {
73
- var _transformNestedTable = (0, _transforms.transformNestedTablesIncomingDocument)(result, {
74
- environment: 'renderer',
75
- disableNestedRendererTreatment: (0, _platformFeatureFlags.fg)('platform_editor_nested_table_extension_comment_fix')
76
- }),
73
+ var _transformNestedTable = (0, _transforms.transformNestedTablesIncomingDocument)(result),
77
74
  _transformedAdf = _transformNestedTable.transformedAdf,
78
75
  _isTransformed = _transformNestedTable.isTransformed;
79
76
  if (_isTransformed) {
@@ -69,7 +69,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
69
69
  // we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
70
70
  var TABLE_INFO_TIMEOUT = 10000;
71
71
  var packageName = "@atlaskit/renderer";
72
- var packageVersion = "124.10.1";
72
+ var packageVersion = "0.0.0-development";
73
73
  var setAsQueryContainerStyles = (0, _react2.css)({
74
74
  containerName: 'ak-renderer-wrapper',
75
75
  containerType: 'inline-size'
@@ -8,24 +8,6 @@ import { ACTION_SUBJECT } from '../../analytics/enums';
8
8
  import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
9
9
  import { AnnotationsPositionContext } from '../../ui/annotations';
10
10
  import { ValidationContextProvider } from '../../ui/Renderer/ValidationContext';
11
- import { fg } from '@atlaskit/platform-feature-flags';
12
- const ValidationContextWrapper = ({
13
- children
14
- }) => {
15
- // We override validation of nested tables in nested renderers as invalid ADF (but valid Prosemirror)
16
- // may have been introduced in the parent renderer's render and subsequent transformations.
17
- // For example - nested tables which are transformed from an extension node in ADF
18
- // to native Prosemirror nested table nodes in and this is invalid ADF.
19
- const validationContextValue = useMemo(() => ({
20
- allowNestedTables: true
21
- }), []);
22
- if (!fg('platform_editor_nested_table_extension_comment_fix')) {
23
- return children;
24
- }
25
- return /*#__PURE__*/React.createElement(ValidationContextProvider, {
26
- value: validationContextValue
27
- }, children);
28
- };
29
11
  const BodiedExtension = props => {
30
12
  const {
31
13
  children,
@@ -44,6 +26,9 @@ const BodiedExtension = props => {
44
26
  // Ignored via go/ees005
45
27
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
46
28
  .map(child => /*#__PURE__*/React.isValidElement(child) ? child.props.nodeType === 'table' : false).every(Boolean);
29
+ const validationContextValue = useMemo(() => ({
30
+ allowNestedTables: true
31
+ }), []);
47
32
  return /*#__PURE__*/React.createElement(ErrorBoundary, {
48
33
  component: ACTION_SUBJECT.RENDERER,
49
34
  componentId: ACTION_SUBJECT_ID.EXTENSION_BODIED,
@@ -53,7 +38,9 @@ const BodiedExtension = props => {
53
38
  value: {
54
39
  startPos: props.startPos + 1
55
40
  }
56
- }, /*#__PURE__*/React.createElement(ValidationContextWrapper, null, /*#__PURE__*/React.createElement(ExtensionRenderer
41
+ }, /*#__PURE__*/React.createElement(ValidationContextProvider, {
42
+ value: validationContextValue
43
+ }, /*#__PURE__*/React.createElement(ExtensionRenderer
57
44
  // Ignored via go/ees005
58
45
  // eslint-disable-next-line react/jsx-props-no-spreading
59
46
  , _extends({}, props, {
@@ -66,10 +66,7 @@ const _validation = (doc, schema, adfStage, useSpecBasedValidator, dispatchAnaly
66
66
  const {
67
67
  transformedAdf,
68
68
  isTransformed
69
- } = transformNestedTablesIncomingDocument(result, {
70
- environment: 'renderer',
71
- disableNestedRendererTreatment: fg('platform_editor_nested_table_extension_comment_fix')
72
- });
69
+ } = transformNestedTablesIncomingDocument(result);
73
70
  if (isTransformed) {
74
71
  dispatchAnalyticsEvent === null || dispatchAnalyticsEvent === void 0 ? void 0 : dispatchAnalyticsEvent({
75
72
  action: ACTION.NESTED_TABLE_TRANSFORMED,
@@ -55,7 +55,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
55
55
  // we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
56
56
  const TABLE_INFO_TIMEOUT = 10000;
57
57
  const packageName = "@atlaskit/renderer";
58
- const packageVersion = "124.10.1";
58
+ const packageVersion = "0.0.0-development";
59
59
  const setAsQueryContainerStyles = css({
60
60
  containerName: 'ak-renderer-wrapper',
61
61
  containerType: 'inline-size'
@@ -8,25 +8,6 @@ import { ACTION_SUBJECT } from '../../analytics/enums';
8
8
  import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
9
9
  import { AnnotationsPositionContext } from '../../ui/annotations';
10
10
  import { ValidationContextProvider } from '../../ui/Renderer/ValidationContext';
11
- import { fg } from '@atlaskit/platform-feature-flags';
12
- var ValidationContextWrapper = function ValidationContextWrapper(_ref) {
13
- var children = _ref.children;
14
- // We override validation of nested tables in nested renderers as invalid ADF (but valid Prosemirror)
15
- // may have been introduced in the parent renderer's render and subsequent transformations.
16
- // For example - nested tables which are transformed from an extension node in ADF
17
- // to native Prosemirror nested table nodes in and this is invalid ADF.
18
- var validationContextValue = useMemo(function () {
19
- return {
20
- allowNestedTables: true
21
- };
22
- }, []);
23
- if (!fg('platform_editor_nested_table_extension_comment_fix')) {
24
- return children;
25
- }
26
- return /*#__PURE__*/React.createElement(ValidationContextProvider, {
27
- value: validationContextValue
28
- }, children);
29
- };
30
11
  var BodiedExtension = function BodiedExtension(props) {
31
12
  var children = props.children,
32
13
  _props$layout = props.layout,
@@ -46,6 +27,11 @@ var BodiedExtension = function BodiedExtension(props) {
46
27
  .map(function (child) {
47
28
  return /*#__PURE__*/React.isValidElement(child) ? child.props.nodeType === 'table' : false;
48
29
  }).every(Boolean);
30
+ var validationContextValue = useMemo(function () {
31
+ return {
32
+ allowNestedTables: true
33
+ };
34
+ }, []);
49
35
  return /*#__PURE__*/React.createElement(ErrorBoundary, {
50
36
  component: ACTION_SUBJECT.RENDERER,
51
37
  componentId: ACTION_SUBJECT_ID.EXTENSION_BODIED,
@@ -55,13 +41,15 @@ var BodiedExtension = function BodiedExtension(props) {
55
41
  value: {
56
42
  startPos: props.startPos + 1
57
43
  }
58
- }, /*#__PURE__*/React.createElement(ValidationContextWrapper, null, /*#__PURE__*/React.createElement(ExtensionRenderer
44
+ }, /*#__PURE__*/React.createElement(ValidationContextProvider, {
45
+ value: validationContextValue
46
+ }, /*#__PURE__*/React.createElement(ExtensionRenderer
59
47
  // Ignored via go/ees005
60
48
  // eslint-disable-next-line react/jsx-props-no-spreading
61
49
  , _extends({}, props, {
62
50
  type: "bodiedExtension"
63
- }), function (_ref2) {
64
- var result = _ref2.result;
51
+ }), function (_ref) {
52
+ var result = _ref.result;
65
53
  try {
66
54
  if (result && /*#__PURE__*/React.isValidElement(result)) {
67
55
  // Return the content directly if it's a valid JSX.Element
@@ -63,10 +63,7 @@ var _validation = function _validation(doc, schema, adfStage, useSpecBasedValida
63
63
 
64
64
  // Convert nested-table extensions into nested tables
65
65
  try {
66
- var _transformNestedTable = transformNestedTablesIncomingDocument(result, {
67
- environment: 'renderer',
68
- disableNestedRendererTreatment: fg('platform_editor_nested_table_extension_comment_fix')
69
- }),
66
+ var _transformNestedTable = transformNestedTablesIncomingDocument(result),
70
67
  _transformedAdf = _transformNestedTable.transformedAdf,
71
68
  _isTransformed = _transformNestedTable.isTransformed;
72
69
  if (_isTransformed) {
@@ -60,7 +60,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
60
60
  // we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
61
61
  var TABLE_INFO_TIMEOUT = 10000;
62
62
  var packageName = "@atlaskit/renderer";
63
- var packageVersion = "124.10.1";
63
+ var packageVersion = "0.0.0-development";
64
64
  var setAsQueryContainerStyles = css({
65
65
  containerName: 'ak-renderer-wrapper',
66
66
  containerType: 'inline-size'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "124.10.2",
3
+ "version": "124.10.3",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -58,9 +58,9 @@
58
58
  "@atlaskit/status": "^3.0.0",
59
59
  "@atlaskit/task-decision": "^19.2.0",
60
60
  "@atlaskit/theme": "^21.0.0",
61
- "@atlaskit/tmp-editor-statsig": "^13.31.0",
61
+ "@atlaskit/tmp-editor-statsig": "^13.32.0",
62
62
  "@atlaskit/tokens": "^7.1.0",
63
- "@atlaskit/tooltip": "^20.7.0",
63
+ "@atlaskit/tooltip": "^20.8.0",
64
64
  "@atlaskit/visually-hidden": "^3.0.0",
65
65
  "@babel/runtime": "^7.0.0",
66
66
  "@emotion/react": "^11.7.1",
@@ -194,9 +194,6 @@
194
194
  "platform_editor_bordered_panel_nested_in_table": {
195
195
  "type": "boolean"
196
196
  },
197
- "platform_editor_nested_table_extension_comment_fix": {
198
- "type": "boolean"
199
- },
200
197
  "platform_editor__renderer_indentation_text_margin": {
201
198
  "type": "boolean"
202
199
  },