@atlaskit/editor-plugin-table 14.2.0 → 14.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 14.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`c1ef6524373ae`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c1ef6524373ae) -
8
+ Add insm feature tracking for tableColumnResize
9
+
10
+ ## 14.2.1
11
+
12
+ ### Patch Changes
13
+
14
+ - [`8b18612863ea6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8b18612863ea6) -
15
+ Add insm feature tracking for tableResize
16
+ - [`39f3b00f65aa0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/39f3b00f65aa0) -
17
+ NOISSUE: Patches emotion CSS exports in various editor packages
18
+ - Updated dependencies
19
+
3
20
  ## 14.2.0
4
21
 
5
22
  ### Minor Changes
@@ -23,6 +23,7 @@ var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-
23
23
  var _commands = require("@atlaskit/editor-prosemirror/commands");
24
24
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
25
25
  var _utils = require("@atlaskit/editor-tables/utils");
26
+ var _insm = require("@atlaskit/insm");
26
27
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
27
28
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
28
29
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
@@ -245,6 +246,10 @@ var TableResizer = exports.TableResizer = function TableResizer(_ref) {
245
246
  };
246
247
  }, [editorView, displayGuideline, displayGapCursor]);
247
248
  var handleResizeStart = (0, _react.useCallback)(function () {
249
+ if ((0, _expValEquals.expValEquals)('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
250
+ var _insm$session;
251
+ (_insm$session = _insm.insm.session) === null || _insm$session === void 0 || _insm$session.startFeature('tableResize');
252
+ }
248
253
  startMeasure();
249
254
  isResizing.current = true;
250
255
  var dispatch = editorView.dispatch,
@@ -403,6 +408,10 @@ var TableResizer = exports.TableResizer = function TableResizer(_ref) {
403
408
  if (onResizeStop) {
404
409
  onResizeStop();
405
410
  }
411
+ if ((0, _expValEquals.expValEquals)('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
412
+ var _insm$session2;
413
+ (_insm$session2 = _insm.insm.session) === null || _insm$session2 === void 0 || _insm$session2.endFeature('tableResize');
414
+ }
406
415
  return newWidth;
407
416
  }, [editorView, getPos, node, isCommentEditor, widthToWidest, endMeasure, displayGapCursor, displayGuideline, updateWidth, scheduleResize, onResizeStop, attachAnalyticsEvent, tableRef, pluginInjectionApi, isTableScalingEnabled, shouldUseIncreasedScalingPercent, formatMessage]);
408
417
  var handleTableSizeChangeOnKeypress = (0, _react.useCallback)(function (step) {
@@ -8,6 +8,8 @@ var _analytics = require("@atlaskit/editor-common/analytics");
8
8
  var _styles = require("@atlaskit/editor-common/styles");
9
9
  var _tableMap = require("@atlaskit/editor-tables/table-map");
10
10
  var _utils = require("@atlaskit/editor-tables/utils");
11
+ var _insm = require("@atlaskit/insm");
12
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
11
13
  var _columnResize = require("../commands/column-resize");
12
14
  var _misc = require("../commands/misc");
13
15
  var _pluginFactory = require("../plugin-factory");
@@ -36,6 +38,10 @@ var handleMouseDown = exports.handleMouseDown = function handleMouseDown(view, e
36
38
  var _getTablePluginState = (0, _pluginFactory.getPluginState)(state),
37
39
  isKeyboardResize = _getTablePluginState.isKeyboardResize;
38
40
  event.preventDefault();
41
+ if ((0, _expValEquals.expValEquals)('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
42
+ var _insm$session;
43
+ (_insm$session = _insm.insm.session) === null || _insm$session === void 0 || _insm$session.startFeature('tableColumnResize');
44
+ }
39
45
  var tr = view.state.tr;
40
46
  tr.setMeta(_tableAnalytics.META_KEYS.OVERFLOW_TRIGGER, {
41
47
  name: _analytics.TABLE_OVERFLOW_CHANGE_TRIGGER.RESIZED_COLUMN
@@ -126,9 +132,17 @@ var handleMouseDown = exports.handleMouseDown = function handleMouseDown(view, e
126
132
  var _getTablePluginState2 = (0, _pluginFactory.getPluginState)(state),
127
133
  isTableHovered = _getTablePluginState2.isTableHovered;
128
134
  if (resizeHandlePos === null) {
135
+ if ((0, _expValEquals.expValEquals)('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
136
+ var _insm$session2;
137
+ (_insm$session2 = _insm.insm.session) === null || _insm$session2 === void 0 || _insm$session2.endFeature('tableColumnResize');
138
+ }
129
139
  return (0, _commands.stopResizing)()(state, dispatch);
130
140
  }
131
141
  if (!(0, _misc2.pointsAtCell)(state.doc.resolve(resizeHandlePos))) {
142
+ if ((0, _expValEquals.expValEquals)('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
143
+ var _insm$session3;
144
+ (_insm$session3 = _insm.insm.session) === null || _insm$session3 === void 0 || _insm$session3.endFeature('tableColumnResize');
145
+ }
132
146
  return;
133
147
  }
134
148
  // resizeHandlePos could be remapped via a collab change.
@@ -141,6 +155,10 @@ var handleMouseDown = exports.handleMouseDown = function handleMouseDown(view, e
141
155
 
142
156
  // If we let go in the same place we started, don't need to do anything.
143
157
  if (dragging && clientX === dragging.startX) {
158
+ if ((0, _expValEquals.expValEquals)('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
159
+ var _insm$session4;
160
+ (_insm$session4 = _insm.insm.session) === null || _insm$session4 === void 0 || _insm$session4.endFeature('tableColumnResize');
161
+ }
144
162
  if (isKeyboardResize || !isTableHovered) {
145
163
  /** if column resize had started via keyboard but continued by mouse
146
164
  * or mouse pointer leaves the table but mouse button still pressed
@@ -207,6 +225,10 @@ var handleMouseDown = exports.handleMouseDown = function handleMouseDown(view, e
207
225
  }
208
226
  })(tr);
209
227
  }
228
+ if ((0, _expValEquals.expValEquals)('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
229
+ var _insm$session5;
230
+ (_insm$session5 = _insm.insm.session) === null || _insm$session5 === void 0 || _insm$session5.endFeature('tableColumnResize');
231
+ }
210
232
  if (isKeyboardResize || !isTableHovered) {
211
233
  /** if column resize had started via keyboard but continued by mouse
212
234
  * or mouse pointer leaves the table but mouse button still pressed
@@ -13,6 +13,7 @@ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared
13
13
  import { chainCommands } from '@atlaskit/editor-prosemirror/commands';
14
14
  import { akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
15
15
  import { findTable } from '@atlaskit/editor-tables/utils';
16
+ import { insm } from '@atlaskit/insm';
16
17
  import { fg } from '@atlaskit/platform-feature-flags';
17
18
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
18
19
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
@@ -234,6 +235,10 @@ export const TableResizer = ({
234
235
  };
235
236
  }, [editorView, displayGuideline, displayGapCursor]);
236
237
  const handleResizeStart = useCallback(() => {
238
+ if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
239
+ var _insm$session;
240
+ (_insm$session = insm.session) === null || _insm$session === void 0 ? void 0 : _insm$session.startFeature('tableResize');
241
+ }
237
242
  startMeasure();
238
243
  isResizing.current = true;
239
244
  const {
@@ -399,6 +404,10 @@ export const TableResizer = ({
399
404
  if (onResizeStop) {
400
405
  onResizeStop();
401
406
  }
407
+ if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
408
+ var _insm$session2;
409
+ (_insm$session2 = insm.session) === null || _insm$session2 === void 0 ? void 0 : _insm$session2.endFeature('tableResize');
410
+ }
402
411
  return newWidth;
403
412
  }, [editorView, getPos, node, isCommentEditor, widthToWidest, endMeasure, displayGapCursor, displayGuideline, updateWidth, scheduleResize, onResizeStop, attachAnalyticsEvent, tableRef, pluginInjectionApi, isTableScalingEnabled, shouldUseIncreasedScalingPercent, formatMessage]);
404
413
  const handleTableSizeChangeOnKeypress = useCallback(step => {
@@ -2,6 +2,8 @@ import { ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD, TABLE_ACTION, TABLE_OVERFLOW_
2
2
  import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
3
3
  import { TableMap } from '@atlaskit/editor-tables/table-map';
4
4
  import { getSelectionRect } from '@atlaskit/editor-tables/utils';
5
+ import { insm } from '@atlaskit/insm';
6
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
7
  import { stopKeyboardColumnResizing } from '../commands/column-resize';
6
8
  import { updateResizeHandleDecorations } from '../commands/misc';
7
9
  import { getPluginState as getTablePluginState } from '../plugin-factory';
@@ -34,6 +36,10 @@ export const handleMouseDown = (view, event, localResizeHandlePos, getEditorCont
34
36
  isKeyboardResize
35
37
  } = getTablePluginState(state);
36
38
  event.preventDefault();
39
+ if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
40
+ var _insm$session;
41
+ (_insm$session = insm.session) === null || _insm$session === void 0 ? void 0 : _insm$session.startFeature('tableColumnResize');
42
+ }
37
43
  const tr = view.state.tr;
38
44
  tr.setMeta(META_KEYS.OVERFLOW_TRIGGER, {
39
45
  name: TABLE_OVERFLOW_CHANGE_TRIGGER.RESIZED_COLUMN
@@ -130,9 +136,17 @@ export const handleMouseDown = (view, event, localResizeHandlePos, getEditorCont
130
136
  isTableHovered
131
137
  } = getTablePluginState(state);
132
138
  if (resizeHandlePos === null) {
139
+ if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
140
+ var _insm$session2;
141
+ (_insm$session2 = insm.session) === null || _insm$session2 === void 0 ? void 0 : _insm$session2.endFeature('tableColumnResize');
142
+ }
133
143
  return stopResizing()(state, dispatch);
134
144
  }
135
145
  if (!pointsAtCell(state.doc.resolve(resizeHandlePos))) {
146
+ if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
147
+ var _insm$session3;
148
+ (_insm$session3 = insm.session) === null || _insm$session3 === void 0 ? void 0 : _insm$session3.endFeature('tableColumnResize');
149
+ }
136
150
  return;
137
151
  }
138
152
  // resizeHandlePos could be remapped via a collab change.
@@ -145,6 +159,10 @@ export const handleMouseDown = (view, event, localResizeHandlePos, getEditorCont
145
159
 
146
160
  // If we let go in the same place we started, don't need to do anything.
147
161
  if (dragging && clientX === dragging.startX) {
162
+ if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
163
+ var _insm$session4;
164
+ (_insm$session4 = insm.session) === null || _insm$session4 === void 0 ? void 0 : _insm$session4.endFeature('tableColumnResize');
165
+ }
148
166
  if (isKeyboardResize || !isTableHovered) {
149
167
  /** if column resize had started via keyboard but continued by mouse
150
168
  * or mouse pointer leaves the table but mouse button still pressed
@@ -215,6 +233,10 @@ export const handleMouseDown = (view, event, localResizeHandlePos, getEditorCont
215
233
  }
216
234
  })(tr);
217
235
  }
236
+ if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
237
+ var _insm$session5;
238
+ (_insm$session5 = insm.session) === null || _insm$session5 === void 0 ? void 0 : _insm$session5.endFeature('tableColumnResize');
239
+ }
218
240
  if (isKeyboardResize || !isTableHovered) {
219
241
  /** if column resize had started via keyboard but continued by mouse
220
242
  * or mouse pointer leaves the table but mouse button still pressed
@@ -17,6 +17,7 @@ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared
17
17
  import { chainCommands } from '@atlaskit/editor-prosemirror/commands';
18
18
  import { akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
19
19
  import { findTable } from '@atlaskit/editor-tables/utils';
20
+ import { insm } from '@atlaskit/insm';
20
21
  import { fg } from '@atlaskit/platform-feature-flags';
21
22
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
22
23
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
@@ -236,6 +237,10 @@ export var TableResizer = function TableResizer(_ref) {
236
237
  };
237
238
  }, [editorView, displayGuideline, displayGapCursor]);
238
239
  var handleResizeStart = useCallback(function () {
240
+ if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
241
+ var _insm$session;
242
+ (_insm$session = insm.session) === null || _insm$session === void 0 || _insm$session.startFeature('tableResize');
243
+ }
239
244
  startMeasure();
240
245
  isResizing.current = true;
241
246
  var dispatch = editorView.dispatch,
@@ -394,6 +399,10 @@ export var TableResizer = function TableResizer(_ref) {
394
399
  if (onResizeStop) {
395
400
  onResizeStop();
396
401
  }
402
+ if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
403
+ var _insm$session2;
404
+ (_insm$session2 = insm.session) === null || _insm$session2 === void 0 || _insm$session2.endFeature('tableResize');
405
+ }
397
406
  return newWidth;
398
407
  }, [editorView, getPos, node, isCommentEditor, widthToWidest, endMeasure, displayGapCursor, displayGuideline, updateWidth, scheduleResize, onResizeStop, attachAnalyticsEvent, tableRef, pluginInjectionApi, isTableScalingEnabled, shouldUseIncreasedScalingPercent, formatMessage]);
399
408
  var handleTableSizeChangeOnKeypress = useCallback(function (step) {
@@ -2,6 +2,8 @@ import { ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD, TABLE_ACTION, TABLE_OVERFLOW_
2
2
  import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
3
3
  import { TableMap } from '@atlaskit/editor-tables/table-map';
4
4
  import { getSelectionRect } from '@atlaskit/editor-tables/utils';
5
+ import { insm } from '@atlaskit/insm';
6
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
7
  import { stopKeyboardColumnResizing } from '../commands/column-resize';
6
8
  import { updateResizeHandleDecorations } from '../commands/misc';
7
9
  import { getPluginState as getTablePluginState } from '../plugin-factory';
@@ -30,6 +32,10 @@ export var handleMouseDown = function handleMouseDown(view, event, localResizeHa
30
32
  var _getTablePluginState = getTablePluginState(state),
31
33
  isKeyboardResize = _getTablePluginState.isKeyboardResize;
32
34
  event.preventDefault();
35
+ if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
36
+ var _insm$session;
37
+ (_insm$session = insm.session) === null || _insm$session === void 0 || _insm$session.startFeature('tableColumnResize');
38
+ }
33
39
  var tr = view.state.tr;
34
40
  tr.setMeta(META_KEYS.OVERFLOW_TRIGGER, {
35
41
  name: TABLE_OVERFLOW_CHANGE_TRIGGER.RESIZED_COLUMN
@@ -120,9 +126,17 @@ export var handleMouseDown = function handleMouseDown(view, event, localResizeHa
120
126
  var _getTablePluginState2 = getTablePluginState(state),
121
127
  isTableHovered = _getTablePluginState2.isTableHovered;
122
128
  if (resizeHandlePos === null) {
129
+ if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
130
+ var _insm$session2;
131
+ (_insm$session2 = insm.session) === null || _insm$session2 === void 0 || _insm$session2.endFeature('tableColumnResize');
132
+ }
123
133
  return stopResizing()(state, dispatch);
124
134
  }
125
135
  if (!pointsAtCell(state.doc.resolve(resizeHandlePos))) {
136
+ if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
137
+ var _insm$session3;
138
+ (_insm$session3 = insm.session) === null || _insm$session3 === void 0 || _insm$session3.endFeature('tableColumnResize');
139
+ }
126
140
  return;
127
141
  }
128
142
  // resizeHandlePos could be remapped via a collab change.
@@ -135,6 +149,10 @@ export var handleMouseDown = function handleMouseDown(view, event, localResizeHa
135
149
 
136
150
  // If we let go in the same place we started, don't need to do anything.
137
151
  if (dragging && clientX === dragging.startX) {
152
+ if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
153
+ var _insm$session4;
154
+ (_insm$session4 = insm.session) === null || _insm$session4 === void 0 || _insm$session4.endFeature('tableColumnResize');
155
+ }
138
156
  if (isKeyboardResize || !isTableHovered) {
139
157
  /** if column resize had started via keyboard but continued by mouse
140
158
  * or mouse pointer leaves the table but mouse button still pressed
@@ -201,6 +219,10 @@ export var handleMouseDown = function handleMouseDown(view, event, localResizeHa
201
219
  }
202
220
  })(tr);
203
221
  }
222
+ if (expValEquals('cc_editor_interactivity_monitoring', 'isEnabled', true)) {
223
+ var _insm$session5;
224
+ (_insm$session5 = insm.session) === null || _insm$session5 === void 0 || _insm$session5.endFeature('tableColumnResize');
225
+ }
204
226
  if (isKeyboardResize || !isTableHovered) {
205
227
  /** if column resize had started via keyboard but continued by mouse
206
228
  * or mouse pointer leaves the table but mouse button still pressed
@@ -1,3 +1,4 @@
1
- export declare const cellColourPreviewStyles: (selectedColor: string) => import("@emotion/react").SerializedStyles;
2
- export declare const dragMenuBackgroundColorStyles: () => import("@emotion/react").SerializedStyles;
3
- export declare const toggleStyles: import("@emotion/react").SerializedStyles;
1
+ import { type SerializedStyles } from '@emotion/react';
2
+ export declare const cellColourPreviewStyles: (selectedColor: string) => SerializedStyles;
3
+ export declare const dragMenuBackgroundColorStyles: () => SerializedStyles;
4
+ export declare const toggleStyles: SerializedStyles;
@@ -1,3 +1,4 @@
1
- export declare const cellColourPreviewStyles: (selectedColor: string) => import("@emotion/react").SerializedStyles;
2
- export declare const dragMenuBackgroundColorStyles: () => import("@emotion/react").SerializedStyles;
3
- export declare const toggleStyles: import("@emotion/react").SerializedStyles;
1
+ import { type SerializedStyles } from '@emotion/react';
2
+ export declare const cellColourPreviewStyles: (selectedColor: string) => SerializedStyles;
3
+ export declare const dragMenuBackgroundColorStyles: () => SerializedStyles;
4
+ export declare const toggleStyles: SerializedStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "14.2.0",
3
+ "version": "14.2.2",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/editor-prosemirror": "7.0.0",
49
49
  "@atlaskit/editor-shared-styles": "^3.6.0",
50
50
  "@atlaskit/editor-tables": "^2.9.0",
51
- "@atlaskit/icon": "^28.1.0",
51
+ "@atlaskit/icon": "^28.2.0",
52
52
  "@atlaskit/insm": "^0.1.0",
53
53
  "@atlaskit/menu": "^8.4.0",
54
54
  "@atlaskit/platform-feature-flags": "^1.1.0",
@@ -59,7 +59,7 @@
59
59
  "@atlaskit/primitives": "^14.14.0",
60
60
  "@atlaskit/react-ufo": "^4.7.0",
61
61
  "@atlaskit/theme": "^21.0.0",
62
- "@atlaskit/tmp-editor-statsig": "^12.18.0",
62
+ "@atlaskit/tmp-editor-statsig": "^12.22.0",
63
63
  "@atlaskit/toggle": "^15.1.0",
64
64
  "@atlaskit/tokens": "^6.3.0",
65
65
  "@atlaskit/tooltip": "^20.4.0",
@@ -72,7 +72,7 @@
72
72
  "uuid": "^3.1.0"
73
73
  },
74
74
  "peerDependencies": {
75
- "@atlaskit/editor-common": "^109.5.0",
75
+ "@atlaskit/editor-common": "^109.6.0",
76
76
  "react": "^18.2.0",
77
77
  "react-dom": "^18.2.0",
78
78
  "react-intl-next": "npm:react-intl@^5.18.1"