@atlaskit/editor-plugin-table 12.1.3 → 12.1.4

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,15 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 12.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#190680](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/190680)
8
+ [`c27708467595b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c27708467595b) -
9
+ [ux] ENGHEALTH-32145 A11y violation detected for rule "label" for "@af/editor-plugin-table-tests"
10
+ from "Editor: Jenga"
11
+ - Updated dependencies
12
+
3
13
  ## 12.1.3
4
14
 
5
15
  ### Patch Changes
@@ -19,6 +19,7 @@ var _state = require("@atlaskit/editor-prosemirror/state");
19
19
  var _editorTables = require("@atlaskit/editor-tables");
20
20
  var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
21
21
  var _setCustomNativeDragPreview = require("@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview");
22
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
22
23
  var _pluginFactory = require("../../pm-plugins/drag-and-drop/plugin-factory");
23
24
  var _pluginFactory2 = require("../../pm-plugins/plugin-factory");
24
25
  var _mergedCells = require("../../pm-plugins/utils/merged-cells");
@@ -196,7 +197,8 @@ var DragHandleComponent = function DragHandleComponent(_ref) {
196
197
  toggleDragMenu && toggleDragMenu('mouse', e);
197
198
  }
198
199
  },
199
- onClick: onClick
200
+ onClick: onClick,
201
+ "aria-label": (0, _expValEquals.expValEquals)('platform_editor_enghealth_table_plugin_lable_rule', 'isEnabled', true) ? formatMessage(_messages.tableMessages.dragHandleZone) : undefined
200
202
  }), /*#__PURE__*/_react.default.createElement("button", {
201
203
  type: "button",
202
204
  id: isDragMenuTarget ? showDragMenuAnchorId : undefined
@@ -23,6 +23,7 @@ var _tableMap = require("@atlaskit/editor-tables/table-map");
23
23
  var _utils2 = require("@atlaskit/editor-tables/utils");
24
24
  var _paintBucketEditorBackgroundColor = _interopRequireDefault(require("@atlaskit/icon/core/migration/paint-bucket--editor-background-color"));
25
25
  var _primitives = require("@atlaskit/primitives");
26
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
26
27
  var _toggle = _interopRequireDefault(require("@atlaskit/toggle"));
27
28
  var _commands = require("../../pm-plugins/commands");
28
29
  var _commandsWithAnalytics = require("../../pm-plugins/commands/commands-with-analytics");
@@ -349,6 +350,7 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
349
350
  css: _styles2.toggleStyles
350
351
  }, (0, _react2.jsx)(_toggle.default, {
351
352
  id: "toggle-header-column",
353
+ label: (0, _expValEquals.expValEquals)('platform_editor_enghealth_table_plugin_lable_rule', 'isEnabled', true) ? formatMessage(_messages.tableMessages.headerColumn) : undefined,
352
354
  onChange: toggleHeaderColumn,
353
355
  isChecked: (0, _nodes.checkIfHeaderColumnEnabled)(selection)
354
356
  }))
@@ -364,6 +366,7 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
364
366
  css: _styles2.toggleStyles
365
367
  }, (0, _react2.jsx)(_toggle.default, {
366
368
  id: "toggle-header-row",
369
+ label: (0, _expValEquals.expValEquals)('platform_editor_enghealth_table_plugin_lable_rule', 'isEnabled', true) ? formatMessage(_messages.tableMessages.headerRow) : undefined,
367
370
  onChange: toggleHeaderRow,
368
371
  isChecked: (0, _nodes.checkIfHeaderRowEnabled)(selection)
369
372
  }))
@@ -382,6 +385,7 @@ var DragMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
382
385
  css: _styles2.toggleStyles
383
386
  }, (0, _react2.jsx)(_toggle.default, {
384
387
  id: "toggle-row-numbers",
388
+ label: (0, _expValEquals.expValEquals)('platform_editor_enghealth_table_plugin_lable_rule', 'isEnabled', true) ? formatMessage(_messages.tableMessages.numberedColumn) : undefined,
385
389
  onChange: toggleRowNumbers,
386
390
  isChecked: (0, _nodes.checkIfNumberColumnEnabled)(selection)
387
391
  }))
@@ -11,6 +11,7 @@ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
11
11
  import { findTable, TableMap } from '@atlaskit/editor-tables';
12
12
  import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
13
13
  import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
14
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
14
15
  import { getPluginState as getDnDPluginState } from '../../pm-plugins/drag-and-drop/plugin-factory';
15
16
  import { getPluginState } from '../../pm-plugins/plugin-factory';
16
17
  import { findDuplicatePosition, hasMergedCellsInSelection } from '../../pm-plugins/utils/merged-cells';
@@ -190,7 +191,8 @@ const DragHandleComponent = ({
190
191
  toggleDragMenu && toggleDragMenu('mouse', e);
191
192
  }
192
193
  },
193
- onClick: onClick
194
+ onClick: onClick,
195
+ "aria-label": expValEquals('platform_editor_enghealth_table_plugin_lable_rule', 'isEnabled', true) ? formatMessage(messages.dragHandleZone) : undefined
194
196
  }), /*#__PURE__*/React.createElement("button", {
195
197
  type: "button",
196
198
  id: isDragMenuTarget ? showDragMenuAnchorId : undefined
@@ -22,6 +22,7 @@ import { findCellRectClosestToPos, getSelectionRect, isSelectionType } from '@at
22
22
  import PaintBucketIcon from '@atlaskit/icon/core/migration/paint-bucket--editor-background-color';
23
23
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
24
24
  import { Box, xcss } from '@atlaskit/primitives';
25
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
25
26
  import Toggle from '@atlaskit/toggle';
26
27
  import { clearHoverSelection, hoverColumns, hoverRows } from '../../pm-plugins/commands';
27
28
  import { setColorWithAnalytics, toggleHeaderColumnWithAnalytics, toggleHeaderRowWithAnalytics, toggleNumberColumnWithAnalytics } from '../../pm-plugins/commands/commands-with-analytics';
@@ -343,6 +344,7 @@ const DragMenu = /*#__PURE__*/React.memo(({
343
344
  css: toggleStyles
344
345
  }, jsx(Toggle, {
345
346
  id: "toggle-header-column",
347
+ label: expValEquals('platform_editor_enghealth_table_plugin_lable_rule', 'isEnabled', true) ? formatMessage(messages.headerColumn) : undefined,
346
348
  onChange: toggleHeaderColumn,
347
349
  isChecked: checkIfHeaderColumnEnabled(selection)
348
350
  }))
@@ -358,6 +360,7 @@ const DragMenu = /*#__PURE__*/React.memo(({
358
360
  css: toggleStyles
359
361
  }, jsx(Toggle, {
360
362
  id: "toggle-header-row",
363
+ label: expValEquals('platform_editor_enghealth_table_plugin_lable_rule', 'isEnabled', true) ? formatMessage(messages.headerRow) : undefined,
361
364
  onChange: toggleHeaderRow,
362
365
  isChecked: checkIfHeaderRowEnabled(selection)
363
366
  }))
@@ -376,6 +379,7 @@ const DragMenu = /*#__PURE__*/React.memo(({
376
379
  css: toggleStyles
377
380
  }, jsx(Toggle, {
378
381
  id: "toggle-row-numbers",
382
+ label: expValEquals('platform_editor_enghealth_table_plugin_lable_rule', 'isEnabled', true) ? formatMessage(messages.numberedColumn) : undefined,
379
383
  onChange: toggleRowNumbers,
380
384
  isChecked: checkIfNumberColumnEnabled(selection)
381
385
  }))
@@ -13,6 +13,7 @@ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
13
13
  import { findTable, TableMap } from '@atlaskit/editor-tables';
14
14
  import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
15
15
  import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
16
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
16
17
  import { getPluginState as getDnDPluginState } from '../../pm-plugins/drag-and-drop/plugin-factory';
17
18
  import { getPluginState } from '../../pm-plugins/plugin-factory';
18
19
  import { findDuplicatePosition, hasMergedCellsInSelection } from '../../pm-plugins/utils/merged-cells';
@@ -187,7 +188,8 @@ var DragHandleComponent = function DragHandleComponent(_ref) {
187
188
  toggleDragMenu && toggleDragMenu('mouse', e);
188
189
  }
189
190
  },
190
- onClick: onClick
191
+ onClick: onClick,
192
+ "aria-label": expValEquals('platform_editor_enghealth_table_plugin_lable_rule', 'isEnabled', true) ? formatMessage(messages.dragHandleZone) : undefined
191
193
  }), /*#__PURE__*/React.createElement("button", {
192
194
  type: "button",
193
195
  id: isDragMenuTarget ? showDragMenuAnchorId : undefined
@@ -24,6 +24,7 @@ import { findCellRectClosestToPos, getSelectionRect, isSelectionType } from '@at
24
24
  import PaintBucketIcon from '@atlaskit/icon/core/migration/paint-bucket--editor-background-color';
25
25
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
26
26
  import { Box, xcss } from '@atlaskit/primitives';
27
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
27
28
  import Toggle from '@atlaskit/toggle';
28
29
  import { clearHoverSelection, hoverColumns, hoverRows } from '../../pm-plugins/commands';
29
30
  import { setColorWithAnalytics, toggleHeaderColumnWithAnalytics, toggleHeaderRowWithAnalytics, toggleNumberColumnWithAnalytics } from '../../pm-plugins/commands/commands-with-analytics';
@@ -338,6 +339,7 @@ var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
338
339
  css: toggleStyles
339
340
  }, jsx(Toggle, {
340
341
  id: "toggle-header-column",
342
+ label: expValEquals('platform_editor_enghealth_table_plugin_lable_rule', 'isEnabled', true) ? formatMessage(messages.headerColumn) : undefined,
341
343
  onChange: toggleHeaderColumn,
342
344
  isChecked: checkIfHeaderColumnEnabled(selection)
343
345
  }))
@@ -353,6 +355,7 @@ var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
353
355
  css: toggleStyles
354
356
  }, jsx(Toggle, {
355
357
  id: "toggle-header-row",
358
+ label: expValEquals('platform_editor_enghealth_table_plugin_lable_rule', 'isEnabled', true) ? formatMessage(messages.headerRow) : undefined,
356
359
  onChange: toggleHeaderRow,
357
360
  isChecked: checkIfHeaderRowEnabled(selection)
358
361
  }))
@@ -371,6 +374,7 @@ var DragMenu = /*#__PURE__*/React.memo(function (_ref) {
371
374
  css: toggleStyles
372
375
  }, jsx(Toggle, {
373
376
  id: "toggle-row-numbers",
377
+ label: expValEquals('platform_editor_enghealth_table_plugin_lable_rule', 'isEnabled', true) ? formatMessage(messages.numberedColumn) : undefined,
374
378
  onChange: toggleRowNumbers,
375
379
  isChecked: checkIfNumberColumnEnabled(selection)
376
380
  }))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "12.1.3",
3
+ "version": "12.1.4",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -54,7 +54,7 @@
54
54
  "@atlaskit/primitives": "^14.10.0",
55
55
  "@atlaskit/react-ufo": "^4.1.0",
56
56
  "@atlaskit/theme": "^19.0.0",
57
- "@atlaskit/tmp-editor-statsig": "^9.10.0",
57
+ "@atlaskit/tmp-editor-statsig": "^9.11.0",
58
58
  "@atlaskit/toggle": "^15.0.0",
59
59
  "@atlaskit/tokens": "^5.6.0",
60
60
  "@atlaskit/tooltip": "^20.3.0",
@@ -20,6 +20,7 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
20
20
  import { findTable, TableMap } from '@atlaskit/editor-tables';
21
21
  import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
22
22
  import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
23
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
23
24
  import { token } from '@atlaskit/tokens';
24
25
 
25
26
  import { getPluginState as getDnDPluginState } from '../../pm-plugins/drag-and-drop/plugin-factory';
@@ -250,6 +251,11 @@ const DragHandleComponent = ({
250
251
  }
251
252
  }}
252
253
  onClick={onClick}
254
+ aria-label={
255
+ expValEquals('platform_editor_enghealth_table_plugin_lable_rule', 'isEnabled', true)
256
+ ? formatMessage(messages.dragHandleZone)
257
+ : undefined
258
+ }
253
259
  />
254
260
  <button
255
261
  type="button"
@@ -44,6 +44,7 @@ import {
44
44
  import PaintBucketIcon from '@atlaskit/icon/core/migration/paint-bucket--editor-background-color';
45
45
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
46
46
  import { Box, xcss } from '@atlaskit/primitives';
47
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
47
48
  import Toggle from '@atlaskit/toggle';
48
49
 
49
50
  import { clearHoverSelection, hoverColumns, hoverRows } from '../../pm-plugins/commands';
@@ -447,6 +448,15 @@ const DragMenu = React.memo(
447
448
  <div css={toggleStyles}>
448
449
  <Toggle
449
450
  id="toggle-header-column"
451
+ label={
452
+ expValEquals(
453
+ 'platform_editor_enghealth_table_plugin_lable_rule',
454
+ 'isEnabled',
455
+ true,
456
+ )
457
+ ? formatMessage(messages.headerColumn)
458
+ : undefined
459
+ }
450
460
  onChange={toggleHeaderColumn}
451
461
  isChecked={checkIfHeaderColumnEnabled(selection)}
452
462
  />
@@ -462,6 +472,15 @@ const DragMenu = React.memo(
462
472
  <div css={toggleStyles}>
463
473
  <Toggle
464
474
  id="toggle-header-row"
475
+ label={
476
+ expValEquals(
477
+ 'platform_editor_enghealth_table_plugin_lable_rule',
478
+ 'isEnabled',
479
+ true,
480
+ )
481
+ ? formatMessage(messages.headerRow)
482
+ : undefined
483
+ }
465
484
  onChange={toggleHeaderRow}
466
485
  isChecked={checkIfHeaderRowEnabled(selection)}
467
486
  />
@@ -480,6 +499,11 @@ const DragMenu = React.memo(
480
499
  <div css={toggleStyles}>
481
500
  <Toggle
482
501
  id="toggle-row-numbers"
502
+ label={
503
+ expValEquals('platform_editor_enghealth_table_plugin_lable_rule', 'isEnabled', true)
504
+ ? formatMessage(messages.numberedColumn)
505
+ : undefined
506
+ }
483
507
  onChange={toggleRowNumbers}
484
508
  isChecked={checkIfNumberColumnEnabled(selection)}
485
509
  />