@atlaskit/editor-plugin-table 24.4.3 → 24.4.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,13 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 24.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`7fd637a1c5c47`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7fd637a1c5c47) -
8
+ Add a fix for sort buttons misbehaving when the headings have marks.
9
+ - Updated dependencies
10
+
3
11
  ## 24.4.3
4
12
 
5
13
  ### Patch Changes
@@ -15,6 +15,7 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
15
15
  var _types = require("@atlaskit/editor-common/types");
16
16
  var _view = require("@atlaskit/editor-prosemirror/view");
17
17
  var _tableMap = require("@atlaskit/editor-tables/table-map");
18
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
18
19
  var _SortingIconWrapper = require("../../ui/icons/SortingIconWrapper");
19
20
  var _pluginFactory = require("../plugin-factory");
20
21
  var _consts = require("./consts");
@@ -146,6 +147,10 @@ var createPlugin = exports.createPlugin = function createPlugin(api, nodeViewPor
146
147
  destroy: function destroy(node) {
147
148
  nodeViewPortalProviderAPI.remove(decorationRenderKey);
148
149
  },
150
+ // side: -1 ensures the widget is placed before any content at the
151
+ // position, making it the first direct child of the <th> element and ensuring
152
+ // block marks do not affect CSS styling
153
+ side: (0, _expValEquals.expValEquals)('platform_editor_fix_table_sort_with_mark', 'isEnabled', true) ? -1 : undefined,
149
154
  type: 'sorting-decoration',
150
155
  tableId: tableId
151
156
  }));
@@ -12,6 +12,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
12
12
  import { SortOrder } from '@atlaskit/editor-common/types';
13
13
  import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
14
14
  import { TableMap } from '@atlaskit/editor-tables/table-map';
15
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
15
16
  import { SortingIconWrapper } from '../../ui/icons/SortingIconWrapper';
16
17
  import { getPluginState } from '../plugin-factory';
17
18
  import { IS_DISABLED_CLASS_NAME, SORT_INDEX_DATA_ATTRIBUTE, SORTING_ICON_CLASS_NAME } from './consts';
@@ -119,6 +120,10 @@ export const createPlugin = (api, nodeViewPortalProviderAPI) => {
119
120
  destroy: node => {
120
121
  nodeViewPortalProviderAPI.remove(decorationRenderKey);
121
122
  },
123
+ // side: -1 ensures the widget is placed before any content at the
124
+ // position, making it the first direct child of the <th> element and ensuring
125
+ // block marks do not affect CSS styling
126
+ side: expValEquals('platform_editor_fix_table_sort_with_mark', 'isEnabled', true) ? -1 : undefined,
122
127
  type: 'sorting-decoration',
123
128
  tableId
124
129
  }));
@@ -20,6 +20,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
20
20
  import { SortOrder } from '@atlaskit/editor-common/types';
21
21
  import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
22
22
  import { TableMap } from '@atlaskit/editor-tables/table-map';
23
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
23
24
  import { SortingIconWrapper } from '../../ui/icons/SortingIconWrapper';
24
25
  import { getPluginState } from '../plugin-factory';
25
26
  import { IS_DISABLED_CLASS_NAME, SORT_INDEX_DATA_ATTRIBUTE, SORTING_ICON_CLASS_NAME } from './consts';
@@ -142,6 +143,10 @@ export var createPlugin = function createPlugin(api, nodeViewPortalProviderAPI)
142
143
  destroy: function destroy(node) {
143
144
  nodeViewPortalProviderAPI.remove(decorationRenderKey);
144
145
  },
146
+ // side: -1 ensures the widget is placed before any content at the
147
+ // position, making it the first direct child of the <th> element and ensuring
148
+ // block marks do not affect CSS styling
149
+ side: expValEquals('platform_editor_fix_table_sort_with_mark', 'isEnabled', true) ? -1 : undefined,
145
150
  type: 'sorting-decoration',
146
151
  tableId: tableId
147
152
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "24.4.3",
3
+ "version": "24.4.4",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,7 +41,7 @@
41
41
  "@atlaskit/editor-prosemirror": "^8.0.0",
42
42
  "@atlaskit/editor-shared-styles": "^4.0.0",
43
43
  "@atlaskit/editor-tables": "^3.0.0",
44
- "@atlaskit/editor-toolbar": "^2.1.0",
44
+ "@atlaskit/editor-toolbar": "^2.2.0",
45
45
  "@atlaskit/editor-ui-control-model": "^2.2.0",
46
46
  "@atlaskit/icon": "^37.0.0",
47
47
  "@atlaskit/icon-lab": "^7.3.0",
@@ -51,10 +51,10 @@
51
51
  "@atlaskit/pragmatic-drag-and-drop": "^2.0.0",
52
52
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^3.0.0",
53
53
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^2.0.0",
54
- "@atlaskit/primitives": "^20.5.0",
55
- "@atlaskit/tmp-editor-statsig": "^124.1.0",
54
+ "@atlaskit/primitives": "^20.6.0",
55
+ "@atlaskit/tmp-editor-statsig": "^124.6.0",
56
56
  "@atlaskit/toggle": "^17.1.0",
57
- "@atlaskit/tokens": "^15.5.0",
57
+ "@atlaskit/tokens": "^15.8.0",
58
58
  "@atlaskit/tooltip": "^23.1.0",
59
59
  "@babel/runtime": "^7.0.0",
60
60
  "@compiled/react": "^0.20.0",
@@ -67,7 +67,7 @@
67
67
  "uuid": "^3.1.0"
68
68
  },
69
69
  "peerDependencies": {
70
- "@atlaskit/editor-common": "^116.25.0",
70
+ "@atlaskit/editor-common": "^116.28.0",
71
71
  "react": "^18.2.0",
72
72
  "react-dom": "^18.2.0",
73
73
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"