@atlaskit/editor-common 94.16.0 → 94.17.0

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 (39) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/cjs/analytics/types/enums.js +1 -0
  3. package/dist/cjs/analytics/types/nested-table-events.js +5 -0
  4. package/dist/cjs/monitoring/error.js +1 -1
  5. package/dist/cjs/resizer/BreakoutResizer.js +38 -9
  6. package/dist/cjs/styles/shared/resizer.js +1 -1
  7. package/dist/cjs/ui/DropList/index.js +1 -1
  8. package/dist/cjs/utils/processRawValue.js +51 -4
  9. package/dist/es2019/analytics/types/enums.js +1 -0
  10. package/dist/es2019/analytics/types/nested-table-events.js +1 -0
  11. package/dist/es2019/monitoring/error.js +1 -1
  12. package/dist/es2019/resizer/BreakoutResizer.js +40 -10
  13. package/dist/es2019/styles/shared/resizer.js +5 -0
  14. package/dist/es2019/ui/DropList/index.js +1 -1
  15. package/dist/es2019/utils/processRawValue.js +54 -4
  16. package/dist/esm/analytics/types/enums.js +1 -0
  17. package/dist/esm/analytics/types/nested-table-events.js +1 -0
  18. package/dist/esm/monitoring/error.js +1 -1
  19. package/dist/esm/resizer/BreakoutResizer.js +39 -10
  20. package/dist/esm/styles/shared/resizer.js +1 -1
  21. package/dist/esm/ui/DropList/index.js +1 -1
  22. package/dist/esm/utils/processRawValue.js +51 -4
  23. package/dist/types/analytics/types/enums.d.ts +1 -0
  24. package/dist/types/analytics/types/events.d.ts +2 -1
  25. package/dist/types/analytics/types/general-events.d.ts +3 -1
  26. package/dist/types/analytics/types/nested-table-events.d.ts +4 -0
  27. package/dist/types/resizer/BreakoutResizer.d.ts +4 -3
  28. package/dist/types/resizer/Resizer.d.ts +2 -0
  29. package/dist/types/resizer/types.d.ts +1 -1
  30. package/dist/types/utils/processRawValue.d.ts +1 -1
  31. package/dist/types-ts4.5/analytics/types/enums.d.ts +1 -0
  32. package/dist/types-ts4.5/analytics/types/events.d.ts +2 -1
  33. package/dist/types-ts4.5/analytics/types/general-events.d.ts +3 -1
  34. package/dist/types-ts4.5/analytics/types/nested-table-events.d.ts +4 -0
  35. package/dist/types-ts4.5/resizer/BreakoutResizer.d.ts +4 -3
  36. package/dist/types-ts4.5/resizer/Resizer.d.ts +2 -0
  37. package/dist/types-ts4.5/resizer/types.d.ts +1 -1
  38. package/dist/types-ts4.5/utils/processRawValue.d.ts +1 -1
  39. package/package.json +8 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 94.17.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#162388](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/162388)
8
+ [`ac57b50211fdc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ac57b50211fdc) -
9
+ add 'clamped' option to resizer prop HandleSize which uses CSS to alter height of handle, add
10
+ logic to ensure handles are visible when selection is inside node
11
+ - [#162298](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/162298)
12
+ [`f5893b7270927`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f5893b7270927) -
13
+ ED-25498 Integrate transformNestedTablesIncomingDocument with Editor and Renderer to transform
14
+ nested table extensions
15
+
16
+ ## 94.16.1
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
3
22
  ## 94.16.0
4
23
 
5
24
  ### Minor Changes
@@ -123,6 +123,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
123
123
  ACTION["RENDERED"] = "rendered";
124
124
  ACTION["ON_EDITOR_READY_CALLBACK"] = "onEditorReadyCallback";
125
125
  ACTION["ON_CHANGE_CALLBACK"] = "onChangeCalled";
126
+ ACTION["NESTED_TABLE_TRANSFORMED"] = "nestedTableTransformed";
126
127
  ACTION["NEW_COLLAB_SYNC_UP_ERROR_NO_STEPS"] = "newCollabSyncUpErrorNoSteps";
127
128
  ACTION["REMOVE_ICON"] = "removedIcon";
128
129
  ACTION["INVALID_PROSEMIRROR_DOCUMENT"] = "invalidProsemirrorDocument";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "94.16.0";
20
+ var packageVersion = "94.17.0";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // TODO: Sanitise the URL instead of just removing it
@@ -31,10 +31,16 @@ var getHandleStyle = function getHandleStyle(node) {
31
31
  var handleOffset = (0, _experiments.editorExperiment)('nested-dnd', true) ? _styles.LAYOUT_COLUMN_PADDING * 2 + 8 : _styles.LAYOUT_COLUMN_PADDING * 2;
32
32
  return {
33
33
  left: {
34
- left: "-".concat(handleOffset, "px")
34
+ left: "-".concat(handleOffset, "px"),
35
+ height: 'calc(100% - 8px)',
36
+ bottom: '0px',
37
+ top: 'unset'
35
38
  },
36
39
  right: {
37
- right: "-".concat(handleOffset, "px")
40
+ right: "-".concat(handleOffset, "px"),
41
+ height: 'calc(100% - 8px)',
42
+ bottom: '0px',
43
+ top: 'unset'
38
44
  }
39
45
  };
40
46
  }
@@ -51,11 +57,12 @@ var ignoreResizerMutations = exports.ignoreResizerMutations = function ignoreRes
51
57
  */
52
58
  var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
53
59
  var editorView = _ref.editorView,
54
- node = _ref.node,
60
+ nodeType = _ref.nodeType,
55
61
  getPos = _ref.getPos,
56
62
  getRef = _ref.getRef,
57
63
  disabled = _ref.disabled,
58
- getEditorWidth = _ref.getEditorWidth;
64
+ getEditorWidth = _ref.getEditorWidth,
65
+ parentRef = _ref.parentRef;
59
66
  var _useState = (0, _react.useState)({
60
67
  minWidth: undefined,
61
68
  maxWidth: undefined,
@@ -67,6 +74,24 @@ var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
67
74
  maxWidth = _useState2$.maxWidth,
68
75
  isResizing = _useState2$.isResizing,
69
76
  setResizingState = _useState2[1];
77
+
78
+ // Relying on re-renders caused by selection changes inside/around node
79
+ var isSelectionInNode = (0, _react.useMemo)(function () {
80
+ var pos = getPos();
81
+ if (pos === undefined) {
82
+ return false;
83
+ }
84
+ var node = editorView.state.doc.nodeAt(pos);
85
+ if (node === null) {
86
+ return false;
87
+ }
88
+ var endPos = pos + node.nodeSize;
89
+ var startPos = pos;
90
+ var _editorView$state$sel = editorView.state.selection,
91
+ $from = _editorView$state$sel.$from,
92
+ $to = _editorView$state$sel.$to;
93
+ return $from.pos >= startPos && endPos >= $to.pos;
94
+ }, [editorView.state.doc, editorView.state.selection, getPos]);
70
95
  var handleResizeStart = (0, _react.useCallback)(function () {
71
96
  var newMinWidth;
72
97
  var newMaxWidth;
@@ -100,7 +125,7 @@ var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
100
125
  width: Math.max(newWidth, _editorSharedStyles.akEditorDefaultLayoutWidth)
101
126
  })]);
102
127
  }
103
- newTr.setMeta('is-resizer-resizing', false);
128
+ newTr.setMeta('is-resizer-resizing', false).setMeta('scrollIntoView', false);
104
129
  dispatch(newTr);
105
130
  setResizingState({
106
131
  isResizing: false,
@@ -121,7 +146,7 @@ var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
121
146
  left: true,
122
147
  right: true
123
148
  },
124
- handleStyles: getHandleStyle(node),
149
+ handleStyles: getHandleStyle(nodeType),
125
150
  minWidth: minWidth,
126
151
  maxWidth: maxWidth
127
152
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
@@ -131,10 +156,14 @@ var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
131
156
  left: '50%',
132
157
  transform: 'translateX(-50%)'
133
158
  } : undefined,
134
- resizeRatio: 2,
135
159
  handleResizeStart: handleResizeStart,
136
160
  handleResizeStop: handleResizeStop,
137
- handleSize: "small",
138
- childrenDOMRef: getRef
161
+ childrenDOMRef: getRef,
162
+ resizeRatio: 2,
163
+ isHandleVisible: isSelectionInNode,
164
+ handleSize: "clamped",
165
+ handleHighlight: "full-height",
166
+ handlePositioning: "adjacent",
167
+ handleAlignmentMethod: "sticky"
139
168
  });
140
169
  };
@@ -27,4 +27,4 @@ var handleWrapperClass = exports.handleWrapperClass = 'resizer-handle-wrapper';
27
27
  var resizerHandleZIndex = exports.resizerHandleZIndex = 1;
28
28
 
29
29
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766, Seems perfectly safe to autofix, but comments would be lost…
30
- var resizerStyles = exports.resizerStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\twill-change: width;\n\n\t\t&:hover,\n\t\t&.display-handle {\n\t\t\t& > .", " > .", " {\n\t\t\t\tvisibility: visible;\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\n\t\t&.is-resizing {\n\t\t\t& .", " {\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\n\t\t&.", " {\n\t\t\t& .", " {\n\t\t\t\ttransition: none;\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tdisplay: flex;\n\t\tvisibility: hidden;\n\t\topacity: 0;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\twidth: 7px;\n\t\ttransition:\n\t\t\tvisibility 0.2s,\n\t\t\topacity 0.2s;\n\n\t\t/*\n NOTE: The below style is targeted at the div element added by the tooltip. We don't have any means of injecting styles\n into the tooltip\n */\n\t\t& div[role='presentation'] {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\tmargin-top: ", ";\n\t\t\twhite-space: normal;\n\t\t}\n\n\t\t/*\n Handle Positions\n */\n\t\t&.left {\n\t\t\talign-items: flex-start;\n\t\t}\n\t\t&.right {\n\t\t\talign-items: flex-end;\n\t\t}\n\n\t\t/*\n Handle Sizing\n */\n\t\t&.small {\n\t\t\t& .", " {\n\t\t\t\theight: 43px;\n\t\t\t}\n\t\t}\n\t\t&.medium {\n\t\t\t& .", " {\n\t\t\t\theight: 64px;\n\t\t\t}\n\t\t}\n\t\t&.large {\n\t\t\t& .", " {\n\t\t\t\theight: 96px;\n\t\t\t}\n\t\t}\n\n\t\t/*\n Handle Alignment\n */\n\t\t&.sticky {\n\t\t\t& .", " {\n\t\t\t\tposition: sticky;\n\t\t\t\ttop: ", ";\n\t\t\t\tbottom: ", ";\n\t\t\t}\n\t\t}\n\n\t\t&:hover {\n\t\t\t& .", " {\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\n\t\t\t& .", " {\n\t\t\t\tvisibility: visible;\n\t\t\t\topacity: 0.5;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tcontent: ' ';\n\t\tdisplay: flex;\n\t\twidth: 3px;\n\t\tmargin: 0 ", ";\n\t\theight: 64px;\n\t\ttransition: background-color 0.2s;\n\t\tborder-radius: 6px;\n\t\tborder: 0;\n\t\tpadding: 0;\n\t\tz-index: 2;\n\t\toutline: none;\n\t\tmin-height: 24px;\n\t\tbackground: ", ";\n\n\t\t&:hover {\n\t\t\tcursor: col-resize;\n\t\t}\n\n\t\t&:focus {\n\t\t\tbackground: ", ";\n\n\t\t\t&::after {\n\t\t\t\tcontent: '';\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: ", ";\n\t\t\t\tright: ", ";\n\t\t\t\tbottom: ", ";\n\t\t\t\tleft: ", ";\n\t\t\t\tborder: 2px solid ", ";\n\t\t\t\tborder-radius: inherit;\n\t\t\t\tz-index: -1;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tvisibility: hidden;\n\t\tposition: absolute;\n\t\twidth: 7px;\n\t\theight: calc(100% - 40px);\n\t\tborder-radius: 4px;\n\t\topacity: 0;\n\t\ttransition:\n\t\t\tbackground-color 0.2s,\n\t\t\tvisibility 0.2s,\n\t\t\topacity 0.2s;\n\n\t\t&.none {\n\t\t\tbackground: none;\n\t\t}\n\n\t\t&.shadow {\n\t\t\tbackground: ", ";\n\t\t}\n\n\t\t&.full-height {\n\t\t\tbackground: ", ";\n\t\t\theight: 100%;\n\t\t\tmin-height: 36px;\n\t\t}\n\t}\n\n\t.", " {\n\t\t& .", " {\n\t\t\tbackground: ", ";\n\t\t}\n\t}\n\n\t.", " {\n\t\tposition: relative;\n\t\tdisplay: inline-block;\n\t\twidth: 100%;\n\n\t\t&.", " {\n\t\t\tpadding: 0 ", ";\n\t\t\tleft: ", ";\n\t\t}\n\t}\n\n\t// This below style is here to make sure the image width is correct when nested in a table\n\ttable .", ", table .", ".", " {\n\t\tpadding: unset;\n\t\tleft: unset;\n\t}\n"])), resizerItemClassName, handleWrapperClass, resizerHandleClassName, resizerHandleThumbClassName, "var(--ds-border-focused, #388BFF)", resizerDangerClassName, resizerHandleThumbClassName, "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), resizerHandleClassName, "var(--ds-space-negative-200, -16px)", resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", resizerHandleThumbClassName, "var(--ds-border-focused, #388BFF)", resizerHandleTrackClassName, resizerHandleThumbClassName, "var(--ds-space-025, 2px)", "var(--ds-border, #091E4224)", "var(--ds-border-selected, #0C66E4)", "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-050, -4px)", "var(--ds-border-focused, #388BFF)", resizerHandleTrackClassName, "var(--ds-background-selected, #E9F2FF)", "var(--ds-background-selected, #E9F2FF)", akEditorSelectedNodeClassName, resizerHandleThumbClassName, "var(--ds-border-focused, #388BFF)", resizerHoverZoneClassName, resizerExtendedZone, "var(--ds-space-150, 12px)", "var(--ds-space-negative-150, -12px)", resizerHoverZoneClassName, resizerHoverZoneClassName, resizerExtendedZone);
30
+ var resizerStyles = exports.resizerStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\twill-change: width;\n\n\t\t&:hover,\n\t\t&.display-handle {\n\t\t\t& > .", " > .", " {\n\t\t\t\tvisibility: visible;\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\n\t\t&.is-resizing {\n\t\t\t& .", " {\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\n\t\t&.", " {\n\t\t\t& .", " {\n\t\t\t\ttransition: none;\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tdisplay: flex;\n\t\tvisibility: hidden;\n\t\topacity: 0;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\twidth: 7px;\n\t\ttransition:\n\t\t\tvisibility 0.2s,\n\t\t\topacity 0.2s;\n\n\t\t/*\n NOTE: The below style is targeted at the div element added by the tooltip. We don't have any means of injecting styles\n into the tooltip\n */\n\t\t& div[role='presentation'] {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\tmargin-top: ", ";\n\t\t\twhite-space: normal;\n\t\t}\n\n\t\t/*\n Handle Positions\n */\n\t\t&.left {\n\t\t\talign-items: flex-start;\n\t\t}\n\t\t&.right {\n\t\t\talign-items: flex-end;\n\t\t}\n\n\t\t/*\n Handle Sizing\n */\n\t\t&.small {\n\t\t\t& .", " {\n\t\t\t\theight: 43px;\n\t\t\t}\n\t\t}\n\t\t&.medium {\n\t\t\t& .", " {\n\t\t\t\theight: 64px;\n\t\t\t}\n\t\t}\n\t\t&.large {\n\t\t\t& .", " {\n\t\t\t\theight: 96px;\n\t\t\t}\n\t\t}\n\t\t&.clamped {\n\t\t\t& .", " {\n\t\t\t\theight: clamp(43px, calc(100% - 32px), 96px);\n\t\t\t}\n\t\t}\n\n\t\t/*\n Handle Alignment\n */\n\t\t&.sticky {\n\t\t\t& .", " {\n\t\t\t\tposition: sticky;\n\t\t\t\ttop: ", ";\n\t\t\t\tbottom: ", ";\n\t\t\t}\n\t\t}\n\n\t\t&:hover {\n\t\t\t& .", " {\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\n\t\t\t& .", " {\n\t\t\t\tvisibility: visible;\n\t\t\t\topacity: 0.5;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tcontent: ' ';\n\t\tdisplay: flex;\n\t\twidth: 3px;\n\t\tmargin: 0 ", ";\n\t\theight: 64px;\n\t\ttransition: background-color 0.2s;\n\t\tborder-radius: 6px;\n\t\tborder: 0;\n\t\tpadding: 0;\n\t\tz-index: 2;\n\t\toutline: none;\n\t\tmin-height: 24px;\n\t\tbackground: ", ";\n\n\t\t&:hover {\n\t\t\tcursor: col-resize;\n\t\t}\n\n\t\t&:focus {\n\t\t\tbackground: ", ";\n\n\t\t\t&::after {\n\t\t\t\tcontent: '';\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: ", ";\n\t\t\t\tright: ", ";\n\t\t\t\tbottom: ", ";\n\t\t\t\tleft: ", ";\n\t\t\t\tborder: 2px solid ", ";\n\t\t\t\tborder-radius: inherit;\n\t\t\t\tz-index: -1;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tvisibility: hidden;\n\t\tposition: absolute;\n\t\twidth: 7px;\n\t\theight: calc(100% - 40px);\n\t\tborder-radius: 4px;\n\t\topacity: 0;\n\t\ttransition:\n\t\t\tbackground-color 0.2s,\n\t\t\tvisibility 0.2s,\n\t\t\topacity 0.2s;\n\n\t\t&.none {\n\t\t\tbackground: none;\n\t\t}\n\n\t\t&.shadow {\n\t\t\tbackground: ", ";\n\t\t}\n\n\t\t&.full-height {\n\t\t\tbackground: ", ";\n\t\t\theight: 100%;\n\t\t\tmin-height: 36px;\n\t\t}\n\t}\n\n\t.", " {\n\t\t& .", " {\n\t\t\tbackground: ", ";\n\t\t}\n\t}\n\n\t.", " {\n\t\tposition: relative;\n\t\tdisplay: inline-block;\n\t\twidth: 100%;\n\n\t\t&.", " {\n\t\t\tpadding: 0 ", ";\n\t\t\tleft: ", ";\n\t\t}\n\t}\n\n\t// This below style is here to make sure the image width is correct when nested in a table\n\ttable .", ", table .", ".", " {\n\t\tpadding: unset;\n\t\tleft: unset;\n\t}\n"])), resizerItemClassName, handleWrapperClass, resizerHandleClassName, resizerHandleThumbClassName, "var(--ds-border-focused, #388BFF)", resizerDangerClassName, resizerHandleThumbClassName, "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), resizerHandleClassName, "var(--ds-space-negative-200, -16px)", resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", resizerHandleThumbClassName, "var(--ds-border-focused, #388BFF)", resizerHandleTrackClassName, resizerHandleThumbClassName, "var(--ds-space-025, 2px)", "var(--ds-border, #091E4224)", "var(--ds-border-selected, #0C66E4)", "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-050, -4px)", "var(--ds-border-focused, #388BFF)", resizerHandleTrackClassName, "var(--ds-background-selected, #E9F2FF)", "var(--ds-background-selected, #E9F2FF)", akEditorSelectedNodeClassName, resizerHandleThumbClassName, "var(--ds-border-focused, #388BFF)", resizerHoverZoneClassName, resizerExtendedZone, "var(--ds-space-150, 12px)", "var(--ds-space-negative-150, -12px)", resizerHoverZoneClassName, resizerHoverZoneClassName, resizerExtendedZone);
@@ -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 = "94.16.0";
27
+ var packageVersion = "94.17.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var DropList = /*#__PURE__*/function (_Component) {
@@ -4,14 +4,50 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.processRawValue = processRawValue;
7
- exports.processRawValueWithoutTransformation = processRawValueWithoutTransformation;
7
+ exports.processRawValueWithoutValidation = processRawValueWithoutValidation;
8
8
  var _transforms = require("@atlaskit/adf-utils/transforms");
9
9
  var _model = require("@atlaskit/editor-prosemirror/model");
10
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
11
  var _analytics = require("../analytics");
11
12
  var _privacyFilter = require("./filter/privacy-filter");
12
13
  var _trackUnsupportedContent = require("./track-unsupported-content");
13
14
  var _validateUsingSpec = require("./validate-using-spec");
14
- function processRawValueWithoutTransformation(schema, value) {
15
+ var transformNestedTablesWithAnalytics = function transformNestedTablesWithAnalytics(node, dispatchAnalyticsEvent) {
16
+ try {
17
+ var _transformNestedTable = (0, _transforms.transformNestedTablesIncomingDocument)(node),
18
+ transformedAdf = _transformNestedTable.transformedAdf,
19
+ isTransformed = _transformNestedTable.isTransformed;
20
+ if (isTransformed && dispatchAnalyticsEvent) {
21
+ dispatchAnalyticsEvent({
22
+ action: _analytics.ACTION.NESTED_TABLE_TRANSFORMED,
23
+ actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
24
+ eventType: _analytics.EVENT_TYPE.OPERATIONAL
25
+ });
26
+ return {
27
+ transformedAdf: transformedAdf,
28
+ isTransformed: isTransformed
29
+ };
30
+ }
31
+ } catch (e) {
32
+ // eslint-disable-next-line no-console
33
+ console.error('Failed to transform one or more nested tables in the document');
34
+ if (dispatchAnalyticsEvent) {
35
+ dispatchAnalyticsEvent({
36
+ action: _analytics.ACTION.DOCUMENT_PROCESSING_ERROR,
37
+ actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
38
+ eventType: _analytics.EVENT_TYPE.OPERATIONAL,
39
+ attributes: {
40
+ errorMessage: 'Failed to transform one or more nested tables in the document'
41
+ }
42
+ });
43
+ }
44
+ }
45
+ return {
46
+ transformedAdf: node,
47
+ isTransformed: false
48
+ };
49
+ };
50
+ function processRawValueWithoutValidation(schema, value, dispatchAnalyticsEvent) {
15
51
  if (!value) {
16
52
  return;
17
53
  }
@@ -27,8 +63,14 @@ function processRawValueWithoutTransformation(schema, value) {
27
63
  } else {
28
64
  node = value;
29
65
  }
30
- var parsedDoc = _model.Node.fromJSON(schema, node);
31
- return parsedDoc;
66
+ if ((0, _platformFeatureFlags.fg)('platform_editor_use_nested_table_pm_nodes')) {
67
+ // Convert nested-table extensions into nested tables
68
+ var _transformNestedTable2 = transformNestedTablesWithAnalytics(node, dispatchAnalyticsEvent),
69
+ transformedAdf = _transformNestedTable2.transformedAdf;
70
+ return _model.Node.fromJSON(schema, transformedAdf);
71
+ } else {
72
+ return _model.Node.fromJSON(schema, node);
73
+ }
32
74
  }
33
75
  function processRawValue(schema, value, providerFactory, sanitizePrivateContent, contentTransformer, dispatchAnalyticsEvent) {
34
76
  if (!value) {
@@ -156,6 +198,11 @@ function processRawValue(schema, value, providerFactory, sanitizePrivateContent,
156
198
  eventType: _analytics.EVENT_TYPE.OPERATIONAL
157
199
  });
158
200
  }
201
+ if ((0, _platformFeatureFlags.fg)('platform_editor_use_nested_table_pm_nodes')) {
202
+ // Convert nested-table extensions into nested tables
203
+ var _transformNestedTable3 = transformNestedTablesWithAnalytics(transformedAdf, dispatchAnalyticsEvent);
204
+ transformedAdf = _transformNestedTable3.transformedAdf;
205
+ }
159
206
  var entity = (0, _validateUsingSpec.validateADFEntity)(schema, transformedAdf || node, dispatchAnalyticsEvent);
160
207
  var newEntity = maySanitizePrivateContent(entity, providerFactory, sanitizePrivateContent);
161
208
  var parsedDoc = _model.Node.fromJSON(schema, newEntity);
@@ -117,6 +117,7 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
117
117
  ACTION["RENDERED"] = "rendered";
118
118
  ACTION["ON_EDITOR_READY_CALLBACK"] = "onEditorReadyCallback";
119
119
  ACTION["ON_CHANGE_CALLBACK"] = "onChangeCalled";
120
+ ACTION["NESTED_TABLE_TRANSFORMED"] = "nestedTableTransformed";
120
121
  ACTION["NEW_COLLAB_SYNC_UP_ERROR_NO_STEPS"] = "newCollabSyncUpErrorNoSteps";
121
122
  ACTION["REMOVE_ICON"] = "removedIcon";
122
123
  ACTION["INVALID_PROSEMIRROR_DOCUMENT"] = "invalidProsemirrorDocument";
@@ -0,0 +1 @@
1
+ export {};
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "94.16.0";
4
+ const packageVersion = "94.17.0";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // TODO: Sanitise the URL instead of just removing it
@@ -1,4 +1,4 @@
1
- import React, { useCallback, useState } from 'react';
1
+ import React, { useCallback, useMemo, useState } from 'react';
2
2
  import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
3
3
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
4
  import { LAYOUT_COLUMN_PADDING } from '../styles';
@@ -20,10 +20,16 @@ const getHandleStyle = node => {
20
20
  const handleOffset = editorExperiment('nested-dnd', true) ? LAYOUT_COLUMN_PADDING * 2 + 8 : LAYOUT_COLUMN_PADDING * 2;
21
21
  return {
22
22
  left: {
23
- left: `-${handleOffset}px`
23
+ left: `-${handleOffset}px`,
24
+ height: 'calc(100% - 8px)',
25
+ bottom: '0px',
26
+ top: 'unset'
24
27
  },
25
28
  right: {
26
- right: `-${handleOffset}px`
29
+ right: `-${handleOffset}px`,
30
+ height: 'calc(100% - 8px)',
31
+ bottom: '0px',
32
+ top: 'unset'
27
33
  }
28
34
  };
29
35
  }
@@ -40,11 +46,12 @@ export const ignoreResizerMutations = mutation => {
40
46
  */
41
47
  const BreakoutResizer = ({
42
48
  editorView,
43
- node,
49
+ nodeType,
44
50
  getPos,
45
51
  getRef,
46
52
  disabled,
47
- getEditorWidth
53
+ getEditorWidth,
54
+ parentRef
48
55
  }) => {
49
56
  const [{
50
57
  minWidth,
@@ -55,6 +62,25 @@ const BreakoutResizer = ({
55
62
  maxWidth: undefined,
56
63
  isResizing: false
57
64
  });
65
+
66
+ // Relying on re-renders caused by selection changes inside/around node
67
+ const isSelectionInNode = useMemo(() => {
68
+ const pos = getPos();
69
+ if (pos === undefined) {
70
+ return false;
71
+ }
72
+ const node = editorView.state.doc.nodeAt(pos);
73
+ if (node === null) {
74
+ return false;
75
+ }
76
+ const endPos = pos + node.nodeSize;
77
+ const startPos = pos;
78
+ const {
79
+ $from,
80
+ $to
81
+ } = editorView.state.selection;
82
+ return $from.pos >= startPos && endPos >= $to.pos;
83
+ }, [editorView.state.doc, editorView.state.selection, getPos]);
58
84
  const handleResizeStart = useCallback(() => {
59
85
  let newMinWidth;
60
86
  let newMaxWidth;
@@ -94,7 +120,7 @@ const BreakoutResizer = ({
94
120
  width: Math.max(newWidth, akEditorDefaultLayoutWidth)
95
121
  })]);
96
122
  }
97
- newTr.setMeta('is-resizer-resizing', false);
123
+ newTr.setMeta('is-resizer-resizing', false).setMeta('scrollIntoView', false);
98
124
  dispatch(newTr);
99
125
  setResizingState({
100
126
  isResizing: false,
@@ -113,7 +139,7 @@ const BreakoutResizer = ({
113
139
  left: true,
114
140
  right: true
115
141
  },
116
- handleStyles: getHandleStyle(node),
142
+ handleStyles: getHandleStyle(nodeType),
117
143
  minWidth: minWidth,
118
144
  maxWidth: maxWidth
119
145
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
@@ -123,11 +149,15 @@ const BreakoutResizer = ({
123
149
  left: '50%',
124
150
  transform: 'translateX(-50%)'
125
151
  } : undefined,
126
- resizeRatio: 2,
127
152
  handleResizeStart: handleResizeStart,
128
153
  handleResizeStop: handleResizeStop,
129
- handleSize: "small",
130
- childrenDOMRef: getRef
154
+ childrenDOMRef: getRef,
155
+ resizeRatio: 2,
156
+ isHandleVisible: isSelectionInNode,
157
+ handleSize: "clamped",
158
+ handleHighlight: "full-height",
159
+ handlePositioning: "adjacent",
160
+ handleAlignmentMethod: "sticky"
131
161
  });
132
162
  };
133
163
  export { BreakoutResizer };
@@ -100,6 +100,11 @@ export const resizerStyles = css`
100
100
  height: 96px;
101
101
  }
102
102
  }
103
+ &.clamped {
104
+ & .${resizerHandleThumbClassName} {
105
+ height: clamp(43px, calc(100% - 32px), 96px);
106
+ }
107
+ }
103
108
 
104
109
  /*
105
110
  Handle Alignment
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "94.16.0";
16
+ const packageVersion = "94.17.0";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  class DropList extends Component {
@@ -1,10 +1,47 @@
1
- import { transformDedupeMarks, transformIndentationMarks, transformInvalidMediaContent, transformMediaLinkMarks, transformNodesMissingContent, transformTextLinkCodeMarks } from '@atlaskit/adf-utils/transforms';
1
+ import { transformDedupeMarks, transformIndentationMarks, transformInvalidMediaContent, transformMediaLinkMarks, transformNestedTablesIncomingDocument, transformNodesMissingContent, transformTextLinkCodeMarks } from '@atlaskit/adf-utils/transforms';
2
2
  import { Node } from '@atlaskit/editor-prosemirror/model';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
3
4
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
4
5
  import { sanitizeNodeForPrivacy } from './filter/privacy-filter';
5
6
  import { findAndTrackUnsupportedContentNodes } from './track-unsupported-content';
6
7
  import { validateADFEntity } from './validate-using-spec';
7
- export function processRawValueWithoutTransformation(schema, value) {
8
+ const transformNestedTablesWithAnalytics = (node, dispatchAnalyticsEvent) => {
9
+ try {
10
+ const {
11
+ transformedAdf,
12
+ isTransformed
13
+ } = transformNestedTablesIncomingDocument(node);
14
+ if (isTransformed && dispatchAnalyticsEvent) {
15
+ dispatchAnalyticsEvent({
16
+ action: ACTION.NESTED_TABLE_TRANSFORMED,
17
+ actionSubject: ACTION_SUBJECT.EDITOR,
18
+ eventType: EVENT_TYPE.OPERATIONAL
19
+ });
20
+ return {
21
+ transformedAdf,
22
+ isTransformed
23
+ };
24
+ }
25
+ } catch (e) {
26
+ // eslint-disable-next-line no-console
27
+ console.error('Failed to transform one or more nested tables in the document');
28
+ if (dispatchAnalyticsEvent) {
29
+ dispatchAnalyticsEvent({
30
+ action: ACTION.DOCUMENT_PROCESSING_ERROR,
31
+ actionSubject: ACTION_SUBJECT.EDITOR,
32
+ eventType: EVENT_TYPE.OPERATIONAL,
33
+ attributes: {
34
+ errorMessage: 'Failed to transform one or more nested tables in the document'
35
+ }
36
+ });
37
+ }
38
+ }
39
+ return {
40
+ transformedAdf: node,
41
+ isTransformed: false
42
+ };
43
+ };
44
+ export function processRawValueWithoutValidation(schema, value, dispatchAnalyticsEvent) {
8
45
  if (!value) {
9
46
  return;
10
47
  }
@@ -20,8 +57,15 @@ export function processRawValueWithoutTransformation(schema, value) {
20
57
  } else {
21
58
  node = value;
22
59
  }
23
- const parsedDoc = Node.fromJSON(schema, node);
24
- return parsedDoc;
60
+ if (fg('platform_editor_use_nested_table_pm_nodes')) {
61
+ // Convert nested-table extensions into nested tables
62
+ const {
63
+ transformedAdf
64
+ } = transformNestedTablesWithAnalytics(node, dispatchAnalyticsEvent);
65
+ return Node.fromJSON(schema, transformedAdf);
66
+ } else {
67
+ return Node.fromJSON(schema, node);
68
+ }
25
69
  }
26
70
  export function processRawValue(schema, value, providerFactory, sanitizePrivateContent, contentTransformer, dispatchAnalyticsEvent) {
27
71
  if (!value) {
@@ -153,6 +197,12 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
153
197
  eventType: EVENT_TYPE.OPERATIONAL
154
198
  });
155
199
  }
200
+ if (fg('platform_editor_use_nested_table_pm_nodes')) {
201
+ // Convert nested-table extensions into nested tables
202
+ ({
203
+ transformedAdf
204
+ } = transformNestedTablesWithAnalytics(transformedAdf, dispatchAnalyticsEvent));
205
+ }
156
206
  const entity = validateADFEntity(schema, transformedAdf || node, dispatchAnalyticsEvent);
157
207
  let newEntity = maySanitizePrivateContent(entity, providerFactory, sanitizePrivateContent);
158
208
  const parsedDoc = Node.fromJSON(schema, newEntity);
@@ -117,6 +117,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
117
117
  ACTION["RENDERED"] = "rendered";
118
118
  ACTION["ON_EDITOR_READY_CALLBACK"] = "onEditorReadyCallback";
119
119
  ACTION["ON_CHANGE_CALLBACK"] = "onChangeCalled";
120
+ ACTION["NESTED_TABLE_TRANSFORMED"] = "nestedTableTransformed";
120
121
  ACTION["NEW_COLLAB_SYNC_UP_ERROR_NO_STEPS"] = "newCollabSyncUpErrorNoSteps";
121
122
  ACTION["REMOVE_ICON"] = "removedIcon";
122
123
  ACTION["INVALID_PROSEMIRROR_DOCUMENT"] = "invalidProsemirrorDocument";
@@ -0,0 +1 @@
1
+ export {};
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "94.16.0";
10
+ var packageVersion = "94.17.0";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // TODO: Sanitise the URL instead of just removing it
@@ -1,5 +1,5 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import React, { useCallback, useState } from 'react';
2
+ import React, { useCallback, useMemo, useState } from 'react';
3
3
  import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
4
4
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
5
  import { LAYOUT_COLUMN_PADDING } from '../styles';
@@ -21,10 +21,16 @@ var getHandleStyle = function getHandleStyle(node) {
21
21
  var handleOffset = editorExperiment('nested-dnd', true) ? LAYOUT_COLUMN_PADDING * 2 + 8 : LAYOUT_COLUMN_PADDING * 2;
22
22
  return {
23
23
  left: {
24
- left: "-".concat(handleOffset, "px")
24
+ left: "-".concat(handleOffset, "px"),
25
+ height: 'calc(100% - 8px)',
26
+ bottom: '0px',
27
+ top: 'unset'
25
28
  },
26
29
  right: {
27
- right: "-".concat(handleOffset, "px")
30
+ right: "-".concat(handleOffset, "px"),
31
+ height: 'calc(100% - 8px)',
32
+ bottom: '0px',
33
+ top: 'unset'
28
34
  }
29
35
  };
30
36
  }
@@ -41,11 +47,12 @@ export var ignoreResizerMutations = function ignoreResizerMutations(mutation) {
41
47
  */
42
48
  var BreakoutResizer = function BreakoutResizer(_ref) {
43
49
  var editorView = _ref.editorView,
44
- node = _ref.node,
50
+ nodeType = _ref.nodeType,
45
51
  getPos = _ref.getPos,
46
52
  getRef = _ref.getRef,
47
53
  disabled = _ref.disabled,
48
- getEditorWidth = _ref.getEditorWidth;
54
+ getEditorWidth = _ref.getEditorWidth,
55
+ parentRef = _ref.parentRef;
49
56
  var _useState = useState({
50
57
  minWidth: undefined,
51
58
  maxWidth: undefined,
@@ -57,6 +64,24 @@ var BreakoutResizer = function BreakoutResizer(_ref) {
57
64
  maxWidth = _useState2$.maxWidth,
58
65
  isResizing = _useState2$.isResizing,
59
66
  setResizingState = _useState2[1];
67
+
68
+ // Relying on re-renders caused by selection changes inside/around node
69
+ var isSelectionInNode = useMemo(function () {
70
+ var pos = getPos();
71
+ if (pos === undefined) {
72
+ return false;
73
+ }
74
+ var node = editorView.state.doc.nodeAt(pos);
75
+ if (node === null) {
76
+ return false;
77
+ }
78
+ var endPos = pos + node.nodeSize;
79
+ var startPos = pos;
80
+ var _editorView$state$sel = editorView.state.selection,
81
+ $from = _editorView$state$sel.$from,
82
+ $to = _editorView$state$sel.$to;
83
+ return $from.pos >= startPos && endPos >= $to.pos;
84
+ }, [editorView.state.doc, editorView.state.selection, getPos]);
60
85
  var handleResizeStart = useCallback(function () {
61
86
  var newMinWidth;
62
87
  var newMaxWidth;
@@ -90,7 +115,7 @@ var BreakoutResizer = function BreakoutResizer(_ref) {
90
115
  width: Math.max(newWidth, akEditorDefaultLayoutWidth)
91
116
  })]);
92
117
  }
93
- newTr.setMeta('is-resizer-resizing', false);
118
+ newTr.setMeta('is-resizer-resizing', false).setMeta('scrollIntoView', false);
94
119
  dispatch(newTr);
95
120
  setResizingState({
96
121
  isResizing: false,
@@ -111,7 +136,7 @@ var BreakoutResizer = function BreakoutResizer(_ref) {
111
136
  left: true,
112
137
  right: true
113
138
  },
114
- handleStyles: getHandleStyle(node),
139
+ handleStyles: getHandleStyle(nodeType),
115
140
  minWidth: minWidth,
116
141
  maxWidth: maxWidth
117
142
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
@@ -121,11 +146,15 @@ var BreakoutResizer = function BreakoutResizer(_ref) {
121
146
  left: '50%',
122
147
  transform: 'translateX(-50%)'
123
148
  } : undefined,
124
- resizeRatio: 2,
125
149
  handleResizeStart: handleResizeStart,
126
150
  handleResizeStop: handleResizeStop,
127
- handleSize: "small",
128
- childrenDOMRef: getRef
151
+ childrenDOMRef: getRef,
152
+ resizeRatio: 2,
153
+ isHandleVisible: isSelectionInNode,
154
+ handleSize: "clamped",
155
+ handleHighlight: "full-height",
156
+ handlePositioning: "adjacent",
157
+ handleAlignmentMethod: "sticky"
129
158
  });
130
159
  };
131
160
  export { BreakoutResizer };
@@ -21,4 +21,4 @@ export var handleWrapperClass = 'resizer-handle-wrapper';
21
21
  export var resizerHandleZIndex = 1;
22
22
 
23
23
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766, Seems perfectly safe to autofix, but comments would be lost…
24
- export var resizerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.", " {\n\t\twill-change: width;\n\n\t\t&:hover,\n\t\t&.display-handle {\n\t\t\t& > .", " > .", " {\n\t\t\t\tvisibility: visible;\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\n\t\t&.is-resizing {\n\t\t\t& .", " {\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\n\t\t&.", " {\n\t\t\t& .", " {\n\t\t\t\ttransition: none;\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tdisplay: flex;\n\t\tvisibility: hidden;\n\t\topacity: 0;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\twidth: 7px;\n\t\ttransition:\n\t\t\tvisibility 0.2s,\n\t\t\topacity 0.2s;\n\n\t\t/*\n NOTE: The below style is targeted at the div element added by the tooltip. We don't have any means of injecting styles\n into the tooltip\n */\n\t\t& div[role='presentation'] {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\tmargin-top: ", ";\n\t\t\twhite-space: normal;\n\t\t}\n\n\t\t/*\n Handle Positions\n */\n\t\t&.left {\n\t\t\talign-items: flex-start;\n\t\t}\n\t\t&.right {\n\t\t\talign-items: flex-end;\n\t\t}\n\n\t\t/*\n Handle Sizing\n */\n\t\t&.small {\n\t\t\t& .", " {\n\t\t\t\theight: 43px;\n\t\t\t}\n\t\t}\n\t\t&.medium {\n\t\t\t& .", " {\n\t\t\t\theight: 64px;\n\t\t\t}\n\t\t}\n\t\t&.large {\n\t\t\t& .", " {\n\t\t\t\theight: 96px;\n\t\t\t}\n\t\t}\n\n\t\t/*\n Handle Alignment\n */\n\t\t&.sticky {\n\t\t\t& .", " {\n\t\t\t\tposition: sticky;\n\t\t\t\ttop: ", ";\n\t\t\t\tbottom: ", ";\n\t\t\t}\n\t\t}\n\n\t\t&:hover {\n\t\t\t& .", " {\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\n\t\t\t& .", " {\n\t\t\t\tvisibility: visible;\n\t\t\t\topacity: 0.5;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tcontent: ' ';\n\t\tdisplay: flex;\n\t\twidth: 3px;\n\t\tmargin: 0 ", ";\n\t\theight: 64px;\n\t\ttransition: background-color 0.2s;\n\t\tborder-radius: 6px;\n\t\tborder: 0;\n\t\tpadding: 0;\n\t\tz-index: 2;\n\t\toutline: none;\n\t\tmin-height: 24px;\n\t\tbackground: ", ";\n\n\t\t&:hover {\n\t\t\tcursor: col-resize;\n\t\t}\n\n\t\t&:focus {\n\t\t\tbackground: ", ";\n\n\t\t\t&::after {\n\t\t\t\tcontent: '';\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: ", ";\n\t\t\t\tright: ", ";\n\t\t\t\tbottom: ", ";\n\t\t\t\tleft: ", ";\n\t\t\t\tborder: 2px solid ", ";\n\t\t\t\tborder-radius: inherit;\n\t\t\t\tz-index: -1;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tvisibility: hidden;\n\t\tposition: absolute;\n\t\twidth: 7px;\n\t\theight: calc(100% - 40px);\n\t\tborder-radius: 4px;\n\t\topacity: 0;\n\t\ttransition:\n\t\t\tbackground-color 0.2s,\n\t\t\tvisibility 0.2s,\n\t\t\topacity 0.2s;\n\n\t\t&.none {\n\t\t\tbackground: none;\n\t\t}\n\n\t\t&.shadow {\n\t\t\tbackground: ", ";\n\t\t}\n\n\t\t&.full-height {\n\t\t\tbackground: ", ";\n\t\t\theight: 100%;\n\t\t\tmin-height: 36px;\n\t\t}\n\t}\n\n\t.", " {\n\t\t& .", " {\n\t\t\tbackground: ", ";\n\t\t}\n\t}\n\n\t.", " {\n\t\tposition: relative;\n\t\tdisplay: inline-block;\n\t\twidth: 100%;\n\n\t\t&.", " {\n\t\t\tpadding: 0 ", ";\n\t\t\tleft: ", ";\n\t\t}\n\t}\n\n\t// This below style is here to make sure the image width is correct when nested in a table\n\ttable .", ", table .", ".", " {\n\t\tpadding: unset;\n\t\tleft: unset;\n\t}\n"])), resizerItemClassName, handleWrapperClass, resizerHandleClassName, resizerHandleThumbClassName, "var(--ds-border-focused, #388BFF)", resizerDangerClassName, resizerHandleThumbClassName, "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), resizerHandleClassName, "var(--ds-space-negative-200, -16px)", resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", resizerHandleThumbClassName, "var(--ds-border-focused, #388BFF)", resizerHandleTrackClassName, resizerHandleThumbClassName, "var(--ds-space-025, 2px)", "var(--ds-border, #091E4224)", "var(--ds-border-selected, #0C66E4)", "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-050, -4px)", "var(--ds-border-focused, #388BFF)", resizerHandleTrackClassName, "var(--ds-background-selected, #E9F2FF)", "var(--ds-background-selected, #E9F2FF)", akEditorSelectedNodeClassName, resizerHandleThumbClassName, "var(--ds-border-focused, #388BFF)", resizerHoverZoneClassName, resizerExtendedZone, "var(--ds-space-150, 12px)", "var(--ds-space-negative-150, -12px)", resizerHoverZoneClassName, resizerHoverZoneClassName, resizerExtendedZone);
24
+ export var resizerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.", " {\n\t\twill-change: width;\n\n\t\t&:hover,\n\t\t&.display-handle {\n\t\t\t& > .", " > .", " {\n\t\t\t\tvisibility: visible;\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\n\t\t&.is-resizing {\n\t\t\t& .", " {\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\n\t\t&.", " {\n\t\t\t& .", " {\n\t\t\t\ttransition: none;\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tdisplay: flex;\n\t\tvisibility: hidden;\n\t\topacity: 0;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\twidth: 7px;\n\t\ttransition:\n\t\t\tvisibility 0.2s,\n\t\t\topacity 0.2s;\n\n\t\t/*\n NOTE: The below style is targeted at the div element added by the tooltip. We don't have any means of injecting styles\n into the tooltip\n */\n\t\t& div[role='presentation'] {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\tmargin-top: ", ";\n\t\t\twhite-space: normal;\n\t\t}\n\n\t\t/*\n Handle Positions\n */\n\t\t&.left {\n\t\t\talign-items: flex-start;\n\t\t}\n\t\t&.right {\n\t\t\talign-items: flex-end;\n\t\t}\n\n\t\t/*\n Handle Sizing\n */\n\t\t&.small {\n\t\t\t& .", " {\n\t\t\t\theight: 43px;\n\t\t\t}\n\t\t}\n\t\t&.medium {\n\t\t\t& .", " {\n\t\t\t\theight: 64px;\n\t\t\t}\n\t\t}\n\t\t&.large {\n\t\t\t& .", " {\n\t\t\t\theight: 96px;\n\t\t\t}\n\t\t}\n\t\t&.clamped {\n\t\t\t& .", " {\n\t\t\t\theight: clamp(43px, calc(100% - 32px), 96px);\n\t\t\t}\n\t\t}\n\n\t\t/*\n Handle Alignment\n */\n\t\t&.sticky {\n\t\t\t& .", " {\n\t\t\t\tposition: sticky;\n\t\t\t\ttop: ", ";\n\t\t\t\tbottom: ", ";\n\t\t\t}\n\t\t}\n\n\t\t&:hover {\n\t\t\t& .", " {\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\n\t\t\t& .", " {\n\t\t\t\tvisibility: visible;\n\t\t\t\topacity: 0.5;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tcontent: ' ';\n\t\tdisplay: flex;\n\t\twidth: 3px;\n\t\tmargin: 0 ", ";\n\t\theight: 64px;\n\t\ttransition: background-color 0.2s;\n\t\tborder-radius: 6px;\n\t\tborder: 0;\n\t\tpadding: 0;\n\t\tz-index: 2;\n\t\toutline: none;\n\t\tmin-height: 24px;\n\t\tbackground: ", ";\n\n\t\t&:hover {\n\t\t\tcursor: col-resize;\n\t\t}\n\n\t\t&:focus {\n\t\t\tbackground: ", ";\n\n\t\t\t&::after {\n\t\t\t\tcontent: '';\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: ", ";\n\t\t\t\tright: ", ";\n\t\t\t\tbottom: ", ";\n\t\t\t\tleft: ", ";\n\t\t\t\tborder: 2px solid ", ";\n\t\t\t\tborder-radius: inherit;\n\t\t\t\tz-index: -1;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tvisibility: hidden;\n\t\tposition: absolute;\n\t\twidth: 7px;\n\t\theight: calc(100% - 40px);\n\t\tborder-radius: 4px;\n\t\topacity: 0;\n\t\ttransition:\n\t\t\tbackground-color 0.2s,\n\t\t\tvisibility 0.2s,\n\t\t\topacity 0.2s;\n\n\t\t&.none {\n\t\t\tbackground: none;\n\t\t}\n\n\t\t&.shadow {\n\t\t\tbackground: ", ";\n\t\t}\n\n\t\t&.full-height {\n\t\t\tbackground: ", ";\n\t\t\theight: 100%;\n\t\t\tmin-height: 36px;\n\t\t}\n\t}\n\n\t.", " {\n\t\t& .", " {\n\t\t\tbackground: ", ";\n\t\t}\n\t}\n\n\t.", " {\n\t\tposition: relative;\n\t\tdisplay: inline-block;\n\t\twidth: 100%;\n\n\t\t&.", " {\n\t\t\tpadding: 0 ", ";\n\t\t\tleft: ", ";\n\t\t}\n\t}\n\n\t// This below style is here to make sure the image width is correct when nested in a table\n\ttable .", ", table .", ".", " {\n\t\tpadding: unset;\n\t\tleft: unset;\n\t}\n"])), resizerItemClassName, handleWrapperClass, resizerHandleClassName, resizerHandleThumbClassName, "var(--ds-border-focused, #388BFF)", resizerDangerClassName, resizerHandleThumbClassName, "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), resizerHandleClassName, "var(--ds-space-negative-200, -16px)", resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", resizerHandleThumbClassName, "var(--ds-border-focused, #388BFF)", resizerHandleTrackClassName, resizerHandleThumbClassName, "var(--ds-space-025, 2px)", "var(--ds-border, #091E4224)", "var(--ds-border-selected, #0C66E4)", "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-050, -4px)", "var(--ds-space-negative-050, -4px)", "var(--ds-border-focused, #388BFF)", resizerHandleTrackClassName, "var(--ds-background-selected, #E9F2FF)", "var(--ds-background-selected, #E9F2FF)", akEditorSelectedNodeClassName, resizerHandleThumbClassName, "var(--ds-border-focused, #388BFF)", resizerHoverZoneClassName, resizerExtendedZone, "var(--ds-space-150, 12px)", "var(--ds-space-negative-150, -12px)", resizerHoverZoneClassName, resizerHoverZoneClassName, resizerExtendedZone);
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
21
21
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "94.16.0";
24
+ var packageVersion = "94.17.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var DropList = /*#__PURE__*/function (_Component) {
@@ -1,10 +1,46 @@
1
- import { transformDedupeMarks, transformIndentationMarks, transformInvalidMediaContent, transformMediaLinkMarks, transformNodesMissingContent, transformTextLinkCodeMarks } from '@atlaskit/adf-utils/transforms';
1
+ import { transformDedupeMarks, transformIndentationMarks, transformInvalidMediaContent, transformMediaLinkMarks, transformNestedTablesIncomingDocument, transformNodesMissingContent, transformTextLinkCodeMarks } from '@atlaskit/adf-utils/transforms';
2
2
  import { Node } from '@atlaskit/editor-prosemirror/model';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
3
4
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
4
5
  import { sanitizeNodeForPrivacy } from './filter/privacy-filter';
5
6
  import { findAndTrackUnsupportedContentNodes } from './track-unsupported-content';
6
7
  import { validateADFEntity } from './validate-using-spec';
7
- export function processRawValueWithoutTransformation(schema, value) {
8
+ var transformNestedTablesWithAnalytics = function transformNestedTablesWithAnalytics(node, dispatchAnalyticsEvent) {
9
+ try {
10
+ var _transformNestedTable = transformNestedTablesIncomingDocument(node),
11
+ transformedAdf = _transformNestedTable.transformedAdf,
12
+ isTransformed = _transformNestedTable.isTransformed;
13
+ if (isTransformed && dispatchAnalyticsEvent) {
14
+ dispatchAnalyticsEvent({
15
+ action: ACTION.NESTED_TABLE_TRANSFORMED,
16
+ actionSubject: ACTION_SUBJECT.EDITOR,
17
+ eventType: EVENT_TYPE.OPERATIONAL
18
+ });
19
+ return {
20
+ transformedAdf: transformedAdf,
21
+ isTransformed: isTransformed
22
+ };
23
+ }
24
+ } catch (e) {
25
+ // eslint-disable-next-line no-console
26
+ console.error('Failed to transform one or more nested tables in the document');
27
+ if (dispatchAnalyticsEvent) {
28
+ dispatchAnalyticsEvent({
29
+ action: ACTION.DOCUMENT_PROCESSING_ERROR,
30
+ actionSubject: ACTION_SUBJECT.EDITOR,
31
+ eventType: EVENT_TYPE.OPERATIONAL,
32
+ attributes: {
33
+ errorMessage: 'Failed to transform one or more nested tables in the document'
34
+ }
35
+ });
36
+ }
37
+ }
38
+ return {
39
+ transformedAdf: node,
40
+ isTransformed: false
41
+ };
42
+ };
43
+ export function processRawValueWithoutValidation(schema, value, dispatchAnalyticsEvent) {
8
44
  if (!value) {
9
45
  return;
10
46
  }
@@ -20,8 +56,14 @@ export function processRawValueWithoutTransformation(schema, value) {
20
56
  } else {
21
57
  node = value;
22
58
  }
23
- var parsedDoc = Node.fromJSON(schema, node);
24
- return parsedDoc;
59
+ if (fg('platform_editor_use_nested_table_pm_nodes')) {
60
+ // Convert nested-table extensions into nested tables
61
+ var _transformNestedTable2 = transformNestedTablesWithAnalytics(node, dispatchAnalyticsEvent),
62
+ transformedAdf = _transformNestedTable2.transformedAdf;
63
+ return Node.fromJSON(schema, transformedAdf);
64
+ } else {
65
+ return Node.fromJSON(schema, node);
66
+ }
25
67
  }
26
68
  export function processRawValue(schema, value, providerFactory, sanitizePrivateContent, contentTransformer, dispatchAnalyticsEvent) {
27
69
  if (!value) {
@@ -149,6 +191,11 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
149
191
  eventType: EVENT_TYPE.OPERATIONAL
150
192
  });
151
193
  }
194
+ if (fg('platform_editor_use_nested_table_pm_nodes')) {
195
+ // Convert nested-table extensions into nested tables
196
+ var _transformNestedTable3 = transformNestedTablesWithAnalytics(transformedAdf, dispatchAnalyticsEvent);
197
+ transformedAdf = _transformNestedTable3.transformedAdf;
198
+ }
152
199
  var entity = validateADFEntity(schema, transformedAdf || node, dispatchAnalyticsEvent);
153
200
  var newEntity = maySanitizePrivateContent(entity, providerFactory, sanitizePrivateContent);
154
201
  var parsedDoc = Node.fromJSON(schema, newEntity);
@@ -124,6 +124,7 @@ export declare enum ACTION {
124
124
  RENDERED = "rendered",
125
125
  ON_EDITOR_READY_CALLBACK = "onEditorReadyCallback",
126
126
  ON_CHANGE_CALLBACK = "onChangeCalled",
127
+ NESTED_TABLE_TRANSFORMED = "nestedTableTransformed",
127
128
  NEW_COLLAB_SYNC_UP_ERROR_NO_STEPS = "newCollabSyncUpErrorNoSteps",
128
129
  REMOVE_ICON = "removedIcon",
129
130
  INVALID_PROSEMIRROR_DOCUMENT = "invalidProsemirrorDocument",
@@ -29,6 +29,7 @@ import type { LoomEventPayload } from './loom-events';
29
29
  import type { MediaEventPayload } from './media-events';
30
30
  import { type MentionEventPayload } from './mention-events';
31
31
  import type { MoveContentEventPayload } from './move-content-events';
32
+ import { type NestedTableActionsEventPayload } from './nested-table-events';
32
33
  import type { NodeEventPayload } from './node-events';
33
34
  import type { PasteEventPayload } from './paste-events';
34
35
  import type { ReferentialityEventPayload } from './referentiality-events';
@@ -47,7 +48,7 @@ export type SimplifiedNode = {
47
48
  marks?: string[];
48
49
  content?: SimplifiedNode[];
49
50
  };
50
- export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | AIDefinitionsEventPayload;
51
+ export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AIDefinitionsEventPayload;
51
52
  type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
52
53
  previousColor: string;
53
54
  newColor: string;
@@ -104,7 +104,9 @@ type ReactNodeViewRenderedAEP = OperationalAEP<ACTION.REACT_NODEVIEW_RENDERED, A
104
104
  }>;
105
105
  type UploadExternalFailedAEP = OperationalAEP<ACTION.UPLOAD_EXTERNAL_FAIL, ACTION_SUBJECT.EDITOR, undefined, undefined>;
106
106
  type InvalidProsemirrorDocumentErrorAEP = OperationalAEP<ACTION.INVALID_PROSEMIRROR_DOCUMENT, ACTION_SUBJECT.EDITOR, undefined, undefined>;
107
- type DocumentProcessingErrorAEP = OperationalAEP<ACTION.DOCUMENT_PROCESSING_ERROR, ACTION_SUBJECT.EDITOR, undefined, undefined>;
107
+ type DocumentProcessingErrorAEP = OperationalAEP<ACTION.DOCUMENT_PROCESSING_ERROR, ACTION_SUBJECT.EDITOR, undefined, {
108
+ errorMessage?: string;
109
+ } | undefined>;
108
110
  type EditorStopAEP = UIAEP<ACTION.STOPPED, ACTION_SUBJECT.EDITOR, ACTION_SUBJECT_ID.SAVE | ACTION_SUBJECT_ID.CANCEL, {
109
111
  inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.SHORTCUT;
110
112
  documentSize: number;
@@ -0,0 +1,4 @@
1
+ import type { ACTION, ACTION_SUBJECT } from './enums';
2
+ import type { OperationalAEP } from './utils';
3
+ export type NestedTableTransformedAEP = OperationalAEP<ACTION.NESTED_TABLE_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined>;
4
+ export type NestedTableActionsEventPayload = NestedTableTransformedAEP;
@@ -12,12 +12,13 @@ export declare const ignoreResizerMutations: (mutation: MutationRecord | {
12
12
  *
13
13
  * use platform_editor_advanced_layouts_breakout_resizing
14
14
  */
15
- declare const BreakoutResizer: ({ editorView, node, getPos, getRef, disabled, getEditorWidth, }: {
15
+ declare const BreakoutResizer: ({ editorView, nodeType, getPos, getRef, disabled, getEditorWidth, parentRef, }: {
16
16
  editorView: EditorView;
17
- node: BreakoutSupportedNodes;
17
+ nodeType: BreakoutSupportedNodes;
18
18
  getPos: getPosHandlerNode;
19
19
  getRef?: ((ref: HTMLElement | null) => void) | undefined;
20
- disabled: boolean;
20
+ disabled?: boolean | undefined;
21
21
  getEditorWidth: () => EditorContainerWidth | undefined;
22
+ parentRef?: HTMLElement | undefined;
22
23
  }) => JSX.Element;
23
24
  export { BreakoutResizer };
@@ -39,6 +39,8 @@ export type ResizerProps = {
39
39
  handlePositioning?: HandlePositioning;
40
40
  /**
41
41
  * The handleSize is used to determine the width/height of the handle element.
42
+ *
43
+ * **To be deprecated** and replaced with 'clamped' by default
42
44
  */
43
45
  handleSize?: HandleSize;
44
46
  /**
@@ -21,7 +21,7 @@ export type HandleStyles = {
21
21
  right?: React.CSSProperties;
22
22
  left?: React.CSSProperties;
23
23
  };
24
- export type HandleSize = 'small' | 'medium' | 'large';
24
+ export type HandleSize = 'small' | 'medium' | 'large' | 'clamped';
25
25
  export type HandleAlignmentMethod = 'center' | 'sticky';
26
26
  export type HandlePositioning = 'overlap' | 'adjacent';
27
27
  export type ResizerAppearance = 'danger';
@@ -3,5 +3,5 @@ import { Node } from '@atlaskit/editor-prosemirror/model';
3
3
  import type { DispatchAnalyticsEvent } from '../analytics';
4
4
  import type { ProviderFactory } from '../provider-factory';
5
5
  import type { ReplaceRawValue, Transformer } from '../types';
6
- export declare function processRawValueWithoutTransformation(schema: Schema, value?: ReplaceRawValue): Node | undefined;
6
+ export declare function processRawValueWithoutValidation(schema: Schema, value?: ReplaceRawValue, dispatchAnalyticsEvent?: DispatchAnalyticsEvent): Node | undefined;
7
7
  export declare function processRawValue(schema: Schema, value?: ReplaceRawValue, providerFactory?: ProviderFactory, sanitizePrivateContent?: boolean, contentTransformer?: Transformer<string>, dispatchAnalyticsEvent?: DispatchAnalyticsEvent): Node | undefined;
@@ -124,6 +124,7 @@ export declare enum ACTION {
124
124
  RENDERED = "rendered",
125
125
  ON_EDITOR_READY_CALLBACK = "onEditorReadyCallback",
126
126
  ON_CHANGE_CALLBACK = "onChangeCalled",
127
+ NESTED_TABLE_TRANSFORMED = "nestedTableTransformed",
127
128
  NEW_COLLAB_SYNC_UP_ERROR_NO_STEPS = "newCollabSyncUpErrorNoSteps",
128
129
  REMOVE_ICON = "removedIcon",
129
130
  INVALID_PROSEMIRROR_DOCUMENT = "invalidProsemirrorDocument",
@@ -29,6 +29,7 @@ import type { LoomEventPayload } from './loom-events';
29
29
  import type { MediaEventPayload } from './media-events';
30
30
  import { type MentionEventPayload } from './mention-events';
31
31
  import type { MoveContentEventPayload } from './move-content-events';
32
+ import { type NestedTableActionsEventPayload } from './nested-table-events';
32
33
  import type { NodeEventPayload } from './node-events';
33
34
  import type { PasteEventPayload } from './paste-events';
34
35
  import type { ReferentialityEventPayload } from './referentiality-events';
@@ -47,7 +48,7 @@ export type SimplifiedNode = {
47
48
  marks?: string[];
48
49
  content?: SimplifiedNode[];
49
50
  };
50
- export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | AIDefinitionsEventPayload;
51
+ export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AIDefinitionsEventPayload;
51
52
  type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
52
53
  previousColor: string;
53
54
  newColor: string;
@@ -104,7 +104,9 @@ type ReactNodeViewRenderedAEP = OperationalAEP<ACTION.REACT_NODEVIEW_RENDERED, A
104
104
  }>;
105
105
  type UploadExternalFailedAEP = OperationalAEP<ACTION.UPLOAD_EXTERNAL_FAIL, ACTION_SUBJECT.EDITOR, undefined, undefined>;
106
106
  type InvalidProsemirrorDocumentErrorAEP = OperationalAEP<ACTION.INVALID_PROSEMIRROR_DOCUMENT, ACTION_SUBJECT.EDITOR, undefined, undefined>;
107
- type DocumentProcessingErrorAEP = OperationalAEP<ACTION.DOCUMENT_PROCESSING_ERROR, ACTION_SUBJECT.EDITOR, undefined, undefined>;
107
+ type DocumentProcessingErrorAEP = OperationalAEP<ACTION.DOCUMENT_PROCESSING_ERROR, ACTION_SUBJECT.EDITOR, undefined, {
108
+ errorMessage?: string;
109
+ } | undefined>;
108
110
  type EditorStopAEP = UIAEP<ACTION.STOPPED, ACTION_SUBJECT.EDITOR, ACTION_SUBJECT_ID.SAVE | ACTION_SUBJECT_ID.CANCEL, {
109
111
  inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.SHORTCUT;
110
112
  documentSize: number;
@@ -0,0 +1,4 @@
1
+ import type { ACTION, ACTION_SUBJECT } from './enums';
2
+ import type { OperationalAEP } from './utils';
3
+ export type NestedTableTransformedAEP = OperationalAEP<ACTION.NESTED_TABLE_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined>;
4
+ export type NestedTableActionsEventPayload = NestedTableTransformedAEP;
@@ -12,12 +12,13 @@ export declare const ignoreResizerMutations: (mutation: MutationRecord | {
12
12
  *
13
13
  * use platform_editor_advanced_layouts_breakout_resizing
14
14
  */
15
- declare const BreakoutResizer: ({ editorView, node, getPos, getRef, disabled, getEditorWidth, }: {
15
+ declare const BreakoutResizer: ({ editorView, nodeType, getPos, getRef, disabled, getEditorWidth, parentRef, }: {
16
16
  editorView: EditorView;
17
- node: BreakoutSupportedNodes;
17
+ nodeType: BreakoutSupportedNodes;
18
18
  getPos: getPosHandlerNode;
19
19
  getRef?: ((ref: HTMLElement | null) => void) | undefined;
20
- disabled: boolean;
20
+ disabled?: boolean | undefined;
21
21
  getEditorWidth: () => EditorContainerWidth | undefined;
22
+ parentRef?: HTMLElement | undefined;
22
23
  }) => JSX.Element;
23
24
  export { BreakoutResizer };
@@ -39,6 +39,8 @@ export type ResizerProps = {
39
39
  handlePositioning?: HandlePositioning;
40
40
  /**
41
41
  * The handleSize is used to determine the width/height of the handle element.
42
+ *
43
+ * **To be deprecated** and replaced with 'clamped' by default
42
44
  */
43
45
  handleSize?: HandleSize;
44
46
  /**
@@ -21,7 +21,7 @@ export type HandleStyles = {
21
21
  right?: React.CSSProperties;
22
22
  left?: React.CSSProperties;
23
23
  };
24
- export type HandleSize = 'small' | 'medium' | 'large';
24
+ export type HandleSize = 'small' | 'medium' | 'large' | 'clamped';
25
25
  export type HandleAlignmentMethod = 'center' | 'sticky';
26
26
  export type HandlePositioning = 'overlap' | 'adjacent';
27
27
  export type ResizerAppearance = 'danger';
@@ -3,5 +3,5 @@ import { Node } from '@atlaskit/editor-prosemirror/model';
3
3
  import type { DispatchAnalyticsEvent } from '../analytics';
4
4
  import type { ProviderFactory } from '../provider-factory';
5
5
  import type { ReplaceRawValue, Transformer } from '../types';
6
- export declare function processRawValueWithoutTransformation(schema: Schema, value?: ReplaceRawValue): Node | undefined;
6
+ export declare function processRawValueWithoutValidation(schema: Schema, value?: ReplaceRawValue, dispatchAnalyticsEvent?: DispatchAnalyticsEvent): Node | undefined;
7
7
  export declare function processRawValue(schema: Schema, value?: ReplaceRawValue, providerFactory?: ProviderFactory, sanitizePrivateContent?: boolean, contentTransformer?: Transformer<string>, dispatchAnalyticsEvent?: DispatchAnalyticsEvent): Node | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "94.16.0",
3
+ "version": "94.17.0",
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/"
@@ -130,14 +130,14 @@
130
130
  "@atlaskit/icon-object": "^6.7.0",
131
131
  "@atlaskit/link-datasource": "^3.8.0",
132
132
  "@atlaskit/link-picker": "^1.47.0",
133
- "@atlaskit/media-card": "^78.11.0",
134
- "@atlaskit/media-client": "^28.1.0",
133
+ "@atlaskit/media-card": "^78.12.0",
134
+ "@atlaskit/media-client": "^28.2.0",
135
135
  "@atlaskit/media-client-react": "^2.3.0",
136
136
  "@atlaskit/media-common": "^11.7.0",
137
137
  "@atlaskit/media-file-preview": "^0.9.0",
138
138
  "@atlaskit/media-picker": "^67.0.0",
139
139
  "@atlaskit/media-ui": "^26.1.0",
140
- "@atlaskit/media-viewer": "49.2.7",
140
+ "@atlaskit/media-viewer": "49.3.0",
141
141
  "@atlaskit/mention": "^23.3.0",
142
142
  "@atlaskit/menu": "^2.13.0",
143
143
  "@atlaskit/onboarding": "^12.1.0",
@@ -189,7 +189,7 @@
189
189
  "devDependencies": {
190
190
  "@af/visual-regression": "*",
191
191
  "@atlaskit/media-core": "^34.3.0",
192
- "@atlaskit/media-test-helpers": "^34.5.0",
192
+ "@atlaskit/media-test-helpers": "^34.6.0",
193
193
  "@atlaskit/util-data-test": "^17.12.0",
194
194
  "@atlaskit/visual-regression": "*",
195
195
  "@testing-library/dom": "^10.1.0",
@@ -282,6 +282,9 @@
282
282
  },
283
283
  "platform_editor_reduce_element_browser_padding": {
284
284
  "type": "boolean"
285
+ },
286
+ "platform_editor_use_nested_table_pm_nodes": {
287
+ "type": "boolean"
285
288
  }
286
289
  }
287
290
  }