@atlaskit/editor-plugin-table 14.2.1 → 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,12 @@
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
+
3
10
  ## 14.2.1
4
11
 
5
12
  ### Patch Changes
@@ -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
@@ -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
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "14.2.1",
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.21.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",