@atlaskit/renderer 109.40.9 → 109.40.11

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.
Files changed (46) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/actions/get-renderer-range-inline-node-names.js +1 -1
  3. package/dist/cjs/actions/index.js +2 -2
  4. package/dist/cjs/react/nodes/date.js +1 -3
  5. package/dist/cjs/react/nodes/emoji.js +2 -4
  6. package/dist/cjs/react/nodes/inlineCard.js +2 -4
  7. package/dist/cjs/react/nodes/mention.js +2 -4
  8. package/dist/cjs/react/nodes/status.js +2 -4
  9. package/dist/cjs/react/nodes/table.js +2 -3
  10. package/dist/cjs/steps/index.js +5 -5
  11. package/dist/cjs/ui/Renderer/index.js +1 -1
  12. package/dist/cjs/ui/Renderer/style.js +1 -4
  13. package/dist/cjs/ui/annotations/element/mark.js +3 -3
  14. package/dist/cjs/ui/annotations/element/useInlineAnnotationProps.js +2 -6
  15. package/dist/cjs/ui/annotations/selection/mounter.js +1 -1
  16. package/dist/es2019/actions/get-renderer-range-inline-node-names.js +2 -2
  17. package/dist/es2019/actions/index.js +3 -3
  18. package/dist/es2019/react/nodes/date.js +1 -3
  19. package/dist/es2019/react/nodes/emoji.js +3 -5
  20. package/dist/es2019/react/nodes/inlineCard.js +3 -5
  21. package/dist/es2019/react/nodes/mention.js +3 -5
  22. package/dist/es2019/react/nodes/status.js +3 -5
  23. package/dist/es2019/react/nodes/table.js +3 -4
  24. package/dist/es2019/steps/index.js +6 -6
  25. package/dist/es2019/ui/Renderer/index.js +1 -1
  26. package/dist/es2019/ui/Renderer/style.js +1 -4
  27. package/dist/es2019/ui/annotations/element/mark.js +4 -4
  28. package/dist/es2019/ui/annotations/element/useInlineAnnotationProps.js +3 -8
  29. package/dist/es2019/ui/annotations/selection/mounter.js +1 -1
  30. package/dist/esm/actions/get-renderer-range-inline-node-names.js +2 -2
  31. package/dist/esm/actions/index.js +3 -3
  32. package/dist/esm/react/nodes/date.js +1 -3
  33. package/dist/esm/react/nodes/emoji.js +3 -5
  34. package/dist/esm/react/nodes/inlineCard.js +3 -5
  35. package/dist/esm/react/nodes/mention.js +3 -5
  36. package/dist/esm/react/nodes/status.js +3 -5
  37. package/dist/esm/react/nodes/table.js +3 -4
  38. package/dist/esm/steps/index.js +6 -6
  39. package/dist/esm/ui/Renderer/index.js +1 -1
  40. package/dist/esm/ui/Renderer/style.js +1 -4
  41. package/dist/esm/ui/annotations/element/mark.js +4 -4
  42. package/dist/esm/ui/annotations/element/useInlineAnnotationProps.js +3 -7
  43. package/dist/esm/ui/annotations/selection/mounter.js +1 -1
  44. package/dist/types/ui/annotations/element/useInlineAnnotationProps.d.ts +1 -3
  45. package/dist/types-ts4.5/ui/annotations/element/useInlineAnnotationProps.d.ts +1 -3
  46. package/package.json +5 -11
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 109.40.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [#118361](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/118361)
8
+ [`5dc690bcdd97a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5dc690bcdd97a) -
9
+ Table FF cleanup
10
+ - Updated dependencies
11
+
12
+ ## 109.40.10
13
+
14
+ ### Patch Changes
15
+
16
+ - [#113218](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/113218)
17
+ [`d1b428ec29d68`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d1b428ec29d68) -
18
+ [ED-23765] migrate inline node commenting feature flags to statsig feature gate
19
+ - Updated dependencies
20
+
3
21
  ## 109.40.9
4
22
 
5
23
  ### Patch Changes
@@ -9,7 +9,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
9
  function getRendererRangeInlineNodeNames(_ref) {
10
10
  var actions = _ref.actions,
11
11
  pos = _ref.pos;
12
- if (!(0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
12
+ if (!(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
13
13
  return undefined;
14
14
  }
15
15
  var doc = actions.doc;
@@ -166,7 +166,7 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
166
166
  if (!range) {
167
167
  return false;
168
168
  }
169
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
169
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
170
170
  if (this.isRendererWithinRange(range)) {
171
171
  return false;
172
172
  }
@@ -335,7 +335,7 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
335
335
  }
336
336
 
337
337
  // TODO: Do not forget to remove `undefined` when the
338
- // `platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz` is removed.
338
+ // `editor_inline_comments_on_inline_nodes` is removed.
339
339
  }, {
340
340
  key: "getInlineNodeTypes",
341
341
  value: function getInlineNodeTypes(annotationId) {
@@ -17,9 +17,7 @@ var _useInlineAnnotationProps = require("../../ui/annotations/element/useInlineA
17
17
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
18
18
  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; }
19
19
  var Date = /*#__PURE__*/(0, _react.memo)(function Date(props) {
20
- var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props, {
21
- isInlineCard: false
22
- });
20
+ var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props);
23
21
  var timestamp = props.timestamp,
24
22
  parentIsIncompleteTask = props.parentIsIncompleteTask,
25
23
  intl = props.intl;
@@ -19,10 +19,8 @@ function EmojiItem(props) {
19
19
  text = props.text,
20
20
  fitToHeight = props.fitToHeight,
21
21
  resourceConfig = props.resourceConfig;
22
- var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props, {
23
- isInlineCard: false
24
- });
25
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
22
+ var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props);
23
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
26
24
  return (0, _react.jsx)("span", inlineAnnotationProps, (0, _react.jsx)(_emoji.Emoji, {
27
25
  allowTextFallback: true,
28
26
  id: id,
@@ -45,13 +45,11 @@ var InlineCard = function InlineCard(props) {
45
45
  // Below is added for the future implementation of Linking Platform namespaced analytic context
46
46
  location: 'renderer'
47
47
  };
48
- var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props, {
49
- isInlineCard: true
50
- });
48
+ var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props);
51
49
  if (ssr && url) {
52
50
  if (
53
51
  // eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage
54
- (0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
52
+ (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
55
53
  return (0, _react.jsx)("span", (0, _extends2.default)({
56
54
  "data-inline-card": true,
57
55
  "data-card-data": data ? JSON.stringify(data) : undefined,
@@ -18,10 +18,8 @@ var _default = exports.default = /*#__PURE__*/(0, _react.memo)(function MentionI
18
18
  text = props.text,
19
19
  accessLevel = props.accessLevel,
20
20
  localId = props.localId;
21
- var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props, {
22
- isInlineCard: false
23
- });
24
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
21
+ var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props);
22
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
25
23
  return /*#__PURE__*/_react.default.createElement("span", inlineAnnotationProps, /*#__PURE__*/_react.default.createElement(_mention.Mention, {
26
24
  id: id,
27
25
  text: text,
@@ -16,10 +16,8 @@ var _default = exports.default = /*#__PURE__*/(0, _react.memo)(function Status(p
16
16
  var text = props.text,
17
17
  color = props.color,
18
18
  localId = props.localId;
19
- var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props, {
20
- isInlineCard: false
21
- });
22
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
19
+ var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props);
20
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
23
21
  return /*#__PURE__*/_react.default.createElement("span", inlineAnnotationProps, /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext, {
24
22
  data: {
25
23
  userContext: 'document'
@@ -318,7 +318,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
318
318
  var tableWidth = calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode);
319
319
 
320
320
  // Logic for table alignment in renderer
321
- var isTableAlignStart = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.allow-table-alignment') && (0, _appearance.isFullWidthOrFullPageAppearance)(rendererAppearance) && tableNode && tableNode.attrs && tableNode.attrs.layout === 'align-start';
321
+ var isTableAlignStart = (0, _appearance.isFullWidthOrFullPageAppearance)(rendererAppearance) && tableNode && tableNode.attrs && tableNode.attrs.layout === 'align-start' && (0, _platformFeatureFlags.fg)('platform.editor.table.allow-table-alignment');
322
322
  var fullWidthLineLength = isRenderWidthValid ? Math.min(_editorSharedStyles.akEditorFullWidthLayoutWidth, renderWidth) : _editorSharedStyles.akEditorFullWidthLayoutWidth;
323
323
  var lineLength = (0, _appearance.isFullWidthAppearance)(rendererAppearance) ? fullWidthLineLength : lineLengthFixedWidth;
324
324
  var shouldCalculateLeftForAlignment = isTableAlignStart && ((0, _appearance.isFullPageAppearance)(rendererAppearance) && tableWidth <= lineLengthFixedWidth || (0, _appearance.isFullWidthAppearance)(rendererAppearance));
@@ -456,8 +456,7 @@ var TableWithWidth = function TableWithWidth(props) {
456
456
  return /*#__PURE__*/_react.default.createElement(_ui.WidthConsumer, null, function (_ref2) {
457
457
  var _props$columnWidths;
458
458
  var width = _ref2.width;
459
- // we are adding full page padding before but now it cause difference between editor and renderer so we need to remove it, and 1px also for matching exact width.
460
- var renderWidth = props.rendererAppearance === 'full-page' ? (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table-width-diff-in-renderer_x5s3z') ? width + _style.FullPagePadding - 1 : width - _style.FullPagePadding * 2 : width;
459
+ var renderWidth = props.rendererAppearance === 'full-page' ? width - _style.FullPagePadding * 2 : width;
461
460
  var colWidthsSum = ((_props$columnWidths = props.columnWidths) === null || _props$columnWidths === void 0 ? void 0 : _props$columnWidths.reduce(function (total, val) {
462
461
  return total + val;
463
462
  }, 0)) || 0;
@@ -90,7 +90,7 @@ function isNodeInlineTextMark(node) {
90
90
  */
91
91
  function hasInlineNodeDescendant(node) {
92
92
  if (isElementNode(node)) {
93
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
93
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
94
94
  if (node.dataset.annotationInlineNode === 'true') {
95
95
  return true;
96
96
  }
@@ -110,7 +110,7 @@ function resolveNodePos(node) {
110
110
  if (prev && (isTextNode(prev) || isHighlightTextNode(prev))) {
111
111
  resolvedPos += (prev.textContent || '').length;
112
112
  } else if (prev) {
113
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
113
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
114
114
  if (isNodeInlineTextMark(prev) && prev.textContent) {
115
115
  resolvedPos += prev.textContent.length;
116
116
  } else {
@@ -137,10 +137,10 @@ function resolvePos(node, offset) {
137
137
  if (!node) {
138
138
  return false;
139
139
  }
140
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
140
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
141
141
  var _node$parentElement;
142
142
  var startPosAncestor = (_node$parentElement = node.parentElement) === null || _node$parentElement === void 0 ? void 0 : _node$parentElement.closest('[data-renderer-start-pos');
143
- var potentialParent = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz') ? 'data-annotation-mark' : 'data-inline-card';
143
+ var potentialParent = (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? 'data-annotation-mark' : 'data-inline-card';
144
144
  if (startPosAncestor !== null && startPosAncestor !== void 0 && startPosAncestor.hasAttribute(potentialParent)) {
145
145
  if (findEnd) {
146
146
  return parseInt((startPosAncestor === null || startPosAncestor === void 0 ? void 0 : startPosAncestor.getAttribute('data-renderer-start-pos')) || '-1', 10) + 1;
@@ -168,7 +168,7 @@ function resolvePos(node, offset) {
168
168
  // If our range is inside an inline node
169
169
  // We need to move our pointers to parent element
170
170
  // since we don't want to count text inside inline nodes at all
171
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
171
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
172
172
  if (!(isNodeInlineTextMark(preParentPointer) || isHighlightTextNode(preParentPointer))) {
173
173
  current = current.parentElement;
174
174
  offset = 0;
@@ -56,7 +56,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
56
56
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
57
57
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
58
58
  var packageName = "@atlaskit/renderer";
59
- var packageVersion = "109.40.9";
59
+ var packageVersion = "109.40.11";
60
60
  var defaultNodeComponents = exports.defaultNodeComponents = _nodes.nodeToReact;
61
61
  var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
62
62
  (0, _inherits2.default)(Renderer, _PureComponent);
@@ -109,10 +109,7 @@ var getShadowOverrides = function getShadowOverrides() {
109
109
  };
110
110
  function getAnnotationStyles(_ref6) {
111
111
  var allowAnnotations = _ref6.allowAnnotations;
112
- if (!(0, _platformFeatureFlags.fg)('platform.editor.allow-inline-comments-for-inline-nodes')) {
113
- return '';
114
- }
115
- if ((0, _platformFeatureFlags.fg)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
112
+ if (!(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
116
113
  return '';
117
114
  }
118
115
  return (0, _react.css)({
@@ -23,7 +23,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
23
23
  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) { (0, _defineProperty2.default)(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; }
24
24
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState` is not object-safe
25
25
  var markStyles = function markStyles() {
26
- return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t}\n"])), _adfSchema.AnnotationMarkStates.ACTIVE, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz') ? (0, _styles.AnnotationSharedCSSByState)().common : '', (0, _styles.AnnotationSharedCSSByState)().blur, (0, _styles.AnnotationSharedCSSByState)().focus);
26
+ return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t}\n"])), _adfSchema.AnnotationMarkStates.ACTIVE, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? (0, _styles.AnnotationSharedCSSByState)().common : '', (0, _styles.AnnotationSharedCSSByState)().blur, (0, _styles.AnnotationSharedCSSByState)().focus);
27
27
  };
28
28
  var isMobile = function isMobile() {
29
29
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
@@ -73,7 +73,7 @@ var MarkComponent = exports.MarkComponent = function MarkComponent(_ref) {
73
73
  if (event.defaultPrevented || state !== _adfSchema.AnnotationMarkStates.ACTIVE) {
74
74
  return;
75
75
  }
76
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
76
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
77
77
  // We only want to interfere with click events if the click is on some ui inside the renderer document
78
78
  // This is to prevent the click events from portaled content (such as link previews and mention profiles)
79
79
  if (event.target instanceof HTMLElement && event.target.closest('.ak-renderer-document')) {
@@ -130,7 +130,7 @@ var MarkComponent = exports.MarkComponent = function MarkComponent(_ref) {
130
130
  };
131
131
  return (0, _react2.jsx)(useBlockLevel ? 'div' : 'mark', _objectSpread(_objectSpread(_objectSpread((0, _defineProperty2.default)({
132
132
  id: id
133
- }, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes') ? 'onClickCapture' : 'onClick', onMarkClick), accessibility), overriddenData), !useBlockLevel && {
133
+ }, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? 'onClickCapture' : 'onClick', onMarkClick), accessibility), overriddenData), !useBlockLevel && {
134
134
  css: [markStyles, getAccessibilityStyles()]
135
135
  }), children);
136
136
  };
@@ -7,13 +7,9 @@ exports.useInlineAnnotationProps = useInlineAnnotationProps;
7
7
  var _react = require("react");
8
8
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
9
  var _context = require("../context");
10
- function useInlineAnnotationProps(props, _ref) {
11
- var isInlineCard = _ref.isInlineCard;
10
+ function useInlineAnnotationProps(props) {
12
11
  var draftPosition = (0, _react.useContext)(_context.AnnotationsDraftContext);
13
- if (!isInlineCard && !(0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
14
- return {};
15
- }
16
- if (!(0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
12
+ if (!(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
17
13
  return {};
18
14
  }
19
15
  if (!props.dataAttributes) {
@@ -39,7 +39,7 @@ var SelectionInlineCommentMounter = exports.SelectionInlineCommentMounter = /*#_
39
39
  var providers = (0, _react.useContext)(_context.ProvidersContext);
40
40
  var isCommentsOnMediaBugFixEnabled = !!(providers !== null && providers !== void 0 && providers.inlineComment.isCommentsOnMediaBugFixEnabled);
41
41
  var inlineNodeTypes = (0, _react.useMemo)(function () {
42
- if (!(0, _platformFeatureFlags.fg)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
42
+ if (!(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
43
43
  return undefined;
44
44
  }
45
45
  if (actions.isValidAnnotationRange(range)) {
@@ -1,10 +1,10 @@
1
1
  import { getRangeInlineNodeNames } from '@atlaskit/editor-common/utils';
2
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
3
3
  export function getRendererRangeInlineNodeNames({
4
4
  actions,
5
5
  pos
6
6
  }) {
7
- if (!getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
7
+ if (!fg('editor_inline_comments_on_inline_nodes')) {
8
8
  return undefined;
9
9
  }
10
10
  const {
@@ -7,7 +7,7 @@ import { createAnnotationStep, getPosFromRange } from '../steps';
7
7
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
8
8
  import { getIndexMatch } from './matches-utils';
9
9
  import { getRendererRangeInlineNodeNames } from './get-renderer-range-inline-node-names';
10
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
11
11
  export default class RendererActions {
12
12
  // Any kind of refence is allowed
13
13
 
@@ -144,7 +144,7 @@ export default class RendererActions {
144
144
  if (!range) {
145
145
  return false;
146
146
  }
147
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
147
+ if (fg('editor_inline_comments_on_inline_nodes')) {
148
148
  if (this.isRendererWithinRange(range)) {
149
149
  return false;
150
150
  }
@@ -315,7 +315,7 @@ export default class RendererActions {
315
315
  }
316
316
 
317
317
  // TODO: Do not forget to remove `undefined` when the
318
- // `platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz` is removed.
318
+ // `editor_inline_comments_on_inline_nodes` is removed.
319
319
  getInlineNodeTypes(annotationId) {
320
320
  if (!this.doc || !this.schema) {
321
321
  return [];
@@ -6,9 +6,7 @@ import { injectIntl } from 'react-intl-next';
6
6
  import { useTaskItemsFormatContext } from '../../ui/TaskItemsFormatContext';
7
7
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
8
8
  const Date = /*#__PURE__*/memo(function Date(props) {
9
- const inlineAnnotationProps = useInlineAnnotationProps(props, {
10
- isInlineCard: false
11
- });
9
+ const inlineAnnotationProps = useInlineAnnotationProps(props);
12
10
  const {
13
11
  timestamp,
14
12
  parentIsIncompleteTask,
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
3
  import { jsx } from '@emotion/react';
4
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
5
5
  import { memo } from 'react';
6
6
  import { Emoji } from '@atlaskit/editor-common/emoji';
7
7
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
@@ -14,10 +14,8 @@ function EmojiItem(props) {
14
14
  fitToHeight,
15
15
  resourceConfig
16
16
  } = props;
17
- const inlineAnnotationProps = useInlineAnnotationProps(props, {
18
- isInlineCard: false
19
- });
20
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
17
+ const inlineAnnotationProps = useInlineAnnotationProps(props);
18
+ if (fg('editor_inline_comments_on_inline_nodes')) {
21
19
  return jsx("span", inlineAnnotationProps, jsx(Emoji, {
22
20
  allowTextFallback: true,
23
21
  id: id,
@@ -5,7 +5,7 @@ import { jsx } from '@emotion/react';
5
5
  import { Card } from '@atlaskit/smart-card';
6
6
  import { CardSSR } from '@atlaskit/smart-card/ssr';
7
7
  import { UnsupportedInline } from '@atlaskit/editor-common/ui';
8
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
8
+ import { fg } from '@atlaskit/platform-feature-flags';
9
9
  import { CardErrorBoundary } from './fallback';
10
10
  import { withSmartCardStorage } from '../../ui/SmartCardStorage';
11
11
  import { getCardClickHandler } from '../utils/getCardClickHandler';
@@ -40,13 +40,11 @@ const InlineCard = props => {
40
40
  // Below is added for the future implementation of Linking Platform namespaced analytic context
41
41
  location: 'renderer'
42
42
  };
43
- const inlineAnnotationProps = useInlineAnnotationProps(props, {
44
- isInlineCard: true
45
- });
43
+ const inlineAnnotationProps = useInlineAnnotationProps(props);
46
44
  if (ssr && url) {
47
45
  if (
48
46
  // eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage
49
- getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
47
+ fg('editor_inline_comments_on_inline_nodes')) {
50
48
  return jsx("span", _extends({
51
49
  "data-inline-card": true,
52
50
  "data-card-data": data ? JSON.stringify(data) : undefined,
@@ -1,6 +1,6 @@
1
1
  import React, { memo } from 'react';
2
2
  import { Mention } from '@atlaskit/editor-common/mention';
3
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
4
4
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
5
5
  export default /*#__PURE__*/memo(function MentionItem(props) {
6
6
  const {
@@ -11,10 +11,8 @@ export default /*#__PURE__*/memo(function MentionItem(props) {
11
11
  accessLevel,
12
12
  localId
13
13
  } = props;
14
- const inlineAnnotationProps = useInlineAnnotationProps(props, {
15
- isInlineCard: false
16
- });
17
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
14
+ const inlineAnnotationProps = useInlineAnnotationProps(props);
15
+ if (fg('editor_inline_comments_on_inline_nodes')) {
18
16
  return /*#__PURE__*/React.createElement("span", inlineAnnotationProps, /*#__PURE__*/React.createElement(Mention, {
19
17
  id: id,
20
18
  text: text,
@@ -1,7 +1,7 @@
1
1
  import React, { memo } from 'react';
2
2
  import { Status as AkStatus } from '@atlaskit/status/element';
3
3
  import { FabricElementsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
4
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
5
5
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
6
6
  export default /*#__PURE__*/memo(function Status(props) {
7
7
  const {
@@ -9,10 +9,8 @@ export default /*#__PURE__*/memo(function Status(props) {
9
9
  color,
10
10
  localId
11
11
  } = props;
12
- const inlineAnnotationProps = useInlineAnnotationProps(props, {
13
- isInlineCard: false
14
- });
15
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
12
+ const inlineAnnotationProps = useInlineAnnotationProps(props);
13
+ if (fg('editor_inline_comments_on_inline_nodes')) {
16
14
  return /*#__PURE__*/React.createElement("span", inlineAnnotationProps, /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
17
15
  data: {
18
16
  userContext: 'document'
@@ -7,7 +7,7 @@ import { createCompareNodes, convertProsemirrorTableNodeToArrayOfRows, hasMerged
7
7
  import { SortOrder } from '@atlaskit/editor-common/types';
8
8
  import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
9
9
  import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
10
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
11
11
  import { FullPagePadding } from '../../ui/Renderer/style';
12
12
  import { TableHeader } from './tableCell';
13
13
  import { withSmartCardStorage } from '../../ui/SmartCardStorage';
@@ -265,7 +265,7 @@ export class TableContainer extends React.Component {
265
265
  const tableWidth = calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode);
266
266
 
267
267
  // Logic for table alignment in renderer
268
- const isTableAlignStart = getBooleanFF('platform.editor.table.allow-table-alignment') && isFullWidthOrFullPageAppearance(rendererAppearance) && tableNode && tableNode.attrs && tableNode.attrs.layout === 'align-start';
268
+ const isTableAlignStart = isFullWidthOrFullPageAppearance(rendererAppearance) && tableNode && tableNode.attrs && tableNode.attrs.layout === 'align-start' && fg('platform.editor.table.allow-table-alignment');
269
269
  const fullWidthLineLength = isRenderWidthValid ? Math.min(akEditorFullWidthLayoutWidth, renderWidth) : akEditorFullWidthLayoutWidth;
270
270
  const lineLength = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLength : lineLengthFixedWidth;
271
271
  const shouldCalculateLeftForAlignment = isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidth <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance));
@@ -397,8 +397,7 @@ const TableWithWidth = props => {
397
397
  width
398
398
  }) => {
399
399
  var _props$columnWidths;
400
- // we are adding full page padding before but now it cause difference between editor and renderer so we need to remove it, and 1px also for matching exact width.
401
- const renderWidth = props.rendererAppearance === 'full-page' ? getBooleanFF('platform.editor.table-width-diff-in-renderer_x5s3z') ? width + FullPagePadding - 1 : width - FullPagePadding * 2 : width;
400
+ const renderWidth = props.rendererAppearance === 'full-page' ? width - FullPagePadding * 2 : width;
402
401
  const colWidthsSum = ((_props$columnWidths = props.columnWidths) === null || _props$columnWidths === void 0 ? void 0 : _props$columnWidths.reduce((total, val) => total + val, 0)) || 0;
403
402
  if (colWidthsSum || isTableResizingEnabled(props.rendererAppearance)) {
404
403
  return /*#__PURE__*/React.createElement(TableWithShadows, _extends({
@@ -1,4 +1,4 @@
1
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
1
+ import { fg } from '@atlaskit/platform-feature-flags';
2
2
  import { AddMarkStep } from '@atlaskit/editor-prosemirror/transform';
3
3
  function getStartPos(element) {
4
4
  return parseInt(element.dataset.rendererStartPos || '-1', 10);
@@ -86,7 +86,7 @@ function isNodeInlineTextMark(node) {
86
86
  */
87
87
  function hasInlineNodeDescendant(node) {
88
88
  if (isElementNode(node)) {
89
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
89
+ if (fg('editor_inline_comments_on_inline_nodes')) {
90
90
  if (node.dataset.annotationInlineNode === 'true') {
91
91
  return true;
92
92
  }
@@ -106,7 +106,7 @@ function resolveNodePos(node) {
106
106
  if (prev && (isTextNode(prev) || isHighlightTextNode(prev))) {
107
107
  resolvedPos += (prev.textContent || '').length;
108
108
  } else if (prev) {
109
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
109
+ if (fg('editor_inline_comments_on_inline_nodes')) {
110
110
  if (isNodeInlineTextMark(prev) && prev.textContent) {
111
111
  resolvedPos += prev.textContent.length;
112
112
  } else {
@@ -132,10 +132,10 @@ export function resolvePos(node, offset, findEnd = false) {
132
132
  if (!node) {
133
133
  return false;
134
134
  }
135
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
135
+ if (fg('editor_inline_comments_on_inline_nodes')) {
136
136
  var _node$parentElement;
137
137
  const startPosAncestor = (_node$parentElement = node.parentElement) === null || _node$parentElement === void 0 ? void 0 : _node$parentElement.closest('[data-renderer-start-pos');
138
- const potentialParent = getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz') ? 'data-annotation-mark' : 'data-inline-card';
138
+ const potentialParent = fg('editor_inline_comments_on_inline_nodes') ? 'data-annotation-mark' : 'data-inline-card';
139
139
  if (startPosAncestor !== null && startPosAncestor !== void 0 && startPosAncestor.hasAttribute(potentialParent)) {
140
140
  if (findEnd) {
141
141
  return parseInt((startPosAncestor === null || startPosAncestor === void 0 ? void 0 : startPosAncestor.getAttribute('data-renderer-start-pos')) || '-1', 10) + 1;
@@ -163,7 +163,7 @@ export function resolvePos(node, offset, findEnd = false) {
163
163
  // If our range is inside an inline node
164
164
  // We need to move our pointers to parent element
165
165
  // since we don't want to count text inside inline nodes at all
166
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
166
+ if (fg('editor_inline_comments_on_inline_nodes')) {
167
167
  if (!(isNodeInlineTextMark(preParentPointer) || isHighlightTextNode(preParentPointer))) {
168
168
  current = current.parentElement;
169
169
  offset = 0;
@@ -38,7 +38,7 @@ import { nodeToReact } from '../../react/nodes';
38
38
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
39
39
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
40
40
  const packageName = "@atlaskit/renderer";
41
- const packageVersion = "109.40.9";
41
+ const packageVersion = "109.40.11";
42
42
  export const defaultNodeComponents = nodeToReact;
43
43
  export class Renderer extends PureComponent {
44
44
  constructor(props) {
@@ -368,10 +368,7 @@ const getShadowOverrides = () => {
368
368
  function getAnnotationStyles({
369
369
  allowAnnotations
370
370
  }) {
371
- if (!fg('platform.editor.allow-inline-comments-for-inline-nodes')) {
372
- return '';
373
- }
374
- if (fg('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
371
+ if (!fg('editor_inline_comments_on_inline_nodes')) {
375
372
  return '';
376
373
  }
377
374
  return css({
@@ -6,7 +6,7 @@ import { css, jsx } from '@emotion/react';
6
6
  import FeatureGates from '@atlaskit/feature-gate-js-client';
7
7
  import { AnnotationSharedCSSByState } from '@atlaskit/editor-common/styles';
8
8
  import { AnnotationMarkStates } from '@atlaskit/adf-schema';
9
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
9
+ import { fg } from '@atlaskit/platform-feature-flags';
10
10
  import { useIntl } from 'react-intl-next';
11
11
  import { inlineCommentMessages } from '../../../messages';
12
12
 
@@ -17,7 +17,7 @@ const markStyles = () => css`
17
17
  -webkit-tap-highlight-color: transparent;
18
18
 
19
19
  &[data-mark-annotation-state='${AnnotationMarkStates.ACTIVE}'] {
20
- ${getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz') ? AnnotationSharedCSSByState().common : ''}
20
+ ${fg('editor_inline_comments_on_inline_nodes') ? AnnotationSharedCSSByState().common : ''}
21
21
  ${AnnotationSharedCSSByState().blur}
22
22
 
23
23
  &:focus,
@@ -71,7 +71,7 @@ export const MarkComponent = ({
71
71
  if (event.defaultPrevented || state !== AnnotationMarkStates.ACTIVE) {
72
72
  return;
73
73
  }
74
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
74
+ if (fg('editor_inline_comments_on_inline_nodes')) {
75
75
  // We only want to interfere with click events if the click is on some ui inside the renderer document
76
76
  // This is to prevent the click events from portaled content (such as link previews and mention profiles)
77
77
  if (event.target instanceof HTMLElement && event.target.closest('.ak-renderer-document')) {
@@ -130,7 +130,7 @@ export const MarkComponent = ({
130
130
  };
131
131
  return jsx(useBlockLevel ? 'div' : 'mark', {
132
132
  id,
133
- [getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes') ? 'onClickCapture' : 'onClick']: onMarkClick,
133
+ [fg('editor_inline_comments_on_inline_nodes') ? 'onClickCapture' : 'onClick']: onMarkClick,
134
134
  ...accessibility,
135
135
  ...overriddenData,
136
136
  ...(!useBlockLevel && {
@@ -1,14 +1,9 @@
1
1
  import { useContext } from 'react';
2
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
3
3
  import { AnnotationsDraftContext } from '../context';
4
- export function useInlineAnnotationProps(props, {
5
- isInlineCard
6
- }) {
4
+ export function useInlineAnnotationProps(props) {
7
5
  const draftPosition = useContext(AnnotationsDraftContext);
8
- if (!isInlineCard && !getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
9
- return {};
10
- }
11
- if (!getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
6
+ if (!fg('editor_inline_comments_on_inline_nodes')) {
12
7
  return {};
13
8
  }
14
9
  if (!props.dataAttributes) {
@@ -27,7 +27,7 @@ export const SelectionInlineCommentMounter = /*#__PURE__*/React.memo(props => {
27
27
  const providers = useContext(ProvidersContext);
28
28
  const isCommentsOnMediaBugFixEnabled = !!(providers !== null && providers !== void 0 && providers.inlineComment.isCommentsOnMediaBugFixEnabled);
29
29
  const inlineNodeTypes = useMemo(() => {
30
- if (!fg('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
30
+ if (!fg('editor_inline_comments_on_inline_nodes')) {
31
31
  return undefined;
32
32
  }
33
33
  if (actions.isValidAnnotationRange(range)) {
@@ -1,9 +1,9 @@
1
1
  import { getRangeInlineNodeNames } from '@atlaskit/editor-common/utils';
2
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
3
3
  export function getRendererRangeInlineNodeNames(_ref) {
4
4
  var actions = _ref.actions,
5
5
  pos = _ref.pos;
6
- if (!getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
6
+ if (!fg('editor_inline_comments_on_inline_nodes')) {
7
7
  return undefined;
8
8
  }
9
9
  var doc = actions.doc;
@@ -12,7 +12,7 @@ import { createAnnotationStep, getPosFromRange } from '../steps';
12
12
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
13
13
  import { getIndexMatch } from './matches-utils';
14
14
  import { getRendererRangeInlineNodeNames } from './get-renderer-range-inline-node-names';
15
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
15
+ import { fg } from '@atlaskit/platform-feature-flags';
16
16
  var RendererActions = /*#__PURE__*/function () {
17
17
  // Any kind of refence is allowed
18
18
 
@@ -159,7 +159,7 @@ var RendererActions = /*#__PURE__*/function () {
159
159
  if (!range) {
160
160
  return false;
161
161
  }
162
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
162
+ if (fg('editor_inline_comments_on_inline_nodes')) {
163
163
  if (this.isRendererWithinRange(range)) {
164
164
  return false;
165
165
  }
@@ -328,7 +328,7 @@ var RendererActions = /*#__PURE__*/function () {
328
328
  }
329
329
 
330
330
  // TODO: Do not forget to remove `undefined` when the
331
- // `platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz` is removed.
331
+ // `editor_inline_comments_on_inline_nodes` is removed.
332
332
  }, {
333
333
  key: "getInlineNodeTypes",
334
334
  value: function getInlineNodeTypes(annotationId) {
@@ -7,9 +7,7 @@ import { injectIntl } from 'react-intl-next';
7
7
  import { useTaskItemsFormatContext } from '../../ui/TaskItemsFormatContext';
8
8
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
9
9
  var Date = /*#__PURE__*/memo(function Date(props) {
10
- var inlineAnnotationProps = useInlineAnnotationProps(props, {
11
- isInlineCard: false
12
- });
10
+ var inlineAnnotationProps = useInlineAnnotationProps(props);
13
11
  var timestamp = props.timestamp,
14
12
  parentIsIncompleteTask = props.parentIsIncompleteTask,
15
13
  intl = props.intl;
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
3
  import { jsx } from '@emotion/react';
4
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
5
5
  import { memo } from 'react';
6
6
  import { Emoji } from '@atlaskit/editor-common/emoji';
7
7
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
@@ -12,10 +12,8 @@ function EmojiItem(props) {
12
12
  text = props.text,
13
13
  fitToHeight = props.fitToHeight,
14
14
  resourceConfig = props.resourceConfig;
15
- var inlineAnnotationProps = useInlineAnnotationProps(props, {
16
- isInlineCard: false
17
- });
18
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
15
+ var inlineAnnotationProps = useInlineAnnotationProps(props);
16
+ if (fg('editor_inline_comments_on_inline_nodes')) {
19
17
  return jsx("span", inlineAnnotationProps, jsx(Emoji, {
20
18
  allowTextFallback: true,
21
19
  id: id,
@@ -5,7 +5,7 @@ import { jsx } from '@emotion/react';
5
5
  import { Card } from '@atlaskit/smart-card';
6
6
  import { CardSSR } from '@atlaskit/smart-card/ssr';
7
7
  import { UnsupportedInline } from '@atlaskit/editor-common/ui';
8
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
8
+ import { fg } from '@atlaskit/platform-feature-flags';
9
9
  import { CardErrorBoundary } from './fallback';
10
10
  import { withSmartCardStorage } from '../../ui/SmartCardStorage';
11
11
  import { getCardClickHandler } from '../utils/getCardClickHandler';
@@ -37,13 +37,11 @@ var InlineCard = function InlineCard(props) {
37
37
  // Below is added for the future implementation of Linking Platform namespaced analytic context
38
38
  location: 'renderer'
39
39
  };
40
- var inlineAnnotationProps = useInlineAnnotationProps(props, {
41
- isInlineCard: true
42
- });
40
+ var inlineAnnotationProps = useInlineAnnotationProps(props);
43
41
  if (ssr && url) {
44
42
  if (
45
43
  // eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage
46
- getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
44
+ fg('editor_inline_comments_on_inline_nodes')) {
47
45
  return jsx("span", _extends({
48
46
  "data-inline-card": true,
49
47
  "data-card-data": data ? JSON.stringify(data) : undefined,
@@ -1,6 +1,6 @@
1
1
  import React, { memo } from 'react';
2
2
  import { Mention } from '@atlaskit/editor-common/mention';
3
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
4
4
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
5
5
  export default /*#__PURE__*/memo(function MentionItem(props) {
6
6
  var eventHandlers = props.eventHandlers,
@@ -9,10 +9,8 @@ export default /*#__PURE__*/memo(function MentionItem(props) {
9
9
  text = props.text,
10
10
  accessLevel = props.accessLevel,
11
11
  localId = props.localId;
12
- var inlineAnnotationProps = useInlineAnnotationProps(props, {
13
- isInlineCard: false
14
- });
15
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
12
+ var inlineAnnotationProps = useInlineAnnotationProps(props);
13
+ if (fg('editor_inline_comments_on_inline_nodes')) {
16
14
  return /*#__PURE__*/React.createElement("span", inlineAnnotationProps, /*#__PURE__*/React.createElement(Mention, {
17
15
  id: id,
18
16
  text: text,
@@ -1,16 +1,14 @@
1
1
  import React, { memo } from 'react';
2
2
  import { Status as AkStatus } from '@atlaskit/status/element';
3
3
  import { FabricElementsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
4
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
5
5
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
6
6
  export default /*#__PURE__*/memo(function Status(props) {
7
7
  var text = props.text,
8
8
  color = props.color,
9
9
  localId = props.localId;
10
- var inlineAnnotationProps = useInlineAnnotationProps(props, {
11
- isInlineCard: false
12
- });
13
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
10
+ var inlineAnnotationProps = useInlineAnnotationProps(props);
11
+ if (fg('editor_inline_comments_on_inline_nodes')) {
14
12
  return /*#__PURE__*/React.createElement("span", inlineAnnotationProps, /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
15
13
  data: {
16
14
  userContext: 'document'
@@ -18,7 +18,7 @@ import { createCompareNodes, convertProsemirrorTableNodeToArrayOfRows, hasMerged
18
18
  import { SortOrder } from '@atlaskit/editor-common/types';
19
19
  import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
20
20
  import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
21
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
21
+ import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import { FullPagePadding } from '../../ui/Renderer/style';
23
23
  import { TableHeader } from './tableCell';
24
24
  import { withSmartCardStorage } from '../../ui/SmartCardStorage';
@@ -311,7 +311,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
311
311
  var tableWidth = calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode);
312
312
 
313
313
  // Logic for table alignment in renderer
314
- var isTableAlignStart = getBooleanFF('platform.editor.table.allow-table-alignment') && isFullWidthOrFullPageAppearance(rendererAppearance) && tableNode && tableNode.attrs && tableNode.attrs.layout === 'align-start';
314
+ var isTableAlignStart = isFullWidthOrFullPageAppearance(rendererAppearance) && tableNode && tableNode.attrs && tableNode.attrs.layout === 'align-start' && fg('platform.editor.table.allow-table-alignment');
315
315
  var fullWidthLineLength = isRenderWidthValid ? Math.min(akEditorFullWidthLayoutWidth, renderWidth) : akEditorFullWidthLayoutWidth;
316
316
  var lineLength = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLength : lineLengthFixedWidth;
317
317
  var shouldCalculateLeftForAlignment = isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidth <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance));
@@ -449,8 +449,7 @@ var TableWithWidth = function TableWithWidth(props) {
449
449
  return /*#__PURE__*/React.createElement(WidthConsumer, null, function (_ref2) {
450
450
  var _props$columnWidths;
451
451
  var width = _ref2.width;
452
- // we are adding full page padding before but now it cause difference between editor and renderer so we need to remove it, and 1px also for matching exact width.
453
- var renderWidth = props.rendererAppearance === 'full-page' ? getBooleanFF('platform.editor.table-width-diff-in-renderer_x5s3z') ? width + FullPagePadding - 1 : width - FullPagePadding * 2 : width;
452
+ var renderWidth = props.rendererAppearance === 'full-page' ? width - FullPagePadding * 2 : width;
454
453
  var colWidthsSum = ((_props$columnWidths = props.columnWidths) === null || _props$columnWidths === void 0 ? void 0 : _props$columnWidths.reduce(function (total, val) {
455
454
  return total + val;
456
455
  }, 0)) || 0;
@@ -1,4 +1,4 @@
1
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
1
+ import { fg } from '@atlaskit/platform-feature-flags';
2
2
  import { AddMarkStep } from '@atlaskit/editor-prosemirror/transform';
3
3
  function getStartPos(element) {
4
4
  return parseInt(element.dataset.rendererStartPos || '-1', 10);
@@ -82,7 +82,7 @@ function isNodeInlineTextMark(node) {
82
82
  */
83
83
  function hasInlineNodeDescendant(node) {
84
84
  if (isElementNode(node)) {
85
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
85
+ if (fg('editor_inline_comments_on_inline_nodes')) {
86
86
  if (node.dataset.annotationInlineNode === 'true') {
87
87
  return true;
88
88
  }
@@ -102,7 +102,7 @@ function resolveNodePos(node) {
102
102
  if (prev && (isTextNode(prev) || isHighlightTextNode(prev))) {
103
103
  resolvedPos += (prev.textContent || '').length;
104
104
  } else if (prev) {
105
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
105
+ if (fg('editor_inline_comments_on_inline_nodes')) {
106
106
  if (isNodeInlineTextMark(prev) && prev.textContent) {
107
107
  resolvedPos += prev.textContent.length;
108
108
  } else {
@@ -129,10 +129,10 @@ export function resolvePos(node, offset) {
129
129
  if (!node) {
130
130
  return false;
131
131
  }
132
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
132
+ if (fg('editor_inline_comments_on_inline_nodes')) {
133
133
  var _node$parentElement;
134
134
  var startPosAncestor = (_node$parentElement = node.parentElement) === null || _node$parentElement === void 0 ? void 0 : _node$parentElement.closest('[data-renderer-start-pos');
135
- var potentialParent = getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz') ? 'data-annotation-mark' : 'data-inline-card';
135
+ var potentialParent = fg('editor_inline_comments_on_inline_nodes') ? 'data-annotation-mark' : 'data-inline-card';
136
136
  if (startPosAncestor !== null && startPosAncestor !== void 0 && startPosAncestor.hasAttribute(potentialParent)) {
137
137
  if (findEnd) {
138
138
  return parseInt((startPosAncestor === null || startPosAncestor === void 0 ? void 0 : startPosAncestor.getAttribute('data-renderer-start-pos')) || '-1', 10) + 1;
@@ -160,7 +160,7 @@ export function resolvePos(node, offset) {
160
160
  // If our range is inside an inline node
161
161
  // We need to move our pointers to parent element
162
162
  // since we don't want to count text inside inline nodes at all
163
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
163
+ if (fg('editor_inline_comments_on_inline_nodes')) {
164
164
  if (!(isNodeInlineTextMark(preParentPointer) || isHighlightTextNode(preParentPointer))) {
165
165
  current = current.parentElement;
166
166
  offset = 0;
@@ -48,7 +48,7 @@ import { nodeToReact } from '../../react/nodes';
48
48
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
49
49
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
50
50
  var packageName = "@atlaskit/renderer";
51
- var packageVersion = "109.40.9";
51
+ var packageVersion = "109.40.11";
52
52
  export var defaultNodeComponents = nodeToReact;
53
53
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
54
54
  _inherits(Renderer, _PureComponent);
@@ -101,10 +101,7 @@ var getShadowOverrides = function getShadowOverrides() {
101
101
  };
102
102
  function getAnnotationStyles(_ref6) {
103
103
  var allowAnnotations = _ref6.allowAnnotations;
104
- if (!fg('platform.editor.allow-inline-comments-for-inline-nodes')) {
105
- return '';
106
- }
107
- if (fg('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
104
+ if (!fg('editor_inline_comments_on_inline_nodes')) {
108
105
  return '';
109
106
  }
110
107
  return css({
@@ -12,13 +12,13 @@ import { css, jsx } from '@emotion/react';
12
12
  import FeatureGates from '@atlaskit/feature-gate-js-client';
13
13
  import { AnnotationSharedCSSByState } from '@atlaskit/editor-common/styles';
14
14
  import { AnnotationMarkStates } from '@atlaskit/adf-schema';
15
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
15
+ import { fg } from '@atlaskit/platform-feature-flags';
16
16
  import { useIntl } from 'react-intl-next';
17
17
  import { inlineCommentMessages } from '../../../messages';
18
18
 
19
19
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState` is not object-safe
20
20
  var markStyles = function markStyles() {
21
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t}\n"])), AnnotationMarkStates.ACTIVE, getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz') ? AnnotationSharedCSSByState().common : '', AnnotationSharedCSSByState().blur, AnnotationSharedCSSByState().focus);
21
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t}\n"])), AnnotationMarkStates.ACTIVE, fg('editor_inline_comments_on_inline_nodes') ? AnnotationSharedCSSByState().common : '', AnnotationSharedCSSByState().blur, AnnotationSharedCSSByState().focus);
22
22
  };
23
23
  var isMobile = function isMobile() {
24
24
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
@@ -68,7 +68,7 @@ export var MarkComponent = function MarkComponent(_ref) {
68
68
  if (event.defaultPrevented || state !== AnnotationMarkStates.ACTIVE) {
69
69
  return;
70
70
  }
71
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
71
+ if (fg('editor_inline_comments_on_inline_nodes')) {
72
72
  // We only want to interfere with click events if the click is on some ui inside the renderer document
73
73
  // This is to prevent the click events from portaled content (such as link previews and mention profiles)
74
74
  if (event.target instanceof HTMLElement && event.target.closest('.ak-renderer-document')) {
@@ -125,7 +125,7 @@ export var MarkComponent = function MarkComponent(_ref) {
125
125
  };
126
126
  return jsx(useBlockLevel ? 'div' : 'mark', _objectSpread(_objectSpread(_objectSpread(_defineProperty({
127
127
  id: id
128
- }, getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes') ? 'onClickCapture' : 'onClick', onMarkClick), accessibility), overriddenData), !useBlockLevel && {
128
+ }, fg('editor_inline_comments_on_inline_nodes') ? 'onClickCapture' : 'onClick', onMarkClick), accessibility), overriddenData), !useBlockLevel && {
129
129
  css: [markStyles, getAccessibilityStyles()]
130
130
  }), children);
131
131
  };
@@ -1,13 +1,9 @@
1
1
  import { useContext } from 'react';
2
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
3
3
  import { AnnotationsDraftContext } from '../context';
4
- export function useInlineAnnotationProps(props, _ref) {
5
- var isInlineCard = _ref.isInlineCard;
4
+ export function useInlineAnnotationProps(props) {
6
5
  var draftPosition = useContext(AnnotationsDraftContext);
7
- if (!isInlineCard && !getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
8
- return {};
9
- }
10
- if (!getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
6
+ if (!fg('editor_inline_comments_on_inline_nodes')) {
11
7
  return {};
12
8
  }
13
9
  if (!props.dataAttributes) {
@@ -29,7 +29,7 @@ export var SelectionInlineCommentMounter = /*#__PURE__*/React.memo(function (pro
29
29
  var providers = useContext(ProvidersContext);
30
30
  var isCommentsOnMediaBugFixEnabled = !!(providers !== null && providers !== void 0 && providers.inlineComment.isCommentsOnMediaBugFixEnabled);
31
31
  var inlineNodeTypes = useMemo(function () {
32
- if (!fg('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
32
+ if (!fg('editor_inline_comments_on_inline_nodes')) {
33
33
  return undefined;
34
34
  }
35
35
  if (actions.isValidAnnotationRange(range)) {
@@ -3,9 +3,7 @@ export type MarkDataAttributes = {
3
3
  'data-renderer-start-pos': number;
4
4
  };
5
5
  };
6
- export declare function useInlineAnnotationProps(props: MarkDataAttributes, { isInlineCard }: {
7
- isInlineCard: boolean;
8
- }): {
6
+ export declare function useInlineAnnotationProps(props: MarkDataAttributes): {
9
7
  'data-renderer-mark'?: undefined;
10
8
  'data-annotation-draft-mark'?: undefined;
11
9
  'data-annotation-inline-node'?: undefined;
@@ -3,9 +3,7 @@ export type MarkDataAttributes = {
3
3
  'data-renderer-start-pos': number;
4
4
  };
5
5
  };
6
- export declare function useInlineAnnotationProps(props: MarkDataAttributes, { isInlineCard }: {
7
- isInlineCard: boolean;
8
- }): {
6
+ export declare function useInlineAnnotationProps(props: MarkDataAttributes): {
9
7
  'data-renderer-mark'?: undefined;
10
8
  'data-annotation-draft-mark'?: undefined;
11
9
  'data-annotation-inline-node'?: undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "109.40.9",
3
+ "version": "109.40.11",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,16 +29,16 @@
29
29
  "@atlaskit/analytics-listeners": "^8.10.0",
30
30
  "@atlaskit/analytics-namespaced-context": "^6.10.0",
31
31
  "@atlaskit/analytics-next": "^9.3.0",
32
- "@atlaskit/button": "^18.1.0",
32
+ "@atlaskit/button": "^18.3.0",
33
33
  "@atlaskit/code": "^15.4.0",
34
- "@atlaskit/editor-common": "^84.0.0",
34
+ "@atlaskit/editor-common": "^84.3.0",
35
35
  "@atlaskit/editor-json-transformer": "^8.15.0",
36
36
  "@atlaskit/editor-palette": "1.6.0",
37
37
  "@atlaskit/editor-prosemirror": "4.0.1",
38
38
  "@atlaskit/editor-shared-styles": "^2.12.0",
39
39
  "@atlaskit/emoji": "^67.6.0",
40
40
  "@atlaskit/feature-gate-js-client": "^4.18.0",
41
- "@atlaskit/icon": "^22.5.0",
41
+ "@atlaskit/icon": "^22.6.0",
42
42
  "@atlaskit/link-datasource": "^2.5.0",
43
43
  "@atlaskit/media-card": "^78.0.0",
44
44
  "@atlaskit/media-client": "^27.3.0",
@@ -125,16 +125,10 @@
125
125
  "platform.editor.inline_extension.extended_lcqdn": {
126
126
  "type": "boolean"
127
127
  },
128
- "platform.editor.table-width-diff-in-renderer_x5s3z": {
129
- "type": "boolean"
130
- },
131
128
  "platform_editor_tables_padding_increase": {
132
129
  "type": "boolean"
133
130
  },
134
- "platform.editor.allow-inline-comments-for-inline-nodes": {
135
- "type": "boolean"
136
- },
137
- "platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz": {
131
+ "editor_inline_comments_on_inline_nodes": {
138
132
  "type": "boolean"
139
133
  },
140
134
  "platform.editor.renderer-error-boundary-for-dom-errors": {